@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.js CHANGED
@@ -10316,7 +10316,7 @@ function useTimelineSlots(args) {
10316
10316
  return React32.createElement(
10317
10317
  "span",
10318
10318
  { className: "inline-flex flex-col items-center leading-tight" },
10319
- React32.createElement("span", { className: "text-[11px] font-semibold text-foreground truncate max-w-[8rem]" }, match.title),
10319
+ React32.createElement("span", { className: "text-[11px] font-semibold text-foreground truncate max-w-32" }, match.title),
10320
10320
  React32.createElement("span", { className: "text-[10px] font-medium text-muted-foreground/70" }, rangeText)
10321
10321
  );
10322
10322
  }
@@ -11781,7 +11781,7 @@ function CalendarTimeline({
11781
11781
  /* @__PURE__ */ jsx39(
11782
11782
  "div",
11783
11783
  {
11784
- className: cn("text-xs font-semibold leading-snug min-w-0 overflow-hidden", isPlainTitle ? "break-words" : ""),
11784
+ className: cn("text-xs font-semibold leading-snug min-w-0 overflow-hidden", isPlainTitle ? "wrap-break-word" : ""),
11785
11785
  style: isPlainTitle ? {
11786
11786
  display: "-webkit-box",
11787
11787
  WebkitBoxOrient: "vertical",
@@ -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 getStickyHeaderClass = React58.useCallback((col) => {
19281
- if (!col.fixed) return "";
19282
- return cn(
19283
- "sticky",
19284
- col.fixed === "left" && "left-0 shadow-[2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19285
- col.fixed === "right" && "right-0 shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19286
- "z-50 bg-muted!"
19287
- );
19288
- }, []);
19289
- const getStickyCellClass = React58.useCallback((col, isStripedRow) => {
19290
- if (!col.fixed) return "";
19291
- return cn(
19292
- "sticky z-10",
19293
- col.fixed === "left" && "left-0 shadow-[2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19294
- col.fixed === "right" && "right-0 shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.15)]",
19295
- isStripedRow ? "bg-muted/50!" : "bg-card!"
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;
@@ -19791,17 +19813,17 @@ function DataTable({
19791
19813
  "\u2026"
19792
19814
  ] })
19793
19815
  ] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */ jsx68(TableRow, { children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: t("noData") }) }) : displayedData.map((row, idx) => {
19816
+ const isStripedRow = striped && idx % 2 === 0;
19794
19817
  return /* @__PURE__ */ jsx68(
19795
19818
  TableRow,
19796
19819
  {
19797
- className: cn(densityRowClass),
19820
+ className: cn(densityRowClass, isStripedRow ? "bg-surface-1" : "bg-surface-0"),
19798
19821
  style: {
19799
19822
  contentVisibility: "auto",
19800
19823
  containIntrinsicSize: density === "compact" ? "0 36px" : density === "comfortable" ? "0 56px" : "0 48px"
19801
19824
  },
19802
19825
  children: leafColumns.map((col, colIdx) => {
19803
19826
  const value = col.dataIndex ? row[col.dataIndex] : void 0;
19804
- const isStripedRow = striped && idx % 2 === 0;
19805
19827
  const prevCol = colIdx > 0 ? leafColumns[colIdx - 1] : null;
19806
19828
  const isAfterFixedLeft = prevCol?.fixed === "left";
19807
19829
  const showBorderLeft = columnDividers && colIdx > 0 && !isAfterFixedLeft && !col.fixed;
@@ -19814,8 +19836,7 @@ function DataTable({
19814
19836
  col.align === "right" && "text-right",
19815
19837
  col.align === "center" && "text-center",
19816
19838
  showBorderLeft && "border-l border-border/60",
19817
- getStickyCellClass(col, isStripedRow),
19818
- !col.fixed && isStripedRow && "bg-muted/50"
19839
+ getStickyCellClass(col, isStripedRow)
19819
19840
  ),
19820
19841
  children: col.render ? col.render(value, row, idx) : String(value ?? "")
19821
19842
  },