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