@uniformdev/design-system 19.55.1-alpha.8 → 19.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +98 -69
- package/dist/index.js +283 -256
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1845,7 +1845,7 @@ var cq = (size) => `@container (min-width: ${size})`;
|
|
|
1845
1845
|
|
|
1846
1846
|
// src/utils/replaceUnderscoreInString.ts
|
|
1847
1847
|
init_emotion_jsx_shim();
|
|
1848
|
-
var replaceUnderscoreInString = (
|
|
1848
|
+
var replaceUnderscoreInString = (title2) => (title2 == null ? void 0 : title2.includes("_")) ? title2.replaceAll("_", " ") : title2;
|
|
1849
1849
|
|
|
1850
1850
|
// src/utils/url.ts
|
|
1851
1851
|
init_emotion_jsx_shim();
|
|
@@ -3874,7 +3874,7 @@ var IntegrationHeaderSectionHexImage = ({ ...props }) => {
|
|
|
3874
3874
|
] });
|
|
3875
3875
|
};
|
|
3876
3876
|
var IntegrationHeaderSection = ({
|
|
3877
|
-
title,
|
|
3877
|
+
title: title2,
|
|
3878
3878
|
description,
|
|
3879
3879
|
icon,
|
|
3880
3880
|
docsLink,
|
|
@@ -3889,10 +3889,10 @@ var IntegrationHeaderSection = ({
|
|
|
3889
3889
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { css: IntegrationHeaderSectionTitleContainer, children: [
|
|
3890
3890
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { css: IntegrationHeaderSectionIconContainer, children: [
|
|
3891
3891
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IntegrationHeaderSectionHexImage, { css: IntegrationHeaderSectionHexIcon }),
|
|
3892
|
-
CompIcon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CompIcon, { css: IntegrationHeaderSectionIcon }) : icon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: icon, alt:
|
|
3892
|
+
CompIcon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CompIcon, { css: IntegrationHeaderSectionIcon }) : icon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: icon, alt: title2, css: IntegrationHeaderSectionIcon }) : null
|
|
3893
3893
|
] }) : null,
|
|
3894
3894
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { css: IntegrationHeaderSectionTitleGroup, "data-testid": "integration-header-text", children: [
|
|
3895
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { css: IntegrationHeaderSectionTitle, children:
|
|
3895
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { css: IntegrationHeaderSectionTitle, children: title2 }),
|
|
3896
3896
|
badgeText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { text: badgeText }) : null,
|
|
3897
3897
|
menu2 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: menu2 }) : null,
|
|
3898
3898
|
docsLink ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -3994,7 +3994,7 @@ var PageHeaderSectionTitle = import_react22.css`
|
|
|
3994
3994
|
// src/components/Typography/PageHeaderSection.tsx
|
|
3995
3995
|
var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
|
|
3996
3996
|
var PageHeaderSection = ({
|
|
3997
|
-
title,
|
|
3997
|
+
title: title2,
|
|
3998
3998
|
desc,
|
|
3999
3999
|
children,
|
|
4000
4000
|
linkText,
|
|
@@ -4021,7 +4021,7 @@ var PageHeaderSection = ({
|
|
|
4021
4021
|
}
|
|
4022
4022
|
)
|
|
4023
4023
|
] }) : null,
|
|
4024
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level, css: PageHeaderSectionTitle, ...htmlProps, "data-testid": "page-header-section", children:
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level, css: PageHeaderSectionTitle, ...htmlProps, "data-testid": "page-header-section", children: title2 }),
|
|
4025
4025
|
desc
|
|
4026
4026
|
] }),
|
|
4027
4027
|
children ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { css: PageHeaderSectionChildContainer, children }) : null
|
|
@@ -4117,7 +4117,7 @@ var InlineAlertParagraph = import_react23.css`
|
|
|
4117
4117
|
var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
|
|
4118
4118
|
var InlineAlert = ({
|
|
4119
4119
|
id,
|
|
4120
|
-
title,
|
|
4120
|
+
title: title2,
|
|
4121
4121
|
text,
|
|
4122
4122
|
arrowPosition = "left-top",
|
|
4123
4123
|
positionCss,
|
|
@@ -4125,7 +4125,7 @@ var InlineAlert = ({
|
|
|
4125
4125
|
}) => {
|
|
4126
4126
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { role: "alert", id, css: [InlineAlertContainer, InlineAlertTriangle(arrowPosition), positionCss], children: [
|
|
4127
4127
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", "aria-controls": id, title: "close alert", css: InlineAlertCloseBtn, ...btnProps, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { icon: import_CgClose2.CgClose, iconColor: "currentColor", size: 24 }) }),
|
|
4128
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading, { level: 3, css: InlineAlertTitle, children:
|
|
4128
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading, { level: 3, css: InlineAlertTitle, children: title2 }),
|
|
4129
4129
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { css: InlineAlertParagraph, children: text })
|
|
4130
4130
|
] });
|
|
4131
4131
|
};
|
|
@@ -12622,13 +12622,13 @@ var TooltipArrowStyles = import_react24.css`
|
|
|
12622
12622
|
|
|
12623
12623
|
// src/components/Tooltip/Tooltip.tsx
|
|
12624
12624
|
var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
|
|
12625
|
-
function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
|
|
12625
|
+
function Tooltip({ children, title: title2, placement = "bottom", visible, ...props }) {
|
|
12626
12626
|
const tooltip = (0, import_Tooltip.useTooltipState)({ placement });
|
|
12627
|
-
return !
|
|
12627
|
+
return !title2 ? children : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
12628
12628
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_Tooltip.TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => import_react25.default.cloneElement(children, referenceProps) }),
|
|
12629
12629
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_Tooltip.Tooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
|
|
12630
12630
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_Tooltip.TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
|
|
12631
|
-
|
|
12631
|
+
title2
|
|
12632
12632
|
] })
|
|
12633
12633
|
] });
|
|
12634
12634
|
}
|
|
@@ -13117,9 +13117,9 @@ var MenuTitle = import_react31.css`
|
|
|
13117
13117
|
|
|
13118
13118
|
// src/components/Menu/MenuGroup.tsx
|
|
13119
13119
|
var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
|
|
13120
|
-
var MenuGroup = ({ title, children }) => {
|
|
13121
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { css: MenuGroupContainer(!!
|
|
13122
|
-
|
|
13120
|
+
var MenuGroup = ({ title: title2, children }) => {
|
|
13121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { css: MenuGroupContainer(!!title2), "data-testid": "menu-group", children: [
|
|
13122
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { css: MenuTitle, children: title2 }) : null,
|
|
13123
13123
|
children
|
|
13124
13124
|
] });
|
|
13125
13125
|
};
|
|
@@ -13852,7 +13852,7 @@ var calloutTypeDataMap = {
|
|
|
13852
13852
|
var Callout = ({
|
|
13853
13853
|
type = "info",
|
|
13854
13854
|
compact = false,
|
|
13855
|
-
title,
|
|
13855
|
+
title: title2,
|
|
13856
13856
|
children,
|
|
13857
13857
|
className,
|
|
13858
13858
|
testId
|
|
@@ -13876,7 +13876,7 @@ var Callout = ({
|
|
|
13876
13876
|
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { css: calloutInner, children: [
|
|
13877
13877
|
compact ? null : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { css: calloutIconWrap, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon2, { css: [calloutIcon, calloutTypeData.iconColor] }) }),
|
|
13878
13878
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { css: [calloutBody, compact ? calloutBodyCompact : void 0], children: [
|
|
13879
|
-
|
|
13879
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { css: [calloutTitle], "data-testid": "callout-title", children: title2 }) : null,
|
|
13880
13880
|
children ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { css: [calloutTypeData.descriptionColor], "data-testid": "callout-description", children }) : null
|
|
13881
13881
|
] })
|
|
13882
13882
|
] })
|
|
@@ -13935,7 +13935,7 @@ var CardMenu = import_react38.css`
|
|
|
13935
13935
|
// src/components/Card/Card.tsx
|
|
13936
13936
|
var import_jsx_runtime30 = require("@emotion/react/jsx-runtime");
|
|
13937
13937
|
var Card = ({
|
|
13938
|
-
title,
|
|
13938
|
+
title: title2,
|
|
13939
13939
|
menuItems,
|
|
13940
13940
|
children,
|
|
13941
13941
|
titleWithMarginBottom = true,
|
|
@@ -13945,7 +13945,7 @@ var Card = ({
|
|
|
13945
13945
|
...props
|
|
13946
13946
|
}) => {
|
|
13947
13947
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Tag, { css: CardContainer, ...props, children: [
|
|
13948
|
-
|
|
13948
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CardTitle2, { title: title2, titleWithMarginBottom }) : null,
|
|
13949
13949
|
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
13950
13950
|
Menu,
|
|
13951
13951
|
{
|
|
@@ -13967,8 +13967,8 @@ var Card = ({
|
|
|
13967
13967
|
children
|
|
13968
13968
|
] });
|
|
13969
13969
|
};
|
|
13970
|
-
var CardTitle2 = ({ title, titleWithMarginBottom, children }) => {
|
|
13971
|
-
const normalizeTitle = replaceUnderscoreInString(
|
|
13970
|
+
var CardTitle2 = ({ title: title2, titleWithMarginBottom, children }) => {
|
|
13971
|
+
const normalizeTitle = replaceUnderscoreInString(title2);
|
|
13972
13972
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Heading, { level: 3, css: CardTitle(titleWithMarginBottom), children: [
|
|
13973
13973
|
normalizeTitle,
|
|
13974
13974
|
children
|
|
@@ -16489,14 +16489,14 @@ var IntegrationTileFloatingButtonMessage = (clicked) => import_react73.css`
|
|
|
16489
16489
|
// src/components/Tiles/CreateTeamIntegrationTile.tsx
|
|
16490
16490
|
var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
|
|
16491
16491
|
var CreateTeamIntegrationTile = ({
|
|
16492
|
-
title = "Create a custom integration for your team",
|
|
16492
|
+
title: title2 = "Create a custom integration for your team",
|
|
16493
16493
|
buttonText = "Add Integration",
|
|
16494
16494
|
onClick,
|
|
16495
16495
|
asDeepLink = false,
|
|
16496
16496
|
...props
|
|
16497
16497
|
}) => {
|
|
16498
16498
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: [IntegrationTileContainer, IntegrationTileBtnDashedBorder], ...props, children: [
|
|
16499
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { css: IntegrationTileTitle, title, children:
|
|
16499
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { css: IntegrationTileTitle, title: title2, children: title2 }),
|
|
16500
16500
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16501
16501
|
Button,
|
|
16502
16502
|
{
|
|
@@ -17186,9 +17186,9 @@ var LinkListTitle = import_react85.css`
|
|
|
17186
17186
|
|
|
17187
17187
|
// src/components/LinkList/LinkList.tsx
|
|
17188
17188
|
var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
|
|
17189
|
-
var LinkList = ({ title, padding = "var(--spacing-md)", children, ...props }) => {
|
|
17189
|
+
var LinkList = ({ title: title2, padding = "var(--spacing-md)", children, ...props }) => {
|
|
17190
17190
|
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: LinkListContainer(padding), ...props, children: [
|
|
17191
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Heading, { level: 3, css: LinkListTitle, children:
|
|
17191
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Heading, { level: 3, css: LinkListTitle, children: title2 }),
|
|
17192
17192
|
children
|
|
17193
17193
|
] });
|
|
17194
17194
|
};
|
|
@@ -17591,6 +17591,7 @@ init_emotion_jsx_shim();
|
|
|
17591
17591
|
|
|
17592
17592
|
// src/components/MediaCard/MediaCard.tsx
|
|
17593
17593
|
init_emotion_jsx_shim();
|
|
17594
|
+
var import_react94 = require("react");
|
|
17594
17595
|
|
|
17595
17596
|
// src/components/Popover/Popover.tsx
|
|
17596
17597
|
init_emotion_jsx_shim();
|
|
@@ -17662,7 +17663,7 @@ var Popover2 = ({
|
|
|
17662
17663
|
// src/components/MediaCard/MediaCard.styles.ts
|
|
17663
17664
|
init_emotion_jsx_shim();
|
|
17664
17665
|
var import_react93 = require("@emotion/react");
|
|
17665
|
-
var
|
|
17666
|
+
var cardBase = import_react93.css`
|
|
17666
17667
|
display: flex;
|
|
17667
17668
|
flex-direction: column;
|
|
17668
17669
|
justify-content: flex-start;
|
|
@@ -17671,12 +17672,9 @@ var cardBaseStyles = import_react93.css`
|
|
|
17671
17672
|
padding: 0;
|
|
17672
17673
|
min-height: unset;
|
|
17673
17674
|
outline: none;
|
|
17674
|
-
|
|
17675
|
-
&:focus-visible {
|
|
17676
|
-
outline: 2px solid var(--primary-action-default);
|
|
17677
|
-
}
|
|
17675
|
+
cursor: pointer;
|
|
17678
17676
|
`;
|
|
17679
|
-
var
|
|
17677
|
+
var coverWrapper = import_react93.css`
|
|
17680
17678
|
position: relative;
|
|
17681
17679
|
display: flex;
|
|
17682
17680
|
align-items: center;
|
|
@@ -17686,27 +17684,43 @@ var cardBaseCoverIconWrapperStyles = import_react93.css`
|
|
|
17686
17684
|
overflow: hidden;
|
|
17687
17685
|
border-radius: 3px 3px 0 0;
|
|
17688
17686
|
padding: var(--spacing-sm);
|
|
17689
|
-
|
|
17687
|
+
outline: none;
|
|
17688
|
+
border: 0;
|
|
17690
17689
|
`;
|
|
17691
|
-
var
|
|
17690
|
+
var contentWrapper = import_react93.css`
|
|
17692
17691
|
padding: var(--spacing-sm);
|
|
17693
17692
|
`;
|
|
17694
|
-
var
|
|
17693
|
+
var title = import_react93.css`
|
|
17695
17694
|
font-size: var(--fs-sm);
|
|
17696
17695
|
color: var(--gray-500);
|
|
17697
|
-
cursor: pointer;
|
|
17698
17696
|
white-space: nowrap;
|
|
17699
17697
|
overflow: hidden;
|
|
17700
17698
|
text-overflow: ellipsis;
|
|
17699
|
+
outline: none;
|
|
17700
|
+
border: 0;
|
|
17701
|
+
background-color: transparent;
|
|
17702
|
+
|
|
17703
|
+
&:focus-visible {
|
|
17704
|
+
outline: 2px solid var(--primary-action-default);
|
|
17705
|
+
}
|
|
17701
17706
|
`;
|
|
17702
|
-
var
|
|
17707
|
+
var subtitle = import_react93.css`
|
|
17703
17708
|
font-size: var(--fs-xs);
|
|
17704
17709
|
color: var(--gray-500);
|
|
17705
17710
|
white-space: nowrap;
|
|
17706
17711
|
overflow: hidden;
|
|
17707
17712
|
text-overflow: ellipsis;
|
|
17713
|
+
outline: none;
|
|
17714
|
+
border: 0;
|
|
17715
|
+
background-color: transparent;
|
|
17716
|
+
`;
|
|
17717
|
+
var sideSection = import_react93.css`
|
|
17718
|
+
cursor: default;
|
|
17708
17719
|
`;
|
|
17709
|
-
var
|
|
17720
|
+
var menuSection = import_react93.css`
|
|
17721
|
+
cursor: default;
|
|
17722
|
+
`;
|
|
17723
|
+
var menuButton = import_react93.css`
|
|
17710
17724
|
padding: var(--spacing-2xs);
|
|
17711
17725
|
border-radius: var(--rounded-sm);
|
|
17712
17726
|
border-width: 0;
|
|
@@ -17720,25 +17734,29 @@ var cardBaseMenuButtonStyles = import_react93.css`
|
|
|
17720
17734
|
// src/components/MediaCard/MediaCard.tsx
|
|
17721
17735
|
var import_jsx_runtime87 = require("@emotion/react/jsx-runtime");
|
|
17722
17736
|
var MediaCard = ({
|
|
17723
|
-
title,
|
|
17724
|
-
subtitle,
|
|
17737
|
+
title: title2,
|
|
17738
|
+
subtitle: subtitle2,
|
|
17725
17739
|
infoPopover,
|
|
17726
17740
|
cover,
|
|
17727
17741
|
menuItems,
|
|
17728
|
-
sideSection,
|
|
17742
|
+
sideSection: sideSection2,
|
|
17729
17743
|
onClick,
|
|
17730
17744
|
...cardProps
|
|
17731
17745
|
}) => {
|
|
17732
|
-
|
|
17733
|
-
|
|
17734
|
-
|
|
17746
|
+
const onStopPropogation = (0, import_react94.useCallback)((e) => {
|
|
17747
|
+
e.stopPropagation();
|
|
17748
|
+
}, []);
|
|
17749
|
+
const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
|
|
17750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Card, { css: cardBase, ...cardProps, onClick, children: [
|
|
17751
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("button", { tabIndex: -1, css: coverWrapper, children: cover }),
|
|
17752
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: contentWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
17735
17753
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
17736
17754
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", css: { maxWidth: "100%" }, children: [
|
|
17737
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("
|
|
17738
|
-
!infoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: { display: "flex", cursor: "default" }, onClick:
|
|
17755
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("button", { css: title, "data-testid": "card-title", children: title2 }),
|
|
17756
|
+
!infoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: { display: "flex", cursor: "default" }, onClick: onStopPropogation, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
17739
17757
|
Popover2,
|
|
17740
17758
|
{
|
|
17741
|
-
baseId: `info-of-${
|
|
17759
|
+
baseId: `info-of-${title2}`,
|
|
17742
17760
|
buttonText: "Details",
|
|
17743
17761
|
ariaLabel: "Details",
|
|
17744
17762
|
iconColor: "default",
|
|
@@ -17748,17 +17766,26 @@ var MediaCard = ({
|
|
|
17748
17766
|
}
|
|
17749
17767
|
) })
|
|
17750
17768
|
] }),
|
|
17751
|
-
|
|
17769
|
+
subtitle2 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("button", { tabIndex: -1, css: subtitle, children: subtitle2 }) : null
|
|
17752
17770
|
] }),
|
|
17753
|
-
|
|
17754
|
-
|
|
17755
|
-
|
|
17771
|
+
sideSection2 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: sideSection, onClick: onStopPropogation, children: sideSection2 }) : null,
|
|
17772
|
+
hasMenuItems ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
17773
|
+
VerticalRhythm,
|
|
17756
17774
|
{
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
|
|
17775
|
+
css: menuSection,
|
|
17776
|
+
align: "center",
|
|
17777
|
+
justify: "center",
|
|
17778
|
+
onClick: onStopPropogation,
|
|
17779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
17780
|
+
Menu,
|
|
17781
|
+
{
|
|
17782
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("button", { type: "button", "aria-label": "More options", css: menuButton, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon, { icon: "more-alt", iconColor: "gray", size: 16 }) }),
|
|
17783
|
+
menuLabel: `Menu of ${title2}`,
|
|
17784
|
+
children: menuItems
|
|
17785
|
+
}
|
|
17786
|
+
)
|
|
17760
17787
|
}
|
|
17761
|
-
)
|
|
17788
|
+
) : null
|
|
17762
17789
|
] }) })
|
|
17763
17790
|
] });
|
|
17764
17791
|
};
|
|
@@ -17766,12 +17793,12 @@ var MediaCard = ({
|
|
|
17766
17793
|
// src/components/Modal/Modal.tsx
|
|
17767
17794
|
init_emotion_jsx_shim();
|
|
17768
17795
|
var import_CgClose6 = require("@react-icons/all-files/cg/CgClose");
|
|
17769
|
-
var
|
|
17796
|
+
var import_react96 = __toESM(require("react"));
|
|
17770
17797
|
|
|
17771
17798
|
// src/components/Modal/Modal.styles.ts
|
|
17772
17799
|
init_emotion_jsx_shim();
|
|
17773
|
-
var
|
|
17774
|
-
var modalWrapperStyles =
|
|
17800
|
+
var import_react95 = require("@emotion/react");
|
|
17801
|
+
var modalWrapperStyles = import_react95.css`
|
|
17775
17802
|
position: fixed;
|
|
17776
17803
|
inset: 0;
|
|
17777
17804
|
display: flex;
|
|
@@ -17779,13 +17806,13 @@ var modalWrapperStyles = import_react94.css`
|
|
|
17779
17806
|
justify-content: center;
|
|
17780
17807
|
z-index: var(--z-drawer);
|
|
17781
17808
|
`;
|
|
17782
|
-
var modalBackdropStyles =
|
|
17809
|
+
var modalBackdropStyles = import_react95.css`
|
|
17783
17810
|
position: absolute;
|
|
17784
17811
|
inset: 0;
|
|
17785
17812
|
background-color: var(--brand-secondary-1);
|
|
17786
17813
|
opacity: 0.4;
|
|
17787
17814
|
`;
|
|
17788
|
-
var modalStyles =
|
|
17815
|
+
var modalStyles = import_react95.css`
|
|
17789
17816
|
position: relative;
|
|
17790
17817
|
display: flex;
|
|
17791
17818
|
flex-direction: column;
|
|
@@ -17800,21 +17827,21 @@ var modalStyles = import_react94.css`
|
|
|
17800
17827
|
color: unset;
|
|
17801
17828
|
z-index: 1;
|
|
17802
17829
|
`;
|
|
17803
|
-
var modalHeaderStyles =
|
|
17830
|
+
var modalHeaderStyles = import_react95.css`
|
|
17804
17831
|
display: flex;
|
|
17805
17832
|
align-items: flex-start;
|
|
17806
17833
|
gap: var(--spacing-base);
|
|
17807
17834
|
font-size: var(--fs-md);
|
|
17808
17835
|
line-height: 1.2;
|
|
17809
17836
|
`;
|
|
17810
|
-
var modalCloseButtonStyles =
|
|
17837
|
+
var modalCloseButtonStyles = import_react95.css`
|
|
17811
17838
|
display: block;
|
|
17812
17839
|
padding: 0;
|
|
17813
17840
|
background: transparent;
|
|
17814
17841
|
border: none;
|
|
17815
17842
|
margin-left: auto;
|
|
17816
17843
|
`;
|
|
17817
|
-
var modalContentStyles =
|
|
17844
|
+
var modalContentStyles = import_react95.css`
|
|
17818
17845
|
flex: 1;
|
|
17819
17846
|
background-color: white;
|
|
17820
17847
|
padding: var(--spacing-md);
|
|
@@ -17826,7 +17853,7 @@ var modalContentStyles = import_react94.css`
|
|
|
17826
17853
|
var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
|
|
17827
17854
|
var defaultModalWidth = "75rem";
|
|
17828
17855
|
var defaultModalHeight = "51rem";
|
|
17829
|
-
var Modal =
|
|
17856
|
+
var Modal = import_react96.default.forwardRef(
|
|
17830
17857
|
({
|
|
17831
17858
|
header,
|
|
17832
17859
|
children,
|
|
@@ -17870,8 +17897,8 @@ Modal.displayName = "Modal";
|
|
|
17870
17897
|
|
|
17871
17898
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
17872
17899
|
init_emotion_jsx_shim();
|
|
17873
|
-
var
|
|
17874
|
-
var ParameterShellContext = (0,
|
|
17900
|
+
var import_react97 = require("react");
|
|
17901
|
+
var ParameterShellContext = (0, import_react97.createContext)({
|
|
17875
17902
|
id: "",
|
|
17876
17903
|
label: "",
|
|
17877
17904
|
hiddenLabel: void 0,
|
|
@@ -17880,7 +17907,7 @@ var ParameterShellContext = (0, import_react96.createContext)({
|
|
|
17880
17907
|
}
|
|
17881
17908
|
});
|
|
17882
17909
|
var useParameterShell = () => {
|
|
17883
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
17910
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react97.useContext)(ParameterShellContext);
|
|
17884
17911
|
return {
|
|
17885
17912
|
id,
|
|
17886
17913
|
label,
|
|
@@ -17895,8 +17922,8 @@ init_emotion_jsx_shim();
|
|
|
17895
17922
|
|
|
17896
17923
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
17897
17924
|
init_emotion_jsx_shim();
|
|
17898
|
-
var
|
|
17899
|
-
var inputIconBtn =
|
|
17925
|
+
var import_react98 = require("@emotion/react");
|
|
17926
|
+
var inputIconBtn = import_react98.css`
|
|
17900
17927
|
align-items: center;
|
|
17901
17928
|
border: none;
|
|
17902
17929
|
border-radius: var(--rounded-base);
|
|
@@ -17930,10 +17957,10 @@ var LabelLeadingIcon = ({
|
|
|
17930
17957
|
isBound,
|
|
17931
17958
|
isActive,
|
|
17932
17959
|
isLocked,
|
|
17933
|
-
title,
|
|
17960
|
+
title: title2,
|
|
17934
17961
|
...props
|
|
17935
17962
|
}) => {
|
|
17936
|
-
const titleFr =
|
|
17963
|
+
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
17937
17964
|
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Tooltip, { title: titleFr, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
17938
17965
|
"button",
|
|
17939
17966
|
{
|
|
@@ -17963,8 +17990,8 @@ init_emotion_jsx_shim();
|
|
|
17963
17990
|
|
|
17964
17991
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
17965
17992
|
init_emotion_jsx_shim();
|
|
17966
|
-
var
|
|
17967
|
-
var inputContainer2 =
|
|
17993
|
+
var import_react99 = require("@emotion/react");
|
|
17994
|
+
var inputContainer2 = import_react99.css`
|
|
17968
17995
|
position: relative;
|
|
17969
17996
|
|
|
17970
17997
|
&:hover,
|
|
@@ -17976,14 +18003,14 @@ var inputContainer2 = import_react98.css`
|
|
|
17976
18003
|
}
|
|
17977
18004
|
}
|
|
17978
18005
|
`;
|
|
17979
|
-
var labelText2 =
|
|
18006
|
+
var labelText2 = import_react99.css`
|
|
17980
18007
|
align-items: center;
|
|
17981
18008
|
display: flex;
|
|
17982
18009
|
gap: var(--spacing-xs);
|
|
17983
18010
|
font-weight: var(--fw-regular);
|
|
17984
18011
|
margin: 0 0 var(--spacing-xs);
|
|
17985
18012
|
`;
|
|
17986
|
-
var input2 =
|
|
18013
|
+
var input2 = import_react99.css`
|
|
17987
18014
|
display: block;
|
|
17988
18015
|
appearance: none;
|
|
17989
18016
|
box-sizing: border-box;
|
|
@@ -18027,18 +18054,18 @@ var input2 = import_react98.css`
|
|
|
18027
18054
|
color: var(--gray-400);
|
|
18028
18055
|
}
|
|
18029
18056
|
`;
|
|
18030
|
-
var selectInput =
|
|
18057
|
+
var selectInput = import_react99.css`
|
|
18031
18058
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
|
18032
18059
|
background-position: right var(--spacing-sm) center;
|
|
18033
18060
|
background-repeat: no-repeat;
|
|
18034
18061
|
background-size: 1rem;
|
|
18035
18062
|
padding-right: var(--spacing-xl);
|
|
18036
18063
|
`;
|
|
18037
|
-
var inputWrapper =
|
|
18064
|
+
var inputWrapper = import_react99.css`
|
|
18038
18065
|
display: flex; // used to correct overflow with chrome textarea
|
|
18039
18066
|
position: relative;
|
|
18040
18067
|
`;
|
|
18041
|
-
var inputIcon2 =
|
|
18068
|
+
var inputIcon2 = import_react99.css`
|
|
18042
18069
|
align-items: center;
|
|
18043
18070
|
background: var(--white);
|
|
18044
18071
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -18054,7 +18081,7 @@ var inputIcon2 = import_react98.css`
|
|
|
18054
18081
|
width: var(--spacing-lg);
|
|
18055
18082
|
z-index: var(--z-10);
|
|
18056
18083
|
`;
|
|
18057
|
-
var inputToggleLabel2 =
|
|
18084
|
+
var inputToggleLabel2 = import_react99.css`
|
|
18058
18085
|
align-items: center;
|
|
18059
18086
|
background: var(--white);
|
|
18060
18087
|
cursor: pointer;
|
|
@@ -18065,7 +18092,7 @@ var inputToggleLabel2 = import_react98.css`
|
|
|
18065
18092
|
min-height: var(--spacing-md);
|
|
18066
18093
|
position: relative;
|
|
18067
18094
|
`;
|
|
18068
|
-
var toggleInput2 =
|
|
18095
|
+
var toggleInput2 = import_react99.css`
|
|
18069
18096
|
appearance: none;
|
|
18070
18097
|
border: 1px solid var(--gray-300);
|
|
18071
18098
|
background: var(--white);
|
|
@@ -18104,7 +18131,7 @@ var toggleInput2 = import_react98.css`
|
|
|
18104
18131
|
border-color: var(--gray-300);
|
|
18105
18132
|
}
|
|
18106
18133
|
`;
|
|
18107
|
-
var inlineLabel2 =
|
|
18134
|
+
var inlineLabel2 = import_react99.css`
|
|
18108
18135
|
padding-left: var(--spacing-lg);
|
|
18109
18136
|
font-size: var(--fs-sm);
|
|
18110
18137
|
font-weight: var(--fw-regular);
|
|
@@ -18120,7 +18147,7 @@ var inlineLabel2 = import_react98.css`
|
|
|
18120
18147
|
}
|
|
18121
18148
|
}
|
|
18122
18149
|
`;
|
|
18123
|
-
var inputMenu =
|
|
18150
|
+
var inputMenu = import_react99.css`
|
|
18124
18151
|
background: none;
|
|
18125
18152
|
border: none;
|
|
18126
18153
|
padding: var(--spacing-2xs);
|
|
@@ -18136,11 +18163,11 @@ var inputMenu = import_react98.css`
|
|
|
18136
18163
|
background-color: var(--gray-200);
|
|
18137
18164
|
}
|
|
18138
18165
|
`;
|
|
18139
|
-
var textarea2 =
|
|
18166
|
+
var textarea2 = import_react99.css`
|
|
18140
18167
|
resize: vertical;
|
|
18141
18168
|
min-height: 2rem;
|
|
18142
18169
|
`;
|
|
18143
|
-
var dataConnectButton =
|
|
18170
|
+
var dataConnectButton = import_react99.css`
|
|
18144
18171
|
align-items: center;
|
|
18145
18172
|
appearance: none;
|
|
18146
18173
|
box-sizing: border-box;
|
|
@@ -18175,7 +18202,7 @@ var dataConnectButton = import_react98.css`
|
|
|
18175
18202
|
pointer-events: none;
|
|
18176
18203
|
}
|
|
18177
18204
|
`;
|
|
18178
|
-
var linkParameterBtn =
|
|
18205
|
+
var linkParameterBtn = import_react99.css`
|
|
18179
18206
|
border-radius: var(--rounded-base);
|
|
18180
18207
|
background: var(--white);
|
|
18181
18208
|
border: none;
|
|
@@ -18184,7 +18211,7 @@ var linkParameterBtn = import_react98.css`
|
|
|
18184
18211
|
font-size: var(--fs-sm);
|
|
18185
18212
|
line-height: 1;
|
|
18186
18213
|
`;
|
|
18187
|
-
var linkParameterControls =
|
|
18214
|
+
var linkParameterControls = import_react99.css`
|
|
18188
18215
|
position: absolute;
|
|
18189
18216
|
inset: 0 0 0 auto;
|
|
18190
18217
|
padding: 0 var(--spacing-base);
|
|
@@ -18193,7 +18220,7 @@ var linkParameterControls = import_react98.css`
|
|
|
18193
18220
|
justify-content: center;
|
|
18194
18221
|
gap: var(--spacing-base);
|
|
18195
18222
|
`;
|
|
18196
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
18223
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react99.css`
|
|
18197
18224
|
padding-right: calc(
|
|
18198
18225
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
18199
18226
|
var(--spacing-base)
|
|
@@ -18206,7 +18233,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react98.css`
|
|
|
18206
18233
|
}
|
|
18207
18234
|
}
|
|
18208
18235
|
`;
|
|
18209
|
-
var linkParameterIcon =
|
|
18236
|
+
var linkParameterIcon = import_react99.css`
|
|
18210
18237
|
align-items: center;
|
|
18211
18238
|
color: var(--brand-secondary-3);
|
|
18212
18239
|
display: flex;
|
|
@@ -18259,20 +18286,20 @@ init_emotion_jsx_shim();
|
|
|
18259
18286
|
|
|
18260
18287
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
18261
18288
|
init_emotion_jsx_shim();
|
|
18262
|
-
var
|
|
18263
|
-
var ParameterDrawerHeaderContainer =
|
|
18289
|
+
var import_react100 = require("@emotion/react");
|
|
18290
|
+
var ParameterDrawerHeaderContainer = import_react100.css`
|
|
18264
18291
|
align-items: center;
|
|
18265
18292
|
display: flex;
|
|
18266
18293
|
gap: var(--spacing-base);
|
|
18267
18294
|
justify-content: space-between;
|
|
18268
18295
|
margin-bottom: var(--spacing-sm);
|
|
18269
18296
|
`;
|
|
18270
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
18297
|
+
var ParameterDrawerHeaderTitleGroup = import_react100.css`
|
|
18271
18298
|
align-items: center;
|
|
18272
18299
|
display: flex;
|
|
18273
18300
|
gap: var(--spacing-sm);
|
|
18274
18301
|
`;
|
|
18275
|
-
var ParameterDrawerHeaderTitle =
|
|
18302
|
+
var ParameterDrawerHeaderTitle = import_react100.css`
|
|
18276
18303
|
text-overflow: ellipsis;
|
|
18277
18304
|
white-space: nowrap;
|
|
18278
18305
|
overflow: hidden;
|
|
@@ -18281,11 +18308,11 @@ var ParameterDrawerHeaderTitle = import_react99.css`
|
|
|
18281
18308
|
|
|
18282
18309
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
18283
18310
|
var import_jsx_runtime91 = require("@emotion/react/jsx-runtime");
|
|
18284
|
-
var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
18311
|
+
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
18285
18312
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
18286
18313
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
18287
18314
|
iconBeforeTitle,
|
|
18288
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Heading, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title, children:
|
|
18315
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Heading, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
18289
18316
|
] }),
|
|
18290
18317
|
children
|
|
18291
18318
|
] });
|
|
@@ -18293,12 +18320,12 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
18293
18320
|
|
|
18294
18321
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
18295
18322
|
init_emotion_jsx_shim();
|
|
18296
|
-
var
|
|
18323
|
+
var import_react102 = require("react");
|
|
18297
18324
|
|
|
18298
18325
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
18299
18326
|
init_emotion_jsx_shim();
|
|
18300
|
-
var
|
|
18301
|
-
var fieldsetStyles =
|
|
18327
|
+
var import_react101 = require("@emotion/react");
|
|
18328
|
+
var fieldsetStyles = import_react101.css`
|
|
18302
18329
|
&:disabled,
|
|
18303
18330
|
[readonly] {
|
|
18304
18331
|
pointer-events: none;
|
|
@@ -18309,7 +18336,7 @@ var fieldsetStyles = import_react100.css`
|
|
|
18309
18336
|
}
|
|
18310
18337
|
}
|
|
18311
18338
|
`;
|
|
18312
|
-
var fieldsetLegend2 =
|
|
18339
|
+
var fieldsetLegend2 = import_react101.css`
|
|
18313
18340
|
display: block;
|
|
18314
18341
|
font-weight: var(--fw-medium);
|
|
18315
18342
|
margin-bottom: var(--spacing-sm);
|
|
@@ -18318,7 +18345,7 @@ var fieldsetLegend2 = import_react100.css`
|
|
|
18318
18345
|
|
|
18319
18346
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
18320
18347
|
var import_jsx_runtime92 = require("@emotion/react/jsx-runtime");
|
|
18321
|
-
var ParameterGroup = (0,
|
|
18348
|
+
var ParameterGroup = (0, import_react102.forwardRef)(
|
|
18322
18349
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
18323
18350
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
18324
18351
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
@@ -18329,24 +18356,24 @@ var ParameterGroup = (0, import_react101.forwardRef)(
|
|
|
18329
18356
|
|
|
18330
18357
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18331
18358
|
init_emotion_jsx_shim();
|
|
18332
|
-
var
|
|
18359
|
+
var import_react108 = require("react");
|
|
18333
18360
|
|
|
18334
18361
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
18335
18362
|
init_emotion_jsx_shim();
|
|
18336
|
-
var
|
|
18363
|
+
var import_react104 = require("react");
|
|
18337
18364
|
var import_react_dom2 = require("react-dom");
|
|
18338
18365
|
|
|
18339
18366
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
18340
18367
|
init_emotion_jsx_shim();
|
|
18341
|
-
var
|
|
18342
|
-
var previewWrapper =
|
|
18368
|
+
var import_react103 = require("@emotion/react");
|
|
18369
|
+
var previewWrapper = import_react103.css`
|
|
18343
18370
|
margin-top: var(--spacing-xs);
|
|
18344
18371
|
background: var(--gray-50);
|
|
18345
18372
|
padding: var(--spacing-sm);
|
|
18346
18373
|
border: solid 1px var(--gray-300);
|
|
18347
18374
|
border-radius: var(--rounded-sm);
|
|
18348
18375
|
`;
|
|
18349
|
-
var previewLink =
|
|
18376
|
+
var previewLink = import_react103.css`
|
|
18350
18377
|
display: block;
|
|
18351
18378
|
width: 100%;
|
|
18352
18379
|
|
|
@@ -18354,7 +18381,7 @@ var previewLink = import_react102.css`
|
|
|
18354
18381
|
max-height: 9rem;
|
|
18355
18382
|
}
|
|
18356
18383
|
`;
|
|
18357
|
-
var previewModalWrapper =
|
|
18384
|
+
var previewModalWrapper = import_react103.css`
|
|
18358
18385
|
background: var(--gray-50);
|
|
18359
18386
|
display: flex;
|
|
18360
18387
|
height: 100%;
|
|
@@ -18363,7 +18390,7 @@ var previewModalWrapper = import_react102.css`
|
|
|
18363
18390
|
border: solid 1px var(--gray-300);
|
|
18364
18391
|
border-radius: var(--rounded-sm);
|
|
18365
18392
|
`;
|
|
18366
|
-
var previewModalImage =
|
|
18393
|
+
var previewModalImage = import_react103.css`
|
|
18367
18394
|
display: flex;
|
|
18368
18395
|
height: 100%;
|
|
18369
18396
|
width: 100%;
|
|
@@ -18377,7 +18404,7 @@ var previewModalImage = import_react102.css`
|
|
|
18377
18404
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
18378
18405
|
var import_jsx_runtime93 = require("@emotion/react/jsx-runtime");
|
|
18379
18406
|
function ParameterImagePreview({ imageSrc }) {
|
|
18380
|
-
const [showModal, setShowModal] = (0,
|
|
18407
|
+
const [showModal, setShowModal] = (0, import_react104.useState)(false);
|
|
18381
18408
|
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { css: previewWrapper, children: [
|
|
18382
18409
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
18383
18410
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
@@ -18410,7 +18437,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
18410
18437
|
|
|
18411
18438
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
18412
18439
|
init_emotion_jsx_shim();
|
|
18413
|
-
var
|
|
18440
|
+
var import_react107 = require("react");
|
|
18414
18441
|
|
|
18415
18442
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
18416
18443
|
init_emotion_jsx_shim();
|
|
@@ -18421,9 +18448,9 @@ var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
|
18421
18448
|
|
|
18422
18449
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
18423
18450
|
init_emotion_jsx_shim();
|
|
18424
|
-
var
|
|
18451
|
+
var import_react105 = require("react");
|
|
18425
18452
|
var import_jsx_runtime95 = require("@emotion/react/jsx-runtime");
|
|
18426
|
-
var ParameterMenuButton = (0,
|
|
18453
|
+
var ParameterMenuButton = (0, import_react105.forwardRef)(
|
|
18427
18454
|
({ label, children }, ref) => {
|
|
18428
18455
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
18429
18456
|
Menu,
|
|
@@ -18448,8 +18475,8 @@ var ParameterMenuButton = (0, import_react104.forwardRef)(
|
|
|
18448
18475
|
|
|
18449
18476
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
18450
18477
|
init_emotion_jsx_shim();
|
|
18451
|
-
var
|
|
18452
|
-
var emptyParameterShell =
|
|
18478
|
+
var import_react106 = require("@emotion/react");
|
|
18479
|
+
var emptyParameterShell = import_react106.css`
|
|
18453
18480
|
border-radius: var(--rounded-sm);
|
|
18454
18481
|
background: var(--white);
|
|
18455
18482
|
flex-grow: 1;
|
|
@@ -18457,7 +18484,7 @@ var emptyParameterShell = import_react105.css`
|
|
|
18457
18484
|
position: relative;
|
|
18458
18485
|
max-width: 100%;
|
|
18459
18486
|
`;
|
|
18460
|
-
var emptyParameterShellText =
|
|
18487
|
+
var emptyParameterShellText = import_react106.css`
|
|
18461
18488
|
background: var(--brand-secondary-6);
|
|
18462
18489
|
border-radius: var(--rounded-sm);
|
|
18463
18490
|
padding: var(--spacing-sm);
|
|
@@ -18465,7 +18492,7 @@ var emptyParameterShellText = import_react105.css`
|
|
|
18465
18492
|
font-size: var(--fs-sm);
|
|
18466
18493
|
margin: 0;
|
|
18467
18494
|
`;
|
|
18468
|
-
var overrideMarker =
|
|
18495
|
+
var overrideMarker = import_react106.css`
|
|
18469
18496
|
border-radius: var(--rounded-sm);
|
|
18470
18497
|
border: 10px solid var(--gray-300);
|
|
18471
18498
|
border-left-color: transparent;
|
|
@@ -18490,7 +18517,7 @@ var extractParameterProps = (props) => {
|
|
|
18490
18517
|
hiddenLabel,
|
|
18491
18518
|
labelLeadingIcon,
|
|
18492
18519
|
menuItems,
|
|
18493
|
-
title,
|
|
18520
|
+
title: title2,
|
|
18494
18521
|
hasOverriddenValue,
|
|
18495
18522
|
onResetOverriddenValue,
|
|
18496
18523
|
...innerProps
|
|
@@ -18508,7 +18535,7 @@ var extractParameterProps = (props) => {
|
|
|
18508
18535
|
hiddenLabel,
|
|
18509
18536
|
labelLeadingIcon,
|
|
18510
18537
|
menuItems,
|
|
18511
|
-
title,
|
|
18538
|
+
title: title2,
|
|
18512
18539
|
hasOverriddenValue,
|
|
18513
18540
|
onResetOverriddenValue
|
|
18514
18541
|
},
|
|
@@ -18530,22 +18557,22 @@ var ParameterShell = ({
|
|
|
18530
18557
|
menuItems,
|
|
18531
18558
|
hasOverriddenValue,
|
|
18532
18559
|
onResetOverriddenValue,
|
|
18533
|
-
title,
|
|
18560
|
+
title: title2,
|
|
18534
18561
|
children,
|
|
18535
18562
|
...props
|
|
18536
18563
|
}) => {
|
|
18537
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
18564
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react107.useState)(void 0);
|
|
18538
18565
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
18539
18566
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
18540
18567
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { css: inputContainer2, ...props, children: [
|
|
18541
|
-
hiddenLabel ||
|
|
18568
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
18542
18569
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
18543
18570
|
label,
|
|
18544
18571
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
18545
18572
|
] }),
|
|
18546
|
-
!
|
|
18573
|
+
!title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
18547
18574
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
18548
|
-
|
|
18575
|
+
title2,
|
|
18549
18576
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
18550
18577
|
] }),
|
|
18551
18578
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { css: inputWrapper, children: [
|
|
@@ -18580,7 +18607,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime9
|
|
|
18580
18607
|
|
|
18581
18608
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18582
18609
|
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
18583
|
-
var ParameterImage = (0,
|
|
18610
|
+
var ParameterImage = (0, import_react108.forwardRef)(
|
|
18584
18611
|
({ children, ...props }, ref) => {
|
|
18585
18612
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18586
18613
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -18589,10 +18616,10 @@ var ParameterImage = (0, import_react107.forwardRef)(
|
|
|
18589
18616
|
] });
|
|
18590
18617
|
}
|
|
18591
18618
|
);
|
|
18592
|
-
var ParameterImageInner = (0,
|
|
18619
|
+
var ParameterImageInner = (0, import_react108.forwardRef)((props, ref) => {
|
|
18593
18620
|
const { value } = props;
|
|
18594
18621
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
18595
|
-
const deferredValue = (0,
|
|
18622
|
+
const deferredValue = (0, import_react108.useDeferredValue)(value);
|
|
18596
18623
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
18597
18624
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
18598
18625
|
"input",
|
|
@@ -18612,13 +18639,13 @@ var ParameterImageInner = (0, import_react107.forwardRef)((props, ref) => {
|
|
|
18612
18639
|
|
|
18613
18640
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
18614
18641
|
init_emotion_jsx_shim();
|
|
18615
|
-
var
|
|
18642
|
+
var import_react109 = require("react");
|
|
18616
18643
|
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
18617
|
-
var ParameterInput = (0,
|
|
18644
|
+
var ParameterInput = (0, import_react109.forwardRef)((props, ref) => {
|
|
18618
18645
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18619
18646
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
18620
18647
|
});
|
|
18621
|
-
var ParameterInputInner = (0,
|
|
18648
|
+
var ParameterInputInner = (0, import_react109.forwardRef)(
|
|
18622
18649
|
({ ...props }, ref) => {
|
|
18623
18650
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18624
18651
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
@@ -18638,9 +18665,9 @@ var ParameterInputInner = (0, import_react108.forwardRef)(
|
|
|
18638
18665
|
|
|
18639
18666
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
18640
18667
|
init_emotion_jsx_shim();
|
|
18641
|
-
var
|
|
18668
|
+
var import_react110 = require("react");
|
|
18642
18669
|
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
18643
|
-
var ParameterLink = (0,
|
|
18670
|
+
var ParameterLink = (0, import_react110.forwardRef)(
|
|
18644
18671
|
({ disabled, onConnectLink, externalLink, ...props }, ref) => {
|
|
18645
18672
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18646
18673
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
@@ -18663,7 +18690,7 @@ var ParameterLink = (0, import_react109.forwardRef)(
|
|
|
18663
18690
|
);
|
|
18664
18691
|
}
|
|
18665
18692
|
);
|
|
18666
|
-
var ParameterLinkInner = (0,
|
|
18693
|
+
var ParameterLinkInner = (0, import_react110.forwardRef)(
|
|
18667
18694
|
({ externalLink, onConnectLink, disabled, buttonText = "Select link", ...props }, ref) => {
|
|
18668
18695
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18669
18696
|
if (!props.value)
|
|
@@ -18789,7 +18816,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
18789
18816
|
|
|
18790
18817
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18791
18818
|
init_emotion_jsx_shim();
|
|
18792
|
-
var
|
|
18819
|
+
var import_react117 = require("@emotion/react");
|
|
18793
18820
|
var import_list3 = require("@lexical/list");
|
|
18794
18821
|
var import_markdown = require("@lexical/markdown");
|
|
18795
18822
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -18896,7 +18923,7 @@ var getLabelForElement = (type) => {
|
|
|
18896
18923
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18897
18924
|
var import_fast_equals2 = require("fast-equals");
|
|
18898
18925
|
var import_lexical6 = require("lexical");
|
|
18899
|
-
var
|
|
18926
|
+
var import_react118 = require("react");
|
|
18900
18927
|
|
|
18901
18928
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
18902
18929
|
init_emotion_jsx_shim();
|
|
@@ -18919,10 +18946,10 @@ init_emotion_jsx_shim();
|
|
|
18919
18946
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
18920
18947
|
var import_utils2 = require("@lexical/utils");
|
|
18921
18948
|
var import_lexical = require("lexical");
|
|
18922
|
-
var
|
|
18949
|
+
var import_react111 = require("react");
|
|
18923
18950
|
function DisableStylesPlugin() {
|
|
18924
18951
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
18925
|
-
(0,
|
|
18952
|
+
(0, import_react111.useEffect)(() => {
|
|
18926
18953
|
return (0, import_utils2.mergeRegister)(
|
|
18927
18954
|
// Disable text alignment on paragraph nodes
|
|
18928
18955
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -19117,13 +19144,13 @@ var codeElement = import_css.css`
|
|
|
19117
19144
|
|
|
19118
19145
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19119
19146
|
init_emotion_jsx_shim();
|
|
19120
|
-
var
|
|
19147
|
+
var import_react112 = require("@emotion/react");
|
|
19121
19148
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
19122
19149
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
19123
19150
|
var import_utils3 = require("@lexical/utils");
|
|
19124
19151
|
var import_fast_equals = require("fast-equals");
|
|
19125
19152
|
var import_lexical3 = require("lexical");
|
|
19126
|
-
var
|
|
19153
|
+
var import_react113 = require("react");
|
|
19127
19154
|
|
|
19128
19155
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
19129
19156
|
init_emotion_jsx_shim();
|
|
@@ -19449,16 +19476,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
19449
19476
|
);
|
|
19450
19477
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
19451
19478
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
19452
|
-
var linkPopover =
|
|
19479
|
+
var linkPopover = import_react112.css`
|
|
19453
19480
|
position: absolute;
|
|
19454
19481
|
z-index: 5;
|
|
19455
19482
|
`;
|
|
19456
|
-
var linkPopoverContainer =
|
|
19483
|
+
var linkPopoverContainer = import_react112.css`
|
|
19457
19484
|
${Popover};
|
|
19458
19485
|
align-items: center;
|
|
19459
19486
|
display: flex;
|
|
19460
19487
|
`;
|
|
19461
|
-
var linkPopoverAnchor =
|
|
19488
|
+
var linkPopoverAnchor = import_react112.css`
|
|
19462
19489
|
${link}
|
|
19463
19490
|
${linkColorDefault}
|
|
19464
19491
|
`;
|
|
@@ -19467,17 +19494,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19467
19494
|
return path;
|
|
19468
19495
|
};
|
|
19469
19496
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
19470
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
19471
|
-
const linkPopoverElRef = (0,
|
|
19472
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
19473
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
19474
|
-
(0,
|
|
19497
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react113.useState)();
|
|
19498
|
+
const linkPopoverElRef = (0, import_react113.useRef)(null);
|
|
19499
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react113.useState)(false);
|
|
19500
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react113.useState)(false);
|
|
19501
|
+
(0, import_react113.useEffect)(() => {
|
|
19475
19502
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
19476
19503
|
setLinkPopoverState(void 0);
|
|
19477
19504
|
return;
|
|
19478
19505
|
}
|
|
19479
19506
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
19480
|
-
(0,
|
|
19507
|
+
(0, import_react113.useEffect)(() => {
|
|
19481
19508
|
if (!editor.hasNodes([LinkNode])) {
|
|
19482
19509
|
throw new Error("LinkNode not registered on editor");
|
|
19483
19510
|
}
|
|
@@ -19546,7 +19573,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19546
19573
|
)
|
|
19547
19574
|
);
|
|
19548
19575
|
}, [editor, onConnectLink]);
|
|
19549
|
-
const maybeShowLinkToolbar = (0,
|
|
19576
|
+
const maybeShowLinkToolbar = (0, import_react113.useCallback)(() => {
|
|
19550
19577
|
if (!editor.isEditable()) {
|
|
19551
19578
|
return;
|
|
19552
19579
|
}
|
|
@@ -19578,7 +19605,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19578
19605
|
}
|
|
19579
19606
|
});
|
|
19580
19607
|
}, [editor]);
|
|
19581
|
-
(0,
|
|
19608
|
+
(0, import_react113.useEffect)(() => {
|
|
19582
19609
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19583
19610
|
requestAnimationFrame(() => {
|
|
19584
19611
|
editorState.read(() => {
|
|
@@ -19666,7 +19693,7 @@ var import_list = require("@lexical/list");
|
|
|
19666
19693
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
19667
19694
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
19668
19695
|
var import_lexical4 = require("lexical");
|
|
19669
|
-
var
|
|
19696
|
+
var import_react114 = require("react");
|
|
19670
19697
|
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
19671
19698
|
function isIndentPermitted(maxDepth) {
|
|
19672
19699
|
const selection = (0, import_lexical4.$getSelection)();
|
|
@@ -19690,7 +19717,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
19690
19717
|
}
|
|
19691
19718
|
function ListIndentPlugin({ maxDepth }) {
|
|
19692
19719
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
19693
|
-
(0,
|
|
19720
|
+
(0, import_react114.useEffect)(() => {
|
|
19694
19721
|
return editor.registerCommand(
|
|
19695
19722
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
19696
19723
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -19702,7 +19729,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
19702
19729
|
|
|
19703
19730
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
19704
19731
|
init_emotion_jsx_shim();
|
|
19705
|
-
var
|
|
19732
|
+
var import_react115 = require("@emotion/react");
|
|
19706
19733
|
var import_code2 = require("@lexical/code");
|
|
19707
19734
|
var import_list2 = require("@lexical/list");
|
|
19708
19735
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -19710,9 +19737,9 @@ var import_rich_text = require("@lexical/rich-text");
|
|
|
19710
19737
|
var import_selection2 = require("@lexical/selection");
|
|
19711
19738
|
var import_utils6 = require("@lexical/utils");
|
|
19712
19739
|
var import_lexical5 = require("lexical");
|
|
19713
|
-
var
|
|
19740
|
+
var import_react116 = require("react");
|
|
19714
19741
|
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
19715
|
-
var toolbar =
|
|
19742
|
+
var toolbar = import_react115.css`
|
|
19716
19743
|
background: var(--gray-50);
|
|
19717
19744
|
border-radius: var(--rounded-base);
|
|
19718
19745
|
display: flex;
|
|
@@ -19724,7 +19751,7 @@ var toolbar = import_react114.css`
|
|
|
19724
19751
|
top: calc(var(--spacing-sm) * -2);
|
|
19725
19752
|
z-index: 10;
|
|
19726
19753
|
`;
|
|
19727
|
-
var toolbarGroup =
|
|
19754
|
+
var toolbarGroup = import_react115.css`
|
|
19728
19755
|
display: flex;
|
|
19729
19756
|
gap: var(--spacing-xs);
|
|
19730
19757
|
position: relative;
|
|
@@ -19740,7 +19767,7 @@ var toolbarGroup = import_react114.css`
|
|
|
19740
19767
|
width: 1px;
|
|
19741
19768
|
}
|
|
19742
19769
|
`;
|
|
19743
|
-
var richTextToolbarButton =
|
|
19770
|
+
var richTextToolbarButton = import_react115.css`
|
|
19744
19771
|
align-items: center;
|
|
19745
19772
|
appearance: none;
|
|
19746
19773
|
border: 0;
|
|
@@ -19753,13 +19780,13 @@ var richTextToolbarButton = import_react114.css`
|
|
|
19753
19780
|
min-width: 32px;
|
|
19754
19781
|
padding: 0 var(--spacing-sm);
|
|
19755
19782
|
`;
|
|
19756
|
-
var richTextToolbarButtonActive =
|
|
19783
|
+
var richTextToolbarButtonActive = import_react115.css`
|
|
19757
19784
|
background: var(--gray-200);
|
|
19758
19785
|
`;
|
|
19759
|
-
var toolbarIcon =
|
|
19786
|
+
var toolbarIcon = import_react115.css`
|
|
19760
19787
|
color: inherit;
|
|
19761
19788
|
`;
|
|
19762
|
-
var toolbarChevron =
|
|
19789
|
+
var toolbarChevron = import_react115.css`
|
|
19763
19790
|
margin-left: var(--spacing-xs);
|
|
19764
19791
|
`;
|
|
19765
19792
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19814,7 +19841,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19814
19841
|
}
|
|
19815
19842
|
});
|
|
19816
19843
|
};
|
|
19817
|
-
const updateToolbar = (0,
|
|
19844
|
+
const updateToolbar = (0, import_react116.useCallback)(() => {
|
|
19818
19845
|
const selection = (0, import_lexical5.$getSelection)();
|
|
19819
19846
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
19820
19847
|
return;
|
|
@@ -19853,7 +19880,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19853
19880
|
setIsLink(false);
|
|
19854
19881
|
}
|
|
19855
19882
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
19856
|
-
(0,
|
|
19883
|
+
(0, import_react116.useEffect)(() => {
|
|
19857
19884
|
return editor.registerCommand(
|
|
19858
19885
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
19859
19886
|
(_payload) => {
|
|
@@ -19863,7 +19890,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19863
19890
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
19864
19891
|
);
|
|
19865
19892
|
}, [editor, updateToolbar]);
|
|
19866
|
-
(0,
|
|
19893
|
+
(0, import_react116.useEffect)(() => {
|
|
19867
19894
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19868
19895
|
requestAnimationFrame(() => {
|
|
19869
19896
|
editorState.read(() => {
|
|
@@ -20003,26 +20030,26 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20003
20030
|
var RichTextToolbar_default = RichTextToolbar;
|
|
20004
20031
|
var useRichTextToolbarState = ({ config }) => {
|
|
20005
20032
|
var _a;
|
|
20006
|
-
const enabledBuiltInFormats = (0,
|
|
20033
|
+
const enabledBuiltInFormats = (0, import_react116.useMemo)(() => {
|
|
20007
20034
|
return richTextBuiltInFormats.filter((format) => {
|
|
20008
20035
|
var _a2, _b;
|
|
20009
20036
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
20010
20037
|
});
|
|
20011
20038
|
}, [config]);
|
|
20012
|
-
const enabledBuiltInElements = (0,
|
|
20039
|
+
const enabledBuiltInElements = (0, import_react116.useMemo)(() => {
|
|
20013
20040
|
return richTextBuiltInElements.filter((element) => {
|
|
20014
20041
|
var _a2, _b;
|
|
20015
20042
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
20016
20043
|
});
|
|
20017
20044
|
}, [config]);
|
|
20018
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
20045
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react116.useMemo)(() => {
|
|
20019
20046
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
20020
20047
|
}, [enabledBuiltInFormats]);
|
|
20021
20048
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
20022
20049
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
20023
20050
|
);
|
|
20024
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
20025
|
-
const visibleFormatsWithIcon = (0,
|
|
20051
|
+
const [activeFormats, setActiveFormats] = (0, import_react116.useState)([]);
|
|
20052
|
+
const visibleFormatsWithIcon = (0, import_react116.useMemo)(() => {
|
|
20026
20053
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20027
20054
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20028
20055
|
visibleFormats.add(type);
|
|
@@ -20032,7 +20059,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20032
20059
|
});
|
|
20033
20060
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20034
20061
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
20035
|
-
const visibleFormatsWithoutIcon = (0,
|
|
20062
|
+
const visibleFormatsWithoutIcon = (0, import_react116.useMemo)(() => {
|
|
20036
20063
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20037
20064
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20038
20065
|
visibleFormats.add(type);
|
|
@@ -20042,11 +20069,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20042
20069
|
});
|
|
20043
20070
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20044
20071
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
20045
|
-
const [activeElement, setActiveElement] = (0,
|
|
20072
|
+
const [activeElement, setActiveElement] = (0, import_react116.useState)("paragraph");
|
|
20046
20073
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
20047
20074
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
20048
20075
|
);
|
|
20049
|
-
const visibleTextualElements = (0,
|
|
20076
|
+
const visibleTextualElements = (0, import_react116.useMemo)(() => {
|
|
20050
20077
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
20051
20078
|
return enabledTextualElements;
|
|
20052
20079
|
}
|
|
@@ -20057,24 +20084,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20057
20084
|
}
|
|
20058
20085
|
);
|
|
20059
20086
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
20060
|
-
const [isLink, setIsLink] = (0,
|
|
20061
|
-
const linkElementVisible = (0,
|
|
20087
|
+
const [isLink, setIsLink] = (0, import_react116.useState)(false);
|
|
20088
|
+
const linkElementVisible = (0, import_react116.useMemo)(() => {
|
|
20062
20089
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
20063
20090
|
}, [isLink, enabledBuiltInElements]);
|
|
20064
|
-
const visibleLists = (0,
|
|
20091
|
+
const visibleLists = (0, import_react116.useMemo)(() => {
|
|
20065
20092
|
return new Set(
|
|
20066
20093
|
["orderedList", "unorderedList"].filter(
|
|
20067
20094
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
20068
20095
|
)
|
|
20069
20096
|
);
|
|
20070
20097
|
}, [activeElement, enabledBuiltInElements]);
|
|
20071
|
-
const quoteElementVisible = (0,
|
|
20098
|
+
const quoteElementVisible = (0, import_react116.useMemo)(() => {
|
|
20072
20099
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
20073
20100
|
}, [activeElement, enabledBuiltInElements]);
|
|
20074
|
-
const codeElementVisible = (0,
|
|
20101
|
+
const codeElementVisible = (0, import_react116.useMemo)(() => {
|
|
20075
20102
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
20076
20103
|
}, [activeElement, enabledBuiltInElements]);
|
|
20077
|
-
const visibleElementsWithIcons = (0,
|
|
20104
|
+
const visibleElementsWithIcons = (0, import_react116.useMemo)(() => {
|
|
20078
20105
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
20079
20106
|
if (linkElementVisible) {
|
|
20080
20107
|
visibleElements.add("link");
|
|
@@ -20173,18 +20200,18 @@ var ParameterRichText = ({
|
|
|
20173
20200
|
}
|
|
20174
20201
|
);
|
|
20175
20202
|
};
|
|
20176
|
-
var editorWrapper =
|
|
20203
|
+
var editorWrapper = import_react117.css`
|
|
20177
20204
|
display: flex;
|
|
20178
20205
|
flex-flow: column;
|
|
20179
20206
|
flex-grow: 1;
|
|
20180
20207
|
`;
|
|
20181
|
-
var editorContainer =
|
|
20208
|
+
var editorContainer = import_react117.css`
|
|
20182
20209
|
display: flex;
|
|
20183
20210
|
flex-flow: column;
|
|
20184
20211
|
flex-grow: 1;
|
|
20185
20212
|
position: relative;
|
|
20186
20213
|
`;
|
|
20187
|
-
var editorPlaceholder =
|
|
20214
|
+
var editorPlaceholder = import_react117.css`
|
|
20188
20215
|
color: var(--gray-500);
|
|
20189
20216
|
font-style: italic;
|
|
20190
20217
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20195,7 +20222,7 @@ var editorPlaceholder = import_react116.css`
|
|
|
20195
20222
|
top: var(--spacing-xs);
|
|
20196
20223
|
user-select: none;
|
|
20197
20224
|
`;
|
|
20198
|
-
var editorInput =
|
|
20225
|
+
var editorInput = import_react117.css`
|
|
20199
20226
|
background: var(--white);
|
|
20200
20227
|
border: 1px solid var(--white);
|
|
20201
20228
|
border-radius: var(--rounded-sm);
|
|
@@ -20317,14 +20344,14 @@ var RichText = ({
|
|
|
20317
20344
|
variables,
|
|
20318
20345
|
customControls
|
|
20319
20346
|
}) => {
|
|
20320
|
-
const editorContainerRef = (0,
|
|
20347
|
+
const editorContainerRef = (0, import_react118.useRef)(null);
|
|
20321
20348
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
20322
|
-
(0,
|
|
20349
|
+
(0, import_react118.useEffect)(() => {
|
|
20323
20350
|
if (onRichTextInit) {
|
|
20324
20351
|
onRichTextInit(editor);
|
|
20325
20352
|
}
|
|
20326
20353
|
}, [editor, onRichTextInit]);
|
|
20327
|
-
(0,
|
|
20354
|
+
(0, import_react118.useEffect)(() => {
|
|
20328
20355
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
20329
20356
|
requestAnimationFrame(() => {
|
|
20330
20357
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -20369,15 +20396,15 @@ var RichText = ({
|
|
|
20369
20396
|
|
|
20370
20397
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20371
20398
|
init_emotion_jsx_shim();
|
|
20372
|
-
var
|
|
20399
|
+
var import_react119 = require("react");
|
|
20373
20400
|
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
20374
|
-
var ParameterSelect = (0,
|
|
20401
|
+
var ParameterSelect = (0, import_react119.forwardRef)(
|
|
20375
20402
|
({ defaultOption, options, ...props }, ref) => {
|
|
20376
20403
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20377
20404
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20378
20405
|
}
|
|
20379
20406
|
);
|
|
20380
|
-
var ParameterSelectInner = (0,
|
|
20407
|
+
var ParameterSelectInner = (0, import_react119.forwardRef)(
|
|
20381
20408
|
({ defaultOption, options, ...props }, ref) => {
|
|
20382
20409
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20383
20410
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
@@ -20402,13 +20429,13 @@ var ParameterSelectInner = (0, import_react118.forwardRef)(
|
|
|
20402
20429
|
|
|
20403
20430
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20404
20431
|
init_emotion_jsx_shim();
|
|
20405
|
-
var
|
|
20432
|
+
var import_react120 = require("react");
|
|
20406
20433
|
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
20407
|
-
var ParameterTextarea = (0,
|
|
20434
|
+
var ParameterTextarea = (0, import_react120.forwardRef)((props, ref) => {
|
|
20408
20435
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20409
20436
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20410
20437
|
});
|
|
20411
|
-
var ParameterTextareaInner = (0,
|
|
20438
|
+
var ParameterTextareaInner = (0, import_react120.forwardRef)(({ ...props }, ref) => {
|
|
20412
20439
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20413
20440
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20414
20441
|
"textarea",
|
|
@@ -20424,13 +20451,13 @@ var ParameterTextareaInner = (0, import_react119.forwardRef)(({ ...props }, ref)
|
|
|
20424
20451
|
|
|
20425
20452
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20426
20453
|
init_emotion_jsx_shim();
|
|
20427
|
-
var
|
|
20454
|
+
var import_react121 = require("react");
|
|
20428
20455
|
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
20429
|
-
var ParameterToggle = (0,
|
|
20456
|
+
var ParameterToggle = (0, import_react121.forwardRef)((props, ref) => {
|
|
20430
20457
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20431
20458
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20432
20459
|
});
|
|
20433
|
-
var ParameterToggleInner = (0,
|
|
20460
|
+
var ParameterToggleInner = (0, import_react121.forwardRef)(
|
|
20434
20461
|
({ ...props }, ref) => {
|
|
20435
20462
|
const { id, label } = useParameterShell();
|
|
20436
20463
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
@@ -20445,8 +20472,8 @@ init_emotion_jsx_shim();
|
|
|
20445
20472
|
|
|
20446
20473
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20447
20474
|
init_emotion_jsx_shim();
|
|
20448
|
-
var
|
|
20449
|
-
var container =
|
|
20475
|
+
var import_react122 = require("@emotion/react");
|
|
20476
|
+
var container = import_react122.css`
|
|
20450
20477
|
background: var(--gray-50);
|
|
20451
20478
|
margin-block: var(--spacing-sm);
|
|
20452
20479
|
position: relative;
|
|
@@ -20456,14 +20483,14 @@ var container = import_react121.css`
|
|
|
20456
20483
|
border: solid 1px var(--gray-300);
|
|
20457
20484
|
`;
|
|
20458
20485
|
var themeMap = {
|
|
20459
|
-
primary:
|
|
20486
|
+
primary: import_react122.css`
|
|
20460
20487
|
background-color: var(--accent-light);
|
|
20461
20488
|
`,
|
|
20462
|
-
secondary:
|
|
20489
|
+
secondary: import_react122.css`
|
|
20463
20490
|
background-color: var(--brand-secondary-5);
|
|
20464
20491
|
`
|
|
20465
20492
|
};
|
|
20466
|
-
var bar =
|
|
20493
|
+
var bar = import_react122.css`
|
|
20467
20494
|
position: absolute;
|
|
20468
20495
|
inset: 0;
|
|
20469
20496
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20502,22 +20529,22 @@ function ProgressBar({ className, current, max, theme = "primary" }) {
|
|
|
20502
20529
|
|
|
20503
20530
|
// src/components/ProgressList/ProgressList.tsx
|
|
20504
20531
|
init_emotion_jsx_shim();
|
|
20505
|
-
var
|
|
20532
|
+
var import_react124 = require("@emotion/react");
|
|
20506
20533
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20507
20534
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20508
20535
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20509
|
-
var
|
|
20536
|
+
var import_react125 = require("react");
|
|
20510
20537
|
|
|
20511
20538
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20512
20539
|
init_emotion_jsx_shim();
|
|
20513
|
-
var
|
|
20514
|
-
var progressListStyles =
|
|
20540
|
+
var import_react123 = require("@emotion/react");
|
|
20541
|
+
var progressListStyles = import_react123.css`
|
|
20515
20542
|
display: flex;
|
|
20516
20543
|
flex-direction: column;
|
|
20517
20544
|
gap: var(--spacing-sm);
|
|
20518
20545
|
list-style-type: none;
|
|
20519
20546
|
`;
|
|
20520
|
-
var progressListItemStyles =
|
|
20547
|
+
var progressListItemStyles = import_react123.css`
|
|
20521
20548
|
display: flex;
|
|
20522
20549
|
gap: var(--spacing-base);
|
|
20523
20550
|
align-items: center;
|
|
@@ -20526,7 +20553,7 @@ var progressListItemStyles = import_react122.css`
|
|
|
20526
20553
|
// src/components/ProgressList/ProgressList.tsx
|
|
20527
20554
|
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20528
20555
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20529
|
-
const itemsWithStatus = (0,
|
|
20556
|
+
const itemsWithStatus = (0, import_react125.useMemo)(() => {
|
|
20530
20557
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20531
20558
|
return items.map((item, index) => {
|
|
20532
20559
|
let status = "queued";
|
|
@@ -20559,7 +20586,7 @@ var ProgressListItem = ({
|
|
|
20559
20586
|
errorLevel = "danger",
|
|
20560
20587
|
autoEllipsis = false
|
|
20561
20588
|
}) => {
|
|
20562
|
-
const icon = (0,
|
|
20589
|
+
const icon = (0, import_react125.useMemo)(() => {
|
|
20563
20590
|
if (error) {
|
|
20564
20591
|
return warningIcon;
|
|
20565
20592
|
}
|
|
@@ -20570,14 +20597,14 @@ var ProgressListItem = ({
|
|
|
20570
20597
|
};
|
|
20571
20598
|
return iconPerStatus[status];
|
|
20572
20599
|
}, [status, error]);
|
|
20573
|
-
const statusStyles = (0,
|
|
20600
|
+
const statusStyles = (0, import_react125.useMemo)(() => {
|
|
20574
20601
|
if (error) {
|
|
20575
|
-
return errorLevel === "caution" ?
|
|
20602
|
+
return errorLevel === "caution" ? import_react124.css`
|
|
20576
20603
|
color: rgb(161, 98, 7);
|
|
20577
20604
|
& svg {
|
|
20578
20605
|
color: rgb(250, 204, 21);
|
|
20579
20606
|
}
|
|
20580
|
-
` :
|
|
20607
|
+
` : import_react124.css`
|
|
20581
20608
|
color: rgb(185, 28, 28);
|
|
20582
20609
|
& svg {
|
|
20583
20610
|
color: var(--brand-primary-2);
|
|
@@ -20585,13 +20612,13 @@ var ProgressListItem = ({
|
|
|
20585
20612
|
`;
|
|
20586
20613
|
}
|
|
20587
20614
|
const colorPerStatus = {
|
|
20588
|
-
completed:
|
|
20615
|
+
completed: import_react124.css`
|
|
20589
20616
|
opacity: 0.75;
|
|
20590
20617
|
`,
|
|
20591
|
-
inProgress:
|
|
20618
|
+
inProgress: import_react124.css`
|
|
20592
20619
|
-webkit-text-stroke-width: thin;
|
|
20593
20620
|
`,
|
|
20594
|
-
queued:
|
|
20621
|
+
queued: import_react124.css`
|
|
20595
20622
|
opacity: 0.5;
|
|
20596
20623
|
`
|
|
20597
20624
|
};
|
|
@@ -20608,14 +20635,14 @@ var ProgressListItem = ({
|
|
|
20608
20635
|
|
|
20609
20636
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20610
20637
|
init_emotion_jsx_shim();
|
|
20611
|
-
var
|
|
20638
|
+
var import_react127 = require("@emotion/react");
|
|
20612
20639
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
20613
|
-
var
|
|
20640
|
+
var import_react128 = require("react");
|
|
20614
20641
|
|
|
20615
20642
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20616
20643
|
init_emotion_jsx_shim();
|
|
20617
|
-
var
|
|
20618
|
-
var segmentedControlStyles =
|
|
20644
|
+
var import_react126 = require("@emotion/react");
|
|
20645
|
+
var segmentedControlStyles = import_react126.css`
|
|
20619
20646
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20620
20647
|
--segmented-control-border-width: 1px;
|
|
20621
20648
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -20634,14 +20661,14 @@ var segmentedControlStyles = import_react125.css`
|
|
|
20634
20661
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20635
20662
|
font-size: var(--fs-xs);
|
|
20636
20663
|
`;
|
|
20637
|
-
var segmentedControlVerticalStyles =
|
|
20664
|
+
var segmentedControlVerticalStyles = import_react126.css`
|
|
20638
20665
|
flex-direction: column;
|
|
20639
20666
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20640
20667
|
var(--segmented-control-rounded-value) 0 0;
|
|
20641
20668
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20642
20669
|
var(--segmented-control-rounded-value);
|
|
20643
20670
|
`;
|
|
20644
|
-
var segmentedControlItemStyles =
|
|
20671
|
+
var segmentedControlItemStyles = import_react126.css`
|
|
20645
20672
|
&:first-of-type label {
|
|
20646
20673
|
border-radius: var(--segmented-control-first-border-radius);
|
|
20647
20674
|
}
|
|
@@ -20649,10 +20676,10 @@ var segmentedControlItemStyles = import_react125.css`
|
|
|
20649
20676
|
border-radius: var(--segmented-control-last-border-radius);
|
|
20650
20677
|
}
|
|
20651
20678
|
`;
|
|
20652
|
-
var segmentedControlInputStyles =
|
|
20679
|
+
var segmentedControlInputStyles = import_react126.css`
|
|
20653
20680
|
${accessibleHidden}
|
|
20654
20681
|
`;
|
|
20655
|
-
var segmentedControlLabelStyles = (checked, disabled) =>
|
|
20682
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react126.css`
|
|
20656
20683
|
position: relative;
|
|
20657
20684
|
display: flex;
|
|
20658
20685
|
align-items: center;
|
|
@@ -20719,20 +20746,20 @@ var segmentedControlLabelStyles = (checked, disabled) => import_react125.css`
|
|
|
20719
20746
|
`}
|
|
20720
20747
|
}
|
|
20721
20748
|
`;
|
|
20722
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
20749
|
+
var segmentedControlLabelIconOnlyStyles = import_react126.css`
|
|
20723
20750
|
padding-inline: 0.5em;
|
|
20724
20751
|
`;
|
|
20725
|
-
var segmentedControlLabelCheckStyles =
|
|
20752
|
+
var segmentedControlLabelCheckStyles = import_react126.css`
|
|
20726
20753
|
opacity: 0.5;
|
|
20727
20754
|
`;
|
|
20728
|
-
var segmentedControlLabelContentStyles =
|
|
20755
|
+
var segmentedControlLabelContentStyles = import_react126.css`
|
|
20729
20756
|
display: flex;
|
|
20730
20757
|
align-items: center;
|
|
20731
20758
|
justify-content: center;
|
|
20732
20759
|
gap: var(--spacing-sm);
|
|
20733
20760
|
height: 100%;
|
|
20734
20761
|
`;
|
|
20735
|
-
var segmentedControlLabelTextStyles =
|
|
20762
|
+
var segmentedControlLabelTextStyles = import_react126.css``;
|
|
20736
20763
|
|
|
20737
20764
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20738
20765
|
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
@@ -20747,7 +20774,7 @@ var SegmentedControl = ({
|
|
|
20747
20774
|
size = "md",
|
|
20748
20775
|
...props
|
|
20749
20776
|
}) => {
|
|
20750
|
-
const onOptionChange = (0,
|
|
20777
|
+
const onOptionChange = (0, import_react128.useCallback)(
|
|
20751
20778
|
(event) => {
|
|
20752
20779
|
if (event.target.checked) {
|
|
20753
20780
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20755,15 +20782,15 @@ var SegmentedControl = ({
|
|
|
20755
20782
|
},
|
|
20756
20783
|
[options, onChange]
|
|
20757
20784
|
);
|
|
20758
|
-
const sizeStyles = (0,
|
|
20785
|
+
const sizeStyles = (0, import_react128.useMemo)(() => {
|
|
20759
20786
|
const map = {
|
|
20760
|
-
sm: (0,
|
|
20761
|
-
md: (0,
|
|
20762
|
-
lg: (0,
|
|
20787
|
+
sm: (0, import_react127.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
20788
|
+
md: (0, import_react127.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
20789
|
+
lg: (0, import_react127.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20763
20790
|
};
|
|
20764
20791
|
return map[size];
|
|
20765
20792
|
}, [size]);
|
|
20766
|
-
const isIconOnly = (0,
|
|
20793
|
+
const isIconOnly = (0, import_react128.useMemo)(() => {
|
|
20767
20794
|
return options.every((option) => option.icon && !option.label);
|
|
20768
20795
|
}, [options]);
|
|
20769
20796
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
@@ -20820,12 +20847,12 @@ init_emotion_jsx_shim();
|
|
|
20820
20847
|
|
|
20821
20848
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20822
20849
|
init_emotion_jsx_shim();
|
|
20823
|
-
var
|
|
20824
|
-
var lightFadingOut =
|
|
20850
|
+
var import_react129 = require("@emotion/react");
|
|
20851
|
+
var lightFadingOut = import_react129.keyframes`
|
|
20825
20852
|
from { opacity: 0.1; }
|
|
20826
20853
|
to { opacity: 0.025; }
|
|
20827
20854
|
`;
|
|
20828
|
-
var skeletonStyles =
|
|
20855
|
+
var skeletonStyles = import_react129.css`
|
|
20829
20856
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20830
20857
|
background-color: var(--gray-900);
|
|
20831
20858
|
`;
|
|
@@ -20864,8 +20891,8 @@ var React23 = __toESM(require("react"));
|
|
|
20864
20891
|
|
|
20865
20892
|
// src/components/Switch/Switch.styles.ts
|
|
20866
20893
|
init_emotion_jsx_shim();
|
|
20867
|
-
var
|
|
20868
|
-
var SwitchInputContainer =
|
|
20894
|
+
var import_react130 = require("@emotion/react");
|
|
20895
|
+
var SwitchInputContainer = import_react130.css`
|
|
20869
20896
|
cursor: pointer;
|
|
20870
20897
|
display: inline-block;
|
|
20871
20898
|
position: relative;
|
|
@@ -20874,7 +20901,7 @@ var SwitchInputContainer = import_react129.css`
|
|
|
20874
20901
|
vertical-align: middle;
|
|
20875
20902
|
user-select: none;
|
|
20876
20903
|
`;
|
|
20877
|
-
var SwitchInput =
|
|
20904
|
+
var SwitchInput = import_react130.css`
|
|
20878
20905
|
appearance: none;
|
|
20879
20906
|
border-radius: var(--rounded-full);
|
|
20880
20907
|
background-color: var(--white);
|
|
@@ -20912,7 +20939,7 @@ var SwitchInput = import_react129.css`
|
|
|
20912
20939
|
cursor: not-allowed;
|
|
20913
20940
|
}
|
|
20914
20941
|
`;
|
|
20915
|
-
var SwitchInputDisabled =
|
|
20942
|
+
var SwitchInputDisabled = import_react130.css`
|
|
20916
20943
|
opacity: var(--opacity-50);
|
|
20917
20944
|
cursor: not-allowed;
|
|
20918
20945
|
|
|
@@ -20920,7 +20947,7 @@ var SwitchInputDisabled = import_react129.css`
|
|
|
20920
20947
|
cursor: not-allowed;
|
|
20921
20948
|
}
|
|
20922
20949
|
`;
|
|
20923
|
-
var SwitchInputLabel =
|
|
20950
|
+
var SwitchInputLabel = import_react130.css`
|
|
20924
20951
|
align-items: center;
|
|
20925
20952
|
color: var(--brand-secondary-1);
|
|
20926
20953
|
display: inline-flex;
|
|
@@ -20942,7 +20969,7 @@ var SwitchInputLabel = import_react129.css`
|
|
|
20942
20969
|
top: 0;
|
|
20943
20970
|
}
|
|
20944
20971
|
`;
|
|
20945
|
-
var SwitchText =
|
|
20972
|
+
var SwitchText = import_react130.css`
|
|
20946
20973
|
color: var(--gray-500);
|
|
20947
20974
|
font-size: var(--fs-sm);
|
|
20948
20975
|
padding-inline: var(--spacing-2xl) 0;
|
|
@@ -20973,8 +21000,8 @@ var React24 = __toESM(require("react"));
|
|
|
20973
21000
|
|
|
20974
21001
|
// src/components/Table/Table.styles.ts
|
|
20975
21002
|
init_emotion_jsx_shim();
|
|
20976
|
-
var
|
|
20977
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
21003
|
+
var import_react131 = require("@emotion/react");
|
|
21004
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react131.css`
|
|
20978
21005
|
border-bottom: 1px solid var(--gray-400);
|
|
20979
21006
|
border-collapse: collapse;
|
|
20980
21007
|
min-width: 100%;
|
|
@@ -20985,15 +21012,15 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
20985
21012
|
padding: ${cellPadding};
|
|
20986
21013
|
}
|
|
20987
21014
|
`;
|
|
20988
|
-
var tableHead =
|
|
21015
|
+
var tableHead = import_react131.css`
|
|
20989
21016
|
background: var(--gray-100);
|
|
20990
21017
|
color: var(--brand-secondary-1);
|
|
20991
21018
|
text-align: left;
|
|
20992
21019
|
`;
|
|
20993
|
-
var tableRow =
|
|
21020
|
+
var tableRow = import_react131.css`
|
|
20994
21021
|
border-bottom: 1px solid var(--gray-200);
|
|
20995
21022
|
`;
|
|
20996
|
-
var tableCellHead =
|
|
21023
|
+
var tableCellHead = import_react131.css`
|
|
20997
21024
|
font-size: var(--fs-sm);
|
|
20998
21025
|
text-transform: uppercase;
|
|
20999
21026
|
font-weight: var(--fw-bold);
|
|
@@ -21039,13 +21066,13 @@ var TableCellData = React24.forwardRef(
|
|
|
21039
21066
|
|
|
21040
21067
|
// src/components/Tabs/Tabs.tsx
|
|
21041
21068
|
init_emotion_jsx_shim();
|
|
21042
|
-
var
|
|
21069
|
+
var import_react133 = require("react");
|
|
21043
21070
|
var import_Tab = require("reakit/Tab");
|
|
21044
21071
|
|
|
21045
21072
|
// src/components/Tabs/Tabs.styles.ts
|
|
21046
21073
|
init_emotion_jsx_shim();
|
|
21047
|
-
var
|
|
21048
|
-
var tabButtonStyles =
|
|
21074
|
+
var import_react132 = require("@emotion/react");
|
|
21075
|
+
var tabButtonStyles = import_react132.css`
|
|
21049
21076
|
align-items: center;
|
|
21050
21077
|
border: 0;
|
|
21051
21078
|
height: 2.5rem;
|
|
@@ -21062,7 +21089,7 @@ var tabButtonStyles = import_react131.css`
|
|
|
21062
21089
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
21063
21090
|
}
|
|
21064
21091
|
`;
|
|
21065
|
-
var tabButtonGroupStyles =
|
|
21092
|
+
var tabButtonGroupStyles = import_react132.css`
|
|
21066
21093
|
display: flex;
|
|
21067
21094
|
gap: var(--spacing-base);
|
|
21068
21095
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -21070,22 +21097,22 @@ var tabButtonGroupStyles = import_react131.css`
|
|
|
21070
21097
|
|
|
21071
21098
|
// src/components/Tabs/Tabs.tsx
|
|
21072
21099
|
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
21073
|
-
var CurrentTabContext = (0,
|
|
21100
|
+
var CurrentTabContext = (0, import_react133.createContext)(null);
|
|
21074
21101
|
var useCurrentTab = () => {
|
|
21075
|
-
const context = (0,
|
|
21102
|
+
const context = (0, import_react133.useContext)(CurrentTabContext);
|
|
21076
21103
|
if (!context) {
|
|
21077
21104
|
throw new Error("This component can only be used inside <Tabs>");
|
|
21078
21105
|
}
|
|
21079
21106
|
return context;
|
|
21080
21107
|
};
|
|
21081
21108
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
21082
|
-
const selected = (0,
|
|
21109
|
+
const selected = (0, import_react133.useMemo)(() => {
|
|
21083
21110
|
if (selectedId)
|
|
21084
21111
|
return selectedId;
|
|
21085
21112
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
21086
21113
|
}, [selectedId, useHashForState]);
|
|
21087
21114
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
21088
|
-
(0,
|
|
21115
|
+
(0, import_react133.useEffect)(() => {
|
|
21089
21116
|
var _a;
|
|
21090
21117
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
21091
21118
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -21093,7 +21120,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
21093
21120
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
21094
21121
|
}
|
|
21095
21122
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
21096
|
-
(0,
|
|
21123
|
+
(0, import_react133.useEffect)(() => {
|
|
21097
21124
|
if (selected && selected !== tab.selectedId) {
|
|
21098
21125
|
tab.setSelectedId(selected);
|
|
21099
21126
|
}
|
|
@@ -21118,8 +21145,8 @@ init_emotion_jsx_shim();
|
|
|
21118
21145
|
|
|
21119
21146
|
// src/components/Validation/StatusBullet.styles.ts
|
|
21120
21147
|
init_emotion_jsx_shim();
|
|
21121
|
-
var
|
|
21122
|
-
var StatusBulletContainer =
|
|
21148
|
+
var import_react134 = require("@emotion/react");
|
|
21149
|
+
var StatusBulletContainer = import_react134.css`
|
|
21123
21150
|
align-items: center;
|
|
21124
21151
|
align-self: center;
|
|
21125
21152
|
color: var(--gray-500);
|
|
@@ -21136,33 +21163,33 @@ var StatusBulletContainer = import_react133.css`
|
|
|
21136
21163
|
display: block;
|
|
21137
21164
|
}
|
|
21138
21165
|
`;
|
|
21139
|
-
var StatusBulletBase =
|
|
21166
|
+
var StatusBulletBase = import_react134.css`
|
|
21140
21167
|
font-size: var(--fs-sm);
|
|
21141
21168
|
&:before {
|
|
21142
21169
|
width: var(--fs-xs);
|
|
21143
21170
|
height: var(--fs-xs);
|
|
21144
21171
|
}
|
|
21145
21172
|
`;
|
|
21146
|
-
var StatusBulletSmall =
|
|
21173
|
+
var StatusBulletSmall = import_react134.css`
|
|
21147
21174
|
font-size: var(--fs-xs);
|
|
21148
21175
|
&:before {
|
|
21149
21176
|
width: var(--fs-xxs);
|
|
21150
21177
|
height: var(--fs-xxs);
|
|
21151
21178
|
}
|
|
21152
21179
|
`;
|
|
21153
|
-
var StatusDraft =
|
|
21180
|
+
var StatusDraft = import_react134.css`
|
|
21154
21181
|
&:before {
|
|
21155
21182
|
background: var(--white);
|
|
21156
21183
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
21157
21184
|
}
|
|
21158
21185
|
`;
|
|
21159
|
-
var StatusModified =
|
|
21186
|
+
var StatusModified = import_react134.css`
|
|
21160
21187
|
&:before {
|
|
21161
21188
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
21162
21189
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
21163
21190
|
}
|
|
21164
21191
|
`;
|
|
21165
|
-
var StatusError =
|
|
21192
|
+
var StatusError = import_react134.css`
|
|
21166
21193
|
color: var(--error);
|
|
21167
21194
|
&:before {
|
|
21168
21195
|
/* TODO: replace this with an svg icon */
|
|
@@ -21175,12 +21202,12 @@ var StatusError = import_react133.css`
|
|
|
21175
21202
|
);
|
|
21176
21203
|
}
|
|
21177
21204
|
`;
|
|
21178
|
-
var StatusPublished =
|
|
21205
|
+
var StatusPublished = import_react134.css`
|
|
21179
21206
|
&:before {
|
|
21180
21207
|
background: var(--primary-action-default);
|
|
21181
21208
|
}
|
|
21182
21209
|
`;
|
|
21183
|
-
var StatusOrphan =
|
|
21210
|
+
var StatusOrphan = import_react134.css`
|
|
21184
21211
|
&:before {
|
|
21185
21212
|
background: var(--brand-secondary-5);
|
|
21186
21213
|
}
|