@homebound/beam 3.107.0 → 3.108.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.d.cts CHANGED
@@ -7917,6 +7917,8 @@ type DnDGridProps = {
7917
7917
  gridStyles?: GridStyles;
7918
7918
  /** Defines the styling for the GridItem that is actively being moved */
7919
7919
  activeItemStyles?: Properties;
7920
+ /** Restrict drag movement to one axis. Omit to allow free 2D movement. */
7921
+ lockAxis?: "x" | "y";
7920
7922
  /** Returns the new order of the GridItems. */
7921
7923
  onReorder: (items: string[]) => void;
7922
7924
  };
package/dist/index.d.ts CHANGED
@@ -7917,6 +7917,8 @@ type DnDGridProps = {
7917
7917
  gridStyles?: GridStyles;
7918
7918
  /** Defines the styling for the GridItem that is actively being moved */
7919
7919
  activeItemStyles?: Properties;
7920
+ /** Restrict drag movement to one axis. Omit to allow free 2D movement. */
7921
+ lockAxis?: "x" | "y";
7920
7922
  /** Returns the new order of the GridItems. */
7921
7923
  onReorder: (items: string[]) => void;
7922
7924
  };
package/dist/index.js CHANGED
@@ -20061,7 +20061,7 @@ function SuperDrawer() {
20061
20061
  }
20062
20062
 
20063
20063
  // src/components/Layout/FormPageLayout.tsx
20064
- import React19, { createRef, useCallback as useCallback29, useEffect as useEffect26, useMemo as useMemo37, useRef as useRef53, useState as useState44 } from "react";
20064
+ import React19, { createRef, useCallback as useCallback29, useEffect as useEffect27, useMemo as useMemo37, useRef as useRef53, useState as useState44 } from "react";
20065
20065
  import { useButton as useButton9, useFocusRing as useFocusRing14 } from "react-aria";
20066
20066
 
20067
20067
  // src/forms/BoundCheckboxField.tsx
@@ -21245,7 +21245,7 @@ FormHeading.isFormHeading = true;
21245
21245
 
21246
21246
  // src/components/DnDGrid/DnDGrid.tsx
21247
21247
  import equal2 from "fast-deep-equal";
21248
- import { useCallback as useCallback27, useRef as useRef50 } from "react";
21248
+ import { useCallback as useCallback27, useEffect as useEffect26, useRef as useRef50 } from "react";
21249
21249
 
21250
21250
  // src/components/DnDGrid/DnDGridContext.tsx
21251
21251
  import { createContext as createContext9, useContext as useContext19 } from "react";
@@ -21266,7 +21266,8 @@ function DnDGrid(props) {
21266
21266
  children,
21267
21267
  gridStyles,
21268
21268
  onReorder,
21269
- activeItemStyles
21269
+ activeItemStyles,
21270
+ lockAxis
21270
21271
  } = props;
21271
21272
  const gridEl = useRef50(null);
21272
21273
  const dragEl = useRef50();
@@ -21333,15 +21334,15 @@ function DnDGrid(props) {
21333
21334
  const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY;
21334
21335
  const left = dragEl.current.style.left ? parseInt(dragEl.current.style.left) : 0;
21335
21336
  const top = dragEl.current.style.top ? parseInt(dragEl.current.style.top) : 0;
21336
- const x = clientX - transformFrom.current.x - left;
21337
- const y = clientY - transformFrom.current.y - top;
21337
+ const x = lockAxis === "y" ? 0 : clientX - transformFrom.current.x - left;
21338
+ const y = lockAxis === "x" ? 0 : clientY - transformFrom.current.y - top;
21338
21339
  dragEl.current.style.transform = `translate(${x}px, ${y}px)`;
21339
21340
  const maybeTarget = "touches" in e ? document.elementFromPoint(clientX, clientY) : e.target;
21340
21341
  const target = maybeTarget instanceof HTMLElement ? maybeTarget?.closest(`[${gridItemIdKey}]`) : void 0;
21341
21342
  if (target instanceof HTMLElement && target !== cloneEl.current && target !== dragEl.current) {
21342
21343
  const targetPos = target.getBoundingClientRect();
21343
21344
  const clonePos = cloneEl.current.getBoundingClientRect();
21344
- const useYAxis = Math.abs(targetPos.top - clonePos.top) >= Math.abs(targetPos.left - clonePos.left);
21345
+ const useYAxis = lockAxis === "y" ? true : lockAxis === "x" ? false : Math.abs(targetPos.top - clonePos.top) >= Math.abs(targetPos.left - clonePos.left);
21345
21346
  const isHalfwayPassedTarget = useYAxis ? (clientY - targetPos.top) / (targetPos.bottom - targetPos.top) > 0.5 : (clientX - targetPos.left) / (targetPos.right - targetPos.left) > 0.5;
21346
21347
  const shouldInsert = isHalfwayPassedTarget && target.nextSibling !== cloneEl.current || !isHalfwayPassedTarget && target.previousSibling !== cloneEl.current;
21347
21348
  if (shouldInsert) {
@@ -21349,7 +21350,18 @@ function DnDGrid(props) {
21349
21350
  }
21350
21351
  }
21351
21352
  }
21352
- }, []);
21353
+ }, [lockAxis]);
21354
+ const onDragEnd = useCallback27((e) => {
21355
+ if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
21356
+ e.preventDefault();
21357
+ cloneEl.current.replaceWith(dragEl.current);
21358
+ gridEl.current.querySelectorAll(`[${gridCloneKey}]`).forEach((el) => el.remove());
21359
+ gridEl.current.style.cursor = "auto";
21360
+ cloneEl.current = void 0;
21361
+ commitReorder();
21362
+ removePointerDragListeners(onMove, onDragEnd);
21363
+ }
21364
+ }, [commitReorder, onMove]);
21353
21365
  const onDragStart = useCallback27((e) => {
21354
21366
  if (!reorderViaKeyboard.current && dragEl.current && gridEl.current) {
21355
21367
  const rect = dragEl.current.getBoundingClientRect();
@@ -21375,22 +21387,12 @@ function DnDGrid(props) {
21375
21387
  dragEl.current.style.width = `${rect.width}px`;
21376
21388
  dragEl.current.style.height = `${rect.height}px`;
21377
21389
  gridEl.current.style.cursor = "grabbing";
21378
- gridEl.current.addEventListener("mousemove", onMove);
21379
- gridEl.current.addEventListener("touchmove", onMove);
21380
- }
21381
- }, [initReorder, onMove]);
21382
- const onDragEnd = useCallback27((e) => {
21383
- if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
21384
- e.preventDefault();
21385
- cloneEl.current.replaceWith(dragEl.current);
21386
- gridEl.current.querySelectorAll(`[${gridCloneKey}]`).forEach((el) => el.remove());
21387
- gridEl.current.style.cursor = "auto";
21388
- cloneEl.current = void 0;
21389
- commitReorder();
21390
- gridEl.current.removeEventListener("mousemove", onMove);
21391
- gridEl.current.removeEventListener("touchmove", onMove);
21390
+ addPointerDragListeners(onMove, onDragEnd);
21392
21391
  }
21393
- }, [commitReorder, onMove]);
21392
+ }, [initReorder, onMove, onDragEnd]);
21393
+ useEffect26(() => {
21394
+ return () => removePointerDragListeners(onMove, onDragEnd);
21395
+ }, [onMove, onDragEnd]);
21394
21396
  const onDragHandleKeyDown = useCallback27((e) => {
21395
21397
  const moveHandle = e.target;
21396
21398
  if (dragEl.current instanceof HTMLElement && moveHandle instanceof HTMLElement && gridEl.current) {
@@ -21424,8 +21426,8 @@ function DnDGrid(props) {
21424
21426
  document.removeEventListener("pointerdown", cancelReorder);
21425
21427
  return;
21426
21428
  }
21427
- const movingLeft = ["ArrowLeft", "ArrowUp"].includes(e.key);
21428
- const movingRight = ["ArrowRight", "ArrowDown"].includes(e.key);
21429
+ const movingLeft = lockAxis !== "x" && e.key === "ArrowUp" || lockAxis !== "y" && e.key === "ArrowLeft";
21430
+ const movingRight = lockAxis !== "x" && e.key === "ArrowDown" || lockAxis !== "y" && e.key === "ArrowRight";
21429
21431
  if (movingLeft || movingRight) {
21430
21432
  e.preventDefault();
21431
21433
  const gridItems = getGridItems();
@@ -21438,7 +21440,7 @@ function DnDGrid(props) {
21438
21440
  moveHandle.focus();
21439
21441
  }
21440
21442
  }
21441
- }, [cancelReorder, commitReorder, initReorder, getGridItems]);
21443
+ }, [cancelReorder, commitReorder, initReorder, getGridItems, lockAxis]);
21442
21444
  return /* @__PURE__ */ jsx147(DnDGridContext.Provider, { value: {
21443
21445
  dragEl,
21444
21446
  onDragHandleKeyDown
@@ -21452,6 +21454,22 @@ function DnDGrid(props) {
21452
21454
  }
21453
21455
  var gridItemIdKey = "dndgrid-itemid";
21454
21456
  var gridCloneKey = "dndgrid-clone";
21457
+ function addPointerDragListeners(onMove, onEnd) {
21458
+ document.addEventListener("mousemove", onMove);
21459
+ document.addEventListener("touchmove", onMove);
21460
+ document.addEventListener("mouseup", onEnd);
21461
+ document.addEventListener("touchend", onEnd);
21462
+ document.addEventListener("pointercancel", onEnd);
21463
+ document.addEventListener("touchcancel", onEnd);
21464
+ }
21465
+ function removePointerDragListeners(onMove, onEnd) {
21466
+ document.removeEventListener("mousemove", onMove);
21467
+ document.removeEventListener("touchmove", onMove);
21468
+ document.removeEventListener("mouseup", onEnd);
21469
+ document.removeEventListener("touchend", onEnd);
21470
+ document.removeEventListener("pointercancel", onEnd);
21471
+ document.removeEventListener("touchcancel", onEnd);
21472
+ }
21455
21473
  function applyActiveStyles(el, activeStyles3) {
21456
21474
  const {
21457
21475
  className,
@@ -21840,7 +21858,7 @@ function DraggableChildren(props) {
21840
21858
  }
21841
21859
  });
21842
21860
  };
21843
- return /* @__PURE__ */ jsx153(DnDGrid, { onReorder: handleReorder, gridStyles: {
21861
+ return /* @__PURE__ */ jsx153(DnDGrid, { onReorder: handleReorder, lockAxis: "y", gridStyles: {
21844
21862
  gridTemplateColumns: "gtc_minmax_0_1fr",
21845
21863
  gap: "gap3"
21846
21864
  }, children: sorted.map((child) => /* @__PURE__ */ jsx153(FormSectionChild, { ...child, ...tid }, child.id)) });
@@ -22404,7 +22422,7 @@ function useActiveSection(sectionsWithRefs) {
22404
22422
  }, 200, {
22405
22423
  maxWait: 500
22406
22424
  });
22407
- useEffect26(() => {
22425
+ useEffect27(() => {
22408
22426
  if (!("IntersectionObserver" in window)) return;
22409
22427
  const observer3 = new IntersectionObserver((entries) => debouncedIntersectionCallback(entries), {
22410
22428
  /**
@@ -22497,7 +22515,7 @@ function invertSpacing(value) {
22497
22515
 
22498
22516
  // src/components/Layout/GridTableLayout/GridTableLayout.tsx
22499
22517
  import { useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
22500
- import React21, { useCallback as useCallback33, useEffect as useEffect29, useLayoutEffect as useLayoutEffect9, useMemo as useMemo43, useRef as useRef55, useState as useState49 } from "react";
22518
+ import React21, { useCallback as useCallback33, useEffect as useEffect30, useLayoutEffect as useLayoutEffect9, useMemo as useMemo43, useRef as useRef55, useState as useState49 } from "react";
22501
22519
 
22502
22520
  // src/components/Filters/utils.tsx
22503
22521
  function getActiveFilterCount(filter) {
@@ -22523,7 +22541,7 @@ import { mergeProps as mergeProps27 } from "@homebound/truss/runtime";
22523
22541
 
22524
22542
  // src/components/Layout/RightPaneLayout/DocumentScrollRightPane.tsx
22525
22543
  import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
22526
- import { useEffect as useEffect27 } from "react";
22544
+ import { useEffect as useEffect28 } from "react";
22527
22545
  import { usePreventScroll as usePreventScroll2 } from "react-aria";
22528
22546
  import { createPortal as createPortal6 } from "react-dom";
22529
22547
 
@@ -22597,7 +22615,7 @@ function DocumentScrollRightPane({
22597
22615
  usePreventScroll2({
22598
22616
  isDisabled: !isMobileOverlay
22599
22617
  });
22600
- useEffect27(() => closePane, [closePane]);
22618
+ useEffect28(() => closePane, [closePane]);
22601
22619
  const slideX = sm ? "100%" : paneWidth;
22602
22620
  const pane = /* @__PURE__ */ jsx163(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx163(motion3.div, { ...tid, ...mergeProps26(void 0, sm ? {
22603
22621
  top: bannerHeightPx
@@ -23259,12 +23277,12 @@ function ConfirmCloseModal(props) {
23259
23277
  }
23260
23278
 
23261
23279
  // src/components/Modal/OpenModal.tsx
23262
- import { useEffect as useEffect28 } from "react";
23280
+ import { useEffect as useEffect29 } from "react";
23263
23281
  import { jsx as jsx175 } from "react/jsx-runtime";
23264
23282
  function OpenModal(props) {
23265
23283
  const { openModal } = useModal();
23266
23284
  const { size, children, keepOpen, aiMode } = props;
23267
- useEffect28(() => {
23285
+ useEffect29(() => {
23268
23286
  if (!keepOpen) {
23269
23287
  openModal({ size, content: children, aiMode });
23270
23288
  }
@@ -23886,7 +23904,7 @@ function GridTableLayoutComponent(props) {
23886
23904
  const tableWrapperRef = useRef55(null);
23887
23905
  useSetTableActionsHeight(tableWrapperRef, tableActionsRef, inDocumentScrollLayout && showTableActions);
23888
23906
  const visibleColumnIds = useComputed(() => api.getVisibleColumnIds(), [api]);
23889
- useEffect29(() => {
23907
+ useEffect30(() => {
23890
23908
  if (layoutState?.setVisibleColumnIds) {
23891
23909
  layoutState.setVisibleColumnIds(visibleColumnIds);
23892
23910
  }
@@ -24059,7 +24077,7 @@ function PreventBrowserScroll({
24059
24077
 
24060
24078
  // src/components/Layout/RightPaneLayout/RightPaneLayout.tsx
24061
24079
  import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
24062
- import { useEffect as useEffect30 } from "react";
24080
+ import { useEffect as useEffect31 } from "react";
24063
24081
  import { trussProps as trussProps105, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
24064
24082
  import { Fragment as Fragment41, jsx as jsx188, jsxs as jsxs92 } from "react/jsx-runtime";
24065
24083
  var __maybeInc24 = (inc) => {
@@ -24078,7 +24096,7 @@ function RightPaneLayout(props) {
24078
24096
  clearPane,
24079
24097
  closePane
24080
24098
  } = useRightPaneContext();
24081
- useEffect30(() => closePane, [closePane]);
24099
+ useEffect31(() => closePane, [closePane]);
24082
24100
  return /* @__PURE__ */ jsx188("div", { className: "h100 df oxh", children: /* @__PURE__ */ jsxs92(Fragment41, { children: [
24083
24101
  /* @__PURE__ */ jsx188("div", { ...trussProps105({
24084
24102
  ...{
@@ -24190,7 +24208,7 @@ function ScrollableFooter(props) {
24190
24208
 
24191
24209
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
24192
24210
  import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
24193
- import { useEffect as useEffect31, useState as useState50 } from "react";
24211
+ import { useEffect as useEffect32, useState as useState50 } from "react";
24194
24212
 
24195
24213
  // src/components/Layout/TableReviewLayout/SidePanel.tsx
24196
24214
  import { jsx as jsx190, jsxs as jsxs93 } from "react/jsx-runtime";
@@ -24231,7 +24249,7 @@ function TableReviewLayout(props) {
24231
24249
  } = props;
24232
24250
  const tid = useTestIds(props, "tableReviewLayout");
24233
24251
  const [isPanelVisible, setIsPanelVisible] = useState50(!!panelContent);
24234
- useEffect31(() => {
24252
+ useEffect32(() => {
24235
24253
  setIsPanelVisible(!!panelContent);
24236
24254
  }, [panelContent]);
24237
24255
  function handleClosePanel() {
@@ -25316,7 +25334,7 @@ function useResponsiveGrid(props) {
25316
25334
  }
25317
25335
 
25318
25336
  // src/components/Grid/useResponsiveGridItem.ts
25319
- import { useContext as useContext24, useEffect as useEffect32, useMemo as useMemo48 } from "react";
25337
+ import { useContext as useContext24, useEffect as useEffect33, useMemo as useMemo48 } from "react";
25320
25338
  var injectedResponsiveGridClasses = /* @__PURE__ */ new Set();
25321
25339
  var responsiveGridStyleEl;
25322
25340
  function useResponsiveGridItem(props) {
@@ -25346,7 +25364,7 @@ function useResponsiveGridItem(props) {
25346
25364
  };
25347
25365
  }
25348
25366
  function useResponsiveGridItemStyle(className, cssText) {
25349
- useEffect32(
25367
+ useEffect33(
25350
25368
  function() {
25351
25369
  if (!className || !cssText || typeof document === "undefined") return;
25352
25370
  if (!responsiveGridStyleEl) {
@@ -25608,7 +25626,7 @@ var jumpLinkStyles = {
25608
25626
 
25609
25627
  // src/components/MaxLines.tsx
25610
25628
  import { useLayoutEffect as useLayoutEffect10, useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
25611
- import { useCallback as useCallback34, useEffect as useEffect33, useRef as useRef61, useState as useState53 } from "react";
25629
+ import { useCallback as useCallback34, useEffect as useEffect34, useRef as useRef61, useState as useState53 } from "react";
25612
25630
  import { trussProps as trussProps116, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
25613
25631
  import { jsx as jsx205, jsxs as jsxs103 } from "react/jsx-runtime";
25614
25632
  function MaxLines({
@@ -25622,7 +25640,7 @@ function MaxLines({
25622
25640
  if (!elRef.current) return;
25623
25641
  setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
25624
25642
  }, []);
25625
- useEffect33(() => {
25643
+ useEffect34(() => {
25626
25644
  setExpanded(false);
25627
25645
  }, [children]);
25628
25646
  const onResize = useCallback34(() => {
@@ -25655,7 +25673,7 @@ import { camelCase as camelCase6 } from "change-case";
25655
25673
  // src/components/AppNav/AppNavGroup.tsx
25656
25674
  import { useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
25657
25675
  import { camelCase as camelCase5, kebabCase } from "change-case";
25658
- import { useCallback as useCallback36, useEffect as useEffect34, useMemo as useMemo51, useState as useState55 } from "react";
25676
+ import { useCallback as useCallback36, useEffect as useEffect35, useMemo as useMemo51, useState as useState55 } from "react";
25659
25677
 
25660
25678
  // src/components/AppNav/AppNavGroupTrigger.tsx
25661
25679
  import { useMemo as useMemo50, useRef as useRef62 } from "react";
@@ -25895,7 +25913,7 @@ function AppNavGroupDisclosure(props) {
25895
25913
  current: contentEl
25896
25914
  }), [contentEl]);
25897
25915
  const [contentHeight, setContentHeight] = useState55(expanded ? "auto" : "0");
25898
- useEffect34(() => {
25916
+ useEffect35(() => {
25899
25917
  setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
25900
25918
  }, [expanded, contentEl]);
25901
25919
  const onResize = useCallback36(() => {
@@ -26045,7 +26063,7 @@ function AppNavItems(props) {
26045
26063
 
26046
26064
  // src/components/Navbar/NavbarMobileMenu.tsx
26047
26065
  import { AnimatePresence as AnimatePresence6, motion as motion6 } from "framer-motion";
26048
- import { useEffect as useEffect35, useState as useState57 } from "react";
26066
+ import { useEffect as useEffect36, useState as useState57 } from "react";
26049
26067
  import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll3 } from "react-aria";
26050
26068
  import { createPortal as createPortal8 } from "react-dom";
26051
26069
  import { useLocation } from "react-router-dom";
@@ -26097,7 +26115,7 @@ function NavbarMobileMenu(props) {
26097
26115
  isDisabled: !isOpen
26098
26116
  });
26099
26117
  const close = () => setIsOpen(false);
26100
- useEffect35(() => {
26118
+ useEffect36(() => {
26101
26119
  close();
26102
26120
  }, [pathname, search]);
26103
26121
  return /* @__PURE__ */ jsxs107(Fragment47, { children: [
@@ -26554,7 +26572,7 @@ import {
26554
26572
  createContext as createContext15,
26555
26573
  useCallback as useCallback38,
26556
26574
  useContext as useContext27,
26557
- useEffect as useEffect36,
26575
+ useEffect as useEffect37,
26558
26576
  useMemo as useMemo54,
26559
26577
  useRef as useRef64,
26560
26578
  useState as useState59
@@ -26588,7 +26606,7 @@ function SideNavLayoutProvider(props) {
26588
26606
  );
26589
26607
  const bp = useBreakpoint();
26590
26608
  const prevMdAndUp = useRef64(bp.mdAndUp);
26591
- useEffect36(() => {
26609
+ useEffect37(() => {
26592
26610
  if (prevMdAndUp.current && !bp.mdAndUp) {
26593
26611
  setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
26594
26612
  }
@@ -26675,7 +26693,7 @@ function SideNav(props) {
26675
26693
  }
26676
26694
 
26677
26695
  // src/components/Snackbar/useSnackbar.tsx
26678
- import { useCallback as useCallback39, useEffect as useEffect37 } from "react";
26696
+ import { useCallback as useCallback39, useEffect as useEffect38 } from "react";
26679
26697
  function useSnackbar() {
26680
26698
  const { setNotices, setOffset } = useSnackbarContext();
26681
26699
  const onClose = useCallback39(
@@ -26725,7 +26743,7 @@ function useSnackbar() {
26725
26743
  [onClose, setNotices]
26726
26744
  );
26727
26745
  const closeNotice = useCallback39((id) => onClose(id), [onClose]);
26728
- const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
26746
+ const useSnackbarOffset = ({ bottom }) => useEffect38(() => {
26729
26747
  setOffset({ bottom });
26730
26748
  return () => setOffset({});
26731
26749
  }, [bottom]);
@@ -27445,7 +27463,7 @@ function visit(rows, fn) {
27445
27463
 
27446
27464
  // src/components/Tabs.tsx
27447
27465
  import { camelCase as camelCase7 } from "change-case";
27448
- import { useEffect as useEffect38, useMemo as useMemo56, useRef as useRef67, useState as useState60 } from "react";
27466
+ import { useEffect as useEffect39, useMemo as useMemo56, useRef as useRef67, useState as useState60 } from "react";
27449
27467
  import { mergeProps as mergeProps35, useFocusRing as useFocusRing20, useHover as useHover23 } from "react-aria";
27450
27468
  import { matchPath } from "react-router";
27451
27469
  import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
@@ -27508,7 +27526,7 @@ function Tabs(props) {
27508
27526
  const tid = useTestIds(others, "tabs");
27509
27527
  const [active, setActive] = useState60(selected);
27510
27528
  const ref = useRef67(null);
27511
- useEffect38(() => setActive(selected), [selected]);
27529
+ useEffect39(() => setActive(selected), [selected]);
27512
27530
  function onKeyUp(e) {
27513
27531
  if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
27514
27532
  const nextTabValue = getNextTabValue(active, e.key, tabs);
@@ -28459,7 +28477,7 @@ function WorkflowHeader(props) {
28459
28477
  }
28460
28478
 
28461
28479
  // src/layouts/Workflow/useUnsavedChangesGuard.tsx
28462
- import { useEffect as useEffect39, useRef as useRef71 } from "react";
28480
+ import { useEffect as useEffect40, useRef as useRef71 } from "react";
28463
28481
  import { useBlocker } from "react-router-dom";
28464
28482
  import { jsx as jsx237 } from "react/jsx-runtime";
28465
28483
  function useUnsavedChangesGuard(options) {
@@ -28467,7 +28485,7 @@ function useUnsavedChangesGuard(options) {
28467
28485
  const { openModal } = useModal();
28468
28486
  const isDirtyRef = useRef71(isDirty);
28469
28487
  isDirtyRef.current = isDirty;
28470
- useEffect39(() => {
28488
+ useEffect40(() => {
28471
28489
  const onBeforeUnload = (e) => {
28472
28490
  if (isDirtyRef.current?.()) {
28473
28491
  e.preventDefault();
@@ -28493,7 +28511,7 @@ function useUnsavedChangesGuard(options) {
28493
28511
  function UnsavedChangesNavigationModal(props) {
28494
28512
  const { proceed, cancelNavigation } = props;
28495
28513
  const { openModal, closeModal } = useModal();
28496
- useEffect39(() => {
28514
+ useEffect40(() => {
28497
28515
  openModal({
28498
28516
  allowClosing: false,
28499
28517
  content: /* @__PURE__ */ jsx237(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })