@homebound/beam 4.45.2 → 4.46.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.d.cts CHANGED
@@ -9714,6 +9714,8 @@ type RightPanePanelProps = {
9714
9714
  children: ReactNode;
9715
9715
  /** Type or status tag on the close-button row; the title moves to its own row below. */
9716
9716
  tag?: RightPaneTag;
9717
+ /** When it returns true, closing the pane or opening content with another type or `key` asks to discard changes first. */
9718
+ isDirty?: () => boolean;
9717
9719
  /** When false, omit the built-in close control (caller provides their own). Default true. */
9718
9720
  withClose?: boolean;
9719
9721
  /** Variant defaults to primary */
@@ -9759,9 +9761,9 @@ type RightPaneOpenState = RightPaneOpenActions & {
9759
9761
  isRightPaneOpen: boolean;
9760
9762
  };
9761
9763
  type UseRightPaneHook = {
9762
- /** Opens a right pane */
9764
+ /** Opens a right pane; asks first if the open panel is dirty and the new content would replace it. */
9763
9765
  openRightPane: (opts: OpenRightPaneOpts) => void;
9764
- /** Closes the right pane */
9766
+ /** Closes the right pane; asks first if the open panel is dirty. */
9765
9767
  closeRightPane: () => void;
9766
9768
  /** Whether the right pane is currently open. */
9767
9769
  isRightPaneOpen: boolean;
package/dist/index.d.ts CHANGED
@@ -9714,6 +9714,8 @@ type RightPanePanelProps = {
9714
9714
  children: ReactNode;
9715
9715
  /** Type or status tag on the close-button row; the title moves to its own row below. */
9716
9716
  tag?: RightPaneTag;
9717
+ /** When it returns true, closing the pane or opening content with another type or `key` asks to discard changes first. */
9718
+ isDirty?: () => boolean;
9717
9719
  /** When false, omit the built-in close control (caller provides their own). Default true. */
9718
9720
  withClose?: boolean;
9719
9721
  /** Variant defaults to primary */
@@ -9759,9 +9761,9 @@ type RightPaneOpenState = RightPaneOpenActions & {
9759
9761
  isRightPaneOpen: boolean;
9760
9762
  };
9761
9763
  type UseRightPaneHook = {
9762
- /** Opens a right pane */
9764
+ /** Opens a right pane; asks first if the open panel is dirty and the new content would replace it. */
9763
9765
  openRightPane: (opts: OpenRightPaneOpts) => void;
9764
- /** Closes the right pane */
9766
+ /** Closes the right pane; asks first if the open panel is dirty. */
9765
9767
  closeRightPane: () => void;
9766
9768
  /** Whether the right pane is currently open. */
9767
9769
  isRightPaneOpen: boolean;
package/dist/index.js CHANGED
@@ -26863,8 +26863,10 @@ function useScrollPinnedViewportBounds(anchorRef, enabled, getPinTopPx) {
26863
26863
  import { useSyncExternalStore } from "react";
26864
26864
 
26865
26865
  // src/components/Layout/RightPaneLayout/rightPaneStore.ts
26866
+ import { isValidElement as isValidElement2 } from "react";
26866
26867
  var isOpen = false;
26867
26868
  var content;
26869
+ var discardPrompt;
26868
26870
  var openListeners = /* @__PURE__ */ new Set();
26869
26871
  var contentListeners = /* @__PURE__ */ new Set();
26870
26872
  var rightPaneOpenStore = {
@@ -26888,6 +26890,17 @@ function notifyContentListeners() {
26888
26890
  contentListeners.forEach((listener) => listener());
26889
26891
  }
26890
26892
  function openInPane(opts) {
26893
+ if (isOpen && wouldRemount(content, opts.content)) return confirmDiscard(() => showInPane(opts));
26894
+ if (isOpen && discardPrompt) warnIfUnkeyed(opts.content);
26895
+ showInPane(opts);
26896
+ }
26897
+ function warnIfUnkeyed(next) {
26898
+ if (process.env.NODE_ENV === "production" || !isValidElement2(next) || next.key !== null) return;
26899
+ console.warn(
26900
+ "[openRightPane] Opened unkeyed content of the same type over a panel with `isDirty`, so it didn't ask and that panel's edits carry over. Key pane content per item, e.g. `<Panel key={id} />`."
26901
+ );
26902
+ }
26903
+ function showInPane(opts) {
26891
26904
  content = opts.content;
26892
26905
  notifyContentListeners();
26893
26906
  if (isOpen) return;
@@ -26895,9 +26908,14 @@ function openInPane(opts) {
26895
26908
  notifyOpenListeners();
26896
26909
  }
26897
26910
  function closePane() {
26898
- if (!isOpen) return;
26899
- isOpen = false;
26900
- notifyOpenListeners();
26911
+ if (isOpen) confirmDiscard(hideRightPane);
26912
+ }
26913
+ function confirmDiscard(proceed) {
26914
+ if (discardPrompt) discardPrompt(proceed);
26915
+ else proceed();
26916
+ }
26917
+ function wouldRemount(prev, next) {
26918
+ return !isValidElement2(prev) || !isValidElement2(next) || prev.type !== next.type || prev.key !== next.key;
26901
26919
  }
26902
26920
  function clearPane() {
26903
26921
  content = void 0;
@@ -26908,9 +26926,28 @@ var rightPaneOpenActions = {
26908
26926
  closePane,
26909
26927
  clearPane
26910
26928
  };
26929
+ function setRightPaneDiscardPrompt(fn) {
26930
+ discardPrompt = fn;
26931
+ return () => {
26932
+ if (discardPrompt === fn) discardPrompt = void 0;
26933
+ };
26934
+ }
26935
+ function closeRightPaneThen(next) {
26936
+ if (!isOpen) return next();
26937
+ confirmDiscard(() => {
26938
+ hideRightPane();
26939
+ next();
26940
+ });
26941
+ }
26942
+ function hideRightPane() {
26943
+ if (!isOpen) return;
26944
+ isOpen = false;
26945
+ notifyOpenListeners();
26946
+ }
26911
26947
  function resetRightPaneStore() {
26912
26948
  isOpen = false;
26913
26949
  content = void 0;
26950
+ discardPrompt = void 0;
26914
26951
  notifyOpenListeners();
26915
26952
  notifyContentListeners();
26916
26953
  }
@@ -27118,17 +27155,13 @@ function DocumentScrollRightPaneLayoutRoot(props) {
27118
27155
  // src/components/Layout/RightPaneLayout/useDocumentScrollRightPaneAnchorRef.ts
27119
27156
  import { useCallback as useCallback30, useRef as useRef61 } from "react";
27120
27157
  function useDocumentScrollRightPaneAnchorRef() {
27121
- const { closePane: closePane2 } = useRightPaneOpenActions();
27122
27158
  const ref = useRef61(null);
27123
- const setRef = useCallback30(
27124
- (node) => {
27125
- if (!node && ref.current) {
27126
- closePane2();
27127
- }
27128
- ref.current = node;
27129
- },
27130
- [closePane2]
27131
- );
27159
+ const setRef = useCallback30((node) => {
27160
+ if (!node && ref.current) {
27161
+ hideRightPane();
27162
+ }
27163
+ ref.current = node;
27164
+ }, []);
27132
27165
  return { ref, setRef };
27133
27166
  }
27134
27167
 
@@ -27853,11 +27886,10 @@ function RightPaneLayout(props) {
27853
27886
  } = props;
27854
27887
  const {
27855
27888
  isRightPaneOpen,
27856
- clearPane: clearPane2,
27857
- closePane: closePane2
27889
+ clearPane: clearPane2
27858
27890
  } = useRightPaneOpenState();
27859
27891
  const rightPaneContent = useRightPaneContent();
27860
- useEffect30(() => closePane2, [closePane2]);
27892
+ useEffect30(() => hideRightPane, []);
27861
27893
  return /* @__PURE__ */ jsx206("div", { className: "h100 df oxh", children: /* @__PURE__ */ jsxs107(Fragment45, { children: [
27862
27894
  /* @__PURE__ */ jsx206("div", { ...trussProps116({
27863
27895
  ...{
@@ -27947,7 +27979,7 @@ function RightPaneLayout(props) {
27947
27979
  }
27948
27980
 
27949
27981
  // src/components/Layout/RightPaneLayout/RightPanePanel.tsx
27950
- import { createContext as createContext14, useContext as useContext24, useState as useState55 } from "react";
27982
+ import { createContext as createContext14, useContext as useContext24, useEffect as useEffect31, useState as useState55 } from "react";
27951
27983
  import { createPortal as createPortal8 } from "react-dom";
27952
27984
 
27953
27985
  // src/components/Layout/RightPaneLayout/internal/DeleteAction.tsx
@@ -28028,6 +28060,7 @@ function RightPanePanel(props) {
28028
28060
  title,
28029
28061
  children,
28030
28062
  tag,
28063
+ isDirty,
28031
28064
  withClose = true,
28032
28065
  primaryAction,
28033
28066
  secondaryAction,
@@ -28038,6 +28071,18 @@ function RightPanePanel(props) {
28038
28071
  closeRightPane
28039
28072
  } = useRightPaneActions();
28040
28073
  const [bannerSlot, setBannerSlot] = useState55(null);
28074
+ const {
28075
+ openModal
28076
+ } = useModal();
28077
+ useEffect31(() => {
28078
+ if (!isDirty) return;
28079
+ return setRightPaneDiscardPrompt((proceed) => {
28080
+ if (!isDirty()) return proceed();
28081
+ openModal({
28082
+ content: /* @__PURE__ */ jsx208(ConfirmCloseModal, { title: "Discard unsaved changes?", onClose: proceed })
28083
+ });
28084
+ });
28085
+ }, [isDirty, openModal]);
28041
28086
  const tagEl = tag && (tag.kind === "status" ? /* @__PURE__ */ jsx208(Tag, { ...tag, ...tid.tag }) : /* @__PURE__ */ jsx208(ContextTag, { ...tag, ...tid.tag }));
28042
28087
  const titleEl = /* @__PURE__ */ jsx208("div", { className: "fw6 fz_16px lh_24px oh d_negwebkit_box wbo_vertical to_ellipsis wlc_2", ...tid.title, children: title });
28043
28088
  const closeEl = withClose && /* @__PURE__ */ jsx208(IconButton, { icon: "x", label: "Close", autoFocus: true, onClick: closeRightPane, ...tid.close });
@@ -28112,7 +28157,7 @@ function ScrollableFooter(props) {
28112
28157
 
28113
28158
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
28114
28159
  import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
28115
- import { useEffect as useEffect31, useState as useState56 } from "react";
28160
+ import { useEffect as useEffect32, useState as useState56 } from "react";
28116
28161
 
28117
28162
  // src/components/Layout/TableReviewLayout/SidePanel.tsx
28118
28163
  import { jsx as jsx210, jsxs as jsxs110 } from "react/jsx-runtime";
@@ -28153,7 +28198,7 @@ function TableReviewLayout(props) {
28153
28198
  } = props;
28154
28199
  const tid = useTestIds(props, "tableReviewLayout");
28155
28200
  const [isPanelVisible, setIsPanelVisible] = useState56(!!panelContent);
28156
- useEffect31(() => {
28201
+ useEffect32(() => {
28157
28202
  setIsPanelVisible(!!panelContent);
28158
28203
  }, [panelContent]);
28159
28204
  function handleClosePanel() {
@@ -28313,7 +28358,7 @@ function HomeboundLogo(props) {
28313
28358
 
28314
28359
  // src/components/MaxLines.tsx
28315
28360
  import { useLayoutEffect as useLayoutEffect14, useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
28316
- import { useCallback as useCallback36, useEffect as useEffect32, useRef as useRef67, useState as useState57 } from "react";
28361
+ import { useCallback as useCallback36, useEffect as useEffect33, useRef as useRef67, useState as useState57 } from "react";
28317
28362
  import { trussProps as trussProps122, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
28318
28363
  import { jsx as jsx214, jsxs as jsxs113 } from "react/jsx-runtime";
28319
28364
  function MaxLines({
@@ -28327,7 +28372,7 @@ function MaxLines({
28327
28372
  if (!elRef.current) return;
28328
28373
  setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
28329
28374
  }, []);
28330
- useEffect32(() => {
28375
+ useEffect33(() => {
28331
28376
  setExpanded(false);
28332
28377
  }, [children]);
28333
28378
  const onResize = useCallback36(() => {
@@ -28586,7 +28631,7 @@ import { camelCase as camelCase7 } from "change-case";
28586
28631
  // src/components/AppNav/AppNavGroup.tsx
28587
28632
  import { useResizeObserver as useResizeObserver12 } from "@react-aria/utils";
28588
28633
  import { camelCase as camelCase6, kebabCase } from "change-case";
28589
- import { useCallback as useCallback39, useEffect as useEffect33, useMemo as useMemo52, useState as useState60 } from "react";
28634
+ import { useCallback as useCallback39, useEffect as useEffect34, useMemo as useMemo52, useState as useState60 } from "react";
28590
28635
 
28591
28636
  // src/components/AppNav/AppNavGroupTrigger.tsx
28592
28637
  import { useMemo as useMemo51, useRef as useRef69 } from "react";
@@ -28826,7 +28871,7 @@ function AppNavGroupDisclosure(props) {
28826
28871
  current: contentEl
28827
28872
  }), [contentEl]);
28828
28873
  const [contentHeight, setContentHeight] = useState60(expanded ? "auto" : "0");
28829
- useEffect33(() => {
28874
+ useEffect34(() => {
28830
28875
  setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
28831
28876
  }, [expanded, contentEl]);
28832
28877
  const onResize = useCallback39(() => {
@@ -28979,7 +29024,7 @@ import {
28979
29024
  createContext as createContext15,
28980
29025
  useCallback as useCallback40,
28981
29026
  useContext as useContext25,
28982
- useEffect as useEffect34,
29027
+ useEffect as useEffect35,
28983
29028
  useMemo as useMemo53,
28984
29029
  useRef as useRef70,
28985
29030
  useState as useState61
@@ -29013,7 +29058,7 @@ function SideNavLayoutProvider(props) {
29013
29058
  );
29014
29059
  const bp = useBreakpoint();
29015
29060
  const prevMdAndUp = useRef70(bp.mdAndUp);
29016
- useEffect34(() => {
29061
+ useEffect35(() => {
29017
29062
  if (prevMdAndUp.current && !bp.mdAndUp) {
29018
29063
  setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
29019
29064
  }
@@ -29849,7 +29894,7 @@ function MetricButton(props) {
29849
29894
 
29850
29895
  // src/components/DnDGrid/DnDGrid.tsx
29851
29896
  import equal2 from "fast-deep-equal";
29852
- import { useCallback as useCallback41, useEffect as useEffect35, useRef as useRef74 } from "react";
29897
+ import { useCallback as useCallback41, useEffect as useEffect36, useRef as useRef74 } from "react";
29853
29898
 
29854
29899
  // src/utils/inlineStyles.ts
29855
29900
  function isInlineStyleValue(value) {
@@ -30020,7 +30065,7 @@ function DnDGrid(props) {
30020
30065
  addPointerDragListeners(onMove, onDragEnd);
30021
30066
  }
30022
30067
  }, [initReorder, onMove, onDragEnd]);
30023
- useEffect35(() => {
30068
+ useEffect36(() => {
30024
30069
  return () => removePointerDragListeners(onMove, onDragEnd);
30025
30070
  }, [onMove, onDragEnd]);
30026
30071
  const onDragHandleKeyDown = useCallback41((e) => {
@@ -30777,7 +30822,7 @@ import { mergeProps as mergeProps40 } from "react-aria";
30777
30822
  import { trussProps as trussProps139 } from "@homebound/truss/runtime";
30778
30823
 
30779
30824
  // src/components/Grid/useResponsiveGridItem.ts
30780
- import { useContext as useContext27, useEffect as useEffect36, useMemo as useMemo57 } from "react";
30825
+ import { useContext as useContext27, useEffect as useEffect37, useMemo as useMemo57 } from "react";
30781
30826
  var injectedResponsiveGridClasses = /* @__PURE__ */ new Set();
30782
30827
  var responsiveGridStyleEl;
30783
30828
  function useResponsiveGridItem(props) {
@@ -30807,7 +30852,7 @@ function useResponsiveGridItem(props) {
30807
30852
  };
30808
30853
  }
30809
30854
  function useResponsiveGridItemStyle(className, cssText) {
30810
- useEffect36(
30855
+ useEffect37(
30811
30856
  function() {
30812
30857
  if (!className || !cssText || typeof document === "undefined") return;
30813
30858
  if (!responsiveGridStyleEl) {
@@ -30906,12 +30951,12 @@ function HbSpinnerProvider({
30906
30951
  }
30907
30952
 
30908
30953
  // src/components/Modal/OpenModal.tsx
30909
- import { useEffect as useEffect37 } from "react";
30954
+ import { useEffect as useEffect38 } from "react";
30910
30955
  import { jsx as jsx246 } from "react/jsx-runtime";
30911
30956
  function OpenModal(props) {
30912
30957
  const { openModal } = useModal();
30913
30958
  const { size, children, keepOpen, aiMode } = props;
30914
- useEffect37(() => {
30959
+ useEffect38(() => {
30915
30960
  if (!keepOpen) {
30916
30961
  openModal({ size, content: children, aiMode });
30917
30962
  }
@@ -30925,7 +30970,7 @@ function OpenModal(props) {
30925
30970
 
30926
30971
  // src/components/Navbar/NavbarMobileMenu.tsx
30927
30972
  import { AnimatePresence as AnimatePresence6, motion as motion7 } from "framer-motion";
30928
- import { useEffect as useEffect38, useState as useState63 } from "react";
30973
+ import { useEffect as useEffect39, useState as useState63 } from "react";
30929
30974
  import { FocusScope as FocusScope7, usePreventScroll as usePreventScroll4 } from "react-aria";
30930
30975
  import { createPortal as createPortal11 } from "react-dom";
30931
30976
  import { useLocation } from "react-router-dom";
@@ -30977,7 +31022,7 @@ function NavbarMobileMenu(props) {
30977
31022
  isDisabled: !isOpen2
30978
31023
  });
30979
31024
  const close = () => setIsOpen(false);
30980
- useEffect38(() => {
31025
+ useEffect39(() => {
30981
31026
  close();
30982
31027
  }, [pathname, search]);
30983
31028
  return /* @__PURE__ */ jsxs131(Fragment54, { children: [
@@ -31227,7 +31272,7 @@ function NavbarUserMenu({
31227
31272
  }
31228
31273
 
31229
31274
  // src/components/Snackbar/useSnackbar.tsx
31230
- import { useCallback as useCallback43, useEffect as useEffect39 } from "react";
31275
+ import { useCallback as useCallback43, useEffect as useEffect40 } from "react";
31231
31276
  function useSnackbar() {
31232
31277
  const { setNotices, setOffset } = useSnackbarContext();
31233
31278
  const onClose = useCallback43(
@@ -31277,7 +31322,7 @@ function useSnackbar() {
31277
31322
  [onClose, setNotices]
31278
31323
  );
31279
31324
  const closeNotice = useCallback43((id) => onClose(id), [onClose]);
31280
- const useSnackbarOffset = ({ bottom }) => useEffect39(() => {
31325
+ const useSnackbarOffset = ({ bottom }) => useEffect40(() => {
31281
31326
  setOffset({ bottom });
31282
31327
  return () => setOffset({});
31283
31328
  }, [bottom]);
@@ -31326,7 +31371,7 @@ function simpleDataRows(data = []) {
31326
31371
 
31327
31372
  // src/components/Tabs.tsx
31328
31373
  import { camelCase as camelCase8 } from "change-case";
31329
- import { useEffect as useEffect40, useMemo as useMemo60, useRef as useRef76, useState as useState65 } from "react";
31374
+ import { useEffect as useEffect41, useMemo as useMemo60, useRef as useRef76, useState as useState65 } from "react";
31330
31375
  import { mergeProps as mergeProps42, useFocusRing as useFocusRing22, useHover as useHover27 } from "react-aria";
31331
31376
  import { matchPath } from "react-router";
31332
31377
  import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
@@ -31408,7 +31453,7 @@ function Tabs(props) {
31408
31453
  const tid = useTestIds(others, "tabs");
31409
31454
  const [active, setActive] = useState65(selected);
31410
31455
  const ref = useRef76(null);
31411
- useEffect40(() => setActive(selected), [selected]);
31456
+ useEffect41(() => setActive(selected), [selected]);
31412
31457
  function onKeyUp(e) {
31413
31458
  if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
31414
31459
  const nextTabValue = getNextTabValue(active, e.key, tabs);
@@ -32276,7 +32321,7 @@ function FormSectionLayout(props) {
32276
32321
  }
32277
32322
 
32278
32323
  // src/layouts/PageBanner/usePageBanner.tsx
32279
- import { useEffect as useEffect41, useId as useId5, useLayoutEffect as useLayoutEffect18 } from "react";
32324
+ import { useEffect as useEffect42, useId as useId5, useLayoutEffect as useLayoutEffect18 } from "react";
32280
32325
 
32281
32326
  // src/layouts/PageBanner/pageBannerStore.ts
32282
32327
  var current;
@@ -32319,7 +32364,7 @@ function usePageBanner(banner) {
32319
32364
  setPageBanner(id, banner);
32320
32365
  return () => clearPageBanner(id);
32321
32366
  }, [id, banner]);
32322
- useEffect41(() => {
32367
+ useEffect42(() => {
32323
32368
  if (!banner || hasPageBannerSubscriber() || process.env.NODE_ENV === "production") return;
32324
32369
  console.warn("[usePageBanner] No page layout above this component; the banner will not render.");
32325
32370
  }, [banner]);
@@ -32839,7 +32884,7 @@ function WorkflowPageRightPaneTriggers(props) {
32839
32884
  }
32840
32885
 
32841
32886
  // src/layouts/Workflow/useUnsavedChangesGuard.tsx
32842
- import { useEffect as useEffect42, useRef as useRef82 } from "react";
32887
+ import { useEffect as useEffect43, useRef as useRef82 } from "react";
32843
32888
  import { useBlocker } from "react-router-dom";
32844
32889
  import { jsx as jsx268 } from "react/jsx-runtime";
32845
32890
  function useUnsavedChangesGuard(options) {
@@ -32850,7 +32895,7 @@ function useUnsavedChangesGuard(options) {
32850
32895
  const allowNavigationRef = useRef82(allowNavigation);
32851
32896
  allowNavigationRef.current = allowNavigation;
32852
32897
  const allowCancelNavigationRef = useRef82(false);
32853
- useEffect42(() => {
32898
+ useEffect43(() => {
32854
32899
  const onBeforeUnload = (e) => {
32855
32900
  if (isDirtyRef.current?.()) {
32856
32901
  e.preventDefault();
@@ -32917,7 +32962,7 @@ function useUnsavedChangesGuard(options) {
32917
32962
  function UnsavedChangesNavigationModal(props) {
32918
32963
  const { proceed, cancelNavigation } = props;
32919
32964
  const { openModal, closeModal } = useModal();
32920
- useEffect42(() => {
32965
+ useEffect43(() => {
32921
32966
  openModal({
32922
32967
  allowClosing: false,
32923
32968
  content: /* @__PURE__ */ jsx268(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
@@ -33032,6 +33077,16 @@ function WorkflowPageLayout(props) {
33032
33077
  }
33033
33078
  };
33034
33079
  }, [showFooter]);
33080
+ const currentStep = stepperTabs?.currentStep;
33081
+ const prevStepRef = useRef83(currentStep);
33082
+ useLayoutEffect24(() => {
33083
+ if (prevStepRef.current === currentStep) return;
33084
+ prevStepRef.current = currentStep;
33085
+ window.scrollTo({
33086
+ top: 0,
33087
+ left: 0
33088
+ });
33089
+ }, [currentStep]);
33035
33090
  return /* @__PURE__ */ jsxs145(DocumentScrollLayoutProvider, { children: [
33036
33091
  /* @__PURE__ */ jsxs145("div", { ...mergeProps49(void 0, style, {
33037
33092
  display: "df",
@@ -33175,15 +33230,13 @@ function StepperLayout(props) {
33175
33230
  const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
33176
33231
  const [currentStep, setCurrentStep] = useState70(() => getInitialStep(stepTabs, defaultStep));
33177
33232
  const tid = useTestIds(props, "stepperLayout");
33178
- const { closeRightPane } = useRightPaneActions();
33179
33233
  const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
33180
33234
  const isFirstStep = currentIndex <= 0;
33181
33235
  const isLastStep = currentIndex >= stepTabs.length - 1;
33182
33236
  const activeStep = stepTabs[currentIndex];
33183
33237
  function goToStep(value) {
33184
33238
  if (value === currentStep) return;
33185
- closeRightPane();
33186
- setCurrentStep(value);
33239
+ closeRightPaneThen(() => setCurrentStep(value));
33187
33240
  }
33188
33241
  return /* @__PURE__ */ jsx272(
33189
33242
  WorkflowPageLayout,