@uniformdev/design-system 20.50.2-alpha.109 → 20.50.2-alpha.146
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;
|
|
@@ -1633,10 +1634,12 @@ __export(src_exports, {
|
|
|
1633
1634
|
input: () => input,
|
|
1634
1635
|
inputError: () => inputError,
|
|
1635
1636
|
inputSelect: () => inputSelect,
|
|
1637
|
+
isNativeButtonTrigger: () => isNativeButtonTrigger,
|
|
1636
1638
|
isSecureURL: () => isSecureURL,
|
|
1637
1639
|
isValidUrl: () => isValidUrl,
|
|
1638
1640
|
jsonIcon: () => jsonIcon,
|
|
1639
1641
|
labelText: () => labelText,
|
|
1642
|
+
markNativeButton: () => markNativeButton,
|
|
1640
1643
|
mq: () => mq,
|
|
1641
1644
|
numberInput: () => numberInput,
|
|
1642
1645
|
popTopLayerDialog: () => popTopLayerDialog,
|
|
@@ -2634,6 +2637,64 @@ var BetaDecorator = (Story) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Ver
|
|
|
2634
2637
|
// src/utils/index.ts
|
|
2635
2638
|
init_emotion_jsx_shim();
|
|
2636
2639
|
|
|
2640
|
+
// src/components/utils/nativeButton.ts
|
|
2641
|
+
init_emotion_jsx_shim();
|
|
2642
|
+
var React2 = __toESM(require("react"));
|
|
2643
|
+
|
|
2644
|
+
// src/components/utils/suppressBaseUiNativeButtonWarning.ts
|
|
2645
|
+
init_emotion_jsx_shim();
|
|
2646
|
+
var NATIVE_BUTTON_WARNING_MARKER = "acts as a button expected";
|
|
2647
|
+
var INSTALLED_FLAG = Symbol.for("uniform.designSystem.baseUiNativeButtonWarningFilterInstalled");
|
|
2648
|
+
function installBaseUiNativeButtonWarningFilter() {
|
|
2649
|
+
if (process.env.NODE_ENV === "production") {
|
|
2650
|
+
return;
|
|
2651
|
+
}
|
|
2652
|
+
const globalScope = globalThis;
|
|
2653
|
+
if (globalScope[INSTALLED_FLAG]) {
|
|
2654
|
+
return;
|
|
2655
|
+
}
|
|
2656
|
+
globalScope[INSTALLED_FLAG] = true;
|
|
2657
|
+
const originalConsoleError = console.error;
|
|
2658
|
+
console.error = function filteredConsoleError(...args) {
|
|
2659
|
+
if (typeof args[0] === "string" && args[0].includes(NATIVE_BUTTON_WARNING_MARKER)) {
|
|
2660
|
+
return;
|
|
2661
|
+
}
|
|
2662
|
+
originalConsoleError.apply(console, args);
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
// src/components/utils/nativeButton.ts
|
|
2667
|
+
installBaseUiNativeButtonWarningFilter();
|
|
2668
|
+
function markNativeButton(component) {
|
|
2669
|
+
component.renderNativeButton = true;
|
|
2670
|
+
return component;
|
|
2671
|
+
}
|
|
2672
|
+
function isNativeButtonTrigger(element) {
|
|
2673
|
+
if (!React2.isValidElement(element)) {
|
|
2674
|
+
return false;
|
|
2675
|
+
}
|
|
2676
|
+
if (element.type === "button") {
|
|
2677
|
+
return true;
|
|
2678
|
+
}
|
|
2679
|
+
if (typeof element.type !== "string") {
|
|
2680
|
+
if (element.type.renderNativeButton) {
|
|
2681
|
+
return true;
|
|
2682
|
+
}
|
|
2683
|
+
const props = element.props;
|
|
2684
|
+
if ((props == null ? void 0 : props.type) === "button") {
|
|
2685
|
+
return true;
|
|
2686
|
+
}
|
|
2687
|
+
const emotionType = props == null ? void 0 : props.__EMOTION_TYPE_PLEASE_DO_NOT_USE__;
|
|
2688
|
+
if (emotionType === "button") {
|
|
2689
|
+
return true;
|
|
2690
|
+
}
|
|
2691
|
+
if (emotionType && typeof emotionType !== "string" && emotionType.renderNativeButton) {
|
|
2692
|
+
return true;
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
return false;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2637
2698
|
// src/utils/debounce.ts
|
|
2638
2699
|
init_emotion_jsx_shim();
|
|
2639
2700
|
var debounce = (fn, ms = 300) => {
|
|
@@ -4960,32 +5021,6 @@ function Tooltip({
|
|
|
4960
5021
|
] });
|
|
4961
5022
|
}
|
|
4962
5023
|
|
|
4963
|
-
// src/components/utils/nativeButton.ts
|
|
4964
|
-
init_emotion_jsx_shim();
|
|
4965
|
-
var React4 = __toESM(require("react"));
|
|
4966
|
-
function markNativeButton(component) {
|
|
4967
|
-
component.renderNativeButton = true;
|
|
4968
|
-
return component;
|
|
4969
|
-
}
|
|
4970
|
-
function isNativeButtonTrigger(element) {
|
|
4971
|
-
var _a;
|
|
4972
|
-
if (!React4.isValidElement(element)) {
|
|
4973
|
-
return false;
|
|
4974
|
-
}
|
|
4975
|
-
if (element.type === "button") {
|
|
4976
|
-
return true;
|
|
4977
|
-
}
|
|
4978
|
-
if (typeof element.type !== "string") {
|
|
4979
|
-
if (element.type.renderNativeButton) {
|
|
4980
|
-
return true;
|
|
4981
|
-
}
|
|
4982
|
-
if (((_a = element.props) == null ? void 0 : _a.type) === "button") {
|
|
4983
|
-
return true;
|
|
4984
|
-
}
|
|
4985
|
-
}
|
|
4986
|
-
return false;
|
|
4987
|
-
}
|
|
4988
|
-
|
|
4989
5024
|
// src/components/Button/hooks/useButtonStyles.ts
|
|
4990
5025
|
init_emotion_jsx_shim();
|
|
4991
5026
|
var btnSize = {
|
|
@@ -6993,7 +7028,15 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
6993
7028
|
);
|
|
6994
7029
|
if (isNested) {
|
|
6995
7030
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_menu.Menu.SubmenuRoot, { open: controlledOpen, onOpenChange: handleOpenChange, disabled: disabled2, children: [
|
|
6996
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SubmenuTriggerModeContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
7031
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SubmenuTriggerModeContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
7032
|
+
import_menu.Menu.SubmenuTrigger,
|
|
7033
|
+
{
|
|
7034
|
+
render: submenuTriggerElement,
|
|
7035
|
+
disabled: disabled2,
|
|
7036
|
+
closeDelay: 100,
|
|
7037
|
+
nativeButton: isNativeButtonTrigger(submenuTriggerElement)
|
|
7038
|
+
}
|
|
7039
|
+
) }),
|
|
6997
7040
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_menu.Menu.Portal, { container: portalContainer, children: menuContent })
|
|
6998
7041
|
] });
|
|
6999
7042
|
}
|
|
@@ -7070,6 +7113,7 @@ var MenuItem = React9.forwardRef(
|
|
|
7070
7113
|
css: [menuItem(textColor2, active2), typeof className === "object" ? className : void 0],
|
|
7071
7114
|
className: typeof className === "string" ? className : void 0,
|
|
7072
7115
|
render,
|
|
7116
|
+
nativeButton: isNativeButtonTrigger(render),
|
|
7073
7117
|
...props,
|
|
7074
7118
|
onClick: onClickHandler,
|
|
7075
7119
|
disabled: disabledValue,
|
|
@@ -9325,8 +9369,20 @@ var PageHeaderSection = ({
|
|
|
9325
9369
|
level = 2,
|
|
9326
9370
|
linkProps,
|
|
9327
9371
|
linkManagerComponent,
|
|
9372
|
+
afterTitle,
|
|
9373
|
+
afterTitleGap = "sm",
|
|
9374
|
+
afterTitleAlign = "center",
|
|
9328
9375
|
...htmlProps
|
|
9329
9376
|
}) => {
|
|
9377
|
+
const HeaderContent = () => {
|
|
9378
|
+
if (afterTitle) {
|
|
9379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(HorizontalRhythm, { css: PageHeaderSectionTitle, gap: afterTitleGap, align: afterTitleAlign, children: [
|
|
9380
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Heading2, { level, ...htmlProps, "data-testid": "page-header-section", withMarginBottom: false, children: title }),
|
|
9381
|
+
afterTitle
|
|
9382
|
+
] });
|
|
9383
|
+
}
|
|
9384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Heading2, { level, css: PageHeaderSectionTitle, ...htmlProps, "data-testid": "page-header-section", children: title });
|
|
9385
|
+
};
|
|
9330
9386
|
if (linkText && linkProps && !linkManagerComponent) {
|
|
9331
9387
|
throw Error("You must provide a linkManagerComponent");
|
|
9332
9388
|
}
|
|
@@ -9345,7 +9401,7 @@ var PageHeaderSection = ({
|
|
|
9345
9401
|
}
|
|
9346
9402
|
)
|
|
9347
9403
|
] }) : null,
|
|
9348
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9404
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(HeaderContent, {}),
|
|
9349
9405
|
desc
|
|
9350
9406
|
] }),
|
|
9351
9407
|
children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { css: PageHeaderSectionChildContainer, children }) : null
|
|
@@ -10718,6 +10774,7 @@ var DateTimePicker = ({
|
|
|
10718
10774
|
render: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { buttonType: "ghostUnimportant" }),
|
|
10719
10775
|
disabled: disabled2,
|
|
10720
10776
|
"data-testid": `${testId}-trigger`,
|
|
10777
|
+
nativeButton: true,
|
|
10721
10778
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DateTimePickerSummary, { value, placeholder })
|
|
10722
10779
|
}
|
|
10723
10780
|
),
|
|
@@ -10839,8 +10896,22 @@ var DescriptionList = import_react84.default.forwardRef(
|
|
|
10839
10896
|
css: variant === "vertical" ? descriptionListVertical : descriptionListHorizontal,
|
|
10840
10897
|
...listProps,
|
|
10841
10898
|
children: items == null ? void 0 : items.map(({ label: label2, value }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react84.default.Fragment, { children: [
|
|
10842
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
10843
|
-
|
|
10899
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
10900
|
+
"dt",
|
|
10901
|
+
{
|
|
10902
|
+
css: descriptionListLabelStyles,
|
|
10903
|
+
"data-testid": `meta-field-label-${label2.toLowerCase().replace(/\s+/g, "-")}`,
|
|
10904
|
+
children: label2
|
|
10905
|
+
}
|
|
10906
|
+
),
|
|
10907
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
10908
|
+
"dd",
|
|
10909
|
+
{
|
|
10910
|
+
css: descriptionListValueStyles,
|
|
10911
|
+
"data-testid": `meta-field-value-${label2.toLowerCase().replace(/\s+/g, "-")}`,
|
|
10912
|
+
children: typeof value === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DescriptionListValueBoolean, { value }) : value
|
|
10913
|
+
}
|
|
10914
|
+
)
|
|
10844
10915
|
] }, label2))
|
|
10845
10916
|
}
|
|
10846
10917
|
);
|
|
@@ -11642,10 +11713,12 @@ var variants = {
|
|
|
11642
11713
|
|
|
11643
11714
|
// src/components/IconButton/IconButton.tsx
|
|
11644
11715
|
var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
|
|
11645
|
-
var IconButton = (
|
|
11646
|
-
(
|
|
11647
|
-
|
|
11648
|
-
|
|
11716
|
+
var IconButton = markNativeButton(
|
|
11717
|
+
(0, import_react97.forwardRef)(
|
|
11718
|
+
({ children, size = "md", variant = "square", ...props }, ref) => {
|
|
11719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Button, { ref, css: [iconButton, variants[variant], sizes2[size]], ...props, children });
|
|
11720
|
+
}
|
|
11721
|
+
)
|
|
11649
11722
|
);
|
|
11650
11723
|
IconButton.displayName = "IconButton";
|
|
11651
11724
|
|
|
@@ -15282,7 +15355,7 @@ var ObjectListItemTitleColumnContent = import_react137.css`
|
|
|
15282
15355
|
`;
|
|
15283
15356
|
var objectListItemContentWrapperColumns = (minContainerQueryWidth, hasCover) => import_react137.css`
|
|
15284
15357
|
${cq(minContainerQueryWidth)} {
|
|
15285
|
-
grid-template-columns: ${hasCover ? "minmax(0, auto) " : "
|
|
15358
|
+
grid-template-columns: ${hasCover ? "minmax(0, auto) minmax(0, 1fr) minmax(0, auto)" : "minmax(0, 1fr) minmax(0, auto)"};
|
|
15286
15359
|
}
|
|
15287
15360
|
`;
|
|
15288
15361
|
var ObjectListItemRightSlot = import_react137.css`
|
|
@@ -15290,8 +15363,8 @@ var ObjectListItemRightSlot = import_react137.css`
|
|
|
15290
15363
|
gap: var(--spacing-sm);
|
|
15291
15364
|
`;
|
|
15292
15365
|
var ObjectListItemContainer = import_react137.css`
|
|
15293
|
-
> [role='listitem']:not(:
|
|
15294
|
-
border-
|
|
15366
|
+
> [role='listitem']:not(:last-child) {
|
|
15367
|
+
border-bottom: 1px solid var(--gray-200);
|
|
15295
15368
|
}
|
|
15296
15369
|
`;
|
|
15297
15370
|
var ObjectListItemCover = import_react137.css`
|
|
@@ -15603,43 +15676,51 @@ init_emotion_jsx_shim();
|
|
|
15603
15676
|
var React20 = __toESM(require("react"));
|
|
15604
15677
|
var import_react_paginate = __toESM(require("react-paginate"));
|
|
15605
15678
|
|
|
15606
|
-
// src/components/Pagination/
|
|
15607
|
-
init_emotion_jsx_shim();
|
|
15608
|
-
var
|
|
15609
|
-
var
|
|
15679
|
+
// src/components/Pagination/Pagination.styles.ts
|
|
15680
|
+
init_emotion_jsx_shim();
|
|
15681
|
+
var import_react140 = require("@emotion/react");
|
|
15682
|
+
var container2 = "ud-pagination-container";
|
|
15683
|
+
var disabled = "ud-pagination-disabled";
|
|
15684
|
+
var disabledLink = "ud-pagination-disabled-link";
|
|
15685
|
+
var pageLink = "ud-pagination-page-link";
|
|
15686
|
+
var prevNextControls = "ud-pagination-prev-next";
|
|
15687
|
+
var active = "ud-pagination-active";
|
|
15688
|
+
var page = "ud-pagination-page";
|
|
15689
|
+
var paginationStyles = import_react140.css`
|
|
15610
15690
|
display: inline-flex;
|
|
15611
15691
|
max-width: 100%;
|
|
15612
15692
|
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
|
-
|
|
15693
|
+
|
|
15694
|
+
.${container2} {
|
|
15695
|
+
align-items: center;
|
|
15696
|
+
display: flex;
|
|
15697
|
+
}
|
|
15698
|
+
.${container2} .${disabled} {
|
|
15699
|
+
opacity: var(--opacity-50);
|
|
15700
|
+
}
|
|
15701
|
+
.${container2} .${disabledLink} {
|
|
15702
|
+
cursor: pointer-default;
|
|
15703
|
+
}
|
|
15704
|
+
.${container2} .${pageLink} {
|
|
15705
|
+
display: block;
|
|
15706
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
15707
|
+
}
|
|
15708
|
+
.${container2} .${prevNextControls} {
|
|
15709
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
15710
|
+
}
|
|
15711
|
+
.${container2} .${active} {
|
|
15712
|
+
border-radius: var(--rounded-base);
|
|
15713
|
+
background: var(--gray-200);
|
|
15714
|
+
}
|
|
15715
|
+
.${container2} .${page} {
|
|
15716
|
+
margin-left: var(--spacing-xs);
|
|
15717
|
+
margin-right: var(--spacing-xs);
|
|
15718
|
+
}
|
|
15638
15719
|
`;
|
|
15639
15720
|
|
|
15640
15721
|
// src/components/Pagination/usePaginationDisplayRange.ts
|
|
15641
15722
|
init_emotion_jsx_shim();
|
|
15642
|
-
var
|
|
15723
|
+
var import_react141 = require("react");
|
|
15643
15724
|
var DEFAULT_PAGINATION_DISPLAY_RANGE = {
|
|
15644
15725
|
marginPagesDisplayed: 2,
|
|
15645
15726
|
pageRangeDisplayed: 5
|
|
@@ -15695,8 +15776,8 @@ function getAvailablePaginationWidth(container5) {
|
|
|
15695
15776
|
return measurementElement.getBoundingClientRect().width;
|
|
15696
15777
|
}
|
|
15697
15778
|
function usePaginationDisplayRange(containerRef, pageCount) {
|
|
15698
|
-
const [displayRange, setDisplayRange] = (0,
|
|
15699
|
-
(0,
|
|
15779
|
+
const [displayRange, setDisplayRange] = (0, import_react141.useState)(DEFAULT_PAGINATION_DISPLAY_RANGE);
|
|
15780
|
+
(0, import_react141.useEffect)(() => {
|
|
15700
15781
|
var _a;
|
|
15701
15782
|
const container5 = containerRef.current;
|
|
15702
15783
|
if (!container5) {
|
|
@@ -15737,7 +15818,7 @@ function Pagination({
|
|
|
15737
15818
|
if (limit < 1 || pageCount <= 1) {
|
|
15738
15819
|
return null;
|
|
15739
15820
|
}
|
|
15740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { ref: containerRef,
|
|
15821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { ref: containerRef, css: paginationStyles, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
15741
15822
|
import_react_paginate.default,
|
|
15742
15823
|
{
|
|
15743
15824
|
forcePage: currentPage,
|
|
@@ -15762,8 +15843,8 @@ function Pagination({
|
|
|
15762
15843
|
|
|
15763
15844
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
15764
15845
|
init_emotion_jsx_shim();
|
|
15765
|
-
var
|
|
15766
|
-
var ParameterShellContext = (0,
|
|
15846
|
+
var import_react142 = require("react");
|
|
15847
|
+
var ParameterShellContext = (0, import_react142.createContext)({
|
|
15767
15848
|
id: "",
|
|
15768
15849
|
label: "",
|
|
15769
15850
|
hiddenLabel: void 0,
|
|
@@ -15772,7 +15853,7 @@ var ParameterShellContext = (0, import_react141.createContext)({
|
|
|
15772
15853
|
}
|
|
15773
15854
|
});
|
|
15774
15855
|
var useParameterShell = () => {
|
|
15775
|
-
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
15856
|
+
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react142.useContext)(ParameterShellContext);
|
|
15776
15857
|
return {
|
|
15777
15858
|
id,
|
|
15778
15859
|
label: label2,
|
|
@@ -15787,8 +15868,8 @@ init_emotion_jsx_shim();
|
|
|
15787
15868
|
|
|
15788
15869
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
15789
15870
|
init_emotion_jsx_shim();
|
|
15790
|
-
var
|
|
15791
|
-
var inputIconBtn =
|
|
15871
|
+
var import_react143 = require("@emotion/react");
|
|
15872
|
+
var inputIconBtn = import_react143.css`
|
|
15792
15873
|
align-items: center;
|
|
15793
15874
|
border: none;
|
|
15794
15875
|
border-radius: var(--rounded-base);
|
|
@@ -15853,12 +15934,12 @@ var LabelLeadingIcon = ({
|
|
|
15853
15934
|
|
|
15854
15935
|
// src/components/ParameterInputs/ParameterActionButton.tsx
|
|
15855
15936
|
init_emotion_jsx_shim();
|
|
15856
|
-
var
|
|
15937
|
+
var import_react145 = __toESM(require("react"));
|
|
15857
15938
|
|
|
15858
15939
|
// src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
|
|
15859
15940
|
init_emotion_jsx_shim();
|
|
15860
|
-
var
|
|
15861
|
-
var baseStyles =
|
|
15941
|
+
var import_react144 = require("@emotion/react");
|
|
15942
|
+
var baseStyles = import_react144.css`
|
|
15862
15943
|
--hover-color: var(--accent-dark-hover);
|
|
15863
15944
|
--active-color: var(--accent-dark-active);
|
|
15864
15945
|
border: 1px solid transparent;
|
|
@@ -15883,7 +15964,7 @@ var baseStyles = import_react143.css`
|
|
|
15883
15964
|
cursor: default;
|
|
15884
15965
|
}
|
|
15885
15966
|
`;
|
|
15886
|
-
var solidHoverStyles =
|
|
15967
|
+
var solidHoverStyles = import_react144.css`
|
|
15887
15968
|
--text-color: var(--typography-inverted);
|
|
15888
15969
|
&:hover,
|
|
15889
15970
|
&:focus,
|
|
@@ -15900,7 +15981,7 @@ var solidHoverStyles = import_react143.css`
|
|
|
15900
15981
|
color: var(--text-color);
|
|
15901
15982
|
}
|
|
15902
15983
|
`;
|
|
15903
|
-
var outlineHoverStyles =
|
|
15984
|
+
var outlineHoverStyles = import_react144.css`
|
|
15904
15985
|
--text-color: var(--typography-light);
|
|
15905
15986
|
&:hover:not([aria-disabled='true']),
|
|
15906
15987
|
&:focus:not([aria-disabled='true']),
|
|
@@ -15913,7 +15994,7 @@ var outlineHoverStyles = import_react143.css`
|
|
|
15913
15994
|
border-color: var(--active-color);
|
|
15914
15995
|
}
|
|
15915
15996
|
`;
|
|
15916
|
-
var invertedStyles =
|
|
15997
|
+
var invertedStyles = import_react144.css`
|
|
15917
15998
|
--text-color: var(--typography-inverted);
|
|
15918
15999
|
box-shadow: inset 0 0 0 1px transparent;
|
|
15919
16000
|
&:hover,
|
|
@@ -15958,7 +16039,7 @@ var ParameterActionButton = ({
|
|
|
15958
16039
|
children
|
|
15959
16040
|
}
|
|
15960
16041
|
);
|
|
15961
|
-
if (tooltip && (typeof tooltip === "string" ||
|
|
16042
|
+
if (tooltip && (typeof tooltip === "string" || import_react145.default.isValidElement(tooltip))) {
|
|
15962
16043
|
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Tooltip, { title: tooltip, ...tooltipProps, children: buttonElement });
|
|
15963
16044
|
}
|
|
15964
16045
|
return buttonElement;
|
|
@@ -15969,20 +16050,20 @@ init_emotion_jsx_shim();
|
|
|
15969
16050
|
|
|
15970
16051
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
15971
16052
|
init_emotion_jsx_shim();
|
|
15972
|
-
var
|
|
15973
|
-
var ParameterDrawerHeaderContainer =
|
|
16053
|
+
var import_react146 = require("@emotion/react");
|
|
16054
|
+
var ParameterDrawerHeaderContainer = import_react146.css`
|
|
15974
16055
|
align-items: center;
|
|
15975
16056
|
display: flex;
|
|
15976
16057
|
gap: var(--spacing-base);
|
|
15977
16058
|
justify-content: space-between;
|
|
15978
16059
|
margin-bottom: var(--spacing-sm);
|
|
15979
16060
|
`;
|
|
15980
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
16061
|
+
var ParameterDrawerHeaderTitleGroup = import_react146.css`
|
|
15981
16062
|
align-items: center;
|
|
15982
16063
|
display: flex;
|
|
15983
16064
|
gap: var(--spacing-sm);
|
|
15984
16065
|
`;
|
|
15985
|
-
var ParameterDrawerHeaderTitle =
|
|
16066
|
+
var ParameterDrawerHeaderTitle = import_react146.css`
|
|
15986
16067
|
text-overflow: ellipsis;
|
|
15987
16068
|
white-space: nowrap;
|
|
15988
16069
|
overflow: hidden;
|
|
@@ -16003,12 +16084,12 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
16003
16084
|
|
|
16004
16085
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
16005
16086
|
init_emotion_jsx_shim();
|
|
16006
|
-
var
|
|
16087
|
+
var import_react148 = require("react");
|
|
16007
16088
|
|
|
16008
16089
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
16009
16090
|
init_emotion_jsx_shim();
|
|
16010
|
-
var
|
|
16011
|
-
var fieldsetStyles =
|
|
16091
|
+
var import_react147 = require("@emotion/react");
|
|
16092
|
+
var fieldsetStyles = import_react147.css`
|
|
16012
16093
|
&:disabled,
|
|
16013
16094
|
[readonly] {
|
|
16014
16095
|
input,
|
|
@@ -16023,7 +16104,7 @@ var fieldsetStyles = import_react146.css`
|
|
|
16023
16104
|
}
|
|
16024
16105
|
}
|
|
16025
16106
|
`;
|
|
16026
|
-
var fieldsetLegend2 =
|
|
16107
|
+
var fieldsetLegend2 = import_react147.css`
|
|
16027
16108
|
display: block;
|
|
16028
16109
|
font-weight: var(--fw-medium);
|
|
16029
16110
|
margin-bottom: var(--spacing-base);
|
|
@@ -16032,7 +16113,7 @@ var fieldsetLegend2 = import_react146.css`
|
|
|
16032
16113
|
|
|
16033
16114
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
16034
16115
|
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
16035
|
-
var ParameterGroup = (0,
|
|
16116
|
+
var ParameterGroup = (0, import_react148.forwardRef)(
|
|
16036
16117
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
16037
16118
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
16038
16119
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
@@ -16043,24 +16124,24 @@ var ParameterGroup = (0, import_react147.forwardRef)(
|
|
|
16043
16124
|
|
|
16044
16125
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
16045
16126
|
init_emotion_jsx_shim();
|
|
16046
|
-
var
|
|
16127
|
+
var import_react156 = require("react");
|
|
16047
16128
|
|
|
16048
16129
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16049
16130
|
init_emotion_jsx_shim();
|
|
16050
|
-
var
|
|
16131
|
+
var import_react150 = require("react");
|
|
16051
16132
|
var import_react_dom2 = require("react-dom");
|
|
16052
16133
|
|
|
16053
16134
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
16054
16135
|
init_emotion_jsx_shim();
|
|
16055
|
-
var
|
|
16056
|
-
var previewWrapper =
|
|
16136
|
+
var import_react149 = require("@emotion/react");
|
|
16137
|
+
var previewWrapper = import_react149.css`
|
|
16057
16138
|
margin-top: var(--spacing-xs);
|
|
16058
16139
|
background: var(--gray-50);
|
|
16059
16140
|
padding: var(--spacing-sm);
|
|
16060
16141
|
border: solid 1px var(--gray-300);
|
|
16061
16142
|
border-radius: var(--rounded-sm);
|
|
16062
16143
|
`;
|
|
16063
|
-
var previewLink =
|
|
16144
|
+
var previewLink = import_react149.css`
|
|
16064
16145
|
display: block;
|
|
16065
16146
|
width: 100%;
|
|
16066
16147
|
|
|
@@ -16068,7 +16149,7 @@ var previewLink = import_react148.css`
|
|
|
16068
16149
|
max-height: 9rem;
|
|
16069
16150
|
}
|
|
16070
16151
|
`;
|
|
16071
|
-
var previewModalWrapper =
|
|
16152
|
+
var previewModalWrapper = import_react149.css`
|
|
16072
16153
|
background: var(--gray-50);
|
|
16073
16154
|
display: flex;
|
|
16074
16155
|
height: 100%;
|
|
@@ -16077,7 +16158,7 @@ var previewModalWrapper = import_react148.css`
|
|
|
16077
16158
|
border: solid 1px var(--gray-300);
|
|
16078
16159
|
border-radius: var(--rounded-sm);
|
|
16079
16160
|
`;
|
|
16080
|
-
var previewModalImage =
|
|
16161
|
+
var previewModalImage = import_react149.css`
|
|
16081
16162
|
display: flex;
|
|
16082
16163
|
height: 100%;
|
|
16083
16164
|
width: 100%;
|
|
@@ -16091,7 +16172,7 @@ var previewModalImage = import_react148.css`
|
|
|
16091
16172
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
16092
16173
|
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
16093
16174
|
function ParameterImagePreview({ imageSrc }) {
|
|
16094
|
-
const [showModal, setShowModal] = (0,
|
|
16175
|
+
const [showModal, setShowModal] = (0, import_react150.useState)(false);
|
|
16095
16176
|
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { css: previewWrapper, children: [
|
|
16096
16177
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
16097
16178
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
@@ -16124,16 +16205,16 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
16124
16205
|
|
|
16125
16206
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
16126
16207
|
init_emotion_jsx_shim();
|
|
16127
|
-
var
|
|
16128
|
-
var
|
|
16208
|
+
var import_react154 = require("@emotion/react");
|
|
16209
|
+
var import_react155 = require("react");
|
|
16129
16210
|
|
|
16130
16211
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
16131
16212
|
init_emotion_jsx_shim();
|
|
16132
16213
|
|
|
16133
16214
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
16134
16215
|
init_emotion_jsx_shim();
|
|
16135
|
-
var
|
|
16136
|
-
var actionBarVisibilityStyles =
|
|
16216
|
+
var import_react151 = require("@emotion/react");
|
|
16217
|
+
var actionBarVisibilityStyles = import_react151.css`
|
|
16137
16218
|
[data-action-bar] {
|
|
16138
16219
|
opacity: 1;
|
|
16139
16220
|
transform: translateX(0);
|
|
@@ -16142,14 +16223,14 @@ var actionBarVisibilityStyles = import_react150.css`
|
|
|
16142
16223
|
transform var(--duration-fast) var(--timing-ease-out);
|
|
16143
16224
|
}
|
|
16144
16225
|
`;
|
|
16145
|
-
var actionBarVisibilityHiddenStyles =
|
|
16226
|
+
var actionBarVisibilityHiddenStyles = import_react151.css`
|
|
16146
16227
|
opacity: 0;
|
|
16147
16228
|
transform: translateX(1rem);
|
|
16148
16229
|
transition:
|
|
16149
16230
|
opacity var(--duration-fast) var(--timing-ease-out),
|
|
16150
16231
|
transform var(--duration-fast) var(--timing-ease-out);
|
|
16151
16232
|
`;
|
|
16152
|
-
var inputContainer2 =
|
|
16233
|
+
var inputContainer2 = import_react151.css`
|
|
16153
16234
|
position: relative;
|
|
16154
16235
|
scroll-margin: var(--spacing-2xl);
|
|
16155
16236
|
|
|
@@ -16163,14 +16244,14 @@ var inputContainer2 = import_react150.css`
|
|
|
16163
16244
|
${actionBarVisibilityStyles}
|
|
16164
16245
|
}
|
|
16165
16246
|
`;
|
|
16166
|
-
var labelText2 =
|
|
16247
|
+
var labelText2 = import_react151.css`
|
|
16167
16248
|
align-items: center;
|
|
16168
16249
|
display: flex;
|
|
16169
16250
|
gap: var(--spacing-xs);
|
|
16170
16251
|
font-weight: var(--fw-regular);
|
|
16171
16252
|
margin: 0 0 var(--spacing-xs);
|
|
16172
16253
|
`;
|
|
16173
|
-
var input3 =
|
|
16254
|
+
var input3 = import_react151.css`
|
|
16174
16255
|
display: block;
|
|
16175
16256
|
appearance: none;
|
|
16176
16257
|
box-sizing: border-box;
|
|
@@ -16223,18 +16304,18 @@ var input3 = import_react150.css`
|
|
|
16223
16304
|
opacity: var(--opacity-50);
|
|
16224
16305
|
}
|
|
16225
16306
|
`;
|
|
16226
|
-
var selectInput =
|
|
16307
|
+
var selectInput = import_react151.css`
|
|
16227
16308
|
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
16309
|
background-position: right var(--spacing-sm) center;
|
|
16229
16310
|
background-repeat: no-repeat;
|
|
16230
16311
|
background-size: 1rem;
|
|
16231
16312
|
padding-right: var(--spacing-xl);
|
|
16232
16313
|
`;
|
|
16233
|
-
var inputWrapper =
|
|
16314
|
+
var inputWrapper = import_react151.css`
|
|
16234
16315
|
display: flex; // used to correct overflow with chrome textarea
|
|
16235
16316
|
position: relative;
|
|
16236
16317
|
`;
|
|
16237
|
-
var inputIcon2 =
|
|
16318
|
+
var inputIcon2 = import_react151.css`
|
|
16238
16319
|
align-items: center;
|
|
16239
16320
|
background: var(--white);
|
|
16240
16321
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -16250,7 +16331,7 @@ var inputIcon2 = import_react150.css`
|
|
|
16250
16331
|
width: var(--spacing-lg);
|
|
16251
16332
|
z-index: var(--z-10);
|
|
16252
16333
|
`;
|
|
16253
|
-
var inputToggleLabel2 =
|
|
16334
|
+
var inputToggleLabel2 = import_react151.css`
|
|
16254
16335
|
--inline-label-color: var(--typography-base);
|
|
16255
16336
|
align-items: center;
|
|
16256
16337
|
cursor: pointer;
|
|
@@ -16265,7 +16346,7 @@ var inputToggleLabel2 = import_react150.css`
|
|
|
16265
16346
|
--inline-label-color: var(--gray-400);
|
|
16266
16347
|
}
|
|
16267
16348
|
`;
|
|
16268
|
-
var toggleInput2 =
|
|
16349
|
+
var toggleInput2 = import_react151.css`
|
|
16269
16350
|
appearance: none;
|
|
16270
16351
|
border: 1px solid var(--gray-200);
|
|
16271
16352
|
background: var(--white);
|
|
@@ -16309,7 +16390,7 @@ var toggleInput2 = import_react150.css`
|
|
|
16309
16390
|
border-color: var(--gray-200);
|
|
16310
16391
|
}
|
|
16311
16392
|
`;
|
|
16312
|
-
var toggleInputIndeterminateState =
|
|
16393
|
+
var toggleInputIndeterminateState = import_react151.css`
|
|
16313
16394
|
&:indeterminate,
|
|
16314
16395
|
&:indeterminate:hover,
|
|
16315
16396
|
&:indeterminate:focus {
|
|
@@ -16320,7 +16401,7 @@ var toggleInputIndeterminateState = import_react150.css`
|
|
|
16320
16401
|
color: var(--accent-dark-active);
|
|
16321
16402
|
}
|
|
16322
16403
|
`;
|
|
16323
|
-
var inlineLabel2 =
|
|
16404
|
+
var inlineLabel2 = import_react151.css`
|
|
16324
16405
|
color: var(--inline-label-color);
|
|
16325
16406
|
padding-left: var(--spacing-md);
|
|
16326
16407
|
font-size: var(--fs-sm);
|
|
@@ -16337,7 +16418,7 @@ var inlineLabel2 = import_react150.css`
|
|
|
16337
16418
|
}
|
|
16338
16419
|
}
|
|
16339
16420
|
`;
|
|
16340
|
-
var inputMenu =
|
|
16421
|
+
var inputMenu = import_react151.css`
|
|
16341
16422
|
background: none;
|
|
16342
16423
|
border: none;
|
|
16343
16424
|
padding: var(--spacing-2xs);
|
|
@@ -16351,12 +16432,12 @@ var inputMenu = import_react150.css`
|
|
|
16351
16432
|
cursor: default;
|
|
16352
16433
|
}
|
|
16353
16434
|
`;
|
|
16354
|
-
var inputActionItems =
|
|
16435
|
+
var inputActionItems = import_react151.css`
|
|
16355
16436
|
display: flex;
|
|
16356
16437
|
z-index: var(--z-1);
|
|
16357
16438
|
${actionBarVisibilityHiddenStyles}
|
|
16358
16439
|
`;
|
|
16359
|
-
var inputMenuHover =
|
|
16440
|
+
var inputMenuHover = import_react151.css`
|
|
16360
16441
|
opacity: var(--opacity-50);
|
|
16361
16442
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
16362
16443
|
margin-top: 0.25rem;
|
|
@@ -16368,11 +16449,11 @@ var inputMenuHover = import_react150.css`
|
|
|
16368
16449
|
background-color: var(--gray-200);
|
|
16369
16450
|
}
|
|
16370
16451
|
`;
|
|
16371
|
-
var textarea2 =
|
|
16452
|
+
var textarea2 = import_react151.css`
|
|
16372
16453
|
resize: vertical;
|
|
16373
16454
|
min-height: 2rem;
|
|
16374
16455
|
`;
|
|
16375
|
-
var dataConnectButton =
|
|
16456
|
+
var dataConnectButton = import_react151.css`
|
|
16376
16457
|
align-items: center;
|
|
16377
16458
|
appearance: none;
|
|
16378
16459
|
box-sizing: border-box;
|
|
@@ -16408,7 +16489,7 @@ var dataConnectButton = import_react150.css`
|
|
|
16408
16489
|
pointer-events: none;
|
|
16409
16490
|
}
|
|
16410
16491
|
`;
|
|
16411
|
-
var linkParameterEmptyContainer =
|
|
16492
|
+
var linkParameterEmptyContainer = import_react151.css`
|
|
16412
16493
|
box-sizing: border-box;
|
|
16413
16494
|
background: var(--white);
|
|
16414
16495
|
border: 1px solid var(--gray-200);
|
|
@@ -16420,7 +16501,7 @@ var linkParameterEmptyContainer = import_react150.css`
|
|
|
16420
16501
|
min-height: 2rem;
|
|
16421
16502
|
width: 100%;
|
|
16422
16503
|
`;
|
|
16423
|
-
var linkParameterControls =
|
|
16504
|
+
var linkParameterControls = import_react151.css`
|
|
16424
16505
|
position: absolute;
|
|
16425
16506
|
inset: 0 0 0 auto;
|
|
16426
16507
|
padding: 0 var(--spacing-base);
|
|
@@ -16429,7 +16510,7 @@ var linkParameterControls = import_react150.css`
|
|
|
16429
16510
|
justify-content: center;
|
|
16430
16511
|
gap: var(--spacing-base);
|
|
16431
16512
|
`;
|
|
16432
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
16513
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react151.css`
|
|
16433
16514
|
padding-right: calc(
|
|
16434
16515
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
16435
16516
|
var(--spacing-base)
|
|
@@ -16442,7 +16523,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react150.css`
|
|
|
16442
16523
|
}
|
|
16443
16524
|
}
|
|
16444
16525
|
`;
|
|
16445
|
-
var linkParameterIcon =
|
|
16526
|
+
var linkParameterIcon = import_react151.css`
|
|
16446
16527
|
align-items: center;
|
|
16447
16528
|
color: var(--primary-action-default);
|
|
16448
16529
|
display: flex;
|
|
@@ -16468,9 +16549,9 @@ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
|
16468
16549
|
|
|
16469
16550
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
16470
16551
|
init_emotion_jsx_shim();
|
|
16471
|
-
var
|
|
16552
|
+
var import_react152 = require("react");
|
|
16472
16553
|
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
16473
|
-
var ParameterMenuButton = (0,
|
|
16554
|
+
var ParameterMenuButton = (0, import_react152.forwardRef)(
|
|
16474
16555
|
({ label: label2, children, disabled: disabled2, withoutPortal }, ref) => {
|
|
16475
16556
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16476
16557
|
Menu,
|
|
@@ -16498,14 +16579,14 @@ var ParameterMenuButton = (0, import_react151.forwardRef)(
|
|
|
16498
16579
|
|
|
16499
16580
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
16500
16581
|
init_emotion_jsx_shim();
|
|
16501
|
-
var
|
|
16502
|
-
var emptyParameterShell =
|
|
16582
|
+
var import_react153 = require("@emotion/react");
|
|
16583
|
+
var emptyParameterShell = import_react153.css`
|
|
16503
16584
|
border-radius: var(--rounded-sm);
|
|
16504
16585
|
flex-grow: 1;
|
|
16505
16586
|
position: relative;
|
|
16506
16587
|
max-width: 100%;
|
|
16507
16588
|
`;
|
|
16508
|
-
var emptyParameterShellText =
|
|
16589
|
+
var emptyParameterShellText = import_react153.css`
|
|
16509
16590
|
background: var(--brand-secondary-6);
|
|
16510
16591
|
border-radius: var(--rounded-sm);
|
|
16511
16592
|
padding: var(--spacing-sm);
|
|
@@ -16513,7 +16594,7 @@ var emptyParameterShellText = import_react152.css`
|
|
|
16513
16594
|
font-size: var(--fs-sm);
|
|
16514
16595
|
margin: 0;
|
|
16515
16596
|
`;
|
|
16516
|
-
var overrideMarker =
|
|
16597
|
+
var overrideMarker = import_react153.css`
|
|
16517
16598
|
border-radius: var(--rounded-sm);
|
|
16518
16599
|
border: 10px solid var(--gray-300);
|
|
16519
16600
|
border-left-color: transparent;
|
|
@@ -16585,7 +16666,7 @@ var ParameterShell = ({
|
|
|
16585
16666
|
menuWithoutPortal,
|
|
16586
16667
|
...props
|
|
16587
16668
|
}) => {
|
|
16588
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
16669
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react155.useState)(void 0);
|
|
16589
16670
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
16590
16671
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
16591
16672
|
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -16607,7 +16688,7 @@ var ParameterShell = ({
|
|
|
16607
16688
|
css: [
|
|
16608
16689
|
inputMenu,
|
|
16609
16690
|
inputActionItems,
|
|
16610
|
-
menuItems ?
|
|
16691
|
+
menuItems ? import_react154.css`
|
|
16611
16692
|
right: var(--spacing-md);
|
|
16612
16693
|
` : void 0
|
|
16613
16694
|
],
|
|
@@ -16666,7 +16747,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
16666
16747
|
|
|
16667
16748
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
16668
16749
|
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
16669
|
-
var ParameterImage = (0,
|
|
16750
|
+
var ParameterImage = (0, import_react156.forwardRef)(
|
|
16670
16751
|
({ children, ...props }, ref) => {
|
|
16671
16752
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16672
16753
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -16675,10 +16756,10 @@ var ParameterImage = (0, import_react155.forwardRef)(
|
|
|
16675
16756
|
] });
|
|
16676
16757
|
}
|
|
16677
16758
|
);
|
|
16678
|
-
var ParameterImageInner = (0,
|
|
16759
|
+
var ParameterImageInner = (0, import_react156.forwardRef)((props, ref) => {
|
|
16679
16760
|
const { value } = props;
|
|
16680
16761
|
const { id, label: label2, hiddenLabel, errorMessage } = useParameterShell();
|
|
16681
|
-
const deferredValue = (0,
|
|
16762
|
+
const deferredValue = (0, import_react156.useDeferredValue)(value);
|
|
16682
16763
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
16683
16764
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
16684
16765
|
"input",
|
|
@@ -16698,13 +16779,13 @@ var ParameterImageInner = (0, import_react155.forwardRef)((props, ref) => {
|
|
|
16698
16779
|
|
|
16699
16780
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
16700
16781
|
init_emotion_jsx_shim();
|
|
16701
|
-
var
|
|
16782
|
+
var import_react157 = require("react");
|
|
16702
16783
|
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
16703
|
-
var ParameterInput = (0,
|
|
16784
|
+
var ParameterInput = (0, import_react157.forwardRef)((props, ref) => {
|
|
16704
16785
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16705
16786
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
16706
16787
|
});
|
|
16707
|
-
var ParameterInputInner = (0,
|
|
16788
|
+
var ParameterInputInner = (0, import_react157.forwardRef)(({ enableMouseWheel = false, ...props }, ref) => {
|
|
16708
16789
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16709
16790
|
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
16710
16791
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
@@ -16724,7 +16805,7 @@ var ParameterInputInner = (0, import_react156.forwardRef)(({ enableMouseWheel =
|
|
|
16724
16805
|
|
|
16725
16806
|
// src/components/ParameterInputs/ParameterLabels.tsx
|
|
16726
16807
|
init_emotion_jsx_shim();
|
|
16727
|
-
var
|
|
16808
|
+
var import_react158 = require("react");
|
|
16728
16809
|
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
16729
16810
|
var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
|
|
16730
16811
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -16786,18 +16867,18 @@ var ParameterLabelsInner = (props) => {
|
|
|
16786
16867
|
var _a;
|
|
16787
16868
|
const { label: label2 } = useParameterShell();
|
|
16788
16869
|
const { onChange } = props;
|
|
16789
|
-
const containerRef = (0,
|
|
16790
|
-
const hasPositionedRef = (0,
|
|
16791
|
-
const selectedValues = (0,
|
|
16870
|
+
const containerRef = (0, import_react158.useRef)(null);
|
|
16871
|
+
const hasPositionedRef = (0, import_react158.useRef)(false);
|
|
16872
|
+
const selectedValues = (0, import_react158.useMemo)(
|
|
16792
16873
|
() => {
|
|
16793
16874
|
var _a2, _b;
|
|
16794
16875
|
return (_b = (_a2 = props.value) != null ? _a2 : props.defaultValue) != null ? _b : [];
|
|
16795
16876
|
},
|
|
16796
16877
|
[props.value, props.defaultValue]
|
|
16797
16878
|
);
|
|
16798
|
-
const items = (0,
|
|
16799
|
-
const optionsMap = (0,
|
|
16800
|
-
const selectedIds = (0,
|
|
16879
|
+
const items = (0, import_react158.useMemo)(() => convertOptionsToItems(props.options), [props.options]);
|
|
16880
|
+
const optionsMap = (0, import_react158.useMemo)(() => createOptionsMap(props.options), [props.options]);
|
|
16881
|
+
const selectedIds = (0, import_react158.useMemo)(() => {
|
|
16801
16882
|
if (!Array.isArray(selectedValues)) {
|
|
16802
16883
|
return /* @__PURE__ */ new Set();
|
|
16803
16884
|
}
|
|
@@ -16889,9 +16970,9 @@ var ParameterLabelsInner = (props) => {
|
|
|
16889
16970
|
|
|
16890
16971
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
16891
16972
|
init_emotion_jsx_shim();
|
|
16892
|
-
var
|
|
16973
|
+
var import_react159 = require("react");
|
|
16893
16974
|
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
16894
|
-
var ParameterLink = (0,
|
|
16975
|
+
var ParameterLink = (0, import_react159.forwardRef)(
|
|
16895
16976
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
16896
16977
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16897
16978
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
@@ -16915,7 +16996,7 @@ var ParameterLink = (0, import_react158.forwardRef)(
|
|
|
16915
16996
|
);
|
|
16916
16997
|
}
|
|
16917
16998
|
);
|
|
16918
|
-
var ParameterLinkInner = (0,
|
|
16999
|
+
var ParameterLinkInner = (0, import_react159.forwardRef)(
|
|
16919
17000
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
16920
17001
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16921
17002
|
if (!props.value)
|
|
@@ -17101,24 +17182,24 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
17101
17182
|
|
|
17102
17183
|
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
17103
17184
|
init_emotion_jsx_shim();
|
|
17104
|
-
var
|
|
17185
|
+
var import_react163 = require("react");
|
|
17105
17186
|
|
|
17106
17187
|
// src/components/Slider/index.ts
|
|
17107
17188
|
init_emotion_jsx_shim();
|
|
17108
17189
|
|
|
17109
17190
|
// src/components/Slider/Slider.tsx
|
|
17110
17191
|
init_emotion_jsx_shim();
|
|
17111
|
-
var
|
|
17192
|
+
var import_react162 = require("react");
|
|
17112
17193
|
|
|
17113
17194
|
// src/components/Slider/SliderLabels.tsx
|
|
17114
17195
|
init_emotion_jsx_shim();
|
|
17115
|
-
var
|
|
17196
|
+
var import_react161 = require("react");
|
|
17116
17197
|
|
|
17117
17198
|
// src/components/Slider/styles/Slider.styles.ts
|
|
17118
17199
|
init_emotion_jsx_shim();
|
|
17119
|
-
var
|
|
17200
|
+
var import_react160 = require("@emotion/react");
|
|
17120
17201
|
var thumbSize = "20px";
|
|
17121
|
-
var disabledThumbStyles =
|
|
17202
|
+
var disabledThumbStyles = import_react160.css`
|
|
17122
17203
|
background: var(--white);
|
|
17123
17204
|
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
17205
|
background-repeat: no-repeat;
|
|
@@ -17126,22 +17207,22 @@ var disabledThumbStyles = import_react159.css`
|
|
|
17126
17207
|
background-size: 12px 12px;
|
|
17127
17208
|
border: 1px solid var(--gray-500);
|
|
17128
17209
|
`;
|
|
17129
|
-
var container3 =
|
|
17210
|
+
var container3 = import_react160.css`
|
|
17130
17211
|
display: flex;
|
|
17131
17212
|
align-items: flex-start;
|
|
17132
17213
|
gap: var(--spacing-base);
|
|
17133
17214
|
width: 100%;
|
|
17134
17215
|
`;
|
|
17135
|
-
var sliderContainer =
|
|
17216
|
+
var sliderContainer = import_react160.css`
|
|
17136
17217
|
flex: 1;
|
|
17137
17218
|
display: flex;
|
|
17138
17219
|
flex-direction: column;
|
|
17139
17220
|
`;
|
|
17140
|
-
var sliderTrackContainer =
|
|
17221
|
+
var sliderTrackContainer = import_react160.css`
|
|
17141
17222
|
position: relative;
|
|
17142
17223
|
padding: var(--spacing-xs) 0;
|
|
17143
17224
|
`;
|
|
17144
|
-
var progressTrack =
|
|
17225
|
+
var progressTrack = import_react160.css`
|
|
17145
17226
|
position: absolute;
|
|
17146
17227
|
top: 50%;
|
|
17147
17228
|
left: 0;
|
|
@@ -17151,7 +17232,7 @@ var progressTrack = import_react159.css`
|
|
|
17151
17232
|
margin-top: -3px;
|
|
17152
17233
|
border-radius: var(--rounded-sm);
|
|
17153
17234
|
`;
|
|
17154
|
-
var progressTrackBackground =
|
|
17235
|
+
var progressTrackBackground = import_react160.css`
|
|
17155
17236
|
position: absolute;
|
|
17156
17237
|
top: 0;
|
|
17157
17238
|
left: 0;
|
|
@@ -17161,7 +17242,7 @@ var progressTrackBackground = import_react159.css`
|
|
|
17161
17242
|
border: 1px solid var(--gray-200);
|
|
17162
17243
|
border-radius: var(--rounded-sm);
|
|
17163
17244
|
`;
|
|
17164
|
-
var progressTrackFill =
|
|
17245
|
+
var progressTrackFill = import_react160.css`
|
|
17165
17246
|
position: absolute;
|
|
17166
17247
|
top: 0;
|
|
17167
17248
|
left: 0;
|
|
@@ -17169,19 +17250,19 @@ var progressTrackFill = import_react159.css`
|
|
|
17169
17250
|
background: var(--accent-light);
|
|
17170
17251
|
border-radius: var(--rounded-sm);
|
|
17171
17252
|
`;
|
|
17172
|
-
var tickMarksContainer =
|
|
17253
|
+
var tickMarksContainer = import_react160.css`
|
|
17173
17254
|
position: relative;
|
|
17174
17255
|
height: 1rem;
|
|
17175
17256
|
margin-top: calc(-1 * var(--spacing-base) + var(--spacing-xs));
|
|
17176
17257
|
`;
|
|
17177
|
-
var tickMark =
|
|
17258
|
+
var tickMark = import_react160.css`
|
|
17178
17259
|
position: absolute;
|
|
17179
17260
|
top: 0;
|
|
17180
17261
|
width: 0.5px;
|
|
17181
17262
|
height: 8px;
|
|
17182
17263
|
background-color: var(--gray-300);
|
|
17183
17264
|
`;
|
|
17184
|
-
var largeTickMark =
|
|
17265
|
+
var largeTickMark = import_react160.css`
|
|
17185
17266
|
position: absolute;
|
|
17186
17267
|
top: 0;
|
|
17187
17268
|
width: 1px;
|
|
@@ -17189,7 +17270,7 @@ var largeTickMark = import_react159.css`
|
|
|
17189
17270
|
background-color: var(--gray-400);
|
|
17190
17271
|
transform: translateX(-50%);
|
|
17191
17272
|
`;
|
|
17192
|
-
var slider =
|
|
17273
|
+
var slider = import_react160.css`
|
|
17193
17274
|
appearance: none;
|
|
17194
17275
|
width: 100%;
|
|
17195
17276
|
width: calc(100% + ${thumbSize});
|
|
@@ -17306,12 +17387,12 @@ var slider = import_react159.css`
|
|
|
17306
17387
|
0 0 0 3px var(--accent-light);
|
|
17307
17388
|
}
|
|
17308
17389
|
`;
|
|
17309
|
-
var labelsContainer =
|
|
17390
|
+
var labelsContainer = import_react160.css`
|
|
17310
17391
|
position: relative;
|
|
17311
17392
|
height: 1.5rem;
|
|
17312
17393
|
width: 100%;
|
|
17313
17394
|
`;
|
|
17314
|
-
var label =
|
|
17395
|
+
var label = import_react160.css`
|
|
17315
17396
|
position: absolute;
|
|
17316
17397
|
top: 0;
|
|
17317
17398
|
font-size: var(--text-sm);
|
|
@@ -17355,12 +17436,12 @@ var label = import_react159.css`
|
|
|
17355
17436
|
max-width: 100%;
|
|
17356
17437
|
}
|
|
17357
17438
|
`;
|
|
17358
|
-
var numberInputContainer =
|
|
17439
|
+
var numberInputContainer = import_react160.css`
|
|
17359
17440
|
flex-shrink: 0;
|
|
17360
17441
|
min-width: 2rem;
|
|
17361
17442
|
margin-top: var(--spacing-sm);
|
|
17362
17443
|
`;
|
|
17363
|
-
var numberInput2 =
|
|
17444
|
+
var numberInput2 = import_react160.css`
|
|
17364
17445
|
appearance: none;
|
|
17365
17446
|
background-color: var(--white);
|
|
17366
17447
|
border: 1px solid var(--gray-200);
|
|
@@ -17538,9 +17619,9 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
|
|
|
17538
17619
|
}));
|
|
17539
17620
|
}
|
|
17540
17621
|
function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
17541
|
-
const containerRef = (0,
|
|
17542
|
-
const [measuredWidth, setMeasuredWidth] = (0,
|
|
17543
|
-
(0,
|
|
17622
|
+
const containerRef = (0, import_react161.useRef)(null);
|
|
17623
|
+
const [measuredWidth, setMeasuredWidth] = (0, import_react161.useState)(containerWidth);
|
|
17624
|
+
(0, import_react161.useEffect)(() => {
|
|
17544
17625
|
if (containerRef.current) {
|
|
17545
17626
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
17546
17627
|
for (const entry of entries) {
|
|
@@ -17577,7 +17658,7 @@ function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
|
17577
17658
|
|
|
17578
17659
|
// src/components/Slider/Slider.tsx
|
|
17579
17660
|
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
17580
|
-
var Slider = (0,
|
|
17661
|
+
var Slider = (0, import_react162.forwardRef)(
|
|
17581
17662
|
({
|
|
17582
17663
|
value,
|
|
17583
17664
|
onChange,
|
|
@@ -17594,7 +17675,7 @@ var Slider = (0, import_react161.forwardRef)(
|
|
|
17594
17675
|
name
|
|
17595
17676
|
}, ref) => {
|
|
17596
17677
|
const isOptionsMode = Boolean(options && options.length > 0);
|
|
17597
|
-
const { min, max, step, smallTicks, largeTicks } = (0,
|
|
17678
|
+
const { min, max, step, smallTicks, largeTicks } = (0, import_react162.useMemo)(() => {
|
|
17598
17679
|
if (isOptionsMode && options) {
|
|
17599
17680
|
if (options.length === 0) {
|
|
17600
17681
|
return {
|
|
@@ -17672,14 +17753,14 @@ var Slider = (0, import_react161.forwardRef)(
|
|
|
17672
17753
|
}, [isOptionsMode, options, propMin, propMax, propStep]);
|
|
17673
17754
|
const isValueUnset = value === void 0 || value === null || typeof value === "number" && isNaN(value);
|
|
17674
17755
|
const clampedValue = isValueUnset ? min : Math.min(Math.max(value, min), max);
|
|
17675
|
-
const handleSliderChange = (0,
|
|
17756
|
+
const handleSliderChange = (0, import_react162.useCallback)(
|
|
17676
17757
|
(event) => {
|
|
17677
17758
|
const newValue = Number(event.target.value);
|
|
17678
17759
|
onChange(newValue);
|
|
17679
17760
|
},
|
|
17680
17761
|
[onChange]
|
|
17681
17762
|
);
|
|
17682
|
-
const handleNumberInputChange = (0,
|
|
17763
|
+
const handleNumberInputChange = (0, import_react162.useCallback)(
|
|
17683
17764
|
(event) => {
|
|
17684
17765
|
if (event.target.value === "") {
|
|
17685
17766
|
onChange(void 0);
|
|
@@ -17752,13 +17833,13 @@ Slider.displayName = "Slider";
|
|
|
17752
17833
|
|
|
17753
17834
|
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
17754
17835
|
var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
|
|
17755
|
-
var ParameterNumberSlider = (0,
|
|
17836
|
+
var ParameterNumberSlider = (0, import_react163.forwardRef)(
|
|
17756
17837
|
(props, ref) => {
|
|
17757
17838
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17758
17839
|
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
17840
|
}
|
|
17760
17841
|
);
|
|
17761
|
-
var ParameterNumberSliderInner = (0,
|
|
17842
|
+
var ParameterNumberSliderInner = (0, import_react163.forwardRef)(({ ...props }, ref) => {
|
|
17762
17843
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
17763
17844
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
17764
17845
|
Slider,
|
|
@@ -17775,7 +17856,6 @@ ParameterNumberSliderInner.displayName = "ParameterNumberSliderInner";
|
|
|
17775
17856
|
|
|
17776
17857
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17777
17858
|
init_emotion_jsx_shim();
|
|
17778
|
-
var import_react176 = require("@emotion/react");
|
|
17779
17859
|
var import_list3 = require("@lexical/list");
|
|
17780
17860
|
var import_markdown = require("@lexical/markdown");
|
|
17781
17861
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -17912,7 +17992,7 @@ var defaultParameterConfiguration = {
|
|
|
17912
17992
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17913
17993
|
var import_fast_equals2 = require("fast-equals");
|
|
17914
17994
|
var import_lexical10 = require("lexical");
|
|
17915
|
-
var
|
|
17995
|
+
var import_react179 = require("react");
|
|
17916
17996
|
|
|
17917
17997
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17918
17998
|
init_emotion_jsx_shim();
|
|
@@ -17935,10 +18015,10 @@ init_emotion_jsx_shim();
|
|
|
17935
18015
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
17936
18016
|
var import_utils5 = require("@lexical/utils");
|
|
17937
18017
|
var import_lexical = require("lexical");
|
|
17938
|
-
var
|
|
18018
|
+
var import_react164 = require("react");
|
|
17939
18019
|
function DisableStylesPlugin() {
|
|
17940
18020
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
17941
|
-
(0,
|
|
18021
|
+
(0, import_react164.useEffect)(() => {
|
|
17942
18022
|
return (0, import_utils5.mergeRegister)(
|
|
17943
18023
|
// Disable text alignment on paragraph nodes
|
|
17944
18024
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -17953,245 +18033,252 @@ function DisableStylesPlugin() {
|
|
|
17953
18033
|
|
|
17954
18034
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
17955
18035
|
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;
|
|
18036
|
+
var import_react165 = require("@emotion/react");
|
|
18037
|
+
var textBold = "ud-editor-text-bold";
|
|
18038
|
+
var textItalic = "ud-editor-text-italic";
|
|
18039
|
+
var textUnderline = "ud-editor-text-underline";
|
|
18040
|
+
var textStrikethrough = "ud-editor-text-strikethrough";
|
|
18041
|
+
var textUnderlineStrikethrough = "ud-editor-text-underline-strikethrough";
|
|
18042
|
+
var textCode = "ud-editor-text-code";
|
|
18043
|
+
var textSuperscript = "ud-editor-text-superscript";
|
|
18044
|
+
var textSubscript = "ud-editor-text-subscript";
|
|
18045
|
+
var linkElement = "ud-editor-link";
|
|
18046
|
+
var heading1Element = "ud-editor-h1";
|
|
18047
|
+
var heading2Element = "ud-editor-h2";
|
|
18048
|
+
var heading3Element = "ud-editor-h3";
|
|
18049
|
+
var heading4Element = "ud-editor-h4";
|
|
18050
|
+
var heading5Element = "ud-editor-h5";
|
|
18051
|
+
var heading6Element = "ud-editor-h6";
|
|
18052
|
+
var paragraphElement = "ud-editor-paragraph";
|
|
18053
|
+
var orderedListElement = "ud-editor-ol";
|
|
18054
|
+
var unorderedListElement = "ud-editor-ul";
|
|
18055
|
+
var listItemElement = "ud-editor-listitem";
|
|
18056
|
+
var nestedListItemElement = "ud-editor-nested-listitem";
|
|
18057
|
+
var blockquoteElement = "ud-editor-blockquote";
|
|
18058
|
+
var codeElement = "ud-editor-code";
|
|
18059
|
+
var tableElement = "ud-editor-table";
|
|
18060
|
+
var tableCellElement = "ud-editor-table-cell";
|
|
18061
|
+
var tableHeaderElement = "ud-editor-table-header";
|
|
18062
|
+
var editorThemeStyles = import_react165.css`
|
|
18063
|
+
.${textBold} {
|
|
18064
|
+
font-weight: 700;
|
|
18065
|
+
}
|
|
18066
|
+
.${textItalic} {
|
|
18067
|
+
font-style: italic;
|
|
18050
18068
|
}
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18069
|
+
.${textUnderline} {
|
|
18070
|
+
text-decoration: underline;
|
|
18071
|
+
}
|
|
18072
|
+
.${textStrikethrough} {
|
|
18073
|
+
text-decoration: line-through;
|
|
18074
|
+
}
|
|
18075
|
+
.${textUnderlineStrikethrough} {
|
|
18076
|
+
text-decoration: underline line-through;
|
|
18077
|
+
}
|
|
18078
|
+
.${textCode} {
|
|
18079
|
+
background-color: var(--gray-100);
|
|
18080
|
+
border-radius: var(--rounded-sm);
|
|
18081
|
+
display: inline-block;
|
|
18082
|
+
font-family: var(--ff-mono);
|
|
18083
|
+
font-feature-settings: 'liga' 0;
|
|
18084
|
+
font-variant-ligatures: none;
|
|
18085
|
+
font-size: var(--fs-sm);
|
|
18086
|
+
padding-left: var(--spacing-xs);
|
|
18087
|
+
padding-right: var(--spacing-xs);
|
|
18088
|
+
}
|
|
18089
|
+
.${textSuperscript} {
|
|
18090
|
+
vertical-align: super;
|
|
18091
|
+
font-size: smaller;
|
|
18092
|
+
}
|
|
18093
|
+
.${textSubscript} {
|
|
18094
|
+
vertical-align: sub;
|
|
18095
|
+
font-size: smaller;
|
|
18096
|
+
}
|
|
18097
|
+
.${linkElement} {
|
|
18098
|
+
${link}
|
|
18099
|
+
${linkColorDefault}
|
|
18100
|
+
text-decoration: underline;
|
|
18101
|
+
}
|
|
18102
|
+
.${heading1Element} {
|
|
18103
|
+
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
18104
|
+
${commonHeadingAttr(true)}
|
|
18105
|
+
${commonLineHeight}
|
|
18106
|
+
}
|
|
18107
|
+
.${heading2Element} {
|
|
18108
|
+
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
18109
|
+
${commonHeadingAttr(true)}
|
|
18110
|
+
${commonLineHeight}
|
|
18111
|
+
}
|
|
18112
|
+
.${heading3Element} {
|
|
18113
|
+
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
18114
|
+
${commonHeadingAttr(true)}
|
|
18115
|
+
${commonLineHeight}
|
|
18116
|
+
}
|
|
18117
|
+
.${heading4Element} {
|
|
18118
|
+
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
18119
|
+
${commonHeadingAttr(true)}
|
|
18120
|
+
${commonLineHeight}
|
|
18121
|
+
}
|
|
18122
|
+
.${heading5Element} {
|
|
18123
|
+
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
18124
|
+
${commonHeadingAttr(true)}
|
|
18125
|
+
${commonLineHeight}
|
|
18126
|
+
}
|
|
18127
|
+
.${heading6Element} {
|
|
18128
|
+
font-size: var(--fs-base);
|
|
18129
|
+
${commonHeadingAttr(true)}
|
|
18130
|
+
${commonLineHeight}
|
|
18131
|
+
}
|
|
18132
|
+
.${paragraphElement} {
|
|
18133
|
+
line-height: 1.5;
|
|
18134
|
+
margin-bottom: var(--spacing-base);
|
|
18060
18135
|
|
|
18061
|
-
|
|
18062
|
-
|
|
18136
|
+
&:last-child {
|
|
18137
|
+
margin-bottom: 0;
|
|
18138
|
+
}
|
|
18063
18139
|
}
|
|
18140
|
+
.${orderedListElement} {
|
|
18141
|
+
${commonLineHeight}
|
|
18142
|
+
display: block;
|
|
18143
|
+
list-style: decimal;
|
|
18144
|
+
list-style-position: outside;
|
|
18145
|
+
margin-bottom: var(--spacing-base);
|
|
18146
|
+
margin-top: 0;
|
|
18147
|
+
padding: 0;
|
|
18064
18148
|
|
|
18065
|
-
|
|
18066
|
-
|
|
18149
|
+
&:last-child {
|
|
18150
|
+
margin-bottom: 0;
|
|
18151
|
+
}
|
|
18067
18152
|
|
|
18068
18153
|
ol {
|
|
18069
|
-
list-style-type:
|
|
18154
|
+
list-style-type: upper-alpha;
|
|
18070
18155
|
|
|
18071
18156
|
ol {
|
|
18072
|
-
list-style-type:
|
|
18157
|
+
list-style-type: lower-alpha;
|
|
18073
18158
|
|
|
18074
18159
|
ol {
|
|
18075
|
-
list-style-type:
|
|
18160
|
+
list-style-type: upper-roman;
|
|
18161
|
+
|
|
18162
|
+
ol {
|
|
18163
|
+
list-style-type: lower-roman;
|
|
18164
|
+
}
|
|
18076
18165
|
}
|
|
18077
18166
|
}
|
|
18078
18167
|
}
|
|
18079
18168
|
}
|
|
18080
|
-
|
|
18081
|
-
|
|
18082
|
-
|
|
18083
|
-
|
|
18084
|
-
|
|
18085
|
-
|
|
18086
|
-
|
|
18087
|
-
|
|
18088
|
-
padding: 0;
|
|
18089
|
-
|
|
18090
|
-
&:last-child {
|
|
18091
|
-
margin-bottom: 0;
|
|
18092
|
-
}
|
|
18169
|
+
.${unorderedListElement} {
|
|
18170
|
+
${commonLineHeight}
|
|
18171
|
+
display: block;
|
|
18172
|
+
list-style: disc;
|
|
18173
|
+
list-style-position: outside;
|
|
18174
|
+
margin-bottom: var(--spacing-base);
|
|
18175
|
+
margin-top: 0;
|
|
18176
|
+
padding: 0;
|
|
18093
18177
|
|
|
18094
|
-
|
|
18095
|
-
|
|
18178
|
+
&:last-child {
|
|
18179
|
+
margin-bottom: 0;
|
|
18180
|
+
}
|
|
18096
18181
|
|
|
18097
18182
|
ul {
|
|
18098
|
-
list-style-type:
|
|
18183
|
+
list-style-type: circle;
|
|
18184
|
+
|
|
18185
|
+
ul {
|
|
18186
|
+
list-style-type: square;
|
|
18187
|
+
}
|
|
18099
18188
|
}
|
|
18100
18189
|
}
|
|
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;
|
|
18190
|
+
.${listItemElement} {
|
|
18191
|
+
margin-left: var(--spacing-md);
|
|
18116
18192
|
}
|
|
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);
|
|
18193
|
+
.${nestedListItemElement} {
|
|
18194
|
+
list-style-type: none;
|
|
18195
|
+
}
|
|
18196
|
+
.${blockquoteElement} {
|
|
18197
|
+
border-left: 0.25rem solid var(--gray-300);
|
|
18198
|
+
color: var(--gray-600);
|
|
18199
|
+
margin-bottom: var(--spacing-base);
|
|
18200
|
+
padding-left: var(--spacing-base);
|
|
18128
18201
|
|
|
18129
|
-
|
|
18130
|
-
|
|
18202
|
+
&:last-child {
|
|
18203
|
+
margin-bottom: 0;
|
|
18204
|
+
}
|
|
18131
18205
|
}
|
|
18132
|
-
|
|
18133
|
-
var
|
|
18134
|
-
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18206
|
+
.${codeElement} {
|
|
18207
|
+
background-color: var(--gray-100);
|
|
18208
|
+
border-radius: var(--rounded-sm);
|
|
18209
|
+
display: block;
|
|
18210
|
+
font-family: var(--ff-mono);
|
|
18211
|
+
font-feature-settings: 'liga' 0;
|
|
18212
|
+
font-variant-ligatures: none;
|
|
18213
|
+
font-size: var(--fs-sm);
|
|
18214
|
+
margin-bottom: var(--spacing-base);
|
|
18215
|
+
padding: var(--spacing-sm);
|
|
18141
18216
|
|
|
18142
|
-
|
|
18143
|
-
|
|
18217
|
+
&:last-child {
|
|
18218
|
+
margin-bottom: 0;
|
|
18219
|
+
}
|
|
18144
18220
|
}
|
|
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;
|
|
18221
|
+
.${tableElement} {
|
|
18222
|
+
border-collapse: collapse;
|
|
18223
|
+
border-spacing: 0;
|
|
18224
|
+
border-color: var(--gray-300);
|
|
18225
|
+
border-width: 1px;
|
|
18226
|
+
border-style: solid;
|
|
18227
|
+
margin-bottom: var(--spacing-base);
|
|
18228
|
+
margin-top: 0;
|
|
18159
18229
|
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
content: '';
|
|
18164
|
-
height: 5px;
|
|
18165
|
-
left: 0;
|
|
18166
|
-
position: absolute;
|
|
18167
|
-
top: 100%;
|
|
18168
|
-
width: 100%;
|
|
18169
|
-
z-index: 1;
|
|
18230
|
+
&:last-child {
|
|
18231
|
+
margin-bottom: 0;
|
|
18232
|
+
}
|
|
18170
18233
|
}
|
|
18234
|
+
.${tableCellElement} {
|
|
18235
|
+
background-color: var(--white);
|
|
18236
|
+
border-color: var(--gray-300);
|
|
18237
|
+
border-style: solid;
|
|
18238
|
+
border-width: 1px;
|
|
18239
|
+
box-sizing: unset;
|
|
18240
|
+
min-width: 2rem;
|
|
18241
|
+
outline: none;
|
|
18242
|
+
padding: var(--spacing-sm);
|
|
18243
|
+
position: relative;
|
|
18244
|
+
text-align: start;
|
|
18245
|
+
vertical-align: top;
|
|
18246
|
+
width: 7rem;
|
|
18171
18247
|
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
|
|
18248
|
+
&::after {
|
|
18249
|
+
content: '';
|
|
18250
|
+
height: 5px;
|
|
18251
|
+
left: 0;
|
|
18252
|
+
position: absolute;
|
|
18253
|
+
top: 100%;
|
|
18254
|
+
width: 100%;
|
|
18255
|
+
z-index: 1;
|
|
18256
|
+
}
|
|
18257
|
+
|
|
18258
|
+
&::before {
|
|
18259
|
+
content: '';
|
|
18260
|
+
width: 5px;
|
|
18261
|
+
height: 100%;
|
|
18262
|
+
position: absolute;
|
|
18263
|
+
top: 0;
|
|
18264
|
+
left: 100%;
|
|
18265
|
+
z-index: 1;
|
|
18266
|
+
}
|
|
18267
|
+
}
|
|
18268
|
+
.${tableHeaderElement} {
|
|
18269
|
+
background-color: var(--gray-100);
|
|
18270
|
+
border-color: var(--gray-300);
|
|
18271
|
+
border-style: solid;
|
|
18272
|
+
border-width: 1px;
|
|
18273
|
+
box-sizing: unset;
|
|
18274
|
+
font-weight: normal;
|
|
18275
|
+
min-width: 2rem;
|
|
18276
|
+
outline: none;
|
|
18277
|
+
padding: var(--spacing-sm);
|
|
18278
|
+
text-align: start;
|
|
18279
|
+
vertical-align: top;
|
|
18280
|
+
width: 7rem;
|
|
18180
18281
|
}
|
|
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
18282
|
`;
|
|
18196
18283
|
|
|
18197
18284
|
// src/components/ParameterInputs/rich-text/ImprovedAssetSelectionPlugin.tsx
|
|
@@ -18199,10 +18286,10 @@ init_emotion_jsx_shim();
|
|
|
18199
18286
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
18200
18287
|
var import_utils6 = require("@lexical/utils");
|
|
18201
18288
|
var import_lexical2 = require("lexical");
|
|
18202
|
-
var
|
|
18289
|
+
var import_react166 = require("react");
|
|
18203
18290
|
var ImprovedAssetSelectionPlugin = () => {
|
|
18204
18291
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
18205
|
-
(0,
|
|
18292
|
+
(0, import_react166.useEffect)(() => {
|
|
18206
18293
|
editor.getRootElement();
|
|
18207
18294
|
const onRootClick = (event) => {
|
|
18208
18295
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -18251,13 +18338,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
18251
18338
|
|
|
18252
18339
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
18253
18340
|
init_emotion_jsx_shim();
|
|
18254
|
-
var
|
|
18341
|
+
var import_react167 = require("@emotion/react");
|
|
18255
18342
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
18256
18343
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
18257
18344
|
var import_utils7 = require("@lexical/utils");
|
|
18258
18345
|
var import_fast_equals = require("fast-equals");
|
|
18259
18346
|
var import_lexical4 = require("lexical");
|
|
18260
|
-
var
|
|
18347
|
+
var import_react168 = require("react");
|
|
18261
18348
|
|
|
18262
18349
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
18263
18350
|
init_emotion_jsx_shim();
|
|
@@ -18605,18 +18692,18 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
18605
18692
|
);
|
|
18606
18693
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
18607
18694
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
18608
|
-
var linkPopover =
|
|
18695
|
+
var linkPopover = import_react167.css`
|
|
18609
18696
|
position: absolute;
|
|
18610
18697
|
z-index: 11;
|
|
18611
18698
|
`;
|
|
18612
|
-
var linkPopoverContainer =
|
|
18699
|
+
var linkPopoverContainer = import_react167.css`
|
|
18613
18700
|
${Popover};
|
|
18614
18701
|
${PopoverBody};
|
|
18615
18702
|
${PopoverVariantSmall};
|
|
18616
18703
|
align-items: center;
|
|
18617
18704
|
display: flex;
|
|
18618
18705
|
`;
|
|
18619
|
-
var linkPopoverAnchor =
|
|
18706
|
+
var linkPopoverAnchor = import_react167.css`
|
|
18620
18707
|
${link}
|
|
18621
18708
|
${linkColorDefault}
|
|
18622
18709
|
`;
|
|
@@ -18629,17 +18716,17 @@ function LinkNodePlugin({
|
|
|
18629
18716
|
return path;
|
|
18630
18717
|
};
|
|
18631
18718
|
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,
|
|
18719
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react168.useState)();
|
|
18720
|
+
const linkPopoverElRef = (0, import_react168.useRef)(null);
|
|
18721
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react168.useState)(false);
|
|
18722
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react168.useState)(false);
|
|
18723
|
+
(0, import_react168.useEffect)(() => {
|
|
18637
18724
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
18638
18725
|
setLinkPopoverState(void 0);
|
|
18639
18726
|
return;
|
|
18640
18727
|
}
|
|
18641
18728
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
18642
|
-
(0,
|
|
18729
|
+
(0, import_react168.useEffect)(() => {
|
|
18643
18730
|
if (!editor.hasNodes([LinkNode])) {
|
|
18644
18731
|
throw new Error("LinkNode not registered on editor");
|
|
18645
18732
|
}
|
|
@@ -18743,7 +18830,7 @@ function LinkNodePlugin({
|
|
|
18743
18830
|
)
|
|
18744
18831
|
);
|
|
18745
18832
|
}, [editor, onConnectLink]);
|
|
18746
|
-
const maybeShowLinkToolbar = (0,
|
|
18833
|
+
const maybeShowLinkToolbar = (0, import_react168.useCallback)(() => {
|
|
18747
18834
|
if (!editor.isEditable()) {
|
|
18748
18835
|
return;
|
|
18749
18836
|
}
|
|
@@ -18777,7 +18864,7 @@ function LinkNodePlugin({
|
|
|
18777
18864
|
}
|
|
18778
18865
|
});
|
|
18779
18866
|
}, [editor, positioningAnchorEl]);
|
|
18780
|
-
(0,
|
|
18867
|
+
(0, import_react168.useEffect)(() => {
|
|
18781
18868
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18782
18869
|
requestAnimationFrame(() => {
|
|
18783
18870
|
editorState.read(() => {
|
|
@@ -18865,7 +18952,7 @@ var import_list = require("@lexical/list");
|
|
|
18865
18952
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
18866
18953
|
var import_utils10 = require("@lexical/utils");
|
|
18867
18954
|
var import_lexical5 = require("lexical");
|
|
18868
|
-
var
|
|
18955
|
+
var import_react169 = require("react");
|
|
18869
18956
|
function isIndentPermitted(maxDepth) {
|
|
18870
18957
|
const selection = (0, import_lexical5.$getSelection)();
|
|
18871
18958
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -18920,8 +19007,8 @@ function $indentOverTab(selection) {
|
|
|
18920
19007
|
}
|
|
18921
19008
|
function ListIndentPlugin({ maxDepth }) {
|
|
18922
19009
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
18923
|
-
const isInListItemNode = (0,
|
|
18924
|
-
(0,
|
|
19010
|
+
const isInListItemNode = (0, import_react169.useRef)(false);
|
|
19011
|
+
(0, import_react169.useEffect)(() => {
|
|
18925
19012
|
return editor.registerCommand(
|
|
18926
19013
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
18927
19014
|
() => {
|
|
@@ -18938,7 +19025,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
18938
19025
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
18939
19026
|
);
|
|
18940
19027
|
}, [editor]);
|
|
18941
|
-
(0,
|
|
19028
|
+
(0, import_react169.useEffect)(() => {
|
|
18942
19029
|
return (0, import_utils10.mergeRegister)(
|
|
18943
19030
|
editor.registerCommand(
|
|
18944
19031
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
@@ -18968,12 +19055,12 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
18968
19055
|
|
|
18969
19056
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
18970
19057
|
init_emotion_jsx_shim();
|
|
18971
|
-
var
|
|
19058
|
+
var import_react170 = require("@emotion/react");
|
|
18972
19059
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
18973
19060
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
18974
19061
|
var import_table = require("@lexical/table");
|
|
18975
19062
|
var import_lexical6 = require("lexical");
|
|
18976
|
-
var
|
|
19063
|
+
var import_react171 = require("react");
|
|
18977
19064
|
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
18978
19065
|
function computeSelectionCount(selection) {
|
|
18979
19066
|
const selectionShape = selection.getShape();
|
|
@@ -18982,14 +19069,14 @@ function computeSelectionCount(selection) {
|
|
|
18982
19069
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
18983
19070
|
};
|
|
18984
19071
|
}
|
|
18985
|
-
var tableActionMenuTrigger =
|
|
19072
|
+
var tableActionMenuTrigger = import_react170.css`
|
|
18986
19073
|
position: absolute;
|
|
18987
19074
|
transform: translate(calc(-100% - 1px), 1px);
|
|
18988
19075
|
`;
|
|
18989
|
-
var TableActionMenuTrigger = (0,
|
|
19076
|
+
var TableActionMenuTrigger = (0, import_react171.forwardRef)((props, ref) => {
|
|
18990
19077
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
18991
|
-
const [coordinates, setCoordinates] = (0,
|
|
18992
|
-
(0,
|
|
19078
|
+
const [coordinates, setCoordinates] = (0, import_react171.useState)({ x: 0, y: 0 });
|
|
19079
|
+
(0, import_react171.useLayoutEffect)(() => {
|
|
18993
19080
|
const rect = tableCellEl.getBoundingClientRect();
|
|
18994
19081
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
18995
19082
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
@@ -19022,16 +19109,16 @@ function TableActionMenu({
|
|
|
19022
19109
|
positioningAnchorEl
|
|
19023
19110
|
}) {
|
|
19024
19111
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
19025
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
19026
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
19112
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react171.useState)(_tableCellNode);
|
|
19113
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react171.useState)({
|
|
19027
19114
|
columns: 1,
|
|
19028
19115
|
rows: 1
|
|
19029
19116
|
});
|
|
19030
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
19117
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react171.useState)(0);
|
|
19031
19118
|
const incrementMenuTriggerKey = () => {
|
|
19032
19119
|
setMenuTriggerKey((key) => key += 1);
|
|
19033
19120
|
};
|
|
19034
|
-
(0,
|
|
19121
|
+
(0, import_react171.useEffect)(() => {
|
|
19035
19122
|
return editor.registerMutationListener(
|
|
19036
19123
|
import_table.TableCellNode,
|
|
19037
19124
|
(nodeMutations) => {
|
|
@@ -19045,7 +19132,7 @@ function TableActionMenu({
|
|
|
19045
19132
|
{ skipInitialization: true }
|
|
19046
19133
|
);
|
|
19047
19134
|
}, [editor, tableCellNode]);
|
|
19048
|
-
(0,
|
|
19135
|
+
(0, import_react171.useEffect)(() => {
|
|
19049
19136
|
editor.getEditorState().read(() => {
|
|
19050
19137
|
const selection = (0, import_lexical6.$getSelection)();
|
|
19051
19138
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -19053,7 +19140,7 @@ function TableActionMenu({
|
|
|
19053
19140
|
}
|
|
19054
19141
|
});
|
|
19055
19142
|
}, [editor]);
|
|
19056
|
-
const clearTableSelection = (0,
|
|
19143
|
+
const clearTableSelection = (0, import_react171.useCallback)(() => {
|
|
19057
19144
|
editor.update(() => {
|
|
19058
19145
|
if (tableCellNode.isAttached()) {
|
|
19059
19146
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -19070,7 +19157,7 @@ function TableActionMenu({
|
|
|
19070
19157
|
(0, import_lexical6.$setSelection)(null);
|
|
19071
19158
|
});
|
|
19072
19159
|
}, [editor, tableCellNode]);
|
|
19073
|
-
const insertTableRowAtSelection = (0,
|
|
19160
|
+
const insertTableRowAtSelection = (0, import_react171.useCallback)(
|
|
19074
19161
|
(shouldInsertAfter) => {
|
|
19075
19162
|
editor.update(() => {
|
|
19076
19163
|
for (let i = 0; i < selectionCounts.rows; i++) {
|
|
@@ -19080,7 +19167,7 @@ function TableActionMenu({
|
|
|
19080
19167
|
},
|
|
19081
19168
|
[editor, selectionCounts.rows]
|
|
19082
19169
|
);
|
|
19083
|
-
const insertTableColumnAtSelection = (0,
|
|
19170
|
+
const insertTableColumnAtSelection = (0, import_react171.useCallback)(
|
|
19084
19171
|
(shouldInsertAfter) => {
|
|
19085
19172
|
editor.update(() => {
|
|
19086
19173
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -19090,26 +19177,26 @@ function TableActionMenu({
|
|
|
19090
19177
|
},
|
|
19091
19178
|
[editor, selectionCounts.columns]
|
|
19092
19179
|
);
|
|
19093
|
-
const deleteTableRowAtSelection = (0,
|
|
19180
|
+
const deleteTableRowAtSelection = (0, import_react171.useCallback)(() => {
|
|
19094
19181
|
editor.update(() => {
|
|
19095
19182
|
(0, import_table.$deleteTableRowAtSelection)();
|
|
19096
19183
|
});
|
|
19097
19184
|
incrementMenuTriggerKey();
|
|
19098
19185
|
}, [editor]);
|
|
19099
|
-
const deleteTableAtSelection = (0,
|
|
19186
|
+
const deleteTableAtSelection = (0, import_react171.useCallback)(() => {
|
|
19100
19187
|
editor.update(() => {
|
|
19101
19188
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19102
19189
|
tableNode.remove();
|
|
19103
19190
|
clearTableSelection();
|
|
19104
19191
|
});
|
|
19105
19192
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19106
|
-
const deleteTableColumnAtSelection = (0,
|
|
19193
|
+
const deleteTableColumnAtSelection = (0, import_react171.useCallback)(() => {
|
|
19107
19194
|
editor.update(() => {
|
|
19108
19195
|
(0, import_table.$deleteTableColumnAtSelection)();
|
|
19109
19196
|
});
|
|
19110
19197
|
incrementMenuTriggerKey();
|
|
19111
19198
|
}, [editor]);
|
|
19112
|
-
const toggleTableRowIsHeader = (0,
|
|
19199
|
+
const toggleTableRowIsHeader = (0, import_react171.useCallback)(() => {
|
|
19113
19200
|
editor.update(() => {
|
|
19114
19201
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19115
19202
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -19129,7 +19216,7 @@ function TableActionMenu({
|
|
|
19129
19216
|
clearTableSelection();
|
|
19130
19217
|
});
|
|
19131
19218
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19132
|
-
const toggleTableColumnIsHeader = (0,
|
|
19219
|
+
const toggleTableColumnIsHeader = (0, import_react171.useCallback)(() => {
|
|
19133
19220
|
editor.update(() => {
|
|
19134
19221
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19135
19222
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -19149,7 +19236,7 @@ function TableActionMenu({
|
|
|
19149
19236
|
clearTableSelection();
|
|
19150
19237
|
});
|
|
19151
19238
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19152
|
-
const menuItemCss = (0,
|
|
19239
|
+
const menuItemCss = (0, import_react170.css)({
|
|
19153
19240
|
fontSize: "var(--fs-sm)"
|
|
19154
19241
|
});
|
|
19155
19242
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
@@ -19220,10 +19307,10 @@ function TableCellActionMenuContainer({
|
|
|
19220
19307
|
positioningAnchorEl
|
|
19221
19308
|
}) {
|
|
19222
19309
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
19223
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
19224
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
19225
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
19226
|
-
(0,
|
|
19310
|
+
const [tableCellNode, setTableMenuCellNode] = (0, import_react171.useState)(null);
|
|
19311
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0, import_react171.useState)(null);
|
|
19312
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0, import_react171.useState)(null);
|
|
19313
|
+
(0, import_react171.useEffect)(() => {
|
|
19227
19314
|
const newPortalEl = document.createElement("div");
|
|
19228
19315
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
19229
19316
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -19231,14 +19318,14 @@ function TableCellActionMenuContainer({
|
|
|
19231
19318
|
newPortalEl.remove();
|
|
19232
19319
|
};
|
|
19233
19320
|
}, [menuPortalEl]);
|
|
19234
|
-
const setTableMenuCellNodeElem = (0,
|
|
19321
|
+
const setTableMenuCellNodeElem = (0, import_react171.useCallback)((elem) => {
|
|
19235
19322
|
if (elem) {
|
|
19236
19323
|
_setTableMenuCellNodeEl(elem);
|
|
19237
19324
|
} else {
|
|
19238
19325
|
_setTableMenuCellNodeEl(null);
|
|
19239
19326
|
}
|
|
19240
19327
|
}, []);
|
|
19241
|
-
const $moveMenu = (0,
|
|
19328
|
+
const $moveMenu = (0, import_react171.useCallback)(() => {
|
|
19242
19329
|
const selection = (0, import_lexical6.$getSelection)();
|
|
19243
19330
|
const nativeSelection = window.getSelection();
|
|
19244
19331
|
const activeElement = document.activeElement;
|
|
@@ -19267,7 +19354,7 @@ function TableCellActionMenuContainer({
|
|
|
19267
19354
|
setTableMenuCellNodeElem(null);
|
|
19268
19355
|
}
|
|
19269
19356
|
}, [editor, setTableMenuCellNodeElem]);
|
|
19270
|
-
(0,
|
|
19357
|
+
(0, import_react171.useEffect)(() => {
|
|
19271
19358
|
return editor.registerUpdateListener(() => {
|
|
19272
19359
|
editor.getEditorState().read(() => {
|
|
19273
19360
|
$moveMenu();
|
|
@@ -19295,18 +19382,18 @@ function TableActionMenuPlugin({
|
|
|
19295
19382
|
|
|
19296
19383
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
19297
19384
|
init_emotion_jsx_shim();
|
|
19298
|
-
var
|
|
19385
|
+
var import_react172 = require("@emotion/react");
|
|
19299
19386
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
19300
19387
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
19301
19388
|
var import_table2 = require("@lexical/table");
|
|
19302
19389
|
var import_utils12 = require("@lexical/utils");
|
|
19303
19390
|
var import_lexical7 = require("lexical");
|
|
19304
|
-
var
|
|
19391
|
+
var import_react173 = require("react");
|
|
19305
19392
|
var import_react_dom3 = require("react-dom");
|
|
19306
19393
|
var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
|
|
19307
19394
|
var MIN_ROW_HEIGHT = 33;
|
|
19308
19395
|
var MIN_COLUMN_WIDTH = 50;
|
|
19309
|
-
var tableResizer =
|
|
19396
|
+
var tableResizer = import_react172.css`
|
|
19310
19397
|
position: absolute;
|
|
19311
19398
|
z-index: var(--z-10);
|
|
19312
19399
|
`;
|
|
@@ -19328,15 +19415,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
19328
19415
|
return null;
|
|
19329
19416
|
};
|
|
19330
19417
|
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,
|
|
19418
|
+
const targetRef = (0, import_react173.useRef)(null);
|
|
19419
|
+
const resizerRef = (0, import_react173.useRef)(null);
|
|
19420
|
+
const tableRectRef = (0, import_react173.useRef)(null);
|
|
19421
|
+
const mouseStartPosRef = (0, import_react173.useRef)(null);
|
|
19422
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = (0, import_react173.useState)(null);
|
|
19423
|
+
const [activeCell, updateActiveCell] = (0, import_react173.useState)(null);
|
|
19424
|
+
const [isMouseDown, updateIsMouseDown] = (0, import_react173.useState)(false);
|
|
19425
|
+
const [draggingDirection, updateDraggingDirection] = (0, import_react173.useState)(null);
|
|
19426
|
+
const resetState = (0, import_react173.useCallback)(() => {
|
|
19340
19427
|
updateActiveCell(null);
|
|
19341
19428
|
targetRef.current = null;
|
|
19342
19429
|
updateDraggingDirection(null);
|
|
@@ -19346,7 +19433,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19346
19433
|
const isMouseDownOnEvent = (event) => {
|
|
19347
19434
|
return (event.buttons & 1) === 1;
|
|
19348
19435
|
};
|
|
19349
|
-
(0,
|
|
19436
|
+
(0, import_react173.useEffect)(() => {
|
|
19350
19437
|
const onMouseMove = (event) => {
|
|
19351
19438
|
setTimeout(() => {
|
|
19352
19439
|
const target = event.target;
|
|
@@ -19413,7 +19500,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19413
19500
|
}
|
|
19414
19501
|
return false;
|
|
19415
19502
|
};
|
|
19416
|
-
const updateRowHeight = (0,
|
|
19503
|
+
const updateRowHeight = (0, import_react173.useCallback)(
|
|
19417
19504
|
(heightChange) => {
|
|
19418
19505
|
if (!activeCell) {
|
|
19419
19506
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -19475,7 +19562,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19475
19562
|
}
|
|
19476
19563
|
}
|
|
19477
19564
|
};
|
|
19478
|
-
const updateColumnWidth = (0,
|
|
19565
|
+
const updateColumnWidth = (0, import_react173.useCallback)(
|
|
19479
19566
|
(widthChange) => {
|
|
19480
19567
|
if (!activeCell) {
|
|
19481
19568
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -19509,7 +19596,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19509
19596
|
},
|
|
19510
19597
|
[activeCell, editor]
|
|
19511
19598
|
);
|
|
19512
|
-
const mouseUpHandler = (0,
|
|
19599
|
+
const mouseUpHandler = (0, import_react173.useCallback)(
|
|
19513
19600
|
(direction) => {
|
|
19514
19601
|
const handler = (event) => {
|
|
19515
19602
|
event.preventDefault();
|
|
@@ -19538,7 +19625,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19538
19625
|
},
|
|
19539
19626
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
19540
19627
|
);
|
|
19541
|
-
const toggleResize = (0,
|
|
19628
|
+
const toggleResize = (0, import_react173.useCallback)(
|
|
19542
19629
|
(direction) => (event) => {
|
|
19543
19630
|
event.preventDefault();
|
|
19544
19631
|
event.stopPropagation();
|
|
@@ -19555,7 +19642,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19555
19642
|
},
|
|
19556
19643
|
[activeCell, mouseUpHandler]
|
|
19557
19644
|
);
|
|
19558
|
-
const getResizers = (0,
|
|
19645
|
+
const getResizers = (0, import_react173.useCallback)(() => {
|
|
19559
19646
|
if (activeCell) {
|
|
19560
19647
|
const { height, width, top: top2, left } = activeCell.elem.getBoundingClientRect();
|
|
19561
19648
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -19626,7 +19713,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19626
19713
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
19627
19714
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
19628
19715
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
19629
|
-
return (0,
|
|
19716
|
+
return (0, import_react173.useMemo)(
|
|
19630
19717
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
19631
19718
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
19632
19719
|
positioningAnchorEl
|
|
@@ -19640,11 +19727,11 @@ init_emotion_jsx_shim();
|
|
|
19640
19727
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
19641
19728
|
var import_table3 = require("@lexical/table");
|
|
19642
19729
|
var import_lexical8 = require("lexical");
|
|
19643
|
-
var
|
|
19730
|
+
var import_react174 = require("react");
|
|
19644
19731
|
var TableSelectionPlugin = () => {
|
|
19645
19732
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
19646
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
19647
|
-
(0,
|
|
19733
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react174.useState)(null);
|
|
19734
|
+
(0, import_react174.useEffect)(() => {
|
|
19648
19735
|
return editor.registerCommand(
|
|
19649
19736
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
19650
19737
|
() => {
|
|
@@ -19666,7 +19753,7 @@ var TableSelectionPlugin = () => {
|
|
|
19666
19753
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
19667
19754
|
);
|
|
19668
19755
|
}, [editor]);
|
|
19669
|
-
(0,
|
|
19756
|
+
(0, import_react174.useEffect)(() => {
|
|
19670
19757
|
const onControlA = (event) => {
|
|
19671
19758
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
19672
19759
|
if (!closestTableCellNode) {
|
|
@@ -19690,7 +19777,7 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
19690
19777
|
|
|
19691
19778
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
19692
19779
|
init_emotion_jsx_shim();
|
|
19693
|
-
var
|
|
19780
|
+
var import_react176 = require("@emotion/react");
|
|
19694
19781
|
var import_code2 = require("@lexical/code");
|
|
19695
19782
|
var import_list2 = require("@lexical/list");
|
|
19696
19783
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -19699,7 +19786,7 @@ var import_selection2 = require("@lexical/selection");
|
|
|
19699
19786
|
var import_table4 = require("@lexical/table");
|
|
19700
19787
|
var import_utils13 = require("@lexical/utils");
|
|
19701
19788
|
var import_lexical9 = require("lexical");
|
|
19702
|
-
var
|
|
19789
|
+
var import_react177 = require("react");
|
|
19703
19790
|
|
|
19704
19791
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
19705
19792
|
init_emotion_jsx_shim();
|
|
@@ -19717,29 +19804,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
19717
19804
|
|
|
19718
19805
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
19719
19806
|
init_emotion_jsx_shim();
|
|
19720
|
-
var
|
|
19807
|
+
var import_react175 = require("react");
|
|
19721
19808
|
var useRichTextToolbarState = ({ config }) => {
|
|
19722
19809
|
var _a;
|
|
19723
|
-
const enabledBuiltInFormats = (0,
|
|
19810
|
+
const enabledBuiltInFormats = (0, import_react175.useMemo)(() => {
|
|
19724
19811
|
return richTextBuiltInFormats.filter((format) => {
|
|
19725
19812
|
var _a2, _b;
|
|
19726
19813
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
19727
19814
|
});
|
|
19728
19815
|
}, [config]);
|
|
19729
|
-
const enabledBuiltInElements = (0,
|
|
19816
|
+
const enabledBuiltInElements = (0, import_react175.useMemo)(() => {
|
|
19730
19817
|
return richTextBuiltInElements.filter((element) => {
|
|
19731
19818
|
var _a2, _b;
|
|
19732
19819
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
19733
19820
|
});
|
|
19734
19821
|
}, [config]);
|
|
19735
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
19822
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react175.useMemo)(() => {
|
|
19736
19823
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
19737
19824
|
}, [enabledBuiltInFormats]);
|
|
19738
19825
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
19739
19826
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
19740
19827
|
);
|
|
19741
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
19742
|
-
const visibleFormatsWithIcon = (0,
|
|
19828
|
+
const [activeFormats, setActiveFormats] = (0, import_react175.useState)([]);
|
|
19829
|
+
const visibleFormatsWithIcon = (0, import_react175.useMemo)(() => {
|
|
19743
19830
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19744
19831
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19745
19832
|
visibleFormats.add(type);
|
|
@@ -19749,7 +19836,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19749
19836
|
});
|
|
19750
19837
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19751
19838
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
19752
|
-
const visibleFormatsWithoutIcon = (0,
|
|
19839
|
+
const visibleFormatsWithoutIcon = (0, import_react175.useMemo)(() => {
|
|
19753
19840
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19754
19841
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19755
19842
|
visibleFormats.add(type);
|
|
@@ -19759,11 +19846,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19759
19846
|
});
|
|
19760
19847
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19761
19848
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
19762
|
-
const [activeElement, setActiveElement] = (0,
|
|
19849
|
+
const [activeElement, setActiveElement] = (0, import_react175.useState)("paragraph");
|
|
19763
19850
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
19764
19851
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
19765
19852
|
);
|
|
19766
|
-
const visibleTextualElements = (0,
|
|
19853
|
+
const visibleTextualElements = (0, import_react175.useMemo)(() => {
|
|
19767
19854
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
19768
19855
|
return enabledTextualElements;
|
|
19769
19856
|
}
|
|
@@ -19774,30 +19861,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19774
19861
|
}
|
|
19775
19862
|
);
|
|
19776
19863
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
19777
|
-
const [isLink, setIsLink] = (0,
|
|
19778
|
-
const linkElementVisible = (0,
|
|
19864
|
+
const [isLink, setIsLink] = (0, import_react175.useState)(false);
|
|
19865
|
+
const linkElementVisible = (0, import_react175.useMemo)(() => {
|
|
19779
19866
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
19780
19867
|
}, [isLink, enabledBuiltInElements]);
|
|
19781
|
-
const visibleLists = (0,
|
|
19868
|
+
const visibleLists = (0, import_react175.useMemo)(() => {
|
|
19782
19869
|
return new Set(
|
|
19783
19870
|
["orderedList", "unorderedList"].filter(
|
|
19784
19871
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
19785
19872
|
)
|
|
19786
19873
|
);
|
|
19787
19874
|
}, [activeElement, enabledBuiltInElements]);
|
|
19788
|
-
const quoteElementVisible = (0,
|
|
19875
|
+
const quoteElementVisible = (0, import_react175.useMemo)(() => {
|
|
19789
19876
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
19790
19877
|
}, [activeElement, enabledBuiltInElements]);
|
|
19791
|
-
const codeElementVisible = (0,
|
|
19878
|
+
const codeElementVisible = (0, import_react175.useMemo)(() => {
|
|
19792
19879
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
19793
19880
|
}, [activeElement, enabledBuiltInElements]);
|
|
19794
|
-
const tableElementVisible = (0,
|
|
19881
|
+
const tableElementVisible = (0, import_react175.useMemo)(() => {
|
|
19795
19882
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
19796
19883
|
}, [activeElement, enabledBuiltInElements]);
|
|
19797
|
-
const assetElementVisible = (0,
|
|
19884
|
+
const assetElementVisible = (0, import_react175.useMemo)(() => {
|
|
19798
19885
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
19799
19886
|
}, [activeElement, enabledBuiltInElements]);
|
|
19800
|
-
const visibleElementsWithIcons = (0,
|
|
19887
|
+
const visibleElementsWithIcons = (0, import_react175.useMemo)(() => {
|
|
19801
19888
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19802
19889
|
if (linkElementVisible) {
|
|
19803
19890
|
visibleElements.add("link");
|
|
@@ -19809,7 +19896,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19809
19896
|
}
|
|
19810
19897
|
return visibleElements;
|
|
19811
19898
|
}, [linkElementVisible, visibleLists]);
|
|
19812
|
-
const visibleInsertElementsWithIcons = (0,
|
|
19899
|
+
const visibleInsertElementsWithIcons = (0, import_react175.useMemo)(() => {
|
|
19813
19900
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19814
19901
|
if (quoteElementVisible) {
|
|
19815
19902
|
visibleElements.add("quote");
|
|
@@ -19848,7 +19935,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19848
19935
|
|
|
19849
19936
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
19850
19937
|
var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
|
|
19851
|
-
var toolbar =
|
|
19938
|
+
var toolbar = import_react176.css`
|
|
19852
19939
|
${scrollbarStyles}
|
|
19853
19940
|
background: var(--gray-50);
|
|
19854
19941
|
border-radius: var(--rounded-base);
|
|
@@ -19862,13 +19949,13 @@ var toolbar = import_react174.css`
|
|
|
19862
19949
|
top: calc(var(--spacing-sm) * -2);
|
|
19863
19950
|
z-index: 10;
|
|
19864
19951
|
`;
|
|
19865
|
-
var toolbarGroup =
|
|
19952
|
+
var toolbarGroup = import_react176.css`
|
|
19866
19953
|
display: flex;
|
|
19867
19954
|
flex-shrink: 0;
|
|
19868
19955
|
gap: var(--spacing-xs);
|
|
19869
19956
|
position: relative;
|
|
19870
19957
|
|
|
19871
|
-
&:not(:first-
|
|
19958
|
+
&:not(:first-of-type)::before {
|
|
19872
19959
|
background-color: var(--gray-300);
|
|
19873
19960
|
content: '';
|
|
19874
19961
|
display: block;
|
|
@@ -19879,7 +19966,7 @@ var toolbarGroup = import_react174.css`
|
|
|
19879
19966
|
width: 1px;
|
|
19880
19967
|
}
|
|
19881
19968
|
`;
|
|
19882
|
-
var richTextToolbarButton =
|
|
19969
|
+
var richTextToolbarButton = import_react176.css`
|
|
19883
19970
|
align-items: center;
|
|
19884
19971
|
appearance: none;
|
|
19885
19972
|
border: 0;
|
|
@@ -19893,17 +19980,17 @@ var richTextToolbarButton = import_react174.css`
|
|
|
19893
19980
|
min-width: 32px;
|
|
19894
19981
|
padding: 0 var(--spacing-sm);
|
|
19895
19982
|
`;
|
|
19896
|
-
var richTextToolbarButtonActive =
|
|
19983
|
+
var richTextToolbarButtonActive = import_react176.css`
|
|
19897
19984
|
background: var(--gray-200);
|
|
19898
19985
|
`;
|
|
19899
|
-
var textStyleButton =
|
|
19986
|
+
var textStyleButton = import_react176.css`
|
|
19900
19987
|
justify-content: space-between;
|
|
19901
19988
|
min-width: 7rem;
|
|
19902
19989
|
`;
|
|
19903
|
-
var toolbarIcon =
|
|
19990
|
+
var toolbarIcon = import_react176.css`
|
|
19904
19991
|
color: inherit;
|
|
19905
19992
|
`;
|
|
19906
|
-
var toolbarChevron =
|
|
19993
|
+
var toolbarChevron = import_react176.css`
|
|
19907
19994
|
margin-left: var(--spacing-xs);
|
|
19908
19995
|
`;
|
|
19909
19996
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19963,7 +20050,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19963
20050
|
});
|
|
19964
20051
|
});
|
|
19965
20052
|
};
|
|
19966
|
-
const updateToolbar = (0,
|
|
20053
|
+
const updateToolbar = (0, import_react177.useCallback)(() => {
|
|
19967
20054
|
const selection = (0, import_lexical9.$getSelection)();
|
|
19968
20055
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
19969
20056
|
return;
|
|
@@ -20002,7 +20089,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
20002
20089
|
setIsLink(false);
|
|
20003
20090
|
}
|
|
20004
20091
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
20005
|
-
(0,
|
|
20092
|
+
(0, import_react177.useEffect)(() => {
|
|
20006
20093
|
return editor.registerCommand(
|
|
20007
20094
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
20008
20095
|
(_payload) => {
|
|
@@ -20012,7 +20099,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
20012
20099
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
20013
20100
|
);
|
|
20014
20101
|
}, [editor, updateToolbar]);
|
|
20015
|
-
(0,
|
|
20102
|
+
(0, import_react177.useEffect)(() => {
|
|
20016
20103
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20017
20104
|
requestAnimationFrame(() => {
|
|
20018
20105
|
editorState.read(() => {
|
|
@@ -20202,42 +20289,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
20202
20289
|
};
|
|
20203
20290
|
var RichTextToolbar_default = RichTextToolbar;
|
|
20204
20291
|
|
|
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`
|
|
20292
|
+
// src/components/ParameterInputs/styles/ParameterRichText.styles.ts
|
|
20293
|
+
init_emotion_jsx_shim();
|
|
20294
|
+
var import_react178 = require("@emotion/react");
|
|
20295
|
+
var editorContainerWrapper = import_react178.css`
|
|
20241
20296
|
position: relative;
|
|
20242
20297
|
|
|
20243
20298
|
&::before {
|
|
@@ -20253,12 +20308,12 @@ var editorContainerWrapper = import_react176.css`
|
|
|
20253
20308
|
z-index: 2;
|
|
20254
20309
|
}
|
|
20255
20310
|
`;
|
|
20256
|
-
var editorWrapper =
|
|
20311
|
+
var editorWrapper = import_react178.css`
|
|
20257
20312
|
display: flex;
|
|
20258
20313
|
flex-flow: column;
|
|
20259
20314
|
flex-grow: 1;
|
|
20260
20315
|
`;
|
|
20261
|
-
var editorContainer =
|
|
20316
|
+
var editorContainer = import_react178.css`
|
|
20262
20317
|
${scrollbarStyles}
|
|
20263
20318
|
background: var(--white);
|
|
20264
20319
|
border-radius: var(--rounded-sm);
|
|
@@ -20290,7 +20345,7 @@ var editorContainer = import_react176.css`
|
|
|
20290
20345
|
max-height: unset;
|
|
20291
20346
|
}
|
|
20292
20347
|
`;
|
|
20293
|
-
var editorContainerOverflowWrapper =
|
|
20348
|
+
var editorContainerOverflowWrapper = import_react178.css`
|
|
20294
20349
|
overflow: hidden;
|
|
20295
20350
|
pointer-events: none;
|
|
20296
20351
|
|
|
@@ -20298,7 +20353,7 @@ var editorContainerOverflowWrapper = import_react176.css`
|
|
|
20298
20353
|
pointer-events: auto;
|
|
20299
20354
|
}
|
|
20300
20355
|
`;
|
|
20301
|
-
var editorPlaceholder =
|
|
20356
|
+
var editorPlaceholder = import_react178.css`
|
|
20302
20357
|
color: var(--gray-500);
|
|
20303
20358
|
font-style: italic;
|
|
20304
20359
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20309,7 +20364,7 @@ var editorPlaceholder = import_react176.css`
|
|
|
20309
20364
|
top: calc(1rem + var(--spacing-sm));
|
|
20310
20365
|
user-select: none;
|
|
20311
20366
|
`;
|
|
20312
|
-
var editorInput =
|
|
20367
|
+
var editorInput = import_react178.css`
|
|
20313
20368
|
min-height: 100%;
|
|
20314
20369
|
flex-grow: 1;
|
|
20315
20370
|
|
|
@@ -20318,6 +20373,42 @@ var editorInput = import_react176.css`
|
|
|
20318
20373
|
outline: none;
|
|
20319
20374
|
}
|
|
20320
20375
|
`;
|
|
20376
|
+
|
|
20377
|
+
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
20378
|
+
var import_jsx_runtime144 = require("@emotion/react/jsx-runtime");
|
|
20379
|
+
var ParameterRichText = ({
|
|
20380
|
+
label: label2,
|
|
20381
|
+
labelLeadingIcon,
|
|
20382
|
+
hiddenLabel,
|
|
20383
|
+
id,
|
|
20384
|
+
errorMessage,
|
|
20385
|
+
caption,
|
|
20386
|
+
errorTestId,
|
|
20387
|
+
captionTestId,
|
|
20388
|
+
menuItems,
|
|
20389
|
+
children,
|
|
20390
|
+
...innerProps
|
|
20391
|
+
}) => {
|
|
20392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
20393
|
+
ParameterShell,
|
|
20394
|
+
{
|
|
20395
|
+
"data-testid": "parameter-richtext",
|
|
20396
|
+
label: label2,
|
|
20397
|
+
hiddenLabel,
|
|
20398
|
+
labelLeadingIcon,
|
|
20399
|
+
id,
|
|
20400
|
+
errorMessage,
|
|
20401
|
+
caption,
|
|
20402
|
+
errorTestId,
|
|
20403
|
+
captionTestId,
|
|
20404
|
+
menuItems,
|
|
20405
|
+
children: [
|
|
20406
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ParameterRichTextInner, { ...innerProps, children }),
|
|
20407
|
+
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
|
|
20408
|
+
]
|
|
20409
|
+
}
|
|
20410
|
+
);
|
|
20411
|
+
};
|
|
20321
20412
|
var ParameterRichTextInner = ({
|
|
20322
20413
|
value,
|
|
20323
20414
|
editorFooter,
|
|
@@ -20383,7 +20474,7 @@ var ParameterRichTextInner = ({
|
|
|
20383
20474
|
editable: !richTextProps.readOnly
|
|
20384
20475
|
};
|
|
20385
20476
|
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 }) }) }),
|
|
20477
|
+
/* @__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
20478
|
editorFooter ? editorFooter : null
|
|
20388
20479
|
] });
|
|
20389
20480
|
};
|
|
@@ -20413,12 +20504,12 @@ var RichText = ({
|
|
|
20413
20504
|
placeholder
|
|
20414
20505
|
}) => {
|
|
20415
20506
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
20416
|
-
(0,
|
|
20507
|
+
(0, import_react179.useEffect)(() => {
|
|
20417
20508
|
if (onRichTextInit) {
|
|
20418
20509
|
onRichTextInit(editor);
|
|
20419
20510
|
}
|
|
20420
20511
|
}, [editor, onRichTextInit]);
|
|
20421
|
-
(0,
|
|
20512
|
+
(0, import_react179.useEffect)(() => {
|
|
20422
20513
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
20423
20514
|
requestAnimationFrame(() => {
|
|
20424
20515
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -20435,16 +20526,16 @@ var RichText = ({
|
|
|
20435
20526
|
removeUpdateListener();
|
|
20436
20527
|
};
|
|
20437
20528
|
}, [editor, onChange]);
|
|
20438
|
-
(0,
|
|
20529
|
+
(0, import_react179.useEffect)(() => {
|
|
20439
20530
|
editor.setEditable(!readOnly);
|
|
20440
20531
|
}, [editor, readOnly]);
|
|
20441
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
20532
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react179.useState)(null);
|
|
20442
20533
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
20443
20534
|
if (_editorContainerRef !== null) {
|
|
20444
20535
|
setEditorContainerRef(_editorContainerRef);
|
|
20445
20536
|
}
|
|
20446
20537
|
};
|
|
20447
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
20538
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react179.useState)(null);
|
|
20448
20539
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
20449
20540
|
if (_portalContainerRef !== null) {
|
|
20450
20541
|
setPortalContainerRef(_portalContainerRef);
|
|
@@ -20522,15 +20613,15 @@ var RichText = ({
|
|
|
20522
20613
|
|
|
20523
20614
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20524
20615
|
init_emotion_jsx_shim();
|
|
20525
|
-
var
|
|
20616
|
+
var import_react180 = require("react");
|
|
20526
20617
|
var import_jsx_runtime145 = require("@emotion/react/jsx-runtime");
|
|
20527
|
-
var ParameterSelect = (0,
|
|
20618
|
+
var ParameterSelect = (0, import_react180.forwardRef)(
|
|
20528
20619
|
({ defaultOption, options, ...props }, ref) => {
|
|
20529
20620
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20530
20621
|
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20531
20622
|
}
|
|
20532
20623
|
);
|
|
20533
|
-
var ParameterSelectInner = (0,
|
|
20624
|
+
var ParameterSelectInner = (0, import_react180.forwardRef)(
|
|
20534
20625
|
({ defaultOption, options, ...props }, ref) => {
|
|
20535
20626
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20536
20627
|
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
@@ -20555,24 +20646,24 @@ var ParameterSelectInner = (0, import_react178.forwardRef)(
|
|
|
20555
20646
|
|
|
20556
20647
|
// src/components/ParameterInputs/ParameterSelectSlider.tsx
|
|
20557
20648
|
init_emotion_jsx_shim();
|
|
20558
|
-
var
|
|
20649
|
+
var import_react181 = require("react");
|
|
20559
20650
|
var import_jsx_runtime146 = require("@emotion/react/jsx-runtime");
|
|
20560
|
-
var ParameterSelectSlider = (0,
|
|
20651
|
+
var ParameterSelectSlider = (0, import_react181.forwardRef)(
|
|
20561
20652
|
(props, ref) => {
|
|
20562
20653
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20563
20654
|
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
20655
|
}
|
|
20565
20656
|
);
|
|
20566
|
-
var ParameterSelectSliderInner = (0,
|
|
20657
|
+
var ParameterSelectSliderInner = (0, import_react181.forwardRef)(({ options, value, onChange, ...props }, ref) => {
|
|
20567
20658
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20568
|
-
const numericValue = (0,
|
|
20659
|
+
const numericValue = (0, import_react181.useMemo)(() => {
|
|
20569
20660
|
if (value === void 0 || value === null || value === "") {
|
|
20570
20661
|
return void 0;
|
|
20571
20662
|
}
|
|
20572
20663
|
const index = options.findIndex((option) => option.value === value);
|
|
20573
20664
|
return index >= 0 ? index : void 0;
|
|
20574
20665
|
}, [options, value]);
|
|
20575
|
-
const handleChange = (0,
|
|
20666
|
+
const handleChange = (0, import_react181.useCallback)(
|
|
20576
20667
|
(newValue) => {
|
|
20577
20668
|
var _a;
|
|
20578
20669
|
if (newValue === void 0) {
|
|
@@ -20602,13 +20693,13 @@ ParameterSelectSliderInner.displayName = "ParameterSelectSliderInner";
|
|
|
20602
20693
|
|
|
20603
20694
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20604
20695
|
init_emotion_jsx_shim();
|
|
20605
|
-
var
|
|
20696
|
+
var import_react182 = require("react");
|
|
20606
20697
|
var import_jsx_runtime147 = require("@emotion/react/jsx-runtime");
|
|
20607
|
-
var ParameterTextarea = (0,
|
|
20698
|
+
var ParameterTextarea = (0, import_react182.forwardRef)((props, ref) => {
|
|
20608
20699
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20609
20700
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20610
20701
|
});
|
|
20611
|
-
var ParameterTextareaInner = (0,
|
|
20702
|
+
var ParameterTextareaInner = (0, import_react182.forwardRef)(({ ...props }, ref) => {
|
|
20612
20703
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20613
20704
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
20614
20705
|
"textarea",
|
|
@@ -20624,14 +20715,14 @@ var ParameterTextareaInner = (0, import_react180.forwardRef)(({ ...props }, ref)
|
|
|
20624
20715
|
|
|
20625
20716
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20626
20717
|
init_emotion_jsx_shim();
|
|
20627
|
-
var
|
|
20718
|
+
var import_react183 = require("react");
|
|
20628
20719
|
var import_jsx_runtime148 = require("@emotion/react/jsx-runtime");
|
|
20629
|
-
var ParameterToggle = (0,
|
|
20720
|
+
var ParameterToggle = (0, import_react183.forwardRef)((props, ref) => {
|
|
20630
20721
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20631
20722
|
return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20632
20723
|
});
|
|
20633
20724
|
ParameterToggle.displayName = "ParameterToggle";
|
|
20634
|
-
var ParameterToggleInner = (0,
|
|
20725
|
+
var ParameterToggleInner = (0, import_react183.forwardRef)(
|
|
20635
20726
|
({ children, ...props }, ref) => {
|
|
20636
20727
|
const { type, withoutIndeterminateState, ...otherProps } = props;
|
|
20637
20728
|
const { id, label: label2 } = useParameterShell();
|
|
@@ -20661,8 +20752,8 @@ init_emotion_jsx_shim();
|
|
|
20661
20752
|
|
|
20662
20753
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20663
20754
|
init_emotion_jsx_shim();
|
|
20664
|
-
var
|
|
20665
|
-
var container4 =
|
|
20755
|
+
var import_react184 = require("@emotion/react");
|
|
20756
|
+
var container4 = import_react184.css`
|
|
20666
20757
|
background: var(--gray-50);
|
|
20667
20758
|
margin-block: var(--spacing-sm);
|
|
20668
20759
|
position: relative;
|
|
@@ -20672,17 +20763,17 @@ var container4 = import_react182.css`
|
|
|
20672
20763
|
border: solid 1px var(--gray-300);
|
|
20673
20764
|
`;
|
|
20674
20765
|
var themeMap = {
|
|
20675
|
-
primary:
|
|
20766
|
+
primary: import_react184.css`
|
|
20676
20767
|
--progress-color: var(--accent-light);
|
|
20677
20768
|
`,
|
|
20678
|
-
secondary:
|
|
20769
|
+
secondary: import_react184.css`
|
|
20679
20770
|
--progress-color: var(--accent-alt-light);
|
|
20680
20771
|
`,
|
|
20681
|
-
destructive:
|
|
20772
|
+
destructive: import_react184.css`
|
|
20682
20773
|
--progress-color: var(--brand-secondary-5);
|
|
20683
20774
|
`
|
|
20684
20775
|
};
|
|
20685
|
-
var slidingBackgroundPosition =
|
|
20776
|
+
var slidingBackgroundPosition = import_react184.keyframes`
|
|
20686
20777
|
from {
|
|
20687
20778
|
background-position: 0 0;
|
|
20688
20779
|
}
|
|
@@ -20690,10 +20781,10 @@ var slidingBackgroundPosition = import_react182.keyframes`
|
|
|
20690
20781
|
background-position: 64px 0;
|
|
20691
20782
|
}
|
|
20692
20783
|
`;
|
|
20693
|
-
var determinate =
|
|
20784
|
+
var determinate = import_react184.css`
|
|
20694
20785
|
background-color: var(--progress-color);
|
|
20695
20786
|
`;
|
|
20696
|
-
var indeterminate =
|
|
20787
|
+
var indeterminate = import_react184.css`
|
|
20697
20788
|
background-image: linear-gradient(
|
|
20698
20789
|
45deg,
|
|
20699
20790
|
var(--progress-color) 25%,
|
|
@@ -20707,7 +20798,7 @@ var indeterminate = import_react182.css`
|
|
|
20707
20798
|
background-size: 64px 64px;
|
|
20708
20799
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
20709
20800
|
`;
|
|
20710
|
-
var bar =
|
|
20801
|
+
var bar = import_react184.css`
|
|
20711
20802
|
position: absolute;
|
|
20712
20803
|
inset: 0;
|
|
20713
20804
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20756,22 +20847,22 @@ function ProgressBar({
|
|
|
20756
20847
|
|
|
20757
20848
|
// src/components/ProgressList/ProgressList.tsx
|
|
20758
20849
|
init_emotion_jsx_shim();
|
|
20759
|
-
var
|
|
20850
|
+
var import_react186 = require("@emotion/react");
|
|
20760
20851
|
var import_CgCheckO4 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20761
20852
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20762
20853
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20763
|
-
var
|
|
20854
|
+
var import_react187 = require("react");
|
|
20764
20855
|
|
|
20765
20856
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20766
20857
|
init_emotion_jsx_shim();
|
|
20767
|
-
var
|
|
20768
|
-
var progressListStyles =
|
|
20858
|
+
var import_react185 = require("@emotion/react");
|
|
20859
|
+
var progressListStyles = import_react185.css`
|
|
20769
20860
|
display: flex;
|
|
20770
20861
|
flex-direction: column;
|
|
20771
20862
|
gap: var(--spacing-sm);
|
|
20772
20863
|
list-style-type: none;
|
|
20773
20864
|
`;
|
|
20774
|
-
var progressListItemStyles =
|
|
20865
|
+
var progressListItemStyles = import_react185.css`
|
|
20775
20866
|
display: flex;
|
|
20776
20867
|
gap: var(--spacing-base);
|
|
20777
20868
|
align-items: center;
|
|
@@ -20780,7 +20871,7 @@ var progressListItemStyles = import_react183.css`
|
|
|
20780
20871
|
// src/components/ProgressList/ProgressList.tsx
|
|
20781
20872
|
var import_jsx_runtime150 = require("@emotion/react/jsx-runtime");
|
|
20782
20873
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20783
|
-
const itemsWithStatus = (0,
|
|
20874
|
+
const itemsWithStatus = (0, import_react187.useMemo)(() => {
|
|
20784
20875
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20785
20876
|
return items.map((item, index) => {
|
|
20786
20877
|
let status = "queued";
|
|
@@ -20813,7 +20904,7 @@ var ProgressListItem = ({
|
|
|
20813
20904
|
errorLevel = "danger",
|
|
20814
20905
|
autoEllipsis = false
|
|
20815
20906
|
}) => {
|
|
20816
|
-
const icon = (0,
|
|
20907
|
+
const icon = (0, import_react187.useMemo)(() => {
|
|
20817
20908
|
if (error) {
|
|
20818
20909
|
return warningIcon;
|
|
20819
20910
|
}
|
|
@@ -20824,14 +20915,14 @@ var ProgressListItem = ({
|
|
|
20824
20915
|
};
|
|
20825
20916
|
return iconPerStatus[status];
|
|
20826
20917
|
}, [status, error]);
|
|
20827
|
-
const statusStyles = (0,
|
|
20918
|
+
const statusStyles = (0, import_react187.useMemo)(() => {
|
|
20828
20919
|
if (error) {
|
|
20829
|
-
return errorLevel === "caution" ?
|
|
20920
|
+
return errorLevel === "caution" ? import_react186.css`
|
|
20830
20921
|
color: rgb(161, 98, 7);
|
|
20831
20922
|
& svg {
|
|
20832
20923
|
color: rgb(250, 204, 21);
|
|
20833
20924
|
}
|
|
20834
|
-
` :
|
|
20925
|
+
` : import_react186.css`
|
|
20835
20926
|
color: rgb(185, 28, 28);
|
|
20836
20927
|
& svg {
|
|
20837
20928
|
color: var(--brand-primary-2);
|
|
@@ -20839,13 +20930,13 @@ var ProgressListItem = ({
|
|
|
20839
20930
|
`;
|
|
20840
20931
|
}
|
|
20841
20932
|
const colorPerStatus = {
|
|
20842
|
-
completed:
|
|
20933
|
+
completed: import_react186.css`
|
|
20843
20934
|
opacity: 0.75;
|
|
20844
20935
|
`,
|
|
20845
|
-
inProgress:
|
|
20936
|
+
inProgress: import_react186.css`
|
|
20846
20937
|
-webkit-text-stroke-width: thin;
|
|
20847
20938
|
`,
|
|
20848
|
-
queued:
|
|
20939
|
+
queued: import_react186.css`
|
|
20849
20940
|
opacity: 0.5;
|
|
20850
20941
|
`
|
|
20851
20942
|
};
|
|
@@ -20862,16 +20953,16 @@ var ProgressListItem = ({
|
|
|
20862
20953
|
|
|
20863
20954
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20864
20955
|
init_emotion_jsx_shim();
|
|
20865
|
-
var
|
|
20866
|
-
var
|
|
20956
|
+
var import_react189 = require("@emotion/react");
|
|
20957
|
+
var import_react190 = require("react");
|
|
20867
20958
|
|
|
20868
20959
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20869
20960
|
init_emotion_jsx_shim();
|
|
20870
|
-
var
|
|
20871
|
-
var segmentedControlRootStyles =
|
|
20961
|
+
var import_react188 = require("@emotion/react");
|
|
20962
|
+
var segmentedControlRootStyles = import_react188.css`
|
|
20872
20963
|
position: relative;
|
|
20873
20964
|
`;
|
|
20874
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
20965
|
+
var segmentedControlScrollIndicatorsStyles = import_react188.css`
|
|
20875
20966
|
position: absolute;
|
|
20876
20967
|
inset: 0;
|
|
20877
20968
|
z-index: 1;
|
|
@@ -20899,17 +20990,17 @@ var segmentedControlScrollIndicatorsStyles = import_react186.css`
|
|
|
20899
20990
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
20900
20991
|
}
|
|
20901
20992
|
`;
|
|
20902
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
20993
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react188.css`
|
|
20903
20994
|
&::before {
|
|
20904
20995
|
opacity: 1;
|
|
20905
20996
|
}
|
|
20906
20997
|
`;
|
|
20907
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
20998
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react188.css`
|
|
20908
20999
|
&::after {
|
|
20909
21000
|
opacity: 1;
|
|
20910
21001
|
}
|
|
20911
21002
|
`;
|
|
20912
|
-
var segmentedControlWrapperStyles =
|
|
21003
|
+
var segmentedControlWrapperStyles = import_react188.css`
|
|
20913
21004
|
overflow-y: auto;
|
|
20914
21005
|
scroll-behavior: smooth;
|
|
20915
21006
|
scrollbar-width: none;
|
|
@@ -20918,7 +21009,7 @@ var segmentedControlWrapperStyles = import_react186.css`
|
|
|
20918
21009
|
height: 0px;
|
|
20919
21010
|
}
|
|
20920
21011
|
`;
|
|
20921
|
-
var segmentedControlStyles =
|
|
21012
|
+
var segmentedControlStyles = import_react188.css`
|
|
20922
21013
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20923
21014
|
--segmented-control-border-width: 1px;
|
|
20924
21015
|
--segmented-control-selected-color: var(--accent-dark);
|
|
@@ -20938,14 +21029,14 @@ var segmentedControlStyles = import_react186.css`
|
|
|
20938
21029
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20939
21030
|
font-size: var(--fs-xs);
|
|
20940
21031
|
`;
|
|
20941
|
-
var segmentedControlVerticalStyles =
|
|
21032
|
+
var segmentedControlVerticalStyles = import_react188.css`
|
|
20942
21033
|
flex-direction: column;
|
|
20943
21034
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20944
21035
|
var(--segmented-control-rounded-value) 0 0;
|
|
20945
21036
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20946
21037
|
var(--segmented-control-rounded-value);
|
|
20947
21038
|
`;
|
|
20948
|
-
var segmentedControlItemStyles =
|
|
21039
|
+
var segmentedControlItemStyles = import_react188.css`
|
|
20949
21040
|
position: relative;
|
|
20950
21041
|
|
|
20951
21042
|
&:first-of-type label {
|
|
@@ -20971,10 +21062,10 @@ var segmentedControlItemStyles = import_react186.css`
|
|
|
20971
21062
|
box-shadow: var(--segmented-control-border-width) 0 0 0 transparent;
|
|
20972
21063
|
}
|
|
20973
21064
|
`;
|
|
20974
|
-
var segmentedControlInputStyles =
|
|
21065
|
+
var segmentedControlInputStyles = import_react188.css`
|
|
20975
21066
|
${accessibleHidden}
|
|
20976
21067
|
`;
|
|
20977
|
-
var segmentedControlLabelStyles =
|
|
21068
|
+
var segmentedControlLabelStyles = import_react188.css`
|
|
20978
21069
|
position: relative;
|
|
20979
21070
|
display: flex;
|
|
20980
21071
|
align-items: center;
|
|
@@ -21009,20 +21100,20 @@ var segmentedControlLabelStyles = import_react186.css`
|
|
|
21009
21100
|
background-color: var(--gray-400);
|
|
21010
21101
|
}
|
|
21011
21102
|
`;
|
|
21012
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21103
|
+
var segmentedControlLabelIconOnlyStyles = import_react188.css`
|
|
21013
21104
|
padding-inline: 0.5em;
|
|
21014
21105
|
`;
|
|
21015
|
-
var segmentedControlLabelCheckStyles =
|
|
21106
|
+
var segmentedControlLabelCheckStyles = import_react188.css`
|
|
21016
21107
|
opacity: 0.5;
|
|
21017
21108
|
`;
|
|
21018
|
-
var segmentedControlLabelContentStyles =
|
|
21109
|
+
var segmentedControlLabelContentStyles = import_react188.css`
|
|
21019
21110
|
display: flex;
|
|
21020
21111
|
align-items: center;
|
|
21021
21112
|
justify-content: center;
|
|
21022
21113
|
gap: var(--spacing-sm);
|
|
21023
21114
|
height: 100%;
|
|
21024
21115
|
`;
|
|
21025
|
-
var segmentedControlLabelTextStyles =
|
|
21116
|
+
var segmentedControlLabelTextStyles = import_react188.css`
|
|
21026
21117
|
white-space: nowrap;
|
|
21027
21118
|
`;
|
|
21028
21119
|
|
|
@@ -21043,10 +21134,10 @@ var SegmentedControl = ({
|
|
|
21043
21134
|
// deprecated, destructured to prevent spreading to DOM
|
|
21044
21135
|
...props
|
|
21045
21136
|
}) => {
|
|
21046
|
-
const wrapperRef = (0,
|
|
21047
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
21048
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
21049
|
-
const onOptionChange = (0,
|
|
21137
|
+
const wrapperRef = (0, import_react190.useRef)(null);
|
|
21138
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react190.useState)(false);
|
|
21139
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react190.useState)(false);
|
|
21140
|
+
const onOptionChange = (0, import_react190.useCallback)(
|
|
21050
21141
|
(event) => {
|
|
21051
21142
|
if (event.target.checked) {
|
|
21052
21143
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -21054,19 +21145,19 @@ var SegmentedControl = ({
|
|
|
21054
21145
|
},
|
|
21055
21146
|
[options, onChange]
|
|
21056
21147
|
);
|
|
21057
|
-
const sizeStyles = (0,
|
|
21148
|
+
const sizeStyles = (0, import_react190.useMemo)(() => {
|
|
21058
21149
|
const map = {
|
|
21059
|
-
sm: (0,
|
|
21060
|
-
md: (0,
|
|
21061
|
-
lg: (0,
|
|
21062
|
-
xl: (0,
|
|
21150
|
+
sm: (0, import_react189.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
21151
|
+
md: (0, import_react189.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
21152
|
+
lg: (0, import_react189.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
21153
|
+
xl: (0, import_react189.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
21063
21154
|
};
|
|
21064
21155
|
return map[size];
|
|
21065
21156
|
}, [size]);
|
|
21066
|
-
const isIconOnly = (0,
|
|
21157
|
+
const isIconOnly = (0, import_react190.useMemo)(() => {
|
|
21067
21158
|
return options.every((option) => option && option.icon && !option.label);
|
|
21068
21159
|
}, [options]);
|
|
21069
|
-
(0,
|
|
21160
|
+
(0, import_react190.useEffect)(() => {
|
|
21070
21161
|
const wrapperElement = wrapperRef.current;
|
|
21071
21162
|
const onScroll = () => {
|
|
21072
21163
|
if (!wrapperElement) {
|
|
@@ -21161,12 +21252,12 @@ init_emotion_jsx_shim();
|
|
|
21161
21252
|
|
|
21162
21253
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
21163
21254
|
init_emotion_jsx_shim();
|
|
21164
|
-
var
|
|
21165
|
-
var lightFadingOut =
|
|
21255
|
+
var import_react191 = require("@emotion/react");
|
|
21256
|
+
var lightFadingOut = import_react191.keyframes`
|
|
21166
21257
|
from { opacity: 0.1; }
|
|
21167
21258
|
to { opacity: 0.025; }
|
|
21168
21259
|
`;
|
|
21169
|
-
var skeletonStyles =
|
|
21260
|
+
var skeletonStyles = import_react191.css`
|
|
21170
21261
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
21171
21262
|
background-color: var(--gray-500);
|
|
21172
21263
|
`;
|
|
@@ -21204,12 +21295,12 @@ init_emotion_jsx_shim();
|
|
|
21204
21295
|
|
|
21205
21296
|
// src/components/Spinner/Spinner.tsx
|
|
21206
21297
|
init_emotion_jsx_shim();
|
|
21207
|
-
var
|
|
21298
|
+
var import_react193 = require("react");
|
|
21208
21299
|
|
|
21209
21300
|
// src/components/Spinner/Spinner.styles.ts
|
|
21210
21301
|
init_emotion_jsx_shim();
|
|
21211
|
-
var
|
|
21212
|
-
var SpinnerStyles =
|
|
21302
|
+
var import_react192 = require("@emotion/react");
|
|
21303
|
+
var SpinnerStyles = import_react192.css`
|
|
21213
21304
|
--color: #00b4ff;
|
|
21214
21305
|
--speed: 5s;
|
|
21215
21306
|
--red: rgb(218, 63, 50);
|
|
@@ -21645,8 +21736,8 @@ var Spinner = ({
|
|
|
21645
21736
|
label: label2,
|
|
21646
21737
|
isPaused
|
|
21647
21738
|
}) => {
|
|
21648
|
-
const ref = (0,
|
|
21649
|
-
(0,
|
|
21739
|
+
const ref = (0, import_react193.useRef)(null);
|
|
21740
|
+
(0, import_react193.useEffect)(() => {
|
|
21650
21741
|
var _a, _b, _c;
|
|
21651
21742
|
(_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
21743
|
}, [width]);
|
|
@@ -21718,11 +21809,11 @@ init_emotion_jsx_shim();
|
|
|
21718
21809
|
|
|
21719
21810
|
// src/components/StackedModal/hooks/StackedModalProvider.tsx
|
|
21720
21811
|
init_emotion_jsx_shim();
|
|
21721
|
-
var
|
|
21812
|
+
var import_react194 = require("react");
|
|
21722
21813
|
var import_jsx_runtime154 = require("@emotion/react/jsx-runtime");
|
|
21723
|
-
var StackedModalContext = (0,
|
|
21814
|
+
var StackedModalContext = (0, import_react194.createContext)(null);
|
|
21724
21815
|
function useStackedModal() {
|
|
21725
|
-
const context = (0,
|
|
21816
|
+
const context = (0, import_react194.useContext)(StackedModalContext);
|
|
21726
21817
|
if (!context) {
|
|
21727
21818
|
throw new Error("useStackedModal must be used within a <StackedModal> component.");
|
|
21728
21819
|
}
|
|
@@ -21738,10 +21829,10 @@ function useStepTransition(index) {
|
|
|
21738
21829
|
};
|
|
21739
21830
|
}
|
|
21740
21831
|
function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
21741
|
-
const [currentStep, setCurrentStep] = (0,
|
|
21742
|
-
const [direction, setDirection] = (0,
|
|
21743
|
-
const previousStepRef = (0,
|
|
21744
|
-
const nextStep = (0,
|
|
21832
|
+
const [currentStep, setCurrentStep] = (0, import_react194.useState)(initialStep);
|
|
21833
|
+
const [direction, setDirection] = (0, import_react194.useState)("forward");
|
|
21834
|
+
const previousStepRef = (0, import_react194.useRef)(initialStep);
|
|
21835
|
+
const nextStep = (0, import_react194.useCallback)(() => {
|
|
21745
21836
|
setCurrentStep((prev) => {
|
|
21746
21837
|
if (prev >= totalSteps - 1) {
|
|
21747
21838
|
return prev;
|
|
@@ -21751,7 +21842,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21751
21842
|
return prev + 1;
|
|
21752
21843
|
});
|
|
21753
21844
|
}, [totalSteps]);
|
|
21754
|
-
const goBack = (0,
|
|
21845
|
+
const goBack = (0, import_react194.useCallback)(() => {
|
|
21755
21846
|
setCurrentStep((prev) => {
|
|
21756
21847
|
if (prev <= 0) {
|
|
21757
21848
|
return prev;
|
|
@@ -21761,7 +21852,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21761
21852
|
return prev - 1;
|
|
21762
21853
|
});
|
|
21763
21854
|
}, []);
|
|
21764
|
-
const goToStep = (0,
|
|
21855
|
+
const goToStep = (0, import_react194.useCallback)(
|
|
21765
21856
|
(index) => {
|
|
21766
21857
|
setCurrentStep((prev) => {
|
|
21767
21858
|
if (index < 0 || index >= totalSteps || index === prev) {
|
|
@@ -21774,7 +21865,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21774
21865
|
},
|
|
21775
21866
|
[totalSteps]
|
|
21776
21867
|
);
|
|
21777
|
-
const value = (0,
|
|
21868
|
+
const value = (0, import_react194.useMemo)(
|
|
21778
21869
|
() => ({
|
|
21779
21870
|
currentStep,
|
|
21780
21871
|
totalSteps,
|
|
@@ -21791,7 +21882,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21791
21882
|
|
|
21792
21883
|
// src/components/StackedModal/StackedModal.tsx
|
|
21793
21884
|
init_emotion_jsx_shim();
|
|
21794
|
-
var
|
|
21885
|
+
var import_react196 = __toESM(require("react"));
|
|
21795
21886
|
|
|
21796
21887
|
// src/components/StackedModal/AnimatedStepHeader.tsx
|
|
21797
21888
|
init_emotion_jsx_shim();
|
|
@@ -21801,13 +21892,13 @@ init_emotion_jsx_shim();
|
|
|
21801
21892
|
|
|
21802
21893
|
// src/components/StackedModal/styles/StackedModal.styles.ts
|
|
21803
21894
|
init_emotion_jsx_shim();
|
|
21804
|
-
var
|
|
21805
|
-
var stackedModalRootStyles =
|
|
21895
|
+
var import_react195 = require("@emotion/react");
|
|
21896
|
+
var stackedModalRootStyles = import_react195.css`
|
|
21806
21897
|
& > dialog > div {
|
|
21807
21898
|
background: var(--gray-50);
|
|
21808
21899
|
}
|
|
21809
21900
|
`;
|
|
21810
|
-
var slideInFromRight =
|
|
21901
|
+
var slideInFromRight = import_react195.keyframes`
|
|
21811
21902
|
from {
|
|
21812
21903
|
transform: translateX(100%);
|
|
21813
21904
|
opacity: 0;
|
|
@@ -21817,7 +21908,7 @@ var slideInFromRight = import_react193.keyframes`
|
|
|
21817
21908
|
opacity: 1;
|
|
21818
21909
|
}
|
|
21819
21910
|
`;
|
|
21820
|
-
var slideOutToLeft =
|
|
21911
|
+
var slideOutToLeft = import_react195.keyframes`
|
|
21821
21912
|
from {
|
|
21822
21913
|
transform: translateX(0);
|
|
21823
21914
|
opacity: 1;
|
|
@@ -21827,7 +21918,7 @@ var slideOutToLeft = import_react193.keyframes`
|
|
|
21827
21918
|
opacity: 0;
|
|
21828
21919
|
}
|
|
21829
21920
|
`;
|
|
21830
|
-
var slideInFromLeft =
|
|
21921
|
+
var slideInFromLeft = import_react195.keyframes`
|
|
21831
21922
|
from {
|
|
21832
21923
|
transform: translateX(-100%);
|
|
21833
21924
|
opacity: 0;
|
|
@@ -21837,7 +21928,7 @@ var slideInFromLeft = import_react193.keyframes`
|
|
|
21837
21928
|
opacity: 1;
|
|
21838
21929
|
}
|
|
21839
21930
|
`;
|
|
21840
|
-
var slideOutToRight =
|
|
21931
|
+
var slideOutToRight = import_react195.keyframes`
|
|
21841
21932
|
from {
|
|
21842
21933
|
transform: translateX(0);
|
|
21843
21934
|
opacity: 1;
|
|
@@ -21847,67 +21938,67 @@ var slideOutToRight = import_react193.keyframes`
|
|
|
21847
21938
|
opacity: 0;
|
|
21848
21939
|
}
|
|
21849
21940
|
`;
|
|
21850
|
-
var stepContainerStyles =
|
|
21941
|
+
var stepContainerStyles = import_react195.css`
|
|
21851
21942
|
position: relative;
|
|
21852
21943
|
flex: 1;
|
|
21853
21944
|
overflow: clip;
|
|
21854
21945
|
min-width: 0;
|
|
21855
21946
|
height: 100%;
|
|
21856
21947
|
`;
|
|
21857
|
-
var stepBaseStyles =
|
|
21948
|
+
var stepBaseStyles = import_react195.css`
|
|
21858
21949
|
position: absolute;
|
|
21859
21950
|
inset: 0;
|
|
21860
21951
|
display: flex;
|
|
21861
21952
|
flex-direction: column;
|
|
21862
21953
|
gap: var(--spacing-base);
|
|
21863
21954
|
`;
|
|
21864
|
-
var stepActiveStyles =
|
|
21955
|
+
var stepActiveStyles = import_react195.css`
|
|
21865
21956
|
visibility: visible;
|
|
21866
21957
|
`;
|
|
21867
|
-
var stepInactiveStyles =
|
|
21958
|
+
var stepInactiveStyles = import_react195.css`
|
|
21868
21959
|
visibility: hidden;
|
|
21869
21960
|
`;
|
|
21870
|
-
var stepEnterForwardStyles =
|
|
21961
|
+
var stepEnterForwardStyles = import_react195.css`
|
|
21871
21962
|
animation: ${slideInFromRight} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21872
21963
|
|
|
21873
21964
|
${prefersReducedMotion("reduce")} {
|
|
21874
21965
|
animation: none;
|
|
21875
21966
|
}
|
|
21876
21967
|
`;
|
|
21877
|
-
var stepExitForwardStyles =
|
|
21968
|
+
var stepExitForwardStyles = import_react195.css`
|
|
21878
21969
|
animation: ${slideOutToLeft} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21879
21970
|
|
|
21880
21971
|
${prefersReducedMotion("reduce")} {
|
|
21881
21972
|
animation: none;
|
|
21882
21973
|
}
|
|
21883
21974
|
`;
|
|
21884
|
-
var stepEnterBackwardStyles =
|
|
21975
|
+
var stepEnterBackwardStyles = import_react195.css`
|
|
21885
21976
|
animation: ${slideInFromLeft} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21886
21977
|
|
|
21887
21978
|
${prefersReducedMotion("reduce")} {
|
|
21888
21979
|
animation: none;
|
|
21889
21980
|
}
|
|
21890
21981
|
`;
|
|
21891
|
-
var stepExitBackwardStyles =
|
|
21982
|
+
var stepExitBackwardStyles = import_react195.css`
|
|
21892
21983
|
animation: ${slideOutToRight} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21893
21984
|
|
|
21894
21985
|
${prefersReducedMotion("reduce")} {
|
|
21895
21986
|
animation: none;
|
|
21896
21987
|
}
|
|
21897
21988
|
`;
|
|
21898
|
-
var headerContainerStyles =
|
|
21989
|
+
var headerContainerStyles = import_react195.css`
|
|
21899
21990
|
position: relative;
|
|
21900
21991
|
overflow: hidden;
|
|
21901
21992
|
flex: 1;
|
|
21902
21993
|
`;
|
|
21903
|
-
var headerItemStyles = (isActive) =>
|
|
21994
|
+
var headerItemStyles = (isActive) => import_react195.css`
|
|
21904
21995
|
position: ${isActive ? "relative" : "absolute"};
|
|
21905
21996
|
inset: 0;
|
|
21906
21997
|
white-space: nowrap;
|
|
21907
21998
|
overflow: hidden;
|
|
21908
21999
|
text-overflow: ellipsis;
|
|
21909
22000
|
`;
|
|
21910
|
-
var stepContentStyles =
|
|
22001
|
+
var stepContentStyles = import_react195.css`
|
|
21911
22002
|
position: relative;
|
|
21912
22003
|
flex: 1;
|
|
21913
22004
|
overflow: auto;
|
|
@@ -21981,18 +22072,18 @@ function StackedModalStep({ children, buttonGroup }) {
|
|
|
21981
22072
|
// src/components/StackedModal/StackedModal.tsx
|
|
21982
22073
|
var import_jsx_runtime157 = require("@emotion/react/jsx-runtime");
|
|
21983
22074
|
function filterSteps(children) {
|
|
21984
|
-
return
|
|
21985
|
-
(child) =>
|
|
22075
|
+
return import_react196.default.Children.toArray(children).filter(
|
|
22076
|
+
(child) => import_react196.default.isValidElement(child) && child.type === StackedModalStep
|
|
21986
22077
|
);
|
|
21987
22078
|
}
|
|
21988
|
-
var StackedModal =
|
|
22079
|
+
var StackedModal = import_react196.default.forwardRef(
|
|
21989
22080
|
({ children, initialStep = 0, ...rest }, ref) => {
|
|
21990
22081
|
const steps = filterSteps(children);
|
|
21991
22082
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(StackedModalProvider, { totalSteps: steps.length, initialStep, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(StackedModalInner, { ref, steps, ...rest }) });
|
|
21992
22083
|
}
|
|
21993
22084
|
);
|
|
21994
22085
|
StackedModal.displayName = "StackedModal";
|
|
21995
|
-
var StackedModalInner =
|
|
22086
|
+
var StackedModalInner = import_react196.default.forwardRef(
|
|
21996
22087
|
({ steps, onRequestClose, modalSize = "lg", width, height, "data-testid": dataTestId }, ref) => {
|
|
21997
22088
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { css: stackedModalRootStyles, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
21998
22089
|
Modal,
|
|
@@ -22034,12 +22125,12 @@ var StackedModalHeader = ({ children, onBack, icon = import_CgChevronLeft3.CgChe
|
|
|
22034
22125
|
|
|
22035
22126
|
// src/components/Switch/Switch.tsx
|
|
22036
22127
|
init_emotion_jsx_shim();
|
|
22037
|
-
var
|
|
22128
|
+
var import_react198 = require("react");
|
|
22038
22129
|
|
|
22039
22130
|
// src/components/Switch/Switch.styles.ts
|
|
22040
22131
|
init_emotion_jsx_shim();
|
|
22041
|
-
var
|
|
22042
|
-
var SwitchInputContainer =
|
|
22132
|
+
var import_react197 = require("@emotion/react");
|
|
22133
|
+
var SwitchInputContainer = import_react197.css`
|
|
22043
22134
|
cursor: pointer;
|
|
22044
22135
|
display: inline-flex;
|
|
22045
22136
|
position: relative;
|
|
@@ -22049,7 +22140,7 @@ var SwitchInputContainer = import_react195.css`
|
|
|
22049
22140
|
user-select: none;
|
|
22050
22141
|
z-index: 0;
|
|
22051
22142
|
`;
|
|
22052
|
-
var SwitchInput = (size) =>
|
|
22143
|
+
var SwitchInput = (size) => import_react197.css`
|
|
22053
22144
|
appearance: none;
|
|
22054
22145
|
border-radius: var(--rounded-full);
|
|
22055
22146
|
background-color: var(--white);
|
|
@@ -22100,18 +22191,18 @@ var SwitchInput = (size) => import_react195.css`
|
|
|
22100
22191
|
cursor: not-allowed;
|
|
22101
22192
|
}
|
|
22102
22193
|
`;
|
|
22103
|
-
var SwitchInputCheckedDirectionLeft =
|
|
22194
|
+
var SwitchInputCheckedDirectionLeft = import_react197.css`
|
|
22104
22195
|
&:checked {
|
|
22105
22196
|
transform: translateX(var(--spacing-base));
|
|
22106
22197
|
}
|
|
22107
22198
|
`;
|
|
22108
|
-
var SwitchInputCheckedDirectionRight =
|
|
22199
|
+
var SwitchInputCheckedDirectionRight = import_react197.css`
|
|
22109
22200
|
transform: translateX(-var(--spacing-base));
|
|
22110
22201
|
&:checked {
|
|
22111
22202
|
transform: translateX(0);
|
|
22112
22203
|
}
|
|
22113
22204
|
`;
|
|
22114
|
-
var SwitchInputDisabled =
|
|
22205
|
+
var SwitchInputDisabled = import_react197.css`
|
|
22115
22206
|
opacity: var(--opacity-50);
|
|
22116
22207
|
cursor: not-allowed;
|
|
22117
22208
|
|
|
@@ -22119,19 +22210,19 @@ var SwitchInputDisabled = import_react195.css`
|
|
|
22119
22210
|
cursor: not-allowed;
|
|
22120
22211
|
}
|
|
22121
22212
|
`;
|
|
22122
|
-
var SwitchInputLabelAlignmentLeft = (size) =>
|
|
22213
|
+
var SwitchInputLabelAlignmentLeft = (size) => import_react197.css`
|
|
22123
22214
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22124
22215
|
&:before {
|
|
22125
22216
|
left: 0;
|
|
22126
22217
|
}
|
|
22127
22218
|
`;
|
|
22128
|
-
var SwitchInputLabelAlignmentRight = (size) =>
|
|
22219
|
+
var SwitchInputLabelAlignmentRight = (size) => import_react197.css`
|
|
22129
22220
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22130
22221
|
&:before {
|
|
22131
22222
|
right: 0;
|
|
22132
22223
|
}
|
|
22133
22224
|
`;
|
|
22134
|
-
var SwitchInputLabel = (size) =>
|
|
22225
|
+
var SwitchInputLabel = (size) => import_react197.css`
|
|
22135
22226
|
align-items: center;
|
|
22136
22227
|
color: var(--typography-base);
|
|
22137
22228
|
display: inline-flex;
|
|
@@ -22152,26 +22243,26 @@ var SwitchInputLabel = (size) => import_react195.css`
|
|
|
22152
22243
|
top: 0;
|
|
22153
22244
|
}
|
|
22154
22245
|
`;
|
|
22155
|
-
var SwitchTextAlignmentLeft = (size) =>
|
|
22246
|
+
var SwitchTextAlignmentLeft = (size) => import_react197.css`
|
|
22156
22247
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22157
22248
|
`;
|
|
22158
|
-
var SwitchTextAlignmentRight = (size) =>
|
|
22249
|
+
var SwitchTextAlignmentRight = (size) => import_react197.css`
|
|
22159
22250
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22160
22251
|
`;
|
|
22161
|
-
var SwitchText =
|
|
22252
|
+
var SwitchText = import_react197.css`
|
|
22162
22253
|
color: var(--gray-500);
|
|
22163
22254
|
font-size: var(--fs-sm);
|
|
22164
22255
|
`;
|
|
22165
|
-
var SwitchInputContainerAlignmentLeft =
|
|
22256
|
+
var SwitchInputContainerAlignmentLeft = import_react197.css`
|
|
22166
22257
|
flex-direction: row;
|
|
22167
22258
|
`;
|
|
22168
|
-
var SwitchInputContainerAlignmentRight =
|
|
22259
|
+
var SwitchInputContainerAlignmentRight = import_react197.css`
|
|
22169
22260
|
flex-direction: row-reverse;
|
|
22170
22261
|
`;
|
|
22171
22262
|
|
|
22172
22263
|
// src/components/Switch/Switch.tsx
|
|
22173
22264
|
var import_jsx_runtime159 = require("@emotion/react/jsx-runtime");
|
|
22174
|
-
var Switch = (0,
|
|
22265
|
+
var Switch = (0, import_react198.forwardRef)(
|
|
22175
22266
|
({
|
|
22176
22267
|
label: label2,
|
|
22177
22268
|
infoText,
|
|
@@ -22182,7 +22273,7 @@ var Switch = (0, import_react196.forwardRef)(
|
|
|
22182
22273
|
...inputProps
|
|
22183
22274
|
}, ref) => {
|
|
22184
22275
|
let additionalText = infoText;
|
|
22185
|
-
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0,
|
|
22276
|
+
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0, import_react198.useMemo)(() => {
|
|
22186
22277
|
if (alignment === "left") {
|
|
22187
22278
|
return {
|
|
22188
22279
|
SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
|
|
@@ -22243,8 +22334,8 @@ init_emotion_jsx_shim();
|
|
|
22243
22334
|
|
|
22244
22335
|
// src/components/Table/Table.styles.ts
|
|
22245
22336
|
init_emotion_jsx_shim();
|
|
22246
|
-
var
|
|
22247
|
-
var table = ({ cellPadding = "var(--spacing-sm)" }) =>
|
|
22337
|
+
var import_react199 = require("@emotion/react");
|
|
22338
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react199.css`
|
|
22248
22339
|
border-bottom: 1px solid var(--gray-400);
|
|
22249
22340
|
border-collapse: collapse;
|
|
22250
22341
|
min-width: 100%;
|
|
@@ -22264,21 +22355,21 @@ var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react197.css`
|
|
|
22264
22355
|
background-color: var(--gray-50);
|
|
22265
22356
|
}
|
|
22266
22357
|
`;
|
|
22267
|
-
var tableHead =
|
|
22358
|
+
var tableHead = import_react199.css`
|
|
22268
22359
|
color: var(--typography-base);
|
|
22269
22360
|
text-align: left;
|
|
22270
22361
|
`;
|
|
22271
|
-
var tableRow =
|
|
22362
|
+
var tableRow = import_react199.css`
|
|
22272
22363
|
border-bottom: 1px solid var(--gray-200);
|
|
22273
22364
|
font-size: var(--fs-sm);
|
|
22274
22365
|
`;
|
|
22275
|
-
var tableCellHead =
|
|
22366
|
+
var tableCellHead = import_react199.css`
|
|
22276
22367
|
font-size: var(--fs-sm);
|
|
22277
22368
|
font-weight: var(--fw-regular);
|
|
22278
22369
|
line-height: 1.2;
|
|
22279
22370
|
}
|
|
22280
22371
|
`;
|
|
22281
|
-
var responsiveTableContainer =
|
|
22372
|
+
var responsiveTableContainer = import_react199.css`
|
|
22282
22373
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
22283
22374
|
overflow-x: auto;
|
|
22284
22375
|
${scrollbarStyles}
|
|
@@ -22345,12 +22436,12 @@ var TableCellData = React26.forwardRef(
|
|
|
22345
22436
|
// src/components/Tabs/Tabs.tsx
|
|
22346
22437
|
init_emotion_jsx_shim();
|
|
22347
22438
|
var import_tabs = require("@base-ui/react/tabs");
|
|
22348
|
-
var
|
|
22439
|
+
var import_react201 = require("react");
|
|
22349
22440
|
|
|
22350
22441
|
// src/components/Tabs/Tabs.styles.ts
|
|
22351
22442
|
init_emotion_jsx_shim();
|
|
22352
|
-
var
|
|
22353
|
-
var tabButtonStyles =
|
|
22443
|
+
var import_react200 = require("@emotion/react");
|
|
22444
|
+
var tabButtonStyles = import_react200.css`
|
|
22354
22445
|
align-items: center;
|
|
22355
22446
|
border: 0;
|
|
22356
22447
|
height: 2.5rem;
|
|
@@ -22367,7 +22458,7 @@ var tabButtonStyles = import_react198.css`
|
|
|
22367
22458
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
22368
22459
|
}
|
|
22369
22460
|
`;
|
|
22370
|
-
var tabButtonGroupStyles =
|
|
22461
|
+
var tabButtonGroupStyles = import_react200.css`
|
|
22371
22462
|
display: flex;
|
|
22372
22463
|
gap: var(--spacing-base);
|
|
22373
22464
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -22375,16 +22466,16 @@ var tabButtonGroupStyles = import_react198.css`
|
|
|
22375
22466
|
|
|
22376
22467
|
// src/components/Tabs/Tabs.tsx
|
|
22377
22468
|
var import_jsx_runtime162 = require("@emotion/react/jsx-runtime");
|
|
22378
|
-
var TabsContext = (0,
|
|
22469
|
+
var TabsContext = (0, import_react201.createContext)(null);
|
|
22379
22470
|
var useCurrentTab = () => {
|
|
22380
|
-
const context = (0,
|
|
22471
|
+
const context = (0, import_react201.useContext)(TabsContext);
|
|
22381
22472
|
if (!context) {
|
|
22382
22473
|
throw new Error("This component can only be used inside <Tabs>");
|
|
22383
22474
|
}
|
|
22384
22475
|
return context;
|
|
22385
22476
|
};
|
|
22386
|
-
var ManualContext = (0,
|
|
22387
|
-
var TabRegistrationContext = (0,
|
|
22477
|
+
var ManualContext = (0, import_react201.createContext)(false);
|
|
22478
|
+
var TabRegistrationContext = (0, import_react201.createContext)(null);
|
|
22388
22479
|
var Tabs = ({
|
|
22389
22480
|
children,
|
|
22390
22481
|
onSelectedIdChange,
|
|
@@ -22395,14 +22486,14 @@ var Tabs = ({
|
|
|
22395
22486
|
className,
|
|
22396
22487
|
style
|
|
22397
22488
|
}) => {
|
|
22398
|
-
const selected = (0,
|
|
22489
|
+
const selected = (0, import_react201.useMemo)(() => {
|
|
22399
22490
|
if (selectedId) return selectedId;
|
|
22400
22491
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
22401
22492
|
}, [selectedId, useHashForState]);
|
|
22402
22493
|
const isControlled = selected !== void 0;
|
|
22403
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
22404
|
-
const firstTabRegistered = (0,
|
|
22405
|
-
const registerTab = (0,
|
|
22494
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react201.useState)(void 0);
|
|
22495
|
+
const firstTabRegistered = (0, import_react201.useRef)(false);
|
|
22496
|
+
const registerTab = (0, import_react201.useCallback)(
|
|
22406
22497
|
(value) => {
|
|
22407
22498
|
if (!firstTabRegistered.current) {
|
|
22408
22499
|
firstTabRegistered.current = true;
|
|
@@ -22414,7 +22505,7 @@ var Tabs = ({
|
|
|
22414
22505
|
[isControlled]
|
|
22415
22506
|
);
|
|
22416
22507
|
const currentValue = isControlled ? selected : uncontrolledValue;
|
|
22417
|
-
const onTabSelect = (0,
|
|
22508
|
+
const onTabSelect = (0, import_react201.useCallback)(
|
|
22418
22509
|
(value) => {
|
|
22419
22510
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
22420
22511
|
if (!isControlled) {
|
|
@@ -22428,7 +22519,7 @@ var Tabs = ({
|
|
|
22428
22519
|
},
|
|
22429
22520
|
[isControlled, onSelectedIdChange, useHashForState]
|
|
22430
22521
|
);
|
|
22431
|
-
const tabsContextValue = (0,
|
|
22522
|
+
const tabsContextValue = (0, import_react201.useMemo)(
|
|
22432
22523
|
() => ({
|
|
22433
22524
|
value: currentValue,
|
|
22434
22525
|
setValue: (v) => onTabSelect(v)
|
|
@@ -22448,7 +22539,7 @@ var Tabs = ({
|
|
|
22448
22539
|
) }) }) });
|
|
22449
22540
|
};
|
|
22450
22541
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
22451
|
-
const manual = (0,
|
|
22542
|
+
const manual = (0, import_react201.useContext)(ManualContext);
|
|
22452
22543
|
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_tabs.Tabs.List, { activateOnFocus: !manual, ...props, css: tabButtonGroupStyles, children });
|
|
22453
22544
|
};
|
|
22454
22545
|
var TabButton = ({
|
|
@@ -22456,8 +22547,8 @@ var TabButton = ({
|
|
|
22456
22547
|
id,
|
|
22457
22548
|
...props
|
|
22458
22549
|
}) => {
|
|
22459
|
-
const registration = (0,
|
|
22460
|
-
(0,
|
|
22550
|
+
const registration = (0, import_react201.useContext)(TabRegistrationContext);
|
|
22551
|
+
(0, import_react201.useEffect)(() => {
|
|
22461
22552
|
registration == null ? void 0 : registration.registerTab(id);
|
|
22462
22553
|
}, []);
|
|
22463
22554
|
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 +22570,8 @@ init_emotion_jsx_shim();
|
|
|
22479
22570
|
|
|
22480
22571
|
// src/components/Validation/StatusBullet.styles.ts
|
|
22481
22572
|
init_emotion_jsx_shim();
|
|
22482
|
-
var
|
|
22483
|
-
var StatusBulletContainer =
|
|
22573
|
+
var import_react202 = require("@emotion/react");
|
|
22574
|
+
var StatusBulletContainer = import_react202.css`
|
|
22484
22575
|
align-items: center;
|
|
22485
22576
|
align-self: center;
|
|
22486
22577
|
color: var(--gray-500);
|
|
@@ -22496,33 +22587,33 @@ var StatusBulletContainer = import_react200.css`
|
|
|
22496
22587
|
display: block;
|
|
22497
22588
|
}
|
|
22498
22589
|
`;
|
|
22499
|
-
var StatusBulletBase =
|
|
22590
|
+
var StatusBulletBase = import_react202.css`
|
|
22500
22591
|
font-size: var(--fs-sm);
|
|
22501
22592
|
&:before {
|
|
22502
22593
|
width: var(--fs-xs);
|
|
22503
22594
|
height: var(--fs-xs);
|
|
22504
22595
|
}
|
|
22505
22596
|
`;
|
|
22506
|
-
var StatusBulletSmall =
|
|
22597
|
+
var StatusBulletSmall = import_react202.css`
|
|
22507
22598
|
font-size: var(--fs-xs);
|
|
22508
22599
|
&:before {
|
|
22509
22600
|
width: var(--fs-xxs);
|
|
22510
22601
|
height: var(--fs-xxs);
|
|
22511
22602
|
}
|
|
22512
22603
|
`;
|
|
22513
|
-
var StatusDraft =
|
|
22604
|
+
var StatusDraft = import_react202.css`
|
|
22514
22605
|
&:before {
|
|
22515
22606
|
background: var(--white);
|
|
22516
22607
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22517
22608
|
}
|
|
22518
22609
|
`;
|
|
22519
|
-
var StatusModified =
|
|
22610
|
+
var StatusModified = import_react202.css`
|
|
22520
22611
|
&:before {
|
|
22521
22612
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
22522
22613
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22523
22614
|
}
|
|
22524
22615
|
`;
|
|
22525
|
-
var StatusError =
|
|
22616
|
+
var StatusError = import_react202.css`
|
|
22526
22617
|
color: var(--error);
|
|
22527
22618
|
&:before {
|
|
22528
22619
|
/* TODO: replace this with an svg icon */
|
|
@@ -22535,22 +22626,22 @@ var StatusError = import_react200.css`
|
|
|
22535
22626
|
);
|
|
22536
22627
|
}
|
|
22537
22628
|
`;
|
|
22538
|
-
var StatusPublished =
|
|
22629
|
+
var StatusPublished = import_react202.css`
|
|
22539
22630
|
&:before {
|
|
22540
22631
|
background: var(--accent-dark);
|
|
22541
22632
|
}
|
|
22542
22633
|
`;
|
|
22543
|
-
var StatusOrphan =
|
|
22634
|
+
var StatusOrphan = import_react202.css`
|
|
22544
22635
|
&:before {
|
|
22545
22636
|
background: var(--brand-secondary-5);
|
|
22546
22637
|
}
|
|
22547
22638
|
`;
|
|
22548
|
-
var StatusUnknown =
|
|
22639
|
+
var StatusUnknown = import_react202.css`
|
|
22549
22640
|
&:before {
|
|
22550
22641
|
background: var(--gray-800);
|
|
22551
22642
|
}
|
|
22552
22643
|
`;
|
|
22553
|
-
var StatusDeleted =
|
|
22644
|
+
var StatusDeleted = import_react202.css`
|
|
22554
22645
|
&:before {
|
|
22555
22646
|
background: var(--error);
|
|
22556
22647
|
}
|
|
@@ -22871,10 +22962,12 @@ var StatusBullet = ({
|
|
|
22871
22962
|
input,
|
|
22872
22963
|
inputError,
|
|
22873
22964
|
inputSelect,
|
|
22965
|
+
isNativeButtonTrigger,
|
|
22874
22966
|
isSecureURL,
|
|
22875
22967
|
isValidUrl,
|
|
22876
22968
|
jsonIcon,
|
|
22877
22969
|
labelText,
|
|
22970
|
+
markNativeButton,
|
|
22878
22971
|
mq,
|
|
22879
22972
|
numberInput,
|
|
22880
22973
|
popTopLayerDialog,
|