@uniformdev/design-system 19.27.1-alpha.3 → 19.29.1-alpha.19
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 +996 -846
- package/dist/index.d.ts +36 -13
- package/dist/index.js +876 -723
- package/package.json +15 -14
package/dist/esm/index.js
CHANGED
|
@@ -175,7 +175,7 @@ var Theme = ({ disableReset = false }) => {
|
|
|
175
175
|
/* z-indexs */
|
|
176
176
|
--z-10: 10;
|
|
177
177
|
--z-20: 20;
|
|
178
|
-
--z-drawer:
|
|
178
|
+
--z-drawer: 50;
|
|
179
179
|
--z-50: 50;
|
|
180
180
|
--z-tooltip: 80;
|
|
181
181
|
|
|
@@ -560,6 +560,10 @@ var inputSelect = css2`
|
|
|
560
560
|
background-repeat: no-repeat;
|
|
561
561
|
background-size: 1rem;
|
|
562
562
|
padding-right: var(--spacing-xl);
|
|
563
|
+
|
|
564
|
+
option:disabled {
|
|
565
|
+
color: var(--gray-300);
|
|
566
|
+
}
|
|
563
567
|
`;
|
|
564
568
|
var inputSearchCloseBtn = css2`
|
|
565
569
|
background: none;
|
|
@@ -10957,28 +10961,34 @@ var UniformBadge = ({
|
|
|
10957
10961
|
return /* @__PURE__ */ jsxs9(
|
|
10958
10962
|
"svg",
|
|
10959
10963
|
{
|
|
10960
|
-
width: "
|
|
10961
|
-
height: "
|
|
10962
|
-
viewBox: "0 0
|
|
10964
|
+
width: "51",
|
|
10965
|
+
height: "52",
|
|
10966
|
+
viewBox: "0 0 51 52",
|
|
10963
10967
|
fill: "none",
|
|
10964
10968
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10965
10969
|
"data-test-id": "uniform-Badge",
|
|
10966
10970
|
css: [SVG, theme === "dark" ? SVGDark : SVGLight],
|
|
10967
10971
|
...props,
|
|
10968
10972
|
children: [
|
|
10969
|
-
/* @__PURE__ */ jsx18("path", { d: "M28.998 0 0 16.744V50.23l28.998-16.744 29.004-16.743L28.998 0Z", fill: "#7BB3FF" }),
|
|
10970
10973
|
/* @__PURE__ */ jsx18(
|
|
10971
10974
|
"path",
|
|
10972
10975
|
{
|
|
10973
|
-
d: "
|
|
10974
|
-
fill: "#
|
|
10976
|
+
d: "M19.3444 4.35168L7 11.484V25.7181L19.3444 18.5858L31.6583 11.484L19.3444 4.35168Z",
|
|
10977
|
+
fill: "#84ADFF"
|
|
10978
|
+
}
|
|
10979
|
+
),
|
|
10980
|
+
/* @__PURE__ */ jsx18(
|
|
10981
|
+
"path",
|
|
10982
|
+
{
|
|
10983
|
+
d: "M19.3444 32.8505V18.5858L7 25.7182V39.9523L19.3444 47.0846L31.6583 39.9523V25.7182L19.3444 32.8505Z",
|
|
10984
|
+
fill: "#5786FF"
|
|
10975
10985
|
}
|
|
10976
10986
|
),
|
|
10977
10987
|
/* @__PURE__ */ jsx18(
|
|
10978
10988
|
"path",
|
|
10979
10989
|
{
|
|
10980
|
-
d: "
|
|
10981
|
-
fill: "#
|
|
10990
|
+
d: "M31.6583 11.484L19.3444 18.5858L31.6583 25.7182V39.9523L44.0027 32.8505V18.5858L31.6583 11.484Z",
|
|
10991
|
+
fill: "#EC2924"
|
|
10982
10992
|
}
|
|
10983
10993
|
)
|
|
10984
10994
|
]
|
|
@@ -12533,7 +12543,8 @@ var Details = ({
|
|
|
12533
12543
|
};
|
|
12534
12544
|
|
|
12535
12545
|
// src/components/Drawer/Drawer.tsx
|
|
12536
|
-
import
|
|
12546
|
+
import React11, { createContext as createContext4, useContext as useContext5, useEffect as useEffect5, useRef as useRef3, useState as useState5 } from "react";
|
|
12547
|
+
import { createPortal } from "react-dom";
|
|
12537
12548
|
import { CgChevronRight } from "react-icons/cg";
|
|
12538
12549
|
|
|
12539
12550
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -12562,8 +12573,10 @@ var headerWrapperStyles = css39`
|
|
|
12562
12573
|
margin-right: var(--spacing-sm);
|
|
12563
12574
|
`;
|
|
12564
12575
|
var drawerHeaderStyles = css39`
|
|
12565
|
-
|
|
12566
|
-
|
|
12576
|
+
align-items: center;
|
|
12577
|
+
display: flex;
|
|
12578
|
+
gap: var(--spacing-sm);
|
|
12579
|
+
font-size: var(--fs-md);
|
|
12567
12580
|
padding-inline: var(--spacing-base);
|
|
12568
12581
|
flex: 1;
|
|
12569
12582
|
`;
|
|
@@ -12574,10 +12587,13 @@ var drawerRendererStyles = css39`
|
|
|
12574
12587
|
`;
|
|
12575
12588
|
var drawerInnerStyles = css39`
|
|
12576
12589
|
height: 100%;
|
|
12577
|
-
padding: 0 var(--spacing-base) var(--spacing-base);
|
|
12578
12590
|
overflow: auto;
|
|
12591
|
+
padding: 0 var(--spacing-md) var(--spacing-base) var(--spacing-sm);
|
|
12579
12592
|
${scrollbarStyles}
|
|
12580
12593
|
`;
|
|
12594
|
+
var drawerHeading = css39`
|
|
12595
|
+
font-size: var(--fs-base);
|
|
12596
|
+
`;
|
|
12581
12597
|
var slideDrawerIn = keyframes2`
|
|
12582
12598
|
0% {
|
|
12583
12599
|
transform: translate(0);
|
|
@@ -12631,14 +12647,18 @@ var drawerWrapperLeftAlignedStyles = css39`
|
|
|
12631
12647
|
var drawerWrapperOverlayStyles = css39`
|
|
12632
12648
|
position: absolute;
|
|
12633
12649
|
inset: 0;
|
|
12634
|
-
background: rgba(31, 43, 52, 0.4);
|
|
12635
12650
|
animation: ${fadeIn} var(--duration-fast) ease-out;
|
|
12651
|
+
|
|
12652
|
+
&:first-of-type {
|
|
12653
|
+
background: rgba(31, 43, 52, 0.4);
|
|
12654
|
+
}
|
|
12636
12655
|
`;
|
|
12637
12656
|
|
|
12638
12657
|
// src/components/Drawer/DrawerProvider.tsx
|
|
12639
|
-
import { createContext as createContext3, useCallback, useContext as useContext4, useState as useState4 } from "react";
|
|
12658
|
+
import { createContext as createContext3, useCallback, useContext as useContext4, useRef as useRef2, useState as useState4 } from "react";
|
|
12640
12659
|
import { jsx as jsx39 } from "@emotion/react/jsx-runtime";
|
|
12641
12660
|
var DrawerContext = createContext3({
|
|
12661
|
+
providerId: "",
|
|
12642
12662
|
drawersRegistry: [],
|
|
12643
12663
|
registerDrawer: () => {
|
|
12644
12664
|
},
|
|
@@ -12647,6 +12667,7 @@ var DrawerContext = createContext3({
|
|
|
12647
12667
|
});
|
|
12648
12668
|
var DrawerProvider = ({ children }) => {
|
|
12649
12669
|
const [drawersRegistry, setDrawersRegistry] = useState4([]);
|
|
12670
|
+
const providerId = useRef2(crypto.randomUUID());
|
|
12650
12671
|
useShortcut({
|
|
12651
12672
|
handler: () => {
|
|
12652
12673
|
var _a, _b;
|
|
@@ -12657,20 +12678,27 @@ var DrawerProvider = ({ children }) => {
|
|
|
12657
12678
|
const registerDrawer = useCallback(
|
|
12658
12679
|
({ drawer, onFirstRender }) => {
|
|
12659
12680
|
setDrawersRegistry((currentValue) => {
|
|
12660
|
-
var _a;
|
|
12681
|
+
var _a, _b;
|
|
12661
12682
|
const alreadyRegisteredDrawerIndex = currentValue.findIndex((d) => isEqualDrawer(d, drawer));
|
|
12662
12683
|
const alreadyRegisteredDrawer = currentValue[alreadyRegisteredDrawerIndex];
|
|
12663
12684
|
const isFirstRender = !alreadyRegisteredDrawer;
|
|
12664
|
-
if (isFirstRender) {
|
|
12665
|
-
onFirstRender == null ? void 0 : onFirstRender();
|
|
12666
|
-
}
|
|
12667
12685
|
const shouldReplaceCurrent = alreadyRegisteredDrawer !== void 0 && !isEqualDrawerInstance(alreadyRegisteredDrawer, drawer);
|
|
12686
|
+
const newDrawersRegistry = [...currentValue];
|
|
12668
12687
|
if (shouldReplaceCurrent) {
|
|
12669
12688
|
(_a = alreadyRegisteredDrawer.onRequestClose) == null ? void 0 : _a.call(alreadyRegisteredDrawer);
|
|
12689
|
+
newDrawersRegistry.splice(alreadyRegisteredDrawerIndex, 1);
|
|
12670
12690
|
}
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12691
|
+
if (isFirstRender || shouldReplaceCurrent) {
|
|
12692
|
+
onFirstRender == null ? void 0 : onFirstRender();
|
|
12693
|
+
}
|
|
12694
|
+
newDrawersRegistry.push({
|
|
12695
|
+
registeredAt: (_b = alreadyRegisteredDrawer == null ? void 0 : alreadyRegisteredDrawer.registeredAt) != null ? _b : Date.now(),
|
|
12696
|
+
...drawer
|
|
12697
|
+
});
|
|
12698
|
+
newDrawersRegistry.sort((a, b) => {
|
|
12699
|
+
var _a2, _b2;
|
|
12700
|
+
return ((_a2 = a.registeredAt) != null ? _a2 : 0) - ((_b2 = b.registeredAt) != null ? _b2 : 0);
|
|
12701
|
+
});
|
|
12674
12702
|
return newDrawersRegistry;
|
|
12675
12703
|
});
|
|
12676
12704
|
},
|
|
@@ -12686,7 +12714,18 @@ var DrawerProvider = ({ children }) => {
|
|
|
12686
12714
|
},
|
|
12687
12715
|
[setDrawersRegistry]
|
|
12688
12716
|
);
|
|
12689
|
-
return /* @__PURE__ */ jsx39(
|
|
12717
|
+
return /* @__PURE__ */ jsx39(
|
|
12718
|
+
DrawerContext.Provider,
|
|
12719
|
+
{
|
|
12720
|
+
value: {
|
|
12721
|
+
drawersRegistry,
|
|
12722
|
+
registerDrawer,
|
|
12723
|
+
unregisterDrawer,
|
|
12724
|
+
providerId: providerId.current
|
|
12725
|
+
},
|
|
12726
|
+
children
|
|
12727
|
+
}
|
|
12728
|
+
);
|
|
12690
12729
|
};
|
|
12691
12730
|
var useDrawer = () => {
|
|
12692
12731
|
return useContext4(DrawerContext);
|
|
@@ -12705,30 +12744,168 @@ function isEqualDrawerInstance(a, b) {
|
|
|
12705
12744
|
return isEqualDrawer(a, b) && a.instanceKey === b.instanceKey;
|
|
12706
12745
|
}
|
|
12707
12746
|
|
|
12747
|
+
// src/components/Drawer/Drawer.tsx
|
|
12748
|
+
import { jsx as jsx40, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
12749
|
+
var defaultSackId = "_default";
|
|
12750
|
+
var CurrentDrawerContext = createContext4({});
|
|
12751
|
+
var useCurrentDrawer = () => {
|
|
12752
|
+
return useContext5(CurrentDrawerContext);
|
|
12753
|
+
};
|
|
12754
|
+
var Drawer = React11.forwardRef(
|
|
12755
|
+
({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
12756
|
+
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
12757
|
+
const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
|
|
12758
|
+
return drawerProps.stackId ? /* @__PURE__ */ jsx40(DrawerInner, { ref, ...drawerProps }) : inheritedStackId ? /* @__PURE__ */ jsx40(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : /* @__PURE__ */ jsxs22(DrawerProvider, { children: [
|
|
12759
|
+
/* @__PURE__ */ jsx40(DrawerInner, { ref, ...drawerProps }),
|
|
12760
|
+
/* @__PURE__ */ jsx40(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
12761
|
+
] });
|
|
12762
|
+
}
|
|
12763
|
+
);
|
|
12764
|
+
var DrawerInner = ({
|
|
12765
|
+
ref,
|
|
12766
|
+
stackId = defaultSackId,
|
|
12767
|
+
id,
|
|
12768
|
+
bgColor = "var(--gray-50)",
|
|
12769
|
+
children,
|
|
12770
|
+
header,
|
|
12771
|
+
instanceKey,
|
|
12772
|
+
onRequestClose,
|
|
12773
|
+
leftAligned,
|
|
12774
|
+
testId = "side-dialog"
|
|
12775
|
+
}) => {
|
|
12776
|
+
const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
|
|
12777
|
+
const closeButtonRef = useRef3(null);
|
|
12778
|
+
const [rendererElement, setRendererElement] = useState5(null);
|
|
12779
|
+
useEffect5(() => {
|
|
12780
|
+
registerDrawer({
|
|
12781
|
+
drawer: {
|
|
12782
|
+
id,
|
|
12783
|
+
stackId,
|
|
12784
|
+
onRequestClose,
|
|
12785
|
+
instanceKey
|
|
12786
|
+
},
|
|
12787
|
+
onFirstRender: () => {
|
|
12788
|
+
setTimeout(() => {
|
|
12789
|
+
var _a, _b;
|
|
12790
|
+
setRendererElement(findDrawerRenderer({ providerId, stackId, id }));
|
|
12791
|
+
if (ref && "current" in ref && !((_a = ref.current) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
12792
|
+
(_b = closeButtonRef.current) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
12793
|
+
}
|
|
12794
|
+
}, 0);
|
|
12795
|
+
}
|
|
12796
|
+
});
|
|
12797
|
+
return () => {
|
|
12798
|
+
unregisterDrawer({ id, stackId, instanceKey });
|
|
12799
|
+
};
|
|
12800
|
+
}, [id, stackId, instanceKey, providerId, registerDrawer, unregisterDrawer]);
|
|
12801
|
+
if (!rendererElement) {
|
|
12802
|
+
return null;
|
|
12803
|
+
}
|
|
12804
|
+
const headerId = `dialog-header-${providerId}-${stackId}-${id}`;
|
|
12805
|
+
return /* @__PURE__ */ jsx40(CurrentDrawerContext.Provider, { value: { id, stackId, leftAligned }, children: createPortal(
|
|
12806
|
+
/* @__PURE__ */ jsxs22(
|
|
12807
|
+
"div",
|
|
12808
|
+
{
|
|
12809
|
+
ref,
|
|
12810
|
+
id,
|
|
12811
|
+
role: "dialog",
|
|
12812
|
+
tabIndex: -1,
|
|
12813
|
+
"aria-labelledby": headerId,
|
|
12814
|
+
css: drawerStyles(bgColor),
|
|
12815
|
+
"data-test-id": testId,
|
|
12816
|
+
children: [
|
|
12817
|
+
/* @__PURE__ */ jsxs22("div", { css: headerWrapperStyles, children: [
|
|
12818
|
+
header ? /* @__PURE__ */ jsx40("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
12819
|
+
/* @__PURE__ */ jsx40(
|
|
12820
|
+
Button,
|
|
12821
|
+
{
|
|
12822
|
+
ref: closeButtonRef,
|
|
12823
|
+
type: "button",
|
|
12824
|
+
onClick: onRequestClose,
|
|
12825
|
+
css: drawerCloseButtonStyles,
|
|
12826
|
+
title: "Close dialog",
|
|
12827
|
+
buttonType: "ghost",
|
|
12828
|
+
children: /* @__PURE__ */ jsx40(
|
|
12829
|
+
Icon,
|
|
12830
|
+
{
|
|
12831
|
+
icon: CgChevronRight,
|
|
12832
|
+
iconColor: "gray",
|
|
12833
|
+
size: 24,
|
|
12834
|
+
css: { transform: "rotate(var(--drawer-close-icon-rotation))" }
|
|
12835
|
+
}
|
|
12836
|
+
)
|
|
12837
|
+
}
|
|
12838
|
+
)
|
|
12839
|
+
] }),
|
|
12840
|
+
/* @__PURE__ */ jsx40("div", { css: drawerInnerStyles, children })
|
|
12841
|
+
]
|
|
12842
|
+
}
|
|
12843
|
+
),
|
|
12844
|
+
rendererElement
|
|
12845
|
+
) });
|
|
12846
|
+
};
|
|
12847
|
+
var findDrawerRenderer = (params) => {
|
|
12848
|
+
return document.querySelector(
|
|
12849
|
+
Object.entries(getDrawerAttributes(params)).map(([key, value]) => `[${key}="${value}"]`).join("")
|
|
12850
|
+
);
|
|
12851
|
+
};
|
|
12852
|
+
|
|
12853
|
+
// src/components/Drawer/DrawerContent.styles.ts
|
|
12854
|
+
import { css as css40 } from "@emotion/react";
|
|
12855
|
+
var DrawerContent = css40`
|
|
12856
|
+
background: var(--gray-50);
|
|
12857
|
+
display: flex;
|
|
12858
|
+
flex-direction: column;
|
|
12859
|
+
gap: var(--spacing-base);
|
|
12860
|
+
height: 100%;
|
|
12861
|
+
`;
|
|
12862
|
+
var DrawerContentInner = css40`
|
|
12863
|
+
background: var(--white);
|
|
12864
|
+
padding: var(--spacing-base);
|
|
12865
|
+
flex: 1;
|
|
12866
|
+
height: 100%;
|
|
12867
|
+
overflow-y: auto;
|
|
12868
|
+
${scrollbarStyles}
|
|
12869
|
+
`;
|
|
12870
|
+
var DrawerContentBtnGroup = css40`
|
|
12871
|
+
display: flex;
|
|
12872
|
+
gap: var(--spacing-sm);
|
|
12873
|
+
padding: 0 var(--spacing-base) var(--spacing-base);
|
|
12874
|
+
`;
|
|
12875
|
+
|
|
12876
|
+
// src/components/Drawer/DrawerContent.tsx
|
|
12877
|
+
import { jsx as jsx41, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
|
|
12878
|
+
var DrawerContent2 = ({ children, buttonGroup, ...props }) => {
|
|
12879
|
+
return /* @__PURE__ */ jsxs23("div", { css: DrawerContent, ...props, children: [
|
|
12880
|
+
/* @__PURE__ */ jsx41("div", { css: DrawerContentInner, children }),
|
|
12881
|
+
buttonGroup ? /* @__PURE__ */ jsx41("div", { css: DrawerContentBtnGroup, children: buttonGroup }) : null
|
|
12882
|
+
] });
|
|
12883
|
+
};
|
|
12884
|
+
|
|
12708
12885
|
// src/components/Drawer/DrawerRenderer.tsx
|
|
12709
|
-
import {
|
|
12710
|
-
import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
12886
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
|
|
12711
12887
|
var maxLayeringInPx = 64;
|
|
12712
12888
|
var idealDistanceBetweenLayersInPx = 16;
|
|
12713
|
-
var CurrentDrawerRendererContext = createContext4({});
|
|
12714
|
-
var useCurrentDrawerRenderer = () => {
|
|
12715
|
-
return useContext5(CurrentDrawerRendererContext);
|
|
12716
|
-
};
|
|
12717
12889
|
var DrawerRenderer = ({
|
|
12718
12890
|
stackId,
|
|
12719
12891
|
position = "absolute",
|
|
12720
|
-
width = "
|
|
12892
|
+
width = "medium",
|
|
12721
12893
|
minWidth = "0",
|
|
12722
12894
|
maxWidth = "100%",
|
|
12723
12895
|
leftAligned = false,
|
|
12724
12896
|
...otherProps
|
|
12725
12897
|
}) => {
|
|
12726
|
-
const { drawersRegistry } = useDrawer();
|
|
12898
|
+
const { drawersRegistry, providerId } = useDrawer();
|
|
12727
12899
|
const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
|
|
12900
|
+
const drawerWidth = {
|
|
12901
|
+
narrow: "29rem",
|
|
12902
|
+
medium: "43rem",
|
|
12903
|
+
wide: "57rem"
|
|
12904
|
+
};
|
|
12728
12905
|
if (drawersToRender.length === 0) {
|
|
12729
12906
|
return null;
|
|
12730
12907
|
}
|
|
12731
|
-
return /* @__PURE__ */
|
|
12908
|
+
return /* @__PURE__ */ jsx42(
|
|
12732
12909
|
"div",
|
|
12733
12910
|
{
|
|
12734
12911
|
css: [
|
|
@@ -12737,22 +12914,31 @@ var DrawerRenderer = ({
|
|
|
12737
12914
|
position === "sticky" ? { height: "100%", marginTop: "-100%" } : void 0
|
|
12738
12915
|
],
|
|
12739
12916
|
...otherProps,
|
|
12740
|
-
children: drawersToRender.map(({
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12917
|
+
children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => {
|
|
12918
|
+
var _a;
|
|
12919
|
+
return /* @__PURE__ */ jsx42(
|
|
12920
|
+
DrawerWrapper,
|
|
12921
|
+
{
|
|
12922
|
+
index,
|
|
12923
|
+
totalDrawers: drawersToRender.length,
|
|
12924
|
+
width: (_a = drawerWidth[width]) != null ? _a : width,
|
|
12925
|
+
minWidth,
|
|
12926
|
+
maxWidth,
|
|
12927
|
+
onOverlayClick: onRequestClose,
|
|
12928
|
+
leftAligned,
|
|
12929
|
+
children: /* @__PURE__ */ jsx42(
|
|
12930
|
+
"div",
|
|
12931
|
+
{
|
|
12932
|
+
...getDrawerAttributes({ providerId, stackId: stackId2, id }),
|
|
12933
|
+
style: { width: "100%", height: "100%" }
|
|
12934
|
+
}
|
|
12935
|
+
)
|
|
12936
|
+
},
|
|
12937
|
+
`${stackId2}-${id}`
|
|
12938
|
+
);
|
|
12939
|
+
})
|
|
12754
12940
|
}
|
|
12755
|
-
)
|
|
12941
|
+
);
|
|
12756
12942
|
};
|
|
12757
12943
|
var DrawerWrapper = ({
|
|
12758
12944
|
index,
|
|
@@ -12770,9 +12956,9 @@ var DrawerWrapper = ({
|
|
|
12770
12956
|
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
12771
12957
|
}
|
|
12772
12958
|
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
12773
|
-
return /* @__PURE__ */
|
|
12774
|
-
/* @__PURE__ */
|
|
12775
|
-
/* @__PURE__ */
|
|
12959
|
+
return /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
12960
|
+
/* @__PURE__ */ jsx42("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
12961
|
+
/* @__PURE__ */ jsx42(
|
|
12776
12962
|
"div",
|
|
12777
12963
|
{
|
|
12778
12964
|
css: [drawerWrapperStyles, leftAligned ? drawerWrapperLeftAlignedStyles : null],
|
|
@@ -12782,102 +12968,17 @@ var DrawerWrapper = ({
|
|
|
12782
12968
|
)
|
|
12783
12969
|
] });
|
|
12784
12970
|
};
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
var Drawer = React12.forwardRef(
|
|
12790
|
-
({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
12791
|
-
const { stackId: inheritedStackId } = useCurrentDrawerRenderer();
|
|
12792
|
-
const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
|
|
12793
|
-
return inheritedStackId ? /* @__PURE__ */ jsx41(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : drawerProps.stackId ? /* @__PURE__ */ jsx41(DrawerInner, { ref, ...drawerProps }) : /* @__PURE__ */ jsxs23(DrawerProvider, { children: [
|
|
12794
|
-
/* @__PURE__ */ jsx41(DrawerInner, { ref, ...drawerProps }),
|
|
12795
|
-
/* @__PURE__ */ jsx41(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
12796
|
-
] });
|
|
12797
|
-
}
|
|
12798
|
-
);
|
|
12799
|
-
var DrawerInner = ({
|
|
12800
|
-
ref,
|
|
12801
|
-
stackId = defaultSackId,
|
|
12802
|
-
id,
|
|
12803
|
-
bgColor,
|
|
12804
|
-
children,
|
|
12805
|
-
header,
|
|
12806
|
-
instanceKey,
|
|
12807
|
-
onRequestClose,
|
|
12808
|
-
testId = "side-dialog"
|
|
12971
|
+
var getDrawerAttributes = ({
|
|
12972
|
+
providerId,
|
|
12973
|
+
stackId,
|
|
12974
|
+
id
|
|
12809
12975
|
}) => {
|
|
12810
|
-
|
|
12811
|
-
const closeButtonRef = useRef2(null);
|
|
12812
|
-
const component = useMemo2(() => {
|
|
12813
|
-
const headerId = `dialog-header-${stackId}-${id}`;
|
|
12814
|
-
return /* @__PURE__ */ jsxs23(
|
|
12815
|
-
"div",
|
|
12816
|
-
{
|
|
12817
|
-
ref,
|
|
12818
|
-
id,
|
|
12819
|
-
role: "dialog",
|
|
12820
|
-
tabIndex: -1,
|
|
12821
|
-
"aria-labelledby": headerId,
|
|
12822
|
-
css: drawerStyles(bgColor),
|
|
12823
|
-
"data-test-id": testId,
|
|
12824
|
-
children: [
|
|
12825
|
-
/* @__PURE__ */ jsxs23("div", { css: headerWrapperStyles, children: [
|
|
12826
|
-
header ? /* @__PURE__ */ jsx41("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
12827
|
-
/* @__PURE__ */ jsx41(
|
|
12828
|
-
Button,
|
|
12829
|
-
{
|
|
12830
|
-
ref: closeButtonRef,
|
|
12831
|
-
type: "button",
|
|
12832
|
-
onClick: onRequestClose,
|
|
12833
|
-
css: drawerCloseButtonStyles,
|
|
12834
|
-
title: "Close dialog",
|
|
12835
|
-
buttonType: "ghost",
|
|
12836
|
-
children: /* @__PURE__ */ jsx41(
|
|
12837
|
-
Icon,
|
|
12838
|
-
{
|
|
12839
|
-
icon: CgChevronRight,
|
|
12840
|
-
iconColor: "gray",
|
|
12841
|
-
size: 24,
|
|
12842
|
-
css: { transform: "rotate(var(--drawer-close-icon-rotation))" }
|
|
12843
|
-
}
|
|
12844
|
-
)
|
|
12845
|
-
}
|
|
12846
|
-
)
|
|
12847
|
-
] }),
|
|
12848
|
-
/* @__PURE__ */ jsx41("div", { css: drawerInnerStyles, children })
|
|
12849
|
-
]
|
|
12850
|
-
}
|
|
12851
|
-
);
|
|
12852
|
-
}, [children, header, id, stackId, bgColor, onRequestClose, ref, testId]);
|
|
12853
|
-
useEffect5(() => {
|
|
12854
|
-
registerDrawer({
|
|
12855
|
-
drawer: {
|
|
12856
|
-
id,
|
|
12857
|
-
component,
|
|
12858
|
-
stackId,
|
|
12859
|
-
onRequestClose,
|
|
12860
|
-
instanceKey
|
|
12861
|
-
},
|
|
12862
|
-
onFirstRender: () => {
|
|
12863
|
-
setTimeout(() => {
|
|
12864
|
-
var _a, _b;
|
|
12865
|
-
if (ref && "current" in ref && !((_a = ref.current) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
12866
|
-
(_b = closeButtonRef.current) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
12867
|
-
}
|
|
12868
|
-
}, 0);
|
|
12869
|
-
}
|
|
12870
|
-
});
|
|
12871
|
-
}, [component, instanceKey, registerDrawer]);
|
|
12872
|
-
useEffect5(() => {
|
|
12873
|
-
return () => unregisterDrawer({ id, stackId, instanceKey });
|
|
12874
|
-
}, [id, stackId, instanceKey, unregisterDrawer]);
|
|
12875
|
-
return null;
|
|
12976
|
+
return { "data-drawer-id": `${providerId}-${stackId}-${id}` };
|
|
12876
12977
|
};
|
|
12877
12978
|
|
|
12878
12979
|
// src/components/Input/styles/CaptionText.styles.ts
|
|
12879
|
-
import { css as
|
|
12880
|
-
var CaptionText = (dynamicSize) =>
|
|
12980
|
+
import { css as css41 } from "@emotion/react";
|
|
12981
|
+
var CaptionText = (dynamicSize) => css41`
|
|
12881
12982
|
color: var(--gray-500);
|
|
12882
12983
|
display: block;
|
|
12883
12984
|
font-size: ${dynamicSize ? "clamp(var(--fs-xs), 87.5%,var(--fs-sm))" : "var(--fs-sm)"};
|
|
@@ -12886,29 +12987,29 @@ var CaptionText = (dynamicSize) => css40`
|
|
|
12886
12987
|
`;
|
|
12887
12988
|
|
|
12888
12989
|
// src/components/Input/Caption.tsx
|
|
12889
|
-
import { jsx as
|
|
12990
|
+
import { jsx as jsx43 } from "@emotion/react/jsx-runtime";
|
|
12890
12991
|
var Caption = ({ children, testId, dynamicSize = false, ...props }) => {
|
|
12891
|
-
return /* @__PURE__ */
|
|
12992
|
+
return /* @__PURE__ */ jsx43("small", { css: CaptionText(dynamicSize), "data-test-id": testId, ...props, children });
|
|
12892
12993
|
};
|
|
12893
12994
|
|
|
12894
12995
|
// src/components/Input/CheckboxWithInfo.tsx
|
|
12895
12996
|
import { forwardRef as forwardRef4 } from "react";
|
|
12896
12997
|
|
|
12897
12998
|
// src/components/Input/styles/CheckboxWithInfo.styles.ts
|
|
12898
|
-
import { css as
|
|
12899
|
-
var CheckboxWithInfoContainer =
|
|
12999
|
+
import { css as css42 } from "@emotion/react";
|
|
13000
|
+
var CheckboxWithInfoContainer = css42`
|
|
12900
13001
|
align-items: center;
|
|
12901
13002
|
display: flex;
|
|
12902
13003
|
gap: var(--spacing-sm);
|
|
12903
13004
|
`;
|
|
12904
|
-
var CheckboxWithInfoLabel =
|
|
13005
|
+
var CheckboxWithInfoLabel = css42`
|
|
12905
13006
|
align-items: center;
|
|
12906
13007
|
color: var(--gray-500);
|
|
12907
13008
|
display: flex;
|
|
12908
13009
|
font-size: var(--fs-xs);
|
|
12909
13010
|
gap: var(--spacing-sm);
|
|
12910
13011
|
`;
|
|
12911
|
-
var CheckboxWithInfoInput =
|
|
13012
|
+
var CheckboxWithInfoInput = css42`
|
|
12912
13013
|
appearance: none;
|
|
12913
13014
|
border: 1px solid var(--gray-300);
|
|
12914
13015
|
background: var(--white) no-repeat bottom center;
|
|
@@ -12941,7 +13042,7 @@ var CheckboxWithInfoInput = css41`
|
|
|
12941
13042
|
border-color: var(--gray-200);
|
|
12942
13043
|
}
|
|
12943
13044
|
`;
|
|
12944
|
-
var InfoDialogContainer =
|
|
13045
|
+
var InfoDialogContainer = css42`
|
|
12945
13046
|
position: relative;
|
|
12946
13047
|
|
|
12947
13048
|
&:hover {
|
|
@@ -12950,7 +13051,7 @@ var InfoDialogContainer = css41`
|
|
|
12950
13051
|
}
|
|
12951
13052
|
}
|
|
12952
13053
|
`;
|
|
12953
|
-
var InfoDialogMessage =
|
|
13054
|
+
var InfoDialogMessage = css42`
|
|
12954
13055
|
background: var(--white);
|
|
12955
13056
|
box-shadow: var(--shadow-base);
|
|
12956
13057
|
border-radius: var(--rounded-md);
|
|
@@ -12967,21 +13068,21 @@ var InfoDialogMessage = css41`
|
|
|
12967
13068
|
`;
|
|
12968
13069
|
|
|
12969
13070
|
// src/components/Input/CheckboxWithInfo.tsx
|
|
12970
|
-
import { jsx as
|
|
13071
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
|
|
12971
13072
|
var InfoDialog = ({ message }) => {
|
|
12972
|
-
return /* @__PURE__ */
|
|
12973
|
-
/* @__PURE__ */
|
|
12974
|
-
/* @__PURE__ */
|
|
13073
|
+
return /* @__PURE__ */ jsxs25("div", { "data-testid": "info-dialog", css: InfoDialogContainer, children: [
|
|
13074
|
+
/* @__PURE__ */ jsx44(Icon, { icon: "info", iconColor: "action", size: "0.9rem" }),
|
|
13075
|
+
/* @__PURE__ */ jsx44("div", { role: "paragraph", css: InfoDialogMessage, className: "info-message", children: message })
|
|
12975
13076
|
] });
|
|
12976
13077
|
};
|
|
12977
13078
|
var CheckboxWithInfo = forwardRef4(
|
|
12978
13079
|
({ label, name, info, ...props }, ref) => {
|
|
12979
|
-
return /* @__PURE__ */
|
|
12980
|
-
/* @__PURE__ */
|
|
12981
|
-
/* @__PURE__ */
|
|
12982
|
-
/* @__PURE__ */
|
|
13080
|
+
return /* @__PURE__ */ jsxs25("div", { css: CheckboxWithInfoContainer, children: [
|
|
13081
|
+
/* @__PURE__ */ jsxs25("label", { css: CheckboxWithInfoLabel, children: [
|
|
13082
|
+
/* @__PURE__ */ jsx44("input", { type: "checkbox", name, ref, css: CheckboxWithInfoInput, ...props }),
|
|
13083
|
+
/* @__PURE__ */ jsx44("span", { children: label })
|
|
12983
13084
|
] }),
|
|
12984
|
-
info ? /* @__PURE__ */
|
|
13085
|
+
info ? /* @__PURE__ */ jsx44(InfoDialog, { message: info }) : null
|
|
12985
13086
|
] });
|
|
12986
13087
|
}
|
|
12987
13088
|
);
|
|
@@ -12990,8 +13091,8 @@ var CheckboxWithInfo = forwardRef4(
|
|
|
12990
13091
|
import { MdWarning } from "react-icons/md";
|
|
12991
13092
|
|
|
12992
13093
|
// src/components/Input/styles/ErrorMessage.styles.ts
|
|
12993
|
-
import { css as
|
|
12994
|
-
var ErrorText =
|
|
13094
|
+
import { css as css43 } from "@emotion/react";
|
|
13095
|
+
var ErrorText = css43`
|
|
12995
13096
|
align-items: center;
|
|
12996
13097
|
color: var(--brand-secondary-5);
|
|
12997
13098
|
display: flex;
|
|
@@ -12999,21 +13100,21 @@ var ErrorText = css42`
|
|
|
12999
13100
|
`;
|
|
13000
13101
|
|
|
13001
13102
|
// src/components/Input/ErrorMessage.tsx
|
|
13002
|
-
import { jsx as
|
|
13103
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
|
|
13003
13104
|
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
13004
|
-
return message ? /* @__PURE__ */
|
|
13005
|
-
/* @__PURE__ */
|
|
13105
|
+
return message ? /* @__PURE__ */ jsxs26("span", { role: "alert", css: ErrorText, "data-test-id": testId, ...otherProps, children: [
|
|
13106
|
+
/* @__PURE__ */ jsx45("span", { children: /* @__PURE__ */ jsx45(Icon, { icon: MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
13006
13107
|
message
|
|
13007
13108
|
] }) : null;
|
|
13008
13109
|
};
|
|
13009
13110
|
|
|
13010
13111
|
// src/components/Input/Fieldset.tsx
|
|
13011
|
-
import * as
|
|
13112
|
+
import * as React12 from "react";
|
|
13012
13113
|
|
|
13013
13114
|
// src/components/Input/styles/Fieldset.styles.ts
|
|
13014
|
-
import { css as
|
|
13115
|
+
import { css as css44 } from "@emotion/react";
|
|
13015
13116
|
function fieldsetContainer(invert) {
|
|
13016
|
-
const base =
|
|
13117
|
+
const base = css44`
|
|
13017
13118
|
border-radius: var(--rounded-base);
|
|
13018
13119
|
border: 1px solid var(--gray-300);
|
|
13019
13120
|
|
|
@@ -13025,18 +13126,18 @@ function fieldsetContainer(invert) {
|
|
|
13025
13126
|
}
|
|
13026
13127
|
`;
|
|
13027
13128
|
return invert ? [
|
|
13028
|
-
|
|
13129
|
+
css44`
|
|
13029
13130
|
background: white;
|
|
13030
13131
|
`,
|
|
13031
13132
|
base
|
|
13032
13133
|
] : [
|
|
13033
|
-
|
|
13134
|
+
css44`
|
|
13034
13135
|
background: var(--gray-50);
|
|
13035
13136
|
`,
|
|
13036
13137
|
base
|
|
13037
13138
|
];
|
|
13038
13139
|
}
|
|
13039
|
-
var fieldsetLegend =
|
|
13140
|
+
var fieldsetLegend = css44`
|
|
13040
13141
|
align-items: center;
|
|
13041
13142
|
color: var(--brand-secondary-1);
|
|
13042
13143
|
display: flex;
|
|
@@ -13046,17 +13147,17 @@ var fieldsetLegend = css43`
|
|
|
13046
13147
|
margin-bottom: var(--spacing-base);
|
|
13047
13148
|
float: left; // allows the legend to be inside the fieldset and not sat on the border line
|
|
13048
13149
|
`;
|
|
13049
|
-
var fieldsetBody =
|
|
13150
|
+
var fieldsetBody = css44`
|
|
13050
13151
|
clear: left;
|
|
13051
13152
|
`;
|
|
13052
13153
|
|
|
13053
13154
|
// src/components/Input/Fieldset.tsx
|
|
13054
|
-
import { jsx as
|
|
13055
|
-
var Fieldset =
|
|
13155
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
13156
|
+
var Fieldset = React12.forwardRef(
|
|
13056
13157
|
({ legend, disabled, children, invert, ...props }, ref) => {
|
|
13057
|
-
return /* @__PURE__ */
|
|
13158
|
+
return /* @__PURE__ */ jsxs27("fieldset", { css: fieldsetContainer(Boolean(invert)), ref, disabled, ...props, children: [
|
|
13058
13159
|
legend,
|
|
13059
|
-
/* @__PURE__ */
|
|
13160
|
+
/* @__PURE__ */ jsx46("div", { css: fieldsetBody, children })
|
|
13060
13161
|
] });
|
|
13061
13162
|
}
|
|
13062
13163
|
);
|
|
@@ -13065,8 +13166,8 @@ var Fieldset = React13.forwardRef(
|
|
|
13065
13166
|
import { MdInfoOutline } from "react-icons/md";
|
|
13066
13167
|
|
|
13067
13168
|
// src/components/Input/styles/InfoMessage.styles.tsx
|
|
13068
|
-
import { css as
|
|
13069
|
-
var InfoText =
|
|
13169
|
+
import { css as css45 } from "@emotion/react";
|
|
13170
|
+
var InfoText = css45`
|
|
13070
13171
|
--info-desc: rgb(29, 78, 216);
|
|
13071
13172
|
--info-icon: rgb(96, 165, 250);
|
|
13072
13173
|
|
|
@@ -13075,26 +13176,26 @@ var InfoText = css44`
|
|
|
13075
13176
|
display: flex;
|
|
13076
13177
|
gap: var(--spacing-sm);
|
|
13077
13178
|
`;
|
|
13078
|
-
var InfoIcon2 =
|
|
13179
|
+
var InfoIcon2 = css45`
|
|
13079
13180
|
color: var(--info-icon);
|
|
13080
13181
|
`;
|
|
13081
13182
|
|
|
13082
13183
|
// src/components/Input/InfoMessage.tsx
|
|
13083
|
-
import { jsx as
|
|
13184
|
+
import { jsx as jsx47, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
|
|
13084
13185
|
var InfoMessage = ({ message, testId, ...props }) => {
|
|
13085
|
-
return message ? /* @__PURE__ */
|
|
13086
|
-
/* @__PURE__ */
|
|
13186
|
+
return message ? /* @__PURE__ */ jsxs28("span", { role: "status", css: InfoText, "data-test-id": testId, ...props, children: [
|
|
13187
|
+
/* @__PURE__ */ jsx47("span", { children: /* @__PURE__ */ jsx47(Icon, { css: InfoIcon2, icon: MdInfoOutline, size: "1rem", iconColor: "currentColor" }) }),
|
|
13087
13188
|
message
|
|
13088
13189
|
] }) : null;
|
|
13089
13190
|
};
|
|
13090
13191
|
|
|
13091
13192
|
// src/components/Input/Input.tsx
|
|
13092
|
-
import * as
|
|
13193
|
+
import * as React13 from "react";
|
|
13093
13194
|
|
|
13094
13195
|
// src/components/Input/Label.tsx
|
|
13095
|
-
import { jsx as
|
|
13196
|
+
import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
|
|
13096
13197
|
var Label = ({ children, className, testId, ...props }) => {
|
|
13097
|
-
return /* @__PURE__ */
|
|
13198
|
+
return /* @__PURE__ */ jsx48(
|
|
13098
13199
|
"label",
|
|
13099
13200
|
{
|
|
13100
13201
|
css: [labelText, typeof className === "object" ? className : void 0],
|
|
@@ -13110,29 +13211,29 @@ var Label = ({ children, className, testId, ...props }) => {
|
|
|
13110
13211
|
import { MdWarning as MdWarning2 } from "react-icons/md";
|
|
13111
13212
|
|
|
13112
13213
|
// src/components/Input/styles/WarningMessage.styles.tsx
|
|
13113
|
-
import { css as
|
|
13114
|
-
var WarningText =
|
|
13214
|
+
import { css as css46 } from "@emotion/react";
|
|
13215
|
+
var WarningText = css46`
|
|
13115
13216
|
align-items: center;
|
|
13116
13217
|
color: var(--alert-text);
|
|
13117
13218
|
display: flex;
|
|
13118
13219
|
gap: var(--spacing-sm);
|
|
13119
13220
|
`;
|
|
13120
|
-
var WarningIcon =
|
|
13221
|
+
var WarningIcon = css46`
|
|
13121
13222
|
color: var(--alert);
|
|
13122
13223
|
`;
|
|
13123
13224
|
|
|
13124
13225
|
// src/components/Input/WarningMessage.tsx
|
|
13125
|
-
import { jsx as
|
|
13226
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
|
|
13126
13227
|
var WarningMessage = ({ message, testId, ...props }) => {
|
|
13127
|
-
return message ? /* @__PURE__ */
|
|
13128
|
-
/* @__PURE__ */
|
|
13228
|
+
return message ? /* @__PURE__ */ jsxs29("span", { role: "status", css: WarningText, "data-test-id": testId, ...props, children: [
|
|
13229
|
+
/* @__PURE__ */ jsx49("span", { children: /* @__PURE__ */ jsx49(Icon, { css: WarningIcon, icon: MdWarning2, size: "1rem", iconColor: "currentColor" }) }),
|
|
13129
13230
|
message
|
|
13130
13231
|
] }) : null;
|
|
13131
13232
|
};
|
|
13132
13233
|
|
|
13133
13234
|
// src/components/Input/Input.tsx
|
|
13134
|
-
import { jsx as
|
|
13135
|
-
var Input =
|
|
13235
|
+
import { jsx as jsx50, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
13236
|
+
var Input = React13.forwardRef(
|
|
13136
13237
|
({
|
|
13137
13238
|
label,
|
|
13138
13239
|
icon,
|
|
@@ -13150,8 +13251,8 @@ var Input = React14.forwardRef(
|
|
|
13150
13251
|
classNameLabel,
|
|
13151
13252
|
...props
|
|
13152
13253
|
}, ref) => {
|
|
13153
|
-
return /* @__PURE__ */
|
|
13154
|
-
showLabel ? /* @__PURE__ */
|
|
13254
|
+
return /* @__PURE__ */ jsxs30("div", { css: inputContainer, "data-test-id": containerTestId ? containerTestId : "container-input-field", children: [
|
|
13255
|
+
showLabel ? /* @__PURE__ */ jsx50(
|
|
13155
13256
|
Label,
|
|
13156
13257
|
{
|
|
13157
13258
|
htmlFor: id,
|
|
@@ -13161,13 +13262,13 @@ var Input = React14.forwardRef(
|
|
|
13161
13262
|
children: label
|
|
13162
13263
|
}
|
|
13163
13264
|
) : null,
|
|
13164
|
-
/* @__PURE__ */
|
|
13265
|
+
/* @__PURE__ */ jsxs30(
|
|
13165
13266
|
"div",
|
|
13166
13267
|
{
|
|
13167
13268
|
css: [inputContainer, typeof classNameContainer === "object" ? classNameContainer : void 0],
|
|
13168
13269
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13169
13270
|
children: [
|
|
13170
|
-
/* @__PURE__ */
|
|
13271
|
+
/* @__PURE__ */ jsx50(
|
|
13171
13272
|
"input",
|
|
13172
13273
|
{
|
|
13173
13274
|
id,
|
|
@@ -13183,23 +13284,23 @@ var Input = React14.forwardRef(
|
|
|
13183
13284
|
ref
|
|
13184
13285
|
}
|
|
13185
13286
|
),
|
|
13186
|
-
icon ? /* @__PURE__ */
|
|
13287
|
+
icon ? /* @__PURE__ */ jsx50("div", { css: inputIcon, children: icon }) : null
|
|
13187
13288
|
]
|
|
13188
13289
|
}
|
|
13189
13290
|
),
|
|
13190
|
-
caption ? /* @__PURE__ */
|
|
13191
|
-
errorMessage ? /* @__PURE__ */
|
|
13192
|
-
warningMessage && !errorMessage ? /* @__PURE__ */
|
|
13291
|
+
caption ? /* @__PURE__ */ jsx50(Caption, { testId: captionTestId, children: caption }) : null,
|
|
13292
|
+
errorMessage ? /* @__PURE__ */ jsx50(ErrorMessage, { message: errorMessage, testId: errorTestId }) : null,
|
|
13293
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ jsx50(WarningMessage, { message: warningMessage }) : null
|
|
13193
13294
|
] });
|
|
13194
13295
|
}
|
|
13195
13296
|
);
|
|
13196
13297
|
|
|
13197
13298
|
// src/components/Input/InputComboBox.tsx
|
|
13198
13299
|
import Select from "react-select";
|
|
13199
|
-
import { jsx as
|
|
13300
|
+
import { jsx as jsx51 } from "@emotion/react/jsx-runtime";
|
|
13200
13301
|
function InputComboBox(props) {
|
|
13201
13302
|
var _a;
|
|
13202
|
-
return /* @__PURE__ */
|
|
13303
|
+
return /* @__PURE__ */ jsx51(
|
|
13203
13304
|
Select,
|
|
13204
13305
|
{
|
|
13205
13306
|
...props,
|
|
@@ -13328,17 +13429,17 @@ function InputComboBox(props) {
|
|
|
13328
13429
|
}
|
|
13329
13430
|
|
|
13330
13431
|
// src/components/Input/InputInlineSelect.tsx
|
|
13331
|
-
import { css as
|
|
13332
|
-
import { useRef as
|
|
13432
|
+
import { css as css48 } from "@emotion/react";
|
|
13433
|
+
import { useRef as useRef4, useState as useState6 } from "react";
|
|
13333
13434
|
import { CgChevronDown as CgChevronDown2 } from "react-icons/cg";
|
|
13334
13435
|
|
|
13335
13436
|
// src/components/Input/styles/InputInlineSelect.styles.ts
|
|
13336
|
-
import { css as
|
|
13337
|
-
var inlineSelectContainer =
|
|
13437
|
+
import { css as css47 } from "@emotion/react";
|
|
13438
|
+
var inlineSelectContainer = css47`
|
|
13338
13439
|
margin-inline: auto;
|
|
13339
13440
|
max-width: fit-content;
|
|
13340
13441
|
`;
|
|
13341
|
-
var inlineSelectBtn =
|
|
13442
|
+
var inlineSelectBtn = css47`
|
|
13342
13443
|
align-items: center;
|
|
13343
13444
|
background: var(--brand-secondary-3);
|
|
13344
13445
|
border: 2px solid var(--brand-secondary-3);
|
|
@@ -13362,7 +13463,7 @@ var inlineSelectBtn = css46`
|
|
|
13362
13463
|
outline: 2px solid var(--brand-secondary-1);
|
|
13363
13464
|
}
|
|
13364
13465
|
`;
|
|
13365
|
-
var inlineSelectMenu =
|
|
13466
|
+
var inlineSelectMenu = css47`
|
|
13366
13467
|
background: var(--white);
|
|
13367
13468
|
border: 1px solid var(--brand-secondary-3);
|
|
13368
13469
|
border-top: none;
|
|
@@ -13373,7 +13474,7 @@ var inlineSelectMenu = css46`
|
|
|
13373
13474
|
inset: auto 0;
|
|
13374
13475
|
transform: translateY(-0.2rem);
|
|
13375
13476
|
`;
|
|
13376
|
-
var inlineSelectBtnOptions =
|
|
13477
|
+
var inlineSelectBtnOptions = css47`
|
|
13377
13478
|
cursor: pointer;
|
|
13378
13479
|
display: block;
|
|
13379
13480
|
font-size: var(--fs-sm);
|
|
@@ -13389,7 +13490,7 @@ var inlineSelectBtnOptions = css46`
|
|
|
13389
13490
|
background: var(--gray-50);
|
|
13390
13491
|
}
|
|
13391
13492
|
`;
|
|
13392
|
-
var inlineSelectMenuClosed =
|
|
13493
|
+
var inlineSelectMenuClosed = css47`
|
|
13393
13494
|
position: absolute;
|
|
13394
13495
|
overflow: hidden;
|
|
13395
13496
|
height: 1px;
|
|
@@ -13399,7 +13500,7 @@ var inlineSelectMenuClosed = css46`
|
|
|
13399
13500
|
`;
|
|
13400
13501
|
|
|
13401
13502
|
// src/components/Input/InputInlineSelect.tsx
|
|
13402
|
-
import { jsx as
|
|
13503
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
|
|
13403
13504
|
var InputInlineSelect = ({
|
|
13404
13505
|
classNameContainer,
|
|
13405
13506
|
options,
|
|
@@ -13409,21 +13510,21 @@ var InputInlineSelect = ({
|
|
|
13409
13510
|
...props
|
|
13410
13511
|
}) => {
|
|
13411
13512
|
var _a;
|
|
13412
|
-
const [menuVisible, setMenuVisible] =
|
|
13413
|
-
const divRef =
|
|
13513
|
+
const [menuVisible, setMenuVisible] = useState6(false);
|
|
13514
|
+
const divRef = useRef4(null);
|
|
13414
13515
|
useOutsideClick(divRef, () => setMenuVisible(false));
|
|
13415
13516
|
const selected = options.find((option) => option.value === value);
|
|
13416
|
-
return /* @__PURE__ */
|
|
13517
|
+
return /* @__PURE__ */ jsxs31(
|
|
13417
13518
|
"div",
|
|
13418
13519
|
{
|
|
13419
13520
|
ref: divRef,
|
|
13420
|
-
css: !classNameContainer ? inlineSelectContainer :
|
|
13521
|
+
css: !classNameContainer ? inlineSelectContainer : css48`
|
|
13421
13522
|
max-width: fit-content;
|
|
13422
13523
|
${typeof classNameContainer === "object" ? classNameContainer : void 0}
|
|
13423
13524
|
`,
|
|
13424
13525
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13425
13526
|
children: [
|
|
13426
|
-
/* @__PURE__ */
|
|
13527
|
+
/* @__PURE__ */ jsxs31(
|
|
13427
13528
|
"button",
|
|
13428
13529
|
{
|
|
13429
13530
|
type: "button",
|
|
@@ -13437,18 +13538,18 @@ var InputInlineSelect = ({
|
|
|
13437
13538
|
disabled,
|
|
13438
13539
|
...props,
|
|
13439
13540
|
children: [
|
|
13440
|
-
/* @__PURE__ */
|
|
13441
|
-
disabled ? null : /* @__PURE__ */
|
|
13541
|
+
/* @__PURE__ */ jsx52("span", { children: (_a = selected == null ? void 0 : selected.label) != null ? _a : value }),
|
|
13542
|
+
disabled ? null : /* @__PURE__ */ jsx52(Icon, { icon: CgChevronDown2, iconColor: "currentColor", size: 24 })
|
|
13442
13543
|
]
|
|
13443
13544
|
}
|
|
13444
13545
|
),
|
|
13445
|
-
/* @__PURE__ */
|
|
13546
|
+
/* @__PURE__ */ jsx52(
|
|
13446
13547
|
"div",
|
|
13447
13548
|
{
|
|
13448
13549
|
id: `and-or-${props.id}`,
|
|
13449
13550
|
css: [inlineSelectMenu, menuVisible ? void 0 : inlineSelectMenuClosed],
|
|
13450
13551
|
"aria-hidden": !menuVisible,
|
|
13451
|
-
children: options.map((opt) => /* @__PURE__ */
|
|
13552
|
+
children: options.map((opt) => /* @__PURE__ */ jsx52(
|
|
13452
13553
|
"button",
|
|
13453
13554
|
{
|
|
13454
13555
|
type: "button",
|
|
@@ -13469,7 +13570,7 @@ var InputInlineSelect = ({
|
|
|
13469
13570
|
};
|
|
13470
13571
|
|
|
13471
13572
|
// src/components/Input/InputKeywordSearch.tsx
|
|
13472
|
-
import { jsx as
|
|
13573
|
+
import { jsx as jsx53 } from "@emotion/react/jsx-runtime";
|
|
13473
13574
|
var InputKeywordSearch = ({
|
|
13474
13575
|
onSearchTextChanged,
|
|
13475
13576
|
disabled = false,
|
|
@@ -13488,7 +13589,7 @@ var InputKeywordSearch = ({
|
|
|
13488
13589
|
e.preventDefault();
|
|
13489
13590
|
}
|
|
13490
13591
|
};
|
|
13491
|
-
return /* @__PURE__ */
|
|
13592
|
+
return /* @__PURE__ */ jsx53(
|
|
13492
13593
|
Input,
|
|
13493
13594
|
{
|
|
13494
13595
|
type: "text",
|
|
@@ -13496,7 +13597,7 @@ var InputKeywordSearch = ({
|
|
|
13496
13597
|
placeholder,
|
|
13497
13598
|
showLabel: false,
|
|
13498
13599
|
value,
|
|
13499
|
-
icon: value ? /* @__PURE__ */
|
|
13600
|
+
icon: value ? /* @__PURE__ */ jsx53("button", { css: inputSearchCloseBtn, onClick: onClear, type: "button", children: /* @__PURE__ */ jsx53(Icon, { icon: "close", iconColor: "red", size: "1rem" }) }) : /* @__PURE__ */ jsx53(Icon, { icon: "search", iconColor: "gray", size: "1rem" }),
|
|
13500
13601
|
onChange: handleSearchTextChanged,
|
|
13501
13602
|
onKeyPress: preventSubmitOnField,
|
|
13502
13603
|
disabled,
|
|
@@ -13507,7 +13608,7 @@ var InputKeywordSearch = ({
|
|
|
13507
13608
|
};
|
|
13508
13609
|
|
|
13509
13610
|
// src/components/Input/InputSelect.tsx
|
|
13510
|
-
import { Fragment as Fragment6, jsx as
|
|
13611
|
+
import { Fragment as Fragment6, jsx as jsx54, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
|
|
13511
13612
|
var InputSelect = ({
|
|
13512
13613
|
label,
|
|
13513
13614
|
defaultOption,
|
|
@@ -13523,13 +13624,13 @@ var InputSelect = ({
|
|
|
13523
13624
|
classNameLabel,
|
|
13524
13625
|
...props
|
|
13525
13626
|
}) => {
|
|
13526
|
-
return /* @__PURE__ */
|
|
13627
|
+
return /* @__PURE__ */ jsxs32(
|
|
13527
13628
|
"div",
|
|
13528
13629
|
{
|
|
13529
13630
|
css: [inputContainer, typeof classNameContainer === "object" ? classNameContainer : void 0],
|
|
13530
13631
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13531
13632
|
children: [
|
|
13532
|
-
showLabel ? /* @__PURE__ */
|
|
13633
|
+
showLabel ? /* @__PURE__ */ jsx54(Fragment6, { children: /* @__PURE__ */ jsxs32(
|
|
13533
13634
|
Label,
|
|
13534
13635
|
{
|
|
13535
13636
|
htmlFor: props.id,
|
|
@@ -13541,7 +13642,7 @@ var InputSelect = ({
|
|
|
13541
13642
|
]
|
|
13542
13643
|
}
|
|
13543
13644
|
) }) : null,
|
|
13544
|
-
/* @__PURE__ */
|
|
13645
|
+
/* @__PURE__ */ jsxs32(
|
|
13545
13646
|
"select",
|
|
13546
13647
|
{
|
|
13547
13648
|
title: label,
|
|
@@ -13556,23 +13657,23 @@ var InputSelect = ({
|
|
|
13556
13657
|
className: typeof classNameControl === "string" ? classNameControl : "",
|
|
13557
13658
|
...props,
|
|
13558
13659
|
children: [
|
|
13559
|
-
defaultOption ? /* @__PURE__ */
|
|
13560
|
-
options.map((opt, index) => /* @__PURE__ */
|
|
13660
|
+
defaultOption ? /* @__PURE__ */ jsx54("option", { value: "", children: defaultOption }) : null,
|
|
13661
|
+
options.map((opt, index) => /* @__PURE__ */ jsx54("option", { value: opt.label, ...opt }, index))
|
|
13561
13662
|
]
|
|
13562
13663
|
}
|
|
13563
13664
|
),
|
|
13564
|
-
caption ? /* @__PURE__ */
|
|
13565
|
-
errorMessage ? /* @__PURE__ */
|
|
13566
|
-
warningMessage && !errorMessage ? /* @__PURE__ */
|
|
13665
|
+
caption ? /* @__PURE__ */ jsx54(Caption, { children: caption }) : null,
|
|
13666
|
+
errorMessage ? /* @__PURE__ */ jsx54(ErrorMessage, { message: errorMessage }) : null,
|
|
13667
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ jsx54(WarningMessage, { message: warningMessage }) : null
|
|
13567
13668
|
]
|
|
13568
13669
|
}
|
|
13569
13670
|
);
|
|
13570
13671
|
};
|
|
13571
13672
|
|
|
13572
13673
|
// src/components/Input/InputToggle.tsx
|
|
13573
|
-
import * as
|
|
13574
|
-
import { jsx as
|
|
13575
|
-
var InputToggle =
|
|
13674
|
+
import * as React14 from "react";
|
|
13675
|
+
import { jsx as jsx55, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
|
|
13676
|
+
var InputToggle = React14.forwardRef(
|
|
13576
13677
|
({
|
|
13577
13678
|
label,
|
|
13578
13679
|
type,
|
|
@@ -13586,13 +13687,13 @@ var InputToggle = React15.forwardRef(
|
|
|
13586
13687
|
fontWeight = "medium",
|
|
13587
13688
|
...props
|
|
13588
13689
|
}, ref) => {
|
|
13589
|
-
return /* @__PURE__ */
|
|
13690
|
+
return /* @__PURE__ */ jsxs33(
|
|
13590
13691
|
Label,
|
|
13591
13692
|
{
|
|
13592
13693
|
css: [inputToggleLabel, disabled ? inputDisabled : void 0],
|
|
13593
13694
|
"data-test-id": testId ? testId : "input-toggle",
|
|
13594
13695
|
children: [
|
|
13595
|
-
/* @__PURE__ */
|
|
13696
|
+
/* @__PURE__ */ jsx55(
|
|
13596
13697
|
"input",
|
|
13597
13698
|
{
|
|
13598
13699
|
ref,
|
|
@@ -13604,11 +13705,11 @@ var InputToggle = React15.forwardRef(
|
|
|
13604
13705
|
...props
|
|
13605
13706
|
}
|
|
13606
13707
|
),
|
|
13607
|
-
/* @__PURE__ */
|
|
13608
|
-
caption || errorMessage ? /* @__PURE__ */
|
|
13609
|
-
caption ? /* @__PURE__ */
|
|
13610
|
-
errorMessage ? /* @__PURE__ */
|
|
13611
|
-
warningMessage && !errorMessage ? /* @__PURE__ */
|
|
13708
|
+
/* @__PURE__ */ jsx55("span", { css: inlineLabel(fontWeight), children: label }),
|
|
13709
|
+
caption || errorMessage ? /* @__PURE__ */ jsxs33("span", { css: inputToggleMessageContainer, children: [
|
|
13710
|
+
caption ? /* @__PURE__ */ jsx55(Caption, { children: caption }) : null,
|
|
13711
|
+
errorMessage ? /* @__PURE__ */ jsx55(ErrorMessage, { message: errorMessage }) : null,
|
|
13712
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ jsx55(WarningMessage, { message: warningMessage }) : null
|
|
13612
13713
|
] }) : null
|
|
13613
13714
|
]
|
|
13614
13715
|
}
|
|
@@ -13617,17 +13718,17 @@ var InputToggle = React15.forwardRef(
|
|
|
13617
13718
|
);
|
|
13618
13719
|
|
|
13619
13720
|
// src/components/Input/Legend.tsx
|
|
13620
|
-
import { jsx as
|
|
13721
|
+
import { jsx as jsx56 } from "@emotion/react/jsx-runtime";
|
|
13621
13722
|
var Legend = ({ children }) => {
|
|
13622
|
-
return /* @__PURE__ */
|
|
13723
|
+
return /* @__PURE__ */ jsx56("legend", { css: fieldsetLegend, children });
|
|
13623
13724
|
};
|
|
13624
13725
|
|
|
13625
13726
|
// src/components/Input/SuccessMessage.tsx
|
|
13626
13727
|
import { CgCheckO } from "react-icons/cg";
|
|
13627
13728
|
|
|
13628
13729
|
// src/components/Input/styles/SuccessMessage.styles.ts
|
|
13629
|
-
import { css as
|
|
13630
|
-
var SuccessText =
|
|
13730
|
+
import { css as css49 } from "@emotion/react";
|
|
13731
|
+
var SuccessText = css49`
|
|
13631
13732
|
--info-desc: var(--brand-secondary-3);
|
|
13632
13733
|
--info-icon: var(--brand-secondary-3);
|
|
13633
13734
|
|
|
@@ -13636,21 +13737,21 @@ var SuccessText = css48`
|
|
|
13636
13737
|
display: flex;
|
|
13637
13738
|
gap: var(--spacing-sm);
|
|
13638
13739
|
`;
|
|
13639
|
-
var SuccessIcon2 =
|
|
13740
|
+
var SuccessIcon2 = css49`
|
|
13640
13741
|
color: var(--info-icon);
|
|
13641
13742
|
`;
|
|
13642
13743
|
|
|
13643
13744
|
// src/components/Input/SuccessMessage.tsx
|
|
13644
|
-
import { jsx as
|
|
13745
|
+
import { jsx as jsx57, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
|
|
13645
13746
|
var SuccessMessage = ({ message, testId, ...props }) => {
|
|
13646
|
-
return message ? /* @__PURE__ */
|
|
13647
|
-
/* @__PURE__ */
|
|
13747
|
+
return message ? /* @__PURE__ */ jsxs34("span", { role: "status", css: SuccessText, "data-test-id": testId, ...props, children: [
|
|
13748
|
+
/* @__PURE__ */ jsx57("span", { children: /* @__PURE__ */ jsx57(Icon, { css: SuccessIcon2, icon: CgCheckO, size: "1rem", iconColor: "currentColor" }) }),
|
|
13648
13749
|
message
|
|
13649
13750
|
] }) : null;
|
|
13650
13751
|
};
|
|
13651
13752
|
|
|
13652
13753
|
// src/components/Input/Textarea.tsx
|
|
13653
|
-
import { Fragment as Fragment7, jsx as
|
|
13754
|
+
import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
|
|
13654
13755
|
var Textarea = ({
|
|
13655
13756
|
label,
|
|
13656
13757
|
icon,
|
|
@@ -13661,10 +13762,10 @@ var Textarea = ({
|
|
|
13661
13762
|
warningMessage,
|
|
13662
13763
|
...props
|
|
13663
13764
|
}) => {
|
|
13664
|
-
return /* @__PURE__ */
|
|
13665
|
-
showLabel ? /* @__PURE__ */
|
|
13666
|
-
/* @__PURE__ */
|
|
13667
|
-
/* @__PURE__ */
|
|
13765
|
+
return /* @__PURE__ */ jsxs35(Fragment7, { children: [
|
|
13766
|
+
showLabel ? /* @__PURE__ */ jsx58("label", { htmlFor: id, css: [labelText], children: label }) : null,
|
|
13767
|
+
/* @__PURE__ */ jsxs35("div", { css: [inputContainer], children: [
|
|
13768
|
+
/* @__PURE__ */ jsx58(
|
|
13668
13769
|
"textarea",
|
|
13669
13770
|
{
|
|
13670
13771
|
id,
|
|
@@ -13673,17 +13774,17 @@ var Textarea = ({
|
|
|
13673
13774
|
...props
|
|
13674
13775
|
}
|
|
13675
13776
|
),
|
|
13676
|
-
icon ? /* @__PURE__ */
|
|
13777
|
+
icon ? /* @__PURE__ */ jsx58("div", { css: inputIcon, children: icon }) : null
|
|
13677
13778
|
] }),
|
|
13678
|
-
caption ? /* @__PURE__ */
|
|
13679
|
-
errorMessage ? /* @__PURE__ */
|
|
13680
|
-
warningMessage && !errorMessage ? /* @__PURE__ */
|
|
13779
|
+
caption ? /* @__PURE__ */ jsx58(Caption, { children: caption }) : null,
|
|
13780
|
+
errorMessage ? /* @__PURE__ */ jsx58(ErrorMessage, { message: errorMessage }) : null,
|
|
13781
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ jsx58(WarningMessage, { message: warningMessage }) : null
|
|
13681
13782
|
] });
|
|
13682
13783
|
};
|
|
13683
13784
|
|
|
13684
13785
|
// src/components/JsonEditor/JsonEditor.tsx
|
|
13685
13786
|
import MonacoEditor from "@monaco-editor/react";
|
|
13686
|
-
import { jsx as
|
|
13787
|
+
import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
|
|
13687
13788
|
var minEditorHeightPx = 150;
|
|
13688
13789
|
var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
13689
13790
|
let effectiveHeight = height;
|
|
@@ -13693,7 +13794,7 @@ var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
|
13693
13794
|
if (typeof effectiveHeight === "number" && effectiveHeight < minEditorHeightPx) {
|
|
13694
13795
|
effectiveHeight = minEditorHeightPx;
|
|
13695
13796
|
}
|
|
13696
|
-
return /* @__PURE__ */
|
|
13797
|
+
return /* @__PURE__ */ jsx59(
|
|
13697
13798
|
MonacoEditor,
|
|
13698
13799
|
{
|
|
13699
13800
|
height: effectiveHeight,
|
|
@@ -13730,39 +13831,39 @@ var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
|
13730
13831
|
};
|
|
13731
13832
|
|
|
13732
13833
|
// src/components/LimitsBar/LimitsBar.styles.ts
|
|
13733
|
-
import { css as
|
|
13734
|
-
var LimitsBarContainer =
|
|
13834
|
+
import { css as css50 } from "@emotion/react";
|
|
13835
|
+
var LimitsBarContainer = css50`
|
|
13735
13836
|
margin-block: var(--spacing-sm);
|
|
13736
13837
|
`;
|
|
13737
|
-
var LimitsBarProgressBar =
|
|
13838
|
+
var LimitsBarProgressBar = css50`
|
|
13738
13839
|
background: var(--gray-100);
|
|
13739
13840
|
margin-top: var(--spacing-sm);
|
|
13740
13841
|
position: relative;
|
|
13741
13842
|
overflow: hidden;
|
|
13742
13843
|
height: 0.25rem;
|
|
13743
13844
|
`;
|
|
13744
|
-
var LimitsBarProgressBarLine =
|
|
13845
|
+
var LimitsBarProgressBarLine = css50`
|
|
13745
13846
|
position: absolute;
|
|
13746
13847
|
inset: 0;
|
|
13747
13848
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
13748
13849
|
`;
|
|
13749
|
-
var LimitsBarLabelContainer =
|
|
13850
|
+
var LimitsBarLabelContainer = css50`
|
|
13750
13851
|
display: flex;
|
|
13751
13852
|
justify-content: space-between;
|
|
13752
13853
|
font-weight: var(--fw-bold);
|
|
13753
13854
|
`;
|
|
13754
|
-
var LimitsBarLabel =
|
|
13855
|
+
var LimitsBarLabel = css50`
|
|
13755
13856
|
font-size: var(--fs-baase);
|
|
13756
13857
|
`;
|
|
13757
|
-
var LimitsBarBgColor = (statusColor) =>
|
|
13858
|
+
var LimitsBarBgColor = (statusColor) => css50`
|
|
13758
13859
|
background: ${statusColor};
|
|
13759
13860
|
`;
|
|
13760
|
-
var LimitsBarTextColor = (statusColor) =>
|
|
13861
|
+
var LimitsBarTextColor = (statusColor) => css50`
|
|
13761
13862
|
color: ${statusColor};
|
|
13762
13863
|
`;
|
|
13763
13864
|
|
|
13764
13865
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
13765
|
-
import { jsx as
|
|
13866
|
+
import { jsx as jsx60, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
|
|
13766
13867
|
var LimitsBar = ({ current, max, label }) => {
|
|
13767
13868
|
const maxPercentage = 100;
|
|
13768
13869
|
const progressBarValue = Math.ceil(current / max * maxPercentage);
|
|
@@ -13773,16 +13874,16 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
13773
13874
|
danger: "var(--brand-secondary-5)"
|
|
13774
13875
|
};
|
|
13775
13876
|
const statusColor = progressBarValue === 100 ? colorMap.danger : progressBarValue >= 75 ? colorMap.warn : colorMap.base;
|
|
13776
|
-
return /* @__PURE__ */
|
|
13777
|
-
/* @__PURE__ */
|
|
13778
|
-
/* @__PURE__ */
|
|
13779
|
-
/* @__PURE__ */
|
|
13877
|
+
return /* @__PURE__ */ jsxs36("div", { css: LimitsBarContainer, children: [
|
|
13878
|
+
/* @__PURE__ */ jsxs36("div", { css: LimitsBarLabelContainer, children: [
|
|
13879
|
+
/* @__PURE__ */ jsx60("span", { css: LimitsBarLabel, children: label }),
|
|
13880
|
+
/* @__PURE__ */ jsxs36("span", { css: [LimitsBarLabel, LimitsBarTextColor(statusColor)], children: [
|
|
13780
13881
|
current,
|
|
13781
13882
|
" of ",
|
|
13782
13883
|
max
|
|
13783
13884
|
] })
|
|
13784
13885
|
] }),
|
|
13785
|
-
/* @__PURE__ */
|
|
13886
|
+
/* @__PURE__ */ jsx60(
|
|
13786
13887
|
"div",
|
|
13787
13888
|
{
|
|
13788
13889
|
role: "progressbar",
|
|
@@ -13791,7 +13892,7 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
13791
13892
|
"aria-valuemax": max,
|
|
13792
13893
|
"aria-valuetext": `${current} of ${max}`,
|
|
13793
13894
|
css: LimitsBarProgressBar,
|
|
13794
|
-
children: /* @__PURE__ */
|
|
13895
|
+
children: /* @__PURE__ */ jsx60(
|
|
13795
13896
|
"span",
|
|
13796
13897
|
{
|
|
13797
13898
|
role: "presentation",
|
|
@@ -13807,8 +13908,8 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
13807
13908
|
};
|
|
13808
13909
|
|
|
13809
13910
|
// src/components/LinkList/LinkList.styles.ts
|
|
13810
|
-
import { css as
|
|
13811
|
-
var LinkListContainer = (padding) =>
|
|
13911
|
+
import { css as css51 } from "@emotion/react";
|
|
13912
|
+
var LinkListContainer = (padding) => css51`
|
|
13812
13913
|
padding: ${padding};
|
|
13813
13914
|
|
|
13814
13915
|
${mq("sm")} {
|
|
@@ -13816,30 +13917,30 @@ var LinkListContainer = (padding) => css50`
|
|
|
13816
13917
|
grid-row: 1 / last-line;
|
|
13817
13918
|
}
|
|
13818
13919
|
`;
|
|
13819
|
-
var LinkListTitle =
|
|
13920
|
+
var LinkListTitle = css51`
|
|
13820
13921
|
font-weight: var(--fw-bold);
|
|
13821
13922
|
font-size: var(--fs-sm);
|
|
13822
13923
|
text-transform: uppercase;
|
|
13823
13924
|
`;
|
|
13824
13925
|
|
|
13825
13926
|
// src/components/LinkList/LinkList.tsx
|
|
13826
|
-
import { jsx as
|
|
13927
|
+
import { jsx as jsx61, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
13827
13928
|
var LinkList = ({ title, padding = "var(--spacing-md)", children, ...props }) => {
|
|
13828
|
-
return /* @__PURE__ */
|
|
13829
|
-
/* @__PURE__ */
|
|
13929
|
+
return /* @__PURE__ */ jsxs37("div", { css: LinkListContainer(padding), ...props, children: [
|
|
13930
|
+
/* @__PURE__ */ jsx61(Heading, { level: 3, css: LinkListTitle, children: title }),
|
|
13830
13931
|
children
|
|
13831
13932
|
] });
|
|
13832
13933
|
};
|
|
13833
13934
|
|
|
13834
13935
|
// src/components/List/ScrollableList.tsx
|
|
13835
|
-
import { css as
|
|
13936
|
+
import { css as css53 } from "@emotion/react";
|
|
13836
13937
|
|
|
13837
13938
|
// src/components/List/styles/ScrollableList.styles.ts
|
|
13838
|
-
import { css as
|
|
13839
|
-
var ScrollableListContainer =
|
|
13939
|
+
import { css as css52 } from "@emotion/react";
|
|
13940
|
+
var ScrollableListContainer = css52`
|
|
13840
13941
|
position: relative;
|
|
13841
13942
|
`;
|
|
13842
|
-
var ScrollableListInner =
|
|
13943
|
+
var ScrollableListInner = css52`
|
|
13843
13944
|
background: var(--gray-50);
|
|
13844
13945
|
border-top: 1px solid var(--gray-200);
|
|
13845
13946
|
border-bottom: 1px solid var(--gray-200);
|
|
@@ -13862,19 +13963,19 @@ var ScrollableListInner = css51`
|
|
|
13862
13963
|
`;
|
|
13863
13964
|
|
|
13864
13965
|
// src/components/List/ScrollableList.tsx
|
|
13865
|
-
import { jsx as
|
|
13966
|
+
import { jsx as jsx62, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
|
|
13866
13967
|
var ScrollableList = ({ label, children, ...props }) => {
|
|
13867
|
-
return /* @__PURE__ */
|
|
13868
|
-
label ? /* @__PURE__ */
|
|
13968
|
+
return /* @__PURE__ */ jsxs38("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
13969
|
+
label ? /* @__PURE__ */ jsx62(
|
|
13869
13970
|
"span",
|
|
13870
13971
|
{
|
|
13871
|
-
css:
|
|
13972
|
+
css: css53`
|
|
13872
13973
|
${labelText}
|
|
13873
13974
|
`,
|
|
13874
13975
|
children: label
|
|
13875
13976
|
}
|
|
13876
13977
|
) : null,
|
|
13877
|
-
/* @__PURE__ */
|
|
13978
|
+
/* @__PURE__ */ jsx62("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
13878
13979
|
] });
|
|
13879
13980
|
};
|
|
13880
13981
|
|
|
@@ -13882,8 +13983,8 @@ var ScrollableList = ({ label, children, ...props }) => {
|
|
|
13882
13983
|
import { CgCheck } from "react-icons/cg";
|
|
13883
13984
|
|
|
13884
13985
|
// src/components/List/styles/ScrollableListItem.styles.ts
|
|
13885
|
-
import { css as
|
|
13886
|
-
var ScrollableListItemContainer =
|
|
13986
|
+
import { css as css54 } from "@emotion/react";
|
|
13987
|
+
var ScrollableListItemContainer = css54`
|
|
13887
13988
|
align-items: center;
|
|
13888
13989
|
background: var(--white);
|
|
13889
13990
|
border-radius: var(--rounded-base);
|
|
@@ -13892,13 +13993,13 @@ var ScrollableListItemContainer = css53`
|
|
|
13892
13993
|
min-height: 52px;
|
|
13893
13994
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
13894
13995
|
`;
|
|
13895
|
-
var ScrollableListItemShadow =
|
|
13996
|
+
var ScrollableListItemShadow = css54`
|
|
13896
13997
|
box-shadow: var(--shadow-base);
|
|
13897
13998
|
`;
|
|
13898
|
-
var ScrollableListItemActive =
|
|
13999
|
+
var ScrollableListItemActive = css54`
|
|
13899
14000
|
border-color: var(--brand-secondary-3);
|
|
13900
14001
|
`;
|
|
13901
|
-
var ScrollableListItemBtn =
|
|
14002
|
+
var ScrollableListItemBtn = css54`
|
|
13902
14003
|
align-items: center;
|
|
13903
14004
|
border: none;
|
|
13904
14005
|
background: transparent;
|
|
@@ -13913,27 +14014,27 @@ var ScrollableListItemBtn = css53`
|
|
|
13913
14014
|
outline: none;
|
|
13914
14015
|
}
|
|
13915
14016
|
`;
|
|
13916
|
-
var ScrollableListInputLabel =
|
|
14017
|
+
var ScrollableListInputLabel = css54`
|
|
13917
14018
|
align-items: center;
|
|
13918
14019
|
cursor: pointer;
|
|
13919
14020
|
display: flex;
|
|
13920
14021
|
padding: var(--spacing-xs) var(--spacing-base) var(--spacing-xs);
|
|
13921
14022
|
flex-grow: 1;
|
|
13922
14023
|
`;
|
|
13923
|
-
var ScrollableListInputText =
|
|
14024
|
+
var ScrollableListInputText = css54`
|
|
13924
14025
|
align-items: center;
|
|
13925
14026
|
display: flex;
|
|
13926
14027
|
gap: var(--spacing-sm);
|
|
13927
14028
|
flex-grow: 1;
|
|
13928
14029
|
flex-wrap: wrap;
|
|
13929
14030
|
`;
|
|
13930
|
-
var ScrollableListHiddenInput =
|
|
14031
|
+
var ScrollableListHiddenInput = css54`
|
|
13931
14032
|
position: absolute;
|
|
13932
14033
|
height: 0;
|
|
13933
14034
|
width: 0;
|
|
13934
14035
|
opacity: 0;
|
|
13935
14036
|
`;
|
|
13936
|
-
var ScrollableListIcon =
|
|
14037
|
+
var ScrollableListIcon = css54`
|
|
13937
14038
|
border-radius: var(--rounded-full);
|
|
13938
14039
|
background: var(--brand-secondary-3);
|
|
13939
14040
|
color: var(--white);
|
|
@@ -13941,12 +14042,12 @@ var ScrollableListIcon = css53`
|
|
|
13941
14042
|
min-width: 24px;
|
|
13942
14043
|
opacity: 0;
|
|
13943
14044
|
`;
|
|
13944
|
-
var ScrollableListIconVisible =
|
|
14045
|
+
var ScrollableListIconVisible = css54`
|
|
13945
14046
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
13946
14047
|
`;
|
|
13947
14048
|
|
|
13948
14049
|
// src/components/List/ScrollableListInputItem.tsx
|
|
13949
|
-
import { jsx as
|
|
14050
|
+
import { jsx as jsx63, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
|
|
13950
14051
|
var ScrollableListInputItem = ({
|
|
13951
14052
|
label,
|
|
13952
14053
|
icon,
|
|
@@ -13956,7 +14057,7 @@ var ScrollableListInputItem = ({
|
|
|
13956
14057
|
labelTestId,
|
|
13957
14058
|
...props
|
|
13958
14059
|
}) => {
|
|
13959
|
-
return /* @__PURE__ */
|
|
14060
|
+
return /* @__PURE__ */ jsx63(
|
|
13960
14061
|
"div",
|
|
13961
14062
|
{
|
|
13962
14063
|
css: [
|
|
@@ -13965,13 +14066,13 @@ var ScrollableListInputItem = ({
|
|
|
13965
14066
|
active ? ScrollableListItemActive : void 0
|
|
13966
14067
|
],
|
|
13967
14068
|
...props,
|
|
13968
|
-
children: /* @__PURE__ */
|
|
13969
|
-
/* @__PURE__ */
|
|
14069
|
+
children: /* @__PURE__ */ jsxs39("label", { "data-test-id": labelTestId, css: ScrollableListInputLabel, children: [
|
|
14070
|
+
/* @__PURE__ */ jsxs39("span", { css: ScrollableListInputText, children: [
|
|
13970
14071
|
icon,
|
|
13971
14072
|
label
|
|
13972
14073
|
] }),
|
|
13973
|
-
/* @__PURE__ */
|
|
13974
|
-
/* @__PURE__ */
|
|
14074
|
+
/* @__PURE__ */ jsx63("div", { css: ScrollableListHiddenInput, children }),
|
|
14075
|
+
/* @__PURE__ */ jsx63(
|
|
13975
14076
|
Icon,
|
|
13976
14077
|
{
|
|
13977
14078
|
icon: CgCheck,
|
|
@@ -13989,14 +14090,14 @@ var ScrollableListInputItem = ({
|
|
|
13989
14090
|
|
|
13990
14091
|
// src/components/List/ScrollableListItem.tsx
|
|
13991
14092
|
import { CgCheck as CgCheck2 } from "react-icons/cg";
|
|
13992
|
-
import { jsx as
|
|
14093
|
+
import { jsx as jsx64, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
|
|
13993
14094
|
var ScrollableListItem = ({
|
|
13994
14095
|
buttonText,
|
|
13995
14096
|
active,
|
|
13996
14097
|
disableShadow,
|
|
13997
14098
|
...props
|
|
13998
14099
|
}) => {
|
|
13999
|
-
return /* @__PURE__ */
|
|
14100
|
+
return /* @__PURE__ */ jsx64(
|
|
14000
14101
|
"div",
|
|
14001
14102
|
{
|
|
14002
14103
|
css: [
|
|
@@ -14004,9 +14105,9 @@ var ScrollableListItem = ({
|
|
|
14004
14105
|
disableShadow ? void 0 : ScrollableListItemShadow,
|
|
14005
14106
|
active ? ScrollableListItemActive : void 0
|
|
14006
14107
|
],
|
|
14007
|
-
children: /* @__PURE__ */
|
|
14008
|
-
/* @__PURE__ */
|
|
14009
|
-
/* @__PURE__ */
|
|
14108
|
+
children: /* @__PURE__ */ jsxs40("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
|
|
14109
|
+
/* @__PURE__ */ jsx64("span", { children: buttonText }),
|
|
14110
|
+
/* @__PURE__ */ jsx64(
|
|
14010
14111
|
Icon,
|
|
14011
14112
|
{
|
|
14012
14113
|
icon: CgCheck2,
|
|
@@ -14021,7 +14122,7 @@ var ScrollableListItem = ({
|
|
|
14021
14122
|
};
|
|
14022
14123
|
|
|
14023
14124
|
// src/components/LoadingIndicator/LoadingIndicator.styles.ts
|
|
14024
|
-
import { css as
|
|
14125
|
+
import { css as css55, keyframes as keyframes3 } from "@emotion/react";
|
|
14025
14126
|
var bounceFade = keyframes3`
|
|
14026
14127
|
0%, 100% {
|
|
14027
14128
|
opacity: 1.0;
|
|
@@ -14039,11 +14140,11 @@ var bounceFade = keyframes3`
|
|
|
14039
14140
|
transform: translateY(-5px);
|
|
14040
14141
|
}
|
|
14041
14142
|
`;
|
|
14042
|
-
var loader =
|
|
14143
|
+
var loader = css55`
|
|
14043
14144
|
display: inline-flex;
|
|
14044
14145
|
justify-content: center;
|
|
14045
14146
|
`;
|
|
14046
|
-
var loadingDot =
|
|
14147
|
+
var loadingDot = css55`
|
|
14047
14148
|
background-color: var(--gray-700);
|
|
14048
14149
|
display: block;
|
|
14049
14150
|
border-radius: var(--rounded-full);
|
|
@@ -14067,21 +14168,21 @@ var loadingDot = css54`
|
|
|
14067
14168
|
`;
|
|
14068
14169
|
|
|
14069
14170
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
14070
|
-
import { jsx as
|
|
14171
|
+
import { jsx as jsx65, jsxs as jsxs41 } from "@emotion/react/jsx-runtime";
|
|
14071
14172
|
var LoadingIndicator = ({ ...props }) => {
|
|
14072
|
-
return /* @__PURE__ */
|
|
14073
|
-
/* @__PURE__ */
|
|
14074
|
-
/* @__PURE__ */
|
|
14075
|
-
/* @__PURE__ */
|
|
14173
|
+
return /* @__PURE__ */ jsxs41("div", { role: "alert", css: loader, "data-test-id": "loading-indicator", ...props, children: [
|
|
14174
|
+
/* @__PURE__ */ jsx65("span", { css: loadingDot }),
|
|
14175
|
+
/* @__PURE__ */ jsx65("span", { css: loadingDot }),
|
|
14176
|
+
/* @__PURE__ */ jsx65("span", { css: loadingDot })
|
|
14076
14177
|
] });
|
|
14077
14178
|
};
|
|
14078
14179
|
|
|
14079
14180
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
14080
|
-
import { useCallback as useCallback2, useEffect as useEffect6, useRef as
|
|
14181
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef5 } from "react";
|
|
14081
14182
|
|
|
14082
14183
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
14083
|
-
import { css as
|
|
14084
|
-
var loadingOverlayContainer =
|
|
14184
|
+
import { css as css56 } from "@emotion/react";
|
|
14185
|
+
var loadingOverlayContainer = css56`
|
|
14085
14186
|
position: absolute;
|
|
14086
14187
|
inset: 0;
|
|
14087
14188
|
overflow: hidden;
|
|
@@ -14089,30 +14190,30 @@ var loadingOverlayContainer = css55`
|
|
|
14089
14190
|
padding: var(--spacing-xl);
|
|
14090
14191
|
overflow-y: auto;
|
|
14091
14192
|
`;
|
|
14092
|
-
var loadingOverlayVisible =
|
|
14193
|
+
var loadingOverlayVisible = css56`
|
|
14093
14194
|
display: flex;
|
|
14094
14195
|
`;
|
|
14095
|
-
var loadingOverlayHidden =
|
|
14196
|
+
var loadingOverlayHidden = css56`
|
|
14096
14197
|
display: none;
|
|
14097
14198
|
`;
|
|
14098
|
-
var loadingOverlayBackground = (bgColor) =>
|
|
14199
|
+
var loadingOverlayBackground = (bgColor) => css56`
|
|
14099
14200
|
background: ${bgColor};
|
|
14100
14201
|
opacity: 0.92;
|
|
14101
14202
|
position: absolute;
|
|
14102
14203
|
inset: 0 0;
|
|
14103
14204
|
`;
|
|
14104
|
-
var loadingOverlayBody =
|
|
14205
|
+
var loadingOverlayBody = css56`
|
|
14105
14206
|
align-items: center;
|
|
14106
14207
|
display: flex;
|
|
14107
14208
|
flex-direction: column;
|
|
14108
14209
|
`;
|
|
14109
|
-
var loadingOverlayMessage =
|
|
14210
|
+
var loadingOverlayMessage = css56`
|
|
14110
14211
|
color: var(--gray-600);
|
|
14111
14212
|
margin: var(--spacing-base) 0 0;
|
|
14112
14213
|
`;
|
|
14113
14214
|
|
|
14114
14215
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
14115
|
-
import { jsx as
|
|
14216
|
+
import { jsx as jsx66, jsxs as jsxs42 } from "@emotion/react/jsx-runtime";
|
|
14116
14217
|
var LoadingOverlay = ({
|
|
14117
14218
|
isActive,
|
|
14118
14219
|
statusMessage,
|
|
@@ -14123,7 +14224,7 @@ var LoadingOverlay = ({
|
|
|
14123
14224
|
isPaused = false,
|
|
14124
14225
|
children
|
|
14125
14226
|
}) => {
|
|
14126
|
-
const lottieRef =
|
|
14227
|
+
const lottieRef = useRef5(null);
|
|
14127
14228
|
const onLoopComplete = useCallback2(() => {
|
|
14128
14229
|
var _a, _b, _c;
|
|
14129
14230
|
if (isPaused && !((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
@@ -14138,7 +14239,7 @@ var LoadingOverlay = ({
|
|
|
14138
14239
|
(_f = lottieRef.current) == null ? void 0 : _f.stop();
|
|
14139
14240
|
}
|
|
14140
14241
|
}, [isPaused]);
|
|
14141
|
-
return /* @__PURE__ */
|
|
14242
|
+
return /* @__PURE__ */ jsxs42(
|
|
14142
14243
|
"div",
|
|
14143
14244
|
{
|
|
14144
14245
|
role: "alert",
|
|
@@ -14146,9 +14247,9 @@ var LoadingOverlay = ({
|
|
|
14146
14247
|
"aria-hidden": !isActive,
|
|
14147
14248
|
"aria-busy": isActive && !isPaused,
|
|
14148
14249
|
children: [
|
|
14149
|
-
/* @__PURE__ */
|
|
14150
|
-
/* @__PURE__ */
|
|
14151
|
-
/* @__PURE__ */
|
|
14250
|
+
/* @__PURE__ */ jsx66("div", { css: loadingOverlayBackground(overlayBackgroundColor) }),
|
|
14251
|
+
/* @__PURE__ */ jsx66("div", { css: { position: "relative", maxWidth: "100%", margin: isTopAligned ? "0" : "auto" }, children: /* @__PURE__ */ jsxs42("div", { css: loadingOverlayBody, children: [
|
|
14252
|
+
/* @__PURE__ */ jsx66(
|
|
14152
14253
|
AnimationFile,
|
|
14153
14254
|
{
|
|
14154
14255
|
lottieRef,
|
|
@@ -14163,15 +14264,15 @@ var LoadingOverlay = ({
|
|
|
14163
14264
|
}
|
|
14164
14265
|
}
|
|
14165
14266
|
),
|
|
14166
|
-
statusMessage ? /* @__PURE__ */
|
|
14167
|
-
/* @__PURE__ */
|
|
14267
|
+
statusMessage ? /* @__PURE__ */ jsx66("div", { css: loadingOverlayMessage, children: statusMessage }) : null,
|
|
14268
|
+
/* @__PURE__ */ jsx66("div", { css: { width: "100%", marginTop: "var(--spacing-md)" }, children })
|
|
14168
14269
|
] }) })
|
|
14169
14270
|
]
|
|
14170
14271
|
}
|
|
14171
14272
|
);
|
|
14172
14273
|
};
|
|
14173
14274
|
var LoadingIcon = ({ height, width, ...props }) => {
|
|
14174
|
-
return /* @__PURE__ */
|
|
14275
|
+
return /* @__PURE__ */ jsx66(
|
|
14175
14276
|
"svg",
|
|
14176
14277
|
{
|
|
14177
14278
|
"data-testid": "svg",
|
|
@@ -14182,9 +14283,9 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
14182
14283
|
stroke: "currentColor",
|
|
14183
14284
|
...props,
|
|
14184
14285
|
"data-test-id": "loading-icon",
|
|
14185
|
-
children: /* @__PURE__ */
|
|
14186
|
-
/* @__PURE__ */
|
|
14187
|
-
/* @__PURE__ */
|
|
14286
|
+
children: /* @__PURE__ */ jsx66("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsxs42("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
14287
|
+
/* @__PURE__ */ jsx66("circle", { strokeOpacity: ".25", cx: "18", cy: "18", r: "18" }),
|
|
14288
|
+
/* @__PURE__ */ jsx66("path", { d: "M36 18c0-9.94-8.06-18-18-18", transform: "rotate(166.645 18 18)", children: /* @__PURE__ */ jsx66(
|
|
14188
14289
|
"animateTransform",
|
|
14189
14290
|
{
|
|
14190
14291
|
attributeName: "transform",
|
|
@@ -14201,12 +14302,12 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
14201
14302
|
};
|
|
14202
14303
|
|
|
14203
14304
|
// src/components/Tiles/CreateTeamIntegrationTile.tsx
|
|
14204
|
-
import { css as
|
|
14305
|
+
import { css as css58 } from "@emotion/react";
|
|
14205
14306
|
import { CgAdd as CgAdd2, CgChevronRight as CgChevronRight2 } from "react-icons/cg";
|
|
14206
14307
|
|
|
14207
14308
|
// src/components/Tiles/styles/IntegrationTile.styles.ts
|
|
14208
|
-
import { css as
|
|
14209
|
-
var IntegrationTileContainer =
|
|
14309
|
+
import { css as css57 } from "@emotion/react";
|
|
14310
|
+
var IntegrationTileContainer = css57`
|
|
14210
14311
|
align-items: center;
|
|
14211
14312
|
box-sizing: border-box;
|
|
14212
14313
|
border-radius: var(--rounded-base);
|
|
@@ -14237,22 +14338,22 @@ var IntegrationTileContainer = css56`
|
|
|
14237
14338
|
}
|
|
14238
14339
|
}
|
|
14239
14340
|
`;
|
|
14240
|
-
var IntegrationTileBtnDashedBorder =
|
|
14341
|
+
var IntegrationTileBtnDashedBorder = css57`
|
|
14241
14342
|
border: 1px dashed var(--brand-secondary-1);
|
|
14242
14343
|
`;
|
|
14243
|
-
var IntegrationTileTitle =
|
|
14344
|
+
var IntegrationTileTitle = css57`
|
|
14244
14345
|
display: block;
|
|
14245
14346
|
font-weight: var(--fw-bold);
|
|
14246
14347
|
margin: 0 0 var(--spacing-base);
|
|
14247
14348
|
max-width: 13rem;
|
|
14248
14349
|
`;
|
|
14249
|
-
var IntegrationTitleLogo =
|
|
14350
|
+
var IntegrationTitleLogo = css57`
|
|
14250
14351
|
display: block;
|
|
14251
14352
|
max-width: 10rem;
|
|
14252
14353
|
max-height: 4rem;
|
|
14253
14354
|
margin: 0 auto;
|
|
14254
14355
|
`;
|
|
14255
|
-
var IntegrationTileName =
|
|
14356
|
+
var IntegrationTileName = css57`
|
|
14256
14357
|
color: var(--gray-500);
|
|
14257
14358
|
display: -webkit-box;
|
|
14258
14359
|
-webkit-line-clamp: 1;
|
|
@@ -14265,7 +14366,7 @@ var IntegrationTileName = css56`
|
|
|
14265
14366
|
position: absolute;
|
|
14266
14367
|
bottom: calc(var(--spacing-base) * 3.8);
|
|
14267
14368
|
`;
|
|
14268
|
-
var IntegrationAddedText =
|
|
14369
|
+
var IntegrationAddedText = css57`
|
|
14269
14370
|
align-items: center;
|
|
14270
14371
|
background: var(--brand-secondary-3);
|
|
14271
14372
|
border-radius: 0 var(--rounded-md) 0 var(--rounded-md);
|
|
@@ -14280,7 +14381,7 @@ var IntegrationAddedText = css56`
|
|
|
14280
14381
|
top: 0;
|
|
14281
14382
|
right: 0;
|
|
14282
14383
|
`;
|
|
14283
|
-
var IntegrationCustomBadgeText = (theme) =>
|
|
14384
|
+
var IntegrationCustomBadgeText = (theme) => css57`
|
|
14284
14385
|
align-items: center;
|
|
14285
14386
|
border-radius: var(--rounded-sm) 0 var(--rounded-sm) 0;
|
|
14286
14387
|
background: ${theme === "gray" ? "var(--brand-secondary-2)" : "var(--brand-secondary-1)"};
|
|
@@ -14294,26 +14395,26 @@ var IntegrationCustomBadgeText = (theme) => css56`
|
|
|
14294
14395
|
top: 0;
|
|
14295
14396
|
left: 0;
|
|
14296
14397
|
`;
|
|
14297
|
-
var IntegrationAuthorBadgeIcon =
|
|
14398
|
+
var IntegrationAuthorBadgeIcon = css57`
|
|
14298
14399
|
position: absolute;
|
|
14299
14400
|
bottom: var(--spacing-sm);
|
|
14300
14401
|
right: var(--spacing-xs);
|
|
14301
14402
|
max-height: 1rem;
|
|
14302
14403
|
`;
|
|
14303
|
-
var IntegrationTitleFakeButton =
|
|
14404
|
+
var IntegrationTitleFakeButton = css57`
|
|
14304
14405
|
font-size: var(--fs-xs);
|
|
14305
14406
|
gap: var(--spacing-sm);
|
|
14306
14407
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
14307
14408
|
text-transform: uppercase;
|
|
14308
14409
|
`;
|
|
14309
|
-
var IntegrationTileFloatingButton =
|
|
14410
|
+
var IntegrationTileFloatingButton = css57`
|
|
14310
14411
|
position: absolute;
|
|
14311
14412
|
bottom: var(--spacing-base);
|
|
14312
14413
|
gap: var(--spacing-sm);
|
|
14313
14414
|
font-size: var(--fs-xs);
|
|
14314
14415
|
overflow: hidden;
|
|
14315
14416
|
`;
|
|
14316
|
-
var IntegrationTileFloatingButtonMessage = (clicked) =>
|
|
14417
|
+
var IntegrationTileFloatingButtonMessage = (clicked) => css57`
|
|
14317
14418
|
strong,
|
|
14318
14419
|
span:first-of-type {
|
|
14319
14420
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
@@ -14334,7 +14435,7 @@ var IntegrationTileFloatingButtonMessage = (clicked) => css56`
|
|
|
14334
14435
|
`;
|
|
14335
14436
|
|
|
14336
14437
|
// src/components/Tiles/CreateTeamIntegrationTile.tsx
|
|
14337
|
-
import { jsx as
|
|
14438
|
+
import { jsx as jsx67, jsxs as jsxs43 } from "@emotion/react/jsx-runtime";
|
|
14338
14439
|
var CreateTeamIntegrationTile = ({
|
|
14339
14440
|
title = "Create a custom integration for your team",
|
|
14340
14441
|
buttonText = "Add Integration",
|
|
@@ -14342,9 +14443,9 @@ var CreateTeamIntegrationTile = ({
|
|
|
14342
14443
|
asDeepLink = false,
|
|
14343
14444
|
...props
|
|
14344
14445
|
}) => {
|
|
14345
|
-
return /* @__PURE__ */
|
|
14346
|
-
/* @__PURE__ */
|
|
14347
|
-
/* @__PURE__ */
|
|
14446
|
+
return /* @__PURE__ */ jsxs43("div", { css: [IntegrationTileContainer, IntegrationTileBtnDashedBorder], ...props, children: [
|
|
14447
|
+
/* @__PURE__ */ jsx67("span", { css: IntegrationTileTitle, title, children: title }),
|
|
14448
|
+
/* @__PURE__ */ jsxs43(
|
|
14348
14449
|
Button,
|
|
14349
14450
|
{
|
|
14350
14451
|
buttonType: "tertiary",
|
|
@@ -14354,23 +14455,23 @@ var CreateTeamIntegrationTile = ({
|
|
|
14354
14455
|
css: IntegrationTitleFakeButton,
|
|
14355
14456
|
children: [
|
|
14356
14457
|
buttonText,
|
|
14357
|
-
asDeepLink ? /* @__PURE__ */
|
|
14458
|
+
asDeepLink ? /* @__PURE__ */ jsx67(
|
|
14358
14459
|
Icon,
|
|
14359
14460
|
{
|
|
14360
14461
|
icon: CgChevronRight2,
|
|
14361
14462
|
iconColor: "currentColor",
|
|
14362
14463
|
size: 20,
|
|
14363
|
-
css:
|
|
14464
|
+
css: css58`
|
|
14364
14465
|
order: 1;
|
|
14365
14466
|
`
|
|
14366
14467
|
}
|
|
14367
|
-
) : /* @__PURE__ */
|
|
14468
|
+
) : /* @__PURE__ */ jsx67(
|
|
14368
14469
|
Icon,
|
|
14369
14470
|
{
|
|
14370
14471
|
icon: CgAdd2,
|
|
14371
14472
|
iconColor: "currentColor",
|
|
14372
14473
|
size: 16,
|
|
14373
|
-
css:
|
|
14474
|
+
css: css58`
|
|
14374
14475
|
order: -1;
|
|
14375
14476
|
`
|
|
14376
14477
|
}
|
|
@@ -14383,31 +14484,31 @@ var CreateTeamIntegrationTile = ({
|
|
|
14383
14484
|
|
|
14384
14485
|
// src/components/Tiles/IntegrationBadges.tsx
|
|
14385
14486
|
import { CgCheck as CgCheck3, CgLock, CgSandClock } from "react-icons/cg";
|
|
14386
|
-
import { jsx as
|
|
14487
|
+
import { jsx as jsx68, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
|
|
14387
14488
|
var IntegrationedAddedBadge = ({ text = "Added" }) => {
|
|
14388
|
-
return /* @__PURE__ */
|
|
14389
|
-
/* @__PURE__ */
|
|
14489
|
+
return /* @__PURE__ */ jsxs44("span", { "data-testid": "integration-icon-installed", css: IntegrationAddedText, children: [
|
|
14490
|
+
/* @__PURE__ */ jsx68(Icon, { icon: CgCheck3, iconColor: "currentColor" }),
|
|
14390
14491
|
text
|
|
14391
14492
|
] });
|
|
14392
14493
|
};
|
|
14393
14494
|
var IntegrationCustomBadge = ({ text = "Custom" }) => {
|
|
14394
|
-
return /* @__PURE__ */
|
|
14495
|
+
return /* @__PURE__ */ jsx68("span", { "data-testid": "integration-is-private", css: IntegrationCustomBadgeText("gray"), children: text });
|
|
14395
14496
|
};
|
|
14396
14497
|
var IntegrationPremiumBadge = ({ text = "Premium" }) => {
|
|
14397
|
-
return /* @__PURE__ */
|
|
14398
|
-
/* @__PURE__ */
|
|
14498
|
+
return /* @__PURE__ */ jsxs44("span", { css: IntegrationCustomBadgeText("blue"), children: [
|
|
14499
|
+
/* @__PURE__ */ jsx68(Icon, { icon: CgLock, iconColor: "currentColor", size: 12 }),
|
|
14399
14500
|
text
|
|
14400
14501
|
] });
|
|
14401
14502
|
};
|
|
14402
14503
|
var IntegrationComingSoonBadge = ({ text = "Coming soon" }) => {
|
|
14403
|
-
return /* @__PURE__ */
|
|
14404
|
-
/* @__PURE__ */
|
|
14504
|
+
return /* @__PURE__ */ jsxs44("span", { css: IntegrationCustomBadgeText("blue"), children: [
|
|
14505
|
+
/* @__PURE__ */ jsx68(Icon, { icon: CgSandClock, iconColor: "currentColor", size: 12 }),
|
|
14405
14506
|
text
|
|
14406
14507
|
] });
|
|
14407
14508
|
};
|
|
14408
14509
|
|
|
14409
14510
|
// src/components/Tiles/ResolveIcon.tsx
|
|
14410
|
-
import { jsx as
|
|
14511
|
+
import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
|
|
14411
14512
|
var ResolveIcon = ({ icon, name, styleType = "logo", ...props }) => {
|
|
14412
14513
|
const CompIcon = icon && typeof icon !== "string" ? icon : null;
|
|
14413
14514
|
const mapClassName = {
|
|
@@ -14415,13 +14516,13 @@ var ResolveIcon = ({ icon, name, styleType = "logo", ...props }) => {
|
|
|
14415
14516
|
logo: IntegrationTitleLogo
|
|
14416
14517
|
};
|
|
14417
14518
|
if (icon) {
|
|
14418
|
-
return CompIcon ? /* @__PURE__ */
|
|
14519
|
+
return CompIcon ? /* @__PURE__ */ jsx69(CompIcon, { css: mapClassName[styleType], ...props }) : /* @__PURE__ */ jsx69("img", { src: icon, alt: name, css: mapClassName[styleType], ...props });
|
|
14419
14520
|
}
|
|
14420
14521
|
return null;
|
|
14421
14522
|
};
|
|
14422
14523
|
|
|
14423
14524
|
// src/components/Tiles/EditTeamIntegrationTile.tsx
|
|
14424
|
-
import { jsx as
|
|
14525
|
+
import { jsx as jsx70, jsxs as jsxs45 } from "@emotion/react/jsx-runtime";
|
|
14425
14526
|
var EditTeamIntegrationTile = ({
|
|
14426
14527
|
id,
|
|
14427
14528
|
icon,
|
|
@@ -14430,17 +14531,17 @@ var EditTeamIntegrationTile = ({
|
|
|
14430
14531
|
isPublic,
|
|
14431
14532
|
canEdit = false
|
|
14432
14533
|
}) => {
|
|
14433
|
-
return /* @__PURE__ */
|
|
14534
|
+
return /* @__PURE__ */ jsxs45(
|
|
14434
14535
|
"div",
|
|
14435
14536
|
{
|
|
14436
14537
|
css: IntegrationTileContainer,
|
|
14437
14538
|
"data-testid": "configure-integration-container",
|
|
14438
14539
|
"integration-id": `${id.toLocaleLowerCase()}`,
|
|
14439
14540
|
children: [
|
|
14440
|
-
/* @__PURE__ */
|
|
14441
|
-
/* @__PURE__ */
|
|
14442
|
-
!isPublic ? /* @__PURE__ */
|
|
14443
|
-
canEdit ? /* @__PURE__ */
|
|
14541
|
+
/* @__PURE__ */ jsx70(ResolveIcon, { icon, name, "data-test-id": "integration-logo" }),
|
|
14542
|
+
/* @__PURE__ */ jsx70("span", { css: IntegrationTileName, "data-test-id": "integration-card-name", children: name }),
|
|
14543
|
+
!isPublic ? /* @__PURE__ */ jsx70(IntegrationCustomBadge, {}) : null,
|
|
14544
|
+
canEdit ? /* @__PURE__ */ jsx70(
|
|
14444
14545
|
Button,
|
|
14445
14546
|
{
|
|
14446
14547
|
buttonType: "unimportant",
|
|
@@ -14458,10 +14559,10 @@ var EditTeamIntegrationTile = ({
|
|
|
14458
14559
|
};
|
|
14459
14560
|
|
|
14460
14561
|
// src/components/Tiles/IntegrationComingSoon.tsx
|
|
14461
|
-
import { css as
|
|
14462
|
-
import { useEffect as useEffect7, useState as
|
|
14562
|
+
import { css as css59 } from "@emotion/react";
|
|
14563
|
+
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
14463
14564
|
import { CgHeart } from "react-icons/cg";
|
|
14464
|
-
import { jsx as
|
|
14565
|
+
import { jsx as jsx71, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
14465
14566
|
var IntegrationComingSoon = ({
|
|
14466
14567
|
name,
|
|
14467
14568
|
icon,
|
|
@@ -14470,7 +14571,7 @@ var IntegrationComingSoon = ({
|
|
|
14470
14571
|
timing = 1e3,
|
|
14471
14572
|
...props
|
|
14472
14573
|
}) => {
|
|
14473
|
-
const [upVote, setUpVote] =
|
|
14574
|
+
const [upVote, setUpVote] = useState7(false);
|
|
14474
14575
|
const handleUpVoteInteraction = () => {
|
|
14475
14576
|
setUpVote((prev) => !prev);
|
|
14476
14577
|
onUpVoteClick();
|
|
@@ -14483,17 +14584,17 @@ var IntegrationComingSoon = ({
|
|
|
14483
14584
|
};
|
|
14484
14585
|
}
|
|
14485
14586
|
}, [upVote, setUpVote, timing]);
|
|
14486
|
-
return /* @__PURE__ */
|
|
14587
|
+
return /* @__PURE__ */ jsxs46(
|
|
14487
14588
|
"div",
|
|
14488
14589
|
{
|
|
14489
14590
|
css: IntegrationTileContainer,
|
|
14490
14591
|
"data-testid": `coming-soon-${id.toLowerCase()}-integration`,
|
|
14491
14592
|
...props,
|
|
14492
14593
|
children: [
|
|
14493
|
-
/* @__PURE__ */
|
|
14494
|
-
/* @__PURE__ */
|
|
14495
|
-
/* @__PURE__ */
|
|
14496
|
-
/* @__PURE__ */
|
|
14594
|
+
/* @__PURE__ */ jsx71(IntegrationComingSoonBadge, {}),
|
|
14595
|
+
/* @__PURE__ */ jsx71(ResolveIcon, { icon, name }),
|
|
14596
|
+
/* @__PURE__ */ jsx71("span", { css: IntegrationTileName, title: name, children: name }),
|
|
14597
|
+
/* @__PURE__ */ jsxs46(
|
|
14497
14598
|
Button,
|
|
14498
14599
|
{
|
|
14499
14600
|
buttonType: "unimportant",
|
|
@@ -14503,19 +14604,19 @@ var IntegrationComingSoon = ({
|
|
|
14503
14604
|
role: "link",
|
|
14504
14605
|
css: [IntegrationTileFloatingButton, IntegrationTileFloatingButtonMessage(upVote)],
|
|
14505
14606
|
children: [
|
|
14506
|
-
/* @__PURE__ */
|
|
14507
|
-
/* @__PURE__ */
|
|
14607
|
+
/* @__PURE__ */ jsx71("strong", { children: "+1" }),
|
|
14608
|
+
/* @__PURE__ */ jsx71(
|
|
14508
14609
|
"span",
|
|
14509
14610
|
{
|
|
14510
|
-
css:
|
|
14611
|
+
css: css59`
|
|
14511
14612
|
text-transform: uppercase;
|
|
14512
14613
|
color: var(--gray-500);
|
|
14513
14614
|
`,
|
|
14514
14615
|
children: "(I want this)"
|
|
14515
14616
|
}
|
|
14516
14617
|
),
|
|
14517
|
-
/* @__PURE__ */
|
|
14518
|
-
/* @__PURE__ */
|
|
14618
|
+
/* @__PURE__ */ jsxs46("span", { "aria-hidden": !upVote, children: [
|
|
14619
|
+
/* @__PURE__ */ jsx71(Icon, { icon: CgHeart, iconColor: "currentColor", size: 18 }),
|
|
14519
14620
|
"Thanks!"
|
|
14520
14621
|
] })
|
|
14521
14622
|
]
|
|
@@ -14527,8 +14628,8 @@ var IntegrationComingSoon = ({
|
|
|
14527
14628
|
};
|
|
14528
14629
|
|
|
14529
14630
|
// src/components/Tiles/styles/IntegrationLoadingTile.styles.ts
|
|
14530
|
-
import { css as
|
|
14531
|
-
var IntegrationLoadingTileContainer =
|
|
14631
|
+
import { css as css60 } from "@emotion/react";
|
|
14632
|
+
var IntegrationLoadingTileContainer = css60`
|
|
14532
14633
|
align-items: center;
|
|
14533
14634
|
box-sizing: border-box;
|
|
14534
14635
|
border-radius: var(--rounded-base);
|
|
@@ -14555,39 +14656,39 @@ var IntegrationLoadingTileContainer = css59`
|
|
|
14555
14656
|
}
|
|
14556
14657
|
}
|
|
14557
14658
|
`;
|
|
14558
|
-
var IntegrationLoadingTileImg =
|
|
14659
|
+
var IntegrationLoadingTileImg = css60`
|
|
14559
14660
|
width: 10rem;
|
|
14560
14661
|
height: 4rem;
|
|
14561
14662
|
margin: 0 auto;
|
|
14562
14663
|
`;
|
|
14563
|
-
var IntegrationLoadingTileText =
|
|
14664
|
+
var IntegrationLoadingTileText = css60`
|
|
14564
14665
|
width: 5rem;
|
|
14565
14666
|
height: var(--spacing-sm);
|
|
14566
14667
|
margin: var(--spacing-sm) 0;
|
|
14567
14668
|
`;
|
|
14568
|
-
var IntegrationLoadingFrame =
|
|
14669
|
+
var IntegrationLoadingFrame = css60`
|
|
14569
14670
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
14570
14671
|
border-radius: var(--rounded-base);
|
|
14571
14672
|
`;
|
|
14572
14673
|
|
|
14573
14674
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
14574
|
-
import { Fragment as Fragment8, jsx as
|
|
14675
|
+
import { Fragment as Fragment8, jsx as jsx72, jsxs as jsxs47 } from "@emotion/react/jsx-runtime";
|
|
14575
14676
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
14576
14677
|
const componentCount = Array.from(Array(count).keys());
|
|
14577
|
-
return /* @__PURE__ */
|
|
14578
|
-
/* @__PURE__ */
|
|
14579
|
-
/* @__PURE__ */
|
|
14678
|
+
return /* @__PURE__ */ jsx72(Fragment8, { children: componentCount.map((i) => /* @__PURE__ */ jsxs47("div", { css: IntegrationLoadingTileContainer, children: [
|
|
14679
|
+
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
14680
|
+
/* @__PURE__ */ jsx72("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
14580
14681
|
] }, i)) });
|
|
14581
14682
|
};
|
|
14582
14683
|
|
|
14583
14684
|
// src/components/Tiles/styles/IntegrationModalIcon.styles.ts
|
|
14584
|
-
import { css as
|
|
14585
|
-
var IntegrationModalIconContainer =
|
|
14685
|
+
import { css as css61 } from "@emotion/react";
|
|
14686
|
+
var IntegrationModalIconContainer = css61`
|
|
14586
14687
|
position: relative;
|
|
14587
14688
|
width: 50px;
|
|
14588
14689
|
margin-bottom: var(--spacing-base);
|
|
14589
14690
|
`;
|
|
14590
|
-
var IntegrationModalImage =
|
|
14691
|
+
var IntegrationModalImage = css61`
|
|
14591
14692
|
position: absolute;
|
|
14592
14693
|
inset: 0;
|
|
14593
14694
|
margin: auto;
|
|
@@ -14596,7 +14697,7 @@ var IntegrationModalImage = css60`
|
|
|
14596
14697
|
`;
|
|
14597
14698
|
|
|
14598
14699
|
// src/components/Tiles/IntegrationModalIcon.tsx
|
|
14599
|
-
import { jsx as
|
|
14700
|
+
import { jsx as jsx73, jsxs as jsxs48 } from "@emotion/react/jsx-runtime";
|
|
14600
14701
|
var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
14601
14702
|
const CompIcon = icon && typeof icon !== "string" ? icon : null;
|
|
14602
14703
|
let iconSrc = void 0;
|
|
@@ -14612,9 +14713,9 @@ var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
|
14612
14713
|
}
|
|
14613
14714
|
}
|
|
14614
14715
|
}
|
|
14615
|
-
return /* @__PURE__ */
|
|
14616
|
-
/* @__PURE__ */
|
|
14617
|
-
/* @__PURE__ */
|
|
14716
|
+
return /* @__PURE__ */ jsxs48("div", { css: IntegrationModalIconContainer, children: [
|
|
14717
|
+
/* @__PURE__ */ jsxs48("svg", { width: "49", height: "57", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", children: [
|
|
14718
|
+
/* @__PURE__ */ jsx73(
|
|
14618
14719
|
"path",
|
|
14619
14720
|
{
|
|
14620
14721
|
d: "m24.367 1.813 22.786 13.322V41.78L24.367 55.102 1.581 41.78V15.135L24.367 1.814Z",
|
|
@@ -14623,12 +14724,12 @@ var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
|
14623
14724
|
strokeWidth: "2"
|
|
14624
14725
|
}
|
|
14625
14726
|
),
|
|
14626
|
-
/* @__PURE__ */
|
|
14627
|
-
/* @__PURE__ */
|
|
14628
|
-
/* @__PURE__ */
|
|
14727
|
+
/* @__PURE__ */ jsx73("defs", { children: /* @__PURE__ */ jsxs48("linearGradient", { id: "a", x1: "41.353", y1: "49.107", x2: "8.048", y2: "4.478", gradientUnits: "userSpaceOnUse", children: [
|
|
14728
|
+
/* @__PURE__ */ jsx73("stop", { stopColor: "#1768B2" }),
|
|
14729
|
+
/* @__PURE__ */ jsx73("stop", { offset: "1", stopColor: "#B3EFE4" })
|
|
14629
14730
|
] }) })
|
|
14630
14731
|
] }),
|
|
14631
|
-
CompIcon ? /* @__PURE__ */
|
|
14732
|
+
CompIcon ? /* @__PURE__ */ jsx73(CompIcon, { role: "img", css: IntegrationModalImage, ...imgProps }) : iconSrc ? /* @__PURE__ */ jsx73(
|
|
14632
14733
|
"img",
|
|
14633
14734
|
{
|
|
14634
14735
|
src: iconSrc,
|
|
@@ -14642,7 +14743,7 @@ var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
|
14642
14743
|
};
|
|
14643
14744
|
|
|
14644
14745
|
// src/components/Tiles/IntegrationTile.tsx
|
|
14645
|
-
import { jsx as
|
|
14746
|
+
import { jsx as jsx74, jsxs as jsxs49 } from "@emotion/react/jsx-runtime";
|
|
14646
14747
|
var IntegrationTile = ({
|
|
14647
14748
|
id,
|
|
14648
14749
|
icon,
|
|
@@ -14654,7 +14755,7 @@ var IntegrationTile = ({
|
|
|
14654
14755
|
authorIcon,
|
|
14655
14756
|
...btnProps
|
|
14656
14757
|
}) => {
|
|
14657
|
-
return /* @__PURE__ */
|
|
14758
|
+
return /* @__PURE__ */ jsxs49(
|
|
14658
14759
|
"button",
|
|
14659
14760
|
{
|
|
14660
14761
|
type: "button",
|
|
@@ -14664,20 +14765,20 @@ var IntegrationTile = ({
|
|
|
14664
14765
|
"aria-label": name,
|
|
14665
14766
|
...btnProps,
|
|
14666
14767
|
children: [
|
|
14667
|
-
/* @__PURE__ */
|
|
14668
|
-
/* @__PURE__ */
|
|
14669
|
-
isInstalled ? /* @__PURE__ */
|
|
14670
|
-
requiedEntitlement && isPublic ? /* @__PURE__ */
|
|
14671
|
-
!isPublic ? /* @__PURE__ */
|
|
14672
|
-
authorIcon ? /* @__PURE__ */
|
|
14768
|
+
/* @__PURE__ */ jsx74(ResolveIcon, { icon, name }),
|
|
14769
|
+
/* @__PURE__ */ jsx74("span", { css: IntegrationTileName, title: name, children: name }),
|
|
14770
|
+
isInstalled ? /* @__PURE__ */ jsx74(IntegrationedAddedBadge, {}) : null,
|
|
14771
|
+
requiedEntitlement && isPublic ? /* @__PURE__ */ jsx74(IntegrationPremiumBadge, {}) : null,
|
|
14772
|
+
!isPublic ? /* @__PURE__ */ jsx74(IntegrationCustomBadge, {}) : null,
|
|
14773
|
+
authorIcon ? /* @__PURE__ */ jsx74(ResolveIcon, { icon: authorIcon, name }) : null
|
|
14673
14774
|
]
|
|
14674
14775
|
}
|
|
14675
14776
|
);
|
|
14676
14777
|
};
|
|
14677
14778
|
|
|
14678
14779
|
// src/components/Tiles/styles/Tile.styles.ts
|
|
14679
|
-
import { css as
|
|
14680
|
-
var Tile =
|
|
14780
|
+
import { css as css62 } from "@emotion/react";
|
|
14781
|
+
var Tile = css62`
|
|
14681
14782
|
background: var(--white);
|
|
14682
14783
|
border: none;
|
|
14683
14784
|
cursor: pointer;
|
|
@@ -14697,25 +14798,25 @@ var Tile = css61`
|
|
|
14697
14798
|
`;
|
|
14698
14799
|
|
|
14699
14800
|
// src/components/Tiles/Tile.tsx
|
|
14700
|
-
import { jsx as
|
|
14801
|
+
import { jsx as jsx75 } from "@emotion/react/jsx-runtime";
|
|
14701
14802
|
var Tile2 = ({ children, ...props }) => {
|
|
14702
|
-
return /* @__PURE__ */
|
|
14803
|
+
return /* @__PURE__ */ jsx75("button", { type: "button", css: Tile, ...props, children });
|
|
14703
14804
|
};
|
|
14704
14805
|
|
|
14705
14806
|
// src/components/Tiles/styles/TileContainer.styles.ts
|
|
14706
|
-
import { css as
|
|
14707
|
-
var TileContainerWrapper = (theme, padding) =>
|
|
14807
|
+
import { css as css63 } from "@emotion/react";
|
|
14808
|
+
var TileContainerWrapper = (theme, padding) => css63`
|
|
14708
14809
|
background: ${theme};
|
|
14709
14810
|
padding: ${padding != "none" ? `var(--spacing-${padding})` : "0"};
|
|
14710
14811
|
`;
|
|
14711
|
-
var TileContainerInner = (gap, templateColumns) =>
|
|
14812
|
+
var TileContainerInner = (gap, templateColumns) => css63`
|
|
14712
14813
|
display: grid;
|
|
14713
14814
|
grid-template-columns: ${templateColumns};
|
|
14714
14815
|
gap: var(--spacing-${gap});
|
|
14715
14816
|
`;
|
|
14716
14817
|
|
|
14717
14818
|
// src/components/Tiles/TileContainer.tsx
|
|
14718
|
-
import { jsx as
|
|
14819
|
+
import { jsx as jsx76 } from "@emotion/react/jsx-runtime";
|
|
14719
14820
|
var TileContainer = ({
|
|
14720
14821
|
bgColor = "var(--brand-secondary-2)",
|
|
14721
14822
|
containerPadding = "base",
|
|
@@ -14724,25 +14825,25 @@ var TileContainer = ({
|
|
|
14724
14825
|
children,
|
|
14725
14826
|
...props
|
|
14726
14827
|
}) => {
|
|
14727
|
-
return /* @__PURE__ */
|
|
14828
|
+
return /* @__PURE__ */ jsx76("div", { css: TileContainerWrapper(bgColor, containerPadding), ...props, children: /* @__PURE__ */ jsx76("div", { css: TileContainerInner(gap, gridTemplateColumns), children }) });
|
|
14728
14829
|
};
|
|
14729
14830
|
|
|
14730
14831
|
// src/components/Tiles/styles/TileText.styles.ts
|
|
14731
|
-
import { css as
|
|
14732
|
-
var TileHeading =
|
|
14832
|
+
import { css as css64 } from "@emotion/react";
|
|
14833
|
+
var TileHeading = css64`
|
|
14733
14834
|
font-size: var(--fs-base);
|
|
14734
14835
|
`;
|
|
14735
|
-
var TileText =
|
|
14836
|
+
var TileText = css64`
|
|
14736
14837
|
color: var(--gray-500);
|
|
14737
14838
|
font-size: var(--fs-sm);
|
|
14738
14839
|
line-height: 1.2;
|
|
14739
14840
|
`;
|
|
14740
14841
|
|
|
14741
14842
|
// src/components/Tiles/TileText.tsx
|
|
14742
|
-
import { jsx as
|
|
14843
|
+
import { jsx as jsx77 } from "@emotion/react/jsx-runtime";
|
|
14743
14844
|
var TileText2 = ({ as = "heading", children, ...props }) => {
|
|
14744
14845
|
const isHeading = as === "heading";
|
|
14745
|
-
return /* @__PURE__ */
|
|
14846
|
+
return /* @__PURE__ */ jsx77(
|
|
14746
14847
|
"span",
|
|
14747
14848
|
{
|
|
14748
14849
|
role: isHeading ? "heading" : void 0,
|
|
@@ -14754,39 +14855,39 @@ var TileText2 = ({ as = "heading", children, ...props }) => {
|
|
|
14754
14855
|
};
|
|
14755
14856
|
|
|
14756
14857
|
// src/components/Modal/IntegrationModalHeader.styles.ts
|
|
14757
|
-
import { css as
|
|
14758
|
-
var IntegrationModalHeaderSVGBackground =
|
|
14858
|
+
import { css as css65 } from "@emotion/react";
|
|
14859
|
+
var IntegrationModalHeaderSVGBackground = css65`
|
|
14759
14860
|
position: absolute;
|
|
14760
14861
|
top: 0;
|
|
14761
14862
|
left: 0;
|
|
14762
14863
|
`;
|
|
14763
|
-
var IntegrationModalHeaderGroup =
|
|
14864
|
+
var IntegrationModalHeaderGroup = css65`
|
|
14764
14865
|
align-items: center;
|
|
14765
14866
|
display: flex;
|
|
14766
14867
|
gap: var(--spacing-sm);
|
|
14767
14868
|
margin: 0 0 var(--spacing-md);
|
|
14768
14869
|
position: relative;
|
|
14769
14870
|
`;
|
|
14770
|
-
var IntegrationModalHeaderTitleGroup =
|
|
14871
|
+
var IntegrationModalHeaderTitleGroup = css65`
|
|
14771
14872
|
align-items: center;
|
|
14772
14873
|
display: flex;
|
|
14773
14874
|
gap: var(--spacing-base);
|
|
14774
14875
|
`;
|
|
14775
|
-
var IntegrationModalHeaderTitle =
|
|
14876
|
+
var IntegrationModalHeaderTitle = css65`
|
|
14776
14877
|
margin-top: 0;
|
|
14777
14878
|
`;
|
|
14778
|
-
var IntegrationModalHeaderMenuPlacement =
|
|
14879
|
+
var IntegrationModalHeaderMenuPlacement = css65`
|
|
14779
14880
|
margin-bottom: var(--spacing-base);
|
|
14780
14881
|
`;
|
|
14781
|
-
var IntegrationModalHeaderContentWrapper =
|
|
14882
|
+
var IntegrationModalHeaderContentWrapper = css65`
|
|
14782
14883
|
position: relative;
|
|
14783
14884
|
z-index: var(--z-10);
|
|
14784
14885
|
`;
|
|
14785
14886
|
|
|
14786
14887
|
// src/components/Modal/IntegrationModalHeader.tsx
|
|
14787
|
-
import { Fragment as Fragment9, jsx as
|
|
14888
|
+
import { Fragment as Fragment9, jsx as jsx78, jsxs as jsxs50 } from "@emotion/react/jsx-runtime";
|
|
14788
14889
|
var HexModalBackground = ({ ...props }) => {
|
|
14789
|
-
return /* @__PURE__ */
|
|
14890
|
+
return /* @__PURE__ */ jsxs50(
|
|
14790
14891
|
"svg",
|
|
14791
14892
|
{
|
|
14792
14893
|
width: "236",
|
|
@@ -14796,7 +14897,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
14796
14897
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14797
14898
|
...props,
|
|
14798
14899
|
children: [
|
|
14799
|
-
/* @__PURE__ */
|
|
14900
|
+
/* @__PURE__ */ jsx78(
|
|
14800
14901
|
"path",
|
|
14801
14902
|
{
|
|
14802
14903
|
fillRule: "evenodd",
|
|
@@ -14805,7 +14906,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
14805
14906
|
fill: "url(#paint0_linear_196_2737)"
|
|
14806
14907
|
}
|
|
14807
14908
|
),
|
|
14808
|
-
/* @__PURE__ */
|
|
14909
|
+
/* @__PURE__ */ jsx78("defs", { children: /* @__PURE__ */ jsxs50(
|
|
14809
14910
|
"linearGradient",
|
|
14810
14911
|
{
|
|
14811
14912
|
id: "paint0_linear_196_2737",
|
|
@@ -14815,8 +14916,8 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
14815
14916
|
y2: "-95.2742",
|
|
14816
14917
|
gradientUnits: "userSpaceOnUse",
|
|
14817
14918
|
children: [
|
|
14818
|
-
/* @__PURE__ */
|
|
14819
|
-
/* @__PURE__ */
|
|
14919
|
+
/* @__PURE__ */ jsx78("stop", { stopColor: "#81DCDE" }),
|
|
14920
|
+
/* @__PURE__ */ jsx78("stop", { offset: "1", stopColor: "#428ED4" })
|
|
14820
14921
|
]
|
|
14821
14922
|
}
|
|
14822
14923
|
) })
|
|
@@ -14825,22 +14926,22 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
14825
14926
|
);
|
|
14826
14927
|
};
|
|
14827
14928
|
var IntegrationModalHeader = ({ icon, name, menu: menu2, children }) => {
|
|
14828
|
-
return /* @__PURE__ */
|
|
14829
|
-
/* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
14831
|
-
icon ? /* @__PURE__ */
|
|
14832
|
-
/* @__PURE__ */
|
|
14833
|
-
menu2 ? /* @__PURE__ */
|
|
14929
|
+
return /* @__PURE__ */ jsxs50(Fragment9, { children: [
|
|
14930
|
+
/* @__PURE__ */ jsx78(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
14931
|
+
/* @__PURE__ */ jsx78("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ jsxs50("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
14932
|
+
icon ? /* @__PURE__ */ jsx78(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
14933
|
+
/* @__PURE__ */ jsx78(Heading, { level: 3, css: IntegrationModalHeaderTitle, "data-test-id": "integration-modal-title", children: name || "Create Team Integration" }),
|
|
14934
|
+
menu2 ? /* @__PURE__ */ jsxs50("div", { css: IntegrationModalHeaderMenuPlacement, children: [
|
|
14834
14935
|
menu2,
|
|
14835
14936
|
" "
|
|
14836
14937
|
] }) : null
|
|
14837
14938
|
] }) }),
|
|
14838
|
-
/* @__PURE__ */
|
|
14939
|
+
/* @__PURE__ */ jsx78("div", { css: IntegrationModalHeaderContentWrapper, children })
|
|
14839
14940
|
] });
|
|
14840
14941
|
};
|
|
14841
14942
|
|
|
14842
14943
|
// src/components/Tooltip/Tooltip.tsx
|
|
14843
|
-
import
|
|
14944
|
+
import React16 from "react";
|
|
14844
14945
|
import {
|
|
14845
14946
|
Tooltip as ReakitTooltip,
|
|
14846
14947
|
TooltipArrow,
|
|
@@ -14849,8 +14950,8 @@ import {
|
|
|
14849
14950
|
} from "reakit/Tooltip";
|
|
14850
14951
|
|
|
14851
14952
|
// src/components/Tooltip/Tooltip.styles.ts
|
|
14852
|
-
import { css as
|
|
14853
|
-
var TooltipContainer =
|
|
14953
|
+
import { css as css66 } from "@emotion/react";
|
|
14954
|
+
var TooltipContainer = css66`
|
|
14854
14955
|
z-index: var(--z-tooltip);
|
|
14855
14956
|
border: 2px solid var(--gray-300);
|
|
14856
14957
|
border-radius: var(--rounded-base);
|
|
@@ -14859,28 +14960,28 @@ var TooltipContainer = css65`
|
|
|
14859
14960
|
font-size: var(--fs-xs);
|
|
14860
14961
|
background: var(--white);
|
|
14861
14962
|
`;
|
|
14862
|
-
var TooltipArrowStyles =
|
|
14963
|
+
var TooltipArrowStyles = css66`
|
|
14863
14964
|
svg {
|
|
14864
14965
|
fill: var(--gray-300);
|
|
14865
14966
|
}
|
|
14866
14967
|
`;
|
|
14867
14968
|
|
|
14868
14969
|
// src/components/Tooltip/Tooltip.tsx
|
|
14869
|
-
import { Fragment as Fragment10, jsx as
|
|
14970
|
+
import { Fragment as Fragment10, jsx as jsx79, jsxs as jsxs51 } from "@emotion/react/jsx-runtime";
|
|
14870
14971
|
function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
|
|
14871
14972
|
const tooltip = useTooltipState({ placement });
|
|
14872
|
-
return !title ? children : /* @__PURE__ */
|
|
14873
|
-
/* @__PURE__ */
|
|
14874
|
-
/* @__PURE__ */
|
|
14875
|
-
/* @__PURE__ */
|
|
14973
|
+
return !title ? children : /* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
14974
|
+
/* @__PURE__ */ jsx79(TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => React16.cloneElement(children, referenceProps) }),
|
|
14975
|
+
/* @__PURE__ */ jsxs51(ReakitTooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
|
|
14976
|
+
/* @__PURE__ */ jsx79(TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
|
|
14876
14977
|
title
|
|
14877
14978
|
] })
|
|
14878
14979
|
] });
|
|
14879
14980
|
}
|
|
14880
14981
|
|
|
14881
14982
|
// src/components/ParameterInputs/styles/ParameterBindingButton.styles.ts
|
|
14882
|
-
import { css as
|
|
14883
|
-
var inputIconBtn =
|
|
14983
|
+
import { css as css67 } from "@emotion/react";
|
|
14984
|
+
var inputIconBtn = css67`
|
|
14884
14985
|
align-items: center;
|
|
14885
14986
|
border: none;
|
|
14886
14987
|
border-radius: var(--rounded-base);
|
|
@@ -14904,7 +15005,7 @@ var inputIconBtn = css66`
|
|
|
14904
15005
|
`;
|
|
14905
15006
|
|
|
14906
15007
|
// src/components/ParameterInputs/ConnectToDataElementButton.tsx
|
|
14907
|
-
import { jsx as
|
|
15008
|
+
import { jsx as jsx80, jsxs as jsxs52 } from "@emotion/react/jsx-runtime";
|
|
14908
15009
|
var ConnectToDataElementButton = ({
|
|
14909
15010
|
icon,
|
|
14910
15011
|
iconColor,
|
|
@@ -14914,7 +15015,7 @@ var ConnectToDataElementButton = ({
|
|
|
14914
15015
|
...props
|
|
14915
15016
|
}) => {
|
|
14916
15017
|
const title = isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
14917
|
-
return /* @__PURE__ */
|
|
15018
|
+
return /* @__PURE__ */ jsx80(Tooltip, { title, children: /* @__PURE__ */ jsxs52(
|
|
14918
15019
|
"button",
|
|
14919
15020
|
{
|
|
14920
15021
|
css: inputIconBtn,
|
|
@@ -14923,7 +15024,7 @@ var ConnectToDataElementButton = ({
|
|
|
14923
15024
|
"aria-disabled": isLocked,
|
|
14924
15025
|
...props,
|
|
14925
15026
|
children: [
|
|
14926
|
-
/* @__PURE__ */
|
|
15027
|
+
/* @__PURE__ */ jsx80(
|
|
14927
15028
|
Icon,
|
|
14928
15029
|
{
|
|
14929
15030
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -14959,8 +15060,8 @@ var useParameterShell = () => {
|
|
|
14959
15060
|
};
|
|
14960
15061
|
|
|
14961
15062
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
14962
|
-
import { css as
|
|
14963
|
-
var inputContainer2 =
|
|
15063
|
+
import { css as css68 } from "@emotion/react";
|
|
15064
|
+
var inputContainer2 = css68`
|
|
14964
15065
|
position: relative;
|
|
14965
15066
|
|
|
14966
15067
|
&:hover,
|
|
@@ -14972,14 +15073,14 @@ var inputContainer2 = css67`
|
|
|
14972
15073
|
}
|
|
14973
15074
|
}
|
|
14974
15075
|
`;
|
|
14975
|
-
var labelText2 =
|
|
15076
|
+
var labelText2 = css68`
|
|
14976
15077
|
align-items: center;
|
|
14977
15078
|
display: flex;
|
|
14978
15079
|
gap: var(--spacing-xs);
|
|
14979
15080
|
font-weight: var(--fw-regular);
|
|
14980
15081
|
margin: 0 0 var(--spacing-xs);
|
|
14981
15082
|
`;
|
|
14982
|
-
var input2 =
|
|
15083
|
+
var input2 = css68`
|
|
14983
15084
|
display: block;
|
|
14984
15085
|
appearance: none;
|
|
14985
15086
|
box-sizing: border-box;
|
|
@@ -15023,18 +15124,18 @@ var input2 = css67`
|
|
|
15023
15124
|
color: var(--gray-400);
|
|
15024
15125
|
}
|
|
15025
15126
|
`;
|
|
15026
|
-
var selectInput =
|
|
15127
|
+
var selectInput = css68`
|
|
15027
15128
|
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");
|
|
15028
15129
|
background-position: right var(--spacing-sm) center;
|
|
15029
15130
|
background-repeat: no-repeat;
|
|
15030
15131
|
background-size: 1rem;
|
|
15031
15132
|
padding-right: var(--spacing-xl);
|
|
15032
15133
|
`;
|
|
15033
|
-
var inputWrapper =
|
|
15134
|
+
var inputWrapper = css68`
|
|
15034
15135
|
display: flex; // used to correct overflow with chrome textarea
|
|
15035
15136
|
position: relative;
|
|
15036
15137
|
`;
|
|
15037
|
-
var inputIcon2 =
|
|
15138
|
+
var inputIcon2 = css68`
|
|
15038
15139
|
align-items: center;
|
|
15039
15140
|
background: var(--white);
|
|
15040
15141
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -15050,7 +15151,7 @@ var inputIcon2 = css67`
|
|
|
15050
15151
|
width: var(--spacing-lg);
|
|
15051
15152
|
z-index: var(--z-10);
|
|
15052
15153
|
`;
|
|
15053
|
-
var inputToggleLabel2 =
|
|
15154
|
+
var inputToggleLabel2 = css68`
|
|
15054
15155
|
align-items: center;
|
|
15055
15156
|
background: var(--white);
|
|
15056
15157
|
cursor: pointer;
|
|
@@ -15061,7 +15162,7 @@ var inputToggleLabel2 = css67`
|
|
|
15061
15162
|
min-height: var(--spacing-md);
|
|
15062
15163
|
position: relative;
|
|
15063
15164
|
`;
|
|
15064
|
-
var toggleInput2 =
|
|
15165
|
+
var toggleInput2 = css68`
|
|
15065
15166
|
appearance: none;
|
|
15066
15167
|
border: 1px solid var(--gray-300);
|
|
15067
15168
|
background: var(--white);
|
|
@@ -15100,7 +15201,7 @@ var toggleInput2 = css67`
|
|
|
15100
15201
|
border-color: var(--gray-300);
|
|
15101
15202
|
}
|
|
15102
15203
|
`;
|
|
15103
|
-
var inlineLabel2 =
|
|
15204
|
+
var inlineLabel2 = css68`
|
|
15104
15205
|
padding-left: var(--spacing-lg);
|
|
15105
15206
|
font-size: var(--fs-sm);
|
|
15106
15207
|
font-weight: var(--fw-regular);
|
|
@@ -15116,7 +15217,7 @@ var inlineLabel2 = css67`
|
|
|
15116
15217
|
}
|
|
15117
15218
|
}
|
|
15118
15219
|
`;
|
|
15119
|
-
var inputMenu =
|
|
15220
|
+
var inputMenu = css68`
|
|
15120
15221
|
background: none;
|
|
15121
15222
|
border: none;
|
|
15122
15223
|
padding: var(--spacing-2xs);
|
|
@@ -15132,14 +15233,14 @@ var inputMenu = css67`
|
|
|
15132
15233
|
background-color: var(--gray-200);
|
|
15133
15234
|
}
|
|
15134
15235
|
`;
|
|
15135
|
-
var textarea2 =
|
|
15236
|
+
var textarea2 = css68`
|
|
15136
15237
|
resize: vertical;
|
|
15137
15238
|
min-height: 2rem;
|
|
15138
15239
|
`;
|
|
15139
|
-
var imageWrapper =
|
|
15240
|
+
var imageWrapper = css68`
|
|
15140
15241
|
background: var(--white);
|
|
15141
15242
|
`;
|
|
15142
|
-
var img =
|
|
15243
|
+
var img = css68`
|
|
15143
15244
|
animation: ${fadeIn} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
15144
15245
|
object-fit: contain;
|
|
15145
15246
|
max-width: 100%;
|
|
@@ -15147,7 +15248,7 @@ var img = css67`
|
|
|
15147
15248
|
opacity: var(--opacity-0);
|
|
15148
15249
|
margin: var(--spacing-sm) auto 0;
|
|
15149
15250
|
`;
|
|
15150
|
-
var dataConnectButton =
|
|
15251
|
+
var dataConnectButton = css68`
|
|
15151
15252
|
align-items: center;
|
|
15152
15253
|
appearance: none;
|
|
15153
15254
|
box-sizing: border-box;
|
|
@@ -15182,7 +15283,7 @@ var dataConnectButton = css67`
|
|
|
15182
15283
|
pointer-events: none;
|
|
15183
15284
|
}
|
|
15184
15285
|
`;
|
|
15185
|
-
var linkParameterBtn =
|
|
15286
|
+
var linkParameterBtn = css68`
|
|
15186
15287
|
border-radius: var(--rounded-base);
|
|
15187
15288
|
background: var(--white);
|
|
15188
15289
|
border: none;
|
|
@@ -15191,7 +15292,7 @@ var linkParameterBtn = css67`
|
|
|
15191
15292
|
font-size: var(--fs-sm);
|
|
15192
15293
|
line-height: 1;
|
|
15193
15294
|
`;
|
|
15194
|
-
var linkParameterControls =
|
|
15295
|
+
var linkParameterControls = css68`
|
|
15195
15296
|
position: absolute;
|
|
15196
15297
|
inset: 0 0 0 auto;
|
|
15197
15298
|
padding: 0 var(--spacing-base);
|
|
@@ -15200,13 +15301,13 @@ var linkParameterControls = css67`
|
|
|
15200
15301
|
justify-content: center;
|
|
15201
15302
|
gap: var(--spacing-base);
|
|
15202
15303
|
`;
|
|
15203
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
15304
|
+
var linkParameterInput = (withExternalLinkIcon) => css68`
|
|
15204
15305
|
padding-right: calc(
|
|
15205
15306
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
15206
15307
|
var(--spacing-base)
|
|
15207
15308
|
);
|
|
15208
15309
|
`;
|
|
15209
|
-
var linkParameterIcon =
|
|
15310
|
+
var linkParameterIcon = css68`
|
|
15210
15311
|
align-items: center;
|
|
15211
15312
|
color: var(--brand-secondary-3);
|
|
15212
15313
|
display: flex;
|
|
@@ -15221,7 +15322,7 @@ var linkParameterIcon = css67`
|
|
|
15221
15322
|
`;
|
|
15222
15323
|
|
|
15223
15324
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
15224
|
-
import { jsx as
|
|
15325
|
+
import { jsx as jsx81, jsxs as jsxs53 } from "@emotion/react/jsx-runtime";
|
|
15225
15326
|
function ParameterDataResource({
|
|
15226
15327
|
label,
|
|
15227
15328
|
labelLeadingIcon,
|
|
@@ -15231,12 +15332,12 @@ function ParameterDataResource({
|
|
|
15231
15332
|
disabled,
|
|
15232
15333
|
children
|
|
15233
15334
|
}) {
|
|
15234
|
-
return /* @__PURE__ */
|
|
15235
|
-
/* @__PURE__ */
|
|
15335
|
+
return /* @__PURE__ */ jsxs53("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
15336
|
+
/* @__PURE__ */ jsxs53("span", { css: labelText2, children: [
|
|
15236
15337
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
15237
15338
|
label
|
|
15238
15339
|
] }),
|
|
15239
|
-
/* @__PURE__ */
|
|
15340
|
+
/* @__PURE__ */ jsxs53(
|
|
15240
15341
|
"button",
|
|
15241
15342
|
{
|
|
15242
15343
|
type: "button",
|
|
@@ -15245,30 +15346,30 @@ function ParameterDataResource({
|
|
|
15245
15346
|
disabled,
|
|
15246
15347
|
onClick: onConnectDatasource,
|
|
15247
15348
|
children: [
|
|
15248
|
-
/* @__PURE__ */
|
|
15349
|
+
/* @__PURE__ */ jsx81("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ jsx81(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
15249
15350
|
children
|
|
15250
15351
|
]
|
|
15251
15352
|
}
|
|
15252
15353
|
),
|
|
15253
|
-
caption ? /* @__PURE__ */
|
|
15354
|
+
caption ? /* @__PURE__ */ jsx81(Caption, { children: caption }) : null
|
|
15254
15355
|
] });
|
|
15255
15356
|
}
|
|
15256
15357
|
|
|
15257
15358
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
15258
|
-
import { css as
|
|
15259
|
-
var ParameterDrawerHeaderContainer =
|
|
15359
|
+
import { css as css69 } from "@emotion/react";
|
|
15360
|
+
var ParameterDrawerHeaderContainer = css69`
|
|
15260
15361
|
align-items: center;
|
|
15261
15362
|
display: flex;
|
|
15262
15363
|
gap: var(--spacing-base);
|
|
15263
15364
|
justify-content: space-between;
|
|
15264
15365
|
margin-bottom: var(--spacing-sm);
|
|
15265
15366
|
`;
|
|
15266
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
15367
|
+
var ParameterDrawerHeaderTitleGroup = css69`
|
|
15267
15368
|
align-items: center;
|
|
15268
15369
|
display: flex;
|
|
15269
15370
|
gap: var(--spacing-sm);
|
|
15270
15371
|
`;
|
|
15271
|
-
var ParameterDrawerHeaderTitle =
|
|
15372
|
+
var ParameterDrawerHeaderTitle = css69`
|
|
15272
15373
|
text-overflow: ellipsis;
|
|
15273
15374
|
white-space: nowrap;
|
|
15274
15375
|
overflow: hidden;
|
|
@@ -15276,12 +15377,12 @@ var ParameterDrawerHeaderTitle = css68`
|
|
|
15276
15377
|
`;
|
|
15277
15378
|
|
|
15278
15379
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
15279
|
-
import { jsx as
|
|
15380
|
+
import { jsx as jsx82, jsxs as jsxs54 } from "@emotion/react/jsx-runtime";
|
|
15280
15381
|
var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
15281
|
-
return /* @__PURE__ */
|
|
15282
|
-
/* @__PURE__ */
|
|
15382
|
+
return /* @__PURE__ */ jsxs54("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
15383
|
+
/* @__PURE__ */ jsxs54("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
15283
15384
|
iconBeforeTitle,
|
|
15284
|
-
/* @__PURE__ */
|
|
15385
|
+
/* @__PURE__ */ jsx82(Heading, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title, children: title })
|
|
15285
15386
|
] }),
|
|
15286
15387
|
children
|
|
15287
15388
|
] });
|
|
@@ -15291,8 +15392,8 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
15291
15392
|
import { forwardRef as forwardRef8 } from "react";
|
|
15292
15393
|
|
|
15293
15394
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
15294
|
-
import { css as
|
|
15295
|
-
var fieldsetStyles =
|
|
15395
|
+
import { css as css70 } from "@emotion/react";
|
|
15396
|
+
var fieldsetStyles = css70`
|
|
15296
15397
|
&:disabled,
|
|
15297
15398
|
[readonly] {
|
|
15298
15399
|
pointer-events: none;
|
|
@@ -15303,7 +15404,7 @@ var fieldsetStyles = css69`
|
|
|
15303
15404
|
}
|
|
15304
15405
|
}
|
|
15305
15406
|
`;
|
|
15306
|
-
var fieldsetLegend2 =
|
|
15407
|
+
var fieldsetLegend2 = css70`
|
|
15307
15408
|
display: block;
|
|
15308
15409
|
font-weight: var(--fw-medium);
|
|
15309
15410
|
margin-bottom: var(--spacing-sm);
|
|
@@ -15311,38 +15412,48 @@ var fieldsetLegend2 = css69`
|
|
|
15311
15412
|
`;
|
|
15312
15413
|
|
|
15313
15414
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
15314
|
-
import { jsx as
|
|
15415
|
+
import { jsx as jsx83, jsxs as jsxs55 } from "@emotion/react/jsx-runtime";
|
|
15315
15416
|
var ParameterGroup = forwardRef8(
|
|
15316
15417
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
15317
|
-
return /* @__PURE__ */
|
|
15318
|
-
/* @__PURE__ */
|
|
15418
|
+
return /* @__PURE__ */ jsxs55("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
15419
|
+
/* @__PURE__ */ jsx83("legend", { css: fieldsetLegend2, children: legend }),
|
|
15319
15420
|
children
|
|
15320
15421
|
] });
|
|
15321
15422
|
}
|
|
15322
15423
|
);
|
|
15323
15424
|
|
|
15324
15425
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
15325
|
-
import { forwardRef as forwardRef10, useCallback as useCallback3, useDeferredValue, useEffect as useEffect8, useState as
|
|
15426
|
+
import { forwardRef as forwardRef10, useCallback as useCallback3, useDeferredValue, useEffect as useEffect8, useState as useState9 } from "react";
|
|
15427
|
+
|
|
15428
|
+
// src/utils/url.ts
|
|
15429
|
+
var isValidUrl = (url, options = {}) => {
|
|
15430
|
+
try {
|
|
15431
|
+
new URL(url, options.allowRelative ? "https://defaultbaseurl.com" : void 0);
|
|
15432
|
+
return true;
|
|
15433
|
+
} catch (e) {
|
|
15434
|
+
return false;
|
|
15435
|
+
}
|
|
15436
|
+
};
|
|
15326
15437
|
|
|
15327
15438
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
15328
|
-
import { useState as
|
|
15439
|
+
import { useState as useState8 } from "react";
|
|
15329
15440
|
|
|
15330
15441
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
15331
|
-
import { jsx as
|
|
15442
|
+
import { jsx as jsx84 } from "@emotion/react/jsx-runtime";
|
|
15332
15443
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
15333
|
-
return !asSpan ? /* @__PURE__ */
|
|
15444
|
+
return !asSpan ? /* @__PURE__ */ jsx84("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ jsx84("span", { "aria-labelledby": id, css: labelText2, children });
|
|
15334
15445
|
};
|
|
15335
15446
|
|
|
15336
15447
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
15337
15448
|
import { forwardRef as forwardRef9 } from "react";
|
|
15338
|
-
import { jsx as
|
|
15449
|
+
import { jsx as jsx85 } from "@emotion/react/jsx-runtime";
|
|
15339
15450
|
var ParameterMenuButton = forwardRef9(
|
|
15340
15451
|
({ label, children }, ref) => {
|
|
15341
|
-
return /* @__PURE__ */
|
|
15452
|
+
return /* @__PURE__ */ jsx85(
|
|
15342
15453
|
Menu,
|
|
15343
15454
|
{
|
|
15344
15455
|
menuLabel: `${label} menu`,
|
|
15345
|
-
menuTrigger: /* @__PURE__ */
|
|
15456
|
+
menuTrigger: /* @__PURE__ */ jsx85(
|
|
15346
15457
|
"button",
|
|
15347
15458
|
{
|
|
15348
15459
|
className: "parameter-menu",
|
|
@@ -15350,7 +15461,7 @@ var ParameterMenuButton = forwardRef9(
|
|
|
15350
15461
|
type: "button",
|
|
15351
15462
|
"aria-label": `${label} options`,
|
|
15352
15463
|
ref,
|
|
15353
|
-
children: /* @__PURE__ */
|
|
15464
|
+
children: /* @__PURE__ */ jsx85(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
15354
15465
|
}
|
|
15355
15466
|
),
|
|
15356
15467
|
children
|
|
@@ -15360,15 +15471,15 @@ var ParameterMenuButton = forwardRef9(
|
|
|
15360
15471
|
);
|
|
15361
15472
|
|
|
15362
15473
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
15363
|
-
import { css as
|
|
15364
|
-
var emptyParameterShell =
|
|
15474
|
+
import { css as css71 } from "@emotion/react";
|
|
15475
|
+
var emptyParameterShell = css71`
|
|
15365
15476
|
border-radius: var(--rounded-sm);
|
|
15366
15477
|
background: var(--white);
|
|
15367
15478
|
flex-grow: 1;
|
|
15368
15479
|
padding: var(--spacing-xs);
|
|
15369
15480
|
position: relative;
|
|
15370
15481
|
`;
|
|
15371
|
-
var emptyParameterShellText =
|
|
15482
|
+
var emptyParameterShellText = css71`
|
|
15372
15483
|
background: var(--brand-secondary-6);
|
|
15373
15484
|
border-radius: var(--rounded-sm);
|
|
15374
15485
|
padding: var(--spacing-sm);
|
|
@@ -15376,7 +15487,7 @@ var emptyParameterShellText = css70`
|
|
|
15376
15487
|
font-size: var(--fs-sm);
|
|
15377
15488
|
margin: 0;
|
|
15378
15489
|
`;
|
|
15379
|
-
var overrideMarker =
|
|
15490
|
+
var overrideMarker = css71`
|
|
15380
15491
|
border-radius: var(--rounded-sm);
|
|
15381
15492
|
border: 10px solid var(--gray-300);
|
|
15382
15493
|
border-left-color: transparent;
|
|
@@ -15387,7 +15498,7 @@ var overrideMarker = css70`
|
|
|
15387
15498
|
`;
|
|
15388
15499
|
|
|
15389
15500
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
15390
|
-
import { jsx as
|
|
15501
|
+
import { jsx as jsx86, jsxs as jsxs56 } from "@emotion/react/jsx-runtime";
|
|
15391
15502
|
var extractParameterProps = (props) => {
|
|
15392
15503
|
const {
|
|
15393
15504
|
id,
|
|
@@ -15444,21 +15555,21 @@ var ParameterShell = ({
|
|
|
15444
15555
|
children,
|
|
15445
15556
|
...props
|
|
15446
15557
|
}) => {
|
|
15447
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
15558
|
+
const [manualErrorMessage, setManualErrorMessage] = useState8(void 0);
|
|
15448
15559
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
15449
15560
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
15450
|
-
return /* @__PURE__ */
|
|
15451
|
-
hiddenLabel || title ? null : /* @__PURE__ */
|
|
15561
|
+
return /* @__PURE__ */ jsxs56("div", { css: inputContainer2, ...props, children: [
|
|
15562
|
+
hiddenLabel || title ? null : /* @__PURE__ */ jsxs56(ParameterLabel, { id, css: labelText2, children: [
|
|
15452
15563
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
15453
15564
|
label
|
|
15454
15565
|
] }),
|
|
15455
|
-
!title ? null : /* @__PURE__ */
|
|
15566
|
+
!title ? null : /* @__PURE__ */ jsxs56(ParameterLabel, { id, asSpan: true, children: [
|
|
15456
15567
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
15457
15568
|
title
|
|
15458
15569
|
] }),
|
|
15459
|
-
/* @__PURE__ */
|
|
15460
|
-
menuItems ? /* @__PURE__ */
|
|
15461
|
-
/* @__PURE__ */
|
|
15570
|
+
/* @__PURE__ */ jsxs56("div", { css: inputWrapper, children: [
|
|
15571
|
+
menuItems ? /* @__PURE__ */ jsx86(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
15572
|
+
/* @__PURE__ */ jsx86(
|
|
15462
15573
|
ParameterShellContext.Provider,
|
|
15463
15574
|
{
|
|
15464
15575
|
value: {
|
|
@@ -15468,32 +15579,32 @@ var ParameterShell = ({
|
|
|
15468
15579
|
errorMessage: errorMessaging,
|
|
15469
15580
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
15470
15581
|
},
|
|
15471
|
-
children: /* @__PURE__ */
|
|
15582
|
+
children: /* @__PURE__ */ jsxs56(ParameterShellPlaceholder, { children: [
|
|
15472
15583
|
children,
|
|
15473
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */
|
|
15584
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx86(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
15474
15585
|
] })
|
|
15475
15586
|
}
|
|
15476
15587
|
)
|
|
15477
15588
|
] }),
|
|
15478
|
-
caption ? /* @__PURE__ */
|
|
15479
|
-
errorMessaging ? /* @__PURE__ */
|
|
15480
|
-
warningMessage ? /* @__PURE__ */
|
|
15481
|
-
infoMessage ? /* @__PURE__ */
|
|
15589
|
+
caption ? /* @__PURE__ */ jsx86(Caption, { testId: captionTestId, children: caption }) : null,
|
|
15590
|
+
errorMessaging ? /* @__PURE__ */ jsx86(ErrorMessage, { message: errorMessaging, testId: errorTestId }) : null,
|
|
15591
|
+
warningMessage ? /* @__PURE__ */ jsx86(WarningMessage, { message: warningMessage }) : null,
|
|
15592
|
+
infoMessage ? /* @__PURE__ */ jsx86(InfoMessage, { message: infoMessage }) : null
|
|
15482
15593
|
] });
|
|
15483
15594
|
};
|
|
15484
15595
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
15485
|
-
return /* @__PURE__ */
|
|
15596
|
+
return /* @__PURE__ */ jsx86("div", { css: emptyParameterShell, children });
|
|
15486
15597
|
};
|
|
15487
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */
|
|
15598
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx86(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx86("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx86("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
15488
15599
|
|
|
15489
15600
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
15490
|
-
import { Fragment as Fragment11, jsx as
|
|
15601
|
+
import { Fragment as Fragment11, jsx as jsx87, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
15491
15602
|
var ParameterImage = forwardRef10((props, ref) => {
|
|
15492
15603
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15493
|
-
return /* @__PURE__ */
|
|
15604
|
+
return /* @__PURE__ */ jsx87(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: /* @__PURE__ */ jsx87(ParameterImageInner, { ref, ...innerProps }) });
|
|
15494
15605
|
});
|
|
15495
15606
|
var BrokenImage = ({ ...props }) => {
|
|
15496
|
-
return /* @__PURE__ */
|
|
15607
|
+
return /* @__PURE__ */ jsxs57(
|
|
15497
15608
|
"svg",
|
|
15498
15609
|
{
|
|
15499
15610
|
role: "img",
|
|
@@ -15505,11 +15616,11 @@ var BrokenImage = ({ ...props }) => {
|
|
|
15505
15616
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
15506
15617
|
...props,
|
|
15507
15618
|
children: [
|
|
15508
|
-
/* @__PURE__ */
|
|
15509
|
-
/* @__PURE__ */
|
|
15510
|
-
/* @__PURE__ */
|
|
15511
|
-
/* @__PURE__ */
|
|
15512
|
-
/* @__PURE__ */
|
|
15619
|
+
/* @__PURE__ */ jsx87("rect", { width: "214", height: "214", fill: "#F9FAFB" }),
|
|
15620
|
+
/* @__PURE__ */ jsx87("rect", { width: "214", height: "214", fill: "url(#pattern0)" }),
|
|
15621
|
+
/* @__PURE__ */ jsxs57("defs", { children: [
|
|
15622
|
+
/* @__PURE__ */ jsx87("pattern", { id: "pattern0", patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsx87("use", { xlinkHref: "#image0_761_4353", transform: "scale(0.0025)" }) }),
|
|
15623
|
+
/* @__PURE__ */ jsx87(
|
|
15513
15624
|
"image",
|
|
15514
15625
|
{
|
|
15515
15626
|
id: "image0_761_4353",
|
|
@@ -15527,18 +15638,15 @@ var ParameterImageInner = forwardRef10(
|
|
|
15527
15638
|
({ ...props }, ref) => {
|
|
15528
15639
|
const { value } = props;
|
|
15529
15640
|
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useParameterShell();
|
|
15530
|
-
const [loading, setLoading] =
|
|
15641
|
+
const [loading, setLoading] = useState9(false);
|
|
15531
15642
|
const deferredValue = useDeferredValue(value);
|
|
15532
15643
|
const errorText = "The text you provided is not a valid URL";
|
|
15533
15644
|
const updateImageSrc = useCallback3(() => {
|
|
15534
|
-
const validUrl = new RegExp(
|
|
15535
|
-
/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_.+~#?&/=]*)$/
|
|
15536
|
-
);
|
|
15537
15645
|
let message = void 0;
|
|
15538
15646
|
try {
|
|
15539
15647
|
if (value !== "") {
|
|
15540
15648
|
const url = String(value).startsWith("//") ? `${location.protocol}${value}` : String(value);
|
|
15541
|
-
if (!
|
|
15649
|
+
if (!isValidUrl(url) || !url.startsWith("https")) {
|
|
15542
15650
|
throw Error(errorText);
|
|
15543
15651
|
}
|
|
15544
15652
|
}
|
|
@@ -15567,8 +15675,8 @@ var ParameterImageInner = forwardRef10(
|
|
|
15567
15675
|
useEffect8(() => {
|
|
15568
15676
|
updateImageSrc();
|
|
15569
15677
|
}, [deferredValue]);
|
|
15570
|
-
return /* @__PURE__ */
|
|
15571
|
-
/* @__PURE__ */
|
|
15678
|
+
return /* @__PURE__ */ jsxs57(Fragment11, { children: [
|
|
15679
|
+
/* @__PURE__ */ jsx87(
|
|
15572
15680
|
"input",
|
|
15573
15681
|
{
|
|
15574
15682
|
css: input2,
|
|
@@ -15580,8 +15688,8 @@ var ParameterImageInner = forwardRef10(
|
|
|
15580
15688
|
...props
|
|
15581
15689
|
}
|
|
15582
15690
|
),
|
|
15583
|
-
/* @__PURE__ */
|
|
15584
|
-
deferredValue && !errorMessage ? /* @__PURE__ */
|
|
15691
|
+
/* @__PURE__ */ jsxs57("div", { css: imageWrapper, children: [
|
|
15692
|
+
deferredValue && !errorMessage ? /* @__PURE__ */ jsx87(
|
|
15585
15693
|
"img",
|
|
15586
15694
|
{
|
|
15587
15695
|
src: deferredValue,
|
|
@@ -15592,24 +15700,24 @@ var ParameterImageInner = forwardRef10(
|
|
|
15592
15700
|
loading: "lazy"
|
|
15593
15701
|
}
|
|
15594
15702
|
) : null,
|
|
15595
|
-
deferredValue && errorMessage ? /* @__PURE__ */
|
|
15703
|
+
deferredValue && errorMessage ? /* @__PURE__ */ jsx87(BrokenImage, { css: img }) : null
|
|
15596
15704
|
] }),
|
|
15597
|
-
loading ? /* @__PURE__ */
|
|
15705
|
+
loading ? /* @__PURE__ */ jsx87(LoadingIcon, {}) : null
|
|
15598
15706
|
] });
|
|
15599
15707
|
}
|
|
15600
15708
|
);
|
|
15601
15709
|
|
|
15602
15710
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
15603
15711
|
import { forwardRef as forwardRef11 } from "react";
|
|
15604
|
-
import { jsx as
|
|
15712
|
+
import { jsx as jsx88 } from "@emotion/react/jsx-runtime";
|
|
15605
15713
|
var ParameterInput = forwardRef11((props, ref) => {
|
|
15606
15714
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15607
|
-
return /* @__PURE__ */
|
|
15715
|
+
return /* @__PURE__ */ jsx88(ParameterShell, { "data-test-id": "parameter-input", ...shellProps, children: /* @__PURE__ */ jsx88(ParameterInputInner, { ref, ...innerProps }) });
|
|
15608
15716
|
});
|
|
15609
15717
|
var ParameterInputInner = forwardRef11(
|
|
15610
15718
|
({ ...props }, ref) => {
|
|
15611
15719
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
15612
|
-
return /* @__PURE__ */
|
|
15720
|
+
return /* @__PURE__ */ jsx88(
|
|
15613
15721
|
"input",
|
|
15614
15722
|
{
|
|
15615
15723
|
css: input2,
|
|
@@ -15626,18 +15734,18 @@ var ParameterInputInner = forwardRef11(
|
|
|
15626
15734
|
|
|
15627
15735
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
15628
15736
|
import { forwardRef as forwardRef12 } from "react";
|
|
15629
|
-
import { jsx as
|
|
15737
|
+
import { jsx as jsx89, jsxs as jsxs58 } from "@emotion/react/jsx-runtime";
|
|
15630
15738
|
var ParameterLink = forwardRef12(
|
|
15631
15739
|
({ buttonText = "Select link", disabled, onConnectLink, externalLink, ...props }, ref) => {
|
|
15632
15740
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15633
|
-
return /* @__PURE__ */
|
|
15741
|
+
return /* @__PURE__ */ jsx89(
|
|
15634
15742
|
ParameterShell,
|
|
15635
15743
|
{
|
|
15636
15744
|
"data-test-id": "link-parameter-editor",
|
|
15637
15745
|
...shellProps,
|
|
15638
15746
|
label: innerProps.value ? shellProps.label : "",
|
|
15639
15747
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
15640
|
-
children: !innerProps.value ? /* @__PURE__ */
|
|
15748
|
+
children: !innerProps.value ? /* @__PURE__ */ jsx89("button", { type: "button", css: dataConnectButton, disabled, onClick: onConnectLink, children: buttonText }) : /* @__PURE__ */ jsx89(
|
|
15641
15749
|
ParameterLinkInner,
|
|
15642
15750
|
{
|
|
15643
15751
|
onConnectLink,
|
|
@@ -15653,8 +15761,8 @@ var ParameterLink = forwardRef12(
|
|
|
15653
15761
|
var ParameterLinkInner = forwardRef12(
|
|
15654
15762
|
({ externalLink, onConnectLink, disabled, ...props }, ref) => {
|
|
15655
15763
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
15656
|
-
return /* @__PURE__ */
|
|
15657
|
-
/* @__PURE__ */
|
|
15764
|
+
return /* @__PURE__ */ jsxs58("div", { css: inputWrapper, children: [
|
|
15765
|
+
/* @__PURE__ */ jsx89(
|
|
15658
15766
|
"input",
|
|
15659
15767
|
{
|
|
15660
15768
|
type: "text",
|
|
@@ -15666,8 +15774,8 @@ var ParameterLinkInner = forwardRef12(
|
|
|
15666
15774
|
...props
|
|
15667
15775
|
}
|
|
15668
15776
|
),
|
|
15669
|
-
/* @__PURE__ */
|
|
15670
|
-
/* @__PURE__ */
|
|
15777
|
+
/* @__PURE__ */ jsxs58("div", { css: linkParameterControls, children: [
|
|
15778
|
+
/* @__PURE__ */ jsx89(
|
|
15671
15779
|
"button",
|
|
15672
15780
|
{
|
|
15673
15781
|
type: "button",
|
|
@@ -15678,7 +15786,7 @@ var ParameterLinkInner = forwardRef12(
|
|
|
15678
15786
|
children: "edit"
|
|
15679
15787
|
}
|
|
15680
15788
|
),
|
|
15681
|
-
externalLink ? /* @__PURE__ */
|
|
15789
|
+
externalLink ? /* @__PURE__ */ jsx89(
|
|
15682
15790
|
"a",
|
|
15683
15791
|
{
|
|
15684
15792
|
href: externalLink,
|
|
@@ -15686,7 +15794,7 @@ var ParameterLinkInner = forwardRef12(
|
|
|
15686
15794
|
title: "Open link in new tab",
|
|
15687
15795
|
target: "_blank",
|
|
15688
15796
|
rel: "noopener noreferrer",
|
|
15689
|
-
children: /* @__PURE__ */
|
|
15797
|
+
children: /* @__PURE__ */ jsx89(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
15690
15798
|
}
|
|
15691
15799
|
) : null
|
|
15692
15800
|
] })
|
|
@@ -15695,7 +15803,7 @@ var ParameterLinkInner = forwardRef12(
|
|
|
15695
15803
|
);
|
|
15696
15804
|
|
|
15697
15805
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
15698
|
-
import { Fragment as Fragment12, jsx as
|
|
15806
|
+
import { Fragment as Fragment12, jsx as jsx90, jsxs as jsxs59 } from "@emotion/react/jsx-runtime";
|
|
15699
15807
|
var ParameterNameAndPublicIdInput = ({
|
|
15700
15808
|
id,
|
|
15701
15809
|
onBlur,
|
|
@@ -15721,8 +15829,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15721
15829
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
15722
15830
|
};
|
|
15723
15831
|
autoFocus == null ? void 0 : autoFocus();
|
|
15724
|
-
return /* @__PURE__ */
|
|
15725
|
-
/* @__PURE__ */
|
|
15832
|
+
return /* @__PURE__ */ jsxs59(Fragment12, { children: [
|
|
15833
|
+
/* @__PURE__ */ jsx90(
|
|
15726
15834
|
ParameterInput,
|
|
15727
15835
|
{
|
|
15728
15836
|
id: nameIdField,
|
|
@@ -15741,7 +15849,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15741
15849
|
value: values[nameIdField]
|
|
15742
15850
|
}
|
|
15743
15851
|
),
|
|
15744
|
-
/* @__PURE__ */
|
|
15852
|
+
/* @__PURE__ */ jsx90(
|
|
15745
15853
|
ParameterInput,
|
|
15746
15854
|
{
|
|
15747
15855
|
id: publicIdFieldName,
|
|
@@ -15755,11 +15863,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15755
15863
|
caption: publicIdCaption,
|
|
15756
15864
|
placeholder: publicIdPlaceholderText,
|
|
15757
15865
|
errorMessage: publicIdError,
|
|
15758
|
-
menuItems: /* @__PURE__ */
|
|
15866
|
+
menuItems: /* @__PURE__ */ jsx90(
|
|
15759
15867
|
MenuItem,
|
|
15760
15868
|
{
|
|
15761
15869
|
disabled: !values[publicIdFieldName],
|
|
15762
|
-
icon: /* @__PURE__ */
|
|
15870
|
+
icon: /* @__PURE__ */ jsx90(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
15763
15871
|
onClick: handleCopyPidFieldValue,
|
|
15764
15872
|
children: "Copy"
|
|
15765
15873
|
}
|
|
@@ -15767,13 +15875,12 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15767
15875
|
value: values[publicIdFieldName]
|
|
15768
15876
|
}
|
|
15769
15877
|
),
|
|
15770
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */
|
|
15878
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ jsx90(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
15771
15879
|
] });
|
|
15772
15880
|
};
|
|
15773
15881
|
|
|
15774
15882
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15775
|
-
import { css as
|
|
15776
|
-
import { CodeNode } from "@lexical/code";
|
|
15883
|
+
import { css as css76 } from "@emotion/react";
|
|
15777
15884
|
import { ListItemNode, ListNode as ListNode2 } from "@lexical/list";
|
|
15778
15885
|
import {
|
|
15779
15886
|
CODE,
|
|
@@ -15785,7 +15892,7 @@ import {
|
|
|
15785
15892
|
UNORDERED_LIST
|
|
15786
15893
|
} from "@lexical/markdown";
|
|
15787
15894
|
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
|
15788
|
-
import { useLexicalComposerContext as
|
|
15895
|
+
import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
|
|
15789
15896
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
15790
15897
|
import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
|
|
15791
15898
|
import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
|
|
@@ -15882,97 +15989,134 @@ var getLabelForElement = (type) => {
|
|
|
15882
15989
|
|
|
15883
15990
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15884
15991
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
15992
|
+
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
15993
|
+
import { useEffect as useEffect13, useRef as useRef7 } from "react";
|
|
15994
|
+
|
|
15995
|
+
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
15996
|
+
import { CodeNode } from "@lexical/code";
|
|
15997
|
+
var CustomCodeNode = CodeNode;
|
|
15998
|
+
var oldImportDOMMap = CodeNode.importDOM();
|
|
15999
|
+
var oldImportDOMMapPre = oldImportDOMMap.pre;
|
|
16000
|
+
oldImportDOMMap.pre = (node) => {
|
|
16001
|
+
if (node.childNodes.length === 1 && Array.from(node.childNodes).some((node2) => node2.nodeName === "CODE")) {
|
|
16002
|
+
return null;
|
|
16003
|
+
}
|
|
16004
|
+
return oldImportDOMMapPre(node);
|
|
16005
|
+
};
|
|
16006
|
+
CustomCodeNode.importDOM = function() {
|
|
16007
|
+
return oldImportDOMMap;
|
|
16008
|
+
};
|
|
16009
|
+
|
|
16010
|
+
// src/components/ParameterInputs/rich-text/DisableStylesPlugin.ts
|
|
16011
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
16012
|
+
import { mergeRegister } from "@lexical/utils";
|
|
15885
16013
|
import { ParagraphNode } from "lexical";
|
|
15886
|
-
import { useEffect as
|
|
16014
|
+
import { useEffect as useEffect9 } from "react";
|
|
16015
|
+
function DisableStylesPlugin() {
|
|
16016
|
+
const [editor] = useLexicalComposerContext();
|
|
16017
|
+
useEffect9(() => {
|
|
16018
|
+
return mergeRegister(
|
|
16019
|
+
// Disable text alignment on paragraph nodes
|
|
16020
|
+
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
16021
|
+
if (node.getFormatType() !== "") {
|
|
16022
|
+
node.setFormat("");
|
|
16023
|
+
}
|
|
16024
|
+
})
|
|
16025
|
+
);
|
|
16026
|
+
}, [editor]);
|
|
16027
|
+
return null;
|
|
16028
|
+
}
|
|
15887
16029
|
|
|
15888
16030
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
15889
|
-
import { css as
|
|
15890
|
-
var textBold =
|
|
16031
|
+
import { css as css72 } from "@emotion/css";
|
|
16032
|
+
var textBold = css72`
|
|
15891
16033
|
font-weight: 700;
|
|
15892
16034
|
`;
|
|
15893
|
-
var textItalic =
|
|
16035
|
+
var textItalic = css72`
|
|
15894
16036
|
font-style: italic;
|
|
15895
16037
|
`;
|
|
15896
|
-
var textUnderline =
|
|
16038
|
+
var textUnderline = css72`
|
|
15897
16039
|
text-decoration: underline;
|
|
15898
16040
|
`;
|
|
15899
|
-
var textStrikethrough =
|
|
16041
|
+
var textStrikethrough = css72`
|
|
15900
16042
|
text-decoration: line-through;
|
|
15901
16043
|
`;
|
|
15902
|
-
var textUnderlineStrikethrough =
|
|
16044
|
+
var textUnderlineStrikethrough = css72`
|
|
15903
16045
|
text-decoration: underline line-through;
|
|
15904
16046
|
`;
|
|
15905
|
-
var textCode =
|
|
16047
|
+
var textCode = css72`
|
|
15906
16048
|
background-color: var(--gray-100);
|
|
15907
16049
|
border-radius: var(--rounded-sm);
|
|
15908
16050
|
display: inline-block;
|
|
15909
16051
|
font-family: var(--ff-mono);
|
|
16052
|
+
font-feature-settings: 'liga' 0;
|
|
16053
|
+
font-variant-ligatures: none;
|
|
15910
16054
|
font-size: var(--fs-sm);
|
|
15911
16055
|
padding-left: var(--spacing-xs);
|
|
15912
16056
|
padding-right: var(--spacing-xs);
|
|
15913
16057
|
`;
|
|
15914
|
-
var textSuperscript =
|
|
16058
|
+
var textSuperscript = css72`
|
|
15915
16059
|
vertical-align: super;
|
|
15916
16060
|
font-size: smaller;
|
|
15917
16061
|
`;
|
|
15918
|
-
var textSubscript =
|
|
16062
|
+
var textSubscript = css72`
|
|
15919
16063
|
vertical-align: sub;
|
|
15920
16064
|
font-size: smaller;
|
|
15921
16065
|
`;
|
|
15922
|
-
var linkElement =
|
|
16066
|
+
var linkElement = css72`
|
|
15923
16067
|
${link}
|
|
15924
16068
|
${linkColorDefault}
|
|
15925
16069
|
text-decoration: underline;
|
|
15926
16070
|
`;
|
|
15927
|
-
var h12 =
|
|
16071
|
+
var h12 = css72`
|
|
15928
16072
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
15929
16073
|
`;
|
|
15930
|
-
var h22 =
|
|
16074
|
+
var h22 = css72`
|
|
15931
16075
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
15932
16076
|
`;
|
|
15933
|
-
var h32 =
|
|
16077
|
+
var h32 = css72`
|
|
15934
16078
|
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
15935
16079
|
`;
|
|
15936
|
-
var h42 =
|
|
16080
|
+
var h42 = css72`
|
|
15937
16081
|
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
15938
16082
|
`;
|
|
15939
|
-
var h52 =
|
|
16083
|
+
var h52 = css72`
|
|
15940
16084
|
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
15941
16085
|
`;
|
|
15942
|
-
var h62 =
|
|
16086
|
+
var h62 = css72`
|
|
15943
16087
|
font-size: var(--fs-base);
|
|
15944
16088
|
`;
|
|
15945
|
-
var heading1Element =
|
|
16089
|
+
var heading1Element = css72`
|
|
15946
16090
|
${h12}
|
|
15947
16091
|
${commonHeadingAttr(true)}
|
|
15948
16092
|
${commonLineHeight}
|
|
15949
16093
|
`;
|
|
15950
|
-
var heading2Element =
|
|
16094
|
+
var heading2Element = css72`
|
|
15951
16095
|
${h22}
|
|
15952
16096
|
${commonHeadingAttr(true)}
|
|
15953
16097
|
${commonLineHeight}
|
|
15954
16098
|
`;
|
|
15955
|
-
var heading3Element =
|
|
16099
|
+
var heading3Element = css72`
|
|
15956
16100
|
${h32}
|
|
15957
16101
|
${commonHeadingAttr(true)}
|
|
15958
16102
|
${commonLineHeight}
|
|
15959
16103
|
`;
|
|
15960
|
-
var heading4Element =
|
|
16104
|
+
var heading4Element = css72`
|
|
15961
16105
|
${h42}
|
|
15962
16106
|
${commonHeadingAttr(true)}
|
|
15963
16107
|
${commonLineHeight}
|
|
15964
16108
|
`;
|
|
15965
|
-
var heading5Element =
|
|
16109
|
+
var heading5Element = css72`
|
|
15966
16110
|
${h52}
|
|
15967
16111
|
${commonHeadingAttr(true)}
|
|
15968
16112
|
${commonLineHeight}
|
|
15969
16113
|
`;
|
|
15970
|
-
var heading6Element =
|
|
16114
|
+
var heading6Element = css72`
|
|
15971
16115
|
${h62}
|
|
15972
16116
|
${commonHeadingAttr(true)}
|
|
15973
16117
|
${commonLineHeight}
|
|
15974
16118
|
`;
|
|
15975
|
-
var paragraphElement =
|
|
16119
|
+
var paragraphElement = css72`
|
|
15976
16120
|
line-height: 1.5;
|
|
15977
16121
|
margin-bottom: var(--spacing-base);
|
|
15978
16122
|
|
|
@@ -15980,7 +16124,7 @@ var paragraphElement = css71`
|
|
|
15980
16124
|
margin-bottom: 0;
|
|
15981
16125
|
}
|
|
15982
16126
|
`;
|
|
15983
|
-
var orderedListElement =
|
|
16127
|
+
var orderedListElement = css72`
|
|
15984
16128
|
${commonLineHeight}
|
|
15985
16129
|
display: block;
|
|
15986
16130
|
list-style: decimal;
|
|
@@ -16009,7 +16153,7 @@ var orderedListElement = css71`
|
|
|
16009
16153
|
}
|
|
16010
16154
|
}
|
|
16011
16155
|
`;
|
|
16012
|
-
var unorderedListElement =
|
|
16156
|
+
var unorderedListElement = css72`
|
|
16013
16157
|
${commonLineHeight}
|
|
16014
16158
|
display: block;
|
|
16015
16159
|
list-style: disc;
|
|
@@ -16030,13 +16174,13 @@ var unorderedListElement = css71`
|
|
|
16030
16174
|
}
|
|
16031
16175
|
}
|
|
16032
16176
|
`;
|
|
16033
|
-
var listItemElement =
|
|
16177
|
+
var listItemElement = css72`
|
|
16034
16178
|
margin-left: var(--spacing-md);
|
|
16035
16179
|
`;
|
|
16036
|
-
var nestedListItemElement =
|
|
16180
|
+
var nestedListItemElement = css72`
|
|
16037
16181
|
list-style-type: none;
|
|
16038
16182
|
`;
|
|
16039
|
-
var blockquoteElement =
|
|
16183
|
+
var blockquoteElement = css72`
|
|
16040
16184
|
border-left: 0.25rem solid var(--gray-300);
|
|
16041
16185
|
color: var(--gray-600);
|
|
16042
16186
|
margin-bottom: var(--spacing-base);
|
|
@@ -16046,11 +16190,13 @@ var blockquoteElement = css71`
|
|
|
16046
16190
|
margin-bottom: 0;
|
|
16047
16191
|
}
|
|
16048
16192
|
`;
|
|
16049
|
-
var codeElement =
|
|
16193
|
+
var codeElement = css72`
|
|
16050
16194
|
background-color: var(--gray-100);
|
|
16051
16195
|
border-radius: var(--rounded-sm);
|
|
16052
16196
|
display: block;
|
|
16053
16197
|
font-family: var(--ff-mono);
|
|
16198
|
+
font-feature-settings: 'liga' 0;
|
|
16199
|
+
font-variant-ligatures: none;
|
|
16054
16200
|
font-size: var(--fs-sm);
|
|
16055
16201
|
margin-bottom: var(--spacing-base);
|
|
16056
16202
|
padding: var(--spacing-sm);
|
|
@@ -16061,10 +16207,10 @@ var codeElement = css71`
|
|
|
16061
16207
|
`;
|
|
16062
16208
|
|
|
16063
16209
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
16064
|
-
import { css as
|
|
16065
|
-
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
16210
|
+
import { css as css74 } from "@emotion/react";
|
|
16211
|
+
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
16066
16212
|
import { NodeEventPlugin } from "@lexical/react/LexicalNodeEventPlugin";
|
|
16067
|
-
import { addClassNamesToElement, isHTMLAnchorElement, mergeRegister } from "@lexical/utils";
|
|
16213
|
+
import { addClassNamesToElement, isHTMLAnchorElement, mergeRegister as mergeRegister2 } from "@lexical/utils";
|
|
16068
16214
|
import { deepEqual } from "fast-equals";
|
|
16069
16215
|
import {
|
|
16070
16216
|
$applyNodeReplacement,
|
|
@@ -16077,16 +16223,16 @@ import {
|
|
|
16077
16223
|
ElementNode as ElementNode2,
|
|
16078
16224
|
FOCUS_COMMAND
|
|
16079
16225
|
} from "lexical";
|
|
16080
|
-
import { useCallback as useCallback4, useEffect as
|
|
16226
|
+
import { useCallback as useCallback4, useEffect as useEffect10, useRef as useRef6, useState as useState10 } from "react";
|
|
16081
16227
|
|
|
16082
16228
|
// src/components/Popover/Popover.styles.ts
|
|
16083
|
-
import { css as
|
|
16084
|
-
var PopoverBtn =
|
|
16229
|
+
import { css as css73 } from "@emotion/react";
|
|
16230
|
+
var PopoverBtn = css73`
|
|
16085
16231
|
border: none;
|
|
16086
16232
|
background: none;
|
|
16087
16233
|
padding: 0;
|
|
16088
16234
|
`;
|
|
16089
|
-
var Popover =
|
|
16235
|
+
var Popover = css73`
|
|
16090
16236
|
border-left: var(--spacing-xs) solid var(--brand-secondary-3);
|
|
16091
16237
|
border-radius: var(--rounded-base);
|
|
16092
16238
|
box-shadow: var(--shadow-base);
|
|
@@ -16134,7 +16280,7 @@ var getSelectedNode = (selection) => {
|
|
|
16134
16280
|
};
|
|
16135
16281
|
|
|
16136
16282
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
16137
|
-
import { Fragment as Fragment13, jsx as
|
|
16283
|
+
import { Fragment as Fragment13, jsx as jsx91, jsxs as jsxs60 } from "@emotion/react/jsx-runtime";
|
|
16138
16284
|
var isProjectMapLinkValue = (value) => {
|
|
16139
16285
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
16140
16286
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -16221,7 +16367,7 @@ function convertAnchorElement(domNode) {
|
|
|
16221
16367
|
}
|
|
16222
16368
|
return { node };
|
|
16223
16369
|
}
|
|
16224
|
-
var LinkNode = class extends ElementNode2 {
|
|
16370
|
+
var LinkNode = class _LinkNode extends ElementNode2 {
|
|
16225
16371
|
constructor(props, key) {
|
|
16226
16372
|
super(key);
|
|
16227
16373
|
this.__link = props;
|
|
@@ -16237,7 +16383,7 @@ var LinkNode = class extends ElementNode2 {
|
|
|
16237
16383
|
writable.__link = link2;
|
|
16238
16384
|
}
|
|
16239
16385
|
static clone(node) {
|
|
16240
|
-
return new
|
|
16386
|
+
return new _LinkNode(node.__link, node.__key);
|
|
16241
16387
|
}
|
|
16242
16388
|
static importJSON(serializedNode) {
|
|
16243
16389
|
const node = $createLinkNode(serializedNode.link);
|
|
@@ -16421,36 +16567,36 @@ var OPEN_LINK_NODE_MODAL_COMMAND = createCommand(
|
|
|
16421
16567
|
);
|
|
16422
16568
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
16423
16569
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
16424
|
-
var linkPopover =
|
|
16570
|
+
var linkPopover = css74`
|
|
16425
16571
|
position: absolute;
|
|
16426
16572
|
z-index: 5;
|
|
16427
16573
|
`;
|
|
16428
|
-
var linkPopoverContainer =
|
|
16574
|
+
var linkPopoverContainer = css74`
|
|
16429
16575
|
${Popover};
|
|
16430
16576
|
align-items: center;
|
|
16431
16577
|
display: flex;
|
|
16432
16578
|
`;
|
|
16433
|
-
var linkPopoverAnchor =
|
|
16579
|
+
var linkPopoverAnchor = css74`
|
|
16434
16580
|
${link}
|
|
16435
16581
|
${linkColorDefault}
|
|
16436
16582
|
`;
|
|
16437
16583
|
function LinkNodePlugin({ onConnectLink }) {
|
|
16438
|
-
const [editor] =
|
|
16439
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
16440
|
-
const linkPopoverElRef =
|
|
16441
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
16442
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
16443
|
-
|
|
16584
|
+
const [editor] = useLexicalComposerContext2();
|
|
16585
|
+
const [linkPopoverState, setLinkPopoverState] = useState10();
|
|
16586
|
+
const linkPopoverElRef = useRef6(null);
|
|
16587
|
+
const [isEditorFocused, setIsEditorFocused] = useState10(false);
|
|
16588
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState10(false);
|
|
16589
|
+
useEffect10(() => {
|
|
16444
16590
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
16445
16591
|
setLinkPopoverState(void 0);
|
|
16446
16592
|
return;
|
|
16447
16593
|
}
|
|
16448
16594
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
16449
|
-
|
|
16595
|
+
useEffect10(() => {
|
|
16450
16596
|
if (!editor.hasNodes([LinkNode])) {
|
|
16451
16597
|
throw new Error("LinkNode not registered on editor");
|
|
16452
16598
|
}
|
|
16453
|
-
return
|
|
16599
|
+
return mergeRegister2(
|
|
16454
16600
|
editor.registerCommand(
|
|
16455
16601
|
UPSERT_LINK_NODE_COMMAND,
|
|
16456
16602
|
(payload) => {
|
|
@@ -16547,7 +16693,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16547
16693
|
}
|
|
16548
16694
|
});
|
|
16549
16695
|
}, [editor]);
|
|
16550
|
-
|
|
16696
|
+
useEffect10(() => {
|
|
16551
16697
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16552
16698
|
requestAnimationFrame(() => {
|
|
16553
16699
|
editorState.read(() => {
|
|
@@ -16574,8 +16720,8 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16574
16720
|
});
|
|
16575
16721
|
});
|
|
16576
16722
|
};
|
|
16577
|
-
return /* @__PURE__ */
|
|
16578
|
-
/* @__PURE__ */
|
|
16723
|
+
return /* @__PURE__ */ jsxs60(Fragment13, { children: [
|
|
16724
|
+
/* @__PURE__ */ jsx91(
|
|
16579
16725
|
NodeEventPlugin,
|
|
16580
16726
|
{
|
|
16581
16727
|
nodeType: LinkNode,
|
|
@@ -16585,7 +16731,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16585
16731
|
}
|
|
16586
16732
|
}
|
|
16587
16733
|
),
|
|
16588
|
-
linkPopoverState ? /* @__PURE__ */
|
|
16734
|
+
linkPopoverState ? /* @__PURE__ */ jsx91(
|
|
16589
16735
|
"div",
|
|
16590
16736
|
{
|
|
16591
16737
|
css: linkPopover,
|
|
@@ -16594,8 +16740,8 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16594
16740
|
top: linkPopoverState.position.y
|
|
16595
16741
|
},
|
|
16596
16742
|
ref: linkPopoverElRef,
|
|
16597
|
-
children: /* @__PURE__ */
|
|
16598
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */
|
|
16743
|
+
children: /* @__PURE__ */ jsxs60("div", { css: linkPopoverContainer, children: [
|
|
16744
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ jsx91(
|
|
16599
16745
|
"a",
|
|
16600
16746
|
{
|
|
16601
16747
|
href: `${linkPopoverState.node.__link.type === "email" ? "mailto:" : linkPopoverState.node.__link.type === "tel" ? "tel:" : ""}${linkPopoverState.node.__link.path}`,
|
|
@@ -16605,7 +16751,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16605
16751
|
children: linkPopoverState.node.__link.path
|
|
16606
16752
|
}
|
|
16607
16753
|
),
|
|
16608
|
-
/* @__PURE__ */
|
|
16754
|
+
/* @__PURE__ */ jsx91(
|
|
16609
16755
|
Button,
|
|
16610
16756
|
{
|
|
16611
16757
|
size: "xs",
|
|
@@ -16613,7 +16759,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16613
16759
|
onEditLinkNode(linkPopoverState.node);
|
|
16614
16760
|
},
|
|
16615
16761
|
buttonType: "ghost",
|
|
16616
|
-
children: /* @__PURE__ */
|
|
16762
|
+
children: /* @__PURE__ */ jsx91(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
16617
16763
|
}
|
|
16618
16764
|
)
|
|
16619
16765
|
] })
|
|
@@ -16629,7 +16775,7 @@ function getLinkAncestor(node) {
|
|
|
16629
16775
|
|
|
16630
16776
|
// src/components/ParameterInputs/rich-text/ListIndentPlugin.tsx
|
|
16631
16777
|
import { $getListDepth, $isListItemNode, $isListNode } from "@lexical/list";
|
|
16632
|
-
import { useLexicalComposerContext as
|
|
16778
|
+
import { useLexicalComposerContext as useLexicalComposerContext3 } from "@lexical/react/LexicalComposerContext";
|
|
16633
16779
|
import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
16634
16780
|
import {
|
|
16635
16781
|
$getSelection as $getSelection2,
|
|
@@ -16637,8 +16783,8 @@ import {
|
|
|
16637
16783
|
COMMAND_PRIORITY_CRITICAL,
|
|
16638
16784
|
INDENT_CONTENT_COMMAND
|
|
16639
16785
|
} from "lexical";
|
|
16640
|
-
import { useEffect as
|
|
16641
|
-
import { jsx as
|
|
16786
|
+
import { useEffect as useEffect11 } from "react";
|
|
16787
|
+
import { jsx as jsx92 } from "@emotion/react/jsx-runtime";
|
|
16642
16788
|
function isIndentPermitted(maxDepth) {
|
|
16643
16789
|
const selection = $getSelection2();
|
|
16644
16790
|
if (!$isRangeSelection2(selection)) {
|
|
@@ -16660,19 +16806,19 @@ function isIndentPermitted(maxDepth) {
|
|
|
16660
16806
|
return totalDepth <= maxDepth;
|
|
16661
16807
|
}
|
|
16662
16808
|
function ListIndentPlugin({ maxDepth }) {
|
|
16663
|
-
const [editor] =
|
|
16664
|
-
|
|
16809
|
+
const [editor] = useLexicalComposerContext3();
|
|
16810
|
+
useEffect11(() => {
|
|
16665
16811
|
return editor.registerCommand(
|
|
16666
16812
|
INDENT_CONTENT_COMMAND,
|
|
16667
16813
|
() => !isIndentPermitted(maxDepth),
|
|
16668
16814
|
COMMAND_PRIORITY_CRITICAL
|
|
16669
16815
|
);
|
|
16670
16816
|
}, [editor, maxDepth]);
|
|
16671
|
-
return /* @__PURE__ */
|
|
16817
|
+
return /* @__PURE__ */ jsx92(TabIndentationPlugin, {});
|
|
16672
16818
|
}
|
|
16673
16819
|
|
|
16674
16820
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
16675
|
-
import { css as
|
|
16821
|
+
import { css as css75 } from "@emotion/react";
|
|
16676
16822
|
import { $createCodeNode } from "@lexical/code";
|
|
16677
16823
|
import {
|
|
16678
16824
|
$isListNode as $isListNode2,
|
|
@@ -16681,7 +16827,7 @@ import {
|
|
|
16681
16827
|
ListNode,
|
|
16682
16828
|
REMOVE_LIST_COMMAND
|
|
16683
16829
|
} from "@lexical/list";
|
|
16684
|
-
import { useLexicalComposerContext as
|
|
16830
|
+
import { useLexicalComposerContext as useLexicalComposerContext4 } from "@lexical/react/LexicalComposerContext";
|
|
16685
16831
|
import { $createHeadingNode, $createQuoteNode, $isHeadingNode } from "@lexical/rich-text";
|
|
16686
16832
|
import { $setBlocksType } from "@lexical/selection";
|
|
16687
16833
|
import { $findMatchingParent, $getNearestNodeOfType } from "@lexical/utils";
|
|
@@ -16694,9 +16840,9 @@ import {
|
|
|
16694
16840
|
FORMAT_TEXT_COMMAND,
|
|
16695
16841
|
SELECTION_CHANGE_COMMAND
|
|
16696
16842
|
} from "lexical";
|
|
16697
|
-
import { useCallback as useCallback5, useEffect as
|
|
16698
|
-
import { Fragment as Fragment14, jsx as
|
|
16699
|
-
var toolbar =
|
|
16843
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useMemo as useMemo2, useState as useState11 } from "react";
|
|
16844
|
+
import { Fragment as Fragment14, jsx as jsx93, jsxs as jsxs61 } from "@emotion/react/jsx-runtime";
|
|
16845
|
+
var toolbar = css75`
|
|
16700
16846
|
background: var(--gray-50);
|
|
16701
16847
|
border-radius: var(--rounded-base);
|
|
16702
16848
|
display: flex;
|
|
@@ -16708,7 +16854,7 @@ var toolbar = css74`
|
|
|
16708
16854
|
top: 0;
|
|
16709
16855
|
z-index: 10;
|
|
16710
16856
|
`;
|
|
16711
|
-
var toolbarGroup =
|
|
16857
|
+
var toolbarGroup = css75`
|
|
16712
16858
|
display: flex;
|
|
16713
16859
|
gap: var(--spacing-xs);
|
|
16714
16860
|
position: relative;
|
|
@@ -16724,7 +16870,7 @@ var toolbarGroup = css74`
|
|
|
16724
16870
|
width: 1px;
|
|
16725
16871
|
}
|
|
16726
16872
|
`;
|
|
16727
|
-
var toolbarButton =
|
|
16873
|
+
var toolbarButton = css75`
|
|
16728
16874
|
align-items: center;
|
|
16729
16875
|
appearance: none;
|
|
16730
16876
|
border: 0;
|
|
@@ -16737,17 +16883,17 @@ var toolbarButton = css74`
|
|
|
16737
16883
|
min-width: 32px;
|
|
16738
16884
|
padding: 0 var(--spacing-sm);
|
|
16739
16885
|
`;
|
|
16740
|
-
var toolbarButtonActive =
|
|
16886
|
+
var toolbarButtonActive = css75`
|
|
16741
16887
|
background: var(--gray-200);
|
|
16742
16888
|
`;
|
|
16743
|
-
var toolbarIcon =
|
|
16889
|
+
var toolbarIcon = css75`
|
|
16744
16890
|
color: inherit;
|
|
16745
16891
|
`;
|
|
16746
|
-
var toolbarChevron =
|
|
16892
|
+
var toolbarChevron = css75`
|
|
16747
16893
|
margin-left: var(--spacing-xs);
|
|
16748
16894
|
`;
|
|
16749
16895
|
var ToolbarIcon = ({ icon }) => {
|
|
16750
|
-
return /* @__PURE__ */
|
|
16896
|
+
return /* @__PURE__ */ jsx93(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
16751
16897
|
};
|
|
16752
16898
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
16753
16899
|
["bold", "format-bold"],
|
|
@@ -16761,7 +16907,7 @@ var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
|
16761
16907
|
var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
16762
16908
|
var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
16763
16909
|
var RichTextToolbar = ({ config }) => {
|
|
16764
|
-
const [editor] =
|
|
16910
|
+
const [editor] = useLexicalComposerContext4();
|
|
16765
16911
|
const {
|
|
16766
16912
|
activeElement,
|
|
16767
16913
|
setActiveElement,
|
|
@@ -16837,7 +16983,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16837
16983
|
setIsLink(false);
|
|
16838
16984
|
}
|
|
16839
16985
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
16840
|
-
|
|
16986
|
+
useEffect12(() => {
|
|
16841
16987
|
return editor.registerCommand(
|
|
16842
16988
|
SELECTION_CHANGE_COMMAND,
|
|
16843
16989
|
(_payload) => {
|
|
@@ -16847,7 +16993,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16847
16993
|
COMMAND_PRIORITY_CRITICAL2
|
|
16848
16994
|
);
|
|
16849
16995
|
}, [editor, updateToolbar]);
|
|
16850
|
-
|
|
16996
|
+
useEffect12(() => {
|
|
16851
16997
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16852
16998
|
requestAnimationFrame(() => {
|
|
16853
16999
|
editorState.read(() => {
|
|
@@ -16856,15 +17002,15 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16856
17002
|
});
|
|
16857
17003
|
});
|
|
16858
17004
|
}, [editor, updateToolbar]);
|
|
16859
|
-
return /* @__PURE__ */
|
|
16860
|
-
/* @__PURE__ */
|
|
17005
|
+
return /* @__PURE__ */ jsxs61("div", { css: toolbar, children: [
|
|
17006
|
+
/* @__PURE__ */ jsxs61(
|
|
16861
17007
|
Menu,
|
|
16862
17008
|
{
|
|
16863
17009
|
menuLabel: "Elements",
|
|
16864
|
-
menuTrigger: /* @__PURE__ */
|
|
17010
|
+
menuTrigger: /* @__PURE__ */ jsxs61("button", { css: toolbarButton, title: "Text styles", children: [
|
|
16865
17011
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
16866
17012
|
" ",
|
|
16867
|
-
/* @__PURE__ */
|
|
17013
|
+
/* @__PURE__ */ jsx93(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16868
17014
|
] }),
|
|
16869
17015
|
placement: "bottom-start",
|
|
16870
17016
|
children: [
|
|
@@ -16874,7 +17020,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16874
17020
|
type: "paragraph"
|
|
16875
17021
|
},
|
|
16876
17022
|
...visibleTextualElements
|
|
16877
|
-
].map((element) => /* @__PURE__ */
|
|
17023
|
+
].map((element) => /* @__PURE__ */ jsx93(
|
|
16878
17024
|
MenuItem,
|
|
16879
17025
|
{
|
|
16880
17026
|
onClick: () => {
|
|
@@ -16884,28 +17030,28 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16884
17030
|
},
|
|
16885
17031
|
element.type
|
|
16886
17032
|
)),
|
|
16887
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */
|
|
17033
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ jsx93(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
16888
17034
|
]
|
|
16889
17035
|
}
|
|
16890
17036
|
),
|
|
16891
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
16892
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */
|
|
17037
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsxs61("div", { css: toolbarGroup, children: [
|
|
17038
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ jsx93(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ jsx93(
|
|
16893
17039
|
"button",
|
|
16894
17040
|
{
|
|
16895
17041
|
onClick: () => {
|
|
16896
17042
|
editor.dispatchCommand(FORMAT_TEXT_COMMAND, format.type);
|
|
16897
17043
|
},
|
|
16898
17044
|
css: [toolbarButton, activeFormats.includes(format.type) ? toolbarButtonActive : null],
|
|
16899
|
-
children: /* @__PURE__ */
|
|
17045
|
+
children: /* @__PURE__ */ jsx93(ToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
16900
17046
|
}
|
|
16901
17047
|
) }, format.type)),
|
|
16902
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
17048
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsx93(
|
|
16903
17049
|
Menu,
|
|
16904
17050
|
{
|
|
16905
17051
|
menuLabel: "Alternative text styles",
|
|
16906
|
-
menuTrigger: /* @__PURE__ */
|
|
17052
|
+
menuTrigger: /* @__PURE__ */ jsx93("button", { css: toolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ jsx93(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
16907
17053
|
placement: "bottom-start",
|
|
16908
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */
|
|
17054
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ jsx93(
|
|
16909
17055
|
MenuItem,
|
|
16910
17056
|
{
|
|
16911
17057
|
onClick: () => {
|
|
@@ -16918,57 +17064,57 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16918
17064
|
}
|
|
16919
17065
|
) : null
|
|
16920
17066
|
] }) : null,
|
|
16921
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */
|
|
16922
|
-
linkElementVisible ? /* @__PURE__ */
|
|
17067
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ jsxs61("div", { css: toolbarGroup, children: [
|
|
17068
|
+
linkElementVisible ? /* @__PURE__ */ jsx93(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ jsx93(
|
|
16923
17069
|
"button",
|
|
16924
17070
|
{
|
|
16925
17071
|
onClick: () => {
|
|
16926
17072
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
16927
17073
|
},
|
|
16928
17074
|
css: [toolbarButton, isLink ? toolbarButtonActive : null],
|
|
16929
|
-
children: /* @__PURE__ */
|
|
17075
|
+
children: /* @__PURE__ */ jsx93(ToolbarIcon, { icon: "link" })
|
|
16930
17076
|
}
|
|
16931
17077
|
) }) : null,
|
|
16932
|
-
visibleLists.size > 0 ? /* @__PURE__ */
|
|
16933
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */
|
|
17078
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs61(Fragment14, { children: [
|
|
17079
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx93(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx93(
|
|
16934
17080
|
"button",
|
|
16935
17081
|
{
|
|
16936
17082
|
onClick: () => {
|
|
16937
17083
|
activeElement === "unorderedList" ? editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0) : editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0);
|
|
16938
17084
|
},
|
|
16939
17085
|
css: [toolbarButton, activeElement === "unorderedList" ? toolbarButtonActive : null],
|
|
16940
|
-
children: /* @__PURE__ */
|
|
17086
|
+
children: /* @__PURE__ */ jsx93(ToolbarIcon, { icon: "layout-list" })
|
|
16941
17087
|
}
|
|
16942
17088
|
) }) : null,
|
|
16943
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */
|
|
17089
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ jsx93(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ jsx93(
|
|
16944
17090
|
"button",
|
|
16945
17091
|
{
|
|
16946
17092
|
onClick: () => {
|
|
16947
17093
|
activeElement === "orderedList" ? editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0) : editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0);
|
|
16948
17094
|
},
|
|
16949
17095
|
css: [toolbarButton, activeElement === "orderedList" ? toolbarButtonActive : null],
|
|
16950
|
-
children: /* @__PURE__ */
|
|
17096
|
+
children: /* @__PURE__ */ jsx93(ToolbarIcon, { icon: "layout-list-numbered" })
|
|
16951
17097
|
}
|
|
16952
17098
|
) }) : null
|
|
16953
17099
|
] }) : null,
|
|
16954
|
-
quoteElementVisible ? /* @__PURE__ */
|
|
17100
|
+
quoteElementVisible ? /* @__PURE__ */ jsx93(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ jsx93(
|
|
16955
17101
|
"button",
|
|
16956
17102
|
{
|
|
16957
17103
|
onClick: () => {
|
|
16958
17104
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
16959
17105
|
},
|
|
16960
17106
|
css: [toolbarButton, activeElement === "quote" ? toolbarButtonActive : null],
|
|
16961
|
-
children: /* @__PURE__ */
|
|
17107
|
+
children: /* @__PURE__ */ jsx93(ToolbarIcon, { icon: "quote" })
|
|
16962
17108
|
}
|
|
16963
17109
|
) }) : null,
|
|
16964
|
-
codeElementVisible ? /* @__PURE__ */
|
|
17110
|
+
codeElementVisible ? /* @__PURE__ */ jsx93(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ jsx93(
|
|
16965
17111
|
"button",
|
|
16966
17112
|
{
|
|
16967
17113
|
onClick: () => {
|
|
16968
17114
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
16969
17115
|
},
|
|
16970
17116
|
css: [toolbarButton, activeElement === "code" ? toolbarButtonActive : null],
|
|
16971
|
-
children: /* @__PURE__ */
|
|
17117
|
+
children: /* @__PURE__ */ jsx93(ToolbarIcon, { icon: "code-slash" })
|
|
16972
17118
|
}
|
|
16973
17119
|
) }) : null
|
|
16974
17120
|
] }) : null
|
|
@@ -16977,26 +17123,26 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16977
17123
|
var RichTextToolbar_default = RichTextToolbar;
|
|
16978
17124
|
var useRichTextToolbarState = ({ config }) => {
|
|
16979
17125
|
var _a;
|
|
16980
|
-
const enabledBuiltInFormats =
|
|
17126
|
+
const enabledBuiltInFormats = useMemo2(() => {
|
|
16981
17127
|
return richTextBuiltInFormats.filter((format) => {
|
|
16982
17128
|
var _a2, _b;
|
|
16983
17129
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
16984
17130
|
});
|
|
16985
17131
|
}, [config]);
|
|
16986
|
-
const enabledBuiltInElements =
|
|
17132
|
+
const enabledBuiltInElements = useMemo2(() => {
|
|
16987
17133
|
return richTextBuiltInElements.filter((element) => {
|
|
16988
17134
|
var _a2, _b;
|
|
16989
17135
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
16990
17136
|
});
|
|
16991
17137
|
}, [config]);
|
|
16992
|
-
const enabledBuiltInFormatsWithIcon =
|
|
17138
|
+
const enabledBuiltInFormatsWithIcon = useMemo2(() => {
|
|
16993
17139
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
16994
17140
|
}, [enabledBuiltInFormats]);
|
|
16995
17141
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
16996
17142
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
16997
17143
|
);
|
|
16998
|
-
const [activeFormats, setActiveFormats] =
|
|
16999
|
-
const visibleFormatsWithIcon =
|
|
17144
|
+
const [activeFormats, setActiveFormats] = useState11([]);
|
|
17145
|
+
const visibleFormatsWithIcon = useMemo2(() => {
|
|
17000
17146
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17001
17147
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
17002
17148
|
visibleFormats.add(type);
|
|
@@ -17006,7 +17152,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17006
17152
|
});
|
|
17007
17153
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17008
17154
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
17009
|
-
const visibleFormatsWithoutIcon =
|
|
17155
|
+
const visibleFormatsWithoutIcon = useMemo2(() => {
|
|
17010
17156
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17011
17157
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
17012
17158
|
visibleFormats.add(type);
|
|
@@ -17016,11 +17162,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17016
17162
|
});
|
|
17017
17163
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17018
17164
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
17019
|
-
const [activeElement, setActiveElement] =
|
|
17165
|
+
const [activeElement, setActiveElement] = useState11("paragraph");
|
|
17020
17166
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
17021
17167
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
17022
17168
|
);
|
|
17023
|
-
const visibleTextualElements =
|
|
17169
|
+
const visibleTextualElements = useMemo2(() => {
|
|
17024
17170
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
17025
17171
|
return enabledTextualElements;
|
|
17026
17172
|
}
|
|
@@ -17031,24 +17177,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17031
17177
|
}
|
|
17032
17178
|
);
|
|
17033
17179
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
17034
|
-
const [isLink, setIsLink] =
|
|
17035
|
-
const linkElementVisible =
|
|
17180
|
+
const [isLink, setIsLink] = useState11(false);
|
|
17181
|
+
const linkElementVisible = useMemo2(() => {
|
|
17036
17182
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
17037
17183
|
}, [isLink, enabledBuiltInElements]);
|
|
17038
|
-
const visibleLists =
|
|
17184
|
+
const visibleLists = useMemo2(() => {
|
|
17039
17185
|
return new Set(
|
|
17040
17186
|
["orderedList", "unorderedList"].filter(
|
|
17041
17187
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
17042
17188
|
)
|
|
17043
17189
|
);
|
|
17044
17190
|
}, [activeElement, enabledBuiltInElements]);
|
|
17045
|
-
const quoteElementVisible =
|
|
17191
|
+
const quoteElementVisible = useMemo2(() => {
|
|
17046
17192
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
17047
17193
|
}, [activeElement, enabledBuiltInElements]);
|
|
17048
|
-
const codeElementVisible =
|
|
17194
|
+
const codeElementVisible = useMemo2(() => {
|
|
17049
17195
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
17050
17196
|
}, [activeElement, enabledBuiltInElements]);
|
|
17051
|
-
const visibleElementsWithIcons =
|
|
17197
|
+
const visibleElementsWithIcons = useMemo2(() => {
|
|
17052
17198
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
17053
17199
|
if (linkElementVisible) {
|
|
17054
17200
|
visibleElements.add("link");
|
|
@@ -17085,7 +17231,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17085
17231
|
};
|
|
17086
17232
|
|
|
17087
17233
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17088
|
-
import { Fragment as Fragment15, jsx as
|
|
17234
|
+
import { Fragment as Fragment15, jsx as jsx94, jsxs as jsxs62 } from "@emotion/react/jsx-runtime";
|
|
17089
17235
|
var ParameterRichText = ({
|
|
17090
17236
|
label,
|
|
17091
17237
|
labelLeadingIcon,
|
|
@@ -17106,7 +17252,7 @@ var ParameterRichText = ({
|
|
|
17106
17252
|
editorInputClassName,
|
|
17107
17253
|
editorFooter
|
|
17108
17254
|
}) => {
|
|
17109
|
-
return /* @__PURE__ */
|
|
17255
|
+
return /* @__PURE__ */ jsxs62(
|
|
17110
17256
|
ParameterShell,
|
|
17111
17257
|
{
|
|
17112
17258
|
"data-test-id": "parameter-input",
|
|
@@ -17120,7 +17266,7 @@ var ParameterRichText = ({
|
|
|
17120
17266
|
captionTestId,
|
|
17121
17267
|
menuItems,
|
|
17122
17268
|
children: [
|
|
17123
|
-
/* @__PURE__ */
|
|
17269
|
+
/* @__PURE__ */ jsx94(
|
|
17124
17270
|
ParameterRichTextInner,
|
|
17125
17271
|
{
|
|
17126
17272
|
value,
|
|
@@ -17134,23 +17280,23 @@ var ParameterRichText = ({
|
|
|
17134
17280
|
editorFooter
|
|
17135
17281
|
}
|
|
17136
17282
|
),
|
|
17137
|
-
menuItems ? /* @__PURE__ */
|
|
17283
|
+
menuItems ? /* @__PURE__ */ jsx94(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx94(Fragment15, { children: menuItems }) }) : null
|
|
17138
17284
|
]
|
|
17139
17285
|
}
|
|
17140
17286
|
);
|
|
17141
17287
|
};
|
|
17142
|
-
var editorWrapper =
|
|
17288
|
+
var editorWrapper = css76`
|
|
17143
17289
|
display: flex;
|
|
17144
17290
|
flex-flow: column;
|
|
17145
17291
|
flex-grow: 1;
|
|
17146
17292
|
`;
|
|
17147
|
-
var editorContainer =
|
|
17293
|
+
var editorContainer = css76`
|
|
17148
17294
|
display: flex;
|
|
17149
17295
|
flex-flow: column;
|
|
17150
17296
|
flex-grow: 1;
|
|
17151
17297
|
position: relative;
|
|
17152
17298
|
`;
|
|
17153
|
-
var editorPlaceholder =
|
|
17299
|
+
var editorPlaceholder = css76`
|
|
17154
17300
|
color: var(--gray-500);
|
|
17155
17301
|
font-style: italic;
|
|
17156
17302
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -17161,7 +17307,7 @@ var editorPlaceholder = css75`
|
|
|
17161
17307
|
top: var(--spacing-xs);
|
|
17162
17308
|
user-select: none;
|
|
17163
17309
|
`;
|
|
17164
|
-
var editorInput =
|
|
17310
|
+
var editorInput = css76`
|
|
17165
17311
|
background: var(--white);
|
|
17166
17312
|
border: 1px solid var(--white);
|
|
17167
17313
|
border-radius: var(--rounded-sm);
|
|
@@ -17197,7 +17343,7 @@ var ParameterRichTextInner = ({
|
|
|
17197
17343
|
console.error(error);
|
|
17198
17344
|
},
|
|
17199
17345
|
editorState: value ? JSON.stringify(value) : void 0,
|
|
17200
|
-
nodes: [ListNode2, ListItemNode, LinkNode, HeadingNode, QuoteNode,
|
|
17346
|
+
nodes: [ListNode2, ListItemNode, LinkNode, HeadingNode, QuoteNode, ParagraphNode2, CustomCodeNode],
|
|
17201
17347
|
theme: {
|
|
17202
17348
|
text: {
|
|
17203
17349
|
bold: textBold,
|
|
@@ -17232,8 +17378,8 @@ var ParameterRichTextInner = ({
|
|
|
17232
17378
|
},
|
|
17233
17379
|
editable: !readOnly
|
|
17234
17380
|
};
|
|
17235
|
-
return /* @__PURE__ */
|
|
17236
|
-
/* @__PURE__ */
|
|
17381
|
+
return /* @__PURE__ */ jsxs62(Fragment15, { children: [
|
|
17382
|
+
/* @__PURE__ */ jsx94("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx94(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx94(
|
|
17237
17383
|
RichText,
|
|
17238
17384
|
{
|
|
17239
17385
|
onChange,
|
|
@@ -17264,14 +17410,14 @@ var RichText = ({
|
|
|
17264
17410
|
readOnly,
|
|
17265
17411
|
editorInputClassName
|
|
17266
17412
|
}) => {
|
|
17267
|
-
const editorContainerRef =
|
|
17268
|
-
const [editor] =
|
|
17269
|
-
|
|
17413
|
+
const editorContainerRef = useRef7(null);
|
|
17414
|
+
const [editor] = useLexicalComposerContext5();
|
|
17415
|
+
useEffect13(() => {
|
|
17270
17416
|
if (onRichTextInit) {
|
|
17271
17417
|
onRichTextInit(editor);
|
|
17272
17418
|
}
|
|
17273
17419
|
}, [editor, onRichTextInit]);
|
|
17274
|
-
|
|
17420
|
+
useEffect13(() => {
|
|
17275
17421
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
17276
17422
|
requestAnimationFrame(() => {
|
|
17277
17423
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -17283,39 +17429,40 @@ var RichText = ({
|
|
|
17283
17429
|
removeUpdateListener();
|
|
17284
17430
|
};
|
|
17285
17431
|
}, []);
|
|
17286
|
-
return /* @__PURE__ */
|
|
17287
|
-
readOnly ? null : /* @__PURE__ */
|
|
17288
|
-
/* @__PURE__ */
|
|
17289
|
-
/* @__PURE__ */
|
|
17432
|
+
return /* @__PURE__ */ jsxs62(Fragment15, { children: [
|
|
17433
|
+
readOnly ? null : /* @__PURE__ */ jsx94(RichTextToolbar_default, { config }),
|
|
17434
|
+
/* @__PURE__ */ jsxs62("div", { css: editorContainer, ref: editorContainerRef, children: [
|
|
17435
|
+
/* @__PURE__ */ jsx94(
|
|
17290
17436
|
RichTextPlugin,
|
|
17291
17437
|
{
|
|
17292
|
-
contentEditable: /* @__PURE__ */
|
|
17293
|
-
placeholder: /* @__PURE__ */
|
|
17438
|
+
contentEditable: /* @__PURE__ */ jsx94(ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
17439
|
+
placeholder: /* @__PURE__ */ jsx94("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
17294
17440
|
ErrorBoundary: LexicalErrorBoundary
|
|
17295
17441
|
}
|
|
17296
17442
|
),
|
|
17297
|
-
/* @__PURE__ */
|
|
17298
|
-
readOnly ? null : /* @__PURE__ */
|
|
17299
|
-
/* @__PURE__ */
|
|
17300
|
-
/* @__PURE__ */
|
|
17301
|
-
/* @__PURE__ */
|
|
17443
|
+
/* @__PURE__ */ jsx94(ListPlugin, {}),
|
|
17444
|
+
readOnly ? null : /* @__PURE__ */ jsx94(HistoryPlugin, {}),
|
|
17445
|
+
/* @__PURE__ */ jsx94(LinkNodePlugin, { onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve() }),
|
|
17446
|
+
/* @__PURE__ */ jsx94(ListIndentPlugin, { maxDepth: 4 }),
|
|
17447
|
+
/* @__PURE__ */ jsx94(DisableStylesPlugin, {}),
|
|
17448
|
+
/* @__PURE__ */ jsx94(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
|
|
17302
17449
|
] })
|
|
17303
17450
|
] });
|
|
17304
17451
|
};
|
|
17305
17452
|
|
|
17306
17453
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
17307
17454
|
import { forwardRef as forwardRef13 } from "react";
|
|
17308
|
-
import { jsx as
|
|
17455
|
+
import { jsx as jsx95, jsxs as jsxs63 } from "@emotion/react/jsx-runtime";
|
|
17309
17456
|
var ParameterSelect = forwardRef13(
|
|
17310
17457
|
({ defaultOption, options, ...props }, ref) => {
|
|
17311
17458
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17312
|
-
return /* @__PURE__ */
|
|
17459
|
+
return /* @__PURE__ */ jsx95(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx95(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
17313
17460
|
}
|
|
17314
17461
|
);
|
|
17315
17462
|
var ParameterSelectInner = forwardRef13(
|
|
17316
17463
|
({ defaultOption, options, ...props }, ref) => {
|
|
17317
17464
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17318
|
-
return /* @__PURE__ */
|
|
17465
|
+
return /* @__PURE__ */ jsxs63(
|
|
17319
17466
|
"select",
|
|
17320
17467
|
{
|
|
17321
17468
|
css: [input2, selectInput],
|
|
@@ -17324,10 +17471,10 @@ var ParameterSelectInner = forwardRef13(
|
|
|
17324
17471
|
ref,
|
|
17325
17472
|
...props,
|
|
17326
17473
|
children: [
|
|
17327
|
-
defaultOption ? /* @__PURE__ */
|
|
17474
|
+
defaultOption ? /* @__PURE__ */ jsx95("option", { value: "", children: defaultOption }) : null,
|
|
17328
17475
|
options.map((option) => {
|
|
17329
17476
|
var _a;
|
|
17330
|
-
return /* @__PURE__ */
|
|
17477
|
+
return /* @__PURE__ */ jsx95("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
17331
17478
|
})
|
|
17332
17479
|
]
|
|
17333
17480
|
}
|
|
@@ -17337,14 +17484,14 @@ var ParameterSelectInner = forwardRef13(
|
|
|
17337
17484
|
|
|
17338
17485
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
17339
17486
|
import { forwardRef as forwardRef14 } from "react";
|
|
17340
|
-
import { jsx as
|
|
17487
|
+
import { jsx as jsx96 } from "@emotion/react/jsx-runtime";
|
|
17341
17488
|
var ParameterTextarea = forwardRef14((props, ref) => {
|
|
17342
17489
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17343
|
-
return /* @__PURE__ */
|
|
17490
|
+
return /* @__PURE__ */ jsx96(ParameterShell, { "data-test-id": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx96(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
17344
17491
|
});
|
|
17345
17492
|
var ParameterTextareaInner = forwardRef14(({ ...props }, ref) => {
|
|
17346
17493
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17347
|
-
return /* @__PURE__ */
|
|
17494
|
+
return /* @__PURE__ */ jsx96(
|
|
17348
17495
|
"textarea",
|
|
17349
17496
|
{
|
|
17350
17497
|
css: [input2, textarea2],
|
|
@@ -17358,17 +17505,17 @@ var ParameterTextareaInner = forwardRef14(({ ...props }, ref) => {
|
|
|
17358
17505
|
|
|
17359
17506
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
17360
17507
|
import { forwardRef as forwardRef15 } from "react";
|
|
17361
|
-
import { jsx as
|
|
17508
|
+
import { jsx as jsx97, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
17362
17509
|
var ParameterToggle = forwardRef15((props, ref) => {
|
|
17363
17510
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17364
|
-
return /* @__PURE__ */
|
|
17511
|
+
return /* @__PURE__ */ jsx97(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx97(ParameterToggleInner, { ref, ...innerProps }) });
|
|
17365
17512
|
});
|
|
17366
17513
|
var ParameterToggleInner = forwardRef15(
|
|
17367
17514
|
({ ...props }, ref) => {
|
|
17368
17515
|
const { id, label } = useParameterShell();
|
|
17369
|
-
return /* @__PURE__ */
|
|
17370
|
-
/* @__PURE__ */
|
|
17371
|
-
/* @__PURE__ */
|
|
17516
|
+
return /* @__PURE__ */ jsxs64("label", { css: inputToggleLabel2, children: [
|
|
17517
|
+
/* @__PURE__ */ jsx97("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
17518
|
+
/* @__PURE__ */ jsx97("span", { css: inlineLabel2, children: label })
|
|
17372
17519
|
] });
|
|
17373
17520
|
}
|
|
17374
17521
|
);
|
|
@@ -17380,7 +17527,7 @@ import {
|
|
|
17380
17527
|
usePopoverState
|
|
17381
17528
|
} from "reakit/Popover";
|
|
17382
17529
|
import { Portal as Portal2 } from "reakit/Portal";
|
|
17383
|
-
import { Fragment as Fragment16, jsx as
|
|
17530
|
+
import { Fragment as Fragment16, jsx as jsx98, jsxs as jsxs65 } from "@emotion/react/jsx-runtime";
|
|
17384
17531
|
var Popover2 = ({
|
|
17385
17532
|
iconColor = "action",
|
|
17386
17533
|
icon = "info",
|
|
@@ -17392,38 +17539,38 @@ var Popover2 = ({
|
|
|
17392
17539
|
children
|
|
17393
17540
|
}) => {
|
|
17394
17541
|
const popover = usePopoverState({ placement });
|
|
17395
|
-
return /* @__PURE__ */
|
|
17396
|
-
/* @__PURE__ */
|
|
17397
|
-
/* @__PURE__ */
|
|
17398
|
-
/* @__PURE__ */
|
|
17542
|
+
return /* @__PURE__ */ jsxs65(Fragment16, { children: [
|
|
17543
|
+
/* @__PURE__ */ jsxs65(PopoverDisclosure, { ...popover, css: PopoverBtn, title: buttonText, "data-test-id": testId, children: [
|
|
17544
|
+
/* @__PURE__ */ jsx98(Icon, { icon, iconColor, size: iconSize }),
|
|
17545
|
+
/* @__PURE__ */ jsx98("span", { hidden: true, children: buttonText })
|
|
17399
17546
|
] }),
|
|
17400
|
-
/* @__PURE__ */
|
|
17547
|
+
/* @__PURE__ */ jsx98(Portal2, { children: /* @__PURE__ */ jsx98(ReakitPopover, { css: Popover, ...popover, "aria-label": ariaLabel, children }) })
|
|
17401
17548
|
] });
|
|
17402
17549
|
};
|
|
17403
17550
|
|
|
17404
17551
|
// src/components/ProgressList/ProgressList.tsx
|
|
17405
|
-
import { css as
|
|
17406
|
-
import { useMemo as
|
|
17552
|
+
import { css as css78 } from "@emotion/react";
|
|
17553
|
+
import { useMemo as useMemo3 } from "react";
|
|
17407
17554
|
import { CgCheckO as CgCheckO2, CgRadioCheck, CgRecord } from "react-icons/cg";
|
|
17408
17555
|
|
|
17409
17556
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
17410
|
-
import { css as
|
|
17411
|
-
var progressListStyles =
|
|
17557
|
+
import { css as css77 } from "@emotion/react";
|
|
17558
|
+
var progressListStyles = css77`
|
|
17412
17559
|
display: flex;
|
|
17413
17560
|
flex-direction: column;
|
|
17414
17561
|
gap: var(--spacing-sm);
|
|
17415
17562
|
list-style-type: none;
|
|
17416
17563
|
`;
|
|
17417
|
-
var progressListItemStyles =
|
|
17564
|
+
var progressListItemStyles = css77`
|
|
17418
17565
|
display: flex;
|
|
17419
17566
|
gap: var(--spacing-base);
|
|
17420
17567
|
align-items: center;
|
|
17421
17568
|
`;
|
|
17422
17569
|
|
|
17423
17570
|
// src/components/ProgressList/ProgressList.tsx
|
|
17424
|
-
import { jsx as
|
|
17571
|
+
import { jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17425
17572
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
17426
|
-
const itemsWithStatus =
|
|
17573
|
+
const itemsWithStatus = useMemo3(() => {
|
|
17427
17574
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
17428
17575
|
return items.map((item, index) => {
|
|
17429
17576
|
let status = "queued";
|
|
@@ -17435,8 +17582,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
17435
17582
|
return { ...item, status };
|
|
17436
17583
|
});
|
|
17437
17584
|
}, [items, inProgressId]);
|
|
17438
|
-
return /* @__PURE__ */
|
|
17439
|
-
return /* @__PURE__ */
|
|
17585
|
+
return /* @__PURE__ */ jsx99("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
17586
|
+
return /* @__PURE__ */ jsx99(
|
|
17440
17587
|
ProgressListItem,
|
|
17441
17588
|
{
|
|
17442
17589
|
status,
|
|
@@ -17456,7 +17603,7 @@ var ProgressListItem = ({
|
|
|
17456
17603
|
errorLevel = "danger",
|
|
17457
17604
|
autoEllipsis = false
|
|
17458
17605
|
}) => {
|
|
17459
|
-
const Icon2 =
|
|
17606
|
+
const Icon2 = useMemo3(() => {
|
|
17460
17607
|
if (error) {
|
|
17461
17608
|
return warningIcon;
|
|
17462
17609
|
}
|
|
@@ -17467,14 +17614,14 @@ var ProgressListItem = ({
|
|
|
17467
17614
|
};
|
|
17468
17615
|
return iconPerStatus[status];
|
|
17469
17616
|
}, [status, error]);
|
|
17470
|
-
const statusStyles =
|
|
17617
|
+
const statusStyles = useMemo3(() => {
|
|
17471
17618
|
if (error) {
|
|
17472
|
-
return errorLevel === "caution" ?
|
|
17619
|
+
return errorLevel === "caution" ? css78`
|
|
17473
17620
|
color: rgb(161, 98, 7);
|
|
17474
17621
|
& svg {
|
|
17475
17622
|
color: rgb(250, 204, 21);
|
|
17476
17623
|
}
|
|
17477
|
-
` :
|
|
17624
|
+
` : css78`
|
|
17478
17625
|
color: rgb(185, 28, 28);
|
|
17479
17626
|
& svg {
|
|
17480
17627
|
color: var(--brand-primary-2);
|
|
@@ -17482,35 +17629,35 @@ var ProgressListItem = ({
|
|
|
17482
17629
|
`;
|
|
17483
17630
|
}
|
|
17484
17631
|
const colorPerStatus = {
|
|
17485
|
-
completed:
|
|
17632
|
+
completed: css78`
|
|
17486
17633
|
opacity: 0.75;
|
|
17487
17634
|
`,
|
|
17488
|
-
inProgress:
|
|
17635
|
+
inProgress: css78`
|
|
17489
17636
|
-webkit-text-stroke-width: thin;
|
|
17490
17637
|
`,
|
|
17491
|
-
queued:
|
|
17638
|
+
queued: css78`
|
|
17492
17639
|
opacity: 0.5;
|
|
17493
17640
|
`
|
|
17494
17641
|
};
|
|
17495
17642
|
return colorPerStatus[status];
|
|
17496
17643
|
}, [status, error, errorLevel]);
|
|
17497
|
-
return /* @__PURE__ */
|
|
17498
|
-
/* @__PURE__ */
|
|
17499
|
-
/* @__PURE__ */
|
|
17644
|
+
return /* @__PURE__ */ jsxs66("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
17645
|
+
/* @__PURE__ */ jsx99(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ jsx99("div", { children: /* @__PURE__ */ jsx99(Icon2, { size: 20 }) }) }),
|
|
17646
|
+
/* @__PURE__ */ jsxs66("div", { children: [
|
|
17500
17647
|
children,
|
|
17501
|
-
/* @__PURE__ */
|
|
17648
|
+
/* @__PURE__ */ jsx99("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
17502
17649
|
] })
|
|
17503
17650
|
] });
|
|
17504
17651
|
};
|
|
17505
17652
|
|
|
17506
17653
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17507
|
-
import { css as
|
|
17508
|
-
import { useCallback as useCallback6, useMemo as
|
|
17654
|
+
import { css as css80 } from "@emotion/react";
|
|
17655
|
+
import { useCallback as useCallback6, useMemo as useMemo4 } from "react";
|
|
17509
17656
|
import { CgCheck as CgCheck4 } from "react-icons/cg";
|
|
17510
17657
|
|
|
17511
17658
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
17512
|
-
import { css as
|
|
17513
|
-
var segmentedControlStyles =
|
|
17659
|
+
import { css as css79 } from "@emotion/react";
|
|
17660
|
+
var segmentedControlStyles = css79`
|
|
17514
17661
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
17515
17662
|
--segmented-control-border-width: 1px;
|
|
17516
17663
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -17529,14 +17676,14 @@ var segmentedControlStyles = css78`
|
|
|
17529
17676
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
17530
17677
|
font-size: var(--fs-xs);
|
|
17531
17678
|
`;
|
|
17532
|
-
var segmentedControlVerticalStyles =
|
|
17679
|
+
var segmentedControlVerticalStyles = css79`
|
|
17533
17680
|
flex-direction: column;
|
|
17534
17681
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
17535
17682
|
var(--segmented-control-rounded-value) 0 0;
|
|
17536
17683
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
17537
17684
|
var(--segmented-control-rounded-value);
|
|
17538
17685
|
`;
|
|
17539
|
-
var segmentedControlItemStyles =
|
|
17686
|
+
var segmentedControlItemStyles = css79`
|
|
17540
17687
|
&:first-of-type label {
|
|
17541
17688
|
border-radius: var(--segmented-control-first-border-radius);
|
|
17542
17689
|
}
|
|
@@ -17544,10 +17691,10 @@ var segmentedControlItemStyles = css78`
|
|
|
17544
17691
|
border-radius: var(--segmented-control-last-border-radius);
|
|
17545
17692
|
}
|
|
17546
17693
|
`;
|
|
17547
|
-
var segmentedControlInputStyles =
|
|
17694
|
+
var segmentedControlInputStyles = css79`
|
|
17548
17695
|
${accessibleHidden}
|
|
17549
17696
|
`;
|
|
17550
|
-
var segmentedControlLabelStyles =
|
|
17697
|
+
var segmentedControlLabelStyles = css79`
|
|
17551
17698
|
position: relative;
|
|
17552
17699
|
display: flex;
|
|
17553
17700
|
align-items: center;
|
|
@@ -17584,23 +17731,23 @@ var segmentedControlLabelStyles = css78`
|
|
|
17584
17731
|
background-color: var(--gray-400);
|
|
17585
17732
|
}
|
|
17586
17733
|
`;
|
|
17587
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
17734
|
+
var segmentedControlLabelIconOnlyStyles = css79`
|
|
17588
17735
|
padding-inline: 0.5em;
|
|
17589
17736
|
`;
|
|
17590
|
-
var segmentedControlLabelCheckStyles =
|
|
17737
|
+
var segmentedControlLabelCheckStyles = css79`
|
|
17591
17738
|
opacity: 0.5;
|
|
17592
17739
|
`;
|
|
17593
|
-
var segmentedControlLabelContentStyles =
|
|
17740
|
+
var segmentedControlLabelContentStyles = css79`
|
|
17594
17741
|
display: flex;
|
|
17595
17742
|
align-items: center;
|
|
17596
17743
|
justify-content: center;
|
|
17597
17744
|
gap: var(--spacing-sm);
|
|
17598
17745
|
height: 100%;
|
|
17599
17746
|
`;
|
|
17600
|
-
var segmentedControlLabelTextStyles =
|
|
17747
|
+
var segmentedControlLabelTextStyles = css79``;
|
|
17601
17748
|
|
|
17602
17749
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17603
|
-
import { jsx as
|
|
17750
|
+
import { jsx as jsx100, jsxs as jsxs67 } from "@emotion/react/jsx-runtime";
|
|
17604
17751
|
var SegmentedControl = ({
|
|
17605
17752
|
name,
|
|
17606
17753
|
options,
|
|
@@ -17620,18 +17767,18 @@ var SegmentedControl = ({
|
|
|
17620
17767
|
},
|
|
17621
17768
|
[options, onChange]
|
|
17622
17769
|
);
|
|
17623
|
-
const sizeStyles =
|
|
17770
|
+
const sizeStyles = useMemo4(() => {
|
|
17624
17771
|
const map = {
|
|
17625
|
-
sm:
|
|
17626
|
-
md:
|
|
17627
|
-
lg:
|
|
17772
|
+
sm: css80({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
17773
|
+
md: css80({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
17774
|
+
lg: css80({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
17628
17775
|
};
|
|
17629
17776
|
return map[size];
|
|
17630
17777
|
}, [size]);
|
|
17631
|
-
const isIconOnly =
|
|
17778
|
+
const isIconOnly = useMemo4(() => {
|
|
17632
17779
|
return options.every((option) => option.icon && !option.label);
|
|
17633
17780
|
}, [options]);
|
|
17634
|
-
return /* @__PURE__ */
|
|
17781
|
+
return /* @__PURE__ */ jsx100(
|
|
17635
17782
|
"div",
|
|
17636
17783
|
{
|
|
17637
17784
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -17639,11 +17786,11 @@ var SegmentedControl = ({
|
|
|
17639
17786
|
children: options.map((option, index) => {
|
|
17640
17787
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
17641
17788
|
const isDisabled = disabled || option.disabled;
|
|
17642
|
-
return /* @__PURE__ */
|
|
17789
|
+
return /* @__PURE__ */ jsx100(
|
|
17643
17790
|
Tooltip,
|
|
17644
17791
|
{
|
|
17645
17792
|
title: isDisabled || !option.tooltip ? "" : option.tooltip,
|
|
17646
|
-
children: /* @__PURE__ */
|
|
17793
|
+
children: /* @__PURE__ */ jsx100("div", { css: segmentedControlItemStyles, "data-test-id": "container-segmented-control", children: /* @__PURE__ */ jsxs67(
|
|
17647
17794
|
"label",
|
|
17648
17795
|
{
|
|
17649
17796
|
css: [
|
|
@@ -17652,7 +17799,7 @@ var SegmentedControl = ({
|
|
|
17652
17799
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17653
17800
|
],
|
|
17654
17801
|
children: [
|
|
17655
|
-
/* @__PURE__ */
|
|
17802
|
+
/* @__PURE__ */ jsx100(
|
|
17656
17803
|
"input",
|
|
17657
17804
|
{
|
|
17658
17805
|
css: segmentedControlInputStyles,
|
|
@@ -17664,10 +17811,10 @@ var SegmentedControl = ({
|
|
|
17664
17811
|
disabled: isDisabled
|
|
17665
17812
|
}
|
|
17666
17813
|
),
|
|
17667
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */
|
|
17668
|
-
/* @__PURE__ */
|
|
17669
|
-
!option.icon ? null : /* @__PURE__ */
|
|
17670
|
-
!text ? null : /* @__PURE__ */
|
|
17814
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx100(CgCheck4, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
17815
|
+
/* @__PURE__ */ jsxs67("span", { css: segmentedControlLabelContentStyles, children: [
|
|
17816
|
+
!option.icon ? null : /* @__PURE__ */ jsx100(option.icon, { size: "1.5em" }),
|
|
17817
|
+
!text ? null : /* @__PURE__ */ jsx100("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
17671
17818
|
] })
|
|
17672
17819
|
]
|
|
17673
17820
|
}
|
|
@@ -17681,18 +17828,18 @@ var SegmentedControl = ({
|
|
|
17681
17828
|
};
|
|
17682
17829
|
|
|
17683
17830
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
17684
|
-
import { css as
|
|
17831
|
+
import { css as css81, keyframes as keyframes4 } from "@emotion/react";
|
|
17685
17832
|
var lightFadingOut = keyframes4`
|
|
17686
17833
|
from { opacity: 0.1; }
|
|
17687
17834
|
to { opacity: 0.025; }
|
|
17688
17835
|
`;
|
|
17689
|
-
var skeletonStyles =
|
|
17836
|
+
var skeletonStyles = css81`
|
|
17690
17837
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
17691
17838
|
background-color: var(--gray-900);
|
|
17692
17839
|
`;
|
|
17693
17840
|
|
|
17694
17841
|
// src/components/Skeleton/Skeleton.tsx
|
|
17695
|
-
import { jsx as
|
|
17842
|
+
import { jsx as jsx101 } from "@emotion/react/jsx-runtime";
|
|
17696
17843
|
var Skeleton = ({
|
|
17697
17844
|
width = "100%",
|
|
17698
17845
|
height = "1.25rem",
|
|
@@ -17700,7 +17847,7 @@ var Skeleton = ({
|
|
|
17700
17847
|
circle = false,
|
|
17701
17848
|
children,
|
|
17702
17849
|
...otherProps
|
|
17703
|
-
}) => /* @__PURE__ */
|
|
17850
|
+
}) => /* @__PURE__ */ jsx101(
|
|
17704
17851
|
"div",
|
|
17705
17852
|
{
|
|
17706
17853
|
css: [
|
|
@@ -17720,11 +17867,11 @@ var Skeleton = ({
|
|
|
17720
17867
|
);
|
|
17721
17868
|
|
|
17722
17869
|
// src/components/Switch/Switch.tsx
|
|
17723
|
-
import * as
|
|
17870
|
+
import * as React19 from "react";
|
|
17724
17871
|
|
|
17725
17872
|
// src/components/Switch/Switch.styles.ts
|
|
17726
|
-
import { css as
|
|
17727
|
-
var SwitchInputContainer =
|
|
17873
|
+
import { css as css82 } from "@emotion/react";
|
|
17874
|
+
var SwitchInputContainer = css82`
|
|
17728
17875
|
cursor: pointer;
|
|
17729
17876
|
display: inline-block;
|
|
17730
17877
|
position: relative;
|
|
@@ -17733,7 +17880,7 @@ var SwitchInputContainer = css81`
|
|
|
17733
17880
|
vertical-align: middle;
|
|
17734
17881
|
user-select: none;
|
|
17735
17882
|
`;
|
|
17736
|
-
var SwitchInput =
|
|
17883
|
+
var SwitchInput = css82`
|
|
17737
17884
|
appearance: none;
|
|
17738
17885
|
border-radius: var(--rounded-full);
|
|
17739
17886
|
background-color: var(--white);
|
|
@@ -17771,7 +17918,7 @@ var SwitchInput = css81`
|
|
|
17771
17918
|
cursor: not-allowed;
|
|
17772
17919
|
}
|
|
17773
17920
|
`;
|
|
17774
|
-
var SwitchInputDisabled =
|
|
17921
|
+
var SwitchInputDisabled = css82`
|
|
17775
17922
|
opacity: var(--opacity-50);
|
|
17776
17923
|
cursor: not-allowed;
|
|
17777
17924
|
|
|
@@ -17779,7 +17926,7 @@ var SwitchInputDisabled = css81`
|
|
|
17779
17926
|
cursor: not-allowed;
|
|
17780
17927
|
}
|
|
17781
17928
|
`;
|
|
17782
|
-
var SwitchInputLabel =
|
|
17929
|
+
var SwitchInputLabel = css82`
|
|
17783
17930
|
align-items: center;
|
|
17784
17931
|
color: var(--brand-secondary-1);
|
|
17785
17932
|
display: inline-flex;
|
|
@@ -17801,37 +17948,37 @@ var SwitchInputLabel = css81`
|
|
|
17801
17948
|
top: 0;
|
|
17802
17949
|
}
|
|
17803
17950
|
`;
|
|
17804
|
-
var SwitchText =
|
|
17951
|
+
var SwitchText = css82`
|
|
17805
17952
|
color: var(--gray-500);
|
|
17806
17953
|
font-size: var(--fs-sm);
|
|
17807
17954
|
padding-inline: var(--spacing-2xl) 0;
|
|
17808
17955
|
`;
|
|
17809
17956
|
|
|
17810
17957
|
// src/components/Switch/Switch.tsx
|
|
17811
|
-
import { Fragment as Fragment17, jsx as
|
|
17812
|
-
var Switch =
|
|
17958
|
+
import { Fragment as Fragment17, jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17959
|
+
var Switch = React19.forwardRef(
|
|
17813
17960
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
17814
17961
|
let additionalText = infoText;
|
|
17815
17962
|
if (infoText && toggleText) {
|
|
17816
17963
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
17817
17964
|
}
|
|
17818
|
-
return /* @__PURE__ */
|
|
17819
|
-
/* @__PURE__ */
|
|
17820
|
-
/* @__PURE__ */
|
|
17821
|
-
/* @__PURE__ */
|
|
17965
|
+
return /* @__PURE__ */ jsxs68(Fragment17, { children: [
|
|
17966
|
+
/* @__PURE__ */ jsxs68("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
17967
|
+
/* @__PURE__ */ jsx102("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
17968
|
+
/* @__PURE__ */ jsx102("span", { css: SwitchInputLabel, children: label })
|
|
17822
17969
|
] }),
|
|
17823
|
-
additionalText ? /* @__PURE__ */
|
|
17970
|
+
additionalText ? /* @__PURE__ */ jsx102("p", { css: SwitchText, children: additionalText }) : null,
|
|
17824
17971
|
children
|
|
17825
17972
|
] });
|
|
17826
17973
|
}
|
|
17827
17974
|
);
|
|
17828
17975
|
|
|
17829
17976
|
// src/components/Table/Table.tsx
|
|
17830
|
-
import * as
|
|
17977
|
+
import * as React20 from "react";
|
|
17831
17978
|
|
|
17832
17979
|
// src/components/Table/Table.styles.ts
|
|
17833
|
-
import { css as
|
|
17834
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
17980
|
+
import { css as css83 } from "@emotion/react";
|
|
17981
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css83`
|
|
17835
17982
|
border-bottom: 1px solid var(--gray-400);
|
|
17836
17983
|
border-collapse: collapse;
|
|
17837
17984
|
min-width: 100%;
|
|
@@ -17842,60 +17989,60 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css82
|
|
|
17842
17989
|
padding: ${cellPadding};
|
|
17843
17990
|
}
|
|
17844
17991
|
`;
|
|
17845
|
-
var tableHead =
|
|
17992
|
+
var tableHead = css83`
|
|
17846
17993
|
background: var(--gray-100);
|
|
17847
17994
|
color: var(--brand-secondary-1);
|
|
17848
17995
|
text-align: left;
|
|
17849
17996
|
`;
|
|
17850
|
-
var tableRow =
|
|
17997
|
+
var tableRow = css83`
|
|
17851
17998
|
border-bottom: 1px solid var(--gray-200);
|
|
17852
17999
|
`;
|
|
17853
|
-
var tableCellHead =
|
|
18000
|
+
var tableCellHead = css83`
|
|
17854
18001
|
font-size: var(--fs-sm);
|
|
17855
18002
|
text-transform: uppercase;
|
|
17856
18003
|
font-weight: var(--fw-bold);
|
|
17857
18004
|
`;
|
|
17858
18005
|
|
|
17859
18006
|
// src/components/Table/Table.tsx
|
|
17860
|
-
import { jsx as
|
|
17861
|
-
var Table =
|
|
18007
|
+
import { jsx as jsx103 } from "@emotion/react/jsx-runtime";
|
|
18008
|
+
var Table = React20.forwardRef(
|
|
17862
18009
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
17863
|
-
return /* @__PURE__ */
|
|
18010
|
+
return /* @__PURE__ */ jsx103("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
17864
18011
|
}
|
|
17865
18012
|
);
|
|
17866
|
-
var TableHead =
|
|
18013
|
+
var TableHead = React20.forwardRef(
|
|
17867
18014
|
({ children, ...otherProps }, ref) => {
|
|
17868
|
-
return /* @__PURE__ */
|
|
18015
|
+
return /* @__PURE__ */ jsx103("thead", { ref, css: tableHead, ...otherProps, children });
|
|
17869
18016
|
}
|
|
17870
18017
|
);
|
|
17871
|
-
var TableBody =
|
|
18018
|
+
var TableBody = React20.forwardRef(
|
|
17872
18019
|
({ children, ...otherProps }, ref) => {
|
|
17873
|
-
return /* @__PURE__ */
|
|
18020
|
+
return /* @__PURE__ */ jsx103("tbody", { ref, ...otherProps, children });
|
|
17874
18021
|
}
|
|
17875
18022
|
);
|
|
17876
|
-
var TableFoot =
|
|
18023
|
+
var TableFoot = React20.forwardRef(
|
|
17877
18024
|
({ children, ...otherProps }, ref) => {
|
|
17878
|
-
return /* @__PURE__ */
|
|
18025
|
+
return /* @__PURE__ */ jsx103("tfoot", { ref, ...otherProps, children });
|
|
17879
18026
|
}
|
|
17880
18027
|
);
|
|
17881
|
-
var TableRow =
|
|
18028
|
+
var TableRow = React20.forwardRef(
|
|
17882
18029
|
({ children, ...otherProps }, ref) => {
|
|
17883
|
-
return /* @__PURE__ */
|
|
18030
|
+
return /* @__PURE__ */ jsx103("tr", { ref, css: tableRow, ...otherProps, children });
|
|
17884
18031
|
}
|
|
17885
18032
|
);
|
|
17886
|
-
var TableCellHead =
|
|
18033
|
+
var TableCellHead = React20.forwardRef(
|
|
17887
18034
|
({ children, ...otherProps }, ref) => {
|
|
17888
|
-
return /* @__PURE__ */
|
|
18035
|
+
return /* @__PURE__ */ jsx103("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
17889
18036
|
}
|
|
17890
18037
|
);
|
|
17891
|
-
var TableCellData =
|
|
18038
|
+
var TableCellData = React20.forwardRef(
|
|
17892
18039
|
({ children, ...otherProps }, ref) => {
|
|
17893
|
-
return /* @__PURE__ */
|
|
18040
|
+
return /* @__PURE__ */ jsx103("td", { ref, ...otherProps, children });
|
|
17894
18041
|
}
|
|
17895
18042
|
);
|
|
17896
18043
|
|
|
17897
18044
|
// src/components/Tabs/Tabs.tsx
|
|
17898
|
-
import { createContext as createContext6, useContext as useContext7, useEffect as
|
|
18045
|
+
import { createContext as createContext6, useContext as useContext7, useEffect as useEffect14, useMemo as useMemo5 } from "react";
|
|
17899
18046
|
import {
|
|
17900
18047
|
Tab as ReakitTab,
|
|
17901
18048
|
TabList as ReakitTabList,
|
|
@@ -17904,8 +18051,8 @@ import {
|
|
|
17904
18051
|
} from "reakit/Tab";
|
|
17905
18052
|
|
|
17906
18053
|
// src/components/Tabs/Tabs.styles.ts
|
|
17907
|
-
import { css as
|
|
17908
|
-
var tabButtonStyles =
|
|
18054
|
+
import { css as css84 } from "@emotion/react";
|
|
18055
|
+
var tabButtonStyles = css84`
|
|
17909
18056
|
align-items: center;
|
|
17910
18057
|
border: 0;
|
|
17911
18058
|
height: 2.5rem;
|
|
@@ -17922,14 +18069,14 @@ var tabButtonStyles = css83`
|
|
|
17922
18069
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
17923
18070
|
}
|
|
17924
18071
|
`;
|
|
17925
|
-
var tabButtonGroupStyles =
|
|
18072
|
+
var tabButtonGroupStyles = css84`
|
|
17926
18073
|
display: flex;
|
|
17927
18074
|
gap: var(--spacing-base);
|
|
17928
18075
|
border-bottom: 1px solid var(--gray-300);
|
|
17929
18076
|
`;
|
|
17930
18077
|
|
|
17931
18078
|
// src/components/Tabs/Tabs.tsx
|
|
17932
|
-
import { jsx as
|
|
18079
|
+
import { jsx as jsx104 } from "@emotion/react/jsx-runtime";
|
|
17933
18080
|
var CurrentTabContext = createContext6(null);
|
|
17934
18081
|
var useCurrentTab = () => {
|
|
17935
18082
|
const context = useContext7(CurrentTabContext);
|
|
@@ -17939,13 +18086,13 @@ var useCurrentTab = () => {
|
|
|
17939
18086
|
return context;
|
|
17940
18087
|
};
|
|
17941
18088
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
17942
|
-
const selected =
|
|
18089
|
+
const selected = useMemo5(() => {
|
|
17943
18090
|
if (selectedId)
|
|
17944
18091
|
return selectedId;
|
|
17945
18092
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
17946
18093
|
}, [selectedId, useHashForState]);
|
|
17947
18094
|
const tab = useTabState({ ...props, selectedId: selected });
|
|
17948
|
-
|
|
18095
|
+
useEffect14(() => {
|
|
17949
18096
|
var _a;
|
|
17950
18097
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
17951
18098
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -17953,29 +18100,29 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
17953
18100
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
17954
18101
|
}
|
|
17955
18102
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
17956
|
-
|
|
18103
|
+
useEffect14(() => {
|
|
17957
18104
|
if (selected && selected !== tab.selectedId) {
|
|
17958
18105
|
tab.setSelectedId(selected);
|
|
17959
18106
|
}
|
|
17960
18107
|
}, [selected]);
|
|
17961
|
-
return /* @__PURE__ */
|
|
18108
|
+
return /* @__PURE__ */ jsx104(CurrentTabContext.Provider, { value: tab, children });
|
|
17962
18109
|
};
|
|
17963
18110
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
17964
18111
|
const currentTab = useCurrentTab();
|
|
17965
|
-
return /* @__PURE__ */
|
|
18112
|
+
return /* @__PURE__ */ jsx104(ReakitTabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
17966
18113
|
};
|
|
17967
18114
|
var TabButton = ({ children, id, ...props }) => {
|
|
17968
18115
|
const currentTab = useCurrentTab();
|
|
17969
|
-
return /* @__PURE__ */
|
|
18116
|
+
return /* @__PURE__ */ jsx104(ReakitTab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
17970
18117
|
};
|
|
17971
18118
|
var TabContent = ({ children, ...props }) => {
|
|
17972
18119
|
const currentTab = useCurrentTab();
|
|
17973
|
-
return /* @__PURE__ */
|
|
18120
|
+
return /* @__PURE__ */ jsx104(ReakitTabPanel, { ...props, ...currentTab, children });
|
|
17974
18121
|
};
|
|
17975
18122
|
|
|
17976
18123
|
// src/components/Validation/StatusBullet.styles.ts
|
|
17977
|
-
import { css as
|
|
17978
|
-
var StatusBulletContainer =
|
|
18124
|
+
import { css as css85 } from "@emotion/react";
|
|
18125
|
+
var StatusBulletContainer = css85`
|
|
17979
18126
|
align-items: center;
|
|
17980
18127
|
align-self: center;
|
|
17981
18128
|
color: var(--gray-500);
|
|
@@ -17992,33 +18139,33 @@ var StatusBulletContainer = css84`
|
|
|
17992
18139
|
display: block;
|
|
17993
18140
|
}
|
|
17994
18141
|
`;
|
|
17995
|
-
var StatusBulletBase =
|
|
18142
|
+
var StatusBulletBase = css85`
|
|
17996
18143
|
font-size: var(--fs-sm);
|
|
17997
18144
|
&:before {
|
|
17998
18145
|
width: var(--fs-xs);
|
|
17999
18146
|
height: var(--fs-xs);
|
|
18000
18147
|
}
|
|
18001
18148
|
`;
|
|
18002
|
-
var StatusBulletSmall =
|
|
18149
|
+
var StatusBulletSmall = css85`
|
|
18003
18150
|
font-size: var(--fs-xs);
|
|
18004
18151
|
&:before {
|
|
18005
18152
|
width: var(--fs-xxs);
|
|
18006
18153
|
height: var(--fs-xxs);
|
|
18007
18154
|
}
|
|
18008
18155
|
`;
|
|
18009
|
-
var StatusDraft =
|
|
18156
|
+
var StatusDraft = css85`
|
|
18010
18157
|
&:before {
|
|
18011
18158
|
background: var(--white);
|
|
18012
18159
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
18013
18160
|
}
|
|
18014
18161
|
`;
|
|
18015
|
-
var StatusModified =
|
|
18162
|
+
var StatusModified = css85`
|
|
18016
18163
|
&:before {
|
|
18017
18164
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
18018
18165
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
18019
18166
|
}
|
|
18020
18167
|
`;
|
|
18021
|
-
var StatusError =
|
|
18168
|
+
var StatusError = css85`
|
|
18022
18169
|
color: var(--error);
|
|
18023
18170
|
&:before {
|
|
18024
18171
|
/* TODO: replace this with an svg icon */
|
|
@@ -18031,19 +18178,19 @@ var StatusError = css84`
|
|
|
18031
18178
|
);
|
|
18032
18179
|
}
|
|
18033
18180
|
`;
|
|
18034
|
-
var StatusPublished =
|
|
18181
|
+
var StatusPublished = css85`
|
|
18035
18182
|
&:before {
|
|
18036
18183
|
background: var(--primary-action-default);
|
|
18037
18184
|
}
|
|
18038
18185
|
`;
|
|
18039
|
-
var StatusOrphan =
|
|
18186
|
+
var StatusOrphan = css85`
|
|
18040
18187
|
&:before {
|
|
18041
18188
|
background: var(--brand-secondary-5);
|
|
18042
18189
|
}
|
|
18043
18190
|
`;
|
|
18044
18191
|
|
|
18045
18192
|
// src/components/Validation/StatusBullet.tsx
|
|
18046
|
-
import { jsx as
|
|
18193
|
+
import { jsx as jsx105 } from "@emotion/react/jsx-runtime";
|
|
18047
18194
|
var StatusBullet = ({
|
|
18048
18195
|
status,
|
|
18049
18196
|
hideText = false,
|
|
@@ -18061,7 +18208,7 @@ var StatusBullet = ({
|
|
|
18061
18208
|
Previous: StatusDraft
|
|
18062
18209
|
};
|
|
18063
18210
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
18064
|
-
return /* @__PURE__ */
|
|
18211
|
+
return /* @__PURE__ */ jsx105(
|
|
18065
18212
|
"span",
|
|
18066
18213
|
{
|
|
18067
18214
|
role: "status",
|
|
@@ -18091,10 +18238,12 @@ export {
|
|
|
18091
18238
|
Container2 as Container,
|
|
18092
18239
|
Counter,
|
|
18093
18240
|
CreateTeamIntegrationTile,
|
|
18241
|
+
CurrentDrawerContext,
|
|
18094
18242
|
DashedBox,
|
|
18095
18243
|
Details,
|
|
18096
18244
|
DismissibleChipAction,
|
|
18097
18245
|
Drawer,
|
|
18246
|
+
DrawerContent2 as DrawerContent,
|
|
18098
18247
|
DrawerProvider,
|
|
18099
18248
|
DrawerRenderer,
|
|
18100
18249
|
EditTeamIntegrationTile,
|
|
@@ -18227,6 +18376,7 @@ export {
|
|
|
18227
18376
|
fadeInTop,
|
|
18228
18377
|
fadeOutBottom,
|
|
18229
18378
|
fullWidthScreenIcon,
|
|
18379
|
+
getDrawerAttributes,
|
|
18230
18380
|
growSubtle,
|
|
18231
18381
|
imageTextIcon,
|
|
18232
18382
|
infoFilledIcon,
|
|
@@ -18257,7 +18407,7 @@ export {
|
|
|
18257
18407
|
textInput,
|
|
18258
18408
|
useBreakpoint,
|
|
18259
18409
|
useCloseCurrentDrawer,
|
|
18260
|
-
|
|
18410
|
+
useCurrentDrawer,
|
|
18261
18411
|
useCurrentTab,
|
|
18262
18412
|
useDrawer,
|
|
18263
18413
|
useIconContext,
|