@homebound/beam 4.10.0 → 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.js CHANGED
@@ -5580,13 +5580,14 @@ function IconButton(props) {
5580
5580
  const isCircle = variant === "circle";
5581
5581
  const isOutline = variant === "outline";
5582
5582
  const styles = useMemo4(() => {
5583
- const variantKey = isCircle ? "circle" : isOutline ? "outline" : compact ? "compact" : "default";
5584
5583
  const {
5585
5584
  base,
5586
5585
  hover,
5587
5586
  focus,
5588
5587
  pressed
5589
- } = variantStyles[variantKey];
5588
+ } = variantStyles(variant, {
5589
+ compact
5590
+ });
5590
5591
  return {
5591
5592
  ...iconButtonStylesReset,
5592
5593
  ...base,
@@ -5600,7 +5601,7 @@ function IconButton(props) {
5600
5601
  }]
5601
5602
  }
5602
5603
  };
5603
- }, [isHovered, isFocusVisible, isDisabled, compact, isCircle, isOutline, isPressing, bgColor, forceFocusStyles]);
5604
+ }, [isHovered, isFocusVisible, isDisabled, compact, variant, isPressing, bgColor, forceFocusStyles]);
5604
5605
  const iconColor = isCircle ? circleIconColor : defaultIconColor;
5605
5606
  const buttonAttrs = {
5606
5607
  ...testIds,
@@ -5637,36 +5638,93 @@ var iconButtonStylesDisabled = {
5637
5638
  "--backgroundColor": "var(--b-surface-disabled)"
5638
5639
  }]
5639
5640
  };
5640
- var variantStyles = {
5641
- default: {
5642
- base: {
5643
- height: "h_28px",
5644
- width: "w_28px",
5645
- borderRadius: "br8",
5646
- borderWidth: "bw2"
5647
- },
5648
- hover: {
5649
- backgroundColor: ["bgColor_var", {
5650
- "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
5651
- }]
5652
- },
5653
- focus: {
5654
- borderColor: ["bc_var", {
5655
- "--borderColor": "var(--b-field-border-focus)"
5656
- }]
5657
- },
5658
- pressed: {
5659
- backgroundColor: ["bgColor_var", {
5660
- "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
5661
- }]
5662
- }
5663
- },
5664
- compact: {
5665
- base: {
5641
+ function variantStyles(variant, {
5642
+ compact
5643
+ }) {
5644
+ if (variant === "circle") {
5645
+ return {
5646
+ base: {
5647
+ borderRadius: "br100",
5648
+ height: ["sq_var", {
5649
+ "--height": `${compact ? 32 : 48}px`
5650
+ }],
5651
+ width: ["sq_var", {
5652
+ "--width": `${compact ? 32 : 48}px`
5653
+ }],
5654
+ borderColor: ["bc_var", {
5655
+ "--borderColor": "var(--b-field-border-default)"
5656
+ }],
5657
+ borderStyle: "bss",
5658
+ borderWidth: "bw1",
5659
+ display: "df",
5660
+ justifyContent: "jcc",
5661
+ alignItems: "aic",
5662
+ backgroundColor: ["bgColor_var", {
5663
+ "--backgroundColor": "var(--b-surface-raised)"
5664
+ }]
5665
+ },
5666
+ hover: {
5667
+ backgroundColor: "bgBlue100",
5668
+ borderColor: "bcBlue200"
5669
+ },
5670
+ focus: {
5671
+ backgroundColor: "bgBlue100",
5672
+ borderColor: ["bc_var", {
5673
+ "--borderColor": "var(--b-field-border-focus)"
5674
+ }]
5675
+ },
5676
+ pressed: {
5677
+ backgroundColor: ["bgColor_var", {
5678
+ "--backgroundColor": "var(--b-neutral-fill-pressed)"
5679
+ }],
5680
+ borderColor: ["bc_var", {
5681
+ "--borderColor": "var(--b-neutral-fill-pressed)"
5682
+ }]
5683
+ }
5684
+ };
5685
+ }
5686
+ if (variant === "outline") {
5687
+ return {
5688
+ base: {
5689
+ borderRadius: "br8",
5690
+ width: "w_42px",
5691
+ height: "h_40px",
5692
+ borderColor: "bcGray300",
5693
+ borderStyle: "bss",
5694
+ borderWidth: "bw1",
5695
+ display: "df",
5696
+ justifyContent: "jcc",
5697
+ alignItems: "aic",
5698
+ backgroundColor: ["bgColor_var", {
5699
+ "--backgroundColor": "var(--b-surface-raised)"
5700
+ }]
5701
+ },
5702
+ hover: {
5703
+ backgroundColor: ["bgColor_var", {
5704
+ "--backgroundColor": "var(--b-surface-raised-hover)"
5705
+ }]
5706
+ },
5707
+ focus: {
5708
+ boxShadow: "bshFocus"
5709
+ },
5710
+ pressed: {
5711
+ backgroundColor: ["bgColor_var", {
5712
+ "--backgroundColor": "var(--b-surface-raised-pressed)"
5713
+ }]
5714
+ }
5715
+ };
5716
+ }
5717
+ return {
5718
+ base: compact ? {
5666
5719
  height: "h_18px",
5667
5720
  width: "w_18px",
5668
5721
  borderRadius: "br4",
5669
5722
  borderWidth: "bw1"
5723
+ } : {
5724
+ height: "h_28px",
5725
+ width: "w_28px",
5726
+ borderRadius: "br8",
5727
+ borderWidth: "bw2"
5670
5728
  },
5671
5729
  hover: {
5672
5730
  backgroundColor: ["bgColor_var", {
@@ -5683,71 +5741,8 @@ var variantStyles = {
5683
5741
  "--backgroundColor": "var(--b-neutral-fill-hover-strong)"
5684
5742
  }]
5685
5743
  }
5686
- },
5687
- circle: {
5688
- // Blue100/200 hover fills have no semantic tokens — keep palette for those.
5689
- base: {
5690
- borderRadius: "br100",
5691
- height: "h_48px",
5692
- width: "w_48px",
5693
- borderColor: ["bc_var", {
5694
- "--borderColor": "var(--b-field-border-default)"
5695
- }],
5696
- borderStyle: "bss",
5697
- borderWidth: "bw1",
5698
- display: "df",
5699
- justifyContent: "jcc",
5700
- alignItems: "aic"
5701
- },
5702
- hover: {
5703
- backgroundColor: "bgBlue100",
5704
- borderColor: "bcBlue200"
5705
- },
5706
- focus: {
5707
- backgroundColor: "bgBlue100",
5708
- borderColor: ["bc_var", {
5709
- "--borderColor": "var(--b-field-border-focus)"
5710
- }]
5711
- },
5712
- pressed: {
5713
- backgroundColor: ["bgColor_var", {
5714
- "--backgroundColor": "var(--b-neutral-fill-pressed)"
5715
- }],
5716
- borderColor: ["bc_var", {
5717
- "--borderColor": "var(--b-neutral-fill-pressed)"
5718
- }]
5719
- }
5720
- },
5721
- outline: {
5722
- base: {
5723
- borderRadius: "br8",
5724
- width: "w_42px",
5725
- height: "h_40px",
5726
- borderColor: "bcGray300",
5727
- borderStyle: "bss",
5728
- borderWidth: "bw1",
5729
- display: "df",
5730
- justifyContent: "jcc",
5731
- alignItems: "aic",
5732
- backgroundColor: ["bgColor_var", {
5733
- "--backgroundColor": "var(--b-surface-raised)"
5734
- }]
5735
- },
5736
- hover: {
5737
- backgroundColor: ["bgColor_var", {
5738
- "--backgroundColor": "var(--b-surface-raised-hover)"
5739
- }]
5740
- },
5741
- focus: {
5742
- boxShadow: "bshFocus"
5743
- },
5744
- pressed: {
5745
- backgroundColor: ["bgColor_var", {
5746
- "--backgroundColor": "var(--b-surface-raised-pressed)"
5747
- }]
5748
- }
5749
- }
5750
- };
5744
+ };
5745
+ }
5751
5746
 
5752
5747
  // src/components/Table/utils/TableState.ts
5753
5748
  import { makeAutoObservable as makeAutoObservable4, observableRef as observableRef3, reaction as reaction4 } from "mobx";
@@ -5964,6 +5959,8 @@ var zIndices = {
5964
5959
  scrollShadow: 50,
5965
5960
  // Document-scroll detail pane (DocumentScrollOverlayRightPaneLayout) — above table sticky chrome, below page sticky headers.
5966
5961
  rightPane: 60,
5962
+ // Workflow floating right-pane triggers — above the pane, below sticky headers.
5963
+ rightPaneTriggers: 65,
5967
5964
  pageStickyHeader: 70,
5968
5965
  // Sticky mobile action footer (workflow layouts) — same tier as pageStickyHeader; header and footer never overlap on screen.
5969
5966
  pageStickyFooter: 70,
@@ -23576,50 +23573,65 @@ function DocumentScrollRightPane({
23576
23573
  height: paneBounds.heightPx,
23577
23574
  maxHeight: paneBounds.heightPx
23578
23575
  } : void 0;
23579
- const pane = /* @__PURE__ */ jsx168(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx168(motion3.div, { ref: paneRef, ...{
23580
- [rightPaneContentDataAttribute]: true
23581
- }, ...tid, ...mergeProps27(void 0, paneStyle, mobile ? {
23582
- position: "fixed",
23583
- right: "right0",
23584
- bottom: "bottom0",
23585
- left: "left0",
23586
- overflowY: "oya",
23587
- backgroundColor: ["bgColor_var", {
23588
- "--backgroundColor": "var(--b-surface)"
23589
- }],
23590
- zIndex: ["z_var", {
23591
- "--zIndex": maybeCssVar47(zIndices.rightPaneMobile)
23592
- }]
23593
- } : {
23594
- position: "fixed",
23595
- right: "right0",
23596
- overflowY: "oya",
23597
- width: ["w_var", {
23598
- "--width": maybeCssVar47(__maybeInc20(paneWidthCss))
23599
- }],
23600
- backgroundColor: ["bgColor_var", {
23601
- "--backgroundColor": "var(--b-surface)"
23602
- }],
23603
- zIndex: ["z_var", {
23604
- "--zIndex": maybeCssVar47(zIndices.rightPane)
23605
- }],
23606
- borderLeftStyle: "bls_solid",
23607
- borderLeftWidth: "blw_1px",
23608
- borderColor: ["bc_var", {
23609
- "--borderColor": "var(--b-surface-separator)"
23610
- }]
23611
- }), initial: {
23612
- x: slideX
23613
- }, animate: {
23614
- x: 0
23615
- }, exit: {
23616
- x: slideX
23617
- }, transition: {
23618
- ease: "linear",
23619
- duration: 0.2
23620
- }, onAnimationComplete: (definition) => {
23621
- if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
23622
- }, children: rightPaneContent }, "documentScrollRightPane") });
23576
+ const pane = /* @__PURE__ */ jsx168(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx168(
23577
+ motion3.div,
23578
+ {
23579
+ ref: paneRef,
23580
+ ...{
23581
+ [rightPaneContentDataAttribute]: true
23582
+ },
23583
+ ...tid,
23584
+ ...mergeProps27(void 0, paneStyle, mobile ? {
23585
+ position: "fixed",
23586
+ right: "right0",
23587
+ bottom: "bottom0",
23588
+ left: "left0",
23589
+ overflowY: "oya",
23590
+ backgroundColor: ["bgColor_var", {
23591
+ "--backgroundColor": "var(--b-surface)"
23592
+ }],
23593
+ zIndex: ["z_var", {
23594
+ "--zIndex": maybeCssVar47(zIndices.rightPaneMobile)
23595
+ }]
23596
+ } : {
23597
+ position: "fixed",
23598
+ right: "right0",
23599
+ overflowY: "oya",
23600
+ width: ["w_var", {
23601
+ "--width": maybeCssVar47(__maybeInc20(paneWidthCss))
23602
+ }],
23603
+ backgroundColor: ["bgColor_var", {
23604
+ "--backgroundColor": "var(--b-surface)"
23605
+ }],
23606
+ zIndex: ["z_var", {
23607
+ "--zIndex": maybeCssVar47(zIndices.rightPane)
23608
+ }],
23609
+ borderLeftStyle: "bls_solid",
23610
+ borderLeftWidth: "blw_1px",
23611
+ borderColor: ["bc_var", {
23612
+ "--borderColor": "var(--b-surface-separator)"
23613
+ }]
23614
+ }),
23615
+ initial: {
23616
+ x: slideX
23617
+ },
23618
+ animate: {
23619
+ x: 0
23620
+ },
23621
+ exit: {
23622
+ x: slideX
23623
+ },
23624
+ transition: {
23625
+ duration: 0.2,
23626
+ ease: [0.4, 0, 0.2, 1]
23627
+ },
23628
+ onAnimationComplete: (definition) => {
23629
+ if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
23630
+ },
23631
+ children: rightPaneContent
23632
+ },
23633
+ "documentScrollRightPane"
23634
+ ) });
23623
23635
  return createPortal6(pane, document.body);
23624
23636
  }
23625
23637
 
@@ -23717,7 +23729,8 @@ function DocumentScrollOverlayRightPaneLayout({
23717
23729
  }, {
23718
23730
  flexShrink: "fs0",
23719
23731
  flexGrow: "fg0",
23720
- height: "h1"
23732
+ height: "h1",
23733
+ transition: "transitionWidth"
23721
23734
  }), ...tid.spacer })
23722
23735
  ] }),
23723
23736
  /* @__PURE__ */ jsx170(DocumentScrollOverlayRightPaneHost, { anchorRef: anchorRef.ref, spacerRef, paneWidth })
@@ -23742,26 +23755,24 @@ function DocumentScrollOverlayRightPaneHost(props) {
23742
23755
  return waitForRightPaneExit(() => setKeepOverlayChrome(false));
23743
23756
  }, [isRightPaneOpen]);
23744
23757
  useLayoutEffect8(() => {
23745
- const layoutRoot = anchorRef.current;
23746
23758
  const spacer = spacerRef.current;
23759
+ if (!spacer) return;
23760
+ spacer.style.width = isRightPaneOpen ? paneWidthCss : "0px";
23761
+ }, [isRightPaneOpen, paneWidthCss, spacerRef]);
23762
+ useLayoutEffect8(() => {
23763
+ const layoutRoot = anchorRef.current;
23747
23764
  if (!layoutRoot) return;
23748
23765
  const openPaneWidth = keepOverlayChrome ? paneWidthCss : "0px";
23749
23766
  const contentMin = keepOverlayChrome ? `${minDocumentScrollContentWidthPx}px` : "0px";
23750
23767
  layoutRoot.style.setProperty(beamRightPaneWidthVar, openPaneWidth);
23751
23768
  layoutRoot.style.setProperty(beamRightPaneContentMinVar, contentMin);
23752
23769
  document.documentElement.style.setProperty(beamFloatingRightOffsetVar, openPaneWidth);
23753
- if (spacer) {
23754
- spacer.style.width = openPaneWidth;
23755
- }
23756
23770
  return () => {
23757
23771
  layoutRoot.style.setProperty(beamRightPaneWidthVar, "0px");
23758
23772
  layoutRoot.style.setProperty(beamRightPaneContentMinVar, "0px");
23759
23773
  document.documentElement.style.setProperty(beamFloatingRightOffsetVar, "0px");
23760
- if (spacer) {
23761
- spacer.style.width = "0px";
23762
- }
23763
23774
  };
23764
- }, [anchorRef, keepOverlayChrome, paneWidthCss, spacerRef]);
23775
+ }, [anchorRef, keepOverlayChrome, paneWidthCss]);
23765
23776
  return /* @__PURE__ */ jsx170(DocumentScrollRightPane, { paneWidth, mobile: false, anchorRef });
23766
23777
  }
23767
23778
 
@@ -24396,7 +24407,7 @@ function RightPaneLayout(props) {
24396
24407
  width: ["w_var", {
24397
24408
  "--width": maybeCssVar49(__maybeInc22(`calc(100% - ${paneWidth + 24}px)`))
24398
24409
  }],
24399
- transition: "tsn_width_2s_linear",
24410
+ transition: "transitionWidth",
24400
24411
  height: "h100",
24401
24412
  marginRight: "mr3",
24402
24413
  overflowX: "oxa"
@@ -24459,13 +24470,13 @@ function RightPaneLayout(props) {
24459
24470
  x: 0
24460
24471
  },
24461
24472
  transition: {
24462
- ease: "linear",
24463
- duration: 0.2
24473
+ duration: 0.2,
24474
+ ease: [0.4, 0, 0.2, 1]
24464
24475
  },
24465
24476
  exit: {
24466
24477
  transition: {
24467
- ease: "linear",
24468
- duration: 0.2
24478
+ duration: 0.2,
24479
+ ease: [0.4, 0, 0.2, 1]
24469
24480
  },
24470
24481
  x: paneWidth
24471
24482
  },
@@ -24509,7 +24520,7 @@ function RightPanePanel(props) {
24509
24520
  flexShrink: "fs0"
24510
24521
  }), ...tid.header, children: [
24511
24522
  /* @__PURE__ */ jsx180("div", { className: "fw6 fz_16px lh_24px", children: title }),
24512
- withClose && /* @__PURE__ */ jsx180(IconButton, { icon: "x", label: "Close", onClick: closeRightPane, ...tid.close })
24523
+ withClose && /* @__PURE__ */ jsx180(IconButton, { icon: "x", label: "Close", autoFocus: true, onClick: closeRightPane, ...tid.close })
24513
24524
  ] }),
24514
24525
  /* @__PURE__ */ jsx180("div", { className: "fg1 mh0 oya pt2 pb2 pr2 pl2", ...tid.body, children })
24515
24526
  ] });
@@ -28944,10 +28955,74 @@ function WorkflowHeader(props) {
28944
28955
  );
28945
28956
  }
28946
28957
 
28958
+ // src/layouts/Workflow/RightPaneTriggers.tsx
28959
+ import { useCallback as useCallback44 } from "react";
28960
+ import { trussProps as trussProps137, maybeCssVar as maybeCssVar70 } from "@homebound/truss/runtime";
28961
+ import { jsx as jsx237 } from "react/jsx-runtime";
28962
+ var __maybeInc36 = (inc) => {
28963
+ return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
28964
+ };
28965
+ function WorkflowPageRightPaneTriggers(props) {
28966
+ const {
28967
+ triggers
28968
+ } = props;
28969
+ const {
28970
+ sm: isMobile
28971
+ } = useBreakpoint();
28972
+ const {
28973
+ isRightPaneOpen
28974
+ } = useRightPane();
28975
+ const {
28976
+ openRightPane
28977
+ } = useRightPaneActions();
28978
+ const tid = useTestIds(props, "rightPaneTriggers");
28979
+ const pageTriggerInsetPx = 24;
28980
+ const onClick = useCallback44((trigger) => {
28981
+ openRightPane({
28982
+ content: /* @__PURE__ */ jsx237(RightPanePanel, { title: trigger.label, children: trigger.content })
28983
+ });
28984
+ }, [openRightPane]);
28985
+ return /* @__PURE__ */ jsx237("div", { ...tid, "aria-hidden": isRightPaneOpen, ...isRightPaneOpen ? {
28986
+ inert: true
28987
+ } : {}, ...trussProps137({
28988
+ ...{
28989
+ display: "df",
28990
+ alignItems: "aic",
28991
+ gap: "gap2",
28992
+ flexShrink: "fs0",
28993
+ ...!isMobile ? {
28994
+ transition: "transitionTransform",
28995
+ flexDirection: "fdc"
28996
+ } : {}
28997
+ },
28998
+ ...!isMobile && {
28999
+ position: "fixed",
29000
+ top: ["top_var", {
29001
+ "--top": maybeCssVar70(__maybeInc36(stickyNavAndHeaderOffset(pageTriggerInsetPx)))
29002
+ }],
29003
+ right: ["right_var", {
29004
+ "--right": `${pageTriggerInsetPx}px`
29005
+ }],
29006
+ zIndex: ["z_var", {
29007
+ "--zIndex": maybeCssVar70(zIndices.rightPaneTriggers)
29008
+ }]
29009
+ },
29010
+ // Desktop only — on `sm` the full-bleed pane covers the header slot.
29011
+ ...!isMobile && (isRightPaneOpen ? {
29012
+ transform: ["transform_var", {
29013
+ "--transform": maybeCssVar70(`translateX(calc(100% + ${pageTriggerInsetPx}px))`)
29014
+ }],
29015
+ pointerEvents: "pe_none"
29016
+ } : {
29017
+ transform: "tf_translateX_0"
29018
+ })
29019
+ }), children: triggers.map((trigger) => /* @__PURE__ */ jsx237(IconButton, { icon: trigger.icon, label: trigger.label, variant: "circle", compact: isMobile, onClick: () => onClick(trigger), ...tid[trigger.icon] }, trigger.label)) });
29020
+ }
29021
+
28947
29022
  // src/layouts/Workflow/useUnsavedChangesGuard.tsx
28948
29023
  import { useEffect as useEffect40, useRef as useRef74 } from "react";
28949
29024
  import { useBlocker } from "react-router-dom";
28950
- import { jsx as jsx237 } from "react/jsx-runtime";
29025
+ import { jsx as jsx238 } from "react/jsx-runtime";
28951
29026
  function useUnsavedChangesGuard(options) {
28952
29027
  const { isDirty, allowNavigation, onCancel } = options;
28953
29028
  const { openModal } = useModal();
@@ -28983,7 +29058,7 @@ function useUnsavedChangesGuard(options) {
28983
29058
  }
28984
29059
  openModal({
28985
29060
  allowClosing: false,
28986
- content: /* @__PURE__ */ jsx237(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
29061
+ content: /* @__PURE__ */ jsx238(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
28987
29062
  });
28988
29063
  };
28989
29064
  const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
@@ -28995,7 +29070,7 @@ function UnsavedChangesNavigationModal(props) {
28995
29070
  useEffect40(() => {
28996
29071
  openModal({
28997
29072
  allowClosing: false,
28998
- content: /* @__PURE__ */ jsx237(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
29073
+ content: /* @__PURE__ */ jsx238(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
28999
29074
  });
29000
29075
  return () => closeModal();
29001
29076
  }, []);
@@ -29003,7 +29078,7 @@ function UnsavedChangesNavigationModal(props) {
29003
29078
  }
29004
29079
 
29005
29080
  // src/layouts/Workflow/WorkflowActions.tsx
29006
- import { jsx as jsx238, jsxs as jsxs128 } from "react/jsx-runtime";
29081
+ import { jsx as jsx239, jsxs as jsxs128 } from "react/jsx-runtime";
29007
29082
  function WorkflowActions(props) {
29008
29083
  const {
29009
29084
  onCancel,
@@ -29022,11 +29097,11 @@ function WorkflowActions(props) {
29022
29097
  } = useBreakpoint();
29023
29098
  const primaryVariant = aiMode ? "ai" : "primary";
29024
29099
  return /* @__PURE__ */ jsxs128("div", { className: "df aic jcsb sm_w100", children: [
29025
- /* @__PURE__ */ jsx238("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ jsx238(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
29100
+ /* @__PURE__ */ jsx239("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ jsx239(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
29026
29101
  /* @__PURE__ */ jsxs128("div", { className: "df aic gap1", children: [
29027
- /* @__PURE__ */ jsx238(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
29028
- onSaveAndExit && /* @__PURE__ */ jsx238(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
29029
- isLastStep ? /* @__PURE__ */ jsx238(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ jsx238(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
29102
+ /* @__PURE__ */ jsx239(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
29103
+ onSaveAndExit && /* @__PURE__ */ jsx239(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
29104
+ isLastStep ? /* @__PURE__ */ jsx239(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ jsx239(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
29030
29105
  await onContinue?.();
29031
29106
  }, disabled: primaryDisabled })
29032
29107
  ] })
@@ -29034,9 +29109,9 @@ function WorkflowActions(props) {
29034
29109
  }
29035
29110
 
29036
29111
  // src/layouts/Workflow/WorkflowPageLayout.tsx
29037
- import { trussProps as trussProps137, mergeProps as mergeProps43, maybeCssVar as maybeCssVar70 } from "@homebound/truss/runtime";
29038
- import { jsx as jsx239, jsxs as jsxs129 } from "react/jsx-runtime";
29039
- var __maybeInc36 = (inc) => {
29112
+ import { trussProps as trussProps138, mergeProps as mergeProps43, maybeCssVar as maybeCssVar71 } from "@homebound/truss/runtime";
29113
+ import { jsx as jsx240, jsxs as jsxs129 } from "react/jsx-runtime";
29114
+ var __maybeInc37 = (inc) => {
29040
29115
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
29041
29116
  };
29042
29117
  var mobileFooterHeightPx = 80;
@@ -29051,6 +29126,7 @@ function WorkflowPageLayout(props) {
29051
29126
  documentTitleSuffix,
29052
29127
  breadcrumbs,
29053
29128
  onCancel,
29129
+ rightPaneTriggers,
29054
29130
  ...actionProps
29055
29131
  } = props;
29056
29132
  const tid = useTestIds(props, "workflowPageLayout");
@@ -29065,7 +29141,9 @@ function WorkflowPageLayout(props) {
29065
29141
  allowNavigation,
29066
29142
  onCancel
29067
29143
  });
29068
- const actions = /* @__PURE__ */ jsx239(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
29144
+ const actions = /* @__PURE__ */ jsx240(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
29145
+ const triggers = rightPaneTriggers ?? [];
29146
+ const pageTriggers = triggers.length > 0 ? /* @__PURE__ */ jsx240(WorkflowPageRightPaneTriggers, { triggers }) : void 0;
29069
29147
  const headerMetricsRef = useRef75(null);
29070
29148
  const headerHeight = useMeasuredHeight(headerMetricsRef, true);
29071
29149
  const headerWidth = documentScrollChromeWidth();
@@ -29092,26 +29170,26 @@ function WorkflowPageLayout(props) {
29092
29170
  flexDirection: "fdc",
29093
29171
  width: "w100"
29094
29172
  }), ...tid, children: [
29095
- /* @__PURE__ */ jsx239("div", { ...mergeProps43(void 0, {
29173
+ /* @__PURE__ */ jsx240("div", { ...mergeProps43(void 0, {
29096
29174
  height: headerHeight
29097
29175
  }, {
29098
29176
  flexShrink: "fs0",
29099
29177
  width: "w100"
29100
- }), children: /* @__PURE__ */ jsx239("div", { ref: headerMetricsRef, ...trussProps137({
29178
+ }), children: /* @__PURE__ */ jsx240("div", { ref: headerMetricsRef, ...trussProps138({
29101
29179
  position: "fixed",
29102
29180
  left: "left0",
29103
29181
  width: ["w_var", {
29104
- "--width": maybeCssVar70(__maybeInc36(headerWidth))
29182
+ "--width": maybeCssVar71(__maybeInc37(headerWidth))
29105
29183
  }],
29106
29184
  zIndex: ["z_var", {
29107
- "--zIndex": maybeCssVar70(zIndices.pageStickyHeader)
29185
+ "--zIndex": maybeCssVar71(zIndices.pageStickyHeader)
29108
29186
  }],
29109
29187
  top: ["top_var", {
29110
- "--top": maybeCssVar70(__maybeInc36(outerTop))
29188
+ "--top": maybeCssVar71(__maybeInc37(outerTop))
29111
29189
  }],
29112
29190
  transition: "transitionAll"
29113
- }), ...tid.header, children: /* @__PURE__ */ jsx239(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? void 0 : actions, stepperTabs }) }) }),
29114
- /* @__PURE__ */ jsx239("div", { ...trussProps137({
29191
+ }), ...tid.header, children: /* @__PURE__ */ jsx240(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? pageTriggers : actions, stepperTabs }) }) }),
29192
+ /* @__PURE__ */ jsx240("div", { ...trussProps138({
29115
29193
  ...{
29116
29194
  display: "df",
29117
29195
  flexDirection: "fdc",
@@ -29123,28 +29201,29 @@ function WorkflowPageLayout(props) {
29123
29201
  ...aiMode && {
29124
29202
  backgroundImage: "aiBackground",
29125
29203
  minHeight: ["mh_var", {
29126
- "--minHeight": maybeCssVar70(documentScrollBodyMinHeight())
29204
+ "--minHeight": maybeCssVar71(documentScrollBodyMinHeight())
29127
29205
  }]
29128
29206
  }
29129
- }), ...tid.body, children }),
29130
- showFooter && /* @__PURE__ */ jsx239("div", { ...trussProps137({
29207
+ }), ...tid.body, children: triggers.length > 0 ? /* @__PURE__ */ jsx240(DocumentScrollOverlayRightPaneLayout, { children }) : children }),
29208
+ !isMobile && pageTriggers,
29209
+ showFooter && /* @__PURE__ */ jsx240("div", { ...trussProps138({
29131
29210
  flexShrink: "fs0",
29132
29211
  width: "w100",
29133
29212
  height: ["h_var", {
29134
29213
  "--height": `${mobileFooterHeightPx}px`
29135
29214
  }]
29136
- }), children: /* @__PURE__ */ jsx239("div", { ...trussProps137({
29215
+ }), children: /* @__PURE__ */ jsx240("div", { ...trussProps138({
29137
29216
  ...{
29138
29217
  position: "fixed",
29139
29218
  bottom: "bottom0",
29140
29219
  width: ["w_var", {
29141
- "--width": maybeCssVar70(__maybeInc36(headerWidth))
29220
+ "--width": maybeCssVar71(__maybeInc37(headerWidth))
29142
29221
  }],
29143
29222
  height: ["h_var", {
29144
29223
  "--height": `${mobileFooterHeightPx}px`
29145
29224
  }],
29146
29225
  zIndex: ["z_var", {
29147
- "--zIndex": maybeCssVar70(zIndices.pageStickyFooter)
29226
+ "--zIndex": maybeCssVar71(zIndices.pageStickyFooter)
29148
29227
  }],
29149
29228
  display: "df",
29150
29229
  alignItems: "aic",
@@ -29162,12 +29241,12 @@ function WorkflowPageLayout(props) {
29162
29241
  ...pageContentPaddingX
29163
29242
  }), ...tid.footer, children: actions }) })
29164
29243
  ] }),
29165
- navigationBlocker && /* @__PURE__ */ jsx239(UnsavedChangesNavigationModal, { ...navigationBlocker })
29244
+ navigationBlocker && /* @__PURE__ */ jsx240(UnsavedChangesNavigationModal, { ...navigationBlocker })
29166
29245
  ] });
29167
29246
  }
29168
29247
 
29169
29248
  // src/layouts/Workflow/FocusedFormLayout.tsx
29170
- import { jsx as jsx240 } from "react/jsx-runtime";
29249
+ import { jsx as jsx241 } from "react/jsx-runtime";
29171
29250
  function FocusedFormLayout(props) {
29172
29251
  const {
29173
29252
  onCancel,
@@ -29178,11 +29257,12 @@ function FocusedFormLayout(props) {
29178
29257
  isDirty,
29179
29258
  allowNavigation,
29180
29259
  aiMode,
29260
+ rightPaneTriggers,
29181
29261
  children,
29182
29262
  ...headerProps
29183
29263
  } = props;
29184
29264
  const tid = useTestIds(props, "focusedFormLayout");
29185
- return /* @__PURE__ */ jsx240(
29265
+ return /* @__PURE__ */ jsx241(
29186
29266
  WorkflowPageLayout,
29187
29267
  {
29188
29268
  ...tid,
@@ -29195,6 +29275,7 @@ function FocusedFormLayout(props) {
29195
29275
  completeLabel,
29196
29276
  onComplete,
29197
29277
  primaryDisabled,
29278
+ rightPaneTriggers,
29198
29279
  children
29199
29280
  }
29200
29281
  );
@@ -29202,7 +29283,7 @@ function FocusedFormLayout(props) {
29202
29283
 
29203
29284
  // src/layouts/Workflow/StepperLayout.tsx
29204
29285
  import { useState as useState64 } from "react";
29205
- import { jsx as jsx241 } from "react/jsx-runtime";
29286
+ import { jsx as jsx242 } from "react/jsx-runtime";
29206
29287
  function StepperLayout(props) {
29207
29288
  const {
29208
29289
  steps,
@@ -29219,30 +29300,37 @@ function StepperLayout(props) {
29219
29300
  const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
29220
29301
  const [currentStep, setCurrentStep] = useState64(() => getInitialStep(stepTabs, defaultStep));
29221
29302
  const tid = useTestIds(props, "stepperLayout");
29303
+ const { closeRightPane } = useRightPaneActions();
29222
29304
  const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
29223
29305
  const isFirstStep = currentIndex <= 0;
29224
29306
  const isLastStep = currentIndex >= stepTabs.length - 1;
29225
29307
  const activeStep = stepTabs[currentIndex];
29226
- return /* @__PURE__ */ jsx241(
29308
+ function goToStep(value) {
29309
+ if (value === currentStep) return;
29310
+ closeRightPane();
29311
+ setCurrentStep(value);
29312
+ }
29313
+ return /* @__PURE__ */ jsx242(
29227
29314
  WorkflowPageLayout,
29228
29315
  {
29229
29316
  ...tid,
29230
29317
  ...headerProps,
29231
29318
  aiMode,
29232
- stepperTabs: { steps: stepTabs, currentStep, onChange: setCurrentStep },
29319
+ stepperTabs: { steps: stepTabs, currentStep, onChange: goToStep },
29233
29320
  isDirty,
29234
29321
  allowNavigation,
29235
29322
  isFirstStep,
29236
29323
  isLastStep,
29237
29324
  onBack: () => {
29238
29325
  const prev = stepTabs[currentIndex - 1];
29239
- if (prev) setCurrentStep(prev.value);
29326
+ if (prev) goToStep(prev.value);
29240
29327
  },
29241
29328
  onCancel,
29242
29329
  onSaveAndExit,
29243
29330
  completeLabel,
29244
29331
  onComplete,
29245
29332
  primaryDisabled: activeStep?.primaryDisabled,
29333
+ rightPaneTriggers: activeStep?.rightPaneTriggers,
29246
29334
  onContinue: async () => {
29247
29335
  const onContinue = activeStep?.onContinue;
29248
29336
  if (onContinue) {
@@ -29250,7 +29338,7 @@ function StepperLayout(props) {
29250
29338
  if (allowed === false) return;
29251
29339
  }
29252
29340
  const next = stepTabs[currentIndex + 1];
29253
- if (next) setCurrentStep(next.value);
29341
+ if (next) goToStep(next.value);
29254
29342
  },
29255
29343
  children: activeStep?.content
29256
29344
  }
@@ -29265,7 +29353,7 @@ function getInitialStep(steps, defaultStep) {
29265
29353
 
29266
29354
  // src/forms/BoundChipSelectField.tsx
29267
29355
  import { Observer as Observer19 } from "mobx-react";
29268
- import { jsx as jsx242 } from "react/jsx-runtime";
29356
+ import { jsx as jsx243 } from "react/jsx-runtime";
29269
29357
  function BoundChipSelectField(props) {
29270
29358
  const {
29271
29359
  field,
@@ -29281,7 +29369,7 @@ function BoundChipSelectField(props) {
29281
29369
  ...others
29282
29370
  } = props;
29283
29371
  const testId = useTestIds(props, field.key);
29284
- return /* @__PURE__ */ jsx242(Observer19, { children: () => /* @__PURE__ */ jsx242(
29372
+ return /* @__PURE__ */ jsx243(Observer19, { children: () => /* @__PURE__ */ jsx243(
29285
29373
  ChipSelectField,
29286
29374
  {
29287
29375
  label,
@@ -29311,12 +29399,12 @@ function BoundChipSelectField(props) {
29311
29399
  }
29312
29400
 
29313
29401
  // src/forms/BoundSelectAndTextField.tsx
29314
- import { jsx as jsx243, jsxs as jsxs130 } from "react/jsx-runtime";
29402
+ import { jsx as jsx244, jsxs as jsxs130 } from "react/jsx-runtime";
29315
29403
  function BoundSelectAndTextField(props) {
29316
29404
  const { selectFieldProps, textFieldProps, compact = true } = props;
29317
29405
  const tid = useTestIds(props);
29318
29406
  return /* @__PURE__ */ jsxs130(CompoundField, { children: [
29319
- /* @__PURE__ */ jsx243(
29407
+ /* @__PURE__ */ jsx244(
29320
29408
  BoundSelectField,
29321
29409
  {
29322
29410
  ...tid[defaultTestId(selectFieldProps.label ?? selectFieldProps.field.key)],
@@ -29325,7 +29413,7 @@ function BoundSelectAndTextField(props) {
29325
29413
  compact
29326
29414
  }
29327
29415
  ),
29328
- /* @__PURE__ */ jsx243(
29416
+ /* @__PURE__ */ jsx244(
29329
29417
  BoundTextField,
29330
29418
  {
29331
29419
  ...tid[defaultTestId(textFieldProps.label ?? textFieldProps.field.key)],
@@ -29337,8 +29425,8 @@ function BoundSelectAndTextField(props) {
29337
29425
  }
29338
29426
 
29339
29427
  // src/forms/FormHeading.tsx
29340
- import { trussProps as trussProps138 } from "@homebound/truss/runtime";
29341
- import { jsx as jsx244 } from "react/jsx-runtime";
29428
+ import { trussProps as trussProps139 } from "@homebound/truss/runtime";
29429
+ import { jsx as jsx245 } from "react/jsx-runtime";
29342
29430
  function FormHeading(props) {
29343
29431
  const {
29344
29432
  title,
@@ -29348,7 +29436,7 @@ function FormHeading(props) {
29348
29436
  } = props;
29349
29437
  return (
29350
29438
  // Add space before the heading, but only if it's not first.
29351
- /* @__PURE__ */ jsx244("h3", { ...trussProps138({
29439
+ /* @__PURE__ */ jsx245("h3", { ...trussProps139({
29352
29440
  ...{
29353
29441
  fontWeight: "fw4",
29354
29442
  fontSize: "fz_16px",
@@ -29365,8 +29453,8 @@ FormHeading.isFormHeading = true;
29365
29453
 
29366
29454
  // src/forms/StaticField.tsx
29367
29455
  import { useId as useId3 } from "@react-aria/utils";
29368
- import { trussProps as trussProps139 } from "@homebound/truss/runtime";
29369
- import { jsx as jsx245, jsxs as jsxs131 } from "react/jsx-runtime";
29456
+ import { trussProps as trussProps140 } from "@homebound/truss/runtime";
29457
+ import { jsx as jsx246, jsxs as jsxs131 } from "react/jsx-runtime";
29370
29458
  function StaticField(props) {
29371
29459
  const {
29372
29460
  fieldProps
@@ -29379,14 +29467,14 @@ function StaticField(props) {
29379
29467
  } = props;
29380
29468
  const tid = useTestIds(props, typeof label === "string" ? defaultTestId(label) : "staticField");
29381
29469
  const id = useId3();
29382
- return /* @__PURE__ */ jsxs131("div", { ...trussProps139({
29470
+ return /* @__PURE__ */ jsxs131("div", { ...trussProps140({
29383
29471
  ...labelStyle === "left" ? {
29384
29472
  display: "df",
29385
29473
  justifyContent: "jcsb",
29386
29474
  maxWidth: "maxw100"
29387
29475
  } : {}
29388
29476
  }), ...tid.container, children: [
29389
- /* @__PURE__ */ jsx245("label", { ...trussProps139({
29477
+ /* @__PURE__ */ jsx246("label", { ...trussProps140({
29390
29478
  display: "db",
29391
29479
  fontWeight: "fw4",
29392
29480
  fontSize: "fz_14px",
@@ -29396,7 +29484,7 @@ function StaticField(props) {
29396
29484
  }],
29397
29485
  marginBottom: "mb_4px"
29398
29486
  }), htmlFor: id, ...tid.label, children: label }),
29399
- /* @__PURE__ */ jsx245("div", { id, ...trussProps139({
29487
+ /* @__PURE__ */ jsx246("div", { id, ...trussProps140({
29400
29488
  fontWeight: "fw4",
29401
29489
  fontSize: "fz_14px",
29402
29490
  lineHeight: "lh_20px",
@@ -29424,10 +29512,10 @@ function useFilter4({ filterDefs }) {
29424
29512
  }
29425
29513
 
29426
29514
  // src/inputs/Autocomplete.tsx
29427
- import { useCallback as useCallback44, useRef as useRef76 } from "react";
29515
+ import { useCallback as useCallback45, useRef as useRef76 } from "react";
29428
29516
  import { useComboBox as useComboBox3, useOverlayPosition as useOverlayPosition6 } from "react-aria";
29429
29517
  import { Item as Item5, useComboBoxState as useComboBoxState3 } from "react-stately";
29430
- import { Fragment as Fragment53, jsx as jsx246, jsxs as jsxs132 } from "react/jsx-runtime";
29518
+ import { Fragment as Fragment53, jsx as jsx247, jsxs as jsxs132 } from "react/jsx-runtime";
29431
29519
  function Autocomplete(props) {
29432
29520
  const {
29433
29521
  onSelect,
@@ -29444,8 +29532,8 @@ function Autocomplete(props) {
29444
29532
  } = props;
29445
29533
  const { effectiveValue, proposalProps } = useAiProposal(value, proposedValue);
29446
29534
  const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
29447
- const comboBoxChildren = useCallback44(
29448
- (item) => /* @__PURE__ */ jsx246(Item5, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
29535
+ const comboBoxChildren = useCallback45(
29536
+ (item) => /* @__PURE__ */ jsx247(Item5, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
29449
29537
  [getOptionValue, getOptionLabel, getOptionMenuLabel]
29450
29538
  );
29451
29539
  const comboBoxProps = {
@@ -29499,7 +29587,7 @@ function Autocomplete(props) {
29499
29587
  minWidth: 200
29500
29588
  };
29501
29589
  return /* @__PURE__ */ jsxs132(Fragment53, { children: [
29502
- /* @__PURE__ */ jsx246(
29590
+ /* @__PURE__ */ jsx247(
29503
29591
  TextFieldBase,
29504
29592
  {
29505
29593
  inputRef,
@@ -29509,11 +29597,11 @@ function Autocomplete(props) {
29509
29597
  onChange: onInputChange,
29510
29598
  ...proposalProps,
29511
29599
  clearable: true,
29512
- startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ jsx246(Icon, { icon: "search" }),
29600
+ startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ jsx247(Icon, { icon: "search" }),
29513
29601
  ...others
29514
29602
  }
29515
29603
  ),
29516
- state.isOpen && /* @__PURE__ */ jsx246(
29604
+ state.isOpen && /* @__PURE__ */ jsx247(
29517
29605
  Popover,
29518
29606
  {
29519
29607
  triggerRef: inputRef,
@@ -29522,7 +29610,7 @@ function Autocomplete(props) {
29522
29610
  onClose: () => state.close(),
29523
29611
  isOpen: state.isOpen,
29524
29612
  minWidth: 200,
29525
- children: /* @__PURE__ */ jsx246(
29613
+ children: /* @__PURE__ */ jsx247(
29526
29614
  ListBox,
29527
29615
  {
29528
29616
  ...listBoxProps,
@@ -29543,8 +29631,8 @@ function Autocomplete(props) {
29543
29631
  import { useRef as useRef77, useState as useState66 } from "react";
29544
29632
  import { useFocusRing as useFocusRing21, useHover as useHover24, usePress as usePress2, useSwitch as useSwitch2, VisuallyHidden as VisuallyHidden10 } from "react-aria";
29545
29633
  import { useToggleState as useToggleState2 } from "react-stately";
29546
- import { trussProps as trussProps140 } from "@homebound/truss/runtime";
29547
- import { jsx as jsx247, jsxs as jsxs133 } from "react/jsx-runtime";
29634
+ import { trussProps as trussProps141 } from "@homebound/truss/runtime";
29635
+ import { jsx as jsx248, jsxs as jsxs133 } from "react/jsx-runtime";
29548
29636
  function ToggleButton(props) {
29549
29637
  const {
29550
29638
  selected: isSelected = false,
@@ -29608,7 +29696,7 @@ function ToggleButton(props) {
29608
29696
  ...focusProps,
29609
29697
  ...hoverProps,
29610
29698
  ...pressProps,
29611
- ...trussProps140({
29699
+ ...trussProps141({
29612
29700
  // Gray500 off-state has no semantic match — keep palette (OnSurfaceMuted is Gray700).
29613
29701
  ...{
29614
29702
  borderRadius: "br4",
@@ -29649,9 +29737,9 @@ function ToggleButton(props) {
29649
29737
  title: tooltip,
29650
29738
  placement: "top",
29651
29739
  children: /* @__PURE__ */ jsxs133("label", { ...labelAttrs, children: [
29652
- icon && /* @__PURE__ */ jsx247(Icon, { icon }),
29740
+ icon && /* @__PURE__ */ jsx248(Icon, { icon }),
29653
29741
  label,
29654
- /* @__PURE__ */ jsx247(VisuallyHidden10, { children: /* @__PURE__ */ jsx247("input", { ref, ...inputProps, ...tid.value }) })
29742
+ /* @__PURE__ */ jsx248(VisuallyHidden10, { children: /* @__PURE__ */ jsx248("input", { ref, ...inputProps, ...tid.value }) })
29655
29743
  ] })
29656
29744
  });
29657
29745
  }