@homebound/beam 4.57.1 → 4.58.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.cjs CHANGED
@@ -7709,9 +7709,12 @@ function ExpandableHeader(props) {
7709
7709
  pointerEvents: "pen",
7710
7710
  ...applyStickyStyles ? {
7711
7711
  position: "sticky",
7712
- left: ["left_var", {
7713
- "--left": (0, import_runtime11.maybeCssVar)(__maybeInc3(`calc(var(${beamSideNavLayoutWidthVar}, 0px) + ${minStickyLeftOffset + 12}px)`))
7714
- }],
7712
+ left: ["left_var sm_left_var", {
7713
+ "--left": (0, import_runtime11.maybeCssVar)(__maybeInc3(`calc(var(${beamSideNavLayoutWidthVar}, 0px) + ${minStickyLeftOffset + 12}px)`)),
7714
+ "--sm_left": (0, import_runtime11.maybeCssVar)(__maybeInc3(`calc(var(${beamSideNavLayoutWidthVar}, 0px) + 12px)`))
7715
+ }]
7716
+ } : {},
7717
+ ...applyStickyStyles ? {
7715
7718
  paddingRight: "pr2",
7716
7719
  backgroundColor: ["bgColor_var", {
7717
7720
  "--backgroundColor": "var(--b-surface)"
@@ -11277,27 +11280,22 @@ function RowImpl(props) {
11277
11280
  const renderedContent = withRowControls(content2, controlNodes, alignment, contentRowLink);
11278
11281
  ensureClientSideSortValueIsSortable(sortOn, isHeader || isTotals || isExpandableHeader || isGroupHeader, column2, columnIndex, maybeContent);
11279
11282
  const maybeSticky = (isGridCellContent(maybeContent) && maybeContent.sticky || column2.sticky) ?? void 0;
11283
+ const stickyLeft = maybeSticky === "left" ? columnIndex === 0 ? `var(${beamSideNavLayoutWidthVar}, 0px)` : `calc(var(${beamSideNavLayoutWidthVar}, 0px) + (${columnSizes.slice(0, columnIndex).join(" + ")}))` : "auto";
11284
+ const stickyRight = maybeSticky === "right" ? columnIndex + 1 === columnSizes.length ? `var(${beamRightPaneWidthVar}, 0px)` : `calc(var(${beamRightPaneWidthVar}, 0px) + (${columnSizes.slice(columnIndex + 1 - columnSizes.length).join(" + ")}))` : "auto";
11280
11285
  const maybeStickyColumnStyles = maybeSticky && columnSizes ? {
11281
- ...{
11282
- position: "sticky",
11283
- zIndex: ["z_var", {
11284
- "--zIndex": (0, import_runtime24.maybeCssVar)(zIndices.tableStickyColumn)
11285
- }],
11286
- backgroundColor: ["bgColor_var", {
11287
- "--backgroundColor": "var(--b-surface)"
11288
- }]
11289
- },
11290
- ...maybeSticky === "left" ? {
11291
- left: ["left_var", {
11292
- "--left": (0, import_runtime24.maybeCssVar)(__maybeInc9(columnIndex === 0 ? `var(${beamSideNavLayoutWidthVar}, 0px)` : `calc(var(${beamSideNavLayoutWidthVar}, 0px) + (${columnSizes.slice(0, columnIndex).join(" + ")}))`))
11293
- }]
11294
- } : {},
11295
- // Offset by the open right pane so sticky-right cells pin to the clear edge, not under it (0 when closed).
11296
- ...maybeSticky === "right" ? {
11297
- right: ["right_var", {
11298
- "--right": (0, import_runtime24.maybeCssVar)(__maybeInc9(columnIndex + 1 === columnSizes.length ? `var(${beamRightPaneWidthVar}, 0px)` : `calc(var(${beamRightPaneWidthVar}, 0px) + (${columnSizes.slice(columnIndex + 1 - columnSizes.length).join(" + ")}))`))
11299
- }]
11300
- } : {}
11286
+ position: "sticky sm_relative",
11287
+ zIndex: ["z_var", {
11288
+ "--zIndex": (0, import_runtime24.maybeCssVar)(zIndices.tableStickyColumn)
11289
+ }],
11290
+ backgroundColor: ["bgColor_var", {
11291
+ "--backgroundColor": "var(--b-surface)"
11292
+ }],
11293
+ left: ["left_var sm_l_auto", {
11294
+ "--left": (0, import_runtime24.maybeCssVar)(__maybeInc9(stickyLeft))
11295
+ }],
11296
+ right: ["right_var sm_r_auto", {
11297
+ "--right": (0, import_runtime24.maybeCssVar)(__maybeInc9(stickyRight))
11298
+ }]
11301
11299
  } : {};
11302
11300
  minStickyLeftOffset += maybeSticky === "left" ? parseInt(columnSizes[columnIndex].replace("px", ""), 10) : 0;
11303
11301
  const cellId = `${row.kind}_${row.id}_${column2.id}`;
@@ -15864,7 +15862,10 @@ function BlueprintAiLogo(props) {
15864
15862
 
15865
15863
  // src/components/AiPanel.tsx
15866
15864
  var import_runtime49 = require("@homebound/truss/runtime");
15867
- var import_jsx_runtime61 = require("react/jsx-runtime");
15865
+ var import_jsx_runtime61 = (
15866
+ // Capped to the visible column so a page widened by an open right pane doesn't stretch it
15867
+ require("react/jsx-runtime")
15868
+ );
15868
15869
  function AiPanel(props) {
15869
15870
  const {
15870
15871
  rounded = false,
@@ -15875,8 +15876,10 @@ function AiPanel(props) {
15875
15876
  const tid = useTestIds(others, "aiPanel");
15876
15877
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ...(0, import_runtime49.trussProps)({
15877
15878
  ...{
15878
- width: "w100",
15879
15879
  backgroundImage: "aiBackground",
15880
+ width: "w_min_100_calc_calc_var_beam_layout_viewport_width_100vw_var_beam_side_nav_layout_width_0px_2_var_beam_layout_content_padding_x_0px",
15881
+ left: "l_calc_var_beam_side_nav_layout_width_0px_var_beam_layout_content_padding_x_0px",
15882
+ position: "sticky",
15880
15883
  ...rounded ? {
15881
15884
  borderRadius: "br12"
15882
15885
  } : {}
@@ -15896,34 +15899,39 @@ function AiCard(props) {
15896
15899
  gapCss
15897
15900
  } = aiCardChrome[size];
15898
15901
  const tid = useTestIds(others, "aiCard");
15899
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { ...(0, import_runtime49.trussProps)({
15900
- ...{
15901
- display: "df",
15902
- flexDirection: "fdc",
15903
- alignItems: "aifs",
15904
- width: "w100",
15905
- ...!fullWidth ? {
15906
- width: "wfc",
15907
- maxWidth: "maxw100",
15908
- marginLeft: "mla",
15909
- marginRight: "mra"
15910
- } : {}
15911
- },
15912
- ...gapCss
15913
- }), ...tid.column, children: [
15914
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(BlueprintAiLogo, { height: logoHeight }),
15915
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ...(0, import_runtime49.trussProps)({
15916
- display: "df",
15917
- flexDirection: "fdc",
15918
- width: "w100",
15919
- minWidth: "mw0",
15920
- borderRadius: "br12",
15921
- backgroundColor: ["bgColor_var", {
15922
- "--backgroundColor": "var(--b-surface)"
15923
- }],
15924
- boxShadow: "bshBasic"
15925
- }), ...others, ...tid.card, children })
15926
- ] });
15902
+ return (
15903
+ // Same cap as `AiPanel`, so a wide page does not stretch the card column
15904
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { ...(0, import_runtime49.trussProps)({
15905
+ ...{
15906
+ display: "df",
15907
+ flexDirection: "fdc",
15908
+ alignItems: "aifs",
15909
+ width: "w_min_100_calc_calc_var_beam_layout_viewport_width_100vw_var_beam_side_nav_layout_width_0px_2_var_beam_layout_content_padding_x_0px",
15910
+ left: "l_calc_var_beam_side_nav_layout_width_0px_var_beam_layout_content_padding_x_0px",
15911
+ position: "sticky",
15912
+ ...!fullWidth ? {
15913
+ width: "wfc",
15914
+ maxWidth: "maxw100",
15915
+ marginLeft: "mla",
15916
+ marginRight: "mra"
15917
+ } : {}
15918
+ },
15919
+ ...gapCss
15920
+ }), ...tid.column, children: [
15921
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(BlueprintAiLogo, { height: logoHeight }),
15922
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ...(0, import_runtime49.trussProps)({
15923
+ display: "df",
15924
+ flexDirection: "fdc",
15925
+ width: "w100",
15926
+ minWidth: "mw0",
15927
+ borderRadius: "br12",
15928
+ backgroundColor: ["bgColor_var", {
15929
+ "--backgroundColor": "var(--b-surface)"
15930
+ }],
15931
+ boxShadow: "bshBasic"
15932
+ }), ...others, ...tid.card, children })
15933
+ ] })
15934
+ );
15927
15935
  }
15928
15936
  var aiBackgroundPaddingCss = {
15929
15937
  lg: {