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