@underverse-ui/underverse 1.0.21 → 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 CHANGED
@@ -10496,7 +10496,7 @@ function useTimelineSlots(args) {
10496
10496
  return React32.createElement(
10497
10497
  "span",
10498
10498
  { className: "inline-flex flex-col items-center leading-tight" },
10499
- React32.createElement("span", { className: "text-[11px] font-semibold text-foreground truncate max-w-[8rem]" }, match.title),
10499
+ React32.createElement("span", { className: "text-[11px] font-semibold text-foreground truncate max-w-32" }, match.title),
10500
10500
  React32.createElement("span", { className: "text-[10px] font-medium text-muted-foreground/70" }, rangeText)
10501
10501
  );
10502
10502
  }
@@ -11961,7 +11961,7 @@ function CalendarTimeline({
11961
11961
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11962
11962
  "div",
11963
11963
  {
11964
- className: cn("text-xs font-semibold leading-snug min-w-0 overflow-hidden", isPlainTitle ? "break-words" : ""),
11964
+ className: cn("text-xs font-semibold leading-snug min-w-0 overflow-hidden", isPlainTitle ? "wrap-break-word" : ""),
11965
11965
  style: isPlainTitle ? {
11966
11966
  display: "-webkit-box",
11967
11967
  WebkitBoxOrient: "vertical",
@@ -19430,6 +19430,14 @@ function useStickyColumns(columns, visibleKeys) {
19430
19430
  }
19431
19431
  return positions;
19432
19432
  }, [leafColumns]);
19433
+ const { leftBoundaryKey, rightBoundaryKey } = import_react36.default.useMemo(() => {
19434
+ const leftFixed = leafColumns.filter((c) => c.fixed === "left");
19435
+ const rightFixed = leafColumns.filter((c) => c.fixed === "right");
19436
+ return {
19437
+ leftBoundaryKey: leftFixed.length > 0 ? leftFixed[leftFixed.length - 1].key : null,
19438
+ rightBoundaryKey: rightFixed.length > 0 ? rightFixed[0].key : null
19439
+ };
19440
+ }, [leafColumns]);
19433
19441
  const getStickyColumnStyle = import_react36.default.useCallback(
19434
19442
  (col) => {
19435
19443
  if (!col.fixed) return {};
@@ -19441,24 +19449,38 @@ function useStickyColumns(columns, visibleKeys) {
19441
19449
  },
19442
19450
  [stickyPositions]
19443
19451
  );
19444
- const getStickyHeaderClass = import_react36.default.useCallback((col) => {
19445
- if (!col.fixed) return "";
19446
- return cn(
19447
- "sticky",
19448
- col.fixed === "left" && "left-0 shadow-[2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19449
- col.fixed === "right" && "right-0 shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19450
- "z-50 bg-muted!"
19451
- );
19452
- }, []);
19453
- const getStickyCellClass = import_react36.default.useCallback((col, isStripedRow) => {
19454
- if (!col.fixed) return "";
19455
- return cn(
19456
- "sticky z-10",
19457
- col.fixed === "left" && "left-0 shadow-[2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19458
- col.fixed === "right" && "right-0 shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19459
- isStripedRow ? "bg-muted/50!" : "bg-card!"
19460
- );
19461
- }, []);
19452
+ const getBoundaryShadowClass = import_react36.default.useCallback(
19453
+ (col) => {
19454
+ if (col.fixed === "left" && col.key === leftBoundaryKey) {
19455
+ return "border-r border-border/80 shadow-[10px_0_16px_-10px_rgba(0,0,0,0.55)]";
19456
+ }
19457
+ if (col.fixed === "right" && col.key === rightBoundaryKey) {
19458
+ return "border-l border-border/80 shadow-[-10px_0_16px_-10px_rgba(0,0,0,0.55)]";
19459
+ }
19460
+ return "";
19461
+ },
19462
+ [leftBoundaryKey, rightBoundaryKey]
19463
+ );
19464
+ const getStickyHeaderClass = import_react36.default.useCallback(
19465
+ (col) => {
19466
+ if (!col.fixed) return "";
19467
+ return cn("sticky", col.fixed === "left" && "left-0", col.fixed === "right" && "right-0", getBoundaryShadowClass(col), "z-50 !bg-muted");
19468
+ },
19469
+ [getBoundaryShadowClass]
19470
+ );
19471
+ const getStickyCellClass = import_react36.default.useCallback(
19472
+ (col, isStripedRow) => {
19473
+ if (!col.fixed) return "";
19474
+ return cn(
19475
+ "sticky z-10",
19476
+ col.fixed === "left" && "left-0",
19477
+ col.fixed === "right" && "right-0",
19478
+ getBoundaryShadowClass(col),
19479
+ isStripedRow ? "!bg-surface-1" : "!bg-surface-0"
19480
+ );
19481
+ },
19482
+ [getBoundaryShadowClass]
19483
+ );
19462
19484
  const getStickyHeaderCellStyle = import_react36.default.useCallback(
19463
19485
  (headerCell) => {
19464
19486
  const col = headerCell.column;
@@ -19955,17 +19977,17 @@ function DataTable({
19955
19977
  "\u2026"
19956
19978
  ] })
19957
19979
  ] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: t("noData") }) }) : displayedData.map((row, idx) => {
19980
+ const isStripedRow = striped && idx % 2 === 0;
19958
19981
  return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
19959
19982
  TableRow,
19960
19983
  {
19961
- className: cn(densityRowClass),
19984
+ className: cn(densityRowClass, isStripedRow ? "bg-surface-1" : "bg-surface-0"),
19962
19985
  style: {
19963
19986
  contentVisibility: "auto",
19964
19987
  containIntrinsicSize: density === "compact" ? "0 36px" : density === "comfortable" ? "0 56px" : "0 48px"
19965
19988
  },
19966
19989
  children: leafColumns.map((col, colIdx) => {
19967
19990
  const value = col.dataIndex ? row[col.dataIndex] : void 0;
19968
- const isStripedRow = striped && idx % 2 === 0;
19969
19991
  const prevCol = colIdx > 0 ? leafColumns[colIdx - 1] : null;
19970
19992
  const isAfterFixedLeft = prevCol?.fixed === "left";
19971
19993
  const showBorderLeft = columnDividers && colIdx > 0 && !isAfterFixedLeft && !col.fixed;
@@ -19978,8 +20000,7 @@ function DataTable({
19978
20000
  col.align === "right" && "text-right",
19979
20001
  col.align === "center" && "text-center",
19980
20002
  showBorderLeft && "border-l border-border/60",
19981
- getStickyCellClass(col, isStripedRow),
19982
- !col.fixed && isStripedRow && "bg-muted/50"
20003
+ getStickyCellClass(col, isStripedRow)
19983
20004
  ),
19984
20005
  children: col.render ? col.render(value, row, idx) : String(value ?? "")
19985
20006
  },