@deepnoid/ui 0.1.173 → 0.1.175

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.
@@ -147,7 +147,7 @@ function toVal(mix) {
147
147
  }
148
148
 
149
149
  // src/components/table/table.tsx
150
- var import_react5 = require("react");
150
+ var import_react6 = require("react");
151
151
  var import_tailwind_variants6 = require("tailwind-variants");
152
152
 
153
153
  // src/utils/props.ts
@@ -170,6 +170,9 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
170
170
  }
171
171
  };
172
172
 
173
+ // src/components/table/table-body.tsx
174
+ var import_react2 = require("react");
175
+
173
176
  // src/components/checkbox/checkbox.tsx
174
177
  var import_react = require("react");
175
178
 
@@ -643,6 +646,7 @@ var TableBody = ({
643
646
  classNames,
644
647
  className
645
648
  }) => {
649
+ const checkOverflow = (el) => el.scrollWidth > el.clientWidth;
646
650
  const renderCheckboxCell = (rowId, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
647
651
  "td",
648
652
  {
@@ -664,11 +668,20 @@ var TableBody = ({
664
668
  const value = row[column.field];
665
669
  const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
666
670
  const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
671
+ const tdRef = (0, import_react2.useRef)(null);
672
+ const [showTitle, setShowTitle] = (0, import_react2.useState)(false);
673
+ (0, import_react2.useEffect)(() => {
674
+ if (tdRef.current) {
675
+ setShowTitle(checkOverflow(tdRef.current));
676
+ }
677
+ }, [content]);
667
678
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
668
679
  "td",
669
680
  {
670
- className: clsx(slots.td(), classNames == null ? void 0 : classNames.td, column.className),
671
- style: getCellStyle(column),
681
+ ref: tdRef,
682
+ className: clsx(slots.td(), classNames == null ? void 0 : classNames.td, column.className, "truncate"),
683
+ style: { ...getCellStyle(column), maxWidth: column.width || "150px" },
684
+ title: showTitle ? String(content) : void 0,
672
685
  children: content
673
686
  },
674
687
  `${row.id}-${column.field}-${colIdx}-${rowIndex}`
@@ -695,18 +708,18 @@ var TableBody = ({
695
708
  var table_body_default = TableBody;
696
709
 
697
710
  // src/components/pagination/pagination.tsx
698
- var import_react4 = require("react");
711
+ var import_react5 = require("react");
699
712
 
700
713
  // src/components/pagination/usePagination.ts
701
- var import_react2 = require("react");
714
+ var import_react3 = require("react");
702
715
  var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) => {
703
- const startPage = (0, import_react2.useMemo)(() => Math.floor((currentPage - 1) / groupSize) * groupSize + 1, [currentPage, groupSize]);
704
- const endPage = (0, import_react2.useMemo)(() => Math.min(startPage + groupSize - 1, totalPage), [startPage, groupSize, totalPage]);
705
- const pageList = (0, import_react2.useMemo)(
716
+ const startPage = (0, import_react3.useMemo)(() => Math.floor((currentPage - 1) / groupSize) * groupSize + 1, [currentPage, groupSize]);
717
+ const endPage = (0, import_react3.useMemo)(() => Math.min(startPage + groupSize - 1, totalPage), [startPage, groupSize, totalPage]);
718
+ const pageList = (0, import_react3.useMemo)(
706
719
  () => Array.from({ length: endPage - startPage + 1 }, (_, i) => startPage + i),
707
720
  [startPage, endPage]
708
721
  );
709
- const handleClickMovePage = (0, import_react2.useCallback)(
722
+ const handleClickMovePage = (0, import_react3.useCallback)(
710
723
  (page) => (event) => {
711
724
  event.preventDefault();
712
725
  handleChangePage == null ? void 0 : handleChangePage(page);
@@ -723,7 +736,7 @@ var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) =>
723
736
  var usePagination_default = usePagination;
724
737
 
725
738
  // src/components/input/input.tsx
726
- var import_react3 = require("react");
739
+ var import_react4 = require("react");
727
740
 
728
741
  // src/components/icon/template.tsx
729
742
  var import_jsx_runtime3 = require("react/jsx-runtime");
@@ -5548,12 +5561,12 @@ var Icon_default = Icon;
5548
5561
 
5549
5562
  // src/components/input/input.tsx
5550
5563
  var import_jsx_runtime5 = require("react/jsx-runtime");
5551
- var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
5564
+ var Input = (0, import_react4.forwardRef)((originalProps, ref) => {
5552
5565
  const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
5553
5566
  const { classNames, label, helperMessage, errorMessage, startContent, endContent, ...inputProps } = props;
5554
- const inputRef = (0, import_react3.useRef)(null);
5555
- const slots = (0, import_react3.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
5556
- const getContentProps = (0, import_react3.useCallback)(
5567
+ const inputRef = (0, import_react4.useRef)(null);
5568
+ const slots = (0, import_react4.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
5569
+ const getContentProps = (0, import_react4.useCallback)(
5557
5570
  () => ({
5558
5571
  className: clsx(
5559
5572
  slots.content({ class: classNames == null ? void 0 : classNames.content }),
@@ -5564,13 +5577,13 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
5564
5577
  [slots, classNames, originalProps.size, inputProps.readOnly]
5565
5578
  );
5566
5579
  const renderStartContent = () => {
5567
- if ((0, import_react3.isValidElement)(startContent)) {
5580
+ if ((0, import_react4.isValidElement)(startContent)) {
5568
5581
  const existingProps = startContent.props;
5569
5582
  const mergedProps = {
5570
5583
  ...getContentProps(),
5571
5584
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
5572
5585
  };
5573
- return (0, import_react3.cloneElement)(startContent, mergedProps);
5586
+ return (0, import_react4.cloneElement)(startContent, mergedProps);
5574
5587
  } else {
5575
5588
  const contentProps = getContentProps();
5576
5589
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ...contentProps, children: startContent });
@@ -5589,13 +5602,13 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
5589
5602
  }
5590
5603
  );
5591
5604
  const renderContentWithIcon = () => {
5592
- if ((0, import_react3.isValidElement)(endContent)) {
5605
+ if ((0, import_react4.isValidElement)(endContent)) {
5593
5606
  const existingProps = endContent.props;
5594
5607
  const mergedProps = {
5595
5608
  ...getContentProps(),
5596
5609
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
5597
5610
  };
5598
- return (0, import_react3.cloneElement)(endContent, mergedProps);
5611
+ return (0, import_react4.cloneElement)(endContent, mergedProps);
5599
5612
  } else if (errorMessage && errorMessage.length > 0) {
5600
5613
  const iconProps = { ...getContentProps(), className: getContentProps().className };
5601
5614
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
@@ -5932,7 +5945,7 @@ var inputStyle = tv(
5932
5945
 
5933
5946
  // src/components/pagination/pagination.tsx
5934
5947
  var import_jsx_runtime6 = require("react/jsx-runtime");
5935
- var Pagination = (0, import_react4.forwardRef)((originalProps, ref) => {
5948
+ var Pagination = (0, import_react5.forwardRef)((originalProps, ref) => {
5936
5949
  const [props, variantProps] = mapPropsVariants(originalProps, paginationStyle.variantKeys);
5937
5950
  const {
5938
5951
  classNames,
@@ -5946,12 +5959,12 @@ var Pagination = (0, import_react4.forwardRef)((originalProps, ref) => {
5946
5959
  variant,
5947
5960
  size
5948
5961
  } = { ...props, ...variantProps };
5949
- const [inputPage, setInputPage] = (0, import_react4.useState)(currentPage);
5962
+ const [inputPage, setInputPage] = (0, import_react5.useState)(currentPage);
5950
5963
  const isFirstPageDisabled = currentPage <= 1;
5951
5964
  const isPrevPageDisabled = currentPage <= 1;
5952
5965
  const isNextPageDisabled = currentPage >= totalPage;
5953
5966
  const isLastPageDisabled = currentPage >= totalPage;
5954
- const slots = (0, import_react4.useMemo)(() => paginationStyle(variantProps), [variantProps]);
5967
+ const slots = (0, import_react5.useMemo)(() => paginationStyle(variantProps), [variantProps]);
5955
5968
  const { pageList, handleClickMovePage } = usePagination_default({
5956
5969
  currentPage,
5957
5970
  totalPage,
@@ -6319,7 +6332,7 @@ var scrollAreaStyle = (0, import_tailwind_variants5.tv)({
6319
6332
 
6320
6333
  // src/components/table/table.tsx
6321
6334
  var import_jsx_runtime8 = require("react/jsx-runtime");
6322
- var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6335
+ var Table = (0, import_react6.forwardRef)((originalProps, ref) => {
6323
6336
  const [props, variantProps] = mapPropsVariants(originalProps, tableStyle.variantKeys);
6324
6337
  const {
6325
6338
  rows,
@@ -6344,8 +6357,8 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6344
6357
  } = { ...props, ...variantProps };
6345
6358
  const { page = 1, perPage = 15 } = pagination || {};
6346
6359
  const showPagination = pagination && totalData > 0;
6347
- const [checkedRowIds, setCheckedRowIds] = (0, import_react5.useState)(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
6348
- const tableMinWidth = (0, import_react5.useMemo)(() => {
6360
+ const [checkedRowIds, setCheckedRowIds] = (0, import_react6.useState)(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
6361
+ const tableMinWidth = (0, import_react6.useMemo)(() => {
6349
6362
  const columnsWidth = columns.reduce((total, column) => {
6350
6363
  if (column.width) return total + column.width;
6351
6364
  if (column.minWidth) return total + column.minWidth;
@@ -6354,10 +6367,10 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6354
6367
  const checkboxWidth = rowCheckbox ? 40 : 0;
6355
6368
  return columnsWidth + checkboxWidth;
6356
6369
  }, [columns, rowCheckbox]);
6357
- (0, import_react5.useEffect)(() => {
6370
+ (0, import_react6.useEffect)(() => {
6358
6371
  onCheckedRowsChange == null ? void 0 : onCheckedRowsChange(getCheckedRowData(checkedRowIds));
6359
6372
  }, [checkedRowIds]);
6360
- (0, import_react5.useEffect)(() => {
6373
+ (0, import_react6.useEffect)(() => {
6361
6374
  const currentRowIds = new Set(rows.map((row) => row.id));
6362
6375
  const ids = Array.from(checkedRowIds);
6363
6376
  const hasValidCheckedRows = ids.every((id) => currentRowIds.has(id));
@@ -6365,7 +6378,7 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6365
6378
  setCheckedRowIds(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
6366
6379
  }
6367
6380
  }, [rows.map((row) => row.id).join(",")]);
6368
- (0, import_react5.useImperativeHandle)(
6381
+ (0, import_react6.useImperativeHandle)(
6369
6382
  ref,
6370
6383
  () => ({
6371
6384
  checkedRowIds,
@@ -6392,7 +6405,7 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6392
6405
  onRowClick == null ? void 0 : onRowClick(row, index, event);
6393
6406
  };
6394
6407
  const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
6395
- const slots = (0, import_react5.useMemo)(
6408
+ const slots = (0, import_react6.useMemo)(
6396
6409
  () => tableStyle({ ...variantProps, rowClickable: typeof onRowClick === "function" }),
6397
6410
  [variantProps, onRowClick]
6398
6411
  );
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  table_head_default
4
- } from "../../chunk-NSADIVGU.mjs";
4
+ } from "../../chunk-JPCZROOU.mjs";
5
5
  import "../../chunk-7B7LRG5J.mjs";
6
6
  import "../../chunk-D4YI5HF2.mjs";
7
7
  import "../../chunk-F3HENRVM.mjs";
8
+ import "../../chunk-QZ3LVYJW.mjs";
8
9
  import "../../chunk-2GCSFWHD.mjs";
9
10
  import "../../chunk-VNRGOOSY.mjs";
10
- import "../../chunk-QZ3LVYJW.mjs";
11
11
  import "../../chunk-DQRAFUDA.mjs";
12
12
  import "../../chunk-EWS3FESG.mjs";
13
13
  import "../../chunk-OEIEALIP.mjs";
@@ -106,7 +106,7 @@ __export(table_exports, {
106
106
  getCellStyle: () => getCellStyle
107
107
  });
108
108
  module.exports = __toCommonJS(table_exports);
109
- var import_react5 = require("react");
109
+ var import_react6 = require("react");
110
110
  var import_tailwind_variants6 = require("tailwind-variants");
111
111
 
112
112
  // src/utils/props.ts
@@ -673,6 +673,7 @@ var TableHead = ({
673
673
  var table_head_default = TableHead;
674
674
 
675
675
  // src/components/table/table-body.tsx
676
+ var import_react2 = require("react");
676
677
  var import_jsx_runtime3 = require("react/jsx-runtime");
677
678
  var TableBody = ({
678
679
  slots,
@@ -689,6 +690,7 @@ var TableBody = ({
689
690
  classNames,
690
691
  className
691
692
  }) => {
693
+ const checkOverflow = (el) => el.scrollWidth > el.clientWidth;
692
694
  const renderCheckboxCell = (rowId, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
693
695
  "td",
694
696
  {
@@ -710,11 +712,20 @@ var TableBody = ({
710
712
  const value = row[column.field];
711
713
  const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
712
714
  const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
715
+ const tdRef = (0, import_react2.useRef)(null);
716
+ const [showTitle, setShowTitle] = (0, import_react2.useState)(false);
717
+ (0, import_react2.useEffect)(() => {
718
+ if (tdRef.current) {
719
+ setShowTitle(checkOverflow(tdRef.current));
720
+ }
721
+ }, [content]);
713
722
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
714
723
  "td",
715
724
  {
716
- className: clsx(slots.td(), classNames == null ? void 0 : classNames.td, column.className),
717
- style: getCellStyle(column),
725
+ ref: tdRef,
726
+ className: clsx(slots.td(), classNames == null ? void 0 : classNames.td, column.className, "truncate"),
727
+ style: { ...getCellStyle(column), maxWidth: column.width || "150px" },
728
+ title: showTitle ? String(content) : void 0,
718
729
  children: content
719
730
  },
720
731
  `${row.id}-${column.field}-${colIdx}-${rowIndex}`
@@ -741,18 +752,18 @@ var TableBody = ({
741
752
  var table_body_default = TableBody;
742
753
 
743
754
  // src/components/pagination/pagination.tsx
744
- var import_react4 = require("react");
755
+ var import_react5 = require("react");
745
756
 
746
757
  // src/components/pagination/usePagination.ts
747
- var import_react2 = require("react");
758
+ var import_react3 = require("react");
748
759
  var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) => {
749
- const startPage = (0, import_react2.useMemo)(() => Math.floor((currentPage - 1) / groupSize) * groupSize + 1, [currentPage, groupSize]);
750
- const endPage = (0, import_react2.useMemo)(() => Math.min(startPage + groupSize - 1, totalPage), [startPage, groupSize, totalPage]);
751
- const pageList = (0, import_react2.useMemo)(
760
+ const startPage = (0, import_react3.useMemo)(() => Math.floor((currentPage - 1) / groupSize) * groupSize + 1, [currentPage, groupSize]);
761
+ const endPage = (0, import_react3.useMemo)(() => Math.min(startPage + groupSize - 1, totalPage), [startPage, groupSize, totalPage]);
762
+ const pageList = (0, import_react3.useMemo)(
752
763
  () => Array.from({ length: endPage - startPage + 1 }, (_, i) => startPage + i),
753
764
  [startPage, endPage]
754
765
  );
755
- const handleClickMovePage = (0, import_react2.useCallback)(
766
+ const handleClickMovePage = (0, import_react3.useCallback)(
756
767
  (page) => (event) => {
757
768
  event.preventDefault();
758
769
  handleChangePage == null ? void 0 : handleChangePage(page);
@@ -769,7 +780,7 @@ var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) =>
769
780
  var usePagination_default = usePagination;
770
781
 
771
782
  // src/components/input/input.tsx
772
- var import_react3 = require("react");
783
+ var import_react4 = require("react");
773
784
 
774
785
  // src/components/icon/template.tsx
775
786
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -5594,12 +5605,12 @@ var Icon_default = Icon;
5594
5605
 
5595
5606
  // src/components/input/input.tsx
5596
5607
  var import_jsx_runtime6 = require("react/jsx-runtime");
5597
- var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
5608
+ var Input = (0, import_react4.forwardRef)((originalProps, ref) => {
5598
5609
  const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
5599
5610
  const { classNames, label, helperMessage, errorMessage, startContent, endContent, ...inputProps } = props;
5600
- const inputRef = (0, import_react3.useRef)(null);
5601
- const slots = (0, import_react3.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
5602
- const getContentProps = (0, import_react3.useCallback)(
5611
+ const inputRef = (0, import_react4.useRef)(null);
5612
+ const slots = (0, import_react4.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
5613
+ const getContentProps = (0, import_react4.useCallback)(
5603
5614
  () => ({
5604
5615
  className: clsx(
5605
5616
  slots.content({ class: classNames == null ? void 0 : classNames.content }),
@@ -5610,13 +5621,13 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
5610
5621
  [slots, classNames, originalProps.size, inputProps.readOnly]
5611
5622
  );
5612
5623
  const renderStartContent = () => {
5613
- if ((0, import_react3.isValidElement)(startContent)) {
5624
+ if ((0, import_react4.isValidElement)(startContent)) {
5614
5625
  const existingProps = startContent.props;
5615
5626
  const mergedProps = {
5616
5627
  ...getContentProps(),
5617
5628
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
5618
5629
  };
5619
- return (0, import_react3.cloneElement)(startContent, mergedProps);
5630
+ return (0, import_react4.cloneElement)(startContent, mergedProps);
5620
5631
  } else {
5621
5632
  const contentProps = getContentProps();
5622
5633
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ...contentProps, children: startContent });
@@ -5635,13 +5646,13 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
5635
5646
  }
5636
5647
  );
5637
5648
  const renderContentWithIcon = () => {
5638
- if ((0, import_react3.isValidElement)(endContent)) {
5649
+ if ((0, import_react4.isValidElement)(endContent)) {
5639
5650
  const existingProps = endContent.props;
5640
5651
  const mergedProps = {
5641
5652
  ...getContentProps(),
5642
5653
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
5643
5654
  };
5644
- return (0, import_react3.cloneElement)(endContent, mergedProps);
5655
+ return (0, import_react4.cloneElement)(endContent, mergedProps);
5645
5656
  } else if (errorMessage && errorMessage.length > 0) {
5646
5657
  const iconProps = { ...getContentProps(), className: getContentProps().className };
5647
5658
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
@@ -5978,7 +5989,7 @@ var inputStyle = tv(
5978
5989
 
5979
5990
  // src/components/pagination/pagination.tsx
5980
5991
  var import_jsx_runtime7 = require("react/jsx-runtime");
5981
- var Pagination = (0, import_react4.forwardRef)((originalProps, ref) => {
5992
+ var Pagination = (0, import_react5.forwardRef)((originalProps, ref) => {
5982
5993
  const [props, variantProps] = mapPropsVariants(originalProps, paginationStyle.variantKeys);
5983
5994
  const {
5984
5995
  classNames,
@@ -5992,12 +6003,12 @@ var Pagination = (0, import_react4.forwardRef)((originalProps, ref) => {
5992
6003
  variant,
5993
6004
  size
5994
6005
  } = { ...props, ...variantProps };
5995
- const [inputPage, setInputPage] = (0, import_react4.useState)(currentPage);
6006
+ const [inputPage, setInputPage] = (0, import_react5.useState)(currentPage);
5996
6007
  const isFirstPageDisabled = currentPage <= 1;
5997
6008
  const isPrevPageDisabled = currentPage <= 1;
5998
6009
  const isNextPageDisabled = currentPage >= totalPage;
5999
6010
  const isLastPageDisabled = currentPage >= totalPage;
6000
- const slots = (0, import_react4.useMemo)(() => paginationStyle(variantProps), [variantProps]);
6011
+ const slots = (0, import_react5.useMemo)(() => paginationStyle(variantProps), [variantProps]);
6001
6012
  const { pageList, handleClickMovePage } = usePagination_default({
6002
6013
  currentPage,
6003
6014
  totalPage,
@@ -6365,7 +6376,7 @@ var scrollAreaStyle = (0, import_tailwind_variants5.tv)({
6365
6376
 
6366
6377
  // src/components/table/table.tsx
6367
6378
  var import_jsx_runtime9 = require("react/jsx-runtime");
6368
- var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6379
+ var Table = (0, import_react6.forwardRef)((originalProps, ref) => {
6369
6380
  const [props, variantProps] = mapPropsVariants(originalProps, tableStyle.variantKeys);
6370
6381
  const {
6371
6382
  rows,
@@ -6390,8 +6401,8 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6390
6401
  } = { ...props, ...variantProps };
6391
6402
  const { page = 1, perPage = 15 } = pagination || {};
6392
6403
  const showPagination = pagination && totalData > 0;
6393
- const [checkedRowIds, setCheckedRowIds] = (0, import_react5.useState)(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
6394
- const tableMinWidth = (0, import_react5.useMemo)(() => {
6404
+ const [checkedRowIds, setCheckedRowIds] = (0, import_react6.useState)(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
6405
+ const tableMinWidth = (0, import_react6.useMemo)(() => {
6395
6406
  const columnsWidth = columns.reduce((total, column) => {
6396
6407
  if (column.width) return total + column.width;
6397
6408
  if (column.minWidth) return total + column.minWidth;
@@ -6400,10 +6411,10 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6400
6411
  const checkboxWidth = rowCheckbox ? 40 : 0;
6401
6412
  return columnsWidth + checkboxWidth;
6402
6413
  }, [columns, rowCheckbox]);
6403
- (0, import_react5.useEffect)(() => {
6414
+ (0, import_react6.useEffect)(() => {
6404
6415
  onCheckedRowsChange == null ? void 0 : onCheckedRowsChange(getCheckedRowData(checkedRowIds));
6405
6416
  }, [checkedRowIds]);
6406
- (0, import_react5.useEffect)(() => {
6417
+ (0, import_react6.useEffect)(() => {
6407
6418
  const currentRowIds = new Set(rows.map((row) => row.id));
6408
6419
  const ids = Array.from(checkedRowIds);
6409
6420
  const hasValidCheckedRows = ids.every((id) => currentRowIds.has(id));
@@ -6411,7 +6422,7 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6411
6422
  setCheckedRowIds(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
6412
6423
  }
6413
6424
  }, [rows.map((row) => row.id).join(",")]);
6414
- (0, import_react5.useImperativeHandle)(
6425
+ (0, import_react6.useImperativeHandle)(
6415
6426
  ref,
6416
6427
  () => ({
6417
6428
  checkedRowIds,
@@ -6438,7 +6449,7 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6438
6449
  onRowClick == null ? void 0 : onRowClick(row, index, event);
6439
6450
  };
6440
6451
  const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
6441
- const slots = (0, import_react5.useMemo)(
6452
+ const slots = (0, import_react6.useMemo)(
6442
6453
  () => tableStyle({ ...variantProps, rowClickable: typeof onRowClick === "function" }),
6443
6454
  [variantProps, onRowClick]
6444
6455
  );
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  getCellStyle,
4
4
  table_default
5
- } from "../../chunk-NSADIVGU.mjs";
5
+ } from "../../chunk-JPCZROOU.mjs";
6
6
  import "../../chunk-7B7LRG5J.mjs";
7
7
  import "../../chunk-D4YI5HF2.mjs";
8
8
  import "../../chunk-F3HENRVM.mjs";
9
+ import "../../chunk-QZ3LVYJW.mjs";
9
10
  import "../../chunk-2GCSFWHD.mjs";
10
11
  import "../../chunk-VNRGOOSY.mjs";
11
- import "../../chunk-QZ3LVYJW.mjs";
12
12
  import "../../chunk-DQRAFUDA.mjs";
13
13
  import "../../chunk-EWS3FESG.mjs";
14
14
  import "../../chunk-OEIEALIP.mjs";