@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/index.js
CHANGED
|
@@ -48,10 +48,12 @@ __export(src_exports, {
|
|
|
48
48
|
Container: () => Container2,
|
|
49
49
|
Counter: () => Counter,
|
|
50
50
|
CreateTeamIntegrationTile: () => CreateTeamIntegrationTile,
|
|
51
|
+
CurrentDrawerContext: () => CurrentDrawerContext,
|
|
51
52
|
DashedBox: () => DashedBox,
|
|
52
53
|
Details: () => Details,
|
|
53
54
|
DismissibleChipAction: () => DismissibleChipAction,
|
|
54
55
|
Drawer: () => Drawer,
|
|
56
|
+
DrawerContent: () => DrawerContent2,
|
|
55
57
|
DrawerProvider: () => DrawerProvider,
|
|
56
58
|
DrawerRenderer: () => DrawerRenderer,
|
|
57
59
|
EditTeamIntegrationTile: () => EditTeamIntegrationTile,
|
|
@@ -184,6 +186,7 @@ __export(src_exports, {
|
|
|
184
186
|
fadeInTop: () => fadeInTop,
|
|
185
187
|
fadeOutBottom: () => fadeOutBottom,
|
|
186
188
|
fullWidthScreenIcon: () => fullWidthScreenIcon,
|
|
189
|
+
getDrawerAttributes: () => getDrawerAttributes,
|
|
187
190
|
growSubtle: () => growSubtle,
|
|
188
191
|
imageTextIcon: () => imageTextIcon,
|
|
189
192
|
infoFilledIcon: () => infoFilledIcon,
|
|
@@ -214,7 +217,7 @@ __export(src_exports, {
|
|
|
214
217
|
textInput: () => textInput,
|
|
215
218
|
useBreakpoint: () => useBreakpoint,
|
|
216
219
|
useCloseCurrentDrawer: () => useCloseCurrentDrawer,
|
|
217
|
-
|
|
220
|
+
useCurrentDrawer: () => useCurrentDrawer,
|
|
218
221
|
useCurrentTab: () => useCurrentTab,
|
|
219
222
|
useDrawer: () => useDrawer,
|
|
220
223
|
useIconContext: () => useIconContext,
|
|
@@ -404,7 +407,7 @@ var Theme = ({ disableReset = false }) => {
|
|
|
404
407
|
/* z-indexs */
|
|
405
408
|
--z-10: 10;
|
|
406
409
|
--z-20: 20;
|
|
407
|
-
--z-drawer:
|
|
410
|
+
--z-drawer: 50;
|
|
408
411
|
--z-50: 50;
|
|
409
412
|
--z-tooltip: 80;
|
|
410
413
|
|
|
@@ -789,6 +792,10 @@ var inputSelect = import_react4.css`
|
|
|
789
792
|
background-repeat: no-repeat;
|
|
790
793
|
background-size: 1rem;
|
|
791
794
|
padding-right: var(--spacing-xl);
|
|
795
|
+
|
|
796
|
+
option:disabled {
|
|
797
|
+
color: var(--gray-300);
|
|
798
|
+
}
|
|
792
799
|
`;
|
|
793
800
|
var inputSearchCloseBtn = import_react4.css`
|
|
794
801
|
background: none;
|
|
@@ -11186,28 +11193,34 @@ var UniformBadge = ({
|
|
|
11186
11193
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
11187
11194
|
"svg",
|
|
11188
11195
|
{
|
|
11189
|
-
width: "
|
|
11190
|
-
height: "
|
|
11191
|
-
viewBox: "0 0
|
|
11196
|
+
width: "51",
|
|
11197
|
+
height: "52",
|
|
11198
|
+
viewBox: "0 0 51 52",
|
|
11192
11199
|
fill: "none",
|
|
11193
11200
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11194
11201
|
"data-test-id": "uniform-Badge",
|
|
11195
11202
|
css: [SVG, theme === "dark" ? SVGDark : SVGLight],
|
|
11196
11203
|
...props,
|
|
11197
11204
|
children: [
|
|
11198
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M28.998 0 0 16.744V50.23l28.998-16.744 29.004-16.743L28.998 0Z", fill: "#7BB3FF" }),
|
|
11199
11205
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
11200
11206
|
"path",
|
|
11201
11207
|
{
|
|
11202
|
-
d: "
|
|
11203
|
-
fill: "#
|
|
11208
|
+
d: "M19.3444 4.35168L7 11.484V25.7181L19.3444 18.5858L31.6583 11.484L19.3444 4.35168Z",
|
|
11209
|
+
fill: "#84ADFF"
|
|
11210
|
+
}
|
|
11211
|
+
),
|
|
11212
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
11213
|
+
"path",
|
|
11214
|
+
{
|
|
11215
|
+
d: "M19.3444 32.8505V18.5858L7 25.7182V39.9523L19.3444 47.0846L31.6583 39.9523V25.7182L19.3444 32.8505Z",
|
|
11216
|
+
fill: "#5786FF"
|
|
11204
11217
|
}
|
|
11205
11218
|
),
|
|
11206
11219
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
11207
11220
|
"path",
|
|
11208
11221
|
{
|
|
11209
|
-
d: "
|
|
11210
|
-
fill: "#
|
|
11222
|
+
d: "M31.6583 11.484L19.3444 18.5858L31.6583 25.7182V39.9523L44.0027 32.8505V18.5858L31.6583 11.484Z",
|
|
11223
|
+
fill: "#EC2924"
|
|
11211
11224
|
}
|
|
11212
11225
|
)
|
|
11213
11226
|
]
|
|
@@ -12758,7 +12771,8 @@ var Details = ({
|
|
|
12758
12771
|
};
|
|
12759
12772
|
|
|
12760
12773
|
// src/components/Drawer/Drawer.tsx
|
|
12761
|
-
var
|
|
12774
|
+
var import_react49 = __toESM(require("react"));
|
|
12775
|
+
var import_react_dom = require("react-dom");
|
|
12762
12776
|
var import_cg10 = require("react-icons/cg");
|
|
12763
12777
|
|
|
12764
12778
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -12787,8 +12801,10 @@ var headerWrapperStyles = import_react47.css`
|
|
|
12787
12801
|
margin-right: var(--spacing-sm);
|
|
12788
12802
|
`;
|
|
12789
12803
|
var drawerHeaderStyles = import_react47.css`
|
|
12790
|
-
|
|
12791
|
-
|
|
12804
|
+
align-items: center;
|
|
12805
|
+
display: flex;
|
|
12806
|
+
gap: var(--spacing-sm);
|
|
12807
|
+
font-size: var(--fs-md);
|
|
12792
12808
|
padding-inline: var(--spacing-base);
|
|
12793
12809
|
flex: 1;
|
|
12794
12810
|
`;
|
|
@@ -12799,10 +12815,13 @@ var drawerRendererStyles = import_react47.css`
|
|
|
12799
12815
|
`;
|
|
12800
12816
|
var drawerInnerStyles = import_react47.css`
|
|
12801
12817
|
height: 100%;
|
|
12802
|
-
padding: 0 var(--spacing-base) var(--spacing-base);
|
|
12803
12818
|
overflow: auto;
|
|
12819
|
+
padding: 0 var(--spacing-md) var(--spacing-base) var(--spacing-sm);
|
|
12804
12820
|
${scrollbarStyles}
|
|
12805
12821
|
`;
|
|
12822
|
+
var drawerHeading = import_react47.css`
|
|
12823
|
+
font-size: var(--fs-base);
|
|
12824
|
+
`;
|
|
12806
12825
|
var slideDrawerIn = import_react47.keyframes`
|
|
12807
12826
|
0% {
|
|
12808
12827
|
transform: translate(0);
|
|
@@ -12856,14 +12875,18 @@ var drawerWrapperLeftAlignedStyles = import_react47.css`
|
|
|
12856
12875
|
var drawerWrapperOverlayStyles = import_react47.css`
|
|
12857
12876
|
position: absolute;
|
|
12858
12877
|
inset: 0;
|
|
12859
|
-
background: rgba(31, 43, 52, 0.4);
|
|
12860
12878
|
animation: ${fadeIn} var(--duration-fast) ease-out;
|
|
12879
|
+
|
|
12880
|
+
&:first-of-type {
|
|
12881
|
+
background: rgba(31, 43, 52, 0.4);
|
|
12882
|
+
}
|
|
12861
12883
|
`;
|
|
12862
12884
|
|
|
12863
12885
|
// src/components/Drawer/DrawerProvider.tsx
|
|
12864
12886
|
var import_react48 = require("react");
|
|
12865
12887
|
var import_jsx_runtime38 = require("@emotion/react/jsx-runtime");
|
|
12866
12888
|
var DrawerContext = (0, import_react48.createContext)({
|
|
12889
|
+
providerId: "",
|
|
12867
12890
|
drawersRegistry: [],
|
|
12868
12891
|
registerDrawer: () => {
|
|
12869
12892
|
},
|
|
@@ -12872,6 +12895,7 @@ var DrawerContext = (0, import_react48.createContext)({
|
|
|
12872
12895
|
});
|
|
12873
12896
|
var DrawerProvider = ({ children }) => {
|
|
12874
12897
|
const [drawersRegistry, setDrawersRegistry] = (0, import_react48.useState)([]);
|
|
12898
|
+
const providerId = (0, import_react48.useRef)(crypto.randomUUID());
|
|
12875
12899
|
useShortcut({
|
|
12876
12900
|
handler: () => {
|
|
12877
12901
|
var _a, _b;
|
|
@@ -12882,20 +12906,27 @@ var DrawerProvider = ({ children }) => {
|
|
|
12882
12906
|
const registerDrawer = (0, import_react48.useCallback)(
|
|
12883
12907
|
({ drawer, onFirstRender }) => {
|
|
12884
12908
|
setDrawersRegistry((currentValue) => {
|
|
12885
|
-
var _a;
|
|
12909
|
+
var _a, _b;
|
|
12886
12910
|
const alreadyRegisteredDrawerIndex = currentValue.findIndex((d) => isEqualDrawer(d, drawer));
|
|
12887
12911
|
const alreadyRegisteredDrawer = currentValue[alreadyRegisteredDrawerIndex];
|
|
12888
12912
|
const isFirstRender = !alreadyRegisteredDrawer;
|
|
12889
|
-
if (isFirstRender) {
|
|
12890
|
-
onFirstRender == null ? void 0 : onFirstRender();
|
|
12891
|
-
}
|
|
12892
12913
|
const shouldReplaceCurrent = alreadyRegisteredDrawer !== void 0 && !isEqualDrawerInstance(alreadyRegisteredDrawer, drawer);
|
|
12914
|
+
const newDrawersRegistry = [...currentValue];
|
|
12893
12915
|
if (shouldReplaceCurrent) {
|
|
12894
12916
|
(_a = alreadyRegisteredDrawer.onRequestClose) == null ? void 0 : _a.call(alreadyRegisteredDrawer);
|
|
12917
|
+
newDrawersRegistry.splice(alreadyRegisteredDrawerIndex, 1);
|
|
12895
12918
|
}
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12919
|
+
if (isFirstRender || shouldReplaceCurrent) {
|
|
12920
|
+
onFirstRender == null ? void 0 : onFirstRender();
|
|
12921
|
+
}
|
|
12922
|
+
newDrawersRegistry.push({
|
|
12923
|
+
registeredAt: (_b = alreadyRegisteredDrawer == null ? void 0 : alreadyRegisteredDrawer.registeredAt) != null ? _b : Date.now(),
|
|
12924
|
+
...drawer
|
|
12925
|
+
});
|
|
12926
|
+
newDrawersRegistry.sort((a, b) => {
|
|
12927
|
+
var _a2, _b2;
|
|
12928
|
+
return ((_a2 = a.registeredAt) != null ? _a2 : 0) - ((_b2 = b.registeredAt) != null ? _b2 : 0);
|
|
12929
|
+
});
|
|
12899
12930
|
return newDrawersRegistry;
|
|
12900
12931
|
});
|
|
12901
12932
|
},
|
|
@@ -12911,7 +12942,18 @@ var DrawerProvider = ({ children }) => {
|
|
|
12911
12942
|
},
|
|
12912
12943
|
[setDrawersRegistry]
|
|
12913
12944
|
);
|
|
12914
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12946
|
+
DrawerContext.Provider,
|
|
12947
|
+
{
|
|
12948
|
+
value: {
|
|
12949
|
+
drawersRegistry,
|
|
12950
|
+
registerDrawer,
|
|
12951
|
+
unregisterDrawer,
|
|
12952
|
+
providerId: providerId.current
|
|
12953
|
+
},
|
|
12954
|
+
children
|
|
12955
|
+
}
|
|
12956
|
+
);
|
|
12915
12957
|
};
|
|
12916
12958
|
var useDrawer = () => {
|
|
12917
12959
|
return (0, import_react48.useContext)(DrawerContext);
|
|
@@ -12930,30 +12972,168 @@ function isEqualDrawerInstance(a, b) {
|
|
|
12930
12972
|
return isEqualDrawer(a, b) && a.instanceKey === b.instanceKey;
|
|
12931
12973
|
}
|
|
12932
12974
|
|
|
12933
|
-
// src/components/Drawer/
|
|
12934
|
-
var import_react49 = require("react");
|
|
12975
|
+
// src/components/Drawer/Drawer.tsx
|
|
12935
12976
|
var import_jsx_runtime39 = require("@emotion/react/jsx-runtime");
|
|
12977
|
+
var defaultSackId = "_default";
|
|
12978
|
+
var CurrentDrawerContext = (0, import_react49.createContext)({});
|
|
12979
|
+
var useCurrentDrawer = () => {
|
|
12980
|
+
return (0, import_react49.useContext)(CurrentDrawerContext);
|
|
12981
|
+
};
|
|
12982
|
+
var Drawer = import_react49.default.forwardRef(
|
|
12983
|
+
({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
12984
|
+
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
12985
|
+
const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
|
|
12986
|
+
return drawerProps.stackId ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerInner, { ref, ...drawerProps }) : inheritedStackId ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(DrawerProvider, { children: [
|
|
12987
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerInner, { ref, ...drawerProps }),
|
|
12988
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
12989
|
+
] });
|
|
12990
|
+
}
|
|
12991
|
+
);
|
|
12992
|
+
var DrawerInner = ({
|
|
12993
|
+
ref,
|
|
12994
|
+
stackId = defaultSackId,
|
|
12995
|
+
id,
|
|
12996
|
+
bgColor = "var(--gray-50)",
|
|
12997
|
+
children,
|
|
12998
|
+
header,
|
|
12999
|
+
instanceKey,
|
|
13000
|
+
onRequestClose,
|
|
13001
|
+
leftAligned,
|
|
13002
|
+
testId = "side-dialog"
|
|
13003
|
+
}) => {
|
|
13004
|
+
const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
|
|
13005
|
+
const closeButtonRef = (0, import_react49.useRef)(null);
|
|
13006
|
+
const [rendererElement, setRendererElement] = (0, import_react49.useState)(null);
|
|
13007
|
+
(0, import_react49.useEffect)(() => {
|
|
13008
|
+
registerDrawer({
|
|
13009
|
+
drawer: {
|
|
13010
|
+
id,
|
|
13011
|
+
stackId,
|
|
13012
|
+
onRequestClose,
|
|
13013
|
+
instanceKey
|
|
13014
|
+
},
|
|
13015
|
+
onFirstRender: () => {
|
|
13016
|
+
setTimeout(() => {
|
|
13017
|
+
var _a, _b;
|
|
13018
|
+
setRendererElement(findDrawerRenderer({ providerId, stackId, id }));
|
|
13019
|
+
if (ref && "current" in ref && !((_a = ref.current) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
13020
|
+
(_b = closeButtonRef.current) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
13021
|
+
}
|
|
13022
|
+
}, 0);
|
|
13023
|
+
}
|
|
13024
|
+
});
|
|
13025
|
+
return () => {
|
|
13026
|
+
unregisterDrawer({ id, stackId, instanceKey });
|
|
13027
|
+
};
|
|
13028
|
+
}, [id, stackId, instanceKey, providerId, registerDrawer, unregisterDrawer]);
|
|
13029
|
+
if (!rendererElement) {
|
|
13030
|
+
return null;
|
|
13031
|
+
}
|
|
13032
|
+
const headerId = `dialog-header-${providerId}-${stackId}-${id}`;
|
|
13033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CurrentDrawerContext.Provider, { value: { id, stackId, leftAligned }, children: (0, import_react_dom.createPortal)(
|
|
13034
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13035
|
+
"div",
|
|
13036
|
+
{
|
|
13037
|
+
ref,
|
|
13038
|
+
id,
|
|
13039
|
+
role: "dialog",
|
|
13040
|
+
tabIndex: -1,
|
|
13041
|
+
"aria-labelledby": headerId,
|
|
13042
|
+
css: drawerStyles(bgColor),
|
|
13043
|
+
"data-test-id": testId,
|
|
13044
|
+
children: [
|
|
13045
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { css: headerWrapperStyles, children: [
|
|
13046
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
13047
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13048
|
+
Button,
|
|
13049
|
+
{
|
|
13050
|
+
ref: closeButtonRef,
|
|
13051
|
+
type: "button",
|
|
13052
|
+
onClick: onRequestClose,
|
|
13053
|
+
css: drawerCloseButtonStyles,
|
|
13054
|
+
title: "Close dialog",
|
|
13055
|
+
buttonType: "ghost",
|
|
13056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13057
|
+
Icon,
|
|
13058
|
+
{
|
|
13059
|
+
icon: import_cg10.CgChevronRight,
|
|
13060
|
+
iconColor: "gray",
|
|
13061
|
+
size: 24,
|
|
13062
|
+
css: { transform: "rotate(var(--drawer-close-icon-rotation))" }
|
|
13063
|
+
}
|
|
13064
|
+
)
|
|
13065
|
+
}
|
|
13066
|
+
)
|
|
13067
|
+
] }),
|
|
13068
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { css: drawerInnerStyles, children })
|
|
13069
|
+
]
|
|
13070
|
+
}
|
|
13071
|
+
),
|
|
13072
|
+
rendererElement
|
|
13073
|
+
) });
|
|
13074
|
+
};
|
|
13075
|
+
var findDrawerRenderer = (params) => {
|
|
13076
|
+
return document.querySelector(
|
|
13077
|
+
Object.entries(getDrawerAttributes(params)).map(([key, value]) => `[${key}="${value}"]`).join("")
|
|
13078
|
+
);
|
|
13079
|
+
};
|
|
13080
|
+
|
|
13081
|
+
// src/components/Drawer/DrawerContent.styles.ts
|
|
13082
|
+
var import_react50 = require("@emotion/react");
|
|
13083
|
+
var DrawerContent = import_react50.css`
|
|
13084
|
+
background: var(--gray-50);
|
|
13085
|
+
display: flex;
|
|
13086
|
+
flex-direction: column;
|
|
13087
|
+
gap: var(--spacing-base);
|
|
13088
|
+
height: 100%;
|
|
13089
|
+
`;
|
|
13090
|
+
var DrawerContentInner = import_react50.css`
|
|
13091
|
+
background: var(--white);
|
|
13092
|
+
padding: var(--spacing-base);
|
|
13093
|
+
flex: 1;
|
|
13094
|
+
height: 100%;
|
|
13095
|
+
overflow-y: auto;
|
|
13096
|
+
${scrollbarStyles}
|
|
13097
|
+
`;
|
|
13098
|
+
var DrawerContentBtnGroup = import_react50.css`
|
|
13099
|
+
display: flex;
|
|
13100
|
+
gap: var(--spacing-sm);
|
|
13101
|
+
padding: 0 var(--spacing-base) var(--spacing-base);
|
|
13102
|
+
`;
|
|
13103
|
+
|
|
13104
|
+
// src/components/Drawer/DrawerContent.tsx
|
|
13105
|
+
var import_jsx_runtime40 = require("@emotion/react/jsx-runtime");
|
|
13106
|
+
var DrawerContent2 = ({ children, buttonGroup, ...props }) => {
|
|
13107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { css: DrawerContent, ...props, children: [
|
|
13108
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: DrawerContentInner, children }),
|
|
13109
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: DrawerContentBtnGroup, children: buttonGroup }) : null
|
|
13110
|
+
] });
|
|
13111
|
+
};
|
|
13112
|
+
|
|
13113
|
+
// src/components/Drawer/DrawerRenderer.tsx
|
|
13114
|
+
var import_jsx_runtime41 = require("@emotion/react/jsx-runtime");
|
|
12936
13115
|
var maxLayeringInPx = 64;
|
|
12937
13116
|
var idealDistanceBetweenLayersInPx = 16;
|
|
12938
|
-
var CurrentDrawerRendererContext = (0, import_react49.createContext)({});
|
|
12939
|
-
var useCurrentDrawerRenderer = () => {
|
|
12940
|
-
return (0, import_react49.useContext)(CurrentDrawerRendererContext);
|
|
12941
|
-
};
|
|
12942
13117
|
var DrawerRenderer = ({
|
|
12943
13118
|
stackId,
|
|
12944
13119
|
position = "absolute",
|
|
12945
|
-
width = "
|
|
13120
|
+
width = "medium",
|
|
12946
13121
|
minWidth = "0",
|
|
12947
13122
|
maxWidth = "100%",
|
|
12948
13123
|
leftAligned = false,
|
|
12949
13124
|
...otherProps
|
|
12950
13125
|
}) => {
|
|
12951
|
-
const { drawersRegistry } = useDrawer();
|
|
13126
|
+
const { drawersRegistry, providerId } = useDrawer();
|
|
12952
13127
|
const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
|
|
13128
|
+
const drawerWidth = {
|
|
13129
|
+
narrow: "29rem",
|
|
13130
|
+
medium: "43rem",
|
|
13131
|
+
wide: "57rem"
|
|
13132
|
+
};
|
|
12953
13133
|
if (drawersToRender.length === 0) {
|
|
12954
13134
|
return null;
|
|
12955
13135
|
}
|
|
12956
|
-
return /* @__PURE__ */ (0,
|
|
13136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12957
13137
|
"div",
|
|
12958
13138
|
{
|
|
12959
13139
|
css: [
|
|
@@ -12962,22 +13142,31 @@ var DrawerRenderer = ({
|
|
|
12962
13142
|
position === "sticky" ? { height: "100%", marginTop: "-100%" } : void 0
|
|
12963
13143
|
],
|
|
12964
13144
|
...otherProps,
|
|
12965
|
-
children: drawersToRender.map(({
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
13145
|
+
children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => {
|
|
13146
|
+
var _a;
|
|
13147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13148
|
+
DrawerWrapper,
|
|
13149
|
+
{
|
|
13150
|
+
index,
|
|
13151
|
+
totalDrawers: drawersToRender.length,
|
|
13152
|
+
width: (_a = drawerWidth[width]) != null ? _a : width,
|
|
13153
|
+
minWidth,
|
|
13154
|
+
maxWidth,
|
|
13155
|
+
onOverlayClick: onRequestClose,
|
|
13156
|
+
leftAligned,
|
|
13157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13158
|
+
"div",
|
|
13159
|
+
{
|
|
13160
|
+
...getDrawerAttributes({ providerId, stackId: stackId2, id }),
|
|
13161
|
+
style: { width: "100%", height: "100%" }
|
|
13162
|
+
}
|
|
13163
|
+
)
|
|
13164
|
+
},
|
|
13165
|
+
`${stackId2}-${id}`
|
|
13166
|
+
);
|
|
13167
|
+
})
|
|
12979
13168
|
}
|
|
12980
|
-
)
|
|
13169
|
+
);
|
|
12981
13170
|
};
|
|
12982
13171
|
var DrawerWrapper = ({
|
|
12983
13172
|
index,
|
|
@@ -12995,9 +13184,9 @@ var DrawerWrapper = ({
|
|
|
12995
13184
|
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
12996
13185
|
}
|
|
12997
13186
|
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
12998
|
-
return /* @__PURE__ */ (0,
|
|
12999
|
-
/* @__PURE__ */ (0,
|
|
13000
|
-
/* @__PURE__ */ (0,
|
|
13187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
13188
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
13189
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13001
13190
|
"div",
|
|
13002
13191
|
{
|
|
13003
13192
|
css: [drawerWrapperStyles, leftAligned ? drawerWrapperLeftAlignedStyles : null],
|
|
@@ -13007,97 +13196,12 @@ var DrawerWrapper = ({
|
|
|
13007
13196
|
)
|
|
13008
13197
|
] });
|
|
13009
13198
|
};
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
var Drawer = import_react50.default.forwardRef(
|
|
13015
|
-
({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
13016
|
-
const { stackId: inheritedStackId } = useCurrentDrawerRenderer();
|
|
13017
|
-
const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
|
|
13018
|
-
return inheritedStackId ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : drawerProps.stackId ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DrawerInner, { ref, ...drawerProps }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(DrawerProvider, { children: [
|
|
13019
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DrawerInner, { ref, ...drawerProps }),
|
|
13020
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
13021
|
-
] });
|
|
13022
|
-
}
|
|
13023
|
-
);
|
|
13024
|
-
var DrawerInner = ({
|
|
13025
|
-
ref,
|
|
13026
|
-
stackId = defaultSackId,
|
|
13027
|
-
id,
|
|
13028
|
-
bgColor,
|
|
13029
|
-
children,
|
|
13030
|
-
header,
|
|
13031
|
-
instanceKey,
|
|
13032
|
-
onRequestClose,
|
|
13033
|
-
testId = "side-dialog"
|
|
13199
|
+
var getDrawerAttributes = ({
|
|
13200
|
+
providerId,
|
|
13201
|
+
stackId,
|
|
13202
|
+
id
|
|
13034
13203
|
}) => {
|
|
13035
|
-
|
|
13036
|
-
const closeButtonRef = (0, import_react50.useRef)(null);
|
|
13037
|
-
const component = (0, import_react50.useMemo)(() => {
|
|
13038
|
-
const headerId = `dialog-header-${stackId}-${id}`;
|
|
13039
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
13040
|
-
"div",
|
|
13041
|
-
{
|
|
13042
|
-
ref,
|
|
13043
|
-
id,
|
|
13044
|
-
role: "dialog",
|
|
13045
|
-
tabIndex: -1,
|
|
13046
|
-
"aria-labelledby": headerId,
|
|
13047
|
-
css: drawerStyles(bgColor),
|
|
13048
|
-
"data-test-id": testId,
|
|
13049
|
-
children: [
|
|
13050
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { css: headerWrapperStyles, children: [
|
|
13051
|
-
header ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
13052
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13053
|
-
Button,
|
|
13054
|
-
{
|
|
13055
|
-
ref: closeButtonRef,
|
|
13056
|
-
type: "button",
|
|
13057
|
-
onClick: onRequestClose,
|
|
13058
|
-
css: drawerCloseButtonStyles,
|
|
13059
|
-
title: "Close dialog",
|
|
13060
|
-
buttonType: "ghost",
|
|
13061
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13062
|
-
Icon,
|
|
13063
|
-
{
|
|
13064
|
-
icon: import_cg10.CgChevronRight,
|
|
13065
|
-
iconColor: "gray",
|
|
13066
|
-
size: 24,
|
|
13067
|
-
css: { transform: "rotate(var(--drawer-close-icon-rotation))" }
|
|
13068
|
-
}
|
|
13069
|
-
)
|
|
13070
|
-
}
|
|
13071
|
-
)
|
|
13072
|
-
] }),
|
|
13073
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: drawerInnerStyles, children })
|
|
13074
|
-
]
|
|
13075
|
-
}
|
|
13076
|
-
);
|
|
13077
|
-
}, [children, header, id, stackId, bgColor, onRequestClose, ref, testId]);
|
|
13078
|
-
(0, import_react50.useEffect)(() => {
|
|
13079
|
-
registerDrawer({
|
|
13080
|
-
drawer: {
|
|
13081
|
-
id,
|
|
13082
|
-
component,
|
|
13083
|
-
stackId,
|
|
13084
|
-
onRequestClose,
|
|
13085
|
-
instanceKey
|
|
13086
|
-
},
|
|
13087
|
-
onFirstRender: () => {
|
|
13088
|
-
setTimeout(() => {
|
|
13089
|
-
var _a, _b;
|
|
13090
|
-
if (ref && "current" in ref && !((_a = ref.current) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
13091
|
-
(_b = closeButtonRef.current) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
13092
|
-
}
|
|
13093
|
-
}, 0);
|
|
13094
|
-
}
|
|
13095
|
-
});
|
|
13096
|
-
}, [component, instanceKey, registerDrawer]);
|
|
13097
|
-
(0, import_react50.useEffect)(() => {
|
|
13098
|
-
return () => unregisterDrawer({ id, stackId, instanceKey });
|
|
13099
|
-
}, [id, stackId, instanceKey, unregisterDrawer]);
|
|
13100
|
-
return null;
|
|
13204
|
+
return { "data-drawer-id": `${providerId}-${stackId}-${id}` };
|
|
13101
13205
|
};
|
|
13102
13206
|
|
|
13103
13207
|
// src/components/Input/styles/CaptionText.styles.ts
|
|
@@ -13111,9 +13215,9 @@ var CaptionText = (dynamicSize) => import_react51.css`
|
|
|
13111
13215
|
`;
|
|
13112
13216
|
|
|
13113
13217
|
// src/components/Input/Caption.tsx
|
|
13114
|
-
var
|
|
13218
|
+
var import_jsx_runtime42 = require("@emotion/react/jsx-runtime");
|
|
13115
13219
|
var Caption = ({ children, testId, dynamicSize = false, ...props }) => {
|
|
13116
|
-
return /* @__PURE__ */ (0,
|
|
13220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("small", { css: CaptionText(dynamicSize), "data-test-id": testId, ...props, children });
|
|
13117
13221
|
};
|
|
13118
13222
|
|
|
13119
13223
|
// src/components/Input/CheckboxWithInfo.tsx
|
|
@@ -13192,21 +13296,21 @@ var InfoDialogMessage = import_react52.css`
|
|
|
13192
13296
|
`;
|
|
13193
13297
|
|
|
13194
13298
|
// src/components/Input/CheckboxWithInfo.tsx
|
|
13195
|
-
var
|
|
13299
|
+
var import_jsx_runtime43 = require("@emotion/react/jsx-runtime");
|
|
13196
13300
|
var InfoDialog = ({ message }) => {
|
|
13197
|
-
return /* @__PURE__ */ (0,
|
|
13198
|
-
/* @__PURE__ */ (0,
|
|
13199
|
-
/* @__PURE__ */ (0,
|
|
13301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { "data-testid": "info-dialog", css: InfoDialogContainer, children: [
|
|
13302
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: "info", iconColor: "action", size: "0.9rem" }),
|
|
13303
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { role: "paragraph", css: InfoDialogMessage, className: "info-message", children: message })
|
|
13200
13304
|
] });
|
|
13201
13305
|
};
|
|
13202
13306
|
var CheckboxWithInfo = (0, import_react53.forwardRef)(
|
|
13203
13307
|
({ label, name, info, ...props }, ref) => {
|
|
13204
|
-
return /* @__PURE__ */ (0,
|
|
13205
|
-
/* @__PURE__ */ (0,
|
|
13206
|
-
/* @__PURE__ */ (0,
|
|
13207
|
-
/* @__PURE__ */ (0,
|
|
13308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { css: CheckboxWithInfoContainer, children: [
|
|
13309
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("label", { css: CheckboxWithInfoLabel, children: [
|
|
13310
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("input", { type: "checkbox", name, ref, css: CheckboxWithInfoInput, ...props }),
|
|
13311
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: label })
|
|
13208
13312
|
] }),
|
|
13209
|
-
info ? /* @__PURE__ */ (0,
|
|
13313
|
+
info ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(InfoDialog, { message: info }) : null
|
|
13210
13314
|
] });
|
|
13211
13315
|
}
|
|
13212
13316
|
);
|
|
@@ -13224,16 +13328,16 @@ var ErrorText = import_react54.css`
|
|
|
13224
13328
|
`;
|
|
13225
13329
|
|
|
13226
13330
|
// src/components/Input/ErrorMessage.tsx
|
|
13227
|
-
var
|
|
13331
|
+
var import_jsx_runtime44 = require("@emotion/react/jsx-runtime");
|
|
13228
13332
|
var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
13229
|
-
return message ? /* @__PURE__ */ (0,
|
|
13230
|
-
/* @__PURE__ */ (0,
|
|
13333
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { role: "alert", css: ErrorText, "data-test-id": testId, ...otherProps, children: [
|
|
13334
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: import_md2.MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
13231
13335
|
message
|
|
13232
13336
|
] }) : null;
|
|
13233
13337
|
};
|
|
13234
13338
|
|
|
13235
13339
|
// src/components/Input/Fieldset.tsx
|
|
13236
|
-
var
|
|
13340
|
+
var React12 = __toESM(require("react"));
|
|
13237
13341
|
|
|
13238
13342
|
// src/components/Input/styles/Fieldset.styles.ts
|
|
13239
13343
|
var import_react55 = require("@emotion/react");
|
|
@@ -13276,12 +13380,12 @@ var fieldsetBody = import_react55.css`
|
|
|
13276
13380
|
`;
|
|
13277
13381
|
|
|
13278
13382
|
// src/components/Input/Fieldset.tsx
|
|
13279
|
-
var
|
|
13280
|
-
var Fieldset =
|
|
13383
|
+
var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
|
|
13384
|
+
var Fieldset = React12.forwardRef(
|
|
13281
13385
|
({ legend, disabled, children, invert, ...props }, ref) => {
|
|
13282
|
-
return /* @__PURE__ */ (0,
|
|
13386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("fieldset", { css: fieldsetContainer(Boolean(invert)), ref, disabled, ...props, children: [
|
|
13283
13387
|
legend,
|
|
13284
|
-
/* @__PURE__ */ (0,
|
|
13388
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { css: fieldsetBody, children })
|
|
13285
13389
|
] });
|
|
13286
13390
|
}
|
|
13287
13391
|
);
|
|
@@ -13305,21 +13409,21 @@ var InfoIcon2 = import_react56.css`
|
|
|
13305
13409
|
`;
|
|
13306
13410
|
|
|
13307
13411
|
// src/components/Input/InfoMessage.tsx
|
|
13308
|
-
var
|
|
13412
|
+
var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
|
|
13309
13413
|
var InfoMessage = ({ message, testId, ...props }) => {
|
|
13310
|
-
return message ? /* @__PURE__ */ (0,
|
|
13311
|
-
/* @__PURE__ */ (0,
|
|
13414
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { role: "status", css: InfoText, "data-test-id": testId, ...props, children: [
|
|
13415
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { css: InfoIcon2, icon: import_md3.MdInfoOutline, size: "1rem", iconColor: "currentColor" }) }),
|
|
13312
13416
|
message
|
|
13313
13417
|
] }) : null;
|
|
13314
13418
|
};
|
|
13315
13419
|
|
|
13316
13420
|
// src/components/Input/Input.tsx
|
|
13317
|
-
var
|
|
13421
|
+
var React13 = __toESM(require("react"));
|
|
13318
13422
|
|
|
13319
13423
|
// src/components/Input/Label.tsx
|
|
13320
|
-
var
|
|
13424
|
+
var import_jsx_runtime47 = require("@emotion/react/jsx-runtime");
|
|
13321
13425
|
var Label = ({ children, className, testId, ...props }) => {
|
|
13322
|
-
return /* @__PURE__ */ (0,
|
|
13426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13323
13427
|
"label",
|
|
13324
13428
|
{
|
|
13325
13429
|
css: [labelText, typeof className === "object" ? className : void 0],
|
|
@@ -13347,17 +13451,17 @@ var WarningIcon = import_react57.css`
|
|
|
13347
13451
|
`;
|
|
13348
13452
|
|
|
13349
13453
|
// src/components/Input/WarningMessage.tsx
|
|
13350
|
-
var
|
|
13454
|
+
var import_jsx_runtime48 = require("@emotion/react/jsx-runtime");
|
|
13351
13455
|
var WarningMessage = ({ message, testId, ...props }) => {
|
|
13352
|
-
return message ? /* @__PURE__ */ (0,
|
|
13353
|
-
/* @__PURE__ */ (0,
|
|
13456
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { role: "status", css: WarningText, "data-test-id": testId, ...props, children: [
|
|
13457
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { css: WarningIcon, icon: import_md4.MdWarning, size: "1rem", iconColor: "currentColor" }) }),
|
|
13354
13458
|
message
|
|
13355
13459
|
] }) : null;
|
|
13356
13460
|
};
|
|
13357
13461
|
|
|
13358
13462
|
// src/components/Input/Input.tsx
|
|
13359
|
-
var
|
|
13360
|
-
var Input =
|
|
13463
|
+
var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
|
|
13464
|
+
var Input = React13.forwardRef(
|
|
13361
13465
|
({
|
|
13362
13466
|
label,
|
|
13363
13467
|
icon,
|
|
@@ -13375,8 +13479,8 @@ var Input = React14.forwardRef(
|
|
|
13375
13479
|
classNameLabel,
|
|
13376
13480
|
...props
|
|
13377
13481
|
}, ref) => {
|
|
13378
|
-
return /* @__PURE__ */ (0,
|
|
13379
|
-
showLabel ? /* @__PURE__ */ (0,
|
|
13482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { css: inputContainer, "data-test-id": containerTestId ? containerTestId : "container-input-field", children: [
|
|
13483
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13380
13484
|
Label,
|
|
13381
13485
|
{
|
|
13382
13486
|
htmlFor: id,
|
|
@@ -13386,13 +13490,13 @@ var Input = React14.forwardRef(
|
|
|
13386
13490
|
children: label
|
|
13387
13491
|
}
|
|
13388
13492
|
) : null,
|
|
13389
|
-
/* @__PURE__ */ (0,
|
|
13493
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13390
13494
|
"div",
|
|
13391
13495
|
{
|
|
13392
13496
|
css: [inputContainer, typeof classNameContainer === "object" ? classNameContainer : void 0],
|
|
13393
13497
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13394
13498
|
children: [
|
|
13395
|
-
/* @__PURE__ */ (0,
|
|
13499
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13396
13500
|
"input",
|
|
13397
13501
|
{
|
|
13398
13502
|
id,
|
|
@@ -13408,23 +13512,23 @@ var Input = React14.forwardRef(
|
|
|
13408
13512
|
ref
|
|
13409
13513
|
}
|
|
13410
13514
|
),
|
|
13411
|
-
icon ? /* @__PURE__ */ (0,
|
|
13515
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { css: inputIcon, children: icon }) : null
|
|
13412
13516
|
]
|
|
13413
13517
|
}
|
|
13414
13518
|
),
|
|
13415
|
-
caption ? /* @__PURE__ */ (0,
|
|
13416
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
13417
|
-
warningMessage && !errorMessage ? /* @__PURE__ */ (0,
|
|
13519
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Caption, { testId: captionTestId, children: caption }) : null,
|
|
13520
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ErrorMessage, { message: errorMessage, testId: errorTestId }) : null,
|
|
13521
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WarningMessage, { message: warningMessage }) : null
|
|
13418
13522
|
] });
|
|
13419
13523
|
}
|
|
13420
13524
|
);
|
|
13421
13525
|
|
|
13422
13526
|
// src/components/Input/InputComboBox.tsx
|
|
13423
13527
|
var import_react_select = __toESM(require("react-select"));
|
|
13424
|
-
var
|
|
13528
|
+
var import_jsx_runtime50 = require("@emotion/react/jsx-runtime");
|
|
13425
13529
|
function InputComboBox(props) {
|
|
13426
13530
|
var _a;
|
|
13427
|
-
return /* @__PURE__ */ (0,
|
|
13531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
13428
13532
|
import_react_select.default,
|
|
13429
13533
|
{
|
|
13430
13534
|
...props,
|
|
@@ -13624,7 +13728,7 @@ var inlineSelectMenuClosed = import_react58.css`
|
|
|
13624
13728
|
`;
|
|
13625
13729
|
|
|
13626
13730
|
// src/components/Input/InputInlineSelect.tsx
|
|
13627
|
-
var
|
|
13731
|
+
var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
|
|
13628
13732
|
var InputInlineSelect = ({
|
|
13629
13733
|
classNameContainer,
|
|
13630
13734
|
options,
|
|
@@ -13638,7 +13742,7 @@ var InputInlineSelect = ({
|
|
|
13638
13742
|
const divRef = (0, import_react60.useRef)(null);
|
|
13639
13743
|
useOutsideClick(divRef, () => setMenuVisible(false));
|
|
13640
13744
|
const selected = options.find((option) => option.value === value);
|
|
13641
|
-
return /* @__PURE__ */ (0,
|
|
13745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
13642
13746
|
"div",
|
|
13643
13747
|
{
|
|
13644
13748
|
ref: divRef,
|
|
@@ -13648,7 +13752,7 @@ var InputInlineSelect = ({
|
|
|
13648
13752
|
`,
|
|
13649
13753
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13650
13754
|
children: [
|
|
13651
|
-
/* @__PURE__ */ (0,
|
|
13755
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
13652
13756
|
"button",
|
|
13653
13757
|
{
|
|
13654
13758
|
type: "button",
|
|
@@ -13662,18 +13766,18 @@ var InputInlineSelect = ({
|
|
|
13662
13766
|
disabled,
|
|
13663
13767
|
...props,
|
|
13664
13768
|
children: [
|
|
13665
|
-
/* @__PURE__ */ (0,
|
|
13666
|
-
disabled ? null : /* @__PURE__ */ (0,
|
|
13769
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: (_a = selected == null ? void 0 : selected.label) != null ? _a : value }),
|
|
13770
|
+
disabled ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { icon: import_cg11.CgChevronDown, iconColor: "currentColor", size: 24 })
|
|
13667
13771
|
]
|
|
13668
13772
|
}
|
|
13669
13773
|
),
|
|
13670
|
-
/* @__PURE__ */ (0,
|
|
13774
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
13671
13775
|
"div",
|
|
13672
13776
|
{
|
|
13673
13777
|
id: `and-or-${props.id}`,
|
|
13674
13778
|
css: [inlineSelectMenu, menuVisible ? void 0 : inlineSelectMenuClosed],
|
|
13675
13779
|
"aria-hidden": !menuVisible,
|
|
13676
|
-
children: options.map((opt) => /* @__PURE__ */ (0,
|
|
13780
|
+
children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
13677
13781
|
"button",
|
|
13678
13782
|
{
|
|
13679
13783
|
type: "button",
|
|
@@ -13694,7 +13798,7 @@ var InputInlineSelect = ({
|
|
|
13694
13798
|
};
|
|
13695
13799
|
|
|
13696
13800
|
// src/components/Input/InputKeywordSearch.tsx
|
|
13697
|
-
var
|
|
13801
|
+
var import_jsx_runtime52 = require("@emotion/react/jsx-runtime");
|
|
13698
13802
|
var InputKeywordSearch = ({
|
|
13699
13803
|
onSearchTextChanged,
|
|
13700
13804
|
disabled = false,
|
|
@@ -13713,7 +13817,7 @@ var InputKeywordSearch = ({
|
|
|
13713
13817
|
e.preventDefault();
|
|
13714
13818
|
}
|
|
13715
13819
|
};
|
|
13716
|
-
return /* @__PURE__ */ (0,
|
|
13820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13717
13821
|
Input,
|
|
13718
13822
|
{
|
|
13719
13823
|
type: "text",
|
|
@@ -13721,7 +13825,7 @@ var InputKeywordSearch = ({
|
|
|
13721
13825
|
placeholder,
|
|
13722
13826
|
showLabel: false,
|
|
13723
13827
|
value,
|
|
13724
|
-
icon: value ? /* @__PURE__ */ (0,
|
|
13828
|
+
icon: value ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { css: inputSearchCloseBtn, onClick: onClear, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { icon: "close", iconColor: "red", size: "1rem" }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { icon: "search", iconColor: "gray", size: "1rem" }),
|
|
13725
13829
|
onChange: handleSearchTextChanged,
|
|
13726
13830
|
onKeyPress: preventSubmitOnField,
|
|
13727
13831
|
disabled,
|
|
@@ -13732,7 +13836,7 @@ var InputKeywordSearch = ({
|
|
|
13732
13836
|
};
|
|
13733
13837
|
|
|
13734
13838
|
// src/components/Input/InputSelect.tsx
|
|
13735
|
-
var
|
|
13839
|
+
var import_jsx_runtime53 = require("@emotion/react/jsx-runtime");
|
|
13736
13840
|
var InputSelect = ({
|
|
13737
13841
|
label,
|
|
13738
13842
|
defaultOption,
|
|
@@ -13748,13 +13852,13 @@ var InputSelect = ({
|
|
|
13748
13852
|
classNameLabel,
|
|
13749
13853
|
...props
|
|
13750
13854
|
}) => {
|
|
13751
|
-
return /* @__PURE__ */ (0,
|
|
13855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
13752
13856
|
"div",
|
|
13753
13857
|
{
|
|
13754
13858
|
css: [inputContainer, typeof classNameContainer === "object" ? classNameContainer : void 0],
|
|
13755
13859
|
className: typeof classNameContainer === "string" ? classNameContainer : "",
|
|
13756
13860
|
children: [
|
|
13757
|
-
showLabel ? /* @__PURE__ */ (0,
|
|
13861
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
13758
13862
|
Label,
|
|
13759
13863
|
{
|
|
13760
13864
|
htmlFor: props.id,
|
|
@@ -13766,7 +13870,7 @@ var InputSelect = ({
|
|
|
13766
13870
|
]
|
|
13767
13871
|
}
|
|
13768
13872
|
) }) : null,
|
|
13769
|
-
/* @__PURE__ */ (0,
|
|
13873
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
13770
13874
|
"select",
|
|
13771
13875
|
{
|
|
13772
13876
|
title: label,
|
|
@@ -13781,23 +13885,23 @@ var InputSelect = ({
|
|
|
13781
13885
|
className: typeof classNameControl === "string" ? classNameControl : "",
|
|
13782
13886
|
...props,
|
|
13783
13887
|
children: [
|
|
13784
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
13785
|
-
options.map((opt, index) => /* @__PURE__ */ (0,
|
|
13888
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
13889
|
+
options.map((opt, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("option", { value: opt.label, ...opt }, index))
|
|
13786
13890
|
]
|
|
13787
13891
|
}
|
|
13788
13892
|
),
|
|
13789
|
-
caption ? /* @__PURE__ */ (0,
|
|
13790
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
13791
|
-
warningMessage && !errorMessage ? /* @__PURE__ */ (0,
|
|
13893
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Caption, { children: caption }) : null,
|
|
13894
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorMessage, { message: errorMessage }) : null,
|
|
13895
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(WarningMessage, { message: warningMessage }) : null
|
|
13792
13896
|
]
|
|
13793
13897
|
}
|
|
13794
13898
|
);
|
|
13795
13899
|
};
|
|
13796
13900
|
|
|
13797
13901
|
// src/components/Input/InputToggle.tsx
|
|
13798
|
-
var
|
|
13799
|
-
var
|
|
13800
|
-
var InputToggle =
|
|
13902
|
+
var React14 = __toESM(require("react"));
|
|
13903
|
+
var import_jsx_runtime54 = require("@emotion/react/jsx-runtime");
|
|
13904
|
+
var InputToggle = React14.forwardRef(
|
|
13801
13905
|
({
|
|
13802
13906
|
label,
|
|
13803
13907
|
type,
|
|
@@ -13811,13 +13915,13 @@ var InputToggle = React15.forwardRef(
|
|
|
13811
13915
|
fontWeight = "medium",
|
|
13812
13916
|
...props
|
|
13813
13917
|
}, ref) => {
|
|
13814
|
-
return /* @__PURE__ */ (0,
|
|
13918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
13815
13919
|
Label,
|
|
13816
13920
|
{
|
|
13817
13921
|
css: [inputToggleLabel, disabled ? inputDisabled : void 0],
|
|
13818
13922
|
"data-test-id": testId ? testId : "input-toggle",
|
|
13819
13923
|
children: [
|
|
13820
|
-
/* @__PURE__ */ (0,
|
|
13924
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13821
13925
|
"input",
|
|
13822
13926
|
{
|
|
13823
13927
|
ref,
|
|
@@ -13829,11 +13933,11 @@ var InputToggle = React15.forwardRef(
|
|
|
13829
13933
|
...props
|
|
13830
13934
|
}
|
|
13831
13935
|
),
|
|
13832
|
-
/* @__PURE__ */ (0,
|
|
13833
|
-
caption || errorMessage ? /* @__PURE__ */ (0,
|
|
13834
|
-
caption ? /* @__PURE__ */ (0,
|
|
13835
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
13836
|
-
warningMessage && !errorMessage ? /* @__PURE__ */ (0,
|
|
13936
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { css: inlineLabel(fontWeight), children: label }),
|
|
13937
|
+
caption || errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { css: inputToggleMessageContainer, children: [
|
|
13938
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Caption, { children: caption }) : null,
|
|
13939
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { message: errorMessage }) : null,
|
|
13940
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(WarningMessage, { message: warningMessage }) : null
|
|
13837
13941
|
] }) : null
|
|
13838
13942
|
]
|
|
13839
13943
|
}
|
|
@@ -13842,9 +13946,9 @@ var InputToggle = React15.forwardRef(
|
|
|
13842
13946
|
);
|
|
13843
13947
|
|
|
13844
13948
|
// src/components/Input/Legend.tsx
|
|
13845
|
-
var
|
|
13949
|
+
var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
|
|
13846
13950
|
var Legend = ({ children }) => {
|
|
13847
|
-
return /* @__PURE__ */ (0,
|
|
13951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("legend", { css: fieldsetLegend, children });
|
|
13848
13952
|
};
|
|
13849
13953
|
|
|
13850
13954
|
// src/components/Input/SuccessMessage.tsx
|
|
@@ -13866,16 +13970,16 @@ var SuccessIcon2 = import_react61.css`
|
|
|
13866
13970
|
`;
|
|
13867
13971
|
|
|
13868
13972
|
// src/components/Input/SuccessMessage.tsx
|
|
13869
|
-
var
|
|
13973
|
+
var import_jsx_runtime56 = require("@emotion/react/jsx-runtime");
|
|
13870
13974
|
var SuccessMessage = ({ message, testId, ...props }) => {
|
|
13871
|
-
return message ? /* @__PURE__ */ (0,
|
|
13872
|
-
/* @__PURE__ */ (0,
|
|
13975
|
+
return message ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { role: "status", css: SuccessText, "data-test-id": testId, ...props, children: [
|
|
13976
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { css: SuccessIcon2, icon: import_cg12.CgCheckO, size: "1rem", iconColor: "currentColor" }) }),
|
|
13873
13977
|
message
|
|
13874
13978
|
] }) : null;
|
|
13875
13979
|
};
|
|
13876
13980
|
|
|
13877
13981
|
// src/components/Input/Textarea.tsx
|
|
13878
|
-
var
|
|
13982
|
+
var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
|
|
13879
13983
|
var Textarea = ({
|
|
13880
13984
|
label,
|
|
13881
13985
|
icon,
|
|
@@ -13886,10 +13990,10 @@ var Textarea = ({
|
|
|
13886
13990
|
warningMessage,
|
|
13887
13991
|
...props
|
|
13888
13992
|
}) => {
|
|
13889
|
-
return /* @__PURE__ */ (0,
|
|
13890
|
-
showLabel ? /* @__PURE__ */ (0,
|
|
13891
|
-
/* @__PURE__ */ (0,
|
|
13892
|
-
/* @__PURE__ */ (0,
|
|
13993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
13994
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { htmlFor: id, css: [labelText], children: label }) : null,
|
|
13995
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { css: [inputContainer], children: [
|
|
13996
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13893
13997
|
"textarea",
|
|
13894
13998
|
{
|
|
13895
13999
|
id,
|
|
@@ -13898,17 +14002,17 @@ var Textarea = ({
|
|
|
13898
14002
|
...props
|
|
13899
14003
|
}
|
|
13900
14004
|
),
|
|
13901
|
-
icon ? /* @__PURE__ */ (0,
|
|
14005
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { css: inputIcon, children: icon }) : null
|
|
13902
14006
|
] }),
|
|
13903
|
-
caption ? /* @__PURE__ */ (0,
|
|
13904
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
13905
|
-
warningMessage && !errorMessage ? /* @__PURE__ */ (0,
|
|
14007
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Caption, { children: caption }) : null,
|
|
14008
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ErrorMessage, { message: errorMessage }) : null,
|
|
14009
|
+
warningMessage && !errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(WarningMessage, { message: warningMessage }) : null
|
|
13906
14010
|
] });
|
|
13907
14011
|
};
|
|
13908
14012
|
|
|
13909
14013
|
// src/components/JsonEditor/JsonEditor.tsx
|
|
13910
14014
|
var import_react62 = __toESM(require("@monaco-editor/react"));
|
|
13911
|
-
var
|
|
14015
|
+
var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
|
|
13912
14016
|
var minEditorHeightPx = 150;
|
|
13913
14017
|
var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
13914
14018
|
let effectiveHeight = height;
|
|
@@ -13918,7 +14022,7 @@ var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
|
13918
14022
|
if (typeof effectiveHeight === "number" && effectiveHeight < minEditorHeightPx) {
|
|
13919
14023
|
effectiveHeight = minEditorHeightPx;
|
|
13920
14024
|
}
|
|
13921
|
-
return /* @__PURE__ */ (0,
|
|
14025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13922
14026
|
import_react62.default,
|
|
13923
14027
|
{
|
|
13924
14028
|
height: effectiveHeight,
|
|
@@ -13987,7 +14091,7 @@ var LimitsBarTextColor = (statusColor) => import_react63.css`
|
|
|
13987
14091
|
`;
|
|
13988
14092
|
|
|
13989
14093
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
13990
|
-
var
|
|
14094
|
+
var import_jsx_runtime59 = require("@emotion/react/jsx-runtime");
|
|
13991
14095
|
var LimitsBar = ({ current, max, label }) => {
|
|
13992
14096
|
const maxPercentage = 100;
|
|
13993
14097
|
const progressBarValue = Math.ceil(current / max * maxPercentage);
|
|
@@ -13998,16 +14102,16 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
13998
14102
|
danger: "var(--brand-secondary-5)"
|
|
13999
14103
|
};
|
|
14000
14104
|
const statusColor = progressBarValue === 100 ? colorMap.danger : progressBarValue >= 75 ? colorMap.warn : colorMap.base;
|
|
14001
|
-
return /* @__PURE__ */ (0,
|
|
14002
|
-
/* @__PURE__ */ (0,
|
|
14003
|
-
/* @__PURE__ */ (0,
|
|
14004
|
-
/* @__PURE__ */ (0,
|
|
14105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { css: LimitsBarContainer, children: [
|
|
14106
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { css: LimitsBarLabelContainer, children: [
|
|
14107
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { css: LimitsBarLabel, children: label }),
|
|
14108
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { css: [LimitsBarLabel, LimitsBarTextColor(statusColor)], children: [
|
|
14005
14109
|
current,
|
|
14006
14110
|
" of ",
|
|
14007
14111
|
max
|
|
14008
14112
|
] })
|
|
14009
14113
|
] }),
|
|
14010
|
-
/* @__PURE__ */ (0,
|
|
14114
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
14011
14115
|
"div",
|
|
14012
14116
|
{
|
|
14013
14117
|
role: "progressbar",
|
|
@@ -14016,7 +14120,7 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
14016
14120
|
"aria-valuemax": max,
|
|
14017
14121
|
"aria-valuetext": `${current} of ${max}`,
|
|
14018
14122
|
css: LimitsBarProgressBar,
|
|
14019
|
-
children: /* @__PURE__ */ (0,
|
|
14123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
14020
14124
|
"span",
|
|
14021
14125
|
{
|
|
14022
14126
|
role: "presentation",
|
|
@@ -14048,10 +14152,10 @@ var LinkListTitle = import_react64.css`
|
|
|
14048
14152
|
`;
|
|
14049
14153
|
|
|
14050
14154
|
// src/components/LinkList/LinkList.tsx
|
|
14051
|
-
var
|
|
14155
|
+
var import_jsx_runtime60 = require("@emotion/react/jsx-runtime");
|
|
14052
14156
|
var LinkList = ({ title, padding = "var(--spacing-md)", children, ...props }) => {
|
|
14053
|
-
return /* @__PURE__ */ (0,
|
|
14054
|
-
/* @__PURE__ */ (0,
|
|
14157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: LinkListContainer(padding), ...props, children: [
|
|
14158
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Heading, { level: 3, css: LinkListTitle, children: title }),
|
|
14055
14159
|
children
|
|
14056
14160
|
] });
|
|
14057
14161
|
};
|
|
@@ -14087,10 +14191,10 @@ var ScrollableListInner = import_react65.css`
|
|
|
14087
14191
|
`;
|
|
14088
14192
|
|
|
14089
14193
|
// src/components/List/ScrollableList.tsx
|
|
14090
|
-
var
|
|
14194
|
+
var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
|
|
14091
14195
|
var ScrollableList = ({ label, children, ...props }) => {
|
|
14092
|
-
return /* @__PURE__ */ (0,
|
|
14093
|
-
label ? /* @__PURE__ */ (0,
|
|
14196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
14197
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14094
14198
|
"span",
|
|
14095
14199
|
{
|
|
14096
14200
|
css: import_react66.css`
|
|
@@ -14099,7 +14203,7 @@ var ScrollableList = ({ label, children, ...props }) => {
|
|
|
14099
14203
|
children: label
|
|
14100
14204
|
}
|
|
14101
14205
|
) : null,
|
|
14102
|
-
/* @__PURE__ */ (0,
|
|
14206
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
14103
14207
|
] });
|
|
14104
14208
|
};
|
|
14105
14209
|
|
|
@@ -14171,7 +14275,7 @@ var ScrollableListIconVisible = import_react67.css`
|
|
|
14171
14275
|
`;
|
|
14172
14276
|
|
|
14173
14277
|
// src/components/List/ScrollableListInputItem.tsx
|
|
14174
|
-
var
|
|
14278
|
+
var import_jsx_runtime62 = require("@emotion/react/jsx-runtime");
|
|
14175
14279
|
var ScrollableListInputItem = ({
|
|
14176
14280
|
label,
|
|
14177
14281
|
icon,
|
|
@@ -14181,7 +14285,7 @@ var ScrollableListInputItem = ({
|
|
|
14181
14285
|
labelTestId,
|
|
14182
14286
|
...props
|
|
14183
14287
|
}) => {
|
|
14184
|
-
return /* @__PURE__ */ (0,
|
|
14288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14185
14289
|
"div",
|
|
14186
14290
|
{
|
|
14187
14291
|
css: [
|
|
@@ -14190,13 +14294,13 @@ var ScrollableListInputItem = ({
|
|
|
14190
14294
|
active ? ScrollableListItemActive : void 0
|
|
14191
14295
|
],
|
|
14192
14296
|
...props,
|
|
14193
|
-
children: /* @__PURE__ */ (0,
|
|
14194
|
-
/* @__PURE__ */ (0,
|
|
14297
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("label", { "data-test-id": labelTestId, css: ScrollableListInputLabel, children: [
|
|
14298
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { css: ScrollableListInputText, children: [
|
|
14195
14299
|
icon,
|
|
14196
14300
|
label
|
|
14197
14301
|
] }),
|
|
14198
|
-
/* @__PURE__ */ (0,
|
|
14199
|
-
/* @__PURE__ */ (0,
|
|
14302
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { css: ScrollableListHiddenInput, children }),
|
|
14303
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14200
14304
|
Icon,
|
|
14201
14305
|
{
|
|
14202
14306
|
icon: import_cg13.CgCheck,
|
|
@@ -14214,14 +14318,14 @@ var ScrollableListInputItem = ({
|
|
|
14214
14318
|
|
|
14215
14319
|
// src/components/List/ScrollableListItem.tsx
|
|
14216
14320
|
var import_cg14 = require("react-icons/cg");
|
|
14217
|
-
var
|
|
14321
|
+
var import_jsx_runtime63 = require("@emotion/react/jsx-runtime");
|
|
14218
14322
|
var ScrollableListItem = ({
|
|
14219
14323
|
buttonText,
|
|
14220
14324
|
active,
|
|
14221
14325
|
disableShadow,
|
|
14222
14326
|
...props
|
|
14223
14327
|
}) => {
|
|
14224
|
-
return /* @__PURE__ */ (0,
|
|
14328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
14225
14329
|
"div",
|
|
14226
14330
|
{
|
|
14227
14331
|
css: [
|
|
@@ -14229,9 +14333,9 @@ var ScrollableListItem = ({
|
|
|
14229
14333
|
disableShadow ? void 0 : ScrollableListItemShadow,
|
|
14230
14334
|
active ? ScrollableListItemActive : void 0
|
|
14231
14335
|
],
|
|
14232
|
-
children: /* @__PURE__ */ (0,
|
|
14233
|
-
/* @__PURE__ */ (0,
|
|
14234
|
-
/* @__PURE__ */ (0,
|
|
14336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
|
|
14337
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: buttonText }),
|
|
14338
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
14235
14339
|
Icon,
|
|
14236
14340
|
{
|
|
14237
14341
|
icon: import_cg14.CgCheck,
|
|
@@ -14292,12 +14396,12 @@ var loadingDot = import_react68.css`
|
|
|
14292
14396
|
`;
|
|
14293
14397
|
|
|
14294
14398
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
14295
|
-
var
|
|
14399
|
+
var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
|
|
14296
14400
|
var LoadingIndicator = ({ ...props }) => {
|
|
14297
|
-
return /* @__PURE__ */ (0,
|
|
14298
|
-
/* @__PURE__ */ (0,
|
|
14299
|
-
/* @__PURE__ */ (0,
|
|
14300
|
-
/* @__PURE__ */ (0,
|
|
14401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { role: "alert", css: loader, "data-test-id": "loading-indicator", ...props, children: [
|
|
14402
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { css: loadingDot }),
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { css: loadingDot }),
|
|
14404
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { css: loadingDot })
|
|
14301
14405
|
] });
|
|
14302
14406
|
};
|
|
14303
14407
|
|
|
@@ -14337,7 +14441,7 @@ var loadingOverlayMessage = import_react69.css`
|
|
|
14337
14441
|
`;
|
|
14338
14442
|
|
|
14339
14443
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
14340
|
-
var
|
|
14444
|
+
var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
|
|
14341
14445
|
var LoadingOverlay = ({
|
|
14342
14446
|
isActive,
|
|
14343
14447
|
statusMessage,
|
|
@@ -14363,7 +14467,7 @@ var LoadingOverlay = ({
|
|
|
14363
14467
|
(_f = lottieRef.current) == null ? void 0 : _f.stop();
|
|
14364
14468
|
}
|
|
14365
14469
|
}, [isPaused]);
|
|
14366
|
-
return /* @__PURE__ */ (0,
|
|
14470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
14367
14471
|
"div",
|
|
14368
14472
|
{
|
|
14369
14473
|
role: "alert",
|
|
@@ -14371,9 +14475,9 @@ var LoadingOverlay = ({
|
|
|
14371
14475
|
"aria-hidden": !isActive,
|
|
14372
14476
|
"aria-busy": isActive && !isPaused,
|
|
14373
14477
|
children: [
|
|
14374
|
-
/* @__PURE__ */ (0,
|
|
14375
|
-
/* @__PURE__ */ (0,
|
|
14376
|
-
/* @__PURE__ */ (0,
|
|
14478
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { css: loadingOverlayBackground(overlayBackgroundColor) }),
|
|
14479
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { css: { position: "relative", maxWidth: "100%", margin: isTopAligned ? "0" : "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { css: loadingOverlayBody, children: [
|
|
14480
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14377
14481
|
AnimationFile,
|
|
14378
14482
|
{
|
|
14379
14483
|
lottieRef,
|
|
@@ -14388,15 +14492,15 @@ var LoadingOverlay = ({
|
|
|
14388
14492
|
}
|
|
14389
14493
|
}
|
|
14390
14494
|
),
|
|
14391
|
-
statusMessage ? /* @__PURE__ */ (0,
|
|
14392
|
-
/* @__PURE__ */ (0,
|
|
14495
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { css: loadingOverlayMessage, children: statusMessage }) : null,
|
|
14496
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { css: { width: "100%", marginTop: "var(--spacing-md)" }, children })
|
|
14393
14497
|
] }) })
|
|
14394
14498
|
]
|
|
14395
14499
|
}
|
|
14396
14500
|
);
|
|
14397
14501
|
};
|
|
14398
14502
|
var LoadingIcon = ({ height, width, ...props }) => {
|
|
14399
|
-
return /* @__PURE__ */ (0,
|
|
14503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14400
14504
|
"svg",
|
|
14401
14505
|
{
|
|
14402
14506
|
"data-testid": "svg",
|
|
@@ -14407,9 +14511,9 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
14407
14511
|
stroke: "currentColor",
|
|
14408
14512
|
...props,
|
|
14409
14513
|
"data-test-id": "loading-icon",
|
|
14410
|
-
children: /* @__PURE__ */ (0,
|
|
14411
|
-
/* @__PURE__ */ (0,
|
|
14412
|
-
/* @__PURE__ */ (0,
|
|
14514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
14515
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("circle", { strokeOpacity: ".25", cx: "18", cy: "18", r: "18" }),
|
|
14516
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", transform: "rotate(166.645 18 18)", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14413
14517
|
"animateTransform",
|
|
14414
14518
|
{
|
|
14415
14519
|
attributeName: "transform",
|
|
@@ -14559,7 +14663,7 @@ var IntegrationTileFloatingButtonMessage = (clicked) => import_react71.css`
|
|
|
14559
14663
|
`;
|
|
14560
14664
|
|
|
14561
14665
|
// src/components/Tiles/CreateTeamIntegrationTile.tsx
|
|
14562
|
-
var
|
|
14666
|
+
var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
|
|
14563
14667
|
var CreateTeamIntegrationTile = ({
|
|
14564
14668
|
title = "Create a custom integration for your team",
|
|
14565
14669
|
buttonText = "Add Integration",
|
|
@@ -14567,9 +14671,9 @@ var CreateTeamIntegrationTile = ({
|
|
|
14567
14671
|
asDeepLink = false,
|
|
14568
14672
|
...props
|
|
14569
14673
|
}) => {
|
|
14570
|
-
return /* @__PURE__ */ (0,
|
|
14571
|
-
/* @__PURE__ */ (0,
|
|
14572
|
-
/* @__PURE__ */ (0,
|
|
14674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: [IntegrationTileContainer, IntegrationTileBtnDashedBorder], ...props, children: [
|
|
14675
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { css: IntegrationTileTitle, title, children: title }),
|
|
14676
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
14573
14677
|
Button,
|
|
14574
14678
|
{
|
|
14575
14679
|
buttonType: "tertiary",
|
|
@@ -14579,7 +14683,7 @@ var CreateTeamIntegrationTile = ({
|
|
|
14579
14683
|
css: IntegrationTitleFakeButton,
|
|
14580
14684
|
children: [
|
|
14581
14685
|
buttonText,
|
|
14582
|
-
asDeepLink ? /* @__PURE__ */ (0,
|
|
14686
|
+
asDeepLink ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
14583
14687
|
Icon,
|
|
14584
14688
|
{
|
|
14585
14689
|
icon: import_cg15.CgChevronRight,
|
|
@@ -14589,7 +14693,7 @@ var CreateTeamIntegrationTile = ({
|
|
|
14589
14693
|
order: 1;
|
|
14590
14694
|
`
|
|
14591
14695
|
}
|
|
14592
|
-
) : /* @__PURE__ */ (0,
|
|
14696
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
14593
14697
|
Icon,
|
|
14594
14698
|
{
|
|
14595
14699
|
icon: import_cg15.CgAdd,
|
|
@@ -14608,31 +14712,31 @@ var CreateTeamIntegrationTile = ({
|
|
|
14608
14712
|
|
|
14609
14713
|
// src/components/Tiles/IntegrationBadges.tsx
|
|
14610
14714
|
var import_cg16 = require("react-icons/cg");
|
|
14611
|
-
var
|
|
14715
|
+
var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
|
|
14612
14716
|
var IntegrationedAddedBadge = ({ text = "Added" }) => {
|
|
14613
|
-
return /* @__PURE__ */ (0,
|
|
14614
|
-
/* @__PURE__ */ (0,
|
|
14717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { "data-testid": "integration-icon-installed", css: IntegrationAddedText, children: [
|
|
14718
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { icon: import_cg16.CgCheck, iconColor: "currentColor" }),
|
|
14615
14719
|
text
|
|
14616
14720
|
] });
|
|
14617
14721
|
};
|
|
14618
14722
|
var IntegrationCustomBadge = ({ text = "Custom" }) => {
|
|
14619
|
-
return /* @__PURE__ */ (0,
|
|
14723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { "data-testid": "integration-is-private", css: IntegrationCustomBadgeText("gray"), children: text });
|
|
14620
14724
|
};
|
|
14621
14725
|
var IntegrationPremiumBadge = ({ text = "Premium" }) => {
|
|
14622
|
-
return /* @__PURE__ */ (0,
|
|
14623
|
-
/* @__PURE__ */ (0,
|
|
14726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { css: IntegrationCustomBadgeText("blue"), children: [
|
|
14727
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { icon: import_cg16.CgLock, iconColor: "currentColor", size: 12 }),
|
|
14624
14728
|
text
|
|
14625
14729
|
] });
|
|
14626
14730
|
};
|
|
14627
14731
|
var IntegrationComingSoonBadge = ({ text = "Coming soon" }) => {
|
|
14628
|
-
return /* @__PURE__ */ (0,
|
|
14629
|
-
/* @__PURE__ */ (0,
|
|
14732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { css: IntegrationCustomBadgeText("blue"), children: [
|
|
14733
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { icon: import_cg16.CgSandClock, iconColor: "currentColor", size: 12 }),
|
|
14630
14734
|
text
|
|
14631
14735
|
] });
|
|
14632
14736
|
};
|
|
14633
14737
|
|
|
14634
14738
|
// src/components/Tiles/ResolveIcon.tsx
|
|
14635
|
-
var
|
|
14739
|
+
var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
|
|
14636
14740
|
var ResolveIcon = ({ icon, name, styleType = "logo", ...props }) => {
|
|
14637
14741
|
const CompIcon = icon && typeof icon !== "string" ? icon : null;
|
|
14638
14742
|
const mapClassName = {
|
|
@@ -14640,13 +14744,13 @@ var ResolveIcon = ({ icon, name, styleType = "logo", ...props }) => {
|
|
|
14640
14744
|
logo: IntegrationTitleLogo
|
|
14641
14745
|
};
|
|
14642
14746
|
if (icon) {
|
|
14643
|
-
return CompIcon ? /* @__PURE__ */ (0,
|
|
14747
|
+
return CompIcon ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CompIcon, { css: mapClassName[styleType], ...props }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("img", { src: icon, alt: name, css: mapClassName[styleType], ...props });
|
|
14644
14748
|
}
|
|
14645
14749
|
return null;
|
|
14646
14750
|
};
|
|
14647
14751
|
|
|
14648
14752
|
// src/components/Tiles/EditTeamIntegrationTile.tsx
|
|
14649
|
-
var
|
|
14753
|
+
var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
|
|
14650
14754
|
var EditTeamIntegrationTile = ({
|
|
14651
14755
|
id,
|
|
14652
14756
|
icon,
|
|
@@ -14655,17 +14759,17 @@ var EditTeamIntegrationTile = ({
|
|
|
14655
14759
|
isPublic,
|
|
14656
14760
|
canEdit = false
|
|
14657
14761
|
}) => {
|
|
14658
|
-
return /* @__PURE__ */ (0,
|
|
14762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
14659
14763
|
"div",
|
|
14660
14764
|
{
|
|
14661
14765
|
css: IntegrationTileContainer,
|
|
14662
14766
|
"data-testid": "configure-integration-container",
|
|
14663
14767
|
"integration-id": `${id.toLocaleLowerCase()}`,
|
|
14664
14768
|
children: [
|
|
14665
|
-
/* @__PURE__ */ (0,
|
|
14666
|
-
/* @__PURE__ */ (0,
|
|
14667
|
-
!isPublic ? /* @__PURE__ */ (0,
|
|
14668
|
-
canEdit ? /* @__PURE__ */ (0,
|
|
14769
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ResolveIcon, { icon, name, "data-test-id": "integration-logo" }),
|
|
14770
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { css: IntegrationTileName, "data-test-id": "integration-card-name", children: name }),
|
|
14771
|
+
!isPublic ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IntegrationCustomBadge, {}) : null,
|
|
14772
|
+
canEdit ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
14669
14773
|
Button,
|
|
14670
14774
|
{
|
|
14671
14775
|
buttonType: "unimportant",
|
|
@@ -14686,7 +14790,7 @@ var EditTeamIntegrationTile = ({
|
|
|
14686
14790
|
var import_react73 = require("@emotion/react");
|
|
14687
14791
|
var import_react74 = require("react");
|
|
14688
14792
|
var import_cg17 = require("react-icons/cg");
|
|
14689
|
-
var
|
|
14793
|
+
var import_jsx_runtime70 = require("@emotion/react/jsx-runtime");
|
|
14690
14794
|
var IntegrationComingSoon = ({
|
|
14691
14795
|
name,
|
|
14692
14796
|
icon,
|
|
@@ -14708,17 +14812,17 @@ var IntegrationComingSoon = ({
|
|
|
14708
14812
|
};
|
|
14709
14813
|
}
|
|
14710
14814
|
}, [upVote, setUpVote, timing]);
|
|
14711
|
-
return /* @__PURE__ */ (0,
|
|
14815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
14712
14816
|
"div",
|
|
14713
14817
|
{
|
|
14714
14818
|
css: IntegrationTileContainer,
|
|
14715
14819
|
"data-testid": `coming-soon-${id.toLowerCase()}-integration`,
|
|
14716
14820
|
...props,
|
|
14717
14821
|
children: [
|
|
14718
|
-
/* @__PURE__ */ (0,
|
|
14719
|
-
/* @__PURE__ */ (0,
|
|
14720
|
-
/* @__PURE__ */ (0,
|
|
14721
|
-
/* @__PURE__ */ (0,
|
|
14822
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IntegrationComingSoonBadge, {}),
|
|
14823
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ResolveIcon, { icon, name }),
|
|
14824
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { css: IntegrationTileName, title: name, children: name }),
|
|
14825
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
14722
14826
|
Button,
|
|
14723
14827
|
{
|
|
14724
14828
|
buttonType: "unimportant",
|
|
@@ -14728,8 +14832,8 @@ var IntegrationComingSoon = ({
|
|
|
14728
14832
|
role: "link",
|
|
14729
14833
|
css: [IntegrationTileFloatingButton, IntegrationTileFloatingButtonMessage(upVote)],
|
|
14730
14834
|
children: [
|
|
14731
|
-
/* @__PURE__ */ (0,
|
|
14732
|
-
/* @__PURE__ */ (0,
|
|
14835
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("strong", { children: "+1" }),
|
|
14836
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
14733
14837
|
"span",
|
|
14734
14838
|
{
|
|
14735
14839
|
css: import_react73.css`
|
|
@@ -14739,8 +14843,8 @@ var IntegrationComingSoon = ({
|
|
|
14739
14843
|
children: "(I want this)"
|
|
14740
14844
|
}
|
|
14741
14845
|
),
|
|
14742
|
-
/* @__PURE__ */ (0,
|
|
14743
|
-
/* @__PURE__ */ (0,
|
|
14846
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { "aria-hidden": !upVote, children: [
|
|
14847
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon, { icon: import_cg17.CgHeart, iconColor: "currentColor", size: 18 }),
|
|
14744
14848
|
"Thanks!"
|
|
14745
14849
|
] })
|
|
14746
14850
|
]
|
|
@@ -14796,12 +14900,12 @@ var IntegrationLoadingFrame = import_react75.css`
|
|
|
14796
14900
|
`;
|
|
14797
14901
|
|
|
14798
14902
|
// src/components/Tiles/IntegrationLoadingTile.tsx
|
|
14799
|
-
var
|
|
14903
|
+
var import_jsx_runtime71 = require("@emotion/react/jsx-runtime");
|
|
14800
14904
|
var IntegrationLoadingTile = ({ count = 1 }) => {
|
|
14801
14905
|
const componentCount = Array.from(Array(count).keys());
|
|
14802
|
-
return /* @__PURE__ */ (0,
|
|
14803
|
-
/* @__PURE__ */ (0,
|
|
14804
|
-
/* @__PURE__ */ (0,
|
|
14906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, { children: componentCount.map((i) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { css: IntegrationLoadingTileContainer, children: [
|
|
14907
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { css: [IntegrationLoadingTileImg, IntegrationLoadingFrame], role: "presentation" }),
|
|
14908
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { css: [IntegrationLoadingTileText, IntegrationLoadingFrame] })
|
|
14805
14909
|
] }, i)) });
|
|
14806
14910
|
};
|
|
14807
14911
|
|
|
@@ -14821,7 +14925,7 @@ var IntegrationModalImage = import_react76.css`
|
|
|
14821
14925
|
`;
|
|
14822
14926
|
|
|
14823
14927
|
// src/components/Tiles/IntegrationModalIcon.tsx
|
|
14824
|
-
var
|
|
14928
|
+
var import_jsx_runtime72 = require("@emotion/react/jsx-runtime");
|
|
14825
14929
|
var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
14826
14930
|
const CompIcon = icon && typeof icon !== "string" ? icon : null;
|
|
14827
14931
|
let iconSrc = void 0;
|
|
@@ -14837,9 +14941,9 @@ var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
|
14837
14941
|
}
|
|
14838
14942
|
}
|
|
14839
14943
|
}
|
|
14840
|
-
return /* @__PURE__ */ (0,
|
|
14841
|
-
/* @__PURE__ */ (0,
|
|
14842
|
-
/* @__PURE__ */ (0,
|
|
14944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { css: IntegrationModalIconContainer, children: [
|
|
14945
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("svg", { width: "49", height: "57", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", children: [
|
|
14946
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
14843
14947
|
"path",
|
|
14844
14948
|
{
|
|
14845
14949
|
d: "m24.367 1.813 22.786 13.322V41.78L24.367 55.102 1.581 41.78V15.135L24.367 1.814Z",
|
|
@@ -14848,12 +14952,12 @@ var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
|
14848
14952
|
strokeWidth: "2"
|
|
14849
14953
|
}
|
|
14850
14954
|
),
|
|
14851
|
-
/* @__PURE__ */ (0,
|
|
14852
|
-
/* @__PURE__ */ (0,
|
|
14853
|
-
/* @__PURE__ */ (0,
|
|
14955
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("linearGradient", { id: "a", x1: "41.353", y1: "49.107", x2: "8.048", y2: "4.478", gradientUnits: "userSpaceOnUse", children: [
|
|
14956
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("stop", { stopColor: "#1768B2" }),
|
|
14957
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("stop", { offset: "1", stopColor: "#B3EFE4" })
|
|
14854
14958
|
] }) })
|
|
14855
14959
|
] }),
|
|
14856
|
-
CompIcon ? /* @__PURE__ */ (0,
|
|
14960
|
+
CompIcon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(CompIcon, { role: "img", css: IntegrationModalImage, ...imgProps }) : iconSrc ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
14857
14961
|
"img",
|
|
14858
14962
|
{
|
|
14859
14963
|
src: iconSrc,
|
|
@@ -14867,7 +14971,7 @@ var IntegrationModalIcon = ({ icon, name, ...imgProps }) => {
|
|
|
14867
14971
|
};
|
|
14868
14972
|
|
|
14869
14973
|
// src/components/Tiles/IntegrationTile.tsx
|
|
14870
|
-
var
|
|
14974
|
+
var import_jsx_runtime73 = require("@emotion/react/jsx-runtime");
|
|
14871
14975
|
var IntegrationTile = ({
|
|
14872
14976
|
id,
|
|
14873
14977
|
icon,
|
|
@@ -14879,7 +14983,7 @@ var IntegrationTile = ({
|
|
|
14879
14983
|
authorIcon,
|
|
14880
14984
|
...btnProps
|
|
14881
14985
|
}) => {
|
|
14882
|
-
return /* @__PURE__ */ (0,
|
|
14986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
14883
14987
|
"button",
|
|
14884
14988
|
{
|
|
14885
14989
|
type: "button",
|
|
@@ -14889,12 +14993,12 @@ var IntegrationTile = ({
|
|
|
14889
14993
|
"aria-label": name,
|
|
14890
14994
|
...btnProps,
|
|
14891
14995
|
children: [
|
|
14892
|
-
/* @__PURE__ */ (0,
|
|
14893
|
-
/* @__PURE__ */ (0,
|
|
14894
|
-
isInstalled ? /* @__PURE__ */ (0,
|
|
14895
|
-
requiedEntitlement && isPublic ? /* @__PURE__ */ (0,
|
|
14896
|
-
!isPublic ? /* @__PURE__ */ (0,
|
|
14897
|
-
authorIcon ? /* @__PURE__ */ (0,
|
|
14996
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ResolveIcon, { icon, name }),
|
|
14997
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { css: IntegrationTileName, title: name, children: name }),
|
|
14998
|
+
isInstalled ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(IntegrationedAddedBadge, {}) : null,
|
|
14999
|
+
requiedEntitlement && isPublic ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(IntegrationPremiumBadge, {}) : null,
|
|
15000
|
+
!isPublic ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(IntegrationCustomBadge, {}) : null,
|
|
15001
|
+
authorIcon ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ResolveIcon, { icon: authorIcon, name }) : null
|
|
14898
15002
|
]
|
|
14899
15003
|
}
|
|
14900
15004
|
);
|
|
@@ -14922,9 +15026,9 @@ var Tile = import_react77.css`
|
|
|
14922
15026
|
`;
|
|
14923
15027
|
|
|
14924
15028
|
// src/components/Tiles/Tile.tsx
|
|
14925
|
-
var
|
|
15029
|
+
var import_jsx_runtime74 = require("@emotion/react/jsx-runtime");
|
|
14926
15030
|
var Tile2 = ({ children, ...props }) => {
|
|
14927
|
-
return /* @__PURE__ */ (0,
|
|
15031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("button", { type: "button", css: Tile, ...props, children });
|
|
14928
15032
|
};
|
|
14929
15033
|
|
|
14930
15034
|
// src/components/Tiles/styles/TileContainer.styles.ts
|
|
@@ -14940,7 +15044,7 @@ var TileContainerInner = (gap, templateColumns) => import_react78.css`
|
|
|
14940
15044
|
`;
|
|
14941
15045
|
|
|
14942
15046
|
// src/components/Tiles/TileContainer.tsx
|
|
14943
|
-
var
|
|
15047
|
+
var import_jsx_runtime75 = require("@emotion/react/jsx-runtime");
|
|
14944
15048
|
var TileContainer = ({
|
|
14945
15049
|
bgColor = "var(--brand-secondary-2)",
|
|
14946
15050
|
containerPadding = "base",
|
|
@@ -14949,7 +15053,7 @@ var TileContainer = ({
|
|
|
14949
15053
|
children,
|
|
14950
15054
|
...props
|
|
14951
15055
|
}) => {
|
|
14952
|
-
return /* @__PURE__ */ (0,
|
|
15056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: TileContainerWrapper(bgColor, containerPadding), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: TileContainerInner(gap, gridTemplateColumns), children }) });
|
|
14953
15057
|
};
|
|
14954
15058
|
|
|
14955
15059
|
// src/components/Tiles/styles/TileText.styles.ts
|
|
@@ -14964,10 +15068,10 @@ var TileText = import_react79.css`
|
|
|
14964
15068
|
`;
|
|
14965
15069
|
|
|
14966
15070
|
// src/components/Tiles/TileText.tsx
|
|
14967
|
-
var
|
|
15071
|
+
var import_jsx_runtime76 = require("@emotion/react/jsx-runtime");
|
|
14968
15072
|
var TileText2 = ({ as = "heading", children, ...props }) => {
|
|
14969
15073
|
const isHeading = as === "heading";
|
|
14970
|
-
return /* @__PURE__ */ (0,
|
|
15074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
14971
15075
|
"span",
|
|
14972
15076
|
{
|
|
14973
15077
|
role: isHeading ? "heading" : void 0,
|
|
@@ -15009,9 +15113,9 @@ var IntegrationModalHeaderContentWrapper = import_react80.css`
|
|
|
15009
15113
|
`;
|
|
15010
15114
|
|
|
15011
15115
|
// src/components/Modal/IntegrationModalHeader.tsx
|
|
15012
|
-
var
|
|
15116
|
+
var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
|
|
15013
15117
|
var HexModalBackground = ({ ...props }) => {
|
|
15014
|
-
return /* @__PURE__ */ (0,
|
|
15118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
15015
15119
|
"svg",
|
|
15016
15120
|
{
|
|
15017
15121
|
width: "236",
|
|
@@ -15021,7 +15125,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15021
15125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15022
15126
|
...props,
|
|
15023
15127
|
children: [
|
|
15024
|
-
/* @__PURE__ */ (0,
|
|
15128
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
15025
15129
|
"path",
|
|
15026
15130
|
{
|
|
15027
15131
|
fillRule: "evenodd",
|
|
@@ -15030,7 +15134,7 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15030
15134
|
fill: "url(#paint0_linear_196_2737)"
|
|
15031
15135
|
}
|
|
15032
15136
|
),
|
|
15033
|
-
/* @__PURE__ */ (0,
|
|
15137
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
15034
15138
|
"linearGradient",
|
|
15035
15139
|
{
|
|
15036
15140
|
id: "paint0_linear_196_2737",
|
|
@@ -15040,8 +15144,8 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15040
15144
|
y2: "-95.2742",
|
|
15041
15145
|
gradientUnits: "userSpaceOnUse",
|
|
15042
15146
|
children: [
|
|
15043
|
-
/* @__PURE__ */ (0,
|
|
15044
|
-
/* @__PURE__ */ (0,
|
|
15147
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("stop", { stopColor: "#81DCDE" }),
|
|
15148
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("stop", { offset: "1", stopColor: "#428ED4" })
|
|
15045
15149
|
]
|
|
15046
15150
|
}
|
|
15047
15151
|
) })
|
|
@@ -15050,17 +15154,17 @@ var HexModalBackground = ({ ...props }) => {
|
|
|
15050
15154
|
);
|
|
15051
15155
|
};
|
|
15052
15156
|
var IntegrationModalHeader = ({ icon, name, menu: menu2, children }) => {
|
|
15053
|
-
return /* @__PURE__ */ (0,
|
|
15054
|
-
/* @__PURE__ */ (0,
|
|
15055
|
-
/* @__PURE__ */ (0,
|
|
15056
|
-
icon ? /* @__PURE__ */ (0,
|
|
15057
|
-
/* @__PURE__ */ (0,
|
|
15058
|
-
menu2 ? /* @__PURE__ */ (0,
|
|
15157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
15158
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(HexModalBackground, { css: IntegrationModalHeaderSVGBackground, role: "presentation" }),
|
|
15159
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: IntegrationModalHeaderGroup, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { css: IntegrationModalHeaderTitleGroup, children: [
|
|
15160
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(IntegrationModalIcon, { icon, name: name || "" }) : null,
|
|
15161
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Heading, { level: 3, css: IntegrationModalHeaderTitle, "data-test-id": "integration-modal-title", children: name || "Create Team Integration" }),
|
|
15162
|
+
menu2 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { css: IntegrationModalHeaderMenuPlacement, children: [
|
|
15059
15163
|
menu2,
|
|
15060
15164
|
" "
|
|
15061
15165
|
] }) : null
|
|
15062
15166
|
] }) }),
|
|
15063
|
-
/* @__PURE__ */ (0,
|
|
15167
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: IntegrationModalHeaderContentWrapper, children })
|
|
15064
15168
|
] });
|
|
15065
15169
|
};
|
|
15066
15170
|
|
|
@@ -15086,13 +15190,13 @@ var TooltipArrowStyles = import_react81.css`
|
|
|
15086
15190
|
`;
|
|
15087
15191
|
|
|
15088
15192
|
// src/components/Tooltip/Tooltip.tsx
|
|
15089
|
-
var
|
|
15193
|
+
var import_jsx_runtime78 = require("@emotion/react/jsx-runtime");
|
|
15090
15194
|
function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
|
|
15091
15195
|
const tooltip = (0, import_Tooltip.useTooltipState)({ placement });
|
|
15092
|
-
return !title ? children : /* @__PURE__ */ (0,
|
|
15093
|
-
/* @__PURE__ */ (0,
|
|
15094
|
-
/* @__PURE__ */ (0,
|
|
15095
|
-
/* @__PURE__ */ (0,
|
|
15196
|
+
return !title ? children : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
15197
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_Tooltip.TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => import_react82.default.cloneElement(children, referenceProps) }),
|
|
15198
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_Tooltip.Tooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_Tooltip.TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
|
|
15096
15200
|
title
|
|
15097
15201
|
] })
|
|
15098
15202
|
] });
|
|
@@ -15124,7 +15228,7 @@ var inputIconBtn = import_react83.css`
|
|
|
15124
15228
|
`;
|
|
15125
15229
|
|
|
15126
15230
|
// src/components/ParameterInputs/ConnectToDataElementButton.tsx
|
|
15127
|
-
var
|
|
15231
|
+
var import_jsx_runtime79 = require("@emotion/react/jsx-runtime");
|
|
15128
15232
|
var ConnectToDataElementButton = ({
|
|
15129
15233
|
icon,
|
|
15130
15234
|
iconColor,
|
|
@@ -15134,7 +15238,7 @@ var ConnectToDataElementButton = ({
|
|
|
15134
15238
|
...props
|
|
15135
15239
|
}) => {
|
|
15136
15240
|
const title = isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
15137
|
-
return /* @__PURE__ */ (0,
|
|
15241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Tooltip, { title, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
15138
15242
|
"button",
|
|
15139
15243
|
{
|
|
15140
15244
|
css: inputIconBtn,
|
|
@@ -15143,7 +15247,7 @@ var ConnectToDataElementButton = ({
|
|
|
15143
15247
|
"aria-disabled": isLocked,
|
|
15144
15248
|
...props,
|
|
15145
15249
|
children: [
|
|
15146
|
-
/* @__PURE__ */ (0,
|
|
15250
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
15147
15251
|
Icon,
|
|
15148
15252
|
{
|
|
15149
15253
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -15441,7 +15545,7 @@ var linkParameterIcon = import_react85.css`
|
|
|
15441
15545
|
`;
|
|
15442
15546
|
|
|
15443
15547
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
15444
|
-
var
|
|
15548
|
+
var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
|
|
15445
15549
|
function ParameterDataResource({
|
|
15446
15550
|
label,
|
|
15447
15551
|
labelLeadingIcon,
|
|
@@ -15451,12 +15555,12 @@ function ParameterDataResource({
|
|
|
15451
15555
|
disabled,
|
|
15452
15556
|
children
|
|
15453
15557
|
}) {
|
|
15454
|
-
return /* @__PURE__ */ (0,
|
|
15455
|
-
/* @__PURE__ */ (0,
|
|
15558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
15559
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { css: labelText2, children: [
|
|
15456
15560
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
15457
15561
|
label
|
|
15458
15562
|
] }),
|
|
15459
|
-
/* @__PURE__ */ (0,
|
|
15563
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
15460
15564
|
"button",
|
|
15461
15565
|
{
|
|
15462
15566
|
type: "button",
|
|
@@ -15465,12 +15569,12 @@ function ParameterDataResource({
|
|
|
15465
15569
|
disabled,
|
|
15466
15570
|
onClick: onConnectDatasource,
|
|
15467
15571
|
children: [
|
|
15468
|
-
/* @__PURE__ */ (0,
|
|
15572
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
15469
15573
|
children
|
|
15470
15574
|
]
|
|
15471
15575
|
}
|
|
15472
15576
|
),
|
|
15473
|
-
caption ? /* @__PURE__ */ (0,
|
|
15577
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Caption, { children: caption }) : null
|
|
15474
15578
|
] });
|
|
15475
15579
|
}
|
|
15476
15580
|
|
|
@@ -15496,12 +15600,12 @@ var ParameterDrawerHeaderTitle = import_react86.css`
|
|
|
15496
15600
|
`;
|
|
15497
15601
|
|
|
15498
15602
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
15499
|
-
var
|
|
15603
|
+
var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
|
|
15500
15604
|
var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
15501
|
-
return /* @__PURE__ */ (0,
|
|
15502
|
-
/* @__PURE__ */ (0,
|
|
15605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
15606
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
15503
15607
|
iconBeforeTitle,
|
|
15504
|
-
/* @__PURE__ */ (0,
|
|
15608
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Heading, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title, children: title })
|
|
15505
15609
|
] }),
|
|
15506
15610
|
children
|
|
15507
15611
|
] });
|
|
@@ -15531,11 +15635,11 @@ var fieldsetLegend2 = import_react87.css`
|
|
|
15531
15635
|
`;
|
|
15532
15636
|
|
|
15533
15637
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
15534
|
-
var
|
|
15638
|
+
var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
|
|
15535
15639
|
var ParameterGroup = (0, import_react88.forwardRef)(
|
|
15536
15640
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
15537
|
-
return /* @__PURE__ */ (0,
|
|
15538
|
-
/* @__PURE__ */ (0,
|
|
15641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
15642
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
15539
15643
|
children
|
|
15540
15644
|
] });
|
|
15541
15645
|
}
|
|
@@ -15544,25 +15648,35 @@ var ParameterGroup = (0, import_react88.forwardRef)(
|
|
|
15544
15648
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
15545
15649
|
var import_react92 = require("react");
|
|
15546
15650
|
|
|
15651
|
+
// src/utils/url.ts
|
|
15652
|
+
var isValidUrl = (url, options = {}) => {
|
|
15653
|
+
try {
|
|
15654
|
+
new URL(url, options.allowRelative ? "https://defaultbaseurl.com" : void 0);
|
|
15655
|
+
return true;
|
|
15656
|
+
} catch (e) {
|
|
15657
|
+
return false;
|
|
15658
|
+
}
|
|
15659
|
+
};
|
|
15660
|
+
|
|
15547
15661
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
15548
15662
|
var import_react91 = require("react");
|
|
15549
15663
|
|
|
15550
15664
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
15551
|
-
var
|
|
15665
|
+
var import_jsx_runtime83 = require("@emotion/react/jsx-runtime");
|
|
15552
15666
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
15553
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
15667
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
15554
15668
|
};
|
|
15555
15669
|
|
|
15556
15670
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
15557
15671
|
var import_react89 = require("react");
|
|
15558
|
-
var
|
|
15672
|
+
var import_jsx_runtime84 = require("@emotion/react/jsx-runtime");
|
|
15559
15673
|
var ParameterMenuButton = (0, import_react89.forwardRef)(
|
|
15560
15674
|
({ label, children }, ref) => {
|
|
15561
|
-
return /* @__PURE__ */ (0,
|
|
15675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
15562
15676
|
Menu,
|
|
15563
15677
|
{
|
|
15564
15678
|
menuLabel: `${label} menu`,
|
|
15565
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
15679
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
15566
15680
|
"button",
|
|
15567
15681
|
{
|
|
15568
15682
|
className: "parameter-menu",
|
|
@@ -15570,7 +15684,7 @@ var ParameterMenuButton = (0, import_react89.forwardRef)(
|
|
|
15570
15684
|
type: "button",
|
|
15571
15685
|
"aria-label": `${label} options`,
|
|
15572
15686
|
ref,
|
|
15573
|
-
children: /* @__PURE__ */ (0,
|
|
15687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
15574
15688
|
}
|
|
15575
15689
|
),
|
|
15576
15690
|
children
|
|
@@ -15607,7 +15721,7 @@ var overrideMarker = import_react90.css`
|
|
|
15607
15721
|
`;
|
|
15608
15722
|
|
|
15609
15723
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
15610
|
-
var
|
|
15724
|
+
var import_jsx_runtime85 = require("@emotion/react/jsx-runtime");
|
|
15611
15725
|
var extractParameterProps = (props) => {
|
|
15612
15726
|
const {
|
|
15613
15727
|
id,
|
|
@@ -15667,18 +15781,18 @@ var ParameterShell = ({
|
|
|
15667
15781
|
const [manualErrorMessage, setManualErrorMessage] = (0, import_react91.useState)(void 0);
|
|
15668
15782
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
15669
15783
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
15670
|
-
return /* @__PURE__ */ (0,
|
|
15671
|
-
hiddenLabel || title ? null : /* @__PURE__ */ (0,
|
|
15784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: inputContainer2, ...props, children: [
|
|
15785
|
+
hiddenLabel || title ? null : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
15672
15786
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
15673
15787
|
label
|
|
15674
15788
|
] }),
|
|
15675
|
-
!title ? null : /* @__PURE__ */ (0,
|
|
15789
|
+
!title ? null : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
15676
15790
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
15677
15791
|
title
|
|
15678
15792
|
] }),
|
|
15679
|
-
/* @__PURE__ */ (0,
|
|
15680
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
15681
|
-
/* @__PURE__ */ (0,
|
|
15793
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: inputWrapper, children: [
|
|
15794
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
15795
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
15682
15796
|
ParameterShellContext.Provider,
|
|
15683
15797
|
{
|
|
15684
15798
|
value: {
|
|
@@ -15688,32 +15802,32 @@ var ParameterShell = ({
|
|
|
15688
15802
|
errorMessage: errorMessaging,
|
|
15689
15803
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
15690
15804
|
},
|
|
15691
|
-
children: /* @__PURE__ */ (0,
|
|
15805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ParameterShellPlaceholder, { children: [
|
|
15692
15806
|
children,
|
|
15693
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
15807
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
15694
15808
|
] })
|
|
15695
15809
|
}
|
|
15696
15810
|
)
|
|
15697
15811
|
] }),
|
|
15698
|
-
caption ? /* @__PURE__ */ (0,
|
|
15699
|
-
errorMessaging ? /* @__PURE__ */ (0,
|
|
15700
|
-
warningMessage ? /* @__PURE__ */ (0,
|
|
15701
|
-
infoMessage ? /* @__PURE__ */ (0,
|
|
15812
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Caption, { testId: captionTestId, children: caption }) : null,
|
|
15813
|
+
errorMessaging ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ErrorMessage, { message: errorMessaging, testId: errorTestId }) : null,
|
|
15814
|
+
warningMessage ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(WarningMessage, { message: warningMessage }) : null,
|
|
15815
|
+
infoMessage ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InfoMessage, { message: infoMessage }) : null
|
|
15702
15816
|
] });
|
|
15703
15817
|
};
|
|
15704
15818
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
15705
|
-
return /* @__PURE__ */ (0,
|
|
15819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { css: emptyParameterShell, children });
|
|
15706
15820
|
};
|
|
15707
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
15821
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
15708
15822
|
|
|
15709
15823
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
15710
|
-
var
|
|
15824
|
+
var import_jsx_runtime86 = require("@emotion/react/jsx-runtime");
|
|
15711
15825
|
var ParameterImage = (0, import_react92.forwardRef)((props, ref) => {
|
|
15712
15826
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15713
|
-
return /* @__PURE__ */ (0,
|
|
15827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ParameterImageInner, { ref, ...innerProps }) });
|
|
15714
15828
|
});
|
|
15715
15829
|
var BrokenImage = ({ ...props }) => {
|
|
15716
|
-
return /* @__PURE__ */ (0,
|
|
15830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
15717
15831
|
"svg",
|
|
15718
15832
|
{
|
|
15719
15833
|
role: "img",
|
|
@@ -15725,11 +15839,11 @@ var BrokenImage = ({ ...props }) => {
|
|
|
15725
15839
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
15726
15840
|
...props,
|
|
15727
15841
|
children: [
|
|
15728
|
-
/* @__PURE__ */ (0,
|
|
15729
|
-
/* @__PURE__ */ (0,
|
|
15730
|
-
/* @__PURE__ */ (0,
|
|
15731
|
-
/* @__PURE__ */ (0,
|
|
15732
|
-
/* @__PURE__ */ (0,
|
|
15842
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("rect", { width: "214", height: "214", fill: "#F9FAFB" }),
|
|
15843
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("rect", { width: "214", height: "214", fill: "url(#pattern0)" }),
|
|
15844
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("defs", { children: [
|
|
15845
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("pattern", { id: "pattern0", patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("use", { xlinkHref: "#image0_761_4353", transform: "scale(0.0025)" }) }),
|
|
15846
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
15733
15847
|
"image",
|
|
15734
15848
|
{
|
|
15735
15849
|
id: "image0_761_4353",
|
|
@@ -15751,14 +15865,11 @@ var ParameterImageInner = (0, import_react92.forwardRef)(
|
|
|
15751
15865
|
const deferredValue = (0, import_react92.useDeferredValue)(value);
|
|
15752
15866
|
const errorText = "The text you provided is not a valid URL";
|
|
15753
15867
|
const updateImageSrc = (0, import_react92.useCallback)(() => {
|
|
15754
|
-
const validUrl = new RegExp(
|
|
15755
|
-
/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_.+~#?&/=]*)$/
|
|
15756
|
-
);
|
|
15757
15868
|
let message = void 0;
|
|
15758
15869
|
try {
|
|
15759
15870
|
if (value !== "") {
|
|
15760
15871
|
const url = String(value).startsWith("//") ? `${location.protocol}${value}` : String(value);
|
|
15761
|
-
if (!
|
|
15872
|
+
if (!isValidUrl(url) || !url.startsWith("https")) {
|
|
15762
15873
|
throw Error(errorText);
|
|
15763
15874
|
}
|
|
15764
15875
|
}
|
|
@@ -15787,8 +15898,8 @@ var ParameterImageInner = (0, import_react92.forwardRef)(
|
|
|
15787
15898
|
(0, import_react92.useEffect)(() => {
|
|
15788
15899
|
updateImageSrc();
|
|
15789
15900
|
}, [deferredValue]);
|
|
15790
|
-
return /* @__PURE__ */ (0,
|
|
15791
|
-
/* @__PURE__ */ (0,
|
|
15901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
15902
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
15792
15903
|
"input",
|
|
15793
15904
|
{
|
|
15794
15905
|
css: input2,
|
|
@@ -15800,8 +15911,8 @@ var ParameterImageInner = (0, import_react92.forwardRef)(
|
|
|
15800
15911
|
...props
|
|
15801
15912
|
}
|
|
15802
15913
|
),
|
|
15803
|
-
/* @__PURE__ */ (0,
|
|
15804
|
-
deferredValue && !errorMessage ? /* @__PURE__ */ (0,
|
|
15914
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { css: imageWrapper, children: [
|
|
15915
|
+
deferredValue && !errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
15805
15916
|
"img",
|
|
15806
15917
|
{
|
|
15807
15918
|
src: deferredValue,
|
|
@@ -15812,24 +15923,24 @@ var ParameterImageInner = (0, import_react92.forwardRef)(
|
|
|
15812
15923
|
loading: "lazy"
|
|
15813
15924
|
}
|
|
15814
15925
|
) : null,
|
|
15815
|
-
deferredValue && errorMessage ? /* @__PURE__ */ (0,
|
|
15926
|
+
deferredValue && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(BrokenImage, { css: img }) : null
|
|
15816
15927
|
] }),
|
|
15817
|
-
loading ? /* @__PURE__ */ (0,
|
|
15928
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(LoadingIcon, {}) : null
|
|
15818
15929
|
] });
|
|
15819
15930
|
}
|
|
15820
15931
|
);
|
|
15821
15932
|
|
|
15822
15933
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
15823
15934
|
var import_react93 = require("react");
|
|
15824
|
-
var
|
|
15935
|
+
var import_jsx_runtime87 = require("@emotion/react/jsx-runtime");
|
|
15825
15936
|
var ParameterInput = (0, import_react93.forwardRef)((props, ref) => {
|
|
15826
15937
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15827
|
-
return /* @__PURE__ */ (0,
|
|
15938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ParameterShell, { "data-test-id": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
15828
15939
|
});
|
|
15829
15940
|
var ParameterInputInner = (0, import_react93.forwardRef)(
|
|
15830
15941
|
({ ...props }, ref) => {
|
|
15831
15942
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
15832
|
-
return /* @__PURE__ */ (0,
|
|
15943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
15833
15944
|
"input",
|
|
15834
15945
|
{
|
|
15835
15946
|
css: input2,
|
|
@@ -15846,18 +15957,18 @@ var ParameterInputInner = (0, import_react93.forwardRef)(
|
|
|
15846
15957
|
|
|
15847
15958
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
15848
15959
|
var import_react94 = require("react");
|
|
15849
|
-
var
|
|
15960
|
+
var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
|
|
15850
15961
|
var ParameterLink = (0, import_react94.forwardRef)(
|
|
15851
15962
|
({ buttonText = "Select link", disabled, onConnectLink, externalLink, ...props }, ref) => {
|
|
15852
15963
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15853
|
-
return /* @__PURE__ */ (0,
|
|
15964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15854
15965
|
ParameterShell,
|
|
15855
15966
|
{
|
|
15856
15967
|
"data-test-id": "link-parameter-editor",
|
|
15857
15968
|
...shellProps,
|
|
15858
15969
|
label: innerProps.value ? shellProps.label : "",
|
|
15859
15970
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
15860
|
-
children: !innerProps.value ? /* @__PURE__ */ (0,
|
|
15971
|
+
children: !innerProps.value ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("button", { type: "button", css: dataConnectButton, disabled, onClick: onConnectLink, children: buttonText }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15861
15972
|
ParameterLinkInner,
|
|
15862
15973
|
{
|
|
15863
15974
|
onConnectLink,
|
|
@@ -15873,8 +15984,8 @@ var ParameterLink = (0, import_react94.forwardRef)(
|
|
|
15873
15984
|
var ParameterLinkInner = (0, import_react94.forwardRef)(
|
|
15874
15985
|
({ externalLink, onConnectLink, disabled, ...props }, ref) => {
|
|
15875
15986
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
15876
|
-
return /* @__PURE__ */ (0,
|
|
15877
|
-
/* @__PURE__ */ (0,
|
|
15987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { css: inputWrapper, children: [
|
|
15988
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15878
15989
|
"input",
|
|
15879
15990
|
{
|
|
15880
15991
|
type: "text",
|
|
@@ -15886,8 +15997,8 @@ var ParameterLinkInner = (0, import_react94.forwardRef)(
|
|
|
15886
15997
|
...props
|
|
15887
15998
|
}
|
|
15888
15999
|
),
|
|
15889
|
-
/* @__PURE__ */ (0,
|
|
15890
|
-
/* @__PURE__ */ (0,
|
|
16000
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { css: linkParameterControls, children: [
|
|
16001
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15891
16002
|
"button",
|
|
15892
16003
|
{
|
|
15893
16004
|
type: "button",
|
|
@@ -15898,7 +16009,7 @@ var ParameterLinkInner = (0, import_react94.forwardRef)(
|
|
|
15898
16009
|
children: "edit"
|
|
15899
16010
|
}
|
|
15900
16011
|
),
|
|
15901
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
16012
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15902
16013
|
"a",
|
|
15903
16014
|
{
|
|
15904
16015
|
href: externalLink,
|
|
@@ -15906,7 +16017,7 @@ var ParameterLinkInner = (0, import_react94.forwardRef)(
|
|
|
15906
16017
|
title: "Open link in new tab",
|
|
15907
16018
|
target: "_blank",
|
|
15908
16019
|
rel: "noopener noreferrer",
|
|
15909
|
-
children: /* @__PURE__ */ (0,
|
|
16020
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
15910
16021
|
}
|
|
15911
16022
|
) : null
|
|
15912
16023
|
] })
|
|
@@ -15915,7 +16026,7 @@ var ParameterLinkInner = (0, import_react94.forwardRef)(
|
|
|
15915
16026
|
);
|
|
15916
16027
|
|
|
15917
16028
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
15918
|
-
var
|
|
16029
|
+
var import_jsx_runtime89 = require("@emotion/react/jsx-runtime");
|
|
15919
16030
|
var ParameterNameAndPublicIdInput = ({
|
|
15920
16031
|
id,
|
|
15921
16032
|
onBlur,
|
|
@@ -15941,8 +16052,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15941
16052
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
15942
16053
|
};
|
|
15943
16054
|
autoFocus == null ? void 0 : autoFocus();
|
|
15944
|
-
return /* @__PURE__ */ (0,
|
|
15945
|
-
/* @__PURE__ */ (0,
|
|
16055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
|
|
16056
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
15946
16057
|
ParameterInput,
|
|
15947
16058
|
{
|
|
15948
16059
|
id: nameIdField,
|
|
@@ -15961,7 +16072,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15961
16072
|
value: values[nameIdField]
|
|
15962
16073
|
}
|
|
15963
16074
|
),
|
|
15964
|
-
/* @__PURE__ */ (0,
|
|
16075
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
15965
16076
|
ParameterInput,
|
|
15966
16077
|
{
|
|
15967
16078
|
id: publicIdFieldName,
|
|
@@ -15975,11 +16086,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15975
16086
|
caption: publicIdCaption,
|
|
15976
16087
|
placeholder: publicIdPlaceholderText,
|
|
15977
16088
|
errorMessage: publicIdError,
|
|
15978
|
-
menuItems: /* @__PURE__ */ (0,
|
|
16089
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
15979
16090
|
MenuItem,
|
|
15980
16091
|
{
|
|
15981
16092
|
disabled: !values[publicIdFieldName],
|
|
15982
|
-
icon: /* @__PURE__ */ (0,
|
|
16093
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
15983
16094
|
onClick: handleCopyPidFieldValue,
|
|
15984
16095
|
children: "Copy"
|
|
15985
16096
|
}
|
|
@@ -15987,17 +16098,16 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
15987
16098
|
value: values[publicIdFieldName]
|
|
15988
16099
|
}
|
|
15989
16100
|
),
|
|
15990
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
16101
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
15991
16102
|
] });
|
|
15992
16103
|
};
|
|
15993
16104
|
|
|
15994
16105
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15995
|
-
var
|
|
15996
|
-
var import_code2 = require("@lexical/code");
|
|
16106
|
+
var import_react102 = require("@emotion/react");
|
|
15997
16107
|
var import_list3 = require("@lexical/list");
|
|
15998
16108
|
var import_markdown = require("@lexical/markdown");
|
|
15999
16109
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
16000
|
-
var
|
|
16110
|
+
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
16001
16111
|
var import_LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
|
|
16002
16112
|
var import_LexicalErrorBoundary = __toESM(require("@lexical/react/LexicalErrorBoundary"));
|
|
16003
16113
|
var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
|
|
@@ -16094,8 +16204,43 @@ var getLabelForElement = (type) => {
|
|
|
16094
16204
|
|
|
16095
16205
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
16096
16206
|
var import_fast_equals2 = require("fast-equals");
|
|
16097
|
-
var
|
|
16098
|
-
var
|
|
16207
|
+
var import_lexical6 = require("lexical");
|
|
16208
|
+
var import_react103 = require("react");
|
|
16209
|
+
|
|
16210
|
+
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
16211
|
+
var import_code = require("@lexical/code");
|
|
16212
|
+
var CustomCodeNode = import_code.CodeNode;
|
|
16213
|
+
var oldImportDOMMap = import_code.CodeNode.importDOM();
|
|
16214
|
+
var oldImportDOMMapPre = oldImportDOMMap.pre;
|
|
16215
|
+
oldImportDOMMap.pre = (node) => {
|
|
16216
|
+
if (node.childNodes.length === 1 && Array.from(node.childNodes).some((node2) => node2.nodeName === "CODE")) {
|
|
16217
|
+
return null;
|
|
16218
|
+
}
|
|
16219
|
+
return oldImportDOMMapPre(node);
|
|
16220
|
+
};
|
|
16221
|
+
CustomCodeNode.importDOM = function() {
|
|
16222
|
+
return oldImportDOMMap;
|
|
16223
|
+
};
|
|
16224
|
+
|
|
16225
|
+
// src/components/ParameterInputs/rich-text/DisableStylesPlugin.ts
|
|
16226
|
+
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
16227
|
+
var import_utils2 = require("@lexical/utils");
|
|
16228
|
+
var import_lexical = require("lexical");
|
|
16229
|
+
var import_react95 = require("react");
|
|
16230
|
+
function DisableStylesPlugin() {
|
|
16231
|
+
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
16232
|
+
(0, import_react95.useEffect)(() => {
|
|
16233
|
+
return (0, import_utils2.mergeRegister)(
|
|
16234
|
+
// Disable text alignment on paragraph nodes
|
|
16235
|
+
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
16236
|
+
if (node.getFormatType() !== "") {
|
|
16237
|
+
node.setFormat("");
|
|
16238
|
+
}
|
|
16239
|
+
})
|
|
16240
|
+
);
|
|
16241
|
+
}, [editor]);
|
|
16242
|
+
return null;
|
|
16243
|
+
}
|
|
16099
16244
|
|
|
16100
16245
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
16101
16246
|
var import_css = require("@emotion/css");
|
|
@@ -16119,6 +16264,8 @@ var textCode = import_css.css`
|
|
|
16119
16264
|
border-radius: var(--rounded-sm);
|
|
16120
16265
|
display: inline-block;
|
|
16121
16266
|
font-family: var(--ff-mono);
|
|
16267
|
+
font-feature-settings: 'liga' 0;
|
|
16268
|
+
font-variant-ligatures: none;
|
|
16122
16269
|
font-size: var(--fs-sm);
|
|
16123
16270
|
padding-left: var(--spacing-xs);
|
|
16124
16271
|
padding-right: var(--spacing-xs);
|
|
@@ -16263,6 +16410,8 @@ var codeElement = import_css.css`
|
|
|
16263
16410
|
border-radius: var(--rounded-sm);
|
|
16264
16411
|
display: block;
|
|
16265
16412
|
font-family: var(--ff-mono);
|
|
16413
|
+
font-feature-settings: 'liga' 0;
|
|
16414
|
+
font-variant-ligatures: none;
|
|
16266
16415
|
font-size: var(--fs-sm);
|
|
16267
16416
|
margin-bottom: var(--spacing-base);
|
|
16268
16417
|
padding: var(--spacing-sm);
|
|
@@ -16273,22 +16422,22 @@ var codeElement = import_css.css`
|
|
|
16273
16422
|
`;
|
|
16274
16423
|
|
|
16275
16424
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
16276
|
-
var
|
|
16277
|
-
var
|
|
16425
|
+
var import_react97 = require("@emotion/react");
|
|
16426
|
+
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
16278
16427
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
16279
|
-
var
|
|
16428
|
+
var import_utils3 = require("@lexical/utils");
|
|
16280
16429
|
var import_fast_equals = require("fast-equals");
|
|
16281
|
-
var
|
|
16282
|
-
var
|
|
16430
|
+
var import_lexical3 = require("lexical");
|
|
16431
|
+
var import_react98 = require("react");
|
|
16283
16432
|
|
|
16284
16433
|
// src/components/Popover/Popover.styles.ts
|
|
16285
|
-
var
|
|
16286
|
-
var PopoverBtn =
|
|
16434
|
+
var import_react96 = require("@emotion/react");
|
|
16435
|
+
var PopoverBtn = import_react96.css`
|
|
16287
16436
|
border: none;
|
|
16288
16437
|
background: none;
|
|
16289
16438
|
padding: 0;
|
|
16290
16439
|
`;
|
|
16291
|
-
var Popover =
|
|
16440
|
+
var Popover = import_react96.css`
|
|
16292
16441
|
border-left: var(--spacing-xs) solid var(--brand-secondary-3);
|
|
16293
16442
|
border-radius: var(--rounded-base);
|
|
16294
16443
|
box-shadow: var(--shadow-base);
|
|
@@ -16302,7 +16451,7 @@ var Popover = import_react95.css`
|
|
|
16302
16451
|
|
|
16303
16452
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
16304
16453
|
var import_selection = require("@lexical/selection");
|
|
16305
|
-
var
|
|
16454
|
+
var import_lexical2 = require("lexical");
|
|
16306
16455
|
var getElementNodesInSelection = (selection) => {
|
|
16307
16456
|
const nodesInSelection = selection.getNodes();
|
|
16308
16457
|
if (nodesInSelection.length === 0) {
|
|
@@ -16311,7 +16460,7 @@ var getElementNodesInSelection = (selection) => {
|
|
|
16311
16460
|
selection.focus.getNode().getParentOrThrow()
|
|
16312
16461
|
]);
|
|
16313
16462
|
}
|
|
16314
|
-
return new Set(nodesInSelection.map((node) => (0,
|
|
16463
|
+
return new Set(nodesInSelection.map((node) => (0, import_lexical2.$isElementNode)(node) ? node : node.getParentOrThrow()));
|
|
16315
16464
|
};
|
|
16316
16465
|
var getAncestor = (node, predicate) => {
|
|
16317
16466
|
let parent = node;
|
|
@@ -16336,7 +16485,7 @@ var getSelectedNode = (selection) => {
|
|
|
16336
16485
|
};
|
|
16337
16486
|
|
|
16338
16487
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
16339
|
-
var
|
|
16488
|
+
var import_jsx_runtime90 = require("@emotion/react/jsx-runtime");
|
|
16340
16489
|
var isProjectMapLinkValue = (value) => {
|
|
16341
16490
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
16342
16491
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -16359,7 +16508,7 @@ var guessLinkTypeFromPath = (path) => {
|
|
|
16359
16508
|
};
|
|
16360
16509
|
function convertAnchorElement(domNode) {
|
|
16361
16510
|
let node = null;
|
|
16362
|
-
if (!(0,
|
|
16511
|
+
if (!(0, import_utils3.isHTMLAnchorElement)(domNode)) {
|
|
16363
16512
|
return { node };
|
|
16364
16513
|
}
|
|
16365
16514
|
const textContent = domNode.textContent;
|
|
@@ -16423,7 +16572,7 @@ function convertAnchorElement(domNode) {
|
|
|
16423
16572
|
}
|
|
16424
16573
|
return { node };
|
|
16425
16574
|
}
|
|
16426
|
-
var LinkNode = class extends
|
|
16575
|
+
var LinkNode = class _LinkNode extends import_lexical3.ElementNode {
|
|
16427
16576
|
constructor(props, key) {
|
|
16428
16577
|
super(key);
|
|
16429
16578
|
this.__link = props;
|
|
@@ -16439,7 +16588,7 @@ var LinkNode = class extends import_lexical2.ElementNode {
|
|
|
16439
16588
|
writable.__link = link2;
|
|
16440
16589
|
}
|
|
16441
16590
|
static clone(node) {
|
|
16442
|
-
return new
|
|
16591
|
+
return new _LinkNode(node.__link, node.__key);
|
|
16443
16592
|
}
|
|
16444
16593
|
static importJSON(serializedNode) {
|
|
16445
16594
|
const node = $createLinkNode(serializedNode.link);
|
|
@@ -16468,7 +16617,7 @@ var LinkNode = class extends import_lexical2.ElementNode {
|
|
|
16468
16617
|
element.setAttribute("href", `mailto:${this.__link.path}`);
|
|
16469
16618
|
}
|
|
16470
16619
|
}
|
|
16471
|
-
(0,
|
|
16620
|
+
(0, import_utils3.addClassNamesToElement)(element, config.theme.link);
|
|
16472
16621
|
return element;
|
|
16473
16622
|
}
|
|
16474
16623
|
updateDOM(prevNode, a) {
|
|
@@ -16496,7 +16645,7 @@ var LinkNode = class extends import_lexical2.ElementNode {
|
|
|
16496
16645
|
}
|
|
16497
16646
|
insertNewAfter(selection, restoreSelection = true) {
|
|
16498
16647
|
const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection);
|
|
16499
|
-
if ((0,
|
|
16648
|
+
if ((0, import_lexical3.$isElementNode)(element)) {
|
|
16500
16649
|
const linkNode = $createLinkNode(
|
|
16501
16650
|
"nodeId" in this.__link ? {
|
|
16502
16651
|
nodeId: this.__link.nodeId,
|
|
@@ -16527,7 +16676,7 @@ var LinkNode = class extends import_lexical2.ElementNode {
|
|
|
16527
16676
|
}
|
|
16528
16677
|
};
|
|
16529
16678
|
function $createLinkNode(props) {
|
|
16530
|
-
return (0,
|
|
16679
|
+
return (0, import_lexical3.$applyNodeReplacement)(new LinkNode(props));
|
|
16531
16680
|
}
|
|
16532
16681
|
function $isLinkNode(node) {
|
|
16533
16682
|
return node instanceof LinkNode;
|
|
@@ -16540,14 +16689,14 @@ function removeLinkNode(node) {
|
|
|
16540
16689
|
node.remove();
|
|
16541
16690
|
}
|
|
16542
16691
|
function removeLinkNodeFromSelection() {
|
|
16543
|
-
const selection = (0,
|
|
16544
|
-
if (!(0,
|
|
16692
|
+
const selection = (0, import_lexical3.$getSelection)();
|
|
16693
|
+
if (!(0, import_lexical3.$isRangeSelection)(selection)) {
|
|
16545
16694
|
return;
|
|
16546
16695
|
}
|
|
16547
16696
|
const nodes = selection.extract();
|
|
16548
16697
|
const linkNodesFound = /* @__PURE__ */ new Set();
|
|
16549
16698
|
for (const node of nodes) {
|
|
16550
|
-
if ((0,
|
|
16699
|
+
if ((0, import_lexical3.$isElementNode)(node) && !node.isInline()) {
|
|
16551
16700
|
continue;
|
|
16552
16701
|
}
|
|
16553
16702
|
const linkNodeAncestor = getLinkAncestor(node);
|
|
@@ -16561,14 +16710,14 @@ function removeLinkNodeFromSelection() {
|
|
|
16561
16710
|
}
|
|
16562
16711
|
function upsertLinkNode(props) {
|
|
16563
16712
|
var _a, _b, _c, _d, _e;
|
|
16564
|
-
const selection = (0,
|
|
16565
|
-
if (!(0,
|
|
16713
|
+
const selection = (0, import_lexical3.$getSelection)();
|
|
16714
|
+
if (!(0, import_lexical3.$isRangeSelection)(selection)) {
|
|
16566
16715
|
return;
|
|
16567
16716
|
}
|
|
16568
16717
|
const nodes = selection.extract();
|
|
16569
16718
|
const touchedNodes = [];
|
|
16570
16719
|
for (const node of nodes) {
|
|
16571
|
-
if ((0,
|
|
16720
|
+
if ((0, import_lexical3.$isElementNode)(node) && !node.isInline()) {
|
|
16572
16721
|
continue;
|
|
16573
16722
|
}
|
|
16574
16723
|
const linkNodeAncestor = getLinkAncestor(node);
|
|
@@ -16616,50 +16765,50 @@ function upsertLinkNode(props) {
|
|
|
16616
16765
|
}
|
|
16617
16766
|
}
|
|
16618
16767
|
}
|
|
16619
|
-
var REMOVE_LINK_NODE_COMMAND = (0,
|
|
16620
|
-
var UPSERT_LINK_NODE_COMMAND = (0,
|
|
16621
|
-
var OPEN_LINK_NODE_MODAL_COMMAND = (0,
|
|
16768
|
+
var REMOVE_LINK_NODE_COMMAND = (0, import_lexical3.createCommand)("REMOVE_LINK_NODE_COMMAND");
|
|
16769
|
+
var UPSERT_LINK_NODE_COMMAND = (0, import_lexical3.createCommand)("UPSERT_LINK_NODE_COMMAND");
|
|
16770
|
+
var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
16622
16771
|
"OPEN_LINK_NODE_MODAL_COMMAND"
|
|
16623
16772
|
);
|
|
16624
16773
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
16625
16774
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
16626
|
-
var linkPopover =
|
|
16775
|
+
var linkPopover = import_react97.css`
|
|
16627
16776
|
position: absolute;
|
|
16628
16777
|
z-index: 5;
|
|
16629
16778
|
`;
|
|
16630
|
-
var linkPopoverContainer =
|
|
16779
|
+
var linkPopoverContainer = import_react97.css`
|
|
16631
16780
|
${Popover};
|
|
16632
16781
|
align-items: center;
|
|
16633
16782
|
display: flex;
|
|
16634
16783
|
`;
|
|
16635
|
-
var linkPopoverAnchor =
|
|
16784
|
+
var linkPopoverAnchor = import_react97.css`
|
|
16636
16785
|
${link}
|
|
16637
16786
|
${linkColorDefault}
|
|
16638
16787
|
`;
|
|
16639
16788
|
function LinkNodePlugin({ onConnectLink }) {
|
|
16640
|
-
const [editor] = (0,
|
|
16641
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
16642
|
-
const linkPopoverElRef = (0,
|
|
16643
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
16644
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
16645
|
-
(0,
|
|
16789
|
+
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
16790
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react98.useState)();
|
|
16791
|
+
const linkPopoverElRef = (0, import_react98.useRef)(null);
|
|
16792
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react98.useState)(false);
|
|
16793
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react98.useState)(false);
|
|
16794
|
+
(0, import_react98.useEffect)(() => {
|
|
16646
16795
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
16647
16796
|
setLinkPopoverState(void 0);
|
|
16648
16797
|
return;
|
|
16649
16798
|
}
|
|
16650
16799
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
16651
|
-
(0,
|
|
16800
|
+
(0, import_react98.useEffect)(() => {
|
|
16652
16801
|
if (!editor.hasNodes([LinkNode])) {
|
|
16653
16802
|
throw new Error("LinkNode not registered on editor");
|
|
16654
16803
|
}
|
|
16655
|
-
return (0,
|
|
16804
|
+
return (0, import_utils3.mergeRegister)(
|
|
16656
16805
|
editor.registerCommand(
|
|
16657
16806
|
UPSERT_LINK_NODE_COMMAND,
|
|
16658
16807
|
(payload) => {
|
|
16659
16808
|
upsertLinkNode(payload);
|
|
16660
16809
|
return true;
|
|
16661
16810
|
},
|
|
16662
|
-
|
|
16811
|
+
import_lexical3.COMMAND_PRIORITY_EDITOR
|
|
16663
16812
|
),
|
|
16664
16813
|
editor.registerCommand(
|
|
16665
16814
|
REMOVE_LINK_NODE_COMMAND,
|
|
@@ -16667,7 +16816,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16667
16816
|
removeLinkNodeFromSelection();
|
|
16668
16817
|
return true;
|
|
16669
16818
|
},
|
|
16670
|
-
|
|
16819
|
+
import_lexical3.COMMAND_PRIORITY_EDITOR
|
|
16671
16820
|
),
|
|
16672
16821
|
editor.registerCommand(
|
|
16673
16822
|
OPEN_LINK_NODE_MODAL_COMMAND,
|
|
@@ -16686,18 +16835,18 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16686
16835
|
});
|
|
16687
16836
|
return true;
|
|
16688
16837
|
},
|
|
16689
|
-
|
|
16838
|
+
import_lexical3.COMMAND_PRIORITY_EDITOR
|
|
16690
16839
|
),
|
|
16691
16840
|
editor.registerCommand(
|
|
16692
|
-
|
|
16841
|
+
import_lexical3.FOCUS_COMMAND,
|
|
16693
16842
|
() => {
|
|
16694
16843
|
setIsEditorFocused(true);
|
|
16695
16844
|
return true;
|
|
16696
16845
|
},
|
|
16697
|
-
|
|
16846
|
+
import_lexical3.COMMAND_PRIORITY_EDITOR
|
|
16698
16847
|
),
|
|
16699
16848
|
editor.registerCommand(
|
|
16700
|
-
|
|
16849
|
+
import_lexical3.BLUR_COMMAND,
|
|
16701
16850
|
() => {
|
|
16702
16851
|
requestAnimationFrame(() => {
|
|
16703
16852
|
if (linkPopoverElRef.current !== null) {
|
|
@@ -16713,16 +16862,16 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16713
16862
|
});
|
|
16714
16863
|
return true;
|
|
16715
16864
|
},
|
|
16716
|
-
|
|
16865
|
+
import_lexical3.COMMAND_PRIORITY_EDITOR
|
|
16717
16866
|
)
|
|
16718
16867
|
);
|
|
16719
16868
|
}, [editor, onConnectLink]);
|
|
16720
|
-
const maybeShowLinkToolbar = (0,
|
|
16869
|
+
const maybeShowLinkToolbar = (0, import_react98.useCallback)(() => {
|
|
16721
16870
|
if (!editor.isEditable()) {
|
|
16722
16871
|
return;
|
|
16723
16872
|
}
|
|
16724
|
-
const selection = (0,
|
|
16725
|
-
if (!(0,
|
|
16873
|
+
const selection = (0, import_lexical3.$getSelection)();
|
|
16874
|
+
if (!(0, import_lexical3.$isRangeSelection)(selection)) {
|
|
16726
16875
|
setLinkPopoverState(void 0);
|
|
16727
16876
|
return;
|
|
16728
16877
|
}
|
|
@@ -16749,7 +16898,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16749
16898
|
}
|
|
16750
16899
|
});
|
|
16751
16900
|
}, [editor]);
|
|
16752
|
-
(0,
|
|
16901
|
+
(0, import_react98.useEffect)(() => {
|
|
16753
16902
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16754
16903
|
requestAnimationFrame(() => {
|
|
16755
16904
|
editorState.read(() => {
|
|
@@ -16776,8 +16925,8 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16776
16925
|
});
|
|
16777
16926
|
});
|
|
16778
16927
|
};
|
|
16779
|
-
return /* @__PURE__ */ (0,
|
|
16780
|
-
/* @__PURE__ */ (0,
|
|
16928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
16929
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16781
16930
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
16782
16931
|
{
|
|
16783
16932
|
nodeType: LinkNode,
|
|
@@ -16787,7 +16936,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16787
16936
|
}
|
|
16788
16937
|
}
|
|
16789
16938
|
),
|
|
16790
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
16939
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16791
16940
|
"div",
|
|
16792
16941
|
{
|
|
16793
16942
|
css: linkPopover,
|
|
@@ -16796,8 +16945,8 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16796
16945
|
top: linkPopoverState.position.y
|
|
16797
16946
|
},
|
|
16798
16947
|
ref: linkPopoverElRef,
|
|
16799
|
-
children: /* @__PURE__ */ (0,
|
|
16800
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
16948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
16949
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16801
16950
|
"a",
|
|
16802
16951
|
{
|
|
16803
16952
|
href: `${linkPopoverState.node.__link.type === "email" ? "mailto:" : linkPopoverState.node.__link.type === "tel" ? "tel:" : ""}${linkPopoverState.node.__link.path}`,
|
|
@@ -16807,7 +16956,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16807
16956
|
children: linkPopoverState.node.__link.path
|
|
16808
16957
|
}
|
|
16809
16958
|
),
|
|
16810
|
-
/* @__PURE__ */ (0,
|
|
16959
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16811
16960
|
Button,
|
|
16812
16961
|
{
|
|
16813
16962
|
size: "xs",
|
|
@@ -16815,7 +16964,7 @@ function LinkNodePlugin({ onConnectLink }) {
|
|
|
16815
16964
|
onEditLinkNode(linkPopoverState.node);
|
|
16816
16965
|
},
|
|
16817
16966
|
buttonType: "ghost",
|
|
16818
|
-
children: /* @__PURE__ */ (0,
|
|
16967
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
16819
16968
|
}
|
|
16820
16969
|
)
|
|
16821
16970
|
] })
|
|
@@ -16831,14 +16980,14 @@ function getLinkAncestor(node) {
|
|
|
16831
16980
|
|
|
16832
16981
|
// src/components/ParameterInputs/rich-text/ListIndentPlugin.tsx
|
|
16833
16982
|
var import_list = require("@lexical/list");
|
|
16834
|
-
var
|
|
16983
|
+
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
16835
16984
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
16836
|
-
var
|
|
16837
|
-
var
|
|
16838
|
-
var
|
|
16985
|
+
var import_lexical4 = require("lexical");
|
|
16986
|
+
var import_react99 = require("react");
|
|
16987
|
+
var import_jsx_runtime91 = require("@emotion/react/jsx-runtime");
|
|
16839
16988
|
function isIndentPermitted(maxDepth) {
|
|
16840
|
-
const selection = (0,
|
|
16841
|
-
if (!(0,
|
|
16989
|
+
const selection = (0, import_lexical4.$getSelection)();
|
|
16990
|
+
if (!(0, import_lexical4.$isRangeSelection)(selection)) {
|
|
16842
16991
|
return false;
|
|
16843
16992
|
}
|
|
16844
16993
|
const elementNodesInSelection = getElementNodesInSelection(selection);
|
|
@@ -16857,29 +17006,29 @@ function isIndentPermitted(maxDepth) {
|
|
|
16857
17006
|
return totalDepth <= maxDepth;
|
|
16858
17007
|
}
|
|
16859
17008
|
function ListIndentPlugin({ maxDepth }) {
|
|
16860
|
-
const [editor] = (0,
|
|
16861
|
-
(0,
|
|
17009
|
+
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
17010
|
+
(0, import_react99.useEffect)(() => {
|
|
16862
17011
|
return editor.registerCommand(
|
|
16863
|
-
|
|
17012
|
+
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
16864
17013
|
() => !isIndentPermitted(maxDepth),
|
|
16865
|
-
|
|
17014
|
+
import_lexical4.COMMAND_PRIORITY_CRITICAL
|
|
16866
17015
|
);
|
|
16867
17016
|
}, [editor, maxDepth]);
|
|
16868
|
-
return /* @__PURE__ */ (0,
|
|
17017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {});
|
|
16869
17018
|
}
|
|
16870
17019
|
|
|
16871
17020
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
16872
|
-
var
|
|
16873
|
-
var
|
|
17021
|
+
var import_react100 = require("@emotion/react");
|
|
17022
|
+
var import_code2 = require("@lexical/code");
|
|
16874
17023
|
var import_list2 = require("@lexical/list");
|
|
16875
|
-
var
|
|
17024
|
+
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
16876
17025
|
var import_rich_text = require("@lexical/rich-text");
|
|
16877
17026
|
var import_selection2 = require("@lexical/selection");
|
|
16878
|
-
var
|
|
16879
|
-
var
|
|
16880
|
-
var
|
|
16881
|
-
var
|
|
16882
|
-
var toolbar =
|
|
17027
|
+
var import_utils6 = require("@lexical/utils");
|
|
17028
|
+
var import_lexical5 = require("lexical");
|
|
17029
|
+
var import_react101 = require("react");
|
|
17030
|
+
var import_jsx_runtime92 = require("@emotion/react/jsx-runtime");
|
|
17031
|
+
var toolbar = import_react100.css`
|
|
16883
17032
|
background: var(--gray-50);
|
|
16884
17033
|
border-radius: var(--rounded-base);
|
|
16885
17034
|
display: flex;
|
|
@@ -16891,7 +17040,7 @@ var toolbar = import_react99.css`
|
|
|
16891
17040
|
top: 0;
|
|
16892
17041
|
z-index: 10;
|
|
16893
17042
|
`;
|
|
16894
|
-
var toolbarGroup =
|
|
17043
|
+
var toolbarGroup = import_react100.css`
|
|
16895
17044
|
display: flex;
|
|
16896
17045
|
gap: var(--spacing-xs);
|
|
16897
17046
|
position: relative;
|
|
@@ -16907,7 +17056,7 @@ var toolbarGroup = import_react99.css`
|
|
|
16907
17056
|
width: 1px;
|
|
16908
17057
|
}
|
|
16909
17058
|
`;
|
|
16910
|
-
var toolbarButton =
|
|
17059
|
+
var toolbarButton = import_react100.css`
|
|
16911
17060
|
align-items: center;
|
|
16912
17061
|
appearance: none;
|
|
16913
17062
|
border: 0;
|
|
@@ -16920,17 +17069,17 @@ var toolbarButton = import_react99.css`
|
|
|
16920
17069
|
min-width: 32px;
|
|
16921
17070
|
padding: 0 var(--spacing-sm);
|
|
16922
17071
|
`;
|
|
16923
|
-
var toolbarButtonActive =
|
|
17072
|
+
var toolbarButtonActive = import_react100.css`
|
|
16924
17073
|
background: var(--gray-200);
|
|
16925
17074
|
`;
|
|
16926
|
-
var toolbarIcon =
|
|
17075
|
+
var toolbarIcon = import_react100.css`
|
|
16927
17076
|
color: inherit;
|
|
16928
17077
|
`;
|
|
16929
|
-
var toolbarChevron =
|
|
17078
|
+
var toolbarChevron = import_react100.css`
|
|
16930
17079
|
margin-left: var(--spacing-xs);
|
|
16931
17080
|
`;
|
|
16932
17081
|
var ToolbarIcon = ({ icon }) => {
|
|
16933
|
-
return /* @__PURE__ */ (0,
|
|
17082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
16934
17083
|
};
|
|
16935
17084
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
16936
17085
|
["bold", "format-bold"],
|
|
@@ -16944,7 +17093,7 @@ var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
|
16944
17093
|
var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
16945
17094
|
var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
16946
17095
|
var RichTextToolbar = ({ config }) => {
|
|
16947
|
-
const [editor] = (0,
|
|
17096
|
+
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
16948
17097
|
const {
|
|
16949
17098
|
activeElement,
|
|
16950
17099
|
setActiveElement,
|
|
@@ -16966,24 +17115,24 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16966
17115
|
return;
|
|
16967
17116
|
}
|
|
16968
17117
|
editor.update(() => {
|
|
16969
|
-
const selection = (0,
|
|
16970
|
-
if (!(0,
|
|
17118
|
+
const selection = (0, import_lexical5.$getSelection)();
|
|
17119
|
+
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
16971
17120
|
return;
|
|
16972
17121
|
}
|
|
16973
17122
|
if (HEADING_ELEMENTS.includes(type)) {
|
|
16974
17123
|
(0, import_selection2.$setBlocksType)(selection, () => (0, import_rich_text.$createHeadingNode)(type));
|
|
16975
17124
|
} else if (type === "paragraph") {
|
|
16976
|
-
(0, import_selection2.$setBlocksType)(selection, () => (0,
|
|
17125
|
+
(0, import_selection2.$setBlocksType)(selection, () => (0, import_lexical5.$createParagraphNode)());
|
|
16977
17126
|
} else if (type === "quote") {
|
|
16978
17127
|
(0, import_selection2.$setBlocksType)(selection, () => (0, import_rich_text.$createQuoteNode)());
|
|
16979
17128
|
} else if (type === "code") {
|
|
16980
|
-
(0, import_selection2.$setBlocksType)(selection, () => (0,
|
|
17129
|
+
(0, import_selection2.$setBlocksType)(selection, () => (0, import_code2.$createCodeNode)());
|
|
16981
17130
|
}
|
|
16982
17131
|
});
|
|
16983
17132
|
};
|
|
16984
|
-
const updateToolbar = (0,
|
|
16985
|
-
const selection = (0,
|
|
16986
|
-
if (!(0,
|
|
17133
|
+
const updateToolbar = (0, import_react101.useCallback)(() => {
|
|
17134
|
+
const selection = (0, import_lexical5.$getSelection)();
|
|
17135
|
+
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
16987
17136
|
return;
|
|
16988
17137
|
}
|
|
16989
17138
|
const newActiveFormats = [];
|
|
@@ -16994,9 +17143,9 @@ var RichTextToolbar = ({ config }) => {
|
|
|
16994
17143
|
}
|
|
16995
17144
|
setActiveFormats(newActiveFormats);
|
|
16996
17145
|
const anchorNode = selection.anchor.getNode();
|
|
16997
|
-
let element = anchorNode.getKey() === "root" ? anchorNode : (0,
|
|
17146
|
+
let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils6.$findMatchingParent)(anchorNode, (e) => {
|
|
16998
17147
|
const parent = e.getParent();
|
|
16999
|
-
return parent !== null && (0,
|
|
17148
|
+
return parent !== null && (0, import_lexical5.$isRootOrShadowRoot)(parent);
|
|
17000
17149
|
});
|
|
17001
17150
|
if (element === null) {
|
|
17002
17151
|
element = anchorNode.getTopLevelElementOrThrow();
|
|
@@ -17005,7 +17154,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17005
17154
|
const elementDOM = editor.getElementByKey(elementKey);
|
|
17006
17155
|
if (elementDOM !== null) {
|
|
17007
17156
|
if ((0, import_list2.$isListNode)(element)) {
|
|
17008
|
-
const parentList = (0,
|
|
17157
|
+
const parentList = (0, import_utils6.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
|
|
17009
17158
|
const type = parentList ? parentList.getListType() : element.getListType();
|
|
17010
17159
|
setActiveElement(type === "bullet" ? "unorderedList" : "orderedList");
|
|
17011
17160
|
} else {
|
|
@@ -17020,17 +17169,17 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17020
17169
|
setIsLink(false);
|
|
17021
17170
|
}
|
|
17022
17171
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
17023
|
-
(0,
|
|
17172
|
+
(0, import_react101.useEffect)(() => {
|
|
17024
17173
|
return editor.registerCommand(
|
|
17025
|
-
|
|
17174
|
+
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
17026
17175
|
(_payload) => {
|
|
17027
17176
|
updateToolbar();
|
|
17028
17177
|
return false;
|
|
17029
17178
|
},
|
|
17030
|
-
|
|
17179
|
+
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
17031
17180
|
);
|
|
17032
17181
|
}, [editor, updateToolbar]);
|
|
17033
|
-
(0,
|
|
17182
|
+
(0, import_react101.useEffect)(() => {
|
|
17034
17183
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
17035
17184
|
requestAnimationFrame(() => {
|
|
17036
17185
|
editorState.read(() => {
|
|
@@ -17039,15 +17188,15 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17039
17188
|
});
|
|
17040
17189
|
});
|
|
17041
17190
|
}, [editor, updateToolbar]);
|
|
17042
|
-
return /* @__PURE__ */ (0,
|
|
17043
|
-
/* @__PURE__ */ (0,
|
|
17191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: toolbar, children: [
|
|
17192
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
17044
17193
|
Menu,
|
|
17045
17194
|
{
|
|
17046
17195
|
menuLabel: "Elements",
|
|
17047
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
17196
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("button", { css: toolbarButton, title: "Text styles", children: [
|
|
17048
17197
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
17049
17198
|
" ",
|
|
17050
|
-
/* @__PURE__ */ (0,
|
|
17199
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
17051
17200
|
] }),
|
|
17052
17201
|
placement: "bottom-start",
|
|
17053
17202
|
children: [
|
|
@@ -17057,7 +17206,7 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17057
17206
|
type: "paragraph"
|
|
17058
17207
|
},
|
|
17059
17208
|
...visibleTextualElements
|
|
17060
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
17209
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17061
17210
|
MenuItem,
|
|
17062
17211
|
{
|
|
17063
17212
|
onClick: () => {
|
|
@@ -17067,32 +17216,32 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17067
17216
|
},
|
|
17068
17217
|
element.type
|
|
17069
17218
|
)),
|
|
17070
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
17219
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
17071
17220
|
]
|
|
17072
17221
|
}
|
|
17073
17222
|
),
|
|
17074
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
17075
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
17223
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: toolbarGroup, children: [
|
|
17224
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17076
17225
|
"button",
|
|
17077
17226
|
{
|
|
17078
17227
|
onClick: () => {
|
|
17079
|
-
editor.dispatchCommand(
|
|
17228
|
+
editor.dispatchCommand(import_lexical5.FORMAT_TEXT_COMMAND, format.type);
|
|
17080
17229
|
},
|
|
17081
17230
|
css: [toolbarButton, activeFormats.includes(format.type) ? toolbarButtonActive : null],
|
|
17082
|
-
children: /* @__PURE__ */ (0,
|
|
17231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
17083
17232
|
}
|
|
17084
17233
|
) }, format.type)),
|
|
17085
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
17234
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17086
17235
|
Menu,
|
|
17087
17236
|
{
|
|
17088
17237
|
menuLabel: "Alternative text styles",
|
|
17089
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
17238
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("button", { css: toolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
17090
17239
|
placement: "bottom-start",
|
|
17091
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
17240
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17092
17241
|
MenuItem,
|
|
17093
17242
|
{
|
|
17094
17243
|
onClick: () => {
|
|
17095
|
-
editor.dispatchCommand(
|
|
17244
|
+
editor.dispatchCommand(import_lexical5.FORMAT_TEXT_COMMAND, format.type);
|
|
17096
17245
|
},
|
|
17097
17246
|
children: format.label
|
|
17098
17247
|
},
|
|
@@ -17101,57 +17250,57 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17101
17250
|
}
|
|
17102
17251
|
) : null
|
|
17103
17252
|
] }) : null,
|
|
17104
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
17105
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
17253
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: toolbarGroup, children: [
|
|
17254
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17106
17255
|
"button",
|
|
17107
17256
|
{
|
|
17108
17257
|
onClick: () => {
|
|
17109
17258
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
17110
17259
|
},
|
|
17111
17260
|
css: [toolbarButton, isLink ? toolbarButtonActive : null],
|
|
17112
|
-
children: /* @__PURE__ */ (0,
|
|
17261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarIcon, { icon: "link" })
|
|
17113
17262
|
}
|
|
17114
17263
|
) }) : null,
|
|
17115
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
17116
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
17264
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
17265
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17117
17266
|
"button",
|
|
17118
17267
|
{
|
|
17119
17268
|
onClick: () => {
|
|
17120
17269
|
activeElement === "unorderedList" ? editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0) : editor.dispatchCommand(import_list2.INSERT_UNORDERED_LIST_COMMAND, void 0);
|
|
17121
17270
|
},
|
|
17122
17271
|
css: [toolbarButton, activeElement === "unorderedList" ? toolbarButtonActive : null],
|
|
17123
|
-
children: /* @__PURE__ */ (0,
|
|
17272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarIcon, { icon: "layout-list" })
|
|
17124
17273
|
}
|
|
17125
17274
|
) }) : null,
|
|
17126
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
17275
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17127
17276
|
"button",
|
|
17128
17277
|
{
|
|
17129
17278
|
onClick: () => {
|
|
17130
17279
|
activeElement === "orderedList" ? editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0) : editor.dispatchCommand(import_list2.INSERT_ORDERED_LIST_COMMAND, void 0);
|
|
17131
17280
|
},
|
|
17132
17281
|
css: [toolbarButton, activeElement === "orderedList" ? toolbarButtonActive : null],
|
|
17133
|
-
children: /* @__PURE__ */ (0,
|
|
17282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarIcon, { icon: "layout-list-numbered" })
|
|
17134
17283
|
}
|
|
17135
17284
|
) }) : null
|
|
17136
17285
|
] }) : null,
|
|
17137
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
17286
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17138
17287
|
"button",
|
|
17139
17288
|
{
|
|
17140
17289
|
onClick: () => {
|
|
17141
17290
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
17142
17291
|
},
|
|
17143
17292
|
css: [toolbarButton, activeElement === "quote" ? toolbarButtonActive : null],
|
|
17144
|
-
children: /* @__PURE__ */ (0,
|
|
17293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarIcon, { icon: "quote" })
|
|
17145
17294
|
}
|
|
17146
17295
|
) }) : null,
|
|
17147
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
17296
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17148
17297
|
"button",
|
|
17149
17298
|
{
|
|
17150
17299
|
onClick: () => {
|
|
17151
17300
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
17152
17301
|
},
|
|
17153
17302
|
css: [toolbarButton, activeElement === "code" ? toolbarButtonActive : null],
|
|
17154
|
-
children: /* @__PURE__ */ (0,
|
|
17303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarIcon, { icon: "code-slash" })
|
|
17155
17304
|
}
|
|
17156
17305
|
) }) : null
|
|
17157
17306
|
] }) : null
|
|
@@ -17160,26 +17309,26 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17160
17309
|
var RichTextToolbar_default = RichTextToolbar;
|
|
17161
17310
|
var useRichTextToolbarState = ({ config }) => {
|
|
17162
17311
|
var _a;
|
|
17163
|
-
const enabledBuiltInFormats = (0,
|
|
17312
|
+
const enabledBuiltInFormats = (0, import_react101.useMemo)(() => {
|
|
17164
17313
|
return richTextBuiltInFormats.filter((format) => {
|
|
17165
17314
|
var _a2, _b;
|
|
17166
17315
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
17167
17316
|
});
|
|
17168
17317
|
}, [config]);
|
|
17169
|
-
const enabledBuiltInElements = (0,
|
|
17318
|
+
const enabledBuiltInElements = (0, import_react101.useMemo)(() => {
|
|
17170
17319
|
return richTextBuiltInElements.filter((element) => {
|
|
17171
17320
|
var _a2, _b;
|
|
17172
17321
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
17173
17322
|
});
|
|
17174
17323
|
}, [config]);
|
|
17175
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
17324
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react101.useMemo)(() => {
|
|
17176
17325
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
17177
17326
|
}, [enabledBuiltInFormats]);
|
|
17178
17327
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
17179
17328
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
17180
17329
|
);
|
|
17181
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
17182
|
-
const visibleFormatsWithIcon = (0,
|
|
17330
|
+
const [activeFormats, setActiveFormats] = (0, import_react101.useState)([]);
|
|
17331
|
+
const visibleFormatsWithIcon = (0, import_react101.useMemo)(() => {
|
|
17183
17332
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17184
17333
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
17185
17334
|
visibleFormats.add(type);
|
|
@@ -17189,7 +17338,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17189
17338
|
});
|
|
17190
17339
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17191
17340
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
17192
|
-
const visibleFormatsWithoutIcon = (0,
|
|
17341
|
+
const visibleFormatsWithoutIcon = (0, import_react101.useMemo)(() => {
|
|
17193
17342
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17194
17343
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
17195
17344
|
visibleFormats.add(type);
|
|
@@ -17199,11 +17348,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17199
17348
|
});
|
|
17200
17349
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17201
17350
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
17202
|
-
const [activeElement, setActiveElement] = (0,
|
|
17351
|
+
const [activeElement, setActiveElement] = (0, import_react101.useState)("paragraph");
|
|
17203
17352
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
17204
17353
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
17205
17354
|
);
|
|
17206
|
-
const visibleTextualElements = (0,
|
|
17355
|
+
const visibleTextualElements = (0, import_react101.useMemo)(() => {
|
|
17207
17356
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
17208
17357
|
return enabledTextualElements;
|
|
17209
17358
|
}
|
|
@@ -17214,24 +17363,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17214
17363
|
}
|
|
17215
17364
|
);
|
|
17216
17365
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
17217
|
-
const [isLink, setIsLink] = (0,
|
|
17218
|
-
const linkElementVisible = (0,
|
|
17366
|
+
const [isLink, setIsLink] = (0, import_react101.useState)(false);
|
|
17367
|
+
const linkElementVisible = (0, import_react101.useMemo)(() => {
|
|
17219
17368
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
17220
17369
|
}, [isLink, enabledBuiltInElements]);
|
|
17221
|
-
const visibleLists = (0,
|
|
17370
|
+
const visibleLists = (0, import_react101.useMemo)(() => {
|
|
17222
17371
|
return new Set(
|
|
17223
17372
|
["orderedList", "unorderedList"].filter(
|
|
17224
17373
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
17225
17374
|
)
|
|
17226
17375
|
);
|
|
17227
17376
|
}, [activeElement, enabledBuiltInElements]);
|
|
17228
|
-
const quoteElementVisible = (0,
|
|
17377
|
+
const quoteElementVisible = (0, import_react101.useMemo)(() => {
|
|
17229
17378
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
17230
17379
|
}, [activeElement, enabledBuiltInElements]);
|
|
17231
|
-
const codeElementVisible = (0,
|
|
17380
|
+
const codeElementVisible = (0, import_react101.useMemo)(() => {
|
|
17232
17381
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
17233
17382
|
}, [activeElement, enabledBuiltInElements]);
|
|
17234
|
-
const visibleElementsWithIcons = (0,
|
|
17383
|
+
const visibleElementsWithIcons = (0, import_react101.useMemo)(() => {
|
|
17235
17384
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
17236
17385
|
if (linkElementVisible) {
|
|
17237
17386
|
visibleElements.add("link");
|
|
@@ -17268,7 +17417,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17268
17417
|
};
|
|
17269
17418
|
|
|
17270
17419
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17271
|
-
var
|
|
17420
|
+
var import_jsx_runtime93 = require("@emotion/react/jsx-runtime");
|
|
17272
17421
|
var ParameterRichText = ({
|
|
17273
17422
|
label,
|
|
17274
17423
|
labelLeadingIcon,
|
|
@@ -17289,7 +17438,7 @@ var ParameterRichText = ({
|
|
|
17289
17438
|
editorInputClassName,
|
|
17290
17439
|
editorFooter
|
|
17291
17440
|
}) => {
|
|
17292
|
-
return /* @__PURE__ */ (0,
|
|
17441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
17293
17442
|
ParameterShell,
|
|
17294
17443
|
{
|
|
17295
17444
|
"data-test-id": "parameter-input",
|
|
@@ -17303,7 +17452,7 @@ var ParameterRichText = ({
|
|
|
17303
17452
|
captionTestId,
|
|
17304
17453
|
menuItems,
|
|
17305
17454
|
children: [
|
|
17306
|
-
/* @__PURE__ */ (0,
|
|
17455
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
17307
17456
|
ParameterRichTextInner,
|
|
17308
17457
|
{
|
|
17309
17458
|
value,
|
|
@@ -17317,23 +17466,23 @@ var ParameterRichText = ({
|
|
|
17317
17466
|
editorFooter
|
|
17318
17467
|
}
|
|
17319
17468
|
),
|
|
17320
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
17469
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: menuItems }) }) : null
|
|
17321
17470
|
]
|
|
17322
17471
|
}
|
|
17323
17472
|
);
|
|
17324
17473
|
};
|
|
17325
|
-
var editorWrapper =
|
|
17474
|
+
var editorWrapper = import_react102.css`
|
|
17326
17475
|
display: flex;
|
|
17327
17476
|
flex-flow: column;
|
|
17328
17477
|
flex-grow: 1;
|
|
17329
17478
|
`;
|
|
17330
|
-
var editorContainer =
|
|
17479
|
+
var editorContainer = import_react102.css`
|
|
17331
17480
|
display: flex;
|
|
17332
17481
|
flex-flow: column;
|
|
17333
17482
|
flex-grow: 1;
|
|
17334
17483
|
position: relative;
|
|
17335
17484
|
`;
|
|
17336
|
-
var editorPlaceholder =
|
|
17485
|
+
var editorPlaceholder = import_react102.css`
|
|
17337
17486
|
color: var(--gray-500);
|
|
17338
17487
|
font-style: italic;
|
|
17339
17488
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -17344,7 +17493,7 @@ var editorPlaceholder = import_react101.css`
|
|
|
17344
17493
|
top: var(--spacing-xs);
|
|
17345
17494
|
user-select: none;
|
|
17346
17495
|
`;
|
|
17347
|
-
var editorInput =
|
|
17496
|
+
var editorInput = import_react102.css`
|
|
17348
17497
|
background: var(--white);
|
|
17349
17498
|
border: 1px solid var(--white);
|
|
17350
17499
|
border-radius: var(--rounded-sm);
|
|
@@ -17380,7 +17529,7 @@ var ParameterRichTextInner = ({
|
|
|
17380
17529
|
console.error(error);
|
|
17381
17530
|
},
|
|
17382
17531
|
editorState: value ? JSON.stringify(value) : void 0,
|
|
17383
|
-
nodes: [import_list3.ListNode, import_list3.ListItemNode, LinkNode, import_rich_text2.HeadingNode, import_rich_text2.QuoteNode,
|
|
17532
|
+
nodes: [import_list3.ListNode, import_list3.ListItemNode, LinkNode, import_rich_text2.HeadingNode, import_rich_text2.QuoteNode, import_lexical6.ParagraphNode, CustomCodeNode],
|
|
17384
17533
|
theme: {
|
|
17385
17534
|
text: {
|
|
17386
17535
|
bold: textBold,
|
|
@@ -17415,8 +17564,8 @@ var ParameterRichTextInner = ({
|
|
|
17415
17564
|
},
|
|
17416
17565
|
editable: !readOnly
|
|
17417
17566
|
};
|
|
17418
|
-
return /* @__PURE__ */ (0,
|
|
17419
|
-
/* @__PURE__ */ (0,
|
|
17567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
17568
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
17420
17569
|
RichText,
|
|
17421
17570
|
{
|
|
17422
17571
|
onChange,
|
|
@@ -17447,14 +17596,14 @@ var RichText = ({
|
|
|
17447
17596
|
readOnly,
|
|
17448
17597
|
editorInputClassName
|
|
17449
17598
|
}) => {
|
|
17450
|
-
const editorContainerRef = (0,
|
|
17451
|
-
const [editor] = (0,
|
|
17452
|
-
(0,
|
|
17599
|
+
const editorContainerRef = (0, import_react103.useRef)(null);
|
|
17600
|
+
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
17601
|
+
(0, import_react103.useEffect)(() => {
|
|
17453
17602
|
if (onRichTextInit) {
|
|
17454
17603
|
onRichTextInit(editor);
|
|
17455
17604
|
}
|
|
17456
17605
|
}, [editor, onRichTextInit]);
|
|
17457
|
-
(0,
|
|
17606
|
+
(0, import_react103.useEffect)(() => {
|
|
17458
17607
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
17459
17608
|
requestAnimationFrame(() => {
|
|
17460
17609
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -17466,39 +17615,40 @@ var RichText = ({
|
|
|
17466
17615
|
removeUpdateListener();
|
|
17467
17616
|
};
|
|
17468
17617
|
}, []);
|
|
17469
|
-
return /* @__PURE__ */ (0,
|
|
17470
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
17471
|
-
/* @__PURE__ */ (0,
|
|
17472
|
-
/* @__PURE__ */ (0,
|
|
17618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
17619
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RichTextToolbar_default, { config }),
|
|
17620
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { css: editorContainer, ref: editorContainerRef, children: [
|
|
17621
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
17473
17622
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
17474
17623
|
{
|
|
17475
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
17476
|
-
placeholder: /* @__PURE__ */ (0,
|
|
17624
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
17625
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
17477
17626
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
17478
17627
|
}
|
|
17479
17628
|
),
|
|
17480
|
-
/* @__PURE__ */ (0,
|
|
17481
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
17482
|
-
/* @__PURE__ */ (0,
|
|
17483
|
-
/* @__PURE__ */ (0,
|
|
17484
|
-
/* @__PURE__ */ (0,
|
|
17629
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
17630
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
17631
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(LinkNodePlugin, { onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve() }),
|
|
17632
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
17633
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DisableStylesPlugin, {}),
|
|
17634
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
|
|
17485
17635
|
] })
|
|
17486
17636
|
] });
|
|
17487
17637
|
};
|
|
17488
17638
|
|
|
17489
17639
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
17490
|
-
var
|
|
17491
|
-
var
|
|
17492
|
-
var ParameterSelect = (0,
|
|
17640
|
+
var import_react104 = require("react");
|
|
17641
|
+
var import_jsx_runtime94 = require("@emotion/react/jsx-runtime");
|
|
17642
|
+
var ParameterSelect = (0, import_react104.forwardRef)(
|
|
17493
17643
|
({ defaultOption, options, ...props }, ref) => {
|
|
17494
17644
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17495
|
-
return /* @__PURE__ */ (0,
|
|
17645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
17496
17646
|
}
|
|
17497
17647
|
);
|
|
17498
|
-
var ParameterSelectInner = (0,
|
|
17648
|
+
var ParameterSelectInner = (0, import_react104.forwardRef)(
|
|
17499
17649
|
({ defaultOption, options, ...props }, ref) => {
|
|
17500
17650
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17501
|
-
return /* @__PURE__ */ (0,
|
|
17651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
17502
17652
|
"select",
|
|
17503
17653
|
{
|
|
17504
17654
|
css: [input2, selectInput],
|
|
@@ -17507,10 +17657,10 @@ var ParameterSelectInner = (0, import_react103.forwardRef)(
|
|
|
17507
17657
|
ref,
|
|
17508
17658
|
...props,
|
|
17509
17659
|
children: [
|
|
17510
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
17660
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
17511
17661
|
options.map((option) => {
|
|
17512
17662
|
var _a;
|
|
17513
|
-
return /* @__PURE__ */ (0,
|
|
17663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
17514
17664
|
})
|
|
17515
17665
|
]
|
|
17516
17666
|
}
|
|
@@ -17519,15 +17669,15 @@ var ParameterSelectInner = (0, import_react103.forwardRef)(
|
|
|
17519
17669
|
);
|
|
17520
17670
|
|
|
17521
17671
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
17522
|
-
var
|
|
17523
|
-
var
|
|
17524
|
-
var ParameterTextarea = (0,
|
|
17672
|
+
var import_react105 = require("react");
|
|
17673
|
+
var import_jsx_runtime95 = require("@emotion/react/jsx-runtime");
|
|
17674
|
+
var ParameterTextarea = (0, import_react105.forwardRef)((props, ref) => {
|
|
17525
17675
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17526
|
-
return /* @__PURE__ */ (0,
|
|
17676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ParameterShell, { "data-test-id": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
17527
17677
|
});
|
|
17528
|
-
var ParameterTextareaInner = (0,
|
|
17678
|
+
var ParameterTextareaInner = (0, import_react105.forwardRef)(({ ...props }, ref) => {
|
|
17529
17679
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17530
|
-
return /* @__PURE__ */ (0,
|
|
17680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
17531
17681
|
"textarea",
|
|
17532
17682
|
{
|
|
17533
17683
|
css: [input2, textarea2],
|
|
@@ -17540,18 +17690,18 @@ var ParameterTextareaInner = (0, import_react104.forwardRef)(({ ...props }, ref)
|
|
|
17540
17690
|
});
|
|
17541
17691
|
|
|
17542
17692
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
17543
|
-
var
|
|
17544
|
-
var
|
|
17545
|
-
var ParameterToggle = (0,
|
|
17693
|
+
var import_react106 = require("react");
|
|
17694
|
+
var import_jsx_runtime96 = require("@emotion/react/jsx-runtime");
|
|
17695
|
+
var ParameterToggle = (0, import_react106.forwardRef)((props, ref) => {
|
|
17546
17696
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17547
|
-
return /* @__PURE__ */ (0,
|
|
17697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
17548
17698
|
});
|
|
17549
|
-
var ParameterToggleInner = (0,
|
|
17699
|
+
var ParameterToggleInner = (0, import_react106.forwardRef)(
|
|
17550
17700
|
({ ...props }, ref) => {
|
|
17551
17701
|
const { id, label } = useParameterShell();
|
|
17552
|
-
return /* @__PURE__ */ (0,
|
|
17553
|
-
/* @__PURE__ */ (0,
|
|
17554
|
-
/* @__PURE__ */ (0,
|
|
17702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
17703
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
17704
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: inlineLabel2, children: label })
|
|
17555
17705
|
] });
|
|
17556
17706
|
}
|
|
17557
17707
|
);
|
|
@@ -17559,7 +17709,7 @@ var ParameterToggleInner = (0, import_react105.forwardRef)(
|
|
|
17559
17709
|
// src/components/Popover/Popover.tsx
|
|
17560
17710
|
var import_Popover = require("reakit/Popover");
|
|
17561
17711
|
var import_Portal2 = require("reakit/Portal");
|
|
17562
|
-
var
|
|
17712
|
+
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
17563
17713
|
var Popover2 = ({
|
|
17564
17714
|
iconColor = "action",
|
|
17565
17715
|
icon = "info",
|
|
@@ -17571,38 +17721,38 @@ var Popover2 = ({
|
|
|
17571
17721
|
children
|
|
17572
17722
|
}) => {
|
|
17573
17723
|
const popover = (0, import_Popover.usePopoverState)({ placement });
|
|
17574
|
-
return /* @__PURE__ */ (0,
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17576
|
-
/* @__PURE__ */ (0,
|
|
17577
|
-
/* @__PURE__ */ (0,
|
|
17724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
17725
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_Popover.PopoverDisclosure, { ...popover, css: PopoverBtn, title: buttonText, "data-test-id": testId, children: [
|
|
17726
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Icon, { icon, iconColor, size: iconSize }),
|
|
17727
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { hidden: true, children: buttonText })
|
|
17578
17728
|
] }),
|
|
17579
|
-
/* @__PURE__ */ (0,
|
|
17729
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_Portal2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_Popover.Popover, { css: Popover, ...popover, "aria-label": ariaLabel, children }) })
|
|
17580
17730
|
] });
|
|
17581
17731
|
};
|
|
17582
17732
|
|
|
17583
17733
|
// src/components/ProgressList/ProgressList.tsx
|
|
17584
|
-
var
|
|
17585
|
-
var
|
|
17734
|
+
var import_react108 = require("@emotion/react");
|
|
17735
|
+
var import_react109 = require("react");
|
|
17586
17736
|
var import_cg18 = require("react-icons/cg");
|
|
17587
17737
|
|
|
17588
17738
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
17589
|
-
var
|
|
17590
|
-
var progressListStyles =
|
|
17739
|
+
var import_react107 = require("@emotion/react");
|
|
17740
|
+
var progressListStyles = import_react107.css`
|
|
17591
17741
|
display: flex;
|
|
17592
17742
|
flex-direction: column;
|
|
17593
17743
|
gap: var(--spacing-sm);
|
|
17594
17744
|
list-style-type: none;
|
|
17595
17745
|
`;
|
|
17596
|
-
var progressListItemStyles =
|
|
17746
|
+
var progressListItemStyles = import_react107.css`
|
|
17597
17747
|
display: flex;
|
|
17598
17748
|
gap: var(--spacing-base);
|
|
17599
17749
|
align-items: center;
|
|
17600
17750
|
`;
|
|
17601
17751
|
|
|
17602
17752
|
// src/components/ProgressList/ProgressList.tsx
|
|
17603
|
-
var
|
|
17753
|
+
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
17604
17754
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
17605
|
-
const itemsWithStatus = (0,
|
|
17755
|
+
const itemsWithStatus = (0, import_react109.useMemo)(() => {
|
|
17606
17756
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
17607
17757
|
return items.map((item, index) => {
|
|
17608
17758
|
let status = "queued";
|
|
@@ -17614,8 +17764,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
17614
17764
|
return { ...item, status };
|
|
17615
17765
|
});
|
|
17616
17766
|
}, [items, inProgressId]);
|
|
17617
|
-
return /* @__PURE__ */ (0,
|
|
17618
|
-
return /* @__PURE__ */ (0,
|
|
17767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
17768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
17619
17769
|
ProgressListItem,
|
|
17620
17770
|
{
|
|
17621
17771
|
status,
|
|
@@ -17635,7 +17785,7 @@ var ProgressListItem = ({
|
|
|
17635
17785
|
errorLevel = "danger",
|
|
17636
17786
|
autoEllipsis = false
|
|
17637
17787
|
}) => {
|
|
17638
|
-
const Icon2 = (0,
|
|
17788
|
+
const Icon2 = (0, import_react109.useMemo)(() => {
|
|
17639
17789
|
if (error) {
|
|
17640
17790
|
return warningIcon;
|
|
17641
17791
|
}
|
|
@@ -17646,14 +17796,14 @@ var ProgressListItem = ({
|
|
|
17646
17796
|
};
|
|
17647
17797
|
return iconPerStatus[status];
|
|
17648
17798
|
}, [status, error]);
|
|
17649
|
-
const statusStyles = (0,
|
|
17799
|
+
const statusStyles = (0, import_react109.useMemo)(() => {
|
|
17650
17800
|
if (error) {
|
|
17651
|
-
return errorLevel === "caution" ?
|
|
17801
|
+
return errorLevel === "caution" ? import_react108.css`
|
|
17652
17802
|
color: rgb(161, 98, 7);
|
|
17653
17803
|
& svg {
|
|
17654
17804
|
color: rgb(250, 204, 21);
|
|
17655
17805
|
}
|
|
17656
|
-
` :
|
|
17806
|
+
` : import_react108.css`
|
|
17657
17807
|
color: rgb(185, 28, 28);
|
|
17658
17808
|
& svg {
|
|
17659
17809
|
color: var(--brand-primary-2);
|
|
@@ -17661,35 +17811,35 @@ var ProgressListItem = ({
|
|
|
17661
17811
|
`;
|
|
17662
17812
|
}
|
|
17663
17813
|
const colorPerStatus = {
|
|
17664
|
-
completed:
|
|
17814
|
+
completed: import_react108.css`
|
|
17665
17815
|
opacity: 0.75;
|
|
17666
17816
|
`,
|
|
17667
|
-
inProgress:
|
|
17817
|
+
inProgress: import_react108.css`
|
|
17668
17818
|
-webkit-text-stroke-width: thin;
|
|
17669
17819
|
`,
|
|
17670
|
-
queued:
|
|
17820
|
+
queued: import_react108.css`
|
|
17671
17821
|
opacity: 0.5;
|
|
17672
17822
|
`
|
|
17673
17823
|
};
|
|
17674
17824
|
return colorPerStatus[status];
|
|
17675
17825
|
}, [status, error, errorLevel]);
|
|
17676
|
-
return /* @__PURE__ */ (0,
|
|
17677
|
-
/* @__PURE__ */ (0,
|
|
17678
|
-
/* @__PURE__ */ (0,
|
|
17826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
17827
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon2, { size: 20 }) }) }),
|
|
17828
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { children: [
|
|
17679
17829
|
children,
|
|
17680
|
-
/* @__PURE__ */ (0,
|
|
17830
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
17681
17831
|
] })
|
|
17682
17832
|
] });
|
|
17683
17833
|
};
|
|
17684
17834
|
|
|
17685
17835
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17686
|
-
var
|
|
17687
|
-
var
|
|
17836
|
+
var import_react111 = require("@emotion/react");
|
|
17837
|
+
var import_react112 = require("react");
|
|
17688
17838
|
var import_cg19 = require("react-icons/cg");
|
|
17689
17839
|
|
|
17690
17840
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
17691
|
-
var
|
|
17692
|
-
var segmentedControlStyles =
|
|
17841
|
+
var import_react110 = require("@emotion/react");
|
|
17842
|
+
var segmentedControlStyles = import_react110.css`
|
|
17693
17843
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
17694
17844
|
--segmented-control-border-width: 1px;
|
|
17695
17845
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -17708,14 +17858,14 @@ var segmentedControlStyles = import_react109.css`
|
|
|
17708
17858
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
17709
17859
|
font-size: var(--fs-xs);
|
|
17710
17860
|
`;
|
|
17711
|
-
var segmentedControlVerticalStyles =
|
|
17861
|
+
var segmentedControlVerticalStyles = import_react110.css`
|
|
17712
17862
|
flex-direction: column;
|
|
17713
17863
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
17714
17864
|
var(--segmented-control-rounded-value) 0 0;
|
|
17715
17865
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
17716
17866
|
var(--segmented-control-rounded-value);
|
|
17717
17867
|
`;
|
|
17718
|
-
var segmentedControlItemStyles =
|
|
17868
|
+
var segmentedControlItemStyles = import_react110.css`
|
|
17719
17869
|
&:first-of-type label {
|
|
17720
17870
|
border-radius: var(--segmented-control-first-border-radius);
|
|
17721
17871
|
}
|
|
@@ -17723,10 +17873,10 @@ var segmentedControlItemStyles = import_react109.css`
|
|
|
17723
17873
|
border-radius: var(--segmented-control-last-border-radius);
|
|
17724
17874
|
}
|
|
17725
17875
|
`;
|
|
17726
|
-
var segmentedControlInputStyles =
|
|
17876
|
+
var segmentedControlInputStyles = import_react110.css`
|
|
17727
17877
|
${accessibleHidden}
|
|
17728
17878
|
`;
|
|
17729
|
-
var segmentedControlLabelStyles =
|
|
17879
|
+
var segmentedControlLabelStyles = import_react110.css`
|
|
17730
17880
|
position: relative;
|
|
17731
17881
|
display: flex;
|
|
17732
17882
|
align-items: center;
|
|
@@ -17763,23 +17913,23 @@ var segmentedControlLabelStyles = import_react109.css`
|
|
|
17763
17913
|
background-color: var(--gray-400);
|
|
17764
17914
|
}
|
|
17765
17915
|
`;
|
|
17766
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
17916
|
+
var segmentedControlLabelIconOnlyStyles = import_react110.css`
|
|
17767
17917
|
padding-inline: 0.5em;
|
|
17768
17918
|
`;
|
|
17769
|
-
var segmentedControlLabelCheckStyles =
|
|
17919
|
+
var segmentedControlLabelCheckStyles = import_react110.css`
|
|
17770
17920
|
opacity: 0.5;
|
|
17771
17921
|
`;
|
|
17772
|
-
var segmentedControlLabelContentStyles =
|
|
17922
|
+
var segmentedControlLabelContentStyles = import_react110.css`
|
|
17773
17923
|
display: flex;
|
|
17774
17924
|
align-items: center;
|
|
17775
17925
|
justify-content: center;
|
|
17776
17926
|
gap: var(--spacing-sm);
|
|
17777
17927
|
height: 100%;
|
|
17778
17928
|
`;
|
|
17779
|
-
var segmentedControlLabelTextStyles =
|
|
17929
|
+
var segmentedControlLabelTextStyles = import_react110.css``;
|
|
17780
17930
|
|
|
17781
17931
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17782
|
-
var
|
|
17932
|
+
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
17783
17933
|
var SegmentedControl = ({
|
|
17784
17934
|
name,
|
|
17785
17935
|
options,
|
|
@@ -17791,7 +17941,7 @@ var SegmentedControl = ({
|
|
|
17791
17941
|
size = "md",
|
|
17792
17942
|
...props
|
|
17793
17943
|
}) => {
|
|
17794
|
-
const onOptionChange = (0,
|
|
17944
|
+
const onOptionChange = (0, import_react112.useCallback)(
|
|
17795
17945
|
(event) => {
|
|
17796
17946
|
if (event.target.checked) {
|
|
17797
17947
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -17799,18 +17949,18 @@ var SegmentedControl = ({
|
|
|
17799
17949
|
},
|
|
17800
17950
|
[options, onChange]
|
|
17801
17951
|
);
|
|
17802
|
-
const sizeStyles = (0,
|
|
17952
|
+
const sizeStyles = (0, import_react112.useMemo)(() => {
|
|
17803
17953
|
const map = {
|
|
17804
|
-
sm: (0,
|
|
17805
|
-
md: (0,
|
|
17806
|
-
lg: (0,
|
|
17954
|
+
sm: (0, import_react111.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
17955
|
+
md: (0, import_react111.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
17956
|
+
lg: (0, import_react111.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
17807
17957
|
};
|
|
17808
17958
|
return map[size];
|
|
17809
17959
|
}, [size]);
|
|
17810
|
-
const isIconOnly = (0,
|
|
17960
|
+
const isIconOnly = (0, import_react112.useMemo)(() => {
|
|
17811
17961
|
return options.every((option) => option.icon && !option.label);
|
|
17812
17962
|
}, [options]);
|
|
17813
|
-
return /* @__PURE__ */ (0,
|
|
17963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
17814
17964
|
"div",
|
|
17815
17965
|
{
|
|
17816
17966
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -17818,11 +17968,11 @@ var SegmentedControl = ({
|
|
|
17818
17968
|
children: options.map((option, index) => {
|
|
17819
17969
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
17820
17970
|
const isDisabled = disabled || option.disabled;
|
|
17821
|
-
return /* @__PURE__ */ (0,
|
|
17971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
17822
17972
|
Tooltip,
|
|
17823
17973
|
{
|
|
17824
17974
|
title: isDisabled || !option.tooltip ? "" : option.tooltip,
|
|
17825
|
-
children: /* @__PURE__ */ (0,
|
|
17975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: segmentedControlItemStyles, "data-test-id": "container-segmented-control", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
17826
17976
|
"label",
|
|
17827
17977
|
{
|
|
17828
17978
|
css: [
|
|
@@ -17831,7 +17981,7 @@ var SegmentedControl = ({
|
|
|
17831
17981
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17832
17982
|
],
|
|
17833
17983
|
children: [
|
|
17834
|
-
/* @__PURE__ */ (0,
|
|
17984
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
17835
17985
|
"input",
|
|
17836
17986
|
{
|
|
17837
17987
|
css: segmentedControlInputStyles,
|
|
@@ -17843,10 +17993,10 @@ var SegmentedControl = ({
|
|
|
17843
17993
|
disabled: isDisabled
|
|
17844
17994
|
}
|
|
17845
17995
|
),
|
|
17846
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
17847
|
-
/* @__PURE__ */ (0,
|
|
17848
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
17849
|
-
!text ? null : /* @__PURE__ */ (0,
|
|
17996
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_cg19.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
17997
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
17998
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(option.icon, { size: "1.5em" }),
|
|
17999
|
+
!text ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
17850
18000
|
] })
|
|
17851
18001
|
]
|
|
17852
18002
|
}
|
|
@@ -17860,18 +18010,18 @@ var SegmentedControl = ({
|
|
|
17860
18010
|
};
|
|
17861
18011
|
|
|
17862
18012
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
17863
|
-
var
|
|
17864
|
-
var lightFadingOut =
|
|
18013
|
+
var import_react113 = require("@emotion/react");
|
|
18014
|
+
var lightFadingOut = import_react113.keyframes`
|
|
17865
18015
|
from { opacity: 0.1; }
|
|
17866
18016
|
to { opacity: 0.025; }
|
|
17867
18017
|
`;
|
|
17868
|
-
var skeletonStyles =
|
|
18018
|
+
var skeletonStyles = import_react113.css`
|
|
17869
18019
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
17870
18020
|
background-color: var(--gray-900);
|
|
17871
18021
|
`;
|
|
17872
18022
|
|
|
17873
18023
|
// src/components/Skeleton/Skeleton.tsx
|
|
17874
|
-
var
|
|
18024
|
+
var import_jsx_runtime100 = require("@emotion/react/jsx-runtime");
|
|
17875
18025
|
var Skeleton = ({
|
|
17876
18026
|
width = "100%",
|
|
17877
18027
|
height = "1.25rem",
|
|
@@ -17879,7 +18029,7 @@ var Skeleton = ({
|
|
|
17879
18029
|
circle = false,
|
|
17880
18030
|
children,
|
|
17881
18031
|
...otherProps
|
|
17882
|
-
}) => /* @__PURE__ */ (0,
|
|
18032
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
17883
18033
|
"div",
|
|
17884
18034
|
{
|
|
17885
18035
|
css: [
|
|
@@ -17899,11 +18049,11 @@ var Skeleton = ({
|
|
|
17899
18049
|
);
|
|
17900
18050
|
|
|
17901
18051
|
// src/components/Switch/Switch.tsx
|
|
17902
|
-
var
|
|
18052
|
+
var React19 = __toESM(require("react"));
|
|
17903
18053
|
|
|
17904
18054
|
// src/components/Switch/Switch.styles.ts
|
|
17905
|
-
var
|
|
17906
|
-
var SwitchInputContainer =
|
|
18055
|
+
var import_react114 = require("@emotion/react");
|
|
18056
|
+
var SwitchInputContainer = import_react114.css`
|
|
17907
18057
|
cursor: pointer;
|
|
17908
18058
|
display: inline-block;
|
|
17909
18059
|
position: relative;
|
|
@@ -17912,7 +18062,7 @@ var SwitchInputContainer = import_react113.css`
|
|
|
17912
18062
|
vertical-align: middle;
|
|
17913
18063
|
user-select: none;
|
|
17914
18064
|
`;
|
|
17915
|
-
var SwitchInput =
|
|
18065
|
+
var SwitchInput = import_react114.css`
|
|
17916
18066
|
appearance: none;
|
|
17917
18067
|
border-radius: var(--rounded-full);
|
|
17918
18068
|
background-color: var(--white);
|
|
@@ -17950,7 +18100,7 @@ var SwitchInput = import_react113.css`
|
|
|
17950
18100
|
cursor: not-allowed;
|
|
17951
18101
|
}
|
|
17952
18102
|
`;
|
|
17953
|
-
var SwitchInputDisabled =
|
|
18103
|
+
var SwitchInputDisabled = import_react114.css`
|
|
17954
18104
|
opacity: var(--opacity-50);
|
|
17955
18105
|
cursor: not-allowed;
|
|
17956
18106
|
|
|
@@ -17958,7 +18108,7 @@ var SwitchInputDisabled = import_react113.css`
|
|
|
17958
18108
|
cursor: not-allowed;
|
|
17959
18109
|
}
|
|
17960
18110
|
`;
|
|
17961
|
-
var SwitchInputLabel =
|
|
18111
|
+
var SwitchInputLabel = import_react114.css`
|
|
17962
18112
|
align-items: center;
|
|
17963
18113
|
color: var(--brand-secondary-1);
|
|
17964
18114
|
display: inline-flex;
|
|
@@ -17980,37 +18130,37 @@ var SwitchInputLabel = import_react113.css`
|
|
|
17980
18130
|
top: 0;
|
|
17981
18131
|
}
|
|
17982
18132
|
`;
|
|
17983
|
-
var SwitchText =
|
|
18133
|
+
var SwitchText = import_react114.css`
|
|
17984
18134
|
color: var(--gray-500);
|
|
17985
18135
|
font-size: var(--fs-sm);
|
|
17986
18136
|
padding-inline: var(--spacing-2xl) 0;
|
|
17987
18137
|
`;
|
|
17988
18138
|
|
|
17989
18139
|
// src/components/Switch/Switch.tsx
|
|
17990
|
-
var
|
|
17991
|
-
var Switch =
|
|
18140
|
+
var import_jsx_runtime101 = require("@emotion/react/jsx-runtime");
|
|
18141
|
+
var Switch = React19.forwardRef(
|
|
17992
18142
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
17993
18143
|
let additionalText = infoText;
|
|
17994
18144
|
if (infoText && toggleText) {
|
|
17995
18145
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
17996
18146
|
}
|
|
17997
|
-
return /* @__PURE__ */ (0,
|
|
17998
|
-
/* @__PURE__ */ (0,
|
|
17999
|
-
/* @__PURE__ */ (0,
|
|
18000
|
-
/* @__PURE__ */ (0,
|
|
18147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
|
|
18148
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
18149
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
18150
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { css: SwitchInputLabel, children: label })
|
|
18001
18151
|
] }),
|
|
18002
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
18152
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { css: SwitchText, children: additionalText }) : null,
|
|
18003
18153
|
children
|
|
18004
18154
|
] });
|
|
18005
18155
|
}
|
|
18006
18156
|
);
|
|
18007
18157
|
|
|
18008
18158
|
// src/components/Table/Table.tsx
|
|
18009
|
-
var
|
|
18159
|
+
var React20 = __toESM(require("react"));
|
|
18010
18160
|
|
|
18011
18161
|
// src/components/Table/Table.styles.ts
|
|
18012
|
-
var
|
|
18013
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
18162
|
+
var import_react115 = require("@emotion/react");
|
|
18163
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react115.css`
|
|
18014
18164
|
border-bottom: 1px solid var(--gray-400);
|
|
18015
18165
|
border-collapse: collapse;
|
|
18016
18166
|
min-width: 100%;
|
|
@@ -18021,65 +18171,65 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
18021
18171
|
padding: ${cellPadding};
|
|
18022
18172
|
}
|
|
18023
18173
|
`;
|
|
18024
|
-
var tableHead =
|
|
18174
|
+
var tableHead = import_react115.css`
|
|
18025
18175
|
background: var(--gray-100);
|
|
18026
18176
|
color: var(--brand-secondary-1);
|
|
18027
18177
|
text-align: left;
|
|
18028
18178
|
`;
|
|
18029
|
-
var tableRow =
|
|
18179
|
+
var tableRow = import_react115.css`
|
|
18030
18180
|
border-bottom: 1px solid var(--gray-200);
|
|
18031
18181
|
`;
|
|
18032
|
-
var tableCellHead =
|
|
18182
|
+
var tableCellHead = import_react115.css`
|
|
18033
18183
|
font-size: var(--fs-sm);
|
|
18034
18184
|
text-transform: uppercase;
|
|
18035
18185
|
font-weight: var(--fw-bold);
|
|
18036
18186
|
`;
|
|
18037
18187
|
|
|
18038
18188
|
// src/components/Table/Table.tsx
|
|
18039
|
-
var
|
|
18040
|
-
var Table =
|
|
18189
|
+
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
18190
|
+
var Table = React20.forwardRef(
|
|
18041
18191
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
18042
|
-
return /* @__PURE__ */ (0,
|
|
18192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
18043
18193
|
}
|
|
18044
18194
|
);
|
|
18045
|
-
var TableHead =
|
|
18195
|
+
var TableHead = React20.forwardRef(
|
|
18046
18196
|
({ children, ...otherProps }, ref) => {
|
|
18047
|
-
return /* @__PURE__ */ (0,
|
|
18197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
18048
18198
|
}
|
|
18049
18199
|
);
|
|
18050
|
-
var TableBody =
|
|
18200
|
+
var TableBody = React20.forwardRef(
|
|
18051
18201
|
({ children, ...otherProps }, ref) => {
|
|
18052
|
-
return /* @__PURE__ */ (0,
|
|
18202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("tbody", { ref, ...otherProps, children });
|
|
18053
18203
|
}
|
|
18054
18204
|
);
|
|
18055
|
-
var TableFoot =
|
|
18205
|
+
var TableFoot = React20.forwardRef(
|
|
18056
18206
|
({ children, ...otherProps }, ref) => {
|
|
18057
|
-
return /* @__PURE__ */ (0,
|
|
18207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("tfoot", { ref, ...otherProps, children });
|
|
18058
18208
|
}
|
|
18059
18209
|
);
|
|
18060
|
-
var TableRow =
|
|
18210
|
+
var TableRow = React20.forwardRef(
|
|
18061
18211
|
({ children, ...otherProps }, ref) => {
|
|
18062
|
-
return /* @__PURE__ */ (0,
|
|
18212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
18063
18213
|
}
|
|
18064
18214
|
);
|
|
18065
|
-
var TableCellHead =
|
|
18215
|
+
var TableCellHead = React20.forwardRef(
|
|
18066
18216
|
({ children, ...otherProps }, ref) => {
|
|
18067
|
-
return /* @__PURE__ */ (0,
|
|
18217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
18068
18218
|
}
|
|
18069
18219
|
);
|
|
18070
|
-
var TableCellData =
|
|
18220
|
+
var TableCellData = React20.forwardRef(
|
|
18071
18221
|
({ children, ...otherProps }, ref) => {
|
|
18072
|
-
return /* @__PURE__ */ (0,
|
|
18222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("td", { ref, ...otherProps, children });
|
|
18073
18223
|
}
|
|
18074
18224
|
);
|
|
18075
18225
|
|
|
18076
18226
|
// src/components/Tabs/Tabs.tsx
|
|
18077
|
-
var
|
|
18227
|
+
var import_react117 = require("react");
|
|
18078
18228
|
var import_Tab = require("reakit/Tab");
|
|
18079
18229
|
|
|
18080
18230
|
// src/components/Tabs/Tabs.styles.ts
|
|
18081
|
-
var
|
|
18082
|
-
var tabButtonStyles =
|
|
18231
|
+
var import_react116 = require("@emotion/react");
|
|
18232
|
+
var tabButtonStyles = import_react116.css`
|
|
18083
18233
|
align-items: center;
|
|
18084
18234
|
border: 0;
|
|
18085
18235
|
height: 2.5rem;
|
|
@@ -18096,30 +18246,30 @@ var tabButtonStyles = import_react115.css`
|
|
|
18096
18246
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
18097
18247
|
}
|
|
18098
18248
|
`;
|
|
18099
|
-
var tabButtonGroupStyles =
|
|
18249
|
+
var tabButtonGroupStyles = import_react116.css`
|
|
18100
18250
|
display: flex;
|
|
18101
18251
|
gap: var(--spacing-base);
|
|
18102
18252
|
border-bottom: 1px solid var(--gray-300);
|
|
18103
18253
|
`;
|
|
18104
18254
|
|
|
18105
18255
|
// src/components/Tabs/Tabs.tsx
|
|
18106
|
-
var
|
|
18107
|
-
var CurrentTabContext = (0,
|
|
18256
|
+
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
18257
|
+
var CurrentTabContext = (0, import_react117.createContext)(null);
|
|
18108
18258
|
var useCurrentTab = () => {
|
|
18109
|
-
const context = (0,
|
|
18259
|
+
const context = (0, import_react117.useContext)(CurrentTabContext);
|
|
18110
18260
|
if (!context) {
|
|
18111
18261
|
throw new Error("This component can only be used inside <Tabs>");
|
|
18112
18262
|
}
|
|
18113
18263
|
return context;
|
|
18114
18264
|
};
|
|
18115
18265
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
18116
|
-
const selected = (0,
|
|
18266
|
+
const selected = (0, import_react117.useMemo)(() => {
|
|
18117
18267
|
if (selectedId)
|
|
18118
18268
|
return selectedId;
|
|
18119
18269
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
18120
18270
|
}, [selectedId, useHashForState]);
|
|
18121
18271
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
18122
|
-
(0,
|
|
18272
|
+
(0, import_react117.useEffect)(() => {
|
|
18123
18273
|
var _a;
|
|
18124
18274
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
18125
18275
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -18127,29 +18277,29 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
18127
18277
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
18128
18278
|
}
|
|
18129
18279
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
18130
|
-
(0,
|
|
18280
|
+
(0, import_react117.useEffect)(() => {
|
|
18131
18281
|
if (selected && selected !== tab.selectedId) {
|
|
18132
18282
|
tab.setSelectedId(selected);
|
|
18133
18283
|
}
|
|
18134
18284
|
}, [selected]);
|
|
18135
|
-
return /* @__PURE__ */ (0,
|
|
18285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(CurrentTabContext.Provider, { value: tab, children });
|
|
18136
18286
|
};
|
|
18137
18287
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
18138
18288
|
const currentTab = useCurrentTab();
|
|
18139
|
-
return /* @__PURE__ */ (0,
|
|
18289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_Tab.TabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
18140
18290
|
};
|
|
18141
18291
|
var TabButton = ({ children, id, ...props }) => {
|
|
18142
18292
|
const currentTab = useCurrentTab();
|
|
18143
|
-
return /* @__PURE__ */ (0,
|
|
18293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_Tab.Tab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
18144
18294
|
};
|
|
18145
18295
|
var TabContent = ({ children, ...props }) => {
|
|
18146
18296
|
const currentTab = useCurrentTab();
|
|
18147
|
-
return /* @__PURE__ */ (0,
|
|
18297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_Tab.TabPanel, { ...props, ...currentTab, children });
|
|
18148
18298
|
};
|
|
18149
18299
|
|
|
18150
18300
|
// src/components/Validation/StatusBullet.styles.ts
|
|
18151
|
-
var
|
|
18152
|
-
var StatusBulletContainer =
|
|
18301
|
+
var import_react118 = require("@emotion/react");
|
|
18302
|
+
var StatusBulletContainer = import_react118.css`
|
|
18153
18303
|
align-items: center;
|
|
18154
18304
|
align-self: center;
|
|
18155
18305
|
color: var(--gray-500);
|
|
@@ -18166,33 +18316,33 @@ var StatusBulletContainer = import_react117.css`
|
|
|
18166
18316
|
display: block;
|
|
18167
18317
|
}
|
|
18168
18318
|
`;
|
|
18169
|
-
var StatusBulletBase =
|
|
18319
|
+
var StatusBulletBase = import_react118.css`
|
|
18170
18320
|
font-size: var(--fs-sm);
|
|
18171
18321
|
&:before {
|
|
18172
18322
|
width: var(--fs-xs);
|
|
18173
18323
|
height: var(--fs-xs);
|
|
18174
18324
|
}
|
|
18175
18325
|
`;
|
|
18176
|
-
var StatusBulletSmall =
|
|
18326
|
+
var StatusBulletSmall = import_react118.css`
|
|
18177
18327
|
font-size: var(--fs-xs);
|
|
18178
18328
|
&:before {
|
|
18179
18329
|
width: var(--fs-xxs);
|
|
18180
18330
|
height: var(--fs-xxs);
|
|
18181
18331
|
}
|
|
18182
18332
|
`;
|
|
18183
|
-
var StatusDraft =
|
|
18333
|
+
var StatusDraft = import_react118.css`
|
|
18184
18334
|
&:before {
|
|
18185
18335
|
background: var(--white);
|
|
18186
18336
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
18187
18337
|
}
|
|
18188
18338
|
`;
|
|
18189
|
-
var StatusModified =
|
|
18339
|
+
var StatusModified = import_react118.css`
|
|
18190
18340
|
&:before {
|
|
18191
18341
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
18192
18342
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
18193
18343
|
}
|
|
18194
18344
|
`;
|
|
18195
|
-
var StatusError =
|
|
18345
|
+
var StatusError = import_react118.css`
|
|
18196
18346
|
color: var(--error);
|
|
18197
18347
|
&:before {
|
|
18198
18348
|
/* TODO: replace this with an svg icon */
|
|
@@ -18205,19 +18355,19 @@ var StatusError = import_react117.css`
|
|
|
18205
18355
|
);
|
|
18206
18356
|
}
|
|
18207
18357
|
`;
|
|
18208
|
-
var StatusPublished =
|
|
18358
|
+
var StatusPublished = import_react118.css`
|
|
18209
18359
|
&:before {
|
|
18210
18360
|
background: var(--primary-action-default);
|
|
18211
18361
|
}
|
|
18212
18362
|
`;
|
|
18213
|
-
var StatusOrphan =
|
|
18363
|
+
var StatusOrphan = import_react118.css`
|
|
18214
18364
|
&:before {
|
|
18215
18365
|
background: var(--brand-secondary-5);
|
|
18216
18366
|
}
|
|
18217
18367
|
`;
|
|
18218
18368
|
|
|
18219
18369
|
// src/components/Validation/StatusBullet.tsx
|
|
18220
|
-
var
|
|
18370
|
+
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
18221
18371
|
var StatusBullet = ({
|
|
18222
18372
|
status,
|
|
18223
18373
|
hideText = false,
|
|
@@ -18235,7 +18385,7 @@ var StatusBullet = ({
|
|
|
18235
18385
|
Previous: StatusDraft
|
|
18236
18386
|
};
|
|
18237
18387
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
18238
|
-
return /* @__PURE__ */ (0,
|
|
18388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
18239
18389
|
"span",
|
|
18240
18390
|
{
|
|
18241
18391
|
role: "status",
|
|
@@ -18266,10 +18416,12 @@ var StatusBullet = ({
|
|
|
18266
18416
|
Container,
|
|
18267
18417
|
Counter,
|
|
18268
18418
|
CreateTeamIntegrationTile,
|
|
18419
|
+
CurrentDrawerContext,
|
|
18269
18420
|
DashedBox,
|
|
18270
18421
|
Details,
|
|
18271
18422
|
DismissibleChipAction,
|
|
18272
18423
|
Drawer,
|
|
18424
|
+
DrawerContent,
|
|
18273
18425
|
DrawerProvider,
|
|
18274
18426
|
DrawerRenderer,
|
|
18275
18427
|
EditTeamIntegrationTile,
|
|
@@ -18402,6 +18554,7 @@ var StatusBullet = ({
|
|
|
18402
18554
|
fadeInTop,
|
|
18403
18555
|
fadeOutBottom,
|
|
18404
18556
|
fullWidthScreenIcon,
|
|
18557
|
+
getDrawerAttributes,
|
|
18405
18558
|
growSubtle,
|
|
18406
18559
|
imageTextIcon,
|
|
18407
18560
|
infoFilledIcon,
|
|
@@ -18432,7 +18585,7 @@ var StatusBullet = ({
|
|
|
18432
18585
|
textInput,
|
|
18433
18586
|
useBreakpoint,
|
|
18434
18587
|
useCloseCurrentDrawer,
|
|
18435
|
-
|
|
18588
|
+
useCurrentDrawer,
|
|
18436
18589
|
useCurrentTab,
|
|
18437
18590
|
useDrawer,
|
|
18438
18591
|
useIconContext,
|