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