@uniformdev/design-system 20.26.1 → 20.26.3-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +502 -462
- package/dist/index.d.mts +36 -8
- package/dist/index.d.ts +36 -8
- package/dist/index.js +757 -718
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6368,6 +6368,13 @@ var Fieldset = React7.forwardRef(
|
|
|
6368
6368
|
init_emotion_jsx_shim();
|
|
6369
6369
|
var React8 = __toESM(require("react"));
|
|
6370
6370
|
|
|
6371
|
+
// src/utils/disableMouseWheelEvent.ts
|
|
6372
|
+
init_emotion_jsx_shim();
|
|
6373
|
+
var disableMouseWheelEvent = (e) => {
|
|
6374
|
+
e.stopPropagation();
|
|
6375
|
+
e.currentTarget.blur();
|
|
6376
|
+
};
|
|
6377
|
+
|
|
6371
6378
|
// src/components/Input/Label.tsx
|
|
6372
6379
|
init_emotion_jsx_shim();
|
|
6373
6380
|
var import_jsx_runtime36 = require("@emotion/react/jsx-runtime");
|
|
@@ -6403,8 +6410,10 @@ var Input = React8.forwardRef(
|
|
|
6403
6410
|
classNameContainer,
|
|
6404
6411
|
classNameControl,
|
|
6405
6412
|
classNameLabel,
|
|
6413
|
+
enableMouseWheel = false,
|
|
6406
6414
|
...props
|
|
6407
6415
|
}, ref) => {
|
|
6416
|
+
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
6408
6417
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6409
6418
|
"div",
|
|
6410
6419
|
{
|
|
@@ -6439,6 +6448,7 @@ var Input = React8.forwardRef(
|
|
|
6439
6448
|
],
|
|
6440
6449
|
"aria-label": showLabel || typeof label !== "string" ? void 0 : label,
|
|
6441
6450
|
className: typeof classNameControl === "string" ? classNameControl : "",
|
|
6451
|
+
onWheel: isNumberInputAndMouseWheelDisabled ? disableMouseWheelEvent : void 0,
|
|
6442
6452
|
...props,
|
|
6443
6453
|
ref
|
|
6444
6454
|
}
|
|
@@ -11468,70 +11478,126 @@ var KeyValueInputItem = ({
|
|
|
11468
11478
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
11469
11479
|
init_emotion_jsx_shim();
|
|
11470
11480
|
|
|
11481
|
+
// src/components/Popover/Popover.tsx
|
|
11482
|
+
init_emotion_jsx_shim();
|
|
11483
|
+
var import_react107 = require("@ariakit/react");
|
|
11484
|
+
var import_react108 = require("react");
|
|
11485
|
+
var import_jsx_runtime92 = require("@emotion/react/jsx-runtime");
|
|
11486
|
+
var Popover3 = ({
|
|
11487
|
+
iconColor = "action",
|
|
11488
|
+
icon = "info",
|
|
11489
|
+
iconSize = "1rem",
|
|
11490
|
+
buttonText,
|
|
11491
|
+
ariaLabel,
|
|
11492
|
+
placement = "bottom",
|
|
11493
|
+
testId,
|
|
11494
|
+
trigger: trigger2,
|
|
11495
|
+
children,
|
|
11496
|
+
onInit,
|
|
11497
|
+
variant = "small",
|
|
11498
|
+
maxWidth = variant === "large" ? "24rem" : "14rem",
|
|
11499
|
+
...otherProps
|
|
11500
|
+
}) => {
|
|
11501
|
+
const popover2 = (0, import_react107.usePopoverStore)({ placement });
|
|
11502
|
+
(0, import_react108.useEffect)(() => {
|
|
11503
|
+
onInit == null ? void 0 : onInit({ store: popover2 });
|
|
11504
|
+
}, [popover2]);
|
|
11505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_react107.PopoverProvider, { store: popover2, children: [
|
|
11506
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
11507
|
+
import_react107.PopoverDisclosure,
|
|
11508
|
+
{
|
|
11509
|
+
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
11510
|
+
title: buttonText,
|
|
11511
|
+
"data-testid": testId,
|
|
11512
|
+
children: trigger2 ? trigger2 : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
11513
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { icon, iconColor, size: iconSize }),
|
|
11514
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { hidden: true, children: buttonText })
|
|
11515
|
+
] })
|
|
11516
|
+
}
|
|
11517
|
+
),
|
|
11518
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
11519
|
+
import_react107.Popover,
|
|
11520
|
+
{
|
|
11521
|
+
unmountOnHide: true,
|
|
11522
|
+
style: {
|
|
11523
|
+
maxWidth
|
|
11524
|
+
},
|
|
11525
|
+
css: [Popover, variant === "large" ? PopoverVariantLarge : PopoverVariantSmall],
|
|
11526
|
+
...otherProps,
|
|
11527
|
+
"aria-label": ariaLabel,
|
|
11528
|
+
children
|
|
11529
|
+
}
|
|
11530
|
+
)
|
|
11531
|
+
] });
|
|
11532
|
+
};
|
|
11533
|
+
var usePopoverComponentContext = () => {
|
|
11534
|
+
const contextValue = (0, import_react107.usePopoverContext)();
|
|
11535
|
+
return contextValue;
|
|
11536
|
+
};
|
|
11537
|
+
|
|
11471
11538
|
// src/components/LimitsBar/LimitsBar.styles.ts
|
|
11472
11539
|
init_emotion_jsx_shim();
|
|
11473
|
-
var
|
|
11474
|
-
var LimitsBarContainer =
|
|
11540
|
+
var import_react109 = require("@emotion/react");
|
|
11541
|
+
var LimitsBarContainer = import_react109.css`
|
|
11475
11542
|
margin-block: var(--spacing-sm);
|
|
11476
11543
|
`;
|
|
11477
|
-
var LimitsBarProgressBar =
|
|
11544
|
+
var LimitsBarProgressBar = import_react109.css`
|
|
11478
11545
|
background: var(--gray-100);
|
|
11479
11546
|
margin-top: var(--spacing-sm);
|
|
11480
11547
|
position: relative;
|
|
11481
11548
|
overflow: hidden;
|
|
11482
11549
|
height: 0.25rem;
|
|
11483
11550
|
`;
|
|
11484
|
-
var LimitsBarProgressBarLine =
|
|
11551
|
+
var LimitsBarProgressBarLine = import_react109.css`
|
|
11485
11552
|
position: absolute;
|
|
11486
11553
|
inset: 0;
|
|
11487
11554
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
11488
11555
|
`;
|
|
11489
|
-
var
|
|
11490
|
-
|
|
11491
|
-
justify-content: space-between;
|
|
11492
|
-
font-weight: var(--fw-bold);
|
|
11493
|
-
`;
|
|
11494
|
-
var LimitsBarLabel = import_react107.css`
|
|
11495
|
-
font-size: var(--fs-baase);
|
|
11556
|
+
var LimitsBarCountText = import_react109.css`
|
|
11557
|
+
font-size: var(--fs-sm);
|
|
11496
11558
|
`;
|
|
11497
|
-
var LimitsBarBgColor = (statusColor) =>
|
|
11559
|
+
var LimitsBarBgColor = (statusColor) => import_react109.css`
|
|
11498
11560
|
background: ${statusColor};
|
|
11499
11561
|
`;
|
|
11500
|
-
var LimitsBarTextColor = (statusColor) =>
|
|
11562
|
+
var LimitsBarTextColor = (statusColor) => import_react109.css`
|
|
11501
11563
|
color: ${statusColor};
|
|
11502
11564
|
`;
|
|
11503
11565
|
|
|
11504
11566
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
11505
|
-
var
|
|
11506
|
-
var LimitsBar = ({ current, max,
|
|
11567
|
+
var import_jsx_runtime93 = require("@emotion/react/jsx-runtime");
|
|
11568
|
+
var LimitsBar = ({ current, max, popoverContent }) => {
|
|
11507
11569
|
const maxPercentage = 100;
|
|
11508
|
-
const
|
|
11509
|
-
const
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11570
|
+
const isUnlimited = max < 0;
|
|
11571
|
+
const progressBarValue = isUnlimited ? maxPercentage : Math.min(Math.ceil(current / max * maxPercentage), maxPercentage);
|
|
11572
|
+
const percentage = isUnlimited ? 0 : current / max * 100;
|
|
11573
|
+
const getBarColor = () => {
|
|
11574
|
+
if (isUnlimited) return "var(--utility-success-icon)";
|
|
11575
|
+
if (percentage >= 100) return "var(--utility-danger-icon)";
|
|
11576
|
+
if (percentage >= 90) return "var(--utility-caution-icon)";
|
|
11577
|
+
return "var(--utility-success-icon)";
|
|
11514
11578
|
};
|
|
11515
|
-
const
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11579
|
+
const getTextColor = () => {
|
|
11580
|
+
if (isUnlimited) return "var(--utility-success-icon)";
|
|
11581
|
+
if (percentage >= 100) return "var(--utility-danger-title)";
|
|
11582
|
+
if (percentage >= 90) return "var(--utility-caution-title)";
|
|
11583
|
+
return "var(--typography-light)";
|
|
11584
|
+
};
|
|
11585
|
+
const statusColor = getBarColor();
|
|
11586
|
+
const textColor = getTextColor();
|
|
11587
|
+
const displayText = isUnlimited ? `${current} of unlimited` : `${current} of ${max}`;
|
|
11588
|
+
const ariaValueMax = isUnlimited ? -1 : max;
|
|
11589
|
+
const ariaValueText = displayText;
|
|
11590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { css: [LimitsBarContainer, functionalColors], children: [
|
|
11591
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
11526
11592
|
"div",
|
|
11527
11593
|
{
|
|
11528
11594
|
role: "progressbar",
|
|
11529
11595
|
"aria-valuenow": current,
|
|
11530
11596
|
"aria-valuemin": 0,
|
|
11531
|
-
"aria-valuemax":
|
|
11532
|
-
"aria-valuetext":
|
|
11597
|
+
"aria-valuemax": ariaValueMax,
|
|
11598
|
+
"aria-valuetext": ariaValueText,
|
|
11533
11599
|
css: LimitsBarProgressBar,
|
|
11534
|
-
children: /* @__PURE__ */ (0,
|
|
11600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
11535
11601
|
"span",
|
|
11536
11602
|
{
|
|
11537
11603
|
role: "presentation",
|
|
@@ -11542,7 +11608,11 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
11542
11608
|
}
|
|
11543
11609
|
)
|
|
11544
11610
|
}
|
|
11545
|
-
)
|
|
11611
|
+
),
|
|
11612
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(HorizontalRhythm, { gap: "sm", align: "center", children: [
|
|
11613
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { css: [LimitsBarCountText, LimitsBarTextColor(textColor)], "aria-label": "usage count", children: displayText }),
|
|
11614
|
+
popoverContent ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Popover3, { buttonText: "Info", placement: "top", children: popoverContent }) : null
|
|
11615
|
+
] })
|
|
11546
11616
|
] });
|
|
11547
11617
|
};
|
|
11548
11618
|
|
|
@@ -11551,13 +11621,13 @@ init_emotion_jsx_shim();
|
|
|
11551
11621
|
|
|
11552
11622
|
// src/components/LinkList/LinkList.styles.ts
|
|
11553
11623
|
init_emotion_jsx_shim();
|
|
11554
|
-
var
|
|
11555
|
-
var LinkListContainer =
|
|
11624
|
+
var import_react110 = require("@emotion/react");
|
|
11625
|
+
var LinkListContainer = import_react110.css`
|
|
11556
11626
|
display: flex block;
|
|
11557
11627
|
flex-direction: column;
|
|
11558
11628
|
gap: var(--spacing-sm);
|
|
11559
11629
|
`;
|
|
11560
|
-
var LinkListTitle =
|
|
11630
|
+
var LinkListTitle = import_react110.css`
|
|
11561
11631
|
color: var(--gray-400);
|
|
11562
11632
|
font-weight: var(--fw-medium);
|
|
11563
11633
|
font-size: var(--fs-sm);
|
|
@@ -11565,25 +11635,25 @@ var LinkListTitle = import_react108.css`
|
|
|
11565
11635
|
`;
|
|
11566
11636
|
|
|
11567
11637
|
// src/components/LinkList/LinkList.tsx
|
|
11568
|
-
var
|
|
11638
|
+
var import_jsx_runtime94 = require("@emotion/react/jsx-runtime");
|
|
11569
11639
|
var LinkList = ({ title, children, ...props }) => {
|
|
11570
|
-
return /* @__PURE__ */ (0,
|
|
11571
|
-
/* @__PURE__ */ (0,
|
|
11640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { css: LinkListContainer, ...props, children: [
|
|
11641
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Heading2, { level: 3, css: LinkListTitle, withMarginBottom: false, children: title }),
|
|
11572
11642
|
children
|
|
11573
11643
|
] });
|
|
11574
11644
|
};
|
|
11575
11645
|
|
|
11576
11646
|
// src/components/List/ScrollableList.tsx
|
|
11577
11647
|
init_emotion_jsx_shim();
|
|
11578
|
-
var
|
|
11648
|
+
var import_react112 = require("@emotion/react");
|
|
11579
11649
|
|
|
11580
11650
|
// src/components/List/styles/ScrollableList.styles.ts
|
|
11581
11651
|
init_emotion_jsx_shim();
|
|
11582
|
-
var
|
|
11583
|
-
var ScrollableListContainer =
|
|
11652
|
+
var import_react111 = require("@emotion/react");
|
|
11653
|
+
var ScrollableListContainer = import_react111.css`
|
|
11584
11654
|
position: relative;
|
|
11585
11655
|
`;
|
|
11586
|
-
var ScrollableListInner =
|
|
11656
|
+
var ScrollableListInner = import_react111.css`
|
|
11587
11657
|
background: var(--gray-50);
|
|
11588
11658
|
border-top: 1px solid var(--gray-200);
|
|
11589
11659
|
border-bottom: 1px solid var(--gray-200);
|
|
@@ -11606,19 +11676,19 @@ var ScrollableListInner = import_react109.css`
|
|
|
11606
11676
|
`;
|
|
11607
11677
|
|
|
11608
11678
|
// src/components/List/ScrollableList.tsx
|
|
11609
|
-
var
|
|
11679
|
+
var import_jsx_runtime95 = require("@emotion/react/jsx-runtime");
|
|
11610
11680
|
var ScrollableList = ({ label, children, ...props }) => {
|
|
11611
|
-
return /* @__PURE__ */ (0,
|
|
11612
|
-
label ? /* @__PURE__ */ (0,
|
|
11681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
11682
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11613
11683
|
"span",
|
|
11614
11684
|
{
|
|
11615
|
-
css:
|
|
11685
|
+
css: import_react112.css`
|
|
11616
11686
|
${labelText}
|
|
11617
11687
|
`,
|
|
11618
11688
|
children: label
|
|
11619
11689
|
}
|
|
11620
11690
|
) : null,
|
|
11621
|
-
/* @__PURE__ */ (0,
|
|
11691
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
11622
11692
|
] });
|
|
11623
11693
|
};
|
|
11624
11694
|
|
|
@@ -11628,8 +11698,8 @@ var import_CgCheck4 = require("@react-icons/all-files/cg/CgCheck");
|
|
|
11628
11698
|
|
|
11629
11699
|
// src/components/List/styles/ScrollableListItem.styles.ts
|
|
11630
11700
|
init_emotion_jsx_shim();
|
|
11631
|
-
var
|
|
11632
|
-
var ScrollableListItemContainer =
|
|
11701
|
+
var import_react113 = require("@emotion/react");
|
|
11702
|
+
var ScrollableListItemContainer = import_react113.css`
|
|
11633
11703
|
align-items: center;
|
|
11634
11704
|
background: var(--white);
|
|
11635
11705
|
border-radius: var(--rounded-base);
|
|
@@ -11638,13 +11708,13 @@ var ScrollableListItemContainer = import_react111.css`
|
|
|
11638
11708
|
min-height: 52px;
|
|
11639
11709
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
11640
11710
|
`;
|
|
11641
|
-
var ScrollableListItemShadow =
|
|
11711
|
+
var ScrollableListItemShadow = import_react113.css`
|
|
11642
11712
|
box-shadow: var(--shadow-base);
|
|
11643
11713
|
`;
|
|
11644
|
-
var ScrollableListItemActive =
|
|
11714
|
+
var ScrollableListItemActive = import_react113.css`
|
|
11645
11715
|
border-color: var(--brand-secondary-3);
|
|
11646
11716
|
`;
|
|
11647
|
-
var ScrollableListItemBtn =
|
|
11717
|
+
var ScrollableListItemBtn = import_react113.css`
|
|
11648
11718
|
align-items: center;
|
|
11649
11719
|
border: none;
|
|
11650
11720
|
background: transparent;
|
|
@@ -11659,27 +11729,27 @@ var ScrollableListItemBtn = import_react111.css`
|
|
|
11659
11729
|
outline: none;
|
|
11660
11730
|
}
|
|
11661
11731
|
`;
|
|
11662
|
-
var ScrollableListInputLabel =
|
|
11732
|
+
var ScrollableListInputLabel = import_react113.css`
|
|
11663
11733
|
align-items: center;
|
|
11664
11734
|
cursor: pointer;
|
|
11665
11735
|
display: flex;
|
|
11666
11736
|
padding: var(--spacing-xs) var(--spacing-base) var(--spacing-xs);
|
|
11667
11737
|
flex-grow: 1;
|
|
11668
11738
|
`;
|
|
11669
|
-
var ScrollableListInputText =
|
|
11739
|
+
var ScrollableListInputText = import_react113.css`
|
|
11670
11740
|
align-items: center;
|
|
11671
11741
|
display: flex;
|
|
11672
11742
|
gap: var(--spacing-sm);
|
|
11673
11743
|
flex-grow: 1;
|
|
11674
11744
|
flex-wrap: wrap;
|
|
11675
11745
|
`;
|
|
11676
|
-
var ScrollableListHiddenInput =
|
|
11746
|
+
var ScrollableListHiddenInput = import_react113.css`
|
|
11677
11747
|
position: absolute;
|
|
11678
11748
|
height: 0;
|
|
11679
11749
|
width: 0;
|
|
11680
11750
|
opacity: 0;
|
|
11681
11751
|
`;
|
|
11682
|
-
var ScrollableListIcon =
|
|
11752
|
+
var ScrollableListIcon = import_react113.css`
|
|
11683
11753
|
border-radius: var(--rounded-full);
|
|
11684
11754
|
background: var(--brand-secondary-3);
|
|
11685
11755
|
color: var(--white);
|
|
@@ -11687,12 +11757,12 @@ var ScrollableListIcon = import_react111.css`
|
|
|
11687
11757
|
min-width: 24px;
|
|
11688
11758
|
opacity: 0;
|
|
11689
11759
|
`;
|
|
11690
|
-
var ScrollableListIconVisible =
|
|
11760
|
+
var ScrollableListIconVisible = import_react113.css`
|
|
11691
11761
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
11692
11762
|
`;
|
|
11693
11763
|
|
|
11694
11764
|
// src/components/List/ScrollableListInputItem.tsx
|
|
11695
|
-
var
|
|
11765
|
+
var import_jsx_runtime96 = require("@emotion/react/jsx-runtime");
|
|
11696
11766
|
var ScrollableListInputItem = ({
|
|
11697
11767
|
label,
|
|
11698
11768
|
icon,
|
|
@@ -11702,7 +11772,7 @@ var ScrollableListInputItem = ({
|
|
|
11702
11772
|
labelTestId,
|
|
11703
11773
|
...props
|
|
11704
11774
|
}) => {
|
|
11705
|
-
return /* @__PURE__ */ (0,
|
|
11775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11706
11776
|
"div",
|
|
11707
11777
|
{
|
|
11708
11778
|
css: [
|
|
@@ -11711,13 +11781,13 @@ var ScrollableListInputItem = ({
|
|
|
11711
11781
|
active2 ? ScrollableListItemActive : void 0
|
|
11712
11782
|
],
|
|
11713
11783
|
...props,
|
|
11714
|
-
children: /* @__PURE__ */ (0,
|
|
11715
|
-
/* @__PURE__ */ (0,
|
|
11784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("label", { "data-testid": labelTestId, css: ScrollableListInputLabel, children: [
|
|
11785
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { css: ScrollableListInputText, children: [
|
|
11716
11786
|
icon,
|
|
11717
11787
|
label
|
|
11718
11788
|
] }),
|
|
11719
|
-
/* @__PURE__ */ (0,
|
|
11720
|
-
/* @__PURE__ */ (0,
|
|
11789
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { css: ScrollableListHiddenInput, children }),
|
|
11790
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11721
11791
|
Icon,
|
|
11722
11792
|
{
|
|
11723
11793
|
icon: import_CgCheck4.CgCheck,
|
|
@@ -11736,7 +11806,7 @@ var ScrollableListInputItem = ({
|
|
|
11736
11806
|
// src/components/List/ScrollableListItem.tsx
|
|
11737
11807
|
init_emotion_jsx_shim();
|
|
11738
11808
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
11739
|
-
var
|
|
11809
|
+
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
11740
11810
|
var ScrollableListItem = ({
|
|
11741
11811
|
buttonText,
|
|
11742
11812
|
icon,
|
|
@@ -11744,7 +11814,7 @@ var ScrollableListItem = ({
|
|
|
11744
11814
|
disableShadow,
|
|
11745
11815
|
...props
|
|
11746
11816
|
}) => {
|
|
11747
|
-
return /* @__PURE__ */ (0,
|
|
11817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11748
11818
|
"div",
|
|
11749
11819
|
{
|
|
11750
11820
|
css: [
|
|
@@ -11752,12 +11822,12 @@ var ScrollableListItem = ({
|
|
|
11752
11822
|
disableShadow ? void 0 : ScrollableListItemShadow,
|
|
11753
11823
|
active2 ? ScrollableListItemActive : void 0
|
|
11754
11824
|
],
|
|
11755
|
-
children: /* @__PURE__ */ (0,
|
|
11756
|
-
/* @__PURE__ */ (0,
|
|
11825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
|
|
11826
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", children: [
|
|
11757
11827
|
icon,
|
|
11758
|
-
/* @__PURE__ */ (0,
|
|
11828
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: buttonText })
|
|
11759
11829
|
] }),
|
|
11760
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11761
11831
|
Icon,
|
|
11762
11832
|
{
|
|
11763
11833
|
icon: import_CgCheck5.CgCheck,
|
|
@@ -11776,10 +11846,10 @@ init_emotion_jsx_shim();
|
|
|
11776
11846
|
|
|
11777
11847
|
// src/components/LoadingIndicator/LoadingIndicator.styles.ts
|
|
11778
11848
|
init_emotion_jsx_shim();
|
|
11779
|
-
var
|
|
11849
|
+
var import_react114 = require("@emotion/react");
|
|
11780
11850
|
function bounceFade(size) {
|
|
11781
11851
|
const bounceHeight = size === "lg" ? 10 : 5;
|
|
11782
|
-
return
|
|
11852
|
+
return import_react114.keyframes`
|
|
11783
11853
|
0%, 100% {
|
|
11784
11854
|
opacity: 1.0;
|
|
11785
11855
|
transform: translateY(0);
|
|
@@ -11797,13 +11867,13 @@ function bounceFade(size) {
|
|
|
11797
11867
|
}
|
|
11798
11868
|
`;
|
|
11799
11869
|
}
|
|
11800
|
-
var loader =
|
|
11870
|
+
var loader = import_react114.css`
|
|
11801
11871
|
display: inline-flex;
|
|
11802
11872
|
justify-content: center;
|
|
11803
11873
|
`;
|
|
11804
11874
|
function loadingDot(size, backgroundColor) {
|
|
11805
11875
|
const dotSize = size === "lg" ? 8 : 4;
|
|
11806
|
-
return
|
|
11876
|
+
return import_react114.css`
|
|
11807
11877
|
background-color: ${backgroundColor};
|
|
11808
11878
|
display: block;
|
|
11809
11879
|
border-radius: var(--rounded-full);
|
|
@@ -11828,7 +11898,7 @@ function loadingDot(size, backgroundColor) {
|
|
|
11828
11898
|
}
|
|
11829
11899
|
|
|
11830
11900
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
11831
|
-
var
|
|
11901
|
+
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
11832
11902
|
var cssColorMap = {
|
|
11833
11903
|
gray: "var(--gray-700)",
|
|
11834
11904
|
"accent-alt": "var(--accent-alt-dark)"
|
|
@@ -11836,10 +11906,10 @@ var cssColorMap = {
|
|
|
11836
11906
|
var LoadingIndicator = ({ size = "lg", color = "gray", ...props }) => {
|
|
11837
11907
|
const cssColor = cssColorMap[color];
|
|
11838
11908
|
const dotStyle = loadingDot(size, cssColor);
|
|
11839
|
-
return /* @__PURE__ */ (0,
|
|
11840
|
-
/* @__PURE__ */ (0,
|
|
11841
|
-
/* @__PURE__ */ (0,
|
|
11842
|
-
/* @__PURE__ */ (0,
|
|
11909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
|
|
11910
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { css: dotStyle }),
|
|
11911
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { css: dotStyle }),
|
|
11912
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { css: dotStyle })
|
|
11843
11913
|
] });
|
|
11844
11914
|
};
|
|
11845
11915
|
|
|
@@ -11848,36 +11918,36 @@ init_emotion_jsx_shim();
|
|
|
11848
11918
|
|
|
11849
11919
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
11850
11920
|
init_emotion_jsx_shim();
|
|
11851
|
-
var
|
|
11852
|
-
var loadingOverlayContainer =
|
|
11921
|
+
var import_react115 = require("@emotion/react");
|
|
11922
|
+
var loadingOverlayContainer = import_react115.css`
|
|
11853
11923
|
inset: 0;
|
|
11854
11924
|
overflow: hidden;
|
|
11855
11925
|
justify-content: center;
|
|
11856
11926
|
padding: var(--spacing-xl);
|
|
11857
11927
|
overflow-y: auto;
|
|
11858
11928
|
`;
|
|
11859
|
-
var loadingOverlayVisible =
|
|
11929
|
+
var loadingOverlayVisible = import_react115.css`
|
|
11860
11930
|
display: flex;
|
|
11861
11931
|
`;
|
|
11862
|
-
var loadingOverlayHidden =
|
|
11932
|
+
var loadingOverlayHidden = import_react115.css`
|
|
11863
11933
|
display: none;
|
|
11864
11934
|
`;
|
|
11865
|
-
var loadingOverlayBackground = (bgColor) =>
|
|
11935
|
+
var loadingOverlayBackground = (bgColor) => import_react115.css`
|
|
11866
11936
|
background: ${bgColor};
|
|
11867
11937
|
opacity: 0.92;
|
|
11868
11938
|
position: absolute;
|
|
11869
11939
|
inset: 0 0;
|
|
11870
11940
|
`;
|
|
11871
|
-
var loadingOverlayBody =
|
|
11941
|
+
var loadingOverlayBody = import_react115.css`
|
|
11872
11942
|
align-items: center;
|
|
11873
11943
|
display: flex;
|
|
11874
11944
|
flex-direction: column;
|
|
11875
11945
|
`;
|
|
11876
|
-
var loadingOverlayMessage =
|
|
11946
|
+
var loadingOverlayMessage = import_react115.css`
|
|
11877
11947
|
color: var(--gray-600);
|
|
11878
11948
|
margin: var(--spacing-base) 0 0;
|
|
11879
11949
|
`;
|
|
11880
|
-
var loaderAnimationContainer =
|
|
11950
|
+
var loaderAnimationContainer = import_react115.css`
|
|
11881
11951
|
aspect-ratio: 1/1;
|
|
11882
11952
|
position: relative;
|
|
11883
11953
|
transition: filter var(--duration-xslow) ease-in-out;
|
|
@@ -12068,7 +12138,7 @@ var loaderAnimationContainer = import_react113.css`
|
|
|
12068
12138
|
`;
|
|
12069
12139
|
|
|
12070
12140
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
12071
|
-
var
|
|
12141
|
+
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
12072
12142
|
var LoadingOverlay = ({
|
|
12073
12143
|
isActive,
|
|
12074
12144
|
statusMessage,
|
|
@@ -12080,7 +12150,7 @@ var LoadingOverlay = ({
|
|
|
12080
12150
|
children,
|
|
12081
12151
|
position = "absolute"
|
|
12082
12152
|
}) => {
|
|
12083
|
-
return /* @__PURE__ */ (0,
|
|
12153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
12084
12154
|
"div",
|
|
12085
12155
|
{
|
|
12086
12156
|
role: "alert",
|
|
@@ -12093,11 +12163,11 @@ var LoadingOverlay = ({
|
|
|
12093
12163
|
"aria-hidden": !isActive,
|
|
12094
12164
|
"aria-busy": isActive && !isPaused,
|
|
12095
12165
|
children: [
|
|
12096
|
-
/* @__PURE__ */ (0,
|
|
12097
|
-
/* @__PURE__ */ (0,
|
|
12098
|
-
/* @__PURE__ */ (0,
|
|
12099
|
-
statusMessage ? /* @__PURE__ */ (0,
|
|
12100
|
-
/* @__PURE__ */ (0,
|
|
12166
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: loadingOverlayBackground(overlayBackgroundColor) }),
|
|
12167
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: { position: "relative", maxWidth: "100%", margin: isTopAligned ? "0" : "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { css: loadingOverlayBody, children: [
|
|
12168
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(LoadingAnimation, { label: "Loading...", isPaused, width: loaderSize }),
|
|
12169
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: loadingOverlayMessage, children: statusMessage }) : null,
|
|
12170
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: { width: "100%", marginTop: "var(--spacing-md)" }, children })
|
|
12101
12171
|
] }) })
|
|
12102
12172
|
]
|
|
12103
12173
|
}
|
|
@@ -12109,7 +12179,7 @@ var LoadingAnimation = ({
|
|
|
12109
12179
|
css: css110,
|
|
12110
12180
|
isPaused
|
|
12111
12181
|
}) => {
|
|
12112
|
-
return /* @__PURE__ */ (0,
|
|
12182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
12113
12183
|
"div",
|
|
12114
12184
|
{
|
|
12115
12185
|
"aria-label": label,
|
|
@@ -12120,38 +12190,38 @@ var LoadingAnimation = ({
|
|
|
12120
12190
|
css: [loaderAnimationContainer, css110],
|
|
12121
12191
|
className: `loader-container${isPaused ? " paused" : ""}`,
|
|
12122
12192
|
children: [
|
|
12123
|
-
/* @__PURE__ */ (0,
|
|
12124
|
-
/* @__PURE__ */ (0,
|
|
12125
|
-
/* @__PURE__ */ (0,
|
|
12126
|
-
/* @__PURE__ */ (0,
|
|
12127
|
-
/* @__PURE__ */ (0,
|
|
12193
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "bottom-cubes", children: [
|
|
12194
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "cube cube-1 bottom-cube", children: [
|
|
12195
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face left" }),
|
|
12196
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face right" }),
|
|
12197
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face top" })
|
|
12128
12198
|
] }),
|
|
12129
|
-
/* @__PURE__ */ (0,
|
|
12130
|
-
/* @__PURE__ */ (0,
|
|
12131
|
-
/* @__PURE__ */ (0,
|
|
12132
|
-
/* @__PURE__ */ (0,
|
|
12199
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "cube cube-2 bottom-cube", children: [
|
|
12200
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face left" }),
|
|
12201
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face right" }),
|
|
12202
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face top" })
|
|
12133
12203
|
] }),
|
|
12134
|
-
/* @__PURE__ */ (0,
|
|
12135
|
-
/* @__PURE__ */ (0,
|
|
12136
|
-
/* @__PURE__ */ (0,
|
|
12137
|
-
/* @__PURE__ */ (0,
|
|
12204
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "cube cube-3 bottom-cube", children: [
|
|
12205
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face left" }),
|
|
12206
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face right" }),
|
|
12207
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face top" })
|
|
12138
12208
|
] })
|
|
12139
12209
|
] }),
|
|
12140
|
-
/* @__PURE__ */ (0,
|
|
12141
|
-
/* @__PURE__ */ (0,
|
|
12142
|
-
/* @__PURE__ */ (0,
|
|
12143
|
-
/* @__PURE__ */ (0,
|
|
12144
|
-
/* @__PURE__ */ (0,
|
|
12210
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "top-cubes", children: [
|
|
12211
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "cube cube-1", children: [
|
|
12212
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face left" }),
|
|
12213
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face right" }),
|
|
12214
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face top" })
|
|
12145
12215
|
] }),
|
|
12146
|
-
/* @__PURE__ */ (0,
|
|
12147
|
-
/* @__PURE__ */ (0,
|
|
12148
|
-
/* @__PURE__ */ (0,
|
|
12149
|
-
/* @__PURE__ */ (0,
|
|
12216
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "cube cube-2", children: [
|
|
12217
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face left" }),
|
|
12218
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face right" }),
|
|
12219
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face top" })
|
|
12150
12220
|
] }),
|
|
12151
|
-
/* @__PURE__ */ (0,
|
|
12152
|
-
/* @__PURE__ */ (0,
|
|
12153
|
-
/* @__PURE__ */ (0,
|
|
12154
|
-
/* @__PURE__ */ (0,
|
|
12221
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "cube cube-3", children: [
|
|
12222
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face left" }),
|
|
12223
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face right" }),
|
|
12224
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "face top" })
|
|
12155
12225
|
] })
|
|
12156
12226
|
] })
|
|
12157
12227
|
]
|
|
@@ -12159,7 +12229,7 @@ var LoadingAnimation = ({
|
|
|
12159
12229
|
);
|
|
12160
12230
|
};
|
|
12161
12231
|
var LoadingIcon = ({ height, width, ...props }) => {
|
|
12162
|
-
return /* @__PURE__ */ (0,
|
|
12232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
12163
12233
|
"svg",
|
|
12164
12234
|
{
|
|
12165
12235
|
viewBox: "0 0 38 38",
|
|
@@ -12169,9 +12239,9 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
12169
12239
|
stroke: "currentColor",
|
|
12170
12240
|
...props,
|
|
12171
12241
|
"data-testid": "loading-icon",
|
|
12172
|
-
children: /* @__PURE__ */ (0,
|
|
12173
|
-
/* @__PURE__ */ (0,
|
|
12174
|
-
/* @__PURE__ */ (0,
|
|
12242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
12243
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("circle", { strokeOpacity: ".25", cx: "18", cy: "18", r: "18" }),
|
|
12244
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", transform: "rotate(166.645 18 18)", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
12175
12245
|
"animateTransform",
|
|
12176
12246
|
{
|
|
12177
12247
|
attributeName: "transform",
|
|
@@ -12189,14 +12259,14 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
12189
12259
|
|
|
12190
12260
|
// src/components/Modal/Modal.tsx
|
|
12191
12261
|
init_emotion_jsx_shim();
|
|
12192
|
-
var
|
|
12262
|
+
var import_react117 = require("@ariakit/react");
|
|
12193
12263
|
var import_CgClose5 = require("@react-icons/all-files/cg/CgClose");
|
|
12194
|
-
var
|
|
12264
|
+
var import_react118 = __toESM(require("react"));
|
|
12195
12265
|
|
|
12196
12266
|
// src/components/Modal/Modal.styles.ts
|
|
12197
12267
|
init_emotion_jsx_shim();
|
|
12198
|
-
var
|
|
12199
|
-
var modalStyles =
|
|
12268
|
+
var import_react116 = require("@emotion/react");
|
|
12269
|
+
var modalStyles = import_react116.css`
|
|
12200
12270
|
border: none;
|
|
12201
12271
|
position: relative;
|
|
12202
12272
|
max-width: calc(100% - var(--spacing-base) * 2);
|
|
@@ -12210,16 +12280,16 @@ var modalStyles = import_react114.css`
|
|
|
12210
12280
|
opacity: 0.4;
|
|
12211
12281
|
}
|
|
12212
12282
|
`;
|
|
12213
|
-
var modalSizeSmall =
|
|
12283
|
+
var modalSizeSmall = import_react116.css`
|
|
12214
12284
|
width: clamp(280px, 100vw, 400px);
|
|
12215
12285
|
`;
|
|
12216
|
-
var modalSizeMedium =
|
|
12286
|
+
var modalSizeMedium = import_react116.css`
|
|
12217
12287
|
width: clamp(280px, 100vw, 600px);
|
|
12218
12288
|
`;
|
|
12219
|
-
var modalSizeLarge =
|
|
12289
|
+
var modalSizeLarge = import_react116.css`
|
|
12220
12290
|
width: clamp(280px, 100vw, 800px);
|
|
12221
12291
|
`;
|
|
12222
|
-
var modalInnerStyles =
|
|
12292
|
+
var modalInnerStyles = import_react116.css`
|
|
12223
12293
|
position: relative;
|
|
12224
12294
|
width: 100%;
|
|
12225
12295
|
display: flex;
|
|
@@ -12232,7 +12302,7 @@ var modalInnerStyles = import_react114.css`
|
|
|
12232
12302
|
box-shadow: var(--elevation-500);
|
|
12233
12303
|
border-radius: var(--rounded-base);
|
|
12234
12304
|
`;
|
|
12235
|
-
var modalHeaderStyles =
|
|
12305
|
+
var modalHeaderStyles = import_react116.css`
|
|
12236
12306
|
display: flex;
|
|
12237
12307
|
align-items: flex-start;
|
|
12238
12308
|
gap: var(--spacing-base);
|
|
@@ -12240,10 +12310,10 @@ var modalHeaderStyles = import_react114.css`
|
|
|
12240
12310
|
font-family: var(--ff-base);
|
|
12241
12311
|
line-height: 1.2;
|
|
12242
12312
|
`;
|
|
12243
|
-
var modalHeaderHeaderStyles =
|
|
12313
|
+
var modalHeaderHeaderStyles = import_react116.css`
|
|
12244
12314
|
max-width: calc(100% - 3rem);
|
|
12245
12315
|
`;
|
|
12246
|
-
var modalCloseButtonStyles =
|
|
12316
|
+
var modalCloseButtonStyles = import_react116.css`
|
|
12247
12317
|
background: transparent;
|
|
12248
12318
|
border: none;
|
|
12249
12319
|
color: var(--gray-300);
|
|
@@ -12258,7 +12328,7 @@ var modalCloseButtonStyles = import_react114.css`
|
|
|
12258
12328
|
color: var(--gray-400);
|
|
12259
12329
|
}
|
|
12260
12330
|
`;
|
|
12261
|
-
var modalContentStyles =
|
|
12331
|
+
var modalContentStyles = import_react116.css`
|
|
12262
12332
|
position: relative;
|
|
12263
12333
|
flex: 1;
|
|
12264
12334
|
overflow: auto;
|
|
@@ -12267,11 +12337,11 @@ var modalContentStyles = import_react114.css`
|
|
|
12267
12337
|
border-radius: var(--rounded-sm);
|
|
12268
12338
|
${scrollbarStyles}
|
|
12269
12339
|
`;
|
|
12270
|
-
var modalDialogWrapper = (hasCloseButton) =>
|
|
12340
|
+
var modalDialogWrapper = (hasCloseButton) => import_react116.css`
|
|
12271
12341
|
height: 100%;
|
|
12272
12342
|
padding: ${hasCloseButton ? 0 : "var(--spacing-md)"} var(--spacing-lg) var(--spacing-md);
|
|
12273
12343
|
`;
|
|
12274
|
-
var modalDialogInnerStyles =
|
|
12344
|
+
var modalDialogInnerStyles = import_react116.css`
|
|
12275
12345
|
// we need to override the gap of the modalInnerStyles when using a modal dialog
|
|
12276
12346
|
> div {
|
|
12277
12347
|
gap: 0;
|
|
@@ -12279,10 +12349,10 @@ var modalDialogInnerStyles = import_react114.css`
|
|
|
12279
12349
|
`;
|
|
12280
12350
|
|
|
12281
12351
|
// src/components/Modal/Modal.tsx
|
|
12282
|
-
var
|
|
12352
|
+
var import_jsx_runtime100 = require("@emotion/react/jsx-runtime");
|
|
12283
12353
|
var defaultModalWidth = "75rem";
|
|
12284
12354
|
var defaultModalHeight = "51rem";
|
|
12285
|
-
var Modal =
|
|
12355
|
+
var Modal = import_react118.default.forwardRef(
|
|
12286
12356
|
({
|
|
12287
12357
|
header: header2,
|
|
12288
12358
|
children,
|
|
@@ -12296,8 +12366,8 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12296
12366
|
disableBodyScroll = false,
|
|
12297
12367
|
...modalProps
|
|
12298
12368
|
}, ref) => {
|
|
12299
|
-
const mouseDownInsideModal = (0,
|
|
12300
|
-
const dialogRef = (0,
|
|
12369
|
+
const mouseDownInsideModal = (0, import_react118.useRef)(false);
|
|
12370
|
+
const dialogRef = (0, import_react118.useRef)(null);
|
|
12301
12371
|
const size = {
|
|
12302
12372
|
sm: modalSizeSmall,
|
|
12303
12373
|
md: modalSizeMedium,
|
|
@@ -12309,7 +12379,7 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12309
12379
|
},
|
|
12310
12380
|
shortcut: "escape"
|
|
12311
12381
|
});
|
|
12312
|
-
(0,
|
|
12382
|
+
(0, import_react118.useEffect)(() => {
|
|
12313
12383
|
var _a;
|
|
12314
12384
|
if (!document.contains(dialogRef.current)) {
|
|
12315
12385
|
console.warn(
|
|
@@ -12323,7 +12393,7 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12323
12393
|
(_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
12324
12394
|
};
|
|
12325
12395
|
}, []);
|
|
12326
|
-
return /* @__PURE__ */ (0,
|
|
12396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
12327
12397
|
"dialog",
|
|
12328
12398
|
{
|
|
12329
12399
|
ref: (element) => {
|
|
@@ -12361,7 +12431,7 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12361
12431
|
e.preventDefault();
|
|
12362
12432
|
},
|
|
12363
12433
|
...modalProps,
|
|
12364
|
-
children: /* @__PURE__ */ (0,
|
|
12434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react117.PortalContext.Provider, { value: dialogRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
12365
12435
|
"div",
|
|
12366
12436
|
{
|
|
12367
12437
|
css: [modalInnerStyles, { height: height === "auto" ? "auto" : "100%" }],
|
|
@@ -12370,9 +12440,9 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12370
12440
|
mouseDownInsideModal.current = true;
|
|
12371
12441
|
},
|
|
12372
12442
|
children: [
|
|
12373
|
-
header2 || onRequestClose ? /* @__PURE__ */ (0,
|
|
12374
|
-
header2 ? /* @__PURE__ */ (0,
|
|
12375
|
-
onRequestClose ? /* @__PURE__ */ (0,
|
|
12443
|
+
header2 || onRequestClose ? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { css: modalHeaderStyles, children: [
|
|
12444
|
+
header2 ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { css: modalHeaderHeaderStyles, children: header2 }) : null,
|
|
12445
|
+
onRequestClose ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
12376
12446
|
Button,
|
|
12377
12447
|
{
|
|
12378
12448
|
type: "button",
|
|
@@ -12381,11 +12451,11 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12381
12451
|
title: "Close dialog",
|
|
12382
12452
|
buttonType: "ghost",
|
|
12383
12453
|
"data-testid": "close-dialog",
|
|
12384
|
-
children: /* @__PURE__ */ (0,
|
|
12454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Icon, { icon: import_CgClose5.CgClose, iconColor: "currentColor", size: 24 })
|
|
12385
12455
|
}
|
|
12386
12456
|
) : null
|
|
12387
12457
|
] }) : null,
|
|
12388
|
-
/* @__PURE__ */ (0,
|
|
12458
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
12389
12459
|
"div",
|
|
12390
12460
|
{
|
|
12391
12461
|
css: [
|
|
@@ -12397,7 +12467,7 @@ var Modal = import_react116.default.forwardRef(
|
|
|
12397
12467
|
children
|
|
12398
12468
|
}
|
|
12399
12469
|
),
|
|
12400
|
-
buttonGroup ? /* @__PURE__ */ (0,
|
|
12470
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(HorizontalRhythm, { children: buttonGroup }) : null
|
|
12401
12471
|
]
|
|
12402
12472
|
}
|
|
12403
12473
|
) })
|
|
@@ -12409,11 +12479,11 @@ Modal.displayName = "Modal";
|
|
|
12409
12479
|
|
|
12410
12480
|
// src/components/Modal/ModalDialog.tsx
|
|
12411
12481
|
init_emotion_jsx_shim();
|
|
12412
|
-
var
|
|
12413
|
-
var
|
|
12414
|
-
var ModalDialog = (0,
|
|
12482
|
+
var import_react119 = require("react");
|
|
12483
|
+
var import_jsx_runtime101 = require("@emotion/react/jsx-runtime");
|
|
12484
|
+
var ModalDialog = (0, import_react119.forwardRef)(
|
|
12415
12485
|
({ header: header2, buttonGroup, modalSize = "lg", children, height = "auto", onRequestClose, ...props }, ref) => {
|
|
12416
|
-
return /* @__PURE__ */ (0,
|
|
12486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
12417
12487
|
Modal,
|
|
12418
12488
|
{
|
|
12419
12489
|
...props,
|
|
@@ -12425,10 +12495,10 @@ var ModalDialog = (0, import_react117.forwardRef)(
|
|
|
12425
12495
|
withoutContentPadding: true,
|
|
12426
12496
|
css: modalDialogInnerStyles,
|
|
12427
12497
|
width: "",
|
|
12428
|
-
children: /* @__PURE__ */ (0,
|
|
12429
|
-
/* @__PURE__ */ (0,
|
|
12430
|
-
/* @__PURE__ */ (0,
|
|
12431
|
-
/* @__PURE__ */ (0,
|
|
12498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(VerticalRhythm, { css: modalDialogWrapper(Boolean(onRequestClose)), children: [
|
|
12499
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { css: modalHeaderStyles, children: header2 }),
|
|
12500
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { css: { flex: 1 }, children }),
|
|
12501
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(HorizontalRhythm, { children: buttonGroup })
|
|
12432
12502
|
] })
|
|
12433
12503
|
}
|
|
12434
12504
|
);
|
|
@@ -12438,22 +12508,22 @@ ModalDialog.displayName = "ModalDialog";
|
|
|
12438
12508
|
|
|
12439
12509
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
12440
12510
|
init_emotion_jsx_shim();
|
|
12441
|
-
var
|
|
12511
|
+
var import_react121 = require("react");
|
|
12442
12512
|
|
|
12443
12513
|
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
12444
12514
|
init_emotion_jsx_shim();
|
|
12445
|
-
var
|
|
12446
|
-
var ObjectGridContainer = (gridCount) =>
|
|
12515
|
+
var import_react120 = require("@emotion/react");
|
|
12516
|
+
var ObjectGridContainer = (gridCount) => import_react120.css`
|
|
12447
12517
|
display: grid;
|
|
12448
12518
|
grid-template-columns: repeat(${gridCount}, minmax(250px, 1fr));
|
|
12449
12519
|
gap: var(--spacing-base);
|
|
12450
12520
|
`;
|
|
12451
12521
|
|
|
12452
12522
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
12453
|
-
var
|
|
12454
|
-
var ObjectGridContainer2 = (0,
|
|
12523
|
+
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
12524
|
+
var ObjectGridContainer2 = (0, import_react121.forwardRef)(
|
|
12455
12525
|
({ gridCount = 3, children, ...props }, ref) => {
|
|
12456
|
-
return /* @__PURE__ */ (0,
|
|
12526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12457
12527
|
"div",
|
|
12458
12528
|
{
|
|
12459
12529
|
ref,
|
|
@@ -12471,8 +12541,8 @@ init_emotion_jsx_shim();
|
|
|
12471
12541
|
|
|
12472
12542
|
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
12473
12543
|
init_emotion_jsx_shim();
|
|
12474
|
-
var
|
|
12475
|
-
var ObjectGridItem =
|
|
12544
|
+
var import_react122 = require("@emotion/react");
|
|
12545
|
+
var ObjectGridItem = import_react122.css`
|
|
12476
12546
|
border: 1px solid var(--gray-300);
|
|
12477
12547
|
border-radius: var(--rounded-base);
|
|
12478
12548
|
background: var(--white);
|
|
@@ -12491,7 +12561,7 @@ var ObjectGridItem = import_react120.css`
|
|
|
12491
12561
|
}
|
|
12492
12562
|
}
|
|
12493
12563
|
`;
|
|
12494
|
-
var ObjectGridWithOnClick =
|
|
12564
|
+
var ObjectGridWithOnClick = import_react122.css`
|
|
12495
12565
|
cursor: pointer;
|
|
12496
12566
|
&:hover,
|
|
12497
12567
|
&:focus {
|
|
@@ -12499,12 +12569,12 @@ var ObjectGridWithOnClick = import_react120.css`
|
|
|
12499
12569
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
12500
12570
|
}
|
|
12501
12571
|
`;
|
|
12502
|
-
var ObjectGridItemMediaWrapper =
|
|
12572
|
+
var ObjectGridItemMediaWrapper = import_react122.css`
|
|
12503
12573
|
display: flex;
|
|
12504
12574
|
flex: 1 1 0;
|
|
12505
12575
|
position: relative;
|
|
12506
12576
|
`;
|
|
12507
|
-
var ObjectGridItemMediaInner =
|
|
12577
|
+
var ObjectGridItemMediaInner = import_react122.css`
|
|
12508
12578
|
background: var(--gray-50);
|
|
12509
12579
|
border-radius: var(--rounded-base) var(--rounded-base) 0 0;
|
|
12510
12580
|
position: relative;
|
|
@@ -12516,7 +12586,7 @@ var ObjectGridItemMediaInner = import_react120.css`
|
|
|
12516
12586
|
height: 100%;
|
|
12517
12587
|
z-index: 0;
|
|
12518
12588
|
`;
|
|
12519
|
-
var ObjectGridItemContentWrapper =
|
|
12589
|
+
var ObjectGridItemContentWrapper = import_react122.css`
|
|
12520
12590
|
display: grid;
|
|
12521
12591
|
grid-template-columns: 1fr auto;
|
|
12522
12592
|
padding: var(--spacing-sm);
|
|
@@ -12524,15 +12594,15 @@ var ObjectGridItemContentWrapper = import_react120.css`
|
|
|
12524
12594
|
min-height: 52px;
|
|
12525
12595
|
width: 100%;
|
|
12526
12596
|
`;
|
|
12527
|
-
var ObjectGridItemInnerWrapper =
|
|
12597
|
+
var ObjectGridItemInnerWrapper = import_react122.css`
|
|
12528
12598
|
min-width: 0;
|
|
12529
12599
|
`;
|
|
12530
|
-
var ObjectGridItemImage =
|
|
12600
|
+
var ObjectGridItemImage = import_react122.css`
|
|
12531
12601
|
object-fit: cover;
|
|
12532
12602
|
width: 100%;
|
|
12533
12603
|
height: auto;
|
|
12534
12604
|
`;
|
|
12535
|
-
var ObjectGridItemSubtitle =
|
|
12605
|
+
var ObjectGridItemSubtitle = import_react122.css`
|
|
12536
12606
|
color: var(--gray-500);
|
|
12537
12607
|
font-size: var(--fs-sm);
|
|
12538
12608
|
white-space: nowrap;
|
|
@@ -12542,7 +12612,7 @@ var ObjectGridItemSubtitle = import_react120.css`
|
|
|
12542
12612
|
`;
|
|
12543
12613
|
|
|
12544
12614
|
// src/components/Objects/ObjectGridItem.tsx
|
|
12545
|
-
var
|
|
12615
|
+
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
12546
12616
|
var ObjectGridItem2 = ({
|
|
12547
12617
|
header: header2,
|
|
12548
12618
|
cover,
|
|
@@ -12557,20 +12627,20 @@ var ObjectGridItem2 = ({
|
|
|
12557
12627
|
const onStopPropagation = (e) => {
|
|
12558
12628
|
e.stopPropagation();
|
|
12559
12629
|
};
|
|
12560
|
-
return /* @__PURE__ */ (0,
|
|
12630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
12561
12631
|
"div",
|
|
12562
12632
|
{
|
|
12563
12633
|
css: [ObjectGridItem, props.onClick ? ObjectGridWithOnClick : void 0],
|
|
12564
12634
|
"aria-selected": isSelected,
|
|
12565
12635
|
...props,
|
|
12566
12636
|
children: [
|
|
12567
|
-
/* @__PURE__ */ (0,
|
|
12568
|
-
/* @__PURE__ */ (0,
|
|
12569
|
-
/* @__PURE__ */ (0,
|
|
12570
|
-
/* @__PURE__ */ (0,
|
|
12571
|
-
/* @__PURE__ */ (0,
|
|
12637
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: ObjectGridItemMediaWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: ObjectGridItemMediaInner, children: cover }) }),
|
|
12638
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { css: ObjectGridItemContentWrapper, children: [
|
|
12639
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(VerticalRhythm, { gap: "0", css: ObjectGridItemInnerWrapper, children: [
|
|
12640
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
12641
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: ObjectGridItemSubtitle, children })
|
|
12572
12642
|
] }),
|
|
12573
|
-
/* @__PURE__ */ (0,
|
|
12643
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
12574
12644
|
HorizontalRhythm,
|
|
12575
12645
|
{
|
|
12576
12646
|
gap: "xs",
|
|
@@ -12579,10 +12649,10 @@ var ObjectGridItem2 = ({
|
|
|
12579
12649
|
onClick: hasOnClick ? onStopPropagation : void 0,
|
|
12580
12650
|
children: [
|
|
12581
12651
|
rightSlot,
|
|
12582
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
12652
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
12583
12653
|
Menu,
|
|
12584
12654
|
{
|
|
12585
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
12655
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(MenuThreeDots, { "data-testid": menuTestId != null ? menuTestId : "object-grid-item-menu-btn" }),
|
|
12586
12656
|
placement: "bottom-end",
|
|
12587
12657
|
children: menuItems
|
|
12588
12658
|
}
|
|
@@ -12601,8 +12671,8 @@ init_emotion_jsx_shim();
|
|
|
12601
12671
|
|
|
12602
12672
|
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
12603
12673
|
init_emotion_jsx_shim();
|
|
12604
|
-
var
|
|
12605
|
-
var CoverImage =
|
|
12674
|
+
var import_react123 = require("@emotion/react");
|
|
12675
|
+
var CoverImage = import_react123.css`
|
|
12606
12676
|
aspect-ratio: 16/9;
|
|
12607
12677
|
max-width: 100%;
|
|
12608
12678
|
max-height: 100%;
|
|
@@ -12611,12 +12681,12 @@ var CoverImage = import_react121.css`
|
|
|
12611
12681
|
padding: var(--spacing-sm);
|
|
12612
12682
|
object-fit: contain;
|
|
12613
12683
|
`;
|
|
12614
|
-
var CoverContainer =
|
|
12684
|
+
var CoverContainer = import_react123.css`
|
|
12615
12685
|
aspect-ratio: 16/9;
|
|
12616
12686
|
width: 100%;
|
|
12617
12687
|
height: 100%;
|
|
12618
12688
|
`;
|
|
12619
|
-
var CoverIconWrapper =
|
|
12689
|
+
var CoverIconWrapper = import_react123.css`
|
|
12620
12690
|
position: relative;
|
|
12621
12691
|
display: flex;
|
|
12622
12692
|
align-items: center;
|
|
@@ -12624,7 +12694,7 @@ var CoverIconWrapper = import_react121.css`
|
|
|
12624
12694
|
flex: 1;
|
|
12625
12695
|
height: 100%;
|
|
12626
12696
|
`;
|
|
12627
|
-
var CoverIconGhost =
|
|
12697
|
+
var CoverIconGhost = import_react123.css`
|
|
12628
12698
|
position: absolute;
|
|
12629
12699
|
width: 60%;
|
|
12630
12700
|
height: auto;
|
|
@@ -12632,7 +12702,7 @@ var CoverIconGhost = import_react121.css`
|
|
|
12632
12702
|
opacity: 0.05;
|
|
12633
12703
|
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
12634
12704
|
`;
|
|
12635
|
-
var CoverSlot =
|
|
12705
|
+
var CoverSlot = import_react123.css`
|
|
12636
12706
|
align-items: center;
|
|
12637
12707
|
background: var(--gray-50);
|
|
12638
12708
|
display: flex;
|
|
@@ -12643,15 +12713,15 @@ var CoverSlot = import_react121.css`
|
|
|
12643
12713
|
width: 24px;
|
|
12644
12714
|
height: 24px;
|
|
12645
12715
|
`;
|
|
12646
|
-
var CoverSlotLeft =
|
|
12716
|
+
var CoverSlotLeft = import_react123.css`
|
|
12647
12717
|
border-bottom-right-radius: var(--rounded-base);
|
|
12648
12718
|
left: var(--spacing-sm);
|
|
12649
12719
|
`;
|
|
12650
|
-
var CoverSlotRight =
|
|
12720
|
+
var CoverSlotRight = import_react123.css`
|
|
12651
12721
|
border-bottom-left-radius: var(--rounded-base);
|
|
12652
12722
|
right: var(--spacing-sm);
|
|
12653
12723
|
`;
|
|
12654
|
-
var CoverButton =
|
|
12724
|
+
var CoverButton = import_react123.css`
|
|
12655
12725
|
align-items: stretch;
|
|
12656
12726
|
border: none;
|
|
12657
12727
|
background: none;
|
|
@@ -12664,27 +12734,27 @@ var CoverButton = import_react121.css`
|
|
|
12664
12734
|
outline: none;
|
|
12665
12735
|
}
|
|
12666
12736
|
`;
|
|
12667
|
-
var CoverSlotBottom =
|
|
12737
|
+
var CoverSlotBottom = import_react123.css`
|
|
12668
12738
|
position: absolute;
|
|
12669
12739
|
bottom: var(--spacing-base);
|
|
12670
12740
|
`;
|
|
12671
|
-
var CoverSlotBottomLeft =
|
|
12741
|
+
var CoverSlotBottomLeft = import_react123.css`
|
|
12672
12742
|
left: var(--spacing-base);
|
|
12673
12743
|
`;
|
|
12674
|
-
var CoverSlotBottomRight =
|
|
12744
|
+
var CoverSlotBottomRight = import_react123.css`
|
|
12675
12745
|
right: var(--spacing-base);
|
|
12676
12746
|
`;
|
|
12677
|
-
var CoverSelectedChip =
|
|
12747
|
+
var CoverSelectedChip = import_react123.css`
|
|
12678
12748
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
12679
12749
|
opacity: 0;
|
|
12680
12750
|
`;
|
|
12681
12751
|
|
|
12682
12752
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
12683
|
-
var
|
|
12753
|
+
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
12684
12754
|
var ObjectGridItemCardCover = (props) => {
|
|
12685
12755
|
if ("imageUrl" in props && props.imageUrl) {
|
|
12686
12756
|
const { imageUrl, srcSet, alt } = props;
|
|
12687
|
-
return /* @__PURE__ */ (0,
|
|
12757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: CoverContainer, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
12688
12758
|
"img",
|
|
12689
12759
|
{
|
|
12690
12760
|
src: imageUrl,
|
|
@@ -12699,9 +12769,9 @@ var ObjectGridItemCardCover = (props) => {
|
|
|
12699
12769
|
}
|
|
12700
12770
|
if ("icon" in props && props.icon) {
|
|
12701
12771
|
const { icon, iconColor } = props;
|
|
12702
|
-
return /* @__PURE__ */ (0,
|
|
12703
|
-
/* @__PURE__ */ (0,
|
|
12704
|
-
/* @__PURE__ */ (0,
|
|
12772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: CoverContainer, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
12773
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", css: CoverIconGhost }),
|
|
12774
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", size: 48 })
|
|
12705
12775
|
] }) });
|
|
12706
12776
|
}
|
|
12707
12777
|
};
|
|
@@ -12712,12 +12782,12 @@ var ObjectGridItemCover = ({
|
|
|
12712
12782
|
coverSlotBottomRight,
|
|
12713
12783
|
...props
|
|
12714
12784
|
}) => {
|
|
12715
|
-
return /* @__PURE__ */ (0,
|
|
12716
|
-
coverSlotLeft ? /* @__PURE__ */ (0,
|
|
12717
|
-
/* @__PURE__ */ (0,
|
|
12718
|
-
coverSlotRight ? /* @__PURE__ */ (0,
|
|
12719
|
-
coverSlotBottomLeft ? /* @__PURE__ */ (0,
|
|
12720
|
-
coverSlotBottomRight ? /* @__PURE__ */ (0,
|
|
12785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
12786
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
12787
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
12788
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
12789
|
+
coverSlotBottomLeft ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlotBottom, CoverSlotBottomLeft], children: coverSlotBottomLeft }) : null,
|
|
12790
|
+
coverSlotBottomRight ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlotBottom, CoverSlotBottomRight], children: coverSlotBottomRight }) : null
|
|
12721
12791
|
] });
|
|
12722
12792
|
};
|
|
12723
12793
|
var ObjectGridItemCoverButton = ({
|
|
@@ -12727,7 +12797,7 @@ var ObjectGridItemCoverButton = ({
|
|
|
12727
12797
|
selectedText = "selected",
|
|
12728
12798
|
...props
|
|
12729
12799
|
}) => {
|
|
12730
|
-
return /* @__PURE__ */ (0,
|
|
12800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
12731
12801
|
"button",
|
|
12732
12802
|
{
|
|
12733
12803
|
type: "button",
|
|
@@ -12737,11 +12807,11 @@ var ObjectGridItemCoverButton = ({
|
|
|
12737
12807
|
onSelection(id);
|
|
12738
12808
|
},
|
|
12739
12809
|
"aria-selected": isSelected,
|
|
12740
|
-
children: /* @__PURE__ */ (0,
|
|
12810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
12741
12811
|
ObjectGridItemCover,
|
|
12742
12812
|
{
|
|
12743
12813
|
...props,
|
|
12744
|
-
coverSlotBottomRight: isSelected ? /* @__PURE__ */ (0,
|
|
12814
|
+
coverSlotBottomRight: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
12745
12815
|
}
|
|
12746
12816
|
)
|
|
12747
12817
|
}
|
|
@@ -12750,12 +12820,12 @@ var ObjectGridItemCoverButton = ({
|
|
|
12750
12820
|
|
|
12751
12821
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
12752
12822
|
init_emotion_jsx_shim();
|
|
12753
|
-
var
|
|
12823
|
+
var import_react125 = require("react");
|
|
12754
12824
|
|
|
12755
12825
|
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
12756
12826
|
init_emotion_jsx_shim();
|
|
12757
|
-
var
|
|
12758
|
-
var ObjectGridItemHeading =
|
|
12827
|
+
var import_react124 = require("@emotion/react");
|
|
12828
|
+
var ObjectGridItemHeading = import_react124.css`
|
|
12759
12829
|
color: var(--gray-500);
|
|
12760
12830
|
overflow: hidden;
|
|
12761
12831
|
text-overflow: ellipsis;
|
|
@@ -12764,12 +12834,12 @@ var ObjectGridItemHeading = import_react122.css`
|
|
|
12764
12834
|
max-width: 100%;
|
|
12765
12835
|
font-size: var(--fs-sm);
|
|
12766
12836
|
`;
|
|
12767
|
-
var PopoverContent =
|
|
12837
|
+
var PopoverContent = import_react124.css`
|
|
12768
12838
|
min-width: 50px;
|
|
12769
12839
|
`;
|
|
12770
12840
|
|
|
12771
12841
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
12772
|
-
var
|
|
12842
|
+
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
12773
12843
|
var ObjectGridItemHeading2 = ({
|
|
12774
12844
|
heading,
|
|
12775
12845
|
beforeHeadingSlot,
|
|
@@ -12777,12 +12847,12 @@ var ObjectGridItemHeading2 = ({
|
|
|
12777
12847
|
tooltip,
|
|
12778
12848
|
...props
|
|
12779
12849
|
}) => {
|
|
12780
|
-
const [hasTruncation, setHasTruncation] = (0,
|
|
12781
|
-
const headingRef = (0,
|
|
12850
|
+
const [hasTruncation, setHasTruncation] = (0, import_react125.useState)(false);
|
|
12851
|
+
const headingRef = (0, import_react125.useRef)(null);
|
|
12782
12852
|
const onStopPropagation = (e) => {
|
|
12783
12853
|
e.stopPropagation();
|
|
12784
12854
|
};
|
|
12785
|
-
(0,
|
|
12855
|
+
(0, import_react125.useEffect)(() => {
|
|
12786
12856
|
const currentHeading = headingRef.current;
|
|
12787
12857
|
const observer = new ResizeObserver((entries) => {
|
|
12788
12858
|
for (const entry of entries) {
|
|
@@ -12799,16 +12869,16 @@ var ObjectGridItemHeading2 = ({
|
|
|
12799
12869
|
}
|
|
12800
12870
|
};
|
|
12801
12871
|
}, []);
|
|
12802
|
-
return /* @__PURE__ */ (0,
|
|
12803
|
-
beforeHeadingSlot ? /* @__PURE__ */ (0,
|
|
12804
|
-
/* @__PURE__ */ (0,
|
|
12805
|
-
afterHeadingSlot ? /* @__PURE__ */ (0,
|
|
12872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", css: { minWidth: 0 }, children: [
|
|
12873
|
+
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(HorizontalRhythm, { gap: "xs", align: "center", onClick: onStopPropagation, children: beforeHeadingSlot }) : null,
|
|
12874
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { title: hasTruncation && tooltip ? tooltip : "", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, ...props, children: heading }) }),
|
|
12875
|
+
afterHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(HorizontalRhythm, { gap: "xs", align: "center", onClick: onStopPropagation, children: afterHeadingSlot }) : null
|
|
12806
12876
|
] });
|
|
12807
12877
|
};
|
|
12808
12878
|
|
|
12809
12879
|
// src/components/Objects/ObjectGridItemIconWithTooltip.tsx
|
|
12810
12880
|
init_emotion_jsx_shim();
|
|
12811
|
-
var
|
|
12881
|
+
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
12812
12882
|
var ObjectGridItemIconWithTooltip = ({
|
|
12813
12883
|
tooltipTitle,
|
|
12814
12884
|
placement = "bottom-start",
|
|
@@ -12816,7 +12886,7 @@ var ObjectGridItemIconWithTooltip = ({
|
|
|
12816
12886
|
iconColor = "accent-dark",
|
|
12817
12887
|
...props
|
|
12818
12888
|
}) => {
|
|
12819
|
-
return /* @__PURE__ */ (0,
|
|
12889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Tooltip, { title: tooltipTitle, placement, ...props, css: { minWidth: "max-content" }, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { css: { whiteSpace: "nowrap" }, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
12820
12890
|
};
|
|
12821
12891
|
|
|
12822
12892
|
// src/components/Objects/ObjectGridItemLoadingSkeleton.tsx
|
|
@@ -12824,15 +12894,15 @@ init_emotion_jsx_shim();
|
|
|
12824
12894
|
|
|
12825
12895
|
// src/components/Objects/styles/ObjectGridItemLoadingSkeleton.styles.ts
|
|
12826
12896
|
init_emotion_jsx_shim();
|
|
12827
|
-
var
|
|
12828
|
-
var ObjectGridItemLoadingSkeleton =
|
|
12897
|
+
var import_react126 = require("@emotion/react");
|
|
12898
|
+
var ObjectGridItemLoadingSkeleton = import_react126.css`
|
|
12829
12899
|
border-radius: var(--rounded-base);
|
|
12830
12900
|
display: flex;
|
|
12831
12901
|
flex-direction: column;
|
|
12832
12902
|
gap: var(--spacing-sm);
|
|
12833
12903
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
12834
12904
|
`;
|
|
12835
|
-
var ObjectGridItemLoadingText = (textLength) =>
|
|
12905
|
+
var ObjectGridItemLoadingText = (textLength) => import_react126.css`
|
|
12836
12906
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
12837
12907
|
border-radius: var(--rounded-base);
|
|
12838
12908
|
background: var(--gray-300);
|
|
@@ -12840,7 +12910,7 @@ var ObjectGridItemLoadingText = (textLength) => import_react124.css`
|
|
|
12840
12910
|
width: clamp(24px, 100%, ${textLength});
|
|
12841
12911
|
height: var(--fs-base);
|
|
12842
12912
|
`;
|
|
12843
|
-
var ObjectGridItemLoadingImageWrapper =
|
|
12913
|
+
var ObjectGridItemLoadingImageWrapper = import_react126.css`
|
|
12844
12914
|
aspect-ratio: 16/9;
|
|
12845
12915
|
max-width: 100%;
|
|
12846
12916
|
max-height: 100%;
|
|
@@ -12848,7 +12918,7 @@ var ObjectGridItemLoadingImageWrapper = import_react124.css`
|
|
|
12848
12918
|
padding: var(--spacing-sm);
|
|
12849
12919
|
overflow: hidden;
|
|
12850
12920
|
`;
|
|
12851
|
-
var ObjectGridItemLoadingImage =
|
|
12921
|
+
var ObjectGridItemLoadingImage = import_react126.css`
|
|
12852
12922
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
12853
12923
|
border-radius: var(--rounded-base);
|
|
12854
12924
|
background: var(--gray-300);
|
|
@@ -12857,21 +12927,21 @@ var ObjectGridItemLoadingImage = import_react124.css`
|
|
|
12857
12927
|
height: auto;
|
|
12858
12928
|
aspect-ratio: 1;
|
|
12859
12929
|
`;
|
|
12860
|
-
var ObjectGridItemLoadingContentWrapper =
|
|
12930
|
+
var ObjectGridItemLoadingContentWrapper = import_react126.css`
|
|
12861
12931
|
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
12862
12932
|
min-height: 52px;
|
|
12863
12933
|
`;
|
|
12864
|
-
var ObjectGridItemLoadingContentContainer =
|
|
12934
|
+
var ObjectGridItemLoadingContentContainer = import_react126.css`
|
|
12865
12935
|
flex-grow: 1;
|
|
12866
12936
|
gap: var(--spacing-xs);
|
|
12867
12937
|
`;
|
|
12868
12938
|
|
|
12869
12939
|
// src/components/Objects/ObjectGridItemLoadingSkeleton.tsx
|
|
12870
|
-
var
|
|
12940
|
+
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
12871
12941
|
var ObjectGridItemLoadingSkeleton2 = () => {
|
|
12872
|
-
return /* @__PURE__ */ (0,
|
|
12873
|
-
/* @__PURE__ */ (0,
|
|
12874
|
-
/* @__PURE__ */ (0,
|
|
12942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { css: ObjectGridItemLoadingSkeleton, children: [
|
|
12943
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { css: ObjectGridItemLoadingImageWrapper, "data-testid": "object-grid-item-cover-skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { css: ObjectGridItemLoadingImage, role: "presentation" }) }),
|
|
12944
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
12875
12945
|
HorizontalRhythm,
|
|
12876
12946
|
{
|
|
12877
12947
|
css: ObjectGridItemLoadingContentWrapper,
|
|
@@ -12879,13 +12949,13 @@ var ObjectGridItemLoadingSkeleton2 = () => {
|
|
|
12879
12949
|
justify: "space-between",
|
|
12880
12950
|
gap: "sm",
|
|
12881
12951
|
children: [
|
|
12882
|
-
/* @__PURE__ */ (0,
|
|
12883
|
-
/* @__PURE__ */ (0,
|
|
12884
|
-
/* @__PURE__ */ (0,
|
|
12952
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(VerticalRhythm, { css: ObjectGridItemLoadingContentContainer, gap: "0", children: [
|
|
12953
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("18ch") }) }),
|
|
12954
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("12ch") })
|
|
12885
12955
|
] }),
|
|
12886
|
-
/* @__PURE__ */ (0,
|
|
12887
|
-
/* @__PURE__ */ (0,
|
|
12888
|
-
/* @__PURE__ */ (0,
|
|
12956
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(HorizontalRhythm, { css: ObjectGridItemLoadingContentContainer, gap: "xs", justify: "flex-end", children: [
|
|
12957
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("6ch") }),
|
|
12958
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("24px") })
|
|
12889
12959
|
] })
|
|
12890
12960
|
]
|
|
12891
12961
|
}
|
|
@@ -12898,8 +12968,8 @@ init_emotion_jsx_shim();
|
|
|
12898
12968
|
|
|
12899
12969
|
// src/components/Objects/styles/ObjectListItem.styles.ts
|
|
12900
12970
|
init_emotion_jsx_shim();
|
|
12901
|
-
var
|
|
12902
|
-
var ObjectListItem =
|
|
12971
|
+
var import_react127 = require("@emotion/react");
|
|
12972
|
+
var ObjectListItem = import_react127.css`
|
|
12903
12973
|
background: var(--white);
|
|
12904
12974
|
display: grid;
|
|
12905
12975
|
gap: var(--spacing-sm);
|
|
@@ -12912,25 +12982,25 @@ var ObjectListItem = import_react125.css`
|
|
|
12912
12982
|
background: var(--gray-50);
|
|
12913
12983
|
}
|
|
12914
12984
|
`;
|
|
12915
|
-
var ObjectListItemSingle =
|
|
12985
|
+
var ObjectListItemSingle = import_react127.css`
|
|
12916
12986
|
align-items: center;
|
|
12917
12987
|
`;
|
|
12918
|
-
var ObjectListItemContentWrapper =
|
|
12988
|
+
var ObjectListItemContentWrapper = import_react127.css`
|
|
12919
12989
|
display: grid;
|
|
12920
12990
|
gap: var(--spacing-sm);
|
|
12921
12991
|
justify-content: space-between;
|
|
12922
12992
|
flex-grow: 1;
|
|
12923
12993
|
`;
|
|
12924
|
-
var ObjectListItemRightSlot =
|
|
12994
|
+
var ObjectListItemRightSlot = import_react127.css`
|
|
12925
12995
|
display: flex;
|
|
12926
12996
|
gap: var(--spacing-sm);
|
|
12927
12997
|
`;
|
|
12928
|
-
var ObjectListItemContainer =
|
|
12998
|
+
var ObjectListItemContainer = import_react127.css`
|
|
12929
12999
|
> [role='listitem']:not(:first-of-type) {
|
|
12930
13000
|
border-top: 1px solid var(--gray-200);
|
|
12931
13001
|
}
|
|
12932
13002
|
`;
|
|
12933
|
-
var ObjectListItemCover =
|
|
13003
|
+
var ObjectListItemCover = import_react127.css`
|
|
12934
13004
|
align-items: center;
|
|
12935
13005
|
background: var(--gray-100);
|
|
12936
13006
|
color: var(--gray-500);
|
|
@@ -12940,12 +13010,12 @@ var ObjectListItemCover = import_react125.css`
|
|
|
12940
13010
|
text-align: center;
|
|
12941
13011
|
font-size: var(--fs-xs);
|
|
12942
13012
|
`;
|
|
12943
|
-
var ObjectListItemImage =
|
|
13013
|
+
var ObjectListItemImage = import_react127.css`
|
|
12944
13014
|
object-fit: cover;
|
|
12945
13015
|
width: 100%;
|
|
12946
13016
|
height: 100%;
|
|
12947
13017
|
`;
|
|
12948
|
-
var ObjectListItemLoading =
|
|
13018
|
+
var ObjectListItemLoading = import_react127.css`
|
|
12949
13019
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
12950
13020
|
background: var(--white);
|
|
12951
13021
|
display: flex;
|
|
@@ -12953,10 +13023,10 @@ var ObjectListItemLoading = import_react125.css`
|
|
|
12953
13023
|
flex-grow: 1;
|
|
12954
13024
|
padding: var(--spacing-sm);
|
|
12955
13025
|
`;
|
|
12956
|
-
var ObjectListItemLoadingInner =
|
|
13026
|
+
var ObjectListItemLoadingInner = import_react127.css`
|
|
12957
13027
|
flex-grow: 1;
|
|
12958
13028
|
`;
|
|
12959
|
-
var ObjectListItemLoadingText = (textLength) =>
|
|
13029
|
+
var ObjectListItemLoadingText = (textLength) => import_react127.css`
|
|
12960
13030
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
12961
13031
|
border-radius: var(--rounded-base);
|
|
12962
13032
|
background: var(--gray-300);
|
|
@@ -12964,7 +13034,7 @@ var ObjectListItemLoadingText = (textLength) => import_react125.css`
|
|
|
12964
13034
|
width: clamp(10ch, 100%, ${textLength});
|
|
12965
13035
|
height: var(--fs-base);
|
|
12966
13036
|
`;
|
|
12967
|
-
var ObjectListItemLoadingImage =
|
|
13037
|
+
var ObjectListItemLoadingImage = import_react127.css`
|
|
12968
13038
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
12969
13039
|
border-radius: var(--rounded-base);
|
|
12970
13040
|
background: var(--gray-300);
|
|
@@ -12972,18 +13042,18 @@ var ObjectListItemLoadingImage = import_react125.css`
|
|
|
12972
13042
|
width: 80px;
|
|
12973
13043
|
height: 55px;
|
|
12974
13044
|
`;
|
|
12975
|
-
var ObjectListItemHeadingWrapper =
|
|
13045
|
+
var ObjectListItemHeadingWrapper = import_react127.css`
|
|
12976
13046
|
display: flex;
|
|
12977
13047
|
gap: var(--spacing-xs);
|
|
12978
13048
|
`;
|
|
12979
13049
|
|
|
12980
13050
|
// src/components/Objects/ObjectItemLoadingSkeleton.tsx
|
|
12981
|
-
var
|
|
13051
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
12982
13052
|
var ObjectItemLoadingSkeleton = ({
|
|
12983
13053
|
showCover,
|
|
12984
13054
|
renderAs = "single"
|
|
12985
13055
|
}) => {
|
|
12986
|
-
return /* @__PURE__ */ (0,
|
|
13056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
12987
13057
|
"div",
|
|
12988
13058
|
{
|
|
12989
13059
|
css: [
|
|
@@ -12993,10 +13063,10 @@ var ObjectItemLoadingSkeleton = ({
|
|
|
12993
13063
|
}
|
|
12994
13064
|
],
|
|
12995
13065
|
children: [
|
|
12996
|
-
showCover ? /* @__PURE__ */ (0,
|
|
12997
|
-
/* @__PURE__ */ (0,
|
|
12998
|
-
/* @__PURE__ */ (0,
|
|
12999
|
-
renderAs === "single" ? null : /* @__PURE__ */ (0,
|
|
13066
|
+
showCover ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { "data-testid": "object-list-item-cover-skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectListItemLoadingImage }) }) : null,
|
|
13067
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(VerticalRhythm, { css: ObjectListItemLoadingInner, justify: "space-between", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(VerticalRhythm, { gap: "xs", children: [
|
|
13068
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectListItemLoadingText("30ch") }) }),
|
|
13069
|
+
renderAs === "single" ? null : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectListItemLoadingText("20ch") })
|
|
13000
13070
|
] }) })
|
|
13001
13071
|
]
|
|
13002
13072
|
}
|
|
@@ -13005,7 +13075,7 @@ var ObjectItemLoadingSkeleton = ({
|
|
|
13005
13075
|
|
|
13006
13076
|
// src/components/Objects/ObjectListItem.tsx
|
|
13007
13077
|
init_emotion_jsx_shim();
|
|
13008
|
-
var
|
|
13078
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
13009
13079
|
var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
13010
13080
|
const {
|
|
13011
13081
|
renderAs,
|
|
@@ -13018,7 +13088,7 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
13018
13088
|
portalElement,
|
|
13019
13089
|
...divProps
|
|
13020
13090
|
} = props;
|
|
13021
|
-
return /* @__PURE__ */ (0,
|
|
13091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
13022
13092
|
"div",
|
|
13023
13093
|
{
|
|
13024
13094
|
role: "listitem",
|
|
@@ -13027,8 +13097,8 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
13027
13097
|
"aria-selected": isSelected,
|
|
13028
13098
|
...divProps,
|
|
13029
13099
|
children: [
|
|
13030
|
-
/* @__PURE__ */ (0,
|
|
13031
|
-
/* @__PURE__ */ (0,
|
|
13100
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: dragHandle }),
|
|
13101
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
13032
13102
|
"div",
|
|
13033
13103
|
{
|
|
13034
13104
|
css: [
|
|
@@ -13038,15 +13108,15 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
13038
13108
|
}`
|
|
13039
13109
|
],
|
|
13040
13110
|
children: [
|
|
13041
|
-
cover ? /* @__PURE__ */ (0,
|
|
13042
|
-
/* @__PURE__ */ (0,
|
|
13111
|
+
cover ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
|
|
13112
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
13043
13113
|
VerticalRhythm,
|
|
13044
13114
|
{
|
|
13045
13115
|
gap: "0",
|
|
13046
13116
|
justify: renderAs === "multi" ? "flex-start" : "center",
|
|
13047
13117
|
"data-testid": "title-container",
|
|
13048
13118
|
children: [
|
|
13049
|
-
/* @__PURE__ */ (0,
|
|
13119
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
13050
13120
|
HorizontalRhythm,
|
|
13051
13121
|
{
|
|
13052
13122
|
gap: "xs",
|
|
@@ -13059,14 +13129,14 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
13059
13129
|
]
|
|
13060
13130
|
}
|
|
13061
13131
|
),
|
|
13062
|
-
/* @__PURE__ */ (0,
|
|
13132
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
|
|
13063
13133
|
]
|
|
13064
13134
|
}
|
|
13065
13135
|
),
|
|
13066
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
13136
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(HorizontalRhythm, { gap: "0", align: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
13067
13137
|
Menu,
|
|
13068
13138
|
{
|
|
13069
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
13139
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(MenuThreeDots, { "data-testid": "object-list-item-menu-btn" }),
|
|
13070
13140
|
placement: "bottom-end",
|
|
13071
13141
|
portalElement,
|
|
13072
13142
|
children: menuItems
|
|
@@ -13079,23 +13149,23 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
13079
13149
|
|
|
13080
13150
|
// src/components/Objects/ObjectListItemContainer.tsx
|
|
13081
13151
|
init_emotion_jsx_shim();
|
|
13082
|
-
var
|
|
13152
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
13083
13153
|
var ObjectListItemContainer2 = ({ children, gap = "0", ...props }) => {
|
|
13084
|
-
return /* @__PURE__ */ (0,
|
|
13154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(VerticalRhythm, { gap, css: ObjectListItemContainer, role: "list", ...props, children });
|
|
13085
13155
|
};
|
|
13086
13156
|
|
|
13087
13157
|
// src/components/Objects/ObjectListItemCover.tsx
|
|
13088
13158
|
init_emotion_jsx_shim();
|
|
13089
|
-
var
|
|
13159
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
13090
13160
|
var ObjectListItemCover2 = ({
|
|
13091
13161
|
imageUrl,
|
|
13092
13162
|
noImageText = "Image not available",
|
|
13093
13163
|
...props
|
|
13094
13164
|
}) => {
|
|
13095
13165
|
if (!imageUrl) {
|
|
13096
|
-
return /* @__PURE__ */ (0,
|
|
13166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { css: ObjectListItemCover, role: "presentation", "data-testid": "object-list-item-thumbnail", children: noImageText });
|
|
13097
13167
|
}
|
|
13098
|
-
return /* @__PURE__ */ (0,
|
|
13168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { css: ObjectListItemCover, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
13099
13169
|
"img",
|
|
13100
13170
|
{
|
|
13101
13171
|
src: imageUrl,
|
|
@@ -13112,8 +13182,8 @@ init_emotion_jsx_shim();
|
|
|
13112
13182
|
|
|
13113
13183
|
// src/components/Objects/styles/ObjectListItemHeading.styles.ts
|
|
13114
13184
|
init_emotion_jsx_shim();
|
|
13115
|
-
var
|
|
13116
|
-
var ObjectListItemHeading =
|
|
13185
|
+
var import_react128 = require("@emotion/react");
|
|
13186
|
+
var ObjectListItemHeading = import_react128.css`
|
|
13117
13187
|
display: flex;
|
|
13118
13188
|
flex-direction: column;
|
|
13119
13189
|
gap: var(--spacing-xs);
|
|
@@ -13123,22 +13193,22 @@ var ObjectListItemHeading = import_react126.css`
|
|
|
13123
13193
|
flex-direction: row;
|
|
13124
13194
|
}
|
|
13125
13195
|
`;
|
|
13126
|
-
var ObjectListItemHeadingAfterWrapper =
|
|
13196
|
+
var ObjectListItemHeadingAfterWrapper = import_react128.css`
|
|
13127
13197
|
line-height: 1.25;
|
|
13128
13198
|
`;
|
|
13129
13199
|
|
|
13130
13200
|
// src/components/Objects/ObjectListItemHeading.tsx
|
|
13131
|
-
var
|
|
13201
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
13132
13202
|
var ObjectListItemHeading2 = ({
|
|
13133
13203
|
heading,
|
|
13134
13204
|
beforeHeadingSlot,
|
|
13135
13205
|
afterHeadingSlot,
|
|
13136
13206
|
...props
|
|
13137
13207
|
}) => {
|
|
13138
|
-
return /* @__PURE__ */ (0,
|
|
13139
|
-
beforeHeadingSlot ? /* @__PURE__ */ (0,
|
|
13140
|
-
/* @__PURE__ */ (0,
|
|
13141
|
-
/* @__PURE__ */ (0,
|
|
13208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { css: ObjectListItemHeading, ...props, children: [
|
|
13209
|
+
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: beforeHeadingSlot }) : null,
|
|
13210
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(HorizontalRhythm, { css: ObjectListItemHeadingAfterWrapper, gap: "xs", align: "flex-start", children: [
|
|
13211
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { role: "heading", "data-testid": "reference-item-name", children: heading }),
|
|
13142
13212
|
afterHeadingSlot
|
|
13143
13213
|
] })
|
|
13144
13214
|
] });
|
|
@@ -13178,7 +13248,7 @@ var page = import_css.css`
|
|
|
13178
13248
|
`;
|
|
13179
13249
|
|
|
13180
13250
|
// src/components/Pagination/Pagination.tsx
|
|
13181
|
-
var
|
|
13251
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
13182
13252
|
function Pagination({
|
|
13183
13253
|
limit,
|
|
13184
13254
|
offset,
|
|
@@ -13193,12 +13263,12 @@ function Pagination({
|
|
|
13193
13263
|
if (pageCount <= 1) {
|
|
13194
13264
|
return null;
|
|
13195
13265
|
}
|
|
13196
|
-
return /* @__PURE__ */ (0,
|
|
13266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
13197
13267
|
import_react_paginate.default,
|
|
13198
13268
|
{
|
|
13199
13269
|
forcePage: currentPage,
|
|
13200
|
-
previousLabel: /* @__PURE__ */ (0,
|
|
13201
|
-
nextLabel: /* @__PURE__ */ (0,
|
|
13270
|
+
previousLabel: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: prevNextControls, children: "<" }),
|
|
13271
|
+
nextLabel: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: prevNextControls, children: ">" }),
|
|
13202
13272
|
breakLabel: "...",
|
|
13203
13273
|
pageCount,
|
|
13204
13274
|
marginPagesDisplayed: 2,
|
|
@@ -13218,8 +13288,8 @@ function Pagination({
|
|
|
13218
13288
|
|
|
13219
13289
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
13220
13290
|
init_emotion_jsx_shim();
|
|
13221
|
-
var
|
|
13222
|
-
var ParameterShellContext = (0,
|
|
13291
|
+
var import_react129 = require("react");
|
|
13292
|
+
var ParameterShellContext = (0, import_react129.createContext)({
|
|
13223
13293
|
id: "",
|
|
13224
13294
|
label: "",
|
|
13225
13295
|
hiddenLabel: void 0,
|
|
@@ -13228,7 +13298,7 @@ var ParameterShellContext = (0, import_react127.createContext)({
|
|
|
13228
13298
|
}
|
|
13229
13299
|
});
|
|
13230
13300
|
var useParameterShell = () => {
|
|
13231
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
13301
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react129.useContext)(ParameterShellContext);
|
|
13232
13302
|
return {
|
|
13233
13303
|
id,
|
|
13234
13304
|
label,
|
|
@@ -13243,8 +13313,8 @@ init_emotion_jsx_shim();
|
|
|
13243
13313
|
|
|
13244
13314
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
13245
13315
|
init_emotion_jsx_shim();
|
|
13246
|
-
var
|
|
13247
|
-
var inputIconBtn =
|
|
13316
|
+
var import_react130 = require("@emotion/react");
|
|
13317
|
+
var inputIconBtn = import_react130.css`
|
|
13248
13318
|
align-items: center;
|
|
13249
13319
|
border: none;
|
|
13250
13320
|
border-radius: var(--rounded-base);
|
|
@@ -13272,7 +13342,7 @@ var inputIconBtn = import_react128.css`
|
|
|
13272
13342
|
`;
|
|
13273
13343
|
|
|
13274
13344
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
13275
|
-
var
|
|
13345
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
13276
13346
|
var LabelLeadingIcon = ({
|
|
13277
13347
|
icon,
|
|
13278
13348
|
iconColor,
|
|
@@ -13283,7 +13353,7 @@ var LabelLeadingIcon = ({
|
|
|
13283
13353
|
...props
|
|
13284
13354
|
}) => {
|
|
13285
13355
|
const titleFr = title != null ? title : isLocked ? "Read-only pattern parameter" : "Click to connect to external content";
|
|
13286
|
-
return /* @__PURE__ */ (0,
|
|
13356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Tooltip, { title: titleFr, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
13287
13357
|
"button",
|
|
13288
13358
|
{
|
|
13289
13359
|
css: inputIconBtn,
|
|
@@ -13293,7 +13363,7 @@ var LabelLeadingIcon = ({
|
|
|
13293
13363
|
...props,
|
|
13294
13364
|
"data-testid": "lock-button",
|
|
13295
13365
|
children: [
|
|
13296
|
-
/* @__PURE__ */ (0,
|
|
13366
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
13297
13367
|
Icon,
|
|
13298
13368
|
{
|
|
13299
13369
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -13312,20 +13382,20 @@ init_emotion_jsx_shim();
|
|
|
13312
13382
|
|
|
13313
13383
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
13314
13384
|
init_emotion_jsx_shim();
|
|
13315
|
-
var
|
|
13316
|
-
var ParameterDrawerHeaderContainer =
|
|
13385
|
+
var import_react131 = require("@emotion/react");
|
|
13386
|
+
var ParameterDrawerHeaderContainer = import_react131.css`
|
|
13317
13387
|
align-items: center;
|
|
13318
13388
|
display: flex;
|
|
13319
13389
|
gap: var(--spacing-base);
|
|
13320
13390
|
justify-content: space-between;
|
|
13321
13391
|
margin-bottom: var(--spacing-sm);
|
|
13322
13392
|
`;
|
|
13323
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
13393
|
+
var ParameterDrawerHeaderTitleGroup = import_react131.css`
|
|
13324
13394
|
align-items: center;
|
|
13325
13395
|
display: flex;
|
|
13326
13396
|
gap: var(--spacing-sm);
|
|
13327
13397
|
`;
|
|
13328
|
-
var ParameterDrawerHeaderTitle =
|
|
13398
|
+
var ParameterDrawerHeaderTitle = import_react131.css`
|
|
13329
13399
|
text-overflow: ellipsis;
|
|
13330
13400
|
white-space: nowrap;
|
|
13331
13401
|
overflow: hidden;
|
|
@@ -13333,12 +13403,12 @@ var ParameterDrawerHeaderTitle = import_react129.css`
|
|
|
13333
13403
|
`;
|
|
13334
13404
|
|
|
13335
13405
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
13336
|
-
var
|
|
13406
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
13337
13407
|
var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
13338
|
-
return /* @__PURE__ */ (0,
|
|
13339
|
-
/* @__PURE__ */ (0,
|
|
13408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
13409
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
13340
13410
|
iconBeforeTitle,
|
|
13341
|
-
/* @__PURE__ */ (0,
|
|
13411
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title, children: title })
|
|
13342
13412
|
] }),
|
|
13343
13413
|
children
|
|
13344
13414
|
] });
|
|
@@ -13346,12 +13416,12 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
13346
13416
|
|
|
13347
13417
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
13348
13418
|
init_emotion_jsx_shim();
|
|
13349
|
-
var
|
|
13419
|
+
var import_react133 = require("react");
|
|
13350
13420
|
|
|
13351
13421
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
13352
13422
|
init_emotion_jsx_shim();
|
|
13353
|
-
var
|
|
13354
|
-
var fieldsetStyles =
|
|
13423
|
+
var import_react132 = require("@emotion/react");
|
|
13424
|
+
var fieldsetStyles = import_react132.css`
|
|
13355
13425
|
&:disabled,
|
|
13356
13426
|
[readonly] {
|
|
13357
13427
|
pointer-events: none;
|
|
@@ -13362,7 +13432,7 @@ var fieldsetStyles = import_react130.css`
|
|
|
13362
13432
|
}
|
|
13363
13433
|
}
|
|
13364
13434
|
`;
|
|
13365
|
-
var fieldsetLegend2 =
|
|
13435
|
+
var fieldsetLegend2 = import_react132.css`
|
|
13366
13436
|
display: block;
|
|
13367
13437
|
font-weight: var(--fw-medium);
|
|
13368
13438
|
margin-bottom: var(--spacing-sm);
|
|
@@ -13370,11 +13440,11 @@ var fieldsetLegend2 = import_react130.css`
|
|
|
13370
13440
|
`;
|
|
13371
13441
|
|
|
13372
13442
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
13373
|
-
var
|
|
13374
|
-
var ParameterGroup = (0,
|
|
13443
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
13444
|
+
var ParameterGroup = (0, import_react133.forwardRef)(
|
|
13375
13445
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
13376
|
-
return /* @__PURE__ */ (0,
|
|
13377
|
-
/* @__PURE__ */ (0,
|
|
13446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
13447
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
13378
13448
|
children
|
|
13379
13449
|
] });
|
|
13380
13450
|
}
|
|
@@ -13382,24 +13452,24 @@ var ParameterGroup = (0, import_react131.forwardRef)(
|
|
|
13382
13452
|
|
|
13383
13453
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
13384
13454
|
init_emotion_jsx_shim();
|
|
13385
|
-
var
|
|
13455
|
+
var import_react141 = require("react");
|
|
13386
13456
|
|
|
13387
13457
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13388
13458
|
init_emotion_jsx_shim();
|
|
13389
|
-
var
|
|
13459
|
+
var import_react135 = require("react");
|
|
13390
13460
|
var import_react_dom2 = require("react-dom");
|
|
13391
13461
|
|
|
13392
13462
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
13393
13463
|
init_emotion_jsx_shim();
|
|
13394
|
-
var
|
|
13395
|
-
var previewWrapper =
|
|
13464
|
+
var import_react134 = require("@emotion/react");
|
|
13465
|
+
var previewWrapper = import_react134.css`
|
|
13396
13466
|
margin-top: var(--spacing-xs);
|
|
13397
13467
|
background: var(--gray-50);
|
|
13398
13468
|
padding: var(--spacing-sm);
|
|
13399
13469
|
border: solid 1px var(--gray-300);
|
|
13400
13470
|
border-radius: var(--rounded-sm);
|
|
13401
13471
|
`;
|
|
13402
|
-
var previewLink =
|
|
13472
|
+
var previewLink = import_react134.css`
|
|
13403
13473
|
display: block;
|
|
13404
13474
|
width: 100%;
|
|
13405
13475
|
|
|
@@ -13407,7 +13477,7 @@ var previewLink = import_react132.css`
|
|
|
13407
13477
|
max-height: 9rem;
|
|
13408
13478
|
}
|
|
13409
13479
|
`;
|
|
13410
|
-
var previewModalWrapper =
|
|
13480
|
+
var previewModalWrapper = import_react134.css`
|
|
13411
13481
|
background: var(--gray-50);
|
|
13412
13482
|
display: flex;
|
|
13413
13483
|
height: 100%;
|
|
@@ -13416,7 +13486,7 @@ var previewModalWrapper = import_react132.css`
|
|
|
13416
13486
|
border: solid 1px var(--gray-300);
|
|
13417
13487
|
border-radius: var(--rounded-sm);
|
|
13418
13488
|
`;
|
|
13419
|
-
var previewModalImage =
|
|
13489
|
+
var previewModalImage = import_react134.css`
|
|
13420
13490
|
display: flex;
|
|
13421
13491
|
height: 100%;
|
|
13422
13492
|
width: 100%;
|
|
@@ -13428,32 +13498,32 @@ var previewModalImage = import_react132.css`
|
|
|
13428
13498
|
`;
|
|
13429
13499
|
|
|
13430
13500
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13431
|
-
var
|
|
13501
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
13432
13502
|
function ParameterImagePreview({ imageSrc }) {
|
|
13433
|
-
const [showModal, setShowModal] = (0,
|
|
13434
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
13435
|
-
/* @__PURE__ */ (0,
|
|
13436
|
-
/* @__PURE__ */ (0,
|
|
13503
|
+
const [showModal, setShowModal] = (0, import_react135.useState)(false);
|
|
13504
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { css: previewWrapper, children: [
|
|
13505
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
13506
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
13437
13507
|
"button",
|
|
13438
13508
|
{
|
|
13439
13509
|
css: previewLink,
|
|
13440
13510
|
onClick: () => {
|
|
13441
13511
|
setShowModal(true);
|
|
13442
13512
|
},
|
|
13443
|
-
children: /* @__PURE__ */ (0,
|
|
13513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
13444
13514
|
}
|
|
13445
13515
|
)
|
|
13446
13516
|
] }) : null;
|
|
13447
13517
|
}
|
|
13448
13518
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
13449
|
-
return open ? /* @__PURE__ */ (0,
|
|
13450
|
-
/* @__PURE__ */ (0,
|
|
13519
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_jsx_runtime117.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
13520
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
13451
13521
|
Modal,
|
|
13452
13522
|
{
|
|
13453
13523
|
header: "Image Preview",
|
|
13454
13524
|
onRequestClose,
|
|
13455
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
13456
|
-
children: /* @__PURE__ */ (0,
|
|
13525
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
13526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
13457
13527
|
}
|
|
13458
13528
|
),
|
|
13459
13529
|
document.body
|
|
@@ -13462,16 +13532,16 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
13462
13532
|
|
|
13463
13533
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
13464
13534
|
init_emotion_jsx_shim();
|
|
13465
|
-
var
|
|
13466
|
-
var
|
|
13535
|
+
var import_react139 = require("@emotion/react");
|
|
13536
|
+
var import_react140 = require("react");
|
|
13467
13537
|
|
|
13468
13538
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
13469
13539
|
init_emotion_jsx_shim();
|
|
13470
13540
|
|
|
13471
13541
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
13472
13542
|
init_emotion_jsx_shim();
|
|
13473
|
-
var
|
|
13474
|
-
var inputContainer2 =
|
|
13543
|
+
var import_react136 = require("@emotion/react");
|
|
13544
|
+
var inputContainer2 = import_react136.css`
|
|
13475
13545
|
position: relative;
|
|
13476
13546
|
scroll-margin: var(--spacing-2xl);
|
|
13477
13547
|
|
|
@@ -13484,14 +13554,14 @@ var inputContainer2 = import_react134.css`
|
|
|
13484
13554
|
}
|
|
13485
13555
|
}
|
|
13486
13556
|
`;
|
|
13487
|
-
var labelText2 =
|
|
13557
|
+
var labelText2 = import_react136.css`
|
|
13488
13558
|
align-items: center;
|
|
13489
13559
|
display: flex;
|
|
13490
13560
|
gap: var(--spacing-xs);
|
|
13491
13561
|
font-weight: var(--fw-regular);
|
|
13492
13562
|
margin: 0 0 var(--spacing-xs);
|
|
13493
13563
|
`;
|
|
13494
|
-
var input3 =
|
|
13564
|
+
var input3 = import_react136.css`
|
|
13495
13565
|
display: block;
|
|
13496
13566
|
appearance: none;
|
|
13497
13567
|
box-sizing: border-box;
|
|
@@ -13539,18 +13609,18 @@ var input3 = import_react134.css`
|
|
|
13539
13609
|
color: var(--gray-400);
|
|
13540
13610
|
}
|
|
13541
13611
|
`;
|
|
13542
|
-
var selectInput =
|
|
13612
|
+
var selectInput = import_react136.css`
|
|
13543
13613
|
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");
|
|
13544
13614
|
background-position: right var(--spacing-sm) center;
|
|
13545
13615
|
background-repeat: no-repeat;
|
|
13546
13616
|
background-size: 1rem;
|
|
13547
13617
|
padding-right: var(--spacing-xl);
|
|
13548
13618
|
`;
|
|
13549
|
-
var inputWrapper =
|
|
13619
|
+
var inputWrapper = import_react136.css`
|
|
13550
13620
|
display: flex; // used to correct overflow with chrome textarea
|
|
13551
13621
|
position: relative;
|
|
13552
13622
|
`;
|
|
13553
|
-
var inputIcon2 =
|
|
13623
|
+
var inputIcon2 = import_react136.css`
|
|
13554
13624
|
align-items: center;
|
|
13555
13625
|
background: var(--white);
|
|
13556
13626
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -13566,7 +13636,7 @@ var inputIcon2 = import_react134.css`
|
|
|
13566
13636
|
width: var(--spacing-lg);
|
|
13567
13637
|
z-index: var(--z-10);
|
|
13568
13638
|
`;
|
|
13569
|
-
var inputToggleLabel2 =
|
|
13639
|
+
var inputToggleLabel2 = import_react136.css`
|
|
13570
13640
|
--inline-label-color: var(--typography-base);
|
|
13571
13641
|
align-items: center;
|
|
13572
13642
|
cursor: pointer;
|
|
@@ -13581,7 +13651,7 @@ var inputToggleLabel2 = import_react134.css`
|
|
|
13581
13651
|
--inline-label-color: var(--gray-400);
|
|
13582
13652
|
}
|
|
13583
13653
|
`;
|
|
13584
|
-
var toggleInput2 =
|
|
13654
|
+
var toggleInput2 = import_react136.css`
|
|
13585
13655
|
appearance: none;
|
|
13586
13656
|
border: 1px solid var(--gray-200);
|
|
13587
13657
|
background: var(--white);
|
|
@@ -13635,7 +13705,7 @@ var toggleInput2 = import_react134.css`
|
|
|
13635
13705
|
border-color: var(--gray-300);
|
|
13636
13706
|
}
|
|
13637
13707
|
`;
|
|
13638
|
-
var inlineLabel2 =
|
|
13708
|
+
var inlineLabel2 = import_react136.css`
|
|
13639
13709
|
color: var(--inline-label-color);
|
|
13640
13710
|
padding-left: var(--spacing-md);
|
|
13641
13711
|
font-size: var(--fs-sm);
|
|
@@ -13652,7 +13722,7 @@ var inlineLabel2 = import_react134.css`
|
|
|
13652
13722
|
}
|
|
13653
13723
|
}
|
|
13654
13724
|
`;
|
|
13655
|
-
var inputMenu =
|
|
13725
|
+
var inputMenu = import_react136.css`
|
|
13656
13726
|
background: none;
|
|
13657
13727
|
border: none;
|
|
13658
13728
|
padding: var(--spacing-2xs);
|
|
@@ -13660,10 +13730,10 @@ var inputMenu = import_react134.css`
|
|
|
13660
13730
|
top: calc(var(--spacing-md) * -1.2);
|
|
13661
13731
|
right: 0;
|
|
13662
13732
|
`;
|
|
13663
|
-
var inputActionItems =
|
|
13733
|
+
var inputActionItems = import_react136.css`
|
|
13664
13734
|
display: flex;
|
|
13665
13735
|
`;
|
|
13666
|
-
var inputMenuHover =
|
|
13736
|
+
var inputMenuHover = import_react136.css`
|
|
13667
13737
|
opacity: var(--opacity-50);
|
|
13668
13738
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
13669
13739
|
|
|
@@ -13673,11 +13743,11 @@ var inputMenuHover = import_react134.css`
|
|
|
13673
13743
|
background-color: var(--gray-200);
|
|
13674
13744
|
}
|
|
13675
13745
|
`;
|
|
13676
|
-
var textarea2 =
|
|
13746
|
+
var textarea2 = import_react136.css`
|
|
13677
13747
|
resize: vertical;
|
|
13678
13748
|
min-height: 2rem;
|
|
13679
13749
|
`;
|
|
13680
|
-
var dataConnectButton =
|
|
13750
|
+
var dataConnectButton = import_react136.css`
|
|
13681
13751
|
align-items: center;
|
|
13682
13752
|
appearance: none;
|
|
13683
13753
|
box-sizing: border-box;
|
|
@@ -13713,7 +13783,7 @@ var dataConnectButton = import_react134.css`
|
|
|
13713
13783
|
pointer-events: none;
|
|
13714
13784
|
}
|
|
13715
13785
|
`;
|
|
13716
|
-
var linkParameterBtn =
|
|
13786
|
+
var linkParameterBtn = import_react136.css`
|
|
13717
13787
|
border-radius: var(--rounded-base);
|
|
13718
13788
|
background: transparent;
|
|
13719
13789
|
border: none;
|
|
@@ -13722,7 +13792,7 @@ var linkParameterBtn = import_react134.css`
|
|
|
13722
13792
|
font-size: var(--fs-sm);
|
|
13723
13793
|
line-height: 1;
|
|
13724
13794
|
`;
|
|
13725
|
-
var linkParameterControls =
|
|
13795
|
+
var linkParameterControls = import_react136.css`
|
|
13726
13796
|
position: absolute;
|
|
13727
13797
|
inset: 0 0 0 auto;
|
|
13728
13798
|
padding: 0 var(--spacing-base);
|
|
@@ -13731,7 +13801,7 @@ var linkParameterControls = import_react134.css`
|
|
|
13731
13801
|
justify-content: center;
|
|
13732
13802
|
gap: var(--spacing-base);
|
|
13733
13803
|
`;
|
|
13734
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
13804
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react136.css`
|
|
13735
13805
|
padding-right: calc(
|
|
13736
13806
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
13737
13807
|
var(--spacing-base)
|
|
@@ -13744,7 +13814,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react134.css`
|
|
|
13744
13814
|
}
|
|
13745
13815
|
}
|
|
13746
13816
|
`;
|
|
13747
|
-
var linkParameterIcon =
|
|
13817
|
+
var linkParameterIcon = import_react136.css`
|
|
13748
13818
|
align-items: center;
|
|
13749
13819
|
color: var(--brand-secondary-3);
|
|
13750
13820
|
display: flex;
|
|
@@ -13759,21 +13829,21 @@ var linkParameterIcon = import_react134.css`
|
|
|
13759
13829
|
`;
|
|
13760
13830
|
|
|
13761
13831
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
13762
|
-
var
|
|
13832
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
13763
13833
|
var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
13764
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
13834
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("label", { ...props, htmlFor: id, css: labelText2, "data-testid": testId, children }) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
13765
13835
|
};
|
|
13766
13836
|
|
|
13767
13837
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
13768
13838
|
init_emotion_jsx_shim();
|
|
13769
|
-
var
|
|
13770
|
-
var
|
|
13771
|
-
var ParameterMenuButton = (0,
|
|
13839
|
+
var import_react137 = require("react");
|
|
13840
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
13841
|
+
var ParameterMenuButton = (0, import_react137.forwardRef)(
|
|
13772
13842
|
({ label, children }, ref) => {
|
|
13773
|
-
return /* @__PURE__ */ (0,
|
|
13843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
13774
13844
|
Menu,
|
|
13775
13845
|
{
|
|
13776
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
13846
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
13777
13847
|
"button",
|
|
13778
13848
|
{
|
|
13779
13849
|
className: "parameter-menu",
|
|
@@ -13781,7 +13851,7 @@ var ParameterMenuButton = (0, import_react135.forwardRef)(
|
|
|
13781
13851
|
type: "button",
|
|
13782
13852
|
"aria-label": `${label} options`,
|
|
13783
13853
|
ref,
|
|
13784
|
-
children: /* @__PURE__ */ (0,
|
|
13854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
13785
13855
|
}
|
|
13786
13856
|
),
|
|
13787
13857
|
children
|
|
@@ -13792,14 +13862,14 @@ var ParameterMenuButton = (0, import_react135.forwardRef)(
|
|
|
13792
13862
|
|
|
13793
13863
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
13794
13864
|
init_emotion_jsx_shim();
|
|
13795
|
-
var
|
|
13796
|
-
var emptyParameterShell =
|
|
13865
|
+
var import_react138 = require("@emotion/react");
|
|
13866
|
+
var emptyParameterShell = import_react138.css`
|
|
13797
13867
|
border-radius: var(--rounded-sm);
|
|
13798
13868
|
flex-grow: 1;
|
|
13799
13869
|
position: relative;
|
|
13800
13870
|
max-width: 100%;
|
|
13801
13871
|
`;
|
|
13802
|
-
var emptyParameterShellText =
|
|
13872
|
+
var emptyParameterShellText = import_react138.css`
|
|
13803
13873
|
background: var(--brand-secondary-6);
|
|
13804
13874
|
border-radius: var(--rounded-sm);
|
|
13805
13875
|
padding: var(--spacing-sm);
|
|
@@ -13807,7 +13877,7 @@ var emptyParameterShellText = import_react136.css`
|
|
|
13807
13877
|
font-size: var(--fs-sm);
|
|
13808
13878
|
margin: 0;
|
|
13809
13879
|
`;
|
|
13810
|
-
var overrideMarker =
|
|
13880
|
+
var overrideMarker = import_react138.css`
|
|
13811
13881
|
border-radius: var(--rounded-sm);
|
|
13812
13882
|
border: 10px solid var(--gray-300);
|
|
13813
13883
|
border-left-color: transparent;
|
|
@@ -13818,7 +13888,7 @@ var overrideMarker = import_react136.css`
|
|
|
13818
13888
|
`;
|
|
13819
13889
|
|
|
13820
13890
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
13821
|
-
var
|
|
13891
|
+
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
13822
13892
|
var extractParameterProps = (props) => {
|
|
13823
13893
|
const {
|
|
13824
13894
|
id,
|
|
@@ -13878,36 +13948,36 @@ var ParameterShell = ({
|
|
|
13878
13948
|
isParameterGroup = false,
|
|
13879
13949
|
...props
|
|
13880
13950
|
}) => {
|
|
13881
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
13951
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react140.useState)(void 0);
|
|
13882
13952
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
13883
13953
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
13884
|
-
return /* @__PURE__ */ (0,
|
|
13885
|
-
hiddenLabel || title ? null : /* @__PURE__ */ (0,
|
|
13954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
13955
|
+
hiddenLabel || title ? null : /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
13886
13956
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
13887
13957
|
label,
|
|
13888
13958
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
13889
13959
|
] }),
|
|
13890
|
-
!title ? null : /* @__PURE__ */ (0,
|
|
13960
|
+
!title ? null : /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(ParameterLabel, { id, asSpan: true, testId: "parameter-label", children: [
|
|
13891
13961
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
13892
13962
|
title,
|
|
13893
13963
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
13894
13964
|
] }),
|
|
13895
|
-
/* @__PURE__ */ (0,
|
|
13896
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
13965
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: inputWrapper, children: [
|
|
13966
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
13897
13967
|
"div",
|
|
13898
13968
|
{
|
|
13899
13969
|
css: [
|
|
13900
13970
|
inputMenu,
|
|
13901
13971
|
inputActionItems,
|
|
13902
|
-
menuItems ?
|
|
13972
|
+
menuItems ? import_react139.css`
|
|
13903
13973
|
right: var(--spacing-md);
|
|
13904
13974
|
` : void 0
|
|
13905
13975
|
],
|
|
13906
13976
|
children: actionItems
|
|
13907
13977
|
}
|
|
13908
13978
|
) : null,
|
|
13909
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
13910
|
-
/* @__PURE__ */ (0,
|
|
13979
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
13980
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
13911
13981
|
ParameterShellContext.Provider,
|
|
13912
13982
|
{
|
|
13913
13983
|
value: {
|
|
@@ -13917,14 +13987,14 @@ var ParameterShell = ({
|
|
|
13917
13987
|
errorMessage: errorMessaging,
|
|
13918
13988
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
13919
13989
|
},
|
|
13920
|
-
children: isParameterGroup ? /* @__PURE__ */ (0,
|
|
13990
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(ParameterShellPlaceholder, { children: [
|
|
13921
13991
|
children,
|
|
13922
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
13992
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
13923
13993
|
] })
|
|
13924
13994
|
}
|
|
13925
13995
|
)
|
|
13926
13996
|
] }),
|
|
13927
|
-
/* @__PURE__ */ (0,
|
|
13997
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
13928
13998
|
FieldMessage,
|
|
13929
13999
|
{
|
|
13930
14000
|
helperMessageTestId: captionTestId,
|
|
@@ -13938,27 +14008,27 @@ var ParameterShell = ({
|
|
|
13938
14008
|
] });
|
|
13939
14009
|
};
|
|
13940
14010
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
13941
|
-
return /* @__PURE__ */ (0,
|
|
14011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { css: emptyParameterShell, children });
|
|
13942
14012
|
};
|
|
13943
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
14013
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
13944
14014
|
|
|
13945
14015
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
13946
|
-
var
|
|
13947
|
-
var ParameterImage = (0,
|
|
14016
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
14017
|
+
var ParameterImage = (0, import_react141.forwardRef)(
|
|
13948
14018
|
({ children, ...props }, ref) => {
|
|
13949
14019
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
13950
|
-
return /* @__PURE__ */ (0,
|
|
13951
|
-
/* @__PURE__ */ (0,
|
|
14020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
14021
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
13952
14022
|
children
|
|
13953
14023
|
] });
|
|
13954
14024
|
}
|
|
13955
14025
|
);
|
|
13956
|
-
var ParameterImageInner = (0,
|
|
14026
|
+
var ParameterImageInner = (0, import_react141.forwardRef)((props, ref) => {
|
|
13957
14027
|
const { value } = props;
|
|
13958
14028
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
13959
|
-
const deferredValue = (0,
|
|
13960
|
-
return /* @__PURE__ */ (0,
|
|
13961
|
-
/* @__PURE__ */ (0,
|
|
14029
|
+
const deferredValue = (0, import_react141.useDeferredValue)(value);
|
|
14030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
|
|
14031
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
13962
14032
|
"input",
|
|
13963
14033
|
{
|
|
13964
14034
|
css: input3,
|
|
@@ -13970,51 +14040,51 @@ var ParameterImageInner = (0, import_react139.forwardRef)((props, ref) => {
|
|
|
13970
14040
|
...props
|
|
13971
14041
|
}
|
|
13972
14042
|
),
|
|
13973
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
14043
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
13974
14044
|
] });
|
|
13975
14045
|
});
|
|
13976
14046
|
|
|
13977
14047
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
13978
14048
|
init_emotion_jsx_shim();
|
|
13979
|
-
var
|
|
13980
|
-
var
|
|
13981
|
-
var ParameterInput = (0,
|
|
14049
|
+
var import_react142 = require("react");
|
|
14050
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
14051
|
+
var ParameterInput = (0, import_react142.forwardRef)((props, ref) => {
|
|
13982
14052
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
13983
|
-
return /* @__PURE__ */ (0,
|
|
14053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
14054
|
+
});
|
|
14055
|
+
var ParameterInputInner = (0, import_react142.forwardRef)(({ enableMouseWheel = false, ...props }, ref) => {
|
|
14056
|
+
const { id, label, hiddenLabel } = useParameterShell();
|
|
14057
|
+
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
14058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
14059
|
+
"input",
|
|
14060
|
+
{
|
|
14061
|
+
css: input3,
|
|
14062
|
+
id,
|
|
14063
|
+
type: props.type || "text",
|
|
14064
|
+
"aria-label": hiddenLabel && typeof label === "string" ? label : void 0,
|
|
14065
|
+
autoComplete: "off",
|
|
14066
|
+
ref,
|
|
14067
|
+
onWheel: isNumberInputAndMouseWheelDisabled ? disableMouseWheelEvent : void 0,
|
|
14068
|
+
...props
|
|
14069
|
+
}
|
|
14070
|
+
);
|
|
13984
14071
|
});
|
|
13985
|
-
var ParameterInputInner = (0, import_react140.forwardRef)(
|
|
13986
|
-
({ ...props }, ref) => {
|
|
13987
|
-
const { id, label, hiddenLabel } = useParameterShell();
|
|
13988
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
13989
|
-
"input",
|
|
13990
|
-
{
|
|
13991
|
-
css: input3,
|
|
13992
|
-
id,
|
|
13993
|
-
type: props.type || "text",
|
|
13994
|
-
"aria-label": hiddenLabel && typeof label === "string" ? label : void 0,
|
|
13995
|
-
autoComplete: "off",
|
|
13996
|
-
ref,
|
|
13997
|
-
...props
|
|
13998
|
-
}
|
|
13999
|
-
);
|
|
14000
|
-
}
|
|
14001
|
-
);
|
|
14002
14072
|
|
|
14003
14073
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
14004
14074
|
init_emotion_jsx_shim();
|
|
14005
|
-
var
|
|
14006
|
-
var
|
|
14007
|
-
var ParameterLink = (0,
|
|
14075
|
+
var import_react143 = require("react");
|
|
14076
|
+
var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
|
|
14077
|
+
var ParameterLink = (0, import_react143.forwardRef)(
|
|
14008
14078
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
14009
14079
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14010
|
-
return /* @__PURE__ */ (0,
|
|
14080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14011
14081
|
ParameterShell,
|
|
14012
14082
|
{
|
|
14013
14083
|
"data-testid": "link-parameter-editor",
|
|
14014
14084
|
...shellProps,
|
|
14015
14085
|
label: innerProps.value ? shellProps.label : "",
|
|
14016
14086
|
title: !innerProps.value && typeof shellProps.label === "string" ? shellProps.label : void 0,
|
|
14017
|
-
children: /* @__PURE__ */ (0,
|
|
14087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14018
14088
|
ParameterLinkInner,
|
|
14019
14089
|
{
|
|
14020
14090
|
onConnectLink,
|
|
@@ -14027,13 +14097,13 @@ var ParameterLink = (0, import_react141.forwardRef)(
|
|
|
14027
14097
|
);
|
|
14028
14098
|
}
|
|
14029
14099
|
);
|
|
14030
|
-
var ParameterLinkInner = (0,
|
|
14100
|
+
var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
14031
14101
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
14032
14102
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
14033
14103
|
if (!props.value)
|
|
14034
|
-
return /* @__PURE__ */ (0,
|
|
14035
|
-
return /* @__PURE__ */ (0,
|
|
14036
|
-
/* @__PURE__ */ (0,
|
|
14104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
14105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: inputWrapper, children: [
|
|
14106
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14037
14107
|
"input",
|
|
14038
14108
|
{
|
|
14039
14109
|
type: "text",
|
|
@@ -14045,8 +14115,8 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
14045
14115
|
...props
|
|
14046
14116
|
}
|
|
14047
14117
|
),
|
|
14048
|
-
/* @__PURE__ */ (0,
|
|
14049
|
-
/* @__PURE__ */ (0,
|
|
14118
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: linkParameterControls, children: [
|
|
14119
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14050
14120
|
"button",
|
|
14051
14121
|
{
|
|
14052
14122
|
type: "button",
|
|
@@ -14058,7 +14128,7 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
14058
14128
|
children: "edit"
|
|
14059
14129
|
}
|
|
14060
14130
|
),
|
|
14061
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
14131
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14062
14132
|
"a",
|
|
14063
14133
|
{
|
|
14064
14134
|
href: externalLink,
|
|
@@ -14066,7 +14136,7 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
14066
14136
|
title: "Open link in new tab",
|
|
14067
14137
|
target: "_blank",
|
|
14068
14138
|
rel: "noopener noreferrer",
|
|
14069
|
-
children: /* @__PURE__ */ (0,
|
|
14139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
14070
14140
|
}
|
|
14071
14141
|
) : null
|
|
14072
14142
|
] })
|
|
@@ -14076,15 +14146,15 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
14076
14146
|
|
|
14077
14147
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
14078
14148
|
init_emotion_jsx_shim();
|
|
14079
|
-
var
|
|
14149
|
+
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
14080
14150
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
14081
14151
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14082
|
-
return /* @__PURE__ */ (0,
|
|
14152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
14083
14153
|
};
|
|
14084
14154
|
var ParameterMultiSelectInner = (props) => {
|
|
14085
14155
|
var _a;
|
|
14086
14156
|
const { id, label } = useParameterShell();
|
|
14087
|
-
return /* @__PURE__ */ (0,
|
|
14157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14088
14158
|
InputComboBox,
|
|
14089
14159
|
{
|
|
14090
14160
|
menuPortalTarget: document.body,
|
|
@@ -14135,7 +14205,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
14135
14205
|
|
|
14136
14206
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
14137
14207
|
init_emotion_jsx_shim();
|
|
14138
|
-
var
|
|
14208
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
14139
14209
|
var ParameterNameAndPublicIdInput = ({
|
|
14140
14210
|
id,
|
|
14141
14211
|
onBlur,
|
|
@@ -14161,8 +14231,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14161
14231
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
14162
14232
|
};
|
|
14163
14233
|
autoFocus == null ? void 0 : autoFocus();
|
|
14164
|
-
return /* @__PURE__ */ (0,
|
|
14165
|
-
/* @__PURE__ */ (0,
|
|
14234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
|
|
14235
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
14166
14236
|
ParameterInput,
|
|
14167
14237
|
{
|
|
14168
14238
|
id: nameIdField,
|
|
@@ -14181,7 +14251,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14181
14251
|
value: values[nameIdField]
|
|
14182
14252
|
}
|
|
14183
14253
|
),
|
|
14184
|
-
/* @__PURE__ */ (0,
|
|
14254
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
14185
14255
|
ParameterInput,
|
|
14186
14256
|
{
|
|
14187
14257
|
id: publicIdFieldName,
|
|
@@ -14195,11 +14265,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14195
14265
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
14196
14266
|
placeholder: publicIdPlaceholderText,
|
|
14197
14267
|
errorMessage: publicIdError,
|
|
14198
|
-
menuItems: /* @__PURE__ */ (0,
|
|
14268
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
14199
14269
|
MenuItem,
|
|
14200
14270
|
{
|
|
14201
14271
|
disabled: !values[publicIdFieldName],
|
|
14202
|
-
icon: /* @__PURE__ */ (0,
|
|
14272
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
14203
14273
|
onClick: handleCopyPidFieldValue,
|
|
14204
14274
|
children: "Copy"
|
|
14205
14275
|
}
|
|
@@ -14207,13 +14277,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14207
14277
|
value: values[publicIdFieldName]
|
|
14208
14278
|
}
|
|
14209
14279
|
),
|
|
14210
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
14280
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
14211
14281
|
] });
|
|
14212
14282
|
};
|
|
14213
14283
|
|
|
14214
14284
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
14215
14285
|
init_emotion_jsx_shim();
|
|
14216
|
-
var
|
|
14286
|
+
var import_react157 = require("@emotion/react");
|
|
14217
14287
|
var import_list3 = require("@lexical/list");
|
|
14218
14288
|
var import_markdown = require("@lexical/markdown");
|
|
14219
14289
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -14350,7 +14420,7 @@ var defaultParameterConfiguration = {
|
|
|
14350
14420
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
14351
14421
|
var import_fast_equals2 = require("fast-equals");
|
|
14352
14422
|
var import_lexical10 = require("lexical");
|
|
14353
|
-
var
|
|
14423
|
+
var import_react158 = require("react");
|
|
14354
14424
|
|
|
14355
14425
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
14356
14426
|
init_emotion_jsx_shim();
|
|
@@ -14373,10 +14443,10 @@ init_emotion_jsx_shim();
|
|
|
14373
14443
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
14374
14444
|
var import_utils4 = require("@lexical/utils");
|
|
14375
14445
|
var import_lexical = require("lexical");
|
|
14376
|
-
var
|
|
14446
|
+
var import_react144 = require("react");
|
|
14377
14447
|
function DisableStylesPlugin() {
|
|
14378
14448
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
14379
|
-
(0,
|
|
14449
|
+
(0, import_react144.useEffect)(() => {
|
|
14380
14450
|
return (0, import_utils4.mergeRegister)(
|
|
14381
14451
|
// Disable text alignment on paragraph nodes
|
|
14382
14452
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -14637,10 +14707,10 @@ init_emotion_jsx_shim();
|
|
|
14637
14707
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
14638
14708
|
var import_utils5 = require("@lexical/utils");
|
|
14639
14709
|
var import_lexical2 = require("lexical");
|
|
14640
|
-
var
|
|
14710
|
+
var import_react145 = require("react");
|
|
14641
14711
|
var ImprovedAssetSelectionPlugin = () => {
|
|
14642
14712
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
14643
|
-
(0,
|
|
14713
|
+
(0, import_react145.useEffect)(() => {
|
|
14644
14714
|
editor.getRootElement();
|
|
14645
14715
|
const onRootClick = (event) => {
|
|
14646
14716
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -14689,13 +14759,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
14689
14759
|
|
|
14690
14760
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
14691
14761
|
init_emotion_jsx_shim();
|
|
14692
|
-
var
|
|
14762
|
+
var import_react146 = require("@emotion/react");
|
|
14693
14763
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
14694
14764
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
14695
14765
|
var import_utils6 = require("@lexical/utils");
|
|
14696
14766
|
var import_fast_equals = require("fast-equals");
|
|
14697
14767
|
var import_lexical4 = require("lexical");
|
|
14698
|
-
var
|
|
14768
|
+
var import_react147 = require("react");
|
|
14699
14769
|
|
|
14700
14770
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
14701
14771
|
init_emotion_jsx_shim();
|
|
@@ -14731,9 +14801,30 @@ var getSelectedNode = (selection) => {
|
|
|
14731
14801
|
return (0, import_selection.$isAtNodeEnd)(anchor) ? anchorNode : focusNode;
|
|
14732
14802
|
}
|
|
14733
14803
|
};
|
|
14804
|
+
var walkSerializedEditorState = (node, callback) => {
|
|
14805
|
+
callback(node);
|
|
14806
|
+
for (const child of node.children) {
|
|
14807
|
+
if ("children" in child) {
|
|
14808
|
+
walkSerializedEditorState(child, callback);
|
|
14809
|
+
} else {
|
|
14810
|
+
callback(child);
|
|
14811
|
+
}
|
|
14812
|
+
}
|
|
14813
|
+
};
|
|
14814
|
+
var normalizeStateForDeepEqualComparison = (editorState) => {
|
|
14815
|
+
walkSerializedEditorState(editorState.root, (node) => {
|
|
14816
|
+
if ("direction" in node) {
|
|
14817
|
+
node.direction = null;
|
|
14818
|
+
}
|
|
14819
|
+
if ("textFormat" in node) {
|
|
14820
|
+
delete node.textFormat;
|
|
14821
|
+
}
|
|
14822
|
+
});
|
|
14823
|
+
return editorState;
|
|
14824
|
+
};
|
|
14734
14825
|
|
|
14735
14826
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
14736
|
-
var
|
|
14827
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
14737
14828
|
var isProjectMapLinkValue = (value) => {
|
|
14738
14829
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
14739
14830
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -15022,17 +15113,17 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
15022
15113
|
);
|
|
15023
15114
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
15024
15115
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
15025
|
-
var linkPopover =
|
|
15116
|
+
var linkPopover = import_react146.css`
|
|
15026
15117
|
position: absolute;
|
|
15027
15118
|
z-index: 11;
|
|
15028
15119
|
`;
|
|
15029
|
-
var linkPopoverContainer =
|
|
15120
|
+
var linkPopoverContainer = import_react146.css`
|
|
15030
15121
|
${Popover};
|
|
15031
15122
|
${PopoverVariantSmall};
|
|
15032
15123
|
align-items: center;
|
|
15033
15124
|
display: flex;
|
|
15034
15125
|
`;
|
|
15035
|
-
var linkPopoverAnchor =
|
|
15126
|
+
var linkPopoverAnchor = import_react146.css`
|
|
15036
15127
|
${link}
|
|
15037
15128
|
${linkColorDefault}
|
|
15038
15129
|
`;
|
|
@@ -15045,17 +15136,17 @@ function LinkNodePlugin({
|
|
|
15045
15136
|
return path;
|
|
15046
15137
|
};
|
|
15047
15138
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
15048
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
15049
|
-
const linkPopoverElRef = (0,
|
|
15050
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
15051
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
15052
|
-
(0,
|
|
15139
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react147.useState)();
|
|
15140
|
+
const linkPopoverElRef = (0, import_react147.useRef)(null);
|
|
15141
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react147.useState)(false);
|
|
15142
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react147.useState)(false);
|
|
15143
|
+
(0, import_react147.useEffect)(() => {
|
|
15053
15144
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
15054
15145
|
setLinkPopoverState(void 0);
|
|
15055
15146
|
return;
|
|
15056
15147
|
}
|
|
15057
15148
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
15058
|
-
(0,
|
|
15149
|
+
(0, import_react147.useEffect)(() => {
|
|
15059
15150
|
if (!editor.hasNodes([LinkNode])) {
|
|
15060
15151
|
throw new Error("LinkNode not registered on editor");
|
|
15061
15152
|
}
|
|
@@ -15159,7 +15250,7 @@ function LinkNodePlugin({
|
|
|
15159
15250
|
)
|
|
15160
15251
|
);
|
|
15161
15252
|
}, [editor, onConnectLink]);
|
|
15162
|
-
const maybeShowLinkToolbar = (0,
|
|
15253
|
+
const maybeShowLinkToolbar = (0, import_react147.useCallback)(() => {
|
|
15163
15254
|
if (!editor.isEditable()) {
|
|
15164
15255
|
return;
|
|
15165
15256
|
}
|
|
@@ -15193,7 +15284,7 @@ function LinkNodePlugin({
|
|
|
15193
15284
|
}
|
|
15194
15285
|
});
|
|
15195
15286
|
}, [editor, positioningAnchorEl]);
|
|
15196
|
-
(0,
|
|
15287
|
+
(0, import_react147.useEffect)(() => {
|
|
15197
15288
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
15198
15289
|
requestAnimationFrame(() => {
|
|
15199
15290
|
editorState.read(() => {
|
|
@@ -15220,8 +15311,8 @@ function LinkNodePlugin({
|
|
|
15220
15311
|
});
|
|
15221
15312
|
});
|
|
15222
15313
|
};
|
|
15223
|
-
return /* @__PURE__ */ (0,
|
|
15224
|
-
/* @__PURE__ */ (0,
|
|
15314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
|
|
15315
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
15225
15316
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
15226
15317
|
{
|
|
15227
15318
|
nodeType: LinkNode,
|
|
@@ -15231,7 +15322,7 @@ function LinkNodePlugin({
|
|
|
15231
15322
|
}
|
|
15232
15323
|
}
|
|
15233
15324
|
),
|
|
15234
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
15325
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
15235
15326
|
"div",
|
|
15236
15327
|
{
|
|
15237
15328
|
css: linkPopover,
|
|
@@ -15240,8 +15331,8 @@ function LinkNodePlugin({
|
|
|
15240
15331
|
top: linkPopoverState.position.y
|
|
15241
15332
|
},
|
|
15242
15333
|
ref: linkPopoverElRef,
|
|
15243
|
-
children: /* @__PURE__ */ (0,
|
|
15244
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
15334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
15335
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
15245
15336
|
"a",
|
|
15246
15337
|
{
|
|
15247
15338
|
href: parsePath(
|
|
@@ -15253,7 +15344,7 @@ function LinkNodePlugin({
|
|
|
15253
15344
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
15254
15345
|
}
|
|
15255
15346
|
),
|
|
15256
|
-
/* @__PURE__ */ (0,
|
|
15347
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
15257
15348
|
Button,
|
|
15258
15349
|
{
|
|
15259
15350
|
size: "xs",
|
|
@@ -15261,7 +15352,7 @@ function LinkNodePlugin({
|
|
|
15261
15352
|
onEditLinkNode(linkPopoverState.node);
|
|
15262
15353
|
},
|
|
15263
15354
|
buttonType: "ghost",
|
|
15264
|
-
children: /* @__PURE__ */ (0,
|
|
15355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
15265
15356
|
}
|
|
15266
15357
|
)
|
|
15267
15358
|
] })
|
|
@@ -15281,7 +15372,7 @@ var import_list = require("@lexical/list");
|
|
|
15281
15372
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
15282
15373
|
var import_utils9 = require("@lexical/utils");
|
|
15283
15374
|
var import_lexical5 = require("lexical");
|
|
15284
|
-
var
|
|
15375
|
+
var import_react148 = require("react");
|
|
15285
15376
|
function isIndentPermitted(maxDepth) {
|
|
15286
15377
|
const selection = (0, import_lexical5.$getSelection)();
|
|
15287
15378
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -15336,8 +15427,8 @@ function $indentOverTab(selection) {
|
|
|
15336
15427
|
}
|
|
15337
15428
|
function ListIndentPlugin({ maxDepth }) {
|
|
15338
15429
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
15339
|
-
const isInListItemNode = (0,
|
|
15340
|
-
(0,
|
|
15430
|
+
const isInListItemNode = (0, import_react148.useRef)(false);
|
|
15431
|
+
(0, import_react148.useEffect)(() => {
|
|
15341
15432
|
return editor.registerCommand(
|
|
15342
15433
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
15343
15434
|
() => {
|
|
@@ -15354,7 +15445,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
15354
15445
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
15355
15446
|
);
|
|
15356
15447
|
}, [editor]);
|
|
15357
|
-
(0,
|
|
15448
|
+
(0, import_react148.useEffect)(() => {
|
|
15358
15449
|
return (0, import_utils9.mergeRegister)(
|
|
15359
15450
|
editor.registerCommand(
|
|
15360
15451
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
@@ -15384,13 +15475,13 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
15384
15475
|
|
|
15385
15476
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
15386
15477
|
init_emotion_jsx_shim();
|
|
15387
|
-
var
|
|
15478
|
+
var import_react149 = require("@emotion/react");
|
|
15388
15479
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
15389
15480
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
15390
15481
|
var import_table = require("@lexical/table");
|
|
15391
15482
|
var import_lexical6 = require("lexical");
|
|
15392
|
-
var
|
|
15393
|
-
var
|
|
15483
|
+
var import_react150 = require("react");
|
|
15484
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
15394
15485
|
function computeSelectionCount(selection) {
|
|
15395
15486
|
const selectionShape = selection.getShape();
|
|
15396
15487
|
return {
|
|
@@ -15398,21 +15489,21 @@ function computeSelectionCount(selection) {
|
|
|
15398
15489
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
15399
15490
|
};
|
|
15400
15491
|
}
|
|
15401
|
-
var tableActionMenuTrigger =
|
|
15492
|
+
var tableActionMenuTrigger = import_react149.css`
|
|
15402
15493
|
position: absolute;
|
|
15403
15494
|
transform: translate(calc(-100% - 1px), 1px);
|
|
15404
15495
|
`;
|
|
15405
|
-
var TableActionMenuTrigger = (0,
|
|
15496
|
+
var TableActionMenuTrigger = (0, import_react150.forwardRef)((props, ref) => {
|
|
15406
15497
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
15407
|
-
const [coordinates, setCoordinates] = (0,
|
|
15408
|
-
(0,
|
|
15498
|
+
const [coordinates, setCoordinates] = (0, import_react150.useState)({ x: 0, y: 0 });
|
|
15499
|
+
(0, import_react150.useLayoutEffect)(() => {
|
|
15409
15500
|
const rect = tableCellEl.getBoundingClientRect();
|
|
15410
15501
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
15411
15502
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
15412
15503
|
const relativeY = rect.top - parentRect.top + positioningAnchorEl.scrollTop;
|
|
15413
15504
|
setCoordinates({ x: relativeX, y: relativeY });
|
|
15414
15505
|
}, [tableCellEl, positioningAnchorEl]);
|
|
15415
|
-
return /* @__PURE__ */ (0,
|
|
15506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15416
15507
|
IconButton,
|
|
15417
15508
|
{
|
|
15418
15509
|
ref,
|
|
@@ -15426,7 +15517,7 @@ var TableActionMenuTrigger = (0, import_react148.forwardRef)((props, ref) => {
|
|
|
15426
15517
|
size: "xs",
|
|
15427
15518
|
buttonType: "unimportant",
|
|
15428
15519
|
...rest,
|
|
15429
|
-
children: /* @__PURE__ */ (0,
|
|
15520
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
|
|
15430
15521
|
}
|
|
15431
15522
|
);
|
|
15432
15523
|
});
|
|
@@ -15438,16 +15529,16 @@ function TableActionMenu({
|
|
|
15438
15529
|
positioningAnchorEl
|
|
15439
15530
|
}) {
|
|
15440
15531
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
15441
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
15442
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
15532
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react150.useState)(_tableCellNode);
|
|
15533
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react150.useState)({
|
|
15443
15534
|
columns: 1,
|
|
15444
15535
|
rows: 1
|
|
15445
15536
|
});
|
|
15446
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
15537
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react150.useState)(0);
|
|
15447
15538
|
const incrementMenuTriggerKey = () => {
|
|
15448
15539
|
setMenuTriggerKey((key) => key += 1);
|
|
15449
15540
|
};
|
|
15450
|
-
(0,
|
|
15541
|
+
(0, import_react150.useEffect)(() => {
|
|
15451
15542
|
return editor.registerMutationListener(
|
|
15452
15543
|
import_table.TableCellNode,
|
|
15453
15544
|
(nodeMutations) => {
|
|
@@ -15461,7 +15552,7 @@ function TableActionMenu({
|
|
|
15461
15552
|
{ skipInitialization: true }
|
|
15462
15553
|
);
|
|
15463
15554
|
}, [editor, tableCellNode]);
|
|
15464
|
-
(0,
|
|
15555
|
+
(0, import_react150.useEffect)(() => {
|
|
15465
15556
|
editor.getEditorState().read(() => {
|
|
15466
15557
|
const selection = (0, import_lexical6.$getSelection)();
|
|
15467
15558
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -15469,7 +15560,7 @@ function TableActionMenu({
|
|
|
15469
15560
|
}
|
|
15470
15561
|
});
|
|
15471
15562
|
}, [editor]);
|
|
15472
|
-
const clearTableSelection = (0,
|
|
15563
|
+
const clearTableSelection = (0, import_react150.useCallback)(() => {
|
|
15473
15564
|
editor.update(() => {
|
|
15474
15565
|
if (tableCellNode.isAttached()) {
|
|
15475
15566
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -15490,7 +15581,7 @@ function TableActionMenu({
|
|
|
15490
15581
|
rootNode.selectStart();
|
|
15491
15582
|
});
|
|
15492
15583
|
}, [editor, tableCellNode]);
|
|
15493
|
-
const insertTableRowAtSelection = (0,
|
|
15584
|
+
const insertTableRowAtSelection = (0, import_react150.useCallback)(
|
|
15494
15585
|
(shouldInsertAfter) => {
|
|
15495
15586
|
editor.update(() => {
|
|
15496
15587
|
(0, import_table.$insertTableRow__EXPERIMENTAL)(shouldInsertAfter);
|
|
@@ -15499,7 +15590,7 @@ function TableActionMenu({
|
|
|
15499
15590
|
},
|
|
15500
15591
|
[editor]
|
|
15501
15592
|
);
|
|
15502
|
-
const insertTableColumnAtSelection = (0,
|
|
15593
|
+
const insertTableColumnAtSelection = (0, import_react150.useCallback)(
|
|
15503
15594
|
(shouldInsertAfter) => {
|
|
15504
15595
|
editor.update(() => {
|
|
15505
15596
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -15510,26 +15601,26 @@ function TableActionMenu({
|
|
|
15510
15601
|
},
|
|
15511
15602
|
[editor, selectionCounts.columns]
|
|
15512
15603
|
);
|
|
15513
|
-
const deleteTableRowAtSelection = (0,
|
|
15604
|
+
const deleteTableRowAtSelection = (0, import_react150.useCallback)(() => {
|
|
15514
15605
|
editor.update(() => {
|
|
15515
15606
|
(0, import_table.$deleteTableRow__EXPERIMENTAL)();
|
|
15516
15607
|
});
|
|
15517
15608
|
incrementMenuTriggerKey();
|
|
15518
15609
|
}, [editor]);
|
|
15519
|
-
const deleteTableAtSelection = (0,
|
|
15610
|
+
const deleteTableAtSelection = (0, import_react150.useCallback)(() => {
|
|
15520
15611
|
editor.update(() => {
|
|
15521
15612
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15522
15613
|
tableNode.remove();
|
|
15523
15614
|
clearTableSelection();
|
|
15524
15615
|
});
|
|
15525
15616
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15526
|
-
const deleteTableColumnAtSelection = (0,
|
|
15617
|
+
const deleteTableColumnAtSelection = (0, import_react150.useCallback)(() => {
|
|
15527
15618
|
editor.update(() => {
|
|
15528
15619
|
(0, import_table.$deleteTableColumn__EXPERIMENTAL)();
|
|
15529
15620
|
});
|
|
15530
15621
|
incrementMenuTriggerKey();
|
|
15531
15622
|
}, [editor]);
|
|
15532
|
-
const toggleTableRowIsHeader = (0,
|
|
15623
|
+
const toggleTableRowIsHeader = (0, import_react150.useCallback)(() => {
|
|
15533
15624
|
editor.update(() => {
|
|
15534
15625
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15535
15626
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -15550,7 +15641,7 @@ function TableActionMenu({
|
|
|
15550
15641
|
clearTableSelection();
|
|
15551
15642
|
});
|
|
15552
15643
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15553
|
-
const toggleTableColumnIsHeader = (0,
|
|
15644
|
+
const toggleTableColumnIsHeader = (0, import_react150.useCallback)(() => {
|
|
15554
15645
|
editor.update(() => {
|
|
15555
15646
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15556
15647
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -15577,13 +15668,13 @@ function TableActionMenu({
|
|
|
15577
15668
|
clearTableSelection();
|
|
15578
15669
|
});
|
|
15579
15670
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15580
|
-
const menuItemCss = (0,
|
|
15671
|
+
const menuItemCss = (0, import_react149.css)({
|
|
15581
15672
|
fontSize: "var(--fs-sm)"
|
|
15582
15673
|
});
|
|
15583
|
-
return /* @__PURE__ */ (0,
|
|
15674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
15584
15675
|
Menu,
|
|
15585
15676
|
{
|
|
15586
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
15677
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15587
15678
|
TableActionMenuTrigger,
|
|
15588
15679
|
{
|
|
15589
15680
|
tableCellEl,
|
|
@@ -15594,7 +15685,7 @@ function TableActionMenu({
|
|
|
15594
15685
|
portalElement: menuPortalEl,
|
|
15595
15686
|
maxMenuHeight: "300px",
|
|
15596
15687
|
children: [
|
|
15597
|
-
/* @__PURE__ */ (0,
|
|
15688
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
15598
15689
|
MenuItem,
|
|
15599
15690
|
{
|
|
15600
15691
|
onClick: () => {
|
|
@@ -15608,33 +15699,33 @@ function TableActionMenu({
|
|
|
15608
15699
|
]
|
|
15609
15700
|
}
|
|
15610
15701
|
),
|
|
15611
|
-
/* @__PURE__ */ (0,
|
|
15702
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
|
|
15612
15703
|
"Insert ",
|
|
15613
15704
|
selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
|
|
15614
15705
|
" below"
|
|
15615
15706
|
] }),
|
|
15616
|
-
/* @__PURE__ */ (0,
|
|
15617
|
-
/* @__PURE__ */ (0,
|
|
15707
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MenuItemSeparator, {}),
|
|
15708
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
|
|
15618
15709
|
"Insert ",
|
|
15619
15710
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
15620
15711
|
" left"
|
|
15621
15712
|
] }),
|
|
15622
|
-
/* @__PURE__ */ (0,
|
|
15713
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
|
|
15623
15714
|
"Insert ",
|
|
15624
15715
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
15625
15716
|
" right"
|
|
15626
15717
|
] }),
|
|
15627
|
-
/* @__PURE__ */ (0,
|
|
15628
|
-
/* @__PURE__ */ (0,
|
|
15629
|
-
/* @__PURE__ */ (0,
|
|
15630
|
-
/* @__PURE__ */ (0,
|
|
15631
|
-
/* @__PURE__ */ (0,
|
|
15632
|
-
/* @__PURE__ */ (0,
|
|
15718
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MenuItemSeparator, {}),
|
|
15719
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MenuItem, { onClick: () => deleteTableColumnAtSelection(), css: menuItemCss, children: "Delete column" }),
|
|
15720
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MenuItem, { onClick: () => deleteTableRowAtSelection(), css: menuItemCss, children: "Delete row" }),
|
|
15721
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MenuItem, { onClick: () => deleteTableAtSelection(), css: menuItemCss, children: "Delete table" }),
|
|
15722
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MenuItemSeparator, {}),
|
|
15723
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(MenuItem, { onClick: () => toggleTableRowIsHeader(), css: menuItemCss, children: [
|
|
15633
15724
|
(tableCellNode.__headerState & import_table.TableCellHeaderStates.ROW) === import_table.TableCellHeaderStates.ROW ? "Remove" : "Add",
|
|
15634
15725
|
" ",
|
|
15635
15726
|
"row header"
|
|
15636
15727
|
] }),
|
|
15637
|
-
/* @__PURE__ */ (0,
|
|
15728
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
|
|
15638
15729
|
(tableCellNode.__headerState & import_table.TableCellHeaderStates.COLUMN) === import_table.TableCellHeaderStates.COLUMN ? "Remove" : "Add",
|
|
15639
15730
|
" ",
|
|
15640
15731
|
"column header"
|
|
@@ -15648,10 +15739,10 @@ function TableCellActionMenuContainer({
|
|
|
15648
15739
|
positioningAnchorEl
|
|
15649
15740
|
}) {
|
|
15650
15741
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
15651
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
15652
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
15653
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
15654
|
-
(0,
|
|
15742
|
+
const [tableCellNode, setTableMenuCellNode] = (0, import_react150.useState)(null);
|
|
15743
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0, import_react150.useState)(null);
|
|
15744
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0, import_react150.useState)(null);
|
|
15745
|
+
(0, import_react150.useEffect)(() => {
|
|
15655
15746
|
const newPortalEl = document.createElement("div");
|
|
15656
15747
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
15657
15748
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -15659,14 +15750,14 @@ function TableCellActionMenuContainer({
|
|
|
15659
15750
|
newPortalEl.remove();
|
|
15660
15751
|
};
|
|
15661
15752
|
}, [menuPortalEl]);
|
|
15662
|
-
const setTableMenuCellNodeElem = (0,
|
|
15753
|
+
const setTableMenuCellNodeElem = (0, import_react150.useCallback)((elem) => {
|
|
15663
15754
|
if (elem) {
|
|
15664
15755
|
_setTableMenuCellNodeEl(elem);
|
|
15665
15756
|
} else {
|
|
15666
15757
|
_setTableMenuCellNodeEl(null);
|
|
15667
15758
|
}
|
|
15668
15759
|
}, []);
|
|
15669
|
-
const $moveMenu = (0,
|
|
15760
|
+
const $moveMenu = (0, import_react150.useCallback)(() => {
|
|
15670
15761
|
const selection = (0, import_lexical6.$getSelection)();
|
|
15671
15762
|
const nativeSelection = window.getSelection();
|
|
15672
15763
|
const activeElement = document.activeElement;
|
|
@@ -15695,14 +15786,14 @@ function TableCellActionMenuContainer({
|
|
|
15695
15786
|
setTableMenuCellNodeElem(null);
|
|
15696
15787
|
}
|
|
15697
15788
|
}, [editor, setTableMenuCellNodeElem]);
|
|
15698
|
-
(0,
|
|
15789
|
+
(0, import_react150.useEffect)(() => {
|
|
15699
15790
|
return editor.registerUpdateListener(() => {
|
|
15700
15791
|
editor.getEditorState().read(() => {
|
|
15701
15792
|
$moveMenu();
|
|
15702
15793
|
});
|
|
15703
15794
|
});
|
|
15704
15795
|
});
|
|
15705
|
-
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0,
|
|
15796
|
+
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15706
15797
|
TableActionMenu,
|
|
15707
15798
|
{
|
|
15708
15799
|
tableCellNode,
|
|
@@ -15718,23 +15809,23 @@ function TableActionMenuPlugin({
|
|
|
15718
15809
|
menuPortalEl
|
|
15719
15810
|
}) {
|
|
15720
15811
|
const isEditable = (0, import_useLexicalEditable.useLexicalEditable)();
|
|
15721
|
-
return isEditable ? /* @__PURE__ */ (0,
|
|
15812
|
+
return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TableCellActionMenuContainer, { menuPortalEl, positioningAnchorEl }) : null;
|
|
15722
15813
|
}
|
|
15723
15814
|
|
|
15724
15815
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
15725
15816
|
init_emotion_jsx_shim();
|
|
15726
|
-
var
|
|
15817
|
+
var import_react151 = require("@emotion/react");
|
|
15727
15818
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
15728
15819
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
15729
15820
|
var import_table2 = require("@lexical/table");
|
|
15730
15821
|
var import_utils11 = require("@lexical/utils");
|
|
15731
15822
|
var import_lexical7 = require("lexical");
|
|
15732
|
-
var
|
|
15823
|
+
var import_react152 = require("react");
|
|
15733
15824
|
var import_react_dom3 = require("react-dom");
|
|
15734
|
-
var
|
|
15825
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
15735
15826
|
var MIN_ROW_HEIGHT = 33;
|
|
15736
15827
|
var MIN_COLUMN_WIDTH = 50;
|
|
15737
|
-
var tableResizer =
|
|
15828
|
+
var tableResizer = import_react151.css`
|
|
15738
15829
|
position: absolute;
|
|
15739
15830
|
z-index: var(--z-10);
|
|
15740
15831
|
`;
|
|
@@ -15756,15 +15847,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
15756
15847
|
return null;
|
|
15757
15848
|
};
|
|
15758
15849
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
15759
|
-
const targetRef = (0,
|
|
15760
|
-
const resizerRef = (0,
|
|
15761
|
-
const tableRectRef = (0,
|
|
15762
|
-
const mouseStartPosRef = (0,
|
|
15763
|
-
const [mouseCurrentPos, updateMouseCurrentPos] = (0,
|
|
15764
|
-
const [activeCell, updateActiveCell] = (0,
|
|
15765
|
-
const [isMouseDown, updateIsMouseDown] = (0,
|
|
15766
|
-
const [draggingDirection, updateDraggingDirection] = (0,
|
|
15767
|
-
const resetState = (0,
|
|
15850
|
+
const targetRef = (0, import_react152.useRef)(null);
|
|
15851
|
+
const resizerRef = (0, import_react152.useRef)(null);
|
|
15852
|
+
const tableRectRef = (0, import_react152.useRef)(null);
|
|
15853
|
+
const mouseStartPosRef = (0, import_react152.useRef)(null);
|
|
15854
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = (0, import_react152.useState)(null);
|
|
15855
|
+
const [activeCell, updateActiveCell] = (0, import_react152.useState)(null);
|
|
15856
|
+
const [isMouseDown, updateIsMouseDown] = (0, import_react152.useState)(false);
|
|
15857
|
+
const [draggingDirection, updateDraggingDirection] = (0, import_react152.useState)(null);
|
|
15858
|
+
const resetState = (0, import_react152.useCallback)(() => {
|
|
15768
15859
|
updateActiveCell(null);
|
|
15769
15860
|
targetRef.current = null;
|
|
15770
15861
|
updateDraggingDirection(null);
|
|
@@ -15774,7 +15865,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15774
15865
|
const isMouseDownOnEvent = (event) => {
|
|
15775
15866
|
return (event.buttons & 1) === 1;
|
|
15776
15867
|
};
|
|
15777
|
-
(0,
|
|
15868
|
+
(0, import_react152.useEffect)(() => {
|
|
15778
15869
|
const onMouseMove = (event) => {
|
|
15779
15870
|
setTimeout(() => {
|
|
15780
15871
|
const target = event.target;
|
|
@@ -15841,7 +15932,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15841
15932
|
}
|
|
15842
15933
|
return false;
|
|
15843
15934
|
};
|
|
15844
|
-
const updateRowHeight = (0,
|
|
15935
|
+
const updateRowHeight = (0, import_react152.useCallback)(
|
|
15845
15936
|
(heightChange) => {
|
|
15846
15937
|
if (!activeCell) {
|
|
15847
15938
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -15903,7 +15994,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15903
15994
|
}
|
|
15904
15995
|
}
|
|
15905
15996
|
};
|
|
15906
|
-
const updateColumnWidth = (0,
|
|
15997
|
+
const updateColumnWidth = (0, import_react152.useCallback)(
|
|
15907
15998
|
(widthChange) => {
|
|
15908
15999
|
if (!activeCell) {
|
|
15909
16000
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -15937,7 +16028,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15937
16028
|
},
|
|
15938
16029
|
[activeCell, editor]
|
|
15939
16030
|
);
|
|
15940
|
-
const mouseUpHandler = (0,
|
|
16031
|
+
const mouseUpHandler = (0, import_react152.useCallback)(
|
|
15941
16032
|
(direction) => {
|
|
15942
16033
|
const handler = (event) => {
|
|
15943
16034
|
event.preventDefault();
|
|
@@ -15966,7 +16057,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15966
16057
|
},
|
|
15967
16058
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
15968
16059
|
);
|
|
15969
|
-
const toggleResize = (0,
|
|
16060
|
+
const toggleResize = (0, import_react152.useCallback)(
|
|
15970
16061
|
(direction) => (event) => {
|
|
15971
16062
|
event.preventDefault();
|
|
15972
16063
|
event.stopPropagation();
|
|
@@ -15983,7 +16074,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15983
16074
|
},
|
|
15984
16075
|
[activeCell, mouseUpHandler]
|
|
15985
16076
|
);
|
|
15986
|
-
const getResizers = (0,
|
|
16077
|
+
const getResizers = (0, import_react152.useCallback)(() => {
|
|
15987
16078
|
if (activeCell) {
|
|
15988
16079
|
const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
|
|
15989
16080
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -16032,8 +16123,8 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16032
16123
|
};
|
|
16033
16124
|
}, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
|
|
16034
16125
|
const resizerStyles = getResizers();
|
|
16035
|
-
return /* @__PURE__ */ (0,
|
|
16036
|
-
/* @__PURE__ */ (0,
|
|
16126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
16127
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16037
16128
|
"div",
|
|
16038
16129
|
{
|
|
16039
16130
|
css: tableResizer,
|
|
@@ -16041,7 +16132,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16041
16132
|
onMouseDown: toggleResize("right")
|
|
16042
16133
|
}
|
|
16043
16134
|
),
|
|
16044
|
-
/* @__PURE__ */ (0,
|
|
16135
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16045
16136
|
"div",
|
|
16046
16137
|
{
|
|
16047
16138
|
css: tableResizer,
|
|
@@ -16054,9 +16145,9 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16054
16145
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
16055
16146
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
16056
16147
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
16057
|
-
return (0,
|
|
16148
|
+
return (0, import_react152.useMemo)(
|
|
16058
16149
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
16059
|
-
/* @__PURE__ */ (0,
|
|
16150
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
16060
16151
|
positioningAnchorEl
|
|
16061
16152
|
) : null,
|
|
16062
16153
|
[editor, isEditable, positioningAnchorEl]
|
|
@@ -16068,11 +16159,11 @@ init_emotion_jsx_shim();
|
|
|
16068
16159
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
16069
16160
|
var import_table3 = require("@lexical/table");
|
|
16070
16161
|
var import_lexical8 = require("lexical");
|
|
16071
|
-
var
|
|
16162
|
+
var import_react153 = require("react");
|
|
16072
16163
|
var TableSelectionPlugin = () => {
|
|
16073
16164
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
16074
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
16075
|
-
(0,
|
|
16165
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react153.useState)(null);
|
|
16166
|
+
(0, import_react153.useEffect)(() => {
|
|
16076
16167
|
return editor.registerCommand(
|
|
16077
16168
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
16078
16169
|
() => {
|
|
@@ -16094,7 +16185,7 @@ var TableSelectionPlugin = () => {
|
|
|
16094
16185
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
16095
16186
|
);
|
|
16096
16187
|
}, [editor]);
|
|
16097
|
-
(0,
|
|
16188
|
+
(0, import_react153.useEffect)(() => {
|
|
16098
16189
|
const onControlA = (event) => {
|
|
16099
16190
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
16100
16191
|
if (!closestTableCellNode) {
|
|
@@ -16118,7 +16209,7 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
16118
16209
|
|
|
16119
16210
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
16120
16211
|
init_emotion_jsx_shim();
|
|
16121
|
-
var
|
|
16212
|
+
var import_react155 = require("@emotion/react");
|
|
16122
16213
|
var import_code2 = require("@lexical/code");
|
|
16123
16214
|
var import_list2 = require("@lexical/list");
|
|
16124
16215
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -16127,7 +16218,7 @@ var import_selection2 = require("@lexical/selection");
|
|
|
16127
16218
|
var import_table4 = require("@lexical/table");
|
|
16128
16219
|
var import_utils12 = require("@lexical/utils");
|
|
16129
16220
|
var import_lexical9 = require("lexical");
|
|
16130
|
-
var
|
|
16221
|
+
var import_react156 = require("react");
|
|
16131
16222
|
|
|
16132
16223
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
16133
16224
|
init_emotion_jsx_shim();
|
|
@@ -16145,29 +16236,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
16145
16236
|
|
|
16146
16237
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
16147
16238
|
init_emotion_jsx_shim();
|
|
16148
|
-
var
|
|
16239
|
+
var import_react154 = require("react");
|
|
16149
16240
|
var useRichTextToolbarState = ({ config }) => {
|
|
16150
16241
|
var _a;
|
|
16151
|
-
const enabledBuiltInFormats = (0,
|
|
16242
|
+
const enabledBuiltInFormats = (0, import_react154.useMemo)(() => {
|
|
16152
16243
|
return richTextBuiltInFormats.filter((format) => {
|
|
16153
16244
|
var _a2, _b;
|
|
16154
16245
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
16155
16246
|
});
|
|
16156
16247
|
}, [config]);
|
|
16157
|
-
const enabledBuiltInElements = (0,
|
|
16248
|
+
const enabledBuiltInElements = (0, import_react154.useMemo)(() => {
|
|
16158
16249
|
return richTextBuiltInElements.filter((element) => {
|
|
16159
16250
|
var _a2, _b;
|
|
16160
16251
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
16161
16252
|
});
|
|
16162
16253
|
}, [config]);
|
|
16163
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
16254
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react154.useMemo)(() => {
|
|
16164
16255
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
16165
16256
|
}, [enabledBuiltInFormats]);
|
|
16166
16257
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
16167
16258
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
16168
16259
|
);
|
|
16169
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
16170
|
-
const visibleFormatsWithIcon = (0,
|
|
16260
|
+
const [activeFormats, setActiveFormats] = (0, import_react154.useState)([]);
|
|
16261
|
+
const visibleFormatsWithIcon = (0, import_react154.useMemo)(() => {
|
|
16171
16262
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
16172
16263
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
16173
16264
|
visibleFormats.add(type);
|
|
@@ -16177,7 +16268,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16177
16268
|
});
|
|
16178
16269
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
16179
16270
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
16180
|
-
const visibleFormatsWithoutIcon = (0,
|
|
16271
|
+
const visibleFormatsWithoutIcon = (0, import_react154.useMemo)(() => {
|
|
16181
16272
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
16182
16273
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
16183
16274
|
visibleFormats.add(type);
|
|
@@ -16187,11 +16278,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16187
16278
|
});
|
|
16188
16279
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
16189
16280
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
16190
|
-
const [activeElement, setActiveElement] = (0,
|
|
16281
|
+
const [activeElement, setActiveElement] = (0, import_react154.useState)("paragraph");
|
|
16191
16282
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
16192
16283
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
16193
16284
|
);
|
|
16194
|
-
const visibleTextualElements = (0,
|
|
16285
|
+
const visibleTextualElements = (0, import_react154.useMemo)(() => {
|
|
16195
16286
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
16196
16287
|
return enabledTextualElements;
|
|
16197
16288
|
}
|
|
@@ -16202,30 +16293,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16202
16293
|
}
|
|
16203
16294
|
);
|
|
16204
16295
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
16205
|
-
const [isLink, setIsLink] = (0,
|
|
16206
|
-
const linkElementVisible = (0,
|
|
16296
|
+
const [isLink, setIsLink] = (0, import_react154.useState)(false);
|
|
16297
|
+
const linkElementVisible = (0, import_react154.useMemo)(() => {
|
|
16207
16298
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
16208
16299
|
}, [isLink, enabledBuiltInElements]);
|
|
16209
|
-
const visibleLists = (0,
|
|
16300
|
+
const visibleLists = (0, import_react154.useMemo)(() => {
|
|
16210
16301
|
return new Set(
|
|
16211
16302
|
["orderedList", "unorderedList"].filter(
|
|
16212
16303
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
16213
16304
|
)
|
|
16214
16305
|
);
|
|
16215
16306
|
}, [activeElement, enabledBuiltInElements]);
|
|
16216
|
-
const quoteElementVisible = (0,
|
|
16307
|
+
const quoteElementVisible = (0, import_react154.useMemo)(() => {
|
|
16217
16308
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
16218
16309
|
}, [activeElement, enabledBuiltInElements]);
|
|
16219
|
-
const codeElementVisible = (0,
|
|
16310
|
+
const codeElementVisible = (0, import_react154.useMemo)(() => {
|
|
16220
16311
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
16221
16312
|
}, [activeElement, enabledBuiltInElements]);
|
|
16222
|
-
const tableElementVisible = (0,
|
|
16313
|
+
const tableElementVisible = (0, import_react154.useMemo)(() => {
|
|
16223
16314
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
16224
16315
|
}, [activeElement, enabledBuiltInElements]);
|
|
16225
|
-
const assetElementVisible = (0,
|
|
16316
|
+
const assetElementVisible = (0, import_react154.useMemo)(() => {
|
|
16226
16317
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
16227
16318
|
}, [activeElement, enabledBuiltInElements]);
|
|
16228
|
-
const visibleElementsWithIcons = (0,
|
|
16319
|
+
const visibleElementsWithIcons = (0, import_react154.useMemo)(() => {
|
|
16229
16320
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
16230
16321
|
if (linkElementVisible) {
|
|
16231
16322
|
visibleElements.add("link");
|
|
@@ -16237,7 +16328,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16237
16328
|
}
|
|
16238
16329
|
return visibleElements;
|
|
16239
16330
|
}, [linkElementVisible, visibleLists]);
|
|
16240
|
-
const visibleInsertElementsWithIcons = (0,
|
|
16331
|
+
const visibleInsertElementsWithIcons = (0, import_react154.useMemo)(() => {
|
|
16241
16332
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
16242
16333
|
if (quoteElementVisible) {
|
|
16243
16334
|
visibleElements.add("quote");
|
|
@@ -16275,8 +16366,8 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16275
16366
|
};
|
|
16276
16367
|
|
|
16277
16368
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
16278
|
-
var
|
|
16279
|
-
var toolbar =
|
|
16369
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
16370
|
+
var toolbar = import_react155.css`
|
|
16280
16371
|
${scrollbarStyles}
|
|
16281
16372
|
background: var(--gray-50);
|
|
16282
16373
|
border-radius: var(--rounded-base);
|
|
@@ -16290,7 +16381,7 @@ var toolbar = import_react153.css`
|
|
|
16290
16381
|
top: calc(var(--spacing-sm) * -2);
|
|
16291
16382
|
z-index: 10;
|
|
16292
16383
|
`;
|
|
16293
|
-
var toolbarGroup =
|
|
16384
|
+
var toolbarGroup = import_react155.css`
|
|
16294
16385
|
display: flex;
|
|
16295
16386
|
flex-shrink: 0;
|
|
16296
16387
|
gap: var(--spacing-xs);
|
|
@@ -16307,7 +16398,7 @@ var toolbarGroup = import_react153.css`
|
|
|
16307
16398
|
width: 1px;
|
|
16308
16399
|
}
|
|
16309
16400
|
`;
|
|
16310
|
-
var richTextToolbarButton =
|
|
16401
|
+
var richTextToolbarButton = import_react155.css`
|
|
16311
16402
|
align-items: center;
|
|
16312
16403
|
appearance: none;
|
|
16313
16404
|
border: 0;
|
|
@@ -16321,21 +16412,21 @@ var richTextToolbarButton = import_react153.css`
|
|
|
16321
16412
|
min-width: 32px;
|
|
16322
16413
|
padding: 0 var(--spacing-sm);
|
|
16323
16414
|
`;
|
|
16324
|
-
var richTextToolbarButtonActive =
|
|
16415
|
+
var richTextToolbarButtonActive = import_react155.css`
|
|
16325
16416
|
background: var(--gray-200);
|
|
16326
16417
|
`;
|
|
16327
|
-
var textStyleButton =
|
|
16418
|
+
var textStyleButton = import_react155.css`
|
|
16328
16419
|
justify-content: space-between;
|
|
16329
16420
|
min-width: 7rem;
|
|
16330
16421
|
`;
|
|
16331
|
-
var toolbarIcon =
|
|
16422
|
+
var toolbarIcon = import_react155.css`
|
|
16332
16423
|
color: inherit;
|
|
16333
16424
|
`;
|
|
16334
|
-
var toolbarChevron =
|
|
16425
|
+
var toolbarChevron = import_react155.css`
|
|
16335
16426
|
margin-left: var(--spacing-xs);
|
|
16336
16427
|
`;
|
|
16337
16428
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
16338
|
-
return /* @__PURE__ */ (0,
|
|
16429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
16339
16430
|
};
|
|
16340
16431
|
var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset }) => {
|
|
16341
16432
|
const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
|
|
@@ -16391,7 +16482,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16391
16482
|
});
|
|
16392
16483
|
});
|
|
16393
16484
|
};
|
|
16394
|
-
const updateToolbar = (0,
|
|
16485
|
+
const updateToolbar = (0, import_react156.useCallback)(() => {
|
|
16395
16486
|
const selection = (0, import_lexical9.$getSelection)();
|
|
16396
16487
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
16397
16488
|
return;
|
|
@@ -16430,7 +16521,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16430
16521
|
setIsLink(false);
|
|
16431
16522
|
}
|
|
16432
16523
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
16433
|
-
(0,
|
|
16524
|
+
(0, import_react156.useEffect)(() => {
|
|
16434
16525
|
return editor.registerCommand(
|
|
16435
16526
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
16436
16527
|
(_payload) => {
|
|
@@ -16440,7 +16531,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16440
16531
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
16441
16532
|
);
|
|
16442
16533
|
}, [editor, updateToolbar]);
|
|
16443
|
-
(0,
|
|
16534
|
+
(0, import_react156.useEffect)(() => {
|
|
16444
16535
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16445
16536
|
requestAnimationFrame(() => {
|
|
16446
16537
|
editorState.read(() => {
|
|
@@ -16449,14 +16540,14 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16449
16540
|
});
|
|
16450
16541
|
});
|
|
16451
16542
|
}, [editor, updateToolbar]);
|
|
16452
|
-
return /* @__PURE__ */ (0,
|
|
16453
|
-
/* @__PURE__ */ (0,
|
|
16543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { css: toolbar, "data-testid": "rich-text-toolbar", children: [
|
|
16544
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
16454
16545
|
Menu,
|
|
16455
16546
|
{
|
|
16456
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16547
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
|
|
16457
16548
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
16458
16549
|
" ",
|
|
16459
|
-
/* @__PURE__ */ (0,
|
|
16550
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16460
16551
|
] }),
|
|
16461
16552
|
placement: "bottom-start",
|
|
16462
16553
|
children: [
|
|
@@ -16466,7 +16557,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16466
16557
|
type: "paragraph"
|
|
16467
16558
|
},
|
|
16468
16559
|
...visibleTextualElements
|
|
16469
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
16560
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16470
16561
|
MenuItem,
|
|
16471
16562
|
{
|
|
16472
16563
|
"data-testid": "menu-item",
|
|
@@ -16477,12 +16568,12 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16477
16568
|
},
|
|
16478
16569
|
element.type
|
|
16479
16570
|
)),
|
|
16480
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
16571
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
16481
16572
|
]
|
|
16482
16573
|
}
|
|
16483
16574
|
),
|
|
16484
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
16485
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
16575
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-formatting", children: [
|
|
16576
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16486
16577
|
"button",
|
|
16487
16578
|
{
|
|
16488
16579
|
"data-testid": `formatting-button-${format.type}`,
|
|
@@ -16494,15 +16585,15 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16494
16585
|
richTextToolbarButton,
|
|
16495
16586
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
16496
16587
|
],
|
|
16497
|
-
children: /* @__PURE__ */ (0,
|
|
16588
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
16498
16589
|
}
|
|
16499
16590
|
) }, format.type)),
|
|
16500
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
16591
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16501
16592
|
Menu,
|
|
16502
16593
|
{
|
|
16503
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16594
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
16504
16595
|
placement: "bottom-start",
|
|
16505
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
16596
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16506
16597
|
MenuItem,
|
|
16507
16598
|
{
|
|
16508
16599
|
onClick: () => {
|
|
@@ -16515,8 +16606,8 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16515
16606
|
}
|
|
16516
16607
|
) : null
|
|
16517
16608
|
] }) : null,
|
|
16518
|
-
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0,
|
|
16519
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
16609
|
+
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-elements", children: [
|
|
16610
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16520
16611
|
"button",
|
|
16521
16612
|
{
|
|
16522
16613
|
"data-testid": "element-link",
|
|
@@ -16529,11 +16620,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16529
16620
|
}
|
|
16530
16621
|
},
|
|
16531
16622
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
16532
|
-
children: /* @__PURE__ */ (0,
|
|
16623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
16533
16624
|
}
|
|
16534
16625
|
) }) : null,
|
|
16535
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
16536
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
16626
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
|
|
16627
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16537
16628
|
"button",
|
|
16538
16629
|
{
|
|
16539
16630
|
"data-testid": "element-unordered-list",
|
|
@@ -16549,10 +16640,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16549
16640
|
richTextToolbarButton,
|
|
16550
16641
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
16551
16642
|
],
|
|
16552
|
-
children: /* @__PURE__ */ (0,
|
|
16643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
16553
16644
|
}
|
|
16554
16645
|
) }) : null,
|
|
16555
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
16646
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16556
16647
|
"button",
|
|
16557
16648
|
{
|
|
16558
16649
|
"data-testid": "element-ordered-list",
|
|
@@ -16568,58 +16659,58 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16568
16659
|
richTextToolbarButton,
|
|
16569
16660
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
16570
16661
|
],
|
|
16571
|
-
children: /* @__PURE__ */ (0,
|
|
16662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
16572
16663
|
}
|
|
16573
16664
|
) }) : null
|
|
16574
16665
|
] }) : null,
|
|
16575
16666
|
customControls ? customControls : null
|
|
16576
16667
|
] }) : null,
|
|
16577
|
-
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
16668
|
+
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-insert", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
16578
16669
|
Menu,
|
|
16579
16670
|
{
|
|
16580
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16671
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
|
|
16581
16672
|
"Insert",
|
|
16582
|
-
/* @__PURE__ */ (0,
|
|
16673
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16583
16674
|
] }),
|
|
16584
16675
|
placement: "bottom-start",
|
|
16585
16676
|
children: [
|
|
16586
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
16677
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16587
16678
|
MenuItem,
|
|
16588
16679
|
{
|
|
16589
16680
|
onClick: () => {
|
|
16590
16681
|
onSelectElement("quote");
|
|
16591
16682
|
},
|
|
16592
|
-
icon: /* @__PURE__ */ (0,
|
|
16683
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "quote", iconColor: "currentColor" }),
|
|
16593
16684
|
children: "Quote"
|
|
16594
16685
|
}
|
|
16595
16686
|
) : null,
|
|
16596
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
16687
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16597
16688
|
MenuItem,
|
|
16598
16689
|
{
|
|
16599
16690
|
onClick: () => {
|
|
16600
16691
|
onSelectElement("code");
|
|
16601
16692
|
},
|
|
16602
|
-
icon: /* @__PURE__ */ (0,
|
|
16693
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "code-slash", iconColor: "currentColor" }),
|
|
16603
16694
|
children: "Code"
|
|
16604
16695
|
}
|
|
16605
16696
|
) : null,
|
|
16606
|
-
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0,
|
|
16697
|
+
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16607
16698
|
MenuItem,
|
|
16608
16699
|
{
|
|
16609
16700
|
onClick: () => {
|
|
16610
16701
|
onSelectElement("table");
|
|
16611
16702
|
},
|
|
16612
|
-
icon: /* @__PURE__ */ (0,
|
|
16703
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "view-grid", iconColor: "currentColor" }),
|
|
16613
16704
|
children: "Table"
|
|
16614
16705
|
}
|
|
16615
16706
|
) : null,
|
|
16616
|
-
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ (0,
|
|
16707
|
+
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16617
16708
|
MenuItem,
|
|
16618
16709
|
{
|
|
16619
16710
|
onClick: () => {
|
|
16620
16711
|
onSelectElement("asset");
|
|
16621
16712
|
},
|
|
16622
|
-
icon: /* @__PURE__ */ (0,
|
|
16713
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: "image", iconColor: "currentColor" }),
|
|
16623
16714
|
children: "Asset"
|
|
16624
16715
|
}
|
|
16625
16716
|
) : null
|
|
@@ -16631,7 +16722,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16631
16722
|
var RichTextToolbar_default = RichTextToolbar;
|
|
16632
16723
|
|
|
16633
16724
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
16634
|
-
var
|
|
16725
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
16635
16726
|
var ParameterRichText = ({
|
|
16636
16727
|
label,
|
|
16637
16728
|
labelLeadingIcon,
|
|
@@ -16660,7 +16751,7 @@ var ParameterRichText = ({
|
|
|
16660
16751
|
onInsertAsset,
|
|
16661
16752
|
minimalInteractivity
|
|
16662
16753
|
}) => {
|
|
16663
|
-
return /* @__PURE__ */ (0,
|
|
16754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
16664
16755
|
ParameterShell,
|
|
16665
16756
|
{
|
|
16666
16757
|
"data-testid": "parameter-richtext",
|
|
@@ -16674,7 +16765,7 @@ var ParameterRichText = ({
|
|
|
16674
16765
|
captionTestId,
|
|
16675
16766
|
menuItems,
|
|
16676
16767
|
children: [
|
|
16677
|
-
/* @__PURE__ */ (0,
|
|
16768
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16678
16769
|
ParameterRichTextInner,
|
|
16679
16770
|
{
|
|
16680
16771
|
value,
|
|
@@ -16696,12 +16787,12 @@ var ParameterRichText = ({
|
|
|
16696
16787
|
children
|
|
16697
16788
|
}
|
|
16698
16789
|
),
|
|
16699
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
16790
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, { children: menuItems }) }) : null
|
|
16700
16791
|
]
|
|
16701
16792
|
}
|
|
16702
16793
|
);
|
|
16703
16794
|
};
|
|
16704
|
-
var editorContainerWrapper =
|
|
16795
|
+
var editorContainerWrapper = import_react157.css`
|
|
16705
16796
|
position: relative;
|
|
16706
16797
|
|
|
16707
16798
|
&::before {
|
|
@@ -16717,12 +16808,12 @@ var editorContainerWrapper = import_react155.css`
|
|
|
16717
16808
|
z-index: 2;
|
|
16718
16809
|
}
|
|
16719
16810
|
`;
|
|
16720
|
-
var editorWrapper =
|
|
16811
|
+
var editorWrapper = import_react157.css`
|
|
16721
16812
|
display: flex;
|
|
16722
16813
|
flex-flow: column;
|
|
16723
16814
|
flex-grow: 1;
|
|
16724
16815
|
`;
|
|
16725
|
-
var editorContainer =
|
|
16816
|
+
var editorContainer = import_react157.css`
|
|
16726
16817
|
${scrollbarStyles}
|
|
16727
16818
|
background: var(--white);
|
|
16728
16819
|
border-radius: var(--rounded-sm);
|
|
@@ -16754,7 +16845,7 @@ var editorContainer = import_react155.css`
|
|
|
16754
16845
|
max-height: unset;
|
|
16755
16846
|
}
|
|
16756
16847
|
`;
|
|
16757
|
-
var editorContainerOverflowWrapper =
|
|
16848
|
+
var editorContainerOverflowWrapper = import_react157.css`
|
|
16758
16849
|
overflow: hidden;
|
|
16759
16850
|
pointer-events: none;
|
|
16760
16851
|
|
|
@@ -16762,7 +16853,7 @@ var editorContainerOverflowWrapper = import_react155.css`
|
|
|
16762
16853
|
pointer-events: auto;
|
|
16763
16854
|
}
|
|
16764
16855
|
`;
|
|
16765
|
-
var editorPlaceholder =
|
|
16856
|
+
var editorPlaceholder = import_react157.css`
|
|
16766
16857
|
color: var(--gray-500);
|
|
16767
16858
|
font-style: italic;
|
|
16768
16859
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -16773,7 +16864,7 @@ var editorPlaceholder = import_react155.css`
|
|
|
16773
16864
|
top: calc(1rem + var(--spacing-sm));
|
|
16774
16865
|
user-select: none;
|
|
16775
16866
|
`;
|
|
16776
|
-
var editorInput =
|
|
16867
|
+
var editorInput = import_react157.css`
|
|
16777
16868
|
min-height: 100%;
|
|
16778
16869
|
flex-grow: 1;
|
|
16779
16870
|
|
|
@@ -16857,8 +16948,8 @@ var ParameterRichTextInner = ({
|
|
|
16857
16948
|
},
|
|
16858
16949
|
editable: !readOnly
|
|
16859
16950
|
};
|
|
16860
|
-
return /* @__PURE__ */ (0,
|
|
16861
|
-
/* @__PURE__ */ (0,
|
|
16951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
16952
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16862
16953
|
RichText,
|
|
16863
16954
|
{
|
|
16864
16955
|
onChange,
|
|
@@ -16904,15 +16995,20 @@ var RichText = ({
|
|
|
16904
16995
|
minimalInteractivity
|
|
16905
16996
|
}) => {
|
|
16906
16997
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
16907
|
-
(0,
|
|
16998
|
+
(0, import_react158.useEffect)(() => {
|
|
16908
16999
|
if (onRichTextInit) {
|
|
16909
17000
|
onRichTextInit(editor);
|
|
16910
17001
|
}
|
|
16911
17002
|
}, [editor, onRichTextInit]);
|
|
16912
|
-
(0,
|
|
17003
|
+
(0, import_react158.useEffect)(() => {
|
|
16913
17004
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
16914
17005
|
requestAnimationFrame(() => {
|
|
16915
|
-
|
|
17006
|
+
const previousEditorState = prevEditorState.toJSON();
|
|
17007
|
+
const currentEditorState = editorState.toJSON();
|
|
17008
|
+
if (!(0, import_fast_equals2.deepEqual)(
|
|
17009
|
+
normalizeStateForDeepEqualComparison(currentEditorState),
|
|
17010
|
+
normalizeStateForDeepEqualComparison(previousEditorState)
|
|
17011
|
+
)) {
|
|
16916
17012
|
onChange == null ? void 0 : onChange(editorState.toJSON(), tags);
|
|
16917
17013
|
}
|
|
16918
17014
|
});
|
|
@@ -16921,23 +17017,23 @@ var RichText = ({
|
|
|
16921
17017
|
removeUpdateListener();
|
|
16922
17018
|
};
|
|
16923
17019
|
}, [editor, onChange]);
|
|
16924
|
-
(0,
|
|
17020
|
+
(0, import_react158.useEffect)(() => {
|
|
16925
17021
|
editor.setEditable(!readOnly);
|
|
16926
17022
|
}, [editor, readOnly]);
|
|
16927
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
17023
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react158.useState)(null);
|
|
16928
17024
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
16929
17025
|
if (_editorContainerRef !== null) {
|
|
16930
17026
|
setEditorContainerRef(_editorContainerRef);
|
|
16931
17027
|
}
|
|
16932
17028
|
};
|
|
16933
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
17029
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react158.useState)(null);
|
|
16934
17030
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
16935
17031
|
if (_portalContainerRef !== null) {
|
|
16936
17032
|
setPortalContainerRef(_portalContainerRef);
|
|
16937
17033
|
}
|
|
16938
17034
|
};
|
|
16939
|
-
return /* @__PURE__ */ (0,
|
|
16940
|
-
readOnly || minimalInteractivity ? null : /* @__PURE__ */ (0,
|
|
17035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
17036
|
+
readOnly || minimalInteractivity ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16941
17037
|
RichTextToolbar_default,
|
|
16942
17038
|
{
|
|
16943
17039
|
config,
|
|
@@ -16946,8 +17042,8 @@ var RichText = ({
|
|
|
16946
17042
|
onInsertAsset
|
|
16947
17043
|
}
|
|
16948
17044
|
),
|
|
16949
|
-
/* @__PURE__ */ (0,
|
|
16950
|
-
/* @__PURE__ */ (0,
|
|
17045
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
|
|
17046
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
16951
17047
|
"div",
|
|
16952
17048
|
{
|
|
16953
17049
|
css: editorContainer,
|
|
@@ -16955,33 +17051,33 @@ var RichText = ({
|
|
|
16955
17051
|
ref: onEditorContainerRef,
|
|
16956
17052
|
"data-testid": "value-container",
|
|
16957
17053
|
children: [
|
|
16958
|
-
/* @__PURE__ */ (0,
|
|
17054
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16959
17055
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
16960
17056
|
{
|
|
16961
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
16962
|
-
placeholder: /* @__PURE__ */ (0,
|
|
17057
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
17058
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
16963
17059
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
16964
17060
|
}
|
|
16965
17061
|
),
|
|
16966
|
-
/* @__PURE__ */ (0,
|
|
16967
|
-
/* @__PURE__ */ (0,
|
|
16968
|
-
/* @__PURE__ */ (0,
|
|
16969
|
-
/* @__PURE__ */ (0,
|
|
17062
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
17063
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
17064
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalTablePlugin.TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
|
|
17065
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16970
17066
|
TableActionMenuPlugin,
|
|
16971
17067
|
{
|
|
16972
17068
|
positioningAnchorEl: editorContainerRef,
|
|
16973
17069
|
menuPortalEl: portalContainerRef
|
|
16974
17070
|
}
|
|
16975
17071
|
) : null }),
|
|
16976
|
-
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0,
|
|
16977
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
16978
|
-
/* @__PURE__ */ (0,
|
|
16979
|
-
/* @__PURE__ */ (0,
|
|
17072
|
+
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
|
|
17073
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
17074
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(DisableStylesPlugin, {}),
|
|
17075
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
|
|
16980
17076
|
]
|
|
16981
17077
|
}
|
|
16982
17078
|
),
|
|
16983
|
-
/* @__PURE__ */ (0,
|
|
16984
|
-
editorContainerRef ? /* @__PURE__ */ (0,
|
|
17079
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, { children }),
|
|
17080
|
+
editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16985
17081
|
LinkNodePlugin,
|
|
16986
17082
|
{
|
|
16987
17083
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -16992,26 +17088,26 @@ var RichText = ({
|
|
|
16992
17088
|
positioningAnchorEl: editorContainerRef
|
|
16993
17089
|
}
|
|
16994
17090
|
) : null,
|
|
16995
|
-
/* @__PURE__ */ (0,
|
|
16996
|
-
/* @__PURE__ */ (0,
|
|
17091
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(TableSelectionPlugin_default, {}),
|
|
17092
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ImprovedAssetSelectionPlugin_default, {})
|
|
16997
17093
|
] })
|
|
16998
17094
|
] });
|
|
16999
17095
|
};
|
|
17000
17096
|
|
|
17001
17097
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
17002
17098
|
init_emotion_jsx_shim();
|
|
17003
|
-
var
|
|
17004
|
-
var
|
|
17005
|
-
var ParameterSelect = (0,
|
|
17099
|
+
var import_react159 = require("react");
|
|
17100
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
17101
|
+
var ParameterSelect = (0, import_react159.forwardRef)(
|
|
17006
17102
|
({ defaultOption, options, ...props }, ref) => {
|
|
17007
17103
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17008
|
-
return /* @__PURE__ */ (0,
|
|
17104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
17009
17105
|
}
|
|
17010
17106
|
);
|
|
17011
|
-
var ParameterSelectInner = (0,
|
|
17107
|
+
var ParameterSelectInner = (0, import_react159.forwardRef)(
|
|
17012
17108
|
({ defaultOption, options, ...props }, ref) => {
|
|
17013
17109
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17014
|
-
return /* @__PURE__ */ (0,
|
|
17110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
17015
17111
|
"select",
|
|
17016
17112
|
{
|
|
17017
17113
|
css: [input3, selectInput],
|
|
@@ -17020,10 +17116,10 @@ var ParameterSelectInner = (0, import_react157.forwardRef)(
|
|
|
17020
17116
|
ref,
|
|
17021
17117
|
...props,
|
|
17022
17118
|
children: [
|
|
17023
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
17119
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
17024
17120
|
options.map((option) => {
|
|
17025
17121
|
var _a;
|
|
17026
|
-
return /* @__PURE__ */ (0,
|
|
17122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
17027
17123
|
})
|
|
17028
17124
|
]
|
|
17029
17125
|
}
|
|
@@ -17033,15 +17129,15 @@ var ParameterSelectInner = (0, import_react157.forwardRef)(
|
|
|
17033
17129
|
|
|
17034
17130
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
17035
17131
|
init_emotion_jsx_shim();
|
|
17036
|
-
var
|
|
17037
|
-
var
|
|
17038
|
-
var ParameterTextarea = (0,
|
|
17132
|
+
var import_react160 = require("react");
|
|
17133
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
17134
|
+
var ParameterTextarea = (0, import_react160.forwardRef)((props, ref) => {
|
|
17039
17135
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17040
|
-
return /* @__PURE__ */ (0,
|
|
17136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
17041
17137
|
});
|
|
17042
|
-
var ParameterTextareaInner = (0,
|
|
17138
|
+
var ParameterTextareaInner = (0, import_react160.forwardRef)(({ ...props }, ref) => {
|
|
17043
17139
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17044
|
-
return /* @__PURE__ */ (0,
|
|
17140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17045
17141
|
"textarea",
|
|
17046
17142
|
{
|
|
17047
17143
|
css: [input3, textarea2],
|
|
@@ -17055,80 +17151,23 @@ var ParameterTextareaInner = (0, import_react158.forwardRef)(({ ...props }, ref)
|
|
|
17055
17151
|
|
|
17056
17152
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
17057
17153
|
init_emotion_jsx_shim();
|
|
17058
|
-
var
|
|
17059
|
-
var
|
|
17060
|
-
var ParameterToggle = (0,
|
|
17154
|
+
var import_react161 = require("react");
|
|
17155
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
17156
|
+
var ParameterToggle = (0, import_react161.forwardRef)((props, ref) => {
|
|
17061
17157
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17062
|
-
return /* @__PURE__ */ (0,
|
|
17158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
17063
17159
|
});
|
|
17064
|
-
var ParameterToggleInner = (0,
|
|
17160
|
+
var ParameterToggleInner = (0, import_react161.forwardRef)(
|
|
17065
17161
|
({ children, ...props }, ref) => {
|
|
17066
17162
|
const { id, label } = useParameterShell();
|
|
17067
|
-
return /* @__PURE__ */ (0,
|
|
17068
|
-
/* @__PURE__ */ (0,
|
|
17069
|
-
/* @__PURE__ */ (0,
|
|
17163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
17164
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
17165
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { css: inlineLabel2, children: label }),
|
|
17070
17166
|
children
|
|
17071
17167
|
] });
|
|
17072
17168
|
}
|
|
17073
17169
|
);
|
|
17074
17170
|
|
|
17075
|
-
// src/components/Popover/Popover.tsx
|
|
17076
|
-
init_emotion_jsx_shim();
|
|
17077
|
-
var import_react160 = require("@ariakit/react");
|
|
17078
|
-
var import_react161 = require("react");
|
|
17079
|
-
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
17080
|
-
var Popover3 = ({
|
|
17081
|
-
iconColor = "action",
|
|
17082
|
-
icon = "info",
|
|
17083
|
-
iconSize = "1rem",
|
|
17084
|
-
buttonText,
|
|
17085
|
-
ariaLabel,
|
|
17086
|
-
placement = "bottom",
|
|
17087
|
-
testId,
|
|
17088
|
-
trigger: trigger2,
|
|
17089
|
-
children,
|
|
17090
|
-
onInit,
|
|
17091
|
-
variant = "small",
|
|
17092
|
-
maxWidth = variant === "large" ? "24rem" : "14rem",
|
|
17093
|
-
...otherProps
|
|
17094
|
-
}) => {
|
|
17095
|
-
const popover2 = (0, import_react160.usePopoverStore)({ placement });
|
|
17096
|
-
(0, import_react161.useEffect)(() => {
|
|
17097
|
-
onInit == null ? void 0 : onInit({ store: popover2 });
|
|
17098
|
-
}, [popover2]);
|
|
17099
|
-
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_react160.PopoverProvider, { store: popover2, children: [
|
|
17100
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17101
|
-
import_react160.PopoverDisclosure,
|
|
17102
|
-
{
|
|
17103
|
-
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
17104
|
-
title: buttonText,
|
|
17105
|
-
"data-testid": testId,
|
|
17106
|
-
children: trigger2 ? trigger2 : /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
|
|
17107
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { icon, iconColor, size: iconSize }),
|
|
17108
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { hidden: true, children: buttonText })
|
|
17109
|
-
] })
|
|
17110
|
-
}
|
|
17111
|
-
),
|
|
17112
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17113
|
-
import_react160.Popover,
|
|
17114
|
-
{
|
|
17115
|
-
unmountOnHide: true,
|
|
17116
|
-
style: {
|
|
17117
|
-
maxWidth
|
|
17118
|
-
},
|
|
17119
|
-
css: [Popover, variant === "large" ? PopoverVariantLarge : PopoverVariantSmall],
|
|
17120
|
-
...otherProps,
|
|
17121
|
-
"aria-label": ariaLabel,
|
|
17122
|
-
children
|
|
17123
|
-
}
|
|
17124
|
-
)
|
|
17125
|
-
] });
|
|
17126
|
-
};
|
|
17127
|
-
var usePopoverComponentContext = () => {
|
|
17128
|
-
const contextValue = (0, import_react160.usePopoverContext)();
|
|
17129
|
-
return contextValue;
|
|
17130
|
-
};
|
|
17131
|
-
|
|
17132
17171
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
17133
17172
|
init_emotion_jsx_shim();
|
|
17134
17173
|
|