@uniformdev/design-system 20.35.0 → 20.35.1-alpha.87
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 +567 -419
- package/dist/index.d.mts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +731 -579
- package/package.json +4 -4
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) => {
|
|
@@ -12194,7 +12197,7 @@ var LoadingOverlay = ({
|
|
|
12194
12197
|
var LoadingAnimation = ({
|
|
12195
12198
|
label,
|
|
12196
12199
|
width,
|
|
12197
|
-
css:
|
|
12200
|
+
css: css111,
|
|
12198
12201
|
isPaused
|
|
12199
12202
|
}) => {
|
|
12200
12203
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
@@ -12205,7 +12208,7 @@ var LoadingAnimation = ({
|
|
|
12205
12208
|
width: typeof width === "number" ? `${width}px` : width,
|
|
12206
12209
|
height: typeof width === "number" ? `${width}px` : width
|
|
12207
12210
|
},
|
|
12208
|
-
css: [loaderAnimationContainer,
|
|
12211
|
+
css: [loaderAnimationContainer, css111],
|
|
12209
12212
|
className: `loader-container${isPaused ? " paused" : ""}`,
|
|
12210
12213
|
children: [
|
|
12211
12214
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "bottom-cubes", children: [
|
|
@@ -13398,25 +13401,136 @@ var LabelLeadingIcon = ({
|
|
|
13398
13401
|
) });
|
|
13399
13402
|
};
|
|
13400
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
|
+
|
|
13401
13515
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
13402
13516
|
init_emotion_jsx_shim();
|
|
13403
13517
|
|
|
13404
13518
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
13405
13519
|
init_emotion_jsx_shim();
|
|
13406
|
-
var
|
|
13407
|
-
var ParameterDrawerHeaderContainer =
|
|
13520
|
+
var import_react133 = require("@emotion/react");
|
|
13521
|
+
var ParameterDrawerHeaderContainer = import_react133.css`
|
|
13408
13522
|
align-items: center;
|
|
13409
13523
|
display: flex;
|
|
13410
13524
|
gap: var(--spacing-base);
|
|
13411
13525
|
justify-content: space-between;
|
|
13412
13526
|
margin-bottom: var(--spacing-sm);
|
|
13413
13527
|
`;
|
|
13414
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
13528
|
+
var ParameterDrawerHeaderTitleGroup = import_react133.css`
|
|
13415
13529
|
align-items: center;
|
|
13416
13530
|
display: flex;
|
|
13417
13531
|
gap: var(--spacing-sm);
|
|
13418
13532
|
`;
|
|
13419
|
-
var ParameterDrawerHeaderTitle =
|
|
13533
|
+
var ParameterDrawerHeaderTitle = import_react133.css`
|
|
13420
13534
|
text-overflow: ellipsis;
|
|
13421
13535
|
white-space: nowrap;
|
|
13422
13536
|
overflow: hidden;
|
|
@@ -13424,12 +13538,12 @@ var ParameterDrawerHeaderTitle = import_react131.css`
|
|
|
13424
13538
|
`;
|
|
13425
13539
|
|
|
13426
13540
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
13427
|
-
var
|
|
13541
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
13428
13542
|
var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
13429
|
-
return /* @__PURE__ */ (0,
|
|
13430
|
-
/* @__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: [
|
|
13431
13545
|
iconBeforeTitle,
|
|
13432
|
-
/* @__PURE__ */ (0,
|
|
13546
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title, children: title })
|
|
13433
13547
|
] }),
|
|
13434
13548
|
children
|
|
13435
13549
|
] });
|
|
@@ -13437,15 +13551,19 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
13437
13551
|
|
|
13438
13552
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
13439
13553
|
init_emotion_jsx_shim();
|
|
13440
|
-
var
|
|
13554
|
+
var import_react135 = require("react");
|
|
13441
13555
|
|
|
13442
13556
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
13443
13557
|
init_emotion_jsx_shim();
|
|
13444
|
-
var
|
|
13445
|
-
var fieldsetStyles =
|
|
13558
|
+
var import_react134 = require("@emotion/react");
|
|
13559
|
+
var fieldsetStyles = import_react134.css`
|
|
13446
13560
|
&:disabled,
|
|
13447
13561
|
[readonly] {
|
|
13448
|
-
|
|
13562
|
+
input,
|
|
13563
|
+
select,
|
|
13564
|
+
textarea {
|
|
13565
|
+
pointer-events: none;
|
|
13566
|
+
}
|
|
13449
13567
|
|
|
13450
13568
|
label,
|
|
13451
13569
|
legend {
|
|
@@ -13453,19 +13571,19 @@ var fieldsetStyles = import_react132.css`
|
|
|
13453
13571
|
}
|
|
13454
13572
|
}
|
|
13455
13573
|
`;
|
|
13456
|
-
var fieldsetLegend2 =
|
|
13574
|
+
var fieldsetLegend2 = import_react134.css`
|
|
13457
13575
|
display: block;
|
|
13458
13576
|
font-weight: var(--fw-medium);
|
|
13459
|
-
margin-bottom: var(--spacing-
|
|
13577
|
+
margin-bottom: var(--spacing-base);
|
|
13460
13578
|
width: 100%;
|
|
13461
13579
|
`;
|
|
13462
13580
|
|
|
13463
13581
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
13464
|
-
var
|
|
13465
|
-
var ParameterGroup = (0,
|
|
13582
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
13583
|
+
var ParameterGroup = (0, import_react135.forwardRef)(
|
|
13466
13584
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
13467
|
-
return /* @__PURE__ */ (0,
|
|
13468
|
-
/* @__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 }),
|
|
13469
13587
|
children
|
|
13470
13588
|
] });
|
|
13471
13589
|
}
|
|
@@ -13473,24 +13591,24 @@ var ParameterGroup = (0, import_react133.forwardRef)(
|
|
|
13473
13591
|
|
|
13474
13592
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
13475
13593
|
init_emotion_jsx_shim();
|
|
13476
|
-
var
|
|
13594
|
+
var import_react143 = require("react");
|
|
13477
13595
|
|
|
13478
13596
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13479
13597
|
init_emotion_jsx_shim();
|
|
13480
|
-
var
|
|
13598
|
+
var import_react137 = require("react");
|
|
13481
13599
|
var import_react_dom2 = require("react-dom");
|
|
13482
13600
|
|
|
13483
13601
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
13484
13602
|
init_emotion_jsx_shim();
|
|
13485
|
-
var
|
|
13486
|
-
var previewWrapper =
|
|
13603
|
+
var import_react136 = require("@emotion/react");
|
|
13604
|
+
var previewWrapper = import_react136.css`
|
|
13487
13605
|
margin-top: var(--spacing-xs);
|
|
13488
13606
|
background: var(--gray-50);
|
|
13489
13607
|
padding: var(--spacing-sm);
|
|
13490
13608
|
border: solid 1px var(--gray-300);
|
|
13491
13609
|
border-radius: var(--rounded-sm);
|
|
13492
13610
|
`;
|
|
13493
|
-
var previewLink =
|
|
13611
|
+
var previewLink = import_react136.css`
|
|
13494
13612
|
display: block;
|
|
13495
13613
|
width: 100%;
|
|
13496
13614
|
|
|
@@ -13498,7 +13616,7 @@ var previewLink = import_react134.css`
|
|
|
13498
13616
|
max-height: 9rem;
|
|
13499
13617
|
}
|
|
13500
13618
|
`;
|
|
13501
|
-
var previewModalWrapper =
|
|
13619
|
+
var previewModalWrapper = import_react136.css`
|
|
13502
13620
|
background: var(--gray-50);
|
|
13503
13621
|
display: flex;
|
|
13504
13622
|
height: 100%;
|
|
@@ -13507,7 +13625,7 @@ var previewModalWrapper = import_react134.css`
|
|
|
13507
13625
|
border: solid 1px var(--gray-300);
|
|
13508
13626
|
border-radius: var(--rounded-sm);
|
|
13509
13627
|
`;
|
|
13510
|
-
var previewModalImage =
|
|
13628
|
+
var previewModalImage = import_react136.css`
|
|
13511
13629
|
display: flex;
|
|
13512
13630
|
height: 100%;
|
|
13513
13631
|
width: 100%;
|
|
@@ -13519,32 +13637,32 @@ var previewModalImage = import_react134.css`
|
|
|
13519
13637
|
`;
|
|
13520
13638
|
|
|
13521
13639
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
13522
|
-
var
|
|
13640
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
13523
13641
|
function ParameterImagePreview({ imageSrc }) {
|
|
13524
|
-
const [showModal, setShowModal] = (0,
|
|
13525
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
13526
|
-
/* @__PURE__ */ (0,
|
|
13527
|
-
/* @__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)(
|
|
13528
13646
|
"button",
|
|
13529
13647
|
{
|
|
13530
13648
|
css: previewLink,
|
|
13531
13649
|
onClick: () => {
|
|
13532
13650
|
setShowModal(true);
|
|
13533
13651
|
},
|
|
13534
|
-
children: /* @__PURE__ */ (0,
|
|
13652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
13535
13653
|
}
|
|
13536
13654
|
)
|
|
13537
13655
|
] }) : null;
|
|
13538
13656
|
}
|
|
13539
13657
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
13540
|
-
return open ? /* @__PURE__ */ (0,
|
|
13541
|
-
/* @__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)(
|
|
13542
13660
|
Modal,
|
|
13543
13661
|
{
|
|
13544
13662
|
header: "Image Preview",
|
|
13545
13663
|
onRequestClose,
|
|
13546
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
13547
|
-
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" }) })
|
|
13548
13666
|
}
|
|
13549
13667
|
),
|
|
13550
13668
|
document.body
|
|
@@ -13553,16 +13671,32 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
13553
13671
|
|
|
13554
13672
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
13555
13673
|
init_emotion_jsx_shim();
|
|
13556
|
-
var
|
|
13557
|
-
var
|
|
13674
|
+
var import_react141 = require("@emotion/react");
|
|
13675
|
+
var import_react142 = require("react");
|
|
13558
13676
|
|
|
13559
13677
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
13560
13678
|
init_emotion_jsx_shim();
|
|
13561
13679
|
|
|
13562
13680
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
13563
13681
|
init_emotion_jsx_shim();
|
|
13564
|
-
var
|
|
13565
|
-
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`
|
|
13566
13700
|
position: relative;
|
|
13567
13701
|
scroll-margin: var(--spacing-2xl);
|
|
13568
13702
|
|
|
@@ -13573,16 +13707,17 @@ var inputContainer2 = import_react136.css`
|
|
|
13573
13707
|
opacity: var(--opacity-100);
|
|
13574
13708
|
translate: 0 0;
|
|
13575
13709
|
}
|
|
13710
|
+
${actionBarVisibilityStyles}
|
|
13576
13711
|
}
|
|
13577
13712
|
`;
|
|
13578
|
-
var labelText2 =
|
|
13713
|
+
var labelText2 = import_react138.css`
|
|
13579
13714
|
align-items: center;
|
|
13580
13715
|
display: flex;
|
|
13581
13716
|
gap: var(--spacing-xs);
|
|
13582
13717
|
font-weight: var(--fw-regular);
|
|
13583
13718
|
margin: 0 0 var(--spacing-xs);
|
|
13584
13719
|
`;
|
|
13585
|
-
var input3 =
|
|
13720
|
+
var input3 = import_react138.css`
|
|
13586
13721
|
display: block;
|
|
13587
13722
|
appearance: none;
|
|
13588
13723
|
box-sizing: border-box;
|
|
@@ -13630,18 +13765,18 @@ var input3 = import_react136.css`
|
|
|
13630
13765
|
color: var(--gray-400);
|
|
13631
13766
|
}
|
|
13632
13767
|
`;
|
|
13633
|
-
var selectInput =
|
|
13768
|
+
var selectInput = import_react138.css`
|
|
13634
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");
|
|
13635
13770
|
background-position: right var(--spacing-sm) center;
|
|
13636
13771
|
background-repeat: no-repeat;
|
|
13637
13772
|
background-size: 1rem;
|
|
13638
13773
|
padding-right: var(--spacing-xl);
|
|
13639
13774
|
`;
|
|
13640
|
-
var inputWrapper =
|
|
13775
|
+
var inputWrapper = import_react138.css`
|
|
13641
13776
|
display: flex; // used to correct overflow with chrome textarea
|
|
13642
13777
|
position: relative;
|
|
13643
13778
|
`;
|
|
13644
|
-
var inputIcon2 =
|
|
13779
|
+
var inputIcon2 = import_react138.css`
|
|
13645
13780
|
align-items: center;
|
|
13646
13781
|
background: var(--white);
|
|
13647
13782
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -13657,7 +13792,7 @@ var inputIcon2 = import_react136.css`
|
|
|
13657
13792
|
width: var(--spacing-lg);
|
|
13658
13793
|
z-index: var(--z-10);
|
|
13659
13794
|
`;
|
|
13660
|
-
var inputToggleLabel2 =
|
|
13795
|
+
var inputToggleLabel2 = import_react138.css`
|
|
13661
13796
|
--inline-label-color: var(--typography-base);
|
|
13662
13797
|
align-items: center;
|
|
13663
13798
|
cursor: pointer;
|
|
@@ -13672,7 +13807,7 @@ var inputToggleLabel2 = import_react136.css`
|
|
|
13672
13807
|
--inline-label-color: var(--gray-400);
|
|
13673
13808
|
}
|
|
13674
13809
|
`;
|
|
13675
|
-
var toggleInput2 =
|
|
13810
|
+
var toggleInput2 = import_react138.css`
|
|
13676
13811
|
appearance: none;
|
|
13677
13812
|
border: 1px solid var(--gray-200);
|
|
13678
13813
|
background: var(--white);
|
|
@@ -13726,7 +13861,7 @@ var toggleInput2 = import_react136.css`
|
|
|
13726
13861
|
border-color: var(--gray-300);
|
|
13727
13862
|
}
|
|
13728
13863
|
`;
|
|
13729
|
-
var inlineLabel2 =
|
|
13864
|
+
var inlineLabel2 = import_react138.css`
|
|
13730
13865
|
color: var(--inline-label-color);
|
|
13731
13866
|
padding-left: var(--spacing-md);
|
|
13732
13867
|
font-size: var(--fs-sm);
|
|
@@ -13743,20 +13878,29 @@ var inlineLabel2 = import_react136.css`
|
|
|
13743
13878
|
}
|
|
13744
13879
|
}
|
|
13745
13880
|
`;
|
|
13746
|
-
var inputMenu =
|
|
13881
|
+
var inputMenu = import_react138.css`
|
|
13747
13882
|
background: none;
|
|
13748
13883
|
border: none;
|
|
13749
13884
|
padding: var(--spacing-2xs);
|
|
13750
13885
|
position: absolute;
|
|
13751
13886
|
top: calc(var(--spacing-md) * -1.2);
|
|
13752
13887
|
right: 0;
|
|
13888
|
+
|
|
13889
|
+
&:disabled,
|
|
13890
|
+
&[aria-disabled='true'] {
|
|
13891
|
+
color: var(--gray-400);
|
|
13892
|
+
cursor: default;
|
|
13893
|
+
}
|
|
13753
13894
|
`;
|
|
13754
|
-
var inputActionItems =
|
|
13895
|
+
var inputActionItems = import_react138.css`
|
|
13755
13896
|
display: flex;
|
|
13897
|
+
${actionBarVisibilityHiddenStyles}
|
|
13756
13898
|
`;
|
|
13757
|
-
var inputMenuHover =
|
|
13899
|
+
var inputMenuHover = import_react138.css`
|
|
13758
13900
|
opacity: var(--opacity-50);
|
|
13759
13901
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
13902
|
+
margin-top: 0.25rem;
|
|
13903
|
+
${actionBarVisibilityHiddenStyles}
|
|
13760
13904
|
|
|
13761
13905
|
// css trick to style the input like a hover or active state when the menu button is active or hovered
|
|
13762
13906
|
&:hover,
|
|
@@ -13764,11 +13908,11 @@ var inputMenuHover = import_react136.css`
|
|
|
13764
13908
|
background-color: var(--gray-200);
|
|
13765
13909
|
}
|
|
13766
13910
|
`;
|
|
13767
|
-
var textarea2 =
|
|
13911
|
+
var textarea2 = import_react138.css`
|
|
13768
13912
|
resize: vertical;
|
|
13769
13913
|
min-height: 2rem;
|
|
13770
13914
|
`;
|
|
13771
|
-
var dataConnectButton =
|
|
13915
|
+
var dataConnectButton = import_react138.css`
|
|
13772
13916
|
align-items: center;
|
|
13773
13917
|
appearance: none;
|
|
13774
13918
|
box-sizing: border-box;
|
|
@@ -13804,7 +13948,7 @@ var dataConnectButton = import_react136.css`
|
|
|
13804
13948
|
pointer-events: none;
|
|
13805
13949
|
}
|
|
13806
13950
|
`;
|
|
13807
|
-
var linkParameterBtn =
|
|
13951
|
+
var linkParameterBtn = import_react138.css`
|
|
13808
13952
|
border-radius: var(--rounded-base);
|
|
13809
13953
|
background: transparent;
|
|
13810
13954
|
border: none;
|
|
@@ -13813,7 +13957,7 @@ var linkParameterBtn = import_react136.css`
|
|
|
13813
13957
|
font-size: var(--fs-sm);
|
|
13814
13958
|
line-height: 1;
|
|
13815
13959
|
`;
|
|
13816
|
-
var linkParameterControls =
|
|
13960
|
+
var linkParameterControls = import_react138.css`
|
|
13817
13961
|
position: absolute;
|
|
13818
13962
|
inset: 0 0 0 auto;
|
|
13819
13963
|
padding: 0 var(--spacing-base);
|
|
@@ -13822,7 +13966,7 @@ var linkParameterControls = import_react136.css`
|
|
|
13822
13966
|
justify-content: center;
|
|
13823
13967
|
gap: var(--spacing-base);
|
|
13824
13968
|
`;
|
|
13825
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
13969
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react138.css`
|
|
13826
13970
|
padding-right: calc(
|
|
13827
13971
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
13828
13972
|
var(--spacing-base)
|
|
@@ -13835,7 +13979,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react136.css`
|
|
|
13835
13979
|
}
|
|
13836
13980
|
}
|
|
13837
13981
|
`;
|
|
13838
|
-
var linkParameterIcon =
|
|
13982
|
+
var linkParameterIcon = import_react138.css`
|
|
13839
13983
|
align-items: center;
|
|
13840
13984
|
color: var(--brand-secondary-3);
|
|
13841
13985
|
display: flex;
|
|
@@ -13850,29 +13994,31 @@ var linkParameterIcon = import_react136.css`
|
|
|
13850
13994
|
`;
|
|
13851
13995
|
|
|
13852
13996
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
13853
|
-
var
|
|
13997
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
13854
13998
|
var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
13855
|
-
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 });
|
|
13856
14000
|
};
|
|
13857
14001
|
|
|
13858
14002
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
13859
14003
|
init_emotion_jsx_shim();
|
|
13860
|
-
var
|
|
13861
|
-
var
|
|
13862
|
-
var ParameterMenuButton = (0,
|
|
13863
|
-
({ label, children }, ref) => {
|
|
13864
|
-
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)(
|
|
13865
14009
|
Menu,
|
|
13866
14010
|
{
|
|
13867
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
14011
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
13868
14012
|
"button",
|
|
13869
14013
|
{
|
|
14014
|
+
"data-action-bar": true,
|
|
13870
14015
|
className: "parameter-menu",
|
|
13871
14016
|
css: [inputMenu, inputMenuHover],
|
|
13872
14017
|
type: "button",
|
|
13873
14018
|
"aria-label": `${label} options`,
|
|
13874
14019
|
ref,
|
|
13875
|
-
|
|
14020
|
+
disabled: disabled2,
|
|
14021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
13876
14022
|
}
|
|
13877
14023
|
),
|
|
13878
14024
|
children
|
|
@@ -13883,14 +14029,14 @@ var ParameterMenuButton = (0, import_react137.forwardRef)(
|
|
|
13883
14029
|
|
|
13884
14030
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
13885
14031
|
init_emotion_jsx_shim();
|
|
13886
|
-
var
|
|
13887
|
-
var emptyParameterShell =
|
|
14032
|
+
var import_react140 = require("@emotion/react");
|
|
14033
|
+
var emptyParameterShell = import_react140.css`
|
|
13888
14034
|
border-radius: var(--rounded-sm);
|
|
13889
14035
|
flex-grow: 1;
|
|
13890
14036
|
position: relative;
|
|
13891
14037
|
max-width: 100%;
|
|
13892
14038
|
`;
|
|
13893
|
-
var emptyParameterShellText =
|
|
14039
|
+
var emptyParameterShellText = import_react140.css`
|
|
13894
14040
|
background: var(--brand-secondary-6);
|
|
13895
14041
|
border-radius: var(--rounded-sm);
|
|
13896
14042
|
padding: var(--spacing-sm);
|
|
@@ -13898,7 +14044,7 @@ var emptyParameterShellText = import_react138.css`
|
|
|
13898
14044
|
font-size: var(--fs-sm);
|
|
13899
14045
|
margin: 0;
|
|
13900
14046
|
`;
|
|
13901
|
-
var overrideMarker =
|
|
14047
|
+
var overrideMarker = import_react140.css`
|
|
13902
14048
|
border-radius: var(--rounded-sm);
|
|
13903
14049
|
border: 10px solid var(--gray-300);
|
|
13904
14050
|
border-left-color: transparent;
|
|
@@ -13909,7 +14055,7 @@ var overrideMarker = import_react138.css`
|
|
|
13909
14055
|
`;
|
|
13910
14056
|
|
|
13911
14057
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
13912
|
-
var
|
|
14058
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
13913
14059
|
var extractParameterProps = (props) => {
|
|
13914
14060
|
const {
|
|
13915
14061
|
id,
|
|
@@ -13969,36 +14115,37 @@ var ParameterShell = ({
|
|
|
13969
14115
|
isParameterGroup = false,
|
|
13970
14116
|
...props
|
|
13971
14117
|
}) => {
|
|
13972
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
14118
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react142.useState)(void 0);
|
|
13973
14119
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
13974
14120
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
13975
|
-
return /* @__PURE__ */ (0,
|
|
13976
|
-
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: [
|
|
13977
14123
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
13978
14124
|
label,
|
|
13979
14125
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
13980
14126
|
] }),
|
|
13981
|
-
!title ? null : /* @__PURE__ */ (0,
|
|
14127
|
+
!title ? null : /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(ParameterLabel, { id, asSpan: true, testId: "parameter-label", children: [
|
|
13982
14128
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
13983
14129
|
title,
|
|
13984
14130
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
13985
14131
|
] }),
|
|
13986
|
-
/* @__PURE__ */ (0,
|
|
13987
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
14132
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { css: inputWrapper, children: [
|
|
14133
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
13988
14134
|
"div",
|
|
13989
14135
|
{
|
|
14136
|
+
"data-action-bar": true,
|
|
13990
14137
|
css: [
|
|
13991
14138
|
inputMenu,
|
|
13992
14139
|
inputActionItems,
|
|
13993
|
-
menuItems ?
|
|
14140
|
+
menuItems ? import_react141.css`
|
|
13994
14141
|
right: var(--spacing-md);
|
|
13995
14142
|
` : void 0
|
|
13996
14143
|
],
|
|
13997
14144
|
children: actionItems
|
|
13998
14145
|
}
|
|
13999
14146
|
) : null,
|
|
14000
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
14001
|
-
/* @__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)(
|
|
14002
14149
|
ParameterShellContext.Provider,
|
|
14003
14150
|
{
|
|
14004
14151
|
value: {
|
|
@@ -14008,14 +14155,14 @@ var ParameterShell = ({
|
|
|
14008
14155
|
errorMessage: errorMessaging,
|
|
14009
14156
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
14010
14157
|
},
|
|
14011
|
-
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: [
|
|
14012
14159
|
children,
|
|
14013
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
14160
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
14014
14161
|
] })
|
|
14015
14162
|
}
|
|
14016
14163
|
)
|
|
14017
14164
|
] }),
|
|
14018
|
-
/* @__PURE__ */ (0,
|
|
14165
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
14019
14166
|
FieldMessage,
|
|
14020
14167
|
{
|
|
14021
14168
|
helperMessageTestId: captionTestId,
|
|
@@ -14029,27 +14176,27 @@ var ParameterShell = ({
|
|
|
14029
14176
|
] });
|
|
14030
14177
|
};
|
|
14031
14178
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
14032
|
-
return /* @__PURE__ */ (0,
|
|
14179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { css: emptyParameterShell, children });
|
|
14033
14180
|
};
|
|
14034
|
-
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" }) }) });
|
|
14035
14182
|
|
|
14036
14183
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
14037
|
-
var
|
|
14038
|
-
var ParameterImage = (0,
|
|
14184
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
14185
|
+
var ParameterImage = (0, import_react143.forwardRef)(
|
|
14039
14186
|
({ children, ...props }, ref) => {
|
|
14040
14187
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14041
|
-
return /* @__PURE__ */ (0,
|
|
14042
|
-
/* @__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 }),
|
|
14043
14190
|
children
|
|
14044
14191
|
] });
|
|
14045
14192
|
}
|
|
14046
14193
|
);
|
|
14047
|
-
var ParameterImageInner = (0,
|
|
14194
|
+
var ParameterImageInner = (0, import_react143.forwardRef)((props, ref) => {
|
|
14048
14195
|
const { value } = props;
|
|
14049
14196
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
14050
|
-
const deferredValue = (0,
|
|
14051
|
-
return /* @__PURE__ */ (0,
|
|
14052
|
-
/* @__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)(
|
|
14053
14200
|
"input",
|
|
14054
14201
|
{
|
|
14055
14202
|
css: input3,
|
|
@@ -14061,22 +14208,22 @@ var ParameterImageInner = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
14061
14208
|
...props
|
|
14062
14209
|
}
|
|
14063
14210
|
),
|
|
14064
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
14211
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
14065
14212
|
] });
|
|
14066
14213
|
});
|
|
14067
14214
|
|
|
14068
14215
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
14069
14216
|
init_emotion_jsx_shim();
|
|
14070
|
-
var
|
|
14071
|
-
var
|
|
14072
|
-
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) => {
|
|
14073
14220
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14074
|
-
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 }) });
|
|
14075
14222
|
});
|
|
14076
|
-
var ParameterInputInner = (0,
|
|
14223
|
+
var ParameterInputInner = (0, import_react144.forwardRef)(({ enableMouseWheel = false, ...props }, ref) => {
|
|
14077
14224
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
14078
14225
|
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
14079
|
-
return /* @__PURE__ */ (0,
|
|
14226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
14080
14227
|
"input",
|
|
14081
14228
|
{
|
|
14082
14229
|
css: input3,
|
|
@@ -14093,19 +14240,19 @@ var ParameterInputInner = (0, import_react142.forwardRef)(({ enableMouseWheel =
|
|
|
14093
14240
|
|
|
14094
14241
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
14095
14242
|
init_emotion_jsx_shim();
|
|
14096
|
-
var
|
|
14097
|
-
var
|
|
14098
|
-
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)(
|
|
14099
14246
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
14100
14247
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14101
|
-
return /* @__PURE__ */ (0,
|
|
14248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14102
14249
|
ParameterShell,
|
|
14103
14250
|
{
|
|
14104
14251
|
"data-testid": "link-parameter-editor",
|
|
14105
14252
|
...shellProps,
|
|
14106
14253
|
label: innerProps.value ? shellProps.label : "",
|
|
14107
14254
|
title: !innerProps.value && typeof shellProps.label === "string" ? shellProps.label : void 0,
|
|
14108
|
-
children: /* @__PURE__ */ (0,
|
|
14255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14109
14256
|
ParameterLinkInner,
|
|
14110
14257
|
{
|
|
14111
14258
|
onConnectLink,
|
|
@@ -14118,13 +14265,13 @@ var ParameterLink = (0, import_react143.forwardRef)(
|
|
|
14118
14265
|
);
|
|
14119
14266
|
}
|
|
14120
14267
|
);
|
|
14121
|
-
var ParameterLinkInner = (0,
|
|
14268
|
+
var ParameterLinkInner = (0, import_react145.forwardRef)(
|
|
14122
14269
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
14123
14270
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
14124
14271
|
if (!props.value)
|
|
14125
|
-
return /* @__PURE__ */ (0,
|
|
14126
|
-
return /* @__PURE__ */ (0,
|
|
14127
|
-
/* @__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)(
|
|
14128
14275
|
"input",
|
|
14129
14276
|
{
|
|
14130
14277
|
type: "text",
|
|
@@ -14136,8 +14283,8 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14136
14283
|
...props
|
|
14137
14284
|
}
|
|
14138
14285
|
),
|
|
14139
|
-
/* @__PURE__ */ (0,
|
|
14140
|
-
/* @__PURE__ */ (0,
|
|
14286
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: linkParameterControls, children: [
|
|
14287
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14141
14288
|
"button",
|
|
14142
14289
|
{
|
|
14143
14290
|
type: "button",
|
|
@@ -14149,7 +14296,7 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14149
14296
|
children: "edit"
|
|
14150
14297
|
}
|
|
14151
14298
|
),
|
|
14152
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
14299
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
14153
14300
|
"a",
|
|
14154
14301
|
{
|
|
14155
14302
|
href: externalLink,
|
|
@@ -14157,7 +14304,7 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14157
14304
|
title: "Open link in new tab",
|
|
14158
14305
|
target: "_blank",
|
|
14159
14306
|
rel: "noopener noreferrer",
|
|
14160
|
-
children: /* @__PURE__ */ (0,
|
|
14307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
14161
14308
|
}
|
|
14162
14309
|
) : null
|
|
14163
14310
|
] })
|
|
@@ -14167,15 +14314,15 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
14167
14314
|
|
|
14168
14315
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
14169
14316
|
init_emotion_jsx_shim();
|
|
14170
|
-
var
|
|
14317
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
14171
14318
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
14172
14319
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
14173
|
-
return /* @__PURE__ */ (0,
|
|
14320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
14174
14321
|
};
|
|
14175
14322
|
var ParameterMultiSelectInner = (props) => {
|
|
14176
14323
|
var _a;
|
|
14177
14324
|
const { id, label } = useParameterShell();
|
|
14178
|
-
return /* @__PURE__ */ (0,
|
|
14325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
14179
14326
|
InputComboBox,
|
|
14180
14327
|
{
|
|
14181
14328
|
menuPortalTarget: document.body,
|
|
@@ -14226,7 +14373,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
14226
14373
|
|
|
14227
14374
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
14228
14375
|
init_emotion_jsx_shim();
|
|
14229
|
-
var
|
|
14376
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
14230
14377
|
var ParameterNameAndPublicIdInput = ({
|
|
14231
14378
|
id,
|
|
14232
14379
|
onBlur,
|
|
@@ -14252,8 +14399,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14252
14399
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
14253
14400
|
};
|
|
14254
14401
|
autoFocus == null ? void 0 : autoFocus();
|
|
14255
|
-
return /* @__PURE__ */ (0,
|
|
14256
|
-
/* @__PURE__ */ (0,
|
|
14402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
14257
14404
|
ParameterInput,
|
|
14258
14405
|
{
|
|
14259
14406
|
id: nameIdField,
|
|
@@ -14272,7 +14419,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14272
14419
|
value: values[nameIdField]
|
|
14273
14420
|
}
|
|
14274
14421
|
),
|
|
14275
|
-
/* @__PURE__ */ (0,
|
|
14422
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
14276
14423
|
ParameterInput,
|
|
14277
14424
|
{
|
|
14278
14425
|
id: publicIdFieldName,
|
|
@@ -14286,11 +14433,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14286
14433
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
14287
14434
|
placeholder: publicIdPlaceholderText,
|
|
14288
14435
|
errorMessage: publicIdError,
|
|
14289
|
-
menuItems: /* @__PURE__ */ (0,
|
|
14436
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
14290
14437
|
MenuItem,
|
|
14291
14438
|
{
|
|
14292
14439
|
disabled: !values[publicIdFieldName],
|
|
14293
|
-
icon: /* @__PURE__ */ (0,
|
|
14440
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
14294
14441
|
onClick: handleCopyPidFieldValue,
|
|
14295
14442
|
children: "Copy"
|
|
14296
14443
|
}
|
|
@@ -14298,13 +14445,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
14298
14445
|
value: values[publicIdFieldName]
|
|
14299
14446
|
}
|
|
14300
14447
|
),
|
|
14301
|
-
(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
|
|
14302
14449
|
] });
|
|
14303
14450
|
};
|
|
14304
14451
|
|
|
14305
14452
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
14306
14453
|
init_emotion_jsx_shim();
|
|
14307
|
-
var
|
|
14454
|
+
var import_react159 = require("@emotion/react");
|
|
14308
14455
|
var import_list3 = require("@lexical/list");
|
|
14309
14456
|
var import_markdown = require("@lexical/markdown");
|
|
14310
14457
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -14441,7 +14588,7 @@ var defaultParameterConfiguration = {
|
|
|
14441
14588
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
14442
14589
|
var import_fast_equals2 = require("fast-equals");
|
|
14443
14590
|
var import_lexical10 = require("lexical");
|
|
14444
|
-
var
|
|
14591
|
+
var import_react160 = require("react");
|
|
14445
14592
|
|
|
14446
14593
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
14447
14594
|
init_emotion_jsx_shim();
|
|
@@ -14464,10 +14611,10 @@ init_emotion_jsx_shim();
|
|
|
14464
14611
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
14465
14612
|
var import_utils4 = require("@lexical/utils");
|
|
14466
14613
|
var import_lexical = require("lexical");
|
|
14467
|
-
var
|
|
14614
|
+
var import_react146 = require("react");
|
|
14468
14615
|
function DisableStylesPlugin() {
|
|
14469
14616
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
14470
|
-
(0,
|
|
14617
|
+
(0, import_react146.useEffect)(() => {
|
|
14471
14618
|
return (0, import_utils4.mergeRegister)(
|
|
14472
14619
|
// Disable text alignment on paragraph nodes
|
|
14473
14620
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -14728,10 +14875,10 @@ init_emotion_jsx_shim();
|
|
|
14728
14875
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
14729
14876
|
var import_utils5 = require("@lexical/utils");
|
|
14730
14877
|
var import_lexical2 = require("lexical");
|
|
14731
|
-
var
|
|
14878
|
+
var import_react147 = require("react");
|
|
14732
14879
|
var ImprovedAssetSelectionPlugin = () => {
|
|
14733
14880
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
14734
|
-
(0,
|
|
14881
|
+
(0, import_react147.useEffect)(() => {
|
|
14735
14882
|
editor.getRootElement();
|
|
14736
14883
|
const onRootClick = (event) => {
|
|
14737
14884
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -14780,13 +14927,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
14780
14927
|
|
|
14781
14928
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
14782
14929
|
init_emotion_jsx_shim();
|
|
14783
|
-
var
|
|
14930
|
+
var import_react148 = require("@emotion/react");
|
|
14784
14931
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
14785
14932
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
14786
14933
|
var import_utils6 = require("@lexical/utils");
|
|
14787
14934
|
var import_fast_equals = require("fast-equals");
|
|
14788
14935
|
var import_lexical4 = require("lexical");
|
|
14789
|
-
var
|
|
14936
|
+
var import_react149 = require("react");
|
|
14790
14937
|
|
|
14791
14938
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
14792
14939
|
init_emotion_jsx_shim();
|
|
@@ -14845,7 +14992,7 @@ var normalizeStateForDeepEqualComparison = (editorState) => {
|
|
|
14845
14992
|
};
|
|
14846
14993
|
|
|
14847
14994
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
14848
|
-
var
|
|
14995
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
14849
14996
|
var isProjectMapLinkValue = (value) => {
|
|
14850
14997
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
14851
14998
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -15134,17 +15281,17 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
15134
15281
|
);
|
|
15135
15282
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
15136
15283
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
15137
|
-
var linkPopover =
|
|
15284
|
+
var linkPopover = import_react148.css`
|
|
15138
15285
|
position: absolute;
|
|
15139
15286
|
z-index: 11;
|
|
15140
15287
|
`;
|
|
15141
|
-
var linkPopoverContainer =
|
|
15288
|
+
var linkPopoverContainer = import_react148.css`
|
|
15142
15289
|
${Popover};
|
|
15143
15290
|
${PopoverVariantSmall};
|
|
15144
15291
|
align-items: center;
|
|
15145
15292
|
display: flex;
|
|
15146
15293
|
`;
|
|
15147
|
-
var linkPopoverAnchor =
|
|
15294
|
+
var linkPopoverAnchor = import_react148.css`
|
|
15148
15295
|
${link}
|
|
15149
15296
|
${linkColorDefault}
|
|
15150
15297
|
`;
|
|
@@ -15157,17 +15304,17 @@ function LinkNodePlugin({
|
|
|
15157
15304
|
return path;
|
|
15158
15305
|
};
|
|
15159
15306
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
15160
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
15161
|
-
const linkPopoverElRef = (0,
|
|
15162
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
15163
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
15164
|
-
(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)(() => {
|
|
15165
15312
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
15166
15313
|
setLinkPopoverState(void 0);
|
|
15167
15314
|
return;
|
|
15168
15315
|
}
|
|
15169
15316
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
15170
|
-
(0,
|
|
15317
|
+
(0, import_react149.useEffect)(() => {
|
|
15171
15318
|
if (!editor.hasNodes([LinkNode])) {
|
|
15172
15319
|
throw new Error("LinkNode not registered on editor");
|
|
15173
15320
|
}
|
|
@@ -15271,7 +15418,7 @@ function LinkNodePlugin({
|
|
|
15271
15418
|
)
|
|
15272
15419
|
);
|
|
15273
15420
|
}, [editor, onConnectLink]);
|
|
15274
|
-
const maybeShowLinkToolbar = (0,
|
|
15421
|
+
const maybeShowLinkToolbar = (0, import_react149.useCallback)(() => {
|
|
15275
15422
|
if (!editor.isEditable()) {
|
|
15276
15423
|
return;
|
|
15277
15424
|
}
|
|
@@ -15305,7 +15452,7 @@ function LinkNodePlugin({
|
|
|
15305
15452
|
}
|
|
15306
15453
|
});
|
|
15307
15454
|
}, [editor, positioningAnchorEl]);
|
|
15308
|
-
(0,
|
|
15455
|
+
(0, import_react149.useEffect)(() => {
|
|
15309
15456
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
15310
15457
|
requestAnimationFrame(() => {
|
|
15311
15458
|
editorState.read(() => {
|
|
@@ -15332,8 +15479,8 @@ function LinkNodePlugin({
|
|
|
15332
15479
|
});
|
|
15333
15480
|
});
|
|
15334
15481
|
};
|
|
15335
|
-
return /* @__PURE__ */ (0,
|
|
15336
|
-
/* @__PURE__ */ (0,
|
|
15482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
15483
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15337
15484
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
15338
15485
|
{
|
|
15339
15486
|
nodeType: LinkNode,
|
|
@@ -15343,7 +15490,7 @@ function LinkNodePlugin({
|
|
|
15343
15490
|
}
|
|
15344
15491
|
}
|
|
15345
15492
|
),
|
|
15346
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
15493
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15347
15494
|
"div",
|
|
15348
15495
|
{
|
|
15349
15496
|
css: linkPopover,
|
|
@@ -15352,8 +15499,8 @@ function LinkNodePlugin({
|
|
|
15352
15499
|
top: linkPopoverState.position.y
|
|
15353
15500
|
},
|
|
15354
15501
|
ref: linkPopoverElRef,
|
|
15355
|
-
children: /* @__PURE__ */ (0,
|
|
15356
|
-
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)(
|
|
15357
15504
|
"a",
|
|
15358
15505
|
{
|
|
15359
15506
|
href: parsePath(
|
|
@@ -15365,7 +15512,7 @@ function LinkNodePlugin({
|
|
|
15365
15512
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
15366
15513
|
}
|
|
15367
15514
|
),
|
|
15368
|
-
/* @__PURE__ */ (0,
|
|
15515
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15369
15516
|
Button,
|
|
15370
15517
|
{
|
|
15371
15518
|
size: "xs",
|
|
@@ -15373,7 +15520,7 @@ function LinkNodePlugin({
|
|
|
15373
15520
|
onEditLinkNode(linkPopoverState.node);
|
|
15374
15521
|
},
|
|
15375
15522
|
buttonType: "ghost",
|
|
15376
|
-
children: /* @__PURE__ */ (0,
|
|
15523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
15377
15524
|
}
|
|
15378
15525
|
)
|
|
15379
15526
|
] })
|
|
@@ -15393,7 +15540,7 @@ var import_list = require("@lexical/list");
|
|
|
15393
15540
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
15394
15541
|
var import_utils9 = require("@lexical/utils");
|
|
15395
15542
|
var import_lexical5 = require("lexical");
|
|
15396
|
-
var
|
|
15543
|
+
var import_react150 = require("react");
|
|
15397
15544
|
function isIndentPermitted(maxDepth) {
|
|
15398
15545
|
const selection = (0, import_lexical5.$getSelection)();
|
|
15399
15546
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -15448,8 +15595,8 @@ function $indentOverTab(selection) {
|
|
|
15448
15595
|
}
|
|
15449
15596
|
function ListIndentPlugin({ maxDepth }) {
|
|
15450
15597
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
15451
|
-
const isInListItemNode = (0,
|
|
15452
|
-
(0,
|
|
15598
|
+
const isInListItemNode = (0, import_react150.useRef)(false);
|
|
15599
|
+
(0, import_react150.useEffect)(() => {
|
|
15453
15600
|
return editor.registerCommand(
|
|
15454
15601
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
15455
15602
|
() => {
|
|
@@ -15466,7 +15613,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
15466
15613
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
15467
15614
|
);
|
|
15468
15615
|
}, [editor]);
|
|
15469
|
-
(0,
|
|
15616
|
+
(0, import_react150.useEffect)(() => {
|
|
15470
15617
|
return (0, import_utils9.mergeRegister)(
|
|
15471
15618
|
editor.registerCommand(
|
|
15472
15619
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
@@ -15496,13 +15643,13 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
15496
15643
|
|
|
15497
15644
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
15498
15645
|
init_emotion_jsx_shim();
|
|
15499
|
-
var
|
|
15646
|
+
var import_react151 = require("@emotion/react");
|
|
15500
15647
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
15501
15648
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
15502
15649
|
var import_table = require("@lexical/table");
|
|
15503
15650
|
var import_lexical6 = require("lexical");
|
|
15504
|
-
var
|
|
15505
|
-
var
|
|
15651
|
+
var import_react152 = require("react");
|
|
15652
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
15506
15653
|
function computeSelectionCount(selection) {
|
|
15507
15654
|
const selectionShape = selection.getShape();
|
|
15508
15655
|
return {
|
|
@@ -15510,21 +15657,21 @@ function computeSelectionCount(selection) {
|
|
|
15510
15657
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
15511
15658
|
};
|
|
15512
15659
|
}
|
|
15513
|
-
var tableActionMenuTrigger =
|
|
15660
|
+
var tableActionMenuTrigger = import_react151.css`
|
|
15514
15661
|
position: absolute;
|
|
15515
15662
|
transform: translate(calc(-100% - 1px), 1px);
|
|
15516
15663
|
`;
|
|
15517
|
-
var TableActionMenuTrigger = (0,
|
|
15664
|
+
var TableActionMenuTrigger = (0, import_react152.forwardRef)((props, ref) => {
|
|
15518
15665
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
15519
|
-
const [coordinates, setCoordinates] = (0,
|
|
15520
|
-
(0,
|
|
15666
|
+
const [coordinates, setCoordinates] = (0, import_react152.useState)({ x: 0, y: 0 });
|
|
15667
|
+
(0, import_react152.useLayoutEffect)(() => {
|
|
15521
15668
|
const rect = tableCellEl.getBoundingClientRect();
|
|
15522
15669
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
15523
15670
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
15524
15671
|
const relativeY = rect.top - parentRect.top + positioningAnchorEl.scrollTop;
|
|
15525
15672
|
setCoordinates({ x: relativeX, y: relativeY });
|
|
15526
15673
|
}, [tableCellEl, positioningAnchorEl]);
|
|
15527
|
-
return /* @__PURE__ */ (0,
|
|
15674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15528
15675
|
IconButton,
|
|
15529
15676
|
{
|
|
15530
15677
|
ref,
|
|
@@ -15538,7 +15685,7 @@ var TableActionMenuTrigger = (0, import_react150.forwardRef)((props, ref) => {
|
|
|
15538
15685
|
size: "xs",
|
|
15539
15686
|
buttonType: "unimportant",
|
|
15540
15687
|
...rest,
|
|
15541
|
-
children: /* @__PURE__ */ (0,
|
|
15688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
|
|
15542
15689
|
}
|
|
15543
15690
|
);
|
|
15544
15691
|
});
|
|
@@ -15550,16 +15697,16 @@ function TableActionMenu({
|
|
|
15550
15697
|
positioningAnchorEl
|
|
15551
15698
|
}) {
|
|
15552
15699
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
15553
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
15554
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
15700
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react152.useState)(_tableCellNode);
|
|
15701
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react152.useState)({
|
|
15555
15702
|
columns: 1,
|
|
15556
15703
|
rows: 1
|
|
15557
15704
|
});
|
|
15558
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
15705
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react152.useState)(0);
|
|
15559
15706
|
const incrementMenuTriggerKey = () => {
|
|
15560
15707
|
setMenuTriggerKey((key) => key += 1);
|
|
15561
15708
|
};
|
|
15562
|
-
(0,
|
|
15709
|
+
(0, import_react152.useEffect)(() => {
|
|
15563
15710
|
return editor.registerMutationListener(
|
|
15564
15711
|
import_table.TableCellNode,
|
|
15565
15712
|
(nodeMutations) => {
|
|
@@ -15573,7 +15720,7 @@ function TableActionMenu({
|
|
|
15573
15720
|
{ skipInitialization: true }
|
|
15574
15721
|
);
|
|
15575
15722
|
}, [editor, tableCellNode]);
|
|
15576
|
-
(0,
|
|
15723
|
+
(0, import_react152.useEffect)(() => {
|
|
15577
15724
|
editor.getEditorState().read(() => {
|
|
15578
15725
|
const selection = (0, import_lexical6.$getSelection)();
|
|
15579
15726
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -15581,7 +15728,7 @@ function TableActionMenu({
|
|
|
15581
15728
|
}
|
|
15582
15729
|
});
|
|
15583
15730
|
}, [editor]);
|
|
15584
|
-
const clearTableSelection = (0,
|
|
15731
|
+
const clearTableSelection = (0, import_react152.useCallback)(() => {
|
|
15585
15732
|
editor.update(() => {
|
|
15586
15733
|
if (tableCellNode.isAttached()) {
|
|
15587
15734
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -15602,7 +15749,7 @@ function TableActionMenu({
|
|
|
15602
15749
|
rootNode.selectStart();
|
|
15603
15750
|
});
|
|
15604
15751
|
}, [editor, tableCellNode]);
|
|
15605
|
-
const insertTableRowAtSelection = (0,
|
|
15752
|
+
const insertTableRowAtSelection = (0, import_react152.useCallback)(
|
|
15606
15753
|
(shouldInsertAfter) => {
|
|
15607
15754
|
editor.update(() => {
|
|
15608
15755
|
(0, import_table.$insertTableRow__EXPERIMENTAL)(shouldInsertAfter);
|
|
@@ -15611,7 +15758,7 @@ function TableActionMenu({
|
|
|
15611
15758
|
},
|
|
15612
15759
|
[editor]
|
|
15613
15760
|
);
|
|
15614
|
-
const insertTableColumnAtSelection = (0,
|
|
15761
|
+
const insertTableColumnAtSelection = (0, import_react152.useCallback)(
|
|
15615
15762
|
(shouldInsertAfter) => {
|
|
15616
15763
|
editor.update(() => {
|
|
15617
15764
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -15622,26 +15769,26 @@ function TableActionMenu({
|
|
|
15622
15769
|
},
|
|
15623
15770
|
[editor, selectionCounts.columns]
|
|
15624
15771
|
);
|
|
15625
|
-
const deleteTableRowAtSelection = (0,
|
|
15772
|
+
const deleteTableRowAtSelection = (0, import_react152.useCallback)(() => {
|
|
15626
15773
|
editor.update(() => {
|
|
15627
15774
|
(0, import_table.$deleteTableRow__EXPERIMENTAL)();
|
|
15628
15775
|
});
|
|
15629
15776
|
incrementMenuTriggerKey();
|
|
15630
15777
|
}, [editor]);
|
|
15631
|
-
const deleteTableAtSelection = (0,
|
|
15778
|
+
const deleteTableAtSelection = (0, import_react152.useCallback)(() => {
|
|
15632
15779
|
editor.update(() => {
|
|
15633
15780
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15634
15781
|
tableNode.remove();
|
|
15635
15782
|
clearTableSelection();
|
|
15636
15783
|
});
|
|
15637
15784
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15638
|
-
const deleteTableColumnAtSelection = (0,
|
|
15785
|
+
const deleteTableColumnAtSelection = (0, import_react152.useCallback)(() => {
|
|
15639
15786
|
editor.update(() => {
|
|
15640
15787
|
(0, import_table.$deleteTableColumn__EXPERIMENTAL)();
|
|
15641
15788
|
});
|
|
15642
15789
|
incrementMenuTriggerKey();
|
|
15643
15790
|
}, [editor]);
|
|
15644
|
-
const toggleTableRowIsHeader = (0,
|
|
15791
|
+
const toggleTableRowIsHeader = (0, import_react152.useCallback)(() => {
|
|
15645
15792
|
editor.update(() => {
|
|
15646
15793
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15647
15794
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -15662,7 +15809,7 @@ function TableActionMenu({
|
|
|
15662
15809
|
clearTableSelection();
|
|
15663
15810
|
});
|
|
15664
15811
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15665
|
-
const toggleTableColumnIsHeader = (0,
|
|
15812
|
+
const toggleTableColumnIsHeader = (0, import_react152.useCallback)(() => {
|
|
15666
15813
|
editor.update(() => {
|
|
15667
15814
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
15668
15815
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -15689,13 +15836,13 @@ function TableActionMenu({
|
|
|
15689
15836
|
clearTableSelection();
|
|
15690
15837
|
});
|
|
15691
15838
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15692
|
-
const menuItemCss = (0,
|
|
15839
|
+
const menuItemCss = (0, import_react151.css)({
|
|
15693
15840
|
fontSize: "var(--fs-sm)"
|
|
15694
15841
|
});
|
|
15695
|
-
return /* @__PURE__ */ (0,
|
|
15842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15696
15843
|
Menu,
|
|
15697
15844
|
{
|
|
15698
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
15845
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15699
15846
|
TableActionMenuTrigger,
|
|
15700
15847
|
{
|
|
15701
15848
|
tableCellEl,
|
|
@@ -15706,7 +15853,7 @@ function TableActionMenu({
|
|
|
15706
15853
|
portalElement: menuPortalEl,
|
|
15707
15854
|
maxMenuHeight: "300px",
|
|
15708
15855
|
children: [
|
|
15709
|
-
/* @__PURE__ */ (0,
|
|
15856
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15710
15857
|
MenuItem,
|
|
15711
15858
|
{
|
|
15712
15859
|
onClick: () => {
|
|
@@ -15720,33 +15867,33 @@ function TableActionMenu({
|
|
|
15720
15867
|
]
|
|
15721
15868
|
}
|
|
15722
15869
|
),
|
|
15723
|
-
/* @__PURE__ */ (0,
|
|
15870
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
|
|
15724
15871
|
"Insert ",
|
|
15725
15872
|
selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
|
|
15726
15873
|
" below"
|
|
15727
15874
|
] }),
|
|
15728
|
-
/* @__PURE__ */ (0,
|
|
15729
|
-
/* @__PURE__ */ (0,
|
|
15875
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MenuItemSeparator, {}),
|
|
15876
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
|
|
15730
15877
|
"Insert ",
|
|
15731
15878
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
15732
15879
|
" left"
|
|
15733
15880
|
] }),
|
|
15734
|
-
/* @__PURE__ */ (0,
|
|
15881
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
|
|
15735
15882
|
"Insert ",
|
|
15736
15883
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
15737
15884
|
" right"
|
|
15738
15885
|
] }),
|
|
15739
|
-
/* @__PURE__ */ (0,
|
|
15740
|
-
/* @__PURE__ */ (0,
|
|
15741
|
-
/* @__PURE__ */ (0,
|
|
15742
|
-
/* @__PURE__ */ (0,
|
|
15743
|
-
/* @__PURE__ */ (0,
|
|
15744
|
-
/* @__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: [
|
|
15745
15892
|
(tableCellNode.__headerState & import_table.TableCellHeaderStates.ROW) === import_table.TableCellHeaderStates.ROW ? "Remove" : "Add",
|
|
15746
15893
|
" ",
|
|
15747
15894
|
"row header"
|
|
15748
15895
|
] }),
|
|
15749
|
-
/* @__PURE__ */ (0,
|
|
15896
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
|
|
15750
15897
|
(tableCellNode.__headerState & import_table.TableCellHeaderStates.COLUMN) === import_table.TableCellHeaderStates.COLUMN ? "Remove" : "Add",
|
|
15751
15898
|
" ",
|
|
15752
15899
|
"column header"
|
|
@@ -15760,10 +15907,10 @@ function TableCellActionMenuContainer({
|
|
|
15760
15907
|
positioningAnchorEl
|
|
15761
15908
|
}) {
|
|
15762
15909
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
15763
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
15764
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
15765
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
15766
|
-
(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)(() => {
|
|
15767
15914
|
const newPortalEl = document.createElement("div");
|
|
15768
15915
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
15769
15916
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -15771,14 +15918,14 @@ function TableCellActionMenuContainer({
|
|
|
15771
15918
|
newPortalEl.remove();
|
|
15772
15919
|
};
|
|
15773
15920
|
}, [menuPortalEl]);
|
|
15774
|
-
const setTableMenuCellNodeElem = (0,
|
|
15921
|
+
const setTableMenuCellNodeElem = (0, import_react152.useCallback)((elem) => {
|
|
15775
15922
|
if (elem) {
|
|
15776
15923
|
_setTableMenuCellNodeEl(elem);
|
|
15777
15924
|
} else {
|
|
15778
15925
|
_setTableMenuCellNodeEl(null);
|
|
15779
15926
|
}
|
|
15780
15927
|
}, []);
|
|
15781
|
-
const $moveMenu = (0,
|
|
15928
|
+
const $moveMenu = (0, import_react152.useCallback)(() => {
|
|
15782
15929
|
const selection = (0, import_lexical6.$getSelection)();
|
|
15783
15930
|
const nativeSelection = window.getSelection();
|
|
15784
15931
|
const activeElement = document.activeElement;
|
|
@@ -15807,14 +15954,14 @@ function TableCellActionMenuContainer({
|
|
|
15807
15954
|
setTableMenuCellNodeElem(null);
|
|
15808
15955
|
}
|
|
15809
15956
|
}, [editor, setTableMenuCellNodeElem]);
|
|
15810
|
-
(0,
|
|
15957
|
+
(0, import_react152.useEffect)(() => {
|
|
15811
15958
|
return editor.registerUpdateListener(() => {
|
|
15812
15959
|
editor.getEditorState().read(() => {
|
|
15813
15960
|
$moveMenu();
|
|
15814
15961
|
});
|
|
15815
15962
|
});
|
|
15816
15963
|
});
|
|
15817
|
-
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0,
|
|
15964
|
+
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15818
15965
|
TableActionMenu,
|
|
15819
15966
|
{
|
|
15820
15967
|
tableCellNode,
|
|
@@ -15830,23 +15977,23 @@ function TableActionMenuPlugin({
|
|
|
15830
15977
|
menuPortalEl
|
|
15831
15978
|
}) {
|
|
15832
15979
|
const isEditable = (0, import_useLexicalEditable.useLexicalEditable)();
|
|
15833
|
-
return isEditable ? /* @__PURE__ */ (0,
|
|
15980
|
+
return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TableCellActionMenuContainer, { menuPortalEl, positioningAnchorEl }) : null;
|
|
15834
15981
|
}
|
|
15835
15982
|
|
|
15836
15983
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
15837
15984
|
init_emotion_jsx_shim();
|
|
15838
|
-
var
|
|
15985
|
+
var import_react153 = require("@emotion/react");
|
|
15839
15986
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
15840
15987
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
15841
15988
|
var import_table2 = require("@lexical/table");
|
|
15842
15989
|
var import_utils11 = require("@lexical/utils");
|
|
15843
15990
|
var import_lexical7 = require("lexical");
|
|
15844
|
-
var
|
|
15991
|
+
var import_react154 = require("react");
|
|
15845
15992
|
var import_react_dom3 = require("react-dom");
|
|
15846
|
-
var
|
|
15993
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
15847
15994
|
var MIN_ROW_HEIGHT = 33;
|
|
15848
15995
|
var MIN_COLUMN_WIDTH = 50;
|
|
15849
|
-
var tableResizer =
|
|
15996
|
+
var tableResizer = import_react153.css`
|
|
15850
15997
|
position: absolute;
|
|
15851
15998
|
z-index: var(--z-10);
|
|
15852
15999
|
`;
|
|
@@ -15868,15 +16015,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
15868
16015
|
return null;
|
|
15869
16016
|
};
|
|
15870
16017
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
15871
|
-
const targetRef = (0,
|
|
15872
|
-
const resizerRef = (0,
|
|
15873
|
-
const tableRectRef = (0,
|
|
15874
|
-
const mouseStartPosRef = (0,
|
|
15875
|
-
const [mouseCurrentPos, updateMouseCurrentPos] = (0,
|
|
15876
|
-
const [activeCell, updateActiveCell] = (0,
|
|
15877
|
-
const [isMouseDown, updateIsMouseDown] = (0,
|
|
15878
|
-
const [draggingDirection, updateDraggingDirection] = (0,
|
|
15879
|
-
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)(() => {
|
|
15880
16027
|
updateActiveCell(null);
|
|
15881
16028
|
targetRef.current = null;
|
|
15882
16029
|
updateDraggingDirection(null);
|
|
@@ -15886,7 +16033,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15886
16033
|
const isMouseDownOnEvent = (event) => {
|
|
15887
16034
|
return (event.buttons & 1) === 1;
|
|
15888
16035
|
};
|
|
15889
|
-
(0,
|
|
16036
|
+
(0, import_react154.useEffect)(() => {
|
|
15890
16037
|
const onMouseMove = (event) => {
|
|
15891
16038
|
setTimeout(() => {
|
|
15892
16039
|
const target = event.target;
|
|
@@ -15953,7 +16100,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15953
16100
|
}
|
|
15954
16101
|
return false;
|
|
15955
16102
|
};
|
|
15956
|
-
const updateRowHeight = (0,
|
|
16103
|
+
const updateRowHeight = (0, import_react154.useCallback)(
|
|
15957
16104
|
(heightChange) => {
|
|
15958
16105
|
if (!activeCell) {
|
|
15959
16106
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -16015,7 +16162,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16015
16162
|
}
|
|
16016
16163
|
}
|
|
16017
16164
|
};
|
|
16018
|
-
const updateColumnWidth = (0,
|
|
16165
|
+
const updateColumnWidth = (0, import_react154.useCallback)(
|
|
16019
16166
|
(widthChange) => {
|
|
16020
16167
|
if (!activeCell) {
|
|
16021
16168
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -16049,7 +16196,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16049
16196
|
},
|
|
16050
16197
|
[activeCell, editor]
|
|
16051
16198
|
);
|
|
16052
|
-
const mouseUpHandler = (0,
|
|
16199
|
+
const mouseUpHandler = (0, import_react154.useCallback)(
|
|
16053
16200
|
(direction) => {
|
|
16054
16201
|
const handler = (event) => {
|
|
16055
16202
|
event.preventDefault();
|
|
@@ -16078,7 +16225,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16078
16225
|
},
|
|
16079
16226
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
16080
16227
|
);
|
|
16081
|
-
const toggleResize = (0,
|
|
16228
|
+
const toggleResize = (0, import_react154.useCallback)(
|
|
16082
16229
|
(direction) => (event) => {
|
|
16083
16230
|
event.preventDefault();
|
|
16084
16231
|
event.stopPropagation();
|
|
@@ -16095,7 +16242,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16095
16242
|
},
|
|
16096
16243
|
[activeCell, mouseUpHandler]
|
|
16097
16244
|
);
|
|
16098
|
-
const getResizers = (0,
|
|
16245
|
+
const getResizers = (0, import_react154.useCallback)(() => {
|
|
16099
16246
|
if (activeCell) {
|
|
16100
16247
|
const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
|
|
16101
16248
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -16144,8 +16291,8 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16144
16291
|
};
|
|
16145
16292
|
}, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
|
|
16146
16293
|
const resizerStyles = getResizers();
|
|
16147
|
-
return /* @__PURE__ */ (0,
|
|
16148
|
-
/* @__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)(
|
|
16149
16296
|
"div",
|
|
16150
16297
|
{
|
|
16151
16298
|
css: tableResizer,
|
|
@@ -16153,7 +16300,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16153
16300
|
onMouseDown: toggleResize("right")
|
|
16154
16301
|
}
|
|
16155
16302
|
),
|
|
16156
|
-
/* @__PURE__ */ (0,
|
|
16303
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16157
16304
|
"div",
|
|
16158
16305
|
{
|
|
16159
16306
|
css: tableResizer,
|
|
@@ -16166,9 +16313,9 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
16166
16313
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
16167
16314
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
16168
16315
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
16169
|
-
return (0,
|
|
16316
|
+
return (0, import_react154.useMemo)(
|
|
16170
16317
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
16171
|
-
/* @__PURE__ */ (0,
|
|
16318
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
16172
16319
|
positioningAnchorEl
|
|
16173
16320
|
) : null,
|
|
16174
16321
|
[editor, isEditable, positioningAnchorEl]
|
|
@@ -16180,11 +16327,11 @@ init_emotion_jsx_shim();
|
|
|
16180
16327
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
16181
16328
|
var import_table3 = require("@lexical/table");
|
|
16182
16329
|
var import_lexical8 = require("lexical");
|
|
16183
|
-
var
|
|
16330
|
+
var import_react155 = require("react");
|
|
16184
16331
|
var TableSelectionPlugin = () => {
|
|
16185
16332
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
16186
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
16187
|
-
(0,
|
|
16333
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react155.useState)(null);
|
|
16334
|
+
(0, import_react155.useEffect)(() => {
|
|
16188
16335
|
return editor.registerCommand(
|
|
16189
16336
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
16190
16337
|
() => {
|
|
@@ -16206,7 +16353,7 @@ var TableSelectionPlugin = () => {
|
|
|
16206
16353
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
16207
16354
|
);
|
|
16208
16355
|
}, [editor]);
|
|
16209
|
-
(0,
|
|
16356
|
+
(0, import_react155.useEffect)(() => {
|
|
16210
16357
|
const onControlA = (event) => {
|
|
16211
16358
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
16212
16359
|
if (!closestTableCellNode) {
|
|
@@ -16230,7 +16377,7 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
16230
16377
|
|
|
16231
16378
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
16232
16379
|
init_emotion_jsx_shim();
|
|
16233
|
-
var
|
|
16380
|
+
var import_react157 = require("@emotion/react");
|
|
16234
16381
|
var import_code2 = require("@lexical/code");
|
|
16235
16382
|
var import_list2 = require("@lexical/list");
|
|
16236
16383
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -16239,7 +16386,7 @@ var import_selection2 = require("@lexical/selection");
|
|
|
16239
16386
|
var import_table4 = require("@lexical/table");
|
|
16240
16387
|
var import_utils12 = require("@lexical/utils");
|
|
16241
16388
|
var import_lexical9 = require("lexical");
|
|
16242
|
-
var
|
|
16389
|
+
var import_react158 = require("react");
|
|
16243
16390
|
|
|
16244
16391
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
16245
16392
|
init_emotion_jsx_shim();
|
|
@@ -16257,29 +16404,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
16257
16404
|
|
|
16258
16405
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
16259
16406
|
init_emotion_jsx_shim();
|
|
16260
|
-
var
|
|
16407
|
+
var import_react156 = require("react");
|
|
16261
16408
|
var useRichTextToolbarState = ({ config }) => {
|
|
16262
16409
|
var _a;
|
|
16263
|
-
const enabledBuiltInFormats = (0,
|
|
16410
|
+
const enabledBuiltInFormats = (0, import_react156.useMemo)(() => {
|
|
16264
16411
|
return richTextBuiltInFormats.filter((format) => {
|
|
16265
16412
|
var _a2, _b;
|
|
16266
16413
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
16267
16414
|
});
|
|
16268
16415
|
}, [config]);
|
|
16269
|
-
const enabledBuiltInElements = (0,
|
|
16416
|
+
const enabledBuiltInElements = (0, import_react156.useMemo)(() => {
|
|
16270
16417
|
return richTextBuiltInElements.filter((element) => {
|
|
16271
16418
|
var _a2, _b;
|
|
16272
16419
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
16273
16420
|
});
|
|
16274
16421
|
}, [config]);
|
|
16275
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
16422
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react156.useMemo)(() => {
|
|
16276
16423
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
16277
16424
|
}, [enabledBuiltInFormats]);
|
|
16278
16425
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
16279
16426
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
16280
16427
|
);
|
|
16281
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
16282
|
-
const visibleFormatsWithIcon = (0,
|
|
16428
|
+
const [activeFormats, setActiveFormats] = (0, import_react156.useState)([]);
|
|
16429
|
+
const visibleFormatsWithIcon = (0, import_react156.useMemo)(() => {
|
|
16283
16430
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
16284
16431
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
16285
16432
|
visibleFormats.add(type);
|
|
@@ -16289,7 +16436,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16289
16436
|
});
|
|
16290
16437
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
16291
16438
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
16292
|
-
const visibleFormatsWithoutIcon = (0,
|
|
16439
|
+
const visibleFormatsWithoutIcon = (0, import_react156.useMemo)(() => {
|
|
16293
16440
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
16294
16441
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
16295
16442
|
visibleFormats.add(type);
|
|
@@ -16299,11 +16446,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16299
16446
|
});
|
|
16300
16447
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
16301
16448
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
16302
|
-
const [activeElement, setActiveElement] = (0,
|
|
16449
|
+
const [activeElement, setActiveElement] = (0, import_react156.useState)("paragraph");
|
|
16303
16450
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
16304
16451
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
16305
16452
|
);
|
|
16306
|
-
const visibleTextualElements = (0,
|
|
16453
|
+
const visibleTextualElements = (0, import_react156.useMemo)(() => {
|
|
16307
16454
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
16308
16455
|
return enabledTextualElements;
|
|
16309
16456
|
}
|
|
@@ -16314,30 +16461,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16314
16461
|
}
|
|
16315
16462
|
);
|
|
16316
16463
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
16317
|
-
const [isLink, setIsLink] = (0,
|
|
16318
|
-
const linkElementVisible = (0,
|
|
16464
|
+
const [isLink, setIsLink] = (0, import_react156.useState)(false);
|
|
16465
|
+
const linkElementVisible = (0, import_react156.useMemo)(() => {
|
|
16319
16466
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
16320
16467
|
}, [isLink, enabledBuiltInElements]);
|
|
16321
|
-
const visibleLists = (0,
|
|
16468
|
+
const visibleLists = (0, import_react156.useMemo)(() => {
|
|
16322
16469
|
return new Set(
|
|
16323
16470
|
["orderedList", "unorderedList"].filter(
|
|
16324
16471
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
16325
16472
|
)
|
|
16326
16473
|
);
|
|
16327
16474
|
}, [activeElement, enabledBuiltInElements]);
|
|
16328
|
-
const quoteElementVisible = (0,
|
|
16475
|
+
const quoteElementVisible = (0, import_react156.useMemo)(() => {
|
|
16329
16476
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
16330
16477
|
}, [activeElement, enabledBuiltInElements]);
|
|
16331
|
-
const codeElementVisible = (0,
|
|
16478
|
+
const codeElementVisible = (0, import_react156.useMemo)(() => {
|
|
16332
16479
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
16333
16480
|
}, [activeElement, enabledBuiltInElements]);
|
|
16334
|
-
const tableElementVisible = (0,
|
|
16481
|
+
const tableElementVisible = (0, import_react156.useMemo)(() => {
|
|
16335
16482
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
16336
16483
|
}, [activeElement, enabledBuiltInElements]);
|
|
16337
|
-
const assetElementVisible = (0,
|
|
16484
|
+
const assetElementVisible = (0, import_react156.useMemo)(() => {
|
|
16338
16485
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
16339
16486
|
}, [activeElement, enabledBuiltInElements]);
|
|
16340
|
-
const visibleElementsWithIcons = (0,
|
|
16487
|
+
const visibleElementsWithIcons = (0, import_react156.useMemo)(() => {
|
|
16341
16488
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
16342
16489
|
if (linkElementVisible) {
|
|
16343
16490
|
visibleElements.add("link");
|
|
@@ -16349,7 +16496,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16349
16496
|
}
|
|
16350
16497
|
return visibleElements;
|
|
16351
16498
|
}, [linkElementVisible, visibleLists]);
|
|
16352
|
-
const visibleInsertElementsWithIcons = (0,
|
|
16499
|
+
const visibleInsertElementsWithIcons = (0, import_react156.useMemo)(() => {
|
|
16353
16500
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
16354
16501
|
if (quoteElementVisible) {
|
|
16355
16502
|
visibleElements.add("quote");
|
|
@@ -16387,8 +16534,8 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
16387
16534
|
};
|
|
16388
16535
|
|
|
16389
16536
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
16390
|
-
var
|
|
16391
|
-
var toolbar =
|
|
16537
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
16538
|
+
var toolbar = import_react157.css`
|
|
16392
16539
|
${scrollbarStyles}
|
|
16393
16540
|
background: var(--gray-50);
|
|
16394
16541
|
border-radius: var(--rounded-base);
|
|
@@ -16402,7 +16549,7 @@ var toolbar = import_react155.css`
|
|
|
16402
16549
|
top: calc(var(--spacing-sm) * -2);
|
|
16403
16550
|
z-index: 10;
|
|
16404
16551
|
`;
|
|
16405
|
-
var toolbarGroup =
|
|
16552
|
+
var toolbarGroup = import_react157.css`
|
|
16406
16553
|
display: flex;
|
|
16407
16554
|
flex-shrink: 0;
|
|
16408
16555
|
gap: var(--spacing-xs);
|
|
@@ -16419,7 +16566,7 @@ var toolbarGroup = import_react155.css`
|
|
|
16419
16566
|
width: 1px;
|
|
16420
16567
|
}
|
|
16421
16568
|
`;
|
|
16422
|
-
var richTextToolbarButton =
|
|
16569
|
+
var richTextToolbarButton = import_react157.css`
|
|
16423
16570
|
align-items: center;
|
|
16424
16571
|
appearance: none;
|
|
16425
16572
|
border: 0;
|
|
@@ -16433,21 +16580,21 @@ var richTextToolbarButton = import_react155.css`
|
|
|
16433
16580
|
min-width: 32px;
|
|
16434
16581
|
padding: 0 var(--spacing-sm);
|
|
16435
16582
|
`;
|
|
16436
|
-
var richTextToolbarButtonActive =
|
|
16583
|
+
var richTextToolbarButtonActive = import_react157.css`
|
|
16437
16584
|
background: var(--gray-200);
|
|
16438
16585
|
`;
|
|
16439
|
-
var textStyleButton =
|
|
16586
|
+
var textStyleButton = import_react157.css`
|
|
16440
16587
|
justify-content: space-between;
|
|
16441
16588
|
min-width: 7rem;
|
|
16442
16589
|
`;
|
|
16443
|
-
var toolbarIcon =
|
|
16590
|
+
var toolbarIcon = import_react157.css`
|
|
16444
16591
|
color: inherit;
|
|
16445
16592
|
`;
|
|
16446
|
-
var toolbarChevron =
|
|
16593
|
+
var toolbarChevron = import_react157.css`
|
|
16447
16594
|
margin-left: var(--spacing-xs);
|
|
16448
16595
|
`;
|
|
16449
16596
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
16450
|
-
return /* @__PURE__ */ (0,
|
|
16597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
16451
16598
|
};
|
|
16452
16599
|
var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset }) => {
|
|
16453
16600
|
const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
|
|
@@ -16503,7 +16650,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16503
16650
|
});
|
|
16504
16651
|
});
|
|
16505
16652
|
};
|
|
16506
|
-
const updateToolbar = (0,
|
|
16653
|
+
const updateToolbar = (0, import_react158.useCallback)(() => {
|
|
16507
16654
|
const selection = (0, import_lexical9.$getSelection)();
|
|
16508
16655
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
16509
16656
|
return;
|
|
@@ -16542,7 +16689,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16542
16689
|
setIsLink(false);
|
|
16543
16690
|
}
|
|
16544
16691
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
16545
|
-
(0,
|
|
16692
|
+
(0, import_react158.useEffect)(() => {
|
|
16546
16693
|
return editor.registerCommand(
|
|
16547
16694
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
16548
16695
|
(_payload) => {
|
|
@@ -16552,7 +16699,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16552
16699
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
16553
16700
|
);
|
|
16554
16701
|
}, [editor, updateToolbar]);
|
|
16555
|
-
(0,
|
|
16702
|
+
(0, import_react158.useEffect)(() => {
|
|
16556
16703
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
16557
16704
|
requestAnimationFrame(() => {
|
|
16558
16705
|
editorState.read(() => {
|
|
@@ -16561,14 +16708,14 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16561
16708
|
});
|
|
16562
16709
|
});
|
|
16563
16710
|
}, [editor, updateToolbar]);
|
|
16564
|
-
return /* @__PURE__ */ (0,
|
|
16565
|
-
/* @__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)(
|
|
16566
16713
|
Menu,
|
|
16567
16714
|
{
|
|
16568
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16715
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
|
|
16569
16716
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
16570
16717
|
" ",
|
|
16571
|
-
/* @__PURE__ */ (0,
|
|
16718
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16572
16719
|
] }),
|
|
16573
16720
|
placement: "bottom-start",
|
|
16574
16721
|
children: [
|
|
@@ -16578,7 +16725,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16578
16725
|
type: "paragraph"
|
|
16579
16726
|
},
|
|
16580
16727
|
...visibleTextualElements
|
|
16581
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
16728
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16582
16729
|
MenuItem,
|
|
16583
16730
|
{
|
|
16584
16731
|
"data-testid": "menu-item",
|
|
@@ -16589,12 +16736,12 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16589
16736
|
},
|
|
16590
16737
|
element.type
|
|
16591
16738
|
)),
|
|
16592
|
-
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
|
|
16593
16740
|
]
|
|
16594
16741
|
}
|
|
16595
16742
|
),
|
|
16596
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
16597
|
-
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)(
|
|
16598
16745
|
"button",
|
|
16599
16746
|
{
|
|
16600
16747
|
"data-testid": `formatting-button-${format.type}`,
|
|
@@ -16606,15 +16753,15 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16606
16753
|
richTextToolbarButton,
|
|
16607
16754
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
16608
16755
|
],
|
|
16609
|
-
children: /* @__PURE__ */ (0,
|
|
16756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
16610
16757
|
}
|
|
16611
16758
|
) }, format.type)),
|
|
16612
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
16759
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16613
16760
|
Menu,
|
|
16614
16761
|
{
|
|
16615
|
-
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 }) }),
|
|
16616
16763
|
placement: "bottom-start",
|
|
16617
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
16764
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16618
16765
|
MenuItem,
|
|
16619
16766
|
{
|
|
16620
16767
|
onClick: () => {
|
|
@@ -16627,8 +16774,8 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16627
16774
|
}
|
|
16628
16775
|
) : null
|
|
16629
16776
|
] }) : null,
|
|
16630
|
-
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0,
|
|
16631
|
-
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)(
|
|
16632
16779
|
"button",
|
|
16633
16780
|
{
|
|
16634
16781
|
"data-testid": "element-link",
|
|
@@ -16641,11 +16788,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16641
16788
|
}
|
|
16642
16789
|
},
|
|
16643
16790
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
16644
|
-
children: /* @__PURE__ */ (0,
|
|
16791
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
16645
16792
|
}
|
|
16646
16793
|
) }) : null,
|
|
16647
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
16648
|
-
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)(
|
|
16649
16796
|
"button",
|
|
16650
16797
|
{
|
|
16651
16798
|
"data-testid": "element-unordered-list",
|
|
@@ -16661,10 +16808,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16661
16808
|
richTextToolbarButton,
|
|
16662
16809
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
16663
16810
|
],
|
|
16664
|
-
children: /* @__PURE__ */ (0,
|
|
16811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
16665
16812
|
}
|
|
16666
16813
|
) }) : null,
|
|
16667
|
-
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)(
|
|
16668
16815
|
"button",
|
|
16669
16816
|
{
|
|
16670
16817
|
"data-testid": "element-ordered-list",
|
|
@@ -16680,58 +16827,58 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16680
16827
|
richTextToolbarButton,
|
|
16681
16828
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
16682
16829
|
],
|
|
16683
|
-
children: /* @__PURE__ */ (0,
|
|
16830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
16684
16831
|
}
|
|
16685
16832
|
) }) : null
|
|
16686
16833
|
] }) : null,
|
|
16687
16834
|
customControls ? customControls : null
|
|
16688
16835
|
] }) : null,
|
|
16689
|
-
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)(
|
|
16690
16837
|
Menu,
|
|
16691
16838
|
{
|
|
16692
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
16839
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
|
|
16693
16840
|
"Insert",
|
|
16694
|
-
/* @__PURE__ */ (0,
|
|
16841
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16695
16842
|
] }),
|
|
16696
16843
|
placement: "bottom-start",
|
|
16697
16844
|
children: [
|
|
16698
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
16845
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16699
16846
|
MenuItem,
|
|
16700
16847
|
{
|
|
16701
16848
|
onClick: () => {
|
|
16702
16849
|
onSelectElement("quote");
|
|
16703
16850
|
},
|
|
16704
|
-
icon: /* @__PURE__ */ (0,
|
|
16851
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "quote", iconColor: "currentColor" }),
|
|
16705
16852
|
children: "Quote"
|
|
16706
16853
|
}
|
|
16707
16854
|
) : null,
|
|
16708
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
16855
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16709
16856
|
MenuItem,
|
|
16710
16857
|
{
|
|
16711
16858
|
onClick: () => {
|
|
16712
16859
|
onSelectElement("code");
|
|
16713
16860
|
},
|
|
16714
|
-
icon: /* @__PURE__ */ (0,
|
|
16861
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "code-slash", iconColor: "currentColor" }),
|
|
16715
16862
|
children: "Code"
|
|
16716
16863
|
}
|
|
16717
16864
|
) : null,
|
|
16718
|
-
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0,
|
|
16865
|
+
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16719
16866
|
MenuItem,
|
|
16720
16867
|
{
|
|
16721
16868
|
onClick: () => {
|
|
16722
16869
|
onSelectElement("table");
|
|
16723
16870
|
},
|
|
16724
|
-
icon: /* @__PURE__ */ (0,
|
|
16871
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "view-grid", iconColor: "currentColor" }),
|
|
16725
16872
|
children: "Table"
|
|
16726
16873
|
}
|
|
16727
16874
|
) : null,
|
|
16728
|
-
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ (0,
|
|
16875
|
+
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16729
16876
|
MenuItem,
|
|
16730
16877
|
{
|
|
16731
16878
|
onClick: () => {
|
|
16732
16879
|
onSelectElement("asset");
|
|
16733
16880
|
},
|
|
16734
|
-
icon: /* @__PURE__ */ (0,
|
|
16881
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "image", iconColor: "currentColor" }),
|
|
16735
16882
|
children: "Asset"
|
|
16736
16883
|
}
|
|
16737
16884
|
) : null
|
|
@@ -16743,7 +16890,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16743
16890
|
var RichTextToolbar_default = RichTextToolbar;
|
|
16744
16891
|
|
|
16745
16892
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
16746
|
-
var
|
|
16893
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
16747
16894
|
var ParameterRichText = ({
|
|
16748
16895
|
label,
|
|
16749
16896
|
labelLeadingIcon,
|
|
@@ -16757,7 +16904,7 @@ var ParameterRichText = ({
|
|
|
16757
16904
|
children,
|
|
16758
16905
|
...innerProps
|
|
16759
16906
|
}) => {
|
|
16760
|
-
return /* @__PURE__ */ (0,
|
|
16907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
16761
16908
|
ParameterShell,
|
|
16762
16909
|
{
|
|
16763
16910
|
"data-testid": "parameter-richtext",
|
|
@@ -16771,13 +16918,13 @@ var ParameterRichText = ({
|
|
|
16771
16918
|
captionTestId,
|
|
16772
16919
|
menuItems,
|
|
16773
16920
|
children: [
|
|
16774
|
-
/* @__PURE__ */ (0,
|
|
16775
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
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
|
|
16776
16923
|
]
|
|
16777
16924
|
}
|
|
16778
16925
|
);
|
|
16779
16926
|
};
|
|
16780
|
-
var editorContainerWrapper =
|
|
16927
|
+
var editorContainerWrapper = import_react159.css`
|
|
16781
16928
|
position: relative;
|
|
16782
16929
|
|
|
16783
16930
|
&::before {
|
|
@@ -16793,12 +16940,12 @@ var editorContainerWrapper = import_react157.css`
|
|
|
16793
16940
|
z-index: 2;
|
|
16794
16941
|
}
|
|
16795
16942
|
`;
|
|
16796
|
-
var editorWrapper =
|
|
16943
|
+
var editorWrapper = import_react159.css`
|
|
16797
16944
|
display: flex;
|
|
16798
16945
|
flex-flow: column;
|
|
16799
16946
|
flex-grow: 1;
|
|
16800
16947
|
`;
|
|
16801
|
-
var editorContainer =
|
|
16948
|
+
var editorContainer = import_react159.css`
|
|
16802
16949
|
${scrollbarStyles}
|
|
16803
16950
|
background: var(--white);
|
|
16804
16951
|
border-radius: var(--rounded-sm);
|
|
@@ -16830,7 +16977,7 @@ var editorContainer = import_react157.css`
|
|
|
16830
16977
|
max-height: unset;
|
|
16831
16978
|
}
|
|
16832
16979
|
`;
|
|
16833
|
-
var editorContainerOverflowWrapper =
|
|
16980
|
+
var editorContainerOverflowWrapper = import_react159.css`
|
|
16834
16981
|
overflow: hidden;
|
|
16835
16982
|
pointer-events: none;
|
|
16836
16983
|
|
|
@@ -16838,7 +16985,7 @@ var editorContainerOverflowWrapper = import_react157.css`
|
|
|
16838
16985
|
pointer-events: auto;
|
|
16839
16986
|
}
|
|
16840
16987
|
`;
|
|
16841
|
-
var editorPlaceholder =
|
|
16988
|
+
var editorPlaceholder = import_react159.css`
|
|
16842
16989
|
color: var(--gray-500);
|
|
16843
16990
|
font-style: italic;
|
|
16844
16991
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -16849,7 +16996,7 @@ var editorPlaceholder = import_react157.css`
|
|
|
16849
16996
|
top: calc(1rem + var(--spacing-sm));
|
|
16850
16997
|
user-select: none;
|
|
16851
16998
|
`;
|
|
16852
|
-
var editorInput =
|
|
16999
|
+
var editorInput = import_react159.css`
|
|
16853
17000
|
min-height: 100%;
|
|
16854
17001
|
flex-grow: 1;
|
|
16855
17002
|
|
|
@@ -16922,8 +17069,8 @@ var ParameterRichTextInner = ({
|
|
|
16922
17069
|
},
|
|
16923
17070
|
editable: !richTextProps.readOnly
|
|
16924
17071
|
};
|
|
16925
|
-
return /* @__PURE__ */ (0,
|
|
16926
|
-
/* @__PURE__ */ (0,
|
|
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 }) }) }),
|
|
16927
17074
|
editorFooter ? editorFooter : null
|
|
16928
17075
|
] });
|
|
16929
17076
|
};
|
|
@@ -16953,12 +17100,12 @@ var RichText = ({
|
|
|
16953
17100
|
placeholder
|
|
16954
17101
|
}) => {
|
|
16955
17102
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
16956
|
-
(0,
|
|
17103
|
+
(0, import_react160.useEffect)(() => {
|
|
16957
17104
|
if (onRichTextInit) {
|
|
16958
17105
|
onRichTextInit(editor);
|
|
16959
17106
|
}
|
|
16960
17107
|
}, [editor, onRichTextInit]);
|
|
16961
|
-
(0,
|
|
17108
|
+
(0, import_react160.useEffect)(() => {
|
|
16962
17109
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
16963
17110
|
requestAnimationFrame(() => {
|
|
16964
17111
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -16975,23 +17122,23 @@ var RichText = ({
|
|
|
16975
17122
|
removeUpdateListener();
|
|
16976
17123
|
};
|
|
16977
17124
|
}, [editor, onChange]);
|
|
16978
|
-
(0,
|
|
17125
|
+
(0, import_react160.useEffect)(() => {
|
|
16979
17126
|
editor.setEditable(!readOnly);
|
|
16980
17127
|
}, [editor, readOnly]);
|
|
16981
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
17128
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react160.useState)(null);
|
|
16982
17129
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
16983
17130
|
if (_editorContainerRef !== null) {
|
|
16984
17131
|
setEditorContainerRef(_editorContainerRef);
|
|
16985
17132
|
}
|
|
16986
17133
|
};
|
|
16987
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
17134
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react160.useState)(null);
|
|
16988
17135
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
16989
17136
|
if (_portalContainerRef !== null) {
|
|
16990
17137
|
setPortalContainerRef(_portalContainerRef);
|
|
16991
17138
|
}
|
|
16992
17139
|
};
|
|
16993
|
-
return /* @__PURE__ */ (0,
|
|
16994
|
-
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)(
|
|
16995
17142
|
RichTextToolbar_default,
|
|
16996
17143
|
{
|
|
16997
17144
|
config,
|
|
@@ -17000,8 +17147,8 @@ var RichText = ({
|
|
|
17000
17147
|
onInsertAsset
|
|
17001
17148
|
}
|
|
17002
17149
|
),
|
|
17003
|
-
/* @__PURE__ */ (0,
|
|
17004
|
-
/* @__PURE__ */ (0,
|
|
17150
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
|
|
17151
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
17005
17152
|
"div",
|
|
17006
17153
|
{
|
|
17007
17154
|
css: editorContainer,
|
|
@@ -17009,33 +17156,33 @@ var RichText = ({
|
|
|
17009
17156
|
ref: onEditorContainerRef,
|
|
17010
17157
|
"data-testid": "value-container",
|
|
17011
17158
|
children: [
|
|
17012
|
-
/* @__PURE__ */ (0,
|
|
17159
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17013
17160
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
17014
17161
|
{
|
|
17015
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
17016
|
-
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..." }),
|
|
17017
17164
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
17018
17165
|
}
|
|
17019
17166
|
),
|
|
17020
|
-
/* @__PURE__ */ (0,
|
|
17021
|
-
/* @__PURE__ */ (0,
|
|
17022
|
-
/* @__PURE__ */ (0,
|
|
17023
|
-
/* @__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)(
|
|
17024
17171
|
TableActionMenuPlugin,
|
|
17025
17172
|
{
|
|
17026
17173
|
positioningAnchorEl: editorContainerRef,
|
|
17027
17174
|
menuPortalEl: portalContainerRef
|
|
17028
17175
|
}
|
|
17029
17176
|
) : null }),
|
|
17030
|
-
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0,
|
|
17031
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
17032
|
-
/* @__PURE__ */ (0,
|
|
17033
|
-
/* @__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 })
|
|
17034
17181
|
]
|
|
17035
17182
|
}
|
|
17036
17183
|
),
|
|
17037
|
-
/* @__PURE__ */ (0,
|
|
17038
|
-
editorContainerRef ? /* @__PURE__ */ (0,
|
|
17184
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children }),
|
|
17185
|
+
editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17039
17186
|
LinkNodePlugin,
|
|
17040
17187
|
{
|
|
17041
17188
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -17046,26 +17193,26 @@ var RichText = ({
|
|
|
17046
17193
|
positioningAnchorEl: editorContainerRef
|
|
17047
17194
|
}
|
|
17048
17195
|
) : null,
|
|
17049
|
-
/* @__PURE__ */ (0,
|
|
17050
|
-
/* @__PURE__ */ (0,
|
|
17196
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TableSelectionPlugin_default, {}),
|
|
17197
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ImprovedAssetSelectionPlugin_default, {})
|
|
17051
17198
|
] })
|
|
17052
17199
|
] });
|
|
17053
17200
|
};
|
|
17054
17201
|
|
|
17055
17202
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
17056
17203
|
init_emotion_jsx_shim();
|
|
17057
|
-
var
|
|
17058
|
-
var
|
|
17059
|
-
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)(
|
|
17060
17207
|
({ defaultOption, options, ...props }, ref) => {
|
|
17061
17208
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17062
|
-
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 }) });
|
|
17063
17210
|
}
|
|
17064
17211
|
);
|
|
17065
|
-
var ParameterSelectInner = (0,
|
|
17212
|
+
var ParameterSelectInner = (0, import_react161.forwardRef)(
|
|
17066
17213
|
({ defaultOption, options, ...props }, ref) => {
|
|
17067
17214
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17068
|
-
return /* @__PURE__ */ (0,
|
|
17215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
17069
17216
|
"select",
|
|
17070
17217
|
{
|
|
17071
17218
|
css: [input3, selectInput],
|
|
@@ -17074,10 +17221,10 @@ var ParameterSelectInner = (0, import_react159.forwardRef)(
|
|
|
17074
17221
|
ref,
|
|
17075
17222
|
...props,
|
|
17076
17223
|
children: [
|
|
17077
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
17224
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
17078
17225
|
options.map((option) => {
|
|
17079
17226
|
var _a;
|
|
17080
|
-
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);
|
|
17081
17228
|
})
|
|
17082
17229
|
]
|
|
17083
17230
|
}
|
|
@@ -17087,15 +17234,15 @@ var ParameterSelectInner = (0, import_react159.forwardRef)(
|
|
|
17087
17234
|
|
|
17088
17235
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
17089
17236
|
init_emotion_jsx_shim();
|
|
17090
|
-
var
|
|
17091
|
-
var
|
|
17092
|
-
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) => {
|
|
17093
17240
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17094
|
-
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 }) });
|
|
17095
17242
|
});
|
|
17096
|
-
var ParameterTextareaInner = (0,
|
|
17243
|
+
var ParameterTextareaInner = (0, import_react162.forwardRef)(({ ...props }, ref) => {
|
|
17097
17244
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
17098
|
-
return /* @__PURE__ */ (0,
|
|
17245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17099
17246
|
"textarea",
|
|
17100
17247
|
{
|
|
17101
17248
|
css: [input3, textarea2],
|
|
@@ -17109,18 +17256,18 @@ var ParameterTextareaInner = (0, import_react160.forwardRef)(({ ...props }, ref)
|
|
|
17109
17256
|
|
|
17110
17257
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
17111
17258
|
init_emotion_jsx_shim();
|
|
17112
|
-
var
|
|
17113
|
-
var
|
|
17114
|
-
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) => {
|
|
17115
17262
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17116
|
-
return /* @__PURE__ */ (0,
|
|
17263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
17117
17264
|
});
|
|
17118
|
-
var ParameterToggleInner = (0,
|
|
17265
|
+
var ParameterToggleInner = (0, import_react163.forwardRef)(
|
|
17119
17266
|
({ children, ...props }, ref) => {
|
|
17120
17267
|
const { id, label } = useParameterShell();
|
|
17121
|
-
return /* @__PURE__ */ (0,
|
|
17122
|
-
/* @__PURE__ */ (0,
|
|
17123
|
-
/* @__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 }),
|
|
17124
17271
|
children
|
|
17125
17272
|
] });
|
|
17126
17273
|
}
|
|
@@ -17131,8 +17278,8 @@ init_emotion_jsx_shim();
|
|
|
17131
17278
|
|
|
17132
17279
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
17133
17280
|
init_emotion_jsx_shim();
|
|
17134
|
-
var
|
|
17135
|
-
var container3 =
|
|
17281
|
+
var import_react164 = require("@emotion/react");
|
|
17282
|
+
var container3 = import_react164.css`
|
|
17136
17283
|
background: var(--gray-50);
|
|
17137
17284
|
margin-block: var(--spacing-sm);
|
|
17138
17285
|
position: relative;
|
|
@@ -17142,17 +17289,17 @@ var container3 = import_react162.css`
|
|
|
17142
17289
|
border: solid 1px var(--gray-300);
|
|
17143
17290
|
`;
|
|
17144
17291
|
var themeMap = {
|
|
17145
|
-
primary:
|
|
17292
|
+
primary: import_react164.css`
|
|
17146
17293
|
--progress-color: var(--accent-light);
|
|
17147
17294
|
`,
|
|
17148
|
-
secondary:
|
|
17295
|
+
secondary: import_react164.css`
|
|
17149
17296
|
--progress-color: var(--accent-alt-light);
|
|
17150
17297
|
`,
|
|
17151
|
-
destructive:
|
|
17298
|
+
destructive: import_react164.css`
|
|
17152
17299
|
--progress-color: var(--brand-secondary-5);
|
|
17153
17300
|
`
|
|
17154
17301
|
};
|
|
17155
|
-
var slidingBackgroundPosition =
|
|
17302
|
+
var slidingBackgroundPosition = import_react164.keyframes`
|
|
17156
17303
|
from {
|
|
17157
17304
|
background-position: 0 0;
|
|
17158
17305
|
}
|
|
@@ -17160,10 +17307,10 @@ var slidingBackgroundPosition = import_react162.keyframes`
|
|
|
17160
17307
|
background-position: 64px 0;
|
|
17161
17308
|
}
|
|
17162
17309
|
`;
|
|
17163
|
-
var determinate =
|
|
17310
|
+
var determinate = import_react164.css`
|
|
17164
17311
|
background-color: var(--progress-color);
|
|
17165
17312
|
`;
|
|
17166
|
-
var indeterminate =
|
|
17313
|
+
var indeterminate = import_react164.css`
|
|
17167
17314
|
background-image: linear-gradient(
|
|
17168
17315
|
45deg,
|
|
17169
17316
|
var(--progress-color) 25%,
|
|
@@ -17177,7 +17324,7 @@ var indeterminate = import_react162.css`
|
|
|
17177
17324
|
background-size: 64px 64px;
|
|
17178
17325
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
17179
17326
|
`;
|
|
17180
|
-
var bar =
|
|
17327
|
+
var bar = import_react164.css`
|
|
17181
17328
|
position: absolute;
|
|
17182
17329
|
inset: 0;
|
|
17183
17330
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -17185,7 +17332,7 @@ var bar = import_react162.css`
|
|
|
17185
17332
|
`;
|
|
17186
17333
|
|
|
17187
17334
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
17188
|
-
var
|
|
17335
|
+
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
17189
17336
|
function ProgressBar({
|
|
17190
17337
|
current,
|
|
17191
17338
|
max,
|
|
@@ -17195,7 +17342,7 @@ function ProgressBar({
|
|
|
17195
17342
|
}) {
|
|
17196
17343
|
const valueNow = Math.min(current, max);
|
|
17197
17344
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
17198
|
-
return /* @__PURE__ */ (0,
|
|
17345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
17199
17346
|
"div",
|
|
17200
17347
|
{
|
|
17201
17348
|
css: container3,
|
|
@@ -17206,7 +17353,7 @@ function ProgressBar({
|
|
|
17206
17353
|
"aria-valuemax": max,
|
|
17207
17354
|
"aria-valuenow": valueNow,
|
|
17208
17355
|
...props,
|
|
17209
|
-
children: /* @__PURE__ */ (0,
|
|
17356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
17210
17357
|
"div",
|
|
17211
17358
|
{
|
|
17212
17359
|
css: [
|
|
@@ -17226,31 +17373,31 @@ function ProgressBar({
|
|
|
17226
17373
|
|
|
17227
17374
|
// src/components/ProgressList/ProgressList.tsx
|
|
17228
17375
|
init_emotion_jsx_shim();
|
|
17229
|
-
var
|
|
17376
|
+
var import_react166 = require("@emotion/react");
|
|
17230
17377
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
17231
17378
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
17232
17379
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
17233
|
-
var
|
|
17380
|
+
var import_react167 = require("react");
|
|
17234
17381
|
|
|
17235
17382
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
17236
17383
|
init_emotion_jsx_shim();
|
|
17237
|
-
var
|
|
17238
|
-
var progressListStyles =
|
|
17384
|
+
var import_react165 = require("@emotion/react");
|
|
17385
|
+
var progressListStyles = import_react165.css`
|
|
17239
17386
|
display: flex;
|
|
17240
17387
|
flex-direction: column;
|
|
17241
17388
|
gap: var(--spacing-sm);
|
|
17242
17389
|
list-style-type: none;
|
|
17243
17390
|
`;
|
|
17244
|
-
var progressListItemStyles =
|
|
17391
|
+
var progressListItemStyles = import_react165.css`
|
|
17245
17392
|
display: flex;
|
|
17246
17393
|
gap: var(--spacing-base);
|
|
17247
17394
|
align-items: center;
|
|
17248
17395
|
`;
|
|
17249
17396
|
|
|
17250
17397
|
// src/components/ProgressList/ProgressList.tsx
|
|
17251
|
-
var
|
|
17398
|
+
var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
|
|
17252
17399
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
17253
|
-
const itemsWithStatus = (0,
|
|
17400
|
+
const itemsWithStatus = (0, import_react167.useMemo)(() => {
|
|
17254
17401
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
17255
17402
|
return items.map((item, index) => {
|
|
17256
17403
|
let status = "queued";
|
|
@@ -17262,8 +17409,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
17262
17409
|
return { ...item, status };
|
|
17263
17410
|
});
|
|
17264
17411
|
}, [items, inProgressId]);
|
|
17265
|
-
return /* @__PURE__ */ (0,
|
|
17266
|
-
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)(
|
|
17267
17414
|
ProgressListItem,
|
|
17268
17415
|
{
|
|
17269
17416
|
status,
|
|
@@ -17283,7 +17430,7 @@ var ProgressListItem = ({
|
|
|
17283
17430
|
errorLevel = "danger",
|
|
17284
17431
|
autoEllipsis = false
|
|
17285
17432
|
}) => {
|
|
17286
|
-
const icon = (0,
|
|
17433
|
+
const icon = (0, import_react167.useMemo)(() => {
|
|
17287
17434
|
if (error) {
|
|
17288
17435
|
return warningIcon;
|
|
17289
17436
|
}
|
|
@@ -17294,14 +17441,14 @@ var ProgressListItem = ({
|
|
|
17294
17441
|
};
|
|
17295
17442
|
return iconPerStatus[status];
|
|
17296
17443
|
}, [status, error]);
|
|
17297
|
-
const statusStyles = (0,
|
|
17444
|
+
const statusStyles = (0, import_react167.useMemo)(() => {
|
|
17298
17445
|
if (error) {
|
|
17299
|
-
return errorLevel === "caution" ?
|
|
17446
|
+
return errorLevel === "caution" ? import_react166.css`
|
|
17300
17447
|
color: rgb(161, 98, 7);
|
|
17301
17448
|
& svg {
|
|
17302
17449
|
color: rgb(250, 204, 21);
|
|
17303
17450
|
}
|
|
17304
|
-
` :
|
|
17451
|
+
` : import_react166.css`
|
|
17305
17452
|
color: rgb(185, 28, 28);
|
|
17306
17453
|
& svg {
|
|
17307
17454
|
color: var(--brand-primary-2);
|
|
@@ -17309,40 +17456,40 @@ var ProgressListItem = ({
|
|
|
17309
17456
|
`;
|
|
17310
17457
|
}
|
|
17311
17458
|
const colorPerStatus = {
|
|
17312
|
-
completed:
|
|
17459
|
+
completed: import_react166.css`
|
|
17313
17460
|
opacity: 0.75;
|
|
17314
17461
|
`,
|
|
17315
|
-
inProgress:
|
|
17462
|
+
inProgress: import_react166.css`
|
|
17316
17463
|
-webkit-text-stroke-width: thin;
|
|
17317
17464
|
`,
|
|
17318
|
-
queued:
|
|
17465
|
+
queued: import_react166.css`
|
|
17319
17466
|
opacity: 0.5;
|
|
17320
17467
|
`
|
|
17321
17468
|
};
|
|
17322
17469
|
return colorPerStatus[status];
|
|
17323
17470
|
}, [status, error, errorLevel]);
|
|
17324
|
-
return /* @__PURE__ */ (0,
|
|
17325
|
-
/* @__PURE__ */ (0,
|
|
17326
|
-
/* @__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: [
|
|
17327
17474
|
children,
|
|
17328
|
-
/* @__PURE__ */ (0,
|
|
17475
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
17329
17476
|
] })
|
|
17330
17477
|
] });
|
|
17331
17478
|
};
|
|
17332
17479
|
|
|
17333
17480
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17334
17481
|
init_emotion_jsx_shim();
|
|
17335
|
-
var
|
|
17482
|
+
var import_react169 = require("@emotion/react");
|
|
17336
17483
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
17337
|
-
var
|
|
17484
|
+
var import_react170 = require("react");
|
|
17338
17485
|
|
|
17339
17486
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
17340
17487
|
init_emotion_jsx_shim();
|
|
17341
|
-
var
|
|
17342
|
-
var segmentedControlRootStyles =
|
|
17488
|
+
var import_react168 = require("@emotion/react");
|
|
17489
|
+
var segmentedControlRootStyles = import_react168.css`
|
|
17343
17490
|
position: relative;
|
|
17344
17491
|
`;
|
|
17345
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
17492
|
+
var segmentedControlScrollIndicatorsStyles = import_react168.css`
|
|
17346
17493
|
position: absolute;
|
|
17347
17494
|
inset: 0;
|
|
17348
17495
|
z-index: 1;
|
|
@@ -17370,17 +17517,17 @@ var segmentedControlScrollIndicatorsStyles = import_react166.css`
|
|
|
17370
17517
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
17371
17518
|
}
|
|
17372
17519
|
`;
|
|
17373
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
17520
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react168.css`
|
|
17374
17521
|
&::before {
|
|
17375
17522
|
opacity: 1;
|
|
17376
17523
|
}
|
|
17377
17524
|
`;
|
|
17378
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
17525
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react168.css`
|
|
17379
17526
|
&::after {
|
|
17380
17527
|
opacity: 1;
|
|
17381
17528
|
}
|
|
17382
17529
|
`;
|
|
17383
|
-
var segmentedControlWrapperStyles =
|
|
17530
|
+
var segmentedControlWrapperStyles = import_react168.css`
|
|
17384
17531
|
overflow-y: auto;
|
|
17385
17532
|
scroll-behavior: smooth;
|
|
17386
17533
|
scrollbar-width: none;
|
|
@@ -17389,7 +17536,7 @@ var segmentedControlWrapperStyles = import_react166.css`
|
|
|
17389
17536
|
height: 0px;
|
|
17390
17537
|
}
|
|
17391
17538
|
`;
|
|
17392
|
-
var segmentedControlStyles =
|
|
17539
|
+
var segmentedControlStyles = import_react168.css`
|
|
17393
17540
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
17394
17541
|
--segmented-control-border-width: 1px;
|
|
17395
17542
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -17408,14 +17555,14 @@ var segmentedControlStyles = import_react166.css`
|
|
|
17408
17555
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
17409
17556
|
font-size: var(--fs-xs);
|
|
17410
17557
|
`;
|
|
17411
|
-
var segmentedControlVerticalStyles =
|
|
17558
|
+
var segmentedControlVerticalStyles = import_react168.css`
|
|
17412
17559
|
flex-direction: column;
|
|
17413
17560
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
17414
17561
|
var(--segmented-control-rounded-value) 0 0;
|
|
17415
17562
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
17416
17563
|
var(--segmented-control-rounded-value);
|
|
17417
17564
|
`;
|
|
17418
|
-
var segmentedControlItemStyles =
|
|
17565
|
+
var segmentedControlItemStyles = import_react168.css`
|
|
17419
17566
|
&:first-of-type label {
|
|
17420
17567
|
border-radius: var(--segmented-control-first-border-radius);
|
|
17421
17568
|
}
|
|
@@ -17423,10 +17570,10 @@ var segmentedControlItemStyles = import_react166.css`
|
|
|
17423
17570
|
border-radius: var(--segmented-control-last-border-radius);
|
|
17424
17571
|
}
|
|
17425
17572
|
`;
|
|
17426
|
-
var segmentedControlInputStyles =
|
|
17573
|
+
var segmentedControlInputStyles = import_react168.css`
|
|
17427
17574
|
${accessibleHidden}
|
|
17428
17575
|
`;
|
|
17429
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
17576
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react168.css`
|
|
17430
17577
|
position: relative;
|
|
17431
17578
|
display: flex;
|
|
17432
17579
|
align-items: center;
|
|
@@ -17490,25 +17637,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react166.css`
|
|
|
17490
17637
|
`}
|
|
17491
17638
|
}
|
|
17492
17639
|
`;
|
|
17493
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
17640
|
+
var segmentedControlLabelIconOnlyStyles = import_react168.css`
|
|
17494
17641
|
padding-inline: 0.5em;
|
|
17495
17642
|
`;
|
|
17496
|
-
var segmentedControlLabelCheckStyles =
|
|
17643
|
+
var segmentedControlLabelCheckStyles = import_react168.css`
|
|
17497
17644
|
opacity: 0.5;
|
|
17498
17645
|
`;
|
|
17499
|
-
var segmentedControlLabelContentStyles =
|
|
17646
|
+
var segmentedControlLabelContentStyles = import_react168.css`
|
|
17500
17647
|
display: flex;
|
|
17501
17648
|
align-items: center;
|
|
17502
17649
|
justify-content: center;
|
|
17503
17650
|
gap: var(--spacing-sm);
|
|
17504
17651
|
height: 100%;
|
|
17505
17652
|
`;
|
|
17506
|
-
var segmentedControlLabelTextStyles =
|
|
17653
|
+
var segmentedControlLabelTextStyles = import_react168.css`
|
|
17507
17654
|
white-space: nowrap;
|
|
17508
17655
|
`;
|
|
17509
17656
|
|
|
17510
17657
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17511
|
-
var
|
|
17658
|
+
var import_jsx_runtime137 = require("@emotion/react/jsx-runtime");
|
|
17512
17659
|
var SegmentedControl = ({
|
|
17513
17660
|
name,
|
|
17514
17661
|
options,
|
|
@@ -17523,10 +17670,10 @@ var SegmentedControl = ({
|
|
|
17523
17670
|
currentBackgroundColor = "white",
|
|
17524
17671
|
...props
|
|
17525
17672
|
}) => {
|
|
17526
|
-
const wrapperRef = (0,
|
|
17527
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
17528
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
17529
|
-
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)(
|
|
17530
17677
|
(event) => {
|
|
17531
17678
|
if (event.target.checked) {
|
|
17532
17679
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -17534,19 +17681,19 @@ var SegmentedControl = ({
|
|
|
17534
17681
|
},
|
|
17535
17682
|
[options, onChange]
|
|
17536
17683
|
);
|
|
17537
|
-
const sizeStyles = (0,
|
|
17684
|
+
const sizeStyles = (0, import_react170.useMemo)(() => {
|
|
17538
17685
|
const map = {
|
|
17539
|
-
sm: (0,
|
|
17540
|
-
md: (0,
|
|
17541
|
-
lg: (0,
|
|
17542
|
-
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)" })
|
|
17543
17690
|
};
|
|
17544
17691
|
return map[size];
|
|
17545
17692
|
}, [size]);
|
|
17546
|
-
const isIconOnly = (0,
|
|
17693
|
+
const isIconOnly = (0, import_react170.useMemo)(() => {
|
|
17547
17694
|
return options.every((option) => option && option.icon && !option.label);
|
|
17548
17695
|
}, [options]);
|
|
17549
|
-
(0,
|
|
17696
|
+
(0, import_react170.useEffect)(() => {
|
|
17550
17697
|
const wrapperElement = wrapperRef.current;
|
|
17551
17698
|
const onScroll = () => {
|
|
17552
17699
|
if (!wrapperElement) {
|
|
@@ -17567,8 +17714,8 @@ var SegmentedControl = ({
|
|
|
17567
17714
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
17568
17715
|
};
|
|
17569
17716
|
}, []);
|
|
17570
|
-
return /* @__PURE__ */ (0,
|
|
17571
|
-
/* @__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)(
|
|
17572
17719
|
"div",
|
|
17573
17720
|
{
|
|
17574
17721
|
css: [
|
|
@@ -17585,12 +17732,12 @@ var SegmentedControl = ({
|
|
|
17585
17732
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
17586
17733
|
const isDisabled = disabled2 || option.disabled;
|
|
17587
17734
|
const isChecked = option.value === value;
|
|
17588
|
-
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)(
|
|
17589
17736
|
"div",
|
|
17590
17737
|
{
|
|
17591
17738
|
css: segmentedControlItemStyles,
|
|
17592
17739
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
17593
|
-
children: /* @__PURE__ */ (0,
|
|
17740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
17594
17741
|
"label",
|
|
17595
17742
|
{
|
|
17596
17743
|
css: [
|
|
@@ -17599,7 +17746,7 @@ var SegmentedControl = ({
|
|
|
17599
17746
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17600
17747
|
],
|
|
17601
17748
|
children: [
|
|
17602
|
-
/* @__PURE__ */ (0,
|
|
17749
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
17603
17750
|
"input",
|
|
17604
17751
|
{
|
|
17605
17752
|
css: segmentedControlInputStyles,
|
|
@@ -17611,10 +17758,10 @@ var SegmentedControl = ({
|
|
|
17611
17758
|
disabled: isDisabled
|
|
17612
17759
|
}
|
|
17613
17760
|
),
|
|
17614
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
17615
|
-
/* @__PURE__ */ (0,
|
|
17616
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
17617
|
-
!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 })
|
|
17618
17765
|
] })
|
|
17619
17766
|
]
|
|
17620
17767
|
}
|
|
@@ -17624,7 +17771,7 @@ var SegmentedControl = ({
|
|
|
17624
17771
|
})
|
|
17625
17772
|
}
|
|
17626
17773
|
) }),
|
|
17627
|
-
/* @__PURE__ */ (0,
|
|
17774
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
17628
17775
|
"div",
|
|
17629
17776
|
{
|
|
17630
17777
|
css: [
|
|
@@ -17642,18 +17789,18 @@ init_emotion_jsx_shim();
|
|
|
17642
17789
|
|
|
17643
17790
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
17644
17791
|
init_emotion_jsx_shim();
|
|
17645
|
-
var
|
|
17646
|
-
var lightFadingOut =
|
|
17792
|
+
var import_react171 = require("@emotion/react");
|
|
17793
|
+
var lightFadingOut = import_react171.keyframes`
|
|
17647
17794
|
from { opacity: 0.1; }
|
|
17648
17795
|
to { opacity: 0.025; }
|
|
17649
17796
|
`;
|
|
17650
|
-
var skeletonStyles =
|
|
17797
|
+
var skeletonStyles = import_react171.css`
|
|
17651
17798
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
17652
17799
|
background-color: var(--gray-900);
|
|
17653
17800
|
`;
|
|
17654
17801
|
|
|
17655
17802
|
// src/components/Skeleton/Skeleton.tsx
|
|
17656
|
-
var
|
|
17803
|
+
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
17657
17804
|
var Skeleton = ({
|
|
17658
17805
|
width = "100%",
|
|
17659
17806
|
height = "1.25rem",
|
|
@@ -17661,7 +17808,7 @@ var Skeleton = ({
|
|
|
17661
17808
|
circle = false,
|
|
17662
17809
|
children,
|
|
17663
17810
|
...otherProps
|
|
17664
|
-
}) => /* @__PURE__ */ (0,
|
|
17811
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
17665
17812
|
"div",
|
|
17666
17813
|
{
|
|
17667
17814
|
css: [
|
|
@@ -17685,12 +17832,12 @@ init_emotion_jsx_shim();
|
|
|
17685
17832
|
|
|
17686
17833
|
// src/components/Spinner/Spinner.tsx
|
|
17687
17834
|
init_emotion_jsx_shim();
|
|
17688
|
-
var
|
|
17835
|
+
var import_react173 = require("react");
|
|
17689
17836
|
|
|
17690
17837
|
// src/components/Spinner/Spinner.styles.ts
|
|
17691
17838
|
init_emotion_jsx_shim();
|
|
17692
|
-
var
|
|
17693
|
-
var SpinnerStyles =
|
|
17839
|
+
var import_react172 = require("@emotion/react");
|
|
17840
|
+
var SpinnerStyles = import_react172.css`
|
|
17694
17841
|
--color: #00b4ff;
|
|
17695
17842
|
--speed: 5s;
|
|
17696
17843
|
--red: rgb(218, 63, 50);
|
|
@@ -18120,18 +18267,18 @@ var SpinnerStyles = import_react170.css`
|
|
|
18120
18267
|
`;
|
|
18121
18268
|
|
|
18122
18269
|
// src/components/Spinner/Spinner.tsx
|
|
18123
|
-
var
|
|
18270
|
+
var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
|
|
18124
18271
|
var Spinner = ({
|
|
18125
18272
|
width,
|
|
18126
18273
|
label,
|
|
18127
18274
|
isPaused
|
|
18128
18275
|
}) => {
|
|
18129
|
-
const ref = (0,
|
|
18130
|
-
(0,
|
|
18276
|
+
const ref = (0, import_react173.useRef)(null);
|
|
18277
|
+
(0, import_react173.useEffect)(() => {
|
|
18131
18278
|
var _a, _b, _c;
|
|
18132
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");
|
|
18133
18280
|
}, [width]);
|
|
18134
|
-
return /* @__PURE__ */ (0,
|
|
18281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
18135
18282
|
"div",
|
|
18136
18283
|
{
|
|
18137
18284
|
ref,
|
|
@@ -18143,51 +18290,51 @@ var Spinner = ({
|
|
|
18143
18290
|
css: SpinnerStyles,
|
|
18144
18291
|
className: `container${isPaused ? " paused" : ""}`,
|
|
18145
18292
|
children: [
|
|
18146
|
-
/* @__PURE__ */ (0,
|
|
18147
|
-
/* @__PURE__ */ (0,
|
|
18148
|
-
/* @__PURE__ */ (0,
|
|
18149
|
-
/* @__PURE__ */ (0,
|
|
18150
|
-
/* @__PURE__ */ (0,
|
|
18151
|
-
/* @__PURE__ */ (0,
|
|
18152
|
-
/* @__PURE__ */ (0,
|
|
18153
|
-
/* @__PURE__ */ (0,
|
|
18154
|
-
/* @__PURE__ */ (0,
|
|
18155
|
-
/* @__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" })
|
|
18156
18303
|
] })
|
|
18157
18304
|
] }) }),
|
|
18158
|
-
/* @__PURE__ */ (0,
|
|
18159
|
-
/* @__PURE__ */ (0,
|
|
18160
|
-
/* @__PURE__ */ (0,
|
|
18161
|
-
/* @__PURE__ */ (0,
|
|
18162
|
-
/* @__PURE__ */ (0,
|
|
18163
|
-
/* @__PURE__ */ (0,
|
|
18164
|
-
/* @__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" })
|
|
18165
18312
|
] }),
|
|
18166
|
-
/* @__PURE__ */ (0,
|
|
18167
|
-
/* @__PURE__ */ (0,
|
|
18168
|
-
/* @__PURE__ */ (0,
|
|
18169
|
-
/* @__PURE__ */ (0,
|
|
18170
|
-
/* @__PURE__ */ (0,
|
|
18171
|
-
/* @__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" })
|
|
18172
18319
|
] }),
|
|
18173
|
-
/* @__PURE__ */ (0,
|
|
18174
|
-
/* @__PURE__ */ (0,
|
|
18175
|
-
/* @__PURE__ */ (0,
|
|
18176
|
-
/* @__PURE__ */ (0,
|
|
18177
|
-
/* @__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" })
|
|
18178
18325
|
] }),
|
|
18179
|
-
/* @__PURE__ */ (0,
|
|
18180
|
-
/* @__PURE__ */ (0,
|
|
18181
|
-
/* @__PURE__ */ (0,
|
|
18182
|
-
/* @__PURE__ */ (0,
|
|
18183
|
-
/* @__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" })
|
|
18184
18331
|
] }),
|
|
18185
|
-
/* @__PURE__ */ (0,
|
|
18186
|
-
/* @__PURE__ */ (0,
|
|
18187
|
-
/* @__PURE__ */ (0,
|
|
18188
|
-
/* @__PURE__ */ (0,
|
|
18189
|
-
/* @__PURE__ */ (0,
|
|
18190
|
-
/* @__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" })
|
|
18191
18338
|
] })
|
|
18192
18339
|
]
|
|
18193
18340
|
}
|
|
@@ -18196,12 +18343,12 @@ var Spinner = ({
|
|
|
18196
18343
|
|
|
18197
18344
|
// src/components/Switch/Switch.tsx
|
|
18198
18345
|
init_emotion_jsx_shim();
|
|
18199
|
-
var
|
|
18346
|
+
var import_react175 = require("react");
|
|
18200
18347
|
|
|
18201
18348
|
// src/components/Switch/Switch.styles.ts
|
|
18202
18349
|
init_emotion_jsx_shim();
|
|
18203
|
-
var
|
|
18204
|
-
var SwitchInputContainer =
|
|
18350
|
+
var import_react174 = require("@emotion/react");
|
|
18351
|
+
var SwitchInputContainer = import_react174.css`
|
|
18205
18352
|
cursor: pointer;
|
|
18206
18353
|
display: inline-flex;
|
|
18207
18354
|
position: relative;
|
|
@@ -18211,7 +18358,7 @@ var SwitchInputContainer = import_react172.css`
|
|
|
18211
18358
|
user-select: none;
|
|
18212
18359
|
z-index: 0;
|
|
18213
18360
|
`;
|
|
18214
|
-
var SwitchInput = (size) =>
|
|
18361
|
+
var SwitchInput = (size) => import_react174.css`
|
|
18215
18362
|
appearance: none;
|
|
18216
18363
|
border-radius: var(--rounded-full);
|
|
18217
18364
|
background-color: var(--white);
|
|
@@ -18250,18 +18397,18 @@ var SwitchInput = (size) => import_react172.css`
|
|
|
18250
18397
|
cursor: not-allowed;
|
|
18251
18398
|
}
|
|
18252
18399
|
`;
|
|
18253
|
-
var SwitchInputCheckedDirectionLeft =
|
|
18400
|
+
var SwitchInputCheckedDirectionLeft = import_react174.css`
|
|
18254
18401
|
&:checked {
|
|
18255
18402
|
transform: translateX(var(--spacing-base));
|
|
18256
18403
|
}
|
|
18257
18404
|
`;
|
|
18258
|
-
var SwitchInputCheckedDirectionRight =
|
|
18405
|
+
var SwitchInputCheckedDirectionRight = import_react174.css`
|
|
18259
18406
|
transform: translateX(-var(--spacing-base));
|
|
18260
18407
|
&:checked {
|
|
18261
18408
|
transform: translateX(0);
|
|
18262
18409
|
}
|
|
18263
18410
|
`;
|
|
18264
|
-
var SwitchInputDisabled =
|
|
18411
|
+
var SwitchInputDisabled = import_react174.css`
|
|
18265
18412
|
opacity: var(--opacity-50);
|
|
18266
18413
|
cursor: not-allowed;
|
|
18267
18414
|
|
|
@@ -18269,19 +18416,19 @@ var SwitchInputDisabled = import_react172.css`
|
|
|
18269
18416
|
cursor: not-allowed;
|
|
18270
18417
|
}
|
|
18271
18418
|
`;
|
|
18272
|
-
var SwitchInputLabelAlignmentLeft = (size) =>
|
|
18419
|
+
var SwitchInputLabelAlignmentLeft = (size) => import_react174.css`
|
|
18273
18420
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18274
18421
|
&:before {
|
|
18275
18422
|
left: 0;
|
|
18276
18423
|
}
|
|
18277
18424
|
`;
|
|
18278
|
-
var SwitchInputLabelAlignmentRight = (size) =>
|
|
18425
|
+
var SwitchInputLabelAlignmentRight = (size) => import_react174.css`
|
|
18279
18426
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18280
18427
|
&:before {
|
|
18281
18428
|
right: 0;
|
|
18282
18429
|
}
|
|
18283
18430
|
`;
|
|
18284
|
-
var SwitchInputLabel = (size) =>
|
|
18431
|
+
var SwitchInputLabel = (size) => import_react174.css`
|
|
18285
18432
|
align-items: center;
|
|
18286
18433
|
color: var(--typography-base);
|
|
18287
18434
|
display: inline-flex;
|
|
@@ -18301,26 +18448,26 @@ var SwitchInputLabel = (size) => import_react172.css`
|
|
|
18301
18448
|
top: 0;
|
|
18302
18449
|
}
|
|
18303
18450
|
`;
|
|
18304
|
-
var SwitchTextAlignmentLeft = (size) =>
|
|
18451
|
+
var SwitchTextAlignmentLeft = (size) => import_react174.css`
|
|
18305
18452
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18306
18453
|
`;
|
|
18307
|
-
var SwitchTextAlignmentRight = (size) =>
|
|
18454
|
+
var SwitchTextAlignmentRight = (size) => import_react174.css`
|
|
18308
18455
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
18309
18456
|
`;
|
|
18310
|
-
var SwitchText =
|
|
18457
|
+
var SwitchText = import_react174.css`
|
|
18311
18458
|
color: var(--gray-500);
|
|
18312
18459
|
font-size: var(--fs-sm);
|
|
18313
18460
|
`;
|
|
18314
|
-
var SwitchInputContainerAlignmentLeft =
|
|
18461
|
+
var SwitchInputContainerAlignmentLeft = import_react174.css`
|
|
18315
18462
|
flex-direction: row;
|
|
18316
18463
|
`;
|
|
18317
|
-
var SwitchInputContainerAlignmentRight =
|
|
18464
|
+
var SwitchInputContainerAlignmentRight = import_react174.css`
|
|
18318
18465
|
flex-direction: row-reverse;
|
|
18319
18466
|
`;
|
|
18320
18467
|
|
|
18321
18468
|
// src/components/Switch/Switch.tsx
|
|
18322
|
-
var
|
|
18323
|
-
var Switch = (0,
|
|
18469
|
+
var import_jsx_runtime140 = require("@emotion/react/jsx-runtime");
|
|
18470
|
+
var Switch = (0, import_react175.forwardRef)(
|
|
18324
18471
|
({
|
|
18325
18472
|
label,
|
|
18326
18473
|
infoText,
|
|
@@ -18331,7 +18478,7 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18331
18478
|
...inputProps
|
|
18332
18479
|
}, ref) => {
|
|
18333
18480
|
let additionalText = infoText;
|
|
18334
|
-
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0,
|
|
18481
|
+
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0, import_react175.useMemo)(() => {
|
|
18335
18482
|
if (alignment === "left") {
|
|
18336
18483
|
return {
|
|
18337
18484
|
SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
|
|
@@ -18348,8 +18495,8 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18348
18495
|
if (infoText && toggleText) {
|
|
18349
18496
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
18350
18497
|
}
|
|
18351
|
-
return /* @__PURE__ */ (0,
|
|
18352
|
-
/* @__PURE__ */ (0,
|
|
18498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
18499
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
18353
18500
|
"label",
|
|
18354
18501
|
{
|
|
18355
18502
|
css: [
|
|
@@ -18359,7 +18506,7 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18359
18506
|
inputProps.disabled ? SwitchInputDisabled : void 0
|
|
18360
18507
|
],
|
|
18361
18508
|
children: [
|
|
18362
|
-
/* @__PURE__ */ (0,
|
|
18509
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
18363
18510
|
"input",
|
|
18364
18511
|
{
|
|
18365
18512
|
type: "checkbox",
|
|
@@ -18368,11 +18515,11 @@ var Switch = (0, import_react173.forwardRef)(
|
|
|
18368
18515
|
ref
|
|
18369
18516
|
}
|
|
18370
18517
|
),
|
|
18371
|
-
/* @__PURE__ */ (0,
|
|
18518
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { css: [SwitchInputLabel(switchSize), SwitchInputLabelAlignment], children: label })
|
|
18372
18519
|
]
|
|
18373
18520
|
}
|
|
18374
18521
|
),
|
|
18375
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
18522
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
18376
18523
|
"p",
|
|
18377
18524
|
{
|
|
18378
18525
|
css: [
|
|
@@ -18392,8 +18539,8 @@ init_emotion_jsx_shim();
|
|
|
18392
18539
|
|
|
18393
18540
|
// src/components/Table/Table.styles.ts
|
|
18394
18541
|
init_emotion_jsx_shim();
|
|
18395
|
-
var
|
|
18396
|
-
var table = ({ cellPadding = "var(--spacing-sm)" }) =>
|
|
18542
|
+
var import_react176 = require("@emotion/react");
|
|
18543
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react176.css`
|
|
18397
18544
|
border-bottom: 1px solid var(--gray-400);
|
|
18398
18545
|
border-collapse: collapse;
|
|
18399
18546
|
min-width: 100%;
|
|
@@ -18413,21 +18560,21 @@ var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react174.css`
|
|
|
18413
18560
|
background-color: var(--gray-50);
|
|
18414
18561
|
}
|
|
18415
18562
|
`;
|
|
18416
|
-
var tableHead =
|
|
18563
|
+
var tableHead = import_react176.css`
|
|
18417
18564
|
color: var(--typography-base);
|
|
18418
18565
|
text-align: left;
|
|
18419
18566
|
`;
|
|
18420
|
-
var tableRow =
|
|
18567
|
+
var tableRow = import_react176.css`
|
|
18421
18568
|
border-bottom: 1px solid var(--gray-200);
|
|
18422
18569
|
font-size: var(--fs-sm);
|
|
18423
18570
|
`;
|
|
18424
|
-
var tableCellHead =
|
|
18571
|
+
var tableCellHead = import_react176.css`
|
|
18425
18572
|
font-size: var(--fs-sm);
|
|
18426
18573
|
font-weight: var(--fw-regular);
|
|
18427
18574
|
line-height: 1.2;
|
|
18428
18575
|
}
|
|
18429
18576
|
`;
|
|
18430
|
-
var responsiveTableContainer =
|
|
18577
|
+
var responsiveTableContainer = import_react176.css`
|
|
18431
18578
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
18432
18579
|
overflow-x: auto;
|
|
18433
18580
|
${scrollbarStyles}
|
|
@@ -18446,60 +18593,60 @@ var responsiveTableContainer = import_react174.css`
|
|
|
18446
18593
|
`;
|
|
18447
18594
|
|
|
18448
18595
|
// src/components/Table/ResponsiveTableContainer.tsx
|
|
18449
|
-
var
|
|
18596
|
+
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
18450
18597
|
var ResponsiveTableContainer = ({ children }) => {
|
|
18451
|
-
return /* @__PURE__ */ (0,
|
|
18598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { css: responsiveTableContainer, children });
|
|
18452
18599
|
};
|
|
18453
18600
|
|
|
18454
18601
|
// src/components/Table/Table.tsx
|
|
18455
18602
|
init_emotion_jsx_shim();
|
|
18456
|
-
var
|
|
18457
|
-
var
|
|
18458
|
-
var Table =
|
|
18603
|
+
var React22 = __toESM(require("react"));
|
|
18604
|
+
var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
|
|
18605
|
+
var Table = React22.forwardRef(
|
|
18459
18606
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
18460
|
-
return /* @__PURE__ */ (0,
|
|
18607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
18461
18608
|
}
|
|
18462
18609
|
);
|
|
18463
|
-
var TableHead =
|
|
18610
|
+
var TableHead = React22.forwardRef(
|
|
18464
18611
|
({ children, ...otherProps }, ref) => {
|
|
18465
|
-
return /* @__PURE__ */ (0,
|
|
18612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
18466
18613
|
}
|
|
18467
18614
|
);
|
|
18468
|
-
var TableBody =
|
|
18615
|
+
var TableBody = React22.forwardRef(
|
|
18469
18616
|
({ children, ...otherProps }, ref) => {
|
|
18470
|
-
return /* @__PURE__ */ (0,
|
|
18617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tbody", { ref, ...otherProps, children });
|
|
18471
18618
|
}
|
|
18472
18619
|
);
|
|
18473
|
-
var TableFoot =
|
|
18620
|
+
var TableFoot = React22.forwardRef(
|
|
18474
18621
|
({ children, ...otherProps }, ref) => {
|
|
18475
|
-
return /* @__PURE__ */ (0,
|
|
18622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tfoot", { ref, ...otherProps, children });
|
|
18476
18623
|
}
|
|
18477
18624
|
);
|
|
18478
|
-
var TableRow =
|
|
18625
|
+
var TableRow = React22.forwardRef(
|
|
18479
18626
|
({ children, ...otherProps }, ref) => {
|
|
18480
|
-
return /* @__PURE__ */ (0,
|
|
18627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
18481
18628
|
}
|
|
18482
18629
|
);
|
|
18483
|
-
var TableCellHead =
|
|
18630
|
+
var TableCellHead = React22.forwardRef(
|
|
18484
18631
|
({ children, ...otherProps }, ref) => {
|
|
18485
|
-
return /* @__PURE__ */ (0,
|
|
18632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
18486
18633
|
}
|
|
18487
18634
|
);
|
|
18488
|
-
var TableCellData =
|
|
18635
|
+
var TableCellData = React22.forwardRef(
|
|
18489
18636
|
({ children, ...otherProps }, ref) => {
|
|
18490
|
-
return /* @__PURE__ */ (0,
|
|
18637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("td", { ref, ...otherProps, children });
|
|
18491
18638
|
}
|
|
18492
18639
|
);
|
|
18493
18640
|
|
|
18494
18641
|
// src/components/Tabs/Tabs.tsx
|
|
18495
18642
|
init_emotion_jsx_shim();
|
|
18496
|
-
var
|
|
18497
|
-
var
|
|
18643
|
+
var import_react178 = require("@ariakit/react");
|
|
18644
|
+
var import_react179 = require("react");
|
|
18498
18645
|
|
|
18499
18646
|
// src/components/Tabs/Tabs.styles.ts
|
|
18500
18647
|
init_emotion_jsx_shim();
|
|
18501
|
-
var
|
|
18502
|
-
var tabButtonStyles =
|
|
18648
|
+
var import_react177 = require("@emotion/react");
|
|
18649
|
+
var tabButtonStyles = import_react177.css`
|
|
18503
18650
|
align-items: center;
|
|
18504
18651
|
border: 0;
|
|
18505
18652
|
height: 2.5rem;
|
|
@@ -18516,16 +18663,16 @@ var tabButtonStyles = import_react175.css`
|
|
|
18516
18663
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
18517
18664
|
}
|
|
18518
18665
|
`;
|
|
18519
|
-
var tabButtonGroupStyles =
|
|
18666
|
+
var tabButtonGroupStyles = import_react177.css`
|
|
18520
18667
|
display: flex;
|
|
18521
18668
|
gap: var(--spacing-base);
|
|
18522
18669
|
border-bottom: 1px solid var(--gray-300);
|
|
18523
18670
|
`;
|
|
18524
18671
|
|
|
18525
18672
|
// src/components/Tabs/Tabs.tsx
|
|
18526
|
-
var
|
|
18673
|
+
var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
|
|
18527
18674
|
var useCurrentTab = () => {
|
|
18528
|
-
const context = (0,
|
|
18675
|
+
const context = (0, import_react178.useTabStore)();
|
|
18529
18676
|
if (!context) {
|
|
18530
18677
|
throw new Error("This component can only be used inside <Tabs>");
|
|
18531
18678
|
}
|
|
@@ -18539,11 +18686,11 @@ var Tabs = ({
|
|
|
18539
18686
|
manual,
|
|
18540
18687
|
...props
|
|
18541
18688
|
}) => {
|
|
18542
|
-
const selected = (0,
|
|
18689
|
+
const selected = (0, import_react179.useMemo)(() => {
|
|
18543
18690
|
if (selectedId) return selectedId;
|
|
18544
18691
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
18545
18692
|
}, [selectedId, useHashForState]);
|
|
18546
|
-
const onTabSelect = (0,
|
|
18693
|
+
const onTabSelect = (0, import_react179.useCallback)(
|
|
18547
18694
|
(value) => {
|
|
18548
18695
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
18549
18696
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -18554,23 +18701,23 @@ var Tabs = ({
|
|
|
18554
18701
|
},
|
|
18555
18702
|
[onSelectedIdChange, useHashForState]
|
|
18556
18703
|
);
|
|
18557
|
-
return /* @__PURE__ */ (0,
|
|
18704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.TabProvider, { selectedId: selected, selectOnMove: !manual, setSelectedId: onTabSelect, ...props, children });
|
|
18558
18705
|
};
|
|
18559
18706
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
18560
|
-
return /* @__PURE__ */ (0,
|
|
18707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
18561
18708
|
};
|
|
18562
18709
|
var TabButton = ({
|
|
18563
18710
|
children,
|
|
18564
18711
|
id,
|
|
18565
18712
|
...props
|
|
18566
18713
|
}) => {
|
|
18567
|
-
return /* @__PURE__ */ (0,
|
|
18714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
18568
18715
|
};
|
|
18569
18716
|
var TabContent = ({
|
|
18570
18717
|
children,
|
|
18571
18718
|
...props
|
|
18572
18719
|
}) => {
|
|
18573
|
-
return /* @__PURE__ */ (0,
|
|
18720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react178.TabPanel, { ...props, children });
|
|
18574
18721
|
};
|
|
18575
18722
|
|
|
18576
18723
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -18578,8 +18725,8 @@ init_emotion_jsx_shim();
|
|
|
18578
18725
|
|
|
18579
18726
|
// src/components/Validation/StatusBullet.styles.ts
|
|
18580
18727
|
init_emotion_jsx_shim();
|
|
18581
|
-
var
|
|
18582
|
-
var StatusBulletContainer =
|
|
18728
|
+
var import_react180 = require("@emotion/react");
|
|
18729
|
+
var StatusBulletContainer = import_react180.css`
|
|
18583
18730
|
align-items: center;
|
|
18584
18731
|
align-self: center;
|
|
18585
18732
|
color: var(--gray-500);
|
|
@@ -18595,33 +18742,33 @@ var StatusBulletContainer = import_react178.css`
|
|
|
18595
18742
|
display: block;
|
|
18596
18743
|
}
|
|
18597
18744
|
`;
|
|
18598
|
-
var StatusBulletBase =
|
|
18745
|
+
var StatusBulletBase = import_react180.css`
|
|
18599
18746
|
font-size: var(--fs-sm);
|
|
18600
18747
|
&:before {
|
|
18601
18748
|
width: var(--fs-xs);
|
|
18602
18749
|
height: var(--fs-xs);
|
|
18603
18750
|
}
|
|
18604
18751
|
`;
|
|
18605
|
-
var StatusBulletSmall =
|
|
18752
|
+
var StatusBulletSmall = import_react180.css`
|
|
18606
18753
|
font-size: var(--fs-xs);
|
|
18607
18754
|
&:before {
|
|
18608
18755
|
width: var(--fs-xxs);
|
|
18609
18756
|
height: var(--fs-xxs);
|
|
18610
18757
|
}
|
|
18611
18758
|
`;
|
|
18612
|
-
var StatusDraft =
|
|
18759
|
+
var StatusDraft = import_react180.css`
|
|
18613
18760
|
&:before {
|
|
18614
18761
|
background: var(--white);
|
|
18615
18762
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
18616
18763
|
}
|
|
18617
18764
|
`;
|
|
18618
|
-
var StatusModified =
|
|
18765
|
+
var StatusModified = import_react180.css`
|
|
18619
18766
|
&:before {
|
|
18620
18767
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
18621
18768
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
18622
18769
|
}
|
|
18623
18770
|
`;
|
|
18624
|
-
var StatusError =
|
|
18771
|
+
var StatusError = import_react180.css`
|
|
18625
18772
|
color: var(--error);
|
|
18626
18773
|
&:before {
|
|
18627
18774
|
/* TODO: replace this with an svg icon */
|
|
@@ -18634,29 +18781,44 @@ var StatusError = import_react178.css`
|
|
|
18634
18781
|
);
|
|
18635
18782
|
}
|
|
18636
18783
|
`;
|
|
18637
|
-
var StatusPublished =
|
|
18784
|
+
var StatusPublished = import_react180.css`
|
|
18638
18785
|
&:before {
|
|
18639
18786
|
background: var(--accent-dark);
|
|
18640
18787
|
}
|
|
18641
18788
|
`;
|
|
18642
|
-
var StatusOrphan =
|
|
18789
|
+
var StatusOrphan = import_react180.css`
|
|
18643
18790
|
&:before {
|
|
18644
18791
|
background: var(--brand-secondary-5);
|
|
18645
18792
|
}
|
|
18646
18793
|
`;
|
|
18647
|
-
var StatusUnknown =
|
|
18794
|
+
var StatusUnknown = import_react180.css`
|
|
18648
18795
|
&:before {
|
|
18649
18796
|
background: var(--gray-800);
|
|
18650
18797
|
}
|
|
18651
18798
|
`;
|
|
18652
|
-
var StatusDeleted =
|
|
18799
|
+
var StatusDeleted = import_react180.css`
|
|
18653
18800
|
&:before {
|
|
18654
18801
|
background: var(--error);
|
|
18655
18802
|
}
|
|
18656
18803
|
`;
|
|
18657
18804
|
|
|
18658
18805
|
// src/components/Validation/StatusBullet.tsx
|
|
18659
|
-
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
|
+
};
|
|
18660
18822
|
var StatusBullet = ({
|
|
18661
18823
|
status,
|
|
18662
18824
|
hideText = false,
|
|
@@ -18665,31 +18827,19 @@ var StatusBullet = ({
|
|
|
18665
18827
|
compact = false,
|
|
18666
18828
|
...props
|
|
18667
18829
|
}) => {
|
|
18668
|
-
const
|
|
18669
|
-
Error: StatusError,
|
|
18670
|
-
Modified: StatusModified,
|
|
18671
|
-
Unsaved: StatusDraft,
|
|
18672
|
-
Orphan: StatusOrphan,
|
|
18673
|
-
Published: StatusPublished,
|
|
18674
|
-
Draft: StatusDraft,
|
|
18675
|
-
Previous: StatusDraft,
|
|
18676
|
-
Unknown: StatusUnknown,
|
|
18677
|
-
Deleted: StatusDeleted
|
|
18678
|
-
};
|
|
18679
|
-
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
18680
|
-
const StatusComponent = () => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
18830
|
+
const StatusComponent = () => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
18681
18831
|
"span",
|
|
18682
18832
|
{
|
|
18683
18833
|
role: "status",
|
|
18684
|
-
css: [StatusBulletContainer, currentStateStyles[status], statusSize],
|
|
18834
|
+
css: [StatusBulletContainer, currentStateStyles[status], statusSize[size]],
|
|
18685
18835
|
...props,
|
|
18686
18836
|
children: hideText ? null : message ? message : status
|
|
18687
18837
|
}
|
|
18688
18838
|
);
|
|
18689
18839
|
if (compact) {
|
|
18690
|
-
return /* @__PURE__ */ (0,
|
|
18840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusComponent, {});
|
|
18691
18841
|
}
|
|
18692
|
-
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, {}) }) });
|
|
18693
18843
|
};
|
|
18694
18844
|
// Annotate the CommonJS export names for ESM import in node:
|
|
18695
18845
|
0 && (module.exports = {
|
|
@@ -18799,6 +18949,7 @@ var StatusBullet = ({
|
|
|
18799
18949
|
PageHeaderSection,
|
|
18800
18950
|
Pagination,
|
|
18801
18951
|
Paragraph,
|
|
18952
|
+
ParameterActionButton,
|
|
18802
18953
|
ParameterDrawerHeader,
|
|
18803
18954
|
ParameterGroup,
|
|
18804
18955
|
ParameterImage,
|
|
@@ -18870,6 +19021,7 @@ var StatusBullet = ({
|
|
|
18870
19021
|
VerticalRhythm,
|
|
18871
19022
|
WarningMessage,
|
|
18872
19023
|
accessibleHidden,
|
|
19024
|
+
actionBarVisibilityStyles,
|
|
18873
19025
|
addPathSegmentToPathname,
|
|
18874
19026
|
borderTopIcon,
|
|
18875
19027
|
breakpoints,
|