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