@uniformdev/design-system 20.31.1-alpha.1 → 20.31.1-alpha.185
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 +597 -496
- package/dist/index.d.mts +42 -4
- package/dist/index.d.ts +42 -4
- package/dist/index.js +761 -656
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1466,6 +1466,7 @@ __export(src_exports, {
|
|
|
1466
1466
|
PageHeaderSection: () => PageHeaderSection,
|
|
1467
1467
|
Pagination: () => Pagination,
|
|
1468
1468
|
Paragraph: () => Paragraph,
|
|
1469
|
+
ParameterActionButton: () => ParameterActionButton,
|
|
1469
1470
|
ParameterDrawerHeader: () => ParameterDrawerHeader,
|
|
1470
1471
|
ParameterGroup: () => ParameterGroup,
|
|
1471
1472
|
ParameterImage: () => ParameterImage,
|
|
@@ -1537,6 +1538,7 @@ __export(src_exports, {
|
|
|
1537
1538
|
VerticalRhythm: () => VerticalRhythm,
|
|
1538
1539
|
WarningMessage: () => WarningMessage,
|
|
1539
1540
|
accessibleHidden: () => accessibleHidden,
|
|
1541
|
+
actionBarVisibilityStyles: () => actionBarVisibilityStyles,
|
|
1540
1542
|
addPathSegmentToPathname: () => addPathSegmentToPathname,
|
|
1541
1543
|
borderTopIcon: () => borderTopIcon,
|
|
1542
1544
|
breakpoints: () => breakpoints,
|
|
@@ -1745,11 +1747,12 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1745
1747
|
--typography-inverted: var(--white);
|
|
1746
1748
|
|
|
1747
1749
|
/* chart colours */
|
|
1748
|
-
--charting-chart-1: #
|
|
1749
|
-
--charting-chart-2: #
|
|
1750
|
-
--charting-chart-3: #
|
|
1751
|
-
--charting-chart-4: #
|
|
1752
|
-
--charting-chart-5: #
|
|
1750
|
+
--charting-chart-1: #0072B2;
|
|
1751
|
+
--charting-chart-2: #D55E00;
|
|
1752
|
+
--charting-chart-3: #009E73;
|
|
1753
|
+
--charting-chart-4: #E41A1C;
|
|
1754
|
+
--charting-chart-5: #F0E442;
|
|
1755
|
+
--charting-chart-6: #56B4E9;
|
|
1753
1756
|
|
|
1754
1757
|
/* utility colours */
|
|
1755
1758
|
--utility-success: #4ade80;
|
|
@@ -5720,7 +5723,7 @@ var menuItem = (textTheme, forceActive) => import_react33.css`
|
|
|
5720
5723
|
align-items: center;
|
|
5721
5724
|
border-radius: var(--rounded-base);
|
|
5722
5725
|
background: none;
|
|
5723
|
-
color: ${textTheme === "base"
|
|
5726
|
+
color: ${textTheme === "base" || textTheme === "accent-alt" ? "var(--typography-base)" : "var(--brand-secondary-5)"};
|
|
5724
5727
|
display: flex;
|
|
5725
5728
|
font-weight: var(--fw-regular);
|
|
5726
5729
|
font-size: var(--menu-item-font-size);
|
|
@@ -5739,7 +5742,7 @@ var menuItem = (textTheme, forceActive) => import_react33.css`
|
|
|
5739
5742
|
}
|
|
5740
5743
|
|
|
5741
5744
|
svg {
|
|
5742
|
-
${textTheme === "red" ? "" : `color: var(--gray-400)`};
|
|
5745
|
+
${textTheme === "red" ? "" : textTheme === "accent-alt" ? "color: var(--accent-alt-dark);" : `color: var(--gray-400)`};
|
|
5743
5746
|
width: var(--menu-item-icon-size);
|
|
5744
5747
|
height: var(--menu-item-icon-size);
|
|
5745
5748
|
}
|
|
@@ -5748,7 +5751,7 @@ var menuItem = (textTheme, forceActive) => import_react33.css`
|
|
|
5748
5751
|
[aria-selected='true'] {
|
|
5749
5752
|
background: var(--gray-200);
|
|
5750
5753
|
svg {
|
|
5751
|
-
|
|
5754
|
+
${textTheme === "red" ? `color: var(--action-destructive-active);` : textTheme === "accent-alt" ? "color: var(--accent-alt-dark-active);" : `color: var(--accent-dark-active);`}
|
|
5752
5755
|
}
|
|
5753
5756
|
}
|
|
5754
5757
|
|
|
@@ -5758,7 +5761,7 @@ var menuItem = (textTheme, forceActive) => import_react33.css`
|
|
|
5758
5761
|
${typeof forceActive === "undefined" ? activeMenuItem : ""}
|
|
5759
5762
|
|
|
5760
5763
|
svg {
|
|
5761
|
-
|
|
5764
|
+
${textTheme === "red" ? `color: var(--action-destructive-hover);` : textTheme === "accent-alt" ? "color: var(--accent-alt-dark-hover);" : `color: var(--accent-dark-hover);`}
|
|
5762
5765
|
}
|
|
5763
5766
|
}
|
|
5764
5767
|
|
|
@@ -6504,15 +6507,15 @@ function InputCreatableComboBox(props) {
|
|
|
6504
6507
|
}
|
|
6505
6508
|
);
|
|
6506
6509
|
}
|
|
6507
|
-
function inputComboBoxStyles(
|
|
6510
|
+
function inputComboBoxStyles(baseStyles2) {
|
|
6508
6511
|
return {
|
|
6509
|
-
...
|
|
6512
|
+
...baseStyles2,
|
|
6510
6513
|
singleValue: (base, sProps) => {
|
|
6511
6514
|
var _a;
|
|
6512
6515
|
return {
|
|
6513
6516
|
...base,
|
|
6514
6517
|
color: "var(--typography-base)",
|
|
6515
|
-
...(_a =
|
|
6518
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.singleValue) == null ? void 0 : _a.call(baseStyles2, base, sProps)
|
|
6516
6519
|
};
|
|
6517
6520
|
},
|
|
6518
6521
|
valueContainer: (base, sProps) => {
|
|
@@ -6521,7 +6524,7 @@ function inputComboBoxStyles(baseStyles) {
|
|
|
6521
6524
|
...base,
|
|
6522
6525
|
padding: "12px var(--spacing-base) 12px var(--spacing-sm)",
|
|
6523
6526
|
gap: "2px",
|
|
6524
|
-
...(_a =
|
|
6527
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.valueContainer) == null ? void 0 : _a.call(baseStyles2, base, sProps)
|
|
6525
6528
|
};
|
|
6526
6529
|
},
|
|
6527
6530
|
input: (base, sProps) => {
|
|
@@ -6534,7 +6537,7 @@ function inputComboBoxStyles(baseStyles) {
|
|
|
6534
6537
|
"& > input": {
|
|
6535
6538
|
boxShadow: "none !important"
|
|
6536
6539
|
},
|
|
6537
|
-
...(_a =
|
|
6540
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.input) == null ? void 0 : _a.call(baseStyles2, base, sProps)
|
|
6538
6541
|
};
|
|
6539
6542
|
},
|
|
6540
6543
|
menu: (base, state) => {
|
|
@@ -6542,7 +6545,7 @@ function inputComboBoxStyles(baseStyles) {
|
|
|
6542
6545
|
return {
|
|
6543
6546
|
...base,
|
|
6544
6547
|
zIndex: "var(--z-20)",
|
|
6545
|
-
...(_a =
|
|
6548
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.menu) == null ? void 0 : _a.call(baseStyles2, base, state)
|
|
6546
6549
|
};
|
|
6547
6550
|
},
|
|
6548
6551
|
control: (base, state) => {
|
|
@@ -6574,7 +6577,7 @@ function inputComboBoxStyles(baseStyles) {
|
|
|
6574
6577
|
},
|
|
6575
6578
|
...state.isFocused ? { borderColor: "var(--gray-300)" } : {}
|
|
6576
6579
|
},
|
|
6577
|
-
...(_a =
|
|
6580
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.control) == null ? void 0 : _a.call(baseStyles2, base, state)
|
|
6578
6581
|
};
|
|
6579
6582
|
},
|
|
6580
6583
|
indicatorsContainer: (base, state) => {
|
|
@@ -6594,14 +6597,14 @@ function inputComboBoxStyles(baseStyles) {
|
|
|
6594
6597
|
"& svg": {
|
|
6595
6598
|
display: "none"
|
|
6596
6599
|
},
|
|
6597
|
-
...(_a =
|
|
6600
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.indicatorsContainer) == null ? void 0 : _a.call(baseStyles2, base, state)
|
|
6598
6601
|
};
|
|
6599
6602
|
},
|
|
6600
6603
|
indicatorSeparator: (base, state) => {
|
|
6601
6604
|
var _a;
|
|
6602
6605
|
return {
|
|
6603
6606
|
display: "none",
|
|
6604
|
-
...(_a =
|
|
6607
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.indicatorSeparator) == null ? void 0 : _a.call(baseStyles2, base, state)
|
|
6605
6608
|
};
|
|
6606
6609
|
},
|
|
6607
6610
|
option: (base, state) => {
|
|
@@ -6612,7 +6615,7 @@ function inputComboBoxStyles(baseStyles) {
|
|
|
6612
6615
|
color: state.isDisabled ? "var(--gray-300)" : "var(--gray-700)",
|
|
6613
6616
|
paddingLeft: isIndented ? "var(--spacing-md)" : "",
|
|
6614
6617
|
backgroundColor: state.isDisabled ? "transparent" : state.isSelected ? "var(--gray-200)" : state.isFocused ? "var(--gray-100)" : "transparent",
|
|
6615
|
-
...(_a =
|
|
6618
|
+
...(_a = baseStyles2 == null ? void 0 : baseStyles2.option) == null ? void 0 : _a.call(baseStyles2, base, state)
|
|
6616
6619
|
};
|
|
6617
6620
|
},
|
|
6618
6621
|
multiValue: (styles) => {
|
|
@@ -7379,13 +7382,14 @@ var buttonSizeLarge = import_react56.css`
|
|
|
7379
7382
|
--line-offset: -1px;
|
|
7380
7383
|
`;
|
|
7381
7384
|
var ButtonWithMenuContainer = import_react56.css`
|
|
7382
|
-
align-items: center;
|
|
7383
7385
|
border: 1px solid transparent;
|
|
7384
7386
|
border-radius: var(--rounded-base);
|
|
7385
7387
|
color: var(--white);
|
|
7386
|
-
display: inline-
|
|
7388
|
+
display: inline-grid;
|
|
7387
7389
|
position: relative;
|
|
7390
|
+
grid-template-columns: 1fr minmax(calc(var(--svg-size) * 2), 2.44rem);
|
|
7388
7391
|
min-height: 24px;
|
|
7392
|
+
max-width: max-content;
|
|
7389
7393
|
transition:
|
|
7390
7394
|
color var(--duration-fast) var(--timing-ease-out),
|
|
7391
7395
|
border-color var(--duration-fast) var(--timing-ease-out),
|
|
@@ -7408,6 +7412,12 @@ var ButtonWithMenuContainer = import_react56.css`
|
|
|
7408
7412
|
height: var(--svg-size);
|
|
7409
7413
|
}
|
|
7410
7414
|
`;
|
|
7415
|
+
var IconButtonContainer = import_react56.css`
|
|
7416
|
+
display: flex;
|
|
7417
|
+
align-items: center;
|
|
7418
|
+
justify-content: center;
|
|
7419
|
+
height: 100%;
|
|
7420
|
+
`;
|
|
7411
7421
|
function ButtonWithMenuBtn(overrideHairlineColor) {
|
|
7412
7422
|
return import_react56.css`
|
|
7413
7423
|
position: relative;
|
|
@@ -7440,8 +7450,12 @@ function ButtonWithMenuBtn(overrideHairlineColor) {
|
|
|
7440
7450
|
`;
|
|
7441
7451
|
}
|
|
7442
7452
|
var ButtonWithMenuIcon = (disabled2) => import_react56.css`
|
|
7443
|
-
|
|
7453
|
+
display: flex;
|
|
7454
|
+
align-items: center;
|
|
7455
|
+
justify-content: center;
|
|
7444
7456
|
pointer-events: ${disabled2 ? "none" : "auto"};
|
|
7457
|
+
width: 100%;
|
|
7458
|
+
height: 100%;
|
|
7445
7459
|
`;
|
|
7446
7460
|
var buttonPrimary2 = import_react56.css`
|
|
7447
7461
|
background: var(--gray-800);
|
|
@@ -7565,15 +7579,17 @@ var ButtonWithMenu = ({
|
|
|
7565
7579
|
]
|
|
7566
7580
|
}
|
|
7567
7581
|
);
|
|
7568
|
-
const menuButton = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7569
|
-
"
|
|
7582
|
+
const menuButton = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { css: IconButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7583
|
+
"button",
|
|
7570
7584
|
{
|
|
7585
|
+
type: "button",
|
|
7571
7586
|
css: ButtonWithMenuIcon(disabledValue),
|
|
7572
7587
|
"data-testid": "multioptions-button-call-menu",
|
|
7573
7588
|
"aria-disabled": disabledValue,
|
|
7589
|
+
"aria-label": "Open menu",
|
|
7574
7590
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: import_CgChevronDown4.CgChevronDown, iconColor: "currentColor" })
|
|
7575
7591
|
}
|
|
7576
|
-
);
|
|
7592
|
+
) });
|
|
7577
7593
|
const tip = tooltip != null ? tooltip : shortcut && !disabledValue ? getFormattedShortcut(shortcut.shortcut) : void 0;
|
|
7578
7594
|
if (onButtonClickHandler) {
|
|
7579
7595
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
@@ -8264,7 +8280,7 @@ var ChipContainer = import_react67.css`
|
|
|
8264
8280
|
cursor: pointer;
|
|
8265
8281
|
}
|
|
8266
8282
|
|
|
8267
|
-
|
|
8283
|
+
:where(button):hover {
|
|
8268
8284
|
[role='presentation'] {
|
|
8269
8285
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
8270
8286
|
opacity: var(--opacity-100);
|
|
@@ -8284,9 +8300,12 @@ var ChipContainer = import_react67.css`
|
|
|
8284
8300
|
}
|
|
8285
8301
|
`;
|
|
8286
8302
|
var ChipText = import_react67.css`
|
|
8303
|
+
display: flex;
|
|
8304
|
+
align-items: center;
|
|
8305
|
+
justify-content: left;
|
|
8287
8306
|
align-self: center;
|
|
8288
8307
|
line-height: 1.2;
|
|
8289
|
-
|
|
8308
|
+
white-space: nowrap;
|
|
8290
8309
|
`;
|
|
8291
8310
|
var ChipIcon = import_react67.css`
|
|
8292
8311
|
align-self: center;
|
|
@@ -12178,7 +12197,7 @@ var LoadingOverlay = ({
|
|
|
12178
12197
|
var LoadingAnimation = ({
|
|
12179
12198
|
label,
|
|
12180
12199
|
width,
|
|
12181
|
-
css:
|
|
12200
|
+
css: css111,
|
|
12182
12201
|
isPaused
|
|
12183
12202
|
}) => {
|
|
12184
12203
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
@@ -12189,7 +12208,7 @@ var LoadingAnimation = ({
|
|
|
12189
12208
|
width: typeof width === "number" ? `${width}px` : width,
|
|
12190
12209
|
height: typeof width === "number" ? `${width}px` : width
|
|
12191
12210
|
},
|
|
12192
|
-
css: [loaderAnimationContainer,
|
|
12211
|
+
css: [loaderAnimationContainer, css111],
|
|
12193
12212
|
className: `loader-container${isPaused ? " paused" : ""}`,
|
|
12194
12213
|
children: [
|
|
12195
12214
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "bottom-cubes", children: [
|
|
@@ -13382,25 +13401,136 @@ var LabelLeadingIcon = ({
|
|
|
13382
13401
|
) });
|
|
13383
13402
|
};
|
|
13384
13403
|
|
|
13404
|
+
// src/components/ParameterInputs/ParameterActionButton.tsx
|
|
13405
|
+
init_emotion_jsx_shim();
|
|
13406
|
+
var import_react132 = __toESM(require("react"));
|
|
13407
|
+
|
|
13408
|
+
// src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
|
|
13409
|
+
init_emotion_jsx_shim();
|
|
13410
|
+
var import_react131 = require("@emotion/react");
|
|
13411
|
+
var baseStyles = import_react131.css`
|
|
13412
|
+
--hover-color: var(--accent-dark-hover);
|
|
13413
|
+
--active-color: var(--accent-dark-active);
|
|
13414
|
+
border: 1px solid transparent;
|
|
13415
|
+
border-radius: var(--rounded-base);
|
|
13416
|
+
display: flex;
|
|
13417
|
+
align-items: center;
|
|
13418
|
+
justify-content: center;
|
|
13419
|
+
max-width: fit-content;
|
|
13420
|
+
padding: 0.125rem;
|
|
13421
|
+
transition:
|
|
13422
|
+
border-color var(--duration-fast) var(--timing-ease-out),
|
|
13423
|
+
background var(--duration-fast) var(--timing-ease-out),
|
|
13424
|
+
color var(--duration-fast) var(--timing-ease-out),
|
|
13425
|
+
box-shadow var(--duration-fast) var(--timing-ease-out);
|
|
13426
|
+
min-height: 1.125rem;
|
|
13427
|
+
min-width: 1.125rem;
|
|
13428
|
+
font-size: 0.75rem;
|
|
13429
|
+
|
|
13430
|
+
&:disabled,
|
|
13431
|
+
&[aria-disabled='true'] {
|
|
13432
|
+
opacity: 0.5;
|
|
13433
|
+
cursor: default;
|
|
13434
|
+
}
|
|
13435
|
+
`;
|
|
13436
|
+
var solidHoverStyles = import_react131.css`
|
|
13437
|
+
--text-color: var(--typography-inverted);
|
|
13438
|
+
&:hover,
|
|
13439
|
+
&:focus,
|
|
13440
|
+
&:focus-within {
|
|
13441
|
+
border-color: var(--hover-color);
|
|
13442
|
+
background: var(--hover-color);
|
|
13443
|
+
color: var(--text-color);
|
|
13444
|
+
}
|
|
13445
|
+
|
|
13446
|
+
&:active,
|
|
13447
|
+
&[aria-pressed='true'] {
|
|
13448
|
+
border-color: var(--active-color);
|
|
13449
|
+
background: var(--active-color);
|
|
13450
|
+
color: var(--text-color);
|
|
13451
|
+
}
|
|
13452
|
+
`;
|
|
13453
|
+
var outlineHoverStyles = import_react131.css`
|
|
13454
|
+
--text-color: var(--typography-light);
|
|
13455
|
+
&:hover:not([aria-disabled='true']),
|
|
13456
|
+
&:focus:not([aria-disabled='true']),
|
|
13457
|
+
&:focus-within:not([aria-disabled='true']) {
|
|
13458
|
+
background: var(--gray-50);
|
|
13459
|
+
border-color: var(--hover-color);
|
|
13460
|
+
}
|
|
13461
|
+
&:active:not([aria-disabled='true']),
|
|
13462
|
+
&[aria-pressed='true']:not([aria-disabled='true']) {
|
|
13463
|
+
border-color: var(--active-color);
|
|
13464
|
+
}
|
|
13465
|
+
`;
|
|
13466
|
+
var invertedStyles = import_react131.css`
|
|
13467
|
+
--text-color: var(--typography-inverted);
|
|
13468
|
+
box-shadow: inset 0 0 0 1px transparent;
|
|
13469
|
+
&:hover,
|
|
13470
|
+
&:focus,
|
|
13471
|
+
&:focus-within {
|
|
13472
|
+
box-shadow: inset 0 0 0 1px var(--text-color);
|
|
13473
|
+
color: var(--text-color);
|
|
13474
|
+
}
|
|
13475
|
+
&:active,
|
|
13476
|
+
&[aria-pressed='true'] {
|
|
13477
|
+
background: var(--active-color);
|
|
13478
|
+
border-color: var(--active-color);
|
|
13479
|
+
}
|
|
13480
|
+
`;
|
|
13481
|
+
|
|
13482
|
+
// src/components/ParameterInputs/ParameterActionButton.tsx
|
|
13483
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
13484
|
+
var ParameterActionButton = ({
|
|
13485
|
+
children,
|
|
13486
|
+
themeType,
|
|
13487
|
+
tooltip,
|
|
13488
|
+
renderAs = "button",
|
|
13489
|
+
disabled: disabled2,
|
|
13490
|
+
...props
|
|
13491
|
+
}) => {
|
|
13492
|
+
const shouldApplyInverted = themeType === "filled" && "inverted" in props && props.inverted;
|
|
13493
|
+
const ComponentWrapper = renderAs === "div" ? "div" : "button";
|
|
13494
|
+
const buttonElement = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
13495
|
+
ComponentWrapper,
|
|
13496
|
+
{
|
|
13497
|
+
css: [
|
|
13498
|
+
baseStyles,
|
|
13499
|
+
themeType === "filled" ? solidHoverStyles : outlineHoverStyles,
|
|
13500
|
+
shouldApplyInverted ? invertedStyles : null
|
|
13501
|
+
],
|
|
13502
|
+
...renderAs === "button" && { type: "button" },
|
|
13503
|
+
...shouldApplyInverted && { "data-inverted": true },
|
|
13504
|
+
...disabled2 && { "aria-disabled": true },
|
|
13505
|
+
...props,
|
|
13506
|
+
children
|
|
13507
|
+
}
|
|
13508
|
+
);
|
|
13509
|
+
if (tooltip && (typeof tooltip === "string" || import_react132.default.isValidElement(tooltip))) {
|
|
13510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Tooltip, { title: tooltip, children: buttonElement });
|
|
13511
|
+
}
|
|
13512
|
+
return buttonElement;
|
|
13513
|
+
};
|
|
13514
|
+
|
|
13385
13515
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
13386
13516
|
init_emotion_jsx_shim();
|
|
13387
13517
|
|
|
13388
13518
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
13389
13519
|
init_emotion_jsx_shim();
|
|
13390
|
-
var
|
|
13391
|
-
var ParameterDrawerHeaderContainer =
|
|
13520
|
+
var import_react133 = require("@emotion/react");
|
|
13521
|
+
var ParameterDrawerHeaderContainer = import_react133.css`
|
|
13392
13522
|
align-items: center;
|
|
13393
13523
|
display: flex;
|
|
13394
13524
|
gap: var(--spacing-base);
|
|
13395
13525
|
justify-content: space-between;
|
|
13396
13526
|
margin-bottom: var(--spacing-sm);
|
|
13397
13527
|
`;
|
|
13398
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
13528
|
+
var ParameterDrawerHeaderTitleGroup = import_react133.css`
|
|
13399
13529
|
align-items: center;
|
|
13400
13530
|
display: flex;
|
|
13401
13531
|
gap: var(--spacing-sm);
|
|
13402
13532
|
`;
|
|
13403
|
-
var ParameterDrawerHeaderTitle =
|
|
13533
|
+
var ParameterDrawerHeaderTitle = import_react133.css`
|
|
13404
13534
|
text-overflow: ellipsis;
|
|
13405
13535
|
white-space: nowrap;
|
|
13406
13536
|
overflow: hidden;
|
|
@@ -13408,12 +13538,12 @@ var ParameterDrawerHeaderTitle = import_react131.css`
|
|
|
13408
13538
|
`;
|
|
13409
13539
|
|
|
13410
13540
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
13411
|
-
var
|
|
13541
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
13412
13542
|
var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
13413
|
-
return /* @__PURE__ */ (0,
|
|
13414
|
-
/* @__PURE__ */ (0,
|
|
13543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
13544
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
13415
13545
|
iconBeforeTitle,
|
|
13416
|
-
/* @__PURE__ */ (0,
|
|
13546
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title, children: title })
|
|
13417
13547
|
] }),
|
|
13418
13548
|
children
|
|
13419
13549
|
] });
|
|
@@ -13421,15 +13551,19 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
13421
13551
|
|
|
13422
13552
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
13423
13553
|
init_emotion_jsx_shim();
|
|
13424
|
-
var
|
|
13554
|
+
var import_react135 = require("react");
|
|
13425
13555
|
|
|
13426
13556
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
13427
13557
|
init_emotion_jsx_shim();
|
|
13428
|
-
var
|
|
13429
|
-
var fieldsetStyles =
|
|
13558
|
+
var import_react134 = require("@emotion/react");
|
|
13559
|
+
var fieldsetStyles = import_react134.css`
|
|
13430
13560
|
&:disabled,
|
|
13431
13561
|
[readonly] {
|
|
13432
|
-
|
|
13562
|
+
input,
|
|
13563
|
+
select,
|
|
13564
|
+
textarea {
|
|
13565
|
+
pointer-events: none;
|
|
13566
|
+
}
|
|
13433
13567
|
|
|
13434
13568
|
label,
|
|
13435
13569
|
legend {
|
|
@@ -13437,19 +13571,19 @@ var fieldsetStyles = import_react132.css`
|
|
|
13437
13571
|
}
|
|
13438
13572
|
}
|
|
13439
13573
|
`;
|
|
13440
|
-
var fieldsetLegend2 =
|
|
13574
|
+
var fieldsetLegend2 = import_react134.css`
|
|
13441
13575
|
display: block;
|
|
13442
13576
|
font-weight: var(--fw-medium);
|
|
13443
|
-
margin-bottom: var(--spacing-
|
|
13577
|
+
margin-bottom: var(--spacing-base);
|
|
13444
13578
|
width: 100%;
|
|
13445
13579
|
`;
|
|
13446
13580
|
|
|
13447
13581
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
13448
|
-
var
|
|
13449
|
-
var ParameterGroup = (0,
|
|
13582
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
13583
|
+
var ParameterGroup = (0, import_react135.forwardRef)(
|
|
13450
13584
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
13451
|
-
return /* @__PURE__ */ (0,
|
|
13452
|
-
/* @__PURE__ */ (0,
|
|
13585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
13586
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
13453
13587
|
children
|
|
13454
13588
|
] });
|
|
13455
13589
|
}
|
|
@@ -13457,24 +13591,24 @@ var ParameterGroup = (0, import_react133.forwardRef)(
|
|
|
13457
13591
|
|
|
13458
13592
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
13459
13593
|
init_emotion_jsx_shim();
|
|
13460
|
-
var
|
|
13594
|
+
var import_react143 = require("react");
|
|
13461
13595
|
|
|
13462
13596
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13463
13597
|
init_emotion_jsx_shim();
|
|
13464
|
-
var
|
|
13598
|
+
var import_react137 = require("react");
|
|
13465
13599
|
var import_react_dom2 = require("react-dom");
|
|
13466
13600
|
|
|
13467
13601
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
13468
13602
|
init_emotion_jsx_shim();
|
|
13469
|
-
var
|
|
13470
|
-
var previewWrapper =
|
|
13603
|
+
var import_react136 = require("@emotion/react");
|
|
13604
|
+
var previewWrapper = import_react136.css`
|
|
13471
13605
|
margin-top: var(--spacing-xs);
|
|
13472
13606
|
background: var(--gray-50);
|
|
13473
13607
|
padding: var(--spacing-sm);
|
|
13474
13608
|
border: solid 1px var(--gray-300);
|
|
13475
13609
|
border-radius: var(--rounded-sm);
|
|
13476
13610
|
`;
|
|
13477
|
-
var previewLink =
|
|
13611
|
+
var previewLink = import_react136.css`
|
|
13478
13612
|
display: block;
|
|
13479
13613
|
width: 100%;
|
|
13480
13614
|
|
|
@@ -13482,7 +13616,7 @@ var previewLink = import_react134.css`
|
|
|
13482
13616
|
max-height: 9rem;
|
|
13483
13617
|
}
|
|
13484
13618
|
`;
|
|
13485
|
-
var previewModalWrapper =
|
|
13619
|
+
var previewModalWrapper = import_react136.css`
|
|
13486
13620
|
background: var(--gray-50);
|
|
13487
13621
|
display: flex;
|
|
13488
13622
|
height: 100%;
|
|
@@ -13491,7 +13625,7 @@ var previewModalWrapper = import_react134.css`
|
|
|
13491
13625
|
border: solid 1px var(--gray-300);
|
|
13492
13626
|
border-radius: var(--rounded-sm);
|
|
13493
13627
|
`;
|
|
13494
|
-
var previewModalImage =
|
|
13628
|
+
var previewModalImage = import_react136.css`
|
|
13495
13629
|
display: flex;
|
|
13496
13630
|
height: 100%;
|
|
13497
13631
|
width: 100%;
|
|
@@ -13503,32 +13637,32 @@ var previewModalImage = import_react134.css`
|
|
|
13503
13637
|
`;
|
|
13504
13638
|
|
|
13505
13639
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13506
|
-
var
|
|
13640
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
13507
13641
|
function ParameterImagePreview({ imageSrc }) {
|
|
13508
|
-
const [showModal, setShowModal] = (0,
|
|
13509
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
13510
|
-
/* @__PURE__ */ (0,
|
|
13511
|
-
/* @__PURE__ */ (0,
|
|
13642
|
+
const [showModal, setShowModal] = (0, import_react137.useState)(false);
|
|
13643
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { css: previewWrapper, children: [
|
|
13644
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
13645
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
13512
13646
|
"button",
|
|
13513
13647
|
{
|
|
13514
13648
|
css: previewLink,
|
|
13515
13649
|
onClick: () => {
|
|
13516
13650
|
setShowModal(true);
|
|
13517
13651
|
},
|
|
13518
|
-
children: /* @__PURE__ */ (0,
|
|
13652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
13519
13653
|
}
|
|
13520
13654
|
)
|
|
13521
13655
|
] }) : null;
|
|
13522
13656
|
}
|
|
13523
13657
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
13524
|
-
return open ? /* @__PURE__ */ (0,
|
|
13525
|
-
/* @__PURE__ */ (0,
|
|
13658
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_jsx_runtime118.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
13659
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
13526
13660
|
Modal,
|
|
13527
13661
|
{
|
|
13528
13662
|
header: "Image Preview",
|
|
13529
13663
|
onRequestClose,
|
|
13530
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
13531
|
-
children: /* @__PURE__ */ (0,
|
|
13664
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
13665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
13532
13666
|
}
|
|
13533
13667
|
),
|
|
13534
13668
|
document.body
|
|
@@ -13537,16 +13671,32 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
13537
13671
|
|
|
13538
13672
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
13539
13673
|
init_emotion_jsx_shim();
|
|
13540
|
-
var
|
|
13541
|
-
var
|
|
13674
|
+
var import_react141 = require("@emotion/react");
|
|
13675
|
+
var import_react142 = require("react");
|
|
13542
13676
|
|
|
13543
13677
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
13544
13678
|
init_emotion_jsx_shim();
|
|
13545
13679
|
|
|
13546
13680
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
13547
13681
|
init_emotion_jsx_shim();
|
|
13548
|
-
var
|
|
13549
|
-
var
|
|
13682
|
+
var import_react138 = require("@emotion/react");
|
|
13683
|
+
var actionBarVisibilityStyles = import_react138.css`
|
|
13684
|
+
[data-action-bar] {
|
|
13685
|
+
opacity: 1;
|
|
13686
|
+
transform: translateX(0);
|
|
13687
|
+
transition:
|
|
13688
|
+
opacity var(--duration-fast) var(--timing-ease-out),
|
|
13689
|
+
transform var(--duration-fast) var(--timing-ease-out);
|
|
13690
|
+
}
|
|
13691
|
+
`;
|
|
13692
|
+
var actionBarVisibilityHiddenStyles = import_react138.css`
|
|
13693
|
+
opacity: 0;
|
|
13694
|
+
transform: translateX(1rem);
|
|
13695
|
+
transition:
|
|
13696
|
+
opacity var(--duration-fast) var(--timing-ease-out),
|
|
13697
|
+
transform var(--duration-fast) var(--timing-ease-out);
|
|
13698
|
+
`;
|
|
13699
|
+
var inputContainer2 = import_react138.css`
|
|
13550
13700
|
position: relative;
|
|
13551
13701
|
scroll-margin: var(--spacing-2xl);
|
|
13552
13702
|
|
|
@@ -13557,16 +13707,17 @@ var inputContainer2 = import_react136.css`
|
|
|
13557
13707
|
opacity: var(--opacity-100);
|
|
13558
13708
|
translate: 0 0;
|
|
13559
13709
|
}
|
|
13710
|
+
${actionBarVisibilityStyles}
|
|
13560
13711
|
}
|
|
13561
13712
|
`;
|
|
13562
|
-
var labelText2 =
|
|
13713
|
+
var labelText2 = import_react138.css`
|
|
13563
13714
|
align-items: center;
|
|
13564
13715
|
display: flex;
|
|
13565
13716
|
gap: var(--spacing-xs);
|
|
13566
13717
|
font-weight: var(--fw-regular);
|
|
13567
13718
|
margin: 0 0 var(--spacing-xs);
|
|
13568
13719
|
`;
|
|
13569
|
-
var input3 =
|
|
13720
|
+
var input3 = import_react138.css`
|
|
13570
13721
|
display: block;
|
|
13571
13722
|
appearance: none;
|
|
13572
13723
|
box-sizing: border-box;
|
|
@@ -13614,18 +13765,18 @@ var input3 = import_react136.css`
|
|
|
13614
13765
|
color: var(--gray-400);
|
|
13615
13766
|
}
|
|
13616
13767
|
`;
|
|
13617
|
-
var selectInput =
|
|
13768
|
+
var selectInput = import_react138.css`
|
|
13618
13769
|
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");
|
|
13619
13770
|
background-position: right var(--spacing-sm) center;
|
|
13620
13771
|
background-repeat: no-repeat;
|
|
13621
13772
|
background-size: 1rem;
|
|
13622
13773
|
padding-right: var(--spacing-xl);
|
|
13623
13774
|
`;
|
|
13624
|
-
var inputWrapper =
|
|
13775
|
+
var inputWrapper = import_react138.css`
|
|
13625
13776
|
display: flex; // used to correct overflow with chrome textarea
|
|
13626
13777
|
position: relative;
|
|
13627
13778
|
`;
|
|
13628
|
-
var inputIcon2 =
|
|
13779
|
+
var inputIcon2 = import_react138.css`
|
|
13629
13780
|
align-items: center;
|
|
13630
13781
|
background: var(--white);
|
|
13631
13782
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -13641,7 +13792,7 @@ var inputIcon2 = import_react136.css`
|
|
|
13641
13792
|
width: var(--spacing-lg);
|
|
13642
13793
|
z-index: var(--z-10);
|
|
13643
13794
|
`;
|
|
13644
|
-
var inputToggleLabel2 =
|
|
13795
|
+
var inputToggleLabel2 = import_react138.css`
|
|
13645
13796
|
--inline-label-color: var(--typography-base);
|
|
13646
13797
|
align-items: center;
|
|
13647
13798
|
cursor: pointer;
|
|
@@ -13656,7 +13807,7 @@ var inputToggleLabel2 = import_react136.css`
|
|
|
13656
13807
|
--inline-label-color: var(--gray-400);
|
|
13657
13808
|
}
|
|
13658
13809
|
`;
|
|
13659
|
-
var toggleInput2 =
|
|
13810
|
+
var toggleInput2 = import_react138.css`
|
|
13660
13811
|
appearance: none;
|
|
13661
13812
|
border: 1px solid var(--gray-200);
|
|
13662
13813
|
background: var(--white);
|
|
@@ -13710,7 +13861,7 @@ var toggleInput2 = import_react136.css`
|
|
|
13710
13861
|
border-color: var(--gray-300);
|
|
13711
13862
|
}
|
|
13712
13863
|
`;
|
|
13713
|
-
var inlineLabel2 =
|
|
13864
|
+
var inlineLabel2 = import_react138.css`
|
|
13714
13865
|
color: var(--inline-label-color);
|
|
13715
13866
|
padding-left: var(--spacing-md);
|
|
13716
13867
|
font-size: var(--fs-sm);
|
|
@@ -13727,20 +13878,29 @@ var inlineLabel2 = import_react136.css`
|
|
|
13727
13878
|
}
|
|
13728
13879
|
}
|
|
13729
13880
|
`;
|
|
13730
|
-
var inputMenu =
|
|
13881
|
+
var inputMenu = import_react138.css`
|
|
13731
13882
|
background: none;
|
|
13732
13883
|
border: none;
|
|
13733
13884
|
padding: var(--spacing-2xs);
|
|
13734
13885
|
position: absolute;
|
|
13735
13886
|
top: calc(var(--spacing-md) * -1.2);
|
|
13736
13887
|
right: 0;
|
|
13888
|
+
|
|
13889
|
+
&:disabled,
|
|
13890
|
+
&[aria-disabled='true'] {
|
|
13891
|
+
color: var(--gray-400);
|
|
13892
|
+
cursor: default;
|
|
13893
|
+
}
|
|
13737
13894
|
`;
|
|
13738
|
-
var inputActionItems =
|
|
13895
|
+
var inputActionItems = import_react138.css`
|
|
13739
13896
|
display: flex;
|
|
13897
|
+
${actionBarVisibilityHiddenStyles}
|
|
13740
13898
|
`;
|
|
13741
|
-
var inputMenuHover =
|
|
13899
|
+
var inputMenuHover = import_react138.css`
|
|
13742
13900
|
opacity: var(--opacity-50);
|
|
13743
13901
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
13902
|
+
margin-top: 0.25rem;
|
|
13903
|
+
${actionBarVisibilityHiddenStyles}
|
|
13744
13904
|
|
|
13745
13905
|
// css trick to style the input like a hover or active state when the menu button is active or hovered
|
|
13746
13906
|
&:hover,
|
|
@@ -13748,11 +13908,11 @@ var inputMenuHover = import_react136.css`
|
|
|
13748
13908
|
background-color: var(--gray-200);
|
|
13749
13909
|
}
|
|
13750
13910
|
`;
|
|
13751
|
-
var textarea2 =
|
|
13911
|
+
var textarea2 = import_react138.css`
|
|
13752
13912
|
resize: vertical;
|
|
13753
13913
|
min-height: 2rem;
|
|
13754
13914
|
`;
|
|
13755
|
-
var dataConnectButton =
|
|
13915
|
+
var dataConnectButton = import_react138.css`
|
|
13756
13916
|
align-items: center;
|
|
13757
13917
|
appearance: none;
|
|
13758
13918
|
box-sizing: border-box;
|
|
@@ -13788,7 +13948,7 @@ var dataConnectButton = import_react136.css`
|
|
|
13788
13948
|
pointer-events: none;
|
|
13789
13949
|
}
|
|
13790
13950
|
`;
|
|
13791
|
-
var linkParameterBtn =
|
|
13951
|
+
var linkParameterBtn = import_react138.css`
|
|
13792
13952
|
border-radius: var(--rounded-base);
|
|
13793
13953
|
background: transparent;
|
|
13794
13954
|
border: none;
|
|
@@ -13797,7 +13957,7 @@ var linkParameterBtn = import_react136.css`
|
|
|
13797
13957
|
font-size: var(--fs-sm);
|
|
13798
13958
|
line-height: 1;
|
|
13799
13959
|
`;
|
|
13800
|
-
var linkParameterControls =
|
|
13960
|
+
var linkParameterControls = import_react138.css`
|
|
13801
13961
|
position: absolute;
|
|
13802
13962
|
inset: 0 0 0 auto;
|
|
13803
13963
|
padding: 0 var(--spacing-base);
|
|
@@ -13806,7 +13966,7 @@ var linkParameterControls = import_react136.css`
|
|
|
13806
13966
|
justify-content: center;
|
|
13807
13967
|
gap: var(--spacing-base);
|
|
13808
13968
|
`;
|
|
13809
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
13969
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react138.css`
|
|
13810
13970
|
padding-right: calc(
|
|
13811
13971
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
13812
13972
|
var(--spacing-base)
|
|
@@ -13819,7 +13979,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react136.css`
|
|
|
13819
13979
|
}
|
|
13820
13980
|
}
|
|
13821
13981
|
`;
|
|
13822
|
-
var linkParameterIcon =
|
|
13982
|
+
var linkParameterIcon = import_react138.css`
|
|
13823
13983
|
align-items: center;
|
|
13824
13984
|
color: var(--brand-secondary-3);
|
|
13825
13985
|
display: flex;
|
|
@@ -13834,29 +13994,31 @@ var linkParameterIcon = import_react136.css`
|
|
|
13834
13994
|
`;
|
|
13835
13995
|
|
|
13836
13996
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
13837
|
-
var
|
|
13997
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
13838
13998
|
var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
13839
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
13999
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("label", { ...props, htmlFor: id, css: labelText2, "data-testid": testId, children }) : /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
13840
14000
|
};
|
|
13841
14001
|
|
|
13842
14002
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
13843
14003
|
init_emotion_jsx_shim();
|
|
13844
|
-
var
|
|
13845
|
-
var
|
|
13846
|
-
var ParameterMenuButton = (0,
|
|
13847
|
-
({ label, children }, ref) => {
|
|
13848
|
-
return /* @__PURE__ */ (0,
|
|
14004
|
+
var import_react139 = require("react");
|
|
14005
|
+
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
14006
|
+
var ParameterMenuButton = (0, import_react139.forwardRef)(
|
|
14007
|
+
({ label, children, disabled: disabled2 }, ref) => {
|
|
14008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
13849
14009
|
Menu,
|
|
13850
14010
|
{
|
|
13851
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
14011
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
13852
14012
|
"button",
|
|
13853
14013
|
{
|
|
14014
|
+
"data-action-bar": true,
|
|
13854
14015
|
className: "parameter-menu",
|
|
13855
14016
|
css: [inputMenu, inputMenuHover],
|
|
13856
14017
|
type: "button",
|
|
13857
14018
|
"aria-label": `${label} options`,
|
|
13858
14019
|
ref,
|
|
13859
|
-
|
|
14020
|
+
disabled: disabled2,
|
|
14021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
13860
14022
|
}
|
|
13861
14023
|
),
|
|
13862
14024
|
children
|
|
@@ -13867,14 +14029,14 @@ var ParameterMenuButton = (0, import_react137.forwardRef)(
|
|
|
13867
14029
|
|
|
13868
14030
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
13869
14031
|
init_emotion_jsx_shim();
|
|
13870
|
-
var
|
|
13871
|
-
var emptyParameterShell =
|
|
14032
|
+
var import_react140 = require("@emotion/react");
|
|
14033
|
+
var emptyParameterShell = import_react140.css`
|
|
13872
14034
|
border-radius: var(--rounded-sm);
|
|
13873
14035
|
flex-grow: 1;
|
|
13874
14036
|
position: relative;
|
|
13875
14037
|
max-width: 100%;
|
|
13876
14038
|
`;
|
|
13877
|
-
var emptyParameterShellText =
|
|
14039
|
+
var emptyParameterShellText = import_react140.css`
|
|
13878
14040
|
background: var(--brand-secondary-6);
|
|
13879
14041
|
border-radius: var(--rounded-sm);
|
|
13880
14042
|
padding: var(--spacing-sm);
|
|
@@ -13882,7 +14044,7 @@ var emptyParameterShellText = import_react138.css`
|
|
|
13882
14044
|
font-size: var(--fs-sm);
|
|
13883
14045
|
margin: 0;
|
|
13884
14046
|
`;
|
|
13885
|
-
var overrideMarker =
|
|
14047
|
+
var overrideMarker = import_react140.css`
|
|
13886
14048
|
border-radius: var(--rounded-sm);
|
|
13887
14049
|
border: 10px solid var(--gray-300);
|
|
13888
14050
|
border-left-color: transparent;
|
|
@@ -13893,7 +14055,7 @@ var overrideMarker = import_react138.css`
|
|
|
13893
14055
|
`;
|
|
13894
14056
|
|
|
13895
14057
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
13896
|
-
var
|
|
14058
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
13897
14059
|
var extractParameterProps = (props) => {
|
|
13898
14060
|
const {
|
|
13899
14061
|
id,
|
|
@@ -13953,36 +14115,37 @@ var ParameterShell = ({
|
|
|
13953
14115
|
isParameterGroup = false,
|
|
13954
14116
|
...props
|
|
13955
14117
|
}) => {
|
|
13956
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
14118
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react142.useState)(void 0);
|
|
13957
14119
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
13958
14120
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
13959
|
-
return /* @__PURE__ */ (0,
|
|
13960
|
-
hiddenLabel || title ? null : /* @__PURE__ */ (0,
|
|
14121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
14122
|
+
hiddenLabel || title ? null : /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
13961
14123
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
13962
14124
|
label,
|
|
13963
14125
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
13964
14126
|
] }),
|
|
13965
|
-
!title ? null : /* @__PURE__ */ (0,
|
|
14127
|
+
!title ? null : /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(ParameterLabel, { id, asSpan: true, testId: "parameter-label", children: [
|
|
13966
14128
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
13967
14129
|
title,
|
|
13968
14130
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
13969
14131
|
] }),
|
|
13970
|
-
/* @__PURE__ */ (0,
|
|
13971
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
14132
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { css: inputWrapper, children: [
|
|
14133
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
13972
14134
|
"div",
|
|
13973
14135
|
{
|
|
14136
|
+
"data-action-bar": true,
|
|
13974
14137
|
css: [
|
|
13975
14138
|
inputMenu,
|
|
13976
14139
|
inputActionItems,
|
|
13977
|
-
menuItems ?
|
|
14140
|
+
menuItems ? import_react141.css`
|
|
13978
14141
|
right: var(--spacing-md);
|
|
13979
14142
|
` : void 0
|
|
13980
14143
|
],
|
|
13981
14144
|
children: actionItems
|
|
13982
14145
|
}
|
|
13983
14146
|
) : null,
|
|
13984
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
13985
|
-
/* @__PURE__ */ (0,
|
|
14147
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ParameterMenuButton, { label: `${label} menu`, disabled: props.disabled, children: menuItems }) : null,
|
|
14148
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
13986
14149
|
ParameterShellContext.Provider,
|
|
13987
14150
|
{
|
|
13988
14151
|
value: {
|
|
@@ -13992,14 +14155,14 @@ var ParameterShell = ({
|
|
|
13992
14155
|
errorMessage: errorMessaging,
|
|
13993
14156
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
13994
14157
|
},
|
|
13995
|
-
children: isParameterGroup ? /* @__PURE__ */ (0,
|
|
14158
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(ParameterShellPlaceholder, { children: [
|
|
13996
14159
|
children,
|
|
13997
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
14160
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
13998
14161
|
] })
|
|
13999
14162
|
}
|
|
14000
14163
|
)
|
|
14001
14164
|
] }),
|
|
14002
|
-
/* @__PURE__ */ (0,
|
|
14165
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
14003
14166
|
FieldMessage,
|
|
14004
14167
|
{
|
|
14005
14168
|
helperMessageTestId: captionTestId,
|
|
@@ -14013,27 +14176,27 @@ var ParameterShell = ({
|
|
|
14013
14176
|
] });
|
|
14014
14177
|
};
|
|
14015
14178
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
14016
|
-
return /* @__PURE__ */ (0,
|
|
14179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { css: emptyParameterShell, children });
|
|
14017
14180
|
};
|
|
14018
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
14181
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
14019
14182
|
|
|
14020
14183
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
14021
|
-
var
|
|
14022
|
-
var ParameterImage = (0,
|
|
14184
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
14185
|
+
var ParameterImage = (0, import_react143.forwardRef)(
|
|
14023
14186
|
({ children, ...props }, ref) => {
|
|
14024
14187
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14025
|
-
return /* @__PURE__ */ (0,
|
|
14026
|
-
/* @__PURE__ */ (0,
|
|
14188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
14189
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
14027
14190
|
children
|
|
14028
14191
|
] });
|
|
14029
14192
|
}
|
|
14030
14193
|
);
|
|
14031
|
-
var ParameterImageInner = (0,
|
|
14194
|
+
var ParameterImageInner = (0, import_react143.forwardRef)((props, ref) => {
|
|
14032
14195
|
const { value } = props;
|
|
14033
14196
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
14034
|
-
const deferredValue = (0,
|
|
14035
|
-
return /* @__PURE__ */ (0,
|
|
14036
|
-
/* @__PURE__ */ (0,
|
|
14197
|
+
const deferredValue = (0, import_react143.useDeferredValue)(value);
|
|
14198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
|
|
14199
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
14037
14200
|
"input",
|
|
14038
14201
|
{
|
|
14039
14202
|
css: input3,
|
|
@@ -14045,22 +14208,22 @@ var ParameterImageInner = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
14045
14208
|
...props
|
|
14046
14209
|
}
|
|
14047
14210
|
),
|
|
14048
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
14211
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
14049
14212
|
] });
|
|
14050
14213
|
});
|
|
14051
14214
|
|
|
14052
14215
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
14053
14216
|
init_emotion_jsx_shim();
|
|
14054
|
-
var
|
|
14055
|
-
var
|
|
14056
|
-
var ParameterInput = (0,
|
|
14217
|
+
var import_react144 = require("react");
|
|
14218
|
+
var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
|
|
14219
|
+
var ParameterInput = (0, import_react144.forwardRef)((props, ref) => {
|
|
14057
14220
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14058
|
-
return /* @__PURE__ */ (0,
|
|
14221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
14059
14222
|
});
|
|
14060
|
-
var ParameterInputInner = (0,
|
|
14223
|
+
var ParameterInputInner = (0, import_react144.forwardRef)(({ enableMouseWheel = false, ...props }, ref) => {
|
|
14061
14224
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
14062
14225
|
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
14063
|
-
return /* @__PURE__ */ (0,
|
|
14226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14064
14227
|
"input",
|
|
14065
14228
|
{
|
|
14066
14229
|
css: input3,
|
|
@@ -14077,19 +14240,19 @@ var ParameterInputInner = (0, import_react142.forwardRef)(({ enableMouseWheel =
|
|
|
14077
14240
|
|
|
14078
14241
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
14079
14242
|
init_emotion_jsx_shim();
|
|
14080
|
-
var
|
|
14081
|
-
var
|
|
14082
|
-
var ParameterLink = (0,
|
|
14243
|
+
var import_react145 = require("react");
|
|
14244
|
+
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
14245
|
+
var ParameterLink = (0, import_react145.forwardRef)(
|
|
14083
14246
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
14084
14247
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14085
|
-
return /* @__PURE__ */ (0,
|
|
14248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14086
14249
|
ParameterShell,
|
|
14087
14250
|
{
|
|
14088
14251
|
"data-testid": "link-parameter-editor",
|
|
14089
14252
|
...shellProps,
|
|
14090
14253
|
label: innerProps.value ? shellProps.label : "",
|
|
14091
14254
|
title: !innerProps.value && typeof shellProps.label === "string" ? shellProps.label : void 0,
|
|
14092
|
-
children: /* @__PURE__ */ (0,
|
|
14255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14093
14256
|
ParameterLinkInner,
|
|
14094
14257
|
{
|
|
14095
14258
|
onConnectLink,
|
|
@@ -14102,13 +14265,13 @@ var ParameterLink = (0, import_react143.forwardRef)(
|
|
|
14102
14265
|
);
|
|
14103
14266
|
}
|
|
14104
14267
|
);
|
|
14105
|
-
var ParameterLinkInner = (0,
|
|
14268
|
+
var ParameterLinkInner = (0, import_react145.forwardRef)(
|
|
14106
14269
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
14107
14270
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
14108
14271
|
if (!props.value)
|
|
14109
|
-
return /* @__PURE__ */ (0,
|
|
14110
|
-
return /* @__PURE__ */ (0,
|
|
14111
|
-
/* @__PURE__ */ (0,
|
|
14272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
14273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: inputWrapper, children: [
|
|
14274
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14112
14275
|
"input",
|
|
14113
14276
|
{
|
|
14114
14277
|
type: "text",
|
|
@@ -14120,8 +14283,8 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14120
14283
|
...props
|
|
14121
14284
|
}
|
|
14122
14285
|
),
|
|
14123
|
-
/* @__PURE__ */ (0,
|
|
14124
|
-
/* @__PURE__ */ (0,
|
|
14286
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: linkParameterControls, children: [
|
|
14287
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14125
14288
|
"button",
|
|
14126
14289
|
{
|
|
14127
14290
|
type: "button",
|
|
@@ -14133,7 +14296,7 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14133
14296
|
children: "edit"
|
|
14134
14297
|
}
|
|
14135
14298
|
),
|
|
14136
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
14299
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14137
14300
|
"a",
|
|
14138
14301
|
{
|
|
14139
14302
|
href: externalLink,
|
|
@@ -14141,7 +14304,7 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14141
14304
|
title: "Open link in new tab",
|
|
14142
14305
|
target: "_blank",
|
|
14143
14306
|
rel: "noopener noreferrer",
|
|
14144
|
-
children: /* @__PURE__ */ (0,
|
|
14307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
14145
14308
|
}
|
|
14146
14309
|
) : null
|
|
14147
14310
|
] })
|
|
@@ -14151,15 +14314,15 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14151
14314
|
|
|
14152
14315
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
14153
14316
|
init_emotion_jsx_shim();
|
|
14154
|
-
var
|
|
14317
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
14155
14318
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
14156
14319
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14157
|
-
return /* @__PURE__ */ (0,
|
|
14320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
14158
14321
|
};
|
|
14159
14322
|
var ParameterMultiSelectInner = (props) => {
|
|
14160
14323
|
var _a;
|
|
14161
14324
|
const { id, label } = useParameterShell();
|
|
14162
|
-
return /* @__PURE__ */ (0,
|
|
14325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
14163
14326
|
InputComboBox,
|
|
14164
14327
|
{
|
|
14165
14328
|
menuPortalTarget: document.body,
|
|
@@ -14210,7 +14373,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
14210
14373
|
|
|
14211
14374
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
14212
14375
|
init_emotion_jsx_shim();
|
|
14213
|
-
var
|
|
14376
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
14214
14377
|
var ParameterNameAndPublicIdInput = ({
|
|
14215
14378
|
id,
|
|
14216
14379
|
onBlur,
|
|
@@ -14236,8 +14399,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14236
14399
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
14237
14400
|
};
|
|
14238
14401
|
autoFocus == null ? void 0 : autoFocus();
|
|
14239
|
-
return /* @__PURE__ */ (0,
|
|
14240
|
-
/* @__PURE__ */ (0,
|
|
14402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
14241
14404
|
ParameterInput,
|
|
14242
14405
|
{
|
|
14243
14406
|
id: nameIdField,
|
|
@@ -14256,7 +14419,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14256
14419
|
value: values[nameIdField]
|
|
14257
14420
|
}
|
|
14258
14421
|
),
|
|
14259
|
-
/* @__PURE__ */ (0,
|
|
14422
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
14260
14423
|
ParameterInput,
|
|
14261
14424
|
{
|
|
14262
14425
|
id: publicIdFieldName,
|
|
@@ -14270,11 +14433,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14270
14433
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
14271
14434
|
placeholder: publicIdPlaceholderText,
|
|
14272
14435
|
errorMessage: publicIdError,
|
|
14273
|
-
menuItems: /* @__PURE__ */ (0,
|
|
14436
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
14274
14437
|
MenuItem,
|
|
14275
14438
|
{
|
|
14276
14439
|
disabled: !values[publicIdFieldName],
|
|
14277
|
-
icon: /* @__PURE__ */ (0,
|
|
14440
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
14278
14441
|
onClick: handleCopyPidFieldValue,
|
|
14279
14442
|
children: "Copy"
|
|
14280
14443
|
}
|
|
@@ -14282,13 +14445,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14282
14445
|
value: values[publicIdFieldName]
|
|
14283
14446
|
}
|
|
14284
14447
|
),
|
|
14285
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
14448
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
14286
14449
|
] });
|
|
14287
14450
|
};
|
|
14288
14451
|
|
|
14289
14452
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
14290
14453
|
init_emotion_jsx_shim();
|
|
14291
|
-
var
|
|
14454
|
+
var import_react159 = require("@emotion/react");
|
|
14292
14455
|
var import_list3 = require("@lexical/list");
|
|
14293
14456
|
var import_markdown = require("@lexical/markdown");
|
|
14294
14457
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -14425,7 +14588,7 @@ var defaultParameterConfiguration = {
|
|
|
14425
14588
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
14426
14589
|
var import_fast_equals2 = require("fast-equals");
|
|
14427
14590
|
var import_lexical10 = require("lexical");
|
|
14428
|
-
var
|
|
14591
|
+
var import_react160 = require("react");
|
|
14429
14592
|
|
|
14430
14593
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
14431
14594
|
init_emotion_jsx_shim();
|
|
@@ -14448,10 +14611,10 @@ init_emotion_jsx_shim();
|
|
|
14448
14611
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
14449
14612
|
var import_utils4 = require("@lexical/utils");
|
|
14450
14613
|
var import_lexical = require("lexical");
|
|
14451
|
-
var
|
|
14614
|
+
var import_react146 = require("react");
|
|
14452
14615
|
function DisableStylesPlugin() {
|
|
14453
14616
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
14454
|
-
(0,
|
|
14617
|
+
(0, import_react146.useEffect)(() => {
|
|
14455
14618
|
return (0, import_utils4.mergeRegister)(
|
|
14456
14619
|
// Disable text alignment on paragraph nodes
|
|
14457
14620
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -14712,10 +14875,10 @@ init_emotion_jsx_shim();
|
|
|
14712
14875
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
14713
14876
|
var import_utils5 = require("@lexical/utils");
|
|
14714
14877
|
var import_lexical2 = require("lexical");
|
|
14715
|
-
var
|
|
14878
|
+
var import_react147 = require("react");
|
|
14716
14879
|
var ImprovedAssetSelectionPlugin = () => {
|
|
14717
14880
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
14718
|
-
(0,
|
|
14881
|
+
(0, import_react147.useEffect)(() => {
|
|
14719
14882
|
editor.getRootElement();
|
|
14720
14883
|
const onRootClick = (event) => {
|
|
14721
14884
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -14764,13 +14927,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
14764
14927
|
|
|
14765
14928
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
14766
14929
|
init_emotion_jsx_shim();
|
|
14767
|
-
var
|
|
14930
|
+
var import_react148 = require("@emotion/react");
|
|
14768
14931
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
14769
14932
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
14770
14933
|
var import_utils6 = require("@lexical/utils");
|
|
14771
14934
|
var import_fast_equals = require("fast-equals");
|
|
14772
14935
|
var import_lexical4 = require("lexical");
|
|
14773
|
-
var
|
|
14936
|
+
var import_react149 = require("react");
|
|
14774
14937
|
|
|
14775
14938
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
14776
14939
|
init_emotion_jsx_shim();
|
|
@@ -14829,7 +14992,7 @@ var normalizeStateForDeepEqualComparison = (editorState) => {
|
|
|
14829
14992
|
};
|
|
14830
14993
|
|
|
14831
14994
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
14832
|
-
var
|
|
14995
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
14833
14996
|
var isProjectMapLinkValue = (value) => {
|
|
14834
14997
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
14835
14998
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -15118,17 +15281,17 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
15118
15281
|
);
|
|
15119
15282
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
15120
15283
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
15121
|
-
var linkPopover =
|
|
15284
|
+
var linkPopover = import_react148.css`
|
|
15122
15285
|
position: absolute;
|
|
15123
15286
|
z-index: 11;
|
|
15124
15287
|
`;
|
|
15125
|
-
var linkPopoverContainer =
|
|
15288
|
+
var linkPopoverContainer = import_react148.css`
|
|
15126
15289
|
${Popover};
|
|
15127
15290
|
${PopoverVariantSmall};
|
|
15128
15291
|
align-items: center;
|
|
15129
15292
|
display: flex;
|
|
15130
15293
|
`;
|
|
15131
|
-
var linkPopoverAnchor =
|
|
15294
|
+
var linkPopoverAnchor = import_react148.css`
|
|
15132
15295
|
${link}
|
|
15133
15296
|
${linkColorDefault}
|
|
15134
15297
|
`;
|
|
@@ -15141,17 +15304,17 @@ function LinkNodePlugin({
|
|
|
15141
15304
|
return path;
|
|
15142
15305
|
};
|
|
15143
15306
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
15144
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
15145
|
-
const linkPopoverElRef = (0,
|
|
15146
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
15147
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
15148
|
-
(0,
|
|
15307
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react149.useState)();
|
|
15308
|
+
const linkPopoverElRef = (0, import_react149.useRef)(null);
|
|
15309
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react149.useState)(false);
|
|
15310
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react149.useState)(false);
|
|
15311
|
+
(0, import_react149.useEffect)(() => {
|
|
15149
15312
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
15150
15313
|
setLinkPopoverState(void 0);
|
|
15151
15314
|
return;
|
|
15152
15315
|
}
|
|
15153
15316
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
15154
|
-
(0,
|
|
15317
|
+
(0, import_react149.useEffect)(() => {
|
|
15155
15318
|
if (!editor.hasNodes([LinkNode])) {
|
|
15156
15319
|
throw new Error("LinkNode not registered on editor");
|
|
15157
15320
|
}
|
|
@@ -15255,7 +15418,7 @@ function LinkNodePlugin({
|
|
|
15255
15418
|
)
|
|
15256
15419
|
);
|
|
15257
15420
|
}, [editor, onConnectLink]);
|
|
15258
|
-
const maybeShowLinkToolbar = (0,
|
|
15421
|
+
const maybeShowLinkToolbar = (0, import_react149.useCallback)(() => {
|
|
15259
15422
|
if (!editor.isEditable()) {
|
|
15260
15423
|
return;
|
|
15261
15424
|
}
|
|
@@ -15289,7 +15452,7 @@ function LinkNodePlugin({
|
|
|
15289
15452
|
}
|
|
15290
15453
|
});
|
|
15291
15454
|
}, [editor, positioningAnchorEl]);
|
|
15292
|
-
(0,
|
|
15455
|
+
(0, import_react149.useEffect)(() => {
|
|
15293
15456
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
15294
15457
|
requestAnimationFrame(() => {
|
|
15295
15458
|
editorState.read(() => {
|
|
@@ -15316,8 +15479,8 @@ function LinkNodePlugin({
|
|
|
15316
15479
|
});
|
|
15317
15480
|
});
|
|
15318
15481
|
};
|
|
15319
|
-
return /* @__PURE__ */ (0,
|
|
15320
|
-
/* @__PURE__ */ (0,
|
|
15482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
15483
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15321
15484
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
15322
15485
|
{
|
|
15323
15486
|
nodeType: LinkNode,
|
|
@@ -15327,7 +15490,7 @@ function LinkNodePlugin({
|
|
|
15327
15490
|
}
|
|
15328
15491
|
}
|
|
15329
15492
|
),
|
|
15330
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
15493
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15331
15494
|
"div",
|
|
15332
15495
|
{
|
|
15333
15496
|
css: linkPopover,
|
|
@@ -15336,8 +15499,8 @@ function LinkNodePlugin({
|
|
|
15336
15499
|
top: linkPopoverState.position.y
|
|
15337
15500
|
},
|
|
15338
15501
|
ref: linkPopoverElRef,
|
|
15339
|
-
children: /* @__PURE__ */ (0,
|
|
15340
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
15502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
15503
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15341
15504
|
"a",
|
|
15342
15505
|
{
|
|
15343
15506
|
href: parsePath(
|
|
@@ -15349,7 +15512,7 @@ function LinkNodePlugin({
|
|
|
15349
15512
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
15350
15513
|
}
|
|
15351
15514
|
),
|
|
15352
|
-
/* @__PURE__ */ (0,
|
|
15515
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15353
15516
|
Button,
|
|
15354
15517
|
{
|
|
15355
15518
|
size: "xs",
|
|
@@ -15357,7 +15520,7 @@ function LinkNodePlugin({
|
|
|
15357
15520
|
onEditLinkNode(linkPopoverState.node);
|
|
15358
15521
|
},
|
|
15359
15522
|
buttonType: "ghost",
|
|
15360
|
-
children: /* @__PURE__ */ (0,
|
|
15523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
15361
15524
|
}
|
|
15362
15525
|
)
|
|
15363
15526
|
] })
|
|
@@ -15377,7 +15540,7 @@ var import_list = require("@lexical/list");
|
|
|
15377
15540
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
15378
15541
|
var import_utils9 = require("@lexical/utils");
|
|
15379
15542
|
var import_lexical5 = require("lexical");
|
|
15380
|
-
var
|
|
15543
|
+
var import_react150 = require("react");
|
|
15381
15544
|
function isIndentPermitted(maxDepth) {
|
|
15382
15545
|
const selection = (0, import_lexical5.$getSelection)();
|
|
15383
15546
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -15432,8 +15595,8 @@ function $indentOverTab(selection) {
|
|
|
15432
15595
|
}
|
|
15433
15596
|
function ListIndentPlugin({ maxDepth }) {
|
|
15434
15597
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
15435
|
-
const isInListItemNode = (0,
|
|
15436
|
-
(0,
|
|
15598
|
+
const isInListItemNode = (0, import_react150.useRef)(false);
|
|
15599
|
+
(0, import_react150.useEffect)(() => {
|
|
15437
15600
|
return editor.registerCommand(
|
|
15438
15601
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
15439
15602
|
() => {
|
|
@@ -15450,7 +15613,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
15450
15613
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
15451
15614
|
);
|
|
15452
15615
|
}, [editor]);
|
|
15453
|
-
(0,
|
|
15616
|
+
(0, import_react150.useEffect)(() => {
|
|
15454
15617
|
return (0, import_utils9.mergeRegister)(
|
|
15455
15618
|
editor.registerCommand(
|
|
15456
15619
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
@@ -15480,13 +15643,13 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
15480
15643
|
|
|
15481
15644
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
15482
15645
|
init_emotion_jsx_shim();
|
|
15483
|
-
var
|
|
15646
|
+
var import_react151 = require("@emotion/react");
|
|
15484
15647
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
15485
15648
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
15486
15649
|
var import_table = require("@lexical/table");
|
|
15487
15650
|
var import_lexical6 = require("lexical");
|
|
15488
|
-
var
|
|
15489
|
-
var
|
|
15651
|
+
var import_react152 = require("react");
|
|
15652
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
15490
15653
|
function computeSelectionCount(selection) {
|
|
15491
15654
|
const selectionShape = selection.getShape();
|
|
15492
15655
|
return {
|
|
@@ -15494,21 +15657,21 @@ function computeSelectionCount(selection) {
|
|
|
15494
15657
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
15495
15658
|
};
|
|
15496
15659
|
}
|
|
15497
|
-
var tableActionMenuTrigger =
|
|
15660
|
+
var tableActionMenuTrigger = import_react151.css`
|
|
15498
15661
|
position: absolute;
|
|
15499
15662
|
transform: translate(calc(-100% - 1px), 1px);
|
|
15500
15663
|
`;
|
|
15501
|
-
var TableActionMenuTrigger = (0,
|
|
15664
|
+
var TableActionMenuTrigger = (0, import_react152.forwardRef)((props, ref) => {
|
|
15502
15665
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
15503
|
-
const [coordinates, setCoordinates] = (0,
|
|
15504
|
-
(0,
|
|
15666
|
+
const [coordinates, setCoordinates] = (0, import_react152.useState)({ x: 0, y: 0 });
|
|
15667
|
+
(0, import_react152.useLayoutEffect)(() => {
|
|
15505
15668
|
const rect = tableCellEl.getBoundingClientRect();
|
|
15506
15669
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
15507
15670
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
15508
15671
|
const relativeY = rect.top - parentRect.top + positioningAnchorEl.scrollTop;
|
|
15509
15672
|
setCoordinates({ x: relativeX, y: relativeY });
|
|
15510
15673
|
}, [tableCellEl, positioningAnchorEl]);
|
|
15511
|
-
return /* @__PURE__ */ (0,
|
|
15674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15512
15675
|
IconButton,
|
|
15513
15676
|
{
|
|
15514
15677
|
ref,
|
|
@@ -15522,7 +15685,7 @@ var TableActionMenuTrigger = (0, import_react150.forwardRef)((props, ref) => {
|
|
|
15522
15685
|
size: "xs",
|
|
15523
15686
|
buttonType: "unimportant",
|
|
15524
15687
|
...rest,
|
|
15525
|
-
children: /* @__PURE__ */ (0,
|
|
15688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
|
|
15526
15689
|
}
|
|
15527
15690
|
);
|
|
15528
15691
|
});
|
|
@@ -15534,16 +15697,16 @@ function TableActionMenu({
|
|
|
15534
15697
|
positioningAnchorEl
|
|
15535
15698
|
}) {
|
|
15536
15699
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
15537
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
15538
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
15700
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react152.useState)(_tableCellNode);
|
|
15701
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react152.useState)({
|
|
15539
15702
|
columns: 1,
|
|
15540
15703
|
rows: 1
|
|
15541
15704
|
});
|
|
15542
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
15705
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react152.useState)(0);
|
|
15543
15706
|
const incrementMenuTriggerKey = () => {
|
|
15544
15707
|
setMenuTriggerKey((key) => key += 1);
|
|
15545
15708
|
};
|
|
15546
|
-
(0,
|
|
15709
|
+
(0, import_react152.useEffect)(() => {
|
|
15547
15710
|
return editor.registerMutationListener(
|
|
15548
15711
|
import_table.TableCellNode,
|
|
15549
15712
|
(nodeMutations) => {
|
|
@@ -15557,7 +15720,7 @@ function TableActionMenu({
|
|
|
15557
15720
|
{ skipInitialization: true }
|
|
15558
15721
|
);
|
|
15559
15722
|
}, [editor, tableCellNode]);
|
|
15560
|
-
(0,
|
|
15723
|
+
(0, import_react152.useEffect)(() => {
|
|
15561
15724
|
editor.getEditorState().read(() => {
|
|
15562
15725
|
const selection = (0, import_lexical6.$getSelection)();
|
|
15563
15726
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -15565,7 +15728,7 @@ function TableActionMenu({
|
|
|
15565
15728
|
}
|
|
15566
15729
|
});
|
|
15567
15730
|
}, [editor]);
|
|
15568
|
-
const clearTableSelection = (0,
|
|
15731
|
+
const clearTableSelection = (0, import_react152.useCallback)(() => {
|
|
15569
15732
|
editor.update(() => {
|
|
15570
15733
|
if (tableCellNode.isAttached()) {
|
|
15571
15734
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -15586,7 +15749,7 @@ function TableActionMenu({
|
|
|
15586
15749
|
rootNode.selectStart();
|
|
15587
15750
|
});
|
|
15588
15751
|
}, [editor, tableCellNode]);
|
|
15589
|
-
const insertTableRowAtSelection = (0,
|
|
15752
|
+
const insertTableRowAtSelection = (0, import_react152.useCallback)(
|
|
15590
15753
|
(shouldInsertAfter) => {
|
|
15591
15754
|
editor.update(() => {
|
|
15592
15755
|
(0, import_table.$insertTableRow__EXPERIMENTAL)(shouldInsertAfter);
|
|
@@ -15595,7 +15758,7 @@ function TableActionMenu({
|
|
|
15595
15758
|
},
|
|
15596
15759
|
[editor]
|
|
15597
15760
|
);
|
|
15598
|
-
const insertTableColumnAtSelection = (0,
|
|
15761
|
+
const insertTableColumnAtSelection = (0, import_react152.useCallback)(
|
|
15599
15762
|
(shouldInsertAfter) => {
|
|
15600
15763
|
editor.update(() => {
|
|
15601
15764
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -15606,26 +15769,26 @@ function TableActionMenu({
|
|
|
15606
15769
|
},
|
|
15607
15770
|
[editor, selectionCounts.columns]
|
|
15608
15771
|
);
|
|
15609
|
-
const deleteTableRowAtSelection = (0,
|
|
15772
|
+
const deleteTableRowAtSelection = (0, import_react152.useCallback)(() => {
|
|
15610
15773
|
editor.update(() => {
|
|
15611
15774
|
(0, import_table.$deleteTableRow__EXPERIMENTAL)();
|
|
15612
15775
|
});
|
|
15613
15776
|
incrementMenuTriggerKey();
|
|
15614
15777
|
}, [editor]);
|
|
15615
|
-
const deleteTableAtSelection = (0,
|
|
15778
|
+
const deleteTableAtSelection = (0, import_react152.useCallback)(() => {
|
|
15616
15779
|
editor.update(() => {
|
|
15617
15780
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15618
15781
|
tableNode.remove();
|
|
15619
15782
|
clearTableSelection();
|
|
15620
15783
|
});
|
|
15621
15784
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15622
|
-
const deleteTableColumnAtSelection = (0,
|
|
15785
|
+
const deleteTableColumnAtSelection = (0, import_react152.useCallback)(() => {
|
|
15623
15786
|
editor.update(() => {
|
|
15624
15787
|
(0, import_table.$deleteTableColumn__EXPERIMENTAL)();
|
|
15625
15788
|
});
|
|
15626
15789
|
incrementMenuTriggerKey();
|
|
15627
15790
|
}, [editor]);
|
|
15628
|
-
const toggleTableRowIsHeader = (0,
|
|
15791
|
+
const toggleTableRowIsHeader = (0, import_react152.useCallback)(() => {
|
|
15629
15792
|
editor.update(() => {
|
|
15630
15793
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15631
15794
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -15646,7 +15809,7 @@ function TableActionMenu({
|
|
|
15646
15809
|
clearTableSelection();
|
|
15647
15810
|
});
|
|
15648
15811
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15649
|
-
const toggleTableColumnIsHeader = (0,
|
|
15812
|
+
const toggleTableColumnIsHeader = (0, import_react152.useCallback)(() => {
|
|
15650
15813
|
editor.update(() => {
|
|
15651
15814
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15652
15815
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -15673,13 +15836,13 @@ function TableActionMenu({
|
|
|
15673
15836
|
clearTableSelection();
|
|
15674
15837
|
});
|
|
15675
15838
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15676
|
-
const menuItemCss = (0,
|
|
15839
|
+
const menuItemCss = (0, import_react151.css)({
|
|
15677
15840
|
fontSize: "var(--fs-sm)"
|
|
15678
15841
|
});
|
|
15679
|
-
return /* @__PURE__ */ (0,
|
|
15842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15680
15843
|
Menu,
|
|
15681
15844
|
{
|
|
15682
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
15845
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15683
15846
|
TableActionMenuTrigger,
|
|
15684
15847
|
{
|
|
15685
15848
|
tableCellEl,
|
|
@@ -15690,7 +15853,7 @@ function TableActionMenu({
|
|
|
15690
15853
|
portalElement: menuPortalEl,
|
|
15691
15854
|
maxMenuHeight: "300px",
|
|
15692
15855
|
children: [
|
|
15693
|
-
/* @__PURE__ */ (0,
|
|
15856
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15694
15857
|
MenuItem,
|
|
15695
15858
|
{
|
|
15696
15859
|
onClick: () => {
|
|
@@ -15704,33 +15867,33 @@ function TableActionMenu({
|
|
|
15704
15867
|
]
|
|
15705
15868
|
}
|
|
15706
15869
|
),
|
|
15707
|
-
/* @__PURE__ */ (0,
|
|
15870
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
|
|
15708
15871
|
"Insert ",
|
|
15709
15872
|
selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
|
|
15710
15873
|
" below"
|
|
15711
15874
|
] }),
|
|
15712
|
-
/* @__PURE__ */ (0,
|
|
15713
|
-
/* @__PURE__ */ (0,
|
|
15875
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItemSeparator, {}),
|
|
15876
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
|
|
15714
15877
|
"Insert ",
|
|
15715
15878
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
15716
15879
|
" left"
|
|
15717
15880
|
] }),
|
|
15718
|
-
/* @__PURE__ */ (0,
|
|
15881
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
|
|
15719
15882
|
"Insert ",
|
|
15720
15883
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
15721
15884
|
" right"
|
|
15722
15885
|
] }),
|
|
15723
|
-
/* @__PURE__ */ (0,
|
|
15724
|
-
/* @__PURE__ */ (0,
|
|
15725
|
-
/* @__PURE__ */ (0,
|
|
15726
|
-
/* @__PURE__ */ (0,
|
|
15727
|
-
/* @__PURE__ */ (0,
|
|
15728
|
-
/* @__PURE__ */ (0,
|
|
15886
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItemSeparator, {}),
|
|
15887
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItem, { onClick: () => deleteTableColumnAtSelection(), css: menuItemCss, children: "Delete column" }),
|
|
15888
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItem, { onClick: () => deleteTableRowAtSelection(), css: menuItemCss, children: "Delete row" }),
|
|
15889
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItem, { onClick: () => deleteTableAtSelection(), css: menuItemCss, children: "Delete table" }),
|
|
15890
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItemSeparator, {}),
|
|
15891
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => toggleTableRowIsHeader(), css: menuItemCss, children: [
|
|
15729
15892
|
(tableCellNode.__headerState & import_table.TableCellHeaderStates.ROW) === import_table.TableCellHeaderStates.ROW ? "Remove" : "Add",
|
|
15730
15893
|
" ",
|
|
15731
15894
|
"row header"
|
|
15732
15895
|
] }),
|
|
15733
|
-
/* @__PURE__ */ (0,
|
|
15896
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
|
|
15734
15897
|
(tableCellNode.__headerState & import_table.TableCellHeaderStates.COLUMN) === import_table.TableCellHeaderStates.COLUMN ? "Remove" : "Add",
|
|
15735
15898
|
" ",
|
|
15736
15899
|
"column header"
|
|
@@ -15744,10 +15907,10 @@ function TableCellActionMenuContainer({
|
|
|
15744
15907
|
positioningAnchorEl
|
|
15745
15908
|
}) {
|
|
15746
15909
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
15747
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
15748
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
15749
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
15750
|
-
(0,
|
|
15910
|
+
const [tableCellNode, setTableMenuCellNode] = (0, import_react152.useState)(null);
|
|
15911
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0, import_react152.useState)(null);
|
|
15912
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0, import_react152.useState)(null);
|
|
15913
|
+
(0, import_react152.useEffect)(() => {
|
|
15751
15914
|
const newPortalEl = document.createElement("div");
|
|
15752
15915
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
15753
15916
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -15755,14 +15918,14 @@ function TableCellActionMenuContainer({
|
|
|
15755
15918
|
newPortalEl.remove();
|
|
15756
15919
|
};
|
|
15757
15920
|
}, [menuPortalEl]);
|
|
15758
|
-
const setTableMenuCellNodeElem = (0,
|
|
15921
|
+
const setTableMenuCellNodeElem = (0, import_react152.useCallback)((elem) => {
|
|
15759
15922
|
if (elem) {
|
|
15760
15923
|
_setTableMenuCellNodeEl(elem);
|
|
15761
15924
|
} else {
|
|
15762
15925
|
_setTableMenuCellNodeEl(null);
|
|
15763
15926
|
}
|
|
15764
15927
|
}, []);
|
|
15765
|
-
const $moveMenu = (0,
|
|
15928
|
+
const $moveMenu = (0, import_react152.useCallback)(() => {
|
|
15766
15929
|
const selection = (0, import_lexical6.$getSelection)();
|
|
15767
15930
|
const nativeSelection = window.getSelection();
|
|
15768
15931
|
const activeElement = document.activeElement;
|
|
@@ -15791,14 +15954,14 @@ function TableCellActionMenuContainer({
|
|
|
15791
15954
|
setTableMenuCellNodeElem(null);
|
|
15792
15955
|
}
|
|
15793
15956
|
}, [editor, setTableMenuCellNodeElem]);
|
|
15794
|
-
(0,
|
|
15957
|
+
(0, import_react152.useEffect)(() => {
|
|
15795
15958
|
return editor.registerUpdateListener(() => {
|
|
15796
15959
|
editor.getEditorState().read(() => {
|
|
15797
15960
|
$moveMenu();
|
|
15798
15961
|
});
|
|
15799
15962
|
});
|
|
15800
15963
|
});
|
|
15801
|
-
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0,
|
|
15964
|
+
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15802
15965
|
TableActionMenu,
|
|
15803
15966
|
{
|
|
15804
15967
|
tableCellNode,
|
|
@@ -15814,23 +15977,23 @@ function TableActionMenuPlugin({
|
|
|
15814
15977
|
menuPortalEl
|
|
15815
15978
|
}) {
|
|
15816
15979
|
const isEditable = (0, import_useLexicalEditable.useLexicalEditable)();
|
|
15817
|
-
return isEditable ? /* @__PURE__ */ (0,
|
|
15980
|
+
return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TableCellActionMenuContainer, { menuPortalEl, positioningAnchorEl }) : null;
|
|
15818
15981
|
}
|
|
15819
15982
|
|
|
15820
15983
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
15821
15984
|
init_emotion_jsx_shim();
|
|
15822
|
-
var
|
|
15985
|
+
var import_react153 = require("@emotion/react");
|
|
15823
15986
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
15824
15987
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
15825
15988
|
var import_table2 = require("@lexical/table");
|
|
15826
15989
|
var import_utils11 = require("@lexical/utils");
|
|
15827
15990
|
var import_lexical7 = require("lexical");
|
|
15828
|
-
var
|
|
15991
|
+
var import_react154 = require("react");
|
|
15829
15992
|
var import_react_dom3 = require("react-dom");
|
|
15830
|
-
var
|
|
15993
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
15831
15994
|
var MIN_ROW_HEIGHT = 33;
|
|
15832
15995
|
var MIN_COLUMN_WIDTH = 50;
|
|
15833
|
-
var tableResizer =
|
|
15996
|
+
var tableResizer = import_react153.css`
|
|
15834
15997
|
position: absolute;
|
|
15835
15998
|
z-index: var(--z-10);
|
|
15836
15999
|
`;
|
|
@@ -15852,15 +16015,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
15852
16015
|
return null;
|
|
15853
16016
|
};
|
|
15854
16017
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
15855
|
-
const targetRef = (0,
|
|
15856
|
-
const resizerRef = (0,
|
|
15857
|
-
const tableRectRef = (0,
|
|
15858
|
-
const mouseStartPosRef = (0,
|
|
15859
|
-
const [mouseCurrentPos, updateMouseCurrentPos] = (0,
|
|
15860
|
-
const [activeCell, updateActiveCell] = (0,
|
|
15861
|
-
const [isMouseDown, updateIsMouseDown] = (0,
|
|
15862
|
-
const [draggingDirection, updateDraggingDirection] = (0,
|
|
15863
|
-
const resetState = (0,
|
|
16018
|
+
const targetRef = (0, import_react154.useRef)(null);
|
|
16019
|
+
const resizerRef = (0, import_react154.useRef)(null);
|
|
16020
|
+
const tableRectRef = (0, import_react154.useRef)(null);
|
|
16021
|
+
const mouseStartPosRef = (0, import_react154.useRef)(null);
|
|
16022
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = (0, import_react154.useState)(null);
|
|
16023
|
+
const [activeCell, updateActiveCell] = (0, import_react154.useState)(null);
|
|
16024
|
+
const [isMouseDown, updateIsMouseDown] = (0, import_react154.useState)(false);
|
|
16025
|
+
const [draggingDirection, updateDraggingDirection] = (0, import_react154.useState)(null);
|
|
16026
|
+
const resetState = (0, import_react154.useCallback)(() => {
|
|
15864
16027
|
updateActiveCell(null);
|
|
15865
16028
|
targetRef.current = null;
|
|
15866
16029
|
updateDraggingDirection(null);
|
|
@@ -15870,7 +16033,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15870
16033
|
const isMouseDownOnEvent = (event) => {
|
|
15871
16034
|
return (event.buttons & 1) === 1;
|
|
15872
16035
|
};
|
|
15873
|
-
(0,
|
|
16036
|
+
(0, import_react154.useEffect)(() => {
|
|
15874
16037
|
const onMouseMove = (event) => {
|
|
15875
16038
|
setTimeout(() => {
|
|
15876
16039
|
const target = event.target;
|
|
@@ -15937,7 +16100,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15937
16100
|
}
|
|
15938
16101
|
return false;
|
|
15939
16102
|
};
|
|
15940
|
-
const updateRowHeight = (0,
|
|
16103
|
+
const updateRowHeight = (0, import_react154.useCallback)(
|
|
15941
16104
|
(heightChange) => {
|
|
15942
16105
|
if (!activeCell) {
|
|
15943
16106
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -15999,7 +16162,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15999
16162
|
}
|
|
16000
16163
|
}
|
|
16001
16164
|
};
|
|
16002
|
-
const updateColumnWidth = (0,
|
|
16165
|
+
const updateColumnWidth = (0, import_react154.useCallback)(
|
|
16003
16166
|
(widthChange) => {
|
|
16004
16167
|
if (!activeCell) {
|
|
16005
16168
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -16033,7 +16196,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16033
16196
|
},
|
|
16034
16197
|
[activeCell, editor]
|
|
16035
16198
|
);
|
|
16036
|
-
const mouseUpHandler = (0,
|
|
16199
|
+
const mouseUpHandler = (0, import_react154.useCallback)(
|
|
16037
16200
|
(direction) => {
|
|
16038
16201
|
const handler = (event) => {
|
|
16039
16202
|
event.preventDefault();
|
|
@@ -16062,7 +16225,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16062
16225
|
},
|
|
16063
16226
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
16064
16227
|
);
|
|
16065
|
-
const toggleResize = (0,
|
|
16228
|
+
const toggleResize = (0, import_react154.useCallback)(
|
|
16066
16229
|
(direction) => (event) => {
|
|
16067
16230
|
event.preventDefault();
|
|
16068
16231
|
event.stopPropagation();
|
|
@@ -16079,7 +16242,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16079
16242
|
},
|
|
16080
16243
|
[activeCell, mouseUpHandler]
|
|
16081
16244
|
);
|
|
16082
|
-
const getResizers = (0,
|
|
16245
|
+
const getResizers = (0, import_react154.useCallback)(() => {
|
|
16083
16246
|
if (activeCell) {
|
|
16084
16247
|
const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
|
|
16085
16248
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -16128,8 +16291,8 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16128
16291
|
};
|
|
16129
16292
|
}, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
|
|
16130
16293
|
const resizerStyles = getResizers();
|
|
16131
|
-
return /* @__PURE__ */ (0,
|
|
16132
|
-
/* @__PURE__ */ (0,
|
|
16294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
|
|
16295
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16133
16296
|
"div",
|
|
16134
16297
|
{
|
|
16135
16298
|
css: tableResizer,
|
|
@@ -16137,7 +16300,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16137
16300
|
onMouseDown: toggleResize("right")
|
|
16138
16301
|
}
|
|
16139
16302
|
),
|
|
16140
|
-
/* @__PURE__ */ (0,
|
|
16303
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16141
16304
|
"div",
|
|
16142
16305
|
{
|
|
16143
16306
|
css: tableResizer,
|
|
@@ -16150,9 +16313,9 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16150
16313
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
16151
16314
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
16152
16315
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
16153
|
-
return (0,
|
|
16316
|
+
return (0, import_react154.useMemo)(
|
|
16154
16317
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
16155
|
-
/* @__PURE__ */ (0,
|
|
16318
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
16156
16319
|
positioningAnchorEl
|
|
16157
16320
|
) : null,
|
|
16158
16321
|
[editor, isEditable, positioningAnchorEl]
|
|
@@ -16164,11 +16327,11 @@ init_emotion_jsx_shim();
|
|
|
16164
16327
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
16165
16328
|
var import_table3 = require("@lexical/table");
|
|
16166
16329
|
var import_lexical8 = require("lexical");
|
|
16167
|
-
var
|
|
16330
|
+
var import_react155 = require("react");
|
|
16168
16331
|
var TableSelectionPlugin = () => {
|
|
16169
16332
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
16170
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
16171
|
-
(0,
|
|
16333
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react155.useState)(null);
|
|
16334
|
+
(0, import_react155.useEffect)(() => {
|
|
16172
16335
|
return editor.registerCommand(
|
|
16173
16336
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
16174
16337
|
() => {
|
|
@@ -16190,7 +16353,7 @@ var TableSelectionPlugin = () => {
|
|
|
16190
16353
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
16191
16354
|
);
|
|
16192
16355
|
}, [editor]);
|
|
16193
|
-
(0,
|
|
16356
|
+
(0, import_react155.useEffect)(() => {
|
|
16194
16357
|
const onControlA = (event) => {
|
|
16195
16358
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
16196
16359
|
if (!closestTableCellNode) {
|
|
@@ -16214,7 +16377,7 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
16214
16377
|
|
|
16215
16378
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
16216
16379
|
init_emotion_jsx_shim();
|
|
16217
|
-
var
|
|
16380
|
+
var import_react157 = require("@emotion/react");
|
|
16218
16381
|
var import_code2 = require("@lexical/code");
|
|
16219
16382
|
var import_list2 = require("@lexical/list");
|
|
16220
16383
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -16223,7 +16386,7 @@ var import_selection2 = require("@lexical/selection");
|
|
|
16223
16386
|
var import_table4 = require("@lexical/table");
|
|
16224
16387
|
var import_utils12 = require("@lexical/utils");
|
|
16225
16388
|
var import_lexical9 = require("lexical");
|
|
16226
|
-
var
|
|
16389
|
+
var import_react158 = require("react");
|
|
16227
16390
|
|
|
16228
16391
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
16229
16392
|
init_emotion_jsx_shim();
|
|
@@ -16241,29 +16404,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
16241
16404
|
|
|
16242
16405
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
16243
16406
|
init_emotion_jsx_shim();
|
|
16244
|
-
var
|
|
16407
|
+
var import_react156 = require("react");
|
|
16245
16408
|
var useRichTextToolbarState = ({ config }) => {
|
|
16246
16409
|
var _a;
|
|
16247
|
-
const enabledBuiltInFormats = (0,
|
|
16410
|
+
const enabledBuiltInFormats = (0, import_react156.useMemo)(() => {
|
|
16248
16411
|
return richTextBuiltInFormats.filter((format) => {
|
|
16249
16412
|
var _a2, _b;
|
|
16250
16413
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
16251
16414
|
});
|
|
16252
16415
|
}, [config]);
|
|
16253
|
-
const enabledBuiltInElements = (0,
|
|
16416
|
+
const enabledBuiltInElements = (0, import_react156.useMemo)(() => {
|
|
16254
16417
|
return richTextBuiltInElements.filter((element) => {
|
|
16255
16418
|
var _a2, _b;
|
|
16256
16419
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
16257
16420
|
});
|
|
16258
16421
|
}, [config]);
|
|
16259
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
16422
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react156.useMemo)(() => {
|
|
16260
16423
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
16261
16424
|
}, [enabledBuiltInFormats]);
|
|
16262
16425
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
16263
16426
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
16264
16427
|
);
|
|
16265
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
16266
|
-
const visibleFormatsWithIcon = (0,
|
|
16428
|
+
const [activeFormats, setActiveFormats] = (0, import_react156.useState)([]);
|
|
16429
|
+
const visibleFormatsWithIcon = (0, import_react156.useMemo)(() => {
|
|
16267
16430
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
16268
16431
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
16269
16432
|
visibleFormats.add(type);
|
|
@@ -16273,7 +16436,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16273
16436
|
});
|
|
16274
16437
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
16275
16438
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
16276
|
-
const visibleFormatsWithoutIcon = (0,
|
|
16439
|
+
const visibleFormatsWithoutIcon = (0, import_react156.useMemo)(() => {
|
|
16277
16440
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
16278
16441
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
16279
16442
|
visibleFormats.add(type);
|
|
@@ -16283,11 +16446,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16283
16446
|
});
|
|
16284
16447
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
16285
16448
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
16286
|
-
const [activeElement, setActiveElement] = (0,
|
|
16449
|
+
const [activeElement, setActiveElement] = (0, import_react156.useState)("paragraph");
|
|
16287
16450
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
16288
16451
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
16289
16452
|
);
|
|
16290
|
-
const visibleTextualElements = (0,
|
|
16453
|
+
const visibleTextualElements = (0, import_react156.useMemo)(() => {
|
|
16291
16454
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
16292
16455
|
return enabledTextualElements;
|
|
16293
16456
|
}
|
|
@@ -16298,30 +16461,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16298
16461
|
}
|
|
16299
16462
|
);
|
|
16300
16463
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
16301
|
-
const [isLink, setIsLink] = (0,
|
|
16302
|
-
const linkElementVisible = (0,
|
|
16464
|
+
const [isLink, setIsLink] = (0, import_react156.useState)(false);
|
|
16465
|
+
const linkElementVisible = (0, import_react156.useMemo)(() => {
|
|
16303
16466
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
16304
16467
|
}, [isLink, enabledBuiltInElements]);
|
|
16305
|
-
const visibleLists = (0,
|
|
16468
|
+
const visibleLists = (0, import_react156.useMemo)(() => {
|
|
16306
16469
|
return new Set(
|
|
16307
16470
|
["orderedList", "unorderedList"].filter(
|
|
16308
16471
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
16309
16472
|
)
|
|
16310
16473
|
);
|
|
16311
16474
|
}, [activeElement, enabledBuiltInElements]);
|
|
16312
|
-
const quoteElementVisible = (0,
|
|
16475
|
+
const quoteElementVisible = (0, import_react156.useMemo)(() => {
|
|
16313
16476
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
16314
16477
|
}, [activeElement, enabledBuiltInElements]);
|
|
16315
|
-
const codeElementVisible = (0,
|
|
16478
|
+
const codeElementVisible = (0, import_react156.useMemo)(() => {
|
|
16316
16479
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
16317
16480
|
}, [activeElement, enabledBuiltInElements]);
|
|
16318
|
-
const tableElementVisible = (0,
|
|
16481
|
+
const tableElementVisible = (0, import_react156.useMemo)(() => {
|
|
16319
16482
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
16320
16483
|
}, [activeElement, enabledBuiltInElements]);
|
|
16321
|
-
const assetElementVisible = (0,
|
|
16484
|
+
const assetElementVisible = (0, import_react156.useMemo)(() => {
|
|
16322
16485
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
16323
16486
|
}, [activeElement, enabledBuiltInElements]);
|
|
16324
|
-
const visibleElementsWithIcons = (0,
|
|
16487
|
+
const visibleElementsWithIcons = (0, import_react156.useMemo)(() => {
|
|
16325
16488
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
16326
16489
|
if (linkElementVisible) {
|
|
16327
16490
|
visibleElements.add("link");
|
|
@@ -16333,7 +16496,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16333
16496
|
}
|
|
16334
16497
|
return visibleElements;
|
|
16335
16498
|
}, [linkElementVisible, visibleLists]);
|
|
16336
|
-
const visibleInsertElementsWithIcons = (0,
|
|
16499
|
+
const visibleInsertElementsWithIcons = (0, import_react156.useMemo)(() => {
|
|
16337
16500
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
16338
16501
|
if (quoteElementVisible) {
|
|
16339
16502
|
visibleElements.add("quote");
|
|
@@ -16371,8 +16534,8 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16371
16534
|
};
|
|
16372
16535
|
|
|
16373
16536
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
16374
|
-
var
|
|
16375
|
-
var toolbar =
|
|
16537
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
16538
|
+
var toolbar = import_react157.css`
|
|
16376
16539
|
${scrollbarStyles}
|
|
16377
16540
|
background: var(--gray-50);
|
|
16378
16541
|
border-radius: var(--rounded-base);
|
|
@@ -16386,7 +16549,7 @@ var toolbar = import_react155.css`
|
|
|
16386
16549
|
top: calc(var(--spacing-sm) * -2);
|
|
16387
16550
|
z-index: 10;
|
|
16388
16551
|
`;
|
|
16389
|
-
var toolbarGroup =
|
|
16552
|
+
var toolbarGroup = import_react157.css`
|
|
16390
16553
|
display: flex;
|
|
16391
16554
|
flex-shrink: 0;
|
|
16392
16555
|
gap: var(--spacing-xs);
|
|
@@ -16403,7 +16566,7 @@ var toolbarGroup = import_react155.css`
|
|
|
16403
16566
|
width: 1px;
|
|
16404
16567
|
}
|
|
16405
16568
|
`;
|
|
16406
|
-
var richTextToolbarButton =
|
|
16569
|
+
var richTextToolbarButton = import_react157.css`
|
|
16407
16570
|
align-items: center;
|
|
16408
16571
|
appearance: none;
|
|
16409
16572
|
border: 0;
|
|
@@ -16417,21 +16580,21 @@ var richTextToolbarButton = import_react155.css`
|
|
|
16417
16580
|
min-width: 32px;
|
|
16418
16581
|
padding: 0 var(--spacing-sm);
|
|
16419
16582
|
`;
|
|
16420
|
-
var richTextToolbarButtonActive =
|
|
16583
|
+
var richTextToolbarButtonActive = import_react157.css`
|
|
16421
16584
|
background: var(--gray-200);
|
|
16422
16585
|
`;
|
|
16423
|
-
var textStyleButton =
|
|
16586
|
+
var textStyleButton = import_react157.css`
|
|
16424
16587
|
justify-content: space-between;
|
|
16425
16588
|
min-width: 7rem;
|
|
16426
16589
|
`;
|
|
16427
|
-
var toolbarIcon =
|
|
16590
|
+
var toolbarIcon = import_react157.css`
|
|
16428
16591
|
color: inherit;
|
|
16429
16592
|
`;
|
|
16430
|
-
var toolbarChevron =
|
|
16593
|
+
var toolbarChevron = import_react157.css`
|
|
16431
16594
|
margin-left: var(--spacing-xs);
|
|
16432
16595
|
`;
|
|
16433
16596
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
16434
|
-
return /* @__PURE__ */ (0,
|
|
16597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
16435
16598
|
};
|
|
16436
16599
|
var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset }) => {
|
|
16437
16600
|
const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
|
|
@@ -16487,7 +16650,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16487
16650
|
});
|
|
16488
16651
|
});
|
|
16489
16652
|
};
|
|
16490
|
-
const updateToolbar = (0,
|
|
16653
|
+
const updateToolbar = (0, import_react158.useCallback)(() => {
|
|
16491
16654
|
const selection = (0, import_lexical9.$getSelection)();
|
|
16492
16655
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
16493
16656
|
return;
|
|
@@ -16526,7 +16689,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16526
16689
|
setIsLink(false);
|
|
16527
16690
|
}
|
|
16528
16691
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
16529
|
-
(0,
|
|
16692
|
+
(0, import_react158.useEffect)(() => {
|
|
16530
16693
|
return editor.registerCommand(
|
|
16531
16694
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
16532
16695
|
(_payload) => {
|
|
@@ -16536,7 +16699,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16536
16699
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
16537
16700
|
);
|
|
16538
16701
|
}, [editor, updateToolbar]);
|
|
16539
|
-
(0,
|
|
16702
|
+
(0, import_react158.useEffect)(() => {
|
|
16540
16703
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16541
16704
|
requestAnimationFrame(() => {
|
|
16542
16705
|
editorState.read(() => {
|
|
@@ -16545,14 +16708,14 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16545
16708
|
});
|
|
16546
16709
|
});
|
|
16547
16710
|
}, [editor, updateToolbar]);
|
|
16548
|
-
return /* @__PURE__ */ (0,
|
|
16549
|
-
/* @__PURE__ */ (0,
|
|
16711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbar, "data-testid": "rich-text-toolbar", children: [
|
|
16712
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
16550
16713
|
Menu,
|
|
16551
16714
|
{
|
|
16552
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16715
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
|
|
16553
16716
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
16554
16717
|
" ",
|
|
16555
|
-
/* @__PURE__ */ (0,
|
|
16718
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16556
16719
|
] }),
|
|
16557
16720
|
placement: "bottom-start",
|
|
16558
16721
|
children: [
|
|
@@ -16562,7 +16725,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16562
16725
|
type: "paragraph"
|
|
16563
16726
|
},
|
|
16564
16727
|
...visibleTextualElements
|
|
16565
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
16728
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16566
16729
|
MenuItem,
|
|
16567
16730
|
{
|
|
16568
16731
|
"data-testid": "menu-item",
|
|
@@ -16573,12 +16736,12 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16573
16736
|
},
|
|
16574
16737
|
element.type
|
|
16575
16738
|
)),
|
|
16576
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
16739
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
16577
16740
|
]
|
|
16578
16741
|
}
|
|
16579
16742
|
),
|
|
16580
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
16581
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
16743
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-formatting", children: [
|
|
16744
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16582
16745
|
"button",
|
|
16583
16746
|
{
|
|
16584
16747
|
"data-testid": `formatting-button-${format.type}`,
|
|
@@ -16590,15 +16753,15 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16590
16753
|
richTextToolbarButton,
|
|
16591
16754
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
16592
16755
|
],
|
|
16593
|
-
children: /* @__PURE__ */ (0,
|
|
16756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
16594
16757
|
}
|
|
16595
16758
|
) }, format.type)),
|
|
16596
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
16759
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16597
16760
|
Menu,
|
|
16598
16761
|
{
|
|
16599
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16762
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
16600
16763
|
placement: "bottom-start",
|
|
16601
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
16764
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16602
16765
|
MenuItem,
|
|
16603
16766
|
{
|
|
16604
16767
|
onClick: () => {
|
|
@@ -16611,8 +16774,8 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16611
16774
|
}
|
|
16612
16775
|
) : null
|
|
16613
16776
|
] }) : null,
|
|
16614
|
-
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0,
|
|
16615
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
16777
|
+
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-elements", children: [
|
|
16778
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16616
16779
|
"button",
|
|
16617
16780
|
{
|
|
16618
16781
|
"data-testid": "element-link",
|
|
@@ -16625,11 +16788,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16625
16788
|
}
|
|
16626
16789
|
},
|
|
16627
16790
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
16628
|
-
children: /* @__PURE__ */ (0,
|
|
16791
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
16629
16792
|
}
|
|
16630
16793
|
) }) : null,
|
|
16631
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
16632
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
16794
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
16795
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16633
16796
|
"button",
|
|
16634
16797
|
{
|
|
16635
16798
|
"data-testid": "element-unordered-list",
|
|
@@ -16645,10 +16808,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16645
16808
|
richTextToolbarButton,
|
|
16646
16809
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
16647
16810
|
],
|
|
16648
|
-
children: /* @__PURE__ */ (0,
|
|
16811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
16649
16812
|
}
|
|
16650
16813
|
) }) : null,
|
|
16651
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
16814
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16652
16815
|
"button",
|
|
16653
16816
|
{
|
|
16654
16817
|
"data-testid": "element-ordered-list",
|
|
@@ -16664,58 +16827,58 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16664
16827
|
richTextToolbarButton,
|
|
16665
16828
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
16666
16829
|
],
|
|
16667
|
-
children: /* @__PURE__ */ (0,
|
|
16830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
16668
16831
|
}
|
|
16669
16832
|
) }) : null
|
|
16670
16833
|
] }) : null,
|
|
16671
16834
|
customControls ? customControls : null
|
|
16672
16835
|
] }) : null,
|
|
16673
|
-
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
16836
|
+
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-insert", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
16674
16837
|
Menu,
|
|
16675
16838
|
{
|
|
16676
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16839
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
|
|
16677
16840
|
"Insert",
|
|
16678
|
-
/* @__PURE__ */ (0,
|
|
16841
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16679
16842
|
] }),
|
|
16680
16843
|
placement: "bottom-start",
|
|
16681
16844
|
children: [
|
|
16682
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
16845
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16683
16846
|
MenuItem,
|
|
16684
16847
|
{
|
|
16685
16848
|
onClick: () => {
|
|
16686
16849
|
onSelectElement("quote");
|
|
16687
16850
|
},
|
|
16688
|
-
icon: /* @__PURE__ */ (0,
|
|
16851
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "quote", iconColor: "currentColor" }),
|
|
16689
16852
|
children: "Quote"
|
|
16690
16853
|
}
|
|
16691
16854
|
) : null,
|
|
16692
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
16855
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16693
16856
|
MenuItem,
|
|
16694
16857
|
{
|
|
16695
16858
|
onClick: () => {
|
|
16696
16859
|
onSelectElement("code");
|
|
16697
16860
|
},
|
|
16698
|
-
icon: /* @__PURE__ */ (0,
|
|
16861
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "code-slash", iconColor: "currentColor" }),
|
|
16699
16862
|
children: "Code"
|
|
16700
16863
|
}
|
|
16701
16864
|
) : null,
|
|
16702
|
-
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0,
|
|
16865
|
+
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16703
16866
|
MenuItem,
|
|
16704
16867
|
{
|
|
16705
16868
|
onClick: () => {
|
|
16706
16869
|
onSelectElement("table");
|
|
16707
16870
|
},
|
|
16708
|
-
icon: /* @__PURE__ */ (0,
|
|
16871
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "view-grid", iconColor: "currentColor" }),
|
|
16709
16872
|
children: "Table"
|
|
16710
16873
|
}
|
|
16711
16874
|
) : null,
|
|
16712
|
-
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ (0,
|
|
16875
|
+
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16713
16876
|
MenuItem,
|
|
16714
16877
|
{
|
|
16715
16878
|
onClick: () => {
|
|
16716
16879
|
onSelectElement("asset");
|
|
16717
16880
|
},
|
|
16718
|
-
icon: /* @__PURE__ */ (0,
|
|
16881
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "image", iconColor: "currentColor" }),
|
|
16719
16882
|
children: "Asset"
|
|
16720
16883
|
}
|
|
16721
16884
|
) : null
|
|
@@ -16727,7 +16890,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16727
16890
|
var RichTextToolbar_default = RichTextToolbar;
|
|
16728
16891
|
|
|
16729
16892
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
16730
|
-
var
|
|
16893
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
16731
16894
|
var ParameterRichText = ({
|
|
16732
16895
|
label,
|
|
16733
16896
|
labelLeadingIcon,
|
|
@@ -16738,25 +16901,10 @@ var ParameterRichText = ({
|
|
|
16738
16901
|
errorTestId,
|
|
16739
16902
|
captionTestId,
|
|
16740
16903
|
menuItems,
|
|
16741
|
-
value,
|
|
16742
|
-
onChange,
|
|
16743
|
-
onConnectLink,
|
|
16744
|
-
config,
|
|
16745
|
-
onRichTextInit,
|
|
16746
|
-
readOnly,
|
|
16747
|
-
editorWrapperClassName,
|
|
16748
|
-
editorInputClassName,
|
|
16749
|
-
editorInputWrapperClassName,
|
|
16750
|
-
editorFooter,
|
|
16751
|
-
customNodes,
|
|
16752
16904
|
children,
|
|
16753
|
-
|
|
16754
|
-
customControls,
|
|
16755
|
-
onInsertTable,
|
|
16756
|
-
onInsertAsset,
|
|
16757
|
-
minimalInteractivity
|
|
16905
|
+
...innerProps
|
|
16758
16906
|
}) => {
|
|
16759
|
-
return /* @__PURE__ */ (0,
|
|
16907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
16760
16908
|
ParameterShell,
|
|
16761
16909
|
{
|
|
16762
16910
|
"data-testid": "parameter-richtext",
|
|
@@ -16770,34 +16918,13 @@ var ParameterRichText = ({
|
|
|
16770
16918
|
captionTestId,
|
|
16771
16919
|
menuItems,
|
|
16772
16920
|
children: [
|
|
16773
|
-
/* @__PURE__ */ (0,
|
|
16774
|
-
|
|
16775
|
-
{
|
|
16776
|
-
value,
|
|
16777
|
-
onChange,
|
|
16778
|
-
onConnectLink,
|
|
16779
|
-
config,
|
|
16780
|
-
onRichTextInit,
|
|
16781
|
-
readOnly,
|
|
16782
|
-
editorWrapperClassName,
|
|
16783
|
-
editorInputClassName,
|
|
16784
|
-
editorInputWrapperClassName,
|
|
16785
|
-
editorFooter,
|
|
16786
|
-
customNodes,
|
|
16787
|
-
variables,
|
|
16788
|
-
customControls,
|
|
16789
|
-
onInsertTable,
|
|
16790
|
-
onInsertAsset,
|
|
16791
|
-
minimalInteractivity,
|
|
16792
|
-
children
|
|
16793
|
-
}
|
|
16794
|
-
),
|
|
16795
|
-
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
|
|
16921
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ParameterRichTextInner, { ...innerProps, children }),
|
|
16922
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children: menuItems }) }) : null
|
|
16796
16923
|
]
|
|
16797
16924
|
}
|
|
16798
16925
|
);
|
|
16799
16926
|
};
|
|
16800
|
-
var editorContainerWrapper =
|
|
16927
|
+
var editorContainerWrapper = import_react159.css`
|
|
16801
16928
|
position: relative;
|
|
16802
16929
|
|
|
16803
16930
|
&::before {
|
|
@@ -16813,12 +16940,12 @@ var editorContainerWrapper = import_react157.css`
|
|
|
16813
16940
|
z-index: 2;
|
|
16814
16941
|
}
|
|
16815
16942
|
`;
|
|
16816
|
-
var editorWrapper =
|
|
16943
|
+
var editorWrapper = import_react159.css`
|
|
16817
16944
|
display: flex;
|
|
16818
16945
|
flex-flow: column;
|
|
16819
16946
|
flex-grow: 1;
|
|
16820
16947
|
`;
|
|
16821
|
-
var editorContainer =
|
|
16948
|
+
var editorContainer = import_react159.css`
|
|
16822
16949
|
${scrollbarStyles}
|
|
16823
16950
|
background: var(--white);
|
|
16824
16951
|
border-radius: var(--rounded-sm);
|
|
@@ -16850,7 +16977,7 @@ var editorContainer = import_react157.css`
|
|
|
16850
16977
|
max-height: unset;
|
|
16851
16978
|
}
|
|
16852
16979
|
`;
|
|
16853
|
-
var editorContainerOverflowWrapper =
|
|
16980
|
+
var editorContainerOverflowWrapper = import_react159.css`
|
|
16854
16981
|
overflow: hidden;
|
|
16855
16982
|
pointer-events: none;
|
|
16856
16983
|
|
|
@@ -16858,7 +16985,7 @@ var editorContainerOverflowWrapper = import_react157.css`
|
|
|
16858
16985
|
pointer-events: auto;
|
|
16859
16986
|
}
|
|
16860
16987
|
`;
|
|
16861
|
-
var editorPlaceholder =
|
|
16988
|
+
var editorPlaceholder = import_react159.css`
|
|
16862
16989
|
color: var(--gray-500);
|
|
16863
16990
|
font-style: italic;
|
|
16864
16991
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -16869,7 +16996,7 @@ var editorPlaceholder = import_react157.css`
|
|
|
16869
16996
|
top: calc(1rem + var(--spacing-sm));
|
|
16870
16997
|
user-select: none;
|
|
16871
16998
|
`;
|
|
16872
|
-
var editorInput =
|
|
16999
|
+
var editorInput = import_react159.css`
|
|
16873
17000
|
min-height: 100%;
|
|
16874
17001
|
flex-grow: 1;
|
|
16875
17002
|
|
|
@@ -16880,22 +17007,11 @@ var editorInput = import_react157.css`
|
|
|
16880
17007
|
`;
|
|
16881
17008
|
var ParameterRichTextInner = ({
|
|
16882
17009
|
value,
|
|
16883
|
-
onChange,
|
|
16884
|
-
onConnectLink,
|
|
16885
|
-
config,
|
|
16886
|
-
onRichTextInit,
|
|
16887
|
-
readOnly,
|
|
16888
|
-
editorWrapperClassName,
|
|
16889
|
-
editorInputClassName,
|
|
16890
|
-
editorInputWrapperClassName,
|
|
16891
17010
|
editorFooter,
|
|
16892
17011
|
children,
|
|
16893
17012
|
customNodes,
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
onInsertTable,
|
|
16897
|
-
onInsertAsset,
|
|
16898
|
-
minimalInteractivity
|
|
17013
|
+
editorWrapperClassName,
|
|
17014
|
+
...richTextProps
|
|
16899
17015
|
}) => {
|
|
16900
17016
|
const lexicalConfig = {
|
|
16901
17017
|
namespace: "uniform",
|
|
@@ -16951,27 +17067,10 @@ var ParameterRichTextInner = ({
|
|
|
16951
17067
|
tableCell: tableCellElement,
|
|
16952
17068
|
tableCellHeader: tableHeaderElement
|
|
16953
17069
|
},
|
|
16954
|
-
editable: !readOnly
|
|
17070
|
+
editable: !richTextProps.readOnly
|
|
16955
17071
|
};
|
|
16956
|
-
return /* @__PURE__ */ (0,
|
|
16957
|
-
/* @__PURE__ */ (0,
|
|
16958
|
-
RichText,
|
|
16959
|
-
{
|
|
16960
|
-
onChange,
|
|
16961
|
-
onConnectLink,
|
|
16962
|
-
config,
|
|
16963
|
-
onRichTextInit,
|
|
16964
|
-
readOnly,
|
|
16965
|
-
editorInputClassName,
|
|
16966
|
-
editorInputWrapperClassName,
|
|
16967
|
-
variables,
|
|
16968
|
-
customControls,
|
|
16969
|
-
onInsertTable,
|
|
16970
|
-
onInsertAsset,
|
|
16971
|
-
minimalInteractivity,
|
|
16972
|
-
children
|
|
16973
|
-
}
|
|
16974
|
-
) }) }),
|
|
17072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
17073
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RichText, { ...richTextProps, children }) }) }),
|
|
16975
17074
|
editorFooter ? editorFooter : null
|
|
16976
17075
|
] });
|
|
16977
17076
|
};
|
|
@@ -16997,15 +17096,16 @@ var RichText = ({
|
|
|
16997
17096
|
customControls,
|
|
16998
17097
|
onInsertTable,
|
|
16999
17098
|
onInsertAsset,
|
|
17000
|
-
minimalInteractivity
|
|
17099
|
+
minimalInteractivity,
|
|
17100
|
+
placeholder
|
|
17001
17101
|
}) => {
|
|
17002
17102
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
17003
|
-
(0,
|
|
17103
|
+
(0, import_react160.useEffect)(() => {
|
|
17004
17104
|
if (onRichTextInit) {
|
|
17005
17105
|
onRichTextInit(editor);
|
|
17006
17106
|
}
|
|
17007
17107
|
}, [editor, onRichTextInit]);
|
|
17008
|
-
(0,
|
|
17108
|
+
(0, import_react160.useEffect)(() => {
|
|
17009
17109
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
17010
17110
|
requestAnimationFrame(() => {
|
|
17011
17111
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -17022,23 +17122,23 @@ var RichText = ({
|
|
|
17022
17122
|
removeUpdateListener();
|
|
17023
17123
|
};
|
|
17024
17124
|
}, [editor, onChange]);
|
|
17025
|
-
(0,
|
|
17125
|
+
(0, import_react160.useEffect)(() => {
|
|
17026
17126
|
editor.setEditable(!readOnly);
|
|
17027
17127
|
}, [editor, readOnly]);
|
|
17028
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
17128
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react160.useState)(null);
|
|
17029
17129
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
17030
17130
|
if (_editorContainerRef !== null) {
|
|
17031
17131
|
setEditorContainerRef(_editorContainerRef);
|
|
17032
17132
|
}
|
|
17033
17133
|
};
|
|
17034
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
17134
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react160.useState)(null);
|
|
17035
17135
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
17036
17136
|
if (_portalContainerRef !== null) {
|
|
17037
17137
|
setPortalContainerRef(_portalContainerRef);
|
|
17038
17138
|
}
|
|
17039
17139
|
};
|
|
17040
|
-
return /* @__PURE__ */ (0,
|
|
17041
|
-
readOnly || minimalInteractivity ? null : /* @__PURE__ */ (0,
|
|
17140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
17141
|
+
readOnly || minimalInteractivity ? null : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17042
17142
|
RichTextToolbar_default,
|
|
17043
17143
|
{
|
|
17044
17144
|
config,
|
|
@@ -17047,8 +17147,8 @@ var RichText = ({
|
|
|
17047
17147
|
onInsertAsset
|
|
17048
17148
|
}
|
|
17049
17149
|
),
|
|
17050
|
-
/* @__PURE__ */ (0,
|
|
17051
|
-
/* @__PURE__ */ (0,
|
|
17150
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
|
|
17151
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
17052
17152
|
"div",
|
|
17053
17153
|
{
|
|
17054
17154
|
css: editorContainer,
|
|
@@ -17056,33 +17156,33 @@ var RichText = ({
|
|
|
17056
17156
|
ref: onEditorContainerRef,
|
|
17057
17157
|
"data-testid": "value-container",
|
|
17058
17158
|
children: [
|
|
17059
|
-
/* @__PURE__ */ (0,
|
|
17159
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17060
17160
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
17061
17161
|
{
|
|
17062
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
17063
|
-
placeholder: /* @__PURE__ */ (0,
|
|
17162
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
17163
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
|
|
17064
17164
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
17065
17165
|
}
|
|
17066
17166
|
),
|
|
17067
|
-
/* @__PURE__ */ (0,
|
|
17068
|
-
/* @__PURE__ */ (0,
|
|
17069
|
-
/* @__PURE__ */ (0,
|
|
17070
|
-
/* @__PURE__ */ (0,
|
|
17167
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
17168
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
17169
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalTablePlugin.TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
|
|
17170
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17071
17171
|
TableActionMenuPlugin,
|
|
17072
17172
|
{
|
|
17073
17173
|
positioningAnchorEl: editorContainerRef,
|
|
17074
17174
|
menuPortalEl: portalContainerRef
|
|
17075
17175
|
}
|
|
17076
17176
|
) : null }),
|
|
17077
|
-
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0,
|
|
17078
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
17079
|
-
/* @__PURE__ */ (0,
|
|
17080
|
-
/* @__PURE__ */ (0,
|
|
17177
|
+
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
|
|
17178
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
17179
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(DisableStylesPlugin, {}),
|
|
17180
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
|
|
17081
17181
|
]
|
|
17082
17182
|
}
|
|
17083
17183
|
),
|
|
17084
|
-
/* @__PURE__ */ (0,
|
|
17085
|
-
editorContainerRef ? /* @__PURE__ */ (0,
|
|
17184
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children }),
|
|
17185
|
+
editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17086
17186
|
LinkNodePlugin,
|
|
17087
17187
|
{
|
|
17088
17188
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -17093,26 +17193,26 @@ var RichText = ({
|
|
|
17093
17193
|
positioningAnchorEl: editorContainerRef
|
|
17094
17194
|
}
|
|
17095
17195
|
) : null,
|
|
17096
|
-
/* @__PURE__ */ (0,
|
|
17097
|
-
/* @__PURE__ */ (0,
|
|
17196
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TableSelectionPlugin_default, {}),
|
|
17197
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ImprovedAssetSelectionPlugin_default, {})
|
|
17098
17198
|
] })
|
|
17099
17199
|
] });
|
|
17100
17200
|
};
|
|
17101
17201
|
|
|
17102
17202
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
17103
17203
|
init_emotion_jsx_shim();
|
|
17104
|
-
var
|
|
17105
|
-
var
|
|
17106
|
-
var ParameterSelect = (0,
|
|
17204
|
+
var import_react161 = require("react");
|
|
17205
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
17206
|
+
var ParameterSelect = (0, import_react161.forwardRef)(
|
|
17107
17207
|
({ defaultOption, options, ...props }, ref) => {
|
|
17108
17208
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17109
|
-
return /* @__PURE__ */ (0,
|
|
17209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
17110
17210
|
}
|
|
17111
17211
|
);
|
|
17112
|
-
var ParameterSelectInner = (0,
|
|
17212
|
+
var ParameterSelectInner = (0, import_react161.forwardRef)(
|
|
17113
17213
|
({ defaultOption, options, ...props }, ref) => {
|
|
17114
17214
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17115
|
-
return /* @__PURE__ */ (0,
|
|
17215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
17116
17216
|
"select",
|
|
17117
17217
|
{
|
|
17118
17218
|
css: [input3, selectInput],
|
|
@@ -17121,10 +17221,10 @@ var ParameterSelectInner = (0, import_react159.forwardRef)(
|
|
|
17121
17221
|
ref,
|
|
17122
17222
|
...props,
|
|
17123
17223
|
children: [
|
|
17124
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
17224
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
17125
17225
|
options.map((option) => {
|
|
17126
17226
|
var _a;
|
|
17127
|
-
return /* @__PURE__ */ (0,
|
|
17227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
17128
17228
|
})
|
|
17129
17229
|
]
|
|
17130
17230
|
}
|
|
@@ -17134,15 +17234,15 @@ var ParameterSelectInner = (0, import_react159.forwardRef)(
|
|
|
17134
17234
|
|
|
17135
17235
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
17136
17236
|
init_emotion_jsx_shim();
|
|
17137
|
-
var
|
|
17138
|
-
var
|
|
17139
|
-
var ParameterTextarea = (0,
|
|
17237
|
+
var import_react162 = require("react");
|
|
17238
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
17239
|
+
var ParameterTextarea = (0, import_react162.forwardRef)((props, ref) => {
|
|
17140
17240
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17141
|
-
return /* @__PURE__ */ (0,
|
|
17241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
17142
17242
|
});
|
|
17143
|
-
var ParameterTextareaInner = (0,
|
|
17243
|
+
var ParameterTextareaInner = (0, import_react162.forwardRef)(({ ...props }, ref) => {
|
|
17144
17244
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17145
|
-
return /* @__PURE__ */ (0,
|
|
17245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17146
17246
|
"textarea",
|
|
17147
17247
|
{
|
|
17148
17248
|
css: [input3, textarea2],
|
|
@@ -17156,18 +17256,18 @@ var ParameterTextareaInner = (0, import_react160.forwardRef)(({ ...props }, ref)
|
|
|
17156
17256
|
|
|
17157
17257
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
17158
17258
|
init_emotion_jsx_shim();
|
|
17159
|
-
var
|
|
17160
|
-
var
|
|
17161
|
-
var ParameterToggle = (0,
|
|
17259
|
+
var import_react163 = require("react");
|
|
17260
|
+
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
17261
|
+
var ParameterToggle = (0, import_react163.forwardRef)((props, ref) => {
|
|
17162
17262
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17163
|
-
return /* @__PURE__ */ (0,
|
|
17263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
17164
17264
|
});
|
|
17165
|
-
var ParameterToggleInner = (0,
|
|
17265
|
+
var ParameterToggleInner = (0, import_react163.forwardRef)(
|
|
17166
17266
|
({ children, ...props }, ref) => {
|
|
17167
17267
|
const { id, label } = useParameterShell();
|
|
17168
|
-
return /* @__PURE__ */ (0,
|
|
17169
|
-
/* @__PURE__ */ (0,
|
|
17170
|
-
/* @__PURE__ */ (0,
|
|
17268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
17269
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
17270
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { css: inlineLabel2, children: label }),
|
|
17171
17271
|
children
|
|
17172
17272
|
] });
|
|
17173
17273
|
}
|
|
@@ -17178,8 +17278,8 @@ init_emotion_jsx_shim();
|
|
|
17178
17278
|
|
|
17179
17279
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
17180
17280
|
init_emotion_jsx_shim();
|
|
17181
|
-
var
|
|
17182
|
-
var container3 =
|
|
17281
|
+
var import_react164 = require("@emotion/react");
|
|
17282
|
+
var container3 = import_react164.css`
|
|
17183
17283
|
background: var(--gray-50);
|
|
17184
17284
|
margin-block: var(--spacing-sm);
|
|
17185
17285
|
position: relative;
|
|
@@ -17189,17 +17289,17 @@ var container3 = import_react162.css`
|
|
|
17189
17289
|
border: solid 1px var(--gray-300);
|
|
17190
17290
|
`;
|
|
17191
17291
|
var themeMap = {
|
|
17192
|
-
primary:
|
|
17292
|
+
primary: import_react164.css`
|
|
17193
17293
|
--progress-color: var(--accent-light);
|
|
17194
17294
|
`,
|
|
17195
|
-
secondary:
|
|
17295
|
+
secondary: import_react164.css`
|
|
17196
17296
|
--progress-color: var(--accent-alt-light);
|
|
17197
17297
|
`,
|
|
17198
|
-
destructive:
|
|
17298
|
+
destructive: import_react164.css`
|
|
17199
17299
|
--progress-color: var(--brand-secondary-5);
|
|
17200
17300
|
`
|
|
17201
17301
|
};
|
|
17202
|
-
var slidingBackgroundPosition =
|
|
17302
|
+
var slidingBackgroundPosition = import_react164.keyframes`
|
|
17203
17303
|
from {
|
|
17204
17304
|
background-position: 0 0;
|
|
17205
17305
|
}
|
|
@@ -17207,10 +17307,10 @@ var slidingBackgroundPosition = import_react162.keyframes`
|
|
|
17207
17307
|
background-position: 64px 0;
|
|
17208
17308
|
}
|
|
17209
17309
|
`;
|
|
17210
|
-
var determinate =
|
|
17310
|
+
var determinate = import_react164.css`
|
|
17211
17311
|
background-color: var(--progress-color);
|
|
17212
17312
|
`;
|
|
17213
|
-
var indeterminate =
|
|
17313
|
+
var indeterminate = import_react164.css`
|
|
17214
17314
|
background-image: linear-gradient(
|
|
17215
17315
|
45deg,
|
|
17216
17316
|
var(--progress-color) 25%,
|
|
@@ -17224,7 +17324,7 @@ var indeterminate = import_react162.css`
|
|
|
17224
17324
|
background-size: 64px 64px;
|
|
17225
17325
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
17226
17326
|
`;
|
|
17227
|
-
var bar =
|
|
17327
|
+
var bar = import_react164.css`
|
|
17228
17328
|
position: absolute;
|
|
17229
17329
|
inset: 0;
|
|
17230
17330
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -17232,7 +17332,7 @@ var bar = import_react162.css`
|
|
|
17232
17332
|
`;
|
|
17233
17333
|
|
|
17234
17334
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
17235
|
-
var
|
|
17335
|
+
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
17236
17336
|
function ProgressBar({
|
|
17237
17337
|
current,
|
|
17238
17338
|
max,
|
|
@@ -17242,7 +17342,7 @@ function ProgressBar({
|
|
|
17242
17342
|
}) {
|
|
17243
17343
|
const valueNow = Math.min(current, max);
|
|
17244
17344
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
17245
|
-
return /* @__PURE__ */ (0,
|
|
17345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
17246
17346
|
"div",
|
|
17247
17347
|
{
|
|
17248
17348
|
css: container3,
|
|
@@ -17253,7 +17353,7 @@ function ProgressBar({
|
|
|
17253
17353
|
"aria-valuemax": max,
|
|
17254
17354
|
"aria-valuenow": valueNow,
|
|
17255
17355
|
...props,
|
|
17256
|
-
children: /* @__PURE__ */ (0,
|
|
17356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
17257
17357
|
"div",
|
|
17258
17358
|
{
|
|
17259
17359
|
css: [
|
|
@@ -17273,31 +17373,31 @@ function ProgressBar({
|
|
|
17273
17373
|
|
|
17274
17374
|
// src/components/ProgressList/ProgressList.tsx
|
|
17275
17375
|
init_emotion_jsx_shim();
|
|
17276
|
-
var
|
|
17376
|
+
var import_react166 = require("@emotion/react");
|
|
17277
17377
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
17278
17378
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
17279
17379
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
17280
|
-
var
|
|
17380
|
+
var import_react167 = require("react");
|
|
17281
17381
|
|
|
17282
17382
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
17283
17383
|
init_emotion_jsx_shim();
|
|
17284
|
-
var
|
|
17285
|
-
var progressListStyles =
|
|
17384
|
+
var import_react165 = require("@emotion/react");
|
|
17385
|
+
var progressListStyles = import_react165.css`
|
|
17286
17386
|
display: flex;
|
|
17287
17387
|
flex-direction: column;
|
|
17288
17388
|
gap: var(--spacing-sm);
|
|
17289
17389
|
list-style-type: none;
|
|
17290
17390
|
`;
|
|
17291
|
-
var progressListItemStyles =
|
|
17391
|
+
var progressListItemStyles = import_react165.css`
|
|
17292
17392
|
display: flex;
|
|
17293
17393
|
gap: var(--spacing-base);
|
|
17294
17394
|
align-items: center;
|
|
17295
17395
|
`;
|
|
17296
17396
|
|
|
17297
17397
|
// src/components/ProgressList/ProgressList.tsx
|
|
17298
|
-
var
|
|
17398
|
+
var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
|
|
17299
17399
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
17300
|
-
const itemsWithStatus = (0,
|
|
17400
|
+
const itemsWithStatus = (0, import_react167.useMemo)(() => {
|
|
17301
17401
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
17302
17402
|
return items.map((item, index) => {
|
|
17303
17403
|
let status = "queued";
|
|
@@ -17309,8 +17409,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
17309
17409
|
return { ...item, status };
|
|
17310
17410
|
});
|
|
17311
17411
|
}, [items, inProgressId]);
|
|
17312
|
-
return /* @__PURE__ */ (0,
|
|
17313
|
-
return /* @__PURE__ */ (0,
|
|
17412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
17413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
17314
17414
|
ProgressListItem,
|
|
17315
17415
|
{
|
|
17316
17416
|
status,
|
|
@@ -17330,7 +17430,7 @@ var ProgressListItem = ({
|
|
|
17330
17430
|
errorLevel = "danger",
|
|
17331
17431
|
autoEllipsis = false
|
|
17332
17432
|
}) => {
|
|
17333
|
-
const icon = (0,
|
|
17433
|
+
const icon = (0, import_react167.useMemo)(() => {
|
|
17334
17434
|
if (error) {
|
|
17335
17435
|
return warningIcon;
|
|
17336
17436
|
}
|
|
@@ -17341,14 +17441,14 @@ var ProgressListItem = ({
|
|
|
17341
17441
|
};
|
|
17342
17442
|
return iconPerStatus[status];
|
|
17343
17443
|
}, [status, error]);
|
|
17344
|
-
const statusStyles = (0,
|
|
17444
|
+
const statusStyles = (0, import_react167.useMemo)(() => {
|
|
17345
17445
|
if (error) {
|
|
17346
|
-
return errorLevel === "caution" ?
|
|
17446
|
+
return errorLevel === "caution" ? import_react166.css`
|
|
17347
17447
|
color: rgb(161, 98, 7);
|
|
17348
17448
|
& svg {
|
|
17349
17449
|
color: rgb(250, 204, 21);
|
|
17350
17450
|
}
|
|
17351
|
-
` :
|
|
17451
|
+
` : import_react166.css`
|
|
17352
17452
|
color: rgb(185, 28, 28);
|
|
17353
17453
|
& svg {
|
|
17354
17454
|
color: var(--brand-primary-2);
|
|
@@ -17356,40 +17456,40 @@ var ProgressListItem = ({
|
|
|
17356
17456
|
`;
|
|
17357
17457
|
}
|
|
17358
17458
|
const colorPerStatus = {
|
|
17359
|
-
completed:
|
|
17459
|
+
completed: import_react166.css`
|
|
17360
17460
|
opacity: 0.75;
|
|
17361
17461
|
`,
|
|
17362
|
-
inProgress:
|
|
17462
|
+
inProgress: import_react166.css`
|
|
17363
17463
|
-webkit-text-stroke-width: thin;
|
|
17364
17464
|
`,
|
|
17365
|
-
queued:
|
|
17465
|
+
queued: import_react166.css`
|
|
17366
17466
|
opacity: 0.5;
|
|
17367
17467
|
`
|
|
17368
17468
|
};
|
|
17369
17469
|
return colorPerStatus[status];
|
|
17370
17470
|
}, [status, error, errorLevel]);
|
|
17371
|
-
return /* @__PURE__ */ (0,
|
|
17372
|
-
/* @__PURE__ */ (0,
|
|
17373
|
-
/* @__PURE__ */ (0,
|
|
17471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
17472
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
17473
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { children: [
|
|
17374
17474
|
children,
|
|
17375
|
-
/* @__PURE__ */ (0,
|
|
17475
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
17376
17476
|
] })
|
|
17377
17477
|
] });
|
|
17378
17478
|
};
|
|
17379
17479
|
|
|
17380
17480
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17381
17481
|
init_emotion_jsx_shim();
|
|
17382
|
-
var
|
|
17482
|
+
var import_react169 = require("@emotion/react");
|
|
17383
17483
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
17384
|
-
var
|
|
17484
|
+
var import_react170 = require("react");
|
|
17385
17485
|
|
|
17386
17486
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
17387
17487
|
init_emotion_jsx_shim();
|
|
17388
|
-
var
|
|
17389
|
-
var segmentedControlRootStyles =
|
|
17488
|
+
var import_react168 = require("@emotion/react");
|
|
17489
|
+
var segmentedControlRootStyles = import_react168.css`
|
|
17390
17490
|
position: relative;
|
|
17391
17491
|
`;
|
|
17392
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
17492
|
+
var segmentedControlScrollIndicatorsStyles = import_react168.css`
|
|
17393
17493
|
position: absolute;
|
|
17394
17494
|
inset: 0;
|
|
17395
17495
|
z-index: 1;
|
|
@@ -17417,17 +17517,17 @@ var segmentedControlScrollIndicatorsStyles = import_react166.css`
|
|
|
17417
17517
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
17418
17518
|
}
|
|
17419
17519
|
`;
|
|
17420
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
17520
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react168.css`
|
|
17421
17521
|
&::before {
|
|
17422
17522
|
opacity: 1;
|
|
17423
17523
|
}
|
|
17424
17524
|
`;
|
|
17425
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
17525
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react168.css`
|
|
17426
17526
|
&::after {
|
|
17427
17527
|
opacity: 1;
|
|
17428
17528
|
}
|
|
17429
17529
|
`;
|
|
17430
|
-
var segmentedControlWrapperStyles =
|
|
17530
|
+
var segmentedControlWrapperStyles = import_react168.css`
|
|
17431
17531
|
overflow-y: auto;
|
|
17432
17532
|
scroll-behavior: smooth;
|
|
17433
17533
|
scrollbar-width: none;
|
|
@@ -17436,7 +17536,7 @@ var segmentedControlWrapperStyles = import_react166.css`
|
|
|
17436
17536
|
height: 0px;
|
|
17437
17537
|
}
|
|
17438
17538
|
`;
|
|
17439
|
-
var segmentedControlStyles =
|
|
17539
|
+
var segmentedControlStyles = import_react168.css`
|
|
17440
17540
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
17441
17541
|
--segmented-control-border-width: 1px;
|
|
17442
17542
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -17455,14 +17555,14 @@ var segmentedControlStyles = import_react166.css`
|
|
|
17455
17555
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
17456
17556
|
font-size: var(--fs-xs);
|
|
17457
17557
|
`;
|
|
17458
|
-
var segmentedControlVerticalStyles =
|
|
17558
|
+
var segmentedControlVerticalStyles = import_react168.css`
|
|
17459
17559
|
flex-direction: column;
|
|
17460
17560
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
17461
17561
|
var(--segmented-control-rounded-value) 0 0;
|
|
17462
17562
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
17463
17563
|
var(--segmented-control-rounded-value);
|
|
17464
17564
|
`;
|
|
17465
|
-
var segmentedControlItemStyles =
|
|
17565
|
+
var segmentedControlItemStyles = import_react168.css`
|
|
17466
17566
|
&:first-of-type label {
|
|
17467
17567
|
border-radius: var(--segmented-control-first-border-radius);
|
|
17468
17568
|
}
|
|
@@ -17470,10 +17570,10 @@ var segmentedControlItemStyles = import_react166.css`
|
|
|
17470
17570
|
border-radius: var(--segmented-control-last-border-radius);
|
|
17471
17571
|
}
|
|
17472
17572
|
`;
|
|
17473
|
-
var segmentedControlInputStyles =
|
|
17573
|
+
var segmentedControlInputStyles = import_react168.css`
|
|
17474
17574
|
${accessibleHidden}
|
|
17475
17575
|
`;
|
|
17476
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
17576
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react168.css`
|
|
17477
17577
|
position: relative;
|
|
17478
17578
|
display: flex;
|
|
17479
17579
|
align-items: center;
|
|
@@ -17537,25 +17637,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react166.css`
|
|
|
17537
17637
|
`}
|
|
17538
17638
|
}
|
|
17539
17639
|
`;
|
|
17540
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
17640
|
+
var segmentedControlLabelIconOnlyStyles = import_react168.css`
|
|
17541
17641
|
padding-inline: 0.5em;
|
|
17542
17642
|
`;
|
|
17543
|
-
var segmentedControlLabelCheckStyles =
|
|
17643
|
+
var segmentedControlLabelCheckStyles = import_react168.css`
|
|
17544
17644
|
opacity: 0.5;
|
|
17545
17645
|
`;
|
|
17546
|
-
var segmentedControlLabelContentStyles =
|
|
17646
|
+
var segmentedControlLabelContentStyles = import_react168.css`
|
|
17547
17647
|
display: flex;
|
|
17548
17648
|
align-items: center;
|
|
17549
17649
|
justify-content: center;
|
|
17550
17650
|
gap: var(--spacing-sm);
|
|
17551
17651
|
height: 100%;
|
|
17552
17652
|
`;
|
|
17553
|
-
var segmentedControlLabelTextStyles =
|
|
17653
|
+
var segmentedControlLabelTextStyles = import_react168.css`
|
|
17554
17654
|
white-space: nowrap;
|
|
17555
17655
|
`;
|
|
17556
17656
|
|
|
17557
17657
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17558
|
-
var
|
|
17658
|
+
var import_jsx_runtime137 = require("@emotion/react/jsx-runtime");
|
|
17559
17659
|
var SegmentedControl = ({
|
|
17560
17660
|
name,
|
|
17561
17661
|
options,
|
|
@@ -17570,10 +17670,10 @@ var SegmentedControl = ({
|
|
|
17570
17670
|
currentBackgroundColor = "white",
|
|
17571
17671
|
...props
|
|
17572
17672
|
}) => {
|
|
17573
|
-
const wrapperRef = (0,
|
|
17574
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
17575
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
17576
|
-
const onOptionChange = (0,
|
|
17673
|
+
const wrapperRef = (0, import_react170.useRef)(null);
|
|
17674
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react170.useState)(false);
|
|
17675
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react170.useState)(false);
|
|
17676
|
+
const onOptionChange = (0, import_react170.useCallback)(
|
|
17577
17677
|
(event) => {
|
|
17578
17678
|
if (event.target.checked) {
|
|
17579
17679
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -17581,19 +17681,19 @@ var SegmentedControl = ({
|
|
|
17581
17681
|
},
|
|
17582
17682
|
[options, onChange]
|
|
17583
17683
|
);
|
|
17584
|
-
const sizeStyles = (0,
|
|
17684
|
+
const sizeStyles = (0, import_react170.useMemo)(() => {
|
|
17585
17685
|
const map = {
|
|
17586
|
-
sm: (0,
|
|
17587
|
-
md: (0,
|
|
17588
|
-
lg: (0,
|
|
17589
|
-
xl: (0,
|
|
17686
|
+
sm: (0, import_react169.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
17687
|
+
md: (0, import_react169.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
17688
|
+
lg: (0, import_react169.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
17689
|
+
xl: (0, import_react169.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
17590
17690
|
};
|
|
17591
17691
|
return map[size];
|
|
17592
17692
|
}, [size]);
|
|
17593
|
-
const isIconOnly = (0,
|
|
17693
|
+
const isIconOnly = (0, import_react170.useMemo)(() => {
|
|
17594
17694
|
return options.every((option) => option && option.icon && !option.label);
|
|
17595
17695
|
}, [options]);
|
|
17596
|
-
(0,
|
|
17696
|
+
(0, import_react170.useEffect)(() => {
|
|
17597
17697
|
const wrapperElement = wrapperRef.current;
|
|
17598
17698
|
const onScroll = () => {
|
|
17599
17699
|
if (!wrapperElement) {
|
|
@@ -17614,8 +17714,8 @@ var SegmentedControl = ({
|
|
|
17614
17714
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
17615
17715
|
};
|
|
17616
17716
|
}, []);
|
|
17617
|
-
return /* @__PURE__ */ (0,
|
|
17618
|
-
/* @__PURE__ */ (0,
|
|
17717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
17718
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
17619
17719
|
"div",
|
|
17620
17720
|
{
|
|
17621
17721
|
css: [
|
|
@@ -17632,12 +17732,12 @@ var SegmentedControl = ({
|
|
|
17632
17732
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
17633
17733
|
const isDisabled = disabled2 || option.disabled;
|
|
17634
17734
|
const isChecked = option.value === value;
|
|
17635
|
-
return /* @__PURE__ */ (0,
|
|
17735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
17636
17736
|
"div",
|
|
17637
17737
|
{
|
|
17638
17738
|
css: segmentedControlItemStyles,
|
|
17639
17739
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
17640
|
-
children: /* @__PURE__ */ (0,
|
|
17740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
17641
17741
|
"label",
|
|
17642
17742
|
{
|
|
17643
17743
|
css: [
|
|
@@ -17646,7 +17746,7 @@ var SegmentedControl = ({
|
|
|
17646
17746
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17647
17747
|
],
|
|
17648
17748
|
children: [
|
|
17649
|
-
/* @__PURE__ */ (0,
|
|
17749
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
17650
17750
|
"input",
|
|
17651
17751
|
{
|
|
17652
17752
|
css: segmentedControlInputStyles,
|
|
@@ -17658,10 +17758,10 @@ var SegmentedControl = ({
|
|
|
17658
17758
|
disabled: isDisabled
|
|
17659
17759
|
}
|
|
17660
17760
|
),
|
|
17661
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
17662
|
-
/* @__PURE__ */ (0,
|
|
17663
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
17664
|
-
!text || hideOptionText ? null : /* @__PURE__ */ (0,
|
|
17761
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
17762
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
17763
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
17764
|
+
!text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
17665
17765
|
] })
|
|
17666
17766
|
]
|
|
17667
17767
|
}
|
|
@@ -17671,7 +17771,7 @@ var SegmentedControl = ({
|
|
|
17671
17771
|
})
|
|
17672
17772
|
}
|
|
17673
17773
|
) }),
|
|
17674
|
-
/* @__PURE__ */ (0,
|
|
17774
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
17675
17775
|
"div",
|
|
17676
17776
|
{
|
|
17677
17777
|
css: [
|
|
@@ -17689,18 +17789,18 @@ init_emotion_jsx_shim();
|
|
|
17689
17789
|
|
|
17690
17790
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
17691
17791
|
init_emotion_jsx_shim();
|
|
17692
|
-
var
|
|
17693
|
-
var lightFadingOut =
|
|
17792
|
+
var import_react171 = require("@emotion/react");
|
|
17793
|
+
var lightFadingOut = import_react171.keyframes`
|
|
17694
17794
|
from { opacity: 0.1; }
|
|
17695
17795
|
to { opacity: 0.025; }
|
|
17696
17796
|
`;
|
|
17697
|
-
var skeletonStyles =
|
|
17797
|
+
var skeletonStyles = import_react171.css`
|
|
17698
17798
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
17699
17799
|
background-color: var(--gray-900);
|
|
17700
17800
|
`;
|
|
17701
17801
|
|
|
17702
17802
|
// src/components/Skeleton/Skeleton.tsx
|
|
17703
|
-
var
|
|
17803
|
+
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
17704
17804
|
var Skeleton = ({
|
|
17705
17805
|
width = "100%",
|
|
17706
17806
|
height = "1.25rem",
|
|
@@ -17708,7 +17808,7 @@ var Skeleton = ({
|
|
|
17708
17808
|
circle = false,
|
|
17709
17809
|
children,
|
|
17710
17810
|
...otherProps
|
|
17711
|
-
}) => /* @__PURE__ */ (0,
|
|
17811
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
17712
17812
|
"div",
|
|
17713
17813
|
{
|
|
17714
17814
|
css: [
|
|
@@ -17732,12 +17832,12 @@ init_emotion_jsx_shim();
|
|
|
17732
17832
|
|
|
17733
17833
|
// src/components/Spinner/Spinner.tsx
|
|
17734
17834
|
init_emotion_jsx_shim();
|
|
17735
|
-
var
|
|
17835
|
+
var import_react173 = require("react");
|
|
17736
17836
|
|
|
17737
17837
|
// src/components/Spinner/Spinner.styles.ts
|
|
17738
17838
|
init_emotion_jsx_shim();
|
|
17739
|
-
var
|
|
17740
|
-
var SpinnerStyles =
|
|
17839
|
+
var import_react172 = require("@emotion/react");
|
|
17840
|
+
var SpinnerStyles = import_react172.css`
|
|
17741
17841
|
--color: #00b4ff;
|
|
17742
17842
|
--speed: 5s;
|
|
17743
17843
|
--red: rgb(218, 63, 50);
|
|
@@ -18167,18 +18267,18 @@ var SpinnerStyles = import_react170.css`
|
|
|
18167
18267
|
`;
|
|
18168
18268
|
|
|
18169
18269
|
// src/components/Spinner/Spinner.tsx
|
|
18170
|
-
var
|
|
18270
|
+
var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
|
|
18171
18271
|
var Spinner = ({
|
|
18172
18272
|
width,
|
|
18173
18273
|
label,
|
|
18174
18274
|
isPaused
|
|
18175
18275
|
}) => {
|
|
18176
|
-
const ref = (0,
|
|
18177
|
-
(0,
|
|
18276
|
+
const ref = (0, import_react173.useRef)(null);
|
|
18277
|
+
(0, import_react173.useEffect)(() => {
|
|
18178
18278
|
var _a, _b, _c;
|
|
18179
18279
|
(_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
|
|
18180
18280
|
}, [width]);
|
|
18181
|
-
return /* @__PURE__ */ (0,
|
|
18281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
18182
18282
|
"div",
|
|
18183
18283
|
{
|
|
18184
18284
|
ref,
|
|
@@ -18190,51 +18290,51 @@ var Spinner = ({
|
|
|
18190
18290
|
css: SpinnerStyles,
|
|
18191
18291
|
className: `container${isPaused ? " paused" : ""}`,
|
|
18192
18292
|
children: [
|
|
18193
|
-
/* @__PURE__ */ (0,
|
|
18194
|
-
/* @__PURE__ */ (0,
|
|
18195
|
-
/* @__PURE__ */ (0,
|
|
18196
|
-
/* @__PURE__ */ (0,
|
|
18197
|
-
/* @__PURE__ */ (0,
|
|
18198
|
-
/* @__PURE__ */ (0,
|
|
18199
|
-
/* @__PURE__ */ (0,
|
|
18200
|
-
/* @__PURE__ */ (0,
|
|
18201
|
-
/* @__PURE__ */ (0,
|
|
18202
|
-
/* @__PURE__ */ (0,
|
|
18293
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "pyramid-container", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "pyramid top", children: [
|
|
18294
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side one" }),
|
|
18295
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side two" }),
|
|
18296
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side three" }),
|
|
18297
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side four" }),
|
|
18298
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "bottom-pyramid", children: [
|
|
18299
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side five" }),
|
|
18300
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side six" }),
|
|
18301
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side seven" }),
|
|
18302
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "side eight" })
|
|
18203
18303
|
] })
|
|
18204
18304
|
] }) }),
|
|
18205
|
-
/* @__PURE__ */ (0,
|
|
18206
|
-
/* @__PURE__ */ (0,
|
|
18207
|
-
/* @__PURE__ */ (0,
|
|
18208
|
-
/* @__PURE__ */ (0,
|
|
18209
|
-
/* @__PURE__ */ (0,
|
|
18210
|
-
/* @__PURE__ */ (0,
|
|
18211
|
-
/* @__PURE__ */ (0,
|
|
18305
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "turning-circle" }),
|
|
18306
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "pulsating-star delay-top-right", children: [
|
|
18307
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-center" }),
|
|
18308
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-top" }),
|
|
18309
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-bottom" }),
|
|
18310
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-left" }),
|
|
18311
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-right" })
|
|
18212
18312
|
] }),
|
|
18213
|
-
/* @__PURE__ */ (0,
|
|
18214
|
-
/* @__PURE__ */ (0,
|
|
18215
|
-
/* @__PURE__ */ (0,
|
|
18216
|
-
/* @__PURE__ */ (0,
|
|
18217
|
-
/* @__PURE__ */ (0,
|
|
18218
|
-
/* @__PURE__ */ (0,
|
|
18313
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "pulsating-star delay-top-left-2", children: [
|
|
18314
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-center" }),
|
|
18315
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-top" }),
|
|
18316
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-bottom" }),
|
|
18317
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-left" }),
|
|
18318
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-right" })
|
|
18219
18319
|
] }),
|
|
18220
|
-
/* @__PURE__ */ (0,
|
|
18221
|
-
/* @__PURE__ */ (0,
|
|
18222
|
-
/* @__PURE__ */ (0,
|
|
18223
|
-
/* @__PURE__ */ (0,
|
|
18224
|
-
/* @__PURE__ */ (0,
|
|
18320
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "pulsating-star delay-top-left", children: [
|
|
18321
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-top" }),
|
|
18322
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-bottom" }),
|
|
18323
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-left" }),
|
|
18324
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-right" })
|
|
18225
18325
|
] }),
|
|
18226
|
-
/* @__PURE__ */ (0,
|
|
18227
|
-
/* @__PURE__ */ (0,
|
|
18228
|
-
/* @__PURE__ */ (0,
|
|
18229
|
-
/* @__PURE__ */ (0,
|
|
18230
|
-
/* @__PURE__ */ (0,
|
|
18326
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "pulsating-star delay-bottom-right", children: [
|
|
18327
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-top" }),
|
|
18328
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-bottom" }),
|
|
18329
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-left" }),
|
|
18330
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-right" })
|
|
18231
18331
|
] }),
|
|
18232
|
-
/* @__PURE__ */ (0,
|
|
18233
|
-
/* @__PURE__ */ (0,
|
|
18234
|
-
/* @__PURE__ */ (0,
|
|
18235
|
-
/* @__PURE__ */ (0,
|
|
18236
|
-
/* @__PURE__ */ (0,
|
|
18237
|
-
/* @__PURE__ */ (0,
|
|
18332
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "pulsating-star delay-bottom-left", children: [
|
|
18333
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-center" }),
|
|
18334
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-top" }),
|
|
18335
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-bottom" }),
|
|
18336
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-left" }),
|
|
18337
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "star-inner star-right" })
|
|
18238
18338
|
] })
|
|
18239
18339
|
]
|
|
18240
18340
|
}
|
|
@@ -18243,12 +18343,12 @@ var Spinner = ({
|
|
|
18243
18343
|
|
|
18244
18344
|
// src/components/Switch/Switch.tsx
|
|
18245
18345
|
init_emotion_jsx_shim();
|
|
18246
|
-
var
|
|
18346
|
+
var import_react175 = require("react");
|
|
18247
18347
|
|
|
18248
18348
|
// src/components/Switch/Switch.styles.ts
|
|
18249
18349
|
init_emotion_jsx_shim();
|
|
18250
|
-
var
|
|
18251
|
-
var SwitchInputContainer =
|
|
18350
|
+
var import_react174 = require("@emotion/react");
|
|
18351
|
+
var SwitchInputContainer = import_react174.css`
|
|
18252
18352
|
cursor: pointer;
|
|
18253
18353
|
display: inline-flex;
|
|
18254
18354
|
position: relative;
|
|
@@ -18258,7 +18358,7 @@ var SwitchInputContainer = import_react172.css`
|
|
|
18258
18358
|
user-select: none;
|
|
18259
18359
|
z-index: 0;
|
|
18260
18360
|
`;
|
|
18261
|
-
var SwitchInput = (size) =>
|
|
18361
|
+
var SwitchInput = (size) => import_react174.css`
|
|
18262
18362
|
appearance: none;
|
|
18263
18363
|
border-radius: var(--rounded-full);
|
|
18264
18364
|
background-color: var(--white);
|
|
@@ -18297,18 +18397,18 @@ var SwitchInput = (size) => import_react172.css`
|
|
|
18297
18397
|
cursor: not-allowed;
|
|
18298
18398
|
}
|
|
18299
18399
|
`;
|
|
18300
|
-
var SwitchInputCheckedDirectionLeft =
|
|
18400
|
+
var SwitchInputCheckedDirectionLeft = import_react174.css`
|
|
18301
18401
|
&:checked {
|
|
18302
18402
|
transform: translateX(var(--spacing-base));
|
|
18303
18403
|
}
|
|
18304
18404
|
`;
|
|
18305
|
-
var SwitchInputCheckedDirectionRight =
|
|
18405
|
+
var SwitchInputCheckedDirectionRight = import_react174.css`
|
|
18306
18406
|
transform: translateX(-var(--spacing-base));
|
|
18307
18407
|
&:checked {
|
|
18308
18408
|
transform: translateX(0);
|
|
18309
18409
|
}
|
|
18310
18410
|
`;
|
|
18311
|
-
var SwitchInputDisabled =
|
|
18411
|
+
var SwitchInputDisabled = import_react174.css`
|
|
18312
18412
|
opacity: var(--opacity-50);
|
|
18313
18413
|
cursor: not-allowed;
|
|
18314
18414
|
|
|
@@ -18316,19 +18416,19 @@ var SwitchInputDisabled = import_react172.css`
|
|
|
18316
18416
|
cursor: not-allowed;
|
|
18317
18417
|
}
|
|
18318
18418
|
`;
|
|
18319
|
-
var SwitchInputLabelAlignmentLeft = (size) =>
|
|
18419
|
+
var SwitchInputLabelAlignmentLeft = (size) => import_react174.css`
|
|
18320
18420
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18321
18421
|
&:before {
|
|
18322
18422
|
left: 0;
|
|
18323
18423
|
}
|
|
18324
18424
|
`;
|
|
18325
|
-
var SwitchInputLabelAlignmentRight = (size) =>
|
|
18425
|
+
var SwitchInputLabelAlignmentRight = (size) => import_react174.css`
|
|
18326
18426
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18327
18427
|
&:before {
|
|
18328
18428
|
right: 0;
|
|
18329
18429
|
}
|
|
18330
18430
|
`;
|
|
18331
|
-
var SwitchInputLabel = (size) =>
|
|
18431
|
+
var SwitchInputLabel = (size) => import_react174.css`
|
|
18332
18432
|
align-items: center;
|
|
18333
18433
|
color: var(--typography-base);
|
|
18334
18434
|
display: inline-flex;
|
|
@@ -18348,26 +18448,26 @@ var SwitchInputLabel = (size) => import_react172.css`
|
|
|
18348
18448
|
top: 0;
|
|
18349
18449
|
}
|
|
18350
18450
|
`;
|
|
18351
|
-
var SwitchTextAlignmentLeft = (size) =>
|
|
18451
|
+
var SwitchTextAlignmentLeft = (size) => import_react174.css`
|
|
18352
18452
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18353
18453
|
`;
|
|
18354
|
-
var SwitchTextAlignmentRight = (size) =>
|
|
18454
|
+
var SwitchTextAlignmentRight = (size) => import_react174.css`
|
|
18355
18455
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18356
18456
|
`;
|
|
18357
|
-
var SwitchText =
|
|
18457
|
+
var SwitchText = import_react174.css`
|
|
18358
18458
|
color: var(--gray-500);
|
|
18359
18459
|
font-size: var(--fs-sm);
|
|
18360
18460
|
`;
|
|
18361
|
-
var SwitchInputContainerAlignmentLeft =
|
|
18461
|
+
var SwitchInputContainerAlignmentLeft = import_react174.css`
|
|
18362
18462
|
flex-direction: row;
|
|
18363
18463
|
`;
|
|
18364
|
-
var SwitchInputContainerAlignmentRight =
|
|
18464
|
+
var SwitchInputContainerAlignmentRight = import_react174.css`
|
|
18365
18465
|
flex-direction: row-reverse;
|
|
18366
18466
|
`;
|
|
18367
18467
|
|
|
18368
18468
|
// src/components/Switch/Switch.tsx
|
|
18369
|
-
var
|
|
18370
|
-
var Switch = (0,
|
|
18469
|
+
var import_jsx_runtime140 = require("@emotion/react/jsx-runtime");
|
|
18470
|
+
var Switch = (0, import_react175.forwardRef)(
|
|
18371
18471
|
({
|
|
18372
18472
|
label,
|
|
18373
18473
|
infoText,
|
|
@@ -18378,7 +18478,7 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18378
18478
|
...inputProps
|
|
18379
18479
|
}, ref) => {
|
|
18380
18480
|
let additionalText = infoText;
|
|
18381
|
-
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0,
|
|
18481
|
+
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0, import_react175.useMemo)(() => {
|
|
18382
18482
|
if (alignment === "left") {
|
|
18383
18483
|
return {
|
|
18384
18484
|
SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
|
|
@@ -18395,8 +18495,8 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18395
18495
|
if (infoText && toggleText) {
|
|
18396
18496
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
18397
18497
|
}
|
|
18398
|
-
return /* @__PURE__ */ (0,
|
|
18399
|
-
/* @__PURE__ */ (0,
|
|
18498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
18499
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
18400
18500
|
"label",
|
|
18401
18501
|
{
|
|
18402
18502
|
css: [
|
|
@@ -18406,7 +18506,7 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18406
18506
|
inputProps.disabled ? SwitchInputDisabled : void 0
|
|
18407
18507
|
],
|
|
18408
18508
|
children: [
|
|
18409
|
-
/* @__PURE__ */ (0,
|
|
18509
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
18410
18510
|
"input",
|
|
18411
18511
|
{
|
|
18412
18512
|
type: "checkbox",
|
|
@@ -18415,11 +18515,11 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18415
18515
|
ref
|
|
18416
18516
|
}
|
|
18417
18517
|
),
|
|
18418
|
-
/* @__PURE__ */ (0,
|
|
18518
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { css: [SwitchInputLabel(switchSize), SwitchInputLabelAlignment], children: label })
|
|
18419
18519
|
]
|
|
18420
18520
|
}
|
|
18421
18521
|
),
|
|
18422
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
18522
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
18423
18523
|
"p",
|
|
18424
18524
|
{
|
|
18425
18525
|
css: [
|
|
@@ -18439,8 +18539,8 @@ init_emotion_jsx_shim();
|
|
|
18439
18539
|
|
|
18440
18540
|
// src/components/Table/Table.styles.ts
|
|
18441
18541
|
init_emotion_jsx_shim();
|
|
18442
|
-
var
|
|
18443
|
-
var table = ({ cellPadding = "var(--spacing-sm)" }) =>
|
|
18542
|
+
var import_react176 = require("@emotion/react");
|
|
18543
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react176.css`
|
|
18444
18544
|
border-bottom: 1px solid var(--gray-400);
|
|
18445
18545
|
border-collapse: collapse;
|
|
18446
18546
|
min-width: 100%;
|
|
@@ -18460,21 +18560,21 @@ var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react174.css`
|
|
|
18460
18560
|
background-color: var(--gray-50);
|
|
18461
18561
|
}
|
|
18462
18562
|
`;
|
|
18463
|
-
var tableHead =
|
|
18563
|
+
var tableHead = import_react176.css`
|
|
18464
18564
|
color: var(--typography-base);
|
|
18465
18565
|
text-align: left;
|
|
18466
18566
|
`;
|
|
18467
|
-
var tableRow =
|
|
18567
|
+
var tableRow = import_react176.css`
|
|
18468
18568
|
border-bottom: 1px solid var(--gray-200);
|
|
18469
18569
|
font-size: var(--fs-sm);
|
|
18470
18570
|
`;
|
|
18471
|
-
var tableCellHead =
|
|
18571
|
+
var tableCellHead = import_react176.css`
|
|
18472
18572
|
font-size: var(--fs-sm);
|
|
18473
18573
|
font-weight: var(--fw-regular);
|
|
18474
18574
|
line-height: 1.2;
|
|
18475
18575
|
}
|
|
18476
18576
|
`;
|
|
18477
|
-
var responsiveTableContainer =
|
|
18577
|
+
var responsiveTableContainer = import_react176.css`
|
|
18478
18578
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
18479
18579
|
overflow-x: auto;
|
|
18480
18580
|
${scrollbarStyles}
|
|
@@ -18493,60 +18593,60 @@ var responsiveTableContainer = import_react174.css`
|
|
|
18493
18593
|
`;
|
|
18494
18594
|
|
|
18495
18595
|
// src/components/Table/ResponsiveTableContainer.tsx
|
|
18496
|
-
var
|
|
18596
|
+
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
18497
18597
|
var ResponsiveTableContainer = ({ children }) => {
|
|
18498
|
-
return /* @__PURE__ */ (0,
|
|
18598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { css: responsiveTableContainer, children });
|
|
18499
18599
|
};
|
|
18500
18600
|
|
|
18501
18601
|
// src/components/Table/Table.tsx
|
|
18502
18602
|
init_emotion_jsx_shim();
|
|
18503
|
-
var
|
|
18504
|
-
var
|
|
18505
|
-
var Table =
|
|
18603
|
+
var React22 = __toESM(require("react"));
|
|
18604
|
+
var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
|
|
18605
|
+
var Table = React22.forwardRef(
|
|
18506
18606
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
18507
|
-
return /* @__PURE__ */ (0,
|
|
18607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
18508
18608
|
}
|
|
18509
18609
|
);
|
|
18510
|
-
var TableHead =
|
|
18610
|
+
var TableHead = React22.forwardRef(
|
|
18511
18611
|
({ children, ...otherProps }, ref) => {
|
|
18512
|
-
return /* @__PURE__ */ (0,
|
|
18612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
18513
18613
|
}
|
|
18514
18614
|
);
|
|
18515
|
-
var TableBody =
|
|
18615
|
+
var TableBody = React22.forwardRef(
|
|
18516
18616
|
({ children, ...otherProps }, ref) => {
|
|
18517
|
-
return /* @__PURE__ */ (0,
|
|
18617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tbody", { ref, ...otherProps, children });
|
|
18518
18618
|
}
|
|
18519
18619
|
);
|
|
18520
|
-
var TableFoot =
|
|
18620
|
+
var TableFoot = React22.forwardRef(
|
|
18521
18621
|
({ children, ...otherProps }, ref) => {
|
|
18522
|
-
return /* @__PURE__ */ (0,
|
|
18622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tfoot", { ref, ...otherProps, children });
|
|
18523
18623
|
}
|
|
18524
18624
|
);
|
|
18525
|
-
var TableRow =
|
|
18625
|
+
var TableRow = React22.forwardRef(
|
|
18526
18626
|
({ children, ...otherProps }, ref) => {
|
|
18527
|
-
return /* @__PURE__ */ (0,
|
|
18627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
18528
18628
|
}
|
|
18529
18629
|
);
|
|
18530
|
-
var TableCellHead =
|
|
18630
|
+
var TableCellHead = React22.forwardRef(
|
|
18531
18631
|
({ children, ...otherProps }, ref) => {
|
|
18532
|
-
return /* @__PURE__ */ (0,
|
|
18632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
18533
18633
|
}
|
|
18534
18634
|
);
|
|
18535
|
-
var TableCellData =
|
|
18635
|
+
var TableCellData = React22.forwardRef(
|
|
18536
18636
|
({ children, ...otherProps }, ref) => {
|
|
18537
|
-
return /* @__PURE__ */ (0,
|
|
18637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("td", { ref, ...otherProps, children });
|
|
18538
18638
|
}
|
|
18539
18639
|
);
|
|
18540
18640
|
|
|
18541
18641
|
// src/components/Tabs/Tabs.tsx
|
|
18542
18642
|
init_emotion_jsx_shim();
|
|
18543
|
-
var
|
|
18544
|
-
var
|
|
18643
|
+
var import_react178 = require("@ariakit/react");
|
|
18644
|
+
var import_react179 = require("react");
|
|
18545
18645
|
|
|
18546
18646
|
// src/components/Tabs/Tabs.styles.ts
|
|
18547
18647
|
init_emotion_jsx_shim();
|
|
18548
|
-
var
|
|
18549
|
-
var tabButtonStyles =
|
|
18648
|
+
var import_react177 = require("@emotion/react");
|
|
18649
|
+
var tabButtonStyles = import_react177.css`
|
|
18550
18650
|
align-items: center;
|
|
18551
18651
|
border: 0;
|
|
18552
18652
|
height: 2.5rem;
|
|
@@ -18563,16 +18663,16 @@ var tabButtonStyles = import_react175.css`
|
|
|
18563
18663
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
18564
18664
|
}
|
|
18565
18665
|
`;
|
|
18566
|
-
var tabButtonGroupStyles =
|
|
18666
|
+
var tabButtonGroupStyles = import_react177.css`
|
|
18567
18667
|
display: flex;
|
|
18568
18668
|
gap: var(--spacing-base);
|
|
18569
18669
|
border-bottom: 1px solid var(--gray-300);
|
|
18570
18670
|
`;
|
|
18571
18671
|
|
|
18572
18672
|
// src/components/Tabs/Tabs.tsx
|
|
18573
|
-
var
|
|
18673
|
+
var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
|
|
18574
18674
|
var useCurrentTab = () => {
|
|
18575
|
-
const context = (0,
|
|
18675
|
+
const context = (0, import_react178.useTabStore)();
|
|
18576
18676
|
if (!context) {
|
|
18577
18677
|
throw new Error("This component can only be used inside <Tabs>");
|
|
18578
18678
|
}
|
|
@@ -18586,11 +18686,11 @@ var Tabs = ({
|
|
|
18586
18686
|
manual,
|
|
18587
18687
|
...props
|
|
18588
18688
|
}) => {
|
|
18589
|
-
const selected = (0,
|
|
18689
|
+
const selected = (0, import_react179.useMemo)(() => {
|
|
18590
18690
|
if (selectedId) return selectedId;
|
|
18591
18691
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
18592
18692
|
}, [selectedId, useHashForState]);
|
|
18593
|
-
const onTabSelect = (0,
|
|
18693
|
+
const onTabSelect = (0, import_react179.useCallback)(
|
|
18594
18694
|
(value) => {
|
|
18595
18695
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
18596
18696
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -18601,23 +18701,23 @@ var Tabs = ({
|
|
|
18601
18701
|
},
|
|
18602
18702
|
[onSelectedIdChange, useHashForState]
|
|
18603
18703
|
);
|
|
18604
|
-
return /* @__PURE__ */ (0,
|
|
18704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.TabProvider, { selectedId: selected, selectOnMove: !manual, setSelectedId: onTabSelect, ...props, children });
|
|
18605
18705
|
};
|
|
18606
18706
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
18607
|
-
return /* @__PURE__ */ (0,
|
|
18707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
18608
18708
|
};
|
|
18609
18709
|
var TabButton = ({
|
|
18610
18710
|
children,
|
|
18611
18711
|
id,
|
|
18612
18712
|
...props
|
|
18613
18713
|
}) => {
|
|
18614
|
-
return /* @__PURE__ */ (0,
|
|
18714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
18615
18715
|
};
|
|
18616
18716
|
var TabContent = ({
|
|
18617
18717
|
children,
|
|
18618
18718
|
...props
|
|
18619
18719
|
}) => {
|
|
18620
|
-
return /* @__PURE__ */ (0,
|
|
18720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.TabPanel, { ...props, children });
|
|
18621
18721
|
};
|
|
18622
18722
|
|
|
18623
18723
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -18625,8 +18725,8 @@ init_emotion_jsx_shim();
|
|
|
18625
18725
|
|
|
18626
18726
|
// src/components/Validation/StatusBullet.styles.ts
|
|
18627
18727
|
init_emotion_jsx_shim();
|
|
18628
|
-
var
|
|
18629
|
-
var StatusBulletContainer =
|
|
18728
|
+
var import_react180 = require("@emotion/react");
|
|
18729
|
+
var StatusBulletContainer = import_react180.css`
|
|
18630
18730
|
align-items: center;
|
|
18631
18731
|
align-self: center;
|
|
18632
18732
|
color: var(--gray-500);
|
|
@@ -18642,33 +18742,33 @@ var StatusBulletContainer = import_react178.css`
|
|
|
18642
18742
|
display: block;
|
|
18643
18743
|
}
|
|
18644
18744
|
`;
|
|
18645
|
-
var StatusBulletBase =
|
|
18745
|
+
var StatusBulletBase = import_react180.css`
|
|
18646
18746
|
font-size: var(--fs-sm);
|
|
18647
18747
|
&:before {
|
|
18648
18748
|
width: var(--fs-xs);
|
|
18649
18749
|
height: var(--fs-xs);
|
|
18650
18750
|
}
|
|
18651
18751
|
`;
|
|
18652
|
-
var StatusBulletSmall =
|
|
18752
|
+
var StatusBulletSmall = import_react180.css`
|
|
18653
18753
|
font-size: var(--fs-xs);
|
|
18654
18754
|
&:before {
|
|
18655
18755
|
width: var(--fs-xxs);
|
|
18656
18756
|
height: var(--fs-xxs);
|
|
18657
18757
|
}
|
|
18658
18758
|
`;
|
|
18659
|
-
var StatusDraft =
|
|
18759
|
+
var StatusDraft = import_react180.css`
|
|
18660
18760
|
&:before {
|
|
18661
18761
|
background: var(--white);
|
|
18662
18762
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
18663
18763
|
}
|
|
18664
18764
|
`;
|
|
18665
|
-
var StatusModified =
|
|
18765
|
+
var StatusModified = import_react180.css`
|
|
18666
18766
|
&:before {
|
|
18667
18767
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
18668
18768
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
18669
18769
|
}
|
|
18670
18770
|
`;
|
|
18671
|
-
var StatusError =
|
|
18771
|
+
var StatusError = import_react180.css`
|
|
18672
18772
|
color: var(--error);
|
|
18673
18773
|
&:before {
|
|
18674
18774
|
/* TODO: replace this with an svg icon */
|
|
@@ -18681,29 +18781,44 @@ var StatusError = import_react178.css`
|
|
|
18681
18781
|
);
|
|
18682
18782
|
}
|
|
18683
18783
|
`;
|
|
18684
|
-
var StatusPublished =
|
|
18784
|
+
var StatusPublished = import_react180.css`
|
|
18685
18785
|
&:before {
|
|
18686
18786
|
background: var(--accent-dark);
|
|
18687
18787
|
}
|
|
18688
18788
|
`;
|
|
18689
|
-
var StatusOrphan =
|
|
18789
|
+
var StatusOrphan = import_react180.css`
|
|
18690
18790
|
&:before {
|
|
18691
18791
|
background: var(--brand-secondary-5);
|
|
18692
18792
|
}
|
|
18693
18793
|
`;
|
|
18694
|
-
var StatusUnknown =
|
|
18794
|
+
var StatusUnknown = import_react180.css`
|
|
18695
18795
|
&:before {
|
|
18696
18796
|
background: var(--gray-800);
|
|
18697
18797
|
}
|
|
18698
18798
|
`;
|
|
18699
|
-
var StatusDeleted =
|
|
18799
|
+
var StatusDeleted = import_react180.css`
|
|
18700
18800
|
&:before {
|
|
18701
18801
|
background: var(--error);
|
|
18702
18802
|
}
|
|
18703
18803
|
`;
|
|
18704
18804
|
|
|
18705
18805
|
// src/components/Validation/StatusBullet.tsx
|
|
18706
|
-
var
|
|
18806
|
+
var import_jsx_runtime144 = require("@emotion/react/jsx-runtime");
|
|
18807
|
+
var currentStateStyles = {
|
|
18808
|
+
Error: StatusError,
|
|
18809
|
+
Modified: StatusModified,
|
|
18810
|
+
Unsaved: StatusDraft,
|
|
18811
|
+
Orphan: StatusOrphan,
|
|
18812
|
+
Published: StatusPublished,
|
|
18813
|
+
Draft: StatusDraft,
|
|
18814
|
+
Previous: StatusDraft,
|
|
18815
|
+
Unknown: StatusUnknown,
|
|
18816
|
+
Deleted: StatusDeleted
|
|
18817
|
+
};
|
|
18818
|
+
var statusSize = {
|
|
18819
|
+
sm: StatusBulletSmall,
|
|
18820
|
+
base: StatusBulletBase
|
|
18821
|
+
};
|
|
18707
18822
|
var StatusBullet = ({
|
|
18708
18823
|
status,
|
|
18709
18824
|
hideText = false,
|
|
@@ -18712,31 +18827,19 @@ var StatusBullet = ({
|
|
|
18712
18827
|
compact = false,
|
|
18713
18828
|
...props
|
|
18714
18829
|
}) => {
|
|
18715
|
-
const
|
|
18716
|
-
Error: StatusError,
|
|
18717
|
-
Modified: StatusModified,
|
|
18718
|
-
Unsaved: StatusDraft,
|
|
18719
|
-
Orphan: StatusOrphan,
|
|
18720
|
-
Published: StatusPublished,
|
|
18721
|
-
Draft: StatusDraft,
|
|
18722
|
-
Previous: StatusDraft,
|
|
18723
|
-
Unknown: StatusUnknown,
|
|
18724
|
-
Deleted: StatusDeleted
|
|
18725
|
-
};
|
|
18726
|
-
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
18727
|
-
const StatusComponent = () => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
18830
|
+
const StatusComponent = () => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
18728
18831
|
"span",
|
|
18729
18832
|
{
|
|
18730
18833
|
role: "status",
|
|
18731
|
-
css: [StatusBulletContainer, currentStateStyles[status], statusSize],
|
|
18834
|
+
css: [StatusBulletContainer, currentStateStyles[status], statusSize[size]],
|
|
18732
18835
|
...props,
|
|
18733
18836
|
children: hideText ? null : message ? message : status
|
|
18734
18837
|
}
|
|
18735
18838
|
);
|
|
18736
18839
|
if (compact) {
|
|
18737
|
-
return /* @__PURE__ */ (0,
|
|
18840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusComponent, {});
|
|
18738
18841
|
}
|
|
18739
|
-
return /* @__PURE__ */ (0,
|
|
18842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Tooltip, { title: message != null ? message : status, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusComponent, {}) }) });
|
|
18740
18843
|
};
|
|
18741
18844
|
// Annotate the CommonJS export names for ESM import in node:
|
|
18742
18845
|
0 && (module.exports = {
|
|
@@ -18846,6 +18949,7 @@ var StatusBullet = ({
|
|
|
18846
18949
|
PageHeaderSection,
|
|
18847
18950
|
Pagination,
|
|
18848
18951
|
Paragraph,
|
|
18952
|
+
ParameterActionButton,
|
|
18849
18953
|
ParameterDrawerHeader,
|
|
18850
18954
|
ParameterGroup,
|
|
18851
18955
|
ParameterImage,
|
|
@@ -18917,6 +19021,7 @@ var StatusBullet = ({
|
|
|
18917
19021
|
VerticalRhythm,
|
|
18918
19022
|
WarningMessage,
|
|
18919
19023
|
accessibleHidden,
|
|
19024
|
+
actionBarVisibilityStyles,
|
|
18920
19025
|
addPathSegmentToPathname,
|
|
18921
19026
|
borderTopIcon,
|
|
18922
19027
|
breakpoints,
|