@homebound/beam 3.55.0 → 3.55.2

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
@@ -8500,7 +8500,7 @@ function memoizedTableStyles() {
8500
8500
  borderOnHover: highlightOnHover
8501
8501
  },
8502
8502
  levels: grouped ? groupedLevels : defaultLevels,
8503
- rowHoverColor: "rgba(239, 246, 255, 1)" /* Blue50 */,
8503
+ rowHoverColor: "rgba(247, 245, 245, 1)" /* Gray100 */,
8504
8504
  keptGroupRowCss: {
8505
8505
  backgroundColor: "bgYellow100",
8506
8506
  color: "gray900",
@@ -8758,17 +8758,12 @@ function RowImpl(props) {
8758
8758
  paddingBottom: "pb_25px"
8759
8759
  }
8760
8760
  };
8761
+ const rowHoverBg = style.rowHoverColor !== void 0 && style.rowHoverColor !== "none" ? style.rowHoverColor : "rgba(247, 245, 245, 1)" /* Gray100 */;
8761
8762
  const rowCss = {
8762
8763
  ...!reservedRowKinds.includes(row.kind) && style.nonHeaderRowCss,
8763
8764
  ...isFirstBodyRow && style.firstBodyRowCss,
8764
8765
  ...isFirstHeadRow && style.firstRowCss,
8765
8766
  ...as === "table" && tableRowPrintBreakCss,
8766
- // Optionally include the row hover styles, by default they should be turned on.
8767
- ...showRowHoverColor && {
8768
- backgroundColor: ["h_bgColor_var", {
8769
- "--h_backgroundColor": maybeCssVar13(style.rowHoverColor ?? "rgba(219, 234, 254, 1)" /* Blue100 */)
8770
- }]
8771
- },
8772
8767
  ...levelIndent && {
8773
8768
  marginLeft: ["ml_var", {
8774
8769
  "--marginLeft": `${levelIndent}px`
@@ -8786,7 +8781,14 @@ function RowImpl(props) {
8786
8781
  ...(rowStyle?.rowLink || rowStyle?.onClick) && {
8787
8782
  cursor: "h_cursorPointer"
8788
8783
  },
8789
- ...maybeApplyFunction(row, rowStyle?.rowCss)
8784
+ ...maybeApplyFunction(row, rowStyle?.rowCss),
8785
+ // Row hover paints cells via Row.css.ts (`.beam-row-hover:hover > *`); set the var via Css.style
8786
+ // (React CSSProperties rejects custom props without a cast).
8787
+ ...showRowHoverColor && {
8788
+ style_rowHoverBgVar_rowHoverBg: {
8789
+ [rowHoverBgVar]: rowHoverBg
8790
+ }
8791
+ }
8790
8792
  // keptLastRowCss is now applied per-cell in cellCss below
8791
8793
  };
8792
8794
  let currentColspan = 1;
@@ -8797,7 +8799,7 @@ function RowImpl(props) {
8797
8799
  const ref = useRef10(null);
8798
8800
  const dragOverCallback = useCallback7((row2, evt) => onDragOver?.(row2, evt), [onDragOver]);
8799
8801
  const onDragOverDebounced = useDebouncedCallback2(dragOverCallback, 100);
8800
- const RowContent = () => /* @__PURE__ */ jsx30(RowTag, { ...mergeProps_12(BorderHoverParent, void 0, rowCss), ...others, "data-gridrow": true, ...getCount(row.id), ref, children: isKeptGroupRow ? /* @__PURE__ */ jsx30(KeptGroupRow, { as, style, columnSizes, row, colSpan: columns.length, isLastBodyRow }) : columns.map((column2, columnIndex) => {
8802
+ const RowContent = () => /* @__PURE__ */ jsx30(RowTag, { ...mergeProps_12(`${BorderHoverParent} ${RowHoverClass}`, void 0, rowCss), ...others, "data-gridrow": true, ...getCount(row.id), ref, children: isKeptGroupRow ? /* @__PURE__ */ jsx30(KeptGroupRow, { as, style, columnSizes, row, colSpan: columns.length, isLastBodyRow }) : columns.map((column2, columnIndex) => {
8801
8803
  const maybeExpandedColumn = expandColumnHidden ? columns[columnIndex - 1] : column2;
8802
8804
  const isExpanded = tableState.isExpandedColumn(maybeExpandedColumn.id);
8803
8805
  if (column2.hideOnExpand && isExpanded) {
@@ -9000,10 +9002,13 @@ function RowImpl(props) {
9000
9002
  var Row = observer(RowImpl);
9001
9003
  var BorderHoverParent = "beam-bhp";
9002
9004
  var BorderHoverChild = "beam-bhc";
9005
+ var RowHoverClass = "beam-row-hover";
9006
+ var rowHoverBgVar = "--beam-row-hover-bg";
9003
9007
 
9004
9008
  // src/components/Table/components/Row.css.ts
9005
9009
  var css = {
9006
- ".beam-bhp:hover:not(:has(.beam-bhc:hover)) .beam-bhc": Css.ba.bcBlue300.$
9010
+ ".beam-bhp:hover:not(:has(.beam-bhc:hover)) .beam-bhc": Css.ba.bcBlue300.$,
9011
+ ".beam-row-hover:hover > *": Css.bgColor("var(--beam-row-hover-bg)").$
9007
9012
  };
9008
9013
 
9009
9014
  // src/forms/labelUtils.ts
@@ -12061,9 +12066,16 @@ function ListBox(props) {
12061
12066
  const firstRender = useRef22(true);
12062
12067
  const virtuosoListHeight = useRef22(0);
12063
12068
  const onListHeightChange = (listHeight) => {
12069
+ const prevListHeight = virtuosoListHeight.current;
12064
12070
  virtuosoListHeight.current = listHeight;
12065
12071
  const height = (selectedList.current?.offsetHeight || 0) + listHeight;
12066
- setPopoverHeight(Math.min(popoverMaxHeight, hasSections ? height + persistentItemHeight + sectionSeparatorHeight : height));
12072
+ const next = Math.min(popoverMaxHeight, hasSections ? height + persistentItemHeight + sectionSeparatorHeight : height);
12073
+ setPopoverHeight((prev) => {
12074
+ if (prevListHeight > 0 && listHeight < prevListHeight && next < prev) {
12075
+ return prev;
12076
+ }
12077
+ return next;
12078
+ });
12067
12079
  };
12068
12080
  useEffect12(
12069
12081
  () => {