@deepnoid/ui 0.1.40 → 0.1.42

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 (31) hide show
  1. package/.turbo/turbo-build.log +136 -136
  2. package/dist/{chunk-Y37BWBR3.mjs → chunk-6ZL5NEEI.mjs} +2 -3
  3. package/dist/{chunk-Z74QNVPG.mjs → chunk-AJUQBMSV.mjs} +17 -2
  4. package/dist/{chunk-LWRK5TPZ.mjs → chunk-BPEMHZH3.mjs} +22 -19
  5. package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
  6. package/dist/components/breadcrumb/index.mjs +2 -2
  7. package/dist/components/button/index.mjs +6 -6
  8. package/dist/components/fileUpload/fileUpload.mjs +3 -3
  9. package/dist/components/fileUpload/index.mjs +3 -3
  10. package/dist/components/modal/index.mjs +2 -2
  11. package/dist/components/modal/modal.mjs +2 -2
  12. package/dist/components/switch/index.js +17 -2
  13. package/dist/components/switch/index.mjs +1 -1
  14. package/dist/components/switch/switch.d.mts +2 -0
  15. package/dist/components/switch/switch.d.ts +2 -0
  16. package/dist/components/switch/switch.js +17 -2
  17. package/dist/components/switch/switch.mjs +1 -1
  18. package/dist/components/table/index.js +23 -21
  19. package/dist/components/table/index.mjs +2 -2
  20. package/dist/components/table/table-body.d.mts +1 -2
  21. package/dist/components/table/table-body.d.ts +1 -2
  22. package/dist/components/table/table-body.js +22 -19
  23. package/dist/components/table/table-body.mjs +1 -1
  24. package/dist/components/table/table.d.mts +0 -1
  25. package/dist/components/table/table.d.ts +0 -1
  26. package/dist/components/table/table.js +23 -21
  27. package/dist/components/table/table.mjs +2 -2
  28. package/dist/index.js +40 -23
  29. package/dist/index.mjs +14 -14
  30. package/package.json +1 -1
  31. package/dist/{chunk-TRR232FS.mjs → chunk-25QOEKXS.mjs} +3 -3
@@ -20,7 +20,7 @@ var TableBody = ({
20
20
  rowCheckbox = false,
21
21
  checkedRows,
22
22
  onCheckRow,
23
- onRowClick,
23
+ // onRowClick,
24
24
  isLoading = false,
25
25
  emptyContent,
26
26
  skeletonRow,
@@ -48,24 +48,27 @@ var TableBody = ({
48
48
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
49
49
  ] }, `skeleton-${rowIndex}`);
50
50
  const renderEmptyRow = () => /* @__PURE__ */ jsx("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ jsx("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
51
- const renderDataRow = (row, rowIndex) => /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
52
- columns.map((column, colIdx) => {
53
- var _a;
54
- const value = row[column.field];
55
- const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
56
- const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
57
- return /* @__PURE__ */ jsx(
58
- "td",
59
- {
60
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
61
- style: getCellStyle(column),
62
- children: content
63
- },
64
- `${rowIndex}-${colIdx}`
65
- );
66
- }),
67
- rowCheckbox && renderCheckboxCell(rowIndex)
68
- ] }, rowIndex);
51
+ const renderDataRow = (row, rowIndex) => (
52
+ // <tr key={rowIndex} className={slots.tr({ class: classNames?.tr })} onClick={() => onRowClick?.(row)}>
53
+ /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
54
+ columns.map((column, colIdx) => {
55
+ var _a;
56
+ const value = row[column.field];
57
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
58
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
59
+ return /* @__PURE__ */ jsx(
60
+ "td",
61
+ {
62
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
63
+ style: getCellStyle(column),
64
+ children: content
65
+ },
66
+ `${rowIndex}-${colIdx}`
67
+ );
68
+ }),
69
+ rowCheckbox && renderCheckboxCell(rowIndex)
70
+ ] }, rowIndex)
71
+ );
69
72
  const renderRows = () => {
70
73
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ jsx(Fragment, {});
71
74
  if (!rows.length && emptyContent) return renderEmptyRow();
@@ -3,13 +3,13 @@ import {
3
3
  breadcrumb_default
4
4
  } from "../../chunk-G67WUZO3.mjs";
5
5
  import "../../chunk-MY5U63QO.mjs";
6
- import "../../chunk-7TAGGLNY.mjs";
7
- import "../../chunk-WFMFC7R6.mjs";
8
6
  import "../../chunk-LPZOH3RP.mjs";
9
7
  import "../../chunk-UB4YBFOT.mjs";
8
+ import "../../chunk-7TAGGLNY.mjs";
10
9
  import "../../chunk-6WSACUIB.mjs";
11
10
  import "../../chunk-LXHUO6VM.mjs";
12
11
  import "../../chunk-6PNKRBUT.mjs";
12
+ import "../../chunk-WFMFC7R6.mjs";
13
13
  import "../../chunk-ZYIIXWVY.mjs";
14
14
  import "../../chunk-2TKEWFGH.mjs";
15
15
  import "../../chunk-2SDYFOZL.mjs";
@@ -4,13 +4,13 @@ import {
4
4
  breadcrumb_default
5
5
  } from "../../chunk-G67WUZO3.mjs";
6
6
  import "../../chunk-MY5U63QO.mjs";
7
- import "../../chunk-7TAGGLNY.mjs";
8
- import "../../chunk-WFMFC7R6.mjs";
9
7
  import "../../chunk-LPZOH3RP.mjs";
10
8
  import "../../chunk-UB4YBFOT.mjs";
9
+ import "../../chunk-7TAGGLNY.mjs";
11
10
  import "../../chunk-6WSACUIB.mjs";
12
11
  import "../../chunk-LXHUO6VM.mjs";
13
12
  import "../../chunk-6PNKRBUT.mjs";
13
+ import "../../chunk-WFMFC7R6.mjs";
14
14
  import "../../chunk-ZYIIXWVY.mjs";
15
15
  import "../../chunk-2TKEWFGH.mjs";
16
16
  import "../../chunk-2SDYFOZL.mjs";
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import "../../chunk-MY5U63QO.mjs";
3
- import {
4
- icon_button_default
5
- } from "../../chunk-7TAGGLNY.mjs";
6
- import {
7
- text_button_default
8
- } from "../../chunk-WFMFC7R6.mjs";
9
3
  import {
10
4
  button_group_default
11
5
  } from "../../chunk-LPZOH3RP.mjs";
12
6
  import {
13
7
  button_default
14
8
  } from "../../chunk-UB4YBFOT.mjs";
9
+ import {
10
+ icon_button_default
11
+ } from "../../chunk-7TAGGLNY.mjs";
15
12
  import "../../chunk-6WSACUIB.mjs";
16
13
  import "../../chunk-LXHUO6VM.mjs";
17
14
  import "../../chunk-6PNKRBUT.mjs";
15
+ import {
16
+ text_button_default
17
+ } from "../../chunk-WFMFC7R6.mjs";
18
18
  import "../../chunk-ZYIIXWVY.mjs";
19
19
  import "../../chunk-2TKEWFGH.mjs";
20
20
  import "../../chunk-2SDYFOZL.mjs";
@@ -3,17 +3,17 @@ import {
3
3
  FileUpload,
4
4
  fileUploadStyle,
5
5
  fileUpload_default
6
- } from "../../chunk-TRR232FS.mjs";
6
+ } from "../../chunk-25QOEKXS.mjs";
7
7
  import "../../chunk-2GCSFWHD.mjs";
8
8
  import "../../chunk-GH6CPGFN.mjs";
9
9
  import "../../chunk-MY5U63QO.mjs";
10
- import "../../chunk-7TAGGLNY.mjs";
11
- import "../../chunk-WFMFC7R6.mjs";
12
10
  import "../../chunk-LPZOH3RP.mjs";
13
11
  import "../../chunk-UB4YBFOT.mjs";
12
+ import "../../chunk-7TAGGLNY.mjs";
14
13
  import "../../chunk-6WSACUIB.mjs";
15
14
  import "../../chunk-LXHUO6VM.mjs";
16
15
  import "../../chunk-6PNKRBUT.mjs";
16
+ import "../../chunk-WFMFC7R6.mjs";
17
17
  import "../../chunk-ZYIIXWVY.mjs";
18
18
  import "../../chunk-2TKEWFGH.mjs";
19
19
  import "../../chunk-2SDYFOZL.mjs";
@@ -2,17 +2,17 @@
2
2
  import "../../chunk-RLXOHILK.mjs";
3
3
  import {
4
4
  fileUpload_default
5
- } from "../../chunk-TRR232FS.mjs";
5
+ } from "../../chunk-25QOEKXS.mjs";
6
6
  import "../../chunk-2GCSFWHD.mjs";
7
7
  import "../../chunk-GH6CPGFN.mjs";
8
8
  import "../../chunk-MY5U63QO.mjs";
9
- import "../../chunk-7TAGGLNY.mjs";
10
- import "../../chunk-WFMFC7R6.mjs";
11
9
  import "../../chunk-LPZOH3RP.mjs";
12
10
  import "../../chunk-UB4YBFOT.mjs";
11
+ import "../../chunk-7TAGGLNY.mjs";
13
12
  import "../../chunk-6WSACUIB.mjs";
14
13
  import "../../chunk-LXHUO6VM.mjs";
15
14
  import "../../chunk-6PNKRBUT.mjs";
15
+ import "../../chunk-WFMFC7R6.mjs";
16
16
  import "../../chunk-ZYIIXWVY.mjs";
17
17
  import "../../chunk-2TKEWFGH.mjs";
18
18
  import "../../chunk-2SDYFOZL.mjs";
@@ -6,13 +6,13 @@ import {
6
6
  import "../../chunk-SE5TU755.mjs";
7
7
  import "../../chunk-LL6F3WDX.mjs";
8
8
  import "../../chunk-MY5U63QO.mjs";
9
- import "../../chunk-7TAGGLNY.mjs";
10
- import "../../chunk-WFMFC7R6.mjs";
11
9
  import "../../chunk-LPZOH3RP.mjs";
12
10
  import "../../chunk-UB4YBFOT.mjs";
11
+ import "../../chunk-7TAGGLNY.mjs";
13
12
  import "../../chunk-6WSACUIB.mjs";
14
13
  import "../../chunk-LXHUO6VM.mjs";
15
14
  import "../../chunk-6PNKRBUT.mjs";
15
+ import "../../chunk-WFMFC7R6.mjs";
16
16
  import "../../chunk-ZYIIXWVY.mjs";
17
17
  import "../../chunk-2TKEWFGH.mjs";
18
18
  import "../../chunk-2SDYFOZL.mjs";
@@ -5,13 +5,13 @@ import {
5
5
  import "../../chunk-SE5TU755.mjs";
6
6
  import "../../chunk-LL6F3WDX.mjs";
7
7
  import "../../chunk-MY5U63QO.mjs";
8
- import "../../chunk-7TAGGLNY.mjs";
9
- import "../../chunk-WFMFC7R6.mjs";
10
8
  import "../../chunk-LPZOH3RP.mjs";
11
9
  import "../../chunk-UB4YBFOT.mjs";
10
+ import "../../chunk-7TAGGLNY.mjs";
12
11
  import "../../chunk-6WSACUIB.mjs";
13
12
  import "../../chunk-LXHUO6VM.mjs";
14
13
  import "../../chunk-6PNKRBUT.mjs";
14
+ import "../../chunk-WFMFC7R6.mjs";
15
15
  import "../../chunk-ZYIIXWVY.mjs";
16
16
  import "../../chunk-2TKEWFGH.mjs";
17
17
  import "../../chunk-2SDYFOZL.mjs";
@@ -53,10 +53,25 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
53
53
  var import_jsx_runtime = require("react/jsx-runtime");
54
54
  var Switch = (0, import_react.forwardRef)((originalProps, ref) => {
55
55
  const [rawProps, variantProps] = mapPropsVariants(originalProps, switchStyle.variantKeys);
56
- const { size, color, isDisabled, disableAnimation, id, classNames, ...inputProps } = { ...rawProps, ...variantProps };
56
+ const { size, color, isDisabled, disableAnimation, id, checked, onChange, classNames, ...inputProps } = {
57
+ ...rawProps,
58
+ ...variantProps
59
+ };
57
60
  const slots = (0, import_react.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
58
61
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
+ "input",
64
+ {
65
+ ...inputProps,
66
+ id,
67
+ ref,
68
+ type: "checkbox",
69
+ disabled: isDisabled,
70
+ className: "hidden",
71
+ checked,
72
+ onChange
73
+ }
74
+ ),
60
75
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
61
76
  ] });
62
77
  });
@@ -2,7 +2,7 @@
2
2
  import "../../chunk-LVFI2NOH.mjs";
3
3
  import {
4
4
  switch_default
5
- } from "../../chunk-Z74QNVPG.mjs";
5
+ } from "../../chunk-AJUQBMSV.mjs";
6
6
  import "../../chunk-E3G5QXSH.mjs";
7
7
  import "../../chunk-AC6TWLRT.mjs";
8
8
  export {
@@ -9,6 +9,8 @@ interface Props extends Omit<ComponentPropsWithRef<"input">, "ref" | "size"> {
9
9
  color?: "primary" | "secondary";
10
10
  isDisabled?: boolean;
11
11
  disableAnimation?: boolean;
12
+ checked?: boolean;
13
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
12
14
  classNames?: SlotsToClasses<SwitchSlots>;
13
15
  }
14
16
  declare const Switch: react.ForwardRefExoticComponent<Props & SwitchVariantProps & react.RefAttributes<HTMLInputElement>>;
@@ -9,6 +9,8 @@ interface Props extends Omit<ComponentPropsWithRef<"input">, "ref" | "size"> {
9
9
  color?: "primary" | "secondary";
10
10
  isDisabled?: boolean;
11
11
  disableAnimation?: boolean;
12
+ checked?: boolean;
13
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
12
14
  classNames?: SlotsToClasses<SwitchSlots>;
13
15
  }
14
16
  declare const Switch: react.ForwardRefExoticComponent<Props & SwitchVariantProps & react.RefAttributes<HTMLInputElement>>;
@@ -51,10 +51,25 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
51
51
  var import_jsx_runtime = require("react/jsx-runtime");
52
52
  var Switch = (0, import_react.forwardRef)((originalProps, ref) => {
53
53
  const [rawProps, variantProps] = mapPropsVariants(originalProps, switchStyle.variantKeys);
54
- const { size, color, isDisabled, disableAnimation, id, classNames, ...inputProps } = { ...rawProps, ...variantProps };
54
+ const { size, color, isDisabled, disableAnimation, id, checked, onChange, classNames, ...inputProps } = {
55
+ ...rawProps,
56
+ ...variantProps
57
+ };
55
58
  const slots = (0, import_react.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
56
59
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
57
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ "input",
62
+ {
63
+ ...inputProps,
64
+ id,
65
+ ref,
66
+ type: "checkbox",
67
+ disabled: isDisabled,
68
+ className: "hidden",
69
+ checked,
70
+ onChange
71
+ }
72
+ ),
58
73
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
59
74
  ] });
60
75
  });
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  switch_default
4
- } from "../../chunk-Z74QNVPG.mjs";
4
+ } from "../../chunk-AJUQBMSV.mjs";
5
5
  import "../../chunk-E3G5QXSH.mjs";
6
6
  import "../../chunk-AC6TWLRT.mjs";
7
7
  export {
@@ -730,7 +730,7 @@ var TableBody = ({
730
730
  rowCheckbox = false,
731
731
  checkedRows,
732
732
  onCheckRow,
733
- onRowClick,
733
+ // onRowClick,
734
734
  isLoading = false,
735
735
  emptyContent,
736
736
  skeletonRow,
@@ -758,24 +758,27 @@ var TableBody = ({
758
758
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
759
759
  ] }, `skeleton-${rowIndex}`);
760
760
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
761
- const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
762
- columns.map((column, colIdx) => {
763
- var _a;
764
- const value = row[column.field];
765
- const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
766
- const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
767
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
768
- "td",
769
- {
770
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
771
- style: getCellStyle(column),
772
- children: content
773
- },
774
- `${rowIndex}-${colIdx}`
775
- );
776
- }),
777
- rowCheckbox && renderCheckboxCell(rowIndex)
778
- ] }, rowIndex);
761
+ const renderDataRow = (row, rowIndex) => (
762
+ // <tr key={rowIndex} className={slots.tr({ class: classNames?.tr })} onClick={() => onRowClick?.(row)}>
763
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
764
+ columns.map((column, colIdx) => {
765
+ var _a;
766
+ const value = row[column.field];
767
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
768
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
769
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
770
+ "td",
771
+ {
772
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
773
+ style: getCellStyle(column),
774
+ children: content
775
+ },
776
+ `${rowIndex}-${colIdx}`
777
+ );
778
+ }),
779
+ rowCheckbox && renderCheckboxCell(rowIndex)
780
+ ] }, rowIndex)
781
+ );
779
782
  const renderRows = () => {
780
783
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {});
781
784
  if (!rows.length && emptyContent) return renderEmptyRow();
@@ -5463,7 +5466,7 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
5463
5466
  rows,
5464
5467
  columns,
5465
5468
  rowCheckbox = false,
5466
- onRowClick,
5469
+ // onRowClick,
5467
5470
  totalData = 0,
5468
5471
  pagination,
5469
5472
  onPageChange,
@@ -5534,7 +5537,6 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
5534
5537
  color,
5535
5538
  rowCheckbox,
5536
5539
  checkedRows,
5537
- onRowClick,
5538
5540
  onCheckRow: handleRowCheck,
5539
5541
  emptyContent,
5540
5542
  isLoading,
@@ -2,11 +2,11 @@
2
2
  import "../../chunk-DX3KXNP6.mjs";
3
3
  import {
4
4
  table_default
5
- } from "../../chunk-Y37BWBR3.mjs";
5
+ } from "../../chunk-6ZL5NEEI.mjs";
6
6
  import {
7
7
  definition_table_default
8
8
  } from "../../chunk-6TIIBU7J.mjs";
9
- import "../../chunk-LWRK5TPZ.mjs";
9
+ import "../../chunk-BPEMHZH3.mjs";
10
10
  import "../../chunk-P7YYNA6L.mjs";
11
11
  import "../../chunk-DQRAFUDA.mjs";
12
12
  import "../../chunk-M37VBNB3.mjs";
@@ -13,13 +13,12 @@ interface TableBodyProps {
13
13
  rowCheckbox?: boolean;
14
14
  checkedRows: Set<number>;
15
15
  onCheckRow: (index: number, isChecked: boolean) => void;
16
- onRowClick?: (row: TableRow) => void;
17
16
  isLoading?: boolean;
18
17
  emptyContent?: ReactNode;
19
18
  skeletonRow?: number;
20
19
  classNames?: SlotsToClasses<TableSlots>;
21
20
  className?: string;
22
21
  }
23
- declare const TableBody: ({ slots, rows, columns, size, color, rowCheckbox, checkedRows, onCheckRow, onRowClick, isLoading, emptyContent, skeletonRow, classNames, className, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
22
+ declare const TableBody: ({ slots, rows, columns, size, color, rowCheckbox, checkedRows, onCheckRow, isLoading, emptyContent, skeletonRow, classNames, className, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
24
23
 
25
24
  export { TableBody as default };
@@ -13,13 +13,12 @@ interface TableBodyProps {
13
13
  rowCheckbox?: boolean;
14
14
  checkedRows: Set<number>;
15
15
  onCheckRow: (index: number, isChecked: boolean) => void;
16
- onRowClick?: (row: TableRow) => void;
17
16
  isLoading?: boolean;
18
17
  emptyContent?: ReactNode;
19
18
  skeletonRow?: number;
20
19
  classNames?: SlotsToClasses<TableSlots>;
21
20
  className?: string;
22
21
  }
23
- declare const TableBody: ({ slots, rows, columns, size, color, rowCheckbox, checkedRows, onCheckRow, onRowClick, isLoading, emptyContent, skeletonRow, classNames, className, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
22
+ declare const TableBody: ({ slots, rows, columns, size, color, rowCheckbox, checkedRows, onCheckRow, isLoading, emptyContent, skeletonRow, classNames, className, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
24
23
 
25
24
  export { TableBody as default };
@@ -672,7 +672,7 @@ var TableBody = ({
672
672
  rowCheckbox = false,
673
673
  checkedRows,
674
674
  onCheckRow,
675
- onRowClick,
675
+ // onRowClick,
676
676
  isLoading = false,
677
677
  emptyContent,
678
678
  skeletonRow,
@@ -700,24 +700,27 @@ var TableBody = ({
700
700
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
701
701
  ] }, `skeleton-${rowIndex}`);
702
702
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
703
- const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
704
- columns.map((column, colIdx) => {
705
- var _a;
706
- const value = row[column.field];
707
- const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
708
- const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
709
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
710
- "td",
711
- {
712
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
713
- style: getCellStyle(column),
714
- children: content
715
- },
716
- `${rowIndex}-${colIdx}`
717
- );
718
- }),
719
- rowCheckbox && renderCheckboxCell(rowIndex)
720
- ] }, rowIndex);
703
+ const renderDataRow = (row, rowIndex) => (
704
+ // <tr key={rowIndex} className={slots.tr({ class: classNames?.tr })} onClick={() => onRowClick?.(row)}>
705
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
706
+ columns.map((column, colIdx) => {
707
+ var _a;
708
+ const value = row[column.field];
709
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
710
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
711
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
712
+ "td",
713
+ {
714
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
715
+ style: getCellStyle(column),
716
+ children: content
717
+ },
718
+ `${rowIndex}-${colIdx}`
719
+ );
720
+ }),
721
+ rowCheckbox && renderCheckboxCell(rowIndex)
722
+ ] }, rowIndex)
723
+ );
721
724
  const renderRows = () => {
722
725
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {});
723
726
  if (!rows.length && emptyContent) return renderEmptyRow();
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  table_body_default
4
- } from "../../chunk-LWRK5TPZ.mjs";
4
+ } from "../../chunk-BPEMHZH3.mjs";
5
5
  import "../../chunk-MZ76AA76.mjs";
6
6
  import "../../chunk-6PN3DGOE.mjs";
7
7
  import "../../chunk-QZ3LVYJW.mjs";
@@ -8,7 +8,6 @@ interface TableBaseProps extends Omit<ComponentPropsWithRef<"table">, "ref" | "c
8
8
  rows: TableRow[];
9
9
  columns: TableColumn[];
10
10
  rowCheckbox?: boolean;
11
- onRowClick?: (row: TableRow) => void;
12
11
  totalData?: number;
13
12
  pagination?: {
14
13
  page: number;
@@ -8,7 +8,6 @@ interface TableBaseProps extends Omit<ComponentPropsWithRef<"table">, "ref" | "c
8
8
  rows: TableRow[];
9
9
  columns: TableColumn[];
10
10
  rowCheckbox?: boolean;
11
- onRowClick?: (row: TableRow) => void;
12
11
  totalData?: number;
13
12
  pagination?: {
14
13
  page: number;
@@ -727,7 +727,7 @@ var TableBody = ({
727
727
  rowCheckbox = false,
728
728
  checkedRows,
729
729
  onCheckRow,
730
- onRowClick,
730
+ // onRowClick,
731
731
  isLoading = false,
732
732
  emptyContent,
733
733
  skeletonRow,
@@ -755,24 +755,27 @@ var TableBody = ({
755
755
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
756
756
  ] }, `skeleton-${rowIndex}`);
757
757
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
758
- const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
759
- columns.map((column, colIdx) => {
760
- var _a;
761
- const value = row[column.field];
762
- const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
763
- const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
764
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
765
- "td",
766
- {
767
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
768
- style: getCellStyle(column),
769
- children: content
770
- },
771
- `${rowIndex}-${colIdx}`
772
- );
773
- }),
774
- rowCheckbox && renderCheckboxCell(rowIndex)
775
- ] }, rowIndex);
758
+ const renderDataRow = (row, rowIndex) => (
759
+ // <tr key={rowIndex} className={slots.tr({ class: classNames?.tr })} onClick={() => onRowClick?.(row)}>
760
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
761
+ columns.map((column, colIdx) => {
762
+ var _a;
763
+ const value = row[column.field];
764
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
765
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
766
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
767
+ "td",
768
+ {
769
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
770
+ style: getCellStyle(column),
771
+ children: content
772
+ },
773
+ `${rowIndex}-${colIdx}`
774
+ );
775
+ }),
776
+ rowCheckbox && renderCheckboxCell(rowIndex)
777
+ ] }, rowIndex)
778
+ );
776
779
  const renderRows = () => {
777
780
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {});
778
781
  if (!rows.length && emptyContent) return renderEmptyRow();
@@ -5460,7 +5463,7 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
5460
5463
  rows,
5461
5464
  columns,
5462
5465
  rowCheckbox = false,
5463
- onRowClick,
5466
+ // onRowClick,
5464
5467
  totalData = 0,
5465
5468
  pagination,
5466
5469
  onPageChange,
@@ -5531,7 +5534,6 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
5531
5534
  color,
5532
5535
  rowCheckbox,
5533
5536
  checkedRows,
5534
- onRowClick,
5535
5537
  onCheckRow: handleRowCheck,
5536
5538
  emptyContent,
5537
5539
  isLoading,
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  table_default
4
- } from "../../chunk-Y37BWBR3.mjs";
5
- import "../../chunk-LWRK5TPZ.mjs";
4
+ } from "../../chunk-6ZL5NEEI.mjs";
5
+ import "../../chunk-BPEMHZH3.mjs";
6
6
  import "../../chunk-P7YYNA6L.mjs";
7
7
  import "../../chunk-DQRAFUDA.mjs";
8
8
  import "../../chunk-M37VBNB3.mjs";