@cjlapao/ui-kit 0.2.27 → 0.2.28

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
@@ -18241,7 +18241,7 @@ var ScrollArea = ({
18241
18241
  ...horizontal ? null : { overflowX: "hidden" }
18242
18242
  },
18243
18243
  className: (0, import_classnames35.default)(
18244
- "h-full w-full max-h-[inherit] overflow-auto rounded-[inherit] outline-none",
18244
+ "relative z-0 h-full w-full max-h-[inherit] overflow-auto rounded-[inherit] outline-none",
18245
18245
  // `max-height: inherit` is what makes a `max-h-*` frame work: a
18246
18246
  // percentage height would resolve against an auto-height parent
18247
18247
  // and the viewport would simply grow past the frame's cap, get
@@ -58043,10 +58043,10 @@ function TableComponent({
58043
58043
  const highlightRowClass = isHighlighted ? getHighlightRowClass(controlColor) : "";
58044
58044
  const isStripedRow = striped && originalIndex % 2 === 1;
58045
58045
  const baseRowBgClass = isStripedRow ? getStripedRowClass(tone) : "bg-white dark:bg-neutral-900";
58046
- const rowHoverClass = !isSelected && !isHighlighted && hoverable ? rowHoverClassName?.(row, originalIndex) ?? (isStripedRow ? getStripedRowHoverClass(tone) : getLightRowHoverClass(tone)) : void 0;
58046
+ const rowHoverClass = (!isSelected && !isHighlighted && hoverable ? rowHoverClassName?.(row, originalIndex) ?? (isStripedRow ? getStripedRowHoverClass(tone) : getLightRowHoverClass(tone)) : void 0)?.replace(/group-hover:/g, "group-hover/table-row:");
58047
58047
  const rowClasses = (0, import_classnames96.default)(
58048
58048
  cellPadding,
58049
- "group",
58049
+ "group group/table-row",
58050
58050
  isSelected ? selectedClass : isHighlighted ? highlightRowClass : isStripedRow && getStripedRowClass(tone),
58051
58051
  isHighlighted && hoverable && "hover:brightness-95",
58052
58052
  "transition-colors duration-150 ease-out",
@@ -58058,6 +58058,11 @@ function TableComponent({
58058
58058
  {
58059
58059
  role: "row",
58060
58060
  className: rowClasses,
58061
+ style: {
58062
+ // Sticky cells must blend hover over the same stripe as normal cells.
58063
+ "--ui-table-row-stripe-light": isStripedRow && !isSelected && !isHighlighted ? `color-mix(in oklab, var(--color-${NEUTRAL_TONES.includes(tone) ? "neutral" : tone}-50) 55%, transparent)` : "transparent",
58064
+ "--ui-table-row-stripe-dark": isStripedRow && !isSelected && !isHighlighted ? NEUTRAL_TONES.includes(tone) ? "color-mix(in oklab, var(--color-neutral-800) 15%, transparent)" : `color-mix(in oklab, var(--color-${tone}-500) 8%, transparent)` : "transparent"
58065
+ },
58061
58066
  onClick: onRowClick ? () => onRowClick(row, originalIndex) : void 0,
58062
58067
  children: [
58063
58068
  showGroupExpandCol && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
@@ -58065,10 +58070,10 @@ function TableComponent({
58065
58070
  {
58066
58071
  role: "cell",
58067
58072
  className: (0, import_classnames96.default)(
58068
- "w-10 sticky left-0 z-20 transition-colors duration-150 ease-out",
58073
+ "w-10 sticky left-0 z-20 ui-table-sticky-cell transition-colors duration-150 ease-out",
58069
58074
  // Only apply an opaque background when there is a left-sticky data column;
58070
58075
  // otherwise the spacer can remain transparent.
58071
- hasLeftStickyColumn && (isSelected ? getSelectedRowClass(controlColor) : isHighlighted ? getHighlightRowClass(controlColor) : baseRowBgClass),
58076
+ hasLeftStickyColumn && (isSelected ? getSelectedRowClass(controlColor) : isHighlighted ? getHighlightRowClass(controlColor) : isStripedRow ? "bg-transparent" : baseRowBgClass),
58072
58077
  rowHoverClass
58073
58078
  ),
58074
58079
  "aria-hidden": "true",
@@ -58100,14 +58105,14 @@ function TableComponent({
58100
58105
  isStickyLeft && (showGroupExpandCol ? "left-10" : "left-0"),
58101
58106
  // right position is set via inline style when offset > 0
58102
58107
  isStickyRight && !rightOffset && "right-0",
58103
- (isStickyLeft || isStickyRight) && "z-10",
58104
- (isStickyLeft || isStickyRight) && (isSelected ? getSelectedRowClass(controlColor) : isHighlighted ? getHighlightRowClass(controlColor) : isStripedRow ? getStripedRowClass(tone) : column.stickyBackgroundFn?.(row, originalIndex) ?? column.stickyBackground ?? "bg-white dark:bg-neutral-900"),
58108
+ (isStickyLeft || isStickyRight) && "z-10 ui-table-sticky-cell",
58109
+ (isStickyLeft || isStickyRight) && (isSelected ? getSelectedRowClass(controlColor) : isHighlighted ? getHighlightRowClass(controlColor) : isStripedRow ? "bg-transparent" : column.stickyBackgroundFn?.(row, originalIndex) ?? column.stickyBackground ?? "bg-white dark:bg-neutral-900"),
58105
58110
  // Same hover fill for every cell (sticky included) — the
58106
58111
  // `group-hover:` variant beats the cell's base background, so
58107
58112
  // the whole row shifts uniformly without scrolled content
58108
58113
  // bleeding through a sticky column.
58109
58114
  rowHoverClass,
58110
- (isStickyLeft || isStickyRight) && isHighlighted && hoverable && "group-hover:brightness-95",
58115
+ (isStickyLeft || isStickyRight) && isHighlighted && hoverable && "group-hover/table-row:brightness-95",
58111
58116
  getCellAlignment(column.align),
58112
58117
  // Horizontal padding. Every cell keeps a symmetric gap so
58113
58118
  // adjacent columns never sit flush (bordered or not) and the