@homebound/beam 3.18.0 → 3.20.0

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
@@ -5779,9 +5779,19 @@ var beamPageHeaderLayoutHeightVar = "--beam-page-header-layout-height";
5779
5779
  var beamLayoutViewportWidthVar = "--beam-layout-viewport-width";
5780
5780
  var beamLayoutViewportHeightVar = "--beam-layout-viewport-height";
5781
5781
  var beamSideNavLayoutWidthVar = "--beam-side-nav-layout-width";
5782
+ var beamTableActionsHeightVar = "--beam-table-actions-height";
5783
+ function documentScrollChromeLeft() {
5784
+ return `var(${beamSideNavLayoutWidthVar}, 0px)`;
5785
+ }
5786
+ function documentScrollChromeWidth() {
5787
+ return `calc(var(${beamLayoutViewportWidthVar}, 100vw) - var(${beamSideNavLayoutWidthVar}, 0px))`;
5788
+ }
5782
5789
  function stickyNavAndHeaderOffset(basePx = 0) {
5783
5790
  return `calc(${basePx}px + var(${beamNavbarLayoutHeightVar}, 0px) + var(${beamPageHeaderLayoutHeightVar}, 0px))`;
5784
5791
  }
5792
+ function stickyTableHeaderOffset(basePx = 0) {
5793
+ return `calc(${basePx}px + var(${beamNavbarLayoutHeightVar}, 0px) + var(${beamPageHeaderLayoutHeightVar}, 0px) + var(${beamTableActionsHeightVar}, 0px))`;
5794
+ }
5785
5795
 
5786
5796
  // src/utils/zIndices.ts
5787
5797
  var zIndices = {
@@ -5790,6 +5800,7 @@ var zIndices = {
5790
5800
  tableExpandableTitle: 20,
5791
5801
  tableStickyColumn: 30,
5792
5802
  tableStickyHeader: 40,
5803
+ tableActions: 45,
5793
5804
  // Page chrome - ensure these items sit above the table
5794
5805
  scrollShadow: 50,
5795
5806
  superDrawerScrim: 50,
@@ -5956,6 +5967,9 @@ function SortHeader(props) {
5956
5967
  // src/components/Table/utils/utils.tsx
5957
5968
  import { trussProps as trussProps11, maybeCssVar as maybeCssVar9 } from "@homebound/truss/runtime";
5958
5969
  import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
5970
+ var __maybeInc4 = (inc) => {
5971
+ return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
5972
+ };
5959
5973
  function toContent(maybeContent, isHeader, canSortColumn, isClientSideSorting, style, as, alignment, column2, isExpandableHeader, isExpandable, minStickyLeftOffset, isKeptSelectedRow) {
5960
5974
  if (isKeptSelectedRow && column2.id === "beamCollapseColumn") {
5961
5975
  return /* @__PURE__ */ jsx14(Fragment4, {});
@@ -6150,12 +6164,21 @@ function recursivelyGetContainingRow(rowId, rowArray, parent) {
6150
6164
  }
6151
6165
  return void 0;
6152
6166
  }
6153
- function getTableRefWidthStyles(isVirtual) {
6154
- return {
6155
- width: "w100",
6156
- ...isVirtual ? {
6167
+ function getTableRefWidthStyles(isVirtual, inDocumentScrollLayout = false) {
6168
+ if (inDocumentScrollLayout) {
6169
+ return {
6170
+ width: ["w_var", {
6171
+ "--width": maybeCssVar9(__maybeInc4(documentScrollChromeWidth()))
6172
+ }]
6173
+ };
6174
+ }
6175
+ if (isVirtual) {
6176
+ return {
6157
6177
  width: "w_calc_100_20px"
6158
- } : {}
6178
+ };
6179
+ }
6180
+ return {
6181
+ width: "w100"
6159
6182
  };
6160
6183
  }
6161
6184
 
@@ -6963,7 +6986,7 @@ function ColumnResizeHandle({
6963
6986
  import { useContext as useContext9 } from "react";
6964
6987
  import { trussProps as trussProps17, maybeCssVar as maybeCssVar11 } from "@homebound/truss/runtime";
6965
6988
  import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
6966
- var __maybeInc4 = (inc) => {
6989
+ var __maybeInc5 = (inc) => {
6967
6990
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
6968
6991
  };
6969
6992
  function KeptGroupRow(props) {
@@ -6990,7 +7013,7 @@ function KeptGroupRow(props) {
6990
7013
  ...{
6991
7014
  paddingLeft: "pl0",
6992
7015
  width: ["w_var", {
6993
- "--width": maybeCssVar11(__maybeInc4(`calc(${columnSizes.join(" + ")})`))
7016
+ "--width": maybeCssVar11(__maybeInc5(`calc(${columnSizes.join(" + ")})`))
6994
7017
  }]
6995
7018
  }
6996
7019
  }), ...as === "table" ? {
@@ -7799,7 +7822,7 @@ function isZonedDateTime(value) {
7799
7822
  import { useDebouncedCallback as useDebouncedCallback2 } from "use-debounce";
7800
7823
  import { trussProps as trussProps18, mergeProps as mergeProps_12, maybeCssVar as maybeCssVar13 } from "@homebound/truss/runtime";
7801
7824
  import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
7802
- var __maybeInc5 = (inc) => {
7825
+ var __maybeInc6 = (inc) => {
7803
7826
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
7804
7827
  };
7805
7828
  var __typography2 = {
@@ -8023,12 +8046,12 @@ function RowImpl(props) {
8023
8046
  },
8024
8047
  ...maybeSticky === "left" ? {
8025
8048
  left: ["left_var", {
8026
- "--left": maybeCssVar13(__maybeInc5(columnIndex === 0 ? `var(${beamSideNavLayoutWidthVar}, 0px)` : `calc(var(${beamSideNavLayoutWidthVar}, 0px) + (${columnSizes.slice(0, columnIndex).join(" + ")}))`))
8049
+ "--left": maybeCssVar13(__maybeInc6(columnIndex === 0 ? `var(${beamSideNavLayoutWidthVar}, 0px)` : `calc(var(${beamSideNavLayoutWidthVar}, 0px) + (${columnSizes.slice(0, columnIndex).join(" + ")}))`))
8027
8050
  }]
8028
8051
  } : {},
8029
8052
  ...maybeSticky === "right" ? {
8030
8053
  right: ["right_var", {
8031
- "--right": maybeCssVar13(__maybeInc5(columnIndex + 1 === columnSizes.length ? 0 : `calc(${columnSizes.slice(columnIndex + 1 - columnSizes.length).join(" + ")})`))
8054
+ "--right": maybeCssVar13(__maybeInc6(columnIndex + 1 === columnSizes.length ? 0 : `calc(${columnSizes.slice(columnIndex + 1 - columnSizes.length).join(" + ")})`))
8032
8055
  }]
8033
8056
  } : {}
8034
8057
  } : {};
@@ -8118,7 +8141,7 @@ function RowImpl(props) {
8118
8141
  // If we have a 'levelIndent' defined, then subtract that amount from the first content column's width to ensure all columns will still line up properly.
8119
8142
  ...{
8120
8143
  width: ["w_var", {
8121
- "--width": maybeCssVar13(__maybeInc5(`calc(${columnSizes.slice(columnIndex, columnIndex + currentColspan).join(" + ")}${applyFirstContentColumnStyles && levelIndent ? ` - ${levelIndent}px` : ""})`))
8144
+ "--width": maybeCssVar13(__maybeInc6(`calc(${columnSizes.slice(columnIndex, columnIndex + currentColspan).join(" + ")}${applyFirstContentColumnStyles && levelIndent ? ` - ${levelIndent}px` : ""})`))
8122
8145
  }]
8123
8146
  }
8124
8147
  };
@@ -8215,7 +8238,7 @@ function getFieldWidth(fullWidth) {
8215
8238
  // src/inputs/TextFieldBase.tsx
8216
8239
  import { trussProps as trussProps20, mergeProps as mergeProps_13, maybeCssVar as maybeCssVar14 } from "@homebound/truss/runtime";
8217
8240
  import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
8218
- var __maybeInc6 = (inc) => {
8241
+ var __maybeInc7 = (inc) => {
8219
8242
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
8220
8243
  };
8221
8244
  var __typography3 = {
@@ -8389,7 +8412,7 @@ function TextFieldBase(props) {
8389
8412
  } : {},
8390
8413
  ...labelStyle === "left" ? {
8391
8414
  width: ["w_var", {
8392
- "--width": maybeCssVar14(__maybeInc6(labelLeftFieldWidth))
8415
+ "--width": maybeCssVar14(__maybeInc7(labelLeftFieldWidth))
8393
8416
  }]
8394
8417
  } : {}
8395
8418
  },
@@ -8465,7 +8488,7 @@ function TextFieldBase(props) {
8465
8488
  } : {},
8466
8489
  ...labelStyle === "left" ? {
8467
8490
  width: ["w_var", {
8468
- "--width": maybeCssVar14(__maybeInc6(labelLeftFieldWidth))
8491
+ "--width": maybeCssVar14(__maybeInc7(labelLeftFieldWidth))
8469
8492
  }]
8470
8493
  } : {}
8471
8494
  },
@@ -13580,7 +13603,7 @@ import { useRef as useRef32 } from "react";
13580
13603
  import { useFocusRing as useFocusRing7, useHover as useHover13, useSwitch, VisuallyHidden as VisuallyHidden5 } from "react-aria";
13581
13604
  import { trussProps as trussProps46, maybeCssVar as maybeCssVar27 } from "@homebound/truss/runtime";
13582
13605
  import { jsx as jsx74, jsxs as jsxs45 } from "react/jsx-runtime";
13583
- var __maybeInc7 = (inc) => {
13606
+ var __maybeInc8 = (inc) => {
13584
13607
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
13585
13608
  };
13586
13609
  function Switch(props) {
@@ -13674,7 +13697,7 @@ function Switch(props) {
13674
13697
  /* @__PURE__ */ jsx74("div", { ...trussProps46({
13675
13698
  ...labelStyle === "left" ? {
13676
13699
  width: ["w_var", {
13677
- "--width": maybeCssVar27(__maybeInc7(labelLeftFieldWidth))
13700
+ "--width": maybeCssVar27(__maybeInc8(labelLeftFieldWidth))
13678
13701
  }]
13679
13702
  } : {}
13680
13703
  }), children: /* @__PURE__ */ jsx74("div", { "aria-hidden": "true", ...trussProps46({
@@ -13755,7 +13778,7 @@ function switchCircleDefaultStyles(isCompact) {
13755
13778
  function switchCircleSelectedStyles(isCompact) {
13756
13779
  return {
13757
13780
  left: ["left_var", {
13758
- "--left": maybeCssVar27(__maybeInc7(`calc(100% - ${circleDiameter(isCompact)}px - 2px)`))
13781
+ "--left": maybeCssVar27(__maybeInc8(`calc(100% - ${circleDiameter(isCompact)}px - 2px)`))
13759
13782
  }]
13760
13783
  };
13761
13784
  }
@@ -14008,7 +14031,7 @@ import { useCheckboxGroup as useCheckboxGroup2, useCheckboxGroupItem as useCheck
14008
14031
  import { useCheckboxGroupState as useCheckboxGroupState2 } from "react-stately";
14009
14032
  import { trussProps as trussProps48, maybeCssVar as maybeCssVar28 } from "@homebound/truss/runtime";
14010
14033
  import { jsx as jsx78, jsxs as jsxs47 } from "react/jsx-runtime";
14011
- var __maybeInc8 = (inc) => {
14034
+ var __maybeInc9 = (inc) => {
14012
14035
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
14013
14036
  };
14014
14037
  function ToggleChipGroup(props) {
@@ -14056,7 +14079,7 @@ function ToggleChipGroup(props) {
14056
14079
  flexWrap: "flexWrap_wrap",
14057
14080
  ...labelStyle === "left" ? {
14058
14081
  width: ["w_var", {
14059
- "--width": maybeCssVar28(__maybeInc8(labelLeftFieldWidth))
14082
+ "--width": maybeCssVar28(__maybeInc9(labelLeftFieldWidth))
14060
14083
  }]
14061
14084
  } : {}
14062
14085
  }), children: options.map((o) => /* @__PURE__ */ jsx78(ToggleChip2, { value: o.value, groupState: state, selected: state.value.includes(o.value), label: o.label, disabled: o.disabled, readonly: o.readonly, startAdornment: o.startAdornment, xss, ...tid[o.value] }, o.value)) })
@@ -14249,16 +14272,60 @@ function nonKindDefaults() {
14249
14272
  function parseWidthToPx(widthStr, tableWidth) {
14250
14273
  if (!widthStr) return null;
14251
14274
  if (widthStr.endsWith("px")) {
14252
- const parsed = parseInt(widthStr.replace("px", ""), 10);
14275
+ const parsed = parseFloat(widthStr.replace("px", ""));
14253
14276
  return isNaN(parsed) ? null : parsed;
14254
14277
  }
14255
- if (widthStr.endsWith("%") && tableWidth) {
14278
+ if (widthStr.endsWith("%") && tableWidth !== void 0) {
14256
14279
  const percent = parseFloat(widthStr.replace("%", ""));
14257
14280
  if (isNaN(percent)) return null;
14258
14281
  return Math.round(percent / 100 * tableWidth);
14259
14282
  }
14260
14283
  return null;
14261
14284
  }
14285
+ function sumColumnSizesPx(columnSizes, tableWidth) {
14286
+ if (tableWidth === void 0) return null;
14287
+ let sum = 0;
14288
+ for (const size of columnSizes) {
14289
+ const px2 = parseWidthToPx(size, tableWidth);
14290
+ if (px2 === null) return null;
14291
+ sum += px2;
14292
+ }
14293
+ return sum;
14294
+ }
14295
+ function sumColumnSizeParts(columnSizes) {
14296
+ let pxSum = 0;
14297
+ let percentSum = 0;
14298
+ let hasCalc = false;
14299
+ for (const size of columnSizes) {
14300
+ if (size.endsWith("px")) {
14301
+ pxSum += parseFloat(size.replace("px", ""));
14302
+ } else if (size.endsWith("%")) {
14303
+ percentSum += parseFloat(size.replace("%", ""));
14304
+ } else {
14305
+ hasCalc = true;
14306
+ }
14307
+ }
14308
+ return {
14309
+ pxSum,
14310
+ percentSum,
14311
+ hasCalc
14312
+ };
14313
+ }
14314
+ function resolveTableContentWidth(tableWidth, columnSizes, minWidthPx = 0) {
14315
+ if (tableWidth === void 0) return void 0;
14316
+ const {
14317
+ pxSum,
14318
+ percentSum,
14319
+ hasCalc
14320
+ } = sumColumnSizeParts(columnSizes);
14321
+ if (!hasCalc && percentSum > 0 && percentSum < 100) {
14322
+ const selfConsistent = pxSum / (1 - percentSum / 100);
14323
+ return Math.max(tableWidth, minWidthPx, Math.ceil(selfConsistent));
14324
+ }
14325
+ const sum = sumColumnSizesPx(columnSizes, tableWidth);
14326
+ if (sum === null) return void 0;
14327
+ return Math.max(tableWidth, sum, minWidthPx);
14328
+ }
14262
14329
  function calcColumnSizes(columns, tableWidth, tableMinWidthPx = 0, expandedColumnIds, resizedWidths) {
14263
14330
  const {
14264
14331
  claimedPercentages,
@@ -14357,6 +14424,29 @@ function calcColumnSizes(columns, tableWidth, tableMinWidthPx = 0, expandedColum
14357
14424
  });
14358
14425
  return sizes2;
14359
14426
  }
14427
+ function calcColumnLayout(columns, probeWidth, tableMinWidthPx = 0, expandedColumnIds, resizedWidths, inDocumentScrollLayout) {
14428
+ if (probeWidth === void 0) {
14429
+ return {
14430
+ columnSizes: calcColumnSizes(columns, void 0, tableMinWidthPx, expandedColumnIds, resizedWidths),
14431
+ contentWidth: void 0
14432
+ };
14433
+ }
14434
+ if (!inDocumentScrollLayout) {
14435
+ return {
14436
+ columnSizes: calcColumnSizes(columns, probeWidth, tableMinWidthPx, expandedColumnIds, resizedWidths),
14437
+ contentWidth: probeWidth
14438
+ };
14439
+ }
14440
+ let columnSizes = calcColumnSizes(columns, probeWidth, tableMinWidthPx, expandedColumnIds, resizedWidths);
14441
+ const contentWidth = resolveTableContentWidth(probeWidth, columnSizes, tableMinWidthPx) ?? probeWidth;
14442
+ if (contentWidth > probeWidth + 1) {
14443
+ columnSizes = calcColumnSizes(columns, contentWidth, tableMinWidthPx, expandedColumnIds, resizedWidths);
14444
+ }
14445
+ return {
14446
+ columnSizes,
14447
+ contentWidth
14448
+ };
14449
+ }
14360
14450
  function assignDefaultColumnIds(columns) {
14361
14451
  return columns.map((c, idx) => {
14362
14452
  const {
@@ -15321,22 +15411,32 @@ function useColumnResizing(storageKey) {
15321
15411
 
15322
15412
  // src/components/Table/hooks/useSetupColumnSizes.ts
15323
15413
  import { useDebouncedCallback as useDebouncedCallback4 } from "use-debounce";
15324
- function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visibleColumnsStorageKey, disableColumnResizing) {
15414
+ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visibleColumnsStorageKey, disableColumnResizing, inDocumentScrollLayout) {
15325
15415
  const { resizedWidths, setResizedWidth, setResizedWidths, resetColumnWidths } = useColumnResizing(
15326
15416
  disableColumnResizing ? void 0 : visibleColumnsStorageKey
15327
15417
  );
15328
15418
  const calculateImmediately = useRef38(true);
15329
15419
  const [tableWidth, setTableWidth] = useState29();
15330
- const prevTableWidthRef = useRef38(tableWidth);
15420
+ const [contentWidth, setContentWidth] = useState29();
15331
15421
  const [columnSizes, setColumnSizes] = useState29(
15332
- calcColumnSizes(columns, tableWidth, style.minWidthPx, expandedColumnIds, resizedWidths)
15422
+ () => calcColumnLayout(columns, void 0, style.minWidthPx, expandedColumnIds, resizedWidths, inDocumentScrollLayout).columnSizes
15333
15423
  );
15334
- const setTableAndColumnWidths = useCallback15(
15335
- (width2) => {
15336
- setTableWidth(width2);
15337
- setColumnSizes(calcColumnSizes(columns, width2, style.minWidthPx, expandedColumnIds, resizedWidths));
15424
+ const prevTableWidthRef = useRef38(tableWidth);
15425
+ const applyColumnLayout = useCallback15(
15426
+ (probeWidth) => {
15427
+ const layout = calcColumnLayout(
15428
+ columns,
15429
+ probeWidth,
15430
+ style.minWidthPx,
15431
+ expandedColumnIds,
15432
+ resizedWidths,
15433
+ inDocumentScrollLayout
15434
+ );
15435
+ setTableWidth(probeWidth);
15436
+ setContentWidth(layout.contentWidth);
15437
+ setColumnSizes(layout.columnSizes);
15338
15438
  },
15339
- [setTableWidth, setColumnSizes, columns, style, expandedColumnIds, resizedWidths]
15439
+ [columns, style.minWidthPx, expandedColumnIds, resizedWidths, inDocumentScrollLayout]
15340
15440
  );
15341
15441
  useEffect18(() => {
15342
15442
  if (!prevTableWidthRef.current) {
@@ -15365,32 +15465,40 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
15365
15465
  () => {
15366
15466
  if (!calculateImmediately.current) {
15367
15467
  const width2 = resizeRef.current?.clientWidth;
15368
- width2 && setTableAndColumnWidths(width2);
15468
+ width2 && applyColumnLayout(width2);
15369
15469
  }
15370
15470
  },
15371
15471
  // TODO: validate this eslint-disable. It was automatically ignored as part of https://app.shortcut.com/homebound-team/story/40033/enable-react-hooks-exhaustive-deps-for-react-projects
15372
15472
  // eslint-disable-next-line react-hooks/exhaustive-deps
15373
- [columns, resizedWidths, setTableAndColumnWidths]
15473
+ [columns, resizedWidths, applyColumnLayout]
15374
15474
  );
15375
- const setTableAndColumnWidthsDebounced = useDebouncedCallback4(setTableAndColumnWidths, 100);
15475
+ const applyColumnLayoutDebounced = useDebouncedCallback4(applyColumnLayout, 100);
15376
15476
  const onResize = useCallback15(
15377
15477
  () => {
15378
15478
  const target = resizeRef.current;
15379
15479
  if (target && target.clientWidth !== tableWidth) {
15380
15480
  if (calculateImmediately.current) {
15381
15481
  calculateImmediately.current = false;
15382
- setTableAndColumnWidths(target.clientWidth);
15482
+ applyColumnLayout(target.clientWidth);
15383
15483
  } else {
15384
- setTableAndColumnWidthsDebounced(target.clientWidth);
15484
+ applyColumnLayoutDebounced(target.clientWidth);
15385
15485
  }
15386
15486
  }
15387
15487
  },
15388
15488
  // TODO: validate this eslint-disable. It was automatically ignored as part of https://app.shortcut.com/homebound-team/story/40033/enable-react-hooks-exhaustive-deps-for-react-projects
15389
15489
  // eslint-disable-next-line react-hooks/exhaustive-deps
15390
- [tableWidth, setTableAndColumnWidths, setTableAndColumnWidthsDebounced]
15490
+ [tableWidth, applyColumnLayout, applyColumnLayoutDebounced]
15391
15491
  );
15392
15492
  useResizeObserver({ ref: resizeRef, onResize });
15393
- return { columnSizes, tableWidth, resizedWidths, setResizedWidth, setResizedWidths, resetColumnWidths };
15493
+ return {
15494
+ columnSizes,
15495
+ tableWidth,
15496
+ contentWidth,
15497
+ resizedWidths,
15498
+ setResizedWidth,
15499
+ setResizedWidths,
15500
+ resetColumnWidths
15501
+ };
15394
15502
  }
15395
15503
 
15396
15504
  // src/hooks/useRenderCount.ts
@@ -15464,7 +15572,7 @@ function DocumentScrollLayoutViewportRoot({
15464
15572
  // src/components/Table/GridTable.tsx
15465
15573
  import { trussProps as trussProps49, mergeProps as mergeProps19, maybeCssVar as maybeCssVar29 } from "@homebound/truss/runtime";
15466
15574
  import { jsx as jsx82, jsxs as jsxs48 } from "react/jsx-runtime";
15467
- var __maybeInc9 = (inc) => {
15575
+ var __maybeInc10 = (inc) => {
15468
15576
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
15469
15577
  };
15470
15578
  var runningInJest = false;
@@ -15539,6 +15647,7 @@ function GridTable(props) {
15539
15647
  const {
15540
15648
  tableState
15541
15649
  } = api;
15650
+ const inDocumentScrollLayout = useDocumentScrollLayout();
15542
15651
  tableState.onRowSelect = onRowSelect;
15543
15652
  useEffect19(() => {
15544
15653
  runInAction(() => {
@@ -15561,11 +15670,12 @@ function GridTable(props) {
15561
15670
  const {
15562
15671
  columnSizes,
15563
15672
  tableWidth,
15673
+ contentWidth,
15564
15674
  resizedWidths,
15565
15675
  setResizedWidth,
15566
15676
  setResizedWidths,
15567
15677
  resetColumnWidths
15568
- } = useSetupColumnSizes(style, columns, resizeTarget ?? resizeRef, expandedColumnIds, visibleColumnsStorageKey, disableColumnResizing);
15678
+ } = useSetupColumnSizes(style, columns, resizeTarget ?? resizeRef, expandedColumnIds, visibleColumnsStorageKey, disableColumnResizing, inDocumentScrollLayout);
15569
15679
  useEffect19(() => {
15570
15680
  api.resetColumnWidthsFn = !disableColumnResizing ? resetColumnWidths : void 0;
15571
15681
  }, [api, resetColumnWidths, disableColumnResizing]);
@@ -15736,9 +15846,18 @@ function GridTable(props) {
15736
15846
  tableState,
15737
15847
  tableContainerRef
15738
15848
  }), [tableState, tableContainerRef]);
15849
+ const tableStyle = useMemo24(() => {
15850
+ if (!inDocumentScrollLayout || contentWidth === void 0 || tableWidth === void 0) return style;
15851
+ const minWidthPx = Math.max(style.minWidthPx ?? 0, contentWidth);
15852
+ if (minWidthPx === style.minWidthPx) return style;
15853
+ return {
15854
+ ...style,
15855
+ minWidthPx
15856
+ };
15857
+ }, [contentWidth, inDocumentScrollLayout, style, tableWidth]);
15739
15858
  return /* @__PURE__ */ jsx82(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs48(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
15740
- /* @__PURE__ */ jsx82("div", { ref: resizeRef, ...trussProps49(getTableRefWidthStyles(as === "virtual")) }),
15741
- renders[_as](style, id, columns, visibleDataRows, keptSelectedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, tableContainerRef, persistScrollPosition)
15859
+ /* @__PURE__ */ jsx82("div", { ref: resizeRef, ...trussProps49(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)) }),
15860
+ renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, tableContainerRef, persistScrollPosition)
15742
15861
  ] }) });
15743
15862
  }
15744
15863
  var renders = {
@@ -15766,8 +15885,9 @@ function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, firstR
15766
15885
  /* @__PURE__ */ jsx82("div", { ...trussProps49({
15767
15886
  ...stickyHeader ? {
15768
15887
  position: "sticky",
15888
+ transition: "transitionTop",
15769
15889
  top: ["top_var", {
15770
- "--top": maybeCssVar29(__maybeInc9(stickyNavAndHeaderOffset(stickyOffset)))
15890
+ "--top": maybeCssVar29(__maybeInc10(stickyTableHeaderOffset(stickyOffset)))
15771
15891
  }],
15772
15892
  zIndex: ["z_var", {
15773
15893
  "--zIndex": maybeCssVar29(zIndices.tableStickyHeader)
@@ -15806,8 +15926,9 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
15806
15926
  /* @__PURE__ */ jsx82("thead", { ...trussProps49({
15807
15927
  ...stickyHeader ? {
15808
15928
  position: "sticky",
15929
+ transition: "transitionTop",
15809
15930
  top: ["top_var", {
15810
- "--top": maybeCssVar29(__maybeInc9(stickyNavAndHeaderOffset(stickyOffset)))
15931
+ "--top": maybeCssVar29(__maybeInc10(stickyTableHeaderOffset(stickyOffset)))
15811
15932
  }],
15812
15933
  zIndex: ["z_var", {
15813
15934
  "--zIndex": maybeCssVar29(zIndices.tableStickyHeader)
@@ -15858,11 +15979,16 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
15858
15979
  components: {
15859
15980
  // zIndex keeps the pinned head above sticky columns; `top` matches the offsets used by
15860
15981
  // the div/table render paths so virtualized tables pin below the global nav + page header.
15861
- TopItemList: React13.forwardRef((props, ref) => /* @__PURE__ */ jsx82("div", { ...props, ref, style: {
15982
+ TopItemList: React13.forwardRef((props, ref) => /* @__PURE__ */ jsx82("div", { ...props, ref, ...mergeProps19(void 0, {
15862
15983
  ...props.style,
15984
+ ...style.minWidthPx !== void 0 ? {
15985
+ minWidth: style.minWidthPx
15986
+ } : {},
15863
15987
  zIndex: zIndices.tableStickyHeader,
15864
- top: stickyNavAndHeaderOffset(stickyOffset)
15865
- } })),
15988
+ top: stickyTableHeaderOffset(stickyOffset)
15989
+ }, {
15990
+ transition: "transitionTop"
15991
+ }) })),
15866
15992
  List: VirtualRoot(style, columns, id, xss),
15867
15993
  Footer: () => {
15868
15994
  return /* @__PURE__ */ jsx82("div", { ...trussProps49({
@@ -15889,7 +16015,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
15889
16015
  return (
15890
16016
  // Ensure the fallback message is the same width as the table
15891
16017
  /* @__PURE__ */ jsx82("div", { ...trussProps49({
15892
- ...getTableRefWidthStyles(true),
16018
+ ...getTableRefWidthStyles(true, inDocumentScrollLayout),
15893
16019
  ...keptSelectedRows.length === 0 && style.firstBodyRowCss,
15894
16020
  ...visibleDataRows.length === 0 && style.lastRowCss
15895
16021
  }), children: /* @__PURE__ */ jsx82("div", { ...trussProps49({
@@ -16048,7 +16174,7 @@ import { useCallback as useCallback18, useEffect as useEffect20, useMemo as useM
16048
16174
  import { useFocusRing as useFocusRing10 } from "react-aria";
16049
16175
  import { trussProps as trussProps52, maybeCssVar as maybeCssVar30 } from "@homebound/truss/runtime";
16050
16176
  import { jsx as jsx85, jsxs as jsxs50 } from "react/jsx-runtime";
16051
- var __maybeInc10 = (inc) => {
16177
+ var __maybeInc11 = (inc) => {
16052
16178
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
16053
16179
  };
16054
16180
  function Accordion(props) {
@@ -16195,7 +16321,7 @@ function Accordion(props) {
16195
16321
  /* @__PURE__ */ jsx85("div", { ...tid.details, id, "aria-hidden": !expanded, ...trussProps52({
16196
16322
  overflow: "oh",
16197
16323
  height: ["h_var", {
16198
- "--height": maybeCssVar30(__maybeInc10(contentHeight))
16324
+ "--height": maybeCssVar30(__maybeInc11(contentHeight))
16199
16325
  }],
16200
16326
  transition: "transition_height_250ms_ease_in_out"
16201
16327
  }), children: expanded && /* @__PURE__ */ jsx85("div", { ...trussProps52({
@@ -16378,7 +16504,7 @@ var variantStyles2 = {
16378
16504
  };
16379
16505
 
16380
16506
  // src/components/BeamContext.tsx
16381
- import { createContext as createContext9, useContext as useContext19, useMemo as useMemo40, useReducer, useRef as useRef48 } from "react";
16507
+ import { createContext as createContext9, useContext as useContext19, useMemo as useMemo40, useReducer, useRef as useRef49 } from "react";
16382
16508
  import { OverlayProvider } from "react-aria";
16383
16509
 
16384
16510
  // src/components/Modal/Modal.tsx
@@ -17779,7 +17905,7 @@ function BoundTreeSelectField(props) {
17779
17905
  import { Children, cloneElement } from "react";
17780
17906
  import { trussProps as trussProps59, maybeCssVar as maybeCssVar34 } from "@homebound/truss/runtime";
17781
17907
  import { jsx as jsx115 } from "react/jsx-runtime";
17782
- var __maybeInc11 = (inc) => {
17908
+ var __maybeInc12 = (inc) => {
17783
17909
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
17784
17910
  };
17785
17911
  function FormLines(props) {
@@ -17817,13 +17943,13 @@ function FormLines(props) {
17817
17943
  display: "df",
17818
17944
  flexDirection: "fdc",
17819
17945
  gap: ["gap_var", {
17820
- "--gap": maybeCssVar34(__maybeInc11(gap))
17946
+ "--gap": maybeCssVar34(__maybeInc12(gap))
17821
17947
  }],
17822
17948
  paddingBottom: ["pb_var", {
17823
- "--paddingBottom": maybeCssVar34(__maybeInc11(gap))
17949
+ "--paddingBottom": maybeCssVar34(__maybeInc12(gap))
17824
17950
  }],
17825
17951
  width: ["w_var", {
17826
- "--width": maybeCssVar34(__maybeInc11(sizes[width2]))
17952
+ "--width": maybeCssVar34(__maybeInc12(sizes[width2]))
17827
17953
  }]
17828
17954
  }), children: Children.map(children, (child) => {
17829
17955
  if (child && typeof child === "object" && "type" in child && child.type.isFormHeading) {
@@ -18703,7 +18829,7 @@ function useActiveSection(sectionsWithRefs) {
18703
18829
  // src/components/Layout/FullBleed.tsx
18704
18830
  import { mergeProps as mergeProps22, maybeCssVar as maybeCssVar38 } from "@homebound/truss/runtime";
18705
18831
  import { cloneElement as cloneElement3 } from "react";
18706
- var __maybeInc12 = (inc) => {
18832
+ var __maybeInc13 = (inc) => {
18707
18833
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
18708
18834
  };
18709
18835
  function FullBleed({
@@ -18734,17 +18860,17 @@ function FullBleed({
18734
18860
  // inverts that padding with negative margins before re-applying it to the child.
18735
18861
  {
18736
18862
  marginLeft: ["ml_var", {
18737
- "--marginLeft": maybeCssVar38(__maybeInc12(invertSpacing(paddingLeft)))
18863
+ "--marginLeft": maybeCssVar38(__maybeInc13(invertSpacing(paddingLeft)))
18738
18864
  }],
18739
18865
  marginRight: ["mr_var", {
18740
- "--marginRight": maybeCssVar38(__maybeInc12(invertSpacing(paddingRight)))
18866
+ "--marginRight": maybeCssVar38(__maybeInc13(invertSpacing(paddingRight)))
18741
18867
  }],
18742
18868
  ...!omitPadding ? {
18743
18869
  paddingLeft: ["pl_var", {
18744
- "--paddingLeft": maybeCssVar38(__maybeInc12(paddingLeft))
18870
+ "--paddingLeft": maybeCssVar38(__maybeInc13(paddingLeft))
18745
18871
  }],
18746
18872
  paddingRight: ["pr_var", {
18747
- "--paddingRight": maybeCssVar38(__maybeInc12(paddingRight))
18873
+ "--paddingRight": maybeCssVar38(__maybeInc13(paddingRight))
18748
18874
  }]
18749
18875
  } : {}
18750
18876
  }
@@ -18758,7 +18884,8 @@ function invertSpacing(value) {
18758
18884
  }
18759
18885
 
18760
18886
  // src/components/Layout/GridTableLayout/GridTableLayout.tsx
18761
- import React17, { useEffect as useEffect28, useMemo as useMemo38, useState as useState44 } from "react";
18887
+ import { useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
18888
+ import React17, { useCallback as useCallback26, useEffect as useEffect28, useLayoutEffect as useLayoutEffect4, useMemo as useMemo38, useRef as useRef48, useState as useState45 } from "react";
18762
18889
 
18763
18890
  // src/components/ButtonMenu.tsx
18764
18891
  import { useRef as useRef46 } from "react";
@@ -19785,9 +19912,45 @@ function LoadingTable(props) {
19785
19912
  ] });
19786
19913
  }
19787
19914
 
19915
+ // src/components/Layout/GridTableLayout/usePersistedTableView.ts
19916
+ import { useCallback as useCallback25, useState as useState44 } from "react";
19917
+ function usePersistedTableView(defaultView, persist) {
19918
+ const storageKey = persist ? getGridTableViewStorageKey(window.location.pathname) : void 0;
19919
+ const [view, setView] = useState44(() => {
19920
+ if (!storageKey) return defaultView;
19921
+ try {
19922
+ return parseStoredTableView(localStorage.getItem(storageKey)) ?? defaultView;
19923
+ } catch {
19924
+ return defaultView;
19925
+ }
19926
+ });
19927
+ const setViewAndPersist = useCallback25(
19928
+ (next) => {
19929
+ setView(next);
19930
+ if (storageKey) {
19931
+ try {
19932
+ localStorage.setItem(storageKey, next);
19933
+ } catch {
19934
+ }
19935
+ }
19936
+ },
19937
+ [storageKey]
19938
+ );
19939
+ return [view, setViewAndPersist];
19940
+ }
19941
+ function getGridTableViewStorageKey(pathname) {
19942
+ return `beam.gridTableLayout.view.${pathname}`;
19943
+ }
19944
+ function parseStoredTableView(raw) {
19945
+ return raw === "list" || raw === "card" ? raw : void 0;
19946
+ }
19947
+
19788
19948
  // src/components/Layout/GridTableLayout/GridTableLayout.tsx
19789
- import { trussProps as trussProps72 } from "@homebound/truss/runtime";
19949
+ import { trussProps as trussProps72, maybeCssVar as maybeCssVar41 } from "@homebound/truss/runtime";
19790
19950
  import { Fragment as Fragment36, jsx as jsx148, jsxs as jsxs75 } from "react/jsx-runtime";
19951
+ var __maybeInc14 = (inc) => {
19952
+ return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
19953
+ };
19791
19954
  function GridTableLayoutComponent(props) {
19792
19955
  const {
19793
19956
  pageTitle,
@@ -19811,10 +19974,14 @@ function GridTableLayoutComponent(props) {
19811
19974
  return columns.some((c) => c.canHide);
19812
19975
  }, [columns, hideEditColumns]);
19813
19976
  const api = useMemo38(() => tableProps.api ?? new GridTableApiImpl(), [tableProps.api]);
19814
- const [view, setView] = useState44(defaultView);
19977
+ const [view, setView] = usePersistedTableView(defaultView, !!withCardView);
19815
19978
  const clientSearch = layoutState?.search === "client" ? layoutState.searchString : void 0;
19816
- const showTableActions = layoutState?.filterDefs || layoutState?.search || hasHideableColumns || !!withCardView;
19979
+ const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView);
19817
19980
  const isVirtualized = tableProps.as === "virtual";
19981
+ const inDocumentScrollLayout = useDocumentScrollLayout();
19982
+ const tableActionsRef = useRef48(null);
19983
+ const tableWrapperRef = useRef48(null);
19984
+ useSetTableActionsHeight(tableWrapperRef, tableActionsRef, inDocumentScrollLayout && showTableActions);
19818
19985
  const visibleColumnIds = useComputed(() => api.getVisibleColumnIds(), [api]);
19819
19986
  useEffect28(() => {
19820
19987
  if (layoutState?.setVisibleColumnIds) {
@@ -19822,27 +19989,58 @@ function GridTableLayoutComponent(props) {
19822
19989
  }
19823
19990
  }, [visibleColumnIds, layoutState]);
19824
19991
  const visibleColumnsStorageKey = layoutState?.persistedColumnsStorageKey;
19992
+ const tableActionsEl = /* @__PURE__ */ jsx148(TableActions, { right: (hasHideableColumns || withCardView) && /* @__PURE__ */ jsxs75("div", { className: "df gap1", children: [
19993
+ hasHideableColumns && /* @__PURE__ */ jsx148(EditColumnsButton, { columns, api, tooltip: "Display columns", trigger: {
19994
+ icon: "kanban",
19995
+ size: "md",
19996
+ label: "",
19997
+ variant: "secondaryBlack"
19998
+ }, ...tid.editColumnsButton }),
19999
+ withCardView && /* @__PURE__ */ jsx148(ViewToggleButton, { view, onChange: setView })
20000
+ ] }), xss: {
20001
+ paddingTop: "pt3",
20002
+ ...inDocumentScrollLayout ? {
20003
+ paddingLeft: "pl3",
20004
+ paddingRight: "pr3"
20005
+ } : {}
20006
+ }, children: layoutState && (layoutState.filterDefs || layoutState.search) && /* @__PURE__ */ jsx148(_FilterDropdownMenu, { filterDefs: layoutState.filterDefs, filter: layoutState.filter, onChange: layoutState.setFilter, groupBy: layoutState.groupBy, searchProps: layoutState.search ? {
20007
+ onSearch: layoutState.setSearchString
20008
+ } : void 0 }) });
20009
+ const tableBody = /* @__PURE__ */ jsxs75(Fragment36, { children: [
20010
+ view === "card" && withCardView ? withCardView : isGridTableProps(tableProps) ? /* @__PURE__ */ jsx148(GridTable, { ...tableProps, api, filter: clientSearch, style: {
20011
+ allWhite: true
20012
+ }, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey }) : /* @__PURE__ */ jsx148(QueryTable, { ...tableProps, api, filter: clientSearch, style: {
20013
+ allWhite: true
20014
+ }, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey }),
20015
+ layoutState && totalCount !== void 0 && /* @__PURE__ */ jsx148(Pagination, { page: [layoutState.page, layoutState._pagination.setPage], totalCount, pageSizes: layoutState._pagination.pageSizes, ...tid.pagination })
20016
+ ] });
20017
+ const tableScrollContent = /* @__PURE__ */ jsxs75(Fragment36, { children: [
20018
+ showTableActions && /* @__PURE__ */ jsx148("div", { ref: tableActionsRef, ...trussProps72({
20019
+ ...inDocumentScrollLayout ? {
20020
+ transition: "transitionTop",
20021
+ position: "sticky",
20022
+ top: ["top_var", {
20023
+ "--top": maybeCssVar41(__maybeInc14(stickyNavAndHeaderOffset()))
20024
+ }],
20025
+ left: ["left_var", {
20026
+ "--left": maybeCssVar41(__maybeInc14(documentScrollChromeLeft()))
20027
+ }],
20028
+ width: ["w_var", {
20029
+ "--width": maybeCssVar41(__maybeInc14(documentScrollChromeWidth()))
20030
+ }],
20031
+ zIndex: ["z_var", {
20032
+ "--zIndex": maybeCssVar41(zIndices.tableActions)
20033
+ }],
20034
+ backgroundColor: ["bgColor_var", {
20035
+ "--backgroundColor": "var(--b-surface)"
20036
+ }]
20037
+ } : {}
20038
+ }), ...tid.stickyContent, children: tableActionsEl }),
20039
+ inDocumentScrollLayout ? tableBody : /* @__PURE__ */ jsx148(ScrollableContent, { virtualized: isVirtualized, children: tableBody })
20040
+ ] });
19825
20041
  return /* @__PURE__ */ jsxs75(Fragment36, { children: [
19826
20042
  pageTitle && /* @__PURE__ */ jsx148(Header2, { pageTitle, breadCrumb, primaryAction, secondaryAction, tertiaryAction, actionMenu }),
19827
- showTableActions && /* @__PURE__ */ jsx148(TableActions, { right: /* @__PURE__ */ jsxs75("div", { className: "df gap1", children: [
19828
- hasHideableColumns && /* @__PURE__ */ jsx148(EditColumnsButton, { columns, api, tooltip: "Display columns", trigger: {
19829
- icon: "kanban",
19830
- size: "md",
19831
- label: "",
19832
- variant: "secondaryBlack"
19833
- }, ...tid.editColumnsButton }),
19834
- withCardView && /* @__PURE__ */ jsx148(ViewToggleButton, { view, onChange: setView })
19835
- ] }), children: layoutState && (layoutState.filterDefs || layoutState.search) && /* @__PURE__ */ jsx148(_FilterDropdownMenu, { filterDefs: layoutState.filterDefs, filter: layoutState.filter, onChange: layoutState.setFilter, groupBy: layoutState.groupBy, searchProps: layoutState.search ? {
19836
- onSearch: layoutState.setSearchString
19837
- } : void 0 }) }),
19838
- /* @__PURE__ */ jsxs75(ScrollableContent, { virtualized: isVirtualized, children: [
19839
- view === "card" && withCardView ? withCardView : isGridTableProps(tableProps) ? /* @__PURE__ */ jsx148(GridTable, { ...tableProps, api, filter: clientSearch, style: {
19840
- allWhite: true
19841
- }, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey }) : /* @__PURE__ */ jsx148(QueryTable, { ...tableProps, api, filter: clientSearch, style: {
19842
- allWhite: true
19843
- }, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey }),
19844
- layoutState && totalCount !== void 0 && /* @__PURE__ */ jsx148(Pagination, { page: [layoutState.page, layoutState._pagination.setPage], totalCount, pageSizes: layoutState._pagination.pageSizes, ...tid.pagination })
19845
- ] })
20043
+ /* @__PURE__ */ jsx148("div", { ref: tableWrapperRef, className: "display_contents", ...tid.tableWrapper, children: tableScrollContent })
19846
20044
  ] });
19847
20045
  }
19848
20046
  var GridTableLayout = React17.memo(GridTableLayoutComponent);
@@ -19871,7 +20069,7 @@ function useGridTableLayoutState({
19871
20069
  const groupBy = useGroupBy(maybeGroupBy ?? {
19872
20070
  none: "none"
19873
20071
  });
19874
- const [searchString, setSearchString] = useState44("");
20072
+ const [searchString, setSearchString] = useState45("");
19875
20073
  const columnsFallback = "unset-columns";
19876
20074
  const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(persistedColumns?.storageKey ?? columnsFallback, void 0);
19877
20075
  const paginationFallbackKey = "unset-pagination";
@@ -19881,7 +20079,7 @@ function useGridTableLayoutState({
19881
20079
  100
19882
20080
  // default page size
19883
20081
  );
19884
- const [page, setPage] = useState44({
20082
+ const [page, setPage] = useState45({
19885
20083
  offset: 0,
19886
20084
  limit: persistedPageSize
19887
20085
  });
@@ -19912,6 +20110,33 @@ function useGridTableLayoutState({
19912
20110
  }
19913
20111
  };
19914
20112
  }
20113
+ function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
20114
+ const syncHeightVar = useCallback26(() => {
20115
+ const tableWrapper = tableWrapperRef.current;
20116
+ if (!tableWrapper) return;
20117
+ if (!enabled) {
20118
+ tableWrapper.style.removeProperty(beamTableActionsHeightVar);
20119
+ return;
20120
+ }
20121
+ const height = tableActionsRef.current ? Math.round(tableActionsRef.current.getBoundingClientRect().height) : 0;
20122
+ if (height > 0) {
20123
+ tableWrapper.style.setProperty(beamTableActionsHeightVar, `${height}px`);
20124
+ } else {
20125
+ tableWrapper.style.removeProperty(beamTableActionsHeightVar);
20126
+ }
20127
+ }, [enabled, tableActionsRef, tableWrapperRef]);
20128
+ useResizeObserver5({
20129
+ ref: tableActionsRef,
20130
+ onResize: enabled ? syncHeightVar : noop
20131
+ });
20132
+ useLayoutEffect4(() => {
20133
+ syncHeightVar();
20134
+ const tableWrapper = tableWrapperRef.current;
20135
+ return () => {
20136
+ tableWrapper?.style.removeProperty(beamTableActionsHeightVar);
20137
+ };
20138
+ }, [tableWrapperRef, syncHeightVar]);
20139
+ }
19915
20140
  function Header2(props) {
19916
20141
  const {
19917
20142
  pageTitle,
@@ -19928,7 +20153,6 @@ function Header2(props) {
19928
20153
  paddingBottom: "pb3",
19929
20154
  paddingRight: "pr3",
19930
20155
  paddingLeft: "pl3",
19931
- marginBottom: "mb3",
19932
20156
  minHeight: "mh_50px",
19933
20157
  backgroundColor: "bgWhite",
19934
20158
  display: "df",
@@ -19965,7 +20189,7 @@ function PreventBrowserScroll({
19965
20189
  }
19966
20190
 
19967
20191
  // src/components/Layout/RightPaneLayout/RightPaneContext.tsx
19968
- import React18, { useCallback as useCallback25, useContext as useContext18, useMemo as useMemo39, useState as useState45 } from "react";
20192
+ import React18, { useCallback as useCallback27, useContext as useContext18, useMemo as useMemo39, useState as useState46 } from "react";
19969
20193
  import { jsx as jsx150 } from "react/jsx-runtime";
19970
20194
  var RightPaneContext = React18.createContext({
19971
20195
  openInPane: () => {
@@ -19978,17 +20202,17 @@ var RightPaneContext = React18.createContext({
19978
20202
  rightPaneContent: null
19979
20203
  });
19980
20204
  function RightPaneProvider({ children }) {
19981
- const [rightPaneContent, setRightPaneContent] = useState45(void 0);
19982
- const [isRightPaneOpen, setIsRightPaneOpen] = useState45(false);
19983
- const openInPane = useCallback25(
20205
+ const [rightPaneContent, setRightPaneContent] = useState46(void 0);
20206
+ const [isRightPaneOpen, setIsRightPaneOpen] = useState46(false);
20207
+ const openInPane = useCallback27(
19984
20208
  (opts) => {
19985
20209
  setRightPaneContent(opts?.content);
19986
20210
  setIsRightPaneOpen(true);
19987
20211
  },
19988
20212
  [setRightPaneContent]
19989
20213
  );
19990
- const closePane = useCallback25(() => setIsRightPaneOpen(false), []);
19991
- const clearPane = useCallback25(() => setRightPaneContent(void 0), [setRightPaneContent]);
20214
+ const closePane = useCallback27(() => setIsRightPaneOpen(false), []);
20215
+ const clearPane = useCallback27(() => setRightPaneContent(void 0), [setRightPaneContent]);
19992
20216
  const context = useMemo39(
19993
20217
  () => ({ openInPane, closePane, clearPane, rightPaneContent, isRightPaneOpen }),
19994
20218
  [openInPane, closePane, rightPaneContent, clearPane, isRightPaneOpen]
@@ -20002,9 +20226,9 @@ function useRightPaneContext() {
20002
20226
  // src/components/Layout/RightPaneLayout/RightPaneLayout.tsx
20003
20227
  import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
20004
20228
  import { useEffect as useEffect29 } from "react";
20005
- import { trussProps as trussProps73, maybeCssVar as maybeCssVar41 } from "@homebound/truss/runtime";
20229
+ import { trussProps as trussProps73, maybeCssVar as maybeCssVar42 } from "@homebound/truss/runtime";
20006
20230
  import { Fragment as Fragment37, jsx as jsx151, jsxs as jsxs76 } from "react/jsx-runtime";
20007
- var __maybeInc13 = (inc) => {
20231
+ var __maybeInc15 = (inc) => {
20008
20232
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
20009
20233
  };
20010
20234
  function RightPaneLayout(props) {
@@ -20025,7 +20249,7 @@ function RightPaneLayout(props) {
20025
20249
  /* @__PURE__ */ jsx151("div", { ...trussProps73({
20026
20250
  ...{
20027
20251
  width: ["w_var", {
20028
- "--width": maybeCssVar41(__maybeInc13(`calc(100% - ${paneWidth + 24}px)`))
20252
+ "--width": maybeCssVar42(__maybeInc15(`calc(100% - ${paneWidth + 24}px)`))
20029
20253
  }],
20030
20254
  transition: "transition_width_2s_linear",
20031
20255
  height: "h100",
@@ -20041,7 +20265,7 @@ function RightPaneLayout(props) {
20041
20265
  ...{
20042
20266
  ...!!defaultPaneContent ? {
20043
20267
  width: ["w_var", {
20044
- "--width": maybeCssVar41(__maybeInc13(`calc(100% - ${paneWidth + 24}px)`))
20268
+ "--width": maybeCssVar42(__maybeInc15(`calc(100% - ${paneWidth + 24}px)`))
20045
20269
  }],
20046
20270
  marginRight: "mr3"
20047
20271
  } : {}
@@ -20075,7 +20299,7 @@ function RightPaneLayout(props) {
20075
20299
  "data-testid": "rightPaneContent",
20076
20300
  ...trussProps73({
20077
20301
  backgroundColor: ["bgColor_var", {
20078
- "--backgroundColor": maybeCssVar41(paneBgColor)
20302
+ "--backgroundColor": maybeCssVar42(paneBgColor)
20079
20303
  }],
20080
20304
  height: "h100",
20081
20305
  width: ["w_var", {
@@ -20132,7 +20356,7 @@ function ScrollableFooter(props) {
20132
20356
 
20133
20357
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
20134
20358
  import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
20135
- import { useEffect as useEffect30, useState as useState46 } from "react";
20359
+ import { useEffect as useEffect30, useState as useState47 } from "react";
20136
20360
 
20137
20361
  // src/components/Layout/TableReviewLayout/SidePanel.tsx
20138
20362
  import { jsx as jsx153, jsxs as jsxs77 } from "react/jsx-runtime";
@@ -20156,7 +20380,7 @@ function SidePanel(props) {
20156
20380
  }
20157
20381
 
20158
20382
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
20159
- import { trussProps as trussProps74, maybeCssVar as maybeCssVar42 } from "@homebound/truss/runtime";
20383
+ import { trussProps as trussProps74, maybeCssVar as maybeCssVar43 } from "@homebound/truss/runtime";
20160
20384
  import { jsx as jsx154, jsxs as jsxs78 } from "react/jsx-runtime";
20161
20385
  var defaultRightPaneWidth = 450;
20162
20386
  function TableReviewLayout(props) {
@@ -20172,7 +20396,7 @@ function TableReviewLayout(props) {
20172
20396
  rightPaneWidth = defaultRightPaneWidth
20173
20397
  } = props;
20174
20398
  const tid = useTestIds(props, "tableReviewLayout");
20175
- const [isPanelVisible, setIsPanelVisible] = useState46(!!panelContent);
20399
+ const [isPanelVisible, setIsPanelVisible] = useState47(!!panelContent);
20176
20400
  useEffect30(() => {
20177
20401
  setIsPanelVisible(!!panelContent);
20178
20402
  }, [panelContent]);
@@ -20205,7 +20429,7 @@ function TableReviewLayout(props) {
20205
20429
  left: "left0",
20206
20430
  right: "right0",
20207
20431
  zIndex: ["z_var", {
20208
- "--zIndex": maybeCssVar42(zIndices.pageOverlay)
20432
+ "--zIndex": maybeCssVar43(zIndices.pageOverlay)
20209
20433
  }],
20210
20434
  backgroundColor: "bgWhite",
20211
20435
  display: "df",
@@ -20283,18 +20507,18 @@ var BeamContext = createContext9({
20283
20507
  });
20284
20508
  function BeamProvider({ children, ...presentationProps }) {
20285
20509
  const [, tick] = useReducer((prev) => prev + 1, 0);
20286
- const modalRef = useRef48();
20510
+ const modalRef = useRef49();
20287
20511
  const modalHeaderDiv = useMemo40(() => document.createElement("div"), []);
20288
20512
  const modalBodyDiv = useMemo40(() => {
20289
20513
  const el = document.createElement("div");
20290
20514
  el.style.height = "100%";
20291
20515
  return el;
20292
20516
  }, []);
20293
- const modalCanCloseChecksRef = useRef48([]);
20517
+ const modalCanCloseChecksRef = useRef49([]);
20294
20518
  const modalFooterDiv = useMemo40(() => document.createElement("div"), []);
20295
- const drawerContentStackRef = useRef48([]);
20296
- const drawerCanCloseChecks = useRef48([]);
20297
- const drawerCanCloseDetailsChecks = useRef48([]);
20519
+ const drawerContentStackRef = useRef49([]);
20520
+ const drawerCanCloseChecks = useRef49([]);
20521
+ const drawerCanCloseDetailsChecks = useRef49([]);
20298
20522
  const sdHeaderDiv = useMemo40(() => document.createElement("div"), []);
20299
20523
  const context = useMemo40(() => {
20300
20524
  return {
@@ -20337,14 +20561,14 @@ function useBeamContext() {
20337
20561
  }
20338
20562
 
20339
20563
  // src/components/ButtonDatePicker.tsx
20340
- import { useRef as useRef49 } from "react";
20564
+ import { useRef as useRef50 } from "react";
20341
20565
  import { useMenuTrigger as useMenuTrigger4 } from "react-aria";
20342
20566
  import { useMenuTriggerState as useMenuTriggerState4 } from "react-stately";
20343
20567
  import { jsx as jsx156 } from "react/jsx-runtime";
20344
20568
  function ButtonDatePicker(props) {
20345
20569
  const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
20346
20570
  const state = useMenuTriggerState4({ isOpen: defaultOpen });
20347
- const buttonRef = useRef49(null);
20571
+ const buttonRef = useRef50(null);
20348
20572
  const {
20349
20573
  menuTriggerProps,
20350
20574
  menuProps: { autoFocus: _af, ...menuProps }
@@ -20367,7 +20591,7 @@ function ButtonDatePicker(props) {
20367
20591
  }
20368
20592
 
20369
20593
  // src/components/ButtonGroup.tsx
20370
- import { useRef as useRef50 } from "react";
20594
+ import { useRef as useRef51 } from "react";
20371
20595
  import { useButton as useButton10, useFocusRing as useFocusRing12, useHover as useHover15 } from "react-aria";
20372
20596
  import { trussProps as trussProps75 } from "@homebound/truss/runtime";
20373
20597
  import { jsx as jsx157, jsxs as jsxs80 } from "react/jsx-runtime";
@@ -20415,7 +20639,7 @@ function GroupButton(props) {
20415
20639
  isDisabled: !!disabled,
20416
20640
  ...otherProps
20417
20641
  };
20418
- const ref = useRef50(null);
20642
+ const ref = useRef51(null);
20419
20643
  const {
20420
20644
  buttonProps,
20421
20645
  isPressed
@@ -20537,8 +20761,8 @@ import { useMemo as useMemo41 } from "react";
20537
20761
  import { useHover as useHover16 } from "react-aria";
20538
20762
 
20539
20763
  // src/components/Tag.tsx
20540
- import { useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
20541
- import { useRef as useRef51, useState as useState47 } from "react";
20764
+ import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
20765
+ import { useRef as useRef52, useState as useState48 } from "react";
20542
20766
  import { trussProps as trussProps76 } from "@homebound/truss/runtime";
20543
20767
  import { jsx as jsx158, jsxs as jsxs81 } from "react/jsx-runtime";
20544
20768
  function Tag(props) {
@@ -20551,9 +20775,9 @@ function Tag(props) {
20551
20775
  } = props;
20552
20776
  const typeStyles2 = getStyles(type);
20553
20777
  const tid = useTestIds(otherProps);
20554
- const [showTooltip, setShowTooltip] = useState47(false);
20555
- const ref = useRef51(null);
20556
- useResizeObserver5({
20778
+ const [showTooltip, setShowTooltip] = useState48(false);
20779
+ const ref = useRef52(null);
20780
+ useResizeObserver6({
20557
20781
  ref,
20558
20782
  onResize: () => {
20559
20783
  if (ref.current) {
@@ -20613,7 +20837,7 @@ function getStyles(type) {
20613
20837
  }
20614
20838
 
20615
20839
  // src/components/Card.tsx
20616
- import { trussProps as trussProps77, maybeCssVar as maybeCssVar43 } from "@homebound/truss/runtime";
20840
+ import { trussProps as trussProps77, maybeCssVar as maybeCssVar44 } from "@homebound/truss/runtime";
20617
20841
  import { jsx as jsx159, jsxs as jsxs82 } from "react/jsx-runtime";
20618
20842
  function Card(props) {
20619
20843
  const {
@@ -20666,7 +20890,7 @@ function Card(props) {
20666
20890
  width: "w100",
20667
20891
  height: "h100",
20668
20892
  objectFit: ["objectFit_var", {
20669
- "--objectFit": maybeCssVar43(imageFit)
20893
+ "--objectFit": maybeCssVar44(imageFit)
20670
20894
  }]
20671
20895
  }), src: imgSrc, alt: title, ...tid.img }) }),
20672
20896
  isHovered && buttonMenuItems && /* @__PURE__ */ jsx159("div", { ...trussProps77({
@@ -20761,7 +20985,7 @@ function Copy(props) {
20761
20985
 
20762
20986
  // src/components/DnDGrid/DnDGrid.tsx
20763
20987
  import equal2 from "fast-deep-equal";
20764
- import { useCallback as useCallback26, useRef as useRef52 } from "react";
20988
+ import { useCallback as useCallback28, useRef as useRef53 } from "react";
20765
20989
 
20766
20990
  // src/components/DnDGrid/DnDGridContext.tsx
20767
20991
  import { createContext as createContext10, useContext as useContext20 } from "react";
@@ -20784,12 +21008,12 @@ function DnDGrid(props) {
20784
21008
  onReorder,
20785
21009
  activeItemStyles
20786
21010
  } = props;
20787
- const gridEl = useRef52(null);
20788
- const dragEl = useRef52();
20789
- const cloneEl = useRef52();
20790
- const initialOrder = useRef52();
20791
- const reorderViaKeyboard = useRef52(false);
20792
- const transformFrom = useRef52({
21011
+ const gridEl = useRef53(null);
21012
+ const dragEl = useRef53();
21013
+ const cloneEl = useRef53();
21014
+ const initialOrder = useRef53();
21015
+ const reorderViaKeyboard = useRef53(false);
21016
+ const transformFrom = useRef53({
20793
21017
  x: 0,
20794
21018
  y: 0
20795
21019
  });
@@ -20797,19 +21021,19 @@ function DnDGrid(props) {
20797
21021
  const activeStyles3 = activeItemStyles ?? {
20798
21022
  boxShadow: "bshModal"
20799
21023
  };
20800
- const getGridItems = useCallback26(() => {
21024
+ const getGridItems = useCallback28(() => {
20801
21025
  return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
20802
21026
  }, []);
20803
- const getGridItemIdOrder = useCallback26(() => {
21027
+ const getGridItemIdOrder = useCallback28(() => {
20804
21028
  return getGridItems().map((child) => child.getAttribute(gridItemIdKey)).filter(isDefined);
20805
21029
  }, [getGridItems]);
20806
- const initReorder = useCallback26(() => {
21030
+ const initReorder = useCallback28(() => {
20807
21031
  if (gridEl.current && dragEl.current) {
20808
21032
  initialOrder.current = getGridItemIdOrder();
20809
21033
  setInlineStyles(dragEl.current, activeStyles3);
20810
21034
  }
20811
21035
  }, [getGridItemIdOrder, activeStyles3]);
20812
- const commitReorder = useCallback26(() => {
21036
+ const commitReorder = useCallback28(() => {
20813
21037
  if (gridEl.current && dragEl.current) {
20814
21038
  const currentOrder = getGridItemIdOrder();
20815
21039
  if (!equal2(currentOrder, initialOrder.current)) onReorder(currentOrder);
@@ -20819,7 +21043,7 @@ function DnDGrid(props) {
20819
21043
  initialOrder.current = currentOrder;
20820
21044
  }
20821
21045
  }, [onReorder, getGridItemIdOrder, activeStyles3]);
20822
- const cancelReorder = useCallback26(() => {
21046
+ const cancelReorder = useCallback28(() => {
20823
21047
  if (gridEl.current && dragEl.current && initialOrder.current) {
20824
21048
  const currentOrder = getGridItemIdOrder();
20825
21049
  if (!equal2(currentOrder, initialOrder.current)) {
@@ -20841,7 +21065,7 @@ function DnDGrid(props) {
20841
21065
  reorderViaKeyboard.current = false;
20842
21066
  }
20843
21067
  }, [getGridItemIdOrder, getGridItems, activeStyles3]);
20844
- const onMove = useCallback26((e) => {
21068
+ const onMove = useCallback28((e) => {
20845
21069
  if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
20846
21070
  const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX;
20847
21071
  const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY;
@@ -20864,7 +21088,7 @@ function DnDGrid(props) {
20864
21088
  }
20865
21089
  }
20866
21090
  }, []);
20867
- const onDragStart = useCallback26((e) => {
21091
+ const onDragStart = useCallback28((e) => {
20868
21092
  if (!reorderViaKeyboard.current && dragEl.current && gridEl.current) {
20869
21093
  initReorder();
20870
21094
  const rect = dragEl.current.getBoundingClientRect();
@@ -20894,7 +21118,7 @@ function DnDGrid(props) {
20894
21118
  gridEl.current.addEventListener("touchmove", onMove);
20895
21119
  }
20896
21120
  }, [initReorder, onMove, activeStyles3]);
20897
- const onDragEnd = useCallback26((e) => {
21121
+ const onDragEnd = useCallback28((e) => {
20898
21122
  if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
20899
21123
  e.preventDefault();
20900
21124
  cloneEl.current.replaceWith(dragEl.current);
@@ -20907,7 +21131,7 @@ function DnDGrid(props) {
20907
21131
  gridEl.current.removeEventListener("touchmove", onMove);
20908
21132
  }
20909
21133
  }, [commitReorder, onMove]);
20910
- const onDragHandleKeyDown = useCallback26((e) => {
21134
+ const onDragHandleKeyDown = useCallback28((e) => {
20911
21135
  const moveHandle = e.target;
20912
21136
  if (dragEl.current instanceof HTMLElement && moveHandle instanceof HTMLElement && gridEl.current) {
20913
21137
  const isSpaceKey = e.key === " ";
@@ -21107,8 +21331,8 @@ function ResponsiveGridItem(props) {
21107
21331
 
21108
21332
  // src/components/Grid/useResponsiveGrid.ts
21109
21333
  import { useMemo as useMemo44 } from "react";
21110
- import { maybeCssVar as maybeCssVar44 } from "@homebound/truss/runtime";
21111
- var __maybeInc14 = (inc) => {
21334
+ import { maybeCssVar as maybeCssVar45 } from "@homebound/truss/runtime";
21335
+ var __maybeInc16 = (inc) => {
21112
21336
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
21113
21337
  };
21114
21338
  function useResponsiveGrid(props) {
@@ -21126,11 +21350,11 @@ function useResponsiveGrid(props) {
21126
21350
  return {
21127
21351
  display: "dg",
21128
21352
  gridTemplateColumns: ["gtc_var", {
21129
- "--gridTemplateColumns": maybeCssVar44(gridTemplateColumns)
21353
+ "--gridTemplateColumns": maybeCssVar45(gridTemplateColumns)
21130
21354
  }],
21131
21355
  containerType: "ctis",
21132
21356
  gap: ["gap_var", {
21133
- "--gap": maybeCssVar44(__maybeInc14(gridGap))
21357
+ "--gap": maybeCssVar45(__maybeInc16(gridGap))
21134
21358
  }]
21135
21359
  };
21136
21360
  }, [minColumnWidth, gap, columns]);
@@ -21253,9 +21477,9 @@ function HbSpinnerProvider({
21253
21477
  }
21254
21478
 
21255
21479
  // src/components/HomeboundLogo.tsx
21256
- import { trussProps as trussProps82, maybeCssVar as maybeCssVar45 } from "@homebound/truss/runtime";
21480
+ import { trussProps as trussProps82, maybeCssVar as maybeCssVar46 } from "@homebound/truss/runtime";
21257
21481
  import { jsx as jsx166 } from "react/jsx-runtime";
21258
- var __maybeInc15 = (inc) => {
21482
+ var __maybeInc17 = (inc) => {
21259
21483
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
21260
21484
  };
21261
21485
  function HomeboundLogo(props) {
@@ -21266,41 +21490,41 @@ function HomeboundLogo(props) {
21266
21490
  } = props;
21267
21491
  return /* @__PURE__ */ jsx166("svg", { viewBox: "0 0 158.1 97.6", xmlns: "http://www.w3.org/2000/svg", ...trussProps82({
21268
21492
  fill: ["fill_var", {
21269
- "--fill": maybeCssVar45(fill)
21493
+ "--fill": maybeCssVar46(fill)
21270
21494
  }],
21271
21495
  width: ["w_var", {
21272
- "--width": maybeCssVar45(__maybeInc15(width2))
21496
+ "--width": maybeCssVar46(__maybeInc17(width2))
21273
21497
  }],
21274
21498
  height: ["h_var", {
21275
- "--height": maybeCssVar45(__maybeInc15(height))
21499
+ "--height": maybeCssVar46(__maybeInc17(height))
21276
21500
  }]
21277
21501
  }), children: /* @__PURE__ */ jsx166("path", { d: "M158.1,97.6H0.2L0,39.7L76.8,0l68,38.7l-3.1,5.3l-65-37L6.2,43.4l0.2,48h151.7V97.6z" }) });
21278
21502
  }
21279
21503
 
21280
21504
  // src/components/MaxLines.tsx
21281
- import { useLayoutEffect as useLayoutEffect4, useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
21282
- import { useCallback as useCallback27, useEffect as useEffect32, useRef as useRef53, useState as useState48 } from "react";
21283
- import { trussProps as trussProps83, maybeCssVar as maybeCssVar46 } from "@homebound/truss/runtime";
21505
+ import { useLayoutEffect as useLayoutEffect5, useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
21506
+ import { useCallback as useCallback29, useEffect as useEffect32, useRef as useRef54, useState as useState49 } from "react";
21507
+ import { trussProps as trussProps83, maybeCssVar as maybeCssVar47 } from "@homebound/truss/runtime";
21284
21508
  import { jsx as jsx167, jsxs as jsxs84 } from "react/jsx-runtime";
21285
21509
  function MaxLines({
21286
21510
  maxLines,
21287
21511
  children
21288
21512
  }) {
21289
- const elRef = useRef53(null);
21290
- const [hasMore, setHasMore] = useState48(false);
21291
- const [expanded, setExpanded] = useState48(false);
21292
- useLayoutEffect4(() => {
21513
+ const elRef = useRef54(null);
21514
+ const [hasMore, setHasMore] = useState49(false);
21515
+ const [expanded, setExpanded] = useState49(false);
21516
+ useLayoutEffect5(() => {
21293
21517
  if (!elRef.current) return;
21294
21518
  setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
21295
21519
  }, []);
21296
21520
  useEffect32(() => {
21297
21521
  setExpanded(false);
21298
21522
  }, [children]);
21299
- const onResize = useCallback27(() => {
21523
+ const onResize = useCallback29(() => {
21300
21524
  if (!elRef.current) return;
21301
21525
  !expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
21302
21526
  }, [expanded]);
21303
- useResizeObserver6({
21527
+ useResizeObserver7({
21304
21528
  ref: elRef,
21305
21529
  onResize
21306
21530
  });
@@ -21308,7 +21532,7 @@ function MaxLines({
21308
21532
  /* @__PURE__ */ jsx167("div", { ref: elRef, ...trussProps83({
21309
21533
  ...!expanded ? {
21310
21534
  WebkitLineClamp: ["lineClamp_var", {
21311
- "--WebkitLineClamp": maybeCssVar46(maxLines)
21535
+ "--WebkitLineClamp": maybeCssVar47(maxLines)
21312
21536
  }],
21313
21537
  overflow: "oh",
21314
21538
  display: "d_negwebkit_box",
@@ -21324,12 +21548,12 @@ function MaxLines({
21324
21548
  import { camelCase as camelCase6 } from "change-case";
21325
21549
 
21326
21550
  // src/components/AppNav/AppNavGroup.tsx
21327
- import { useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
21551
+ import { useResizeObserver as useResizeObserver8 } from "@react-aria/utils";
21328
21552
  import { camelCase as camelCase5, kebabCase } from "change-case";
21329
- import { useCallback as useCallback29, useEffect as useEffect33, useMemo as useMemo48, useState as useState50 } from "react";
21553
+ import { useCallback as useCallback31, useEffect as useEffect33, useMemo as useMemo48, useState as useState51 } from "react";
21330
21554
 
21331
21555
  // src/components/AppNav/AppNavGroupTrigger.tsx
21332
- import { useMemo as useMemo47, useRef as useRef54 } from "react";
21556
+ import { useMemo as useMemo47, useRef as useRef55 } from "react";
21333
21557
  import { mergeProps as mergeProps26, useButton as useButton11, useFocusRing as useFocusRing14, useHover as useHover18 } from "react-aria";
21334
21558
  import { trussProps as trussProps84, mergeProps as mergeProps_14 } from "@homebound/truss/runtime";
21335
21559
  import { jsx as jsx168, jsxs as jsxs85 } from "react/jsx-runtime";
@@ -21341,7 +21565,7 @@ function AppNavGroupTrigger(props) {
21341
21565
  onClick
21342
21566
  } = props;
21343
21567
  const tid = useTestIds(props, "trigger");
21344
- const ref = useRef54(null);
21568
+ const ref = useRef55(null);
21345
21569
  const {
21346
21570
  buttonProps,
21347
21571
  isPressed
@@ -21494,7 +21718,7 @@ function entryHasIcons(item) {
21494
21718
  }
21495
21719
 
21496
21720
  // src/components/AppNav/useAppNavGroupExpanded.ts
21497
- import { useCallback as useCallback28, useState as useState49 } from "react";
21721
+ import { useCallback as useCallback30, useState as useState50 } from "react";
21498
21722
  var APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY = "beam.appNav.expandedLinkGroups";
21499
21723
  function loadStored() {
21500
21724
  try {
@@ -21513,13 +21737,13 @@ function persistLabel(label, expanded) {
21513
21737
  }
21514
21738
  function useAppNavGroupExpanded(linkGroup) {
21515
21739
  const { label } = linkGroup;
21516
- const [userExpanded, setUserExpanded] = useState49(() => {
21740
+ const [userExpanded, setUserExpanded] = useState50(() => {
21517
21741
  const stored = loadStored();
21518
21742
  return label in stored ? stored[label] : null;
21519
21743
  });
21520
21744
  const hasActiveLink = appNavLinkGroupLinks(linkGroup).some((l) => l.active);
21521
21745
  const expanded = userExpanded !== null ? userExpanded : hasActiveLink ? true : linkGroup.defaultExpanded ?? false;
21522
- const onToggle = useCallback28(() => {
21746
+ const onToggle = useCallback30(() => {
21523
21747
  const next = !expanded;
21524
21748
  setUserExpanded(next);
21525
21749
  persistLabel(label, next);
@@ -21528,9 +21752,9 @@ function useAppNavGroupExpanded(linkGroup) {
21528
21752
  }
21529
21753
 
21530
21754
  // src/components/AppNav/AppNavGroup.tsx
21531
- import { trussProps as trussProps85, maybeCssVar as maybeCssVar47 } from "@homebound/truss/runtime";
21755
+ import { trussProps as trussProps85, maybeCssVar as maybeCssVar48 } from "@homebound/truss/runtime";
21532
21756
  import { Fragment as Fragment39, jsx as jsx169, jsxs as jsxs86 } from "react/jsx-runtime";
21533
- var __maybeInc16 = (inc) => {
21757
+ var __maybeInc18 = (inc) => {
21534
21758
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
21535
21759
  };
21536
21760
  function AppNavGroupView(props) {
@@ -21554,20 +21778,20 @@ function AppNavGroupDisclosure(props) {
21554
21778
  } = useAppNavGroupExpanded(linkGroup);
21555
21779
  const tid = useTestIds(props, "linkGroup");
21556
21780
  const navGroupId = `nav-group-${kebabCase(linkGroup.label)}`;
21557
- const [contentEl, setContentEl] = useState50(null);
21781
+ const [contentEl, setContentEl] = useState51(null);
21558
21782
  const contentRef = useMemo48(() => ({
21559
21783
  current: contentEl
21560
21784
  }), [contentEl]);
21561
- const [contentHeight, setContentHeight] = useState50(expanded ? "auto" : "0");
21785
+ const [contentHeight, setContentHeight] = useState51(expanded ? "auto" : "0");
21562
21786
  useEffect33(() => {
21563
21787
  setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
21564
21788
  }, [expanded, contentEl]);
21565
- const onResize = useCallback29(() => {
21789
+ const onResize = useCallback31(() => {
21566
21790
  if (contentEl && expanded) {
21567
21791
  setContentHeight(`${contentEl.scrollHeight}px`);
21568
21792
  }
21569
21793
  }, [expanded, contentEl]);
21570
- useResizeObserver7({
21794
+ useResizeObserver8({
21571
21795
  ref: contentRef,
21572
21796
  onResize
21573
21797
  });
@@ -21577,7 +21801,7 @@ function AppNavGroupDisclosure(props) {
21577
21801
  overflow: "oh",
21578
21802
  transition: "transitionHeight",
21579
21803
  height: ["h_var", {
21580
- "--height": maybeCssVar47(__maybeInc16(contentHeight))
21804
+ "--height": maybeCssVar48(__maybeInc18(contentHeight))
21581
21805
  }]
21582
21806
  }), ...tid.panel, children: /* @__PURE__ */ jsx169("div", { ref: setContentEl, className: "df fdc pl2", children: /* @__PURE__ */ jsx169(AppNavItems, { items: linkGroup.items, panelCollapsed: false, ...tid }) }) })
21583
21807
  ] });
@@ -21703,18 +21927,18 @@ function AppNavItems(props) {
21703
21927
 
21704
21928
  // src/components/Navbar/NavbarMobileMenu.tsx
21705
21929
  import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
21706
- import { useEffect as useEffect34, useState as useState51 } from "react";
21930
+ import { useEffect as useEffect34, useState as useState52 } from "react";
21707
21931
  import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll2 } from "react-aria";
21708
21932
  import { createPortal as createPortal6 } from "react-dom";
21709
21933
  import { useLocation } from "react-router-dom";
21710
- import { trussProps as trussProps87, maybeCssVar as maybeCssVar48 } from "@homebound/truss/runtime";
21934
+ import { trussProps as trussProps87, maybeCssVar as maybeCssVar49 } from "@homebound/truss/runtime";
21711
21935
  import { Fragment as Fragment41, jsx as jsx173, jsxs as jsxs88 } from "react/jsx-runtime";
21712
21936
  function NavbarMobileMenu(props) {
21713
21937
  const {
21714
21938
  items
21715
21939
  } = props;
21716
21940
  const tid = useTestIds(props, "navbar");
21717
- const [isOpen, setIsOpen] = useState51(false);
21941
+ const [isOpen, setIsOpen] = useState52(false);
21718
21942
  const {
21719
21943
  pathname,
21720
21944
  search
@@ -21744,7 +21968,7 @@ function NavbarMobileDrawer({
21744
21968
  bottom: "bottom0",
21745
21969
  left: "left0",
21746
21970
  zIndex: ["z_var", {
21747
- "--zIndex": maybeCssVar48(zIndices.modalUnderlay)
21971
+ "--zIndex": maybeCssVar49(zIndices.modalUnderlay)
21748
21972
  }],
21749
21973
  backgroundColor: "backgroundColor_rgba_36_36_36_0_2"
21750
21974
  }), initial: {
@@ -21768,7 +21992,7 @@ function NavbarMobileDrawer({
21768
21992
  width: "w100",
21769
21993
  overflow: "oh",
21770
21994
  zIndex: ["z_var", {
21771
- "--zIndex": maybeCssVar48(zIndices.sideNav)
21995
+ "--zIndex": maybeCssVar49(zIndices.sideNav)
21772
21996
  }],
21773
21997
  backgroundColor: ["bgColor_var", {
21774
21998
  "--backgroundColor": "var(--b-surface)"
@@ -21882,11 +22106,11 @@ function NavbarUserMenu({
21882
22106
 
21883
22107
  // src/components/Tabs.tsx
21884
22108
  import { camelCase as camelCase7 } from "change-case";
21885
- import { useEffect as useEffect35, useMemo as useMemo49, useRef as useRef55, useState as useState52 } from "react";
22109
+ import { useEffect as useEffect35, useMemo as useMemo49, useRef as useRef56, useState as useState53 } from "react";
21886
22110
  import { mergeProps as mergeProps27, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
21887
22111
  import { matchPath } from "react-router";
21888
22112
  import { Link as Link5, useLocation as useLocation2 } from "react-router-dom";
21889
- import { trussProps as trussProps89, maybeCssVar as maybeCssVar49 } from "@homebound/truss/runtime";
22113
+ import { trussProps as trussProps89, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
21890
22114
  import { Fragment as Fragment42, jsx as jsx175, jsxs as jsxs90 } from "react/jsx-runtime";
21891
22115
  function TabsWithContent(props) {
21892
22116
  const styles = hideTabs(props) ? {} : {
@@ -21943,8 +22167,8 @@ function Tabs(props) {
21943
22167
  focusProps
21944
22168
  } = useFocusRing15();
21945
22169
  const tid = useTestIds(others, "tabs");
21946
- const [active, setActive] = useState52(selected);
21947
- const ref = useRef55(null);
22170
+ const [active, setActive] = useState53(selected);
22171
+ const ref = useRef56(null);
21948
22172
  useEffect35(() => setActive(selected), [selected]);
21949
22173
  function onKeyUp(e) {
21950
22174
  if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
@@ -22062,7 +22286,7 @@ function getTabStyles() {
22062
22286
  const borderBottomStyles = {
22063
22287
  borderBottomStyle: "bbs_solid",
22064
22288
  borderBottomWidth: ["borderBottomWidth_var", {
22065
- "--borderBottomWidth": maybeCssVar49(`${borderBottomWidthPx}px`)
22289
+ "--borderBottomWidth": maybeCssVar50(`${borderBottomWidthPx}px`)
22066
22290
  }],
22067
22291
  paddingBottom: ["pb_var", {
22068
22292
  "--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
@@ -22180,9 +22404,9 @@ function PageHeader2(props) {
22180
22404
  }
22181
22405
 
22182
22406
  // src/components/ScrollShadows.tsx
22183
- import { useResizeObserver as useResizeObserver8 } from "@react-aria/utils";
22184
- import { useCallback as useCallback30, useMemo as useMemo50, useRef as useRef56, useState as useState53 } from "react";
22185
- import { trussProps as trussProps91, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
22407
+ import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
22408
+ import { useCallback as useCallback32, useMemo as useMemo50, useRef as useRef57, useState as useState54 } from "react";
22409
+ import { trussProps as trussProps91, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
22186
22410
  import { jsx as jsx177, jsxs as jsxs92 } from "react/jsx-runtime";
22187
22411
  function ScrollShadows(props) {
22188
22412
  const {
@@ -22199,15 +22423,15 @@ function ScrollShadows(props) {
22199
22423
  if (!bgColor.includes("rgba")) {
22200
22424
  throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
22201
22425
  }
22202
- const [showStartShadow, setShowStartShadow] = useState53(false);
22203
- const [showEndShadow, setShowEndShadow] = useState53(false);
22204
- const scrollRef = useRef56(null);
22426
+ const [showStartShadow, setShowStartShadow] = useState54(false);
22427
+ const [showEndShadow, setShowEndShadow] = useState54(false);
22428
+ const scrollRef = useRef57(null);
22205
22429
  const [startShadowStyles, endShadowStyles] = useMemo50(() => {
22206
22430
  const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
22207
22431
  const commonStyles = {
22208
22432
  position: "absolute",
22209
22433
  zIndex: ["z_var", {
22210
- "--zIndex": maybeCssVar50(zIndices.scrollShadow)
22434
+ "--zIndex": maybeCssVar51(zIndices.scrollShadow)
22211
22435
  }],
22212
22436
  pointerEvents: "pointerEvents_none"
22213
22437
  };
@@ -22240,7 +22464,7 @@ function ScrollShadows(props) {
22240
22464
  ...startShadowStyles2,
22241
22465
  ...{
22242
22466
  background: ["background_var", {
22243
- "--background": maybeCssVar50(startGradient)
22467
+ "--background": maybeCssVar51(startGradient)
22244
22468
  }]
22245
22469
  }
22246
22470
  }, {
@@ -22248,12 +22472,12 @@ function ScrollShadows(props) {
22248
22472
  ...endShadowStyles2,
22249
22473
  ...{
22250
22474
  background: ["background_var", {
22251
- "--background": maybeCssVar50(endGradient)
22475
+ "--background": maybeCssVar51(endGradient)
22252
22476
  }]
22253
22477
  }
22254
22478
  }];
22255
22479
  }, [horizontal, bgColor]);
22256
- const updateScrollProps = useCallback30((el) => {
22480
+ const updateScrollProps = useCallback32((el) => {
22257
22481
  const {
22258
22482
  scrollTop,
22259
22483
  scrollHeight,
@@ -22268,15 +22492,15 @@ function ScrollShadows(props) {
22268
22492
  setShowStartShadow(start > 0);
22269
22493
  setShowEndShadow(start + boxSize < end);
22270
22494
  }, [horizontal]);
22271
- const onResize = useCallback30(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
22272
- useResizeObserver8({
22495
+ const onResize = useCallback32(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
22496
+ useResizeObserver9({
22273
22497
  ref: scrollRef,
22274
22498
  onResize
22275
22499
  });
22276
22500
  return /* @__PURE__ */ jsxs92("div", { ...trussProps91({
22277
22501
  display: "df",
22278
22502
  flexDirection: ["fd_var", {
22279
- "--flexDirection": maybeCssVar50(!horizontal ? "column" : "row")
22503
+ "--flexDirection": maybeCssVar51(!horizontal ? "column" : "row")
22280
22504
  }],
22281
22505
  position: "relative",
22282
22506
  overflow: "oh",
@@ -22293,7 +22517,7 @@ function ScrollShadows(props) {
22293
22517
  ...startShadowStyles,
22294
22518
  ...{
22295
22519
  opacity: ["o_var", {
22296
- "--opacity": maybeCssVar50(showStartShadow ? 1 : 0)
22520
+ "--opacity": maybeCssVar51(showStartShadow ? 1 : 0)
22297
22521
  }]
22298
22522
  }
22299
22523
  }), "data-chromatic": "ignore" }),
@@ -22301,7 +22525,7 @@ function ScrollShadows(props) {
22301
22525
  ...endShadowStyles,
22302
22526
  ...{
22303
22527
  opacity: ["o_var", {
22304
- "--opacity": maybeCssVar50(showEndShadow ? 1 : 0)
22528
+ "--opacity": maybeCssVar51(showEndShadow ? 1 : 0)
22305
22529
  }]
22306
22530
  }
22307
22531
  }), "data-chromatic": "ignore" }),
@@ -22319,12 +22543,12 @@ function ScrollShadows(props) {
22319
22543
  // src/layouts/SideNavLayout/SideNavLayoutContext.tsx
22320
22544
  import {
22321
22545
  createContext as createContext12,
22322
- useCallback as useCallback31,
22546
+ useCallback as useCallback33,
22323
22547
  useContext as useContext23,
22324
22548
  useEffect as useEffect36,
22325
22549
  useMemo as useMemo51,
22326
- useRef as useRef57,
22327
- useState as useState54
22550
+ useRef as useRef58,
22551
+ useState as useState55
22328
22552
  } from "react";
22329
22553
  import { jsx as jsx178 } from "react/jsx-runtime";
22330
22554
  var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
@@ -22350,18 +22574,18 @@ function resolveInitialNavState(defaultNavState) {
22350
22574
  }
22351
22575
  var SideNavLayoutContext = createContext12(void 0);
22352
22576
  function SideNavLayoutProvider(props) {
22353
- const [navState, setNavStateInternal] = useState54(
22577
+ const [navState, setNavStateInternal] = useState55(
22354
22578
  () => resolveInitialNavState(props.defaultNavState)
22355
22579
  );
22356
22580
  const bp = useBreakpoint();
22357
- const prevMdAndUp = useRef57(bp.mdAndUp);
22581
+ const prevMdAndUp = useRef58(bp.mdAndUp);
22358
22582
  useEffect36(() => {
22359
22583
  if (prevMdAndUp.current && !bp.mdAndUp) {
22360
22584
  setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
22361
22585
  }
22362
22586
  prevMdAndUp.current = bp.mdAndUp;
22363
22587
  }, [bp.mdAndUp]);
22364
- const setNavState = useCallback31((value2) => {
22588
+ const setNavState = useCallback33((value2) => {
22365
22589
  setNavStateInternal((prev) => {
22366
22590
  const next = typeof value2 === "function" ? value2(prev) : value2;
22367
22591
  if (next === "expanded" || next === "collapse") {
@@ -22440,10 +22664,10 @@ function SideNav(props) {
22440
22664
  }
22441
22665
 
22442
22666
  // src/components/Snackbar/useSnackbar.tsx
22443
- import { useCallback as useCallback32, useEffect as useEffect37 } from "react";
22667
+ import { useCallback as useCallback34, useEffect as useEffect37 } from "react";
22444
22668
  function useSnackbar() {
22445
22669
  const { setNotices, setOffset } = useSnackbarContext();
22446
- const onClose = useCallback32(
22670
+ const onClose = useCallback34(
22447
22671
  (noticeId) => {
22448
22672
  setNotices((prev) => {
22449
22673
  let returnValue = prev;
@@ -22460,7 +22684,7 @@ function useSnackbar() {
22460
22684
  // eslint-disable-next-line react-hooks/exhaustive-deps
22461
22685
  []
22462
22686
  );
22463
- const triggerNotice = useCallback32(
22687
+ const triggerNotice = useCallback34(
22464
22688
  (props) => {
22465
22689
  const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
22466
22690
  let maybeTimeout;
@@ -22489,7 +22713,7 @@ function useSnackbar() {
22489
22713
  },
22490
22714
  [onClose, setNotices]
22491
22715
  );
22492
- const closeNotice = useCallback32((id) => onClose(id), [onClose]);
22716
+ const closeNotice = useCallback34((id) => onClose(id), [onClose]);
22493
22717
  const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
22494
22718
  setOffset({ bottom });
22495
22719
  return () => setOffset({});
@@ -22499,12 +22723,12 @@ function useSnackbar() {
22499
22723
  var snackbarId = 1;
22500
22724
 
22501
22725
  // src/components/Stepper.tsx
22502
- import { useRef as useRef58 } from "react";
22726
+ import { useRef as useRef59 } from "react";
22503
22727
  import { useButton as useButton12, useFocusRing as useFocusRing16, useHover as useHover20 } from "react-aria";
22504
- import { trussProps as trussProps93, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
22728
+ import { trussProps as trussProps93, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
22505
22729
  import { jsx as jsx180, jsxs as jsxs94 } from "react/jsx-runtime";
22506
22730
  import { createElement as createElement4 } from "react";
22507
- var __maybeInc17 = (inc) => {
22731
+ var __maybeInc19 = (inc) => {
22508
22732
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
22509
22733
  };
22510
22734
  function Stepper(props) {
@@ -22560,7 +22784,7 @@ function Stepper(props) {
22560
22784
  transition: "transition_width_200ms",
22561
22785
  height: "h100",
22562
22786
  width: ["w_var", {
22563
- "--width": maybeCssVar51(__maybeInc17(`${(lastCompletedStep + 1) / steps.length * 100}%`))
22787
+ "--width": maybeCssVar52(__maybeInc19(`${(lastCompletedStep + 1) / steps.length * 100}%`))
22564
22788
  }]
22565
22789
  }) }) })
22566
22790
  ] });
@@ -22577,7 +22801,7 @@ function StepButton(props) {
22577
22801
  onPress: onClick,
22578
22802
  isDisabled: disabled
22579
22803
  };
22580
- const ref = useRef58(null);
22804
+ const ref = useRef59(null);
22581
22805
  const {
22582
22806
  buttonProps,
22583
22807
  isPressed
@@ -22970,17 +23194,17 @@ function visit(rows, fn) {
22970
23194
  }
22971
23195
 
22972
23196
  // src/components/Toast/useToast.tsx
22973
- import { useCallback as useCallback33 } from "react";
23197
+ import { useCallback as useCallback35 } from "react";
22974
23198
  function useToast() {
22975
23199
  const { setNotice, clear } = useToastContext();
22976
- const showToast = useCallback33((props) => setNotice(props), [setNotice]);
23200
+ const showToast = useCallback35((props) => setNotice(props), [setNotice]);
22977
23201
  return { showToast, clear };
22978
23202
  }
22979
23203
 
22980
23204
  // src/layouts/SideNavLayout/SideNavLayout.tsx
22981
- import { trussProps as trussProps95, mergeProps as mergeProps29, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
23205
+ import { trussProps as trussProps95, mergeProps as mergeProps29, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
22982
23206
  import { jsx as jsx185, jsxs as jsxs98 } from "react/jsx-runtime";
22983
- var __maybeInc18 = (inc) => {
23207
+ var __maybeInc20 = (inc) => {
22984
23208
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
22985
23209
  };
22986
23210
  function SideNavLayout(props) {
@@ -23032,14 +23256,14 @@ function SideNavLayoutContent(props) {
23032
23256
  position: "sticky",
23033
23257
  left: "left0",
23034
23258
  zIndex: ["z_var", {
23035
- "--zIndex": maybeCssVar52(zIndices.sideNav)
23259
+ "--zIndex": maybeCssVar53(zIndices.sideNav)
23036
23260
  }],
23037
23261
  top: ["top_var", {
23038
- "--top": maybeCssVar52(__maybeInc18(navTop))
23262
+ "--top": maybeCssVar53(__maybeInc20(navTop))
23039
23263
  }],
23040
23264
  alignSelf: "asfs",
23041
23265
  height: ["h_var", {
23042
- "--height": maybeCssVar52(__maybeInc18(railViewportHeight))
23266
+ "--height": maybeCssVar53(__maybeInc20(railViewportHeight))
23043
23267
  }],
23044
23268
  width: ["w_var", {
23045
23269
  "--width": `${collapsed ? railCollapsedWidthPx : railWidthPx}px`
@@ -23049,11 +23273,11 @@ function SideNavLayoutContent(props) {
23049
23273
  position: "fixed",
23050
23274
  left: "left0",
23051
23275
  top: ["top_var", {
23052
- "--top": maybeCssVar52(__maybeInc18(navTop))
23276
+ "--top": maybeCssVar53(__maybeInc20(navTop))
23053
23277
  }],
23054
23278
  bottom: "bottom0",
23055
23279
  zIndex: ["z_var", {
23056
- "--zIndex": maybeCssVar52(zIndices.sideNav)
23280
+ "--zIndex": maybeCssVar53(zIndices.sideNav)
23057
23281
  }]
23058
23282
  },
23059
23283
  ...collapsed ? {
@@ -23092,25 +23316,34 @@ function SideNavLayoutContent(props) {
23092
23316
  }
23093
23317
 
23094
23318
  // src/layouts/NavbarLayout/NavbarLayout.tsx
23095
- import { useMemo as useMemo53, useRef as useRef60 } from "react";
23096
- import { mergeProps as mergeProps30, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
23319
+ import { useMemo as useMemo53, useRef as useRef61 } from "react";
23320
+ import { mergeProps as mergeProps30, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
23097
23321
 
23098
23322
  // src/layouts/useAutoHideOnScroll.ts
23099
- import { useEffect as useEffect38, useRef as useRef59, useState as useState55 } from "react";
23323
+ import { useLayoutEffect as useLayoutEffect6, useRef as useRef60, useState as useState56 } from "react";
23100
23324
  var THRESHOLD = 80;
23325
+ function getInitialAutoHideState() {
23326
+ if (typeof window === "undefined" || window.scrollY <= 0) {
23327
+ return { state: "static", atTop: true };
23328
+ }
23329
+ return { state: "hidden", atTop: false };
23330
+ }
23101
23331
  function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
23102
- const [state, setState] = useState55("static");
23103
- const stateRef = useRef59("static");
23104
- const [atTop, setAtTop] = useState55(true);
23105
- const atTopRef = useRef59(true);
23106
- const getTopOffsetRef = useRef59(getTopOffset);
23332
+ const initial = getInitialAutoHideState();
23333
+ const [state, setState] = useState56(initial.state);
23334
+ const stateRef = useRef60(initial.state);
23335
+ const [atTop, setAtTop] = useState56(initial.atTop);
23336
+ const atTopRef = useRef60(initial.atTop);
23337
+ const getTopOffsetRef = useRef60(getTopOffset);
23107
23338
  getTopOffsetRef.current = getTopOffset;
23108
- const lastScrollY = useRef59(Number.POSITIVE_INFINITY);
23109
- useEffect38(() => {
23339
+ const lastScrollY = useRef60(Number.POSITIVE_INFINITY);
23340
+ const lastScrollHeight = useRef60(0);
23341
+ useLayoutEffect6(() => {
23110
23342
  if (!enabled) {
23111
23343
  stateRef.current = "static";
23112
23344
  atTopRef.current = true;
23113
23345
  lastScrollY.current = Number.POSITIVE_INFINITY;
23346
+ lastScrollHeight.current = 0;
23114
23347
  setState("static");
23115
23348
  setAtTop(true);
23116
23349
  return;
@@ -23125,22 +23358,41 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
23125
23358
  setAtTop(nextAtTop);
23126
23359
  }
23127
23360
  };
23361
+ const autoHideStateOnLayoutChange = (rect, topOffset) => {
23362
+ const nextAtTop = rect.top >= topOffset;
23363
+ let next = stateRef.current;
23364
+ if (nextAtTop) {
23365
+ next = "static";
23366
+ } else if (rect.bottom < -THRESHOLD && next !== "revealed") {
23367
+ next = "hidden";
23368
+ }
23369
+ return { next, nextAtTop };
23370
+ };
23128
23371
  const updateAutoHideState = () => {
23129
23372
  const el = spacerRef.current;
23130
23373
  if (!el) return;
23374
+ const doc = document.documentElement;
23375
+ const currentScrollHeight = doc.scrollHeight;
23376
+ const scrollHeightChanged = lastScrollHeight.current !== 0 && currentScrollHeight !== lastScrollHeight.current;
23377
+ lastScrollHeight.current = currentScrollHeight;
23131
23378
  if (window.scrollY <= 0) {
23132
23379
  lastScrollY.current = 0;
23133
23380
  commit("static", true);
23134
23381
  return;
23135
23382
  }
23136
- const rect = el.getBoundingClientRect();
23137
23383
  const currentY = window.scrollY;
23384
+ const rect = el.getBoundingClientRect();
23385
+ const topOffset = getTopOffsetRef.current?.() ?? 0;
23386
+ if (scrollHeightChanged) {
23387
+ lastScrollY.current = currentY;
23388
+ const { next: next2, nextAtTop: nextAtTop2 } = autoHideStateOnLayoutChange(rect, topOffset);
23389
+ commit(next2, nextAtTop2);
23390
+ return;
23391
+ }
23138
23392
  const dy = currentY - lastScrollY.current;
23139
23393
  lastScrollY.current = currentY;
23140
- const topOffset = getTopOffsetRef.current?.() ?? 0;
23141
- const nextAtTop = rect.top >= topOffset;
23142
- const doc = document.documentElement;
23143
23394
  const atBottom = currentY >= doc.scrollHeight - doc.clientHeight;
23395
+ const nextAtTop = rect.top >= topOffset;
23144
23396
  let next = stateRef.current;
23145
23397
  if (nextAtTop) {
23146
23398
  next = "static";
@@ -23158,17 +23410,17 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
23158
23410
  }
23159
23411
 
23160
23412
  // src/layouts/useMeasuredHeight.ts
23161
- import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
23162
- import { useCallback as useCallback34, useLayoutEffect as useLayoutEffect5, useState as useState56 } from "react";
23413
+ import { useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
23414
+ import { useCallback as useCallback36, useLayoutEffect as useLayoutEffect7, useState as useState57 } from "react";
23163
23415
  function useMeasuredHeight(ref, enabled) {
23164
- const [height, setHeight] = useState56(0);
23165
- const syncElementHeight = useCallback34(() => {
23416
+ const [height, setHeight] = useState57(0);
23417
+ const syncElementHeight = useCallback36(() => {
23166
23418
  const el = ref.current;
23167
23419
  const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
23168
23420
  setHeight((prev) => prev === next ? prev : next);
23169
23421
  }, [ref]);
23170
- useResizeObserver9({ ref, onResize: syncElementHeight });
23171
- useLayoutEffect5(() => {
23422
+ useResizeObserver10({ ref, onResize: syncElementHeight });
23423
+ useLayoutEffect7(() => {
23172
23424
  syncElementHeight();
23173
23425
  }, [enabled, syncElementHeight]);
23174
23426
  return height;
@@ -23187,7 +23439,7 @@ function useNavbarLayoutHeight() {
23187
23439
 
23188
23440
  // src/layouts/NavbarLayout/NavbarLayout.tsx
23189
23441
  import { jsx as jsx187, jsxs as jsxs99 } from "react/jsx-runtime";
23190
- var __maybeInc19 = (inc) => {
23442
+ var __maybeInc21 = (inc) => {
23191
23443
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
23192
23444
  };
23193
23445
  function NavbarLayout(props) {
@@ -23196,8 +23448,8 @@ function NavbarLayout(props) {
23196
23448
  children
23197
23449
  } = props;
23198
23450
  const tid = useTestIds(props, "navbarLayout");
23199
- const navMetricsRef = useRef60(null);
23200
- const spacerRef = useRef60(null);
23451
+ const navMetricsRef = useRef61(null);
23452
+ const spacerRef = useRef61(null);
23201
23453
  const navHeight = useMeasuredHeight(navMetricsRef, true);
23202
23454
  const {
23203
23455
  state: autoHideState,
@@ -23215,10 +23467,10 @@ function NavbarLayout(props) {
23215
23467
  position: "sticky",
23216
23468
  left: "left0",
23217
23469
  zIndex: ["z_var", {
23218
- "--zIndex": maybeCssVar53(zIndices.navbar)
23470
+ "--zIndex": maybeCssVar54(zIndices.navbar)
23219
23471
  }],
23220
23472
  width: ["w_var", {
23221
- "--width": maybeCssVar53(__maybeInc19(innerWidth))
23473
+ "--width": maybeCssVar54(__maybeInc21(innerWidth))
23222
23474
  }]
23223
23475
  }
23224
23476
  ) : (
@@ -23227,10 +23479,10 @@ function NavbarLayout(props) {
23227
23479
  position: "fixed",
23228
23480
  left: "left0",
23229
23481
  zIndex: ["z_var", {
23230
- "--zIndex": maybeCssVar53(zIndices.navbar)
23482
+ "--zIndex": maybeCssVar54(zIndices.navbar)
23231
23483
  }],
23232
23484
  width: ["w_var", {
23233
- "--width": maybeCssVar53(__maybeInc19(innerWidth))
23485
+ "--width": maybeCssVar54(__maybeInc21(innerWidth))
23234
23486
  }],
23235
23487
  transition: "transitionTop"
23236
23488
  }
@@ -23256,10 +23508,10 @@ function NavbarLayout(props) {
23256
23508
  }
23257
23509
 
23258
23510
  // src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
23259
- import { useCallback as useCallback35, useMemo as useMemo54, useRef as useRef61 } from "react";
23260
- import { mergeProps as mergeProps31, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
23511
+ import { useCallback as useCallback37, useMemo as useMemo54, useRef as useRef62 } from "react";
23512
+ import { mergeProps as mergeProps31, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
23261
23513
  import { jsx as jsx188, jsxs as jsxs100 } from "react/jsx-runtime";
23262
- var __maybeInc20 = (inc) => {
23514
+ var __maybeInc22 = (inc) => {
23263
23515
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
23264
23516
  };
23265
23517
  function PageHeaderLayout(props) {
@@ -23269,11 +23521,11 @@ function PageHeaderLayout(props) {
23269
23521
  } = props;
23270
23522
  const tid = useTestIds(props, "pageHeaderLayout");
23271
23523
  const navbarHeight = useNavbarLayoutHeight();
23272
- const navbarHeightRef = useRef61(navbarHeight);
23524
+ const navbarHeightRef = useRef62(navbarHeight);
23273
23525
  navbarHeightRef.current = navbarHeight;
23274
- const getNavbarBottom = useCallback35(() => navbarHeightRef.current, []);
23275
- const headerMetricsRef = useRef61(null);
23276
- const spacerRef = useRef61(null);
23526
+ const getNavbarBottom = useCallback37(() => navbarHeightRef.current, []);
23527
+ const headerMetricsRef = useRef62(null);
23528
+ const spacerRef = useRef62(null);
23277
23529
  const headerHeight = useMeasuredHeight(headerMetricsRef, true);
23278
23530
  const {
23279
23531
  state: autoHideState,
@@ -23283,30 +23535,30 @@ function PageHeaderLayout(props) {
23283
23535
  const cssVars = headerHeight > 0 && headerOccupiesPosition ? {
23284
23536
  [beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
23285
23537
  } : void 0;
23286
- const headerLeft = `var(${beamSideNavLayoutWidthVar}, 0px)`;
23287
- const headerWidth = `calc(var(${beamLayoutViewportWidthVar}, 100vw) - var(${beamSideNavLayoutWidthVar}, 0px))`;
23538
+ const headerLeft = documentScrollChromeLeft();
23539
+ const headerWidth = documentScrollChromeWidth();
23288
23540
  const outerTop = `var(${beamNavbarLayoutHeightVar}, 0px)`;
23289
23541
  const innerCss = autoHideState === "static" ? {
23290
23542
  position: "sticky",
23291
23543
  left: ["left_var", {
23292
- "--left": maybeCssVar54(__maybeInc20(headerLeft))
23544
+ "--left": maybeCssVar55(__maybeInc22(headerLeft))
23293
23545
  }],
23294
23546
  width: ["w_var", {
23295
- "--width": maybeCssVar54(__maybeInc20(headerWidth))
23547
+ "--width": maybeCssVar55(__maybeInc22(headerWidth))
23296
23548
  }],
23297
23549
  zIndex: ["z_var", {
23298
- "--zIndex": maybeCssVar54(zIndices.pageStickyHeader)
23550
+ "--zIndex": maybeCssVar55(zIndices.pageStickyHeader)
23299
23551
  }]
23300
23552
  } : {
23301
23553
  position: "fixed",
23302
23554
  left: ["left_var", {
23303
- "--left": maybeCssVar54(__maybeInc20(headerLeft))
23555
+ "--left": maybeCssVar55(__maybeInc22(headerLeft))
23304
23556
  }],
23305
23557
  width: ["w_var", {
23306
- "--width": maybeCssVar54(__maybeInc20(headerWidth))
23558
+ "--width": maybeCssVar55(__maybeInc22(headerWidth))
23307
23559
  }],
23308
23560
  zIndex: ["z_var", {
23309
- "--zIndex": maybeCssVar54(zIndices.pageStickyHeader)
23561
+ "--zIndex": maybeCssVar55(zIndices.pageStickyHeader)
23310
23562
  }],
23311
23563
  transition: "transitionTop"
23312
23564
  };
@@ -23494,6 +23746,7 @@ export {
23494
23746
  beamNavbarLayoutHeightVar,
23495
23747
  beamPageHeaderLayoutHeightVar,
23496
23748
  beamSideNavLayoutWidthVar,
23749
+ beamTableActionsHeightVar,
23497
23750
  booleanFilter,
23498
23751
  boundCheckboxField,
23499
23752
  boundCheckboxGroupField,
@@ -23512,6 +23765,7 @@ export {
23512
23765
  boundTextField,
23513
23766
  boundToggleChipGroupField,
23514
23767
  boundTreeSelectField,
23768
+ calcColumnLayout,
23515
23769
  calcColumnSizes,
23516
23770
  cardStyle,
23517
23771
  checkboxFilter,
@@ -23532,6 +23786,8 @@ export {
23532
23786
  defaultRenderFn,
23533
23787
  defaultStyle,
23534
23788
  defaultTestId,
23789
+ documentScrollChromeLeft,
23790
+ documentScrollChromeWidth,
23535
23791
  dragHandleColumn,
23536
23792
  emptyCell,
23537
23793
  ensureClientSideSortValueIsSortable,
@@ -23586,6 +23842,7 @@ export {
23586
23842
  px,
23587
23843
  recursivelyGetContainingRow,
23588
23844
  reservedRowKinds,
23845
+ resolveTableContentWidth,
23589
23846
  resolveTooltip,
23590
23847
  rowClickRenderFn,
23591
23848
  rowLinkRenderFn,
@@ -23600,6 +23857,9 @@ export {
23600
23857
  singleFilter,
23601
23858
  sortFn,
23602
23859
  sortRows,
23860
+ stickyNavAndHeaderOffset,
23861
+ stickyTableHeaderOffset,
23862
+ sumColumnSizesPx,
23603
23863
  switchFocusStyles,
23604
23864
  switchHoverStyles,
23605
23865
  switchSelectedHoverStyles,