@homebound/beam 4.47.1 → 4.47.3

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
@@ -6612,9 +6612,6 @@ function memoizedTableStyles() {
6612
6612
  color: ["color_var", {
6613
6613
  "--color": "var(--b-on-surface)"
6614
6614
  }],
6615
- backgroundColor: ["bgColor_var", {
6616
- "--backgroundColor": "var(--b-surface)"
6617
- }],
6618
6615
  alignItems: ["ai_var", {
6619
6616
  "--alignItems": maybeCssVar_1(alignItems)
6620
6617
  }],
@@ -6633,11 +6630,17 @@ function memoizedTableStyles() {
6633
6630
  "--height": `${inlineEditing ? 48 : 36}px`
6634
6631
  }]
6635
6632
  },
6636
- ...cellHighlight ? {
6637
- backgroundColor: ["h_bgColor_var", {
6638
- "--h_backgroundColor": "var(--b-surface-hover)"
6639
- }]
6640
- } : {}
6633
+ ...{
6634
+ backgroundColor: ["bgColor_var", {
6635
+ "--backgroundColor": "var(--b-surface)"
6636
+ }],
6637
+ ...cellHighlight ? {
6638
+ backgroundColor: ["bgColor_var h_bgColor_var", {
6639
+ "--backgroundColor": "var(--b-surface)",
6640
+ "--h_backgroundColor": "var(--b-surface-hover)"
6641
+ }]
6642
+ } : {}
6643
+ }
6641
6644
  },
6642
6645
  firstCellCss: bordered ? {
6643
6646
  borderLeftStyle: "bls_solid",
@@ -14533,7 +14536,28 @@ function GridTable(props) {
14533
14536
  return /* @__PURE__ */ jsx54(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs34(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
14534
14537
  /* @__PURE__ */ jsx54("div", { ref: resizeRef, ...trussProps34(getTableRefWidthStyles(as === "virtual", columnMeasureWidth)), ...tid.probe }),
14535
14538
  loading && /* @__PURE__ */ jsx54("div", { ...trussProps34(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx54(Loader, { ...tid.loadingSpinner, size: "md" }) }),
14536
- as === "card" ? /* @__PURE__ */ jsx54(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx54(VirtualGridTableView, { style: tableStyle, id, columns: layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition, loading }) : renders[_as](tableStyle, id, layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
14539
+ as === "card" ? /* @__PURE__ */ jsx54(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx54(
14540
+ VirtualGridTableView,
14541
+ {
14542
+ style,
14543
+ minWidthPx: tableStyle.minWidthPx,
14544
+ id,
14545
+ columns: layoutColumns,
14546
+ visibleDataRows,
14547
+ keptSelectedRows,
14548
+ pinnedRows,
14549
+ firstRowMessage,
14550
+ stickyHeader,
14551
+ xss,
14552
+ virtuosoRef,
14553
+ virtuosoRangeRef,
14554
+ tableHeadRows,
14555
+ stickyOffset,
14556
+ infiniteScroll,
14557
+ persistScrollPosition,
14558
+ loading
14559
+ }
14560
+ ) : renders[_as](tableStyle, id, layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
14537
14561
  ] }) });
14538
14562
  }
14539
14563
  var loadingOverlayCss = {
@@ -14657,6 +14681,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
14657
14681
  }
14658
14682
  function VirtualGridTableView({
14659
14683
  style,
14684
+ minWidthPx,
14660
14685
  id,
14661
14686
  columns,
14662
14687
  visibleDataRows,
@@ -14689,9 +14714,8 @@ function VirtualGridTableView({
14689
14714
  // the div/table render paths so virtualized tables pin below the global nav + page header.
14690
14715
  TopItemList: React9.forwardRef((props, ref) => /* @__PURE__ */ jsx54("div", { ...props, ref, ...mergeProps14(void 0, {
14691
14716
  ...props.style,
14692
- ...style.minWidthPx !== void 0 ? {
14693
- minWidth: style.minWidthPx
14694
- } : {},
14717
+ // Read from a CSS variable so a width change doesn't recreate this component and remount every row
14718
+ minWidth: `var(${virtualTableMinWidthVar}, auto)`,
14695
14719
  zIndex: zIndices.tableStickyHeader,
14696
14720
  top: stickyTableHeaderOffset(stickyOffset)
14697
14721
  }, {
@@ -14716,6 +14740,9 @@ function VirtualGridTableView({
14716
14740
  overscan: 5,
14717
14741
  ref: virtuosoRef,
14718
14742
  ...loading ? trussProps34(loadingTableCss) : {},
14743
+ style: minWidthPx !== void 0 ? {
14744
+ [virtualTableMinWidthVar]: `${minWidthPx}px`
14745
+ } : void 0,
14719
14746
  ...customScrollParent ? {
14720
14747
  customScrollParent
14721
14748
  } : {},
@@ -14872,6 +14899,7 @@ function CardView({
14872
14899
  }
14873
14900
  } : {} }) });
14874
14901
  }
14902
+ var virtualTableMinWidthVar = "--beam-virtual-table-min-width";
14875
14903
  var VirtualRoot = memoizeOne((gs, _columns, id, xss) => {
14876
14904
  return React9.forwardRef(function VirtualRoot2({
14877
14905
  style,