@uniformdev/design-system 19.45.0 → 19.45.2-alpha.6
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 +286 -176
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +335 -224
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -16942,57 +16942,67 @@ init_emotion_jsx_shim();
|
|
|
16942
16942
|
// src/components/LoadingIndicator/LoadingIndicator.styles.ts
|
|
16943
16943
|
init_emotion_jsx_shim();
|
|
16944
16944
|
var import_react85 = require("@emotion/react");
|
|
16945
|
-
|
|
16945
|
+
function bounceFade(size) {
|
|
16946
|
+
const bounceHeight = size === "lg" ? 10 : 5;
|
|
16947
|
+
return import_react85.keyframes`
|
|
16946
16948
|
0%, 100% {
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
+
opacity: 1.0;
|
|
16950
|
+
transform: translateY(0);
|
|
16949
16951
|
}
|
|
16950
16952
|
30% {
|
|
16951
|
-
|
|
16953
|
+
opacity: 0.6;
|
|
16952
16954
|
}
|
|
16953
16955
|
80% {
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
+
opacity: 0.4;
|
|
16957
|
+
transform: translateY(-${bounceHeight}px);
|
|
16956
16958
|
}
|
|
16957
16959
|
90% {
|
|
16958
16960
|
opacity: 0.2;
|
|
16959
|
-
|
|
16961
|
+
transform: translateY(-${bounceHeight / 2}px);
|
|
16960
16962
|
}
|
|
16961
16963
|
`;
|
|
16964
|
+
}
|
|
16962
16965
|
var loader = import_react85.css`
|
|
16963
16966
|
display: inline-flex;
|
|
16964
16967
|
justify-content: center;
|
|
16965
16968
|
`;
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16969
|
+
function loadingDot(size) {
|
|
16970
|
+
const dotSize = size === "lg" ? 8 : 4;
|
|
16971
|
+
return import_react85.css`
|
|
16972
|
+
background-color: var(--gray-700);
|
|
16973
|
+
display: block;
|
|
16974
|
+
border-radius: var(--rounded-full);
|
|
16975
|
+
animation: ${bounceFade(size)} 0.75s infinite ease-in-out;
|
|
16976
|
+
width: ${dotSize}px;
|
|
16977
|
+
height: ${dotSize}px;
|
|
16978
|
+
margin: 0 var(--spacing-${size === "lg" ? "xs" : "2xs"});
|
|
16979
|
+
transform: translateY(0);
|
|
16975
16980
|
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16981
|
+
&:nth-of-type(1) {
|
|
16982
|
+
animation-delay: 0.15s;
|
|
16983
|
+
}
|
|
16979
16984
|
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16985
|
+
&:nth-of-type(2) {
|
|
16986
|
+
animation-delay: 0.3s;
|
|
16987
|
+
}
|
|
16983
16988
|
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
`;
|
|
16989
|
+
&:nth-of-type(3) {
|
|
16990
|
+
animation-delay: 0.6s;
|
|
16991
|
+
}
|
|
16992
|
+
`;
|
|
16993
|
+
}
|
|
16988
16994
|
|
|
16989
16995
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
16990
16996
|
var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
|
|
16991
|
-
var LoadingIndicator = ({
|
|
16997
|
+
var LoadingIndicator = ({
|
|
16998
|
+
size = "lg",
|
|
16999
|
+
...props
|
|
17000
|
+
}) => {
|
|
17001
|
+
const dotStyle = loadingDot(size);
|
|
16992
17002
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
|
|
16993
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css:
|
|
16994
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css:
|
|
16995
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css:
|
|
17003
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: dotStyle }),
|
|
17004
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: dotStyle }),
|
|
17005
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: dotStyle })
|
|
16996
17006
|
] });
|
|
16997
17007
|
};
|
|
16998
17008
|
|
|
@@ -17498,17 +17508,6 @@ var textarea2 = import_react92.css`
|
|
|
17498
17508
|
resize: vertical;
|
|
17499
17509
|
min-height: 2rem;
|
|
17500
17510
|
`;
|
|
17501
|
-
var imageWrapper = import_react92.css`
|
|
17502
|
-
background: var(--white);
|
|
17503
|
-
`;
|
|
17504
|
-
var img = import_react92.css`
|
|
17505
|
-
animation: ${fadeIn} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
17506
|
-
object-fit: contain;
|
|
17507
|
-
max-width: 100%;
|
|
17508
|
-
height: auto;
|
|
17509
|
-
opacity: var(--opacity-0);
|
|
17510
|
-
margin: var(--spacing-sm) auto 0;
|
|
17511
|
-
`;
|
|
17512
17511
|
var dataConnectButton = import_react92.css`
|
|
17513
17512
|
align-items: center;
|
|
17514
17513
|
appearance: none;
|
|
@@ -17698,11 +17697,12 @@ var ParameterGroup = (0, import_react95.forwardRef)(
|
|
|
17698
17697
|
|
|
17699
17698
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
17700
17699
|
init_emotion_jsx_shim();
|
|
17701
|
-
var
|
|
17700
|
+
var import_react101 = require("react");
|
|
17702
17701
|
|
|
17703
17702
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
17704
17703
|
init_emotion_jsx_shim();
|
|
17705
|
-
var
|
|
17704
|
+
var import_react97 = require("react");
|
|
17705
|
+
var import_react_dom2 = require("react-dom");
|
|
17706
17706
|
|
|
17707
17707
|
// src/utils/url.ts
|
|
17708
17708
|
init_emotion_jsx_shim();
|
|
@@ -17715,17 +17715,114 @@ var isValidUrl = (url, options = {}) => {
|
|
|
17715
17715
|
}
|
|
17716
17716
|
};
|
|
17717
17717
|
|
|
17718
|
+
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
17719
|
+
init_emotion_jsx_shim();
|
|
17720
|
+
var import_react96 = require("@emotion/react");
|
|
17721
|
+
var imageWrapper = import_react96.css`
|
|
17722
|
+
position: relative;
|
|
17723
|
+
display: flex;
|
|
17724
|
+
flex-direction: column;
|
|
17725
|
+
background: var(--gray-50);
|
|
17726
|
+
max-width: 100%;
|
|
17727
|
+
max-height: 100%;
|
|
17728
|
+
`;
|
|
17729
|
+
var imageWrapperLoading = import_react96.css`
|
|
17730
|
+
animation: ${skeletonLoading} var(--duration-slow) linear infinite alternate;
|
|
17731
|
+
`;
|
|
17732
|
+
var img = import_react96.css`
|
|
17733
|
+
object-fit: contain;
|
|
17734
|
+
max-width: 100%;
|
|
17735
|
+
height: auto;
|
|
17736
|
+
opacity: var(--opacity-0);
|
|
17737
|
+
margin: 0 auto;
|
|
17738
|
+
`;
|
|
17739
|
+
var imgLoading = import_react96.css`
|
|
17740
|
+
opacity: 0;
|
|
17741
|
+
`;
|
|
17742
|
+
var imgLoaded = import_react96.css`
|
|
17743
|
+
animation: ${fadeIn} var(--duration-slow) var(--timing-ease-out) forwards;
|
|
17744
|
+
opacity: 1;
|
|
17745
|
+
`;
|
|
17746
|
+
var brokenImage = import_react96.css`
|
|
17747
|
+
height: 160px;
|
|
17748
|
+
`;
|
|
17749
|
+
var previewWrapper = import_react96.css`
|
|
17750
|
+
margin-top: var(--spacing-xs);
|
|
17751
|
+
background: var(--gray-50);
|
|
17752
|
+
padding: var(--spacing-sm);
|
|
17753
|
+
border: solid 1px var(--gray-300);
|
|
17754
|
+
border-radius: var(--rounded-sm);
|
|
17755
|
+
`;
|
|
17756
|
+
var previewLink = import_react96.css`
|
|
17757
|
+
display: block;
|
|
17758
|
+
width: 100%;
|
|
17759
|
+
|
|
17760
|
+
img {
|
|
17761
|
+
max-height: 9rem;
|
|
17762
|
+
}
|
|
17763
|
+
`;
|
|
17764
|
+
var previewModalWrapper = import_react96.css`
|
|
17765
|
+
background: var(--gray-50);
|
|
17766
|
+
display: flex;
|
|
17767
|
+
height: 100%;
|
|
17768
|
+
justify-content: center;
|
|
17769
|
+
align-items: center;
|
|
17770
|
+
border: solid 1px var(--gray-300);
|
|
17771
|
+
border-radius: var(--rounded-sm);
|
|
17772
|
+
`;
|
|
17773
|
+
var previewModalImage = import_react96.css`
|
|
17774
|
+
display: flex;
|
|
17775
|
+
height: 100%;
|
|
17776
|
+
width: 100%;
|
|
17777
|
+
justify-content: center;
|
|
17778
|
+
align-items: center;
|
|
17779
|
+
img {
|
|
17780
|
+
max-height: 100%;
|
|
17781
|
+
}
|
|
17782
|
+
`;
|
|
17783
|
+
|
|
17718
17784
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
17719
17785
|
var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
|
|
17720
17786
|
function ParameterImagePreview({ imageSrc }) {
|
|
17721
|
-
const [
|
|
17722
|
-
|
|
17787
|
+
const [showModal, setShowModal] = (0, import_react97.useState)(false);
|
|
17788
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { css: previewWrapper, children: [
|
|
17789
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
17790
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
17791
|
+
"button",
|
|
17792
|
+
{
|
|
17793
|
+
css: previewLink,
|
|
17794
|
+
onClick: () => {
|
|
17795
|
+
setShowModal(true);
|
|
17796
|
+
},
|
|
17797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Image, { src: imageSrc })
|
|
17798
|
+
}
|
|
17799
|
+
)
|
|
17800
|
+
] }) : null;
|
|
17801
|
+
}
|
|
17802
|
+
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
17803
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_jsx_runtime88.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
17804
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
17805
|
+
Modal,
|
|
17806
|
+
{
|
|
17807
|
+
header: "Image Preview",
|
|
17808
|
+
onRequestClose,
|
|
17809
|
+
withoutContentPadding: true,
|
|
17810
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
17811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Image, { src: imageSrc, css: previewModalImage }) })
|
|
17812
|
+
}
|
|
17813
|
+
),
|
|
17814
|
+
document.body
|
|
17815
|
+
) }) : null;
|
|
17816
|
+
};
|
|
17817
|
+
var Image = ({ src, className }) => {
|
|
17818
|
+
const [loading, setLoading] = (0, import_react97.useState)(false);
|
|
17819
|
+
const [loadErrorText, setLoadErrorText] = (0, import_react97.useState)("");
|
|
17723
17820
|
const errorText = "The text you provided is not a valid URL";
|
|
17724
|
-
const updateImageSrc = (0,
|
|
17821
|
+
const updateImageSrc = (0, import_react97.useCallback)(() => {
|
|
17725
17822
|
let message = "";
|
|
17726
17823
|
try {
|
|
17727
|
-
if (
|
|
17728
|
-
const url = String(
|
|
17824
|
+
if (src !== "") {
|
|
17825
|
+
const url = String(src).startsWith("//") ? `${location.protocol}${src}` : String(src);
|
|
17729
17826
|
if (!isValidUrl(url) || !url.startsWith("https")) {
|
|
17730
17827
|
throw Error(errorText);
|
|
17731
17828
|
}
|
|
@@ -17735,43 +17832,49 @@ function ParameterImagePreview({ imageSrc }) {
|
|
|
17735
17832
|
message = errorText;
|
|
17736
17833
|
}
|
|
17737
17834
|
setLoadErrorText(message);
|
|
17738
|
-
}, [setLoadErrorText,
|
|
17739
|
-
(0,
|
|
17835
|
+
}, [setLoadErrorText, src]);
|
|
17836
|
+
(0, import_react97.useEffect)(() => {
|
|
17740
17837
|
updateImageSrc();
|
|
17741
|
-
}, [
|
|
17838
|
+
}, [src]);
|
|
17742
17839
|
const handleLoadEvent = () => {
|
|
17743
17840
|
setLoadErrorText("");
|
|
17744
|
-
if (
|
|
17841
|
+
if (src) {
|
|
17745
17842
|
setLoading(true);
|
|
17746
17843
|
}
|
|
17747
17844
|
const timer = setTimeout(() => {
|
|
17748
17845
|
setLoading(false);
|
|
17749
|
-
},
|
|
17846
|
+
}, 1e3);
|
|
17750
17847
|
return () => clearTimeout(timer);
|
|
17751
17848
|
};
|
|
17752
17849
|
const handleErrorEvent = () => {
|
|
17753
17850
|
setLoadErrorText("The value you provided is not a valid image URL");
|
|
17754
17851
|
};
|
|
17755
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17761
|
-
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
|
|
17766
|
-
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
}
|
|
17852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
17853
|
+
"span",
|
|
17854
|
+
{
|
|
17855
|
+
className,
|
|
17856
|
+
css: [imageWrapper, loading ? imageWrapperLoading : null],
|
|
17857
|
+
children: [
|
|
17858
|
+
src && !loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
17859
|
+
"img",
|
|
17860
|
+
{
|
|
17861
|
+
src,
|
|
17862
|
+
css: [img, loading ? imgLoading : imgLoaded],
|
|
17863
|
+
alt: "image preview",
|
|
17864
|
+
onLoad: handleLoadEvent,
|
|
17865
|
+
onError: handleErrorEvent,
|
|
17866
|
+
loading: "lazy",
|
|
17867
|
+
"data-testid": "parameter-image-preview"
|
|
17868
|
+
}
|
|
17869
|
+
) : null,
|
|
17870
|
+
src && loadErrorText ? /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
17871
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(BrokenImage, { css: [brokenImage, img, imgLoaded] }),
|
|
17872
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ErrorMessage, { message: loadErrorText })
|
|
17873
|
+
] }) : null
|
|
17874
|
+
]
|
|
17875
|
+
}
|
|
17876
|
+
);
|
|
17877
|
+
};
|
|
17775
17878
|
var BrokenImage = ({ ...props }) => {
|
|
17776
17879
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
17777
17880
|
"svg",
|
|
@@ -17807,7 +17910,7 @@ var BrokenImage = ({ ...props }) => {
|
|
|
17807
17910
|
|
|
17808
17911
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
17809
17912
|
init_emotion_jsx_shim();
|
|
17810
|
-
var
|
|
17913
|
+
var import_react100 = require("react");
|
|
17811
17914
|
|
|
17812
17915
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
17813
17916
|
init_emotion_jsx_shim();
|
|
@@ -17818,9 +17921,9 @@ var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
|
17818
17921
|
|
|
17819
17922
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
17820
17923
|
init_emotion_jsx_shim();
|
|
17821
|
-
var
|
|
17924
|
+
var import_react98 = require("react");
|
|
17822
17925
|
var import_jsx_runtime90 = require("@emotion/react/jsx-runtime");
|
|
17823
|
-
var ParameterMenuButton = (0,
|
|
17926
|
+
var ParameterMenuButton = (0, import_react98.forwardRef)(
|
|
17824
17927
|
({ label, children }, ref) => {
|
|
17825
17928
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17826
17929
|
Menu,
|
|
@@ -17845,8 +17948,8 @@ var ParameterMenuButton = (0, import_react97.forwardRef)(
|
|
|
17845
17948
|
|
|
17846
17949
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
17847
17950
|
init_emotion_jsx_shim();
|
|
17848
|
-
var
|
|
17849
|
-
var emptyParameterShell =
|
|
17951
|
+
var import_react99 = require("@emotion/react");
|
|
17952
|
+
var emptyParameterShell = import_react99.css`
|
|
17850
17953
|
border-radius: var(--rounded-sm);
|
|
17851
17954
|
background: var(--white);
|
|
17852
17955
|
flex-grow: 1;
|
|
@@ -17854,7 +17957,7 @@ var emptyParameterShell = import_react98.css`
|
|
|
17854
17957
|
position: relative;
|
|
17855
17958
|
max-width: 100%;
|
|
17856
17959
|
`;
|
|
17857
|
-
var emptyParameterShellText =
|
|
17960
|
+
var emptyParameterShellText = import_react99.css`
|
|
17858
17961
|
background: var(--brand-secondary-6);
|
|
17859
17962
|
border-radius: var(--rounded-sm);
|
|
17860
17963
|
padding: var(--spacing-sm);
|
|
@@ -17862,7 +17965,7 @@ var emptyParameterShellText = import_react98.css`
|
|
|
17862
17965
|
font-size: var(--fs-sm);
|
|
17863
17966
|
margin: 0;
|
|
17864
17967
|
`;
|
|
17865
|
-
var overrideMarker =
|
|
17968
|
+
var overrideMarker = import_react99.css`
|
|
17866
17969
|
border-radius: var(--rounded-sm);
|
|
17867
17970
|
border: 10px solid var(--gray-300);
|
|
17868
17971
|
border-left-color: transparent;
|
|
@@ -17915,6 +18018,7 @@ var extractParameterProps = (props) => {
|
|
|
17915
18018
|
var ParameterShell = ({
|
|
17916
18019
|
label,
|
|
17917
18020
|
labelLeadingIcon,
|
|
18021
|
+
labelTrailingIcon,
|
|
17918
18022
|
hiddenLabel,
|
|
17919
18023
|
id,
|
|
17920
18024
|
errorMessage,
|
|
@@ -17930,17 +18034,19 @@ var ParameterShell = ({
|
|
|
17930
18034
|
children,
|
|
17931
18035
|
...props
|
|
17932
18036
|
}) => {
|
|
17933
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
18037
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react100.useState)(void 0);
|
|
17934
18038
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
17935
18039
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
17936
18040
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: inputContainer2, ...props, children: [
|
|
17937
18041
|
hiddenLabel || title ? null : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
17938
|
-
labelLeadingIcon ? labelLeadingIcon : null,
|
|
17939
|
-
label
|
|
18042
|
+
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
18043
|
+
label,
|
|
18044
|
+
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
17940
18045
|
] }),
|
|
17941
18046
|
!title ? null : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
17942
|
-
labelLeadingIcon ? labelLeadingIcon : null,
|
|
17943
|
-
title
|
|
18047
|
+
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
18048
|
+
title,
|
|
18049
|
+
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
17944
18050
|
] }),
|
|
17945
18051
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: inputWrapper, children: [
|
|
17946
18052
|
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
@@ -17974,14 +18080,19 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime9
|
|
|
17974
18080
|
|
|
17975
18081
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
17976
18082
|
var import_jsx_runtime92 = require("@emotion/react/jsx-runtime");
|
|
17977
|
-
var ParameterImage = (0,
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
18083
|
+
var ParameterImage = (0, import_react101.forwardRef)(
|
|
18084
|
+
({ children, ...props }, ref) => {
|
|
18085
|
+
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
18087
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
18088
|
+
children
|
|
18089
|
+
] });
|
|
18090
|
+
}
|
|
18091
|
+
);
|
|
18092
|
+
var ParameterImageInner = (0, import_react101.forwardRef)((props, ref) => {
|
|
17982
18093
|
const { value } = props;
|
|
17983
18094
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
17984
|
-
const deferredValue = (0,
|
|
18095
|
+
const deferredValue = (0, import_react101.useDeferredValue)(value);
|
|
17985
18096
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
17986
18097
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17987
18098
|
"input",
|
|
@@ -18001,13 +18112,13 @@ var ParameterImageInner = (0, import_react100.forwardRef)((props, ref) => {
|
|
|
18001
18112
|
|
|
18002
18113
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
18003
18114
|
init_emotion_jsx_shim();
|
|
18004
|
-
var
|
|
18115
|
+
var import_react102 = require("react");
|
|
18005
18116
|
var import_jsx_runtime93 = require("@emotion/react/jsx-runtime");
|
|
18006
|
-
var ParameterInput = (0,
|
|
18117
|
+
var ParameterInput = (0, import_react102.forwardRef)((props, ref) => {
|
|
18007
18118
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18008
18119
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
18009
18120
|
});
|
|
18010
|
-
var ParameterInputInner = (0,
|
|
18121
|
+
var ParameterInputInner = (0, import_react102.forwardRef)(
|
|
18011
18122
|
({ ...props }, ref) => {
|
|
18012
18123
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18013
18124
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
@@ -18027,9 +18138,9 @@ var ParameterInputInner = (0, import_react101.forwardRef)(
|
|
|
18027
18138
|
|
|
18028
18139
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
18029
18140
|
init_emotion_jsx_shim();
|
|
18030
|
-
var
|
|
18141
|
+
var import_react103 = require("react");
|
|
18031
18142
|
var import_jsx_runtime94 = require("@emotion/react/jsx-runtime");
|
|
18032
|
-
var ParameterLink = (0,
|
|
18143
|
+
var ParameterLink = (0, import_react103.forwardRef)(
|
|
18033
18144
|
({ disabled, onConnectLink, externalLink, ...props }, ref) => {
|
|
18034
18145
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18035
18146
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
@@ -18052,7 +18163,7 @@ var ParameterLink = (0, import_react102.forwardRef)(
|
|
|
18052
18163
|
);
|
|
18053
18164
|
}
|
|
18054
18165
|
);
|
|
18055
|
-
var ParameterLinkInner = (0,
|
|
18166
|
+
var ParameterLinkInner = (0, import_react103.forwardRef)(
|
|
18056
18167
|
({ externalLink, onConnectLink, disabled, buttonText = "Select link", ...props }, ref) => {
|
|
18057
18168
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18058
18169
|
if (!props.value)
|
|
@@ -18178,7 +18289,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
18178
18289
|
|
|
18179
18290
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18180
18291
|
init_emotion_jsx_shim();
|
|
18181
|
-
var
|
|
18292
|
+
var import_react111 = require("@emotion/react");
|
|
18182
18293
|
var import_list3 = require("@lexical/list");
|
|
18183
18294
|
var import_markdown = require("@lexical/markdown");
|
|
18184
18295
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -18285,7 +18396,7 @@ var getLabelForElement = (type) => {
|
|
|
18285
18396
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18286
18397
|
var import_fast_equals2 = require("fast-equals");
|
|
18287
18398
|
var import_lexical6 = require("lexical");
|
|
18288
|
-
var
|
|
18399
|
+
var import_react112 = require("react");
|
|
18289
18400
|
|
|
18290
18401
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
18291
18402
|
init_emotion_jsx_shim();
|
|
@@ -18308,10 +18419,10 @@ init_emotion_jsx_shim();
|
|
|
18308
18419
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
18309
18420
|
var import_utils2 = require("@lexical/utils");
|
|
18310
18421
|
var import_lexical = require("lexical");
|
|
18311
|
-
var
|
|
18422
|
+
var import_react104 = require("react");
|
|
18312
18423
|
function DisableStylesPlugin() {
|
|
18313
18424
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
18314
|
-
(0,
|
|
18425
|
+
(0, import_react104.useEffect)(() => {
|
|
18315
18426
|
return (0, import_utils2.mergeRegister)(
|
|
18316
18427
|
// Disable text alignment on paragraph nodes
|
|
18317
18428
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -18506,22 +18617,22 @@ var codeElement = import_css.css`
|
|
|
18506
18617
|
|
|
18507
18618
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
18508
18619
|
init_emotion_jsx_shim();
|
|
18509
|
-
var
|
|
18620
|
+
var import_react106 = require("@emotion/react");
|
|
18510
18621
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
18511
18622
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
18512
18623
|
var import_utils3 = require("@lexical/utils");
|
|
18513
18624
|
var import_fast_equals = require("fast-equals");
|
|
18514
18625
|
var import_lexical3 = require("lexical");
|
|
18515
|
-
var
|
|
18626
|
+
var import_react107 = require("react");
|
|
18516
18627
|
|
|
18517
18628
|
// src/components/Popover/Popover.styles.ts
|
|
18518
18629
|
init_emotion_jsx_shim();
|
|
18519
|
-
var
|
|
18520
|
-
var PopoverBtn =
|
|
18630
|
+
var import_react105 = require("@emotion/react");
|
|
18631
|
+
var PopoverBtn = import_react105.css`
|
|
18521
18632
|
border: none;
|
|
18522
18633
|
background: none;
|
|
18523
18634
|
`;
|
|
18524
|
-
var PopoverDefaulterTriggerBtn =
|
|
18635
|
+
var PopoverDefaulterTriggerBtn = import_react105.css`
|
|
18525
18636
|
border: none;
|
|
18526
18637
|
background: none;
|
|
18527
18638
|
padding: var(--spacing-2xs);
|
|
@@ -18531,7 +18642,7 @@ var PopoverDefaulterTriggerBtn = import_react104.css`
|
|
|
18531
18642
|
background-color: rgba(0, 0, 0, 0.05);
|
|
18532
18643
|
}
|
|
18533
18644
|
`;
|
|
18534
|
-
var Popover =
|
|
18645
|
+
var Popover = import_react105.css`
|
|
18535
18646
|
border-left: var(--spacing-xs) solid var(--brand-secondary-3);
|
|
18536
18647
|
border-radius: var(--rounded-base);
|
|
18537
18648
|
box-shadow: var(--shadow-base);
|
|
@@ -18868,16 +18979,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
18868
18979
|
);
|
|
18869
18980
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
18870
18981
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
18871
|
-
var linkPopover =
|
|
18982
|
+
var linkPopover = import_react106.css`
|
|
18872
18983
|
position: absolute;
|
|
18873
18984
|
z-index: 5;
|
|
18874
18985
|
`;
|
|
18875
|
-
var linkPopoverContainer =
|
|
18986
|
+
var linkPopoverContainer = import_react106.css`
|
|
18876
18987
|
${Popover};
|
|
18877
18988
|
align-items: center;
|
|
18878
18989
|
display: flex;
|
|
18879
18990
|
`;
|
|
18880
|
-
var linkPopoverAnchor =
|
|
18991
|
+
var linkPopoverAnchor = import_react106.css`
|
|
18881
18992
|
${link}
|
|
18882
18993
|
${linkColorDefault}
|
|
18883
18994
|
`;
|
|
@@ -18886,17 +18997,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18886
18997
|
return path;
|
|
18887
18998
|
};
|
|
18888
18999
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
18889
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
18890
|
-
const linkPopoverElRef = (0,
|
|
18891
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
18892
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
18893
|
-
(0,
|
|
19000
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react107.useState)();
|
|
19001
|
+
const linkPopoverElRef = (0, import_react107.useRef)(null);
|
|
19002
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react107.useState)(false);
|
|
19003
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react107.useState)(false);
|
|
19004
|
+
(0, import_react107.useEffect)(() => {
|
|
18894
19005
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
18895
19006
|
setLinkPopoverState(void 0);
|
|
18896
19007
|
return;
|
|
18897
19008
|
}
|
|
18898
19009
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
18899
|
-
(0,
|
|
19010
|
+
(0, import_react107.useEffect)(() => {
|
|
18900
19011
|
if (!editor.hasNodes([LinkNode])) {
|
|
18901
19012
|
throw new Error("LinkNode not registered on editor");
|
|
18902
19013
|
}
|
|
@@ -18965,7 +19076,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18965
19076
|
)
|
|
18966
19077
|
);
|
|
18967
19078
|
}, [editor, onConnectLink]);
|
|
18968
|
-
const maybeShowLinkToolbar = (0,
|
|
19079
|
+
const maybeShowLinkToolbar = (0, import_react107.useCallback)(() => {
|
|
18969
19080
|
if (!editor.isEditable()) {
|
|
18970
19081
|
return;
|
|
18971
19082
|
}
|
|
@@ -18997,7 +19108,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18997
19108
|
}
|
|
18998
19109
|
});
|
|
18999
19110
|
}, [editor]);
|
|
19000
|
-
(0,
|
|
19111
|
+
(0, import_react107.useEffect)(() => {
|
|
19001
19112
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19002
19113
|
requestAnimationFrame(() => {
|
|
19003
19114
|
editorState.read(() => {
|
|
@@ -19085,7 +19196,7 @@ var import_list = require("@lexical/list");
|
|
|
19085
19196
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
19086
19197
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
19087
19198
|
var import_lexical4 = require("lexical");
|
|
19088
|
-
var
|
|
19199
|
+
var import_react108 = require("react");
|
|
19089
19200
|
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
19090
19201
|
function isIndentPermitted(maxDepth) {
|
|
19091
19202
|
const selection = (0, import_lexical4.$getSelection)();
|
|
@@ -19109,7 +19220,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
19109
19220
|
}
|
|
19110
19221
|
function ListIndentPlugin({ maxDepth }) {
|
|
19111
19222
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
19112
|
-
(0,
|
|
19223
|
+
(0, import_react108.useEffect)(() => {
|
|
19113
19224
|
return editor.registerCommand(
|
|
19114
19225
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
19115
19226
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -19121,7 +19232,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
19121
19232
|
|
|
19122
19233
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
19123
19234
|
init_emotion_jsx_shim();
|
|
19124
|
-
var
|
|
19235
|
+
var import_react109 = require("@emotion/react");
|
|
19125
19236
|
var import_code2 = require("@lexical/code");
|
|
19126
19237
|
var import_list2 = require("@lexical/list");
|
|
19127
19238
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -19129,9 +19240,9 @@ var import_rich_text = require("@lexical/rich-text");
|
|
|
19129
19240
|
var import_selection2 = require("@lexical/selection");
|
|
19130
19241
|
var import_utils6 = require("@lexical/utils");
|
|
19131
19242
|
var import_lexical5 = require("lexical");
|
|
19132
|
-
var
|
|
19243
|
+
var import_react110 = require("react");
|
|
19133
19244
|
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
19134
|
-
var toolbar =
|
|
19245
|
+
var toolbar = import_react109.css`
|
|
19135
19246
|
background: var(--gray-50);
|
|
19136
19247
|
border-radius: var(--rounded-base);
|
|
19137
19248
|
display: flex;
|
|
@@ -19143,7 +19254,7 @@ var toolbar = import_react108.css`
|
|
|
19143
19254
|
top: calc(var(--spacing-sm) * -2);
|
|
19144
19255
|
z-index: 10;
|
|
19145
19256
|
`;
|
|
19146
|
-
var toolbarGroup =
|
|
19257
|
+
var toolbarGroup = import_react109.css`
|
|
19147
19258
|
display: flex;
|
|
19148
19259
|
gap: var(--spacing-xs);
|
|
19149
19260
|
position: relative;
|
|
@@ -19159,7 +19270,7 @@ var toolbarGroup = import_react108.css`
|
|
|
19159
19270
|
width: 1px;
|
|
19160
19271
|
}
|
|
19161
19272
|
`;
|
|
19162
|
-
var richTextToolbarButton =
|
|
19273
|
+
var richTextToolbarButton = import_react109.css`
|
|
19163
19274
|
align-items: center;
|
|
19164
19275
|
appearance: none;
|
|
19165
19276
|
border: 0;
|
|
@@ -19172,13 +19283,13 @@ var richTextToolbarButton = import_react108.css`
|
|
|
19172
19283
|
min-width: 32px;
|
|
19173
19284
|
padding: 0 var(--spacing-sm);
|
|
19174
19285
|
`;
|
|
19175
|
-
var richTextToolbarButtonActive =
|
|
19286
|
+
var richTextToolbarButtonActive = import_react109.css`
|
|
19176
19287
|
background: var(--gray-200);
|
|
19177
19288
|
`;
|
|
19178
|
-
var toolbarIcon =
|
|
19289
|
+
var toolbarIcon = import_react109.css`
|
|
19179
19290
|
color: inherit;
|
|
19180
19291
|
`;
|
|
19181
|
-
var toolbarChevron =
|
|
19292
|
+
var toolbarChevron = import_react109.css`
|
|
19182
19293
|
margin-left: var(--spacing-xs);
|
|
19183
19294
|
`;
|
|
19184
19295
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19233,7 +19344,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19233
19344
|
}
|
|
19234
19345
|
});
|
|
19235
19346
|
};
|
|
19236
|
-
const updateToolbar = (0,
|
|
19347
|
+
const updateToolbar = (0, import_react110.useCallback)(() => {
|
|
19237
19348
|
const selection = (0, import_lexical5.$getSelection)();
|
|
19238
19349
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
19239
19350
|
return;
|
|
@@ -19272,7 +19383,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19272
19383
|
setIsLink(false);
|
|
19273
19384
|
}
|
|
19274
19385
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
19275
|
-
(0,
|
|
19386
|
+
(0, import_react110.useEffect)(() => {
|
|
19276
19387
|
return editor.registerCommand(
|
|
19277
19388
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
19278
19389
|
(_payload) => {
|
|
@@ -19282,7 +19393,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19282
19393
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
19283
19394
|
);
|
|
19284
19395
|
}, [editor, updateToolbar]);
|
|
19285
|
-
(0,
|
|
19396
|
+
(0, import_react110.useEffect)(() => {
|
|
19286
19397
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19287
19398
|
requestAnimationFrame(() => {
|
|
19288
19399
|
editorState.read(() => {
|
|
@@ -19422,26 +19533,26 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19422
19533
|
var RichTextToolbar_default = RichTextToolbar;
|
|
19423
19534
|
var useRichTextToolbarState = ({ config }) => {
|
|
19424
19535
|
var _a;
|
|
19425
|
-
const enabledBuiltInFormats = (0,
|
|
19536
|
+
const enabledBuiltInFormats = (0, import_react110.useMemo)(() => {
|
|
19426
19537
|
return richTextBuiltInFormats.filter((format) => {
|
|
19427
19538
|
var _a2, _b;
|
|
19428
19539
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
19429
19540
|
});
|
|
19430
19541
|
}, [config]);
|
|
19431
|
-
const enabledBuiltInElements = (0,
|
|
19542
|
+
const enabledBuiltInElements = (0, import_react110.useMemo)(() => {
|
|
19432
19543
|
return richTextBuiltInElements.filter((element) => {
|
|
19433
19544
|
var _a2, _b;
|
|
19434
19545
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
19435
19546
|
});
|
|
19436
19547
|
}, [config]);
|
|
19437
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
19548
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react110.useMemo)(() => {
|
|
19438
19549
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
19439
19550
|
}, [enabledBuiltInFormats]);
|
|
19440
19551
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
19441
19552
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
19442
19553
|
);
|
|
19443
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
19444
|
-
const visibleFormatsWithIcon = (0,
|
|
19554
|
+
const [activeFormats, setActiveFormats] = (0, import_react110.useState)([]);
|
|
19555
|
+
const visibleFormatsWithIcon = (0, import_react110.useMemo)(() => {
|
|
19445
19556
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19446
19557
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19447
19558
|
visibleFormats.add(type);
|
|
@@ -19451,7 +19562,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19451
19562
|
});
|
|
19452
19563
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19453
19564
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
19454
|
-
const visibleFormatsWithoutIcon = (0,
|
|
19565
|
+
const visibleFormatsWithoutIcon = (0, import_react110.useMemo)(() => {
|
|
19455
19566
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19456
19567
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19457
19568
|
visibleFormats.add(type);
|
|
@@ -19461,11 +19572,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19461
19572
|
});
|
|
19462
19573
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19463
19574
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
19464
|
-
const [activeElement, setActiveElement] = (0,
|
|
19575
|
+
const [activeElement, setActiveElement] = (0, import_react110.useState)("paragraph");
|
|
19465
19576
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
19466
19577
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
19467
19578
|
);
|
|
19468
|
-
const visibleTextualElements = (0,
|
|
19579
|
+
const visibleTextualElements = (0, import_react110.useMemo)(() => {
|
|
19469
19580
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
19470
19581
|
return enabledTextualElements;
|
|
19471
19582
|
}
|
|
@@ -19476,24 +19587,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19476
19587
|
}
|
|
19477
19588
|
);
|
|
19478
19589
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
19479
|
-
const [isLink, setIsLink] = (0,
|
|
19480
|
-
const linkElementVisible = (0,
|
|
19590
|
+
const [isLink, setIsLink] = (0, import_react110.useState)(false);
|
|
19591
|
+
const linkElementVisible = (0, import_react110.useMemo)(() => {
|
|
19481
19592
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
19482
19593
|
}, [isLink, enabledBuiltInElements]);
|
|
19483
|
-
const visibleLists = (0,
|
|
19594
|
+
const visibleLists = (0, import_react110.useMemo)(() => {
|
|
19484
19595
|
return new Set(
|
|
19485
19596
|
["orderedList", "unorderedList"].filter(
|
|
19486
19597
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
19487
19598
|
)
|
|
19488
19599
|
);
|
|
19489
19600
|
}, [activeElement, enabledBuiltInElements]);
|
|
19490
|
-
const quoteElementVisible = (0,
|
|
19601
|
+
const quoteElementVisible = (0, import_react110.useMemo)(() => {
|
|
19491
19602
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
19492
19603
|
}, [activeElement, enabledBuiltInElements]);
|
|
19493
|
-
const codeElementVisible = (0,
|
|
19604
|
+
const codeElementVisible = (0, import_react110.useMemo)(() => {
|
|
19494
19605
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
19495
19606
|
}, [activeElement, enabledBuiltInElements]);
|
|
19496
|
-
const visibleElementsWithIcons = (0,
|
|
19607
|
+
const visibleElementsWithIcons = (0, import_react110.useMemo)(() => {
|
|
19497
19608
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19498
19609
|
if (linkElementVisible) {
|
|
19499
19610
|
visibleElements.add("link");
|
|
@@ -19592,18 +19703,18 @@ var ParameterRichText = ({
|
|
|
19592
19703
|
}
|
|
19593
19704
|
);
|
|
19594
19705
|
};
|
|
19595
|
-
var editorWrapper =
|
|
19706
|
+
var editorWrapper = import_react111.css`
|
|
19596
19707
|
display: flex;
|
|
19597
19708
|
flex-flow: column;
|
|
19598
19709
|
flex-grow: 1;
|
|
19599
19710
|
`;
|
|
19600
|
-
var editorContainer =
|
|
19711
|
+
var editorContainer = import_react111.css`
|
|
19601
19712
|
display: flex;
|
|
19602
19713
|
flex-flow: column;
|
|
19603
19714
|
flex-grow: 1;
|
|
19604
19715
|
position: relative;
|
|
19605
19716
|
`;
|
|
19606
|
-
var editorPlaceholder =
|
|
19717
|
+
var editorPlaceholder = import_react111.css`
|
|
19607
19718
|
color: var(--gray-500);
|
|
19608
19719
|
font-style: italic;
|
|
19609
19720
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -19614,7 +19725,7 @@ var editorPlaceholder = import_react110.css`
|
|
|
19614
19725
|
top: var(--spacing-xs);
|
|
19615
19726
|
user-select: none;
|
|
19616
19727
|
`;
|
|
19617
|
-
var editorInput =
|
|
19728
|
+
var editorInput = import_react111.css`
|
|
19618
19729
|
background: var(--white);
|
|
19619
19730
|
border: 1px solid var(--white);
|
|
19620
19731
|
border-radius: var(--rounded-sm);
|
|
@@ -19736,14 +19847,14 @@ var RichText = ({
|
|
|
19736
19847
|
variables,
|
|
19737
19848
|
customControls
|
|
19738
19849
|
}) => {
|
|
19739
|
-
const editorContainerRef = (0,
|
|
19850
|
+
const editorContainerRef = (0, import_react112.useRef)(null);
|
|
19740
19851
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
19741
|
-
(0,
|
|
19852
|
+
(0, import_react112.useEffect)(() => {
|
|
19742
19853
|
if (onRichTextInit) {
|
|
19743
19854
|
onRichTextInit(editor);
|
|
19744
19855
|
}
|
|
19745
19856
|
}, [editor, onRichTextInit]);
|
|
19746
|
-
(0,
|
|
19857
|
+
(0, import_react112.useEffect)(() => {
|
|
19747
19858
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
19748
19859
|
requestAnimationFrame(() => {
|
|
19749
19860
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -19788,15 +19899,15 @@ var RichText = ({
|
|
|
19788
19899
|
|
|
19789
19900
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
19790
19901
|
init_emotion_jsx_shim();
|
|
19791
|
-
var
|
|
19902
|
+
var import_react113 = require("react");
|
|
19792
19903
|
var import_jsx_runtime100 = require("@emotion/react/jsx-runtime");
|
|
19793
|
-
var ParameterSelect = (0,
|
|
19904
|
+
var ParameterSelect = (0, import_react113.forwardRef)(
|
|
19794
19905
|
({ defaultOption, options, ...props }, ref) => {
|
|
19795
19906
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19796
19907
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
19797
19908
|
}
|
|
19798
19909
|
);
|
|
19799
|
-
var ParameterSelectInner = (0,
|
|
19910
|
+
var ParameterSelectInner = (0, import_react113.forwardRef)(
|
|
19800
19911
|
({ defaultOption, options, ...props }, ref) => {
|
|
19801
19912
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
19802
19913
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
@@ -19821,13 +19932,13 @@ var ParameterSelectInner = (0, import_react112.forwardRef)(
|
|
|
19821
19932
|
|
|
19822
19933
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
19823
19934
|
init_emotion_jsx_shim();
|
|
19824
|
-
var
|
|
19935
|
+
var import_react114 = require("react");
|
|
19825
19936
|
var import_jsx_runtime101 = require("@emotion/react/jsx-runtime");
|
|
19826
|
-
var ParameterTextarea = (0,
|
|
19937
|
+
var ParameterTextarea = (0, import_react114.forwardRef)((props, ref) => {
|
|
19827
19938
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19828
19939
|
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
19829
19940
|
});
|
|
19830
|
-
var ParameterTextareaInner = (0,
|
|
19941
|
+
var ParameterTextareaInner = (0, import_react114.forwardRef)(({ ...props }, ref) => {
|
|
19831
19942
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
19832
19943
|
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
19833
19944
|
"textarea",
|
|
@@ -19843,13 +19954,13 @@ var ParameterTextareaInner = (0, import_react113.forwardRef)(({ ...props }, ref)
|
|
|
19843
19954
|
|
|
19844
19955
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
19845
19956
|
init_emotion_jsx_shim();
|
|
19846
|
-
var
|
|
19957
|
+
var import_react115 = require("react");
|
|
19847
19958
|
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
19848
|
-
var ParameterToggle = (0,
|
|
19959
|
+
var ParameterToggle = (0, import_react115.forwardRef)((props, ref) => {
|
|
19849
19960
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19850
19961
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
19851
19962
|
});
|
|
19852
|
-
var ParameterToggleInner = (0,
|
|
19963
|
+
var ParameterToggleInner = (0, import_react115.forwardRef)(
|
|
19853
19964
|
({ ...props }, ref) => {
|
|
19854
19965
|
const { id, label } = useParameterShell();
|
|
19855
19966
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
@@ -19896,22 +20007,22 @@ var Popover2 = ({
|
|
|
19896
20007
|
|
|
19897
20008
|
// src/components/ProgressList/ProgressList.tsx
|
|
19898
20009
|
init_emotion_jsx_shim();
|
|
19899
|
-
var
|
|
20010
|
+
var import_react117 = require("@emotion/react");
|
|
19900
20011
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
19901
20012
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
19902
20013
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
19903
|
-
var
|
|
20014
|
+
var import_react118 = require("react");
|
|
19904
20015
|
|
|
19905
20016
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
19906
20017
|
init_emotion_jsx_shim();
|
|
19907
|
-
var
|
|
19908
|
-
var progressListStyles =
|
|
20018
|
+
var import_react116 = require("@emotion/react");
|
|
20019
|
+
var progressListStyles = import_react116.css`
|
|
19909
20020
|
display: flex;
|
|
19910
20021
|
flex-direction: column;
|
|
19911
20022
|
gap: var(--spacing-sm);
|
|
19912
20023
|
list-style-type: none;
|
|
19913
20024
|
`;
|
|
19914
|
-
var progressListItemStyles =
|
|
20025
|
+
var progressListItemStyles = import_react116.css`
|
|
19915
20026
|
display: flex;
|
|
19916
20027
|
gap: var(--spacing-base);
|
|
19917
20028
|
align-items: center;
|
|
@@ -19920,7 +20031,7 @@ var progressListItemStyles = import_react115.css`
|
|
|
19920
20031
|
// src/components/ProgressList/ProgressList.tsx
|
|
19921
20032
|
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
19922
20033
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
19923
|
-
const itemsWithStatus = (0,
|
|
20034
|
+
const itemsWithStatus = (0, import_react118.useMemo)(() => {
|
|
19924
20035
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
19925
20036
|
return items.map((item, index) => {
|
|
19926
20037
|
let status = "queued";
|
|
@@ -19953,7 +20064,7 @@ var ProgressListItem = ({
|
|
|
19953
20064
|
errorLevel = "danger",
|
|
19954
20065
|
autoEllipsis = false
|
|
19955
20066
|
}) => {
|
|
19956
|
-
const icon = (0,
|
|
20067
|
+
const icon = (0, import_react118.useMemo)(() => {
|
|
19957
20068
|
if (error) {
|
|
19958
20069
|
return warningIcon;
|
|
19959
20070
|
}
|
|
@@ -19964,14 +20075,14 @@ var ProgressListItem = ({
|
|
|
19964
20075
|
};
|
|
19965
20076
|
return iconPerStatus[status];
|
|
19966
20077
|
}, [status, error]);
|
|
19967
|
-
const statusStyles = (0,
|
|
20078
|
+
const statusStyles = (0, import_react118.useMemo)(() => {
|
|
19968
20079
|
if (error) {
|
|
19969
|
-
return errorLevel === "caution" ?
|
|
20080
|
+
return errorLevel === "caution" ? import_react117.css`
|
|
19970
20081
|
color: rgb(161, 98, 7);
|
|
19971
20082
|
& svg {
|
|
19972
20083
|
color: rgb(250, 204, 21);
|
|
19973
20084
|
}
|
|
19974
|
-
` :
|
|
20085
|
+
` : import_react117.css`
|
|
19975
20086
|
color: rgb(185, 28, 28);
|
|
19976
20087
|
& svg {
|
|
19977
20088
|
color: var(--brand-primary-2);
|
|
@@ -19979,13 +20090,13 @@ var ProgressListItem = ({
|
|
|
19979
20090
|
`;
|
|
19980
20091
|
}
|
|
19981
20092
|
const colorPerStatus = {
|
|
19982
|
-
completed:
|
|
20093
|
+
completed: import_react117.css`
|
|
19983
20094
|
opacity: 0.75;
|
|
19984
20095
|
`,
|
|
19985
|
-
inProgress:
|
|
20096
|
+
inProgress: import_react117.css`
|
|
19986
20097
|
-webkit-text-stroke-width: thin;
|
|
19987
20098
|
`,
|
|
19988
|
-
queued:
|
|
20099
|
+
queued: import_react117.css`
|
|
19989
20100
|
opacity: 0.5;
|
|
19990
20101
|
`
|
|
19991
20102
|
};
|
|
@@ -20002,14 +20113,14 @@ var ProgressListItem = ({
|
|
|
20002
20113
|
|
|
20003
20114
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20004
20115
|
init_emotion_jsx_shim();
|
|
20005
|
-
var
|
|
20116
|
+
var import_react120 = require("@emotion/react");
|
|
20006
20117
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
20007
|
-
var
|
|
20118
|
+
var import_react121 = require("react");
|
|
20008
20119
|
|
|
20009
20120
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20010
20121
|
init_emotion_jsx_shim();
|
|
20011
|
-
var
|
|
20012
|
-
var segmentedControlStyles =
|
|
20122
|
+
var import_react119 = require("@emotion/react");
|
|
20123
|
+
var segmentedControlStyles = import_react119.css`
|
|
20013
20124
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20014
20125
|
--segmented-control-border-width: 1px;
|
|
20015
20126
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -20028,14 +20139,14 @@ var segmentedControlStyles = import_react118.css`
|
|
|
20028
20139
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20029
20140
|
font-size: var(--fs-xs);
|
|
20030
20141
|
`;
|
|
20031
|
-
var segmentedControlVerticalStyles =
|
|
20142
|
+
var segmentedControlVerticalStyles = import_react119.css`
|
|
20032
20143
|
flex-direction: column;
|
|
20033
20144
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20034
20145
|
var(--segmented-control-rounded-value) 0 0;
|
|
20035
20146
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20036
20147
|
var(--segmented-control-rounded-value);
|
|
20037
20148
|
`;
|
|
20038
|
-
var segmentedControlItemStyles =
|
|
20149
|
+
var segmentedControlItemStyles = import_react119.css`
|
|
20039
20150
|
&:first-of-type label {
|
|
20040
20151
|
border-radius: var(--segmented-control-first-border-radius);
|
|
20041
20152
|
}
|
|
@@ -20043,10 +20154,10 @@ var segmentedControlItemStyles = import_react118.css`
|
|
|
20043
20154
|
border-radius: var(--segmented-control-last-border-radius);
|
|
20044
20155
|
}
|
|
20045
20156
|
`;
|
|
20046
|
-
var segmentedControlInputStyles =
|
|
20157
|
+
var segmentedControlInputStyles = import_react119.css`
|
|
20047
20158
|
${accessibleHidden}
|
|
20048
20159
|
`;
|
|
20049
|
-
var segmentedControlLabelStyles = (checked, disabled) =>
|
|
20160
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react119.css`
|
|
20050
20161
|
position: relative;
|
|
20051
20162
|
display: flex;
|
|
20052
20163
|
align-items: center;
|
|
@@ -20113,20 +20224,20 @@ var segmentedControlLabelStyles = (checked, disabled) => import_react118.css`
|
|
|
20113
20224
|
`}
|
|
20114
20225
|
}
|
|
20115
20226
|
`;
|
|
20116
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
20227
|
+
var segmentedControlLabelIconOnlyStyles = import_react119.css`
|
|
20117
20228
|
padding-inline: 0.5em;
|
|
20118
20229
|
`;
|
|
20119
|
-
var segmentedControlLabelCheckStyles =
|
|
20230
|
+
var segmentedControlLabelCheckStyles = import_react119.css`
|
|
20120
20231
|
opacity: 0.5;
|
|
20121
20232
|
`;
|
|
20122
|
-
var segmentedControlLabelContentStyles =
|
|
20233
|
+
var segmentedControlLabelContentStyles = import_react119.css`
|
|
20123
20234
|
display: flex;
|
|
20124
20235
|
align-items: center;
|
|
20125
20236
|
justify-content: center;
|
|
20126
20237
|
gap: var(--spacing-sm);
|
|
20127
20238
|
height: 100%;
|
|
20128
20239
|
`;
|
|
20129
|
-
var segmentedControlLabelTextStyles =
|
|
20240
|
+
var segmentedControlLabelTextStyles = import_react119.css``;
|
|
20130
20241
|
|
|
20131
20242
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20132
20243
|
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
@@ -20141,7 +20252,7 @@ var SegmentedControl = ({
|
|
|
20141
20252
|
size = "md",
|
|
20142
20253
|
...props
|
|
20143
20254
|
}) => {
|
|
20144
|
-
const onOptionChange = (0,
|
|
20255
|
+
const onOptionChange = (0, import_react121.useCallback)(
|
|
20145
20256
|
(event) => {
|
|
20146
20257
|
if (event.target.checked) {
|
|
20147
20258
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20149,15 +20260,15 @@ var SegmentedControl = ({
|
|
|
20149
20260
|
},
|
|
20150
20261
|
[options, onChange]
|
|
20151
20262
|
);
|
|
20152
|
-
const sizeStyles = (0,
|
|
20263
|
+
const sizeStyles = (0, import_react121.useMemo)(() => {
|
|
20153
20264
|
const map = {
|
|
20154
|
-
sm: (0,
|
|
20155
|
-
md: (0,
|
|
20156
|
-
lg: (0,
|
|
20265
|
+
sm: (0, import_react120.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
20266
|
+
md: (0, import_react120.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
20267
|
+
lg: (0, import_react120.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20157
20268
|
};
|
|
20158
20269
|
return map[size];
|
|
20159
20270
|
}, [size]);
|
|
20160
|
-
const isIconOnly = (0,
|
|
20271
|
+
const isIconOnly = (0, import_react121.useMemo)(() => {
|
|
20161
20272
|
return options.every((option) => option.icon && !option.label);
|
|
20162
20273
|
}, [options]);
|
|
20163
20274
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
@@ -20214,12 +20325,12 @@ init_emotion_jsx_shim();
|
|
|
20214
20325
|
|
|
20215
20326
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20216
20327
|
init_emotion_jsx_shim();
|
|
20217
|
-
var
|
|
20218
|
-
var lightFadingOut =
|
|
20328
|
+
var import_react122 = require("@emotion/react");
|
|
20329
|
+
var lightFadingOut = import_react122.keyframes`
|
|
20219
20330
|
from { opacity: 0.1; }
|
|
20220
20331
|
to { opacity: 0.025; }
|
|
20221
20332
|
`;
|
|
20222
|
-
var skeletonStyles =
|
|
20333
|
+
var skeletonStyles = import_react122.css`
|
|
20223
20334
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20224
20335
|
background-color: var(--gray-900);
|
|
20225
20336
|
`;
|
|
@@ -20258,8 +20369,8 @@ var React23 = __toESM(require("react"));
|
|
|
20258
20369
|
|
|
20259
20370
|
// src/components/Switch/Switch.styles.ts
|
|
20260
20371
|
init_emotion_jsx_shim();
|
|
20261
|
-
var
|
|
20262
|
-
var SwitchInputContainer =
|
|
20372
|
+
var import_react123 = require("@emotion/react");
|
|
20373
|
+
var SwitchInputContainer = import_react123.css`
|
|
20263
20374
|
cursor: pointer;
|
|
20264
20375
|
display: inline-block;
|
|
20265
20376
|
position: relative;
|
|
@@ -20268,7 +20379,7 @@ var SwitchInputContainer = import_react122.css`
|
|
|
20268
20379
|
vertical-align: middle;
|
|
20269
20380
|
user-select: none;
|
|
20270
20381
|
`;
|
|
20271
|
-
var SwitchInput =
|
|
20382
|
+
var SwitchInput = import_react123.css`
|
|
20272
20383
|
appearance: none;
|
|
20273
20384
|
border-radius: var(--rounded-full);
|
|
20274
20385
|
background-color: var(--white);
|
|
@@ -20306,7 +20417,7 @@ var SwitchInput = import_react122.css`
|
|
|
20306
20417
|
cursor: not-allowed;
|
|
20307
20418
|
}
|
|
20308
20419
|
`;
|
|
20309
|
-
var SwitchInputDisabled =
|
|
20420
|
+
var SwitchInputDisabled = import_react123.css`
|
|
20310
20421
|
opacity: var(--opacity-50);
|
|
20311
20422
|
cursor: not-allowed;
|
|
20312
20423
|
|
|
@@ -20314,7 +20425,7 @@ var SwitchInputDisabled = import_react122.css`
|
|
|
20314
20425
|
cursor: not-allowed;
|
|
20315
20426
|
}
|
|
20316
20427
|
`;
|
|
20317
|
-
var SwitchInputLabel =
|
|
20428
|
+
var SwitchInputLabel = import_react123.css`
|
|
20318
20429
|
align-items: center;
|
|
20319
20430
|
color: var(--brand-secondary-1);
|
|
20320
20431
|
display: inline-flex;
|
|
@@ -20336,7 +20447,7 @@ var SwitchInputLabel = import_react122.css`
|
|
|
20336
20447
|
top: 0;
|
|
20337
20448
|
}
|
|
20338
20449
|
`;
|
|
20339
|
-
var SwitchText =
|
|
20450
|
+
var SwitchText = import_react123.css`
|
|
20340
20451
|
color: var(--gray-500);
|
|
20341
20452
|
font-size: var(--fs-sm);
|
|
20342
20453
|
padding-inline: var(--spacing-2xl) 0;
|
|
@@ -20367,8 +20478,8 @@ var React24 = __toESM(require("react"));
|
|
|
20367
20478
|
|
|
20368
20479
|
// src/components/Table/Table.styles.ts
|
|
20369
20480
|
init_emotion_jsx_shim();
|
|
20370
|
-
var
|
|
20371
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
20481
|
+
var import_react124 = require("@emotion/react");
|
|
20482
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react124.css`
|
|
20372
20483
|
border-bottom: 1px solid var(--gray-400);
|
|
20373
20484
|
border-collapse: collapse;
|
|
20374
20485
|
min-width: 100%;
|
|
@@ -20379,15 +20490,15 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
20379
20490
|
padding: ${cellPadding};
|
|
20380
20491
|
}
|
|
20381
20492
|
`;
|
|
20382
|
-
var tableHead =
|
|
20493
|
+
var tableHead = import_react124.css`
|
|
20383
20494
|
background: var(--gray-100);
|
|
20384
20495
|
color: var(--brand-secondary-1);
|
|
20385
20496
|
text-align: left;
|
|
20386
20497
|
`;
|
|
20387
|
-
var tableRow =
|
|
20498
|
+
var tableRow = import_react124.css`
|
|
20388
20499
|
border-bottom: 1px solid var(--gray-200);
|
|
20389
20500
|
`;
|
|
20390
|
-
var tableCellHead =
|
|
20501
|
+
var tableCellHead = import_react124.css`
|
|
20391
20502
|
font-size: var(--fs-sm);
|
|
20392
20503
|
text-transform: uppercase;
|
|
20393
20504
|
font-weight: var(--fw-bold);
|
|
@@ -20433,13 +20544,13 @@ var TableCellData = React24.forwardRef(
|
|
|
20433
20544
|
|
|
20434
20545
|
// src/components/Tabs/Tabs.tsx
|
|
20435
20546
|
init_emotion_jsx_shim();
|
|
20436
|
-
var
|
|
20547
|
+
var import_react126 = require("react");
|
|
20437
20548
|
var import_Tab = require("reakit/Tab");
|
|
20438
20549
|
|
|
20439
20550
|
// src/components/Tabs/Tabs.styles.ts
|
|
20440
20551
|
init_emotion_jsx_shim();
|
|
20441
|
-
var
|
|
20442
|
-
var tabButtonStyles =
|
|
20552
|
+
var import_react125 = require("@emotion/react");
|
|
20553
|
+
var tabButtonStyles = import_react125.css`
|
|
20443
20554
|
align-items: center;
|
|
20444
20555
|
border: 0;
|
|
20445
20556
|
height: 2.5rem;
|
|
@@ -20456,7 +20567,7 @@ var tabButtonStyles = import_react124.css`
|
|
|
20456
20567
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
20457
20568
|
}
|
|
20458
20569
|
`;
|
|
20459
|
-
var tabButtonGroupStyles =
|
|
20570
|
+
var tabButtonGroupStyles = import_react125.css`
|
|
20460
20571
|
display: flex;
|
|
20461
20572
|
gap: var(--spacing-base);
|
|
20462
20573
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -20464,22 +20575,22 @@ var tabButtonGroupStyles = import_react124.css`
|
|
|
20464
20575
|
|
|
20465
20576
|
// src/components/Tabs/Tabs.tsx
|
|
20466
20577
|
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20467
|
-
var CurrentTabContext = (0,
|
|
20578
|
+
var CurrentTabContext = (0, import_react126.createContext)(null);
|
|
20468
20579
|
var useCurrentTab = () => {
|
|
20469
|
-
const context = (0,
|
|
20580
|
+
const context = (0, import_react126.useContext)(CurrentTabContext);
|
|
20470
20581
|
if (!context) {
|
|
20471
20582
|
throw new Error("This component can only be used inside <Tabs>");
|
|
20472
20583
|
}
|
|
20473
20584
|
return context;
|
|
20474
20585
|
};
|
|
20475
20586
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
20476
|
-
const selected = (0,
|
|
20587
|
+
const selected = (0, import_react126.useMemo)(() => {
|
|
20477
20588
|
if (selectedId)
|
|
20478
20589
|
return selectedId;
|
|
20479
20590
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
20480
20591
|
}, [selectedId, useHashForState]);
|
|
20481
20592
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
20482
|
-
(0,
|
|
20593
|
+
(0, import_react126.useEffect)(() => {
|
|
20483
20594
|
var _a;
|
|
20484
20595
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
20485
20596
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -20487,7 +20598,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
20487
20598
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
20488
20599
|
}
|
|
20489
20600
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
20490
|
-
(0,
|
|
20601
|
+
(0, import_react126.useEffect)(() => {
|
|
20491
20602
|
if (selected && selected !== tab.selectedId) {
|
|
20492
20603
|
tab.setSelectedId(selected);
|
|
20493
20604
|
}
|
|
@@ -20512,8 +20623,8 @@ init_emotion_jsx_shim();
|
|
|
20512
20623
|
|
|
20513
20624
|
// src/components/Validation/StatusBullet.styles.ts
|
|
20514
20625
|
init_emotion_jsx_shim();
|
|
20515
|
-
var
|
|
20516
|
-
var StatusBulletContainer =
|
|
20626
|
+
var import_react127 = require("@emotion/react");
|
|
20627
|
+
var StatusBulletContainer = import_react127.css`
|
|
20517
20628
|
align-items: center;
|
|
20518
20629
|
align-self: center;
|
|
20519
20630
|
color: var(--gray-500);
|
|
@@ -20530,33 +20641,33 @@ var StatusBulletContainer = import_react126.css`
|
|
|
20530
20641
|
display: block;
|
|
20531
20642
|
}
|
|
20532
20643
|
`;
|
|
20533
|
-
var StatusBulletBase =
|
|
20644
|
+
var StatusBulletBase = import_react127.css`
|
|
20534
20645
|
font-size: var(--fs-sm);
|
|
20535
20646
|
&:before {
|
|
20536
20647
|
width: var(--fs-xs);
|
|
20537
20648
|
height: var(--fs-xs);
|
|
20538
20649
|
}
|
|
20539
20650
|
`;
|
|
20540
|
-
var StatusBulletSmall =
|
|
20651
|
+
var StatusBulletSmall = import_react127.css`
|
|
20541
20652
|
font-size: var(--fs-xs);
|
|
20542
20653
|
&:before {
|
|
20543
20654
|
width: var(--fs-xxs);
|
|
20544
20655
|
height: var(--fs-xxs);
|
|
20545
20656
|
}
|
|
20546
20657
|
`;
|
|
20547
|
-
var StatusDraft =
|
|
20658
|
+
var StatusDraft = import_react127.css`
|
|
20548
20659
|
&:before {
|
|
20549
20660
|
background: var(--white);
|
|
20550
20661
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20551
20662
|
}
|
|
20552
20663
|
`;
|
|
20553
|
-
var StatusModified =
|
|
20664
|
+
var StatusModified = import_react127.css`
|
|
20554
20665
|
&:before {
|
|
20555
20666
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
20556
20667
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20557
20668
|
}
|
|
20558
20669
|
`;
|
|
20559
|
-
var StatusError =
|
|
20670
|
+
var StatusError = import_react127.css`
|
|
20560
20671
|
color: var(--error);
|
|
20561
20672
|
&:before {
|
|
20562
20673
|
/* TODO: replace this with an svg icon */
|
|
@@ -20569,12 +20680,12 @@ var StatusError = import_react126.css`
|
|
|
20569
20680
|
);
|
|
20570
20681
|
}
|
|
20571
20682
|
`;
|
|
20572
|
-
var StatusPublished =
|
|
20683
|
+
var StatusPublished = import_react127.css`
|
|
20573
20684
|
&:before {
|
|
20574
20685
|
background: var(--primary-action-default);
|
|
20575
20686
|
}
|
|
20576
20687
|
`;
|
|
20577
|
-
var StatusOrphan =
|
|
20688
|
+
var StatusOrphan = import_react127.css`
|
|
20578
20689
|
&:before {
|
|
20579
20690
|
background: var(--brand-secondary-5);
|
|
20580
20691
|
}
|