@homebound/beam 4.10.0 → 4.11.1

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,96 @@ 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: ["bgColor_var", {
6143
+ "--backgroundColor": "var(--b-surface-raised-hover)"
6144
+ }]
6145
+ },
6146
+ focus: {
6147
+ backgroundColor: ["bgColor_var", {
6148
+ "--backgroundColor": "var(--b-surface-raised-hover)"
6149
+ }],
6150
+ borderColor: ["bc_var", {
6151
+ "--borderColor": "var(--b-field-border-focus)"
6152
+ }]
6153
+ },
6154
+ pressed: {
6155
+ backgroundColor: ["bgColor_var", {
6156
+ "--backgroundColor": "var(--b-neutral-fill-pressed)"
6157
+ }],
6158
+ borderColor: ["bc_var", {
6159
+ "--borderColor": "var(--b-neutral-fill-pressed)"
6160
+ }]
6161
+ }
6162
+ };
6163
+ }
6164
+ if (variant === "outline") {
6165
+ return {
6166
+ base: {
6167
+ borderRadius: "br8",
6168
+ width: "w_42px",
6169
+ height: "h_40px",
6170
+ borderColor: "bcGray300",
6171
+ borderStyle: "bss",
6172
+ borderWidth: "bw1",
6173
+ display: "df",
6174
+ justifyContent: "jcc",
6175
+ alignItems: "aic",
6176
+ backgroundColor: ["bgColor_var", {
6177
+ "--backgroundColor": "var(--b-surface-raised)"
6178
+ }]
6179
+ },
6180
+ hover: {
6181
+ backgroundColor: ["bgColor_var", {
6182
+ "--backgroundColor": "var(--b-surface-raised-hover)"
6183
+ }]
6184
+ },
6185
+ focus: {
6186
+ boxShadow: "bshFocus"
6187
+ },
6188
+ pressed: {
6189
+ backgroundColor: ["bgColor_var", {
6190
+ "--backgroundColor": "var(--b-surface-raised-pressed)"
6191
+ }]
6192
+ }
6193
+ };
6194
+ }
6195
+ return {
6196
+ base: compact ? {
6141
6197
  height: "h_18px",
6142
6198
  width: "w_18px",
6143
6199
  borderRadius: "br4",
6144
6200
  borderWidth: "bw1"
6201
+ } : {
6202
+ height: "h_28px",
6203
+ width: "w_28px",
6204
+ borderRadius: "br8",
6205
+ borderWidth: "bw2"
6145
6206
  },
6146
6207
  hover: {
6147
6208
  backgroundColor: ["bgColor_var", {
@@ -6158,71 +6219,8 @@ var variantStyles = {
6158
6219
  "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
6159
6220
  }]
6160
6221
  }
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
- };
6222
+ };
6223
+ }
6226
6224
 
6227
6225
  // src/components/Table/utils/TableState.ts
6228
6226
  var import_mobx8 = require("mobx");
@@ -6439,6 +6437,8 @@ var zIndices = {
6439
6437
  scrollShadow: 50,
6440
6438
  // Document-scroll detail pane (DocumentScrollOverlayRightPaneLayout) — above table sticky chrome, below page sticky headers.
6441
6439
  rightPane: 60,
6440
+ // Workflow floating right-pane triggers — above the pane, below sticky headers.
6441
+ rightPaneTriggers: 65,
6442
6442
  pageStickyHeader: 70,
6443
6443
  // Sticky mobile action footer (workflow layouts) — same tier as pageStickyHeader; header and footer never overlap on screen.
6444
6444
  pageStickyFooter: 70,
@@ -24045,50 +24045,65 @@ function DocumentScrollRightPane({
24045
24045
  height: paneBounds.heightPx,
24046
24046
  maxHeight: paneBounds.heightPx
24047
24047
  } : void 0;
24048
- 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, ...{
24049
- [rightPaneContentDataAttribute]: true
24050
- }, ...tid, ...(0, import_runtime111.mergeProps)(void 0, paneStyle, mobile ? {
24051
- position: "fixed",
24052
- right: "right0",
24053
- bottom: "bottom0",
24054
- left: "left0",
24055
- overflowY: "oya",
24056
- backgroundColor: ["bgColor_var", {
24057
- "--backgroundColor": "var(--b-surface)"
24058
- }],
24059
- zIndex: ["z_var", {
24060
- "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPaneMobile)
24061
- }]
24062
- } : {
24063
- position: "fixed",
24064
- right: "right0",
24065
- overflowY: "oya",
24066
- width: ["w_var", {
24067
- "--width": (0, import_runtime111.maybeCssVar)(__maybeInc20(paneWidthCss))
24068
- }],
24069
- backgroundColor: ["bgColor_var", {
24070
- "--backgroundColor": "var(--b-surface)"
24071
- }],
24072
- zIndex: ["z_var", {
24073
- "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPane)
24074
- }],
24075
- borderLeftStyle: "bls_solid",
24076
- borderLeftWidth: "blw_1px",
24077
- borderColor: ["bc_var", {
24078
- "--borderColor": "var(--b-surface-separator)"
24079
- }]
24080
- }), initial: {
24081
- x: slideX
24082
- }, animate: {
24083
- x: 0
24084
- }, exit: {
24085
- x: slideX
24086
- }, transition: {
24087
- ease: "linear",
24088
- duration: 0.2
24089
- }, onAnimationComplete: (definition) => {
24090
- if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
24091
- }, children: rightPaneContent }, "documentScrollRightPane") });
24048
+ const pane = /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_framer_motion3.AnimatePresence, { children: isRightPaneOpen && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
24049
+ import_framer_motion3.motion.div,
24050
+ {
24051
+ ref: paneRef,
24052
+ ...{
24053
+ [rightPaneContentDataAttribute]: true
24054
+ },
24055
+ ...tid,
24056
+ ...(0, import_runtime111.mergeProps)(void 0, paneStyle, mobile ? {
24057
+ position: "fixed",
24058
+ right: "right0",
24059
+ bottom: "bottom0",
24060
+ left: "left0",
24061
+ overflowY: "oya",
24062
+ backgroundColor: ["bgColor_var", {
24063
+ "--backgroundColor": "var(--b-surface)"
24064
+ }],
24065
+ zIndex: ["z_var", {
24066
+ "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPaneMobile)
24067
+ }]
24068
+ } : {
24069
+ position: "fixed",
24070
+ right: "right0",
24071
+ overflowY: "oya",
24072
+ width: ["w_var", {
24073
+ "--width": (0, import_runtime111.maybeCssVar)(__maybeInc20(paneWidthCss))
24074
+ }],
24075
+ backgroundColor: ["bgColor_var", {
24076
+ "--backgroundColor": "var(--b-surface)"
24077
+ }],
24078
+ zIndex: ["z_var", {
24079
+ "--zIndex": (0, import_runtime111.maybeCssVar)(zIndices.rightPane)
24080
+ }],
24081
+ borderLeftStyle: "bls_solid",
24082
+ borderLeftWidth: "blw_1px",
24083
+ borderColor: ["bc_var", {
24084
+ "--borderColor": "var(--b-surface-separator)"
24085
+ }]
24086
+ }),
24087
+ initial: {
24088
+ x: slideX
24089
+ },
24090
+ animate: {
24091
+ x: 0
24092
+ },
24093
+ exit: {
24094
+ x: slideX
24095
+ },
24096
+ transition: {
24097
+ duration: 0.2,
24098
+ ease: [0.4, 0, 0.2, 1]
24099
+ },
24100
+ onAnimationComplete: (definition) => {
24101
+ if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
24102
+ },
24103
+ children: rightPaneContent
24104
+ },
24105
+ "documentScrollRightPane"
24106
+ ) });
24092
24107
  return (0, import_react_dom6.createPortal)(pane, document.body);
24093
24108
  }
24094
24109
 
@@ -24186,7 +24201,8 @@ function DocumentScrollOverlayRightPaneLayout({
24186
24201
  }, {
24187
24202
  flexShrink: "fs0",
24188
24203
  flexGrow: "fg0",
24189
- height: "h1"
24204
+ height: "h1",
24205
+ transition: "transitionWidth"
24190
24206
  }), ...tid.spacer })
24191
24207
  ] }),
24192
24208
  /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(DocumentScrollOverlayRightPaneHost, { anchorRef: anchorRef.ref, spacerRef, paneWidth })
@@ -24211,26 +24227,24 @@ function DocumentScrollOverlayRightPaneHost(props) {
24211
24227
  return waitForRightPaneExit(() => setKeepOverlayChrome(false));
24212
24228
  }, [isRightPaneOpen]);
24213
24229
  (0, import_react124.useLayoutEffect)(() => {
24214
- const layoutRoot = anchorRef.current;
24215
24230
  const spacer = spacerRef.current;
24231
+ if (!spacer) return;
24232
+ spacer.style.width = isRightPaneOpen ? paneWidthCss : "0px";
24233
+ }, [isRightPaneOpen, paneWidthCss, spacerRef]);
24234
+ (0, import_react124.useLayoutEffect)(() => {
24235
+ const layoutRoot = anchorRef.current;
24216
24236
  if (!layoutRoot) return;
24217
24237
  const openPaneWidth = keepOverlayChrome ? paneWidthCss : "0px";
24218
24238
  const contentMin = keepOverlayChrome ? `${minDocumentScrollContentWidthPx}px` : "0px";
24219
24239
  layoutRoot.style.setProperty(beamRightPaneWidthVar, openPaneWidth);
24220
24240
  layoutRoot.style.setProperty(beamRightPaneContentMinVar, contentMin);
24221
24241
  document.documentElement.style.setProperty(beamFloatingRightOffsetVar, openPaneWidth);
24222
- if (spacer) {
24223
- spacer.style.width = openPaneWidth;
24224
- }
24225
24242
  return () => {
24226
24243
  layoutRoot.style.setProperty(beamRightPaneWidthVar, "0px");
24227
24244
  layoutRoot.style.setProperty(beamRightPaneContentMinVar, "0px");
24228
24245
  document.documentElement.style.setProperty(beamFloatingRightOffsetVar, "0px");
24229
- if (spacer) {
24230
- spacer.style.width = "0px";
24231
- }
24232
24246
  };
24233
- }, [anchorRef, keepOverlayChrome, paneWidthCss, spacerRef]);
24247
+ }, [anchorRef, keepOverlayChrome, paneWidthCss]);
24234
24248
  return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(DocumentScrollRightPane, { paneWidth, mobile: false, anchorRef });
24235
24249
  }
24236
24250
 
@@ -24865,7 +24879,7 @@ function RightPaneLayout(props) {
24865
24879
  width: ["w_var", {
24866
24880
  "--width": (0, import_runtime118.maybeCssVar)(__maybeInc22(`calc(100% - ${paneWidth + 24}px)`))
24867
24881
  }],
24868
- transition: "tsn_width_2s_linear",
24882
+ transition: "transitionWidth",
24869
24883
  height: "h100",
24870
24884
  marginRight: "mr3",
24871
24885
  overflowX: "oxa"
@@ -24928,13 +24942,13 @@ function RightPaneLayout(props) {
24928
24942
  x: 0
24929
24943
  },
24930
24944
  transition: {
24931
- ease: "linear",
24932
- duration: 0.2
24945
+ duration: 0.2,
24946
+ ease: [0.4, 0, 0.2, 1]
24933
24947
  },
24934
24948
  exit: {
24935
24949
  transition: {
24936
- ease: "linear",
24937
- duration: 0.2
24950
+ duration: 0.2,
24951
+ ease: [0.4, 0, 0.2, 1]
24938
24952
  },
24939
24953
  x: paneWidth
24940
24954
  },
@@ -24978,7 +24992,7 @@ function RightPanePanel(props) {
24978
24992
  flexShrink: "fs0"
24979
24993
  }), ...tid.header, children: [
24980
24994
  /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("div", { className: "fw6 fz_16px lh_24px", children: title }),
24981
- withClose && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(IconButton, { icon: "x", label: "Close", onClick: closeRightPane, ...tid.close })
24995
+ withClose && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(IconButton, { icon: "x", label: "Close", autoFocus: true, onClick: closeRightPane, ...tid.close })
24982
24996
  ] }),
24983
24997
  /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("div", { className: "fg1 mh0 oya pt2 pb2 pr2 pl2", ...tid.body, children })
24984
24998
  ] });
@@ -29389,7 +29403,7 @@ function PageHeaderLayout(props) {
29389
29403
  }
29390
29404
 
29391
29405
  // src/layouts/Workflow/WorkflowPageLayout.tsx
29392
- var import_react168 = require("react");
29406
+ var import_react169 = require("react");
29393
29407
 
29394
29408
  // src/components/Headers/WorkflowHeader.tsx
29395
29409
  var import_jsx_runtime236 = require("react/jsx-runtime");
@@ -29405,19 +29419,83 @@ function WorkflowHeader(props) {
29405
29419
  );
29406
29420
  }
29407
29421
 
29408
- // src/layouts/Workflow/useUnsavedChangesGuard.tsx
29422
+ // src/layouts/Workflow/RightPaneTriggers.tsx
29409
29423
  var import_react167 = require("react");
29410
- var import_react_router_dom9 = require("react-router-dom");
29424
+ var import_runtime157 = require("@homebound/truss/runtime");
29411
29425
  var import_jsx_runtime237 = require("react/jsx-runtime");
29426
+ var __maybeInc36 = (inc) => {
29427
+ return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
29428
+ };
29429
+ function WorkflowPageRightPaneTriggers(props) {
29430
+ const {
29431
+ triggers
29432
+ } = props;
29433
+ const {
29434
+ sm: isMobile
29435
+ } = useBreakpoint();
29436
+ const {
29437
+ isRightPaneOpen
29438
+ } = useRightPane();
29439
+ const {
29440
+ openRightPane
29441
+ } = useRightPaneActions();
29442
+ const tid = useTestIds(props, "rightPaneTriggers");
29443
+ const pageTriggerInsetPx = 24;
29444
+ const onClick = (0, import_react167.useCallback)((trigger) => {
29445
+ openRightPane({
29446
+ content: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(RightPanePanel, { title: trigger.label, children: trigger.content })
29447
+ });
29448
+ }, [openRightPane]);
29449
+ return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { ...tid, "aria-hidden": isRightPaneOpen, ...isRightPaneOpen ? {
29450
+ inert: true
29451
+ } : {}, ...(0, import_runtime157.trussProps)({
29452
+ ...{
29453
+ display: "df",
29454
+ alignItems: "aic",
29455
+ gap: "gap2",
29456
+ flexShrink: "fs0",
29457
+ ...!isMobile ? {
29458
+ transition: "transitionTransform",
29459
+ flexDirection: "fdc"
29460
+ } : {}
29461
+ },
29462
+ ...!isMobile && {
29463
+ position: "fixed",
29464
+ top: ["top_var", {
29465
+ "--top": (0, import_runtime157.maybeCssVar)(__maybeInc36(stickyNavAndHeaderOffset(pageTriggerInsetPx)))
29466
+ }],
29467
+ right: ["right_var", {
29468
+ "--right": `${pageTriggerInsetPx}px`
29469
+ }],
29470
+ zIndex: ["z_var", {
29471
+ "--zIndex": (0, import_runtime157.maybeCssVar)(zIndices.rightPaneTriggers)
29472
+ }]
29473
+ },
29474
+ // Desktop only — on `sm` the full-bleed pane covers the header slot.
29475
+ ...!isMobile && (isRightPaneOpen ? {
29476
+ transform: ["transform_var", {
29477
+ "--transform": (0, import_runtime157.maybeCssVar)(`translateX(calc(100% + ${pageTriggerInsetPx}px))`)
29478
+ }],
29479
+ pointerEvents: "pe_none"
29480
+ } : {
29481
+ transform: "tf_translateX_0"
29482
+ })
29483
+ }), 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)) });
29484
+ }
29485
+
29486
+ // src/layouts/Workflow/useUnsavedChangesGuard.tsx
29487
+ var import_react168 = require("react");
29488
+ var import_react_router_dom9 = require("react-router-dom");
29489
+ var import_jsx_runtime238 = require("react/jsx-runtime");
29412
29490
  function useUnsavedChangesGuard(options) {
29413
29491
  const { isDirty, allowNavigation, onCancel } = options;
29414
29492
  const { openModal } = useModal();
29415
- const isDirtyRef = (0, import_react167.useRef)(isDirty);
29493
+ const isDirtyRef = (0, import_react168.useRef)(isDirty);
29416
29494
  isDirtyRef.current = isDirty;
29417
- const allowNavigationRef = (0, import_react167.useRef)(allowNavigation);
29495
+ const allowNavigationRef = (0, import_react168.useRef)(allowNavigation);
29418
29496
  allowNavigationRef.current = allowNavigation;
29419
- const allowCancelNavigationRef = (0, import_react167.useRef)(false);
29420
- (0, import_react167.useEffect)(() => {
29497
+ const allowCancelNavigationRef = (0, import_react168.useRef)(false);
29498
+ (0, import_react168.useEffect)(() => {
29421
29499
  const onBeforeUnload = (e) => {
29422
29500
  if (isDirtyRef.current?.()) {
29423
29501
  e.preventDefault();
@@ -29444,7 +29522,7 @@ function useUnsavedChangesGuard(options) {
29444
29522
  }
29445
29523
  openModal({
29446
29524
  allowClosing: false,
29447
- content: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
29525
+ content: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
29448
29526
  });
29449
29527
  };
29450
29528
  const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
@@ -29453,10 +29531,10 @@ function useUnsavedChangesGuard(options) {
29453
29531
  function UnsavedChangesNavigationModal(props) {
29454
29532
  const { proceed, cancelNavigation } = props;
29455
29533
  const { openModal, closeModal } = useModal();
29456
- (0, import_react167.useEffect)(() => {
29534
+ (0, import_react168.useEffect)(() => {
29457
29535
  openModal({
29458
29536
  allowClosing: false,
29459
- content: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
29537
+ content: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
29460
29538
  });
29461
29539
  return () => closeModal();
29462
29540
  }, []);
@@ -29464,7 +29542,7 @@ function UnsavedChangesNavigationModal(props) {
29464
29542
  }
29465
29543
 
29466
29544
  // src/layouts/Workflow/WorkflowActions.tsx
29467
- var import_jsx_runtime238 = require("react/jsx-runtime");
29545
+ var import_jsx_runtime239 = require("react/jsx-runtime");
29468
29546
  function WorkflowActions(props) {
29469
29547
  const {
29470
29548
  onCancel,
@@ -29482,12 +29560,12 @@ function WorkflowActions(props) {
29482
29560
  sm: isMobile
29483
29561
  } = useBreakpoint();
29484
29562
  const primaryVariant = aiMode ? "ai" : "primary";
29485
- return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
29486
- /* @__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 }) }),
29487
- /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { className: "df aic gap1", children: [
29488
- /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
29489
- onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
29490
- 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 () => {
29563
+ return /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
29564
+ /* @__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 }) }),
29565
+ /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)("div", { className: "df aic gap1", children: [
29566
+ /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
29567
+ onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
29568
+ 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 () => {
29491
29569
  await onContinue?.();
29492
29570
  }, disabled: primaryDisabled })
29493
29571
  ] })
@@ -29495,9 +29573,9 @@ function WorkflowActions(props) {
29495
29573
  }
29496
29574
 
29497
29575
  // src/layouts/Workflow/WorkflowPageLayout.tsx
29498
- var import_runtime157 = require("@homebound/truss/runtime");
29499
- var import_jsx_runtime239 = require("react/jsx-runtime");
29500
- var __maybeInc36 = (inc) => {
29576
+ var import_runtime158 = require("@homebound/truss/runtime");
29577
+ var import_jsx_runtime240 = require("react/jsx-runtime");
29578
+ var __maybeInc37 = (inc) => {
29501
29579
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
29502
29580
  };
29503
29581
  var mobileFooterHeightPx = 80;
@@ -29512,6 +29590,7 @@ function WorkflowPageLayout(props) {
29512
29590
  documentTitleSuffix,
29513
29591
  breadcrumbs,
29514
29592
  onCancel,
29593
+ rightPaneTriggers,
29515
29594
  ...actionProps
29516
29595
  } = props;
29517
29596
  const tid = useTestIds(props, "workflowPageLayout");
@@ -29526,8 +29605,10 @@ function WorkflowPageLayout(props) {
29526
29605
  allowNavigation,
29527
29606
  onCancel
29528
29607
  });
29529
- const actions = /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
29530
- const headerMetricsRef = (0, import_react168.useRef)(null);
29608
+ const actions = /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
29609
+ const triggers = rightPaneTriggers ?? [];
29610
+ const pageTriggers = triggers.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(WorkflowPageRightPaneTriggers, { triggers }) : void 0;
29611
+ const headerMetricsRef = (0, import_react169.useRef)(null);
29531
29612
  const headerHeight = useMeasuredHeight(headerMetricsRef, true);
29532
29613
  const headerWidth = documentScrollChromeWidth();
29533
29614
  const outerTop = bannerAndNavbarChromeTop();
@@ -29535,7 +29616,7 @@ function WorkflowPageLayout(props) {
29535
29616
  [beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
29536
29617
  } : void 0;
29537
29618
  const showFooter = isMobile;
29538
- (0, import_react168.useLayoutEffect)(() => {
29619
+ (0, import_react169.useLayoutEffect)(() => {
29539
29620
  const root = document.documentElement;
29540
29621
  const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
29541
29622
  root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
@@ -29547,32 +29628,32 @@ function WorkflowPageLayout(props) {
29547
29628
  }
29548
29629
  };
29549
29630
  }, [showFooter]);
29550
- return /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(DocumentScrollLayoutProvider, { children: [
29551
- /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)("div", { ...(0, import_runtime157.mergeProps)(void 0, cssVars, {
29631
+ return /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(DocumentScrollLayoutProvider, { children: [
29632
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)("div", { ...(0, import_runtime158.mergeProps)(void 0, cssVars, {
29552
29633
  display: "df",
29553
29634
  flexDirection: "fdc",
29554
29635
  width: "w100"
29555
29636
  }), ...tid, children: [
29556
- /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.mergeProps)(void 0, {
29637
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.mergeProps)(void 0, {
29557
29638
  height: headerHeight
29558
29639
  }, {
29559
29640
  flexShrink: "fs0",
29560
29641
  width: "w100"
29561
- }), children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime157.trussProps)({
29642
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime158.trussProps)({
29562
29643
  position: "fixed",
29563
29644
  left: "left0",
29564
29645
  width: ["w_var", {
29565
- "--width": (0, import_runtime157.maybeCssVar)(__maybeInc36(headerWidth))
29646
+ "--width": (0, import_runtime158.maybeCssVar)(__maybeInc37(headerWidth))
29566
29647
  }],
29567
29648
  zIndex: ["z_var", {
29568
- "--zIndex": (0, import_runtime157.maybeCssVar)(zIndices.pageStickyHeader)
29649
+ "--zIndex": (0, import_runtime158.maybeCssVar)(zIndices.pageStickyHeader)
29569
29650
  }],
29570
29651
  top: ["top_var", {
29571
- "--top": (0, import_runtime157.maybeCssVar)(__maybeInc36(outerTop))
29652
+ "--top": (0, import_runtime158.maybeCssVar)(__maybeInc37(outerTop))
29572
29653
  }],
29573
29654
  transition: "transitionAll"
29574
- }), ...tid.header, children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? void 0 : actions, stepperTabs }) }) }),
29575
- /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.trussProps)({
29655
+ }), ...tid.header, children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? pageTriggers : actions, stepperTabs }) }) }),
29656
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.trussProps)({
29576
29657
  ...{
29577
29658
  display: "df",
29578
29659
  flexDirection: "fdc",
@@ -29584,28 +29665,29 @@ function WorkflowPageLayout(props) {
29584
29665
  ...aiMode && {
29585
29666
  backgroundImage: "aiBackground",
29586
29667
  minHeight: ["mh_var", {
29587
- "--minHeight": (0, import_runtime157.maybeCssVar)(documentScrollBodyMinHeight())
29668
+ "--minHeight": (0, import_runtime158.maybeCssVar)(documentScrollBodyMinHeight())
29588
29669
  }]
29589
29670
  }
29590
- }), ...tid.body, children }),
29591
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.trussProps)({
29671
+ }), ...tid.body, children: triggers.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(DocumentScrollOverlayRightPaneLayout, { children }) : children }),
29672
+ !isMobile && pageTriggers,
29673
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.trussProps)({
29592
29674
  flexShrink: "fs0",
29593
29675
  width: "w100",
29594
29676
  height: ["h_var", {
29595
29677
  "--height": `${mobileFooterHeightPx}px`
29596
29678
  }]
29597
- }), children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { ...(0, import_runtime157.trussProps)({
29679
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...(0, import_runtime158.trussProps)({
29598
29680
  ...{
29599
29681
  position: "fixed",
29600
29682
  bottom: "bottom0",
29601
29683
  width: ["w_var", {
29602
- "--width": (0, import_runtime157.maybeCssVar)(__maybeInc36(headerWidth))
29684
+ "--width": (0, import_runtime158.maybeCssVar)(__maybeInc37(headerWidth))
29603
29685
  }],
29604
29686
  height: ["h_var", {
29605
29687
  "--height": `${mobileFooterHeightPx}px`
29606
29688
  }],
29607
29689
  zIndex: ["z_var", {
29608
- "--zIndex": (0, import_runtime157.maybeCssVar)(zIndices.pageStickyFooter)
29690
+ "--zIndex": (0, import_runtime158.maybeCssVar)(zIndices.pageStickyFooter)
29609
29691
  }],
29610
29692
  display: "df",
29611
29693
  alignItems: "aic",
@@ -29623,12 +29705,12 @@ function WorkflowPageLayout(props) {
29623
29705
  ...pageContentPaddingX
29624
29706
  }), ...tid.footer, children: actions }) })
29625
29707
  ] }),
29626
- navigationBlocker && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(UnsavedChangesNavigationModal, { ...navigationBlocker })
29708
+ navigationBlocker && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(UnsavedChangesNavigationModal, { ...navigationBlocker })
29627
29709
  ] });
29628
29710
  }
29629
29711
 
29630
29712
  // src/layouts/Workflow/FocusedFormLayout.tsx
29631
- var import_jsx_runtime240 = require("react/jsx-runtime");
29713
+ var import_jsx_runtime241 = require("react/jsx-runtime");
29632
29714
  function FocusedFormLayout(props) {
29633
29715
  const {
29634
29716
  onCancel,
@@ -29639,11 +29721,12 @@ function FocusedFormLayout(props) {
29639
29721
  isDirty,
29640
29722
  allowNavigation,
29641
29723
  aiMode,
29724
+ rightPaneTriggers,
29642
29725
  children,
29643
29726
  ...headerProps
29644
29727
  } = props;
29645
29728
  const tid = useTestIds(props, "focusedFormLayout");
29646
- return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
29729
+ return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
29647
29730
  WorkflowPageLayout,
29648
29731
  {
29649
29732
  ...tid,
@@ -29656,14 +29739,15 @@ function FocusedFormLayout(props) {
29656
29739
  completeLabel,
29657
29740
  onComplete,
29658
29741
  primaryDisabled,
29742
+ rightPaneTriggers,
29659
29743
  children
29660
29744
  }
29661
29745
  );
29662
29746
  }
29663
29747
 
29664
29748
  // src/layouts/Workflow/StepperLayout.tsx
29665
- var import_react169 = require("react");
29666
- var import_jsx_runtime241 = require("react/jsx-runtime");
29749
+ var import_react170 = require("react");
29750
+ var import_jsx_runtime242 = require("react/jsx-runtime");
29667
29751
  function StepperLayout(props) {
29668
29752
  const {
29669
29753
  steps,
@@ -29678,32 +29762,39 @@ function StepperLayout(props) {
29678
29762
  ...headerProps
29679
29763
  } = props;
29680
29764
  const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
29681
- const [currentStep, setCurrentStep] = (0, import_react169.useState)(() => getInitialStep(stepTabs, defaultStep));
29765
+ const [currentStep, setCurrentStep] = (0, import_react170.useState)(() => getInitialStep(stepTabs, defaultStep));
29682
29766
  const tid = useTestIds(props, "stepperLayout");
29767
+ const { closeRightPane } = useRightPaneActions();
29683
29768
  const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
29684
29769
  const isFirstStep = currentIndex <= 0;
29685
29770
  const isLastStep = currentIndex >= stepTabs.length - 1;
29686
29771
  const activeStep = stepTabs[currentIndex];
29687
- return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
29772
+ function goToStep(value) {
29773
+ if (value === currentStep) return;
29774
+ closeRightPane();
29775
+ setCurrentStep(value);
29776
+ }
29777
+ return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
29688
29778
  WorkflowPageLayout,
29689
29779
  {
29690
29780
  ...tid,
29691
29781
  ...headerProps,
29692
29782
  aiMode,
29693
- stepperTabs: { steps: stepTabs, currentStep, onChange: setCurrentStep },
29783
+ stepperTabs: { steps: stepTabs, currentStep, onChange: goToStep },
29694
29784
  isDirty,
29695
29785
  allowNavigation,
29696
29786
  isFirstStep,
29697
29787
  isLastStep,
29698
29788
  onBack: () => {
29699
29789
  const prev = stepTabs[currentIndex - 1];
29700
- if (prev) setCurrentStep(prev.value);
29790
+ if (prev) goToStep(prev.value);
29701
29791
  },
29702
29792
  onCancel,
29703
29793
  onSaveAndExit,
29704
29794
  completeLabel,
29705
29795
  onComplete,
29706
29796
  primaryDisabled: activeStep?.primaryDisabled,
29797
+ rightPaneTriggers: activeStep?.rightPaneTriggers,
29707
29798
  onContinue: async () => {
29708
29799
  const onContinue = activeStep?.onContinue;
29709
29800
  if (onContinue) {
@@ -29711,7 +29802,7 @@ function StepperLayout(props) {
29711
29802
  if (allowed === false) return;
29712
29803
  }
29713
29804
  const next = stepTabs[currentIndex + 1];
29714
- if (next) setCurrentStep(next.value);
29805
+ if (next) goToStep(next.value);
29715
29806
  },
29716
29807
  children: activeStep?.content
29717
29808
  }
@@ -29726,7 +29817,7 @@ function getInitialStep(steps, defaultStep) {
29726
29817
 
29727
29818
  // src/forms/BoundChipSelectField.tsx
29728
29819
  var import_mobx_react23 = require("mobx-react");
29729
- var import_jsx_runtime242 = require("react/jsx-runtime");
29820
+ var import_jsx_runtime243 = require("react/jsx-runtime");
29730
29821
  function BoundChipSelectField(props) {
29731
29822
  const {
29732
29823
  field,
@@ -29742,7 +29833,7 @@ function BoundChipSelectField(props) {
29742
29833
  ...others
29743
29834
  } = props;
29744
29835
  const testId = useTestIds(props, field.key);
29745
- return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_mobx_react23.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
29836
+ return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(import_mobx_react23.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
29746
29837
  ChipSelectField,
29747
29838
  {
29748
29839
  label,
@@ -29772,12 +29863,12 @@ function BoundChipSelectField(props) {
29772
29863
  }
29773
29864
 
29774
29865
  // src/forms/BoundSelectAndTextField.tsx
29775
- var import_jsx_runtime243 = require("react/jsx-runtime");
29866
+ var import_jsx_runtime244 = require("react/jsx-runtime");
29776
29867
  function BoundSelectAndTextField(props) {
29777
29868
  const { selectFieldProps, textFieldProps, compact = true } = props;
29778
29869
  const tid = useTestIds(props);
29779
- return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(CompoundField, { children: [
29780
- /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
29870
+ return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(CompoundField, { children: [
29871
+ /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
29781
29872
  BoundSelectField,
29782
29873
  {
29783
29874
  ...tid[defaultTestId(selectFieldProps.label ?? selectFieldProps.field.key)],
@@ -29786,7 +29877,7 @@ function BoundSelectAndTextField(props) {
29786
29877
  compact
29787
29878
  }
29788
29879
  ),
29789
- /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
29880
+ /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
29790
29881
  BoundTextField,
29791
29882
  {
29792
29883
  ...tid[defaultTestId(textFieldProps.label ?? textFieldProps.field.key)],
@@ -29798,8 +29889,8 @@ function BoundSelectAndTextField(props) {
29798
29889
  }
29799
29890
 
29800
29891
  // src/forms/FormHeading.tsx
29801
- var import_runtime158 = require("@homebound/truss/runtime");
29802
- var import_jsx_runtime244 = (
29892
+ var import_runtime159 = require("@homebound/truss/runtime");
29893
+ var import_jsx_runtime245 = (
29803
29894
  // Add space before the heading, but only if it's not first.
29804
29895
  require("react/jsx-runtime")
29805
29896
  );
@@ -29810,7 +29901,7 @@ function FormHeading(props) {
29810
29901
  isFirst = false,
29811
29902
  ...others
29812
29903
  } = props;
29813
- return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)("h3", { ...(0, import_runtime158.trussProps)({
29904
+ return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("h3", { ...(0, import_runtime159.trussProps)({
29814
29905
  ...{
29815
29906
  fontWeight: "fw4",
29816
29907
  fontSize: "fz_16px",
@@ -29826,8 +29917,8 @@ FormHeading.isFormHeading = true;
29826
29917
 
29827
29918
  // src/forms/StaticField.tsx
29828
29919
  var import_utils49 = require("@react-aria/utils");
29829
- var import_runtime159 = require("@homebound/truss/runtime");
29830
- var import_jsx_runtime245 = require("react/jsx-runtime");
29920
+ var import_runtime160 = require("@homebound/truss/runtime");
29921
+ var import_jsx_runtime246 = require("react/jsx-runtime");
29831
29922
  function StaticField(props) {
29832
29923
  const {
29833
29924
  fieldProps
@@ -29840,14 +29931,14 @@ function StaticField(props) {
29840
29931
  } = props;
29841
29932
  const tid = useTestIds(props, typeof label === "string" ? defaultTestId(label) : "staticField");
29842
29933
  const id = (0, import_utils49.useId)();
29843
- return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)("div", { ...(0, import_runtime159.trussProps)({
29934
+ return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)("div", { ...(0, import_runtime160.trussProps)({
29844
29935
  ...labelStyle === "left" ? {
29845
29936
  display: "df",
29846
29937
  justifyContent: "jcsb",
29847
29938
  maxWidth: "maxw100"
29848
29939
  } : {}
29849
29940
  }), ...tid.container, children: [
29850
- /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("label", { ...(0, import_runtime159.trussProps)({
29941
+ /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("label", { ...(0, import_runtime160.trussProps)({
29851
29942
  display: "db",
29852
29943
  fontWeight: "fw4",
29853
29944
  fontSize: "fz_14px",
@@ -29857,7 +29948,7 @@ function StaticField(props) {
29857
29948
  }],
29858
29949
  marginBottom: "mb_4px"
29859
29950
  }), htmlFor: id, ...tid.label, children: label }),
29860
- /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("div", { id, ...(0, import_runtime159.trussProps)({
29951
+ /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("div", { id, ...(0, import_runtime160.trussProps)({
29861
29952
  fontWeight: "fw4",
29862
29953
  fontSize: "fz_14px",
29863
29954
  lineHeight: "lh_20px",
@@ -29874,9 +29965,9 @@ function StaticField(props) {
29874
29965
  }
29875
29966
 
29876
29967
  // src/hooks/useFilter.ts
29877
- var import_react170 = require("react");
29968
+ var import_react171 = require("react");
29878
29969
  function useFilter4({ filterDefs }) {
29879
- const [filter, setFilter] = (0, import_react170.useState)(
29970
+ const [filter, setFilter] = (0, import_react171.useState)(
29880
29971
  Object.fromEntries(
29881
29972
  safeEntries(filterDefs).filter(([key, def]) => def(key).defaultValue !== void 0).map(([key, def]) => [key, def(key).defaultValue])
29882
29973
  )
@@ -29885,10 +29976,10 @@ function useFilter4({ filterDefs }) {
29885
29976
  }
29886
29977
 
29887
29978
  // src/inputs/Autocomplete.tsx
29888
- var import_react171 = require("react");
29979
+ var import_react172 = require("react");
29889
29980
  var import_react_aria66 = require("react-aria");
29890
29981
  var import_react_stately18 = require("react-stately");
29891
- var import_jsx_runtime246 = require("react/jsx-runtime");
29982
+ var import_jsx_runtime247 = require("react/jsx-runtime");
29892
29983
  function Autocomplete(props) {
29893
29984
  const {
29894
29985
  onSelect,
@@ -29905,8 +29996,8 @@ function Autocomplete(props) {
29905
29996
  } = props;
29906
29997
  const { effectiveValue, proposalProps } = useAiProposal(value, proposedValue);
29907
29998
  const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
29908
- const comboBoxChildren = (0, import_react171.useCallback)(
29909
- (item) => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_stately18.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
29999
+ const comboBoxChildren = (0, import_react172.useCallback)(
30000
+ (item) => /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_react_stately18.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
29910
30001
  [getOptionValue, getOptionLabel, getOptionMenuLabel]
29911
30002
  );
29912
30003
  const comboBoxProps = {
@@ -29930,10 +30021,10 @@ function Autocomplete(props) {
29930
30021
  ...others
29931
30022
  };
29932
30023
  const state = (0, import_react_stately18.useComboBoxState)(comboBoxProps);
29933
- const inputWrapRef = (0, import_react171.useRef)(null);
29934
- const inputRef = (0, import_react171.useRef)(null);
29935
- const listBoxRef = (0, import_react171.useRef)(null);
29936
- const popoverRef = (0, import_react171.useRef)(null);
30024
+ const inputWrapRef = (0, import_react172.useRef)(null);
30025
+ const inputRef = (0, import_react172.useRef)(null);
30026
+ const listBoxRef = (0, import_react172.useRef)(null);
30027
+ const popoverRef = (0, import_react172.useRef)(null);
29937
30028
  const { inputProps, listBoxProps, labelProps } = (0, import_react_aria66.useComboBox)(
29938
30029
  {
29939
30030
  ...comboBoxProps,
@@ -29959,8 +30050,8 @@ function Autocomplete(props) {
29959
30050
  // Ensures the menu never gets too small.
29960
30051
  minWidth: 200
29961
30052
  };
29962
- return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_jsx_runtime246.Fragment, { children: [
29963
- /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
30053
+ return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(import_jsx_runtime247.Fragment, { children: [
30054
+ /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
29964
30055
  TextFieldBase,
29965
30056
  {
29966
30057
  inputRef,
@@ -29970,11 +30061,11 @@ function Autocomplete(props) {
29970
30061
  onChange: onInputChange,
29971
30062
  ...proposalProps,
29972
30063
  clearable: true,
29973
- startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Icon, { icon: "search" }),
30064
+ startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Icon, { icon: "search" }),
29974
30065
  ...others
29975
30066
  }
29976
30067
  ),
29977
- state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
30068
+ state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
29978
30069
  Popover,
29979
30070
  {
29980
30071
  triggerRef: inputRef,
@@ -29983,7 +30074,7 @@ function Autocomplete(props) {
29983
30074
  onClose: () => state.close(),
29984
30075
  isOpen: state.isOpen,
29985
30076
  minWidth: 200,
29986
- children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
30077
+ children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
29987
30078
  ListBox,
29988
30079
  {
29989
30080
  ...listBoxProps,
@@ -30001,11 +30092,11 @@ function Autocomplete(props) {
30001
30092
  }
30002
30093
 
30003
30094
  // src/inputs/ToggleButton.tsx
30004
- var import_react172 = require("react");
30095
+ var import_react173 = require("react");
30005
30096
  var import_react_aria67 = require("react-aria");
30006
30097
  var import_react_stately19 = require("react-stately");
30007
- var import_runtime160 = require("@homebound/truss/runtime");
30008
- var import_jsx_runtime247 = require("react/jsx-runtime");
30098
+ var import_runtime161 = require("@homebound/truss/runtime");
30099
+ var import_jsx_runtime248 = require("react/jsx-runtime");
30009
30100
  function ToggleButton(props) {
30010
30101
  const {
30011
30102
  selected: isSelected = false,
@@ -30016,7 +30107,7 @@ function ToggleButton(props) {
30016
30107
  __storyState,
30017
30108
  ...otherProps
30018
30109
  } = props;
30019
- const [asyncInProgress, setAsyncInProgress] = (0, import_react172.useState)(false);
30110
+ const [asyncInProgress, setAsyncInProgress] = (0, import_react173.useState)(false);
30020
30111
  const isDisabled = !!disabled || asyncInProgress;
30021
30112
  const ariaProps = {
30022
30113
  "aria-label": label,
@@ -30035,8 +30126,8 @@ function ToggleButton(props) {
30035
30126
  return result;
30036
30127
  }
30037
30128
  });
30038
- const labelRef = (0, import_react172.useRef)(null);
30039
- const ref = (0, import_react172.useRef)(null);
30129
+ const labelRef = (0, import_react173.useRef)(null);
30130
+ const ref = (0, import_react173.useRef)(null);
30040
30131
  const tid = useTestIds(otherProps, label);
30041
30132
  const {
30042
30133
  isPressed: isPressedFromEvents,
@@ -30069,7 +30160,7 @@ function ToggleButton(props) {
30069
30160
  ...focusProps,
30070
30161
  ...hoverProps,
30071
30162
  ...pressProps,
30072
- ...(0, import_runtime160.trussProps)({
30163
+ ...(0, import_runtime161.trussProps)({
30073
30164
  // Gray500 off-state has no semantic match — keep palette (OnSurfaceMuted is Gray700).
30074
30165
  ...{
30075
30166
  borderRadius: "br4",
@@ -30109,10 +30200,10 @@ function ToggleButton(props) {
30109
30200
  return maybeTooltip({
30110
30201
  title: tooltip,
30111
30202
  placement: "top",
30112
- children: /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)("label", { ...labelAttrs, children: [
30113
- icon && /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Icon, { icon }),
30203
+ children: /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)("label", { ...labelAttrs, children: [
30204
+ icon && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Icon, { icon }),
30114
30205
  label,
30115
- /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_react_aria67.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)("input", { ref, ...inputProps, ...tid.value }) })
30206
+ /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_react_aria67.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("input", { ref, ...inputProps, ...tid.value }) })
30116
30207
  ] })
30117
30208
  });
30118
30209
  }