@uniformdev/design-system 20.60.1 → 20.61.1-alpha.11

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/esm/index.js CHANGED
@@ -1198,8 +1198,8 @@ var buttonSoftAccentPrimary = css10`
1198
1198
  import { css as css14 } from "@emotion/react";
1199
1199
 
1200
1200
  // src/components/Button/Button.tsx
1201
- import { Button as BaseButton } from "@ariakit/react";
1202
- import * as React2 from "react";
1201
+ import { Button as BaseUIButton } from "@base-ui/react/button";
1202
+ import * as React3 from "react";
1203
1203
 
1204
1204
  // src/components/Shortcuts/util/isMacLike.ts
1205
1205
  var isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(
@@ -1533,18 +1533,24 @@ function useShortcut({
1533
1533
  }
1534
1534
 
1535
1535
  // src/components/Tooltip/Tooltip.tsx
1536
- import {
1537
- Tooltip as AriakitTooltip,
1538
- TooltipAnchor,
1539
- TooltipArrow,
1540
- TooltipProvider,
1541
- useTooltipStore
1542
- } from "@ariakit/react";
1536
+ import { Tooltip as BaseUITooltip } from "@base-ui/react/tooltip";
1537
+ import { useState } from "react";
1538
+
1539
+ // src/components/types.ts
1540
+ function parsePlacement(placement) {
1541
+ const [side, alignment] = placement.split("-");
1542
+ return {
1543
+ side,
1544
+ alignment: alignment != null ? alignment : "center"
1545
+ };
1546
+ }
1543
1547
 
1544
1548
  // src/components/Tooltip/Tooltip.styles.ts
1545
1549
  import { css as css12 } from "@emotion/react";
1546
- var TooltipContainer = css12`
1550
+ var TooltipPositionerStyles = css12`
1547
1551
  z-index: var(--z-tooltip);
1552
+ `;
1553
+ var TooltipContainer = css12`
1548
1554
  border: 2px solid var(--gray-300);
1549
1555
  border-radius: var(--rounded-base);
1550
1556
  padding: var(--spacing-xs) var(--spacing-sm);
@@ -1554,13 +1560,65 @@ var TooltipContainer = css12`
1554
1560
  position: relative;
1555
1561
  `;
1556
1562
  var TooltipArrowStyles = css12`
1557
- svg {
1558
- fill: var(--gray-300);
1563
+ display: flex;
1564
+
1565
+ &[data-side='top'] {
1566
+ bottom: -7px;
1567
+ rotate: 180deg;
1568
+ }
1569
+
1570
+ &[data-side='bottom'] {
1571
+ top: -7px;
1572
+ rotate: 0deg;
1559
1573
  }
1574
+
1575
+ &[data-side='left'] {
1576
+ right: -12px;
1577
+ rotate: 90deg;
1578
+ }
1579
+
1580
+ &[data-side='right'] {
1581
+ left: -12px;
1582
+ rotate: -90deg;
1583
+ }
1584
+ `;
1585
+ var TooltipArrowFill = css12`
1586
+ fill: var(--gray-300);
1587
+ `;
1588
+ var TooltipArrowOuterStroke = css12`
1589
+ fill: var(--gray-300);
1590
+ `;
1591
+ var TooltipArrowInnerStroke = css12`
1592
+ fill: var(--gray-300);
1560
1593
  `;
1561
1594
 
1562
1595
  // src/components/Tooltip/Tooltip.tsx
1563
1596
  import { jsx as jsx12, jsxs as jsxs6 } from "@emotion/react/jsx-runtime";
1597
+ var ToolTipArrow = (props) => {
1598
+ return /* @__PURE__ */ jsxs6("svg", { width: "20", height: "8", viewBox: "0 0 20 8", fill: "none", ...props, children: [
1599
+ /* @__PURE__ */ jsx12(
1600
+ "path",
1601
+ {
1602
+ d: "M9.442 0.867356L7.91833 3.45918C7.71941 3.80355 7.4933 4 7.2422 4H6V5H14V4H12.7578C12.5067 4 12.2806 3.80355 12.0817 3.45918L10.558 0.867356C10.4382 0.663827 10.2221 0.663819 10.1023 0.867356Z",
1603
+ css: TooltipArrowFill
1604
+ }
1605
+ ),
1606
+ /* @__PURE__ */ jsx12(
1607
+ "path",
1608
+ {
1609
+ d: "M9.26586 0.543486C9.58533 -0.0606339 10.2547 -0.0606441 10.5742 0.543493L12.0979 3.13531C12.3054 3.50903 12.5581 3.7 12.8172 3.7H12.0074L10.558 0.867356C10.4382 0.663819 10.2221 0.663819 10.1023 0.867356L8.65295 3.7H7.84281C8.10193 3.7 8.35459 3.50903 8.56206 3.13531L9.26586 0.543486Z",
1610
+ css: TooltipArrowOuterStroke
1611
+ }
1612
+ ),
1613
+ /* @__PURE__ */ jsx12(
1614
+ "path",
1615
+ {
1616
+ d: "M10 1.22533L8.47636 3.81715C8.18616 4.33519 7.87363 4.5 7.2422 4.5H6V4H7.2422C7.4933 4 7.71941 3.80355 7.91833 3.45918L9.442 0.867356C9.56185 0.663819 9.77789 0.663827 9.89775 0.867356L11.4214 3.45918C11.6203 3.80355 11.8464 4 12.0975 4H14V4.5H12.7578C12.1264 4.5 11.8138 4.33519 11.5236 3.81715L10 1.22533Z",
1617
+ css: TooltipArrowInnerStroke
1618
+ }
1619
+ )
1620
+ ] });
1621
+ };
1564
1622
  function Tooltip({
1565
1623
  children,
1566
1624
  title,
@@ -1568,18 +1626,56 @@ function Tooltip({
1568
1626
  visible,
1569
1627
  withoutPortal = false,
1570
1628
  timeout = 0,
1571
- ...tooltipProps
1629
+ gutter = 10,
1630
+ ...popupProps
1572
1631
  }) {
1573
- const tooltip = useTooltipStore({ placement, open: visible });
1574
- return !title ? children : /* @__PURE__ */ jsxs6(TooltipProvider, { store: tooltip, timeout, children: [
1575
- /* @__PURE__ */ jsx12(TooltipAnchor, { store: tooltip, render: children }),
1576
- /* @__PURE__ */ jsxs6(AriakitTooltip, { store: tooltip, ...tooltipProps, portal: !withoutPortal, css: TooltipContainer, children: [
1577
- /* @__PURE__ */ jsx12(TooltipArrow, { store: tooltip, css: TooltipArrowStyles }),
1578
- title
1579
- ] })
1632
+ const [inlineContainer, setInlineContainer] = useState(null);
1633
+ if (!title) {
1634
+ return children;
1635
+ }
1636
+ const { side, alignment } = parsePlacement(placement);
1637
+ const positionerContent = /* @__PURE__ */ jsx12(BaseUITooltip.Positioner, { side, align: alignment, sideOffset: gutter, css: TooltipPositionerStyles, children: /* @__PURE__ */ jsxs6(BaseUITooltip.Popup, { css: TooltipContainer, ...popupProps, children: [
1638
+ /* @__PURE__ */ jsx12(BaseUITooltip.Arrow, { css: TooltipArrowStyles, children: /* @__PURE__ */ jsx12(ToolTipArrow, {}) }),
1639
+ title
1640
+ ] }) });
1641
+ return /* @__PURE__ */ jsxs6(BaseUITooltip.Root, { open: visible != null ? visible : popupProps.open, children: [
1642
+ /* @__PURE__ */ jsx12(BaseUITooltip.Trigger, { render: children, delay: timeout }),
1643
+ withoutPortal && /* @__PURE__ */ jsx12(
1644
+ "span",
1645
+ {
1646
+ ref: setInlineContainer,
1647
+ style: { position: "absolute", width: 0, height: 0, overflow: "visible" }
1648
+ }
1649
+ ),
1650
+ /* @__PURE__ */ jsx12(BaseUITooltip.Portal, { container: withoutPortal ? inlineContainer : void 0, children: positionerContent })
1580
1651
  ] });
1581
1652
  }
1582
1653
 
1654
+ // src/components/utils/nativeButton.ts
1655
+ import * as React2 from "react";
1656
+ function markNativeButton(component) {
1657
+ component.renderNativeButton = true;
1658
+ return component;
1659
+ }
1660
+ function isNativeButtonTrigger(element) {
1661
+ var _a;
1662
+ if (!React2.isValidElement(element)) {
1663
+ return false;
1664
+ }
1665
+ if (element.type === "button") {
1666
+ return true;
1667
+ }
1668
+ if (typeof element.type !== "string") {
1669
+ if (element.type.renderNativeButton) {
1670
+ return true;
1671
+ }
1672
+ if (((_a = element.props) == null ? void 0 : _a.type) === "button") {
1673
+ return true;
1674
+ }
1675
+ }
1676
+ return false;
1677
+ }
1678
+
1583
1679
  // src/components/Button/hooks/useButtonStyles.ts
1584
1680
  var btnSize = {
1585
1681
  zero: "padding: 0; font-size: var(--fs-sm);",
@@ -1634,47 +1730,51 @@ var useButtonStyles = getButtonStyles;
1634
1730
 
1635
1731
  // src/components/Button/Button.tsx
1636
1732
  import { Fragment as Fragment2, jsx as jsx13 } from "@emotion/react/jsx-runtime";
1637
- var Button = React2.forwardRef(
1638
- ({
1639
- buttonType = "primary",
1640
- size = "md",
1641
- children,
1642
- shortcut,
1643
- tooltip,
1644
- tooltipOptions,
1645
- onClick,
1646
- disabled: disabled2,
1647
- ...props
1648
- }, ref) => {
1649
- const { btnSize: btnSize2, buttonTheme: buttonTheme3 } = useButtonStyles({
1650
- theme: buttonType,
1651
- size,
1652
- ..."variant" in props ? { variant: props.variant } : {}
1653
- });
1654
- const clickHandler = onClick != null ? onClick : shortcut == null ? void 0 : shortcut.handler;
1655
- const disabledValue = disabled2 != null ? disabled2 : shortcut == null ? void 0 : shortcut.disabled;
1656
- const buttonContent = /* @__PURE__ */ jsx13(
1657
- BaseButton,
1658
- {
1659
- ref,
1660
- css: [button, buttonTheme3, btnSize2, disabledValue && buttonDisabled],
1661
- ...props,
1662
- onClick: clickHandler,
1663
- disabled: disabledValue,
1664
- children
1733
+ var Button = markNativeButton(
1734
+ React3.forwardRef(
1735
+ ({
1736
+ buttonType = "primary",
1737
+ size = "md",
1738
+ type = "button",
1739
+ children,
1740
+ shortcut,
1741
+ tooltip,
1742
+ tooltipOptions,
1743
+ onClick,
1744
+ disabled: disabled2,
1745
+ ...props
1746
+ }, ref) => {
1747
+ const { btnSize: btnSize2, buttonTheme: buttonTheme3 } = useButtonStyles({
1748
+ theme: buttonType,
1749
+ size,
1750
+ ..."variant" in props ? { variant: props.variant } : {}
1751
+ });
1752
+ const clickHandler = onClick != null ? onClick : shortcut == null ? void 0 : shortcut.handler;
1753
+ const disabledValue = disabled2 != null ? disabled2 : shortcut == null ? void 0 : shortcut.disabled;
1754
+ const buttonContent = /* @__PURE__ */ jsx13(
1755
+ BaseUIButton,
1756
+ {
1757
+ ref,
1758
+ css: [button, buttonTheme3, btnSize2, disabledValue && buttonDisabled],
1759
+ ...props,
1760
+ type,
1761
+ onClick: clickHandler,
1762
+ disabled: disabledValue,
1763
+ children
1764
+ }
1765
+ );
1766
+ const tip = tooltip != null ? tooltip : shortcut && !disabledValue ? getFormattedShortcut(shortcut.shortcut) : void 0;
1767
+ if (tip) {
1768
+ return /* @__PURE__ */ jsx13(Tooltip, { ...tooltipOptions, title: /* @__PURE__ */ jsx13(Fragment2, { children: tip }), children: /* @__PURE__ */ jsx13("span", { children: buttonContent }) });
1665
1769
  }
1666
- );
1667
- const tip = tooltip != null ? tooltip : shortcut && !disabledValue ? getFormattedShortcut(shortcut.shortcut) : void 0;
1668
- if (tip) {
1669
- return /* @__PURE__ */ jsx13(Tooltip, { ...tooltipOptions, title: /* @__PURE__ */ jsx13(Fragment2, { children: tip }), children: /* @__PURE__ */ jsx13("span", { children: buttonContent }) });
1770
+ return buttonContent;
1670
1771
  }
1671
- return buttonContent;
1672
- }
1772
+ )
1673
1773
  );
1674
1774
 
1675
1775
  // src/components/Button/LinkButton.tsx
1676
- import { Button as BaseButton2 } from "@ariakit/react";
1677
- import * as React3 from "react";
1776
+ import { Button as BaseUIButton2 } from "@base-ui/react/button";
1777
+ import * as React4 from "react";
1678
1778
 
1679
1779
  // src/components/Button/LinkButton.styles.ts
1680
1780
  import { css as css13 } from "@emotion/react";
@@ -1719,10 +1819,10 @@ var linkButtonTruncated = css13`
1719
1819
 
1720
1820
  // src/components/Button/LinkButton.tsx
1721
1821
  import { jsx as jsx14 } from "@emotion/react/jsx-runtime";
1722
- var LinkButton = React3.forwardRef(
1822
+ var LinkButton = React4.forwardRef(
1723
1823
  ({ children, disabled: disabled2, truncated, ...props }, ref) => {
1724
1824
  return /* @__PURE__ */ jsx14(
1725
- BaseButton2,
1825
+ BaseUIButton2,
1726
1826
  {
1727
1827
  ref,
1728
1828
  css: [
@@ -1978,16 +2078,16 @@ var accessibleHidden = css15`
1978
2078
  `;
1979
2079
 
1980
2080
  // src/hooks/useImageLoadFallback.ts
1981
- import { useEffect as useEffect2, useState } from "react";
2081
+ import { useEffect as useEffect2, useState as useState2 } from "react";
1982
2082
  function useImageLoadFallback({
1983
2083
  src,
1984
2084
  srcSet,
1985
2085
  errorFallbackSrc,
1986
2086
  logContext
1987
2087
  }) {
1988
- const [currentSrc, setCurrentSrc] = useState(src);
1989
- const [currentSrcSet, setCurrentSrcSet] = useState(srcSet);
1990
- const [usedFallback, setUsedFallback] = useState(false);
2088
+ const [currentSrc, setCurrentSrc] = useState2(src);
2089
+ const [currentSrcSet, setCurrentSrcSet] = useState2(srcSet);
2090
+ const [usedFallback, setUsedFallback] = useState2(false);
1991
2091
  useEffect2(() => {
1992
2092
  setCurrentSrc(src);
1993
2093
  setCurrentSrcSet(srcSet);
@@ -2206,7 +2306,7 @@ import { GenIcon } from "@react-icons/all-files";
2206
2306
  import { MdSettings } from "@react-icons/all-files/md/MdSettings";
2207
2307
 
2208
2308
  // src/components/Icons/Icon.tsx
2209
- import React4 from "react";
2309
+ import React5 from "react";
2210
2310
 
2211
2311
  // src/components/Icons/Icon.styles.ts
2212
2312
  import { css as css17 } from "@emotion/react";
@@ -2255,7 +2355,7 @@ var IconColorUtilitySuccess = css17`
2255
2355
  `;
2256
2356
 
2257
2357
  // src/components/Icons/IconsProvider.tsx
2258
- import { createContext, useContext, useEffect as useEffect3, useState as useState2 } from "react";
2358
+ import { createContext, useContext, useEffect as useEffect3, useState as useState3 } from "react";
2259
2359
  import { jsx as jsx16 } from "@emotion/react/jsx-runtime";
2260
2360
  var IconContext = createContext({
2261
2361
  /** object mapping of available icons */
@@ -2267,8 +2367,8 @@ function useIconContext() {
2267
2367
  return useContext(IconContext);
2268
2368
  }
2269
2369
  function IconsProvider({ children }) {
2270
- const [isLoading, setIsLoading] = useState2(true);
2271
- const [iconsMap, setIconsMap] = useState2({});
2370
+ const [isLoading, setIsLoading] = useState3(true);
2371
+ const [iconsMap, setIconsMap] = useState3({});
2272
2372
  const initializeIconsMap = async () => {
2273
2373
  const { importedIcons } = await import("./importedIcons-NFIA4IOK.js");
2274
2374
  setIconsMap({ ...importedIcons, ...customIcons });
@@ -2319,7 +2419,7 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
2319
2419
  }
2320
2420
  );
2321
2421
  };
2322
- var Icon = React4.memo(IconInner);
2422
+ var Icon = React5.memo(IconInner);
2323
2423
 
2324
2424
  // src/components/Icons/customIcons.tsx
2325
2425
  import { jsx as jsx18 } from "@emotion/react/jsx-runtime";
@@ -3014,7 +3114,7 @@ var listViewLong = GenIcon({
3014
3114
  tag: "path",
3015
3115
  attr: {
3016
3116
  fill: "currentColor",
3017
- d: 'M2 4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4C22 4.55228 21.5523 5 21 5H3C2.44772 5 2 4.55228 2 4Z"'
3117
+ d: "M2 4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4C22 4.55228 21.5523 5 21 5H3C2.44772 5 2 4.55228 2 4Z"
3018
3118
  },
3019
3119
  child: []
3020
3120
  },
@@ -4059,7 +4159,7 @@ var UniformLogoLarge = ({ ...props }) => {
4059
4159
  // src/components/ButtonWithMenu/ButtonWithMenu.tsx
4060
4160
  import { CgChevronDown as CgChevronDown3 } from "@react-icons/all-files/cg/CgChevronDown";
4061
4161
  import { MdCheckCircle } from "@react-icons/all-files/md/MdCheckCircle";
4062
- import { useEffect as useEffect5, useRef as useRef3, useState as useState6 } from "react";
4162
+ import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
4063
4163
 
4064
4164
  // src/components/LoadingOverlay/LoadingOverlay.styles.ts
4065
4165
  import { css as css23 } from "@emotion/react";
@@ -4465,28 +4565,40 @@ var outlineButtonStyle = css24`
4465
4565
  border-color: var(--gray-300);
4466
4566
  }
4467
4567
  `;
4468
- var DropdownStyleMenuTrigger = forwardRef3(
4469
- ({ bgColor = "var(--white)", variant = "ghost", children, ...buttonProps }, ref) => {
4568
+ var DropdownStyleMenuTrigger = markNativeButton(
4569
+ forwardRef3(function DropdownStyleMenuTrigger2({ bgColor = "var(--white)", variant = "ghost", children, ...buttonProps }, ref) {
4570
+ var _a;
4470
4571
  const buttonVariantStyle = variant === "ghost" ? ghostButtonStyle : outlineButtonStyle;
4471
- return /* @__PURE__ */ jsx25("button", { ref, ...buttonProps, css: [buttonStyle(bgColor), buttonVariantStyle], type: "button", children: /* @__PURE__ */ jsxs14(HorizontalRhythm, { align: "center", gap: "xs", children: [
4472
- /* @__PURE__ */ jsx25("div", { children }),
4473
- /* @__PURE__ */ jsx25(CgChevronDown, { size: "1rem" })
4474
- ] }) });
4475
- }
4572
+ return /* @__PURE__ */ jsx25(
4573
+ "button",
4574
+ {
4575
+ ref,
4576
+ ...buttonProps,
4577
+ css: [buttonStyle(bgColor), buttonVariantStyle],
4578
+ type: (_a = buttonProps.type) != null ? _a : "button",
4579
+ children: /* @__PURE__ */ jsxs14(HorizontalRhythm, { align: "center", gap: "xs", children: [
4580
+ /* @__PURE__ */ jsx25("div", { children }),
4581
+ /* @__PURE__ */ jsx25(CgChevronDown, { size: "1rem" })
4582
+ ] })
4583
+ }
4584
+ );
4585
+ })
4476
4586
  );
4477
- DropdownStyleMenuTrigger.displayName = "DropdownStyleMenuTrigger";
4478
4587
 
4479
4588
  // src/components/Menu/Menu.tsx
4480
- import {
4481
- Menu as BaseMenu,
4482
- MenuButton,
4483
- MenuProvider,
4484
- useMenuStore
4485
- } from "@ariakit/react";
4486
- import * as React6 from "react";
4589
+ import { Menu as BaseUIMenu } from "@base-ui/react/menu";
4590
+ import * as React7 from "react";
4591
+ import { createContext as createContext3, useContext as useContext3, useState as useState4 } from "react";
4592
+
4593
+ // src/components/Modal/ModalPortalContext.ts
4594
+ import { createContext as createContext2, useContext as useContext2 } from "react";
4595
+ var ModalPortalContext = createContext2(null);
4596
+ function useModalPortalContainer() {
4597
+ return useContext2(ModalPortalContext);
4598
+ }
4487
4599
 
4488
4600
  // src/components/Menu/filterMenuSeparators.ts
4489
- import React5, { isValidElement } from "react";
4601
+ import React6, { isValidElement as isValidElement2 } from "react";
4490
4602
 
4491
4603
  // src/components/Menu/MenuGroup.styles.ts
4492
4604
  import { css as css25 } from "@emotion/react";
@@ -4557,7 +4669,7 @@ var menuItem = (textTheme, forceActive) => css26`
4557
4669
 
4558
4670
  &:hover,
4559
4671
  &:focus,
4560
- &[data-active-item] {
4672
+ &[data-highlighted] {
4561
4673
  ${typeof forceActive === "undefined" ? activeMenuItem : ""}
4562
4674
 
4563
4675
  svg {
@@ -4648,10 +4760,10 @@ function filterMenuSeparators(children, context) {
4648
4760
  return filteredList;
4649
4761
  }
4650
4762
  function isSubgroup(child) {
4651
- return isValidElement(child) && (child.type === React5.Fragment || child.type === MenuGroup);
4763
+ return isValidElement2(child) && (child.type === React6.Fragment || child.type === MenuGroup);
4652
4764
  }
4653
4765
  function isMenuSeparator(child) {
4654
- return isValidElement(child) && child.type === MenuItemSeparator;
4766
+ return isValidElement2(child) && child.type === MenuItemSeparator;
4655
4767
  }
4656
4768
 
4657
4769
  // src/components/Menu/Menu.styles.ts
@@ -4675,7 +4787,6 @@ var menuStyles = (maxMenuHeight) => css27`
4675
4787
  padding: var(--spacing-sm);
4676
4788
  outline: none;
4677
4789
  position: relative;
4678
- z-index: var(--z-tooltip);
4679
4790
  &:focus {
4680
4791
  outline: none;
4681
4792
  }
@@ -4686,7 +4797,7 @@ var menuStyles = (maxMenuHeight) => css27`
4686
4797
  ${maxMenuHeight ? `
4687
4798
  overflow-x: hidden;
4688
4799
  overflow-y: auto;
4689
- max-height: min(${maxMenuHeight}, var(--popover-available-height));
4800
+ max-height: min(${maxMenuHeight}, var(--available-height));
4690
4801
  scroll-snap-align: start;
4691
4802
  scroll-snap-stop: always;
4692
4803
  ${scrollbarStyles}
@@ -4749,7 +4860,12 @@ var menuSelectSizeStyles = {
4749
4860
  // src/components/Menu/Menu.tsx
4750
4861
  import { jsx as jsx28, jsxs as jsxs16 } from "@emotion/react/jsx-runtime";
4751
4862
  var legacyPlacements = ["auto", "auto-start", "auto-end"];
4752
- var Menu = React6.forwardRef(function Menu2({
4863
+ var MenuNestingContext = createContext3({ isNested: false });
4864
+ var SubmenuTriggerModeContext = createContext3(false);
4865
+ function useIsSubmenuTriggerMode() {
4866
+ return useContext3(SubmenuTriggerModeContext);
4867
+ }
4868
+ var Menu = React7.forwardRef(function Menu2({
4753
4869
  menuTrigger,
4754
4870
  children,
4755
4871
  placement,
@@ -4761,83 +4877,168 @@ var Menu = React6.forwardRef(function Menu2({
4761
4877
  portalElement,
4762
4878
  size = "base",
4763
4879
  disabled: disabled2,
4764
- ...props
4880
+ open: controlledOpen,
4881
+ onClose,
4882
+ onOpenChange: onOpenChangeProp,
4883
+ gutter,
4884
+ shift,
4885
+ getAnchorRect,
4886
+ updatePosition,
4887
+ portal,
4888
+ id,
4889
+ style
4765
4890
  }, ref) {
4891
+ const { isNested } = useContext3(MenuNestingContext);
4892
+ const modalContainer = useModalPortalContainer();
4893
+ const [inlineContainer, setInlineContainer] = useState4(null);
4766
4894
  const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
4767
- const menu = useMenuStore({ placement: placementOverride });
4768
- return /* @__PURE__ */ jsxs16(MenuProvider, { store: menu, children: [
4769
- /* @__PURE__ */ jsx28(MenuButton, { ref, render: menuTrigger, disabled: disabled2 }),
4895
+ const defaultSide = isNested ? "right" : "bottom";
4896
+ const defaultAlignment = isNested ? "start" : "center";
4897
+ const { side, alignment } = placementOverride ? parsePlacement(placementOverride) : { side: defaultSide, alignment: defaultAlignment };
4898
+ const anchor = getAnchorRect ? {
4899
+ getBoundingClientRect: () => {
4900
+ var _a, _b, _c, _d;
4901
+ const rect = getAnchorRect(null);
4902
+ return DOMRect.fromRect({
4903
+ x: (_a = rect == null ? void 0 : rect.x) != null ? _a : 0,
4904
+ y: (_b = rect == null ? void 0 : rect.y) != null ? _b : 0,
4905
+ width: (_c = rect == null ? void 0 : rect.width) != null ? _c : 0,
4906
+ height: (_d = rect == null ? void 0 : rect.height) != null ? _d : 0
4907
+ });
4908
+ }
4909
+ } : void 0;
4910
+ const handleOpenChange = (newOpen, eventDetails) => {
4911
+ var _a, _b;
4912
+ if (!newOpen && !isNested && (eventDetails == null ? void 0 : eventDetails.reason) === "sibling-open") {
4913
+ (_a = eventDetails.cancel) == null ? void 0 : _a.call(eventDetails);
4914
+ return;
4915
+ }
4916
+ if (!newOpen && isNested && (eventDetails == null ? void 0 : eventDetails.reason) === "focus-out") {
4917
+ (_b = eventDetails.cancel) == null ? void 0 : _b.call(eventDetails);
4918
+ return;
4919
+ }
4920
+ if (!newOpen) {
4921
+ onClose == null ? void 0 : onClose();
4922
+ }
4923
+ onOpenChangeProp == null ? void 0 : onOpenChangeProp(newOpen);
4924
+ };
4925
+ const shouldPortal = portal !== void 0 ? portal : !withoutPortal;
4926
+ const portalContainer = shouldPortal ? portalElement || modalContainer || void 0 : inlineContainer;
4927
+ const isPortaledToBody = shouldPortal && !portalElement && !modalContainer;
4928
+ const positionMethod = isPortaledToBody ? "fixed" : "absolute";
4929
+ const processedChildren = disableAutoSeparatorManagement ? children : filterMenuSeparators(children);
4930
+ const submenuTriggerElement = isNested && React7.isValidElement(menuTrigger) ? React7.cloneElement(menuTrigger, { hideMenuOnClick: false }) : menuTrigger;
4931
+ const menuContent = /* @__PURE__ */ jsx28(
4932
+ BaseUIMenu.Positioner,
4933
+ {
4934
+ side,
4935
+ align: alignment,
4936
+ positionMethod,
4937
+ sideOffset: gutter != null ? gutter : 0,
4938
+ alignOffset: shift != null ? shift : isNested ? -4 : 0,
4939
+ anchor,
4940
+ disableAnchorTracking: !!updatePosition,
4941
+ style: { zIndex: "var(--z-tooltip)" },
4942
+ children: /* @__PURE__ */ jsx28(
4943
+ BaseUIMenu.Popup,
4944
+ {
4945
+ ref,
4946
+ css: [
4947
+ size === "small" ? menuSmallVariables : menuBaseVariables,
4948
+ menuStyles(maxMenuHeight),
4949
+ typeof menuItemsContainerCssClasses === "object" ? menuItemsContainerCssClasses : void 0
4950
+ ],
4951
+ className: typeof menuItemsContainerCssClasses === "string" ? menuItemsContainerCssClasses : "",
4952
+ "data-testid": testId != null ? testId : "more-menu",
4953
+ id,
4954
+ style,
4955
+ children: /* @__PURE__ */ jsx28(MenuNestingContext.Provider, { value: { isNested: true }, children: processedChildren })
4956
+ }
4957
+ )
4958
+ }
4959
+ );
4960
+ if (isNested) {
4961
+ return /* @__PURE__ */ jsxs16(BaseUIMenu.SubmenuRoot, { open: controlledOpen, onOpenChange: handleOpenChange, disabled: disabled2, children: [
4962
+ /* @__PURE__ */ jsx28(SubmenuTriggerModeContext.Provider, { value: true, children: /* @__PURE__ */ jsx28(BaseUIMenu.SubmenuTrigger, { render: submenuTriggerElement, disabled: disabled2, closeDelay: 100 }) }),
4963
+ /* @__PURE__ */ jsx28(BaseUIMenu.Portal, { container: portalContainer, children: menuContent })
4964
+ ] });
4965
+ }
4966
+ return /* @__PURE__ */ jsxs16(BaseUIMenu.Root, { open: controlledOpen, onOpenChange: handleOpenChange, disabled: disabled2, modal: false, children: [
4770
4967
  /* @__PURE__ */ jsx28(
4771
- BaseMenu,
4968
+ BaseUIMenu.Trigger,
4772
4969
  {
4773
- portal: !withoutPortal,
4774
- portalElement,
4775
- unmountOnHide: true,
4776
- gutter: 0,
4777
- shift: menu.parent ? -4 : 0,
4778
- ...props,
4779
- css: [
4780
- size === "small" ? menuSmallVariables : menuBaseVariables,
4781
- menuStyles(maxMenuHeight),
4782
- typeof menuItemsContainerCssClasses === "object" ? menuItemsContainerCssClasses : void 0
4783
- ],
4784
- className: typeof menuItemsContainerCssClasses === "string" ? menuItemsContainerCssClasses : "",
4785
- "data-testid": testId != null ? testId : "more-menu",
4786
- hideOnHoverOutside: (event) => {
4787
- var _a;
4788
- if (!menu.parent) return false;
4789
- const { contentElement, anchorElement } = menu.getState();
4790
- const [target] = event.composedPath();
4791
- if (!target) return false;
4792
- const activeElement = (_a = target.ownerDocument) == null ? void 0 : _a.activeElement;
4793
- if (anchorElement == null ? void 0 : anchorElement.contains(target)) return false;
4794
- if (contentElement == null ? void 0 : contentElement.contains(target)) return false;
4795
- if (activeElement && target.contains(activeElement)) return false;
4796
- return true;
4797
- },
4798
- children: disableAutoSeparatorManagement ? children : filterMenuSeparators(children)
4970
+ render: menuTrigger,
4971
+ disabled: disabled2,
4972
+ nativeButton: isNativeButtonTrigger(menuTrigger)
4799
4973
  }
4800
- )
4974
+ ),
4975
+ !shouldPortal && /* @__PURE__ */ jsx28(
4976
+ "div",
4977
+ {
4978
+ ref: setInlineContainer,
4979
+ style: { position: "absolute", width: 0, height: 0, overflow: "visible" }
4980
+ }
4981
+ ),
4982
+ /* @__PURE__ */ jsx28(BaseUIMenu.Portal, { container: portalContainer, children: menuContent })
4801
4983
  ] });
4802
4984
  });
4803
4985
 
4804
4986
  // src/components/Menu/MenuItem.tsx
4805
- import { MenuItem as BaseMenuItem } from "@ariakit/react";
4806
- import * as React7 from "react";
4987
+ import { Menu as BaseUIMenu2 } from "@base-ui/react/menu";
4988
+ import * as React8 from "react";
4807
4989
  import { jsx as jsx29, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
4808
- var renderAsButton = (renderProps) => /* @__PURE__ */ jsx29("button", { type: "button", ...renderProps });
4809
- var MenuItem = React7.forwardRef(
4990
+ var MenuItem = React8.forwardRef(
4810
4991
  ({
4811
4992
  children,
4812
4993
  className,
4813
- hideMenuOnClick = true,
4994
+ hideMenuOnClick,
4995
+ hideOnClick,
4814
4996
  icon,
4815
4997
  textColor: textColor2 = "base",
4816
4998
  active: active2,
4817
4999
  shortcut,
4818
5000
  onClick,
4819
5001
  disabled: disabled2,
5002
+ render = /* @__PURE__ */ jsx29("button", { type: "button" }),
4820
5003
  ...props
4821
5004
  }, ref) => {
5005
+ var _a;
5006
+ const resolvedCloseOnClick = (_a = hideMenuOnClick != null ? hideMenuOnClick : hideOnClick) != null ? _a : true;
4822
5007
  const resolvedChildren = typeof children === "function" ? children(props) : children;
4823
5008
  const onClickHandler = onClick != null ? onClick : shortcut == null ? void 0 : shortcut.handler;
4824
5009
  const disabledValue = disabled2 != null ? disabled2 : shortcut == null ? void 0 : shortcut.disabled;
5010
+ const childContent = shortcut ? /* @__PURE__ */ jsxs17("div", { css: menuItemShortcutWrapper, children: [
5011
+ /* @__PURE__ */ jsx29(HorizontalRhythm, { gap: "xs", align: "center", children: icon ? renderWithIcon(resolvedChildren, icon) : resolvedChildren }),
5012
+ renderShortcut(shortcut)
5013
+ ] }) : icon ? renderWithIcon(resolvedChildren, icon) : resolvedChildren;
5014
+ const isSubmenuTrigger = useIsSubmenuTriggerMode();
5015
+ if (isSubmenuTrigger) {
5016
+ return /* @__PURE__ */ jsx29(
5017
+ "div",
5018
+ {
5019
+ ref,
5020
+ "data-testid": "menu-item",
5021
+ css: [menuItem(textColor2, active2), typeof className === "object" ? className : void 0],
5022
+ className: typeof className === "string" ? className : void 0,
5023
+ ...props,
5024
+ ...onClickHandler ? { onClick: onClickHandler } : {},
5025
+ children: childContent
5026
+ }
5027
+ );
5028
+ }
4825
5029
  return /* @__PURE__ */ jsx29(
4826
- BaseMenuItem,
5030
+ BaseUIMenu2.Item,
4827
5031
  {
4828
5032
  ref,
4829
5033
  "data-testid": "menu-item",
4830
- hideOnClick: hideMenuOnClick,
5034
+ closeOnClick: resolvedCloseOnClick,
4831
5035
  css: [menuItem(textColor2, active2), typeof className === "object" ? className : void 0],
4832
5036
  className: typeof className === "string" ? className : void 0,
4833
- render: renderAsButton,
5037
+ render,
4834
5038
  ...props,
4835
5039
  onClick: onClickHandler,
4836
5040
  disabled: disabledValue,
4837
- children: shortcut ? /* @__PURE__ */ jsxs17("div", { css: menuItemShortcutWrapper, children: [
4838
- /* @__PURE__ */ jsx29(HorizontalRhythm, { gap: "xs", align: "center", children: icon ? renderWithIcon(resolvedChildren, icon) : resolvedChildren }),
4839
- renderShortcut(shortcut)
4840
- ] }) : icon ? renderWithIcon(resolvedChildren, icon) : resolvedChildren
5041
+ children: childContent
4841
5042
  }
4842
5043
  );
4843
5044
  }
@@ -4889,16 +5090,19 @@ function renderShortcut(shortcut) {
4889
5090
  // src/components/Menu/MenuTrigger.tsx
4890
5091
  import { forwardRef as forwardRef6 } from "react";
4891
5092
  import { jsx as jsx30, jsxs as jsxs18 } from "@emotion/react/jsx-runtime";
4892
- var MenuButton2 = forwardRef6(({ children, ...props }, ref) => {
4893
- return /* @__PURE__ */ jsx30("button", { ref, type: "button", ...props, children });
4894
- });
4895
- var MenuThreeDots = forwardRef6(
4896
- ({ buttonTitle = "More options", iconSize: iconSize2 = "1rem", ...props }, ref) => {
4897
- return /* @__PURE__ */ jsx30(MenuButton2, { css: menuTriggerStyles, ref, "aria-label": buttonTitle, title: buttonTitle, ...props, children: /* @__PURE__ */ jsx30(Icon, { icon: "more-alt", size: iconSize2, iconColor: "currentColor" }) });
4898
- }
5093
+ var MenuButton = markNativeButton(
5094
+ forwardRef6(function MenuButton2({ children, ...props }, ref) {
5095
+ var _a;
5096
+ return /* @__PURE__ */ jsx30("button", { ref, ...props, type: (_a = props.type) != null ? _a : "button", children });
5097
+ })
5098
+ );
5099
+ var MenuThreeDots = markNativeButton(
5100
+ forwardRef6(function MenuThreeDots2({ buttonTitle = "More options", iconSize: iconSize2 = "1rem", ...props }, ref) {
5101
+ return /* @__PURE__ */ jsx30(MenuButton, { css: menuTriggerStyles, ref, "aria-label": buttonTitle, title: buttonTitle, ...props, children: /* @__PURE__ */ jsx30(Icon, { icon: "more-alt", size: iconSize2, iconColor: "currentColor" }) });
5102
+ })
4899
5103
  );
4900
- var MenuSelect = forwardRef6(
4901
- ({ children, size = "base", ...props }, ref) => {
5104
+ var MenuSelect = markNativeButton(
5105
+ forwardRef6(function MenuSelect2({ children, size = "base", ...props }, ref) {
4902
5106
  const iconSize2 = {
4903
5107
  xs: "0.85rem",
4904
5108
  sm: "0.95rem",
@@ -4906,16 +5110,15 @@ var MenuSelect = forwardRef6(
4906
5110
  md: "1.1rem",
4907
5111
  lg: "1.25rem"
4908
5112
  };
4909
- return /* @__PURE__ */ jsxs18(MenuButton2, { css: [menuSelectStyles, menuSelectSizeStyles[size]], ref, ...props, children: [
5113
+ return /* @__PURE__ */ jsxs18(MenuButton, { css: [menuSelectStyles, menuSelectSizeStyles[size]], ref, ...props, children: [
4910
5114
  children,
4911
5115
  /* @__PURE__ */ jsx30(Icon, { icon: "chevron-down", size: iconSize2[size], iconColor: "currentColor" })
4912
5116
  ] });
4913
- }
5117
+ })
4914
5118
  );
4915
5119
 
4916
5120
  // src/components/Menu/SearchableMenu.tsx
4917
- import { useMenuContext } from "@ariakit/react";
4918
- import { useEffect as useEffect4, useRef as useRef2, useState as useState5 } from "react";
5121
+ import { useCallback as useCallback3, useEffect as useEffect4, useRef as useRef2, useState as useState7 } from "react";
4919
5122
 
4920
5123
  // src/components/Input/styles/CaptionText.styles.ts
4921
5124
  import { css as css28 } from "@emotion/react";
@@ -5147,7 +5350,7 @@ var FieldMessage = ({
5147
5350
  };
5148
5351
 
5149
5352
  // src/components/Input/Fieldset.tsx
5150
- import * as React8 from "react";
5353
+ import * as React9 from "react";
5151
5354
 
5152
5355
  // src/components/Input/styles/Fieldset.styles.ts
5153
5356
  import { css as css33 } from "@emotion/react";
@@ -5191,7 +5394,7 @@ var fieldsetBody = css33`
5191
5394
 
5192
5395
  // src/components/Input/Fieldset.tsx
5193
5396
  import { jsx as jsx37, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
5194
- var Fieldset = React8.forwardRef(
5397
+ var Fieldset = React9.forwardRef(
5195
5398
  ({ legend, disabled: disabled2, children, invert, ...props }, ref) => {
5196
5399
  return /* @__PURE__ */ jsxs23("fieldset", { css: fieldsetContainer(Boolean(invert)), ref, disabled: disabled2, ...props, children: [
5197
5400
  legend,
@@ -5572,7 +5775,7 @@ function isValueMatch(selectedValues, value) {
5572
5775
  // src/components/Input/InputInlineSelect.tsx
5573
5776
  import { css as css35 } from "@emotion/react";
5574
5777
  import { CgChevronDown as CgChevronDown2 } from "@react-icons/all-files/cg/CgChevronDown";
5575
- import { useRef, useState as useState3 } from "react";
5778
+ import { useRef, useState as useState5 } from "react";
5576
5779
 
5577
5780
  // src/components/Input/styles/InputInlineSelect.styles.ts
5578
5781
  import { css as css34 } from "@emotion/react";
@@ -5651,7 +5854,7 @@ var InputInlineSelect = ({
5651
5854
  ...props
5652
5855
  }) => {
5653
5856
  var _a;
5654
- const [menuVisible, setMenuVisible] = useState3(false);
5857
+ const [menuVisible, setMenuVisible] = useState5(false);
5655
5858
  const divRef = useRef(null);
5656
5859
  useOutsideClick(divRef, () => setMenuVisible(false));
5657
5860
  const selected = options.find((option) => option.value === value);
@@ -5712,7 +5915,7 @@ var InputInlineSelect = ({
5712
5915
  // src/components/Input/InputKeywordSearch.tsx
5713
5916
  import { CgClose as CgClose2 } from "@react-icons/all-files/cg/CgClose";
5714
5917
  import { CgSearch } from "@react-icons/all-files/cg/CgSearch";
5715
- import { forwardRef as forwardRef10, useState as useState4 } from "react";
5918
+ import { forwardRef as forwardRef10, useState as useState6 } from "react";
5716
5919
  import { useDebounce } from "react-use";
5717
5920
  import { jsx as jsx42 } from "@emotion/react/jsx-runtime";
5718
5921
  var InputKeywordSearch = forwardRef10(
@@ -5797,7 +6000,7 @@ var InputKeywordSearch = forwardRef10(
5797
6000
  InputKeywordSearch.displayName = "InputKeywordSearch";
5798
6001
  var DebouncedInputKeywordSearch = forwardRef10(
5799
6002
  ({ delay = 300, onSearchTextChanged, defaultValue, ...props }, ref) => {
5800
- const [searchText, setSearchText] = useState4(defaultValue != null ? defaultValue : "");
6003
+ const [searchText, setSearchText] = useState6(defaultValue != null ? defaultValue : "");
5801
6004
  useDebounce(() => onSearchTextChanged(searchText), delay, [searchText]);
5802
6005
  return /* @__PURE__ */ jsx42(InputKeywordSearch, { ...props, ref, value: searchText, onSearchTextChanged: setSearchText });
5803
6006
  }
@@ -5871,7 +6074,7 @@ var InputSelect = forwardRef11(
5871
6074
 
5872
6075
  // src/components/Input/InputTime.tsx
5873
6076
  import { parseTime } from "@internationalized/date";
5874
- import * as React9 from "react";
6077
+ import * as React10 from "react";
5875
6078
  import { useCallback as useCallback2 } from "react";
5876
6079
  import {
5877
6080
  DateInput,
@@ -5935,7 +6138,7 @@ function tryParseTime(isoTime) {
5935
6138
  return void 0;
5936
6139
  }
5937
6140
  }
5938
- var InputTime = React9.forwardRef(
6141
+ var InputTime = React10.forwardRef(
5939
6142
  ({
5940
6143
  id,
5941
6144
  label: label2,
@@ -6139,15 +6342,23 @@ var Textarea = forwardRef14(
6139
6342
  // src/components/Menu/SearchableMenu.tsx
6140
6343
  import { jsx as jsx49, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
6141
6344
  var SearchableMenu = (props) => {
6142
- const { hasNoResults, disableSearch, onSearchTextChanged, searchPlaceholder, children, ...menuProps } = props;
6345
+ const {
6346
+ hasNoResults,
6347
+ disableSearch,
6348
+ onSearchTextChanged,
6349
+ searchPlaceholder,
6350
+ onSearchEnterKeyDown,
6351
+ children,
6352
+ ...menuProps
6353
+ } = props;
6143
6354
  return /* @__PURE__ */ jsxs31(
6144
6355
  Menu,
6145
6356
  {
6146
6357
  ...menuProps,
6147
- onClose: (e) => {
6358
+ onClose: () => {
6148
6359
  var _a;
6149
6360
  onSearchTextChanged("");
6150
- (_a = menuProps.onClose) == null ? void 0 : _a.call(menuProps, e);
6361
+ (_a = menuProps.onClose) == null ? void 0 : _a.call(menuProps);
6151
6362
  },
6152
6363
  children: [
6153
6364
  disableSearch ? null : /* @__PURE__ */ jsxs31(VerticalRhythm, { gap: "xs", children: [
@@ -6169,11 +6380,13 @@ var SearchableMenu = (props) => {
6169
6380
  }
6170
6381
  );
6171
6382
  };
6383
+ var SEARCH_HIGHLIGHTED_ATTR = "data-search-highlighted";
6384
+ var MENU_ITEM_SELECTOR = '[role="menuitem"]:not([aria-disabled="true"])';
6172
6385
  function MenuSearch({ onSearchTextChanged, searchPlaceholder, onSearchEnterKeyDown }) {
6173
6386
  const searchInputRef = useRef2(null);
6174
6387
  const hasFocusedRef = useRef2(false);
6175
- const [currentSearchText, setCurrentSearchText] = useState5("");
6176
- const menu = useMenuContext();
6388
+ const [currentSearchText, setCurrentSearchText] = useState7("");
6389
+ const activeIndexRef = useRef2(null);
6177
6390
  useEffect4(() => {
6178
6391
  if (hasFocusedRef.current || !searchInputRef.current) {
6179
6392
  return;
@@ -6189,56 +6402,76 @@ function MenuSearch({ onSearchTextChanged, searchPlaceholder, onSearchEnterKeyDo
6189
6402
  setCurrentSearchText(text);
6190
6403
  onSearchTextChanged(text);
6191
6404
  };
6192
- useEffect4(() => {
6193
- if (!menu) {
6194
- return;
6405
+ const getEnabledItems = useCallback3(() => {
6406
+ var _a;
6407
+ const popup = (_a = searchInputRef.current) == null ? void 0 : _a.closest('[role="menu"]');
6408
+ if (!popup) {
6409
+ return [];
6195
6410
  }
6411
+ return Array.from(popup.querySelectorAll(MENU_ITEM_SELECTOR));
6412
+ }, []);
6413
+ const setActiveItem = useCallback3(
6414
+ (index) => {
6415
+ var _a;
6416
+ const popup = (_a = searchInputRef.current) == null ? void 0 : _a.closest('[role="menu"]');
6417
+ popup == null ? void 0 : popup.querySelectorAll(`[${SEARCH_HIGHLIGHTED_ATTR}]`).forEach((el) => {
6418
+ el.removeAttribute(SEARCH_HIGHLIGHTED_ATTR);
6419
+ el.removeAttribute("data-highlighted");
6420
+ });
6421
+ activeIndexRef.current = index;
6422
+ if (index !== null) {
6423
+ const items = getEnabledItems();
6424
+ const item = items[index];
6425
+ if (item) {
6426
+ item.setAttribute(SEARCH_HIGHLIGHTED_ATTR, "");
6427
+ item.setAttribute("data-highlighted", "");
6428
+ item.scrollIntoView({ block: "nearest" });
6429
+ }
6430
+ }
6431
+ },
6432
+ [getEnabledItems]
6433
+ );
6434
+ useEffect4(() => {
6196
6435
  if (!currentSearchText) {
6197
- menu.setActiveId(null);
6436
+ setActiveItem(null);
6198
6437
  return;
6199
6438
  }
6200
6439
  const timer = setTimeout(() => {
6201
- var _a;
6202
- const { renderedItems } = menu.getState();
6203
- const enabledItems = renderedItems.filter((item) => !item.disabled);
6204
- if (enabledItems.length > 0) {
6205
- menu.setActiveId(enabledItems[0].id);
6206
- (_a = enabledItems[0].element) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
6440
+ const items = getEnabledItems();
6441
+ if (items.length > 0) {
6442
+ setActiveItem(0);
6207
6443
  } else {
6208
- menu.setActiveId(null);
6444
+ setActiveItem(null);
6209
6445
  }
6210
6446
  }, 0);
6211
6447
  return () => clearTimeout(timer);
6212
- }, [menu, currentSearchText]);
6448
+ }, [currentSearchText, setActiveItem, getEnabledItems]);
6213
6449
  const handleKeyDown = (e) => {
6214
- var _a, _b;
6215
- if (!menu) {
6216
- return;
6450
+ var _a;
6451
+ if (e.key !== "Escape") {
6452
+ e.stopPropagation();
6217
6453
  }
6218
6454
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
6219
6455
  e.preventDefault();
6220
- const { renderedItems, activeId } = menu.getState();
6221
- const enabledItems = renderedItems.filter((item) => !item.disabled);
6222
- if (enabledItems.length === 0) {
6456
+ const items = getEnabledItems();
6457
+ if (items.length === 0) {
6223
6458
  return;
6224
6459
  }
6225
- const currentIndex = activeId ? enabledItems.findIndex((item) => item.id === activeId) : -1;
6460
+ const currentIndex = (_a = activeIndexRef.current) != null ? _a : -1;
6226
6461
  let nextIndex;
6227
6462
  if (e.key === "ArrowDown") {
6228
- nextIndex = currentIndex < enabledItems.length - 1 ? currentIndex + 1 : 0;
6463
+ nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
6229
6464
  } else {
6230
- nextIndex = currentIndex > 0 ? currentIndex - 1 : enabledItems.length - 1;
6465
+ nextIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
6231
6466
  }
6232
- const nextItem = enabledItems[nextIndex];
6233
- menu.setActiveId(nextItem.id);
6234
- (_a = nextItem.element) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
6467
+ setActiveItem(nextIndex);
6235
6468
  }
6236
6469
  if (e.key === "Enter") {
6237
- const { activeId, renderedItems } = menu.getState();
6238
- if (activeId) {
6470
+ const items = getEnabledItems();
6471
+ const activeIndex = activeIndexRef.current;
6472
+ if (activeIndex !== null && items[activeIndex]) {
6239
6473
  e.preventDefault();
6240
- const activeItem = renderedItems.find((item) => item.id === activeId);
6241
- (_b = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _b.click();
6474
+ items[activeIndex].click();
6242
6475
  } else {
6243
6476
  onSearchEnterKeyDown == null ? void 0 : onSearchEnterKeyDown();
6244
6477
  }
@@ -6259,6 +6492,7 @@ function MenuSearch({ onSearchTextChanged, searchPlaceholder, onSearchEnterKeyDo
6259
6492
 
6260
6493
  // src/components/Menu/SelectableMenuItem.tsx
6261
6494
  import { CgCheck } from "@react-icons/all-files/cg/CgCheck";
6495
+ import * as React11 from "react";
6262
6496
 
6263
6497
  // src/components/Menu/SelectableMenuItem.styles.ts
6264
6498
  import { css as css38 } from "@emotion/react";
@@ -6298,42 +6532,38 @@ var selectableCheckboxSelected = css38`
6298
6532
 
6299
6533
  // src/components/Menu/SelectableMenuItem.tsx
6300
6534
  import { jsx as jsx50, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6301
- function SelectableMenuItem({
6302
- selected,
6303
- children,
6304
- selectStyles = "default",
6305
- isSelectable = true,
6306
- ...menuItemProps
6307
- }) {
6308
- return /* @__PURE__ */ jsx50(MenuItem, { ...menuItemProps, children: /* @__PURE__ */ jsxs32(
6309
- HorizontalRhythm,
6310
- {
6311
- align: "center",
6312
- gap: "sm",
6313
- css: [
6314
- selectStyles === "checkbox-select" ? selectableCheckboxMenuItem : selectableDefaultMenuItem
6315
- ],
6316
- children: [
6317
- selectStyles === "checkbox-select" ? /* @__PURE__ */ jsx50(
6318
- "span",
6319
- {
6320
- role: "checkbox",
6321
- "aria-checked": selected,
6322
- tabIndex: 0,
6323
- css: [
6324
- selectableCheckbox,
6325
- selectableCheckboxIcon,
6326
- selected ? selectableCheckboxSelected : void 0,
6327
- !isSelectable ? selectableCheckboxDisabled : void 0
6328
- ],
6329
- children: selected ? /* @__PURE__ */ jsx50(CgCheck, { size: "1.25rem", css: { color: "var(--accent-dark-active)" } }) : null
6330
- }
6331
- ) : /* @__PURE__ */ jsx50("span", { css: selectableCheckboxIcon, children: selected ? /* @__PURE__ */ jsx50(CgCheck, {}) : null }),
6332
- children
6333
- ]
6334
- }
6335
- ) });
6336
- }
6535
+ var SelectableMenuItem = React11.forwardRef(
6536
+ function SelectableMenuItem2({ selected, children, selectStyles = "default", isSelectable = true, ...menuItemProps }, ref) {
6537
+ return /* @__PURE__ */ jsx50(MenuItem, { ref, ...menuItemProps, children: /* @__PURE__ */ jsxs32(
6538
+ HorizontalRhythm,
6539
+ {
6540
+ align: "center",
6541
+ gap: "sm",
6542
+ css: [
6543
+ selectStyles === "checkbox-select" ? selectableCheckboxMenuItem : selectableDefaultMenuItem
6544
+ ],
6545
+ children: [
6546
+ selectStyles === "checkbox-select" ? /* @__PURE__ */ jsx50(
6547
+ "span",
6548
+ {
6549
+ role: "checkbox",
6550
+ "aria-checked": selected,
6551
+ tabIndex: 0,
6552
+ css: [
6553
+ selectableCheckbox,
6554
+ selectableCheckboxIcon,
6555
+ selected ? selectableCheckboxSelected : void 0,
6556
+ !isSelectable ? selectableCheckboxDisabled : void 0
6557
+ ],
6558
+ children: selected ? /* @__PURE__ */ jsx50(CgCheck, { size: "1.25rem", css: { color: "var(--accent-dark-active)" } }) : null
6559
+ }
6560
+ ) : /* @__PURE__ */ jsx50("span", { css: selectableCheckboxIcon, children: selected ? /* @__PURE__ */ jsx50(CgCheck, {}) : null }),
6561
+ children
6562
+ ]
6563
+ }
6564
+ ) });
6565
+ }
6566
+ );
6337
6567
 
6338
6568
  // src/components/ButtonWithMenu/ButtonWithMenu.styles.ts
6339
6569
  import { css as css39 } from "@emotion/react";
@@ -6527,7 +6757,7 @@ var ButtonWithMenu = ({
6527
6757
  const buttonSize = size === "base" ? "md" : size;
6528
6758
  const btnSize2 = getButtonSize(buttonSize);
6529
6759
  const variant = "variant" in buttonProps && buttonProps.variant === "soft" ? "soft" : void 0;
6530
- const [showSuccess, setShowSuccess] = useState6(false);
6760
+ const [showSuccess, setShowSuccess] = useState8(false);
6531
6761
  const previousDisabledRef = useRef3(disabledValue);
6532
6762
  useEffect5(() => {
6533
6763
  if (previousDisabledRef.current === "loading" && disabledValue === false) {
@@ -6641,7 +6871,7 @@ var ButtonWithMenu = ({
6641
6871
 
6642
6872
  // src/components/Calendar/Calendar.tsx
6643
6873
  import { isToday, parseDate, today } from "@internationalized/date";
6644
- import { useCallback as useCallback3, useState as useState7 } from "react";
6874
+ import { useCallback as useCallback4, useState as useState9 } from "react";
6645
6875
  import {
6646
6876
  Button as AriaButton,
6647
6877
  Calendar as AriaCalendar,
@@ -6777,17 +7007,17 @@ var Calendar = ({
6777
7007
  isDateUnavailable,
6778
7008
  ...props
6779
7009
  }) => {
6780
- const [focusedValue, setFocusedValue] = useState7(void 0);
7010
+ const [focusedValue, setFocusedValue] = useState9(void 0);
6781
7011
  const today_date = today(timeZone);
6782
7012
  const minDate = tryParseDate(minValue);
6783
7013
  const maxDate = tryParseDate(maxValue);
6784
- const handleChange = useCallback3(
7014
+ const handleChange = useCallback4(
6785
7015
  (value2) => {
6786
7016
  onChange == null ? void 0 : onChange(value2.toString());
6787
7017
  },
6788
7018
  [onChange]
6789
7019
  );
6790
- const gotoToday = useCallback3(() => {
7020
+ const gotoToday = useCallback4(() => {
6791
7021
  onChange == null ? void 0 : onChange(today_date.toString());
6792
7022
  setFocusedValue(today_date);
6793
7023
  }, [onChange, today_date]);
@@ -6886,7 +7116,7 @@ var Heading2 = ({
6886
7116
 
6887
7117
  // src/components/Typography/Link.tsx
6888
7118
  import { CgExternal } from "@react-icons/all-files/cg/CgExternal";
6889
- import * as React10 from "react";
7119
+ import * as React12 from "react";
6890
7120
 
6891
7121
  // src/components/Typography/styles/Link.styles.ts
6892
7122
  import { css as css42 } from "@emotion/react";
@@ -6916,7 +7146,7 @@ var textColor = {
6916
7146
  default: linkColorDefault,
6917
7147
  destructive: linkColorDestructive
6918
7148
  };
6919
- var Link = React10.forwardRef(
7149
+ var Link = React12.forwardRef(
6920
7150
  ({ external, text, linkColor = "default", children, ...props }, ref) => {
6921
7151
  const externalAttrs = external ? {
6922
7152
  target: "_blank",
@@ -6930,7 +7160,7 @@ var Link = React10.forwardRef(
6930
7160
  }
6931
7161
  );
6932
7162
  Link.displayName = "Link";
6933
- var LinkWithRef = React10.forwardRef(
7163
+ var LinkWithRef = React12.forwardRef(
6934
7164
  ({ linkManagerComponent: LinkManager, href, as, onClick, linkColor = "default", children, text, ...props }, ref) => /* @__PURE__ */ jsx54(
6935
7165
  LinkManager,
6936
7166
  {
@@ -7590,6 +7820,9 @@ var DismissibleChipAction = ({ onDismiss, ...props }) => {
7590
7820
  );
7591
7821
  };
7592
7822
 
7823
+ // src/components/Chip/FilterChip.tsx
7824
+ import { forwardRef as forwardRef17 } from "react";
7825
+
7593
7826
  // src/components/Chip/FilterChip.styles.ts
7594
7827
  import { css as css49 } from "@emotion/react";
7595
7828
  var paddingSize = {
@@ -7650,31 +7883,35 @@ var iconSize = {
7650
7883
  md: "1rem",
7651
7884
  lg: "1.25rem"
7652
7885
  };
7653
- var FilterChip2 = ({
7654
- leadingIcon,
7655
- asDropdown,
7656
- children,
7657
- dataTestId = "view-switch",
7658
- size = "md",
7659
- isSelected = false,
7660
- ...props
7661
- }) => {
7662
- return /* @__PURE__ */ jsxs40(
7663
- "button",
7664
- {
7665
- type: "button",
7666
- css: [filterSizeStyles[size], FilterChip, asDropdown ? FilterChipDropdown : void 0],
7667
- "data-testid": dataTestId,
7668
- "aria-selected": isSelected,
7669
- ...props,
7670
- children: [
7671
- leadingIcon ? /* @__PURE__ */ jsx61(Icon, { icon: leadingIcon, iconColor: isSelected ? "accent-dark" : "gray300", size: iconSize[size] }) : null,
7672
- children,
7673
- asDropdown ? /* @__PURE__ */ jsx61(Icon, { icon: "chevron-down", iconColor: "gray", size: iconSize[size] }) : null
7674
- ]
7675
- }
7676
- );
7677
- };
7886
+ var FilterChip2 = markNativeButton(
7887
+ forwardRef17(function FilterChip3({
7888
+ leadingIcon,
7889
+ asDropdown,
7890
+ children,
7891
+ dataTestId = "view-switch",
7892
+ size = "md",
7893
+ isSelected = false,
7894
+ ...props
7895
+ }, ref) {
7896
+ var _a;
7897
+ return /* @__PURE__ */ jsxs40(
7898
+ "button",
7899
+ {
7900
+ ref,
7901
+ css: [filterSizeStyles[size], FilterChip, asDropdown ? FilterChipDropdown : void 0],
7902
+ "data-testid": dataTestId,
7903
+ "aria-selected": isSelected,
7904
+ ...props,
7905
+ type: (_a = props.type) != null ? _a : "button",
7906
+ children: [
7907
+ leadingIcon ? /* @__PURE__ */ jsx61(Icon, { icon: leadingIcon, iconColor: isSelected ? "accent-dark" : "gray300", size: iconSize[size] }) : null,
7908
+ children,
7909
+ asDropdown ? /* @__PURE__ */ jsx61(Icon, { icon: "chevron-down", iconColor: "gray", size: iconSize[size] }) : null
7910
+ ]
7911
+ }
7912
+ );
7913
+ })
7914
+ );
7678
7915
 
7679
7916
  // src/components/Chip/MultilineChip.styles.ts
7680
7917
  import { css as css50 } from "@emotion/react";
@@ -7916,15 +8153,10 @@ var DashedBox = ({
7916
8153
  };
7917
8154
 
7918
8155
  // src/components/DateTimePicker/DateTimePicker.tsx
7919
- import {
7920
- Popover as Popover2,
7921
- PopoverDisclosure,
7922
- PopoverProvider,
7923
- usePopoverStore
7924
- } from "@ariakit/react";
8156
+ import { Popover as BaseUIPopover } from "@base-ui/react/popover";
7925
8157
  import { CalendarDate as CalendarDate3, parseDate as parseDate2, parseTime as parseTime2, Time as Time2 } from "@internationalized/date";
7926
8158
  import { CgCalendar } from "@react-icons/all-files/cg/CgCalendar";
7927
- import { createContext as createContext2, useCallback as useCallback4, useContext as useContext2, useEffect as useEffect6, useMemo, useState as useState8 } from "react";
8159
+ import { createContext as createContext4, useCallback as useCallback5, useContext as useContext4, useEffect as useEffect6, useMemo, useState as useState10 } from "react";
7928
8160
 
7929
8161
  // src/components/Popover/Popover.styles.ts
7930
8162
  import { css as css53 } from "@emotion/react";
@@ -7934,6 +8166,22 @@ var PopoverBtn = css53`
7934
8166
  `;
7935
8167
  var Popover = css53`
7936
8168
  z-index: var(--z-tooltip);
8169
+
8170
+ /**
8171
+ * Hide the popover when its anchor (trigger) has been scrolled out of view by a
8172
+ * clipping ancestor. Without this, the portaled popup keeps tracking the (now
8173
+ * hidden) trigger and Base UI's collision avoidance shifts it back into view
8174
+ * each scroll frame, producing a flashing/jumping effect (see UNI-9326).
8175
+ *
8176
+ * 'display: none' is used (rather than 'visibility: hidden') so the
8177
+ * positioner is removed from layout while the anchor is hidden; otherwise the
8178
+ * still-laid-out positioner causes scroll/layout shift as Floating UI keeps
8179
+ * repositioning it during scroll. This is also the pattern Base UI's docs
8180
+ * recommend for data-anchor-hidden.
8181
+ */
8182
+ &[data-anchor-hidden] {
8183
+ display: none;
8184
+ }
7937
8185
  `;
7938
8186
  var PopoverDefaulterTriggerBtn = css53`
7939
8187
  border: none;
@@ -7992,8 +8240,7 @@ var popover = css54`
7992
8240
  padding: var(--spacing-md);
7993
8241
  max-width: unset;
7994
8242
  container-type: inline-size;
7995
- // we add the 100dvw width as 100% did not work
7996
- // after upgrading to ariakit popover
8243
+ // 100dvw used because 100% did not constrain properly inside the popover
7997
8244
  width: clamp(200px, 100dvw, 540px);
7998
8245
  `;
7999
8246
  var popoverInnerContent = css54`
@@ -8150,7 +8397,7 @@ var DateTimePickerVariant = /* @__PURE__ */ ((DateTimePickerVariant2) => {
8150
8397
  })(DateTimePickerVariant || {});
8151
8398
 
8152
8399
  // src/components/DateTimePicker/DateTimePicker.tsx
8153
- import { jsx as jsx66, jsxs as jsxs43 } from "@emotion/react/jsx-runtime";
8400
+ import { Fragment as Fragment7, jsx as jsx66, jsxs as jsxs43 } from "@emotion/react/jsx-runtime";
8154
8401
  var timeZoneOptions = typeof Intl !== "undefined" && typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : ["Etc/UTC"];
8155
8402
  function getTimezoneOffset(tz) {
8156
8403
  const now = /* @__PURE__ */ new Date();
@@ -8183,7 +8430,7 @@ function getDraftState(parsedValue) {
8183
8430
  timeZone: TIMEZONE_OPTIONS.find(({ value }) => value === timeZone)
8184
8431
  };
8185
8432
  }
8186
- var DateTimePickerContext = createContext2({
8433
+ var DateTimePickerContext = createContext4({
8187
8434
  clearValue() {
8188
8435
  },
8189
8436
  changeDate() {
@@ -8192,8 +8439,72 @@ var DateTimePickerContext = createContext2({
8192
8439
  }
8193
8440
  });
8194
8441
  function useDateTimePickerContext() {
8195
- return useContext2(DateTimePickerContext);
8442
+ return useContext4(DateTimePickerContext);
8196
8443
  }
8444
+ var DateTimePickerPopoverContent = ({
8445
+ draftDate,
8446
+ parsedMinVisible,
8447
+ parseMaxVisible,
8448
+ draftTimeZone,
8449
+ parsedValue,
8450
+ handleDateChange,
8451
+ testId,
8452
+ variant,
8453
+ draftTime,
8454
+ belowTimeInputSlot,
8455
+ handleTimeChange,
8456
+ handleTimezoneChange,
8457
+ handleSelectClick,
8458
+ setOpen
8459
+ }) => /* @__PURE__ */ jsxs43(Fragment7, { children: [
8460
+ /* @__PURE__ */ jsxs43("div", { css: popoverInnerContent, children: [
8461
+ /* @__PURE__ */ jsx66("div", { css: calendarSection, children: /* @__PURE__ */ jsx66(
8462
+ Calendar,
8463
+ {
8464
+ value: draftDate == null ? void 0 : draftDate.toString(),
8465
+ minValue: parsedMinVisible,
8466
+ maxValue: parseMaxVisible,
8467
+ timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
8468
+ onChange: handleDateChange,
8469
+ "data-testid": `${testId}-calendar`
8470
+ }
8471
+ ) }),
8472
+ variant !== "date" /* Date */ && /* @__PURE__ */ jsx66("div", { css: timeSection, children: /* @__PURE__ */ jsx66(
8473
+ InputTime,
8474
+ {
8475
+ label: "Time",
8476
+ value: draftTime == null ? void 0 : draftTime.toString(),
8477
+ belowInputSlot: belowTimeInputSlot,
8478
+ onChange: handleTimeChange
8479
+ }
8480
+ ) }),
8481
+ /* @__PURE__ */ jsxs43("div", { css: tzSection, children: [
8482
+ /* @__PURE__ */ jsx66(Label, { css: labelText, children: "Timezone" }),
8483
+ /* @__PURE__ */ jsx66(
8484
+ InputComboBox,
8485
+ {
8486
+ value: draftTimeZone,
8487
+ options: TIMEZONE_OPTIONS,
8488
+ onChange: handleTimezoneChange,
8489
+ menuPlacement: "auto",
8490
+ styles: {
8491
+ menu(base) {
8492
+ return {
8493
+ ...base,
8494
+ width: "fit-content",
8495
+ right: 0
8496
+ };
8497
+ }
8498
+ }
8499
+ }
8500
+ )
8501
+ ] })
8502
+ ] }),
8503
+ /* @__PURE__ */ jsxs43(HorizontalRhythm, { gap: "0", children: [
8504
+ /* @__PURE__ */ jsx66(Button, { buttonType: "secondary", onClick: handleSelectClick, children: "Select" }),
8505
+ /* @__PURE__ */ jsx66(Button, { buttonType: "ghostDestructive", onClick: () => setOpen(false), children: "cancel" })
8506
+ ] })
8507
+ ] });
8197
8508
  var DateTimePicker = ({
8198
8509
  id,
8199
8510
  label: label2,
@@ -8217,8 +8528,9 @@ var DateTimePicker = ({
8217
8528
  compact = false,
8218
8529
  ...props
8219
8530
  }) => {
8220
- const popover2 = usePopoverStore({ placement });
8221
- const visible = popover2.useState("open");
8531
+ const [open, setOpen] = useState10(false);
8532
+ const { side, alignment } = parsePlacement(placement);
8533
+ const [inlineContainer, setInlineContainer] = useState10(null);
8222
8534
  const parsedValue = useMemo(() => tryParseAbsolute(value == null ? void 0 : value.datetime, value == null ? void 0 : value.timeZone), [value]);
8223
8535
  const parsedMinVisible = useMemo(
8224
8536
  () => tryParseAbsoluteToDateString(minVisible, value == null ? void 0 : value.timeZone),
@@ -8229,29 +8541,29 @@ var DateTimePicker = ({
8229
8541
  [maxVisible, value == null ? void 0 : value.timeZone]
8230
8542
  );
8231
8543
  const draftState = useMemo(() => getDraftState(parsedValue), [parsedValue]);
8232
- const [draftDate, setDraftDate] = useState8(() => draftState.date);
8233
- const [draftTime, setDraftTime] = useState8(() => draftState.time);
8234
- const [draftTimeZone, setDraftTimeZone] = useState8(() => draftState.timeZone);
8544
+ const [draftDate, setDraftDate] = useState10(() => draftState.date);
8545
+ const [draftTime, setDraftTime] = useState10(() => draftState.time);
8546
+ const [draftTimeZone, setDraftTimeZone] = useState10(() => draftState.timeZone);
8235
8547
  useEffect6(() => {
8236
- if (visible) {
8548
+ if (open) {
8237
8549
  setDraftDate(draftState.date);
8238
8550
  setDraftTime(draftState.time);
8239
8551
  setDraftTimeZone(draftState.timeZone);
8240
8552
  }
8241
- }, [draftState, visible]);
8242
- const handleDateChange = useCallback4((isoDate) => {
8553
+ }, [draftState, open]);
8554
+ const handleDateChange = useCallback5((isoDate) => {
8243
8555
  setDraftDate(parseDate2(isoDate));
8244
8556
  }, []);
8245
- const handleTimeChange = useCallback4((isoTime) => {
8557
+ const handleTimeChange = useCallback5((isoTime) => {
8246
8558
  setDraftTime(parseTime2(isoTime));
8247
8559
  }, []);
8248
- const handleTimezoneChange = useCallback4((timeZone) => {
8560
+ const handleTimezoneChange = useCallback5((timeZone) => {
8249
8561
  if (!timeZone) {
8250
8562
  return;
8251
8563
  }
8252
8564
  setDraftTimeZone(timeZone);
8253
8565
  }, []);
8254
- const handleSelectClick = useCallback4(() => {
8566
+ const handleSelectClick = useCallback5(() => {
8255
8567
  const now = /* @__PURE__ */ new Date();
8256
8568
  const date = draftDate || new CalendarDate3(now.getFullYear(), now.getMonth() + 1, now.getDate());
8257
8569
  const newValue = {
@@ -8263,9 +8575,9 @@ var DateTimePicker = ({
8263
8575
  timeZone: draftTimeZone == null ? void 0 : draftTimeZone.value
8264
8576
  };
8265
8577
  onChange == null ? void 0 : onChange(newValue);
8266
- popover2.hide();
8267
- }, [draftDate, draftTime, draftTimeZone == null ? void 0 : draftTimeZone.value, onChange, parsedValue == null ? void 0 : parsedValue.timeZone, popover2]);
8268
- const handleClearClick = useCallback4(() => {
8578
+ setOpen(false);
8579
+ }, [draftDate, draftTime, draftTimeZone == null ? void 0 : draftTimeZone.value, onChange, parsedValue == null ? void 0 : parsedValue.timeZone]);
8580
+ const handleClearClick = useCallback5(() => {
8269
8581
  setDraftDate(null);
8270
8582
  setDraftTime(null);
8271
8583
  onChange == null ? void 0 : onChange({ datetime: null });
@@ -8280,7 +8592,7 @@ var DateTimePicker = ({
8280
8592
  );
8281
8593
  return /* @__PURE__ */ jsx66(DateTimePickerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs43("div", { "data-testid": testId, "data-variant": variant, ...props, children: [
8282
8594
  showLabel ? /* @__PURE__ */ jsx66(Label, { css: [labelText], "data-testid": `${testId}-label`, children: label2 }) : null,
8283
- /* @__PURE__ */ jsx66("div", { css: inputContainer, children: /* @__PURE__ */ jsxs43(PopoverProvider, { store: popover2, children: [
8595
+ /* @__PURE__ */ jsx66("div", { css: inputContainer, children: /* @__PURE__ */ jsxs43(BaseUIPopover.Root, { open, onOpenChange: setOpen, children: [
8284
8596
  /* @__PURE__ */ jsxs43(
8285
8597
  "div",
8286
8598
  {
@@ -8291,12 +8603,11 @@ var DateTimePicker = ({
8291
8603
  errorMessage ? inputError : null
8292
8604
  ],
8293
8605
  "data-disabled": disabled2,
8294
- "data-focus": visible,
8606
+ "data-focus": open,
8295
8607
  children: [
8296
8608
  /* @__PURE__ */ jsx66(
8297
- PopoverDisclosure,
8609
+ BaseUIPopover.Trigger,
8298
8610
  {
8299
- store: popover2,
8300
8611
  css: datePartButton,
8301
8612
  render: /* @__PURE__ */ jsx66(Button, { buttonType: "ghostUnimportant" }),
8302
8613
  disabled: disabled2,
@@ -8321,73 +8632,50 @@ var DateTimePicker = ({
8321
8632
  buttonType: "ghost",
8322
8633
  size: compact ? "sm" : "md",
8323
8634
  disabled: disabled2,
8324
- onClick: popover2.show,
8635
+ onClick: () => setOpen(true),
8636
+ "data-testid": `${testId}-icon`,
8325
8637
  children: /* @__PURE__ */ jsx66(Icon, { icon: triggerIcon, iconColor: "gray", size: "1rem" })
8326
8638
  }
8327
8639
  )
8328
8640
  ]
8329
8641
  }
8330
8642
  ),
8331
- /* @__PURE__ */ jsxs43(
8332
- Popover2,
8643
+ /* @__PURE__ */ jsx66(BaseUIPopover.Portal, { container: portal ? void 0 : inlineContainer, children: /* @__PURE__ */ jsx66(
8644
+ BaseUIPopover.Positioner,
8333
8645
  {
8334
- store: popover2,
8335
- gutter: offset,
8336
- unmountOnHide: true,
8337
- "aria-label": "Pick a date",
8338
- css: [Popover, PopoverBody, popover],
8339
- portal,
8340
- children: [
8341
- /* @__PURE__ */ jsxs43("div", { css: popoverInnerContent, children: [
8342
- /* @__PURE__ */ jsx66("div", { css: calendarSection, children: /* @__PURE__ */ jsx66(
8343
- Calendar,
8344
- {
8345
- value: draftDate == null ? void 0 : draftDate.toString(),
8346
- minValue: parsedMinVisible,
8347
- maxValue: parseMaxVisible,
8348
- timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
8349
- onChange: handleDateChange,
8350
- "data-testid": `${testId}-calendar`
8351
- }
8352
- ) }),
8353
- variant !== "date" /* Date */ && /* @__PURE__ */ jsx66("div", { css: timeSection, children: /* @__PURE__ */ jsx66(
8354
- InputTime,
8646
+ side,
8647
+ align: alignment,
8648
+ sideOffset: offset,
8649
+ css: Popover,
8650
+ children: /* @__PURE__ */ jsx66(
8651
+ BaseUIPopover.Popup,
8652
+ {
8653
+ "aria-label": "Pick a date",
8654
+ css: [PopoverBody, popover],
8655
+ children: /* @__PURE__ */ jsx66(
8656
+ DateTimePickerPopoverContent,
8355
8657
  {
8356
- label: "Time",
8357
- value: draftTime == null ? void 0 : draftTime.toString(),
8358
- belowInputSlot: belowTimeInputSlot,
8359
- onChange: handleTimeChange
8658
+ draftDate,
8659
+ parsedMinVisible,
8660
+ parseMaxVisible,
8661
+ draftTimeZone,
8662
+ parsedValue,
8663
+ handleDateChange,
8664
+ testId,
8665
+ variant,
8666
+ draftTime,
8667
+ belowTimeInputSlot,
8668
+ handleTimeChange,
8669
+ handleTimezoneChange,
8670
+ handleSelectClick,
8671
+ setOpen
8360
8672
  }
8361
- ) }),
8362
- /* @__PURE__ */ jsxs43("div", { css: tzSection, children: [
8363
- /* @__PURE__ */ jsx66(Label, { css: labelText, children: "Timezone" }),
8364
- /* @__PURE__ */ jsx66(
8365
- InputComboBox,
8366
- {
8367
- value: draftTimeZone,
8368
- options: TIMEZONE_OPTIONS,
8369
- onChange: handleTimezoneChange,
8370
- menuPlacement: "auto",
8371
- styles: {
8372
- menu(base) {
8373
- return {
8374
- ...base,
8375
- width: "fit-content",
8376
- right: 0
8377
- };
8378
- }
8379
- }
8380
- }
8381
- )
8382
- ] })
8383
- ] }),
8384
- /* @__PURE__ */ jsxs43(HorizontalRhythm, { gap: "0", children: [
8385
- /* @__PURE__ */ jsx66(Button, { buttonType: "secondary", onClick: handleSelectClick, children: "Select" }),
8386
- /* @__PURE__ */ jsx66(Button, { buttonType: "ghostDestructive", onClick: popover2.hide, children: "cancel" })
8387
- ] })
8388
- ]
8673
+ )
8674
+ }
8675
+ )
8389
8676
  }
8390
- )
8677
+ ) }),
8678
+ !portal && /* @__PURE__ */ jsx66("span", { ref: setInlineContainer })
8391
8679
  ] }) }),
8392
8680
  /* @__PURE__ */ jsx66(
8393
8681
  FieldMessage,
@@ -8405,7 +8693,7 @@ var DateTimePicker = ({
8405
8693
  // src/components/DescriptionList/DescriptionList.tsx
8406
8694
  import { TbCheck } from "@react-icons/all-files/tb/TbCheck";
8407
8695
  import { TbMinus } from "@react-icons/all-files/tb/TbMinus";
8408
- import React11 from "react";
8696
+ import React13 from "react";
8409
8697
 
8410
8698
  // src/components/DescriptionList/DescriptionList.styles.ts
8411
8699
  import { css as css55 } from "@emotion/react";
@@ -8431,7 +8719,7 @@ var descriptionListValueStyles = css55`
8431
8719
 
8432
8720
  // src/components/DescriptionList/DescriptionList.tsx
8433
8721
  import { jsx as jsx67, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
8434
- var DescriptionList = React11.forwardRef(
8722
+ var DescriptionList = React13.forwardRef(
8435
8723
  ({ items, variant = "horizontal", ...listProps }, ref) => {
8436
8724
  if (!(items == null ? void 0 : items.length)) {
8437
8725
  return null;
@@ -8442,7 +8730,7 @@ var DescriptionList = React11.forwardRef(
8442
8730
  ref,
8443
8731
  css: variant === "vertical" ? descriptionListVertical : descriptionListHorizontal,
8444
8732
  ...listProps,
8445
- children: items == null ? void 0 : items.map(({ label: label2, value }) => /* @__PURE__ */ jsxs44(React11.Fragment, { children: [
8733
+ children: items == null ? void 0 : items.map(({ label: label2, value }) => /* @__PURE__ */ jsxs44(React13.Fragment, { children: [
8446
8734
  /* @__PURE__ */ jsx67("dt", { css: descriptionListLabelStyles, children: label2 }),
8447
8735
  /* @__PURE__ */ jsx67("dd", { css: descriptionListValueStyles, children: typeof value === "boolean" ? /* @__PURE__ */ jsx67(DescriptionListValueBoolean, { value }) : value })
8448
8736
  ] }, label2))
@@ -8458,7 +8746,7 @@ var DescriptionListValueBoolean = ({ value }) => {
8458
8746
  };
8459
8747
 
8460
8748
  // src/components/Details/Details.tsx
8461
- import * as React12 from "react";
8749
+ import * as React14 from "react";
8462
8750
 
8463
8751
  // src/components/Details/Details.styles.ts
8464
8752
  import { css as css56 } from "@emotion/react";
@@ -8524,9 +8812,9 @@ var Details = ({
8524
8812
  onChange,
8525
8813
  ...props
8526
8814
  }) => {
8527
- const detailsRef = React12.useRef(null);
8528
- const [internalOpen, setInternalOpen] = React12.useState(isOpenByDefault);
8529
- const memoizedIsOpen = React12.useMemo(() => {
8815
+ const detailsRef = React14.useRef(null);
8816
+ const [internalOpen, setInternalOpen] = React14.useState(isOpenByDefault);
8817
+ const memoizedIsOpen = React14.useMemo(() => {
8530
8818
  return isOpen !== void 0 ? isOpen : internalOpen;
8531
8819
  }, [internalOpen, isOpen]);
8532
8820
  return /* @__PURE__ */ jsxs45(
@@ -8568,7 +8856,7 @@ var Details = ({
8568
8856
  };
8569
8857
 
8570
8858
  // src/components/DragHandle/DragHandle.tsx
8571
- import { forwardRef as forwardRef16 } from "react";
8859
+ import { forwardRef as forwardRef18 } from "react";
8572
8860
 
8573
8861
  // src/components/DragHandle/DragHandle.styles.ts
8574
8862
  import { css as css57 } from "@emotion/react";
@@ -8600,7 +8888,7 @@ var DragHandleDisabled = css57`
8600
8888
 
8601
8889
  // src/components/DragHandle/DragHandle.tsx
8602
8890
  import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
8603
- var DragHandle = forwardRef16(
8891
+ var DragHandle = forwardRef18(
8604
8892
  ({ disableDnd, height = "3.125rem", ...props }, ref) => {
8605
8893
  return /* @__PURE__ */ jsx69(
8606
8894
  "button",
@@ -8617,7 +8905,7 @@ var DragHandle = forwardRef16(
8617
8905
 
8618
8906
  // src/components/Drawer/Drawer.tsx
8619
8907
  import { CgChevronRight } from "@react-icons/all-files/cg/CgChevronRight";
8620
- import React14, { createContext as createContext4, useContext as useContext4, useEffect as useEffect7, useRef as useRef5, useState as useState11 } from "react";
8908
+ import React16, { createContext as createContext6, useContext as useContext6, useEffect as useEffect7, useRef as useRef5, useState as useState13 } from "react";
8621
8909
  import { createPortal } from "react-dom";
8622
8910
 
8623
8911
  // src/components/Drawer/Drawer.styles.ts
@@ -8728,9 +9016,9 @@ var drawerWrapperOverlayStyles = css58`
8728
9016
  `;
8729
9017
 
8730
9018
  // src/components/Drawer/DrawerProvider.tsx
8731
- import { createContext as createContext3, useCallback as useCallback5, useContext as useContext3, useId, useState as useState10 } from "react";
9019
+ import { createContext as createContext5, useCallback as useCallback6, useContext as useContext5, useId, useState as useState12 } from "react";
8732
9020
  import { jsx as jsx70 } from "@emotion/react/jsx-runtime";
8733
- var DrawerContext = createContext3({
9021
+ var DrawerContext = createContext5({
8734
9022
  providerId: "",
8735
9023
  drawersRegistry: [],
8736
9024
  registerDrawer: () => {
@@ -8743,9 +9031,9 @@ var DrawerContext = createContext3({
8743
9031
  }
8744
9032
  });
8745
9033
  var DrawerProvider = ({ children }) => {
8746
- const [drawersRegistry, setDrawersRegistry] = useState10([]);
9034
+ const [drawersRegistry, setDrawersRegistry] = useState12([]);
8747
9035
  const providerId = useId();
8748
- const [drawerTakeoverStackId, setDrawerTakeoverStackId] = useState10(void 0);
9036
+ const [drawerTakeoverStackId, setDrawerTakeoverStackId] = useState12(void 0);
8749
9037
  useShortcut({
8750
9038
  handler: () => {
8751
9039
  var _a, _b;
@@ -8753,7 +9041,7 @@ var DrawerProvider = ({ children }) => {
8753
9041
  },
8754
9042
  shortcut: "escape"
8755
9043
  });
8756
- const registerDrawer = useCallback5(
9044
+ const registerDrawer = useCallback6(
8757
9045
  ({ drawer, onFirstRender }) => {
8758
9046
  setDrawersRegistry((currentValue) => {
8759
9047
  var _a, _b;
@@ -8786,7 +9074,7 @@ var DrawerProvider = ({ children }) => {
8786
9074
  },
8787
9075
  [setDrawersRegistry]
8788
9076
  );
8789
- const unregisterDrawer = useCallback5(
9077
+ const unregisterDrawer = useCallback6(
8790
9078
  (drawer) => {
8791
9079
  setDrawersRegistry((currentValue) => {
8792
9080
  return currentValue.filter((d) => !isEqualDrawerInstance(drawer, d));
@@ -8794,7 +9082,7 @@ var DrawerProvider = ({ children }) => {
8794
9082
  },
8795
9083
  [setDrawersRegistry]
8796
9084
  );
8797
- const registerTakeoverStackId = useCallback5(
9085
+ const registerTakeoverStackId = useCallback6(
8798
9086
  (stackId) => {
8799
9087
  if (drawerTakeoverStackId !== stackId) {
8800
9088
  setDrawerTakeoverStackId(stackId);
@@ -8802,7 +9090,7 @@ var DrawerProvider = ({ children }) => {
8802
9090
  },
8803
9091
  [drawerTakeoverStackId]
8804
9092
  );
8805
- const unregisterTakeoverStackId = useCallback5(
9093
+ const unregisterTakeoverStackId = useCallback6(
8806
9094
  (stackId) => {
8807
9095
  if (drawerTakeoverStackId === stackId) {
8808
9096
  setDrawerTakeoverStackId(void 0);
@@ -8827,7 +9115,7 @@ var DrawerProvider = ({ children }) => {
8827
9115
  );
8828
9116
  };
8829
9117
  var useDrawer = () => {
8830
- return useContext3(DrawerContext);
9118
+ return useContext5(DrawerContext);
8831
9119
  };
8832
9120
  var useCloseCurrentDrawer = () => {
8833
9121
  const context = useDrawer();
@@ -8846,11 +9134,11 @@ function isEqualDrawerInstance(a, b) {
8846
9134
  // src/components/Drawer/Drawer.tsx
8847
9135
  import { jsx as jsx71, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
8848
9136
  var defaultSackId = "_default";
8849
- var CurrentDrawerContext = createContext4({});
9137
+ var CurrentDrawerContext = createContext6({});
8850
9138
  var useCurrentDrawer = () => {
8851
- return useContext4(CurrentDrawerContext);
9139
+ return useContext6(CurrentDrawerContext);
8852
9140
  };
8853
- var Drawer = React14.forwardRef(
9141
+ var Drawer = React16.forwardRef(
8854
9142
  ({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
8855
9143
  var _a;
8856
9144
  const { stackId: inheritedStackId } = useCurrentDrawer();
@@ -8879,7 +9167,7 @@ var DrawerInner = ({
8879
9167
  }) => {
8880
9168
  const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
8881
9169
  const closeButtonRef = useRef5(null);
8882
- const [rendererElement, setRendererElement] = useState11(null);
9170
+ const [rendererElement, setRendererElement] = useState13(null);
8883
9171
  useEffect7(() => {
8884
9172
  registerDrawer({
8885
9173
  drawer: {
@@ -8989,7 +9277,7 @@ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) =>
8989
9277
 
8990
9278
  // src/components/Drawer/DrawerRenderer.tsx
8991
9279
  import { useEffect as useEffect8, useMemo as useMemo3 } from "react";
8992
- import { Fragment as Fragment7, jsx as jsx73, jsxs as jsxs48 } from "@emotion/react/jsx-runtime";
9280
+ import { Fragment as Fragment8, jsx as jsx73, jsxs as jsxs48 } from "@emotion/react/jsx-runtime";
8993
9281
  var drawerWidth = {
8994
9282
  narrow: "29rem",
8995
9283
  medium: "43rem",
@@ -9082,7 +9370,7 @@ var DrawerWrapper = ({
9082
9370
  offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
9083
9371
  }
9084
9372
  const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
9085
- return /* @__PURE__ */ jsxs48(Fragment7, { children: [
9373
+ return /* @__PURE__ */ jsxs48(Fragment8, { children: [
9086
9374
  /* @__PURE__ */ jsx73("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
9087
9375
  /* @__PURE__ */ jsx73(
9088
9376
  "div",
@@ -9181,7 +9469,7 @@ var FlexiCardTitle = ({ icon, heading, ...props }) => {
9181
9469
  };
9182
9470
 
9183
9471
  // src/components/IconButton/IconButton.tsx
9184
- import { forwardRef as forwardRef17 } from "react";
9472
+ import { forwardRef as forwardRef19 } from "react";
9185
9473
 
9186
9474
  // src/components/IconButton/IconButton.styles.ts
9187
9475
  import { css as css62 } from "@emotion/react";
@@ -9217,7 +9505,7 @@ var variants = {
9217
9505
 
9218
9506
  // src/components/IconButton/IconButton.tsx
9219
9507
  import { jsx as jsx77 } from "@emotion/react/jsx-runtime";
9220
- var IconButton = forwardRef17(
9508
+ var IconButton = forwardRef19(
9221
9509
  ({ children, size = "md", variant = "square", ...props }, ref) => {
9222
9510
  return /* @__PURE__ */ jsx77(Button, { ref, css: [iconButton, variants[variant], sizes2[size]], ...props, children });
9223
9511
  }
@@ -9225,7 +9513,7 @@ var IconButton = forwardRef17(
9225
9513
  IconButton.displayName = "IconButton";
9226
9514
 
9227
9515
  // src/components/Image/Image.tsx
9228
- import { useCallback as useCallback6, useEffect as useEffect10, useRef as useRef6, useState as useState12 } from "react";
9516
+ import { useCallback as useCallback7, useEffect as useEffect10, useRef as useRef6, useState as useState14 } from "react";
9229
9517
 
9230
9518
  // src/components/Image/Image.styles.ts
9231
9519
  import { css as css63 } from "@emotion/react";
@@ -9328,8 +9616,8 @@ function Image({
9328
9616
  errorFallbackSrc,
9329
9617
  ...imgAttribs
9330
9618
  }) {
9331
- const [loading, setLoading] = useState12(true);
9332
- const [loadErrorText, setLoadErrorText] = useState12("");
9619
+ const [loading, setLoading] = useState14(true);
9620
+ const [loadErrorText, setLoadErrorText] = useState14("");
9333
9621
  const { currentSrc, currentSrcSet, tryFallback } = useImageLoadFallback({
9334
9622
  src: src != null ? src : "",
9335
9623
  srcSet,
@@ -9340,7 +9628,7 @@ function Image({
9340
9628
  useEffect10(() => {
9341
9629
  setLoadErrorText("");
9342
9630
  }, [src, srcSet]);
9343
- const updateImageSrc = useCallback6(() => {
9631
+ const updateImageSrc = useCallback7(() => {
9344
9632
  let message = "";
9345
9633
  try {
9346
9634
  if (currentSrc === "") {
@@ -9699,7 +9987,7 @@ var EditTeamIntegrationTile = ({
9699
9987
  // src/components/Tiles/IntegrationComingSoon.tsx
9700
9988
  import { css as css66 } from "@emotion/react";
9701
9989
  import { CgHeart } from "@react-icons/all-files/cg/CgHeart";
9702
- import { useEffect as useEffect11, useState as useState13 } from "react";
9990
+ import { useEffect as useEffect11, useState as useState15 } from "react";
9703
9991
  import { jsx as jsx84, jsxs as jsxs56 } from "@emotion/react/jsx-runtime";
9704
9992
  var IntegrationComingSoon = ({
9705
9993
  name,
@@ -9709,7 +9997,7 @@ var IntegrationComingSoon = ({
9709
9997
  timing = 1e3,
9710
9998
  ...props
9711
9999
  }) => {
9712
- const [upVote, setUpVote] = useState13(false);
10000
+ const [upVote, setUpVote] = useState15(false);
9713
10001
  const handleUpVoteInteraction = () => {
9714
10002
  setUpVote((prev) => !prev);
9715
10003
  onUpVoteClick();
@@ -9810,10 +10098,10 @@ var IntegrationLoadingFrame = css67`
9810
10098
  `;
9811
10099
 
9812
10100
  // src/components/Tiles/IntegrationLoadingTile.tsx
9813
- import { Fragment as Fragment8, jsx as jsx85, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
10101
+ import { Fragment as Fragment9, jsx as jsx85, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
9814
10102
  var IntegrationLoadingTile = ({ count = 1 }) => {
9815
10103
  const componentCount = Array.from(Array(count).keys());
9816
- return /* @__PURE__ */ jsx85(Fragment8, { children: componentCount.map((i) => /* @__PURE__ */ jsxs57("div", { css: IntegrationLoadingTileContainer, children: [
10104
+ return /* @__PURE__ */ jsx85(Fragment9, { children: componentCount.map((i) => /* @__PURE__ */ jsxs57("div", { css: IntegrationLoadingTileContainer, children: [
9817
10105
  /* @__PURE__ */ jsx85("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
9818
10106
  /* @__PURE__ */ jsx85("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
9819
10107
  ] }, i)) });
@@ -9915,7 +10203,7 @@ var IntegrationTile = ({
9915
10203
  };
9916
10204
 
9917
10205
  // src/components/Tiles/LinkTile.tsx
9918
- import { forwardRef as forwardRef18 } from "react";
10206
+ import { forwardRef as forwardRef20 } from "react";
9919
10207
 
9920
10208
  // src/components/Tiles/styles/Tile.styles.ts
9921
10209
  import { css as css69 } from "@emotion/react";
@@ -9968,7 +10256,7 @@ var TileHorizontal = css69`
9968
10256
 
9969
10257
  // src/components/Tiles/LinkTile.tsx
9970
10258
  import { jsx as jsx88 } from "@emotion/react/jsx-runtime";
9971
- var LinkTile2 = forwardRef18(
10259
+ var LinkTile2 = forwardRef20(
9972
10260
  ({ orientation = "vertical", children, ...props }, ref) => {
9973
10261
  if ("linkManagerComponent" in props) {
9974
10262
  const { linkManagerComponent: LinkManager, ...rest } = props;
@@ -10153,7 +10441,7 @@ var IntegrationModalHeaderContentWrapper = css72`
10153
10441
  `;
10154
10442
 
10155
10443
  // src/components/IntegrationModalHeader/IntegrationModalHeader.tsx
10156
- import { Fragment as Fragment9, jsx as jsx92, jsxs as jsxs60 } from "@emotion/react/jsx-runtime";
10444
+ import { Fragment as Fragment10, jsx as jsx92, jsxs as jsxs60 } from "@emotion/react/jsx-runtime";
10157
10445
  var HexModalBackground = ({ ...props }) => {
10158
10446
  return /* @__PURE__ */ jsxs60(
10159
10447
  "svg",
@@ -10194,7 +10482,7 @@ var HexModalBackground = ({ ...props }) => {
10194
10482
  );
10195
10483
  };
10196
10484
  var IntegrationModalHeader = ({ icon, name, menu, children }) => {
10197
- return /* @__PURE__ */ jsxs60(Fragment9, { children: [
10485
+ return /* @__PURE__ */ jsxs60(Fragment10, { children: [
10198
10486
  /* @__PURE__ */ jsx92(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
10199
10487
  /* @__PURE__ */ jsx92("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs60("div", { css: IntegrationModalHeaderTitleGroup, children: [
10200
10488
  icon ? /* @__PURE__ */ jsx92(IntegrationModalIcon, { icon, name: name || "" }) : null,
@@ -10275,11 +10563,11 @@ import {
10275
10563
  } from "@dnd-kit/sortable";
10276
10564
  import { CSS } from "@dnd-kit/utilities";
10277
10565
  import {
10278
- useCallback as useCallback7,
10566
+ useCallback as useCallback8,
10279
10567
  useEffect as useEffect13,
10280
10568
  useMemo as useMemo5,
10281
10569
  useRef as useRef8,
10282
- useState as useState14
10570
+ useState as useState16
10283
10571
  } from "react";
10284
10572
 
10285
10573
  // src/utils/useDebouncedCallback.ts
@@ -10370,11 +10658,11 @@ var KeyValueInput = ({
10370
10658
  showIconColumn = false,
10371
10659
  renderIconSelector
10372
10660
  }) => {
10373
- const [isDragging, setIsDragging] = useState14(false);
10374
- const [indexToFocus, setIndexToFocus] = useState14(null);
10661
+ const [isDragging, setIsDragging] = useState16(false);
10662
+ const [indexToFocus, setIndexToFocus] = useState16(null);
10375
10663
  const popoverStoresMap = useRef8({});
10376
10664
  const keyInputRefsMap = useRef8({});
10377
- const [blockAutoGenerateForValues, setBlockAutoGenerateForValues] = useState14(
10665
+ const [blockAutoGenerateForValues, setBlockAutoGenerateForValues] = useState16(
10378
10666
  () => new Set(value.map((item) => item.value))
10379
10667
  );
10380
10668
  const sensors = useSensors(
@@ -10386,7 +10674,7 @@ var KeyValueInput = ({
10386
10674
  const valueWithIds = useMemo5(() => {
10387
10675
  return value.map((item, index) => ({ ...item, id: generateItemId(item, index) }));
10388
10676
  }, [value]);
10389
- const handleAddOptionRow = useCallback7(
10677
+ const handleAddOptionRow = useCallback8(
10390
10678
  (insertIndex) => {
10391
10679
  const newValue = [...value];
10392
10680
  newValue.splice(insertIndex + 1, 0, newItemDefault);
@@ -10395,7 +10683,7 @@ var KeyValueInput = ({
10395
10683
  },
10396
10684
  [onChange, value, newItemDefault]
10397
10685
  );
10398
- const handleDeleteOptionRow = useCallback7(
10686
+ const handleDeleteOptionRow = useCallback8(
10399
10687
  (deleteIndex) => {
10400
10688
  const updatedOptions = value.filter((_, index) => index !== deleteIndex);
10401
10689
  onChange(updatedOptions);
@@ -10418,7 +10706,7 @@ var KeyValueInput = ({
10418
10706
  [onFocusChange],
10419
10707
  300
10420
10708
  );
10421
- const handleUpdateOptionRow = useCallback7(
10709
+ const handleUpdateOptionRow = useCallback8(
10422
10710
  (rowIndex, rowValue) => {
10423
10711
  onChange(
10424
10712
  value.map((item, index) => {
@@ -10431,7 +10719,7 @@ var KeyValueInput = ({
10431
10719
  },
10432
10720
  [onChange, value]
10433
10721
  );
10434
- const handleKeyPaste = useCallback7(
10722
+ const handleKeyPaste = useCallback8(
10435
10723
  (rowIndex, e) => {
10436
10724
  const pastedText = e.clipboardData.getData("text");
10437
10725
  const lines = pastedText.split("\n").filter((line) => line.trim() !== "");
@@ -10459,7 +10747,7 @@ var KeyValueInput = ({
10459
10747
  },
10460
10748
  [onChange, value]
10461
10749
  );
10462
- const handleDragEnd = useCallback7(
10750
+ const handleDragEnd = useCallback8(
10463
10751
  (e) => {
10464
10752
  setIsDragging(false);
10465
10753
  const { active: active2, over } = e;
@@ -10472,13 +10760,13 @@ var KeyValueInput = ({
10472
10760
  },
10473
10761
  [value, valueWithIds, onChange, setIsDragging]
10474
10762
  );
10475
- const handleDragStart = useCallback7(() => {
10763
+ const handleDragStart = useCallback8(() => {
10476
10764
  Object.values(popoverStoresMap.current).forEach((store) => {
10477
10765
  store.hide();
10478
10766
  });
10479
10767
  setIsDragging(true);
10480
10768
  }, [setIsDragging]);
10481
- const handleDragCancel = useCallback7(() => {
10769
+ const handleDragCancel = useCallback8(() => {
10482
10770
  setIsDragging(false);
10483
10771
  }, [setIsDragging]);
10484
10772
  useEffect13(() => {
@@ -10507,7 +10795,7 @@ var KeyValueInput = ({
10507
10795
  showIconColumn && /* @__PURE__ */ jsxs61(HorizontalRhythm, { align: "center", gap: "xs", children: [
10508
10796
  /* @__PURE__ */ jsx94("span", { children: iconLabel }),
10509
10797
  !iconInfoPopover ? null : /* @__PURE__ */ jsx94(
10510
- Popover3,
10798
+ Popover2,
10511
10799
  {
10512
10800
  buttonText: `${iconLabel} info`,
10513
10801
  iconColor: "gray",
@@ -10520,7 +10808,7 @@ var KeyValueInput = ({
10520
10808
  /* @__PURE__ */ jsxs61(HorizontalRhythm, { align: "center", gap: "xs", children: [
10521
10809
  /* @__PURE__ */ jsx94("span", { children: keyLabel }),
10522
10810
  !keyInfoPopover ? null : /* @__PURE__ */ jsx94(
10523
- Popover3,
10811
+ Popover2,
10524
10812
  {
10525
10813
  buttonText: `${keyLabel} info`,
10526
10814
  iconColor: "gray",
@@ -10534,7 +10822,7 @@ var KeyValueInput = ({
10534
10822
  /* @__PURE__ */ jsxs61(HorizontalRhythm, { align: "center", gap: "xs", children: [
10535
10823
  /* @__PURE__ */ jsx94("span", { children: valueLabel }),
10536
10824
  !valueInfoPopover ? null : /* @__PURE__ */ jsx94(
10537
- Popover3,
10825
+ Popover2,
10538
10826
  {
10539
10827
  buttonText: `${valueLabel} info`,
10540
10828
  iconColor: "gray",
@@ -10747,13 +11035,13 @@ var KeyValueInputItem = ({
10747
11035
  // src/components/LabelsQuickFilter/LabelsQuickFilter.tsx
10748
11036
  import { TbChevronRight as TbChevronRight2 } from "@react-icons/all-files/tb/TbChevronRight";
10749
11037
  import { TbTags } from "@react-icons/all-files/tb/TbTags";
10750
- import { useCallback as useCallback8, useMemo as useMemo6, useState as useState16 } from "react";
11038
+ import { useCallback as useCallback9, useMemo as useMemo6, useState as useState18 } from "react";
10751
11039
 
10752
11040
  // src/components/QuickFilter/QuickFilter.tsx
10753
11041
  import { CgMathPlus as CgMathPlus2 } from "@react-icons/all-files/cg/CgMathPlus";
10754
11042
  import { CgTag } from "@react-icons/all-files/cg/CgTag";
10755
11043
  import { TbWashDryclean } from "@react-icons/all-files/tb/TbWashDryclean";
10756
- import { useEffect as useEffect14, useRef as useRef9, useState as useState15 } from "react";
11044
+ import { useEffect as useEffect14, useRef as useRef9, useState as useState17 } from "react";
10757
11045
 
10758
11046
  // src/components/Swatch/Swatch.styles.ts
10759
11047
  import { css as css74 } from "@emotion/react";
@@ -11166,7 +11454,7 @@ var QuickFilter = ({
11166
11454
  const hasSelectedItems = selectedItems && (selectedItems == null ? void 0 : selectedItems.length) > 0;
11167
11455
  const containerRef = useRef9(null);
11168
11456
  const hasPositionedRef = useRef9(false);
11169
- const [open, setOpen] = useState15(false);
11457
+ const [open, setOpen] = useState17(false);
11170
11458
  useEffect14(() => {
11171
11459
  if (open) {
11172
11460
  onOpen == null ? void 0 : onOpen();
@@ -11174,11 +11462,11 @@ var QuickFilter = ({
11174
11462
  onClose == null ? void 0 : onClose();
11175
11463
  }
11176
11464
  }, [open, onOpen, onClose]);
11177
- const defaultGetAnchorRect = () => {
11465
+ const defaultGetAnchorRect = containerRef.current ? () => {
11178
11466
  var _a;
11179
11467
  const rect = (_a = containerRef.current) == null ? void 0 : _a.getBoundingClientRect();
11180
11468
  if (!rect) {
11181
- return null;
11469
+ return {};
11182
11470
  }
11183
11471
  return {
11184
11472
  x: rect.right,
@@ -11186,7 +11474,7 @@ var QuickFilter = ({
11186
11474
  width: 0,
11187
11475
  height: rect.height
11188
11476
  };
11189
- };
11477
+ } : void 0;
11190
11478
  const defaultUpdatePosition = ({ updatePosition }) => {
11191
11479
  if (!hasPositionedRef.current) {
11192
11480
  hasPositionedRef.current = true;
@@ -11325,7 +11613,7 @@ var QuickFilter = ({
11325
11613
  };
11326
11614
 
11327
11615
  // src/components/LabelsQuickFilter/LabelsQuickFilter.tsx
11328
- import { Fragment as Fragment10, jsx as jsx99, jsxs as jsxs65 } from "@emotion/react/jsx-runtime";
11616
+ import { Fragment as Fragment11, jsx as jsx99, jsxs as jsxs65 } from "@emotion/react/jsx-runtime";
11329
11617
  var LabelsQuickFilter = ({
11330
11618
  buttonText,
11331
11619
  addButtonText,
@@ -11346,7 +11634,7 @@ var LabelsQuickFilter = ({
11346
11634
  menuUpdatePosition,
11347
11635
  maxCount = 0
11348
11636
  }) => {
11349
- const [searchTerm, setSearchTerm] = useState16("");
11637
+ const [searchTerm, setSearchTerm] = useState18("");
11350
11638
  const selectedIdsSet = useMemo6(
11351
11639
  () => selectedIds instanceof Set ? selectedIds : new Set(selectedIds),
11352
11640
  [selectedIds]
@@ -11393,7 +11681,7 @@ var LabelsQuickFilter = ({
11393
11681
  SelectableMenuItem,
11394
11682
  {
11395
11683
  selectStyles: "checkbox-select",
11396
- hideOnClick: false,
11684
+ hideMenuOnClick: false,
11397
11685
  onClick: () => handleToggle(item),
11398
11686
  selected: isSelected,
11399
11687
  children: [
@@ -11418,7 +11706,7 @@ var LabelsQuickFilter = ({
11418
11706
  SelectableMenuItem,
11419
11707
  {
11420
11708
  selectStyles: "checkbox-select",
11421
- hideOnClick: false,
11709
+ hideMenuOnClick: false,
11422
11710
  onClick: () => handleToggle(item),
11423
11711
  selected: isChildSelected,
11424
11712
  children: [
@@ -11479,7 +11767,7 @@ var LabelsQuickFilter = ({
11479
11767
  SelectableMenuItem,
11480
11768
  {
11481
11769
  selectStyles: "checkbox-select",
11482
- hideOnClick: false,
11770
+ hideMenuOnClick: false,
11483
11771
  onClick: () => handleToggle(item),
11484
11772
  selected: isChildSelected,
11485
11773
  children: [
@@ -11506,7 +11794,7 @@ var LabelsQuickFilter = ({
11506
11794
  isCreateDisabled: isCreateDisabled2
11507
11795
  };
11508
11796
  }, [filteredItems, items, searchTerm]);
11509
- const handleSearchEnterKeyDown = useCallback8(() => {
11797
+ const handleSearchEnterKeyDown = useCallback9(() => {
11510
11798
  if (canCreateLabel && !isCreateDisabled && onCreateLabel) {
11511
11799
  onCreateLabel(searchTerm);
11512
11800
  }
@@ -11541,7 +11829,7 @@ var LabelsQuickFilter = ({
11541
11829
  }
11542
11830
  return renderLabelItem(item);
11543
11831
  }),
11544
- canCreateLabel && onCreateLabel ? /* @__PURE__ */ jsxs65(Fragment10, { children: [
11832
+ canCreateLabel && onCreateLabel ? /* @__PURE__ */ jsxs65(Fragment11, { children: [
11545
11833
  filteredItems.length > 0 ? /* @__PURE__ */ jsx99(MenuItemSeparator, {}) : null,
11546
11834
  /* @__PURE__ */ jsx99(MenuItem, { hideOnClick: false, disabled: isCreateDisabled, onClick: () => onCreateLabel(searchTerm), children: /* @__PURE__ */ jsxs65(HorizontalRhythm, { align: "center", gap: "sm", css: { fontSize: "var(--fs-sm)" }, children: [
11547
11835
  /* @__PURE__ */ jsx99("span", { css: { width: "var(--spacing-base)", flexShrink: 0 } }),
@@ -11560,14 +11848,16 @@ var LabelsQuickFilter = ({
11560
11848
  };
11561
11849
 
11562
11850
  // src/components/Popover/Popover.tsx
11851
+ import { Popover as BaseUIPopover2 } from "@base-ui/react/popover";
11563
11852
  import {
11564
- Popover as AriakitPopover,
11565
- PopoverDisclosure as PopoverDisclosure2,
11566
- PopoverProvider as PopoverProvider2,
11567
- usePopoverContext,
11568
- usePopoverStore as usePopoverStore2
11569
- } from "@ariakit/react";
11570
- import { useEffect as useEffect15 } from "react";
11853
+ createContext as createContext7,
11854
+ useCallback as useCallback10,
11855
+ useContext as useContext7,
11856
+ useEffect as useEffect15,
11857
+ useMemo as useMemo7,
11858
+ useRef as useRef10,
11859
+ useState as useState19
11860
+ } from "react";
11571
11861
 
11572
11862
  // src/components/Popover/PopoverBody.tsx
11573
11863
  import { jsx as jsx100 } from "@emotion/react/jsx-runtime";
@@ -11594,8 +11884,9 @@ var PopoverBody2 = ({
11594
11884
  };
11595
11885
 
11596
11886
  // src/components/Popover/Popover.tsx
11597
- import { Fragment as Fragment11, jsx as jsx101, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
11598
- var Popover3 = ({
11887
+ import { Fragment as Fragment12, jsx as jsx101, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
11888
+ var PopoverComponentContext = createContext7(null);
11889
+ var Popover2 = ({
11599
11890
  iconColor = "action",
11600
11891
  icon = "info",
11601
11892
  iconSize: iconSize2 = "1rem",
@@ -11608,32 +11899,86 @@ var Popover3 = ({
11608
11899
  onInit,
11609
11900
  variant = "small",
11610
11901
  maxWidth = variant === "large" ? "24rem" : "14rem",
11611
- ...otherProps
11902
+ gutter,
11903
+ portal = true,
11904
+ open: controlledOpen,
11905
+ onOpenChange: controlledOnOpenChange,
11906
+ className,
11907
+ style,
11908
+ tabIndex,
11909
+ id,
11910
+ disabled: disabled2
11612
11911
  }) => {
11613
- const popover2 = usePopoverStore2({ placement });
11912
+ const [uncontrolledOpen, setUncontrolledOpen] = useState19(false);
11913
+ const open = controlledOpen !== void 0 ? controlledOpen : uncontrolledOpen;
11914
+ const openRef = useRef10(false);
11915
+ openRef.current = open;
11916
+ const modalContainer = useModalPortalContainer();
11917
+ const { side, alignment } = parsePlacement(placement);
11918
+ const onOpenChangeRef = useRef10(controlledOnOpenChange);
11919
+ onOpenChangeRef.current = controlledOnOpenChange;
11920
+ const controlledOpenRef = useRef10(controlledOpen);
11921
+ controlledOpenRef.current = controlledOpen;
11922
+ const setOpen = useCallback10((nextOpen) => {
11923
+ var _a;
11924
+ if (controlledOpenRef.current === void 0) {
11925
+ setUncontrolledOpen(nextOpen);
11926
+ }
11927
+ (_a = onOpenChangeRef.current) == null ? void 0 : _a.call(onOpenChangeRef, nextOpen);
11928
+ }, []);
11929
+ const hide = useCallback10(() => setOpen(false), [setOpen]);
11930
+ const show = useCallback10(() => setOpen(true), [setOpen]);
11931
+ const handleOpenChange = useCallback10((nextOpen) => setOpen(nextOpen), [setOpen]);
11932
+ const shimStore = useMemo7(
11933
+ () => ({
11934
+ hide,
11935
+ show,
11936
+ get open() {
11937
+ return openRef.current;
11938
+ }
11939
+ }),
11940
+ [hide, show]
11941
+ );
11942
+ const contextValue = useMemo7(
11943
+ () => ({ open, setOpen, hide, show }),
11944
+ [open, setOpen, hide, show]
11945
+ );
11946
+ const [inlineContainer, setInlineContainer] = useState19(null);
11614
11947
  useEffect15(() => {
11615
- onInit == null ? void 0 : onInit({ store: popover2 });
11616
- }, [popover2]);
11617
- return /* @__PURE__ */ jsxs66(PopoverProvider2, { store: popover2, children: [
11948
+ onInit == null ? void 0 : onInit({ store: shimStore });
11949
+ }, [shimStore]);
11950
+ const portalContainer = portal ? modalContainer != null ? modalContainer : void 0 : inlineContainer;
11951
+ return /* @__PURE__ */ jsx101(PopoverComponentContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs66(BaseUIPopover2.Root, { open, onOpenChange: handleOpenChange, children: [
11618
11952
  /* @__PURE__ */ jsx101(
11619
- PopoverDisclosure2,
11953
+ BaseUIPopover2.Trigger,
11620
11954
  {
11621
11955
  css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
11622
11956
  title: buttonText,
11623
11957
  "data-testid": testId,
11624
- disabled: otherProps.disabled,
11625
- children: trigger2 ? trigger2 : /* @__PURE__ */ jsxs66(Fragment11, { children: [
11958
+ disabled: disabled2,
11959
+ children: trigger2 ? trigger2 : /* @__PURE__ */ jsxs66(Fragment12, { children: [
11626
11960
  /* @__PURE__ */ jsx101(Icon, { icon, iconColor, size: iconSize2 }),
11627
11961
  /* @__PURE__ */ jsx101("span", { hidden: true, children: buttonText })
11628
11962
  ] })
11629
11963
  }
11630
11964
  ),
11631
- /* @__PURE__ */ jsx101(AriakitPopover, { unmountOnHide: true, "aria-label": ariaLabel, css: Popover, ...otherProps, children: /* @__PURE__ */ jsx101(PopoverBody2, { variant, maxWidth, children }) })
11632
- ] });
11965
+ /* @__PURE__ */ jsx101(BaseUIPopover2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx101(BaseUIPopover2.Positioner, { side, align: alignment, sideOffset: gutter, css: Popover, children: /* @__PURE__ */ jsx101(
11966
+ BaseUIPopover2.Popup,
11967
+ {
11968
+ ...id !== void 0 && { id },
11969
+ "aria-label": ariaLabel,
11970
+ role: "dialog",
11971
+ className,
11972
+ style,
11973
+ tabIndex,
11974
+ children: /* @__PURE__ */ jsx101(PopoverBody2, { variant, maxWidth, children })
11975
+ }
11976
+ ) }) }),
11977
+ !portal && /* @__PURE__ */ jsx101("span", { ref: setInlineContainer })
11978
+ ] }) });
11633
11979
  };
11634
11980
  var usePopoverComponentContext = () => {
11635
- const contextValue = usePopoverContext();
11636
- return contextValue;
11981
+ return useContext7(PopoverComponentContext);
11637
11982
  };
11638
11983
 
11639
11984
  // src/components/LimitsBar/LimitsBar.styles.ts
@@ -11712,7 +12057,7 @@ var LimitsBar = ({ current, max, popoverContent, barColor, ...props }) => {
11712
12057
  ),
11713
12058
  /* @__PURE__ */ jsxs67(HorizontalRhythm, { gap: "sm", align: "center", children: [
11714
12059
  /* @__PURE__ */ jsx102("span", { css: [LimitsBarCountText, LimitsBarTextColor(textColor2)], "aria-label": "usage count", children: displayText }),
11715
- popoverContent ? /* @__PURE__ */ jsx102(Popover3, { buttonText: "Info", placement: "top", children: popoverContent }) : null
12060
+ popoverContent ? /* @__PURE__ */ jsx102(Popover2, { buttonText: "Info", placement: "top", children: popoverContent }) : null
11716
12061
  ] })
11717
12062
  ] });
11718
12063
  };
@@ -11906,6 +12251,7 @@ var ScrollableListItem = ({
11906
12251
  disableShadow,
11907
12252
  ...props
11908
12253
  }) => {
12254
+ var _a;
11909
12255
  return /* @__PURE__ */ jsx106(
11910
12256
  "div",
11911
12257
  {
@@ -11914,7 +12260,7 @@ var ScrollableListItem = ({
11914
12260
  disableShadow ? void 0 : ScrollableListItemShadow,
11915
12261
  active2 ? ScrollableListItemActive : void 0
11916
12262
  ],
11917
- children: /* @__PURE__ */ jsxs71("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
12263
+ children: /* @__PURE__ */ jsxs71("button", { css: ScrollableListItemBtn, ...props, type: (_a = props.type) != null ? _a : "button", children: [
11918
12264
  /* @__PURE__ */ jsxs71(HorizontalRhythm, { gap: "xs", align: "center", children: [
11919
12265
  icon,
11920
12266
  /* @__PURE__ */ jsx106("span", { children: buttonText })
@@ -12002,9 +12348,8 @@ var LoadingIndicator = ({ size = "lg", color = "gray", ...props }) => {
12002
12348
  };
12003
12349
 
12004
12350
  // src/components/Modal/Modal.tsx
12005
- import { PortalContext } from "@ariakit/react";
12006
12351
  import { CgClose as CgClose5 } from "@react-icons/all-files/cg/CgClose";
12007
- import React16, { useCallback as useCallback9, useEffect as useEffect16, useRef as useRef10, useState as useState17 } from "react";
12352
+ import React18, { useCallback as useCallback11, useEffect as useEffect16, useRef as useRef11, useState as useState20 } from "react";
12008
12353
 
12009
12354
  // src/components/Modal/Modal.styles.ts
12010
12355
  import { css as css83 } from "@emotion/react";
@@ -12094,7 +12439,7 @@ var modalDialogInnerStyles = css83`
12094
12439
  import { jsx as jsx108, jsxs as jsxs73 } from "@emotion/react/jsx-runtime";
12095
12440
  var defaultModalWidth = "75rem";
12096
12441
  var defaultModalHeight = "51rem";
12097
- var Modal = React16.forwardRef(
12442
+ var Modal = React18.forwardRef(
12098
12443
  ({
12099
12444
  header: header2,
12100
12445
  children,
@@ -12108,10 +12453,10 @@ var Modal = React16.forwardRef(
12108
12453
  disableBodyScroll = false,
12109
12454
  ...modalProps
12110
12455
  }, ref) => {
12111
- const mouseDownInsideModal = useRef10(false);
12112
- const dialogRef = useRef10(null);
12113
- const [portalTarget, setPortalTarget] = useState17(null);
12114
- const setDialogRef = useCallback9(
12456
+ const mouseDownInsideModal = useRef11(false);
12457
+ const dialogRef = useRef11(null);
12458
+ const [portalTarget, setPortalTarget] = useState20(null);
12459
+ const setDialogRef = useCallback11(
12115
12460
  (element) => {
12116
12461
  dialogRef.current = element;
12117
12462
  setPortalTarget(element);
@@ -12156,7 +12501,7 @@ var Modal = React16.forwardRef(
12156
12501
  style: {
12157
12502
  width,
12158
12503
  height: height === "auto" ? "min-content" : height,
12159
- // allows menus rendered in the PortalContext to overflow the modal contents
12504
+ // allows menus rendered in the ModalPortalContext to overflow the modal contents
12160
12505
  // (internal scrolling of contents is handled on a child element)
12161
12506
  overflow: "visible"
12162
12507
  },
@@ -12176,7 +12521,7 @@ var Modal = React16.forwardRef(
12176
12521
  e.preventDefault();
12177
12522
  },
12178
12523
  ...modalProps,
12179
- children: /* @__PURE__ */ jsx108(PortalContext.Provider, { value: portalTarget, children: /* @__PURE__ */ jsxs73(
12524
+ children: /* @__PURE__ */ jsx108(ModalPortalContext.Provider, { value: portalTarget, children: /* @__PURE__ */ jsxs73(
12180
12525
  "div",
12181
12526
  {
12182
12527
  css: [modalInnerStyles, { height: height === "auto" ? "auto" : "100%" }],
@@ -12223,9 +12568,9 @@ var Modal = React16.forwardRef(
12223
12568
  Modal.displayName = "Modal";
12224
12569
 
12225
12570
  // src/components/Modal/ModalDialog.tsx
12226
- import { forwardRef as forwardRef19 } from "react";
12571
+ import { forwardRef as forwardRef21 } from "react";
12227
12572
  import { jsx as jsx109, jsxs as jsxs74 } from "@emotion/react/jsx-runtime";
12228
- var ModalDialog = forwardRef19(
12573
+ var ModalDialog = forwardRef21(
12229
12574
  ({ header: header2, buttonGroup, modalSize = "lg", children, height = "auto", onRequestClose, ...props }, ref) => {
12230
12575
  return /* @__PURE__ */ jsx109(
12231
12576
  Modal,
@@ -12251,7 +12596,7 @@ var ModalDialog = forwardRef19(
12251
12596
  ModalDialog.displayName = "ModalDialog";
12252
12597
 
12253
12598
  // src/components/Objects/ObjectGridContainer.tsx
12254
- import { forwardRef as forwardRef20 } from "react";
12599
+ import { forwardRef as forwardRef22 } from "react";
12255
12600
 
12256
12601
  // src/components/Objects/styles/ObjectGridContainer.styles.ts
12257
12602
  import { css as css84 } from "@emotion/react";
@@ -12263,7 +12608,7 @@ var ObjectGridContainer = (gridCount) => css84`
12263
12608
 
12264
12609
  // src/components/Objects/ObjectGridContainer.tsx
12265
12610
  import { jsx as jsx110 } from "@emotion/react/jsx-runtime";
12266
- var ObjectGridContainer2 = forwardRef20(
12611
+ var ObjectGridContainer2 = forwardRef22(
12267
12612
  ({ gridCount = 3, children, ...props }, ref) => {
12268
12613
  return /* @__PURE__ */ jsx110(
12269
12614
  "div",
@@ -12489,7 +12834,7 @@ var CoverSelectedChip = css86`
12489
12834
  `;
12490
12835
 
12491
12836
  // src/components/Objects/ObjectGridItemCardCover.tsx
12492
- import { Fragment as Fragment12, jsx as jsx112, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
12837
+ import { Fragment as Fragment13, jsx as jsx112, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
12493
12838
  var ObjectGridItemCardCover = (props) => {
12494
12839
  if ("imageUrl" in props && props.imageUrl) {
12495
12840
  const { imageUrl, srcSet, alt, errorFallbackSrc } = props;
@@ -12523,7 +12868,7 @@ var ObjectGridItemCover = ({
12523
12868
  coverSlotBottomRight,
12524
12869
  ...props
12525
12870
  }) => {
12526
- return /* @__PURE__ */ jsxs76(Fragment12, { children: [
12871
+ return /* @__PURE__ */ jsxs76(Fragment13, { children: [
12527
12872
  coverSlotLeft ? /* @__PURE__ */ jsx112("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
12528
12873
  /* @__PURE__ */ jsx112(ObjectGridItemCardCover, { ...props }),
12529
12874
  coverSlotRight ? /* @__PURE__ */ jsx112("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
@@ -12560,7 +12905,7 @@ var ObjectGridItemCoverButton = ({
12560
12905
  };
12561
12906
 
12562
12907
  // src/components/Objects/ObjectGridItemHeading.tsx
12563
- import { useEffect as useEffect17, useRef as useRef11, useState as useState18 } from "react";
12908
+ import { useEffect as useEffect17, useRef as useRef12, useState as useState21 } from "react";
12564
12909
 
12565
12910
  // src/components/Objects/styles/ObjectGridItemHeading.styles.ts
12566
12911
  import { css as css87 } from "@emotion/react";
@@ -12586,8 +12931,8 @@ var ObjectGridItemHeading2 = ({
12586
12931
  tooltip,
12587
12932
  ...props
12588
12933
  }) => {
12589
- const [hasTruncation, setHasTruncation] = useState18(false);
12590
- const headingRef = useRef11(null);
12934
+ const [hasTruncation, setHasTruncation] = useState21(false);
12935
+ const headingRef = useRef12(null);
12591
12936
  const onStopPropagation = (e) => {
12592
12937
  e.stopPropagation();
12593
12938
  };
@@ -13073,8 +13418,8 @@ function Pagination({
13073
13418
  }
13074
13419
 
13075
13420
  // src/components/ParameterInputs/hooks/ParameterShellContext.tsx
13076
- import { createContext as createContext5, useContext as useContext5 } from "react";
13077
- var ParameterShellContext = createContext5({
13421
+ import { createContext as createContext8, useContext as useContext8 } from "react";
13422
+ var ParameterShellContext = createContext8({
13078
13423
  id: "",
13079
13424
  label: "",
13080
13425
  hiddenLabel: void 0,
@@ -13083,7 +13428,7 @@ var ParameterShellContext = createContext5({
13083
13428
  }
13084
13429
  });
13085
13430
  var useParameterShell = () => {
13086
- const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useContext5(ParameterShellContext);
13431
+ const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useContext8(ParameterShellContext);
13087
13432
  return {
13088
13433
  id,
13089
13434
  label: label2,
@@ -13159,7 +13504,7 @@ var LabelLeadingIcon = ({
13159
13504
  };
13160
13505
 
13161
13506
  // src/components/ParameterInputs/ParameterActionButton.tsx
13162
- import React17 from "react";
13507
+ import React19 from "react";
13163
13508
 
13164
13509
  // src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
13165
13510
  import { css as css94 } from "@emotion/react";
@@ -13263,7 +13608,7 @@ var ParameterActionButton = ({
13263
13608
  children
13264
13609
  }
13265
13610
  );
13266
- if (tooltip && (typeof tooltip === "string" || React17.isValidElement(tooltip))) {
13611
+ if (tooltip && (typeof tooltip === "string" || React19.isValidElement(tooltip))) {
13267
13612
  return /* @__PURE__ */ jsx124(Tooltip, { title: tooltip, ...tooltipProps, children: buttonElement });
13268
13613
  }
13269
13614
  return buttonElement;
@@ -13303,7 +13648,7 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
13303
13648
  };
13304
13649
 
13305
13650
  // src/components/ParameterInputs/ParameterGroup.tsx
13306
- import { forwardRef as forwardRef21 } from "react";
13651
+ import { forwardRef as forwardRef23 } from "react";
13307
13652
 
13308
13653
  // src/components/ParameterInputs/styles/ParameterGroup.styles.ts
13309
13654
  import { css as css96 } from "@emotion/react";
@@ -13331,7 +13676,7 @@ var fieldsetLegend2 = css96`
13331
13676
 
13332
13677
  // src/components/ParameterInputs/ParameterGroup.tsx
13333
13678
  import { jsx as jsx126, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
13334
- var ParameterGroup = forwardRef21(
13679
+ var ParameterGroup = forwardRef23(
13335
13680
  ({ legend, isDisabled, children, ...props }, ref) => {
13336
13681
  return /* @__PURE__ */ jsxs85("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
13337
13682
  /* @__PURE__ */ jsx126("legend", { css: fieldsetLegend2, children: legend }),
@@ -13341,10 +13686,10 @@ var ParameterGroup = forwardRef21(
13341
13686
  );
13342
13687
 
13343
13688
  // src/components/ParameterInputs/ParameterImage.tsx
13344
- import { forwardRef as forwardRef23, useDeferredValue } from "react";
13689
+ import { forwardRef as forwardRef25, useDeferredValue } from "react";
13345
13690
 
13346
13691
  // src/components/ParameterInputs/ParameterImagePreview.tsx
13347
- import { useState as useState19 } from "react";
13692
+ import { useState as useState22 } from "react";
13348
13693
  import { createPortal as createPortal2 } from "react-dom";
13349
13694
 
13350
13695
  // src/components/ParameterInputs/styles/ParameterImage.styles.ts
@@ -13385,9 +13730,9 @@ var previewModalImage = css97`
13385
13730
  `;
13386
13731
 
13387
13732
  // src/components/ParameterInputs/ParameterImagePreview.tsx
13388
- import { Fragment as Fragment13, jsx as jsx127, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
13733
+ import { Fragment as Fragment14, jsx as jsx127, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
13389
13734
  function ParameterImagePreview({ imageSrc }) {
13390
- const [showModal, setShowModal] = useState19(false);
13735
+ const [showModal, setShowModal] = useState22(false);
13391
13736
  return imageSrc ? /* @__PURE__ */ jsxs86("div", { css: previewWrapper, children: [
13392
13737
  /* @__PURE__ */ jsx127(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
13393
13738
  /* @__PURE__ */ jsx127(
@@ -13404,7 +13749,7 @@ function ParameterImagePreview({ imageSrc }) {
13404
13749
  ] }) : null;
13405
13750
  }
13406
13751
  var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
13407
- return open ? /* @__PURE__ */ jsx127(Fragment13, { children: createPortal2(
13752
+ return open ? /* @__PURE__ */ jsx127(Fragment14, { children: createPortal2(
13408
13753
  /* @__PURE__ */ jsx127(
13409
13754
  Modal,
13410
13755
  {
@@ -13420,7 +13765,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
13420
13765
 
13421
13766
  // src/components/ParameterInputs/ParameterShell.tsx
13422
13767
  import { css as css100 } from "@emotion/react";
13423
- import { useState as useState20 } from "react";
13768
+ import { useState as useState23 } from "react";
13424
13769
 
13425
13770
  // src/components/ParameterInputs/styles/ParameterInput.styles.ts
13426
13771
  import { css as css98 } from "@emotion/react";
@@ -13758,9 +14103,9 @@ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
13758
14103
  };
13759
14104
 
13760
14105
  // src/components/ParameterInputs/ParameterMenuButton.tsx
13761
- import { forwardRef as forwardRef22 } from "react";
14106
+ import { forwardRef as forwardRef24 } from "react";
13762
14107
  import { jsx as jsx129 } from "@emotion/react/jsx-runtime";
13763
- var ParameterMenuButton = forwardRef22(
14108
+ var ParameterMenuButton = forwardRef24(
13764
14109
  ({ label: label2, children, disabled: disabled2, withoutPortal }, ref) => {
13765
14110
  return /* @__PURE__ */ jsx129(
13766
14111
  Menu,
@@ -13874,7 +14219,7 @@ var ParameterShell = ({
13874
14219
  menuWithoutPortal,
13875
14220
  ...props
13876
14221
  }) => {
13877
- const [manualErrorMessage, setManualErrorMessage] = useState20(void 0);
14222
+ const [manualErrorMessage, setManualErrorMessage] = useState23(void 0);
13878
14223
  const setErrorMessage = (message) => setManualErrorMessage(message);
13879
14224
  const errorMessaging = errorMessage || manualErrorMessage;
13880
14225
  return /* @__PURE__ */ jsxs87("div", { css: inputContainer2, ...props, id, children: [
@@ -13928,7 +14273,7 @@ var ParameterShell = ({
13928
14273
  ParameterOverrideMarker,
13929
14274
  {
13930
14275
  onClick: onResetOverriddenValue,
13931
- tooltipProps: { portal: !menuWithoutPortal }
14276
+ tooltipProps: { withoutPortal: menuWithoutPortal }
13932
14277
  }
13933
14278
  ) : null
13934
14279
  ] })
@@ -13954,8 +14299,8 @@ var ParameterShellPlaceholder = ({ children }) => {
13954
14299
  var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx130(Tooltip, { title: "The default value has been overridden", ...props.tooltipProps, children: /* @__PURE__ */ jsx130("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx130("span", { hidden: true, children: "reset overridden value to default" }) }) });
13955
14300
 
13956
14301
  // src/components/ParameterInputs/ParameterImage.tsx
13957
- import { Fragment as Fragment14, jsx as jsx131, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
13958
- var ParameterImage = forwardRef23(
14302
+ import { Fragment as Fragment15, jsx as jsx131, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
14303
+ var ParameterImage = forwardRef25(
13959
14304
  ({ children, ...props }, ref) => {
13960
14305
  const { shellProps, innerProps } = extractParameterProps(props);
13961
14306
  return /* @__PURE__ */ jsxs88(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
@@ -13964,11 +14309,11 @@ var ParameterImage = forwardRef23(
13964
14309
  ] });
13965
14310
  }
13966
14311
  );
13967
- var ParameterImageInner = forwardRef23((props, ref) => {
14312
+ var ParameterImageInner = forwardRef25((props, ref) => {
13968
14313
  const { value } = props;
13969
14314
  const { id, label: label2, hiddenLabel, errorMessage } = useParameterShell();
13970
14315
  const deferredValue = useDeferredValue(value);
13971
- return /* @__PURE__ */ jsxs88(Fragment14, { children: [
14316
+ return /* @__PURE__ */ jsxs88(Fragment15, { children: [
13972
14317
  /* @__PURE__ */ jsx131(
13973
14318
  "input",
13974
14319
  {
@@ -13986,13 +14331,13 @@ var ParameterImageInner = forwardRef23((props, ref) => {
13986
14331
  });
13987
14332
 
13988
14333
  // src/components/ParameterInputs/ParameterInput.tsx
13989
- import { forwardRef as forwardRef24 } from "react";
14334
+ import { forwardRef as forwardRef26 } from "react";
13990
14335
  import { jsx as jsx132 } from "@emotion/react/jsx-runtime";
13991
- var ParameterInput = forwardRef24((props, ref) => {
14336
+ var ParameterInput = forwardRef26((props, ref) => {
13992
14337
  const { shellProps, innerProps } = extractParameterProps(props);
13993
14338
  return /* @__PURE__ */ jsx132(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ jsx132(ParameterInputInner, { ref, ...innerProps }) });
13994
14339
  });
13995
- var ParameterInputInner = forwardRef24(({ enableMouseWheel = false, ...props }, ref) => {
14340
+ var ParameterInputInner = forwardRef26(({ enableMouseWheel = false, ...props }, ref) => {
13996
14341
  const { id, label: label2, hiddenLabel } = useParameterShell();
13997
14342
  const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
13998
14343
  return /* @__PURE__ */ jsx132(
@@ -14011,7 +14356,7 @@ var ParameterInputInner = forwardRef24(({ enableMouseWheel = false, ...props },
14011
14356
  });
14012
14357
 
14013
14358
  // src/components/ParameterInputs/ParameterLabels.tsx
14014
- import { useMemo as useMemo7, useRef as useRef12 } from "react";
14359
+ import { useMemo as useMemo8, useRef as useRef13 } from "react";
14015
14360
  import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
14016
14361
  var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
14017
14362
  const { shellProps, innerProps } = extractParameterProps(props);
@@ -14073,18 +14418,18 @@ var ParameterLabelsInner = (props) => {
14073
14418
  var _a;
14074
14419
  const { label: label2 } = useParameterShell();
14075
14420
  const { onChange } = props;
14076
- const containerRef = useRef12(null);
14077
- const hasPositionedRef = useRef12(false);
14078
- const selectedValues = useMemo7(
14421
+ const containerRef = useRef13(null);
14422
+ const hasPositionedRef = useRef13(false);
14423
+ const selectedValues = useMemo8(
14079
14424
  () => {
14080
14425
  var _a2, _b;
14081
14426
  return (_b = (_a2 = props.value) != null ? _a2 : props.defaultValue) != null ? _b : [];
14082
14427
  },
14083
14428
  [props.value, props.defaultValue]
14084
14429
  );
14085
- const items = useMemo7(() => convertOptionsToItems(props.options), [props.options]);
14086
- const optionsMap = useMemo7(() => createOptionsMap(props.options), [props.options]);
14087
- const selectedIds = useMemo7(() => {
14430
+ const items = useMemo8(() => convertOptionsToItems(props.options), [props.options]);
14431
+ const optionsMap = useMemo8(() => createOptionsMap(props.options), [props.options]);
14432
+ const selectedIds = useMemo8(() => {
14088
14433
  if (!Array.isArray(selectedValues)) {
14089
14434
  return /* @__PURE__ */ new Set();
14090
14435
  }
@@ -14147,11 +14492,12 @@ var ParameterLabelsInner = (props) => {
14147
14492
  hasPositionedRef.current = false;
14148
14493
  (_a2 = props.onClose) == null ? void 0 : _a2.call(props);
14149
14494
  },
14150
- menuGetAnchorRect: () => {
14495
+ menuGetAnchorRect: containerRef.current && // when no labels are selected, we use default positioning
14496
+ selectedIds.size !== 0 ? () => {
14151
14497
  var _a2;
14152
14498
  const rect = (_a2 = containerRef.current) == null ? void 0 : _a2.getBoundingClientRect();
14153
- if (!rect || selectedIds.size === 0) {
14154
- return null;
14499
+ if (!rect) {
14500
+ return {};
14155
14501
  }
14156
14502
  return {
14157
14503
  x: rect.left,
@@ -14159,7 +14505,7 @@ var ParameterLabelsInner = (props) => {
14159
14505
  width: 0,
14160
14506
  height: rect.height
14161
14507
  };
14162
- },
14508
+ } : null,
14163
14509
  menuUpdatePosition: ({ updatePosition }) => {
14164
14510
  if (!hasPositionedRef.current) {
14165
14511
  hasPositionedRef.current = true;
@@ -14174,9 +14520,9 @@ var ParameterLabelsInner = (props) => {
14174
14520
  };
14175
14521
 
14176
14522
  // src/components/ParameterInputs/ParameterLink.tsx
14177
- import { forwardRef as forwardRef25 } from "react";
14523
+ import { forwardRef as forwardRef27 } from "react";
14178
14524
  import { jsx as jsx134, jsxs as jsxs89 } from "@emotion/react/jsx-runtime";
14179
- var ParameterLink = forwardRef25(
14525
+ var ParameterLink = forwardRef27(
14180
14526
  ({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
14181
14527
  const { shellProps, innerProps } = extractParameterProps(props);
14182
14528
  return /* @__PURE__ */ jsx134(
@@ -14200,7 +14546,7 @@ var ParameterLink = forwardRef25(
14200
14546
  );
14201
14547
  }
14202
14548
  );
14203
- var ParameterLinkInner = forwardRef25(
14549
+ var ParameterLinkInner = forwardRef27(
14204
14550
  ({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
14205
14551
  const { id, label: label2, hiddenLabel } = useParameterShell();
14206
14552
  if (!props.value)
@@ -14306,7 +14652,7 @@ var ParameterMultiSelectInner = (props) => {
14306
14652
  };
14307
14653
 
14308
14654
  // src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
14309
- import { Fragment as Fragment15, jsx as jsx136, jsxs as jsxs90 } from "@emotion/react/jsx-runtime";
14655
+ import { Fragment as Fragment16, jsx as jsx136, jsxs as jsxs90 } from "@emotion/react/jsx-runtime";
14310
14656
  var ParameterNameAndPublicIdInput = ({
14311
14657
  id,
14312
14658
  onBlur,
@@ -14332,7 +14678,7 @@ var ParameterNameAndPublicIdInput = ({
14332
14678
  navigator.clipboard.writeText(values[publicIdFieldName]);
14333
14679
  };
14334
14680
  autoFocus == null ? void 0 : autoFocus();
14335
- return /* @__PURE__ */ jsxs90(Fragment15, { children: [
14681
+ return /* @__PURE__ */ jsxs90(Fragment16, { children: [
14336
14682
  /* @__PURE__ */ jsx136(
14337
14683
  ParameterInput,
14338
14684
  {
@@ -14383,13 +14729,13 @@ var ParameterNameAndPublicIdInput = ({
14383
14729
  };
14384
14730
 
14385
14731
  // src/components/ParameterInputs/ParameterNumberSlider.tsx
14386
- import { forwardRef as forwardRef27 } from "react";
14732
+ import { forwardRef as forwardRef29 } from "react";
14387
14733
 
14388
14734
  // src/components/Slider/Slider.tsx
14389
- import { forwardRef as forwardRef26, useCallback as useCallback10, useMemo as useMemo8 } from "react";
14735
+ import { forwardRef as forwardRef28, useCallback as useCallback12, useMemo as useMemo9 } from "react";
14390
14736
 
14391
14737
  // src/components/Slider/SliderLabels.tsx
14392
- import { useEffect as useEffect18, useRef as useRef13, useState as useState21 } from "react";
14738
+ import { useEffect as useEffect18, useRef as useRef14, useState as useState24 } from "react";
14393
14739
 
14394
14740
  // src/components/Slider/styles/Slider.styles.ts
14395
14741
  import { css as css101 } from "@emotion/react";
@@ -14814,8 +15160,8 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
14814
15160
  }));
14815
15161
  }
14816
15162
  function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
14817
- const containerRef = useRef13(null);
14818
- const [measuredWidth, setMeasuredWidth] = useState21(containerWidth);
15163
+ const containerRef = useRef14(null);
15164
+ const [measuredWidth, setMeasuredWidth] = useState24(containerWidth);
14819
15165
  useEffect18(() => {
14820
15166
  if (containerRef.current) {
14821
15167
  const resizeObserver = new ResizeObserver((entries) => {
@@ -14853,7 +15199,7 @@ function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
14853
15199
 
14854
15200
  // src/components/Slider/Slider.tsx
14855
15201
  import { jsx as jsx138, jsxs as jsxs91 } from "@emotion/react/jsx-runtime";
14856
- var Slider = forwardRef26(
15202
+ var Slider = forwardRef28(
14857
15203
  ({
14858
15204
  value,
14859
15205
  onChange,
@@ -14870,7 +15216,7 @@ var Slider = forwardRef26(
14870
15216
  name
14871
15217
  }, ref) => {
14872
15218
  const isOptionsMode = Boolean(options && options.length > 0);
14873
- const { min, max, step, smallTicks, largeTicks } = useMemo8(() => {
15219
+ const { min, max, step, smallTicks, largeTicks } = useMemo9(() => {
14874
15220
  if (isOptionsMode && options) {
14875
15221
  if (options.length === 0) {
14876
15222
  return {
@@ -14948,14 +15294,14 @@ var Slider = forwardRef26(
14948
15294
  }, [isOptionsMode, options, propMin, propMax, propStep]);
14949
15295
  const isValueUnset = value === void 0 || value === null || typeof value === "number" && isNaN(value);
14950
15296
  const clampedValue = isValueUnset ? min : Math.min(Math.max(value, min), max);
14951
- const handleSliderChange = useCallback10(
15297
+ const handleSliderChange = useCallback12(
14952
15298
  (event) => {
14953
15299
  const newValue = Number(event.target.value);
14954
15300
  onChange(newValue);
14955
15301
  },
14956
15302
  [onChange]
14957
15303
  );
14958
- const handleNumberInputChange = useCallback10(
15304
+ const handleNumberInputChange = useCallback12(
14959
15305
  (event) => {
14960
15306
  if (event.target.value === "") {
14961
15307
  onChange(void 0);
@@ -15028,13 +15374,13 @@ Slider.displayName = "Slider";
15028
15374
 
15029
15375
  // src/components/ParameterInputs/ParameterNumberSlider.tsx
15030
15376
  import { jsx as jsx139 } from "@emotion/react/jsx-runtime";
15031
- var ParameterNumberSlider = forwardRef27(
15377
+ var ParameterNumberSlider = forwardRef29(
15032
15378
  (props, ref) => {
15033
15379
  const { shellProps, innerProps } = extractParameterProps(props);
15034
15380
  return /* @__PURE__ */ jsx139(ParameterShell, { "data-testid": "parameter-number-slider", ...shellProps, children: /* @__PURE__ */ jsx139(ParameterNumberSliderInner, { ref, ...innerProps }) });
15035
15381
  }
15036
15382
  );
15037
- var ParameterNumberSliderInner = forwardRef27(({ ...props }, ref) => {
15383
+ var ParameterNumberSliderInner = forwardRef29(({ ...props }, ref) => {
15038
15384
  const { id, label: label2, hiddenLabel } = useParameterShell();
15039
15385
  return /* @__PURE__ */ jsx139(
15040
15386
  Slider,
@@ -15194,7 +15540,7 @@ var defaultParameterConfiguration = {
15194
15540
  // src/components/ParameterInputs/ParameterRichText.tsx
15195
15541
  import { deepEqual as deepEqual2 } from "fast-equals";
15196
15542
  import { ParagraphNode as ParagraphNode2 } from "lexical";
15197
- import { useEffect as useEffect27, useState as useState27 } from "react";
15543
+ import { useEffect as useEffect27, useState as useState30 } from "react";
15198
15544
 
15199
15545
  // src/components/ParameterInputs/rich-text/CustomCodeNode.ts
15200
15546
  import { CodeNode } from "@lexical/code";
@@ -15551,7 +15897,7 @@ import {
15551
15897
  FOCUS_COMMAND,
15552
15898
  PASTE_COMMAND
15553
15899
  } from "lexical";
15554
- import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef14, useState as useState22 } from "react";
15900
+ import { useCallback as useCallback13, useEffect as useEffect21, useRef as useRef15, useState as useState25 } from "react";
15555
15901
 
15556
15902
  // src/components/ParameterInputs/rich-text/utils.ts
15557
15903
  import { $isAtNodeEnd } from "@lexical/selection";
@@ -15611,7 +15957,7 @@ var normalizeStateForDeepEqualComparison = (editorState) => {
15611
15957
  };
15612
15958
 
15613
15959
  // src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
15614
- import { Fragment as Fragment16, jsx as jsx140, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
15960
+ import { Fragment as Fragment17, jsx as jsx140, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
15615
15961
  var isProjectMapLinkValue = (value) => {
15616
15962
  return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
15617
15963
  value.nodeId && value.path && value.projectMapId
@@ -15924,10 +16270,10 @@ function LinkNodePlugin({
15924
16270
  return path;
15925
16271
  };
15926
16272
  const [editor] = useLexicalComposerContext3();
15927
- const [linkPopoverState, setLinkPopoverState] = useState22();
15928
- const linkPopoverElRef = useRef14(null);
15929
- const [isEditorFocused, setIsEditorFocused] = useState22(false);
15930
- const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState22(false);
16273
+ const [linkPopoverState, setLinkPopoverState] = useState25();
16274
+ const linkPopoverElRef = useRef15(null);
16275
+ const [isEditorFocused, setIsEditorFocused] = useState25(false);
16276
+ const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState25(false);
15931
16277
  useEffect21(() => {
15932
16278
  if (!isEditorFocused && !isLinkPopoverFocused) {
15933
16279
  setLinkPopoverState(void 0);
@@ -16038,7 +16384,7 @@ function LinkNodePlugin({
16038
16384
  )
16039
16385
  );
16040
16386
  }, [editor, onConnectLink]);
16041
- const maybeShowLinkToolbar = useCallback11(() => {
16387
+ const maybeShowLinkToolbar = useCallback13(() => {
16042
16388
  if (!editor.isEditable()) {
16043
16389
  return;
16044
16390
  }
@@ -16099,7 +16445,7 @@ function LinkNodePlugin({
16099
16445
  });
16100
16446
  });
16101
16447
  };
16102
- return /* @__PURE__ */ jsxs92(Fragment16, { children: [
16448
+ return /* @__PURE__ */ jsxs92(Fragment17, { children: [
16103
16449
  /* @__PURE__ */ jsx140(
16104
16450
  NodeEventPlugin,
16105
16451
  {
@@ -16176,7 +16522,7 @@ import {
16176
16522
  OUTDENT_CONTENT_COMMAND,
16177
16523
  SELECTION_CHANGE_COMMAND
16178
16524
  } from "lexical";
16179
- import { useEffect as useEffect22, useRef as useRef15 } from "react";
16525
+ import { useEffect as useEffect22, useRef as useRef16 } from "react";
16180
16526
  function isIndentPermitted(maxDepth) {
16181
16527
  const selection = $getSelection2();
16182
16528
  if (!$isRangeSelection2(selection)) {
@@ -16231,7 +16577,7 @@ function $indentOverTab(selection) {
16231
16577
  }
16232
16578
  function ListIndentPlugin({ maxDepth }) {
16233
16579
  const [editor] = useLexicalComposerContext4();
16234
- const isInListItemNode = useRef15(false);
16580
+ const isInListItemNode = useRef16(false);
16235
16581
  useEffect22(() => {
16236
16582
  return editor.registerCommand(
16237
16583
  SELECTION_CHANGE_COMMAND,
@@ -16298,7 +16644,7 @@ import {
16298
16644
  TableCellNode
16299
16645
  } from "@lexical/table";
16300
16646
  import { $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3, $setSelection } from "lexical";
16301
- import { forwardRef as forwardRef28, useCallback as useCallback12, useEffect as useEffect23, useLayoutEffect, useState as useState23 } from "react";
16647
+ import { forwardRef as forwardRef30, useCallback as useCallback14, useEffect as useEffect23, useLayoutEffect, useState as useState26 } from "react";
16302
16648
  import { jsx as jsx141, jsxs as jsxs93 } from "@emotion/react/jsx-runtime";
16303
16649
  function computeSelectionCount(selection) {
16304
16650
  const selectionShape = selection.getShape();
@@ -16311,9 +16657,9 @@ var tableActionMenuTrigger = css104`
16311
16657
  position: absolute;
16312
16658
  transform: translate(calc(-100% - 1px), 1px);
16313
16659
  `;
16314
- var TableActionMenuTrigger = forwardRef28((props, ref) => {
16660
+ var TableActionMenuTrigger = forwardRef30((props, ref) => {
16315
16661
  const { tableCellEl, positioningAnchorEl, ...rest } = props;
16316
- const [coordinates, setCoordinates] = useState23({ x: 0, y: 0 });
16662
+ const [coordinates, setCoordinates] = useState26({ x: 0, y: 0 });
16317
16663
  useLayoutEffect(() => {
16318
16664
  const rect = tableCellEl.getBoundingClientRect();
16319
16665
  const parentRect = positioningAnchorEl.getBoundingClientRect();
@@ -16347,12 +16693,12 @@ function TableActionMenu({
16347
16693
  positioningAnchorEl
16348
16694
  }) {
16349
16695
  const [editor] = useLexicalComposerContext5();
16350
- const [tableCellNode, updateTableCellNode] = useState23(_tableCellNode);
16351
- const [selectionCounts, updateSelectionCounts] = useState23({
16696
+ const [tableCellNode, updateTableCellNode] = useState26(_tableCellNode);
16697
+ const [selectionCounts, updateSelectionCounts] = useState26({
16352
16698
  columns: 1,
16353
16699
  rows: 1
16354
16700
  });
16355
- const [menuTriggerKey, setMenuTriggerKey] = useState23(0);
16701
+ const [menuTriggerKey, setMenuTriggerKey] = useState26(0);
16356
16702
  const incrementMenuTriggerKey = () => {
16357
16703
  setMenuTriggerKey((key) => key += 1);
16358
16704
  };
@@ -16378,7 +16724,7 @@ function TableActionMenu({
16378
16724
  }
16379
16725
  });
16380
16726
  }, [editor]);
16381
- const clearTableSelection = useCallback12(() => {
16727
+ const clearTableSelection = useCallback14(() => {
16382
16728
  editor.update(() => {
16383
16729
  if (tableCellNode.isAttached()) {
16384
16730
  const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
@@ -16395,7 +16741,7 @@ function TableActionMenu({
16395
16741
  $setSelection(null);
16396
16742
  });
16397
16743
  }, [editor, tableCellNode]);
16398
- const insertTableRowAtSelection = useCallback12(
16744
+ const insertTableRowAtSelection = useCallback14(
16399
16745
  (shouldInsertAfter) => {
16400
16746
  editor.update(() => {
16401
16747
  for (let i = 0; i < selectionCounts.rows; i++) {
@@ -16405,7 +16751,7 @@ function TableActionMenu({
16405
16751
  },
16406
16752
  [editor, selectionCounts.rows]
16407
16753
  );
16408
- const insertTableColumnAtSelection = useCallback12(
16754
+ const insertTableColumnAtSelection = useCallback14(
16409
16755
  (shouldInsertAfter) => {
16410
16756
  editor.update(() => {
16411
16757
  for (let i = 0; i < selectionCounts.columns; i++) {
@@ -16415,26 +16761,26 @@ function TableActionMenu({
16415
16761
  },
16416
16762
  [editor, selectionCounts.columns]
16417
16763
  );
16418
- const deleteTableRowAtSelection = useCallback12(() => {
16764
+ const deleteTableRowAtSelection = useCallback14(() => {
16419
16765
  editor.update(() => {
16420
16766
  $deleteTableRowAtSelection();
16421
16767
  });
16422
16768
  incrementMenuTriggerKey();
16423
16769
  }, [editor]);
16424
- const deleteTableAtSelection = useCallback12(() => {
16770
+ const deleteTableAtSelection = useCallback14(() => {
16425
16771
  editor.update(() => {
16426
16772
  const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
16427
16773
  tableNode.remove();
16428
16774
  clearTableSelection();
16429
16775
  });
16430
16776
  }, [editor, tableCellNode, clearTableSelection]);
16431
- const deleteTableColumnAtSelection = useCallback12(() => {
16777
+ const deleteTableColumnAtSelection = useCallback14(() => {
16432
16778
  editor.update(() => {
16433
16779
  $deleteTableColumnAtSelection();
16434
16780
  });
16435
16781
  incrementMenuTriggerKey();
16436
16782
  }, [editor]);
16437
- const toggleTableRowIsHeader = useCallback12(() => {
16783
+ const toggleTableRowIsHeader = useCallback14(() => {
16438
16784
  editor.update(() => {
16439
16785
  const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
16440
16786
  const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
@@ -16454,7 +16800,7 @@ function TableActionMenu({
16454
16800
  clearTableSelection();
16455
16801
  });
16456
16802
  }, [editor, tableCellNode, clearTableSelection]);
16457
- const toggleTableColumnIsHeader = useCallback12(() => {
16803
+ const toggleTableColumnIsHeader = useCallback14(() => {
16458
16804
  editor.update(() => {
16459
16805
  const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
16460
16806
  const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
@@ -16545,9 +16891,9 @@ function TableCellActionMenuContainer({
16545
16891
  positioningAnchorEl
16546
16892
  }) {
16547
16893
  const [editor] = useLexicalComposerContext5();
16548
- const [tableCellNode, setTableMenuCellNode] = useState23(null);
16549
- const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState23(null);
16550
- const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState23(null);
16894
+ const [tableCellNode, setTableMenuCellNode] = useState26(null);
16895
+ const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState26(null);
16896
+ const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState26(null);
16551
16897
  useEffect23(() => {
16552
16898
  const newPortalEl = document.createElement("div");
16553
16899
  setTableMenuCellMenuPortalEl(newPortalEl);
@@ -16556,14 +16902,14 @@ function TableCellActionMenuContainer({
16556
16902
  newPortalEl.remove();
16557
16903
  };
16558
16904
  }, [menuPortalEl]);
16559
- const setTableMenuCellNodeElem = useCallback12((elem) => {
16905
+ const setTableMenuCellNodeElem = useCallback14((elem) => {
16560
16906
  if (elem) {
16561
16907
  _setTableMenuCellNodeEl(elem);
16562
16908
  } else {
16563
16909
  _setTableMenuCellNodeEl(null);
16564
16910
  }
16565
16911
  }, []);
16566
- const $moveMenu = useCallback12(() => {
16912
+ const $moveMenu = useCallback14(() => {
16567
16913
  const selection = $getSelection3();
16568
16914
  const nativeSelection = window.getSelection();
16569
16915
  const activeElement = document.activeElement;
@@ -16631,9 +16977,9 @@ import {
16631
16977
  } from "@lexical/table";
16632
16978
  import { calculateZoomLevel } from "@lexical/utils";
16633
16979
  import { $getNearestNodeFromDOMNode } from "lexical";
16634
- import { useCallback as useCallback13, useEffect as useEffect24, useMemo as useMemo9, useRef as useRef16, useState as useState24 } from "react";
16980
+ import { useCallback as useCallback15, useEffect as useEffect24, useMemo as useMemo10, useRef as useRef17, useState as useState27 } from "react";
16635
16981
  import { createPortal as createPortal3 } from "react-dom";
16636
- import { Fragment as Fragment17, jsx as jsx142, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
16982
+ import { Fragment as Fragment18, jsx as jsx142, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
16637
16983
  var MIN_ROW_HEIGHT = 33;
16638
16984
  var MIN_COLUMN_WIDTH = 50;
16639
16985
  var tableResizer = css105`
@@ -16658,15 +17004,15 @@ var fixedGetDOMCellFromTarget = (node) => {
16658
17004
  return null;
16659
17005
  };
16660
17006
  function TableCellResizer({ editor, positioningAnchorEl }) {
16661
- const targetRef = useRef16(null);
16662
- const resizerRef = useRef16(null);
16663
- const tableRectRef = useRef16(null);
16664
- const mouseStartPosRef = useRef16(null);
16665
- const [mouseCurrentPos, updateMouseCurrentPos] = useState24(null);
16666
- const [activeCell, updateActiveCell] = useState24(null);
16667
- const [isMouseDown, updateIsMouseDown] = useState24(false);
16668
- const [draggingDirection, updateDraggingDirection] = useState24(null);
16669
- const resetState = useCallback13(() => {
17007
+ const targetRef = useRef17(null);
17008
+ const resizerRef = useRef17(null);
17009
+ const tableRectRef = useRef17(null);
17010
+ const mouseStartPosRef = useRef17(null);
17011
+ const [mouseCurrentPos, updateMouseCurrentPos] = useState27(null);
17012
+ const [activeCell, updateActiveCell] = useState27(null);
17013
+ const [isMouseDown, updateIsMouseDown] = useState27(false);
17014
+ const [draggingDirection, updateDraggingDirection] = useState27(null);
17015
+ const resetState = useCallback15(() => {
16670
17016
  updateActiveCell(null);
16671
17017
  targetRef.current = null;
16672
17018
  updateDraggingDirection(null);
@@ -16743,7 +17089,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16743
17089
  }
16744
17090
  return false;
16745
17091
  };
16746
- const updateRowHeight = useCallback13(
17092
+ const updateRowHeight = useCallback15(
16747
17093
  (heightChange) => {
16748
17094
  if (!activeCell) {
16749
17095
  throw new Error("TableCellResizer: Expected active cell.");
@@ -16805,7 +17151,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16805
17151
  }
16806
17152
  }
16807
17153
  };
16808
- const updateColumnWidth = useCallback13(
17154
+ const updateColumnWidth = useCallback15(
16809
17155
  (widthChange) => {
16810
17156
  if (!activeCell) {
16811
17157
  throw new Error("TableCellResizer: Expected active cell.");
@@ -16839,7 +17185,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16839
17185
  },
16840
17186
  [activeCell, editor]
16841
17187
  );
16842
- const mouseUpHandler = useCallback13(
17188
+ const mouseUpHandler = useCallback15(
16843
17189
  (direction) => {
16844
17190
  const handler = (event) => {
16845
17191
  event.preventDefault();
@@ -16868,7 +17214,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16868
17214
  },
16869
17215
  [activeCell, resetState, updateColumnWidth, updateRowHeight]
16870
17216
  );
16871
- const toggleResize = useCallback13(
17217
+ const toggleResize = useCallback15(
16872
17218
  (direction) => (event) => {
16873
17219
  event.preventDefault();
16874
17220
  event.stopPropagation();
@@ -16885,7 +17231,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16885
17231
  },
16886
17232
  [activeCell, mouseUpHandler]
16887
17233
  );
16888
- const getResizers = useCallback13(() => {
17234
+ const getResizers = useCallback15(() => {
16889
17235
  if (activeCell) {
16890
17236
  const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
16891
17237
  const parentRect = positioningAnchorEl.getBoundingClientRect();
@@ -16934,7 +17280,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16934
17280
  };
16935
17281
  }, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
16936
17282
  const resizerStyles = getResizers();
16937
- return /* @__PURE__ */ jsx142("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ jsxs94(Fragment17, { children: [
17283
+ return /* @__PURE__ */ jsx142("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ jsxs94(Fragment18, { children: [
16938
17284
  /* @__PURE__ */ jsx142(
16939
17285
  "div",
16940
17286
  {
@@ -16956,7 +17302,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16956
17302
  function TableCellResizerPlugin({ positioningAnchorEl }) {
16957
17303
  const [editor] = useLexicalComposerContext6();
16958
17304
  const isEditable = useLexicalEditable2();
16959
- return useMemo9(
17305
+ return useMemo10(
16960
17306
  () => isEditable ? createPortal3(
16961
17307
  /* @__PURE__ */ jsx142(TableCellResizer, { editor, positioningAnchorEl }),
16962
17308
  positioningAnchorEl
@@ -16975,10 +17321,10 @@ import {
16975
17321
  COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
16976
17322
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
16977
17323
  } from "lexical";
16978
- import { useEffect as useEffect25, useState as useState25 } from "react";
17324
+ import { useEffect as useEffect25, useState as useState28 } from "react";
16979
17325
  var TableSelectionPlugin = () => {
16980
17326
  const [editor] = useLexicalComposerContext7();
16981
- const [closestTableCellNode, setClosestTableCellNode] = useState25(null);
17327
+ const [closestTableCellNode, setClosestTableCellNode] = useState28(null);
16982
17328
  useEffect25(() => {
16983
17329
  return editor.registerCommand(
16984
17330
  SELECTION_CHANGE_COMMAND2,
@@ -17048,7 +17394,7 @@ import {
17048
17394
  FORMAT_TEXT_COMMAND,
17049
17395
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3
17050
17396
  } from "lexical";
17051
- import { useCallback as useCallback14, useEffect as useEffect26 } from "react";
17397
+ import { useCallback as useCallback16, useEffect as useEffect26 } from "react";
17052
17398
 
17053
17399
  // src/components/ParameterInputs/rich-text/toolbar/constants.ts
17054
17400
  var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
@@ -17064,29 +17410,29 @@ var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
17064
17410
  var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
17065
17411
 
17066
17412
  // src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
17067
- import { useMemo as useMemo10, useState as useState26 } from "react";
17413
+ import { useMemo as useMemo11, useState as useState29 } from "react";
17068
17414
  var useRichTextToolbarState = ({ config }) => {
17069
17415
  var _a;
17070
- const enabledBuiltInFormats = useMemo10(() => {
17416
+ const enabledBuiltInFormats = useMemo11(() => {
17071
17417
  return richTextBuiltInFormats.filter((format) => {
17072
17418
  var _a2, _b;
17073
17419
  return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
17074
17420
  });
17075
17421
  }, [config]);
17076
- const enabledBuiltInElements = useMemo10(() => {
17422
+ const enabledBuiltInElements = useMemo11(() => {
17077
17423
  return richTextBuiltInElements.filter((element) => {
17078
17424
  var _a2, _b;
17079
17425
  return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
17080
17426
  });
17081
17427
  }, [config]);
17082
- const enabledBuiltInFormatsWithIcon = useMemo10(() => {
17428
+ const enabledBuiltInFormatsWithIcon = useMemo11(() => {
17083
17429
  return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
17084
17430
  }, [enabledBuiltInFormats]);
17085
17431
  const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
17086
17432
  (format) => !FORMATS_WITH_ICON.has(format.type)
17087
17433
  );
17088
- const [activeFormats, setActiveFormats] = useState26([]);
17089
- const visibleFormatsWithIcon = useMemo10(() => {
17434
+ const [activeFormats, setActiveFormats] = useState29([]);
17435
+ const visibleFormatsWithIcon = useMemo11(() => {
17090
17436
  const visibleFormats = /* @__PURE__ */ new Set();
17091
17437
  activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
17092
17438
  visibleFormats.add(type);
@@ -17096,7 +17442,7 @@ var useRichTextToolbarState = ({ config }) => {
17096
17442
  });
17097
17443
  return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
17098
17444
  }, [activeFormats, enabledBuiltInFormatsWithIcon]);
17099
- const visibleFormatsWithoutIcon = useMemo10(() => {
17445
+ const visibleFormatsWithoutIcon = useMemo11(() => {
17100
17446
  const visibleFormats = /* @__PURE__ */ new Set();
17101
17447
  activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
17102
17448
  visibleFormats.add(type);
@@ -17106,11 +17452,11 @@ var useRichTextToolbarState = ({ config }) => {
17106
17452
  });
17107
17453
  return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
17108
17454
  }, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
17109
- const [activeElement, setActiveElement] = useState26("paragraph");
17455
+ const [activeElement, setActiveElement] = useState29("paragraph");
17110
17456
  const enabledTextualElements = enabledBuiltInElements.filter(
17111
17457
  (element) => TEXTUAL_ELEMENTS.includes(element.type)
17112
17458
  );
17113
- const visibleTextualElements = useMemo10(() => {
17459
+ const visibleTextualElements = useMemo11(() => {
17114
17460
  if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
17115
17461
  return enabledTextualElements;
17116
17462
  }
@@ -17121,30 +17467,30 @@ var useRichTextToolbarState = ({ config }) => {
17121
17467
  }
17122
17468
  );
17123
17469
  }, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
17124
- const [isLink, setIsLink] = useState26(false);
17125
- const linkElementVisible = useMemo10(() => {
17470
+ const [isLink, setIsLink] = useState29(false);
17471
+ const linkElementVisible = useMemo11(() => {
17126
17472
  return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
17127
17473
  }, [isLink, enabledBuiltInElements]);
17128
- const visibleLists = useMemo10(() => {
17474
+ const visibleLists = useMemo11(() => {
17129
17475
  return new Set(
17130
17476
  ["orderedList", "unorderedList"].filter(
17131
17477
  (type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
17132
17478
  )
17133
17479
  );
17134
17480
  }, [activeElement, enabledBuiltInElements]);
17135
- const quoteElementVisible = useMemo10(() => {
17481
+ const quoteElementVisible = useMemo11(() => {
17136
17482
  return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
17137
17483
  }, [activeElement, enabledBuiltInElements]);
17138
- const codeElementVisible = useMemo10(() => {
17484
+ const codeElementVisible = useMemo11(() => {
17139
17485
  return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
17140
17486
  }, [activeElement, enabledBuiltInElements]);
17141
- const tableElementVisible = useMemo10(() => {
17487
+ const tableElementVisible = useMemo11(() => {
17142
17488
  return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
17143
17489
  }, [activeElement, enabledBuiltInElements]);
17144
- const assetElementVisible = useMemo10(() => {
17490
+ const assetElementVisible = useMemo11(() => {
17145
17491
  return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
17146
17492
  }, [activeElement, enabledBuiltInElements]);
17147
- const visibleElementsWithIcons = useMemo10(() => {
17493
+ const visibleElementsWithIcons = useMemo11(() => {
17148
17494
  const visibleElements = /* @__PURE__ */ new Set();
17149
17495
  if (linkElementVisible) {
17150
17496
  visibleElements.add("link");
@@ -17156,7 +17502,7 @@ var useRichTextToolbarState = ({ config }) => {
17156
17502
  }
17157
17503
  return visibleElements;
17158
17504
  }, [linkElementVisible, visibleLists]);
17159
- const visibleInsertElementsWithIcons = useMemo10(() => {
17505
+ const visibleInsertElementsWithIcons = useMemo11(() => {
17160
17506
  const visibleElements = /* @__PURE__ */ new Set();
17161
17507
  if (quoteElementVisible) {
17162
17508
  visibleElements.add("quote");
@@ -17194,7 +17540,7 @@ var useRichTextToolbarState = ({ config }) => {
17194
17540
  };
17195
17541
 
17196
17542
  // src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
17197
- import { Fragment as Fragment18, jsx as jsx143, jsxs as jsxs95 } from "@emotion/react/jsx-runtime";
17543
+ import { Fragment as Fragment19, jsx as jsx143, jsxs as jsxs95 } from "@emotion/react/jsx-runtime";
17198
17544
  var toolbar = css106`
17199
17545
  ${scrollbarStyles}
17200
17546
  background: var(--gray-50);
@@ -17310,7 +17656,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17310
17656
  });
17311
17657
  });
17312
17658
  };
17313
- const updateToolbar = useCallback14(() => {
17659
+ const updateToolbar = useCallback16(() => {
17314
17660
  const selection = $getSelection5();
17315
17661
  if (!$isRangeSelection5(selection)) {
17316
17662
  return;
@@ -17451,7 +17797,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17451
17797
  children: /* @__PURE__ */ jsx143(RichTextToolbarIcon, { icon: "link" })
17452
17798
  }
17453
17799
  ) }) : null,
17454
- visibleLists.size > 0 ? /* @__PURE__ */ jsxs95(Fragment18, { children: [
17800
+ visibleLists.size > 0 ? /* @__PURE__ */ jsxs95(Fragment19, { children: [
17455
17801
  visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx143(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx143(
17456
17802
  "button",
17457
17803
  {
@@ -17550,7 +17896,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17550
17896
  var RichTextToolbar_default = RichTextToolbar;
17551
17897
 
17552
17898
  // src/components/ParameterInputs/ParameterRichText.tsx
17553
- import { Fragment as Fragment19, jsx as jsx144, jsxs as jsxs96 } from "@emotion/react/jsx-runtime";
17899
+ import { Fragment as Fragment20, jsx as jsx144, jsxs as jsxs96 } from "@emotion/react/jsx-runtime";
17554
17900
  var ParameterRichText = ({
17555
17901
  label: label2,
17556
17902
  labelLeadingIcon,
@@ -17579,7 +17925,7 @@ var ParameterRichText = ({
17579
17925
  menuItems,
17580
17926
  children: [
17581
17927
  /* @__PURE__ */ jsx144(ParameterRichTextInner, { ...innerProps, children }),
17582
- menuItems ? /* @__PURE__ */ jsx144(ParameterMenuButton, { label: `${label2} menu`, children: /* @__PURE__ */ jsx144(Fragment19, { children: menuItems }) }) : null
17928
+ menuItems ? /* @__PURE__ */ jsx144(ParameterMenuButton, { label: `${label2} menu`, children: /* @__PURE__ */ jsx144(Fragment20, { children: menuItems }) }) : null
17583
17929
  ]
17584
17930
  }
17585
17931
  );
@@ -17729,7 +18075,7 @@ var ParameterRichTextInner = ({
17729
18075
  },
17730
18076
  editable: !richTextProps.readOnly
17731
18077
  };
17732
- return /* @__PURE__ */ jsxs96(Fragment19, { children: [
18078
+ return /* @__PURE__ */ jsxs96(Fragment20, { children: [
17733
18079
  /* @__PURE__ */ jsx144("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx144(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx144(RichText, { ...richTextProps, children }) }) }),
17734
18080
  editorFooter ? editorFooter : null
17735
18081
  ] });
@@ -17785,19 +18131,19 @@ var RichText = ({
17785
18131
  useEffect27(() => {
17786
18132
  editor.setEditable(!readOnly);
17787
18133
  }, [editor, readOnly]);
17788
- const [editorContainerRef, setEditorContainerRef] = useState27(null);
18134
+ const [editorContainerRef, setEditorContainerRef] = useState30(null);
17789
18135
  const onEditorContainerRef = (_editorContainerRef) => {
17790
18136
  if (_editorContainerRef !== null) {
17791
18137
  setEditorContainerRef(_editorContainerRef);
17792
18138
  }
17793
18139
  };
17794
- const [portalContainerRef, setPortalContainerRef] = useState27(null);
18140
+ const [portalContainerRef, setPortalContainerRef] = useState30(null);
17795
18141
  const onPortalContainerRef = (_portalContainerRef) => {
17796
18142
  if (_portalContainerRef !== null) {
17797
18143
  setPortalContainerRef(_portalContainerRef);
17798
18144
  }
17799
18145
  };
17800
- return /* @__PURE__ */ jsxs96(Fragment19, { children: [
18146
+ return /* @__PURE__ */ jsxs96(Fragment20, { children: [
17801
18147
  readOnly || minimalInteractivity ? null : /* @__PURE__ */ jsx144(
17802
18148
  RichTextToolbar_default,
17803
18149
  {
@@ -17847,7 +18193,7 @@ var RichText = ({
17847
18193
  ]
17848
18194
  }
17849
18195
  ),
17850
- /* @__PURE__ */ jsx144(Fragment19, { children }),
18196
+ /* @__PURE__ */ jsx144(Fragment20, { children }),
17851
18197
  editorContainerRef ? /* @__PURE__ */ jsx144(
17852
18198
  LinkNodePlugin,
17853
18199
  {
@@ -17868,15 +18214,15 @@ var RichText = ({
17868
18214
  };
17869
18215
 
17870
18216
  // src/components/ParameterInputs/ParameterSelect.tsx
17871
- import { forwardRef as forwardRef29 } from "react";
18217
+ import { forwardRef as forwardRef31 } from "react";
17872
18218
  import { jsx as jsx145, jsxs as jsxs97 } from "@emotion/react/jsx-runtime";
17873
- var ParameterSelect = forwardRef29(
18219
+ var ParameterSelect = forwardRef31(
17874
18220
  ({ defaultOption, options, ...props }, ref) => {
17875
18221
  const { shellProps, innerProps } = extractParameterProps(props);
17876
18222
  return /* @__PURE__ */ jsx145(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx145(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
17877
18223
  }
17878
18224
  );
17879
- var ParameterSelectInner = forwardRef29(
18225
+ var ParameterSelectInner = forwardRef31(
17880
18226
  ({ defaultOption, options, ...props }, ref) => {
17881
18227
  const { id, label: label2, hiddenLabel } = useParameterShell();
17882
18228
  return /* @__PURE__ */ jsxs97(
@@ -17900,24 +18246,24 @@ var ParameterSelectInner = forwardRef29(
17900
18246
  );
17901
18247
 
17902
18248
  // src/components/ParameterInputs/ParameterSelectSlider.tsx
17903
- import { forwardRef as forwardRef30, useCallback as useCallback15, useMemo as useMemo11 } from "react";
18249
+ import { forwardRef as forwardRef32, useCallback as useCallback17, useMemo as useMemo12 } from "react";
17904
18250
  import { jsx as jsx146 } from "@emotion/react/jsx-runtime";
17905
- var ParameterSelectSlider = forwardRef30(
18251
+ var ParameterSelectSlider = forwardRef32(
17906
18252
  (props, ref) => {
17907
18253
  const { shellProps, innerProps } = extractParameterProps(props);
17908
18254
  return /* @__PURE__ */ jsx146(ParameterShell, { "data-testid": "parameter-select-slider", ...shellProps, children: /* @__PURE__ */ jsx146(ParameterSelectSliderInner, { ref, ...innerProps }) });
17909
18255
  }
17910
18256
  );
17911
- var ParameterSelectSliderInner = forwardRef30(({ options, value, onChange, ...props }, ref) => {
18257
+ var ParameterSelectSliderInner = forwardRef32(({ options, value, onChange, ...props }, ref) => {
17912
18258
  const { id, label: label2, hiddenLabel } = useParameterShell();
17913
- const numericValue = useMemo11(() => {
18259
+ const numericValue = useMemo12(() => {
17914
18260
  if (value === void 0 || value === null || value === "") {
17915
18261
  return void 0;
17916
18262
  }
17917
18263
  const index = options.findIndex((option) => option.value === value);
17918
18264
  return index >= 0 ? index : void 0;
17919
18265
  }, [options, value]);
17920
- const handleChange = useCallback15(
18266
+ const handleChange = useCallback17(
17921
18267
  (newValue) => {
17922
18268
  var _a;
17923
18269
  if (newValue === void 0) {
@@ -17946,13 +18292,13 @@ ParameterSelectSlider.displayName = "ParameterSelectSlider";
17946
18292
  ParameterSelectSliderInner.displayName = "ParameterSelectSliderInner";
17947
18293
 
17948
18294
  // src/components/ParameterInputs/ParameterTextarea.tsx
17949
- import { forwardRef as forwardRef31 } from "react";
18295
+ import { forwardRef as forwardRef33 } from "react";
17950
18296
  import { jsx as jsx147 } from "@emotion/react/jsx-runtime";
17951
- var ParameterTextarea = forwardRef31((props, ref) => {
18297
+ var ParameterTextarea = forwardRef33((props, ref) => {
17952
18298
  const { shellProps, innerProps } = extractParameterProps(props);
17953
18299
  return /* @__PURE__ */ jsx147(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx147(ParameterTextareaInner, { ref, ...innerProps }) });
17954
18300
  });
17955
- var ParameterTextareaInner = forwardRef31(({ ...props }, ref) => {
18301
+ var ParameterTextareaInner = forwardRef33(({ ...props }, ref) => {
17956
18302
  const { id, label: label2, hiddenLabel } = useParameterShell();
17957
18303
  return /* @__PURE__ */ jsx147(
17958
18304
  "textarea",
@@ -17967,14 +18313,14 @@ var ParameterTextareaInner = forwardRef31(({ ...props }, ref) => {
17967
18313
  });
17968
18314
 
17969
18315
  // src/components/ParameterInputs/ParameterToggle.tsx
17970
- import { forwardRef as forwardRef32 } from "react";
18316
+ import { forwardRef as forwardRef34 } from "react";
17971
18317
  import { jsx as jsx148, jsxs as jsxs98 } from "@emotion/react/jsx-runtime";
17972
- var ParameterToggle = forwardRef32((props, ref) => {
18318
+ var ParameterToggle = forwardRef34((props, ref) => {
17973
18319
  const { shellProps, innerProps } = extractParameterProps(props);
17974
18320
  return /* @__PURE__ */ jsx148(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx148(ParameterToggleInner, { ref, ...innerProps }) });
17975
18321
  });
17976
18322
  ParameterToggle.displayName = "ParameterToggle";
17977
- var ParameterToggleInner = forwardRef32(
18323
+ var ParameterToggleInner = forwardRef34(
17978
18324
  ({ children, ...props }, ref) => {
17979
18325
  const { type, withoutIndeterminateState, ...otherProps } = props;
17980
18326
  const { id, label: label2 } = useParameterShell();
@@ -18098,7 +18444,7 @@ import { css as css110 } from "@emotion/react";
18098
18444
  import { CgCheckO as CgCheckO2 } from "@react-icons/all-files/cg/CgCheckO";
18099
18445
  import { CgRadioCheck } from "@react-icons/all-files/cg/CgRadioCheck";
18100
18446
  import { CgRecord } from "@react-icons/all-files/cg/CgRecord";
18101
- import { useMemo as useMemo12 } from "react";
18447
+ import { useMemo as useMemo13 } from "react";
18102
18448
 
18103
18449
  // src/components/ProgressList/styles/ProgressList.styles.ts
18104
18450
  import { css as css109 } from "@emotion/react";
@@ -18117,7 +18463,7 @@ var progressListItemStyles = css109`
18117
18463
  // src/components/ProgressList/ProgressList.tsx
18118
18464
  import { jsx as jsx150, jsxs as jsxs99 } from "@emotion/react/jsx-runtime";
18119
18465
  var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
18120
- const itemsWithStatus = useMemo12(() => {
18466
+ const itemsWithStatus = useMemo13(() => {
18121
18467
  const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
18122
18468
  return items.map((item, index) => {
18123
18469
  let status = "queued";
@@ -18150,7 +18496,7 @@ var ProgressListItem = ({
18150
18496
  errorLevel = "danger",
18151
18497
  autoEllipsis = false
18152
18498
  }) => {
18153
- const icon = useMemo12(() => {
18499
+ const icon = useMemo13(() => {
18154
18500
  if (error) {
18155
18501
  return warningIcon;
18156
18502
  }
@@ -18161,7 +18507,7 @@ var ProgressListItem = ({
18161
18507
  };
18162
18508
  return iconPerStatus[status];
18163
18509
  }, [status, error]);
18164
- const statusStyles = useMemo12(() => {
18510
+ const statusStyles = useMemo13(() => {
18165
18511
  if (error) {
18166
18512
  return errorLevel === "caution" ? css110`
18167
18513
  color: rgb(161, 98, 7);
@@ -18199,7 +18545,7 @@ var ProgressListItem = ({
18199
18545
 
18200
18546
  // src/components/SegmentedControl/SegmentedControl.tsx
18201
18547
  import { css as css112 } from "@emotion/react";
18202
- import { useCallback as useCallback16, useEffect as useEffect28, useMemo as useMemo13, useRef as useRef17, useState as useState28 } from "react";
18548
+ import { useCallback as useCallback18, useEffect as useEffect28, useMemo as useMemo14, useRef as useRef18, useState as useState31 } from "react";
18203
18549
 
18204
18550
  // src/components/SegmentedControl/SegmentedControl.styles.ts
18205
18551
  import { css as css111 } from "@emotion/react";
@@ -18378,10 +18724,10 @@ var SegmentedControl = ({
18378
18724
  // deprecated, destructured to prevent spreading to DOM
18379
18725
  ...props
18380
18726
  }) => {
18381
- const wrapperRef = useRef17(null);
18382
- const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState28(false);
18383
- const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState28(false);
18384
- const onOptionChange = useCallback16(
18727
+ const wrapperRef = useRef18(null);
18728
+ const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState31(false);
18729
+ const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState31(false);
18730
+ const onOptionChange = useCallback18(
18385
18731
  (event) => {
18386
18732
  if (event.target.checked) {
18387
18733
  onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
@@ -18389,7 +18735,7 @@ var SegmentedControl = ({
18389
18735
  },
18390
18736
  [options, onChange]
18391
18737
  );
18392
- const sizeStyles = useMemo13(() => {
18738
+ const sizeStyles = useMemo14(() => {
18393
18739
  const map = {
18394
18740
  sm: css112({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
18395
18741
  md: css112({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
@@ -18398,7 +18744,7 @@ var SegmentedControl = ({
18398
18744
  };
18399
18745
  return map[size];
18400
18746
  }, [size]);
18401
- const isIconOnly = useMemo13(() => {
18747
+ const isIconOnly = useMemo14(() => {
18402
18748
  return options.every((option) => option && option.icon && !option.label);
18403
18749
  }, [options]);
18404
18750
  useEffect28(() => {
@@ -18531,7 +18877,7 @@ var Skeleton = ({
18531
18877
  );
18532
18878
 
18533
18879
  // src/components/Spinner/Spinner.tsx
18534
- import { useEffect as useEffect29, useRef as useRef18 } from "react";
18880
+ import { useEffect as useEffect29, useRef as useRef19 } from "react";
18535
18881
 
18536
18882
  // src/components/Spinner/Spinner.styles.ts
18537
18883
  import { css as css114 } from "@emotion/react";
@@ -18971,7 +19317,7 @@ var Spinner = ({
18971
19317
  label: label2,
18972
19318
  isPaused
18973
19319
  }) => {
18974
- const ref = useRef18(null);
19320
+ const ref = useRef19(null);
18975
19321
  useEffect29(() => {
18976
19322
  var _a, _b, _c;
18977
19323
  (_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
@@ -19040,11 +19386,11 @@ var Spinner = ({
19040
19386
  };
19041
19387
 
19042
19388
  // src/components/StackedModal/hooks/StackedModalProvider.tsx
19043
- import { createContext as createContext6, useCallback as useCallback17, useContext as useContext6, useMemo as useMemo14, useRef as useRef19, useState as useState29 } from "react";
19389
+ import { createContext as createContext9, useCallback as useCallback19, useContext as useContext9, useMemo as useMemo15, useRef as useRef20, useState as useState32 } from "react";
19044
19390
  import { jsx as jsx154 } from "@emotion/react/jsx-runtime";
19045
- var StackedModalContext = createContext6(null);
19391
+ var StackedModalContext = createContext9(null);
19046
19392
  function useStackedModal() {
19047
- const context = useContext6(StackedModalContext);
19393
+ const context = useContext9(StackedModalContext);
19048
19394
  if (!context) {
19049
19395
  throw new Error("useStackedModal must be used within a <StackedModal> component.");
19050
19396
  }
@@ -19060,10 +19406,10 @@ function useStepTransition(index) {
19060
19406
  };
19061
19407
  }
19062
19408
  function StackedModalProvider({ children, totalSteps, initialStep }) {
19063
- const [currentStep, setCurrentStep] = useState29(initialStep);
19064
- const [direction, setDirection] = useState29("forward");
19065
- const previousStepRef = useRef19(initialStep);
19066
- const nextStep = useCallback17(() => {
19409
+ const [currentStep, setCurrentStep] = useState32(initialStep);
19410
+ const [direction, setDirection] = useState32("forward");
19411
+ const previousStepRef = useRef20(initialStep);
19412
+ const nextStep = useCallback19(() => {
19067
19413
  setCurrentStep((prev) => {
19068
19414
  if (prev >= totalSteps - 1) {
19069
19415
  return prev;
@@ -19073,7 +19419,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
19073
19419
  return prev + 1;
19074
19420
  });
19075
19421
  }, [totalSteps]);
19076
- const goBack = useCallback17(() => {
19422
+ const goBack = useCallback19(() => {
19077
19423
  setCurrentStep((prev) => {
19078
19424
  if (prev <= 0) {
19079
19425
  return prev;
@@ -19083,7 +19429,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
19083
19429
  return prev - 1;
19084
19430
  });
19085
19431
  }, []);
19086
- const goToStep = useCallback17(
19432
+ const goToStep = useCallback19(
19087
19433
  (index) => {
19088
19434
  setCurrentStep((prev) => {
19089
19435
  if (index < 0 || index >= totalSteps || index === prev) {
@@ -19096,7 +19442,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
19096
19442
  },
19097
19443
  [totalSteps]
19098
19444
  );
19099
- const value = useMemo14(
19445
+ const value = useMemo15(
19100
19446
  () => ({
19101
19447
  currentStep,
19102
19448
  totalSteps,
@@ -19112,7 +19458,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
19112
19458
  }
19113
19459
 
19114
19460
  // src/components/StackedModal/StackedModal.tsx
19115
- import React21 from "react";
19461
+ import React23 from "react";
19116
19462
 
19117
19463
  // src/components/StackedModal/styles/StackedModal.styles.ts
19118
19464
  import { css as css115, keyframes as keyframes6 } from "@emotion/react";
@@ -19269,9 +19615,9 @@ function AnimatedHeaderItem({ index, children }) {
19269
19615
  }
19270
19616
 
19271
19617
  // src/components/StackedModal/StackedModalStep.tsx
19272
- import { Fragment as Fragment20, jsx as jsx156, jsxs as jsxs102 } from "@emotion/react/jsx-runtime";
19618
+ import { Fragment as Fragment21, jsx as jsx156, jsxs as jsxs102 } from "@emotion/react/jsx-runtime";
19273
19619
  function StackedModalStep({ children, buttonGroup }) {
19274
- return /* @__PURE__ */ jsxs102(Fragment20, { children: [
19620
+ return /* @__PURE__ */ jsxs102(Fragment21, { children: [
19275
19621
  /* @__PURE__ */ jsx156("div", { css: stepContentStyles, children }),
19276
19622
  buttonGroup ? /* @__PURE__ */ jsx156(HorizontalRhythm, { gap: "sm", align: "center", children: buttonGroup }) : null
19277
19623
  ] });
@@ -19280,18 +19626,18 @@ function StackedModalStep({ children, buttonGroup }) {
19280
19626
  // src/components/StackedModal/StackedModal.tsx
19281
19627
  import { jsx as jsx157 } from "@emotion/react/jsx-runtime";
19282
19628
  function filterSteps(children) {
19283
- return React21.Children.toArray(children).filter(
19284
- (child) => React21.isValidElement(child) && child.type === StackedModalStep
19629
+ return React23.Children.toArray(children).filter(
19630
+ (child) => React23.isValidElement(child) && child.type === StackedModalStep
19285
19631
  );
19286
19632
  }
19287
- var StackedModal = React21.forwardRef(
19633
+ var StackedModal = React23.forwardRef(
19288
19634
  ({ children, initialStep = 0, ...rest }, ref) => {
19289
19635
  const steps = filterSteps(children);
19290
19636
  return /* @__PURE__ */ jsx157(StackedModalProvider, { totalSteps: steps.length, initialStep, children: /* @__PURE__ */ jsx157(StackedModalInner, { ref, steps, ...rest }) });
19291
19637
  }
19292
19638
  );
19293
19639
  StackedModal.displayName = "StackedModal";
19294
- var StackedModalInner = React21.forwardRef(
19640
+ var StackedModalInner = React23.forwardRef(
19295
19641
  ({ steps, onRequestClose, modalSize = "lg", width, height }, ref) => {
19296
19642
  return /* @__PURE__ */ jsx157("div", { css: stackedModalRootStyles, children: /* @__PURE__ */ jsx157(
19297
19643
  Modal,
@@ -19320,7 +19666,7 @@ function StackedModalStepWrapper({ index, children }) {
19320
19666
  }
19321
19667
 
19322
19668
  // src/components/Switch/Switch.tsx
19323
- import { forwardRef as forwardRef33, useMemo as useMemo15 } from "react";
19669
+ import { forwardRef as forwardRef35, useMemo as useMemo16 } from "react";
19324
19670
 
19325
19671
  // src/components/Switch/Switch.styles.ts
19326
19672
  import { css as css116 } from "@emotion/react";
@@ -19455,8 +19801,8 @@ var SwitchInputContainerAlignmentRight = css116`
19455
19801
  `;
19456
19802
 
19457
19803
  // src/components/Switch/Switch.tsx
19458
- import { Fragment as Fragment21, jsx as jsx158, jsxs as jsxs103 } from "@emotion/react/jsx-runtime";
19459
- var Switch = forwardRef33(
19804
+ import { Fragment as Fragment22, jsx as jsx158, jsxs as jsxs103 } from "@emotion/react/jsx-runtime";
19805
+ var Switch = forwardRef35(
19460
19806
  ({
19461
19807
  label: label2,
19462
19808
  infoText,
@@ -19467,7 +19813,7 @@ var Switch = forwardRef33(
19467
19813
  ...inputProps
19468
19814
  }, ref) => {
19469
19815
  let additionalText = infoText;
19470
- const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = useMemo15(() => {
19816
+ const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = useMemo16(() => {
19471
19817
  if (alignment === "left") {
19472
19818
  return {
19473
19819
  SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
@@ -19484,7 +19830,7 @@ var Switch = forwardRef33(
19484
19830
  if (infoText && toggleText) {
19485
19831
  additionalText = inputProps.checked ? toggleText : infoText;
19486
19832
  }
19487
- return /* @__PURE__ */ jsxs103(Fragment21, { children: [
19833
+ return /* @__PURE__ */ jsxs103(Fragment22, { children: [
19488
19834
  /* @__PURE__ */ jsxs103(
19489
19835
  "label",
19490
19836
  {
@@ -19584,53 +19930,47 @@ var ResponsiveTableContainer = ({ children }) => {
19584
19930
  };
19585
19931
 
19586
19932
  // src/components/Table/Table.tsx
19587
- import * as React22 from "react";
19933
+ import * as React24 from "react";
19588
19934
  import { jsx as jsx160 } from "@emotion/react/jsx-runtime";
19589
- var Table = React22.forwardRef(
19935
+ var Table = React24.forwardRef(
19590
19936
  ({ children, cellPadding, ...otherProps }, ref) => {
19591
19937
  return /* @__PURE__ */ jsx160("table", { ref, css: table({ cellPadding }), ...otherProps, children });
19592
19938
  }
19593
19939
  );
19594
- var TableHead = React22.forwardRef(
19940
+ var TableHead = React24.forwardRef(
19595
19941
  ({ children, ...otherProps }, ref) => {
19596
19942
  return /* @__PURE__ */ jsx160("thead", { ref, css: tableHead, ...otherProps, children });
19597
19943
  }
19598
19944
  );
19599
- var TableBody = React22.forwardRef(
19945
+ var TableBody = React24.forwardRef(
19600
19946
  ({ children, ...otherProps }, ref) => {
19601
19947
  return /* @__PURE__ */ jsx160("tbody", { ref, ...otherProps, children });
19602
19948
  }
19603
19949
  );
19604
- var TableFoot = React22.forwardRef(
19950
+ var TableFoot = React24.forwardRef(
19605
19951
  ({ children, ...otherProps }, ref) => {
19606
19952
  return /* @__PURE__ */ jsx160("tfoot", { ref, ...otherProps, children });
19607
19953
  }
19608
19954
  );
19609
- var TableRow = React22.forwardRef(
19955
+ var TableRow = React24.forwardRef(
19610
19956
  ({ children, ...otherProps }, ref) => {
19611
19957
  return /* @__PURE__ */ jsx160("tr", { ref, css: tableRow, ...otherProps, children });
19612
19958
  }
19613
19959
  );
19614
- var TableCellHead = React22.forwardRef(
19960
+ var TableCellHead = React24.forwardRef(
19615
19961
  ({ children, ...otherProps }, ref) => {
19616
19962
  return /* @__PURE__ */ jsx160("th", { ref, css: tableCellHead, ...otherProps, children });
19617
19963
  }
19618
19964
  );
19619
- var TableCellData = React22.forwardRef(
19965
+ var TableCellData = React24.forwardRef(
19620
19966
  ({ children, ...otherProps }, ref) => {
19621
19967
  return /* @__PURE__ */ jsx160("td", { ref, ...otherProps, children });
19622
19968
  }
19623
19969
  );
19624
19970
 
19625
19971
  // src/components/Tabs/Tabs.tsx
19626
- import {
19627
- Tab as AriakitTab,
19628
- TabList as AriakitTabList,
19629
- TabPanel as AriakitTabPanel,
19630
- TabProvider as AriakitTabProvider,
19631
- useTabStore as useAriakitTabStore
19632
- } from "@ariakit/react";
19633
- import { useCallback as useCallback18, useMemo as useMemo16 } from "react";
19972
+ import { Tabs as BaseUITabs } from "@base-ui/react/tabs";
19973
+ import { createContext as createContext10, useCallback as useCallback20, useContext as useContext10, useEffect as useEffect30, useMemo as useMemo17, useRef as useRef21, useState as useState33 } from "react";
19634
19974
 
19635
19975
  // src/components/Tabs/Tabs.styles.ts
19636
19976
  import { css as css118 } from "@emotion/react";
@@ -19659,53 +19999,103 @@ var tabButtonGroupStyles = css118`
19659
19999
 
19660
20000
  // src/components/Tabs/Tabs.tsx
19661
20001
  import { jsx as jsx161 } from "@emotion/react/jsx-runtime";
20002
+ var TabsContext = createContext10(null);
19662
20003
  var useCurrentTab = () => {
19663
- const context = useAriakitTabStore();
20004
+ const context = useContext10(TabsContext);
19664
20005
  if (!context) {
19665
20006
  throw new Error("This component can only be used inside <Tabs>");
19666
20007
  }
19667
20008
  return context;
19668
20009
  };
20010
+ var ManualContext = createContext10(false);
20011
+ var TabRegistrationContext = createContext10(null);
19669
20012
  var Tabs = ({
19670
20013
  children,
19671
20014
  onSelectedIdChange,
19672
20015
  useHashForState,
19673
20016
  selectedId,
19674
20017
  manual,
19675
- ...props
20018
+ orientation,
20019
+ className,
20020
+ style
19676
20021
  }) => {
19677
- const selected = useMemo16(() => {
20022
+ const selected = useMemo17(() => {
19678
20023
  if (selectedId) return selectedId;
19679
20024
  return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
19680
20025
  }, [selectedId, useHashForState]);
19681
- const onTabSelect = useCallback18(
20026
+ const isControlled = selected !== void 0;
20027
+ const [uncontrolledValue, setUncontrolledValue] = useState33(void 0);
20028
+ const firstTabRegistered = useRef21(false);
20029
+ const registerTab = useCallback20(
20030
+ (value) => {
20031
+ if (!firstTabRegistered.current) {
20032
+ firstTabRegistered.current = true;
20033
+ if (!isControlled) {
20034
+ setUncontrolledValue(value);
20035
+ }
20036
+ }
20037
+ },
20038
+ [isControlled]
20039
+ );
20040
+ const currentValue = isControlled ? selected : uncontrolledValue;
20041
+ const onTabSelect = useCallback20(
19682
20042
  (value) => {
19683
20043
  const selectedValueWithoutNull = value != null ? value : void 0;
20044
+ if (!isControlled) {
20045
+ setUncontrolledValue(selectedValueWithoutNull);
20046
+ }
19684
20047
  onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
19685
20048
  if (useHashForState && typeof window !== "undefined" && window.history) {
19686
20049
  const hashValue = selectedValueWithoutNull ? `#${selectedValueWithoutNull}` : "";
19687
20050
  window.history.replaceState(null, "", hashValue);
19688
20051
  }
19689
20052
  },
19690
- [onSelectedIdChange, useHashForState]
20053
+ [isControlled, onSelectedIdChange, useHashForState]
20054
+ );
20055
+ const tabsContextValue = useMemo17(
20056
+ () => ({
20057
+ value: currentValue,
20058
+ setValue: (v) => onTabSelect(v)
20059
+ }),
20060
+ [currentValue, onTabSelect]
19691
20061
  );
19692
- return /* @__PURE__ */ jsx161(AriakitTabProvider, { selectedId: selected, selectOnMove: !manual, setSelectedId: onTabSelect, ...props, children });
20062
+ return /* @__PURE__ */ jsx161(TabsContext.Provider, { value: tabsContextValue, children: /* @__PURE__ */ jsx161(TabRegistrationContext.Provider, { value: { registerTab }, children: /* @__PURE__ */ jsx161(ManualContext.Provider, { value: !!manual, children: /* @__PURE__ */ jsx161(
20063
+ BaseUITabs.Root,
20064
+ {
20065
+ value: currentValue != null ? currentValue : null,
20066
+ onValueChange: (value) => onTabSelect(value),
20067
+ orientation,
20068
+ className,
20069
+ style,
20070
+ children
20071
+ }
20072
+ ) }) }) });
19693
20073
  };
19694
20074
  var TabButtonGroup = ({ children, ...props }) => {
19695
- return /* @__PURE__ */ jsx161(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
20075
+ const manual = useContext10(ManualContext);
20076
+ return /* @__PURE__ */ jsx161(BaseUITabs.List, { activateOnFocus: !manual, ...props, css: tabButtonGroupStyles, children });
19696
20077
  };
19697
20078
  var TabButton = ({
19698
20079
  children,
19699
20080
  id,
19700
20081
  ...props
19701
20082
  }) => {
19702
- return /* @__PURE__ */ jsx161(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
20083
+ const registration = useContext10(TabRegistrationContext);
20084
+ useEffect30(() => {
20085
+ registration == null ? void 0 : registration.registerTab(id);
20086
+ }, []);
20087
+ return /* @__PURE__ */ jsx161(BaseUITabs.Tab, { type: "button", value: id, "data-tab-id": id, ...props, css: tabButtonStyles, children });
19703
20088
  };
19704
20089
  var TabContent = ({
19705
20090
  children,
20091
+ tabId,
20092
+ id,
20093
+ keepMounted = true,
19706
20094
  ...props
19707
20095
  }) => {
19708
- return /* @__PURE__ */ jsx161(AriakitTabPanel, { ...props, children });
20096
+ const panelValue = tabId != null ? tabId : id;
20097
+ const htmlId = id;
20098
+ return /* @__PURE__ */ jsx161(BaseUITabs.Panel, { value: panelValue, id: htmlId, keepMounted, ...props, children });
19709
20099
  };
19710
20100
 
19711
20101
  // src/components/Validation/StatusBullet.styles.ts
@@ -19909,7 +20299,7 @@ export {
19909
20299
  LoadingIndicator,
19910
20300
  LoadingOverlay,
19911
20301
  Menu,
19912
- MenuButton2 as MenuButton,
20302
+ MenuButton,
19913
20303
  MenuGroup,
19914
20304
  MenuItem,
19915
20305
  MenuItemEmptyIcon,
@@ -19920,6 +20310,7 @@ export {
19920
20310
  MenuThreeDots,
19921
20311
  Modal,
19922
20312
  ModalDialog,
20313
+ ModalPortalContext,
19923
20314
  MultilineChip,
19924
20315
  ObjectGridContainer2 as ObjectGridContainer,
19925
20316
  ObjectGridItem2 as ObjectGridItem,
@@ -19971,7 +20362,7 @@ export {
19971
20362
  ParameterTextareaInner,
19972
20363
  ParameterToggle,
19973
20364
  ParameterToggleInner,
19974
- Popover3 as Popover,
20365
+ Popover2 as Popover,
19975
20366
  PopoverBody2 as PopoverBody,
19976
20367
  ProgressBar,
19977
20368
  ProgressList,
@@ -20132,6 +20523,8 @@ export {
20132
20523
  useDrawer,
20133
20524
  useIconContext,
20134
20525
  useImageLoadFallback,
20526
+ useIsSubmenuTriggerMode,
20527
+ useModalPortalContainer,
20135
20528
  useOutsideClick,
20136
20529
  useParameterShell,
20137
20530
  usePopoverComponentContext,