@homebound/beam 4.9.2 → 4.11.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
@@ -6055,13 +6055,14 @@ function IconButton(props) {
6055
6055
  const isCircle = variant === "circle";
6056
6056
  const isOutline = variant === "outline";
6057
6057
  const styles = (0, import_react8.useMemo)(() => {
6058
- const variantKey = isCircle ? "circle" : isOutline ? "outline" : compact ? "compact" : "default";
6059
6058
  const {
6060
6059
  base,
6061
6060
  hover,
6062
6061
  focus,
6063
6062
  pressed
6064
- } = variantStyles[variantKey];
6063
+ } = variantStyles(variant, {
6064
+ compact
6065
+ });
6065
6066
  return {
6066
6067
  ...iconButtonStylesReset,
6067
6068
  ...base,
@@ -6075,7 +6076,7 @@ function IconButton(props) {
6075
6076
  }]
6076
6077
  }
6077
6078
  };
6078
- }, [isHovered, isFocusVisible, isDisabled, compact, isCircle, isOutline, isPressing, bgColor, forceFocusStyles]);
6079
+ }, [isHovered, isFocusVisible, isDisabled, compact, variant, isPressing, bgColor, forceFocusStyles]);
6079
6080
  const iconColor = isCircle ? circleIconColor : defaultIconColor;
6080
6081
  const buttonAttrs = {
6081
6082
  ...testIds,
@@ -6112,36 +6113,93 @@ var iconButtonStylesDisabled = {
6112
6113
  "--backgroundColor": "var(--b-surface-disabled)"
6113
6114
  }]
6114
6115
  };
6115
- var variantStyles = {
6116
- default: {
6117
- base: {
6118
- height: "h_28px",
6119
- width: "w_28px",
6120
- borderRadius: "br8",
6121
- borderWidth: "bw2"
6122
- },
6123
- hover: {
6124
- backgroundColor: ["bgColor_var", {
6125
- "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
6126
- }]
6127
- },
6128
- focus: {
6129
- borderColor: ["bc_var", {
6130
- "--borderColor": "var(--b-field-border-focus)"
6131
- }]
6132
- },
6133
- pressed: {
6134
- backgroundColor: ["bgColor_var", {
6135
- "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
6136
- }]
6137
- }
6138
- },
6139
- compact: {
6140
- base: {
6116
+ function variantStyles(variant, {
6117
+ compact
6118
+ }) {
6119
+ if (variant === "circle") {
6120
+ return {
6121
+ base: {
6122
+ borderRadius: "br100",
6123
+ height: ["sq_var", {
6124
+ "--height": `${compact ? 32 : 48}px`
6125
+ }],
6126
+ width: ["sq_var", {
6127
+ "--width": `${compact ? 32 : 48}px`
6128
+ }],
6129
+ borderColor: ["bc_var", {
6130
+ "--borderColor": "var(--b-field-border-default)"
6131
+ }],
6132
+ borderStyle: "bss",
6133
+ borderWidth: "bw1",
6134
+ display: "df",
6135
+ justifyContent: "jcc",
6136
+ alignItems: "aic",
6137
+ backgroundColor: ["bgColor_var", {
6138
+ "--backgroundColor": "var(--b-surface-raised)"
6139
+ }]
6140
+ },
6141
+ hover: {
6142
+ backgroundColor: "bgBlue100",
6143
+ borderColor: "bcBlue200"
6144
+ },
6145
+ focus: {
6146
+ backgroundColor: "bgBlue100",
6147
+ borderColor: ["bc_var", {
6148
+ "--borderColor": "var(--b-field-border-focus)"
6149
+ }]
6150
+ },
6151
+ pressed: {
6152
+ backgroundColor: ["bgColor_var", {
6153
+ "--backgroundColor": "var(--b-neutral-fill-pressed)"
6154
+ }],
6155
+ borderColor: ["bc_var", {
6156
+ "--borderColor": "var(--b-neutral-fill-pressed)"
6157
+ }]
6158
+ }
6159
+ };
6160
+ }
6161
+ if (variant === "outline") {
6162
+ return {
6163
+ base: {
6164
+ borderRadius: "br8",
6165
+ width: "w_42px",
6166
+ height: "h_40px",
6167
+ borderColor: "bcGray300",
6168
+ borderStyle: "bss",
6169
+ borderWidth: "bw1",
6170
+ display: "df",
6171
+ justifyContent: "jcc",
6172
+ alignItems: "aic",
6173
+ backgroundColor: ["bgColor_var", {
6174
+ "--backgroundColor": "var(--b-surface-raised)"
6175
+ }]
6176
+ },
6177
+ hover: {
6178
+ backgroundColor: ["bgColor_var", {
6179
+ "--backgroundColor": "var(--b-surface-raised-hover)"
6180
+ }]
6181
+ },
6182
+ focus: {
6183
+ boxShadow: "bshFocus"
6184
+ },
6185
+ pressed: {
6186
+ backgroundColor: ["bgColor_var", {
6187
+ "--backgroundColor": "var(--b-surface-raised-pressed)"
6188
+ }]
6189
+ }
6190
+ };
6191
+ }
6192
+ return {
6193
+ base: compact ? {
6141
6194
  height: "h_18px",
6142
6195
  width: "w_18px",
6143
6196
  borderRadius: "br4",
6144
6197
  borderWidth: "bw1"
6198
+ } : {
6199
+ height: "h_28px",
6200
+ width: "w_28px",
6201
+ borderRadius: "br8",
6202
+ borderWidth: "bw2"
6145
6203
  },
6146
6204
  hover: {
6147
6205
  backgroundColor: ["bgColor_var", {
@@ -6158,71 +6216,8 @@ var variantStyles = {
6158
6216
  "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
6159
6217
  }]
6160
6218
  }
6161
- },
6162
- circle: {
6163
- // Blue100/200 hover fills have no semantic tokens — keep palette for those.
6164
- base: {
6165
- borderRadius: "br100",
6166
- height: "h_48px",
6167
- width: "w_48px",
6168
- borderColor: ["bc_var", {
6169
- "--borderColor": "var(--b-field-border-default)"
6170
- }],
6171
- borderStyle: "bss",
6172
- borderWidth: "bw1",
6173
- display: "df",
6174
- justifyContent: "jcc",
6175
- alignItems: "aic"
6176
- },
6177
- hover: {
6178
- backgroundColor: "bgBlue100",
6179
- borderColor: "bcBlue200"
6180
- },
6181
- focus: {
6182
- backgroundColor: "bgBlue100",
6183
- borderColor: ["bc_var", {
6184
- "--borderColor": "var(--b-field-border-focus)"
6185
- }]
6186
- },
6187
- pressed: {
6188
- backgroundColor: ["bgColor_var", {
6189
- "--backgroundColor": "var(--b-neutral-fill-pressed)"
6190
- }],
6191
- borderColor: ["bc_var", {
6192
- "--borderColor": "var(--b-neutral-fill-pressed)"
6193
- }]
6194
- }
6195
- },
6196
- outline: {
6197
- base: {
6198
- borderRadius: "br8",
6199
- width: "w_42px",
6200
- height: "h_40px",
6201
- borderColor: "bcGray300",
6202
- borderStyle: "bss",
6203
- borderWidth: "bw1",
6204
- display: "df",
6205
- justifyContent: "jcc",
6206
- alignItems: "aic",
6207
- backgroundColor: ["bgColor_var", {
6208
- "--backgroundColor": "var(--b-surface-raised)"
6209
- }]
6210
- },
6211
- hover: {
6212
- backgroundColor: ["bgColor_var", {
6213
- "--backgroundColor": "var(--b-surface-raised-hover)"
6214
- }]
6215
- },
6216
- focus: {
6217
- boxShadow: "bshFocus"
6218
- },
6219
- pressed: {
6220
- backgroundColor: ["bgColor_var", {
6221
- "--backgroundColor": "var(--b-surface-raised-pressed)"
6222
- }]
6223
- }
6224
- }
6225
- };
6219
+ };
6220
+ }
6226
6221
 
6227
6222
  // src/components/Table/utils/TableState.ts
6228
6223
  var import_mobx8 = require("mobx");
@@ -6439,6 +6434,8 @@ var zIndices = {
6439
6434
  scrollShadow: 50,
6440
6435
  // Document-scroll detail pane (DocumentScrollOverlayRightPaneLayout) — above table sticky chrome, below page sticky headers.
6441
6436
  rightPane: 60,
6437
+ // Workflow floating right-pane triggers — above the pane, below sticky headers.
6438
+ rightPaneTriggers: 65,
6442
6439
  pageStickyHeader: 70,
6443
6440
  // Sticky mobile action footer (workflow layouts) — same tier as pageStickyHeader; header and footer never overlap on screen.
6444
6441
  pageStickyFooter: 70,
@@ -11189,6 +11186,8 @@ function TextFieldBase(props) {
11189
11186
  const compactFieldHeight = 32;
11190
11187
  const showProposal = proposedValue !== void 0;
11191
11188
  const showOriginal = originalValue !== void 0 && originalValue !== "";
11189
+ const originalBelow = showOriginal && !inputProps.readOnly && !compound ? originalValue : void 0;
11190
+ const showErrorAndHelper = alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly;
11192
11191
  const [bgColor, hoverBgColor, disabledBgColor] = showProposal ? ["--b-ai-field-bg" /* AiFieldBg */, "rgba(237, 233, 254, 1)" /* Purple100 */, "--b-field-bg-disabled" /* FieldBgDisabled */] : inputStylePalette ? getInputStylePalette(inputStylePalette) : borderOnHover ? (
11193
11192
  // Use transparent backgrounds to blend with the table row hover color
11194
11193
  ["rgba(0,0,0,0)" /* Transparent */, "rgba(219, 234, 254, 1)" /* Blue100 */, "rgba(247, 245, 245, 1)" /* Gray100 */]
@@ -11514,21 +11513,6 @@ function TextFieldBase(props) {
11514
11513
  children: [
11515
11514
  labelStyle === "inline" && label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(InlineLabel, { multiline, labelProps, label, ...tid.label }),
11516
11515
  startAdornment && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "df aic asc fs0 br4 pr1", children: startAdornment }),
11517
- showOriginal && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { ...(0, import_runtime31.trussProps)({
11518
- display: "df",
11519
- alignItems: "aic",
11520
- flexShrink: "fs0",
11521
- paddingRight: "pr1",
11522
- textDecoration: "tdlt",
11523
- color: ["color_var", {
11524
- "--color": "var(--b-on-surface-muted)"
11525
- }],
11526
- ...multiline ? {
11527
- alignSelf: "asfs",
11528
- paddingTop: "pt_11px",
11529
- paddingBottom: "pb_11px"
11530
- } : {}
11531
- }), ...tid.originalValue, children: originalValue }),
11532
11516
  unfocusedPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11533
11517
  "div",
11534
11518
  {
@@ -11578,18 +11562,40 @@ function TextFieldBase(props) {
11578
11562
  }
11579
11563
  )
11580
11564
  }),
11581
- labelStyle !== "left" && (alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
11582
- errorMsg && !errorInTooltip && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
11583
- helperText && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HelperText, { helperText, ...tid.helperText })
11565
+ labelStyle !== "left" && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
11566
+ originalBelow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OriginalValue, { originalValue: originalBelow, ...tid.originalValue }),
11567
+ showErrorAndHelper && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
11568
+ errorMsg && !errorInTooltip && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
11569
+ helperText && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HelperText, { helperText, ...tid.helperText })
11570
+ ] })
11584
11571
  ] })
11585
11572
  ] }),
11586
- labelStyle === "left" && (alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly && (errorMsg && !errorInTooltip || helperText)) && // Reduces the margin between the error/helper text and input field
11573
+ labelStyle === "left" && (originalBelow || alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly && (errorMsg && !errorInTooltip || helperText)) && // Reduces the margin between the error/helper text and input field
11587
11574
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mt_neg8px", children: [
11588
- errorMsg && !errorInTooltip && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
11589
- helperText && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HelperText, { helperText, ...tid.helperText })
11575
+ originalBelow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OriginalValue, { originalValue: originalBelow, ...tid.originalValue }),
11576
+ showErrorAndHelper && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
11577
+ errorMsg && !errorInTooltip && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
11578
+ helperText && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HelperText, { helperText, ...tid.helperText })
11579
+ ] })
11590
11580
  ] })
11591
11581
  ] });
11592
11582
  }
11583
+ function OriginalValue(props) {
11584
+ const {
11585
+ originalValue,
11586
+ ...others
11587
+ } = props;
11588
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ...(0, import_runtime31.trussProps)({
11589
+ color: ["color_var", {
11590
+ "--color": "var(--b-text-helper)"
11591
+ }],
11592
+ fontWeight: "fw4",
11593
+ fontSize: "fz_12px",
11594
+ lineHeight: "lh_16px",
11595
+ marginTop: "mt_4px",
11596
+ textDecoration: "tdlt"
11597
+ }), ...others, children: originalValue });
11598
+ }
11593
11599
  function getInputStylePalette(inputStylePalette) {
11594
11600
  switch (inputStylePalette) {
11595
11601
  case "success":
@@ -24036,50 +24042,65 @@ function DocumentScrollRightPane({
24036
24042
  height: paneBounds.heightPx,
24037
24043
  maxHeight: paneBounds.heightPx
24038
24044
  } : void 0;
24039
- const pane = /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_framer_motion3.AnimatePresence, { children: isRightPaneOpen && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_framer_motion3.motion.div, { ref: paneRef, ...{
24040
- [rightPaneContentDataAttribute]: true
24041
- }, ...tid, ...(0, import_runtime111.mergeProps)(void 0, paneStyle, mobile ? {
24042
- position: "fixed",
24043
- right: "right0",
24044
- bottom: "bottom0",
24045
- left: "left0",
24046
- overflowY: "oya",
24047
- backgroundColor: ["bgColor_var", {
24048
- "--backgroundColor": "var(--b-surface)"
24049
- }],
24050
- zIndex: ["z_var", {
24051
- "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPaneMobile)
24052
- }]
24053
- } : {
24054
- position: "fixed",
24055
- right: "right0",
24056
- overflowY: "oya",
24057
- width: ["w_var", {
24058
- "--width": (0, import_runtime111.maybeCssVar)(__maybeInc20(paneWidthCss))
24059
- }],
24060
- backgroundColor: ["bgColor_var", {
24061
- "--backgroundColor": "var(--b-surface)"
24062
- }],
24063
- zIndex: ["z_var", {
24064
- "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPane)
24065
- }],
24066
- borderLeftStyle: "bls_solid",
24067
- borderLeftWidth: "blw_1px",
24068
- borderColor: ["bc_var", {
24069
- "--borderColor": "var(--b-surface-separator)"
24070
- }]
24071
- }), initial: {
24072
- x: slideX
24073
- }, animate: {
24074
- x: 0
24075
- }, exit: {
24076
- x: slideX
24077
- }, transition: {
24078
- ease: "linear",
24079
- duration: 0.2
24080
- }, onAnimationComplete: (definition) => {
24081
- if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
24082
- }, children: rightPaneContent }, "documentScrollRightPane") });
24045
+ const pane = /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_framer_motion3.AnimatePresence, { children: isRightPaneOpen && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
24046
+ import_framer_motion3.motion.div,
24047
+ {
24048
+ ref: paneRef,
24049
+ ...{
24050
+ [rightPaneContentDataAttribute]: true
24051
+ },
24052
+ ...tid,
24053
+ ...(0, import_runtime111.mergeProps)(void 0, paneStyle, mobile ? {
24054
+ position: "fixed",
24055
+ right: "right0",
24056
+ bottom: "bottom0",
24057
+ left: "left0",
24058
+ overflowY: "oya",
24059
+ backgroundColor: ["bgColor_var", {
24060
+ "--backgroundColor": "var(--b-surface)"
24061
+ }],
24062
+ zIndex: ["z_var", {
24063
+ "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPaneMobile)
24064
+ }]
24065
+ } : {
24066
+ position: "fixed",
24067
+ right: "right0",
24068
+ overflowY: "oya",
24069
+ width: ["w_var", {
24070
+ "--width": (0, import_runtime111.maybeCssVar)(__maybeInc20(paneWidthCss))
24071
+ }],
24072
+ backgroundColor: ["bgColor_var", {
24073
+ "--backgroundColor": "var(--b-surface)"
24074
+ }],
24075
+ zIndex: ["z_var", {
24076
+ "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPane)
24077
+ }],
24078
+ borderLeftStyle: "bls_solid",
24079
+ borderLeftWidth: "blw_1px",
24080
+ borderColor: ["bc_var", {
24081
+ "--borderColor": "var(--b-surface-separator)"
24082
+ }]
24083
+ }),
24084
+ initial: {
24085
+ x: slideX
24086
+ },
24087
+ animate: {
24088
+ x: 0
24089
+ },
24090
+ exit: {
24091
+ x: slideX
24092
+ },
24093
+ transition: {
24094
+ duration: 0.2,
24095
+ ease: [0.4, 0, 0.2, 1]
24096
+ },
24097
+ onAnimationComplete: (definition) => {
24098
+ if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
24099
+ },
24100
+ children: rightPaneContent
24101
+ },
24102
+ "documentScrollRightPane"
24103
+ ) });
24083
24104
  return (0, import_react_dom6.createPortal)(pane, document.body);
24084
24105
  }
24085
24106
 
@@ -24177,7 +24198,8 @@ function DocumentScrollOverlayRightPaneLayout({
24177
24198
  }, {
24178
24199
  flexShrink: "fs0",
24179
24200
  flexGrow: "fg0",
24180
- height: "h1"
24201
+ height: "h1",
24202
+ transition: "transitionWidth"
24181
24203
  }), ...tid.spacer })
24182
24204
  ] }),
24183
24205
  /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(DocumentScrollOverlayRightPaneHost, { anchorRef: anchorRef.ref, spacerRef, paneWidth })
@@ -24202,26 +24224,24 @@ function DocumentScrollOverlayRightPaneHost(props) {
24202
24224
  return waitForRightPaneExit(() => setKeepOverlayChrome(false));
24203
24225
  }, [isRightPaneOpen]);
24204
24226
  (0, import_react124.useLayoutEffect)(() => {
24205
- const layoutRoot = anchorRef.current;
24206
24227
  const spacer = spacerRef.current;
24228
+ if (!spacer) return;
24229
+ spacer.style.width = isRightPaneOpen ? paneWidthCss : "0px";
24230
+ }, [isRightPaneOpen, paneWidthCss, spacerRef]);
24231
+ (0, import_react124.useLayoutEffect)(() => {
24232
+ const layoutRoot = anchorRef.current;
24207
24233
  if (!layoutRoot) return;
24208
24234
  const openPaneWidth = keepOverlayChrome ? paneWidthCss : "0px";
24209
24235
  const contentMin = keepOverlayChrome ? `${minDocumentScrollContentWidthPx}px` : "0px";
24210
24236
  layoutRoot.style.setProperty(beamRightPaneWidthVar, openPaneWidth);
24211
24237
  layoutRoot.style.setProperty(beamRightPaneContentMinVar, contentMin);
24212
24238
  document.documentElement.style.setProperty(beamFloatingRightOffsetVar, openPaneWidth);
24213
- if (spacer) {
24214
- spacer.style.width = openPaneWidth;
24215
- }
24216
24239
  return () => {
24217
24240
  layoutRoot.style.setProperty(beamRightPaneWidthVar, "0px");
24218
24241
  layoutRoot.style.setProperty(beamRightPaneContentMinVar, "0px");
24219
24242
  document.documentElement.style.setProperty(beamFloatingRightOffsetVar, "0px");
24220
- if (spacer) {
24221
- spacer.style.width = "0px";
24222
- }
24223
24243
  };
24224
- }, [anchorRef, keepOverlayChrome, paneWidthCss, spacerRef]);
24244
+ }, [anchorRef, keepOverlayChrome, paneWidthCss]);
24225
24245
  return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(DocumentScrollRightPane, { paneWidth, mobile: false, anchorRef });
24226
24246
  }
24227
24247
 
@@ -24856,7 +24876,7 @@ function RightPaneLayout(props) {
24856
24876
  width: ["w_var", {
24857
24877
  "--width": (0, import_runtime118.maybeCssVar)(__maybeInc22(`calc(100% - ${paneWidth + 24}px)`))
24858
24878
  }],
24859
- transition: "tsn_width_2s_linear",
24879
+ transition: "transitionWidth",
24860
24880
  height: "h100",
24861
24881
  marginRight: "mr3",
24862
24882
  overflowX: "oxa"
@@ -24919,13 +24939,13 @@ function RightPaneLayout(props) {
24919
24939
  x: 0
24920
24940
  },
24921
24941
  transition: {
24922
- ease: "linear",
24923
- duration: 0.2
24942
+ duration: 0.2,
24943
+ ease: [0.4, 0, 0.2, 1]
24924
24944
  },
24925
24945
  exit: {
24926
24946
  transition: {
24927
- ease: "linear",
24928
- duration: 0.2
24947
+ duration: 0.2,
24948
+ ease: [0.4, 0, 0.2, 1]
24929
24949
  },
24930
24950
  x: paneWidth
24931
24951
  },
@@ -24969,7 +24989,7 @@ function RightPanePanel(props) {
24969
24989
  flexShrink: "fs0"
24970
24990
  }), ...tid.header, children: [
24971
24991
  /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("div", { className: "fw6 fz_16px lh_24px", children: title }),
24972
- withClose && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(IconButton, { icon: "x", label: "Close", onClick: closeRightPane, ...tid.close })
24992
+ withClose && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(IconButton, { icon: "x", label: "Close", autoFocus: true, onClick: closeRightPane, ...tid.close })
24973
24993
  ] }),
24974
24994
  /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("div", { className: "fg1 mh0 oya pt2 pb2 pr2 pl2", ...tid.body, children })
24975
24995
  ] });
@@ -29380,7 +29400,7 @@ function PageHeaderLayout(props) {
29380
29400
  }
29381
29401
 
29382
29402
  // src/layouts/Workflow/WorkflowPageLayout.tsx
29383
- var import_react168 = require("react");
29403
+ var import_react169 = require("react");
29384
29404
 
29385
29405
  // src/components/Headers/WorkflowHeader.tsx
29386
29406
  var import_jsx_runtime236 = require("react/jsx-runtime");
@@ -29396,19 +29416,83 @@ function WorkflowHeader(props) {
29396
29416
  );
29397
29417
  }
29398
29418
 
29399
- // src/layouts/Workflow/useUnsavedChangesGuard.tsx
29419
+ // src/layouts/Workflow/RightPaneTriggers.tsx
29400
29420
  var import_react167 = require("react");
29401
- var import_react_router_dom9 = require("react-router-dom");
29421
+ var import_runtime157 = require("@homebound/truss/runtime");
29402
29422
  var import_jsx_runtime237 = require("react/jsx-runtime");
29423
+ var __maybeInc36 = (inc) => {
29424
+ return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
29425
+ };
29426
+ function WorkflowPageRightPaneTriggers(props) {
29427
+ const {
29428
+ triggers
29429
+ } = props;
29430
+ const {
29431
+ sm: isMobile
29432
+ } = useBreakpoint();
29433
+ const {
29434
+ isRightPaneOpen
29435
+ } = useRightPane();
29436
+ const {
29437
+ openRightPane
29438
+ } = useRightPaneActions();
29439
+ const tid = useTestIds(props, "rightPaneTriggers");
29440
+ const pageTriggerInsetPx = 24;
29441
+ const onClick = (0, import_react167.useCallback)((trigger) => {
29442
+ openRightPane({
29443
+ content: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(RightPanePanel, { title: trigger.label, children: trigger.content })
29444
+ });
29445
+ }, [openRightPane]);
29446
+ return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { ...tid, "aria-hidden": isRightPaneOpen, ...isRightPaneOpen ? {
29447
+ inert: true
29448
+ } : {}, ...(0, import_runtime157.trussProps)({
29449
+ ...{
29450
+ display: "df",
29451
+ alignItems: "aic",
29452
+ gap: "gap2",
29453
+ flexShrink: "fs0",
29454
+ ...!isMobile ? {
29455
+ transition: "transitionTransform",
29456
+ flexDirection: "fdc"
29457
+ } : {}
29458
+ },
29459
+ ...!isMobile && {
29460
+ position: "fixed",
29461
+ top: ["top_var", {
29462
+ "--top": (0, import_runtime157.maybeCssVar)(__maybeInc36(stickyNavAndHeaderOffset(pageTriggerInsetPx)))
29463
+ }],
29464
+ right: ["right_var", {
29465
+ "--right": `${pageTriggerInsetPx}px`
29466
+ }],
29467
+ zIndex: ["z_var", {
29468
+ "--zIndex": (0, import_runtime157.maybeCssVar)(zIndices.rightPaneTriggers)
29469
+ }]
29470
+ },
29471
+ // Desktop only — on `sm` the full-bleed pane covers the header slot.
29472
+ ...!isMobile && (isRightPaneOpen ? {
29473
+ transform: ["transform_var", {
29474
+ "--transform": (0, import_runtime157.maybeCssVar)(`translateX(calc(100% + ${pageTriggerInsetPx}px))`)
29475
+ }],
29476
+ pointerEvents: "pe_none"
29477
+ } : {
29478
+ transform: "tf_translateX_0"
29479
+ })
29480
+ }), children: triggers.map((trigger) => /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(IconButton, { icon: trigger.icon, label: trigger.label, variant: "circle", compact: isMobile, onClick: () => onClick(trigger), ...tid[trigger.icon] }, trigger.label)) });
29481
+ }
29482
+
29483
+ // src/layouts/Workflow/useUnsavedChangesGuard.tsx
29484
+ var import_react168 = require("react");
29485
+ var import_react_router_dom9 = require("react-router-dom");
29486
+ var import_jsx_runtime238 = require("react/jsx-runtime");
29403
29487
  function useUnsavedChangesGuard(options) {
29404
29488
  const { isDirty, allowNavigation, onCancel } = options;
29405
29489
  const { openModal } = useModal();
29406
- const isDirtyRef = (0, import_react167.useRef)(isDirty);
29490
+ const isDirtyRef = (0, import_react168.useRef)(isDirty);
29407
29491
  isDirtyRef.current = isDirty;
29408
- const allowNavigationRef = (0, import_react167.useRef)(allowNavigation);
29492
+ const allowNavigationRef = (0, import_react168.useRef)(allowNavigation);
29409
29493
  allowNavigationRef.current = allowNavigation;
29410
- const allowCancelNavigationRef = (0, import_react167.useRef)(false);
29411
- (0, import_react167.useEffect)(() => {
29494
+ const allowCancelNavigationRef = (0, import_react168.useRef)(false);
29495
+ (0, import_react168.useEffect)(() => {
29412
29496
  const onBeforeUnload = (e) => {
29413
29497
  if (isDirtyRef.current?.()) {
29414
29498
  e.preventDefault();
@@ -29435,7 +29519,7 @@ function useUnsavedChangesGuard(options) {
29435
29519
  }
29436
29520
  openModal({
29437
29521
  allowClosing: false,
29438
- content: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
29522
+ content: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
29439
29523
  });
29440
29524
  };
29441
29525
  const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
@@ -29444,10 +29528,10 @@ function useUnsavedChangesGuard(options) {
29444
29528
  function UnsavedChangesNavigationModal(props) {
29445
29529
  const { proceed, cancelNavigation } = props;
29446
29530
  const { openModal, closeModal } = useModal();
29447
- (0, import_react167.useEffect)(() => {
29531
+ (0, import_react168.useEffect)(() => {
29448
29532
  openModal({
29449
29533
  allowClosing: false,
29450
- content: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
29534
+ content: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
29451
29535
  });
29452
29536
  return () => closeModal();
29453
29537
  }, []);
@@ -29455,7 +29539,7 @@ function UnsavedChangesNavigationModal(props) {
29455
29539
  }
29456
29540
 
29457
29541
  // src/layouts/Workflow/WorkflowActions.tsx
29458
- var import_jsx_runtime238 = require("react/jsx-runtime");
29542
+ var import_jsx_runtime239 = require("react/jsx-runtime");
29459
29543
  function WorkflowActions(props) {
29460
29544
  const {
29461
29545
  onCancel,
@@ -29473,12 +29557,12 @@ function WorkflowActions(props) {
29473
29557
  sm: isMobile
29474
29558
  } = useBreakpoint();
29475
29559
  const primaryVariant = aiMode ? "ai" : "primary";
29476
- return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
29477
- /* @__PURE__ */ (0, import_jsx_runtime238.jsx)("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
29478
- /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { className: "df aic gap1", children: [
29479
- /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
29480
- onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
29481
- isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
29560
+ return /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
29561
+ /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
29562
+ /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)("div", { className: "df aic gap1", children: [
29563
+ /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
29564
+ onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
29565
+ isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
29482
29566
  await onContinue?.();
29483
29567
  }, disabled: primaryDisabled })
29484
29568
  ] })
@@ -29486,9 +29570,9 @@ function WorkflowActions(props) {
29486
29570
  }
29487
29571
 
29488
29572
  // src/layouts/Workflow/WorkflowPageLayout.tsx
29489
- var import_runtime157 = require("@homebound/truss/runtime");
29490
- var import_jsx_runtime239 = require("react/jsx-runtime");
29491
- var __maybeInc36 = (inc) => {
29573
+ var import_runtime158 = require("@homebound/truss/runtime");
29574
+ var import_jsx_runtime240 = require("react/jsx-runtime");
29575
+ var __maybeInc37 = (inc) => {
29492
29576
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
29493
29577
  };
29494
29578
  var mobileFooterHeightPx = 80;
@@ -29503,6 +29587,7 @@ function WorkflowPageLayout(props) {
29503
29587
  documentTitleSuffix,
29504
29588
  breadcrumbs,
29505
29589
  onCancel,
29590
+ rightPaneTriggers,
29506
29591
  ...actionProps
29507
29592
  } = props;
29508
29593
  const tid = useTestIds(props, "workflowPageLayout");
@@ -29517,8 +29602,10 @@ function WorkflowPageLayout(props) {
29517
29602
  allowNavigation,
29518
29603
  onCancel
29519
29604
  });
29520
- const actions = /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
29521
- const headerMetricsRef = (0, import_react168.useRef)(null);
29605
+ const actions = /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
29606
+ const triggers = rightPaneTriggers ?? [];
29607
+ const pageTriggers = triggers.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(WorkflowPageRightPaneTriggers, { triggers }) : void 0;
29608
+ const headerMetricsRef = (0, import_react169.useRef)(null);
29522
29609
  const headerHeight = useMeasuredHeight(headerMetricsRef, true);
29523
29610
  const headerWidth = documentScrollChromeWidth();
29524
29611
  const outerTop = bannerAndNavbarChromeTop();
@@ -29526,7 +29613,7 @@ function WorkflowPageLayout(props) {
29526
29613
  [beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
29527
29614
  } : void 0;
29528
29615
  const showFooter = isMobile;
29529
- (0, import_react168.useLayoutEffect)(() => {
29616
+ (0, import_react169.useLayoutEffect)(() => {
29530
29617
  const root = document.documentElement;
29531
29618
  const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
29532
29619
  root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
@@ -29538,32 +29625,32 @@ function WorkflowPageLayout(props) {
29538
29625
  }
29539
29626
  };
29540
29627
  }, [showFooter]);
29541
- return /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(DocumentScrollLayoutProvider, { children: [
29542
- /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)("div", { ...(0, import_runtime157.mergeProps)(void 0, cssVars, {
29628
+ return /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(DocumentScrollLayoutProvider, { children: [
29629
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)("div", { ...(0, import_runtime158.mergeProps)(void 0, cssVars, {
29543
29630
  display: "df",
29544
29631
  flexDirection: "fdc",
29545
29632
  width: "w100"
29546
29633
  }), ...tid, children: [
29547
- /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.mergeProps)(void 0, {
29634
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.mergeProps)(void 0, {
29548
29635
  height: headerHeight
29549
29636
  }, {
29550
29637
  flexShrink: "fs0",
29551
29638
  width: "w100"
29552
- }), children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime157.trussProps)({
29639
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime158.trussProps)({
29553
29640
  position: "fixed",
29554
29641
  left: "left0",
29555
29642
  width: ["w_var", {
29556
- "--width": (0, import_runtime157.maybeCssVar)(__maybeInc36(headerWidth))
29643
+ "--width": (0, import_runtime158.maybeCssVar)(__maybeInc37(headerWidth))
29557
29644
  }],
29558
29645
  zIndex: ["z_var", {
29559
- "--zIndex": (0, import_runtime157.maybeCssVar)(zIndices.pageStickyHeader)
29646
+ "--zIndex": (0, import_runtime158.maybeCssVar)(zIndices.pageStickyHeader)
29560
29647
  }],
29561
29648
  top: ["top_var", {
29562
- "--top": (0, import_runtime157.maybeCssVar)(__maybeInc36(outerTop))
29649
+ "--top": (0, import_runtime158.maybeCssVar)(__maybeInc37(outerTop))
29563
29650
  }],
29564
29651
  transition: "transitionAll"
29565
- }), ...tid.header, children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? void 0 : actions, stepperTabs }) }) }),
29566
- /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.trussProps)({
29652
+ }), ...tid.header, children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? pageTriggers : actions, stepperTabs }) }) }),
29653
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.trussProps)({
29567
29654
  ...{
29568
29655
  display: "df",
29569
29656
  flexDirection: "fdc",
@@ -29575,28 +29662,29 @@ function WorkflowPageLayout(props) {
29575
29662
  ...aiMode && {
29576
29663
  backgroundImage: "aiBackground",
29577
29664
  minHeight: ["mh_var", {
29578
- "--minHeight": (0, import_runtime157.maybeCssVar)(documentScrollBodyMinHeight())
29665
+ "--minHeight": (0, import_runtime158.maybeCssVar)(documentScrollBodyMinHeight())
29579
29666
  }]
29580
29667
  }
29581
- }), ...tid.body, children }),
29582
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.trussProps)({
29668
+ }), ...tid.body, children: triggers.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(DocumentScrollOverlayRightPaneLayout, { children }) : children }),
29669
+ !isMobile && pageTriggers,
29670
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.trussProps)({
29583
29671
  flexShrink: "fs0",
29584
29672
  width: "w100",
29585
29673
  height: ["h_var", {
29586
29674
  "--height": `${mobileFooterHeightPx}px`
29587
29675
  }]
29588
- }), children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.trussProps)({
29676
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.trussProps)({
29589
29677
  ...{
29590
29678
  position: "fixed",
29591
29679
  bottom: "bottom0",
29592
29680
  width: ["w_var", {
29593
- "--width": (0, import_runtime157.maybeCssVar)(__maybeInc36(headerWidth))
29681
+ "--width": (0, import_runtime158.maybeCssVar)(__maybeInc37(headerWidth))
29594
29682
  }],
29595
29683
  height: ["h_var", {
29596
29684
  "--height": `${mobileFooterHeightPx}px`
29597
29685
  }],
29598
29686
  zIndex: ["z_var", {
29599
- "--zIndex": (0, import_runtime157.maybeCssVar)(zIndices.pageStickyFooter)
29687
+ "--zIndex": (0, import_runtime158.maybeCssVar)(zIndices.pageStickyFooter)
29600
29688
  }],
29601
29689
  display: "df",
29602
29690
  alignItems: "aic",
@@ -29614,12 +29702,12 @@ function WorkflowPageLayout(props) {
29614
29702
  ...pageContentPaddingX
29615
29703
  }), ...tid.footer, children: actions }) })
29616
29704
  ] }),
29617
- navigationBlocker && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(UnsavedChangesNavigationModal, { ...navigationBlocker })
29705
+ navigationBlocker && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(UnsavedChangesNavigationModal, { ...navigationBlocker })
29618
29706
  ] });
29619
29707
  }
29620
29708
 
29621
29709
  // src/layouts/Workflow/FocusedFormLayout.tsx
29622
- var import_jsx_runtime240 = require("react/jsx-runtime");
29710
+ var import_jsx_runtime241 = require("react/jsx-runtime");
29623
29711
  function FocusedFormLayout(props) {
29624
29712
  const {
29625
29713
  onCancel,
@@ -29630,11 +29718,12 @@ function FocusedFormLayout(props) {
29630
29718
  isDirty,
29631
29719
  allowNavigation,
29632
29720
  aiMode,
29721
+ rightPaneTriggers,
29633
29722
  children,
29634
29723
  ...headerProps
29635
29724
  } = props;
29636
29725
  const tid = useTestIds(props, "focusedFormLayout");
29637
- return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
29726
+ return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
29638
29727
  WorkflowPageLayout,
29639
29728
  {
29640
29729
  ...tid,
@@ -29647,14 +29736,15 @@ function FocusedFormLayout(props) {
29647
29736
  completeLabel,
29648
29737
  onComplete,
29649
29738
  primaryDisabled,
29739
+ rightPaneTriggers,
29650
29740
  children
29651
29741
  }
29652
29742
  );
29653
29743
  }
29654
29744
 
29655
29745
  // src/layouts/Workflow/StepperLayout.tsx
29656
- var import_react169 = require("react");
29657
- var import_jsx_runtime241 = require("react/jsx-runtime");
29746
+ var import_react170 = require("react");
29747
+ var import_jsx_runtime242 = require("react/jsx-runtime");
29658
29748
  function StepperLayout(props) {
29659
29749
  const {
29660
29750
  steps,
@@ -29669,32 +29759,39 @@ function StepperLayout(props) {
29669
29759
  ...headerProps
29670
29760
  } = props;
29671
29761
  const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
29672
- const [currentStep, setCurrentStep] = (0, import_react169.useState)(() => getInitialStep(stepTabs, defaultStep));
29762
+ const [currentStep, setCurrentStep] = (0, import_react170.useState)(() => getInitialStep(stepTabs, defaultStep));
29673
29763
  const tid = useTestIds(props, "stepperLayout");
29764
+ const { closeRightPane } = useRightPaneActions();
29674
29765
  const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
29675
29766
  const isFirstStep = currentIndex <= 0;
29676
29767
  const isLastStep = currentIndex >= stepTabs.length - 1;
29677
29768
  const activeStep = stepTabs[currentIndex];
29678
- return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
29769
+ function goToStep(value) {
29770
+ if (value === currentStep) return;
29771
+ closeRightPane();
29772
+ setCurrentStep(value);
29773
+ }
29774
+ return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
29679
29775
  WorkflowPageLayout,
29680
29776
  {
29681
29777
  ...tid,
29682
29778
  ...headerProps,
29683
29779
  aiMode,
29684
- stepperTabs: { steps: stepTabs, currentStep, onChange: setCurrentStep },
29780
+ stepperTabs: { steps: stepTabs, currentStep, onChange: goToStep },
29685
29781
  isDirty,
29686
29782
  allowNavigation,
29687
29783
  isFirstStep,
29688
29784
  isLastStep,
29689
29785
  onBack: () => {
29690
29786
  const prev = stepTabs[currentIndex - 1];
29691
- if (prev) setCurrentStep(prev.value);
29787
+ if (prev) goToStep(prev.value);
29692
29788
  },
29693
29789
  onCancel,
29694
29790
  onSaveAndExit,
29695
29791
  completeLabel,
29696
29792
  onComplete,
29697
29793
  primaryDisabled: activeStep?.primaryDisabled,
29794
+ rightPaneTriggers: activeStep?.rightPaneTriggers,
29698
29795
  onContinue: async () => {
29699
29796
  const onContinue = activeStep?.onContinue;
29700
29797
  if (onContinue) {
@@ -29702,7 +29799,7 @@ function StepperLayout(props) {
29702
29799
  if (allowed === false) return;
29703
29800
  }
29704
29801
  const next = stepTabs[currentIndex + 1];
29705
- if (next) setCurrentStep(next.value);
29802
+ if (next) goToStep(next.value);
29706
29803
  },
29707
29804
  children: activeStep?.content
29708
29805
  }
@@ -29717,7 +29814,7 @@ function getInitialStep(steps, defaultStep) {
29717
29814
 
29718
29815
  // src/forms/BoundChipSelectField.tsx
29719
29816
  var import_mobx_react23 = require("mobx-react");
29720
- var import_jsx_runtime242 = require("react/jsx-runtime");
29817
+ var import_jsx_runtime243 = require("react/jsx-runtime");
29721
29818
  function BoundChipSelectField(props) {
29722
29819
  const {
29723
29820
  field,
@@ -29733,7 +29830,7 @@ function BoundChipSelectField(props) {
29733
29830
  ...others
29734
29831
  } = props;
29735
29832
  const testId = useTestIds(props, field.key);
29736
- return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_mobx_react23.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
29833
+ return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(import_mobx_react23.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
29737
29834
  ChipSelectField,
29738
29835
  {
29739
29836
  label,
@@ -29763,12 +29860,12 @@ function BoundChipSelectField(props) {
29763
29860
  }
29764
29861
 
29765
29862
  // src/forms/BoundSelectAndTextField.tsx
29766
- var import_jsx_runtime243 = require("react/jsx-runtime");
29863
+ var import_jsx_runtime244 = require("react/jsx-runtime");
29767
29864
  function BoundSelectAndTextField(props) {
29768
29865
  const { selectFieldProps, textFieldProps, compact = true } = props;
29769
29866
  const tid = useTestIds(props);
29770
- return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(CompoundField, { children: [
29771
- /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
29867
+ return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(CompoundField, { children: [
29868
+ /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
29772
29869
  BoundSelectField,
29773
29870
  {
29774
29871
  ...tid[defaultTestId(selectFieldProps.label ?? selectFieldProps.field.key)],
@@ -29777,7 +29874,7 @@ function BoundSelectAndTextField(props) {
29777
29874
  compact
29778
29875
  }
29779
29876
  ),
29780
- /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
29877
+ /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
29781
29878
  BoundTextField,
29782
29879
  {
29783
29880
  ...tid[defaultTestId(textFieldProps.label ?? textFieldProps.field.key)],
@@ -29789,8 +29886,8 @@ function BoundSelectAndTextField(props) {
29789
29886
  }
29790
29887
 
29791
29888
  // src/forms/FormHeading.tsx
29792
- var import_runtime158 = require("@homebound/truss/runtime");
29793
- var import_jsx_runtime244 = (
29889
+ var import_runtime159 = require("@homebound/truss/runtime");
29890
+ var import_jsx_runtime245 = (
29794
29891
  // Add space before the heading, but only if it's not first.
29795
29892
  require("react/jsx-runtime")
29796
29893
  );
@@ -29801,7 +29898,7 @@ function FormHeading(props) {
29801
29898
  isFirst = false,
29802
29899
  ...others
29803
29900
  } = props;
29804
- return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)("h3", { ...(0, import_runtime158.trussProps)({
29901
+ return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("h3", { ...(0, import_runtime159.trussProps)({
29805
29902
  ...{
29806
29903
  fontWeight: "fw4",
29807
29904
  fontSize: "fz_16px",
@@ -29817,8 +29914,8 @@ FormHeading.isFormHeading = true;
29817
29914
 
29818
29915
  // src/forms/StaticField.tsx
29819
29916
  var import_utils49 = require("@react-aria/utils");
29820
- var import_runtime159 = require("@homebound/truss/runtime");
29821
- var import_jsx_runtime245 = require("react/jsx-runtime");
29917
+ var import_runtime160 = require("@homebound/truss/runtime");
29918
+ var import_jsx_runtime246 = require("react/jsx-runtime");
29822
29919
  function StaticField(props) {
29823
29920
  const {
29824
29921
  fieldProps
@@ -29831,14 +29928,14 @@ function StaticField(props) {
29831
29928
  } = props;
29832
29929
  const tid = useTestIds(props, typeof label === "string" ? defaultTestId(label) : "staticField");
29833
29930
  const id = (0, import_utils49.useId)();
29834
- return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)("div", { ...(0, import_runtime159.trussProps)({
29931
+ return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)("div", { ...(0, import_runtime160.trussProps)({
29835
29932
  ...labelStyle === "left" ? {
29836
29933
  display: "df",
29837
29934
  justifyContent: "jcsb",
29838
29935
  maxWidth: "maxw100"
29839
29936
  } : {}
29840
29937
  }), ...tid.container, children: [
29841
- /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("label", { ...(0, import_runtime159.trussProps)({
29938
+ /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("label", { ...(0, import_runtime160.trussProps)({
29842
29939
  display: "db",
29843
29940
  fontWeight: "fw4",
29844
29941
  fontSize: "fz_14px",
@@ -29848,7 +29945,7 @@ function StaticField(props) {
29848
29945
  }],
29849
29946
  marginBottom: "mb_4px"
29850
29947
  }), htmlFor: id, ...tid.label, children: label }),
29851
- /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("div", { id, ...(0, import_runtime159.trussProps)({
29948
+ /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("div", { id, ...(0, import_runtime160.trussProps)({
29852
29949
  fontWeight: "fw4",
29853
29950
  fontSize: "fz_14px",
29854
29951
  lineHeight: "lh_20px",
@@ -29865,9 +29962,9 @@ function StaticField(props) {
29865
29962
  }
29866
29963
 
29867
29964
  // src/hooks/useFilter.ts
29868
- var import_react170 = require("react");
29965
+ var import_react171 = require("react");
29869
29966
  function useFilter4({ filterDefs }) {
29870
- const [filter, setFilter] = (0, import_react170.useState)(
29967
+ const [filter, setFilter] = (0, import_react171.useState)(
29871
29968
  Object.fromEntries(
29872
29969
  safeEntries(filterDefs).filter(([key, def]) => def(key).defaultValue !== void 0).map(([key, def]) => [key, def(key).defaultValue])
29873
29970
  )
@@ -29876,10 +29973,10 @@ function useFilter4({ filterDefs }) {
29876
29973
  }
29877
29974
 
29878
29975
  // src/inputs/Autocomplete.tsx
29879
- var import_react171 = require("react");
29976
+ var import_react172 = require("react");
29880
29977
  var import_react_aria66 = require("react-aria");
29881
29978
  var import_react_stately18 = require("react-stately");
29882
- var import_jsx_runtime246 = require("react/jsx-runtime");
29979
+ var import_jsx_runtime247 = require("react/jsx-runtime");
29883
29980
  function Autocomplete(props) {
29884
29981
  const {
29885
29982
  onSelect,
@@ -29896,8 +29993,8 @@ function Autocomplete(props) {
29896
29993
  } = props;
29897
29994
  const { effectiveValue, proposalProps } = useAiProposal(value, proposedValue);
29898
29995
  const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
29899
- const comboBoxChildren = (0, import_react171.useCallback)(
29900
- (item) => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_stately18.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
29996
+ const comboBoxChildren = (0, import_react172.useCallback)(
29997
+ (item) => /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_react_stately18.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
29901
29998
  [getOptionValue, getOptionLabel, getOptionMenuLabel]
29902
29999
  );
29903
30000
  const comboBoxProps = {
@@ -29921,10 +30018,10 @@ function Autocomplete(props) {
29921
30018
  ...others
29922
30019
  };
29923
30020
  const state = (0, import_react_stately18.useComboBoxState)(comboBoxProps);
29924
- const inputWrapRef = (0, import_react171.useRef)(null);
29925
- const inputRef = (0, import_react171.useRef)(null);
29926
- const listBoxRef = (0, import_react171.useRef)(null);
29927
- const popoverRef = (0, import_react171.useRef)(null);
30021
+ const inputWrapRef = (0, import_react172.useRef)(null);
30022
+ const inputRef = (0, import_react172.useRef)(null);
30023
+ const listBoxRef = (0, import_react172.useRef)(null);
30024
+ const popoverRef = (0, import_react172.useRef)(null);
29928
30025
  const { inputProps, listBoxProps, labelProps } = (0, import_react_aria66.useComboBox)(
29929
30026
  {
29930
30027
  ...comboBoxProps,
@@ -29950,8 +30047,8 @@ function Autocomplete(props) {
29950
30047
  // Ensures the menu never gets too small.
29951
30048
  minWidth: 200
29952
30049
  };
29953
- return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_jsx_runtime246.Fragment, { children: [
29954
- /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
30050
+ return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(import_jsx_runtime247.Fragment, { children: [
30051
+ /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
29955
30052
  TextFieldBase,
29956
30053
  {
29957
30054
  inputRef,
@@ -29961,11 +30058,11 @@ function Autocomplete(props) {
29961
30058
  onChange: onInputChange,
29962
30059
  ...proposalProps,
29963
30060
  clearable: true,
29964
- startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Icon, { icon: "search" }),
30061
+ startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Icon, { icon: "search" }),
29965
30062
  ...others
29966
30063
  }
29967
30064
  ),
29968
- state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
30065
+ state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
29969
30066
  Popover,
29970
30067
  {
29971
30068
  triggerRef: inputRef,
@@ -29974,7 +30071,7 @@ function Autocomplete(props) {
29974
30071
  onClose: () => state.close(),
29975
30072
  isOpen: state.isOpen,
29976
30073
  minWidth: 200,
29977
- children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
30074
+ children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
29978
30075
  ListBox,
29979
30076
  {
29980
30077
  ...listBoxProps,
@@ -29992,11 +30089,11 @@ function Autocomplete(props) {
29992
30089
  }
29993
30090
 
29994
30091
  // src/inputs/ToggleButton.tsx
29995
- var import_react172 = require("react");
30092
+ var import_react173 = require("react");
29996
30093
  var import_react_aria67 = require("react-aria");
29997
30094
  var import_react_stately19 = require("react-stately");
29998
- var import_runtime160 = require("@homebound/truss/runtime");
29999
- var import_jsx_runtime247 = require("react/jsx-runtime");
30095
+ var import_runtime161 = require("@homebound/truss/runtime");
30096
+ var import_jsx_runtime248 = require("react/jsx-runtime");
30000
30097
  function ToggleButton(props) {
30001
30098
  const {
30002
30099
  selected: isSelected = false,
@@ -30007,7 +30104,7 @@ function ToggleButton(props) {
30007
30104
  __storyState,
30008
30105
  ...otherProps
30009
30106
  } = props;
30010
- const [asyncInProgress, setAsyncInProgress] = (0, import_react172.useState)(false);
30107
+ const [asyncInProgress, setAsyncInProgress] = (0, import_react173.useState)(false);
30011
30108
  const isDisabled = !!disabled || asyncInProgress;
30012
30109
  const ariaProps = {
30013
30110
  "aria-label": label,
@@ -30026,8 +30123,8 @@ function ToggleButton(props) {
30026
30123
  return result;
30027
30124
  }
30028
30125
  });
30029
- const labelRef = (0, import_react172.useRef)(null);
30030
- const ref = (0, import_react172.useRef)(null);
30126
+ const labelRef = (0, import_react173.useRef)(null);
30127
+ const ref = (0, import_react173.useRef)(null);
30031
30128
  const tid = useTestIds(otherProps, label);
30032
30129
  const {
30033
30130
  isPressed: isPressedFromEvents,
@@ -30060,7 +30157,7 @@ function ToggleButton(props) {
30060
30157
  ...focusProps,
30061
30158
  ...hoverProps,
30062
30159
  ...pressProps,
30063
- ...(0, import_runtime160.trussProps)({
30160
+ ...(0, import_runtime161.trussProps)({
30064
30161
  // Gray500 off-state has no semantic match — keep palette (OnSurfaceMuted is Gray700).
30065
30162
  ...{
30066
30163
  borderRadius: "br4",
@@ -30100,10 +30197,10 @@ function ToggleButton(props) {
30100
30197
  return maybeTooltip({
30101
30198
  title: tooltip,
30102
30199
  placement: "top",
30103
- children: /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)("label", { ...labelAttrs, children: [
30104
- icon && /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Icon, { icon }),
30200
+ children: /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)("label", { ...labelAttrs, children: [
30201
+ icon && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Icon, { icon }),
30105
30202
  label,
30106
- /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_react_aria67.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)("input", { ref, ...inputProps, ...tid.value }) })
30203
+ /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_react_aria67.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("input", { ref, ...inputProps, ...tid.value }) })
30107
30204
  ] })
30108
30205
  });
30109
30206
  }