@uniformdev/design-system 20.50.2-alpha.109 → 20.50.2-alpha.117
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/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
@@ -9325,8 +9326,20 @@ var PageHeaderSection = ({
|
|
|
9325
9326
|
level = 2,
|
|
9326
9327
|
linkProps,
|
|
9327
9328
|
linkManagerComponent,
|
|
9329
|
+
afterTitle,
|
|
9330
|
+
afterTitleGap = "sm",
|
|
9331
|
+
afterTitleAlign = "center",
|
|
9328
9332
|
...htmlProps
|
|
9329
9333
|
}) => {
|
|
9334
|
+
const HeaderContent = () => {
|
|
9335
|
+
if (afterTitle) {
|
|
9336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(HorizontalRhythm, { css: PageHeaderSectionTitle, gap: afterTitleGap, align: afterTitleAlign, children: [
|
|
9337
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Heading2, { level, ...htmlProps, "data-testid": "page-header-section", withMarginBottom: false, children: title }),
|
|
9338
|
+
afterTitle
|
|
9339
|
+
] });
|
|
9340
|
+
}
|
|
9341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Heading2, { level, css: PageHeaderSectionTitle, ...htmlProps, "data-testid": "page-header-section", children: title });
|
|
9342
|
+
};
|
|
9330
9343
|
if (linkText && linkProps && !linkManagerComponent) {
|
|
9331
9344
|
throw Error("You must provide a linkManagerComponent");
|
|
9332
9345
|
}
|
|
@@ -9345,7 +9358,7 @@ var PageHeaderSection = ({
|
|
|
9345
9358
|
}
|
|
9346
9359
|
)
|
|
9347
9360
|
] }) : null,
|
|
9348
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9361
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(HeaderContent, {}),
|
|
9349
9362
|
desc
|
|
9350
9363
|
] }),
|
|
9351
9364
|
children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { css: PageHeaderSectionChildContainer, children }) : null
|
|
@@ -15603,43 +15616,51 @@ init_emotion_jsx_shim();
|
|
|
15603
15616
|
var React20 = __toESM(require("react"));
|
|
15604
15617
|
var import_react_paginate = __toESM(require("react-paginate"));
|
|
15605
15618
|
|
|
15606
|
-
// src/components/Pagination/
|
|
15607
|
-
init_emotion_jsx_shim();
|
|
15608
|
-
var
|
|
15609
|
-
var
|
|
15619
|
+
// src/components/Pagination/Pagination.styles.ts
|
|
15620
|
+
init_emotion_jsx_shim();
|
|
15621
|
+
var import_react140 = require("@emotion/react");
|
|
15622
|
+
var container2 = "ud-pagination-container";
|
|
15623
|
+
var disabled = "ud-pagination-disabled";
|
|
15624
|
+
var disabledLink = "ud-pagination-disabled-link";
|
|
15625
|
+
var pageLink = "ud-pagination-page-link";
|
|
15626
|
+
var prevNextControls = "ud-pagination-prev-next";
|
|
15627
|
+
var active = "ud-pagination-active";
|
|
15628
|
+
var page = "ud-pagination-page";
|
|
15629
|
+
var paginationStyles = import_react140.css`
|
|
15610
15630
|
display: inline-flex;
|
|
15611
15631
|
max-width: 100%;
|
|
15612
15632
|
overflow-x: auto;
|
|
15613
|
-
|
|
15614
|
-
|
|
15615
|
-
|
|
15616
|
-
|
|
15617
|
-
|
|
15618
|
-
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
15622
|
-
|
|
15623
|
-
|
|
15624
|
-
|
|
15625
|
-
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15633
|
+
|
|
15634
|
+
.${container2} {
|
|
15635
|
+
align-items: center;
|
|
15636
|
+
display: flex;
|
|
15637
|
+
}
|
|
15638
|
+
.${container2} .${disabled} {
|
|
15639
|
+
opacity: var(--opacity-50);
|
|
15640
|
+
}
|
|
15641
|
+
.${container2} .${disabledLink} {
|
|
15642
|
+
cursor: pointer-default;
|
|
15643
|
+
}
|
|
15644
|
+
.${container2} .${pageLink} {
|
|
15645
|
+
display: block;
|
|
15646
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
15647
|
+
}
|
|
15648
|
+
.${container2} .${prevNextControls} {
|
|
15649
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
15650
|
+
}
|
|
15651
|
+
.${container2} .${active} {
|
|
15652
|
+
border-radius: var(--rounded-base);
|
|
15653
|
+
background: var(--gray-200);
|
|
15654
|
+
}
|
|
15655
|
+
.${container2} .${page} {
|
|
15656
|
+
margin-left: var(--spacing-xs);
|
|
15657
|
+
margin-right: var(--spacing-xs);
|
|
15658
|
+
}
|
|
15638
15659
|
`;
|
|
15639
15660
|
|
|
15640
15661
|
// src/components/Pagination/usePaginationDisplayRange.ts
|
|
15641
15662
|
init_emotion_jsx_shim();
|
|
15642
|
-
var
|
|
15663
|
+
var import_react141 = require("react");
|
|
15643
15664
|
var DEFAULT_PAGINATION_DISPLAY_RANGE = {
|
|
15644
15665
|
marginPagesDisplayed: 2,
|
|
15645
15666
|
pageRangeDisplayed: 5
|
|
@@ -15695,8 +15716,8 @@ function getAvailablePaginationWidth(container5) {
|
|
|
15695
15716
|
return measurementElement.getBoundingClientRect().width;
|
|
15696
15717
|
}
|
|
15697
15718
|
function usePaginationDisplayRange(containerRef, pageCount) {
|
|
15698
|
-
const [displayRange, setDisplayRange] = (0,
|
|
15699
|
-
(0,
|
|
15719
|
+
const [displayRange, setDisplayRange] = (0, import_react141.useState)(DEFAULT_PAGINATION_DISPLAY_RANGE);
|
|
15720
|
+
(0, import_react141.useEffect)(() => {
|
|
15700
15721
|
var _a;
|
|
15701
15722
|
const container5 = containerRef.current;
|
|
15702
15723
|
if (!container5) {
|
|
@@ -15737,7 +15758,7 @@ function Pagination({
|
|
|
15737
15758
|
if (limit < 1 || pageCount <= 1) {
|
|
15738
15759
|
return null;
|
|
15739
15760
|
}
|
|
15740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { ref: containerRef,
|
|
15761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { ref: containerRef, css: paginationStyles, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
15741
15762
|
import_react_paginate.default,
|
|
15742
15763
|
{
|
|
15743
15764
|
forcePage: currentPage,
|
|
@@ -15762,8 +15783,8 @@ function Pagination({
|
|
|
15762
15783
|
|
|
15763
15784
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
15764
15785
|
init_emotion_jsx_shim();
|
|
15765
|
-
var
|
|
15766
|
-
var ParameterShellContext = (0,
|
|
15786
|
+
var import_react142 = require("react");
|
|
15787
|
+
var ParameterShellContext = (0, import_react142.createContext)({
|
|
15767
15788
|
id: "",
|
|
15768
15789
|
label: "",
|
|
15769
15790
|
hiddenLabel: void 0,
|
|
@@ -15772,7 +15793,7 @@ var ParameterShellContext = (0, import_react141.createContext)({
|
|
|
15772
15793
|
}
|
|
15773
15794
|
});
|
|
15774
15795
|
var useParameterShell = () => {
|
|
15775
|
-
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
15796
|
+
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react142.useContext)(ParameterShellContext);
|
|
15776
15797
|
return {
|
|
15777
15798
|
id,
|
|
15778
15799
|
label: label2,
|
|
@@ -15787,8 +15808,8 @@ init_emotion_jsx_shim();
|
|
|
15787
15808
|
|
|
15788
15809
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
15789
15810
|
init_emotion_jsx_shim();
|
|
15790
|
-
var
|
|
15791
|
-
var inputIconBtn =
|
|
15811
|
+
var import_react143 = require("@emotion/react");
|
|
15812
|
+
var inputIconBtn = import_react143.css`
|
|
15792
15813
|
align-items: center;
|
|
15793
15814
|
border: none;
|
|
15794
15815
|
border-radius: var(--rounded-base);
|
|
@@ -15853,12 +15874,12 @@ var LabelLeadingIcon = ({
|
|
|
15853
15874
|
|
|
15854
15875
|
// src/components/ParameterInputs/ParameterActionButton.tsx
|
|
15855
15876
|
init_emotion_jsx_shim();
|
|
15856
|
-
var
|
|
15877
|
+
var import_react145 = __toESM(require("react"));
|
|
15857
15878
|
|
|
15858
15879
|
// src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
|
|
15859
15880
|
init_emotion_jsx_shim();
|
|
15860
|
-
var
|
|
15861
|
-
var baseStyles =
|
|
15881
|
+
var import_react144 = require("@emotion/react");
|
|
15882
|
+
var baseStyles = import_react144.css`
|
|
15862
15883
|
--hover-color: var(--accent-dark-hover);
|
|
15863
15884
|
--active-color: var(--accent-dark-active);
|
|
15864
15885
|
border: 1px solid transparent;
|
|
@@ -15883,7 +15904,7 @@ var baseStyles = import_react143.css`
|
|
|
15883
15904
|
cursor: default;
|
|
15884
15905
|
}
|
|
15885
15906
|
`;
|
|
15886
|
-
var solidHoverStyles =
|
|
15907
|
+
var solidHoverStyles = import_react144.css`
|
|
15887
15908
|
--text-color: var(--typography-inverted);
|
|
15888
15909
|
&:hover,
|
|
15889
15910
|
&:focus,
|
|
@@ -15900,7 +15921,7 @@ var solidHoverStyles = import_react143.css`
|
|
|
15900
15921
|
color: var(--text-color);
|
|
15901
15922
|
}
|
|
15902
15923
|
`;
|
|
15903
|
-
var outlineHoverStyles =
|
|
15924
|
+
var outlineHoverStyles = import_react144.css`
|
|
15904
15925
|
--text-color: var(--typography-light);
|
|
15905
15926
|
&:hover:not([aria-disabled='true']),
|
|
15906
15927
|
&:focus:not([aria-disabled='true']),
|
|
@@ -15913,7 +15934,7 @@ var outlineHoverStyles = import_react143.css`
|
|
|
15913
15934
|
border-color: var(--active-color);
|
|
15914
15935
|
}
|
|
15915
15936
|
`;
|
|
15916
|
-
var invertedStyles =
|
|
15937
|
+
var invertedStyles = import_react144.css`
|
|
15917
15938
|
--text-color: var(--typography-inverted);
|
|
15918
15939
|
box-shadow: inset 0 0 0 1px transparent;
|
|
15919
15940
|
&:hover,
|
|
@@ -15958,7 +15979,7 @@ var ParameterActionButton = ({
|
|
|
15958
15979
|
children
|
|
15959
15980
|
}
|
|
15960
15981
|
);
|
|
15961
|
-
if (tooltip && (typeof tooltip === "string" ||
|
|
15982
|
+
if (tooltip && (typeof tooltip === "string" || import_react145.default.isValidElement(tooltip))) {
|
|
15962
15983
|
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Tooltip, { title: tooltip, ...tooltipProps, children: buttonElement });
|
|
15963
15984
|
}
|
|
15964
15985
|
return buttonElement;
|
|
@@ -15969,20 +15990,20 @@ init_emotion_jsx_shim();
|
|
|
15969
15990
|
|
|
15970
15991
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
15971
15992
|
init_emotion_jsx_shim();
|
|
15972
|
-
var
|
|
15973
|
-
var ParameterDrawerHeaderContainer =
|
|
15993
|
+
var import_react146 = require("@emotion/react");
|
|
15994
|
+
var ParameterDrawerHeaderContainer = import_react146.css`
|
|
15974
15995
|
align-items: center;
|
|
15975
15996
|
display: flex;
|
|
15976
15997
|
gap: var(--spacing-base);
|
|
15977
15998
|
justify-content: space-between;
|
|
15978
15999
|
margin-bottom: var(--spacing-sm);
|
|
15979
16000
|
`;
|
|
15980
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
16001
|
+
var ParameterDrawerHeaderTitleGroup = import_react146.css`
|
|
15981
16002
|
align-items: center;
|
|
15982
16003
|
display: flex;
|
|
15983
16004
|
gap: var(--spacing-sm);
|
|
15984
16005
|
`;
|
|
15985
|
-
var ParameterDrawerHeaderTitle =
|
|
16006
|
+
var ParameterDrawerHeaderTitle = import_react146.css`
|
|
15986
16007
|
text-overflow: ellipsis;
|
|
15987
16008
|
white-space: nowrap;
|
|
15988
16009
|
overflow: hidden;
|
|
@@ -16003,12 +16024,12 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
16003
16024
|
|
|
16004
16025
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
16005
16026
|
init_emotion_jsx_shim();
|
|
16006
|
-
var
|
|
16027
|
+
var import_react148 = require("react");
|
|
16007
16028
|
|
|
16008
16029
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
16009
16030
|
init_emotion_jsx_shim();
|
|
16010
|
-
var
|
|
16011
|
-
var fieldsetStyles =
|
|
16031
|
+
var import_react147 = require("@emotion/react");
|
|
16032
|
+
var fieldsetStyles = import_react147.css`
|
|
16012
16033
|
&:disabled,
|
|
16013
16034
|
[readonly] {
|
|
16014
16035
|
input,
|
|
@@ -16023,7 +16044,7 @@ var fieldsetStyles = import_react146.css`
|
|
|
16023
16044
|
}
|
|
16024
16045
|
}
|
|
16025
16046
|
`;
|
|
16026
|
-
var fieldsetLegend2 =
|
|
16047
|
+
var fieldsetLegend2 = import_react147.css`
|
|
16027
16048
|
display: block;
|
|
16028
16049
|
font-weight: var(--fw-medium);
|
|
16029
16050
|
margin-bottom: var(--spacing-base);
|
|
@@ -16032,7 +16053,7 @@ var fieldsetLegend2 = import_react146.css`
|
|
|
16032
16053
|
|
|
16033
16054
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
16034
16055
|
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
16035
|
-
var ParameterGroup = (0,
|
|
16056
|
+
var ParameterGroup = (0, import_react148.forwardRef)(
|
|
16036
16057
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
16037
16058
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
16038
16059
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
@@ -16043,24 +16064,24 @@ var ParameterGroup = (0, import_react147.forwardRef)(
|
|
|
16043
16064
|
|
|
16044
16065
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
16045
16066
|
init_emotion_jsx_shim();
|
|
16046
|
-
var
|
|
16067
|
+
var import_react156 = require("react");
|
|
16047
16068
|
|
|
16048
16069
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16049
16070
|
init_emotion_jsx_shim();
|
|
16050
|
-
var
|
|
16071
|
+
var import_react150 = require("react");
|
|
16051
16072
|
var import_react_dom2 = require("react-dom");
|
|
16052
16073
|
|
|
16053
16074
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
16054
16075
|
init_emotion_jsx_shim();
|
|
16055
|
-
var
|
|
16056
|
-
var previewWrapper =
|
|
16076
|
+
var import_react149 = require("@emotion/react");
|
|
16077
|
+
var previewWrapper = import_react149.css`
|
|
16057
16078
|
margin-top: var(--spacing-xs);
|
|
16058
16079
|
background: var(--gray-50);
|
|
16059
16080
|
padding: var(--spacing-sm);
|
|
16060
16081
|
border: solid 1px var(--gray-300);
|
|
16061
16082
|
border-radius: var(--rounded-sm);
|
|
16062
16083
|
`;
|
|
16063
|
-
var previewLink =
|
|
16084
|
+
var previewLink = import_react149.css`
|
|
16064
16085
|
display: block;
|
|
16065
16086
|
width: 100%;
|
|
16066
16087
|
|
|
@@ -16068,7 +16089,7 @@ var previewLink = import_react148.css`
|
|
|
16068
16089
|
max-height: 9rem;
|
|
16069
16090
|
}
|
|
16070
16091
|
`;
|
|
16071
|
-
var previewModalWrapper =
|
|
16092
|
+
var previewModalWrapper = import_react149.css`
|
|
16072
16093
|
background: var(--gray-50);
|
|
16073
16094
|
display: flex;
|
|
16074
16095
|
height: 100%;
|
|
@@ -16077,7 +16098,7 @@ var previewModalWrapper = import_react148.css`
|
|
|
16077
16098
|
border: solid 1px var(--gray-300);
|
|
16078
16099
|
border-radius: var(--rounded-sm);
|
|
16079
16100
|
`;
|
|
16080
|
-
var previewModalImage =
|
|
16101
|
+
var previewModalImage = import_react149.css`
|
|
16081
16102
|
display: flex;
|
|
16082
16103
|
height: 100%;
|
|
16083
16104
|
width: 100%;
|
|
@@ -16091,7 +16112,7 @@ var previewModalImage = import_react148.css`
|
|
|
16091
16112
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16092
16113
|
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
16093
16114
|
function ParameterImagePreview({ imageSrc }) {
|
|
16094
|
-
const [showModal, setShowModal] = (0,
|
|
16115
|
+
const [showModal, setShowModal] = (0, import_react150.useState)(false);
|
|
16095
16116
|
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { css: previewWrapper, children: [
|
|
16096
16117
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
16097
16118
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
@@ -16124,16 +16145,16 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
16124
16145
|
|
|
16125
16146
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
16126
16147
|
init_emotion_jsx_shim();
|
|
16127
|
-
var
|
|
16128
|
-
var
|
|
16148
|
+
var import_react154 = require("@emotion/react");
|
|
16149
|
+
var import_react155 = require("react");
|
|
16129
16150
|
|
|
16130
16151
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
16131
16152
|
init_emotion_jsx_shim();
|
|
16132
16153
|
|
|
16133
16154
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
16134
16155
|
init_emotion_jsx_shim();
|
|
16135
|
-
var
|
|
16136
|
-
var actionBarVisibilityStyles =
|
|
16156
|
+
var import_react151 = require("@emotion/react");
|
|
16157
|
+
var actionBarVisibilityStyles = import_react151.css`
|
|
16137
16158
|
[data-action-bar] {
|
|
16138
16159
|
opacity: 1;
|
|
16139
16160
|
transform: translateX(0);
|
|
@@ -16142,14 +16163,14 @@ var actionBarVisibilityStyles = import_react150.css`
|
|
|
16142
16163
|
transform var(--duration-fast) var(--timing-ease-out);
|
|
16143
16164
|
}
|
|
16144
16165
|
`;
|
|
16145
|
-
var actionBarVisibilityHiddenStyles =
|
|
16166
|
+
var actionBarVisibilityHiddenStyles = import_react151.css`
|
|
16146
16167
|
opacity: 0;
|
|
16147
16168
|
transform: translateX(1rem);
|
|
16148
16169
|
transition:
|
|
16149
16170
|
opacity var(--duration-fast) var(--timing-ease-out),
|
|
16150
16171
|
transform var(--duration-fast) var(--timing-ease-out);
|
|
16151
16172
|
`;
|
|
16152
|
-
var inputContainer2 =
|
|
16173
|
+
var inputContainer2 = import_react151.css`
|
|
16153
16174
|
position: relative;
|
|
16154
16175
|
scroll-margin: var(--spacing-2xl);
|
|
16155
16176
|
|
|
@@ -16163,14 +16184,14 @@ var inputContainer2 = import_react150.css`
|
|
|
16163
16184
|
${actionBarVisibilityStyles}
|
|
16164
16185
|
}
|
|
16165
16186
|
`;
|
|
16166
|
-
var labelText2 =
|
|
16187
|
+
var labelText2 = import_react151.css`
|
|
16167
16188
|
align-items: center;
|
|
16168
16189
|
display: flex;
|
|
16169
16190
|
gap: var(--spacing-xs);
|
|
16170
16191
|
font-weight: var(--fw-regular);
|
|
16171
16192
|
margin: 0 0 var(--spacing-xs);
|
|
16172
16193
|
`;
|
|
16173
|
-
var input3 =
|
|
16194
|
+
var input3 = import_react151.css`
|
|
16174
16195
|
display: block;
|
|
16175
16196
|
appearance: none;
|
|
16176
16197
|
box-sizing: border-box;
|
|
@@ -16223,18 +16244,18 @@ var input3 = import_react150.css`
|
|
|
16223
16244
|
opacity: var(--opacity-50);
|
|
16224
16245
|
}
|
|
16225
16246
|
`;
|
|
16226
|
-
var selectInput =
|
|
16247
|
+
var selectInput = import_react151.css`
|
|
16227
16248
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
|
16228
16249
|
background-position: right var(--spacing-sm) center;
|
|
16229
16250
|
background-repeat: no-repeat;
|
|
16230
16251
|
background-size: 1rem;
|
|
16231
16252
|
padding-right: var(--spacing-xl);
|
|
16232
16253
|
`;
|
|
16233
|
-
var inputWrapper =
|
|
16254
|
+
var inputWrapper = import_react151.css`
|
|
16234
16255
|
display: flex; // used to correct overflow with chrome textarea
|
|
16235
16256
|
position: relative;
|
|
16236
16257
|
`;
|
|
16237
|
-
var inputIcon2 =
|
|
16258
|
+
var inputIcon2 = import_react151.css`
|
|
16238
16259
|
align-items: center;
|
|
16239
16260
|
background: var(--white);
|
|
16240
16261
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -16250,7 +16271,7 @@ var inputIcon2 = import_react150.css`
|
|
|
16250
16271
|
width: var(--spacing-lg);
|
|
16251
16272
|
z-index: var(--z-10);
|
|
16252
16273
|
`;
|
|
16253
|
-
var inputToggleLabel2 =
|
|
16274
|
+
var inputToggleLabel2 = import_react151.css`
|
|
16254
16275
|
--inline-label-color: var(--typography-base);
|
|
16255
16276
|
align-items: center;
|
|
16256
16277
|
cursor: pointer;
|
|
@@ -16265,7 +16286,7 @@ var inputToggleLabel2 = import_react150.css`
|
|
|
16265
16286
|
--inline-label-color: var(--gray-400);
|
|
16266
16287
|
}
|
|
16267
16288
|
`;
|
|
16268
|
-
var toggleInput2 =
|
|
16289
|
+
var toggleInput2 = import_react151.css`
|
|
16269
16290
|
appearance: none;
|
|
16270
16291
|
border: 1px solid var(--gray-200);
|
|
16271
16292
|
background: var(--white);
|
|
@@ -16309,7 +16330,7 @@ var toggleInput2 = import_react150.css`
|
|
|
16309
16330
|
border-color: var(--gray-200);
|
|
16310
16331
|
}
|
|
16311
16332
|
`;
|
|
16312
|
-
var toggleInputIndeterminateState =
|
|
16333
|
+
var toggleInputIndeterminateState = import_react151.css`
|
|
16313
16334
|
&:indeterminate,
|
|
16314
16335
|
&:indeterminate:hover,
|
|
16315
16336
|
&:indeterminate:focus {
|
|
@@ -16320,7 +16341,7 @@ var toggleInputIndeterminateState = import_react150.css`
|
|
|
16320
16341
|
color: var(--accent-dark-active);
|
|
16321
16342
|
}
|
|
16322
16343
|
`;
|
|
16323
|
-
var inlineLabel2 =
|
|
16344
|
+
var inlineLabel2 = import_react151.css`
|
|
16324
16345
|
color: var(--inline-label-color);
|
|
16325
16346
|
padding-left: var(--spacing-md);
|
|
16326
16347
|
font-size: var(--fs-sm);
|
|
@@ -16337,7 +16358,7 @@ var inlineLabel2 = import_react150.css`
|
|
|
16337
16358
|
}
|
|
16338
16359
|
}
|
|
16339
16360
|
`;
|
|
16340
|
-
var inputMenu =
|
|
16361
|
+
var inputMenu = import_react151.css`
|
|
16341
16362
|
background: none;
|
|
16342
16363
|
border: none;
|
|
16343
16364
|
padding: var(--spacing-2xs);
|
|
@@ -16351,12 +16372,12 @@ var inputMenu = import_react150.css`
|
|
|
16351
16372
|
cursor: default;
|
|
16352
16373
|
}
|
|
16353
16374
|
`;
|
|
16354
|
-
var inputActionItems =
|
|
16375
|
+
var inputActionItems = import_react151.css`
|
|
16355
16376
|
display: flex;
|
|
16356
16377
|
z-index: var(--z-1);
|
|
16357
16378
|
${actionBarVisibilityHiddenStyles}
|
|
16358
16379
|
`;
|
|
16359
|
-
var inputMenuHover =
|
|
16380
|
+
var inputMenuHover = import_react151.css`
|
|
16360
16381
|
opacity: var(--opacity-50);
|
|
16361
16382
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
16362
16383
|
margin-top: 0.25rem;
|
|
@@ -16368,11 +16389,11 @@ var inputMenuHover = import_react150.css`
|
|
|
16368
16389
|
background-color: var(--gray-200);
|
|
16369
16390
|
}
|
|
16370
16391
|
`;
|
|
16371
|
-
var textarea2 =
|
|
16392
|
+
var textarea2 = import_react151.css`
|
|
16372
16393
|
resize: vertical;
|
|
16373
16394
|
min-height: 2rem;
|
|
16374
16395
|
`;
|
|
16375
|
-
var dataConnectButton =
|
|
16396
|
+
var dataConnectButton = import_react151.css`
|
|
16376
16397
|
align-items: center;
|
|
16377
16398
|
appearance: none;
|
|
16378
16399
|
box-sizing: border-box;
|
|
@@ -16408,7 +16429,7 @@ var dataConnectButton = import_react150.css`
|
|
|
16408
16429
|
pointer-events: none;
|
|
16409
16430
|
}
|
|
16410
16431
|
`;
|
|
16411
|
-
var linkParameterEmptyContainer =
|
|
16432
|
+
var linkParameterEmptyContainer = import_react151.css`
|
|
16412
16433
|
box-sizing: border-box;
|
|
16413
16434
|
background: var(--white);
|
|
16414
16435
|
border: 1px solid var(--gray-200);
|
|
@@ -16420,7 +16441,7 @@ var linkParameterEmptyContainer = import_react150.css`
|
|
|
16420
16441
|
min-height: 2rem;
|
|
16421
16442
|
width: 100%;
|
|
16422
16443
|
`;
|
|
16423
|
-
var linkParameterControls =
|
|
16444
|
+
var linkParameterControls = import_react151.css`
|
|
16424
16445
|
position: absolute;
|
|
16425
16446
|
inset: 0 0 0 auto;
|
|
16426
16447
|
padding: 0 var(--spacing-base);
|
|
@@ -16429,7 +16450,7 @@ var linkParameterControls = import_react150.css`
|
|
|
16429
16450
|
justify-content: center;
|
|
16430
16451
|
gap: var(--spacing-base);
|
|
16431
16452
|
`;
|
|
16432
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
16453
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react151.css`
|
|
16433
16454
|
padding-right: calc(
|
|
16434
16455
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
16435
16456
|
var(--spacing-base)
|
|
@@ -16442,7 +16463,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react150.css`
|
|
|
16442
16463
|
}
|
|
16443
16464
|
}
|
|
16444
16465
|
`;
|
|
16445
|
-
var linkParameterIcon =
|
|
16466
|
+
var linkParameterIcon = import_react151.css`
|
|
16446
16467
|
align-items: center;
|
|
16447
16468
|
color: var(--primary-action-default);
|
|
16448
16469
|
display: flex;
|
|
@@ -16468,9 +16489,9 @@ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
|
16468
16489
|
|
|
16469
16490
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
16470
16491
|
init_emotion_jsx_shim();
|
|
16471
|
-
var
|
|
16492
|
+
var import_react152 = require("react");
|
|
16472
16493
|
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
16473
|
-
var ParameterMenuButton = (0,
|
|
16494
|
+
var ParameterMenuButton = (0, import_react152.forwardRef)(
|
|
16474
16495
|
({ label: label2, children, disabled: disabled2, withoutPortal }, ref) => {
|
|
16475
16496
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16476
16497
|
Menu,
|
|
@@ -16498,14 +16519,14 @@ var ParameterMenuButton = (0, import_react151.forwardRef)(
|
|
|
16498
16519
|
|
|
16499
16520
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
16500
16521
|
init_emotion_jsx_shim();
|
|
16501
|
-
var
|
|
16502
|
-
var emptyParameterShell =
|
|
16522
|
+
var import_react153 = require("@emotion/react");
|
|
16523
|
+
var emptyParameterShell = import_react153.css`
|
|
16503
16524
|
border-radius: var(--rounded-sm);
|
|
16504
16525
|
flex-grow: 1;
|
|
16505
16526
|
position: relative;
|
|
16506
16527
|
max-width: 100%;
|
|
16507
16528
|
`;
|
|
16508
|
-
var emptyParameterShellText =
|
|
16529
|
+
var emptyParameterShellText = import_react153.css`
|
|
16509
16530
|
background: var(--brand-secondary-6);
|
|
16510
16531
|
border-radius: var(--rounded-sm);
|
|
16511
16532
|
padding: var(--spacing-sm);
|
|
@@ -16513,7 +16534,7 @@ var emptyParameterShellText = import_react152.css`
|
|
|
16513
16534
|
font-size: var(--fs-sm);
|
|
16514
16535
|
margin: 0;
|
|
16515
16536
|
`;
|
|
16516
|
-
var overrideMarker =
|
|
16537
|
+
var overrideMarker = import_react153.css`
|
|
16517
16538
|
border-radius: var(--rounded-sm);
|
|
16518
16539
|
border: 10px solid var(--gray-300);
|
|
16519
16540
|
border-left-color: transparent;
|
|
@@ -16585,7 +16606,7 @@ var ParameterShell = ({
|
|
|
16585
16606
|
menuWithoutPortal,
|
|
16586
16607
|
...props
|
|
16587
16608
|
}) => {
|
|
16588
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
16609
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react155.useState)(void 0);
|
|
16589
16610
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
16590
16611
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
16591
16612
|
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -16607,7 +16628,7 @@ var ParameterShell = ({
|
|
|
16607
16628
|
css: [
|
|
16608
16629
|
inputMenu,
|
|
16609
16630
|
inputActionItems,
|
|
16610
|
-
menuItems ?
|
|
16631
|
+
menuItems ? import_react154.css`
|
|
16611
16632
|
right: var(--spacing-md);
|
|
16612
16633
|
` : void 0
|
|
16613
16634
|
],
|
|
@@ -16666,7 +16687,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
16666
16687
|
|
|
16667
16688
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
16668
16689
|
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
16669
|
-
var ParameterImage = (0,
|
|
16690
|
+
var ParameterImage = (0, import_react156.forwardRef)(
|
|
16670
16691
|
({ children, ...props }, ref) => {
|
|
16671
16692
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16672
16693
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -16675,10 +16696,10 @@ var ParameterImage = (0, import_react155.forwardRef)(
|
|
|
16675
16696
|
] });
|
|
16676
16697
|
}
|
|
16677
16698
|
);
|
|
16678
|
-
var ParameterImageInner = (0,
|
|
16699
|
+
var ParameterImageInner = (0, import_react156.forwardRef)((props, ref) => {
|
|
16679
16700
|
const { value } = props;
|
|
16680
16701
|
const { id, label: label2, hiddenLabel, errorMessage } = useParameterShell();
|
|
16681
|
-
const deferredValue = (0,
|
|
16702
|
+
const deferredValue = (0, import_react156.useDeferredValue)(value);
|
|
16682
16703
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
16683
16704
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
16684
16705
|
"input",
|
|
@@ -16698,13 +16719,13 @@ var ParameterImageInner = (0, import_react155.forwardRef)((props, ref) => {
|
|
|
16698
16719
|
|
|
16699
16720
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
16700
16721
|
init_emotion_jsx_shim();
|
|
16701
|
-
var
|
|
16722
|
+
var import_react157 = require("react");
|
|
16702
16723
|
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
16703
|
-
var ParameterInput = (0,
|
|
16724
|
+
var ParameterInput = (0, import_react157.forwardRef)((props, ref) => {
|
|
16704
16725
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16705
16726
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
16706
16727
|
});
|
|
16707
|
-
var ParameterInputInner = (0,
|
|
16728
|
+
var ParameterInputInner = (0, import_react157.forwardRef)(({ enableMouseWheel = false, ...props }, ref) => {
|
|
16708
16729
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16709
16730
|
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
16710
16731
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
@@ -16724,7 +16745,7 @@ var ParameterInputInner = (0, import_react156.forwardRef)(({ enableMouseWheel =
|
|
|
16724
16745
|
|
|
16725
16746
|
// src/components/ParameterInputs/ParameterLabels.tsx
|
|
16726
16747
|
init_emotion_jsx_shim();
|
|
16727
|
-
var
|
|
16748
|
+
var import_react158 = require("react");
|
|
16728
16749
|
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
16729
16750
|
var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
|
|
16730
16751
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -16786,18 +16807,18 @@ var ParameterLabelsInner = (props) => {
|
|
|
16786
16807
|
var _a;
|
|
16787
16808
|
const { label: label2 } = useParameterShell();
|
|
16788
16809
|
const { onChange } = props;
|
|
16789
|
-
const containerRef = (0,
|
|
16790
|
-
const hasPositionedRef = (0,
|
|
16791
|
-
const selectedValues = (0,
|
|
16810
|
+
const containerRef = (0, import_react158.useRef)(null);
|
|
16811
|
+
const hasPositionedRef = (0, import_react158.useRef)(false);
|
|
16812
|
+
const selectedValues = (0, import_react158.useMemo)(
|
|
16792
16813
|
() => {
|
|
16793
16814
|
var _a2, _b;
|
|
16794
16815
|
return (_b = (_a2 = props.value) != null ? _a2 : props.defaultValue) != null ? _b : [];
|
|
16795
16816
|
},
|
|
16796
16817
|
[props.value, props.defaultValue]
|
|
16797
16818
|
);
|
|
16798
|
-
const items = (0,
|
|
16799
|
-
const optionsMap = (0,
|
|
16800
|
-
const selectedIds = (0,
|
|
16819
|
+
const items = (0, import_react158.useMemo)(() => convertOptionsToItems(props.options), [props.options]);
|
|
16820
|
+
const optionsMap = (0, import_react158.useMemo)(() => createOptionsMap(props.options), [props.options]);
|
|
16821
|
+
const selectedIds = (0, import_react158.useMemo)(() => {
|
|
16801
16822
|
if (!Array.isArray(selectedValues)) {
|
|
16802
16823
|
return /* @__PURE__ */ new Set();
|
|
16803
16824
|
}
|
|
@@ -16889,9 +16910,9 @@ var ParameterLabelsInner = (props) => {
|
|
|
16889
16910
|
|
|
16890
16911
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
16891
16912
|
init_emotion_jsx_shim();
|
|
16892
|
-
var
|
|
16913
|
+
var import_react159 = require("react");
|
|
16893
16914
|
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
16894
|
-
var ParameterLink = (0,
|
|
16915
|
+
var ParameterLink = (0, import_react159.forwardRef)(
|
|
16895
16916
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
16896
16917
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16897
16918
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
@@ -16915,7 +16936,7 @@ var ParameterLink = (0, import_react158.forwardRef)(
|
|
|
16915
16936
|
);
|
|
16916
16937
|
}
|
|
16917
16938
|
);
|
|
16918
|
-
var ParameterLinkInner = (0,
|
|
16939
|
+
var ParameterLinkInner = (0, import_react159.forwardRef)(
|
|
16919
16940
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
16920
16941
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16921
16942
|
if (!props.value)
|
|
@@ -17101,24 +17122,24 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
17101
17122
|
|
|
17102
17123
|
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
17103
17124
|
init_emotion_jsx_shim();
|
|
17104
|
-
var
|
|
17125
|
+
var import_react163 = require("react");
|
|
17105
17126
|
|
|
17106
17127
|
// src/components/Slider/index.ts
|
|
17107
17128
|
init_emotion_jsx_shim();
|
|
17108
17129
|
|
|
17109
17130
|
// src/components/Slider/Slider.tsx
|
|
17110
17131
|
init_emotion_jsx_shim();
|
|
17111
|
-
var
|
|
17132
|
+
var import_react162 = require("react");
|
|
17112
17133
|
|
|
17113
17134
|
// src/components/Slider/SliderLabels.tsx
|
|
17114
17135
|
init_emotion_jsx_shim();
|
|
17115
|
-
var
|
|
17136
|
+
var import_react161 = require("react");
|
|
17116
17137
|
|
|
17117
17138
|
// src/components/Slider/styles/Slider.styles.ts
|
|
17118
17139
|
init_emotion_jsx_shim();
|
|
17119
|
-
var
|
|
17140
|
+
var import_react160 = require("@emotion/react");
|
|
17120
17141
|
var thumbSize = "20px";
|
|
17121
|
-
var disabledThumbStyles =
|
|
17142
|
+
var disabledThumbStyles = import_react160.css`
|
|
17122
17143
|
background: var(--white);
|
|
17123
17144
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cline x1='4' y1='9' x2='16' y2='9' stroke='%236b7280' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
17124
17145
|
background-repeat: no-repeat;
|
|
@@ -17126,22 +17147,22 @@ var disabledThumbStyles = import_react159.css`
|
|
|
17126
17147
|
background-size: 12px 12px;
|
|
17127
17148
|
border: 1px solid var(--gray-500);
|
|
17128
17149
|
`;
|
|
17129
|
-
var container3 =
|
|
17150
|
+
var container3 = import_react160.css`
|
|
17130
17151
|
display: flex;
|
|
17131
17152
|
align-items: flex-start;
|
|
17132
17153
|
gap: var(--spacing-base);
|
|
17133
17154
|
width: 100%;
|
|
17134
17155
|
`;
|
|
17135
|
-
var sliderContainer =
|
|
17156
|
+
var sliderContainer = import_react160.css`
|
|
17136
17157
|
flex: 1;
|
|
17137
17158
|
display: flex;
|
|
17138
17159
|
flex-direction: column;
|
|
17139
17160
|
`;
|
|
17140
|
-
var sliderTrackContainer =
|
|
17161
|
+
var sliderTrackContainer = import_react160.css`
|
|
17141
17162
|
position: relative;
|
|
17142
17163
|
padding: var(--spacing-xs) 0;
|
|
17143
17164
|
`;
|
|
17144
|
-
var progressTrack =
|
|
17165
|
+
var progressTrack = import_react160.css`
|
|
17145
17166
|
position: absolute;
|
|
17146
17167
|
top: 50%;
|
|
17147
17168
|
left: 0;
|
|
@@ -17151,7 +17172,7 @@ var progressTrack = import_react159.css`
|
|
|
17151
17172
|
margin-top: -3px;
|
|
17152
17173
|
border-radius: var(--rounded-sm);
|
|
17153
17174
|
`;
|
|
17154
|
-
var progressTrackBackground =
|
|
17175
|
+
var progressTrackBackground = import_react160.css`
|
|
17155
17176
|
position: absolute;
|
|
17156
17177
|
top: 0;
|
|
17157
17178
|
left: 0;
|
|
@@ -17161,7 +17182,7 @@ var progressTrackBackground = import_react159.css`
|
|
|
17161
17182
|
border: 1px solid var(--gray-200);
|
|
17162
17183
|
border-radius: var(--rounded-sm);
|
|
17163
17184
|
`;
|
|
17164
|
-
var progressTrackFill =
|
|
17185
|
+
var progressTrackFill = import_react160.css`
|
|
17165
17186
|
position: absolute;
|
|
17166
17187
|
top: 0;
|
|
17167
17188
|
left: 0;
|
|
@@ -17169,19 +17190,19 @@ var progressTrackFill = import_react159.css`
|
|
|
17169
17190
|
background: var(--accent-light);
|
|
17170
17191
|
border-radius: var(--rounded-sm);
|
|
17171
17192
|
`;
|
|
17172
|
-
var tickMarksContainer =
|
|
17193
|
+
var tickMarksContainer = import_react160.css`
|
|
17173
17194
|
position: relative;
|
|
17174
17195
|
height: 1rem;
|
|
17175
17196
|
margin-top: calc(-1 * var(--spacing-base) + var(--spacing-xs));
|
|
17176
17197
|
`;
|
|
17177
|
-
var tickMark =
|
|
17198
|
+
var tickMark = import_react160.css`
|
|
17178
17199
|
position: absolute;
|
|
17179
17200
|
top: 0;
|
|
17180
17201
|
width: 0.5px;
|
|
17181
17202
|
height: 8px;
|
|
17182
17203
|
background-color: var(--gray-300);
|
|
17183
17204
|
`;
|
|
17184
|
-
var largeTickMark =
|
|
17205
|
+
var largeTickMark = import_react160.css`
|
|
17185
17206
|
position: absolute;
|
|
17186
17207
|
top: 0;
|
|
17187
17208
|
width: 1px;
|
|
@@ -17189,7 +17210,7 @@ var largeTickMark = import_react159.css`
|
|
|
17189
17210
|
background-color: var(--gray-400);
|
|
17190
17211
|
transform: translateX(-50%);
|
|
17191
17212
|
`;
|
|
17192
|
-
var slider =
|
|
17213
|
+
var slider = import_react160.css`
|
|
17193
17214
|
appearance: none;
|
|
17194
17215
|
width: 100%;
|
|
17195
17216
|
width: calc(100% + ${thumbSize});
|
|
@@ -17306,12 +17327,12 @@ var slider = import_react159.css`
|
|
|
17306
17327
|
0 0 0 3px var(--accent-light);
|
|
17307
17328
|
}
|
|
17308
17329
|
`;
|
|
17309
|
-
var labelsContainer =
|
|
17330
|
+
var labelsContainer = import_react160.css`
|
|
17310
17331
|
position: relative;
|
|
17311
17332
|
height: 1.5rem;
|
|
17312
17333
|
width: 100%;
|
|
17313
17334
|
`;
|
|
17314
|
-
var label =
|
|
17335
|
+
var label = import_react160.css`
|
|
17315
17336
|
position: absolute;
|
|
17316
17337
|
top: 0;
|
|
17317
17338
|
font-size: var(--text-sm);
|
|
@@ -17355,12 +17376,12 @@ var label = import_react159.css`
|
|
|
17355
17376
|
max-width: 100%;
|
|
17356
17377
|
}
|
|
17357
17378
|
`;
|
|
17358
|
-
var numberInputContainer =
|
|
17379
|
+
var numberInputContainer = import_react160.css`
|
|
17359
17380
|
flex-shrink: 0;
|
|
17360
17381
|
min-width: 2rem;
|
|
17361
17382
|
margin-top: var(--spacing-sm);
|
|
17362
17383
|
`;
|
|
17363
|
-
var numberInput2 =
|
|
17384
|
+
var numberInput2 = import_react160.css`
|
|
17364
17385
|
appearance: none;
|
|
17365
17386
|
background-color: var(--white);
|
|
17366
17387
|
border: 1px solid var(--gray-200);
|
|
@@ -17538,9 +17559,9 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
|
|
|
17538
17559
|
}));
|
|
17539
17560
|
}
|
|
17540
17561
|
function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
17541
|
-
const containerRef = (0,
|
|
17542
|
-
const [measuredWidth, setMeasuredWidth] = (0,
|
|
17543
|
-
(0,
|
|
17562
|
+
const containerRef = (0, import_react161.useRef)(null);
|
|
17563
|
+
const [measuredWidth, setMeasuredWidth] = (0, import_react161.useState)(containerWidth);
|
|
17564
|
+
(0, import_react161.useEffect)(() => {
|
|
17544
17565
|
if (containerRef.current) {
|
|
17545
17566
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
17546
17567
|
for (const entry of entries) {
|
|
@@ -17577,7 +17598,7 @@ function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
|
17577
17598
|
|
|
17578
17599
|
// src/components/Slider/Slider.tsx
|
|
17579
17600
|
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
17580
|
-
var Slider = (0,
|
|
17601
|
+
var Slider = (0, import_react162.forwardRef)(
|
|
17581
17602
|
({
|
|
17582
17603
|
value,
|
|
17583
17604
|
onChange,
|
|
@@ -17594,7 +17615,7 @@ var Slider = (0, import_react161.forwardRef)(
|
|
|
17594
17615
|
name
|
|
17595
17616
|
}, ref) => {
|
|
17596
17617
|
const isOptionsMode = Boolean(options && options.length > 0);
|
|
17597
|
-
const { min, max, step, smallTicks, largeTicks } = (0,
|
|
17618
|
+
const { min, max, step, smallTicks, largeTicks } = (0, import_react162.useMemo)(() => {
|
|
17598
17619
|
if (isOptionsMode && options) {
|
|
17599
17620
|
if (options.length === 0) {
|
|
17600
17621
|
return {
|
|
@@ -17672,14 +17693,14 @@ var Slider = (0, import_react161.forwardRef)(
|
|
|
17672
17693
|
}, [isOptionsMode, options, propMin, propMax, propStep]);
|
|
17673
17694
|
const isValueUnset = value === void 0 || value === null || typeof value === "number" && isNaN(value);
|
|
17674
17695
|
const clampedValue = isValueUnset ? min : Math.min(Math.max(value, min), max);
|
|
17675
|
-
const handleSliderChange = (0,
|
|
17696
|
+
const handleSliderChange = (0, import_react162.useCallback)(
|
|
17676
17697
|
(event) => {
|
|
17677
17698
|
const newValue = Number(event.target.value);
|
|
17678
17699
|
onChange(newValue);
|
|
17679
17700
|
},
|
|
17680
17701
|
[onChange]
|
|
17681
17702
|
);
|
|
17682
|
-
const handleNumberInputChange = (0,
|
|
17703
|
+
const handleNumberInputChange = (0, import_react162.useCallback)(
|
|
17683
17704
|
(event) => {
|
|
17684
17705
|
if (event.target.value === "") {
|
|
17685
17706
|
onChange(void 0);
|
|
@@ -17752,13 +17773,13 @@ Slider.displayName = "Slider";
|
|
|
17752
17773
|
|
|
17753
17774
|
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
17754
17775
|
var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
|
|
17755
|
-
var ParameterNumberSlider = (0,
|
|
17776
|
+
var ParameterNumberSlider = (0, import_react163.forwardRef)(
|
|
17756
17777
|
(props, ref) => {
|
|
17757
17778
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17758
17779
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ParameterShell, { "data-testid": "parameter-number-slider", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ParameterNumberSliderInner, { ref, ...innerProps }) });
|
|
17759
17780
|
}
|
|
17760
17781
|
);
|
|
17761
|
-
var ParameterNumberSliderInner = (0,
|
|
17782
|
+
var ParameterNumberSliderInner = (0, import_react163.forwardRef)(({ ...props }, ref) => {
|
|
17762
17783
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
17763
17784
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
17764
17785
|
Slider,
|
|
@@ -17775,7 +17796,6 @@ ParameterNumberSliderInner.displayName = "ParameterNumberSliderInner";
|
|
|
17775
17796
|
|
|
17776
17797
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17777
17798
|
init_emotion_jsx_shim();
|
|
17778
|
-
var import_react176 = require("@emotion/react");
|
|
17779
17799
|
var import_list3 = require("@lexical/list");
|
|
17780
17800
|
var import_markdown = require("@lexical/markdown");
|
|
17781
17801
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -17912,7 +17932,7 @@ var defaultParameterConfiguration = {
|
|
|
17912
17932
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17913
17933
|
var import_fast_equals2 = require("fast-equals");
|
|
17914
17934
|
var import_lexical10 = require("lexical");
|
|
17915
|
-
var
|
|
17935
|
+
var import_react179 = require("react");
|
|
17916
17936
|
|
|
17917
17937
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17918
17938
|
init_emotion_jsx_shim();
|
|
@@ -17935,10 +17955,10 @@ init_emotion_jsx_shim();
|
|
|
17935
17955
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
17936
17956
|
var import_utils5 = require("@lexical/utils");
|
|
17937
17957
|
var import_lexical = require("lexical");
|
|
17938
|
-
var
|
|
17958
|
+
var import_react164 = require("react");
|
|
17939
17959
|
function DisableStylesPlugin() {
|
|
17940
17960
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
17941
|
-
(0,
|
|
17961
|
+
(0, import_react164.useEffect)(() => {
|
|
17942
17962
|
return (0, import_utils5.mergeRegister)(
|
|
17943
17963
|
// Disable text alignment on paragraph nodes
|
|
17944
17964
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -17953,245 +17973,252 @@ function DisableStylesPlugin() {
|
|
|
17953
17973
|
|
|
17954
17974
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
17955
17975
|
init_emotion_jsx_shim();
|
|
17956
|
-
var
|
|
17957
|
-
var textBold =
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
var
|
|
17961
|
-
|
|
17962
|
-
|
|
17963
|
-
var
|
|
17964
|
-
|
|
17965
|
-
|
|
17966
|
-
var
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
var
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
var
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
|
|
17987
|
-
|
|
17988
|
-
vertical-align: sub;
|
|
17989
|
-
font-size: smaller;
|
|
17990
|
-
`;
|
|
17991
|
-
var linkElement = import_css2.css`
|
|
17992
|
-
${link}
|
|
17993
|
-
${linkColorDefault}
|
|
17994
|
-
text-decoration: underline;
|
|
17995
|
-
`;
|
|
17996
|
-
var h12 = import_css2.css`
|
|
17997
|
-
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
17998
|
-
`;
|
|
17999
|
-
var h22 = import_css2.css`
|
|
18000
|
-
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
18001
|
-
`;
|
|
18002
|
-
var h32 = import_css2.css`
|
|
18003
|
-
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
18004
|
-
`;
|
|
18005
|
-
var h42 = import_css2.css`
|
|
18006
|
-
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
18007
|
-
`;
|
|
18008
|
-
var h52 = import_css2.css`
|
|
18009
|
-
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
18010
|
-
`;
|
|
18011
|
-
var h62 = import_css2.css`
|
|
18012
|
-
font-size: var(--fs-base);
|
|
18013
|
-
`;
|
|
18014
|
-
var heading1Element = import_css2.css`
|
|
18015
|
-
${h12}
|
|
18016
|
-
${commonHeadingAttr(true)}
|
|
18017
|
-
${commonLineHeight}
|
|
18018
|
-
`;
|
|
18019
|
-
var heading2Element = import_css2.css`
|
|
18020
|
-
${h22}
|
|
18021
|
-
${commonHeadingAttr(true)}
|
|
18022
|
-
${commonLineHeight}
|
|
18023
|
-
`;
|
|
18024
|
-
var heading3Element = import_css2.css`
|
|
18025
|
-
${h32}
|
|
18026
|
-
${commonHeadingAttr(true)}
|
|
18027
|
-
${commonLineHeight}
|
|
18028
|
-
`;
|
|
18029
|
-
var heading4Element = import_css2.css`
|
|
18030
|
-
${h42}
|
|
18031
|
-
${commonHeadingAttr(true)}
|
|
18032
|
-
${commonLineHeight}
|
|
18033
|
-
`;
|
|
18034
|
-
var heading5Element = import_css2.css`
|
|
18035
|
-
${h52}
|
|
18036
|
-
${commonHeadingAttr(true)}
|
|
18037
|
-
${commonLineHeight}
|
|
18038
|
-
`;
|
|
18039
|
-
var heading6Element = import_css2.css`
|
|
18040
|
-
${h62}
|
|
18041
|
-
${commonHeadingAttr(true)}
|
|
18042
|
-
${commonLineHeight}
|
|
18043
|
-
`;
|
|
18044
|
-
var paragraphElement = import_css2.css`
|
|
18045
|
-
line-height: 1.5;
|
|
18046
|
-
margin-bottom: var(--spacing-base);
|
|
18047
|
-
|
|
18048
|
-
&:last-child {
|
|
18049
|
-
margin-bottom: 0;
|
|
17976
|
+
var import_react165 = require("@emotion/react");
|
|
17977
|
+
var textBold = "ud-editor-text-bold";
|
|
17978
|
+
var textItalic = "ud-editor-text-italic";
|
|
17979
|
+
var textUnderline = "ud-editor-text-underline";
|
|
17980
|
+
var textStrikethrough = "ud-editor-text-strikethrough";
|
|
17981
|
+
var textUnderlineStrikethrough = "ud-editor-text-underline-strikethrough";
|
|
17982
|
+
var textCode = "ud-editor-text-code";
|
|
17983
|
+
var textSuperscript = "ud-editor-text-superscript";
|
|
17984
|
+
var textSubscript = "ud-editor-text-subscript";
|
|
17985
|
+
var linkElement = "ud-editor-link";
|
|
17986
|
+
var heading1Element = "ud-editor-h1";
|
|
17987
|
+
var heading2Element = "ud-editor-h2";
|
|
17988
|
+
var heading3Element = "ud-editor-h3";
|
|
17989
|
+
var heading4Element = "ud-editor-h4";
|
|
17990
|
+
var heading5Element = "ud-editor-h5";
|
|
17991
|
+
var heading6Element = "ud-editor-h6";
|
|
17992
|
+
var paragraphElement = "ud-editor-paragraph";
|
|
17993
|
+
var orderedListElement = "ud-editor-ol";
|
|
17994
|
+
var unorderedListElement = "ud-editor-ul";
|
|
17995
|
+
var listItemElement = "ud-editor-listitem";
|
|
17996
|
+
var nestedListItemElement = "ud-editor-nested-listitem";
|
|
17997
|
+
var blockquoteElement = "ud-editor-blockquote";
|
|
17998
|
+
var codeElement = "ud-editor-code";
|
|
17999
|
+
var tableElement = "ud-editor-table";
|
|
18000
|
+
var tableCellElement = "ud-editor-table-cell";
|
|
18001
|
+
var tableHeaderElement = "ud-editor-table-header";
|
|
18002
|
+
var editorThemeStyles = import_react165.css`
|
|
18003
|
+
.${textBold} {
|
|
18004
|
+
font-weight: 700;
|
|
18005
|
+
}
|
|
18006
|
+
.${textItalic} {
|
|
18007
|
+
font-style: italic;
|
|
18050
18008
|
}
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18009
|
+
.${textUnderline} {
|
|
18010
|
+
text-decoration: underline;
|
|
18011
|
+
}
|
|
18012
|
+
.${textStrikethrough} {
|
|
18013
|
+
text-decoration: line-through;
|
|
18014
|
+
}
|
|
18015
|
+
.${textUnderlineStrikethrough} {
|
|
18016
|
+
text-decoration: underline line-through;
|
|
18017
|
+
}
|
|
18018
|
+
.${textCode} {
|
|
18019
|
+
background-color: var(--gray-100);
|
|
18020
|
+
border-radius: var(--rounded-sm);
|
|
18021
|
+
display: inline-block;
|
|
18022
|
+
font-family: var(--ff-mono);
|
|
18023
|
+
font-feature-settings: 'liga' 0;
|
|
18024
|
+
font-variant-ligatures: none;
|
|
18025
|
+
font-size: var(--fs-sm);
|
|
18026
|
+
padding-left: var(--spacing-xs);
|
|
18027
|
+
padding-right: var(--spacing-xs);
|
|
18028
|
+
}
|
|
18029
|
+
.${textSuperscript} {
|
|
18030
|
+
vertical-align: super;
|
|
18031
|
+
font-size: smaller;
|
|
18032
|
+
}
|
|
18033
|
+
.${textSubscript} {
|
|
18034
|
+
vertical-align: sub;
|
|
18035
|
+
font-size: smaller;
|
|
18036
|
+
}
|
|
18037
|
+
.${linkElement} {
|
|
18038
|
+
${link}
|
|
18039
|
+
${linkColorDefault}
|
|
18040
|
+
text-decoration: underline;
|
|
18041
|
+
}
|
|
18042
|
+
.${heading1Element} {
|
|
18043
|
+
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
18044
|
+
${commonHeadingAttr(true)}
|
|
18045
|
+
${commonLineHeight}
|
|
18046
|
+
}
|
|
18047
|
+
.${heading2Element} {
|
|
18048
|
+
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
18049
|
+
${commonHeadingAttr(true)}
|
|
18050
|
+
${commonLineHeight}
|
|
18051
|
+
}
|
|
18052
|
+
.${heading3Element} {
|
|
18053
|
+
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
18054
|
+
${commonHeadingAttr(true)}
|
|
18055
|
+
${commonLineHeight}
|
|
18056
|
+
}
|
|
18057
|
+
.${heading4Element} {
|
|
18058
|
+
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
18059
|
+
${commonHeadingAttr(true)}
|
|
18060
|
+
${commonLineHeight}
|
|
18061
|
+
}
|
|
18062
|
+
.${heading5Element} {
|
|
18063
|
+
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
18064
|
+
${commonHeadingAttr(true)}
|
|
18065
|
+
${commonLineHeight}
|
|
18066
|
+
}
|
|
18067
|
+
.${heading6Element} {
|
|
18068
|
+
font-size: var(--fs-base);
|
|
18069
|
+
${commonHeadingAttr(true)}
|
|
18070
|
+
${commonLineHeight}
|
|
18071
|
+
}
|
|
18072
|
+
.${paragraphElement} {
|
|
18073
|
+
line-height: 1.5;
|
|
18074
|
+
margin-bottom: var(--spacing-base);
|
|
18060
18075
|
|
|
18061
|
-
|
|
18062
|
-
|
|
18076
|
+
&:last-child {
|
|
18077
|
+
margin-bottom: 0;
|
|
18078
|
+
}
|
|
18063
18079
|
}
|
|
18080
|
+
.${orderedListElement} {
|
|
18081
|
+
${commonLineHeight}
|
|
18082
|
+
display: block;
|
|
18083
|
+
list-style: decimal;
|
|
18084
|
+
list-style-position: outside;
|
|
18085
|
+
margin-bottom: var(--spacing-base);
|
|
18086
|
+
margin-top: 0;
|
|
18087
|
+
padding: 0;
|
|
18064
18088
|
|
|
18065
|
-
|
|
18066
|
-
|
|
18089
|
+
&:last-child {
|
|
18090
|
+
margin-bottom: 0;
|
|
18091
|
+
}
|
|
18067
18092
|
|
|
18068
18093
|
ol {
|
|
18069
|
-
list-style-type:
|
|
18094
|
+
list-style-type: upper-alpha;
|
|
18070
18095
|
|
|
18071
18096
|
ol {
|
|
18072
|
-
list-style-type:
|
|
18097
|
+
list-style-type: lower-alpha;
|
|
18073
18098
|
|
|
18074
18099
|
ol {
|
|
18075
|
-
list-style-type:
|
|
18100
|
+
list-style-type: upper-roman;
|
|
18101
|
+
|
|
18102
|
+
ol {
|
|
18103
|
+
list-style-type: lower-roman;
|
|
18104
|
+
}
|
|
18076
18105
|
}
|
|
18077
18106
|
}
|
|
18078
18107
|
}
|
|
18079
18108
|
}
|
|
18080
|
-
|
|
18081
|
-
|
|
18082
|
-
|
|
18083
|
-
|
|
18084
|
-
|
|
18085
|
-
|
|
18086
|
-
|
|
18087
|
-
|
|
18088
|
-
padding: 0;
|
|
18089
|
-
|
|
18090
|
-
&:last-child {
|
|
18091
|
-
margin-bottom: 0;
|
|
18092
|
-
}
|
|
18109
|
+
.${unorderedListElement} {
|
|
18110
|
+
${commonLineHeight}
|
|
18111
|
+
display: block;
|
|
18112
|
+
list-style: disc;
|
|
18113
|
+
list-style-position: outside;
|
|
18114
|
+
margin-bottom: var(--spacing-base);
|
|
18115
|
+
margin-top: 0;
|
|
18116
|
+
padding: 0;
|
|
18093
18117
|
|
|
18094
|
-
|
|
18095
|
-
|
|
18118
|
+
&:last-child {
|
|
18119
|
+
margin-bottom: 0;
|
|
18120
|
+
}
|
|
18096
18121
|
|
|
18097
18122
|
ul {
|
|
18098
|
-
list-style-type:
|
|
18123
|
+
list-style-type: circle;
|
|
18124
|
+
|
|
18125
|
+
ul {
|
|
18126
|
+
list-style-type: square;
|
|
18127
|
+
}
|
|
18099
18128
|
}
|
|
18100
18129
|
}
|
|
18101
|
-
|
|
18102
|
-
var
|
|
18103
|
-
margin-left: var(--spacing-md);
|
|
18104
|
-
`;
|
|
18105
|
-
var nestedListItemElement = import_css2.css`
|
|
18106
|
-
list-style-type: none;
|
|
18107
|
-
`;
|
|
18108
|
-
var blockquoteElement = import_css2.css`
|
|
18109
|
-
border-left: 0.25rem solid var(--gray-300);
|
|
18110
|
-
color: var(--gray-600);
|
|
18111
|
-
margin-bottom: var(--spacing-base);
|
|
18112
|
-
padding-left: var(--spacing-base);
|
|
18113
|
-
|
|
18114
|
-
&:last-child {
|
|
18115
|
-
margin-bottom: 0;
|
|
18130
|
+
.${listItemElement} {
|
|
18131
|
+
margin-left: var(--spacing-md);
|
|
18116
18132
|
}
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
|
|
18125
|
-
font-size: var(--fs-sm);
|
|
18126
|
-
margin-bottom: var(--spacing-base);
|
|
18127
|
-
padding: var(--spacing-sm);
|
|
18133
|
+
.${nestedListItemElement} {
|
|
18134
|
+
list-style-type: none;
|
|
18135
|
+
}
|
|
18136
|
+
.${blockquoteElement} {
|
|
18137
|
+
border-left: 0.25rem solid var(--gray-300);
|
|
18138
|
+
color: var(--gray-600);
|
|
18139
|
+
margin-bottom: var(--spacing-base);
|
|
18140
|
+
padding-left: var(--spacing-base);
|
|
18128
18141
|
|
|
18129
|
-
|
|
18130
|
-
|
|
18142
|
+
&:last-child {
|
|
18143
|
+
margin-bottom: 0;
|
|
18144
|
+
}
|
|
18131
18145
|
}
|
|
18132
|
-
|
|
18133
|
-
var
|
|
18134
|
-
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18146
|
+
.${codeElement} {
|
|
18147
|
+
background-color: var(--gray-100);
|
|
18148
|
+
border-radius: var(--rounded-sm);
|
|
18149
|
+
display: block;
|
|
18150
|
+
font-family: var(--ff-mono);
|
|
18151
|
+
font-feature-settings: 'liga' 0;
|
|
18152
|
+
font-variant-ligatures: none;
|
|
18153
|
+
font-size: var(--fs-sm);
|
|
18154
|
+
margin-bottom: var(--spacing-base);
|
|
18155
|
+
padding: var(--spacing-sm);
|
|
18141
18156
|
|
|
18142
|
-
|
|
18143
|
-
|
|
18157
|
+
&:last-child {
|
|
18158
|
+
margin-bottom: 0;
|
|
18159
|
+
}
|
|
18144
18160
|
}
|
|
18145
|
-
|
|
18146
|
-
|
|
18147
|
-
|
|
18148
|
-
|
|
18149
|
-
|
|
18150
|
-
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
outline: none;
|
|
18154
|
-
padding: var(--spacing-sm);
|
|
18155
|
-
position: relative;
|
|
18156
|
-
text-align: start;
|
|
18157
|
-
vertical-align: top;
|
|
18158
|
-
width: 7rem;
|
|
18161
|
+
.${tableElement} {
|
|
18162
|
+
border-collapse: collapse;
|
|
18163
|
+
border-spacing: 0;
|
|
18164
|
+
border-color: var(--gray-300);
|
|
18165
|
+
border-width: 1px;
|
|
18166
|
+
border-style: solid;
|
|
18167
|
+
margin-bottom: var(--spacing-base);
|
|
18168
|
+
margin-top: 0;
|
|
18159
18169
|
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
content: '';
|
|
18164
|
-
height: 5px;
|
|
18165
|
-
left: 0;
|
|
18166
|
-
position: absolute;
|
|
18167
|
-
top: 100%;
|
|
18168
|
-
width: 100%;
|
|
18169
|
-
z-index: 1;
|
|
18170
|
+
&:last-child {
|
|
18171
|
+
margin-bottom: 0;
|
|
18172
|
+
}
|
|
18170
18173
|
}
|
|
18174
|
+
.${tableCellElement} {
|
|
18175
|
+
background-color: var(--white);
|
|
18176
|
+
border-color: var(--gray-300);
|
|
18177
|
+
border-style: solid;
|
|
18178
|
+
border-width: 1px;
|
|
18179
|
+
box-sizing: unset;
|
|
18180
|
+
min-width: 2rem;
|
|
18181
|
+
outline: none;
|
|
18182
|
+
padding: var(--spacing-sm);
|
|
18183
|
+
position: relative;
|
|
18184
|
+
text-align: start;
|
|
18185
|
+
vertical-align: top;
|
|
18186
|
+
width: 7rem;
|
|
18171
18187
|
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
|
|
18188
|
+
&::after {
|
|
18189
|
+
content: '';
|
|
18190
|
+
height: 5px;
|
|
18191
|
+
left: 0;
|
|
18192
|
+
position: absolute;
|
|
18193
|
+
top: 100%;
|
|
18194
|
+
width: 100%;
|
|
18195
|
+
z-index: 1;
|
|
18196
|
+
}
|
|
18197
|
+
|
|
18198
|
+
&::before {
|
|
18199
|
+
content: '';
|
|
18200
|
+
width: 5px;
|
|
18201
|
+
height: 100%;
|
|
18202
|
+
position: absolute;
|
|
18203
|
+
top: 0;
|
|
18204
|
+
left: 100%;
|
|
18205
|
+
z-index: 1;
|
|
18206
|
+
}
|
|
18207
|
+
}
|
|
18208
|
+
.${tableHeaderElement} {
|
|
18209
|
+
background-color: var(--gray-100);
|
|
18210
|
+
border-color: var(--gray-300);
|
|
18211
|
+
border-style: solid;
|
|
18212
|
+
border-width: 1px;
|
|
18213
|
+
box-sizing: unset;
|
|
18214
|
+
font-weight: normal;
|
|
18215
|
+
min-width: 2rem;
|
|
18216
|
+
outline: none;
|
|
18217
|
+
padding: var(--spacing-sm);
|
|
18218
|
+
text-align: start;
|
|
18219
|
+
vertical-align: top;
|
|
18220
|
+
width: 7rem;
|
|
18180
18221
|
}
|
|
18181
|
-
`;
|
|
18182
|
-
var tableHeaderElement = import_css2.css`
|
|
18183
|
-
background-color: var(--gray-100);
|
|
18184
|
-
border-color: var(--gray-300);
|
|
18185
|
-
border-style: solid;
|
|
18186
|
-
border-width: 1px;
|
|
18187
|
-
box-sizing: unset;
|
|
18188
|
-
font-weight: normal;
|
|
18189
|
-
min-width: 2rem;
|
|
18190
|
-
outline: none;
|
|
18191
|
-
padding: var(--spacing-sm);
|
|
18192
|
-
text-align: start;
|
|
18193
|
-
vertical-align: top;
|
|
18194
|
-
width: 7rem;
|
|
18195
18222
|
`;
|
|
18196
18223
|
|
|
18197
18224
|
// src/components/ParameterInputs/rich-text/ImprovedAssetSelectionPlugin.tsx
|
|
@@ -18199,10 +18226,10 @@ init_emotion_jsx_shim();
|
|
|
18199
18226
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
18200
18227
|
var import_utils6 = require("@lexical/utils");
|
|
18201
18228
|
var import_lexical2 = require("lexical");
|
|
18202
|
-
var
|
|
18229
|
+
var import_react166 = require("react");
|
|
18203
18230
|
var ImprovedAssetSelectionPlugin = () => {
|
|
18204
18231
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
18205
|
-
(0,
|
|
18232
|
+
(0, import_react166.useEffect)(() => {
|
|
18206
18233
|
editor.getRootElement();
|
|
18207
18234
|
const onRootClick = (event) => {
|
|
18208
18235
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -18251,13 +18278,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
18251
18278
|
|
|
18252
18279
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
18253
18280
|
init_emotion_jsx_shim();
|
|
18254
|
-
var
|
|
18281
|
+
var import_react167 = require("@emotion/react");
|
|
18255
18282
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
18256
18283
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
18257
18284
|
var import_utils7 = require("@lexical/utils");
|
|
18258
18285
|
var import_fast_equals = require("fast-equals");
|
|
18259
18286
|
var import_lexical4 = require("lexical");
|
|
18260
|
-
var
|
|
18287
|
+
var import_react168 = require("react");
|
|
18261
18288
|
|
|
18262
18289
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
18263
18290
|
init_emotion_jsx_shim();
|
|
@@ -18605,18 +18632,18 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
18605
18632
|
);
|
|
18606
18633
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
18607
18634
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
18608
|
-
var linkPopover =
|
|
18635
|
+
var linkPopover = import_react167.css`
|
|
18609
18636
|
position: absolute;
|
|
18610
18637
|
z-index: 11;
|
|
18611
18638
|
`;
|
|
18612
|
-
var linkPopoverContainer =
|
|
18639
|
+
var linkPopoverContainer = import_react167.css`
|
|
18613
18640
|
${Popover};
|
|
18614
18641
|
${PopoverBody};
|
|
18615
18642
|
${PopoverVariantSmall};
|
|
18616
18643
|
align-items: center;
|
|
18617
18644
|
display: flex;
|
|
18618
18645
|
`;
|
|
18619
|
-
var linkPopoverAnchor =
|
|
18646
|
+
var linkPopoverAnchor = import_react167.css`
|
|
18620
18647
|
${link}
|
|
18621
18648
|
${linkColorDefault}
|
|
18622
18649
|
`;
|
|
@@ -18629,17 +18656,17 @@ function LinkNodePlugin({
|
|
|
18629
18656
|
return path;
|
|
18630
18657
|
};
|
|
18631
18658
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
18632
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
18633
|
-
const linkPopoverElRef = (0,
|
|
18634
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
18635
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
18636
|
-
(0,
|
|
18659
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react168.useState)();
|
|
18660
|
+
const linkPopoverElRef = (0, import_react168.useRef)(null);
|
|
18661
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react168.useState)(false);
|
|
18662
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react168.useState)(false);
|
|
18663
|
+
(0, import_react168.useEffect)(() => {
|
|
18637
18664
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
18638
18665
|
setLinkPopoverState(void 0);
|
|
18639
18666
|
return;
|
|
18640
18667
|
}
|
|
18641
18668
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
18642
|
-
(0,
|
|
18669
|
+
(0, import_react168.useEffect)(() => {
|
|
18643
18670
|
if (!editor.hasNodes([LinkNode])) {
|
|
18644
18671
|
throw new Error("LinkNode not registered on editor");
|
|
18645
18672
|
}
|
|
@@ -18743,7 +18770,7 @@ function LinkNodePlugin({
|
|
|
18743
18770
|
)
|
|
18744
18771
|
);
|
|
18745
18772
|
}, [editor, onConnectLink]);
|
|
18746
|
-
const maybeShowLinkToolbar = (0,
|
|
18773
|
+
const maybeShowLinkToolbar = (0, import_react168.useCallback)(() => {
|
|
18747
18774
|
if (!editor.isEditable()) {
|
|
18748
18775
|
return;
|
|
18749
18776
|
}
|
|
@@ -18777,7 +18804,7 @@ function LinkNodePlugin({
|
|
|
18777
18804
|
}
|
|
18778
18805
|
});
|
|
18779
18806
|
}, [editor, positioningAnchorEl]);
|
|
18780
|
-
(0,
|
|
18807
|
+
(0, import_react168.useEffect)(() => {
|
|
18781
18808
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18782
18809
|
requestAnimationFrame(() => {
|
|
18783
18810
|
editorState.read(() => {
|
|
@@ -18865,7 +18892,7 @@ var import_list = require("@lexical/list");
|
|
|
18865
18892
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
18866
18893
|
var import_utils10 = require("@lexical/utils");
|
|
18867
18894
|
var import_lexical5 = require("lexical");
|
|
18868
|
-
var
|
|
18895
|
+
var import_react169 = require("react");
|
|
18869
18896
|
function isIndentPermitted(maxDepth) {
|
|
18870
18897
|
const selection = (0, import_lexical5.$getSelection)();
|
|
18871
18898
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -18920,8 +18947,8 @@ function $indentOverTab(selection) {
|
|
|
18920
18947
|
}
|
|
18921
18948
|
function ListIndentPlugin({ maxDepth }) {
|
|
18922
18949
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
18923
|
-
const isInListItemNode = (0,
|
|
18924
|
-
(0,
|
|
18950
|
+
const isInListItemNode = (0, import_react169.useRef)(false);
|
|
18951
|
+
(0, import_react169.useEffect)(() => {
|
|
18925
18952
|
return editor.registerCommand(
|
|
18926
18953
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
18927
18954
|
() => {
|
|
@@ -18938,7 +18965,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
18938
18965
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
18939
18966
|
);
|
|
18940
18967
|
}, [editor]);
|
|
18941
|
-
(0,
|
|
18968
|
+
(0, import_react169.useEffect)(() => {
|
|
18942
18969
|
return (0, import_utils10.mergeRegister)(
|
|
18943
18970
|
editor.registerCommand(
|
|
18944
18971
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
@@ -18968,12 +18995,12 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
18968
18995
|
|
|
18969
18996
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
18970
18997
|
init_emotion_jsx_shim();
|
|
18971
|
-
var
|
|
18998
|
+
var import_react170 = require("@emotion/react");
|
|
18972
18999
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
18973
19000
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
18974
19001
|
var import_table = require("@lexical/table");
|
|
18975
19002
|
var import_lexical6 = require("lexical");
|
|
18976
|
-
var
|
|
19003
|
+
var import_react171 = require("react");
|
|
18977
19004
|
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
18978
19005
|
function computeSelectionCount(selection) {
|
|
18979
19006
|
const selectionShape = selection.getShape();
|
|
@@ -18982,14 +19009,14 @@ function computeSelectionCount(selection) {
|
|
|
18982
19009
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
18983
19010
|
};
|
|
18984
19011
|
}
|
|
18985
|
-
var tableActionMenuTrigger =
|
|
19012
|
+
var tableActionMenuTrigger = import_react170.css`
|
|
18986
19013
|
position: absolute;
|
|
18987
19014
|
transform: translate(calc(-100% - 1px), 1px);
|
|
18988
19015
|
`;
|
|
18989
|
-
var TableActionMenuTrigger = (0,
|
|
19016
|
+
var TableActionMenuTrigger = (0, import_react171.forwardRef)((props, ref) => {
|
|
18990
19017
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
18991
|
-
const [coordinates, setCoordinates] = (0,
|
|
18992
|
-
(0,
|
|
19018
|
+
const [coordinates, setCoordinates] = (0, import_react171.useState)({ x: 0, y: 0 });
|
|
19019
|
+
(0, import_react171.useLayoutEffect)(() => {
|
|
18993
19020
|
const rect = tableCellEl.getBoundingClientRect();
|
|
18994
19021
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
18995
19022
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
@@ -19022,16 +19049,16 @@ function TableActionMenu({
|
|
|
19022
19049
|
positioningAnchorEl
|
|
19023
19050
|
}) {
|
|
19024
19051
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
19025
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
19026
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
19052
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react171.useState)(_tableCellNode);
|
|
19053
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react171.useState)({
|
|
19027
19054
|
columns: 1,
|
|
19028
19055
|
rows: 1
|
|
19029
19056
|
});
|
|
19030
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
19057
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react171.useState)(0);
|
|
19031
19058
|
const incrementMenuTriggerKey = () => {
|
|
19032
19059
|
setMenuTriggerKey((key) => key += 1);
|
|
19033
19060
|
};
|
|
19034
|
-
(0,
|
|
19061
|
+
(0, import_react171.useEffect)(() => {
|
|
19035
19062
|
return editor.registerMutationListener(
|
|
19036
19063
|
import_table.TableCellNode,
|
|
19037
19064
|
(nodeMutations) => {
|
|
@@ -19045,7 +19072,7 @@ function TableActionMenu({
|
|
|
19045
19072
|
{ skipInitialization: true }
|
|
19046
19073
|
);
|
|
19047
19074
|
}, [editor, tableCellNode]);
|
|
19048
|
-
(0,
|
|
19075
|
+
(0, import_react171.useEffect)(() => {
|
|
19049
19076
|
editor.getEditorState().read(() => {
|
|
19050
19077
|
const selection = (0, import_lexical6.$getSelection)();
|
|
19051
19078
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -19053,7 +19080,7 @@ function TableActionMenu({
|
|
|
19053
19080
|
}
|
|
19054
19081
|
});
|
|
19055
19082
|
}, [editor]);
|
|
19056
|
-
const clearTableSelection = (0,
|
|
19083
|
+
const clearTableSelection = (0, import_react171.useCallback)(() => {
|
|
19057
19084
|
editor.update(() => {
|
|
19058
19085
|
if (tableCellNode.isAttached()) {
|
|
19059
19086
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -19070,7 +19097,7 @@ function TableActionMenu({
|
|
|
19070
19097
|
(0, import_lexical6.$setSelection)(null);
|
|
19071
19098
|
});
|
|
19072
19099
|
}, [editor, tableCellNode]);
|
|
19073
|
-
const insertTableRowAtSelection = (0,
|
|
19100
|
+
const insertTableRowAtSelection = (0, import_react171.useCallback)(
|
|
19074
19101
|
(shouldInsertAfter) => {
|
|
19075
19102
|
editor.update(() => {
|
|
19076
19103
|
for (let i = 0; i < selectionCounts.rows; i++) {
|
|
@@ -19080,7 +19107,7 @@ function TableActionMenu({
|
|
|
19080
19107
|
},
|
|
19081
19108
|
[editor, selectionCounts.rows]
|
|
19082
19109
|
);
|
|
19083
|
-
const insertTableColumnAtSelection = (0,
|
|
19110
|
+
const insertTableColumnAtSelection = (0, import_react171.useCallback)(
|
|
19084
19111
|
(shouldInsertAfter) => {
|
|
19085
19112
|
editor.update(() => {
|
|
19086
19113
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -19090,26 +19117,26 @@ function TableActionMenu({
|
|
|
19090
19117
|
},
|
|
19091
19118
|
[editor, selectionCounts.columns]
|
|
19092
19119
|
);
|
|
19093
|
-
const deleteTableRowAtSelection = (0,
|
|
19120
|
+
const deleteTableRowAtSelection = (0, import_react171.useCallback)(() => {
|
|
19094
19121
|
editor.update(() => {
|
|
19095
19122
|
(0, import_table.$deleteTableRowAtSelection)();
|
|
19096
19123
|
});
|
|
19097
19124
|
incrementMenuTriggerKey();
|
|
19098
19125
|
}, [editor]);
|
|
19099
|
-
const deleteTableAtSelection = (0,
|
|
19126
|
+
const deleteTableAtSelection = (0, import_react171.useCallback)(() => {
|
|
19100
19127
|
editor.update(() => {
|
|
19101
19128
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19102
19129
|
tableNode.remove();
|
|
19103
19130
|
clearTableSelection();
|
|
19104
19131
|
});
|
|
19105
19132
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19106
|
-
const deleteTableColumnAtSelection = (0,
|
|
19133
|
+
const deleteTableColumnAtSelection = (0, import_react171.useCallback)(() => {
|
|
19107
19134
|
editor.update(() => {
|
|
19108
19135
|
(0, import_table.$deleteTableColumnAtSelection)();
|
|
19109
19136
|
});
|
|
19110
19137
|
incrementMenuTriggerKey();
|
|
19111
19138
|
}, [editor]);
|
|
19112
|
-
const toggleTableRowIsHeader = (0,
|
|
19139
|
+
const toggleTableRowIsHeader = (0, import_react171.useCallback)(() => {
|
|
19113
19140
|
editor.update(() => {
|
|
19114
19141
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19115
19142
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -19129,7 +19156,7 @@ function TableActionMenu({
|
|
|
19129
19156
|
clearTableSelection();
|
|
19130
19157
|
});
|
|
19131
19158
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19132
|
-
const toggleTableColumnIsHeader = (0,
|
|
19159
|
+
const toggleTableColumnIsHeader = (0, import_react171.useCallback)(() => {
|
|
19133
19160
|
editor.update(() => {
|
|
19134
19161
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19135
19162
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -19149,7 +19176,7 @@ function TableActionMenu({
|
|
|
19149
19176
|
clearTableSelection();
|
|
19150
19177
|
});
|
|
19151
19178
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19152
|
-
const menuItemCss = (0,
|
|
19179
|
+
const menuItemCss = (0, import_react170.css)({
|
|
19153
19180
|
fontSize: "var(--fs-sm)"
|
|
19154
19181
|
});
|
|
19155
19182
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
@@ -19220,10 +19247,10 @@ function TableCellActionMenuContainer({
|
|
|
19220
19247
|
positioningAnchorEl
|
|
19221
19248
|
}) {
|
|
19222
19249
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
19223
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
19224
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
19225
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
19226
|
-
(0,
|
|
19250
|
+
const [tableCellNode, setTableMenuCellNode] = (0, import_react171.useState)(null);
|
|
19251
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0, import_react171.useState)(null);
|
|
19252
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0, import_react171.useState)(null);
|
|
19253
|
+
(0, import_react171.useEffect)(() => {
|
|
19227
19254
|
const newPortalEl = document.createElement("div");
|
|
19228
19255
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
19229
19256
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -19231,14 +19258,14 @@ function TableCellActionMenuContainer({
|
|
|
19231
19258
|
newPortalEl.remove();
|
|
19232
19259
|
};
|
|
19233
19260
|
}, [menuPortalEl]);
|
|
19234
|
-
const setTableMenuCellNodeElem = (0,
|
|
19261
|
+
const setTableMenuCellNodeElem = (0, import_react171.useCallback)((elem) => {
|
|
19235
19262
|
if (elem) {
|
|
19236
19263
|
_setTableMenuCellNodeEl(elem);
|
|
19237
19264
|
} else {
|
|
19238
19265
|
_setTableMenuCellNodeEl(null);
|
|
19239
19266
|
}
|
|
19240
19267
|
}, []);
|
|
19241
|
-
const $moveMenu = (0,
|
|
19268
|
+
const $moveMenu = (0, import_react171.useCallback)(() => {
|
|
19242
19269
|
const selection = (0, import_lexical6.$getSelection)();
|
|
19243
19270
|
const nativeSelection = window.getSelection();
|
|
19244
19271
|
const activeElement = document.activeElement;
|
|
@@ -19267,7 +19294,7 @@ function TableCellActionMenuContainer({
|
|
|
19267
19294
|
setTableMenuCellNodeElem(null);
|
|
19268
19295
|
}
|
|
19269
19296
|
}, [editor, setTableMenuCellNodeElem]);
|
|
19270
|
-
(0,
|
|
19297
|
+
(0, import_react171.useEffect)(() => {
|
|
19271
19298
|
return editor.registerUpdateListener(() => {
|
|
19272
19299
|
editor.getEditorState().read(() => {
|
|
19273
19300
|
$moveMenu();
|
|
@@ -19295,18 +19322,18 @@ function TableActionMenuPlugin({
|
|
|
19295
19322
|
|
|
19296
19323
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
19297
19324
|
init_emotion_jsx_shim();
|
|
19298
|
-
var
|
|
19325
|
+
var import_react172 = require("@emotion/react");
|
|
19299
19326
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
19300
19327
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
19301
19328
|
var import_table2 = require("@lexical/table");
|
|
19302
19329
|
var import_utils12 = require("@lexical/utils");
|
|
19303
19330
|
var import_lexical7 = require("lexical");
|
|
19304
|
-
var
|
|
19331
|
+
var import_react173 = require("react");
|
|
19305
19332
|
var import_react_dom3 = require("react-dom");
|
|
19306
19333
|
var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
|
|
19307
19334
|
var MIN_ROW_HEIGHT = 33;
|
|
19308
19335
|
var MIN_COLUMN_WIDTH = 50;
|
|
19309
|
-
var tableResizer =
|
|
19336
|
+
var tableResizer = import_react172.css`
|
|
19310
19337
|
position: absolute;
|
|
19311
19338
|
z-index: var(--z-10);
|
|
19312
19339
|
`;
|
|
@@ -19328,15 +19355,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
19328
19355
|
return null;
|
|
19329
19356
|
};
|
|
19330
19357
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
19331
|
-
const targetRef = (0,
|
|
19332
|
-
const resizerRef = (0,
|
|
19333
|
-
const tableRectRef = (0,
|
|
19334
|
-
const mouseStartPosRef = (0,
|
|
19335
|
-
const [mouseCurrentPos, updateMouseCurrentPos] = (0,
|
|
19336
|
-
const [activeCell, updateActiveCell] = (0,
|
|
19337
|
-
const [isMouseDown, updateIsMouseDown] = (0,
|
|
19338
|
-
const [draggingDirection, updateDraggingDirection] = (0,
|
|
19339
|
-
const resetState = (0,
|
|
19358
|
+
const targetRef = (0, import_react173.useRef)(null);
|
|
19359
|
+
const resizerRef = (0, import_react173.useRef)(null);
|
|
19360
|
+
const tableRectRef = (0, import_react173.useRef)(null);
|
|
19361
|
+
const mouseStartPosRef = (0, import_react173.useRef)(null);
|
|
19362
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = (0, import_react173.useState)(null);
|
|
19363
|
+
const [activeCell, updateActiveCell] = (0, import_react173.useState)(null);
|
|
19364
|
+
const [isMouseDown, updateIsMouseDown] = (0, import_react173.useState)(false);
|
|
19365
|
+
const [draggingDirection, updateDraggingDirection] = (0, import_react173.useState)(null);
|
|
19366
|
+
const resetState = (0, import_react173.useCallback)(() => {
|
|
19340
19367
|
updateActiveCell(null);
|
|
19341
19368
|
targetRef.current = null;
|
|
19342
19369
|
updateDraggingDirection(null);
|
|
@@ -19346,7 +19373,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19346
19373
|
const isMouseDownOnEvent = (event) => {
|
|
19347
19374
|
return (event.buttons & 1) === 1;
|
|
19348
19375
|
};
|
|
19349
|
-
(0,
|
|
19376
|
+
(0, import_react173.useEffect)(() => {
|
|
19350
19377
|
const onMouseMove = (event) => {
|
|
19351
19378
|
setTimeout(() => {
|
|
19352
19379
|
const target = event.target;
|
|
@@ -19413,7 +19440,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19413
19440
|
}
|
|
19414
19441
|
return false;
|
|
19415
19442
|
};
|
|
19416
|
-
const updateRowHeight = (0,
|
|
19443
|
+
const updateRowHeight = (0, import_react173.useCallback)(
|
|
19417
19444
|
(heightChange) => {
|
|
19418
19445
|
if (!activeCell) {
|
|
19419
19446
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -19475,7 +19502,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19475
19502
|
}
|
|
19476
19503
|
}
|
|
19477
19504
|
};
|
|
19478
|
-
const updateColumnWidth = (0,
|
|
19505
|
+
const updateColumnWidth = (0, import_react173.useCallback)(
|
|
19479
19506
|
(widthChange) => {
|
|
19480
19507
|
if (!activeCell) {
|
|
19481
19508
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -19509,7 +19536,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19509
19536
|
},
|
|
19510
19537
|
[activeCell, editor]
|
|
19511
19538
|
);
|
|
19512
|
-
const mouseUpHandler = (0,
|
|
19539
|
+
const mouseUpHandler = (0, import_react173.useCallback)(
|
|
19513
19540
|
(direction) => {
|
|
19514
19541
|
const handler = (event) => {
|
|
19515
19542
|
event.preventDefault();
|
|
@@ -19538,7 +19565,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19538
19565
|
},
|
|
19539
19566
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
19540
19567
|
);
|
|
19541
|
-
const toggleResize = (0,
|
|
19568
|
+
const toggleResize = (0, import_react173.useCallback)(
|
|
19542
19569
|
(direction) => (event) => {
|
|
19543
19570
|
event.preventDefault();
|
|
19544
19571
|
event.stopPropagation();
|
|
@@ -19555,7 +19582,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19555
19582
|
},
|
|
19556
19583
|
[activeCell, mouseUpHandler]
|
|
19557
19584
|
);
|
|
19558
|
-
const getResizers = (0,
|
|
19585
|
+
const getResizers = (0, import_react173.useCallback)(() => {
|
|
19559
19586
|
if (activeCell) {
|
|
19560
19587
|
const { height, width, top: top2, left } = activeCell.elem.getBoundingClientRect();
|
|
19561
19588
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -19626,7 +19653,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19626
19653
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
19627
19654
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
19628
19655
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
19629
|
-
return (0,
|
|
19656
|
+
return (0, import_react173.useMemo)(
|
|
19630
19657
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
19631
19658
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
19632
19659
|
positioningAnchorEl
|
|
@@ -19640,11 +19667,11 @@ init_emotion_jsx_shim();
|
|
|
19640
19667
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
19641
19668
|
var import_table3 = require("@lexical/table");
|
|
19642
19669
|
var import_lexical8 = require("lexical");
|
|
19643
|
-
var
|
|
19670
|
+
var import_react174 = require("react");
|
|
19644
19671
|
var TableSelectionPlugin = () => {
|
|
19645
19672
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
19646
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
19647
|
-
(0,
|
|
19673
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react174.useState)(null);
|
|
19674
|
+
(0, import_react174.useEffect)(() => {
|
|
19648
19675
|
return editor.registerCommand(
|
|
19649
19676
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
19650
19677
|
() => {
|
|
@@ -19666,7 +19693,7 @@ var TableSelectionPlugin = () => {
|
|
|
19666
19693
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
19667
19694
|
);
|
|
19668
19695
|
}, [editor]);
|
|
19669
|
-
(0,
|
|
19696
|
+
(0, import_react174.useEffect)(() => {
|
|
19670
19697
|
const onControlA = (event) => {
|
|
19671
19698
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
19672
19699
|
if (!closestTableCellNode) {
|
|
@@ -19690,7 +19717,7 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
19690
19717
|
|
|
19691
19718
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
19692
19719
|
init_emotion_jsx_shim();
|
|
19693
|
-
var
|
|
19720
|
+
var import_react176 = require("@emotion/react");
|
|
19694
19721
|
var import_code2 = require("@lexical/code");
|
|
19695
19722
|
var import_list2 = require("@lexical/list");
|
|
19696
19723
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -19699,7 +19726,7 @@ var import_selection2 = require("@lexical/selection");
|
|
|
19699
19726
|
var import_table4 = require("@lexical/table");
|
|
19700
19727
|
var import_utils13 = require("@lexical/utils");
|
|
19701
19728
|
var import_lexical9 = require("lexical");
|
|
19702
|
-
var
|
|
19729
|
+
var import_react177 = require("react");
|
|
19703
19730
|
|
|
19704
19731
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
19705
19732
|
init_emotion_jsx_shim();
|
|
@@ -19717,29 +19744,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
19717
19744
|
|
|
19718
19745
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
19719
19746
|
init_emotion_jsx_shim();
|
|
19720
|
-
var
|
|
19747
|
+
var import_react175 = require("react");
|
|
19721
19748
|
var useRichTextToolbarState = ({ config }) => {
|
|
19722
19749
|
var _a;
|
|
19723
|
-
const enabledBuiltInFormats = (0,
|
|
19750
|
+
const enabledBuiltInFormats = (0, import_react175.useMemo)(() => {
|
|
19724
19751
|
return richTextBuiltInFormats.filter((format) => {
|
|
19725
19752
|
var _a2, _b;
|
|
19726
19753
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
19727
19754
|
});
|
|
19728
19755
|
}, [config]);
|
|
19729
|
-
const enabledBuiltInElements = (0,
|
|
19756
|
+
const enabledBuiltInElements = (0, import_react175.useMemo)(() => {
|
|
19730
19757
|
return richTextBuiltInElements.filter((element) => {
|
|
19731
19758
|
var _a2, _b;
|
|
19732
19759
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
19733
19760
|
});
|
|
19734
19761
|
}, [config]);
|
|
19735
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
19762
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react175.useMemo)(() => {
|
|
19736
19763
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
19737
19764
|
}, [enabledBuiltInFormats]);
|
|
19738
19765
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
19739
19766
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
19740
19767
|
);
|
|
19741
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
19742
|
-
const visibleFormatsWithIcon = (0,
|
|
19768
|
+
const [activeFormats, setActiveFormats] = (0, import_react175.useState)([]);
|
|
19769
|
+
const visibleFormatsWithIcon = (0, import_react175.useMemo)(() => {
|
|
19743
19770
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19744
19771
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19745
19772
|
visibleFormats.add(type);
|
|
@@ -19749,7 +19776,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19749
19776
|
});
|
|
19750
19777
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19751
19778
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
19752
|
-
const visibleFormatsWithoutIcon = (0,
|
|
19779
|
+
const visibleFormatsWithoutIcon = (0, import_react175.useMemo)(() => {
|
|
19753
19780
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19754
19781
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19755
19782
|
visibleFormats.add(type);
|
|
@@ -19759,11 +19786,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19759
19786
|
});
|
|
19760
19787
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19761
19788
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
19762
|
-
const [activeElement, setActiveElement] = (0,
|
|
19789
|
+
const [activeElement, setActiveElement] = (0, import_react175.useState)("paragraph");
|
|
19763
19790
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
19764
19791
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
19765
19792
|
);
|
|
19766
|
-
const visibleTextualElements = (0,
|
|
19793
|
+
const visibleTextualElements = (0, import_react175.useMemo)(() => {
|
|
19767
19794
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
19768
19795
|
return enabledTextualElements;
|
|
19769
19796
|
}
|
|
@@ -19774,30 +19801,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19774
19801
|
}
|
|
19775
19802
|
);
|
|
19776
19803
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
19777
|
-
const [isLink, setIsLink] = (0,
|
|
19778
|
-
const linkElementVisible = (0,
|
|
19804
|
+
const [isLink, setIsLink] = (0, import_react175.useState)(false);
|
|
19805
|
+
const linkElementVisible = (0, import_react175.useMemo)(() => {
|
|
19779
19806
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
19780
19807
|
}, [isLink, enabledBuiltInElements]);
|
|
19781
|
-
const visibleLists = (0,
|
|
19808
|
+
const visibleLists = (0, import_react175.useMemo)(() => {
|
|
19782
19809
|
return new Set(
|
|
19783
19810
|
["orderedList", "unorderedList"].filter(
|
|
19784
19811
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
19785
19812
|
)
|
|
19786
19813
|
);
|
|
19787
19814
|
}, [activeElement, enabledBuiltInElements]);
|
|
19788
|
-
const quoteElementVisible = (0,
|
|
19815
|
+
const quoteElementVisible = (0, import_react175.useMemo)(() => {
|
|
19789
19816
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
19790
19817
|
}, [activeElement, enabledBuiltInElements]);
|
|
19791
|
-
const codeElementVisible = (0,
|
|
19818
|
+
const codeElementVisible = (0, import_react175.useMemo)(() => {
|
|
19792
19819
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
19793
19820
|
}, [activeElement, enabledBuiltInElements]);
|
|
19794
|
-
const tableElementVisible = (0,
|
|
19821
|
+
const tableElementVisible = (0, import_react175.useMemo)(() => {
|
|
19795
19822
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
19796
19823
|
}, [activeElement, enabledBuiltInElements]);
|
|
19797
|
-
const assetElementVisible = (0,
|
|
19824
|
+
const assetElementVisible = (0, import_react175.useMemo)(() => {
|
|
19798
19825
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
19799
19826
|
}, [activeElement, enabledBuiltInElements]);
|
|
19800
|
-
const visibleElementsWithIcons = (0,
|
|
19827
|
+
const visibleElementsWithIcons = (0, import_react175.useMemo)(() => {
|
|
19801
19828
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19802
19829
|
if (linkElementVisible) {
|
|
19803
19830
|
visibleElements.add("link");
|
|
@@ -19809,7 +19836,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19809
19836
|
}
|
|
19810
19837
|
return visibleElements;
|
|
19811
19838
|
}, [linkElementVisible, visibleLists]);
|
|
19812
|
-
const visibleInsertElementsWithIcons = (0,
|
|
19839
|
+
const visibleInsertElementsWithIcons = (0, import_react175.useMemo)(() => {
|
|
19813
19840
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19814
19841
|
if (quoteElementVisible) {
|
|
19815
19842
|
visibleElements.add("quote");
|
|
@@ -19848,7 +19875,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19848
19875
|
|
|
19849
19876
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
19850
19877
|
var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
|
|
19851
|
-
var toolbar =
|
|
19878
|
+
var toolbar = import_react176.css`
|
|
19852
19879
|
${scrollbarStyles}
|
|
19853
19880
|
background: var(--gray-50);
|
|
19854
19881
|
border-radius: var(--rounded-base);
|
|
@@ -19862,7 +19889,7 @@ var toolbar = import_react174.css`
|
|
|
19862
19889
|
top: calc(var(--spacing-sm) * -2);
|
|
19863
19890
|
z-index: 10;
|
|
19864
19891
|
`;
|
|
19865
|
-
var toolbarGroup =
|
|
19892
|
+
var toolbarGroup = import_react176.css`
|
|
19866
19893
|
display: flex;
|
|
19867
19894
|
flex-shrink: 0;
|
|
19868
19895
|
gap: var(--spacing-xs);
|
|
@@ -19879,7 +19906,7 @@ var toolbarGroup = import_react174.css`
|
|
|
19879
19906
|
width: 1px;
|
|
19880
19907
|
}
|
|
19881
19908
|
`;
|
|
19882
|
-
var richTextToolbarButton =
|
|
19909
|
+
var richTextToolbarButton = import_react176.css`
|
|
19883
19910
|
align-items: center;
|
|
19884
19911
|
appearance: none;
|
|
19885
19912
|
border: 0;
|
|
@@ -19893,17 +19920,17 @@ var richTextToolbarButton = import_react174.css`
|
|
|
19893
19920
|
min-width: 32px;
|
|
19894
19921
|
padding: 0 var(--spacing-sm);
|
|
19895
19922
|
`;
|
|
19896
|
-
var richTextToolbarButtonActive =
|
|
19923
|
+
var richTextToolbarButtonActive = import_react176.css`
|
|
19897
19924
|
background: var(--gray-200);
|
|
19898
19925
|
`;
|
|
19899
|
-
var textStyleButton =
|
|
19926
|
+
var textStyleButton = import_react176.css`
|
|
19900
19927
|
justify-content: space-between;
|
|
19901
19928
|
min-width: 7rem;
|
|
19902
19929
|
`;
|
|
19903
|
-
var toolbarIcon =
|
|
19930
|
+
var toolbarIcon = import_react176.css`
|
|
19904
19931
|
color: inherit;
|
|
19905
19932
|
`;
|
|
19906
|
-
var toolbarChevron =
|
|
19933
|
+
var toolbarChevron = import_react176.css`
|
|
19907
19934
|
margin-left: var(--spacing-xs);
|
|
19908
19935
|
`;
|
|
19909
19936
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19963,7 +19990,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19963
19990
|
});
|
|
19964
19991
|
});
|
|
19965
19992
|
};
|
|
19966
|
-
const updateToolbar = (0,
|
|
19993
|
+
const updateToolbar = (0, import_react177.useCallback)(() => {
|
|
19967
19994
|
const selection = (0, import_lexical9.$getSelection)();
|
|
19968
19995
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
19969
19996
|
return;
|
|
@@ -20002,7 +20029,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
20002
20029
|
setIsLink(false);
|
|
20003
20030
|
}
|
|
20004
20031
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
20005
|
-
(0,
|
|
20032
|
+
(0, import_react177.useEffect)(() => {
|
|
20006
20033
|
return editor.registerCommand(
|
|
20007
20034
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
20008
20035
|
(_payload) => {
|
|
@@ -20012,7 +20039,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
20012
20039
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
20013
20040
|
);
|
|
20014
20041
|
}, [editor, updateToolbar]);
|
|
20015
|
-
(0,
|
|
20042
|
+
(0, import_react177.useEffect)(() => {
|
|
20016
20043
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20017
20044
|
requestAnimationFrame(() => {
|
|
20018
20045
|
editorState.read(() => {
|
|
@@ -20202,42 +20229,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
20202
20229
|
};
|
|
20203
20230
|
var RichTextToolbar_default = RichTextToolbar;
|
|
20204
20231
|
|
|
20205
|
-
// src/components/ParameterInputs/ParameterRichText.
|
|
20206
|
-
|
|
20207
|
-
var
|
|
20208
|
-
|
|
20209
|
-
labelLeadingIcon,
|
|
20210
|
-
hiddenLabel,
|
|
20211
|
-
id,
|
|
20212
|
-
errorMessage,
|
|
20213
|
-
caption,
|
|
20214
|
-
errorTestId,
|
|
20215
|
-
captionTestId,
|
|
20216
|
-
menuItems,
|
|
20217
|
-
children,
|
|
20218
|
-
...innerProps
|
|
20219
|
-
}) => {
|
|
20220
|
-
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
20221
|
-
ParameterShell,
|
|
20222
|
-
{
|
|
20223
|
-
"data-testid": "parameter-richtext",
|
|
20224
|
-
label: label2,
|
|
20225
|
-
hiddenLabel,
|
|
20226
|
-
labelLeadingIcon,
|
|
20227
|
-
id,
|
|
20228
|
-
errorMessage,
|
|
20229
|
-
caption,
|
|
20230
|
-
errorTestId,
|
|
20231
|
-
captionTestId,
|
|
20232
|
-
menuItems,
|
|
20233
|
-
children: [
|
|
20234
|
-
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ParameterRichTextInner, { ...innerProps, children }),
|
|
20235
|
-
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ParameterMenuButton, { label: `${label2} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_jsx_runtime144.Fragment, { children: menuItems }) }) : null
|
|
20236
|
-
]
|
|
20237
|
-
}
|
|
20238
|
-
);
|
|
20239
|
-
};
|
|
20240
|
-
var editorContainerWrapper = import_react176.css`
|
|
20232
|
+
// src/components/ParameterInputs/styles/ParameterRichText.styles.ts
|
|
20233
|
+
init_emotion_jsx_shim();
|
|
20234
|
+
var import_react178 = require("@emotion/react");
|
|
20235
|
+
var editorContainerWrapper = import_react178.css`
|
|
20241
20236
|
position: relative;
|
|
20242
20237
|
|
|
20243
20238
|
&::before {
|
|
@@ -20253,12 +20248,12 @@ var editorContainerWrapper = import_react176.css`
|
|
|
20253
20248
|
z-index: 2;
|
|
20254
20249
|
}
|
|
20255
20250
|
`;
|
|
20256
|
-
var editorWrapper =
|
|
20251
|
+
var editorWrapper = import_react178.css`
|
|
20257
20252
|
display: flex;
|
|
20258
20253
|
flex-flow: column;
|
|
20259
20254
|
flex-grow: 1;
|
|
20260
20255
|
`;
|
|
20261
|
-
var editorContainer =
|
|
20256
|
+
var editorContainer = import_react178.css`
|
|
20262
20257
|
${scrollbarStyles}
|
|
20263
20258
|
background: var(--white);
|
|
20264
20259
|
border-radius: var(--rounded-sm);
|
|
@@ -20290,7 +20285,7 @@ var editorContainer = import_react176.css`
|
|
|
20290
20285
|
max-height: unset;
|
|
20291
20286
|
}
|
|
20292
20287
|
`;
|
|
20293
|
-
var editorContainerOverflowWrapper =
|
|
20288
|
+
var editorContainerOverflowWrapper = import_react178.css`
|
|
20294
20289
|
overflow: hidden;
|
|
20295
20290
|
pointer-events: none;
|
|
20296
20291
|
|
|
@@ -20298,7 +20293,7 @@ var editorContainerOverflowWrapper = import_react176.css`
|
|
|
20298
20293
|
pointer-events: auto;
|
|
20299
20294
|
}
|
|
20300
20295
|
`;
|
|
20301
|
-
var editorPlaceholder =
|
|
20296
|
+
var editorPlaceholder = import_react178.css`
|
|
20302
20297
|
color: var(--gray-500);
|
|
20303
20298
|
font-style: italic;
|
|
20304
20299
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20309,7 +20304,7 @@ var editorPlaceholder = import_react176.css`
|
|
|
20309
20304
|
top: calc(1rem + var(--spacing-sm));
|
|
20310
20305
|
user-select: none;
|
|
20311
20306
|
`;
|
|
20312
|
-
var editorInput =
|
|
20307
|
+
var editorInput = import_react178.css`
|
|
20313
20308
|
min-height: 100%;
|
|
20314
20309
|
flex-grow: 1;
|
|
20315
20310
|
|
|
@@ -20318,6 +20313,42 @@ var editorInput = import_react176.css`
|
|
|
20318
20313
|
outline: none;
|
|
20319
20314
|
}
|
|
20320
20315
|
`;
|
|
20316
|
+
|
|
20317
|
+
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
20318
|
+
var import_jsx_runtime144 = require("@emotion/react/jsx-runtime");
|
|
20319
|
+
var ParameterRichText = ({
|
|
20320
|
+
label: label2,
|
|
20321
|
+
labelLeadingIcon,
|
|
20322
|
+
hiddenLabel,
|
|
20323
|
+
id,
|
|
20324
|
+
errorMessage,
|
|
20325
|
+
caption,
|
|
20326
|
+
errorTestId,
|
|
20327
|
+
captionTestId,
|
|
20328
|
+
menuItems,
|
|
20329
|
+
children,
|
|
20330
|
+
...innerProps
|
|
20331
|
+
}) => {
|
|
20332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
20333
|
+
ParameterShell,
|
|
20334
|
+
{
|
|
20335
|
+
"data-testid": "parameter-richtext",
|
|
20336
|
+
label: label2,
|
|
20337
|
+
hiddenLabel,
|
|
20338
|
+
labelLeadingIcon,
|
|
20339
|
+
id,
|
|
20340
|
+
errorMessage,
|
|
20341
|
+
caption,
|
|
20342
|
+
errorTestId,
|
|
20343
|
+
captionTestId,
|
|
20344
|
+
menuItems,
|
|
20345
|
+
children: [
|
|
20346
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ParameterRichTextInner, { ...innerProps, children }),
|
|
20347
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ParameterMenuButton, { label: `${label2} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_jsx_runtime144.Fragment, { children: menuItems }) }) : null
|
|
20348
|
+
]
|
|
20349
|
+
}
|
|
20350
|
+
);
|
|
20351
|
+
};
|
|
20321
20352
|
var ParameterRichTextInner = ({
|
|
20322
20353
|
value,
|
|
20323
20354
|
editorFooter,
|
|
@@ -20383,7 +20414,7 @@ var ParameterRichTextInner = ({
|
|
|
20383
20414
|
editable: !richTextProps.readOnly
|
|
20384
20415
|
};
|
|
20385
20416
|
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
|
|
20386
|
-
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(RichText, { ...richTextProps, children }) }) }),
|
|
20417
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { css: [editorWrapper, editorThemeStyles], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(RichText, { ...richTextProps, children }) }) }),
|
|
20387
20418
|
editorFooter ? editorFooter : null
|
|
20388
20419
|
] });
|
|
20389
20420
|
};
|
|
@@ -20413,12 +20444,12 @@ var RichText = ({
|
|
|
20413
20444
|
placeholder
|
|
20414
20445
|
}) => {
|
|
20415
20446
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
20416
|
-
(0,
|
|
20447
|
+
(0, import_react179.useEffect)(() => {
|
|
20417
20448
|
if (onRichTextInit) {
|
|
20418
20449
|
onRichTextInit(editor);
|
|
20419
20450
|
}
|
|
20420
20451
|
}, [editor, onRichTextInit]);
|
|
20421
|
-
(0,
|
|
20452
|
+
(0, import_react179.useEffect)(() => {
|
|
20422
20453
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
20423
20454
|
requestAnimationFrame(() => {
|
|
20424
20455
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -20435,16 +20466,16 @@ var RichText = ({
|
|
|
20435
20466
|
removeUpdateListener();
|
|
20436
20467
|
};
|
|
20437
20468
|
}, [editor, onChange]);
|
|
20438
|
-
(0,
|
|
20469
|
+
(0, import_react179.useEffect)(() => {
|
|
20439
20470
|
editor.setEditable(!readOnly);
|
|
20440
20471
|
}, [editor, readOnly]);
|
|
20441
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
20472
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react179.useState)(null);
|
|
20442
20473
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
20443
20474
|
if (_editorContainerRef !== null) {
|
|
20444
20475
|
setEditorContainerRef(_editorContainerRef);
|
|
20445
20476
|
}
|
|
20446
20477
|
};
|
|
20447
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
20478
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react179.useState)(null);
|
|
20448
20479
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
20449
20480
|
if (_portalContainerRef !== null) {
|
|
20450
20481
|
setPortalContainerRef(_portalContainerRef);
|
|
@@ -20522,15 +20553,15 @@ var RichText = ({
|
|
|
20522
20553
|
|
|
20523
20554
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20524
20555
|
init_emotion_jsx_shim();
|
|
20525
|
-
var
|
|
20556
|
+
var import_react180 = require("react");
|
|
20526
20557
|
var import_jsx_runtime145 = require("@emotion/react/jsx-runtime");
|
|
20527
|
-
var ParameterSelect = (0,
|
|
20558
|
+
var ParameterSelect = (0, import_react180.forwardRef)(
|
|
20528
20559
|
({ defaultOption, options, ...props }, ref) => {
|
|
20529
20560
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20530
20561
|
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20531
20562
|
}
|
|
20532
20563
|
);
|
|
20533
|
-
var ParameterSelectInner = (0,
|
|
20564
|
+
var ParameterSelectInner = (0, import_react180.forwardRef)(
|
|
20534
20565
|
({ defaultOption, options, ...props }, ref) => {
|
|
20535
20566
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20536
20567
|
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
@@ -20555,24 +20586,24 @@ var ParameterSelectInner = (0, import_react178.forwardRef)(
|
|
|
20555
20586
|
|
|
20556
20587
|
// src/components/ParameterInputs/ParameterSelectSlider.tsx
|
|
20557
20588
|
init_emotion_jsx_shim();
|
|
20558
|
-
var
|
|
20589
|
+
var import_react181 = require("react");
|
|
20559
20590
|
var import_jsx_runtime146 = require("@emotion/react/jsx-runtime");
|
|
20560
|
-
var ParameterSelectSlider = (0,
|
|
20591
|
+
var ParameterSelectSlider = (0, import_react181.forwardRef)(
|
|
20561
20592
|
(props, ref) => {
|
|
20562
20593
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20563
20594
|
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(ParameterShell, { "data-testid": "parameter-select-slider", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(ParameterSelectSliderInner, { ref, ...innerProps }) });
|
|
20564
20595
|
}
|
|
20565
20596
|
);
|
|
20566
|
-
var ParameterSelectSliderInner = (0,
|
|
20597
|
+
var ParameterSelectSliderInner = (0, import_react181.forwardRef)(({ options, value, onChange, ...props }, ref) => {
|
|
20567
20598
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20568
|
-
const numericValue = (0,
|
|
20599
|
+
const numericValue = (0, import_react181.useMemo)(() => {
|
|
20569
20600
|
if (value === void 0 || value === null || value === "") {
|
|
20570
20601
|
return void 0;
|
|
20571
20602
|
}
|
|
20572
20603
|
const index = options.findIndex((option) => option.value === value);
|
|
20573
20604
|
return index >= 0 ? index : void 0;
|
|
20574
20605
|
}, [options, value]);
|
|
20575
|
-
const handleChange = (0,
|
|
20606
|
+
const handleChange = (0, import_react181.useCallback)(
|
|
20576
20607
|
(newValue) => {
|
|
20577
20608
|
var _a;
|
|
20578
20609
|
if (newValue === void 0) {
|
|
@@ -20602,13 +20633,13 @@ ParameterSelectSliderInner.displayName = "ParameterSelectSliderInner";
|
|
|
20602
20633
|
|
|
20603
20634
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20604
20635
|
init_emotion_jsx_shim();
|
|
20605
|
-
var
|
|
20636
|
+
var import_react182 = require("react");
|
|
20606
20637
|
var import_jsx_runtime147 = require("@emotion/react/jsx-runtime");
|
|
20607
|
-
var ParameterTextarea = (0,
|
|
20638
|
+
var ParameterTextarea = (0, import_react182.forwardRef)((props, ref) => {
|
|
20608
20639
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20609
20640
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20610
20641
|
});
|
|
20611
|
-
var ParameterTextareaInner = (0,
|
|
20642
|
+
var ParameterTextareaInner = (0, import_react182.forwardRef)(({ ...props }, ref) => {
|
|
20612
20643
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20613
20644
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
20614
20645
|
"textarea",
|
|
@@ -20624,14 +20655,14 @@ var ParameterTextareaInner = (0, import_react180.forwardRef)(({ ...props }, ref)
|
|
|
20624
20655
|
|
|
20625
20656
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20626
20657
|
init_emotion_jsx_shim();
|
|
20627
|
-
var
|
|
20658
|
+
var import_react183 = require("react");
|
|
20628
20659
|
var import_jsx_runtime148 = require("@emotion/react/jsx-runtime");
|
|
20629
|
-
var ParameterToggle = (0,
|
|
20660
|
+
var ParameterToggle = (0, import_react183.forwardRef)((props, ref) => {
|
|
20630
20661
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20631
20662
|
return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20632
20663
|
});
|
|
20633
20664
|
ParameterToggle.displayName = "ParameterToggle";
|
|
20634
|
-
var ParameterToggleInner = (0,
|
|
20665
|
+
var ParameterToggleInner = (0, import_react183.forwardRef)(
|
|
20635
20666
|
({ children, ...props }, ref) => {
|
|
20636
20667
|
const { type, withoutIndeterminateState, ...otherProps } = props;
|
|
20637
20668
|
const { id, label: label2 } = useParameterShell();
|
|
@@ -20661,8 +20692,8 @@ init_emotion_jsx_shim();
|
|
|
20661
20692
|
|
|
20662
20693
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20663
20694
|
init_emotion_jsx_shim();
|
|
20664
|
-
var
|
|
20665
|
-
var container4 =
|
|
20695
|
+
var import_react184 = require("@emotion/react");
|
|
20696
|
+
var container4 = import_react184.css`
|
|
20666
20697
|
background: var(--gray-50);
|
|
20667
20698
|
margin-block: var(--spacing-sm);
|
|
20668
20699
|
position: relative;
|
|
@@ -20672,17 +20703,17 @@ var container4 = import_react182.css`
|
|
|
20672
20703
|
border: solid 1px var(--gray-300);
|
|
20673
20704
|
`;
|
|
20674
20705
|
var themeMap = {
|
|
20675
|
-
primary:
|
|
20706
|
+
primary: import_react184.css`
|
|
20676
20707
|
--progress-color: var(--accent-light);
|
|
20677
20708
|
`,
|
|
20678
|
-
secondary:
|
|
20709
|
+
secondary: import_react184.css`
|
|
20679
20710
|
--progress-color: var(--accent-alt-light);
|
|
20680
20711
|
`,
|
|
20681
|
-
destructive:
|
|
20712
|
+
destructive: import_react184.css`
|
|
20682
20713
|
--progress-color: var(--brand-secondary-5);
|
|
20683
20714
|
`
|
|
20684
20715
|
};
|
|
20685
|
-
var slidingBackgroundPosition =
|
|
20716
|
+
var slidingBackgroundPosition = import_react184.keyframes`
|
|
20686
20717
|
from {
|
|
20687
20718
|
background-position: 0 0;
|
|
20688
20719
|
}
|
|
@@ -20690,10 +20721,10 @@ var slidingBackgroundPosition = import_react182.keyframes`
|
|
|
20690
20721
|
background-position: 64px 0;
|
|
20691
20722
|
}
|
|
20692
20723
|
`;
|
|
20693
|
-
var determinate =
|
|
20724
|
+
var determinate = import_react184.css`
|
|
20694
20725
|
background-color: var(--progress-color);
|
|
20695
20726
|
`;
|
|
20696
|
-
var indeterminate =
|
|
20727
|
+
var indeterminate = import_react184.css`
|
|
20697
20728
|
background-image: linear-gradient(
|
|
20698
20729
|
45deg,
|
|
20699
20730
|
var(--progress-color) 25%,
|
|
@@ -20707,7 +20738,7 @@ var indeterminate = import_react182.css`
|
|
|
20707
20738
|
background-size: 64px 64px;
|
|
20708
20739
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
20709
20740
|
`;
|
|
20710
|
-
var bar =
|
|
20741
|
+
var bar = import_react184.css`
|
|
20711
20742
|
position: absolute;
|
|
20712
20743
|
inset: 0;
|
|
20713
20744
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20756,22 +20787,22 @@ function ProgressBar({
|
|
|
20756
20787
|
|
|
20757
20788
|
// src/components/ProgressList/ProgressList.tsx
|
|
20758
20789
|
init_emotion_jsx_shim();
|
|
20759
|
-
var
|
|
20790
|
+
var import_react186 = require("@emotion/react");
|
|
20760
20791
|
var import_CgCheckO4 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20761
20792
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20762
20793
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20763
|
-
var
|
|
20794
|
+
var import_react187 = require("react");
|
|
20764
20795
|
|
|
20765
20796
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20766
20797
|
init_emotion_jsx_shim();
|
|
20767
|
-
var
|
|
20768
|
-
var progressListStyles =
|
|
20798
|
+
var import_react185 = require("@emotion/react");
|
|
20799
|
+
var progressListStyles = import_react185.css`
|
|
20769
20800
|
display: flex;
|
|
20770
20801
|
flex-direction: column;
|
|
20771
20802
|
gap: var(--spacing-sm);
|
|
20772
20803
|
list-style-type: none;
|
|
20773
20804
|
`;
|
|
20774
|
-
var progressListItemStyles =
|
|
20805
|
+
var progressListItemStyles = import_react185.css`
|
|
20775
20806
|
display: flex;
|
|
20776
20807
|
gap: var(--spacing-base);
|
|
20777
20808
|
align-items: center;
|
|
@@ -20780,7 +20811,7 @@ var progressListItemStyles = import_react183.css`
|
|
|
20780
20811
|
// src/components/ProgressList/ProgressList.tsx
|
|
20781
20812
|
var import_jsx_runtime150 = require("@emotion/react/jsx-runtime");
|
|
20782
20813
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20783
|
-
const itemsWithStatus = (0,
|
|
20814
|
+
const itemsWithStatus = (0, import_react187.useMemo)(() => {
|
|
20784
20815
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20785
20816
|
return items.map((item, index) => {
|
|
20786
20817
|
let status = "queued";
|
|
@@ -20813,7 +20844,7 @@ var ProgressListItem = ({
|
|
|
20813
20844
|
errorLevel = "danger",
|
|
20814
20845
|
autoEllipsis = false
|
|
20815
20846
|
}) => {
|
|
20816
|
-
const icon = (0,
|
|
20847
|
+
const icon = (0, import_react187.useMemo)(() => {
|
|
20817
20848
|
if (error) {
|
|
20818
20849
|
return warningIcon;
|
|
20819
20850
|
}
|
|
@@ -20824,14 +20855,14 @@ var ProgressListItem = ({
|
|
|
20824
20855
|
};
|
|
20825
20856
|
return iconPerStatus[status];
|
|
20826
20857
|
}, [status, error]);
|
|
20827
|
-
const statusStyles = (0,
|
|
20858
|
+
const statusStyles = (0, import_react187.useMemo)(() => {
|
|
20828
20859
|
if (error) {
|
|
20829
|
-
return errorLevel === "caution" ?
|
|
20860
|
+
return errorLevel === "caution" ? import_react186.css`
|
|
20830
20861
|
color: rgb(161, 98, 7);
|
|
20831
20862
|
& svg {
|
|
20832
20863
|
color: rgb(250, 204, 21);
|
|
20833
20864
|
}
|
|
20834
|
-
` :
|
|
20865
|
+
` : import_react186.css`
|
|
20835
20866
|
color: rgb(185, 28, 28);
|
|
20836
20867
|
& svg {
|
|
20837
20868
|
color: var(--brand-primary-2);
|
|
@@ -20839,13 +20870,13 @@ var ProgressListItem = ({
|
|
|
20839
20870
|
`;
|
|
20840
20871
|
}
|
|
20841
20872
|
const colorPerStatus = {
|
|
20842
|
-
completed:
|
|
20873
|
+
completed: import_react186.css`
|
|
20843
20874
|
opacity: 0.75;
|
|
20844
20875
|
`,
|
|
20845
|
-
inProgress:
|
|
20876
|
+
inProgress: import_react186.css`
|
|
20846
20877
|
-webkit-text-stroke-width: thin;
|
|
20847
20878
|
`,
|
|
20848
|
-
queued:
|
|
20879
|
+
queued: import_react186.css`
|
|
20849
20880
|
opacity: 0.5;
|
|
20850
20881
|
`
|
|
20851
20882
|
};
|
|
@@ -20862,16 +20893,16 @@ var ProgressListItem = ({
|
|
|
20862
20893
|
|
|
20863
20894
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20864
20895
|
init_emotion_jsx_shim();
|
|
20865
|
-
var
|
|
20866
|
-
var
|
|
20896
|
+
var import_react189 = require("@emotion/react");
|
|
20897
|
+
var import_react190 = require("react");
|
|
20867
20898
|
|
|
20868
20899
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20869
20900
|
init_emotion_jsx_shim();
|
|
20870
|
-
var
|
|
20871
|
-
var segmentedControlRootStyles =
|
|
20901
|
+
var import_react188 = require("@emotion/react");
|
|
20902
|
+
var segmentedControlRootStyles = import_react188.css`
|
|
20872
20903
|
position: relative;
|
|
20873
20904
|
`;
|
|
20874
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
20905
|
+
var segmentedControlScrollIndicatorsStyles = import_react188.css`
|
|
20875
20906
|
position: absolute;
|
|
20876
20907
|
inset: 0;
|
|
20877
20908
|
z-index: 1;
|
|
@@ -20899,17 +20930,17 @@ var segmentedControlScrollIndicatorsStyles = import_react186.css`
|
|
|
20899
20930
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
20900
20931
|
}
|
|
20901
20932
|
`;
|
|
20902
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
20933
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react188.css`
|
|
20903
20934
|
&::before {
|
|
20904
20935
|
opacity: 1;
|
|
20905
20936
|
}
|
|
20906
20937
|
`;
|
|
20907
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
20938
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react188.css`
|
|
20908
20939
|
&::after {
|
|
20909
20940
|
opacity: 1;
|
|
20910
20941
|
}
|
|
20911
20942
|
`;
|
|
20912
|
-
var segmentedControlWrapperStyles =
|
|
20943
|
+
var segmentedControlWrapperStyles = import_react188.css`
|
|
20913
20944
|
overflow-y: auto;
|
|
20914
20945
|
scroll-behavior: smooth;
|
|
20915
20946
|
scrollbar-width: none;
|
|
@@ -20918,7 +20949,7 @@ var segmentedControlWrapperStyles = import_react186.css`
|
|
|
20918
20949
|
height: 0px;
|
|
20919
20950
|
}
|
|
20920
20951
|
`;
|
|
20921
|
-
var segmentedControlStyles =
|
|
20952
|
+
var segmentedControlStyles = import_react188.css`
|
|
20922
20953
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20923
20954
|
--segmented-control-border-width: 1px;
|
|
20924
20955
|
--segmented-control-selected-color: var(--accent-dark);
|
|
@@ -20938,14 +20969,14 @@ var segmentedControlStyles = import_react186.css`
|
|
|
20938
20969
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20939
20970
|
font-size: var(--fs-xs);
|
|
20940
20971
|
`;
|
|
20941
|
-
var segmentedControlVerticalStyles =
|
|
20972
|
+
var segmentedControlVerticalStyles = import_react188.css`
|
|
20942
20973
|
flex-direction: column;
|
|
20943
20974
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20944
20975
|
var(--segmented-control-rounded-value) 0 0;
|
|
20945
20976
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20946
20977
|
var(--segmented-control-rounded-value);
|
|
20947
20978
|
`;
|
|
20948
|
-
var segmentedControlItemStyles =
|
|
20979
|
+
var segmentedControlItemStyles = import_react188.css`
|
|
20949
20980
|
position: relative;
|
|
20950
20981
|
|
|
20951
20982
|
&:first-of-type label {
|
|
@@ -20971,10 +21002,10 @@ var segmentedControlItemStyles = import_react186.css`
|
|
|
20971
21002
|
box-shadow: var(--segmented-control-border-width) 0 0 0 transparent;
|
|
20972
21003
|
}
|
|
20973
21004
|
`;
|
|
20974
|
-
var segmentedControlInputStyles =
|
|
21005
|
+
var segmentedControlInputStyles = import_react188.css`
|
|
20975
21006
|
${accessibleHidden}
|
|
20976
21007
|
`;
|
|
20977
|
-
var segmentedControlLabelStyles =
|
|
21008
|
+
var segmentedControlLabelStyles = import_react188.css`
|
|
20978
21009
|
position: relative;
|
|
20979
21010
|
display: flex;
|
|
20980
21011
|
align-items: center;
|
|
@@ -21009,20 +21040,20 @@ var segmentedControlLabelStyles = import_react186.css`
|
|
|
21009
21040
|
background-color: var(--gray-400);
|
|
21010
21041
|
}
|
|
21011
21042
|
`;
|
|
21012
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21043
|
+
var segmentedControlLabelIconOnlyStyles = import_react188.css`
|
|
21013
21044
|
padding-inline: 0.5em;
|
|
21014
21045
|
`;
|
|
21015
|
-
var segmentedControlLabelCheckStyles =
|
|
21046
|
+
var segmentedControlLabelCheckStyles = import_react188.css`
|
|
21016
21047
|
opacity: 0.5;
|
|
21017
21048
|
`;
|
|
21018
|
-
var segmentedControlLabelContentStyles =
|
|
21049
|
+
var segmentedControlLabelContentStyles = import_react188.css`
|
|
21019
21050
|
display: flex;
|
|
21020
21051
|
align-items: center;
|
|
21021
21052
|
justify-content: center;
|
|
21022
21053
|
gap: var(--spacing-sm);
|
|
21023
21054
|
height: 100%;
|
|
21024
21055
|
`;
|
|
21025
|
-
var segmentedControlLabelTextStyles =
|
|
21056
|
+
var segmentedControlLabelTextStyles = import_react188.css`
|
|
21026
21057
|
white-space: nowrap;
|
|
21027
21058
|
`;
|
|
21028
21059
|
|
|
@@ -21043,10 +21074,10 @@ var SegmentedControl = ({
|
|
|
21043
21074
|
// deprecated, destructured to prevent spreading to DOM
|
|
21044
21075
|
...props
|
|
21045
21076
|
}) => {
|
|
21046
|
-
const wrapperRef = (0,
|
|
21047
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
21048
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
21049
|
-
const onOptionChange = (0,
|
|
21077
|
+
const wrapperRef = (0, import_react190.useRef)(null);
|
|
21078
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react190.useState)(false);
|
|
21079
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react190.useState)(false);
|
|
21080
|
+
const onOptionChange = (0, import_react190.useCallback)(
|
|
21050
21081
|
(event) => {
|
|
21051
21082
|
if (event.target.checked) {
|
|
21052
21083
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -21054,19 +21085,19 @@ var SegmentedControl = ({
|
|
|
21054
21085
|
},
|
|
21055
21086
|
[options, onChange]
|
|
21056
21087
|
);
|
|
21057
|
-
const sizeStyles = (0,
|
|
21088
|
+
const sizeStyles = (0, import_react190.useMemo)(() => {
|
|
21058
21089
|
const map = {
|
|
21059
|
-
sm: (0,
|
|
21060
|
-
md: (0,
|
|
21061
|
-
lg: (0,
|
|
21062
|
-
xl: (0,
|
|
21090
|
+
sm: (0, import_react189.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
21091
|
+
md: (0, import_react189.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
21092
|
+
lg: (0, import_react189.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
21093
|
+
xl: (0, import_react189.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
21063
21094
|
};
|
|
21064
21095
|
return map[size];
|
|
21065
21096
|
}, [size]);
|
|
21066
|
-
const isIconOnly = (0,
|
|
21097
|
+
const isIconOnly = (0, import_react190.useMemo)(() => {
|
|
21067
21098
|
return options.every((option) => option && option.icon && !option.label);
|
|
21068
21099
|
}, [options]);
|
|
21069
|
-
(0,
|
|
21100
|
+
(0, import_react190.useEffect)(() => {
|
|
21070
21101
|
const wrapperElement = wrapperRef.current;
|
|
21071
21102
|
const onScroll = () => {
|
|
21072
21103
|
if (!wrapperElement) {
|
|
@@ -21161,12 +21192,12 @@ init_emotion_jsx_shim();
|
|
|
21161
21192
|
|
|
21162
21193
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
21163
21194
|
init_emotion_jsx_shim();
|
|
21164
|
-
var
|
|
21165
|
-
var lightFadingOut =
|
|
21195
|
+
var import_react191 = require("@emotion/react");
|
|
21196
|
+
var lightFadingOut = import_react191.keyframes`
|
|
21166
21197
|
from { opacity: 0.1; }
|
|
21167
21198
|
to { opacity: 0.025; }
|
|
21168
21199
|
`;
|
|
21169
|
-
var skeletonStyles =
|
|
21200
|
+
var skeletonStyles = import_react191.css`
|
|
21170
21201
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
21171
21202
|
background-color: var(--gray-500);
|
|
21172
21203
|
`;
|
|
@@ -21204,12 +21235,12 @@ init_emotion_jsx_shim();
|
|
|
21204
21235
|
|
|
21205
21236
|
// src/components/Spinner/Spinner.tsx
|
|
21206
21237
|
init_emotion_jsx_shim();
|
|
21207
|
-
var
|
|
21238
|
+
var import_react193 = require("react");
|
|
21208
21239
|
|
|
21209
21240
|
// src/components/Spinner/Spinner.styles.ts
|
|
21210
21241
|
init_emotion_jsx_shim();
|
|
21211
|
-
var
|
|
21212
|
-
var SpinnerStyles =
|
|
21242
|
+
var import_react192 = require("@emotion/react");
|
|
21243
|
+
var SpinnerStyles = import_react192.css`
|
|
21213
21244
|
--color: #00b4ff;
|
|
21214
21245
|
--speed: 5s;
|
|
21215
21246
|
--red: rgb(218, 63, 50);
|
|
@@ -21645,8 +21676,8 @@ var Spinner = ({
|
|
|
21645
21676
|
label: label2,
|
|
21646
21677
|
isPaused
|
|
21647
21678
|
}) => {
|
|
21648
|
-
const ref = (0,
|
|
21649
|
-
(0,
|
|
21679
|
+
const ref = (0, import_react193.useRef)(null);
|
|
21680
|
+
(0, import_react193.useEffect)(() => {
|
|
21650
21681
|
var _a, _b, _c;
|
|
21651
21682
|
(_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
|
|
21652
21683
|
}, [width]);
|
|
@@ -21718,11 +21749,11 @@ init_emotion_jsx_shim();
|
|
|
21718
21749
|
|
|
21719
21750
|
// src/components/StackedModal/hooks/StackedModalProvider.tsx
|
|
21720
21751
|
init_emotion_jsx_shim();
|
|
21721
|
-
var
|
|
21752
|
+
var import_react194 = require("react");
|
|
21722
21753
|
var import_jsx_runtime154 = require("@emotion/react/jsx-runtime");
|
|
21723
|
-
var StackedModalContext = (0,
|
|
21754
|
+
var StackedModalContext = (0, import_react194.createContext)(null);
|
|
21724
21755
|
function useStackedModal() {
|
|
21725
|
-
const context = (0,
|
|
21756
|
+
const context = (0, import_react194.useContext)(StackedModalContext);
|
|
21726
21757
|
if (!context) {
|
|
21727
21758
|
throw new Error("useStackedModal must be used within a <StackedModal> component.");
|
|
21728
21759
|
}
|
|
@@ -21738,10 +21769,10 @@ function useStepTransition(index) {
|
|
|
21738
21769
|
};
|
|
21739
21770
|
}
|
|
21740
21771
|
function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
21741
|
-
const [currentStep, setCurrentStep] = (0,
|
|
21742
|
-
const [direction, setDirection] = (0,
|
|
21743
|
-
const previousStepRef = (0,
|
|
21744
|
-
const nextStep = (0,
|
|
21772
|
+
const [currentStep, setCurrentStep] = (0, import_react194.useState)(initialStep);
|
|
21773
|
+
const [direction, setDirection] = (0, import_react194.useState)("forward");
|
|
21774
|
+
const previousStepRef = (0, import_react194.useRef)(initialStep);
|
|
21775
|
+
const nextStep = (0, import_react194.useCallback)(() => {
|
|
21745
21776
|
setCurrentStep((prev) => {
|
|
21746
21777
|
if (prev >= totalSteps - 1) {
|
|
21747
21778
|
return prev;
|
|
@@ -21751,7 +21782,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21751
21782
|
return prev + 1;
|
|
21752
21783
|
});
|
|
21753
21784
|
}, [totalSteps]);
|
|
21754
|
-
const goBack = (0,
|
|
21785
|
+
const goBack = (0, import_react194.useCallback)(() => {
|
|
21755
21786
|
setCurrentStep((prev) => {
|
|
21756
21787
|
if (prev <= 0) {
|
|
21757
21788
|
return prev;
|
|
@@ -21761,7 +21792,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21761
21792
|
return prev - 1;
|
|
21762
21793
|
});
|
|
21763
21794
|
}, []);
|
|
21764
|
-
const goToStep = (0,
|
|
21795
|
+
const goToStep = (0, import_react194.useCallback)(
|
|
21765
21796
|
(index) => {
|
|
21766
21797
|
setCurrentStep((prev) => {
|
|
21767
21798
|
if (index < 0 || index >= totalSteps || index === prev) {
|
|
@@ -21774,7 +21805,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21774
21805
|
},
|
|
21775
21806
|
[totalSteps]
|
|
21776
21807
|
);
|
|
21777
|
-
const value = (0,
|
|
21808
|
+
const value = (0, import_react194.useMemo)(
|
|
21778
21809
|
() => ({
|
|
21779
21810
|
currentStep,
|
|
21780
21811
|
totalSteps,
|
|
@@ -21791,7 +21822,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21791
21822
|
|
|
21792
21823
|
// src/components/StackedModal/StackedModal.tsx
|
|
21793
21824
|
init_emotion_jsx_shim();
|
|
21794
|
-
var
|
|
21825
|
+
var import_react196 = __toESM(require("react"));
|
|
21795
21826
|
|
|
21796
21827
|
// src/components/StackedModal/AnimatedStepHeader.tsx
|
|
21797
21828
|
init_emotion_jsx_shim();
|
|
@@ -21801,13 +21832,13 @@ init_emotion_jsx_shim();
|
|
|
21801
21832
|
|
|
21802
21833
|
// src/components/StackedModal/styles/StackedModal.styles.ts
|
|
21803
21834
|
init_emotion_jsx_shim();
|
|
21804
|
-
var
|
|
21805
|
-
var stackedModalRootStyles =
|
|
21835
|
+
var import_react195 = require("@emotion/react");
|
|
21836
|
+
var stackedModalRootStyles = import_react195.css`
|
|
21806
21837
|
& > dialog > div {
|
|
21807
21838
|
background: var(--gray-50);
|
|
21808
21839
|
}
|
|
21809
21840
|
`;
|
|
21810
|
-
var slideInFromRight =
|
|
21841
|
+
var slideInFromRight = import_react195.keyframes`
|
|
21811
21842
|
from {
|
|
21812
21843
|
transform: translateX(100%);
|
|
21813
21844
|
opacity: 0;
|
|
@@ -21817,7 +21848,7 @@ var slideInFromRight = import_react193.keyframes`
|
|
|
21817
21848
|
opacity: 1;
|
|
21818
21849
|
}
|
|
21819
21850
|
`;
|
|
21820
|
-
var slideOutToLeft =
|
|
21851
|
+
var slideOutToLeft = import_react195.keyframes`
|
|
21821
21852
|
from {
|
|
21822
21853
|
transform: translateX(0);
|
|
21823
21854
|
opacity: 1;
|
|
@@ -21827,7 +21858,7 @@ var slideOutToLeft = import_react193.keyframes`
|
|
|
21827
21858
|
opacity: 0;
|
|
21828
21859
|
}
|
|
21829
21860
|
`;
|
|
21830
|
-
var slideInFromLeft =
|
|
21861
|
+
var slideInFromLeft = import_react195.keyframes`
|
|
21831
21862
|
from {
|
|
21832
21863
|
transform: translateX(-100%);
|
|
21833
21864
|
opacity: 0;
|
|
@@ -21837,7 +21868,7 @@ var slideInFromLeft = import_react193.keyframes`
|
|
|
21837
21868
|
opacity: 1;
|
|
21838
21869
|
}
|
|
21839
21870
|
`;
|
|
21840
|
-
var slideOutToRight =
|
|
21871
|
+
var slideOutToRight = import_react195.keyframes`
|
|
21841
21872
|
from {
|
|
21842
21873
|
transform: translateX(0);
|
|
21843
21874
|
opacity: 1;
|
|
@@ -21847,67 +21878,67 @@ var slideOutToRight = import_react193.keyframes`
|
|
|
21847
21878
|
opacity: 0;
|
|
21848
21879
|
}
|
|
21849
21880
|
`;
|
|
21850
|
-
var stepContainerStyles =
|
|
21881
|
+
var stepContainerStyles = import_react195.css`
|
|
21851
21882
|
position: relative;
|
|
21852
21883
|
flex: 1;
|
|
21853
21884
|
overflow: clip;
|
|
21854
21885
|
min-width: 0;
|
|
21855
21886
|
height: 100%;
|
|
21856
21887
|
`;
|
|
21857
|
-
var stepBaseStyles =
|
|
21888
|
+
var stepBaseStyles = import_react195.css`
|
|
21858
21889
|
position: absolute;
|
|
21859
21890
|
inset: 0;
|
|
21860
21891
|
display: flex;
|
|
21861
21892
|
flex-direction: column;
|
|
21862
21893
|
gap: var(--spacing-base);
|
|
21863
21894
|
`;
|
|
21864
|
-
var stepActiveStyles =
|
|
21895
|
+
var stepActiveStyles = import_react195.css`
|
|
21865
21896
|
visibility: visible;
|
|
21866
21897
|
`;
|
|
21867
|
-
var stepInactiveStyles =
|
|
21898
|
+
var stepInactiveStyles = import_react195.css`
|
|
21868
21899
|
visibility: hidden;
|
|
21869
21900
|
`;
|
|
21870
|
-
var stepEnterForwardStyles =
|
|
21901
|
+
var stepEnterForwardStyles = import_react195.css`
|
|
21871
21902
|
animation: ${slideInFromRight} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21872
21903
|
|
|
21873
21904
|
${prefersReducedMotion("reduce")} {
|
|
21874
21905
|
animation: none;
|
|
21875
21906
|
}
|
|
21876
21907
|
`;
|
|
21877
|
-
var stepExitForwardStyles =
|
|
21908
|
+
var stepExitForwardStyles = import_react195.css`
|
|
21878
21909
|
animation: ${slideOutToLeft} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21879
21910
|
|
|
21880
21911
|
${prefersReducedMotion("reduce")} {
|
|
21881
21912
|
animation: none;
|
|
21882
21913
|
}
|
|
21883
21914
|
`;
|
|
21884
|
-
var stepEnterBackwardStyles =
|
|
21915
|
+
var stepEnterBackwardStyles = import_react195.css`
|
|
21885
21916
|
animation: ${slideInFromLeft} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21886
21917
|
|
|
21887
21918
|
${prefersReducedMotion("reduce")} {
|
|
21888
21919
|
animation: none;
|
|
21889
21920
|
}
|
|
21890
21921
|
`;
|
|
21891
|
-
var stepExitBackwardStyles =
|
|
21922
|
+
var stepExitBackwardStyles = import_react195.css`
|
|
21892
21923
|
animation: ${slideOutToRight} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21893
21924
|
|
|
21894
21925
|
${prefersReducedMotion("reduce")} {
|
|
21895
21926
|
animation: none;
|
|
21896
21927
|
}
|
|
21897
21928
|
`;
|
|
21898
|
-
var headerContainerStyles =
|
|
21929
|
+
var headerContainerStyles = import_react195.css`
|
|
21899
21930
|
position: relative;
|
|
21900
21931
|
overflow: hidden;
|
|
21901
21932
|
flex: 1;
|
|
21902
21933
|
`;
|
|
21903
|
-
var headerItemStyles = (isActive) =>
|
|
21934
|
+
var headerItemStyles = (isActive) => import_react195.css`
|
|
21904
21935
|
position: ${isActive ? "relative" : "absolute"};
|
|
21905
21936
|
inset: 0;
|
|
21906
21937
|
white-space: nowrap;
|
|
21907
21938
|
overflow: hidden;
|
|
21908
21939
|
text-overflow: ellipsis;
|
|
21909
21940
|
`;
|
|
21910
|
-
var stepContentStyles =
|
|
21941
|
+
var stepContentStyles = import_react195.css`
|
|
21911
21942
|
position: relative;
|
|
21912
21943
|
flex: 1;
|
|
21913
21944
|
overflow: auto;
|
|
@@ -21981,18 +22012,18 @@ function StackedModalStep({ children, buttonGroup }) {
|
|
|
21981
22012
|
// src/components/StackedModal/StackedModal.tsx
|
|
21982
22013
|
var import_jsx_runtime157 = require("@emotion/react/jsx-runtime");
|
|
21983
22014
|
function filterSteps(children) {
|
|
21984
|
-
return
|
|
21985
|
-
(child) =>
|
|
22015
|
+
return import_react196.default.Children.toArray(children).filter(
|
|
22016
|
+
(child) => import_react196.default.isValidElement(child) && child.type === StackedModalStep
|
|
21986
22017
|
);
|
|
21987
22018
|
}
|
|
21988
|
-
var StackedModal =
|
|
22019
|
+
var StackedModal = import_react196.default.forwardRef(
|
|
21989
22020
|
({ children, initialStep = 0, ...rest }, ref) => {
|
|
21990
22021
|
const steps = filterSteps(children);
|
|
21991
22022
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(StackedModalProvider, { totalSteps: steps.length, initialStep, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(StackedModalInner, { ref, steps, ...rest }) });
|
|
21992
22023
|
}
|
|
21993
22024
|
);
|
|
21994
22025
|
StackedModal.displayName = "StackedModal";
|
|
21995
|
-
var StackedModalInner =
|
|
22026
|
+
var StackedModalInner = import_react196.default.forwardRef(
|
|
21996
22027
|
({ steps, onRequestClose, modalSize = "lg", width, height, "data-testid": dataTestId }, ref) => {
|
|
21997
22028
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { css: stackedModalRootStyles, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
21998
22029
|
Modal,
|
|
@@ -22034,12 +22065,12 @@ var StackedModalHeader = ({ children, onBack, icon = import_CgChevronLeft3.CgChe
|
|
|
22034
22065
|
|
|
22035
22066
|
// src/components/Switch/Switch.tsx
|
|
22036
22067
|
init_emotion_jsx_shim();
|
|
22037
|
-
var
|
|
22068
|
+
var import_react198 = require("react");
|
|
22038
22069
|
|
|
22039
22070
|
// src/components/Switch/Switch.styles.ts
|
|
22040
22071
|
init_emotion_jsx_shim();
|
|
22041
|
-
var
|
|
22042
|
-
var SwitchInputContainer =
|
|
22072
|
+
var import_react197 = require("@emotion/react");
|
|
22073
|
+
var SwitchInputContainer = import_react197.css`
|
|
22043
22074
|
cursor: pointer;
|
|
22044
22075
|
display: inline-flex;
|
|
22045
22076
|
position: relative;
|
|
@@ -22049,7 +22080,7 @@ var SwitchInputContainer = import_react195.css`
|
|
|
22049
22080
|
user-select: none;
|
|
22050
22081
|
z-index: 0;
|
|
22051
22082
|
`;
|
|
22052
|
-
var SwitchInput = (size) =>
|
|
22083
|
+
var SwitchInput = (size) => import_react197.css`
|
|
22053
22084
|
appearance: none;
|
|
22054
22085
|
border-radius: var(--rounded-full);
|
|
22055
22086
|
background-color: var(--white);
|
|
@@ -22100,18 +22131,18 @@ var SwitchInput = (size) => import_react195.css`
|
|
|
22100
22131
|
cursor: not-allowed;
|
|
22101
22132
|
}
|
|
22102
22133
|
`;
|
|
22103
|
-
var SwitchInputCheckedDirectionLeft =
|
|
22134
|
+
var SwitchInputCheckedDirectionLeft = import_react197.css`
|
|
22104
22135
|
&:checked {
|
|
22105
22136
|
transform: translateX(var(--spacing-base));
|
|
22106
22137
|
}
|
|
22107
22138
|
`;
|
|
22108
|
-
var SwitchInputCheckedDirectionRight =
|
|
22139
|
+
var SwitchInputCheckedDirectionRight = import_react197.css`
|
|
22109
22140
|
transform: translateX(-var(--spacing-base));
|
|
22110
22141
|
&:checked {
|
|
22111
22142
|
transform: translateX(0);
|
|
22112
22143
|
}
|
|
22113
22144
|
`;
|
|
22114
|
-
var SwitchInputDisabled =
|
|
22145
|
+
var SwitchInputDisabled = import_react197.css`
|
|
22115
22146
|
opacity: var(--opacity-50);
|
|
22116
22147
|
cursor: not-allowed;
|
|
22117
22148
|
|
|
@@ -22119,19 +22150,19 @@ var SwitchInputDisabled = import_react195.css`
|
|
|
22119
22150
|
cursor: not-allowed;
|
|
22120
22151
|
}
|
|
22121
22152
|
`;
|
|
22122
|
-
var SwitchInputLabelAlignmentLeft = (size) =>
|
|
22153
|
+
var SwitchInputLabelAlignmentLeft = (size) => import_react197.css`
|
|
22123
22154
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22124
22155
|
&:before {
|
|
22125
22156
|
left: 0;
|
|
22126
22157
|
}
|
|
22127
22158
|
`;
|
|
22128
|
-
var SwitchInputLabelAlignmentRight = (size) =>
|
|
22159
|
+
var SwitchInputLabelAlignmentRight = (size) => import_react197.css`
|
|
22129
22160
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22130
22161
|
&:before {
|
|
22131
22162
|
right: 0;
|
|
22132
22163
|
}
|
|
22133
22164
|
`;
|
|
22134
|
-
var SwitchInputLabel = (size) =>
|
|
22165
|
+
var SwitchInputLabel = (size) => import_react197.css`
|
|
22135
22166
|
align-items: center;
|
|
22136
22167
|
color: var(--typography-base);
|
|
22137
22168
|
display: inline-flex;
|
|
@@ -22152,26 +22183,26 @@ var SwitchInputLabel = (size) => import_react195.css`
|
|
|
22152
22183
|
top: 0;
|
|
22153
22184
|
}
|
|
22154
22185
|
`;
|
|
22155
|
-
var SwitchTextAlignmentLeft = (size) =>
|
|
22186
|
+
var SwitchTextAlignmentLeft = (size) => import_react197.css`
|
|
22156
22187
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22157
22188
|
`;
|
|
22158
|
-
var SwitchTextAlignmentRight = (size) =>
|
|
22189
|
+
var SwitchTextAlignmentRight = (size) => import_react197.css`
|
|
22159
22190
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22160
22191
|
`;
|
|
22161
|
-
var SwitchText =
|
|
22192
|
+
var SwitchText = import_react197.css`
|
|
22162
22193
|
color: var(--gray-500);
|
|
22163
22194
|
font-size: var(--fs-sm);
|
|
22164
22195
|
`;
|
|
22165
|
-
var SwitchInputContainerAlignmentLeft =
|
|
22196
|
+
var SwitchInputContainerAlignmentLeft = import_react197.css`
|
|
22166
22197
|
flex-direction: row;
|
|
22167
22198
|
`;
|
|
22168
|
-
var SwitchInputContainerAlignmentRight =
|
|
22199
|
+
var SwitchInputContainerAlignmentRight = import_react197.css`
|
|
22169
22200
|
flex-direction: row-reverse;
|
|
22170
22201
|
`;
|
|
22171
22202
|
|
|
22172
22203
|
// src/components/Switch/Switch.tsx
|
|
22173
22204
|
var import_jsx_runtime159 = require("@emotion/react/jsx-runtime");
|
|
22174
|
-
var Switch = (0,
|
|
22205
|
+
var Switch = (0, import_react198.forwardRef)(
|
|
22175
22206
|
({
|
|
22176
22207
|
label: label2,
|
|
22177
22208
|
infoText,
|
|
@@ -22182,7 +22213,7 @@ var Switch = (0, import_react196.forwardRef)(
|
|
|
22182
22213
|
...inputProps
|
|
22183
22214
|
}, ref) => {
|
|
22184
22215
|
let additionalText = infoText;
|
|
22185
|
-
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0,
|
|
22216
|
+
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0, import_react198.useMemo)(() => {
|
|
22186
22217
|
if (alignment === "left") {
|
|
22187
22218
|
return {
|
|
22188
22219
|
SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
|
|
@@ -22243,8 +22274,8 @@ init_emotion_jsx_shim();
|
|
|
22243
22274
|
|
|
22244
22275
|
// src/components/Table/Table.styles.ts
|
|
22245
22276
|
init_emotion_jsx_shim();
|
|
22246
|
-
var
|
|
22247
|
-
var table = ({ cellPadding = "var(--spacing-sm)" }) =>
|
|
22277
|
+
var import_react199 = require("@emotion/react");
|
|
22278
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react199.css`
|
|
22248
22279
|
border-bottom: 1px solid var(--gray-400);
|
|
22249
22280
|
border-collapse: collapse;
|
|
22250
22281
|
min-width: 100%;
|
|
@@ -22264,21 +22295,21 @@ var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react197.css`
|
|
|
22264
22295
|
background-color: var(--gray-50);
|
|
22265
22296
|
}
|
|
22266
22297
|
`;
|
|
22267
|
-
var tableHead =
|
|
22298
|
+
var tableHead = import_react199.css`
|
|
22268
22299
|
color: var(--typography-base);
|
|
22269
22300
|
text-align: left;
|
|
22270
22301
|
`;
|
|
22271
|
-
var tableRow =
|
|
22302
|
+
var tableRow = import_react199.css`
|
|
22272
22303
|
border-bottom: 1px solid var(--gray-200);
|
|
22273
22304
|
font-size: var(--fs-sm);
|
|
22274
22305
|
`;
|
|
22275
|
-
var tableCellHead =
|
|
22306
|
+
var tableCellHead = import_react199.css`
|
|
22276
22307
|
font-size: var(--fs-sm);
|
|
22277
22308
|
font-weight: var(--fw-regular);
|
|
22278
22309
|
line-height: 1.2;
|
|
22279
22310
|
}
|
|
22280
22311
|
`;
|
|
22281
|
-
var responsiveTableContainer =
|
|
22312
|
+
var responsiveTableContainer = import_react199.css`
|
|
22282
22313
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
22283
22314
|
overflow-x: auto;
|
|
22284
22315
|
${scrollbarStyles}
|
|
@@ -22345,12 +22376,12 @@ var TableCellData = React26.forwardRef(
|
|
|
22345
22376
|
// src/components/Tabs/Tabs.tsx
|
|
22346
22377
|
init_emotion_jsx_shim();
|
|
22347
22378
|
var import_tabs = require("@base-ui/react/tabs");
|
|
22348
|
-
var
|
|
22379
|
+
var import_react201 = require("react");
|
|
22349
22380
|
|
|
22350
22381
|
// src/components/Tabs/Tabs.styles.ts
|
|
22351
22382
|
init_emotion_jsx_shim();
|
|
22352
|
-
var
|
|
22353
|
-
var tabButtonStyles =
|
|
22383
|
+
var import_react200 = require("@emotion/react");
|
|
22384
|
+
var tabButtonStyles = import_react200.css`
|
|
22354
22385
|
align-items: center;
|
|
22355
22386
|
border: 0;
|
|
22356
22387
|
height: 2.5rem;
|
|
@@ -22367,7 +22398,7 @@ var tabButtonStyles = import_react198.css`
|
|
|
22367
22398
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
22368
22399
|
}
|
|
22369
22400
|
`;
|
|
22370
|
-
var tabButtonGroupStyles =
|
|
22401
|
+
var tabButtonGroupStyles = import_react200.css`
|
|
22371
22402
|
display: flex;
|
|
22372
22403
|
gap: var(--spacing-base);
|
|
22373
22404
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -22375,16 +22406,16 @@ var tabButtonGroupStyles = import_react198.css`
|
|
|
22375
22406
|
|
|
22376
22407
|
// src/components/Tabs/Tabs.tsx
|
|
22377
22408
|
var import_jsx_runtime162 = require("@emotion/react/jsx-runtime");
|
|
22378
|
-
var TabsContext = (0,
|
|
22409
|
+
var TabsContext = (0, import_react201.createContext)(null);
|
|
22379
22410
|
var useCurrentTab = () => {
|
|
22380
|
-
const context = (0,
|
|
22411
|
+
const context = (0, import_react201.useContext)(TabsContext);
|
|
22381
22412
|
if (!context) {
|
|
22382
22413
|
throw new Error("This component can only be used inside <Tabs>");
|
|
22383
22414
|
}
|
|
22384
22415
|
return context;
|
|
22385
22416
|
};
|
|
22386
|
-
var ManualContext = (0,
|
|
22387
|
-
var TabRegistrationContext = (0,
|
|
22417
|
+
var ManualContext = (0, import_react201.createContext)(false);
|
|
22418
|
+
var TabRegistrationContext = (0, import_react201.createContext)(null);
|
|
22388
22419
|
var Tabs = ({
|
|
22389
22420
|
children,
|
|
22390
22421
|
onSelectedIdChange,
|
|
@@ -22395,14 +22426,14 @@ var Tabs = ({
|
|
|
22395
22426
|
className,
|
|
22396
22427
|
style
|
|
22397
22428
|
}) => {
|
|
22398
|
-
const selected = (0,
|
|
22429
|
+
const selected = (0, import_react201.useMemo)(() => {
|
|
22399
22430
|
if (selectedId) return selectedId;
|
|
22400
22431
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
22401
22432
|
}, [selectedId, useHashForState]);
|
|
22402
22433
|
const isControlled = selected !== void 0;
|
|
22403
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
22404
|
-
const firstTabRegistered = (0,
|
|
22405
|
-
const registerTab = (0,
|
|
22434
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react201.useState)(void 0);
|
|
22435
|
+
const firstTabRegistered = (0, import_react201.useRef)(false);
|
|
22436
|
+
const registerTab = (0, import_react201.useCallback)(
|
|
22406
22437
|
(value) => {
|
|
22407
22438
|
if (!firstTabRegistered.current) {
|
|
22408
22439
|
firstTabRegistered.current = true;
|
|
@@ -22414,7 +22445,7 @@ var Tabs = ({
|
|
|
22414
22445
|
[isControlled]
|
|
22415
22446
|
);
|
|
22416
22447
|
const currentValue = isControlled ? selected : uncontrolledValue;
|
|
22417
|
-
const onTabSelect = (0,
|
|
22448
|
+
const onTabSelect = (0, import_react201.useCallback)(
|
|
22418
22449
|
(value) => {
|
|
22419
22450
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
22420
22451
|
if (!isControlled) {
|
|
@@ -22428,7 +22459,7 @@ var Tabs = ({
|
|
|
22428
22459
|
},
|
|
22429
22460
|
[isControlled, onSelectedIdChange, useHashForState]
|
|
22430
22461
|
);
|
|
22431
|
-
const tabsContextValue = (0,
|
|
22462
|
+
const tabsContextValue = (0, import_react201.useMemo)(
|
|
22432
22463
|
() => ({
|
|
22433
22464
|
value: currentValue,
|
|
22434
22465
|
setValue: (v) => onTabSelect(v)
|
|
@@ -22448,7 +22479,7 @@ var Tabs = ({
|
|
|
22448
22479
|
) }) }) });
|
|
22449
22480
|
};
|
|
22450
22481
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
22451
|
-
const manual = (0,
|
|
22482
|
+
const manual = (0, import_react201.useContext)(ManualContext);
|
|
22452
22483
|
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_tabs.Tabs.List, { activateOnFocus: !manual, ...props, css: tabButtonGroupStyles, children });
|
|
22453
22484
|
};
|
|
22454
22485
|
var TabButton = ({
|
|
@@ -22456,8 +22487,8 @@ var TabButton = ({
|
|
|
22456
22487
|
id,
|
|
22457
22488
|
...props
|
|
22458
22489
|
}) => {
|
|
22459
|
-
const registration = (0,
|
|
22460
|
-
(0,
|
|
22490
|
+
const registration = (0, import_react201.useContext)(TabRegistrationContext);
|
|
22491
|
+
(0, import_react201.useEffect)(() => {
|
|
22461
22492
|
registration == null ? void 0 : registration.registerTab(id);
|
|
22462
22493
|
}, []);
|
|
22463
22494
|
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_tabs.Tabs.Tab, { type: "button", value: id, "data-tab-id": id, ...props, css: tabButtonStyles, children });
|
|
@@ -22479,8 +22510,8 @@ init_emotion_jsx_shim();
|
|
|
22479
22510
|
|
|
22480
22511
|
// src/components/Validation/StatusBullet.styles.ts
|
|
22481
22512
|
init_emotion_jsx_shim();
|
|
22482
|
-
var
|
|
22483
|
-
var StatusBulletContainer =
|
|
22513
|
+
var import_react202 = require("@emotion/react");
|
|
22514
|
+
var StatusBulletContainer = import_react202.css`
|
|
22484
22515
|
align-items: center;
|
|
22485
22516
|
align-self: center;
|
|
22486
22517
|
color: var(--gray-500);
|
|
@@ -22496,33 +22527,33 @@ var StatusBulletContainer = import_react200.css`
|
|
|
22496
22527
|
display: block;
|
|
22497
22528
|
}
|
|
22498
22529
|
`;
|
|
22499
|
-
var StatusBulletBase =
|
|
22530
|
+
var StatusBulletBase = import_react202.css`
|
|
22500
22531
|
font-size: var(--fs-sm);
|
|
22501
22532
|
&:before {
|
|
22502
22533
|
width: var(--fs-xs);
|
|
22503
22534
|
height: var(--fs-xs);
|
|
22504
22535
|
}
|
|
22505
22536
|
`;
|
|
22506
|
-
var StatusBulletSmall =
|
|
22537
|
+
var StatusBulletSmall = import_react202.css`
|
|
22507
22538
|
font-size: var(--fs-xs);
|
|
22508
22539
|
&:before {
|
|
22509
22540
|
width: var(--fs-xxs);
|
|
22510
22541
|
height: var(--fs-xxs);
|
|
22511
22542
|
}
|
|
22512
22543
|
`;
|
|
22513
|
-
var StatusDraft =
|
|
22544
|
+
var StatusDraft = import_react202.css`
|
|
22514
22545
|
&:before {
|
|
22515
22546
|
background: var(--white);
|
|
22516
22547
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22517
22548
|
}
|
|
22518
22549
|
`;
|
|
22519
|
-
var StatusModified =
|
|
22550
|
+
var StatusModified = import_react202.css`
|
|
22520
22551
|
&:before {
|
|
22521
22552
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
22522
22553
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22523
22554
|
}
|
|
22524
22555
|
`;
|
|
22525
|
-
var StatusError =
|
|
22556
|
+
var StatusError = import_react202.css`
|
|
22526
22557
|
color: var(--error);
|
|
22527
22558
|
&:before {
|
|
22528
22559
|
/* TODO: replace this with an svg icon */
|
|
@@ -22535,22 +22566,22 @@ var StatusError = import_react200.css`
|
|
|
22535
22566
|
);
|
|
22536
22567
|
}
|
|
22537
22568
|
`;
|
|
22538
|
-
var StatusPublished =
|
|
22569
|
+
var StatusPublished = import_react202.css`
|
|
22539
22570
|
&:before {
|
|
22540
22571
|
background: var(--accent-dark);
|
|
22541
22572
|
}
|
|
22542
22573
|
`;
|
|
22543
|
-
var StatusOrphan =
|
|
22574
|
+
var StatusOrphan = import_react202.css`
|
|
22544
22575
|
&:before {
|
|
22545
22576
|
background: var(--brand-secondary-5);
|
|
22546
22577
|
}
|
|
22547
22578
|
`;
|
|
22548
|
-
var StatusUnknown =
|
|
22579
|
+
var StatusUnknown = import_react202.css`
|
|
22549
22580
|
&:before {
|
|
22550
22581
|
background: var(--gray-800);
|
|
22551
22582
|
}
|
|
22552
22583
|
`;
|
|
22553
|
-
var StatusDeleted =
|
|
22584
|
+
var StatusDeleted = import_react202.css`
|
|
22554
22585
|
&:before {
|
|
22555
22586
|
background: var(--error);
|
|
22556
22587
|
}
|