lizaui 10.0.83 → 10.0.84

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.
@@ -1 +1 @@
1
- {"version":3,"file":"table-body-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-column.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,eAAO,MAAM,eAAe,kHAmB3B,CAAC"}
1
+ {"version":3,"file":"table-body-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-column.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,eAAO,MAAM,eAAe,kHAuB3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table-body-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAGnG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,eAAO,MAAM,YAAY,0FA2ExB,CAAC"}
1
+ {"version":3,"file":"table-body-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,eAAO,MAAM,YAAY,0FA2ExB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { PinnedColumnInfo } from '../interface/table.interface';
2
+ /**
3
+ * Per-cell context carrying the pinned offset of the column a cell belongs
4
+ * to. Row components provide it around each child (mapped by dataHeader
5
+ * index) and the leaf cell components consume it, so pinning survives
6
+ * custom wrapper components between the row and the actual cell.
7
+ */
8
+ export declare const PinnedCellContext: import('react').Context<PinnedColumnInfo | undefined>;
9
+ //# sourceMappingURL=pinned-cell.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinned-cell.context.d.ts","sourceRoot":"","sources":["../../../../src/components/table/context/pinned-cell.context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,uDAAyD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table-header-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-column.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAIhD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAiIxD,CAAC"}
1
+ {"version":3,"file":"table-header-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-column.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAsIxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;AAI1F,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAM9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4ElD,CAAC"}
1
+ {"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;AAK1F,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAK9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAoFlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table-search-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-column.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAQvD,CAAC"}
1
+ {"version":3,"file":"table-search-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-column.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAevD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table-search-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAA8C,MAAM,OAAO,CAAC;AAInF,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAK9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAoDjD,CAAC"}
1
+ {"version":3,"file":"table-search-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAA8C,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAI9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8DjD,CAAC"}
@@ -292,8 +292,9 @@ const TableBody = React.memo((props) => {
292
292
  }
293
293
  return t0;
294
294
  });
295
+ const PinnedCellContext = React.createContext(void 0);
295
296
  const TableBodyColumn = React.memo(React.forwardRef((t0, ref) => {
296
- const $ = compilerRuntime.c(14);
297
+ const $ = compilerRuntime.c(19);
297
298
  const {
298
299
  children,
299
300
  className,
@@ -302,59 +303,67 @@ const TableBodyColumn = React.memo(React.forwardRef((t0, ref) => {
302
303
  colspan: t1
303
304
  } = t0;
304
305
  const colspan = t1 === void 0 ? void 0 : t1;
305
- let t2;
306
- if ($[0] !== className) {
307
- t2 = tailwindMerge.twMerge("px-2 py-1 text-gray-900 dark:text-default-500 text-sm", className);
306
+ const pinned = React.useContext(PinnedCellContext);
307
+ const t2 = pinned && "table__column_pinned";
308
+ const t3 = pinned?.isLast && "table__column_pinned--last";
309
+ let t4;
310
+ if ($[0] !== className || $[1] !== t2 || $[2] !== t3) {
311
+ t4 = tailwindMerge.twMerge("px-2 py-1 text-gray-900 dark:text-default-500 text-sm", className, t2, t3);
308
312
  $[0] = className;
309
313
  $[1] = t2;
314
+ $[2] = t3;
315
+ $[3] = t4;
310
316
  } else {
311
- t2 = $[1];
317
+ t4 = $[3];
312
318
  }
313
- const mergedClass = t2;
314
- let t3;
315
- if ($[2] !== children) {
316
- t3 = !children || typeof children === "string" && children.trim() === "";
317
- $[2] = children;
318
- $[3] = t3;
319
+ const mergedClass = t4;
320
+ let t5;
321
+ if ($[4] !== pinned || $[5] !== style) {
322
+ t5 = pinned ? {
323
+ ...style,
324
+ left: pinned.left
325
+ } : style;
326
+ $[4] = pinned;
327
+ $[5] = style;
328
+ $[6] = t5;
319
329
  } else {
320
- t3 = $[3];
330
+ t5 = $[6];
321
331
  }
322
- const isChildrenEmpty = t3;
323
- let t4;
324
- if ($[4] !== children || $[5] !== isChildrenEmpty || $[6] !== text) {
325
- t4 = isChildrenEmpty ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-1 text-sm", children: text }) : children;
326
- $[4] = children;
327
- $[5] = isChildrenEmpty;
328
- $[6] = text;
329
- $[7] = t4;
332
+ const mergedStyle = t5;
333
+ let t6;
334
+ if ($[7] !== children) {
335
+ t6 = !children || typeof children === "string" && children.trim() === "";
336
+ $[7] = children;
337
+ $[8] = t6;
330
338
  } else {
331
- t4 = $[7];
339
+ t6 = $[8];
332
340
  }
333
- let t5;
334
- if ($[8] !== colspan || $[9] !== mergedClass || $[10] !== ref || $[11] !== style || $[12] !== t4) {
335
- t5 = /* @__PURE__ */ jsxRuntime.jsx("td", { ref, className: mergedClass, style, colSpan: colspan, children: t4 });
336
- $[8] = colspan;
337
- $[9] = mergedClass;
338
- $[10] = ref;
339
- $[11] = style;
340
- $[12] = t4;
341
- $[13] = t5;
341
+ const isChildrenEmpty = t6;
342
+ let t7;
343
+ if ($[9] !== children || $[10] !== isChildrenEmpty || $[11] !== text) {
344
+ t7 = isChildrenEmpty ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-1 text-sm", children: text }) : children;
345
+ $[9] = children;
346
+ $[10] = isChildrenEmpty;
347
+ $[11] = text;
348
+ $[12] = t7;
342
349
  } else {
343
- t5 = $[13];
350
+ t7 = $[12];
344
351
  }
345
- return t5;
352
+ let t8;
353
+ if ($[13] !== colspan || $[14] !== mergedClass || $[15] !== mergedStyle || $[16] !== ref || $[17] !== t7) {
354
+ t8 = /* @__PURE__ */ jsxRuntime.jsx("td", { ref, className: mergedClass, style: mergedStyle, colSpan: colspan, children: t7 });
355
+ $[13] = colspan;
356
+ $[14] = mergedClass;
357
+ $[15] = mergedStyle;
358
+ $[16] = ref;
359
+ $[17] = t7;
360
+ $[18] = t8;
361
+ } else {
362
+ t8 = $[18];
363
+ }
364
+ return t8;
346
365
  }));
347
366
  TableBodyColumn.displayName = "TableBodyColumn";
348
- const getPinnedCellProps = (child, pinned) => {
349
- if (!pinned) return {};
350
- return {
351
- className: tailwindMerge.twMerge(child.props.className, "table__column_pinned", pinned.isLast && "table__column_pinned--last"),
352
- style: {
353
- ...child.props.style,
354
- left: pinned.left
355
- }
356
- };
357
- };
358
367
  const TableBodyRow = React.memo(React.forwardRef((t0, ref) => {
359
368
  const $ = compilerRuntime.c(39);
360
369
  const {
@@ -458,7 +467,7 @@ const TableBodyRow = React.memo(React.forwardRef((t0, ref) => {
458
467
  if (!pinned || !React.isValidElement(child)) {
459
468
  return child;
460
469
  }
461
- return React.cloneElement(child, getPinnedCellProps(child, pinned));
470
+ return /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned, children: child });
462
471
  };
463
472
  $[20] = pinnedColumns;
464
473
  $[21] = t92;
@@ -839,7 +848,7 @@ function _temp2(e_0) {
839
848
  return e_0.stopPropagation();
840
849
  }
841
850
  const TableHeaderColumn = React.memo((t0) => {
842
- const $ = compilerRuntime.c(55);
851
+ const $ = compilerRuntime.c(60);
843
852
  const {
844
853
  children,
845
854
  className,
@@ -874,6 +883,7 @@ const TableHeaderColumn = React.memo((t0) => {
874
883
  onColumnResize,
875
884
  onColumnResizeEnd
876
885
  } = useTableContext();
886
+ const pinned = React.useContext(PinnedCellContext);
877
887
  const isResizable = resizableProp ?? header?.resizable ?? false;
878
888
  const columnId = header?.id || "";
879
889
  const initialWidth = columnWidths?.[columnId] || size || header?.size || 150;
@@ -929,48 +939,64 @@ const TableHeaderColumn = React.memo((t0) => {
929
939
  columnRef,
930
940
  handlePointerDown
931
941
  } = useColumnResize(t8);
932
- let t9;
933
- if ($[15] !== className) {
934
- t9 = tailwindMerge.twMerge("table__header_th px-2 relative", className);
942
+ const t9 = pinned && "table__column_pinned";
943
+ const t10 = pinned?.isLast && "table__column_pinned--last";
944
+ let t11;
945
+ if ($[15] !== className || $[16] !== t10 || $[17] !== t9) {
946
+ t11 = tailwindMerge.twMerge("table__header_th px-2 relative", className, t9, t10);
935
947
  $[15] = className;
936
- $[16] = t9;
948
+ $[16] = t10;
949
+ $[17] = t9;
950
+ $[18] = t11;
937
951
  } else {
938
- t9 = $[16];
952
+ t11 = $[18];
939
953
  }
940
- const mergedClass = t9;
954
+ const mergedClass = t11;
941
955
  const effectiveWidth = isResizable ? resizedWidth : size || header?.size;
942
- const t10 = effectiveWidth ? `${effectiveWidth}px` : style.width;
943
- const t11 = effectiveWidth ? `${effectiveWidth}px` : style.minWidth;
944
956
  let t12;
945
- if ($[17] !== style || $[18] !== t10 || $[19] !== t11) {
946
- t12 = {
947
- ...style,
948
- width: t10,
949
- minWidth: t11
950
- };
951
- $[17] = style;
952
- $[18] = t10;
953
- $[19] = t11;
957
+ if ($[19] !== pinned) {
958
+ t12 = pinned ? {
959
+ left: pinned.left
960
+ } : {};
961
+ $[19] = pinned;
954
962
  $[20] = t12;
955
963
  } else {
956
964
  t12 = $[20];
957
965
  }
958
- const mergedStyle = t12;
959
- let t13;
960
- if ($[21] !== children) {
961
- t13 = !children || typeof children === "string" && children.trim() === "";
962
- $[21] = children;
963
- $[22] = t13;
966
+ const t13 = effectiveWidth ? `${effectiveWidth}px` : style.width;
967
+ const t14 = effectiveWidth ? `${effectiveWidth}px` : style.minWidth;
968
+ let t15;
969
+ if ($[21] !== style || $[22] !== t12 || $[23] !== t13 || $[24] !== t14) {
970
+ t15 = {
971
+ ...style,
972
+ ...t12,
973
+ width: t13,
974
+ minWidth: t14
975
+ };
976
+ $[21] = style;
977
+ $[22] = t12;
978
+ $[23] = t13;
979
+ $[24] = t14;
980
+ $[25] = t15;
981
+ } else {
982
+ t15 = $[25];
983
+ }
984
+ const mergedStyle = t15;
985
+ let t16;
986
+ if ($[26] !== children) {
987
+ t16 = !children || typeof children === "string" && children.trim() === "";
988
+ $[26] = children;
989
+ $[27] = t16;
964
990
  } else {
965
- t13 = $[22];
991
+ t16 = $[27];
966
992
  }
967
- const isChildrenEmpty = t13;
993
+ const isChildrenEmpty = t16;
968
994
  const isSortable = header?.sort;
969
995
  header?.id;
970
996
  const isCurrentlySorted = sortDescriptor?.column === header?.id;
971
- let t14;
972
- if ($[23] !== header || $[24] !== isResizing || $[25] !== isSortable || $[26] !== onSortChange) {
973
- t14 = (e) => {
997
+ let t17;
998
+ if ($[28] !== header || $[29] !== isResizing || $[30] !== isSortable || $[31] !== onSortChange) {
999
+ t17 = (e) => {
974
1000
  if (isResizing) {
975
1001
  e.preventDefault();
976
1002
  return;
@@ -979,18 +1005,18 @@ const TableHeaderColumn = React.memo((t0) => {
979
1005
  onSortChange(header.id);
980
1006
  }
981
1007
  };
982
- $[23] = header;
983
- $[24] = isResizing;
984
- $[25] = isSortable;
985
- $[26] = onSortChange;
986
- $[27] = t14;
1008
+ $[28] = header;
1009
+ $[29] = isResizing;
1010
+ $[30] = isSortable;
1011
+ $[31] = onSortChange;
1012
+ $[32] = t17;
987
1013
  } else {
988
- t14 = $[27];
1014
+ t17 = $[32];
989
1015
  }
990
- const handleSort = t14;
991
- let t15;
992
- if ($[28] !== icon || $[29] !== isCurrentlySorted || $[30] !== isSortable || $[31] !== sortDescriptor) {
993
- t15 = () => {
1016
+ const handleSort = t17;
1017
+ let t18;
1018
+ if ($[33] !== icon || $[34] !== isCurrentlySorted || $[35] !== isSortable || $[36] !== sortDescriptor) {
1019
+ t18 = () => {
994
1020
  if (!isSortable) {
995
1021
  return icon;
996
1022
  }
@@ -999,31 +1025,31 @@ const TableHeaderColumn = React.memo((t0) => {
999
1025
  }
1000
1026
  return /* @__PURE__ */ jsxRuntime.jsx(chevronsUpDown.ChevronsUpDown, { className: "h-4 w-4 text-default-300" });
1001
1027
  };
1002
- $[28] = icon;
1003
- $[29] = isCurrentlySorted;
1004
- $[30] = isSortable;
1005
- $[31] = sortDescriptor;
1006
- $[32] = t15;
1007
- } else {
1008
- t15 = $[32];
1009
- }
1010
- const renderSortIcon = t15;
1011
- const t16 = isResizable ? columnRef : void 0;
1012
- const t17 = isSortable ? "cursor-pointer transition-colors" : "";
1013
- const t18 = isResizing && "select-none";
1014
- let t19;
1015
- if ($[33] !== mergedClass || $[34] !== t17 || $[35] !== t18) {
1016
- t19 = tailwindMerge.twMerge(mergedClass, t17, t18);
1017
- $[33] = mergedClass;
1018
- $[34] = t17;
1019
- $[35] = t18;
1020
- $[36] = t19;
1021
- } else {
1022
- t19 = $[36];
1023
- }
1024
- let t20;
1025
- if ($[37] !== children || $[38] !== header?.information || $[39] !== isChildrenEmpty || $[40] !== renderSortIcon || $[41] !== text) {
1026
- t20 = isChildrenEmpty ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center gap-x-2 font-medium", children: [
1028
+ $[33] = icon;
1029
+ $[34] = isCurrentlySorted;
1030
+ $[35] = isSortable;
1031
+ $[36] = sortDescriptor;
1032
+ $[37] = t18;
1033
+ } else {
1034
+ t18 = $[37];
1035
+ }
1036
+ const renderSortIcon = t18;
1037
+ const t19 = isResizable ? columnRef : void 0;
1038
+ const t20 = isSortable ? "cursor-pointer transition-colors" : "";
1039
+ const t21 = isResizing && "select-none";
1040
+ let t22;
1041
+ if ($[38] !== mergedClass || $[39] !== t20 || $[40] !== t21) {
1042
+ t22 = tailwindMerge.twMerge(mergedClass, t20, t21);
1043
+ $[38] = mergedClass;
1044
+ $[39] = t20;
1045
+ $[40] = t21;
1046
+ $[41] = t22;
1047
+ } else {
1048
+ t22 = $[41];
1049
+ }
1050
+ let t23;
1051
+ if ($[42] !== children || $[43] !== header?.information || $[44] !== isChildrenEmpty || $[45] !== renderSortIcon || $[46] !== text) {
1052
+ t23 = isChildrenEmpty ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center gap-x-2 font-medium", children: [
1027
1053
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-x-2", children: [
1028
1054
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-1 text-xs text-foreground-500 dark:text-foreground-500 text-left", children: text }),
1029
1055
  header?.information && /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip, { content: header?.information || "", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", role: "img", className: "text-default-300 cursor-pointer dark:text-foreground-500", width: 16, height: 16, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", children: [
@@ -1034,43 +1060,43 @@ const TableHeaderColumn = React.memo((t0) => {
1034
1060
  ] }),
1035
1061
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-end", children: renderSortIcon() })
1036
1062
  ] }) : children;
1037
- $[37] = children;
1038
- $[38] = header?.information;
1039
- $[39] = isChildrenEmpty;
1040
- $[40] = renderSortIcon;
1041
- $[41] = text;
1042
- $[42] = t20;
1043
- } else {
1044
- t20 = $[42];
1045
- }
1046
- let t21;
1047
- if ($[43] !== handlePointerDown || $[44] !== isResizable || $[45] !== isResizing) {
1048
- t21 = isResizable && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { onPointerDown: handlePointerDown, isResizing });
1049
- $[43] = handlePointerDown;
1050
- $[44] = isResizable;
1051
- $[45] = isResizing;
1052
- $[46] = t21;
1053
- } else {
1054
- t21 = $[46];
1055
- }
1056
- let t22;
1057
- if ($[47] !== colspan || $[48] !== handleSort || $[49] !== mergedStyle || $[50] !== t16 || $[51] !== t19 || $[52] !== t20 || $[53] !== t21) {
1058
- t22 = /* @__PURE__ */ jsxRuntime.jsxs("th", { ref: t16, className: t19, style: mergedStyle, colSpan: colspan, onClick: handleSort, children: [
1059
- t20,
1060
- t21
1063
+ $[42] = children;
1064
+ $[43] = header?.information;
1065
+ $[44] = isChildrenEmpty;
1066
+ $[45] = renderSortIcon;
1067
+ $[46] = text;
1068
+ $[47] = t23;
1069
+ } else {
1070
+ t23 = $[47];
1071
+ }
1072
+ let t24;
1073
+ if ($[48] !== handlePointerDown || $[49] !== isResizable || $[50] !== isResizing) {
1074
+ t24 = isResizable && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { onPointerDown: handlePointerDown, isResizing });
1075
+ $[48] = handlePointerDown;
1076
+ $[49] = isResizable;
1077
+ $[50] = isResizing;
1078
+ $[51] = t24;
1079
+ } else {
1080
+ t24 = $[51];
1081
+ }
1082
+ let t25;
1083
+ if ($[52] !== colspan || $[53] !== handleSort || $[54] !== mergedStyle || $[55] !== t19 || $[56] !== t22 || $[57] !== t23 || $[58] !== t24) {
1084
+ t25 = /* @__PURE__ */ jsxRuntime.jsxs("th", { ref: t19, className: t22, style: mergedStyle, colSpan: colspan, onClick: handleSort, children: [
1085
+ t23,
1086
+ t24
1061
1087
  ] });
1062
- $[47] = colspan;
1063
- $[48] = handleSort;
1064
- $[49] = mergedStyle;
1065
- $[50] = t16;
1066
- $[51] = t19;
1067
- $[52] = t20;
1068
- $[53] = t21;
1069
- $[54] = t22;
1070
- } else {
1071
- t22 = $[54];
1072
- }
1073
- return t22;
1088
+ $[52] = colspan;
1089
+ $[53] = handleSort;
1090
+ $[54] = mergedStyle;
1091
+ $[55] = t19;
1092
+ $[56] = t22;
1093
+ $[57] = t23;
1094
+ $[58] = t24;
1095
+ $[59] = t25;
1096
+ } else {
1097
+ t25 = $[59];
1098
+ }
1099
+ return t25;
1074
1100
  });
1075
1101
  TableHeaderColumn.displayName = "TableHeaderColumn";
1076
1102
  const TableHeaderRow = React.memo((t0) => {
@@ -1167,11 +1193,14 @@ const TableHeaderRow = React.memo((t0) => {
1167
1193
  item: el,
1168
1194
  index
1169
1195
  });
1196
+ if (!React.isValidElement(child)) {
1197
+ return null;
1198
+ }
1170
1199
  const keyValue = el.id ?? el.header ?? index;
1171
- return React.isValidElement(child) ? React.cloneElement(child, {
1172
- key: keyValue,
1173
- ...getPinnedCellProps(child, pinnedColumns?.[index])
1174
- }) : null;
1200
+ const pinned = pinnedColumns?.[index];
1201
+ return pinned ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned, children: child }, keyValue) : React.cloneElement(child, {
1202
+ key: keyValue
1203
+ });
1175
1204
  };
1176
1205
  $[20] = children;
1177
1206
  $[21] = pinnedColumns;
@@ -1193,11 +1222,17 @@ const TableHeaderRow = React.memo((t0) => {
1193
1222
  if ($[23] !== children || $[24] !== dataHeader || $[25] !== pinnedColumns || $[26] !== props) {
1194
1223
  let t82;
1195
1224
  if ($[28] !== dataHeader || $[29] !== pinnedColumns || $[30] !== props) {
1196
- t82 = (child_0, index_0) => React.isValidElement(child_0) ? React.cloneElement(child_0, {
1197
- key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0,
1198
- ...props,
1199
- ...getPinnedCellProps(child_0, pinnedColumns?.[index_0])
1200
- }) : child_0;
1225
+ t82 = (child_0, index_0) => {
1226
+ if (!React.isValidElement(child_0)) {
1227
+ return child_0;
1228
+ }
1229
+ const cloned = React.cloneElement(child_0, {
1230
+ key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0,
1231
+ ...props
1232
+ });
1233
+ const pinned_0 = pinnedColumns?.[index_0];
1234
+ return pinned_0 ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned_0, children: cloned }) : cloned;
1235
+ };
1201
1236
  $[28] = dataHeader;
1202
1237
  $[29] = pinnedColumns;
1203
1238
  $[30] = props;
@@ -1276,7 +1311,7 @@ const TableHeaderRow = React.memo((t0) => {
1276
1311
  });
1277
1312
  TableHeaderRow.displayName = "TableHeaderRow";
1278
1313
  const TableSearchColumn = React.memo((t0) => {
1279
- const $ = compilerRuntime.c(9);
1314
+ const $ = compilerRuntime.c(14);
1280
1315
  const {
1281
1316
  children,
1282
1317
  className: t1,
@@ -1294,27 +1329,45 @@ const TableSearchColumn = React.memo((t0) => {
1294
1329
  }
1295
1330
  const style = t4;
1296
1331
  const colspan = t3 === void 0 ? void 0 : t3;
1297
- let t5;
1298
- if ($[2] !== className) {
1299
- t5 = tailwindMerge.twMerge("table-column-search px-2", className);
1332
+ const pinned = React.useContext(PinnedCellContext);
1333
+ const t5 = pinned && "table__column_pinned";
1334
+ const t6 = pinned?.isLast && "table__column_pinned--last";
1335
+ let t7;
1336
+ if ($[2] !== className || $[3] !== t5 || $[4] !== t6) {
1337
+ t7 = tailwindMerge.twMerge("table-column-search px-2", className, t5, t6);
1300
1338
  $[2] = className;
1301
1339
  $[3] = t5;
1340
+ $[4] = t6;
1341
+ $[5] = t7;
1302
1342
  } else {
1303
- t5 = $[3];
1343
+ t7 = $[5];
1304
1344
  }
1305
- const mergedClass = t5;
1306
- let t6;
1307
- if ($[4] !== children || $[5] !== colspan || $[6] !== mergedClass || $[7] !== style) {
1308
- t6 = /* @__PURE__ */ jsxRuntime.jsx("th", { className: mergedClass, style, colSpan: colspan, children });
1309
- $[4] = children;
1310
- $[5] = colspan;
1311
- $[6] = mergedClass;
1345
+ const mergedClass = t7;
1346
+ let t8;
1347
+ if ($[6] !== pinned || $[7] !== style) {
1348
+ t8 = pinned ? {
1349
+ ...style,
1350
+ left: pinned.left
1351
+ } : style;
1352
+ $[6] = pinned;
1312
1353
  $[7] = style;
1313
- $[8] = t6;
1354
+ $[8] = t8;
1314
1355
  } else {
1315
- t6 = $[8];
1356
+ t8 = $[8];
1316
1357
  }
1317
- return t6;
1358
+ const mergedStyle = t8;
1359
+ let t9;
1360
+ if ($[9] !== children || $[10] !== colspan || $[11] !== mergedClass || $[12] !== mergedStyle) {
1361
+ t9 = /* @__PURE__ */ jsxRuntime.jsx("th", { className: mergedClass, style: mergedStyle, colSpan: colspan, children });
1362
+ $[9] = children;
1363
+ $[10] = colspan;
1364
+ $[11] = mergedClass;
1365
+ $[12] = mergedStyle;
1366
+ $[13] = t9;
1367
+ } else {
1368
+ t9 = $[13];
1369
+ }
1370
+ return t9;
1318
1371
  });
1319
1372
  TableSearchColumn.displayName = "TableSearchColumn";
1320
1373
  const TableSearchRow = React.memo((t0) => {
@@ -1388,11 +1441,14 @@ const TableSearchRow = React.memo((t0) => {
1388
1441
  item: el,
1389
1442
  index
1390
1443
  });
1444
+ if (!React.isValidElement(child)) {
1445
+ return null;
1446
+ }
1391
1447
  const keyValue = el.id ?? el.header ?? index;
1392
- return React.isValidElement(child) ? React.cloneElement(child, {
1393
- key: keyValue,
1394
- ...getPinnedCellProps(child, pinnedColumns?.[index])
1395
- }) : null;
1448
+ const pinned = pinnedColumns?.[index];
1449
+ return pinned ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned, children: child }, keyValue) : React.cloneElement(child, {
1450
+ key: keyValue
1451
+ });
1396
1452
  };
1397
1453
  $[16] = children;
1398
1454
  $[17] = pinnedColumns;
@@ -1414,10 +1470,16 @@ const TableSearchRow = React.memo((t0) => {
1414
1470
  if ($[19] !== children || $[20] !== dataHeader || $[21] !== pinnedColumns) {
1415
1471
  let t72;
1416
1472
  if ($[23] !== dataHeader || $[24] !== pinnedColumns) {
1417
- t72 = (child_0, index_0) => React.isValidElement(child_0) ? React.cloneElement(child_0, {
1418
- key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0,
1419
- ...getPinnedCellProps(child_0, pinnedColumns?.[index_0])
1420
- }) : child_0;
1473
+ t72 = (child_0, index_0) => {
1474
+ if (!React.isValidElement(child_0)) {
1475
+ return child_0;
1476
+ }
1477
+ const cloned = React.cloneElement(child_0, {
1478
+ key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0
1479
+ });
1480
+ const pinned_0 = pinnedColumns?.[index_0];
1481
+ return pinned_0 ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned_0, children: cloned }) : cloned;
1482
+ };
1421
1483
  $[23] = dataHeader;
1422
1484
  $[24] = pinnedColumns;
1423
1485
  $[25] = t72;