@uniformdev/design-system 19.61.1-alpha.13 → 19.61.1-alpha.18
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 +218 -205
- package/dist/index.d.mts +30 -15
- package/dist/index.d.ts +30 -15
- package/dist/index.js +610 -599
- package/package.json +5 -4
package/dist/esm/index.js
CHANGED
|
@@ -2286,7 +2286,7 @@ var IntegrationHeaderSection = ({
|
|
|
2286
2286
|
icon,
|
|
2287
2287
|
docsLink,
|
|
2288
2288
|
badgeText,
|
|
2289
|
-
menu
|
|
2289
|
+
menu,
|
|
2290
2290
|
children,
|
|
2291
2291
|
...props
|
|
2292
2292
|
}) => {
|
|
@@ -2301,7 +2301,7 @@ var IntegrationHeaderSection = ({
|
|
|
2301
2301
|
/* @__PURE__ */ jsxs5("div", { css: IntegrationHeaderSectionTitleGroup, "data-testid": "integration-header-text", children: [
|
|
2302
2302
|
/* @__PURE__ */ jsx13("h1", { css: IntegrationHeaderSectionTitle, children: title2 }),
|
|
2303
2303
|
badgeText ? /* @__PURE__ */ jsx13(Badge, { text: badgeText }) : null,
|
|
2304
|
-
|
|
2304
|
+
menu ? /* @__PURE__ */ jsx13("div", { children: menu }) : null,
|
|
2305
2305
|
docsLink ? /* @__PURE__ */ jsx13(
|
|
2306
2306
|
Link,
|
|
2307
2307
|
{
|
|
@@ -11524,13 +11524,13 @@ var HorizontalRhythm = ({
|
|
|
11524
11524
|
};
|
|
11525
11525
|
|
|
11526
11526
|
// src/components/Menu/Menu.tsx
|
|
11527
|
-
import * as React8 from "react";
|
|
11528
11527
|
import {
|
|
11529
11528
|
Menu as BaseMenu,
|
|
11530
11529
|
MenuButton,
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11530
|
+
MenuProvider,
|
|
11531
|
+
useMenuStore
|
|
11532
|
+
} from "@ariakit/react";
|
|
11533
|
+
import * as React8 from "react";
|
|
11534
11534
|
|
|
11535
11535
|
// src/components/Menu/filterMenuSeparators.ts
|
|
11536
11536
|
import React7, { isValidElement } from "react";
|
|
@@ -11577,17 +11577,18 @@ var menuItem = (textTheme, forceActive) => css25`
|
|
|
11577
11577
|
font-weight: var(--fw-regular);
|
|
11578
11578
|
flex-grow: 1;
|
|
11579
11579
|
gap: var(--spacing-xs);
|
|
11580
|
-
|
|
11580
|
+
cursor: default;
|
|
11581
11581
|
white-space: nowrap;
|
|
11582
11582
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
11583
11583
|
${forceActive ? activeMenuItem : ""}
|
|
11584
11584
|
|
|
11585
|
-
|
|
11586
|
-
|
|
11585
|
+
&[aria-disabled="true"] {
|
|
11586
|
+
opacity: 0.5;
|
|
11587
11587
|
}
|
|
11588
11588
|
|
|
11589
11589
|
&:hover,
|
|
11590
|
-
&:focus
|
|
11590
|
+
&:focus,
|
|
11591
|
+
&[data-active-item] {
|
|
11591
11592
|
${typeof forceActive === "undefined" ? activeMenuItem : ""}
|
|
11592
11593
|
}
|
|
11593
11594
|
`;
|
|
@@ -11604,6 +11605,7 @@ var menuItemWithIcon = css25`
|
|
|
11604
11605
|
}
|
|
11605
11606
|
`;
|
|
11606
11607
|
var menuItemSeparator = css25`
|
|
11608
|
+
border: 0;
|
|
11607
11609
|
border-top: 1px solid var(--gray-300);
|
|
11608
11610
|
width: 100%;
|
|
11609
11611
|
margin-block: var(--spacing-sm);
|
|
@@ -11660,7 +11662,7 @@ function isMenuSeparator(child) {
|
|
|
11660
11662
|
|
|
11661
11663
|
// src/components/Menu/Menu.styles.ts
|
|
11662
11664
|
import { css as css26 } from "@emotion/react";
|
|
11663
|
-
var
|
|
11665
|
+
var menuStyles = css26`
|
|
11664
11666
|
box-shadow: var(--shadow-base);
|
|
11665
11667
|
border-radius: var(--rounded-base);
|
|
11666
11668
|
background: var(--gray-50);
|
|
@@ -11668,21 +11670,9 @@ var menu = css26`
|
|
|
11668
11670
|
flex-direction: column;
|
|
11669
11671
|
padding: var(--spacing-sm);
|
|
11670
11672
|
outline: none;
|
|
11671
|
-
overflow-x: hidden;
|
|
11672
|
-
overflow-y: auto;
|
|
11673
11673
|
position: relative;
|
|
11674
11674
|
z-index: var(--z-50);
|
|
11675
11675
|
|
|
11676
|
-
// work around for smaller screens not being able to access large menus
|
|
11677
|
-
// see uni-2997
|
|
11678
|
-
max-height: 55vh; // firefox support
|
|
11679
|
-
|
|
11680
|
-
${supports("max-height: 60dvh")} {
|
|
11681
|
-
max-height: 55dvh; // modern browser support
|
|
11682
|
-
}
|
|
11683
|
-
|
|
11684
|
-
${scrollbarStyles}
|
|
11685
|
-
|
|
11686
11676
|
&:focus {
|
|
11687
11677
|
outline: none;
|
|
11688
11678
|
}
|
|
@@ -11690,91 +11680,102 @@ var menu = css26`
|
|
|
11690
11680
|
|
|
11691
11681
|
// src/components/Menu/Menu.tsx
|
|
11692
11682
|
import { jsx as jsx26, jsxs as jsxs15 } from "@emotion/react/jsx-runtime";
|
|
11693
|
-
var
|
|
11694
|
-
var
|
|
11695
|
-
return React8.useContext(MenuContext);
|
|
11696
|
-
};
|
|
11697
|
-
var Menu = ({
|
|
11698
|
-
menuLabel,
|
|
11683
|
+
var legacyPlacements = ["auto", "auto-start", "auto-end"];
|
|
11684
|
+
var Menu = React8.forwardRef(function Menu2({
|
|
11699
11685
|
menuTrigger,
|
|
11700
|
-
|
|
11701
|
-
menuItemsContainerCssClasses,
|
|
11686
|
+
menuLabel,
|
|
11702
11687
|
children,
|
|
11688
|
+
placement,
|
|
11703
11689
|
forceVisible,
|
|
11690
|
+
withoutPortal,
|
|
11704
11691
|
disableAutoSeparatorManagement,
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
const
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
}, [forceVisible, menuState]);
|
|
11714
|
-
React8.useEffect(() => {
|
|
11715
|
-
if (menuState.visible) {
|
|
11716
|
-
setIsRendered(true);
|
|
11717
|
-
}
|
|
11718
|
-
}, [menuState.visible, setIsRendered]);
|
|
11719
|
-
const Wrapper = withoutPortal ? React8.Fragment : Portal;
|
|
11720
|
-
return /* @__PURE__ */ jsxs15(MenuContext.Provider, { value: menuState, children: [
|
|
11721
|
-
/* @__PURE__ */ jsx26(MenuButton, { ...menuState, ref: menuTrigger.ref, ...menuTrigger.props, children: (triggerProps) => React8.cloneElement(menuTrigger, triggerProps) }),
|
|
11722
|
-
/* @__PURE__ */ jsx26(Wrapper, { children: /* @__PURE__ */ jsx26(
|
|
11692
|
+
menuItemsContainerCssClasses,
|
|
11693
|
+
...props
|
|
11694
|
+
}, ref) {
|
|
11695
|
+
const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
|
|
11696
|
+
const menu = useMenuStore({ placement: placementOverride });
|
|
11697
|
+
return /* @__PURE__ */ jsxs15(MenuProvider, { store: menu, open: forceVisible, children: [
|
|
11698
|
+
/* @__PURE__ */ jsx26(MenuButton, { ref, render: menuTrigger }),
|
|
11699
|
+
/* @__PURE__ */ jsx26(
|
|
11723
11700
|
BaseMenu,
|
|
11724
11701
|
{
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
"aria-label": menuLabel,
|
|
11729
|
-
...!isRendered ? { unstable_popoverStyles: { position: "absolute", opacity: "0" } } : void 0,
|
|
11702
|
+
gutter: 0,
|
|
11703
|
+
shift: menu.parent ? -4 : 0,
|
|
11704
|
+
...props,
|
|
11730
11705
|
css: [
|
|
11731
|
-
|
|
11706
|
+
menuStyles,
|
|
11732
11707
|
typeof menuItemsContainerCssClasses === "object" ? menuItemsContainerCssClasses : void 0
|
|
11733
11708
|
],
|
|
11734
11709
|
className: typeof menuItemsContainerCssClasses === "string" ? menuItemsContainerCssClasses : "",
|
|
11735
11710
|
"data-testid": "more-menu",
|
|
11711
|
+
hideOnHoverOutside: (event) => {
|
|
11712
|
+
var _a;
|
|
11713
|
+
if (!menu.parent)
|
|
11714
|
+
return false;
|
|
11715
|
+
const { contentElement, anchorElement } = menu.getState();
|
|
11716
|
+
const [target] = event.composedPath();
|
|
11717
|
+
if (!target)
|
|
11718
|
+
return false;
|
|
11719
|
+
const activeElement = (_a = target.ownerDocument) == null ? void 0 : _a.activeElement;
|
|
11720
|
+
if (anchorElement == null ? void 0 : anchorElement.contains(target))
|
|
11721
|
+
return false;
|
|
11722
|
+
if (contentElement == null ? void 0 : contentElement.contains(target))
|
|
11723
|
+
return false;
|
|
11724
|
+
if (activeElement && target.contains(activeElement))
|
|
11725
|
+
return false;
|
|
11726
|
+
return true;
|
|
11727
|
+
},
|
|
11736
11728
|
children: disableAutoSeparatorManagement ? children : filterMenuSeparators(children)
|
|
11737
11729
|
}
|
|
11738
|
-
)
|
|
11730
|
+
)
|
|
11739
11731
|
] });
|
|
11740
|
-
};
|
|
11732
|
+
});
|
|
11741
11733
|
|
|
11742
11734
|
// src/components/Menu/MenuItem.tsx
|
|
11735
|
+
import { MenuItem as BaseMenuItem } from "@ariakit/react";
|
|
11743
11736
|
import * as React9 from "react";
|
|
11744
|
-
import { MenuItem as BaseMenuItem } from "reakit";
|
|
11745
11737
|
import { jsx as jsx27, jsxs as jsxs16 } from "@emotion/react/jsx-runtime";
|
|
11738
|
+
var renderAsButton = (renderProps) => /* @__PURE__ */ jsx27("button", { type: "button", ...renderProps });
|
|
11746
11739
|
var MenuItem = React9.forwardRef(
|
|
11747
11740
|
({ children, className, hideMenuOnClick = true, icon, textColor = "base", active: active2, ...props }, ref) => {
|
|
11748
|
-
const
|
|
11749
|
-
const resolveProps = (originalProps) => {
|
|
11750
|
-
const resolvedProps2 = { ...originalProps };
|
|
11751
|
-
if (resolvedProps2.onClick) {
|
|
11752
|
-
const origOnClick = resolvedProps2.onClick;
|
|
11753
|
-
resolvedProps2.onClick = (e) => {
|
|
11754
|
-
var _a;
|
|
11755
|
-
(_a = menuState == null ? void 0 : menuState.hide) == null ? void 0 : _a.call(menuState);
|
|
11756
|
-
origOnClick(e);
|
|
11757
|
-
};
|
|
11758
|
-
}
|
|
11759
|
-
return resolvedProps2;
|
|
11760
|
-
};
|
|
11761
|
-
const resolvedProps = hideMenuOnClick ? resolveProps(props) : props;
|
|
11762
|
-
const resolvedChildren = typeof children === "function" ? children(resolvedProps) : children;
|
|
11741
|
+
const resolvedChildren = typeof children === "function" ? children(props) : children;
|
|
11763
11742
|
return /* @__PURE__ */ jsx27(
|
|
11764
11743
|
BaseMenuItem,
|
|
11765
11744
|
{
|
|
11766
11745
|
ref,
|
|
11767
|
-
type: "button",
|
|
11768
11746
|
"data-testid": "button-menu",
|
|
11769
|
-
|
|
11770
|
-
...resolvedProps,
|
|
11747
|
+
hideOnClick: hideMenuOnClick,
|
|
11771
11748
|
css: [menuItem(textColor, active2), typeof className === "object" ? className : void 0],
|
|
11772
11749
|
className: typeof className === "string" ? className : void 0,
|
|
11750
|
+
render: renderAsButton,
|
|
11751
|
+
...props,
|
|
11773
11752
|
children: icon ? renderWithIcon(resolvedChildren, icon) : resolvedChildren
|
|
11774
11753
|
}
|
|
11775
11754
|
);
|
|
11776
11755
|
}
|
|
11777
11756
|
);
|
|
11757
|
+
var MenuItemInner = ({
|
|
11758
|
+
ref,
|
|
11759
|
+
children,
|
|
11760
|
+
className,
|
|
11761
|
+
icon,
|
|
11762
|
+
textColor = "base",
|
|
11763
|
+
active: active2,
|
|
11764
|
+
...props
|
|
11765
|
+
}) => {
|
|
11766
|
+
const resolvedChildren = typeof children === "function" ? children(props) : children;
|
|
11767
|
+
return /* @__PURE__ */ jsx27(
|
|
11768
|
+
"div",
|
|
11769
|
+
{
|
|
11770
|
+
"data-testid": "button-menu",
|
|
11771
|
+
role: "menuitem",
|
|
11772
|
+
css: [menuItem(textColor, active2), typeof className === "object" ? className : void 0],
|
|
11773
|
+
className: typeof className === "string" ? className : void 0,
|
|
11774
|
+
...props,
|
|
11775
|
+
children: icon ? renderWithIcon(resolvedChildren, icon) : resolvedChildren
|
|
11776
|
+
}
|
|
11777
|
+
);
|
|
11778
|
+
};
|
|
11778
11779
|
function renderWithIcon(children, icon) {
|
|
11779
11780
|
return /* @__PURE__ */ jsxs16("span", { css: menuItemWithIcon, children: [
|
|
11780
11781
|
icon,
|
|
@@ -11941,7 +11942,7 @@ var wholeButtonWithMenuIconOffset = css27`
|
|
|
11941
11942
|
`;
|
|
11942
11943
|
|
|
11943
11944
|
// src/components/ButtonWithMenu/ButtonWithMenu.tsx
|
|
11944
|
-
import { Fragment as
|
|
11945
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
|
|
11945
11946
|
var ButtonWithMenu = ({
|
|
11946
11947
|
onButtonClick,
|
|
11947
11948
|
buttonType = "secondary",
|
|
@@ -11986,7 +11987,7 @@ var ButtonWithMenu = ({
|
|
|
11986
11987
|
disabled2 ? buttonDisabledTheme[buttonType] : buttonTheme[buttonType]
|
|
11987
11988
|
],
|
|
11988
11989
|
"data-testid": "multioptions-button",
|
|
11989
|
-
children: onButtonClick ? /* @__PURE__ */ jsxs17(
|
|
11990
|
+
children: onButtonClick ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
11990
11991
|
/* @__PURE__ */ jsxs17(
|
|
11991
11992
|
"button",
|
|
11992
11993
|
{
|
|
@@ -12003,7 +12004,7 @@ var ButtonWithMenu = ({
|
|
|
12003
12004
|
}
|
|
12004
12005
|
),
|
|
12005
12006
|
disabled2 ? clickableButton : /* @__PURE__ */ jsx28(Menu, { menuLabel: "buttonMenu", placement, menuTrigger: clickableButton, children })
|
|
12006
|
-
] }) : /* @__PURE__ */ jsx28(
|
|
12007
|
+
] }) : /* @__PURE__ */ jsx28(Fragment5, { children: disabled2 ? dropdownButton : /* @__PURE__ */ jsx28(Menu, { menuLabel: "buttonMenu", placement, menuTrigger: dropdownButton, children }) })
|
|
12007
12008
|
}
|
|
12008
12009
|
);
|
|
12009
12010
|
};
|
|
@@ -12785,7 +12786,7 @@ var ChipActionButton = css36`
|
|
|
12785
12786
|
`;
|
|
12786
12787
|
|
|
12787
12788
|
// src/components/Chip/Chip.tsx
|
|
12788
|
-
import { Fragment as
|
|
12789
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
12789
12790
|
var chipTheme = {
|
|
12790
12791
|
"accent-light": ChipThemeAccentLight,
|
|
12791
12792
|
"accent-dark": ChipThemeAccentDark,
|
|
@@ -12808,7 +12809,7 @@ var Chip = ({
|
|
|
12808
12809
|
md: ChipMedium
|
|
12809
12810
|
};
|
|
12810
12811
|
return /* @__PURE__ */ jsxs22("span", { css: [ChipContainer, chipSize[size], chipTheme[theme]], ...props, children: [
|
|
12811
|
-
icon ? /* @__PURE__ */ jsxs22(
|
|
12812
|
+
icon ? /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
12812
12813
|
/* @__PURE__ */ jsx37("span", { role: "presentation", css: [ChipIcon], children: /* @__PURE__ */ jsx37(Icon, { icon, iconColor: "currentColor", size: "1rem" }) }),
|
|
12813
12814
|
/* @__PURE__ */ jsx37("span", { role: "separator", css: ChipSeparator })
|
|
12814
12815
|
] }) : null,
|
|
@@ -13162,7 +13163,7 @@ var Details = ({
|
|
|
13162
13163
|
|
|
13163
13164
|
// src/components/Drawer/Drawer.tsx
|
|
13164
13165
|
import { CgChevronRight } from "@react-icons/all-files/cg/CgChevronRight";
|
|
13165
|
-
import React13, { createContext as
|
|
13166
|
+
import React13, { createContext as createContext3, useContext as useContext4, useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
|
|
13166
13167
|
import { createPortal } from "react-dom";
|
|
13167
13168
|
|
|
13168
13169
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -13273,9 +13274,9 @@ var drawerWrapperOverlayStyles = css42`
|
|
|
13273
13274
|
`;
|
|
13274
13275
|
|
|
13275
13276
|
// src/components/Drawer/DrawerProvider.tsx
|
|
13276
|
-
import { createContext as
|
|
13277
|
+
import { createContext as createContext2, useCallback, useContext as useContext3, useRef as useRef2, useState as useState4 } from "react";
|
|
13277
13278
|
import { jsx as jsx43 } from "@emotion/react/jsx-runtime";
|
|
13278
|
-
var DrawerContext =
|
|
13279
|
+
var DrawerContext = createContext2({
|
|
13279
13280
|
providerId: "",
|
|
13280
13281
|
drawersRegistry: [],
|
|
13281
13282
|
registerDrawer: () => {
|
|
@@ -13291,9 +13292,9 @@ function renderDrawerId(drawer) {
|
|
|
13291
13292
|
return `${drawer.stackId ? `\u{1F95E} ${drawer.stackId} ` : ""}\u{1F194} ${drawer.id}${drawer.instanceKey ? ` \u{1F511} ${drawer.instanceKey}` : ""}`;
|
|
13292
13293
|
}
|
|
13293
13294
|
var DrawerProvider = ({ children }) => {
|
|
13294
|
-
const [drawersRegistry, setDrawersRegistry] =
|
|
13295
|
+
const [drawersRegistry, setDrawersRegistry] = useState4([]);
|
|
13295
13296
|
const providerId = useRef2(crypto.randomUUID());
|
|
13296
|
-
const [drawerTakeoverStackId, setDrawerTakeoverStackId] =
|
|
13297
|
+
const [drawerTakeoverStackId, setDrawerTakeoverStackId] = useState4(void 0);
|
|
13297
13298
|
useShortcut({
|
|
13298
13299
|
handler: () => {
|
|
13299
13300
|
var _a, _b;
|
|
@@ -13384,7 +13385,7 @@ var DrawerProvider = ({ children }) => {
|
|
|
13384
13385
|
);
|
|
13385
13386
|
};
|
|
13386
13387
|
var useDrawer = () => {
|
|
13387
|
-
return
|
|
13388
|
+
return useContext3(DrawerContext);
|
|
13388
13389
|
};
|
|
13389
13390
|
var useCloseCurrentDrawer = () => {
|
|
13390
13391
|
const context = useDrawer();
|
|
@@ -13403,9 +13404,9 @@ function isEqualDrawerInstance(a, b) {
|
|
|
13403
13404
|
// src/components/Drawer/Drawer.tsx
|
|
13404
13405
|
import { jsx as jsx44, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
|
|
13405
13406
|
var defaultSackId = "_default";
|
|
13406
|
-
var CurrentDrawerContext =
|
|
13407
|
+
var CurrentDrawerContext = createContext3({});
|
|
13407
13408
|
var useCurrentDrawer = () => {
|
|
13408
|
-
return
|
|
13409
|
+
return useContext4(CurrentDrawerContext);
|
|
13409
13410
|
};
|
|
13410
13411
|
var Drawer = React13.forwardRef(
|
|
13411
13412
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
@@ -13433,8 +13434,8 @@ var DrawerInner = ({
|
|
|
13433
13434
|
}) => {
|
|
13434
13435
|
const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
|
|
13435
13436
|
const closeButtonRef = useRef3(null);
|
|
13436
|
-
const [rendererElement, setRendererElement] =
|
|
13437
|
-
|
|
13437
|
+
const [rendererElement, setRendererElement] = useState5(null);
|
|
13438
|
+
useEffect4(() => {
|
|
13438
13439
|
registerDrawer({
|
|
13439
13440
|
drawer: {
|
|
13440
13441
|
width,
|
|
@@ -13541,8 +13542,8 @@ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) =>
|
|
|
13541
13542
|
};
|
|
13542
13543
|
|
|
13543
13544
|
// src/components/Drawer/DrawerRenderer.tsx
|
|
13544
|
-
import { useEffect as
|
|
13545
|
-
import { Fragment as
|
|
13545
|
+
import { useEffect as useEffect5, useMemo as useMemo2 } from "react";
|
|
13546
|
+
import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
|
|
13546
13547
|
var drawerWidth = {
|
|
13547
13548
|
narrow: "29rem",
|
|
13548
13549
|
medium: "43rem",
|
|
@@ -13562,7 +13563,7 @@ var DrawerRenderer = ({
|
|
|
13562
13563
|
}) => {
|
|
13563
13564
|
const { drawersRegistry, providerId } = useDrawer();
|
|
13564
13565
|
const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
|
|
13565
|
-
|
|
13566
|
+
useEffect5(() => {
|
|
13566
13567
|
drawersToRender.forEach(({ isFirstRender, onFirstRender }) => {
|
|
13567
13568
|
if (isFirstRender) {
|
|
13568
13569
|
onFirstRender == null ? void 0 : onFirstRender();
|
|
@@ -13631,7 +13632,7 @@ var DrawerWrapper = ({
|
|
|
13631
13632
|
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
13632
13633
|
}
|
|
13633
13634
|
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
13634
|
-
return /* @__PURE__ */ jsxs28(
|
|
13635
|
+
return /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
13635
13636
|
/* @__PURE__ */ jsx46("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
13636
13637
|
/* @__PURE__ */ jsx46(
|
|
13637
13638
|
"div",
|
|
@@ -13652,12 +13653,12 @@ var getDrawerAttributes = ({
|
|
|
13652
13653
|
};
|
|
13653
13654
|
|
|
13654
13655
|
// src/components/Drawer/TakeoverDrawerRenderer.tsx
|
|
13655
|
-
import { useEffect as
|
|
13656
|
+
import { useEffect as useEffect6 } from "react";
|
|
13656
13657
|
import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
|
|
13657
13658
|
var TAKEOVER_STACK_ID = "takeover-stack";
|
|
13658
13659
|
var TakeoverDrawerRenderer = (props) => {
|
|
13659
13660
|
const { registerTakeoverStackId, unregisterTakeoverStackId } = useDrawer();
|
|
13660
|
-
|
|
13661
|
+
useEffect6(() => {
|
|
13661
13662
|
registerTakeoverStackId(TAKEOVER_STACK_ID);
|
|
13662
13663
|
return () => {
|
|
13663
13664
|
unregisterTakeoverStackId(TAKEOVER_STACK_ID);
|
|
@@ -13667,7 +13668,7 @@ var TakeoverDrawerRenderer = (props) => {
|
|
|
13667
13668
|
};
|
|
13668
13669
|
|
|
13669
13670
|
// src/components/IconButton/IconButton.tsx
|
|
13670
|
-
import { forwardRef as
|
|
13671
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
13671
13672
|
|
|
13672
13673
|
// src/components/IconButton/IconButton.styles.ts
|
|
13673
13674
|
import { css as css44 } from "@emotion/react";
|
|
@@ -13698,7 +13699,7 @@ var variants = {
|
|
|
13698
13699
|
|
|
13699
13700
|
// src/components/IconButton/IconButton.tsx
|
|
13700
13701
|
import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
|
|
13701
|
-
var IconButton =
|
|
13702
|
+
var IconButton = forwardRef5(
|
|
13702
13703
|
({ children, size = "md", variant = "square", ...props }, ref) => {
|
|
13703
13704
|
return /* @__PURE__ */ jsx48(Button, { ref, css: [iconButton, variants[variant], sizes[size]], ...props, children });
|
|
13704
13705
|
}
|
|
@@ -13706,7 +13707,7 @@ var IconButton = forwardRef4(
|
|
|
13706
13707
|
IconButton.displayName = "IconButton";
|
|
13707
13708
|
|
|
13708
13709
|
// src/components/Image/Image.tsx
|
|
13709
|
-
import { useCallback as useCallback2, useEffect as
|
|
13710
|
+
import { useCallback as useCallback2, useEffect as useEffect7, useState as useState7 } from "react";
|
|
13710
13711
|
|
|
13711
13712
|
// src/components/Input/styles/CaptionText.styles.ts
|
|
13712
13713
|
import { css as css45 } from "@emotion/react";
|
|
@@ -13725,7 +13726,7 @@ var Caption = ({ children, testId, dynamicSize = false, ...props }) => {
|
|
|
13725
13726
|
};
|
|
13726
13727
|
|
|
13727
13728
|
// src/components/Input/CheckboxWithInfo.tsx
|
|
13728
|
-
import { forwardRef as
|
|
13729
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
13729
13730
|
|
|
13730
13731
|
// src/components/Input/styles/CheckboxWithInfo.styles.ts
|
|
13731
13732
|
import { css as css46 } from "@emotion/react";
|
|
@@ -13807,7 +13808,7 @@ var InfoDialog = ({ message }) => {
|
|
|
13807
13808
|
/* @__PURE__ */ jsx50("div", { role: "paragraph", css: InfoDialogMessage, className: "info-message", children: message })
|
|
13808
13809
|
] });
|
|
13809
13810
|
};
|
|
13810
|
-
var CheckboxWithInfo =
|
|
13811
|
+
var CheckboxWithInfo = forwardRef6(
|
|
13811
13812
|
({ label, name, info, ...props }, ref) => {
|
|
13812
13813
|
return /* @__PURE__ */ jsxs29("div", { css: CheckboxWithInfoContainer, children: [
|
|
13813
13814
|
/* @__PURE__ */ jsxs29("label", { css: CheckboxWithInfoLabel, children: [
|
|
@@ -14171,7 +14172,7 @@ function InputComboBox(props) {
|
|
|
14171
14172
|
// src/components/Input/InputInlineSelect.tsx
|
|
14172
14173
|
import { css as css52 } from "@emotion/react";
|
|
14173
14174
|
import { CgChevronDown as CgChevronDown2 } from "@react-icons/all-files/cg/CgChevronDown";
|
|
14174
|
-
import { useRef as useRef4, useState as
|
|
14175
|
+
import { useRef as useRef4, useState as useState6 } from "react";
|
|
14175
14176
|
|
|
14176
14177
|
// src/components/Input/styles/InputInlineSelect.styles.ts
|
|
14177
14178
|
import { css as css51 } from "@emotion/react";
|
|
@@ -14250,7 +14251,7 @@ var InputInlineSelect = ({
|
|
|
14250
14251
|
...props
|
|
14251
14252
|
}) => {
|
|
14252
14253
|
var _a;
|
|
14253
|
-
const [menuVisible, setMenuVisible] =
|
|
14254
|
+
const [menuVisible, setMenuVisible] = useState6(false);
|
|
14254
14255
|
const divRef = useRef4(null);
|
|
14255
14256
|
useOutsideClick(divRef, () => setMenuVisible(false));
|
|
14256
14257
|
const selected = options.find((option) => option.value === value);
|
|
@@ -14360,7 +14361,7 @@ var InputKeywordSearch = ({
|
|
|
14360
14361
|
};
|
|
14361
14362
|
|
|
14362
14363
|
// src/components/Input/InputSelect.tsx
|
|
14363
|
-
import { Fragment as
|
|
14364
|
+
import { Fragment as Fragment8, jsx as jsx60, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
|
|
14364
14365
|
var InputSelect = ({
|
|
14365
14366
|
label,
|
|
14366
14367
|
defaultOption,
|
|
@@ -14382,7 +14383,7 @@ var InputSelect = ({
|
|
|
14382
14383
|
css: [inputContainer, typeof classNameContainer === "object" ? classNameContainer : void 0],
|
|
14383
14384
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
14384
14385
|
children: [
|
|
14385
|
-
showLabel ? /* @__PURE__ */ jsx60(
|
|
14386
|
+
showLabel ? /* @__PURE__ */ jsx60(Fragment8, { children: /* @__PURE__ */ jsxs36(
|
|
14386
14387
|
Label,
|
|
14387
14388
|
{
|
|
14388
14389
|
htmlFor: props.id,
|
|
@@ -14508,11 +14509,11 @@ var SuccessMessage = ({ message, testId, ...props }) => {
|
|
|
14508
14509
|
};
|
|
14509
14510
|
|
|
14510
14511
|
// src/components/Input/Textarea.tsx
|
|
14511
|
-
import { forwardRef as
|
|
14512
|
-
import { Fragment as
|
|
14513
|
-
var Textarea =
|
|
14512
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
14513
|
+
import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
|
|
14514
|
+
var Textarea = forwardRef10(
|
|
14514
14515
|
({ label, icon, id, caption, showLabel = true, errorMessage, warningMessage, ...props }, ref) => {
|
|
14515
|
-
return /* @__PURE__ */ jsxs39(
|
|
14516
|
+
return /* @__PURE__ */ jsxs39(Fragment9, { children: [
|
|
14516
14517
|
showLabel ? /* @__PURE__ */ jsx64("label", { htmlFor: id, css: [labelText], children: label }) : null,
|
|
14517
14518
|
/* @__PURE__ */ jsxs39("div", { css: [inputContainer], children: [
|
|
14518
14519
|
/* @__PURE__ */ jsx64(
|
|
@@ -14616,7 +14617,7 @@ var ImageBroken = ({ width, height, ...props }) => {
|
|
|
14616
14617
|
};
|
|
14617
14618
|
|
|
14618
14619
|
// src/components/Image/Image.tsx
|
|
14619
|
-
import { Fragment as
|
|
14620
|
+
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
|
|
14620
14621
|
var MIN_LOADING_MS = 100;
|
|
14621
14622
|
function Image({
|
|
14622
14623
|
alt,
|
|
@@ -14628,8 +14629,8 @@ function Image({
|
|
|
14628
14629
|
height,
|
|
14629
14630
|
...imgAttribs
|
|
14630
14631
|
}) {
|
|
14631
|
-
const [loading, setLoading] =
|
|
14632
|
-
const [loadErrorText, setLoadErrorText] =
|
|
14632
|
+
const [loading, setLoading] = useState7(true);
|
|
14633
|
+
const [loadErrorText, setLoadErrorText] = useState7("");
|
|
14633
14634
|
const errorText = "The text you provided is not a valid URL";
|
|
14634
14635
|
const updateImageSrc = useCallback2(() => {
|
|
14635
14636
|
let message = "";
|
|
@@ -14649,7 +14650,7 @@ function Image({
|
|
|
14649
14650
|
}
|
|
14650
14651
|
setLoadErrorText(message);
|
|
14651
14652
|
}, [setLoadErrorText, src]);
|
|
14652
|
-
|
|
14653
|
+
useEffect7(() => {
|
|
14653
14654
|
updateImageSrc();
|
|
14654
14655
|
}, [src]);
|
|
14655
14656
|
const handleLoadEvent = () => {
|
|
@@ -14695,7 +14696,7 @@ function Image({
|
|
|
14695
14696
|
onError: handleErrorEvent
|
|
14696
14697
|
}
|
|
14697
14698
|
) : null,
|
|
14698
|
-
src && loadErrorText ? /* @__PURE__ */ jsxs41(
|
|
14699
|
+
src && loadErrorText ? /* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
14699
14700
|
/* @__PURE__ */ jsx66(
|
|
14700
14701
|
ImageBroken,
|
|
14701
14702
|
{
|
|
@@ -14975,7 +14976,7 @@ var EditTeamIntegrationTile = ({
|
|
|
14975
14976
|
// src/components/Tiles/IntegrationComingSoon.tsx
|
|
14976
14977
|
import { css as css57 } from "@emotion/react";
|
|
14977
14978
|
import { CgHeart } from "@react-icons/all-files/cg/CgHeart";
|
|
14978
|
-
import { useEffect as
|
|
14979
|
+
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
14979
14980
|
import { jsx as jsx71, jsxs as jsxs45 } from "@emotion/react/jsx-runtime";
|
|
14980
14981
|
var IntegrationComingSoon = ({
|
|
14981
14982
|
name,
|
|
@@ -14985,12 +14986,12 @@ var IntegrationComingSoon = ({
|
|
|
14985
14986
|
timing = 1e3,
|
|
14986
14987
|
...props
|
|
14987
14988
|
}) => {
|
|
14988
|
-
const [upVote, setUpVote] =
|
|
14989
|
+
const [upVote, setUpVote] = useState8(false);
|
|
14989
14990
|
const handleUpVoteInteraction = () => {
|
|
14990
14991
|
setUpVote((prev) => !prev);
|
|
14991
14992
|
onUpVoteClick();
|
|
14992
14993
|
};
|
|
14993
|
-
|
|
14994
|
+
useEffect8(() => {
|
|
14994
14995
|
if (upVote) {
|
|
14995
14996
|
const timer = setTimeout(() => setUpVote(false), timing);
|
|
14996
14997
|
return () => {
|
|
@@ -15086,10 +15087,10 @@ var IntegrationLoadingFrame = css58`
|
|
|
15086
15087
|
`;
|
|
15087
15088
|
|
|
15088
15089
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
15089
|
-
import { Fragment as
|
|
15090
|
+
import { Fragment as Fragment11, jsx as jsx72, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
15090
15091
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
15091
15092
|
const componentCount = Array.from(Array(count).keys());
|
|
15092
|
-
return /* @__PURE__ */ jsx72(
|
|
15093
|
+
return /* @__PURE__ */ jsx72(Fragment11, { children: componentCount.map((i) => /* @__PURE__ */ jsxs46("div", { css: IntegrationLoadingTileContainer, children: [
|
|
15093
15094
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
15094
15095
|
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
15095
15096
|
] }, i)) });
|
|
@@ -15215,11 +15216,24 @@ var Tile = css60`
|
|
|
15215
15216
|
pointer-events: none;
|
|
15216
15217
|
}
|
|
15217
15218
|
`;
|
|
15219
|
+
var TileIsSelected = css60`
|
|
15220
|
+
border: calc(${tileBorderSize} + 1px) solid var(--primary-action-active);
|
|
15221
|
+
z-index: 1; // Used to elevate active state border over other Tile borders
|
|
15222
|
+
`;
|
|
15218
15223
|
|
|
15219
15224
|
// src/components/Tiles/Tile.tsx
|
|
15220
15225
|
import { jsx as jsx75 } from "@emotion/react/jsx-runtime";
|
|
15221
|
-
var Tile2 = ({ children, disabled: disabled2, ...props }) => {
|
|
15222
|
-
return /* @__PURE__ */ jsx75(
|
|
15226
|
+
var Tile2 = ({ children, disabled: disabled2, isSelected, ...props }) => {
|
|
15227
|
+
return /* @__PURE__ */ jsx75(
|
|
15228
|
+
"button",
|
|
15229
|
+
{
|
|
15230
|
+
type: "button",
|
|
15231
|
+
css: [Tile, isSelected ? TileIsSelected : void 0],
|
|
15232
|
+
disabled: disabled2,
|
|
15233
|
+
...props,
|
|
15234
|
+
children
|
|
15235
|
+
}
|
|
15236
|
+
);
|
|
15223
15237
|
};
|
|
15224
15238
|
|
|
15225
15239
|
// src/components/Tiles/styles/TileContainer.styles.ts
|
|
@@ -15318,7 +15332,7 @@ var IntegrationModalHeaderContentWrapper = css63`
|
|
|
15318
15332
|
`;
|
|
15319
15333
|
|
|
15320
15334
|
// src/components/IntegrationModalHeader/IntegrationModalHeader.tsx
|
|
15321
|
-
import { Fragment as
|
|
15335
|
+
import { Fragment as Fragment12, jsx as jsx78, jsxs as jsxs49 } from "@emotion/react/jsx-runtime";
|
|
15322
15336
|
var HexModalBackground = ({ ...props }) => {
|
|
15323
15337
|
return /* @__PURE__ */ jsxs49(
|
|
15324
15338
|
"svg",
|
|
@@ -15358,14 +15372,14 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15358
15372
|
}
|
|
15359
15373
|
);
|
|
15360
15374
|
};
|
|
15361
|
-
var IntegrationModalHeader = ({ icon, name, menu
|
|
15362
|
-
return /* @__PURE__ */ jsxs49(
|
|
15375
|
+
var IntegrationModalHeader = ({ icon, name, menu, children }) => {
|
|
15376
|
+
return /* @__PURE__ */ jsxs49(Fragment12, { children: [
|
|
15363
15377
|
/* @__PURE__ */ jsx78(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
15364
15378
|
/* @__PURE__ */ jsx78("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs49("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
15365
15379
|
icon ? /* @__PURE__ */ jsx78(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
15366
15380
|
/* @__PURE__ */ jsx78(Heading, { level: 3, css: IntegrationModalHeaderTitle, "data-testid": "integration-modal-title", children: name || "Create Team Integration" }),
|
|
15367
|
-
|
|
15368
|
-
|
|
15381
|
+
menu ? /* @__PURE__ */ jsxs49("div", { css: IntegrationModalHeaderMenuPlacement, children: [
|
|
15382
|
+
menu,
|
|
15369
15383
|
" "
|
|
15370
15384
|
] }) : null
|
|
15371
15385
|
] }) }),
|
|
@@ -15783,7 +15797,7 @@ var LoadingIndicator = ({
|
|
|
15783
15797
|
};
|
|
15784
15798
|
|
|
15785
15799
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
15786
|
-
import { useCallback as useCallback3, useEffect as
|
|
15800
|
+
import { useCallback as useCallback3, useEffect as useEffect9, useRef as useRef5 } from "react";
|
|
15787
15801
|
|
|
15788
15802
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
15789
15803
|
import { css as css70 } from "@emotion/react";
|
|
@@ -15836,7 +15850,7 @@ var LoadingOverlay = ({
|
|
|
15836
15850
|
(_c = lottieRef.current) == null ? void 0 : _c.stop();
|
|
15837
15851
|
}
|
|
15838
15852
|
}, [isPaused]);
|
|
15839
|
-
|
|
15853
|
+
useEffect9(() => {
|
|
15840
15854
|
var _a, _b, _c, _d, _e, _f;
|
|
15841
15855
|
if (!isPaused && ((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
15842
15856
|
(_c = lottieRef.current) == null ? void 0 : _c.play();
|
|
@@ -15945,7 +15959,7 @@ var Popover = css71`
|
|
|
15945
15959
|
`;
|
|
15946
15960
|
|
|
15947
15961
|
// src/components/Popover/Popover.tsx
|
|
15948
|
-
import { Fragment as
|
|
15962
|
+
import { Fragment as Fragment13, jsx as jsx87, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
15949
15963
|
var Popover2 = ({
|
|
15950
15964
|
iconColor = "action",
|
|
15951
15965
|
icon = "info",
|
|
@@ -15959,7 +15973,7 @@ var Popover2 = ({
|
|
|
15959
15973
|
...otherProps
|
|
15960
15974
|
}) => {
|
|
15961
15975
|
const popover = usePopoverState({ placement });
|
|
15962
|
-
return /* @__PURE__ */ jsxs57(
|
|
15976
|
+
return /* @__PURE__ */ jsxs57(Fragment13, { children: [
|
|
15963
15977
|
/* @__PURE__ */ jsx87(
|
|
15964
15978
|
PopoverDisclosure,
|
|
15965
15979
|
{
|
|
@@ -15967,7 +15981,7 @@ var Popover2 = ({
|
|
|
15967
15981
|
css: [PopoverBtn, trigger ? void 0 : PopoverDefaulterTriggerBtn],
|
|
15968
15982
|
title: buttonText,
|
|
15969
15983
|
"data-testid": testId,
|
|
15970
|
-
children: trigger ? trigger : /* @__PURE__ */ jsxs57(
|
|
15984
|
+
children: trigger ? trigger : /* @__PURE__ */ jsxs57(Fragment13, { children: [
|
|
15971
15985
|
/* @__PURE__ */ jsx87(Icon, { icon, iconColor, size: iconSize }),
|
|
15972
15986
|
/* @__PURE__ */ jsx87("span", { hidden: true, children: buttonText })
|
|
15973
15987
|
] })
|
|
@@ -16297,8 +16311,8 @@ function Pagination({
|
|
|
16297
16311
|
}
|
|
16298
16312
|
|
|
16299
16313
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
16300
|
-
import { createContext as
|
|
16301
|
-
var ParameterShellContext =
|
|
16314
|
+
import { createContext as createContext4, useContext as useContext5 } from "react";
|
|
16315
|
+
var ParameterShellContext = createContext4({
|
|
16302
16316
|
id: "",
|
|
16303
16317
|
label: "",
|
|
16304
16318
|
hiddenLabel: void 0,
|
|
@@ -16307,7 +16321,7 @@ var ParameterShellContext = createContext5({
|
|
|
16307
16321
|
}
|
|
16308
16322
|
});
|
|
16309
16323
|
var useParameterShell = () => {
|
|
16310
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } =
|
|
16324
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useContext5(ParameterShellContext);
|
|
16311
16325
|
return {
|
|
16312
16326
|
id,
|
|
16313
16327
|
label,
|
|
@@ -16708,7 +16722,7 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
16708
16722
|
};
|
|
16709
16723
|
|
|
16710
16724
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
16711
|
-
import { forwardRef as
|
|
16725
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
16712
16726
|
|
|
16713
16727
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
16714
16728
|
import { css as css78 } from "@emotion/react";
|
|
@@ -16732,7 +16746,7 @@ var fieldsetLegend2 = css78`
|
|
|
16732
16746
|
|
|
16733
16747
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
16734
16748
|
import { jsx as jsx94, jsxs as jsxs63 } from "@emotion/react/jsx-runtime";
|
|
16735
|
-
var ParameterGroup =
|
|
16749
|
+
var ParameterGroup = forwardRef11(
|
|
16736
16750
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
16737
16751
|
return /* @__PURE__ */ jsxs63("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
16738
16752
|
/* @__PURE__ */ jsx94("legend", { css: fieldsetLegend2, children: legend }),
|
|
@@ -16742,10 +16756,10 @@ var ParameterGroup = forwardRef10(
|
|
|
16742
16756
|
);
|
|
16743
16757
|
|
|
16744
16758
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
16745
|
-
import { forwardRef as
|
|
16759
|
+
import { forwardRef as forwardRef13, useDeferredValue } from "react";
|
|
16746
16760
|
|
|
16747
16761
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16748
|
-
import { useState as
|
|
16762
|
+
import { useState as useState9 } from "react";
|
|
16749
16763
|
import { createPortal as createPortal2 } from "react-dom";
|
|
16750
16764
|
|
|
16751
16765
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
@@ -16786,9 +16800,9 @@ var previewModalImage = css79`
|
|
|
16786
16800
|
`;
|
|
16787
16801
|
|
|
16788
16802
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16789
|
-
import { Fragment as
|
|
16803
|
+
import { Fragment as Fragment14, jsx as jsx95, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
16790
16804
|
function ParameterImagePreview({ imageSrc }) {
|
|
16791
|
-
const [showModal, setShowModal] =
|
|
16805
|
+
const [showModal, setShowModal] = useState9(false);
|
|
16792
16806
|
return imageSrc ? /* @__PURE__ */ jsxs64("div", { css: previewWrapper, children: [
|
|
16793
16807
|
/* @__PURE__ */ jsx95(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
16794
16808
|
/* @__PURE__ */ jsx95(
|
|
@@ -16804,7 +16818,7 @@ function ParameterImagePreview({ imageSrc }) {
|
|
|
16804
16818
|
] }) : null;
|
|
16805
16819
|
}
|
|
16806
16820
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
16807
|
-
return open ? /* @__PURE__ */ jsx95(
|
|
16821
|
+
return open ? /* @__PURE__ */ jsx95(Fragment14, { children: createPortal2(
|
|
16808
16822
|
/* @__PURE__ */ jsx95(
|
|
16809
16823
|
Modal,
|
|
16810
16824
|
{
|
|
@@ -16821,7 +16835,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
16821
16835
|
|
|
16822
16836
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
16823
16837
|
import { css as css81 } from "@emotion/react";
|
|
16824
|
-
import { useState as
|
|
16838
|
+
import { useState as useState10 } from "react";
|
|
16825
16839
|
|
|
16826
16840
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
16827
16841
|
import { jsx as jsx96 } from "@emotion/react/jsx-runtime";
|
|
@@ -16830,9 +16844,9 @@ var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
|
16830
16844
|
};
|
|
16831
16845
|
|
|
16832
16846
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
16833
|
-
import { forwardRef as
|
|
16847
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
16834
16848
|
import { jsx as jsx97 } from "@emotion/react/jsx-runtime";
|
|
16835
|
-
var ParameterMenuButton =
|
|
16849
|
+
var ParameterMenuButton = forwardRef12(
|
|
16836
16850
|
({ label, children }, ref) => {
|
|
16837
16851
|
return /* @__PURE__ */ jsx97(
|
|
16838
16852
|
Menu,
|
|
@@ -16943,7 +16957,7 @@ var ParameterShell = ({
|
|
|
16943
16957
|
children,
|
|
16944
16958
|
...props
|
|
16945
16959
|
}) => {
|
|
16946
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
16960
|
+
const [manualErrorMessage, setManualErrorMessage] = useState10(void 0);
|
|
16947
16961
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
16948
16962
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
16949
16963
|
return /* @__PURE__ */ jsxs65("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -17003,8 +17017,8 @@ var ParameterShellPlaceholder = ({ children }) => {
|
|
|
17003
17017
|
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx98(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx98("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx98("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
17004
17018
|
|
|
17005
17019
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
17006
|
-
import { Fragment as
|
|
17007
|
-
var ParameterImage =
|
|
17020
|
+
import { Fragment as Fragment15, jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17021
|
+
var ParameterImage = forwardRef13(
|
|
17008
17022
|
({ children, ...props }, ref) => {
|
|
17009
17023
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17010
17024
|
return /* @__PURE__ */ jsxs66(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -17013,11 +17027,11 @@ var ParameterImage = forwardRef12(
|
|
|
17013
17027
|
] });
|
|
17014
17028
|
}
|
|
17015
17029
|
);
|
|
17016
|
-
var ParameterImageInner =
|
|
17030
|
+
var ParameterImageInner = forwardRef13((props, ref) => {
|
|
17017
17031
|
const { value } = props;
|
|
17018
17032
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
17019
17033
|
const deferredValue = useDeferredValue(value);
|
|
17020
|
-
return /* @__PURE__ */ jsxs66(
|
|
17034
|
+
return /* @__PURE__ */ jsxs66(Fragment15, { children: [
|
|
17021
17035
|
/* @__PURE__ */ jsx99(
|
|
17022
17036
|
"input",
|
|
17023
17037
|
{
|
|
@@ -17035,13 +17049,13 @@ var ParameterImageInner = forwardRef12((props, ref) => {
|
|
|
17035
17049
|
});
|
|
17036
17050
|
|
|
17037
17051
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
17038
|
-
import { forwardRef as
|
|
17052
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
17039
17053
|
import { jsx as jsx100 } from "@emotion/react/jsx-runtime";
|
|
17040
|
-
var ParameterInput =
|
|
17054
|
+
var ParameterInput = forwardRef14((props, ref) => {
|
|
17041
17055
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17042
17056
|
return /* @__PURE__ */ jsx100(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ jsx100(ParameterInputInner, { ref, ...innerProps }) });
|
|
17043
17057
|
});
|
|
17044
|
-
var ParameterInputInner =
|
|
17058
|
+
var ParameterInputInner = forwardRef14(
|
|
17045
17059
|
({ ...props }, ref) => {
|
|
17046
17060
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17047
17061
|
return /* @__PURE__ */ jsx100(
|
|
@@ -17060,9 +17074,9 @@ var ParameterInputInner = forwardRef13(
|
|
|
17060
17074
|
);
|
|
17061
17075
|
|
|
17062
17076
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
17063
|
-
import { forwardRef as
|
|
17077
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
17064
17078
|
import { jsx as jsx101, jsxs as jsxs67 } from "@emotion/react/jsx-runtime";
|
|
17065
|
-
var ParameterLink =
|
|
17079
|
+
var ParameterLink = forwardRef15(
|
|
17066
17080
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
17067
17081
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17068
17082
|
return /* @__PURE__ */ jsx101(
|
|
@@ -17085,7 +17099,7 @@ var ParameterLink = forwardRef14(
|
|
|
17085
17099
|
);
|
|
17086
17100
|
}
|
|
17087
17101
|
);
|
|
17088
|
-
var ParameterLinkInner =
|
|
17102
|
+
var ParameterLinkInner = forwardRef15(
|
|
17089
17103
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
17090
17104
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17091
17105
|
if (!props.value)
|
|
@@ -17132,7 +17146,7 @@ var ParameterLinkInner = forwardRef14(
|
|
|
17132
17146
|
);
|
|
17133
17147
|
|
|
17134
17148
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
17135
|
-
import { Fragment as
|
|
17149
|
+
import { Fragment as Fragment16, jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17136
17150
|
var ParameterNameAndPublicIdInput = ({
|
|
17137
17151
|
id,
|
|
17138
17152
|
onBlur,
|
|
@@ -17158,7 +17172,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
17158
17172
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
17159
17173
|
};
|
|
17160
17174
|
autoFocus == null ? void 0 : autoFocus();
|
|
17161
|
-
return /* @__PURE__ */ jsxs68(
|
|
17175
|
+
return /* @__PURE__ */ jsxs68(Fragment16, { children: [
|
|
17162
17176
|
/* @__PURE__ */ jsx102(
|
|
17163
17177
|
ParameterInput,
|
|
17164
17178
|
{
|
|
@@ -17323,7 +17337,7 @@ var getLabelForElement = (type) => {
|
|
|
17323
17337
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17324
17338
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
17325
17339
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
17326
|
-
import { useEffect as
|
|
17340
|
+
import { useEffect as useEffect14, useRef as useRef7 } from "react";
|
|
17327
17341
|
|
|
17328
17342
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17329
17343
|
import { CodeNode } from "@lexical/code";
|
|
@@ -17344,10 +17358,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
17344
17358
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
17345
17359
|
import { mergeRegister } from "@lexical/utils";
|
|
17346
17360
|
import { ParagraphNode } from "lexical";
|
|
17347
|
-
import { useEffect as
|
|
17361
|
+
import { useEffect as useEffect10 } from "react";
|
|
17348
17362
|
function DisableStylesPlugin() {
|
|
17349
17363
|
const [editor] = useLexicalComposerContext();
|
|
17350
|
-
|
|
17364
|
+
useEffect10(() => {
|
|
17351
17365
|
return mergeRegister(
|
|
17352
17366
|
// Disable text alignment on paragraph nodes
|
|
17353
17367
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -17556,7 +17570,7 @@ import {
|
|
|
17556
17570
|
ElementNode as ElementNode2,
|
|
17557
17571
|
FOCUS_COMMAND
|
|
17558
17572
|
} from "lexical";
|
|
17559
|
-
import { useCallback as useCallback5, useEffect as
|
|
17573
|
+
import { useCallback as useCallback5, useEffect as useEffect11, useRef as useRef6, useState as useState11 } from "react";
|
|
17560
17574
|
|
|
17561
17575
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
17562
17576
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -17594,7 +17608,7 @@ var getSelectedNode = (selection) => {
|
|
|
17594
17608
|
};
|
|
17595
17609
|
|
|
17596
17610
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
17597
|
-
import { Fragment as
|
|
17611
|
+
import { Fragment as Fragment17, jsx as jsx103, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
17598
17612
|
var isProjectMapLinkValue = (value) => {
|
|
17599
17613
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
17600
17614
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -17899,17 +17913,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
17899
17913
|
return path;
|
|
17900
17914
|
};
|
|
17901
17915
|
const [editor] = useLexicalComposerContext2();
|
|
17902
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
17916
|
+
const [linkPopoverState, setLinkPopoverState] = useState11();
|
|
17903
17917
|
const linkPopoverElRef = useRef6(null);
|
|
17904
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
17905
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
17906
|
-
|
|
17918
|
+
const [isEditorFocused, setIsEditorFocused] = useState11(false);
|
|
17919
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState11(false);
|
|
17920
|
+
useEffect11(() => {
|
|
17907
17921
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
17908
17922
|
setLinkPopoverState(void 0);
|
|
17909
17923
|
return;
|
|
17910
17924
|
}
|
|
17911
17925
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
17912
|
-
|
|
17926
|
+
useEffect11(() => {
|
|
17913
17927
|
if (!editor.hasNodes([LinkNode])) {
|
|
17914
17928
|
throw new Error("LinkNode not registered on editor");
|
|
17915
17929
|
}
|
|
@@ -18010,7 +18024,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18010
18024
|
}
|
|
18011
18025
|
});
|
|
18012
18026
|
}, [editor]);
|
|
18013
|
-
|
|
18027
|
+
useEffect11(() => {
|
|
18014
18028
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18015
18029
|
requestAnimationFrame(() => {
|
|
18016
18030
|
editorState.read(() => {
|
|
@@ -18037,7 +18051,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18037
18051
|
});
|
|
18038
18052
|
});
|
|
18039
18053
|
};
|
|
18040
|
-
return /* @__PURE__ */ jsxs69(
|
|
18054
|
+
return /* @__PURE__ */ jsxs69(Fragment17, { children: [
|
|
18041
18055
|
/* @__PURE__ */ jsx103(
|
|
18042
18056
|
NodeEventPlugin,
|
|
18043
18057
|
{
|
|
@@ -18102,7 +18116,7 @@ import {
|
|
|
18102
18116
|
COMMAND_PRIORITY_CRITICAL,
|
|
18103
18117
|
INDENT_CONTENT_COMMAND
|
|
18104
18118
|
} from "lexical";
|
|
18105
|
-
import { useEffect as
|
|
18119
|
+
import { useEffect as useEffect12 } from "react";
|
|
18106
18120
|
import { jsx as jsx104 } from "@emotion/react/jsx-runtime";
|
|
18107
18121
|
function isIndentPermitted(maxDepth) {
|
|
18108
18122
|
const selection = $getSelection2();
|
|
@@ -18126,7 +18140,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
18126
18140
|
}
|
|
18127
18141
|
function ListIndentPlugin({ maxDepth }) {
|
|
18128
18142
|
const [editor] = useLexicalComposerContext3();
|
|
18129
|
-
|
|
18143
|
+
useEffect12(() => {
|
|
18130
18144
|
return editor.registerCommand(
|
|
18131
18145
|
INDENT_CONTENT_COMMAND,
|
|
18132
18146
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -18159,8 +18173,8 @@ import {
|
|
|
18159
18173
|
FORMAT_TEXT_COMMAND,
|
|
18160
18174
|
SELECTION_CHANGE_COMMAND
|
|
18161
18175
|
} from "lexical";
|
|
18162
|
-
import { useCallback as useCallback6, useEffect as
|
|
18163
|
-
import { Fragment as
|
|
18176
|
+
import { useCallback as useCallback6, useEffect as useEffect13, useMemo as useMemo3, useState as useState12 } from "react";
|
|
18177
|
+
import { Fragment as Fragment18, jsx as jsx105, jsxs as jsxs70 } from "@emotion/react/jsx-runtime";
|
|
18164
18178
|
var toolbar = css84`
|
|
18165
18179
|
background: var(--gray-50);
|
|
18166
18180
|
border-radius: var(--rounded-base);
|
|
@@ -18302,7 +18316,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18302
18316
|
setIsLink(false);
|
|
18303
18317
|
}
|
|
18304
18318
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
18305
|
-
|
|
18319
|
+
useEffect13(() => {
|
|
18306
18320
|
return editor.registerCommand(
|
|
18307
18321
|
SELECTION_CHANGE_COMMAND,
|
|
18308
18322
|
(_payload) => {
|
|
@@ -18312,7 +18326,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18312
18326
|
COMMAND_PRIORITY_CRITICAL2
|
|
18313
18327
|
);
|
|
18314
18328
|
}, [editor, updateToolbar]);
|
|
18315
|
-
|
|
18329
|
+
useEffect13(() => {
|
|
18316
18330
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18317
18331
|
requestAnimationFrame(() => {
|
|
18318
18332
|
editorState.read(() => {
|
|
@@ -18397,7 +18411,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
18397
18411
|
children: /* @__PURE__ */ jsx105(RichTextToolbarIcon, { icon: "link" })
|
|
18398
18412
|
}
|
|
18399
18413
|
) }) : null,
|
|
18400
|
-
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(
|
|
18414
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs70(Fragment18, { children: [
|
|
18401
18415
|
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx105(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx105(
|
|
18402
18416
|
"button",
|
|
18403
18417
|
{
|
|
@@ -18470,7 +18484,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18470
18484
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
18471
18485
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
18472
18486
|
);
|
|
18473
|
-
const [activeFormats, setActiveFormats] =
|
|
18487
|
+
const [activeFormats, setActiveFormats] = useState12([]);
|
|
18474
18488
|
const visibleFormatsWithIcon = useMemo3(() => {
|
|
18475
18489
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
18476
18490
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
@@ -18491,7 +18505,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18491
18505
|
});
|
|
18492
18506
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
18493
18507
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
18494
|
-
const [activeElement, setActiveElement] =
|
|
18508
|
+
const [activeElement, setActiveElement] = useState12("paragraph");
|
|
18495
18509
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
18496
18510
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
18497
18511
|
);
|
|
@@ -18506,7 +18520,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18506
18520
|
}
|
|
18507
18521
|
);
|
|
18508
18522
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
18509
|
-
const [isLink, setIsLink] =
|
|
18523
|
+
const [isLink, setIsLink] = useState12(false);
|
|
18510
18524
|
const linkElementVisible = useMemo3(() => {
|
|
18511
18525
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
18512
18526
|
}, [isLink, enabledBuiltInElements]);
|
|
@@ -18560,7 +18574,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
18560
18574
|
};
|
|
18561
18575
|
|
|
18562
18576
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18563
|
-
import { Fragment as
|
|
18577
|
+
import { Fragment as Fragment19, jsx as jsx106, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
18564
18578
|
var ParameterRichText = ({
|
|
18565
18579
|
label,
|
|
18566
18580
|
labelLeadingIcon,
|
|
@@ -18617,7 +18631,7 @@ var ParameterRichText = ({
|
|
|
18617
18631
|
children
|
|
18618
18632
|
}
|
|
18619
18633
|
),
|
|
18620
|
-
menuItems ? /* @__PURE__ */ jsx106(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx106(
|
|
18634
|
+
menuItems ? /* @__PURE__ */ jsx106(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx106(Fragment19, { children: menuItems }) }) : null
|
|
18621
18635
|
]
|
|
18622
18636
|
}
|
|
18623
18637
|
);
|
|
@@ -18728,7 +18742,7 @@ var ParameterRichTextInner = ({
|
|
|
18728
18742
|
},
|
|
18729
18743
|
editable: !readOnly
|
|
18730
18744
|
};
|
|
18731
|
-
return /* @__PURE__ */ jsxs71(
|
|
18745
|
+
return /* @__PURE__ */ jsxs71(Fragment19, { children: [
|
|
18732
18746
|
/* @__PURE__ */ jsx106("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx106(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx106(
|
|
18733
18747
|
RichText,
|
|
18734
18748
|
{
|
|
@@ -18768,12 +18782,12 @@ var RichText = ({
|
|
|
18768
18782
|
}) => {
|
|
18769
18783
|
const editorContainerRef = useRef7(null);
|
|
18770
18784
|
const [editor] = useLexicalComposerContext5();
|
|
18771
|
-
|
|
18785
|
+
useEffect14(() => {
|
|
18772
18786
|
if (onRichTextInit) {
|
|
18773
18787
|
onRichTextInit(editor);
|
|
18774
18788
|
}
|
|
18775
18789
|
}, [editor, onRichTextInit]);
|
|
18776
|
-
|
|
18790
|
+
useEffect14(() => {
|
|
18777
18791
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
18778
18792
|
requestAnimationFrame(() => {
|
|
18779
18793
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -18785,7 +18799,7 @@ var RichText = ({
|
|
|
18785
18799
|
removeUpdateListener();
|
|
18786
18800
|
};
|
|
18787
18801
|
}, []);
|
|
18788
|
-
return /* @__PURE__ */ jsxs71(
|
|
18802
|
+
return /* @__PURE__ */ jsxs71(Fragment19, { children: [
|
|
18789
18803
|
readOnly ? null : /* @__PURE__ */ jsx106(RichTextToolbar_default, { config, customControls }),
|
|
18790
18804
|
/* @__PURE__ */ jsxs71("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
18791
18805
|
/* @__PURE__ */ jsx106(
|
|
@@ -18811,21 +18825,21 @@ var RichText = ({
|
|
|
18811
18825
|
/* @__PURE__ */ jsx106(ListIndentPlugin, { maxDepth: 4 }),
|
|
18812
18826
|
/* @__PURE__ */ jsx106(DisableStylesPlugin, {}),
|
|
18813
18827
|
/* @__PURE__ */ jsx106(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
18814
|
-
/* @__PURE__ */ jsx106(
|
|
18828
|
+
/* @__PURE__ */ jsx106(Fragment19, { children })
|
|
18815
18829
|
] })
|
|
18816
18830
|
] });
|
|
18817
18831
|
};
|
|
18818
18832
|
|
|
18819
18833
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
18820
|
-
import { forwardRef as
|
|
18834
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
18821
18835
|
import { jsx as jsx107, jsxs as jsxs72 } from "@emotion/react/jsx-runtime";
|
|
18822
|
-
var ParameterSelect =
|
|
18836
|
+
var ParameterSelect = forwardRef16(
|
|
18823
18837
|
({ defaultOption, options, ...props }, ref) => {
|
|
18824
18838
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18825
18839
|
return /* @__PURE__ */ jsx107(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx107(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
18826
18840
|
}
|
|
18827
18841
|
);
|
|
18828
|
-
var ParameterSelectInner =
|
|
18842
|
+
var ParameterSelectInner = forwardRef16(
|
|
18829
18843
|
({ defaultOption, options, ...props }, ref) => {
|
|
18830
18844
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18831
18845
|
return /* @__PURE__ */ jsxs72(
|
|
@@ -18849,13 +18863,13 @@ var ParameterSelectInner = forwardRef15(
|
|
|
18849
18863
|
);
|
|
18850
18864
|
|
|
18851
18865
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
18852
|
-
import { forwardRef as
|
|
18866
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
18853
18867
|
import { jsx as jsx108 } from "@emotion/react/jsx-runtime";
|
|
18854
|
-
var ParameterTextarea =
|
|
18868
|
+
var ParameterTextarea = forwardRef17((props, ref) => {
|
|
18855
18869
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18856
18870
|
return /* @__PURE__ */ jsx108(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx108(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
18857
18871
|
});
|
|
18858
|
-
var ParameterTextareaInner =
|
|
18872
|
+
var ParameterTextareaInner = forwardRef17(({ ...props }, ref) => {
|
|
18859
18873
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18860
18874
|
return /* @__PURE__ */ jsx108(
|
|
18861
18875
|
"textarea",
|
|
@@ -18870,13 +18884,13 @@ var ParameterTextareaInner = forwardRef16(({ ...props }, ref) => {
|
|
|
18870
18884
|
});
|
|
18871
18885
|
|
|
18872
18886
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
18873
|
-
import { forwardRef as
|
|
18887
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
18874
18888
|
import { jsx as jsx109, jsxs as jsxs73 } from "@emotion/react/jsx-runtime";
|
|
18875
|
-
var ParameterToggle =
|
|
18889
|
+
var ParameterToggle = forwardRef18((props, ref) => {
|
|
18876
18890
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18877
18891
|
return /* @__PURE__ */ jsx109(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx109(ParameterToggleInner, { ref, ...innerProps }) });
|
|
18878
18892
|
});
|
|
18879
|
-
var ParameterToggleInner =
|
|
18893
|
+
var ParameterToggleInner = forwardRef18(
|
|
18880
18894
|
({ ...props }, ref) => {
|
|
18881
18895
|
const { id, label } = useParameterShell();
|
|
18882
18896
|
return /* @__PURE__ */ jsxs73("label", { css: inputToggleLabel2, children: [
|
|
@@ -19418,14 +19432,14 @@ var SwitchText = css92`
|
|
|
19418
19432
|
`;
|
|
19419
19433
|
|
|
19420
19434
|
// src/components/Switch/Switch.tsx
|
|
19421
|
-
import { Fragment as
|
|
19435
|
+
import { Fragment as Fragment20, jsx as jsx114, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
19422
19436
|
var Switch = React23.forwardRef(
|
|
19423
19437
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
19424
19438
|
let additionalText = infoText;
|
|
19425
19439
|
if (infoText && toggleText) {
|
|
19426
19440
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
19427
19441
|
}
|
|
19428
|
-
return /* @__PURE__ */ jsxs76(
|
|
19442
|
+
return /* @__PURE__ */ jsxs76(Fragment20, { children: [
|
|
19429
19443
|
/* @__PURE__ */ jsxs76("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
19430
19444
|
/* @__PURE__ */ jsx114("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
19431
19445
|
/* @__PURE__ */ jsx114("span", { css: SwitchInputLabel, children: label })
|
|
@@ -19505,7 +19519,7 @@ var TableCellData = React24.forwardRef(
|
|
|
19505
19519
|
);
|
|
19506
19520
|
|
|
19507
19521
|
// src/components/Tabs/Tabs.tsx
|
|
19508
|
-
import { createContext as
|
|
19522
|
+
import { createContext as createContext5, useContext as useContext6, useEffect as useEffect15, useMemo as useMemo6 } from "react";
|
|
19509
19523
|
import {
|
|
19510
19524
|
Tab as ReakitTab,
|
|
19511
19525
|
TabList as ReakitTabList,
|
|
@@ -19540,9 +19554,9 @@ var tabButtonGroupStyles = css94`
|
|
|
19540
19554
|
|
|
19541
19555
|
// src/components/Tabs/Tabs.tsx
|
|
19542
19556
|
import { jsx as jsx116 } from "@emotion/react/jsx-runtime";
|
|
19543
|
-
var CurrentTabContext =
|
|
19557
|
+
var CurrentTabContext = createContext5(null);
|
|
19544
19558
|
var useCurrentTab = () => {
|
|
19545
|
-
const context =
|
|
19559
|
+
const context = useContext6(CurrentTabContext);
|
|
19546
19560
|
if (!context) {
|
|
19547
19561
|
throw new Error("This component can only be used inside <Tabs>");
|
|
19548
19562
|
}
|
|
@@ -19555,7 +19569,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19555
19569
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
19556
19570
|
}, [selectedId, useHashForState]);
|
|
19557
19571
|
const tab = useTabState({ ...props, selectedId: selected });
|
|
19558
|
-
|
|
19572
|
+
useEffect15(() => {
|
|
19559
19573
|
var _a;
|
|
19560
19574
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
19561
19575
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -19564,7 +19578,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19564
19578
|
window.history.pushState(null, "", hashValue);
|
|
19565
19579
|
}
|
|
19566
19580
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
19567
|
-
|
|
19581
|
+
useEffect15(() => {
|
|
19568
19582
|
if (selected && selected !== tab.selectedId) {
|
|
19569
19583
|
tab.setSelectedId(selected);
|
|
19570
19584
|
}
|
|
@@ -19759,9 +19773,9 @@ export {
|
|
|
19759
19773
|
LoadingOverlay,
|
|
19760
19774
|
MediaCard,
|
|
19761
19775
|
Menu,
|
|
19762
|
-
MenuContext,
|
|
19763
19776
|
MenuGroup,
|
|
19764
19777
|
MenuItem,
|
|
19778
|
+
MenuItemInner,
|
|
19765
19779
|
MenuItemSeparator,
|
|
19766
19780
|
Modal,
|
|
19767
19781
|
MultilineChip,
|
|
@@ -19906,7 +19920,6 @@ export {
|
|
|
19906
19920
|
useCurrentTab,
|
|
19907
19921
|
useDrawer,
|
|
19908
19922
|
useIconContext,
|
|
19909
|
-
useMenuContext,
|
|
19910
19923
|
useOutsideClick,
|
|
19911
19924
|
useParameterShell,
|
|
19912
19925
|
useShortcut,
|