@underverse-ui/underverse 1.0.22 → 1.0.23
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.
- package/dist/index.cjs +40 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19266,6 +19266,14 @@ function useStickyColumns(columns, visibleKeys) {
|
|
|
19266
19266
|
}
|
|
19267
19267
|
return positions;
|
|
19268
19268
|
}, [leafColumns]);
|
|
19269
|
+
const { leftBoundaryKey, rightBoundaryKey } = React58.useMemo(() => {
|
|
19270
|
+
const leftFixed = leafColumns.filter((c) => c.fixed === "left");
|
|
19271
|
+
const rightFixed = leafColumns.filter((c) => c.fixed === "right");
|
|
19272
|
+
return {
|
|
19273
|
+
leftBoundaryKey: leftFixed.length > 0 ? leftFixed[leftFixed.length - 1].key : null,
|
|
19274
|
+
rightBoundaryKey: rightFixed.length > 0 ? rightFixed[0].key : null
|
|
19275
|
+
};
|
|
19276
|
+
}, [leafColumns]);
|
|
19269
19277
|
const getStickyColumnStyle = React58.useCallback(
|
|
19270
19278
|
(col) => {
|
|
19271
19279
|
if (!col.fixed) return {};
|
|
@@ -19277,24 +19285,38 @@ function useStickyColumns(columns, visibleKeys) {
|
|
|
19277
19285
|
},
|
|
19278
19286
|
[stickyPositions]
|
|
19279
19287
|
);
|
|
19280
|
-
const
|
|
19281
|
-
|
|
19282
|
-
|
|
19283
|
-
|
|
19284
|
-
|
|
19285
|
-
col.fixed === "right" &&
|
|
19286
|
-
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
col.fixed
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19288
|
+
const getBoundaryShadowClass = React58.useCallback(
|
|
19289
|
+
(col) => {
|
|
19290
|
+
if (col.fixed === "left" && col.key === leftBoundaryKey) {
|
|
19291
|
+
return "border-r border-border/80 shadow-[10px_0_16px_-10px_rgba(0,0,0,0.55)]";
|
|
19292
|
+
}
|
|
19293
|
+
if (col.fixed === "right" && col.key === rightBoundaryKey) {
|
|
19294
|
+
return "border-l border-border/80 shadow-[-10px_0_16px_-10px_rgba(0,0,0,0.55)]";
|
|
19295
|
+
}
|
|
19296
|
+
return "";
|
|
19297
|
+
},
|
|
19298
|
+
[leftBoundaryKey, rightBoundaryKey]
|
|
19299
|
+
);
|
|
19300
|
+
const getStickyHeaderClass = React58.useCallback(
|
|
19301
|
+
(col) => {
|
|
19302
|
+
if (!col.fixed) return "";
|
|
19303
|
+
return cn("sticky", col.fixed === "left" && "left-0", col.fixed === "right" && "right-0", getBoundaryShadowClass(col), "z-50 !bg-muted");
|
|
19304
|
+
},
|
|
19305
|
+
[getBoundaryShadowClass]
|
|
19306
|
+
);
|
|
19307
|
+
const getStickyCellClass = React58.useCallback(
|
|
19308
|
+
(col, isStripedRow) => {
|
|
19309
|
+
if (!col.fixed) return "";
|
|
19310
|
+
return cn(
|
|
19311
|
+
"sticky z-10",
|
|
19312
|
+
col.fixed === "left" && "left-0",
|
|
19313
|
+
col.fixed === "right" && "right-0",
|
|
19314
|
+
getBoundaryShadowClass(col),
|
|
19315
|
+
isStripedRow ? "!bg-surface-1" : "!bg-surface-0"
|
|
19316
|
+
);
|
|
19317
|
+
},
|
|
19318
|
+
[getBoundaryShadowClass]
|
|
19319
|
+
);
|
|
19298
19320
|
const getStickyHeaderCellStyle = React58.useCallback(
|
|
19299
19321
|
(headerCell) => {
|
|
19300
19322
|
const col = headerCell.column;
|