@uniformdev/design-system 20.36.2-alpha.90 → 20.37.1-alpha.1
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 +1391 -627
- package/dist/index.d.mts +143 -9
- package/dist/index.d.ts +143 -9
- package/dist/index.js +1378 -600
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -96,12 +96,11 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
96
96
|
--typography-inverted: var(--white);
|
|
97
97
|
|
|
98
98
|
/* chart colours */
|
|
99
|
-
--charting-chart-1: #
|
|
100
|
-
--charting-chart-2: #
|
|
101
|
-
--charting-chart-3: #
|
|
102
|
-
--charting-chart-4: #
|
|
103
|
-
--charting-chart-5: #
|
|
104
|
-
--charting-chart-6: #56B4E9;
|
|
99
|
+
--charting-chart-1: #ffa600;
|
|
100
|
+
--charting-chart-2: #c444b2;
|
|
101
|
+
--charting-chart-3: #ff5368;
|
|
102
|
+
--charting-chart-4: #f53d90;
|
|
103
|
+
--charting-chart-5: #ff7b3d;
|
|
105
104
|
|
|
106
105
|
/* utility colours */
|
|
107
106
|
--utility-success: #4ade80;
|
|
@@ -3565,7 +3564,7 @@ var avatarSizeStylesMap = {
|
|
|
3565
3564
|
};
|
|
3566
3565
|
var Avatar = ({
|
|
3567
3566
|
src,
|
|
3568
|
-
label = "",
|
|
3567
|
+
label: label2 = "",
|
|
3569
3568
|
children,
|
|
3570
3569
|
size = "md",
|
|
3571
3570
|
as = "div",
|
|
@@ -3577,7 +3576,7 @@ var Avatar = ({
|
|
|
3577
3576
|
src ? /* @__PURE__ */ jsx19("img", { role: "presentation", src, css: avatarImageStyles, referrerPolicy: "no-referrer" }) : children ? null : /* @__PURE__ */ jsx19(CgProfile, { css: avatarImageStyles }),
|
|
3578
3577
|
children
|
|
3579
3578
|
] });
|
|
3580
|
-
return src || children ? /* @__PURE__ */ jsx19(Tooltip, { title:
|
|
3579
|
+
return src || children ? /* @__PURE__ */ jsx19(Tooltip, { title: label2, withoutPortal: labelWithoutPortal, children: body }) : body;
|
|
3581
3580
|
};
|
|
3582
3581
|
|
|
3583
3582
|
// src/components/Avatar/AvatarGroup.styles.ts
|
|
@@ -4438,11 +4437,11 @@ var InfoDialog = ({ message }) => {
|
|
|
4438
4437
|
] });
|
|
4439
4438
|
};
|
|
4440
4439
|
var CheckboxWithInfo = forwardRef6(
|
|
4441
|
-
({ label, name, info, ...props }, ref) => {
|
|
4440
|
+
({ label: label2, name, info, ...props }, ref) => {
|
|
4442
4441
|
return /* @__PURE__ */ jsxs17("div", { css: CheckboxWithInfoContainer, children: [
|
|
4443
4442
|
/* @__PURE__ */ jsxs17("label", { css: CheckboxWithInfoLabel, children: [
|
|
4444
4443
|
/* @__PURE__ */ jsx30("input", { type: "checkbox", name, ref, css: CheckboxWithInfoInput, ...props }),
|
|
4445
|
-
/* @__PURE__ */ jsx30("span", { children:
|
|
4444
|
+
/* @__PURE__ */ jsx30("span", { children: label2 })
|
|
4446
4445
|
] }),
|
|
4447
4446
|
info ? /* @__PURE__ */ jsx30(InfoDialog, { message: info }) : null
|
|
4448
4447
|
] });
|
|
@@ -4648,7 +4647,7 @@ var Label = ({ children, className, testId, ...props }) => {
|
|
|
4648
4647
|
import { jsx as jsx37, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
4649
4648
|
var Input = React8.forwardRef(
|
|
4650
4649
|
({
|
|
4651
|
-
label,
|
|
4650
|
+
label: label2,
|
|
4652
4651
|
icon,
|
|
4653
4652
|
id,
|
|
4654
4653
|
caption,
|
|
@@ -4680,7 +4679,7 @@ var Input = React8.forwardRef(
|
|
|
4680
4679
|
css: [labelText, typeof classNameLabel === "object" ? classNameLabel : void 0],
|
|
4681
4680
|
className: typeof classNameLabel === "string" ? classNameLabel : "",
|
|
4682
4681
|
testId: labelTestId,
|
|
4683
|
-
children:
|
|
4682
|
+
children: label2
|
|
4684
4683
|
}
|
|
4685
4684
|
) : null,
|
|
4686
4685
|
/* @__PURE__ */ jsxs22(
|
|
@@ -4699,7 +4698,7 @@ var Input = React8.forwardRef(
|
|
|
4699
4698
|
errorMessage ? inputError : void 0,
|
|
4700
4699
|
icon ? inputWithIcon : ""
|
|
4701
4700
|
],
|
|
4702
|
-
"aria-label": showLabel || typeof
|
|
4701
|
+
"aria-label": showLabel || typeof label2 !== "string" ? void 0 : label2,
|
|
4703
4702
|
className: typeof classNameControl === "string" ? classNameControl : "",
|
|
4704
4703
|
onWheel: isNumberInputAndMouseWheelDisabled ? disableMouseWheelEvent : void 0,
|
|
4705
4704
|
...props,
|
|
@@ -5207,7 +5206,7 @@ import { forwardRef as forwardRef10 } from "react";
|
|
|
5207
5206
|
import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
|
|
5208
5207
|
var InputSelect = forwardRef10(
|
|
5209
5208
|
({
|
|
5210
|
-
label,
|
|
5209
|
+
label: label2,
|
|
5211
5210
|
defaultOption,
|
|
5212
5211
|
options,
|
|
5213
5212
|
caption,
|
|
@@ -5234,7 +5233,7 @@ var InputSelect = forwardRef10(
|
|
|
5234
5233
|
css: [labelText, typeof classNameLabel === "object" ? classNameLabel : void 0],
|
|
5235
5234
|
className: typeof classNameLabel === "string" ? classNameLabel : "",
|
|
5236
5235
|
children: [
|
|
5237
|
-
|
|
5236
|
+
label2,
|
|
5238
5237
|
labelCta
|
|
5239
5238
|
]
|
|
5240
5239
|
}
|
|
@@ -5243,8 +5242,8 @@ var InputSelect = forwardRef10(
|
|
|
5243
5242
|
"select",
|
|
5244
5243
|
{
|
|
5245
5244
|
ref,
|
|
5246
|
-
title:
|
|
5247
|
-
"aria-label": !showLabel ?
|
|
5245
|
+
title: label2,
|
|
5246
|
+
"aria-label": !showLabel ? label2 : void 0,
|
|
5248
5247
|
css: [
|
|
5249
5248
|
input("wrap"),
|
|
5250
5249
|
inputSelect,
|
|
@@ -5336,7 +5335,7 @@ function tryParseTime(isoTime) {
|
|
|
5336
5335
|
var InputTime = React9.forwardRef(
|
|
5337
5336
|
({
|
|
5338
5337
|
id,
|
|
5339
|
-
label,
|
|
5338
|
+
label: label2,
|
|
5340
5339
|
caption,
|
|
5341
5340
|
name,
|
|
5342
5341
|
showLabel = true,
|
|
@@ -5380,7 +5379,7 @@ var InputTime = React9.forwardRef(
|
|
|
5380
5379
|
),
|
|
5381
5380
|
...props,
|
|
5382
5381
|
children: [
|
|
5383
|
-
showLabel ? /* @__PURE__ */ jsx42(AriaLabel, { elementType: "label", css: [labelText], "data-testid": labelTestId, children:
|
|
5382
|
+
showLabel ? /* @__PURE__ */ jsx42(AriaLabel, { elementType: "label", css: [labelText], "data-testid": labelTestId, children: label2 }) : null,
|
|
5384
5383
|
/* @__PURE__ */ jsx42("div", { css: [inputContainer], children: /* @__PURE__ */ jsx42(
|
|
5385
5384
|
DateInput,
|
|
5386
5385
|
{
|
|
@@ -5419,7 +5418,7 @@ import * as React10 from "react";
|
|
|
5419
5418
|
import { jsx as jsx43, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
|
|
5420
5419
|
var InputToggle = React10.forwardRef(
|
|
5421
5420
|
({
|
|
5422
|
-
label,
|
|
5421
|
+
label: label2,
|
|
5423
5422
|
type,
|
|
5424
5423
|
disabled: disabled2,
|
|
5425
5424
|
checked,
|
|
@@ -5452,11 +5451,11 @@ var InputToggle = React10.forwardRef(
|
|
|
5452
5451
|
checked,
|
|
5453
5452
|
name,
|
|
5454
5453
|
disabled: disabled2,
|
|
5455
|
-
"aria-label": !showLabel && typeof
|
|
5454
|
+
"aria-label": !showLabel && typeof label2 === "string" ? label2 : void 0,
|
|
5456
5455
|
...props
|
|
5457
5456
|
}
|
|
5458
5457
|
),
|
|
5459
|
-
!showLabel ? null : /* @__PURE__ */ jsx43("span", { css: [inlineLabel, fontWeightStyles[fontWeight]], children:
|
|
5458
|
+
!showLabel ? null : /* @__PURE__ */ jsx43("span", { css: [inlineLabel, fontWeightStyles[fontWeight]], children: label2 }),
|
|
5460
5459
|
caption || errorMessage ? /* @__PURE__ */ jsx43("span", { css: inputToggleMessageContainer, children: /* @__PURE__ */ jsx43(
|
|
5461
5460
|
FieldMessage,
|
|
5462
5461
|
{
|
|
@@ -5508,9 +5507,9 @@ var SuccessMessage = ({ message, testId, ...props }) => {
|
|
|
5508
5507
|
import { forwardRef as forwardRef13 } from "react";
|
|
5509
5508
|
import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
|
|
5510
5509
|
var Textarea = forwardRef13(
|
|
5511
|
-
({ label, icon, id, caption, showLabel = true, errorMessage, warningMessage, ...props }, ref) => {
|
|
5510
|
+
({ label: label2, icon, id, caption, showLabel = true, errorMessage, warningMessage, ...props }, ref) => {
|
|
5512
5511
|
return /* @__PURE__ */ jsxs28(Fragment4, { children: [
|
|
5513
|
-
showLabel ? /* @__PURE__ */ jsx46("label", { htmlFor: id, css: [labelText], children:
|
|
5512
|
+
showLabel ? /* @__PURE__ */ jsx46("label", { htmlFor: id, css: [labelText], children: label2 }) : null,
|
|
5514
5513
|
/* @__PURE__ */ jsxs28("div", { css: [inputContainer], children: [
|
|
5515
5514
|
/* @__PURE__ */ jsx46(
|
|
5516
5515
|
"textarea",
|
|
@@ -5523,7 +5522,7 @@ var Textarea = forwardRef13(
|
|
|
5523
5522
|
icon ? inputWithIcon : "",
|
|
5524
5523
|
scrollbarStyles
|
|
5525
5524
|
],
|
|
5526
|
-
"aria-label": !showLabel ?
|
|
5525
|
+
"aria-label": !showLabel ? label2 : void 0,
|
|
5527
5526
|
...props
|
|
5528
5527
|
}
|
|
5529
5528
|
),
|
|
@@ -7267,7 +7266,7 @@ function useDateTimePickerContext() {
|
|
|
7267
7266
|
}
|
|
7268
7267
|
var DateTimePicker = ({
|
|
7269
7268
|
id,
|
|
7270
|
-
label,
|
|
7269
|
+
label: label2,
|
|
7271
7270
|
triggerIcon = CgCalendar,
|
|
7272
7271
|
value,
|
|
7273
7272
|
minVisible,
|
|
@@ -7351,7 +7350,7 @@ var DateTimePicker = ({
|
|
|
7351
7350
|
[handleClearClick, handleDateChange, handleTimeChange]
|
|
7352
7351
|
);
|
|
7353
7352
|
return /* @__PURE__ */ jsx63(DateTimePickerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs40("div", { "data-testid": testId, "data-variant": variant, ...props, children: [
|
|
7354
|
-
showLabel ? /* @__PURE__ */ jsx63(Label, { css: [labelText], "data-testid": `${testId}-label`, children:
|
|
7353
|
+
showLabel ? /* @__PURE__ */ jsx63(Label, { css: [labelText], "data-testid": `${testId}-label`, children: label2 }) : null,
|
|
7355
7354
|
/* @__PURE__ */ jsx63("div", { css: inputContainer, children: /* @__PURE__ */ jsxs40(PopoverProvider, { store: popover2, children: [
|
|
7356
7355
|
/* @__PURE__ */ jsxs40(
|
|
7357
7356
|
"div",
|
|
@@ -7500,10 +7499,10 @@ var DescriptionList = React12.forwardRef(
|
|
|
7500
7499
|
ref,
|
|
7501
7500
|
css: variant === "vertical" ? descriptionListVertical : descriptionListHorizontal,
|
|
7502
7501
|
...listProps,
|
|
7503
|
-
children: items == null ? void 0 : items.map(({ label, value }) => /* @__PURE__ */ jsxs41(React12.Fragment, { children: [
|
|
7504
|
-
/* @__PURE__ */ jsx64("dt", { css: descriptionListLabelStyles, children:
|
|
7502
|
+
children: items == null ? void 0 : items.map(({ label: label2, value }) => /* @__PURE__ */ jsxs41(React12.Fragment, { children: [
|
|
7503
|
+
/* @__PURE__ */ jsx64("dt", { css: descriptionListLabelStyles, children: label2 }),
|
|
7505
7504
|
/* @__PURE__ */ jsx64("dd", { css: descriptionListValueStyles, children: typeof value === "boolean" ? /* @__PURE__ */ jsx64(DescriptionListValueBoolean, { value }) : value })
|
|
7506
|
-
] },
|
|
7505
|
+
] }, label2))
|
|
7507
7506
|
}
|
|
7508
7507
|
);
|
|
7509
7508
|
}
|
|
@@ -9375,10 +9374,7 @@ function useDebouncedCallback(callback, deps, delay, maxWait = 0) {
|
|
|
9375
9374
|
|
|
9376
9375
|
// src/components/KeyValueInput/KeyValueInput.styles.ts
|
|
9377
9376
|
import { css as css69 } from "@emotion/react";
|
|
9378
|
-
var LabelStyles = css69
|
|
9379
|
-
text-transform: uppercase;
|
|
9380
|
-
font-weight: var(--fw-medium);
|
|
9381
|
-
`;
|
|
9377
|
+
var LabelStyles = css69``;
|
|
9382
9378
|
var SelectKeyValueRowStyles = css69`
|
|
9383
9379
|
animation: var(--duration-fast) var(--timing-ease-out);
|
|
9384
9380
|
align-items: flex-start;
|
|
@@ -9401,15 +9397,19 @@ var generateItemId = (item, index) => item.uniqueId || item.value || item.key ||
|
|
|
9401
9397
|
var KeyValueInput = ({
|
|
9402
9398
|
value,
|
|
9403
9399
|
onChange,
|
|
9404
|
-
label = "Options",
|
|
9400
|
+
label: label2 = "Options",
|
|
9405
9401
|
newItemDefault = initialSelectOptionValue,
|
|
9406
9402
|
keyLabel = "Text",
|
|
9407
9403
|
valueLabel = "Value",
|
|
9404
|
+
iconLabel = "Icon",
|
|
9408
9405
|
keyInfoPopover,
|
|
9409
9406
|
valueInfoPopover,
|
|
9407
|
+
iconInfoPopover,
|
|
9410
9408
|
disabled: disabled2,
|
|
9411
9409
|
errors,
|
|
9412
|
-
onFocusChange
|
|
9410
|
+
onFocusChange,
|
|
9411
|
+
showIconColumn = false,
|
|
9412
|
+
renderIconSelector
|
|
9413
9413
|
}) => {
|
|
9414
9414
|
const [isDragging, setIsDragging] = useState11(false);
|
|
9415
9415
|
const popoverStoresMap = useRef6({});
|
|
@@ -9481,35 +9481,58 @@ var KeyValueInput = ({
|
|
|
9481
9481
|
}
|
|
9482
9482
|
}, [value.length]);
|
|
9483
9483
|
return /* @__PURE__ */ jsxs58(VerticalRhythm, { gap: "xs", children: [
|
|
9484
|
-
/* @__PURE__ */ jsx91(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ jsx91("span", { css: LabelStyles, children:
|
|
9485
|
-
/* @__PURE__ */ jsxs58(
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
{
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
children:
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
children:
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9484
|
+
/* @__PURE__ */ jsx91(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ jsx91("span", { css: LabelStyles, children: label2 }) }),
|
|
9485
|
+
/* @__PURE__ */ jsxs58(
|
|
9486
|
+
"div",
|
|
9487
|
+
{
|
|
9488
|
+
css: [
|
|
9489
|
+
SelectKeyValueRowStyles,
|
|
9490
|
+
{ paddingLeft: "var(--spacing-base)" },
|
|
9491
|
+
showIconColumn && { gridTemplateColumns: "1fr 1fr 1fr" }
|
|
9492
|
+
],
|
|
9493
|
+
children: [
|
|
9494
|
+
showIconColumn && /* @__PURE__ */ jsxs58(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
9495
|
+
/* @__PURE__ */ jsx91("span", { children: iconLabel }),
|
|
9496
|
+
!iconInfoPopover ? null : /* @__PURE__ */ jsx91(
|
|
9497
|
+
Popover3,
|
|
9498
|
+
{
|
|
9499
|
+
buttonText: `${iconLabel} info`,
|
|
9500
|
+
iconColor: "gray",
|
|
9501
|
+
placement: "bottom-start",
|
|
9502
|
+
onInit: ({ store }) => popoverStoresMap.current.icon = store,
|
|
9503
|
+
children: iconInfoPopover
|
|
9504
|
+
}
|
|
9505
|
+
)
|
|
9506
|
+
] }),
|
|
9507
|
+
/* @__PURE__ */ jsxs58(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
9508
|
+
/* @__PURE__ */ jsx91("span", { children: keyLabel }),
|
|
9509
|
+
!keyInfoPopover ? null : /* @__PURE__ */ jsx91(
|
|
9510
|
+
Popover3,
|
|
9511
|
+
{
|
|
9512
|
+
buttonText: `${keyLabel} info`,
|
|
9513
|
+
iconColor: "gray",
|
|
9514
|
+
placement: "bottom-start",
|
|
9515
|
+
onInit: ({ store }) => popoverStoresMap.current.label = store,
|
|
9516
|
+
children: keyInfoPopover
|
|
9517
|
+
}
|
|
9518
|
+
)
|
|
9519
|
+
] }),
|
|
9520
|
+
/* @__PURE__ */ jsxs58(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
9521
|
+
/* @__PURE__ */ jsx91("span", { children: valueLabel }),
|
|
9522
|
+
!valueInfoPopover ? null : /* @__PURE__ */ jsx91(
|
|
9523
|
+
Popover3,
|
|
9524
|
+
{
|
|
9525
|
+
buttonText: `${valueLabel} info`,
|
|
9526
|
+
iconColor: "gray",
|
|
9527
|
+
placement: "bottom-start",
|
|
9528
|
+
onInit: ({ store }) => popoverStoresMap.current.value = store,
|
|
9529
|
+
children: valueInfoPopover
|
|
9530
|
+
}
|
|
9531
|
+
)
|
|
9532
|
+
] })
|
|
9533
|
+
]
|
|
9534
|
+
}
|
|
9535
|
+
),
|
|
9513
9536
|
/* @__PURE__ */ jsx91(VerticalRhythm, { gap: "sm", children: /* @__PURE__ */ jsx91(
|
|
9514
9537
|
DndContext,
|
|
9515
9538
|
{
|
|
@@ -9527,6 +9550,7 @@ var KeyValueInput = ({
|
|
|
9527
9550
|
value: item,
|
|
9528
9551
|
keyLabel: `${keyLabel}, row ${index}`,
|
|
9529
9552
|
valueLabel: `${valueLabel}, row ${index}`,
|
|
9553
|
+
iconLabel: `${iconLabel}, row ${index}`,
|
|
9530
9554
|
disabled: disabled2,
|
|
9531
9555
|
disabledDelete: value.length <= 1,
|
|
9532
9556
|
disabledDnd: value.length === 1,
|
|
@@ -9535,25 +9559,21 @@ var KeyValueInput = ({
|
|
|
9535
9559
|
onDelete: () => handleDeleteOptionRow(index),
|
|
9536
9560
|
onFocusChange: handleFocusChange,
|
|
9537
9561
|
"data-testid": "key-value-input-item",
|
|
9538
|
-
onEnter: handleAddOptionRow
|
|
9562
|
+
onEnter: handleAddOptionRow,
|
|
9563
|
+
showIconColumn,
|
|
9564
|
+
renderIconSelector
|
|
9539
9565
|
},
|
|
9540
9566
|
isDragging ? id : index
|
|
9541
9567
|
)) })
|
|
9542
9568
|
}
|
|
9543
9569
|
) }),
|
|
9544
|
-
/* @__PURE__ */
|
|
9545
|
-
|
|
9570
|
+
/* @__PURE__ */ jsx91(
|
|
9571
|
+
AddListButton,
|
|
9546
9572
|
{
|
|
9547
|
-
|
|
9548
|
-
buttonType: "secondaryInvert",
|
|
9549
|
-
size: "xs",
|
|
9550
|
-
onClick: handleAddOptionRow,
|
|
9573
|
+
onButtonClick: handleAddOptionRow,
|
|
9551
9574
|
disabled: disabled2,
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
/* @__PURE__ */ jsx91(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.85rem" }),
|
|
9555
|
-
" Add option"
|
|
9556
|
-
]
|
|
9575
|
+
"data-testid": "add-input-row-action",
|
|
9576
|
+
css: { marginTop: "var(--spacing-sm)", marginLeft: "var(--spacing-base)" }
|
|
9557
9577
|
}
|
|
9558
9578
|
)
|
|
9559
9579
|
] });
|
|
@@ -9564,6 +9584,7 @@ var KeyValueInputItem = ({
|
|
|
9564
9584
|
keyLabel,
|
|
9565
9585
|
value,
|
|
9566
9586
|
valueLabel,
|
|
9587
|
+
iconLabel,
|
|
9567
9588
|
disabled: disabled2,
|
|
9568
9589
|
onChange,
|
|
9569
9590
|
onDelete,
|
|
@@ -9571,7 +9592,9 @@ var KeyValueInputItem = ({
|
|
|
9571
9592
|
onFocusChange,
|
|
9572
9593
|
disabledDelete = false,
|
|
9573
9594
|
disabledDnd = false,
|
|
9574
|
-
onEnter
|
|
9595
|
+
onEnter,
|
|
9596
|
+
showIconColumn = false,
|
|
9597
|
+
renderIconSelector
|
|
9575
9598
|
}) => {
|
|
9576
9599
|
const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = useSortable({
|
|
9577
9600
|
id,
|
|
@@ -9588,62 +9611,98 @@ var KeyValueInputItem = ({
|
|
|
9588
9611
|
};
|
|
9589
9612
|
return /* @__PURE__ */ jsxs58("div", { css: rowWrapper, ref: setNodeRef, style, children: [
|
|
9590
9613
|
/* @__PURE__ */ jsx91(DragHandle, { disableDnd: disabledDnd, ref: setActivatorNodeRef, ...attributes, ...listeners }),
|
|
9591
|
-
/* @__PURE__ */ jsxs58(
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9614
|
+
/* @__PURE__ */ jsxs58(
|
|
9615
|
+
"div",
|
|
9616
|
+
{
|
|
9617
|
+
css: [
|
|
9618
|
+
SelectKeyValueRowStyles,
|
|
9619
|
+
showIconColumn && { gridTemplateColumns: "1fr 1fr 1fr 1.5rem" }
|
|
9620
|
+
],
|
|
9621
|
+
"data-testid": "key-value-input-item",
|
|
9622
|
+
children: [
|
|
9623
|
+
showIconColumn && /* @__PURE__ */ jsx91("div", { children: renderIconSelector ? renderIconSelector({
|
|
9624
|
+
value: value.icon,
|
|
9625
|
+
onChange: (icon) => onChange == null ? void 0 : onChange({ ...value, icon }),
|
|
9626
|
+
disabled: disabled2
|
|
9627
|
+
}) : /* @__PURE__ */ jsx91(
|
|
9628
|
+
Input,
|
|
9629
|
+
{
|
|
9630
|
+
label: iconLabel,
|
|
9631
|
+
showLabel: false,
|
|
9632
|
+
disabled: disabled2,
|
|
9633
|
+
onChange: (e) => {
|
|
9634
|
+
onChange == null ? void 0 : onChange({
|
|
9635
|
+
...value,
|
|
9636
|
+
icon: e.currentTarget.value
|
|
9637
|
+
});
|
|
9638
|
+
},
|
|
9639
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
9640
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
9641
|
+
onKeyDown: handleEnter,
|
|
9642
|
+
value: value.icon || "",
|
|
9643
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.icon,
|
|
9644
|
+
"data-testid": "icon"
|
|
9645
|
+
}
|
|
9646
|
+
) }),
|
|
9647
|
+
/* @__PURE__ */ jsx91(
|
|
9648
|
+
Input,
|
|
9649
|
+
{
|
|
9650
|
+
ref: firstInputRef,
|
|
9651
|
+
label: keyLabel,
|
|
9652
|
+
showLabel: false,
|
|
9653
|
+
disabled: disabled2,
|
|
9654
|
+
onChange: (e) => {
|
|
9655
|
+
const hasStoredValue = value.value !== value.key;
|
|
9656
|
+
onChange == null ? void 0 : onChange({
|
|
9657
|
+
key: e.currentTarget.value,
|
|
9658
|
+
value: hasStoredValue ? value.value : e.currentTarget.value,
|
|
9659
|
+
icon: value.icon
|
|
9660
|
+
});
|
|
9661
|
+
},
|
|
9662
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
9663
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
9664
|
+
onKeyDown: handleEnter,
|
|
9665
|
+
value: value.key,
|
|
9666
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
|
|
9667
|
+
"data-testid": "key"
|
|
9668
|
+
}
|
|
9669
|
+
),
|
|
9670
|
+
/* @__PURE__ */ jsx91(
|
|
9671
|
+
Input,
|
|
9672
|
+
{
|
|
9673
|
+
label: valueLabel,
|
|
9674
|
+
showLabel: false,
|
|
9675
|
+
disabled: disabled2,
|
|
9676
|
+
onChange: (e) => {
|
|
9677
|
+
onChange == null ? void 0 : onChange({
|
|
9678
|
+
key: value.key,
|
|
9679
|
+
value: e.currentTarget.value,
|
|
9680
|
+
icon: value.icon
|
|
9681
|
+
});
|
|
9682
|
+
},
|
|
9683
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
9684
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
9685
|
+
onKeyDown: handleEnter,
|
|
9686
|
+
value: value.value,
|
|
9687
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
|
|
9688
|
+
"data-testid": "value"
|
|
9689
|
+
}
|
|
9690
|
+
),
|
|
9691
|
+
/* @__PURE__ */ jsx91("div", { css: { marginTop: "1rem" }, children: /* @__PURE__ */ jsx91(
|
|
9692
|
+
Button,
|
|
9693
|
+
{
|
|
9694
|
+
type: "button",
|
|
9695
|
+
buttonType: "ghostDestructive",
|
|
9696
|
+
"data-testid": "delete-row",
|
|
9697
|
+
onClick: onDelete,
|
|
9698
|
+
disabled: disabled2 || disabledDelete,
|
|
9699
|
+
size: "zero",
|
|
9700
|
+
children: /* @__PURE__ */ jsx91(Icon, { icon: "trash", size: 16, iconColor: "currentColor" })
|
|
9701
|
+
}
|
|
9702
|
+
) })
|
|
9703
|
+
]
|
|
9704
|
+
}
|
|
9705
|
+
)
|
|
9647
9706
|
] });
|
|
9648
9707
|
};
|
|
9649
9708
|
|
|
@@ -9844,15 +9903,15 @@ var ScrollableListInner = css72`
|
|
|
9844
9903
|
|
|
9845
9904
|
// src/components/List/ScrollableList.tsx
|
|
9846
9905
|
import { jsx as jsx95, jsxs as jsxs62 } from "@emotion/react/jsx-runtime";
|
|
9847
|
-
var ScrollableList = ({ label, children, ...props }) => {
|
|
9906
|
+
var ScrollableList = ({ label: label2, children, ...props }) => {
|
|
9848
9907
|
return /* @__PURE__ */ jsxs62("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
9849
|
-
|
|
9908
|
+
label2 ? /* @__PURE__ */ jsx95(
|
|
9850
9909
|
"span",
|
|
9851
9910
|
{
|
|
9852
9911
|
css: css73`
|
|
9853
9912
|
${labelText}
|
|
9854
9913
|
`,
|
|
9855
|
-
children:
|
|
9914
|
+
children: label2
|
|
9856
9915
|
}
|
|
9857
9916
|
) : null,
|
|
9858
9917
|
/* @__PURE__ */ jsx95("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
@@ -9929,7 +9988,7 @@ var ScrollableListIconVisible = css74`
|
|
|
9929
9988
|
// src/components/List/ScrollableListInputItem.tsx
|
|
9930
9989
|
import { jsx as jsx96, jsxs as jsxs63 } from "@emotion/react/jsx-runtime";
|
|
9931
9990
|
var ScrollableListInputItem = ({
|
|
9932
|
-
label,
|
|
9991
|
+
label: label2,
|
|
9933
9992
|
icon,
|
|
9934
9993
|
active: active2,
|
|
9935
9994
|
disableShadow = false,
|
|
@@ -9949,7 +10008,7 @@ var ScrollableListInputItem = ({
|
|
|
9949
10008
|
children: /* @__PURE__ */ jsxs63("label", { "data-testid": labelTestId, css: ScrollableListInputLabel, children: [
|
|
9950
10009
|
/* @__PURE__ */ jsxs63("span", { css: ScrollableListInputText, children: [
|
|
9951
10010
|
icon,
|
|
9952
|
-
|
|
10011
|
+
label2
|
|
9953
10012
|
] }),
|
|
9954
10013
|
/* @__PURE__ */ jsx96("div", { css: ScrollableListHiddenInput, children }),
|
|
9955
10014
|
/* @__PURE__ */ jsx96(
|
|
@@ -10330,20 +10389,20 @@ var LoadingOverlay = ({
|
|
|
10330
10389
|
);
|
|
10331
10390
|
};
|
|
10332
10391
|
var LoadingAnimation = ({
|
|
10333
|
-
label,
|
|
10392
|
+
label: label2,
|
|
10334
10393
|
width,
|
|
10335
|
-
css:
|
|
10394
|
+
css: css112,
|
|
10336
10395
|
isPaused
|
|
10337
10396
|
}) => {
|
|
10338
10397
|
return /* @__PURE__ */ jsxs66(
|
|
10339
10398
|
"div",
|
|
10340
10399
|
{
|
|
10341
|
-
"aria-label":
|
|
10400
|
+
"aria-label": label2,
|
|
10342
10401
|
style: {
|
|
10343
10402
|
width: typeof width === "number" ? `${width}px` : width,
|
|
10344
10403
|
height: typeof width === "number" ? `${width}px` : width
|
|
10345
10404
|
},
|
|
10346
|
-
css: [loaderAnimationContainer,
|
|
10405
|
+
css: [loaderAnimationContainer, css112],
|
|
10347
10406
|
className: `loader-container${isPaused ? " paused" : ""}`,
|
|
10348
10407
|
children: [
|
|
10349
10408
|
/* @__PURE__ */ jsxs66("div", { className: "bottom-cubes", children: [
|
|
@@ -11423,10 +11482,10 @@ var ParameterShellContext = createContext5({
|
|
|
11423
11482
|
}
|
|
11424
11483
|
});
|
|
11425
11484
|
var useParameterShell = () => {
|
|
11426
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useContext5(ParameterShellContext);
|
|
11485
|
+
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useContext5(ParameterShellContext);
|
|
11427
11486
|
return {
|
|
11428
11487
|
id,
|
|
11429
|
-
label,
|
|
11488
|
+
label: label2,
|
|
11430
11489
|
hiddenLabel,
|
|
11431
11490
|
errorMessage,
|
|
11432
11491
|
handleManuallySetErrorMessage
|
|
@@ -11922,16 +11981,6 @@ var toggleInput2 = css91`
|
|
|
11922
11981
|
color: var(--white);
|
|
11923
11982
|
}
|
|
11924
11983
|
|
|
11925
|
-
&:indeterminate,
|
|
11926
|
-
&:indeterminate:hover,
|
|
11927
|
-
&:indeterminate:focus {
|
|
11928
|
-
background: var(--accent-dark-active)
|
|
11929
|
-
url('data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNiIKICBoZWlnaHQ9IjE2IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNCAxMkM0IDExLjQ0NzcgNC40NDc3MiAxMSA1IDExSDE5QzE5LjU1MjMgMTEgMjAgMTEuNDQ3NyAyMCAxMkMyMCAxMi41NTIzIDE5LjU1MjMgMTMgMTkgMTNINUM0LjQ0NzcyIDEzIDQgMTIuNTUyMyA0IDEyWiIKICAgIGZpbGw9IndoaXRlIgogIC8+Cjwvc3ZnPg==')
|
|
11930
|
-
no-repeat center center;
|
|
11931
|
-
border-color: var(--accent-dark-active);
|
|
11932
|
-
color: var(--white);
|
|
11933
|
-
}
|
|
11934
|
-
|
|
11935
11984
|
&:hover {
|
|
11936
11985
|
border-color: var(--accent-dark-hover);
|
|
11937
11986
|
}
|
|
@@ -11942,6 +11991,17 @@ var toggleInput2 = css91`
|
|
|
11942
11991
|
border-color: var(--gray-300);
|
|
11943
11992
|
}
|
|
11944
11993
|
`;
|
|
11994
|
+
var toggleInputIndeterminateState = css91`
|
|
11995
|
+
&:indeterminate,
|
|
11996
|
+
&:indeterminate:hover,
|
|
11997
|
+
&:indeterminate:focus {
|
|
11998
|
+
background: var(--accent-dark-active)
|
|
11999
|
+
url('data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNiIKICBoZWlnaHQ9IjE2IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNCAxMkM0IDExLjQ0NzcgNC40NDc3MiAxMSA1IDExSDE5QzE5LjU1MjMgMTEgMjAgMTEuNDQ3NyAyMCAxMkMyMCAxMi41NTIzIDE5LjU1MjMgMTMgMTkgMTNINUM0LjQ0NzcyIDEzIDQgMTIuNTUyMyA0IDEyWiIKICAgIGZpbGw9IndoaXRlIgogIC8+Cjwvc3ZnPg==')
|
|
12000
|
+
no-repeat center center;
|
|
12001
|
+
border-color: var(--accent-dark-active);
|
|
12002
|
+
color: var(--white);
|
|
12003
|
+
}
|
|
12004
|
+
`;
|
|
11945
12005
|
var inlineLabel2 = css91`
|
|
11946
12006
|
color: var(--inline-label-color);
|
|
11947
12007
|
padding-left: var(--spacing-md);
|
|
@@ -12084,7 +12144,7 @@ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
|
12084
12144
|
import { forwardRef as forwardRef21 } from "react";
|
|
12085
12145
|
import { jsx as jsx120 } from "@emotion/react/jsx-runtime";
|
|
12086
12146
|
var ParameterMenuButton = forwardRef21(
|
|
12087
|
-
({ label, children, disabled: disabled2 }, ref) => {
|
|
12147
|
+
({ label: label2, children, disabled: disabled2 }, ref) => {
|
|
12088
12148
|
return /* @__PURE__ */ jsx120(
|
|
12089
12149
|
Menu,
|
|
12090
12150
|
{
|
|
@@ -12095,7 +12155,7 @@ var ParameterMenuButton = forwardRef21(
|
|
|
12095
12155
|
className: "parameter-menu",
|
|
12096
12156
|
css: [inputMenu, inputMenuHover],
|
|
12097
12157
|
type: "button",
|
|
12098
|
-
"aria-label": `${
|
|
12158
|
+
"aria-label": `${label2} options`,
|
|
12099
12159
|
ref,
|
|
12100
12160
|
disabled: disabled2,
|
|
12101
12161
|
children: /* @__PURE__ */ jsx120(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
@@ -12138,7 +12198,7 @@ import { jsx as jsx121, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
|
|
|
12138
12198
|
var extractParameterProps = (props) => {
|
|
12139
12199
|
const {
|
|
12140
12200
|
id,
|
|
12141
|
-
label,
|
|
12201
|
+
label: label2,
|
|
12142
12202
|
caption,
|
|
12143
12203
|
captionTestId,
|
|
12144
12204
|
errorMessage,
|
|
@@ -12156,7 +12216,7 @@ var extractParameterProps = (props) => {
|
|
|
12156
12216
|
return {
|
|
12157
12217
|
shellProps: {
|
|
12158
12218
|
id,
|
|
12159
|
-
label,
|
|
12219
|
+
label: label2,
|
|
12160
12220
|
caption,
|
|
12161
12221
|
captionTestId,
|
|
12162
12222
|
errorMessage,
|
|
@@ -12174,7 +12234,7 @@ var extractParameterProps = (props) => {
|
|
|
12174
12234
|
};
|
|
12175
12235
|
};
|
|
12176
12236
|
var ParameterShell = ({
|
|
12177
|
-
label,
|
|
12237
|
+
label: label2,
|
|
12178
12238
|
labelLeadingIcon,
|
|
12179
12239
|
labelTrailingIcon,
|
|
12180
12240
|
hiddenLabel,
|
|
@@ -12200,7 +12260,7 @@ var ParameterShell = ({
|
|
|
12200
12260
|
return /* @__PURE__ */ jsxs80("div", { css: inputContainer2, ...props, id, children: [
|
|
12201
12261
|
hiddenLabel || title ? null : /* @__PURE__ */ jsxs80(ParameterLabel, { id, css: labelText2, children: [
|
|
12202
12262
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
12203
|
-
|
|
12263
|
+
label2,
|
|
12204
12264
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
12205
12265
|
] }),
|
|
12206
12266
|
!title ? null : /* @__PURE__ */ jsxs80(ParameterLabel, { id, asSpan: true, testId: "parameter-label", children: [
|
|
@@ -12223,13 +12283,13 @@ var ParameterShell = ({
|
|
|
12223
12283
|
children: actionItems
|
|
12224
12284
|
}
|
|
12225
12285
|
) : null,
|
|
12226
|
-
menuItems ? /* @__PURE__ */ jsx121(ParameterMenuButton, { label: `${
|
|
12286
|
+
menuItems ? /* @__PURE__ */ jsx121(ParameterMenuButton, { label: `${label2} menu`, disabled: props.disabled, children: menuItems }) : null,
|
|
12227
12287
|
/* @__PURE__ */ jsx121(
|
|
12228
12288
|
ParameterShellContext.Provider,
|
|
12229
12289
|
{
|
|
12230
12290
|
value: {
|
|
12231
12291
|
id,
|
|
12232
|
-
label,
|
|
12292
|
+
label: label2,
|
|
12233
12293
|
hiddenLabel,
|
|
12234
12294
|
errorMessage: errorMessaging,
|
|
12235
12295
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
@@ -12272,7 +12332,7 @@ var ParameterImage = forwardRef22(
|
|
|
12272
12332
|
);
|
|
12273
12333
|
var ParameterImageInner = forwardRef22((props, ref) => {
|
|
12274
12334
|
const { value } = props;
|
|
12275
|
-
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
12335
|
+
const { id, label: label2, hiddenLabel, errorMessage } = useParameterShell();
|
|
12276
12336
|
const deferredValue = useDeferredValue(value);
|
|
12277
12337
|
return /* @__PURE__ */ jsxs81(Fragment13, { children: [
|
|
12278
12338
|
/* @__PURE__ */ jsx122(
|
|
@@ -12282,7 +12342,7 @@ var ParameterImageInner = forwardRef22((props, ref) => {
|
|
|
12282
12342
|
type: "text",
|
|
12283
12343
|
id,
|
|
12284
12344
|
ref,
|
|
12285
|
-
"aria-label": hiddenLabel && typeof
|
|
12345
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
12286
12346
|
autoComplete: "off",
|
|
12287
12347
|
...props
|
|
12288
12348
|
}
|
|
@@ -12299,7 +12359,7 @@ var ParameterInput = forwardRef23((props, ref) => {
|
|
|
12299
12359
|
return /* @__PURE__ */ jsx123(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ jsx123(ParameterInputInner, { ref, ...innerProps }) });
|
|
12300
12360
|
});
|
|
12301
12361
|
var ParameterInputInner = forwardRef23(({ enableMouseWheel = false, ...props }, ref) => {
|
|
12302
|
-
const { id, label, hiddenLabel } = useParameterShell();
|
|
12362
|
+
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
12303
12363
|
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
12304
12364
|
return /* @__PURE__ */ jsx123(
|
|
12305
12365
|
"input",
|
|
@@ -12307,7 +12367,7 @@ var ParameterInputInner = forwardRef23(({ enableMouseWheel = false, ...props },
|
|
|
12307
12367
|
css: input3,
|
|
12308
12368
|
id,
|
|
12309
12369
|
type: props.type || "text",
|
|
12310
|
-
"aria-label": hiddenLabel && typeof
|
|
12370
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
12311
12371
|
autoComplete: "off",
|
|
12312
12372
|
ref,
|
|
12313
12373
|
onWheel: isNumberInputAndMouseWheelDisabled ? disableMouseWheelEvent : void 0,
|
|
@@ -12344,7 +12404,7 @@ var ParameterLink = forwardRef24(
|
|
|
12344
12404
|
);
|
|
12345
12405
|
var ParameterLinkInner = forwardRef24(
|
|
12346
12406
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
12347
|
-
const { id, label, hiddenLabel } = useParameterShell();
|
|
12407
|
+
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
12348
12408
|
if (!props.value)
|
|
12349
12409
|
return /* @__PURE__ */ jsx124("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
12350
12410
|
return /* @__PURE__ */ jsxs82("div", { css: inputWrapper, children: [
|
|
@@ -12356,7 +12416,7 @@ var ParameterLinkInner = forwardRef24(
|
|
|
12356
12416
|
readOnly: Boolean(props.value),
|
|
12357
12417
|
id,
|
|
12358
12418
|
ref,
|
|
12359
|
-
"aria-label": hiddenLabel && typeof
|
|
12419
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
12360
12420
|
...props
|
|
12361
12421
|
}
|
|
12362
12422
|
),
|
|
@@ -12397,7 +12457,7 @@ var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
|
12397
12457
|
};
|
|
12398
12458
|
var ParameterMultiSelectInner = (props) => {
|
|
12399
12459
|
var _a;
|
|
12400
|
-
const { id, label } = useParameterShell();
|
|
12460
|
+
const { id, label: label2 } = useParameterShell();
|
|
12401
12461
|
return /* @__PURE__ */ jsx125(
|
|
12402
12462
|
InputComboBox,
|
|
12403
12463
|
{
|
|
@@ -12407,7 +12467,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
12407
12467
|
isMulti: true,
|
|
12408
12468
|
isClearable: (_a = props.isClearable) != null ? _a : false,
|
|
12409
12469
|
id,
|
|
12410
|
-
"aria-label": typeof
|
|
12470
|
+
"aria-label": typeof label2 === "string" ? label2 : void 0,
|
|
12411
12471
|
classNamePrefix: "parameter-multi-select-combobox",
|
|
12412
12472
|
styles: {
|
|
12413
12473
|
menuPortal: (base) => ({
|
|
@@ -12459,7 +12519,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
12459
12519
|
publicIdError,
|
|
12460
12520
|
readOnly = false,
|
|
12461
12521
|
hasInitialPublicIdField,
|
|
12462
|
-
label = "Name",
|
|
12522
|
+
label: label2 = "Name",
|
|
12463
12523
|
warnOverLength,
|
|
12464
12524
|
nameIdField = "name",
|
|
12465
12525
|
nameCaption,
|
|
@@ -12480,7 +12540,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
12480
12540
|
{
|
|
12481
12541
|
id: nameIdField,
|
|
12482
12542
|
name: nameIdField,
|
|
12483
|
-
label,
|
|
12543
|
+
label: label2,
|
|
12484
12544
|
"data-testid": "name-field",
|
|
12485
12545
|
autoComplete: "off",
|
|
12486
12546
|
"data-af": "true",
|
|
@@ -12524,8 +12584,650 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
12524
12584
|
] });
|
|
12525
12585
|
};
|
|
12526
12586
|
|
|
12587
|
+
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
12588
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
12589
|
+
|
|
12590
|
+
// src/components/Slider/Slider.tsx
|
|
12591
|
+
import { forwardRef as forwardRef25, useCallback as useCallback8, useMemo as useMemo6 } from "react";
|
|
12592
|
+
|
|
12593
|
+
// src/components/Slider/SliderLabels.tsx
|
|
12594
|
+
import { useEffect as useEffect15, useRef as useRef9, useState as useState15 } from "react";
|
|
12595
|
+
|
|
12596
|
+
// src/components/Slider/styles/Slider.styles.ts
|
|
12597
|
+
import { css as css94 } from "@emotion/react";
|
|
12598
|
+
var thumbSize = "20px";
|
|
12599
|
+
var disabledThumbStyles = css94`
|
|
12600
|
+
background: var(--gray-500);
|
|
12601
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cline x1='4' y1='9' x2='16' y2='9' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
12602
|
+
background-repeat: no-repeat;
|
|
12603
|
+
background-position: center;
|
|
12604
|
+
background-size: 12px 12px;
|
|
12605
|
+
`;
|
|
12606
|
+
var container3 = css94`
|
|
12607
|
+
display: flex;
|
|
12608
|
+
align-items: flex-start;
|
|
12609
|
+
gap: var(--spacing-base);
|
|
12610
|
+
width: 100%;
|
|
12611
|
+
`;
|
|
12612
|
+
var sliderContainer = css94`
|
|
12613
|
+
flex: 1;
|
|
12614
|
+
display: flex;
|
|
12615
|
+
flex-direction: column;
|
|
12616
|
+
`;
|
|
12617
|
+
var sliderTrackContainer = css94`
|
|
12618
|
+
position: relative;
|
|
12619
|
+
padding: var(--spacing-xs) 0;
|
|
12620
|
+
`;
|
|
12621
|
+
var progressTrack = css94`
|
|
12622
|
+
position: absolute;
|
|
12623
|
+
top: 50%;
|
|
12624
|
+
left: 0;
|
|
12625
|
+
right: 0;
|
|
12626
|
+
height: 4px;
|
|
12627
|
+
transform: translateY(-50%);
|
|
12628
|
+
margin-top: -3px;
|
|
12629
|
+
border-radius: var(--rounded-sm);
|
|
12630
|
+
`;
|
|
12631
|
+
var progressTrackBackground = css94`
|
|
12632
|
+
position: absolute;
|
|
12633
|
+
top: 0;
|
|
12634
|
+
left: 0;
|
|
12635
|
+
right: 0;
|
|
12636
|
+
bottom: 0;
|
|
12637
|
+
background: var(--gray-200);
|
|
12638
|
+
border-radius: var(--rounded-sm);
|
|
12639
|
+
box-shadow: 0 0 0 1px white;
|
|
12640
|
+
`;
|
|
12641
|
+
var progressTrackFill = css94`
|
|
12642
|
+
position: absolute;
|
|
12643
|
+
top: 0;
|
|
12644
|
+
left: 0;
|
|
12645
|
+
bottom: 0;
|
|
12646
|
+
background: var(--accent-light);
|
|
12647
|
+
border-radius: var(--rounded-sm);
|
|
12648
|
+
`;
|
|
12649
|
+
var tickMarksContainer = css94`
|
|
12650
|
+
position: relative;
|
|
12651
|
+
height: 1rem;
|
|
12652
|
+
margin-top: calc(-1 * var(--spacing-base) + var(--spacing-xs));
|
|
12653
|
+
`;
|
|
12654
|
+
var tickMark = css94`
|
|
12655
|
+
position: absolute;
|
|
12656
|
+
top: 0;
|
|
12657
|
+
width: 0.5px;
|
|
12658
|
+
height: 8px;
|
|
12659
|
+
background-color: var(--gray-300);
|
|
12660
|
+
`;
|
|
12661
|
+
var largeTickMark = css94`
|
|
12662
|
+
position: absolute;
|
|
12663
|
+
top: 0;
|
|
12664
|
+
width: 1px;
|
|
12665
|
+
height: 12px;
|
|
12666
|
+
background-color: var(--gray-400);
|
|
12667
|
+
transform: translateX(-50%);
|
|
12668
|
+
`;
|
|
12669
|
+
var slider = css94`
|
|
12670
|
+
appearance: none;
|
|
12671
|
+
width: 100%;
|
|
12672
|
+
width: calc(100% + ${thumbSize});
|
|
12673
|
+
left: calc(-${thumbSize} / 2);
|
|
12674
|
+
height: ${thumbSize};
|
|
12675
|
+
background: transparent;
|
|
12676
|
+
outline: none;
|
|
12677
|
+
cursor: pointer;
|
|
12678
|
+
position: relative;
|
|
12679
|
+
z-index: 3;
|
|
12680
|
+
|
|
12681
|
+
&:disabled {
|
|
12682
|
+
cursor: not-allowed;
|
|
12683
|
+
}
|
|
12684
|
+
|
|
12685
|
+
/* Webkit (Chrome, Safari) */
|
|
12686
|
+
&::-webkit-slider-track {
|
|
12687
|
+
width: 100%;
|
|
12688
|
+
height: 4px;
|
|
12689
|
+
background: transparent;
|
|
12690
|
+
border-radius: var(--rounded-sm);
|
|
12691
|
+
}
|
|
12692
|
+
|
|
12693
|
+
&::-webkit-slider-thumb {
|
|
12694
|
+
appearance: none;
|
|
12695
|
+
height: ${thumbSize};
|
|
12696
|
+
width: ${thumbSize};
|
|
12697
|
+
border-radius: 50%;
|
|
12698
|
+
background: var(--accent-dark);
|
|
12699
|
+
cursor: pointer;
|
|
12700
|
+
border: 2px solid var(--white);
|
|
12701
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
12702
|
+
position: relative;
|
|
12703
|
+
z-index: 2;
|
|
12704
|
+
|
|
12705
|
+
&:hover {
|
|
12706
|
+
background: var(--accent-dark-hover);
|
|
12707
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
12708
|
+
}
|
|
12709
|
+
|
|
12710
|
+
&:active {
|
|
12711
|
+
background: var(--accent-dark-active);
|
|
12712
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
12713
|
+
}
|
|
12714
|
+
}
|
|
12715
|
+
|
|
12716
|
+
&:disabled::-webkit-slider-thumb {
|
|
12717
|
+
${disabledThumbStyles}
|
|
12718
|
+
|
|
12719
|
+
&:hover,
|
|
12720
|
+
&:active {
|
|
12721
|
+
${disabledThumbStyles}
|
|
12722
|
+
}
|
|
12723
|
+
}
|
|
12724
|
+
|
|
12725
|
+
/* Firefox */
|
|
12726
|
+
&::-moz-range-track {
|
|
12727
|
+
width: 100%;
|
|
12728
|
+
height: 4px;
|
|
12729
|
+
background: transparent;
|
|
12730
|
+
border-radius: var(--rounded-sm);
|
|
12731
|
+
border: none;
|
|
12732
|
+
}
|
|
12733
|
+
|
|
12734
|
+
&::-moz-range-thumb {
|
|
12735
|
+
height: ${thumbSize};
|
|
12736
|
+
width: ${thumbSize};
|
|
12737
|
+
border-radius: 50%;
|
|
12738
|
+
background: var(--accent-dark);
|
|
12739
|
+
cursor: pointer;
|
|
12740
|
+
border: 2px solid var(--white);
|
|
12741
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
12742
|
+
|
|
12743
|
+
&:hover {
|
|
12744
|
+
background: var(--accent-dark-hover);
|
|
12745
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
12746
|
+
}
|
|
12747
|
+
|
|
12748
|
+
&:active {
|
|
12749
|
+
background: var(--accent-dark-active);
|
|
12750
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
12751
|
+
}
|
|
12752
|
+
}
|
|
12753
|
+
|
|
12754
|
+
&:disabled::-moz-range-thumb {
|
|
12755
|
+
${disabledThumbStyles}
|
|
12756
|
+
|
|
12757
|
+
&:hover,
|
|
12758
|
+
&:active {
|
|
12759
|
+
${disabledThumbStyles}
|
|
12760
|
+
}
|
|
12761
|
+
}
|
|
12762
|
+
|
|
12763
|
+
/* Focus states */
|
|
12764
|
+
&:focus {
|
|
12765
|
+
outline: none;
|
|
12766
|
+
}
|
|
12767
|
+
|
|
12768
|
+
&:focus::-webkit-slider-thumb {
|
|
12769
|
+
box-shadow:
|
|
12770
|
+
0 2px 4px rgba(0, 0, 0, 0.1),
|
|
12771
|
+
0 0 0 3px var(--accent-light);
|
|
12772
|
+
}
|
|
12773
|
+
|
|
12774
|
+
&:focus::-moz-range-thumb {
|
|
12775
|
+
box-shadow:
|
|
12776
|
+
0 2px 4px rgba(0, 0, 0, 0.1),
|
|
12777
|
+
0 0 0 3px var(--accent-light);
|
|
12778
|
+
}
|
|
12779
|
+
`;
|
|
12780
|
+
var labelsContainer = css94`
|
|
12781
|
+
position: relative;
|
|
12782
|
+
height: 1.5rem;
|
|
12783
|
+
width: 100%;
|
|
12784
|
+
`;
|
|
12785
|
+
var label = css94`
|
|
12786
|
+
position: absolute;
|
|
12787
|
+
top: 0;
|
|
12788
|
+
font-size: var(--text-sm);
|
|
12789
|
+
color: var(--gray-500);
|
|
12790
|
+
text-align: center;
|
|
12791
|
+
|
|
12792
|
+
/* Truncation for long labels */
|
|
12793
|
+
white-space: nowrap;
|
|
12794
|
+
overflow: hidden;
|
|
12795
|
+
text-overflow: ellipsis;
|
|
12796
|
+
|
|
12797
|
+
/* Set max width to prevent labels from extending too far */
|
|
12798
|
+
max-width: 25%;
|
|
12799
|
+
|
|
12800
|
+
/* Default centering transform */
|
|
12801
|
+
transform: translateX(-50%);
|
|
12802
|
+
|
|
12803
|
+
/* Smooth transitions for label changes */
|
|
12804
|
+
transition:
|
|
12805
|
+
opacity var(--duration-fast) var(--timing-ease-out),
|
|
12806
|
+
transform var(--duration-fast) var(--timing-ease-out);
|
|
12807
|
+
|
|
12808
|
+
/* Handle edge cases for first and last labels */
|
|
12809
|
+
&[data-position='0'] {
|
|
12810
|
+
transform: translateX(0);
|
|
12811
|
+
text-align: left;
|
|
12812
|
+
max-width: 50%;
|
|
12813
|
+
}
|
|
12814
|
+
|
|
12815
|
+
&[data-position='100'] {
|
|
12816
|
+
transform: translateX(-100%);
|
|
12817
|
+
text-align: right;
|
|
12818
|
+
max-width: 50%;
|
|
12819
|
+
}
|
|
12820
|
+
|
|
12821
|
+
/* Handle single label case by centering it */
|
|
12822
|
+
&:only-child {
|
|
12823
|
+
left: 50% !important;
|
|
12824
|
+
transform: translateX(-50%);
|
|
12825
|
+
text-align: center;
|
|
12826
|
+
max-width: 100%;
|
|
12827
|
+
}
|
|
12828
|
+
`;
|
|
12829
|
+
var numberInputContainer = css94`
|
|
12830
|
+
flex-shrink: 0;
|
|
12831
|
+
min-width: 2rem;
|
|
12832
|
+
margin-top: var(--spacing-sm);
|
|
12833
|
+
`;
|
|
12834
|
+
var numberInput2 = css94`
|
|
12835
|
+
appearance: none;
|
|
12836
|
+
background-color: var(--white);
|
|
12837
|
+
border: 1px solid var(--gray-300);
|
|
12838
|
+
border-radius: var(--rounded-sm);
|
|
12839
|
+
color: var(--gray-700);
|
|
12840
|
+
padding: var(--spacing-sm);
|
|
12841
|
+
width: 100%;
|
|
12842
|
+
font-size: var(--text-sm);
|
|
12843
|
+
text-align: center;
|
|
12844
|
+
transition:
|
|
12845
|
+
background var(--duration-fast) var(--timing-ease-out),
|
|
12846
|
+
border-color var(--duration-fast) var(--timing-ease-out),
|
|
12847
|
+
color var(--duration-fast) var(--timing-ease-out),
|
|
12848
|
+
box-shadow var(--duration-fast) var(--timing-ease-out);
|
|
12849
|
+
|
|
12850
|
+
&::placeholder {
|
|
12851
|
+
color: var(--gray-400);
|
|
12852
|
+
}
|
|
12853
|
+
|
|
12854
|
+
&:hover {
|
|
12855
|
+
border-color: var(--accent-dark-hover);
|
|
12856
|
+
}
|
|
12857
|
+
|
|
12858
|
+
&:focus {
|
|
12859
|
+
border-color: var(--accent-dark-active);
|
|
12860
|
+
box-shadow: var(--elevation-100);
|
|
12861
|
+
outline: none;
|
|
12862
|
+
}
|
|
12863
|
+
|
|
12864
|
+
&:disabled {
|
|
12865
|
+
cursor: not-allowed;
|
|
12866
|
+
color: var(--gray-300);
|
|
12867
|
+
border-color: var(--gray-300);
|
|
12868
|
+
background-color: var(--gray-50);
|
|
12869
|
+
}
|
|
12870
|
+
|
|
12871
|
+
/* Hide number input spinners */
|
|
12872
|
+
&::-webkit-outer-spin-button,
|
|
12873
|
+
&::-webkit-inner-spin-button {
|
|
12874
|
+
appearance: none;
|
|
12875
|
+
margin: 0;
|
|
12876
|
+
}
|
|
12877
|
+
|
|
12878
|
+
&[type='number'] {
|
|
12879
|
+
-moz-appearance: textfield;
|
|
12880
|
+
}
|
|
12881
|
+
`;
|
|
12882
|
+
|
|
12883
|
+
// src/components/Slider/SliderLabels.tsx
|
|
12884
|
+
import { jsx as jsx127 } from "@emotion/react/jsx-runtime";
|
|
12885
|
+
function estimateLabelWidth(text) {
|
|
12886
|
+
const fontSize = 14;
|
|
12887
|
+
const avgCharWidthRatio = 0.7;
|
|
12888
|
+
const avgCharWidth = fontSize * avgCharWidthRatio;
|
|
12889
|
+
const basePadding = 24;
|
|
12890
|
+
return Math.ceil(text.length * avgCharWidth + basePadding);
|
|
12891
|
+
}
|
|
12892
|
+
function generateSymmetricIndices(totalCount) {
|
|
12893
|
+
if (totalCount <= 0) return [];
|
|
12894
|
+
if (totalCount === 1) return [[0]];
|
|
12895
|
+
if (totalCount === 2) return [[0, totalCount - 1]];
|
|
12896
|
+
const levels = [];
|
|
12897
|
+
levels.push([0, totalCount - 1]);
|
|
12898
|
+
if (totalCount % 2 === 1) {
|
|
12899
|
+
levels.push([Math.floor(totalCount / 2)]);
|
|
12900
|
+
} else {
|
|
12901
|
+
const mid1 = Math.floor(totalCount / 2) - 1;
|
|
12902
|
+
const mid2 = Math.floor(totalCount / 2);
|
|
12903
|
+
levels.push([mid1, mid2]);
|
|
12904
|
+
}
|
|
12905
|
+
let currentDivisions = 4;
|
|
12906
|
+
while (currentDivisions <= totalCount) {
|
|
12907
|
+
const newIndices = [];
|
|
12908
|
+
for (let i = 1; i < currentDivisions; i += 2) {
|
|
12909
|
+
const index = Math.round(i / currentDivisions * (totalCount - 1));
|
|
12910
|
+
if (index > 0 && index < totalCount - 1) {
|
|
12911
|
+
newIndices.push(index);
|
|
12912
|
+
}
|
|
12913
|
+
}
|
|
12914
|
+
if (newIndices.length > 0) {
|
|
12915
|
+
levels.push(newIndices);
|
|
12916
|
+
}
|
|
12917
|
+
currentDivisions *= 2;
|
|
12918
|
+
}
|
|
12919
|
+
return levels;
|
|
12920
|
+
}
|
|
12921
|
+
function labelsWouldOverlap(pos1, width1, pos2, width2, containerWidth) {
|
|
12922
|
+
const pixelPos1 = pos1 / 100 * containerWidth;
|
|
12923
|
+
const pixelPos2 = pos2 / 100 * containerWidth;
|
|
12924
|
+
const buffer = 8;
|
|
12925
|
+
const left1 = pixelPos1 - width1 / 2 - buffer / 2;
|
|
12926
|
+
const right1 = pixelPos1 + width1 / 2 + buffer / 2;
|
|
12927
|
+
const left2 = pixelPos2 - width2 / 2 - buffer / 2;
|
|
12928
|
+
const right2 = pixelPos2 + width2 / 2 + buffer / 2;
|
|
12929
|
+
return !(right1 < left2 || right2 < left1);
|
|
12930
|
+
}
|
|
12931
|
+
function calculateLabelVisibility(ticks, currentValue, containerWidth) {
|
|
12932
|
+
const labelsWithTicks = ticks.map((tick, index) => ({ tick, index })).filter(({ tick }) => tick.label);
|
|
12933
|
+
if (labelsWithTicks.length === 0) {
|
|
12934
|
+
return [];
|
|
12935
|
+
}
|
|
12936
|
+
const currentSelectionIndex = labelsWithTicks.findIndex(({ tick }) => tick.position === currentValue);
|
|
12937
|
+
const distributionLevels = generateSymmetricIndices(labelsWithTicks.length);
|
|
12938
|
+
let visibleIndices = new Set(distributionLevels[0] || []);
|
|
12939
|
+
if (currentSelectionIndex !== -1) {
|
|
12940
|
+
visibleIndices.add(currentSelectionIndex);
|
|
12941
|
+
}
|
|
12942
|
+
for (let levelIndex = 1; levelIndex < distributionLevels.length; levelIndex++) {
|
|
12943
|
+
const candidateIndices = new Set(visibleIndices);
|
|
12944
|
+
for (const index of distributionLevels[levelIndex]) {
|
|
12945
|
+
candidateIndices.add(index);
|
|
12946
|
+
}
|
|
12947
|
+
const maxLabelsForWidth = Math.max(2, Math.floor(containerWidth / 100));
|
|
12948
|
+
if (candidateIndices.size > maxLabelsForWidth) {
|
|
12949
|
+
break;
|
|
12950
|
+
}
|
|
12951
|
+
const candidateArray = Array.from(candidateIndices).sort((a, b) => a - b);
|
|
12952
|
+
let hasOverlap = false;
|
|
12953
|
+
for (let i = 0; i < candidateArray.length - 1; i++) {
|
|
12954
|
+
const curr = labelsWithTicks[candidateArray[i]];
|
|
12955
|
+
const next = labelsWithTicks[candidateArray[i + 1]];
|
|
12956
|
+
const currWidth = estimateLabelWidth(curr.tick.label || "");
|
|
12957
|
+
const nextWidth = estimateLabelWidth(next.tick.label || "");
|
|
12958
|
+
if (labelsWouldOverlap(curr.tick.percentage, currWidth, next.tick.percentage, nextWidth, containerWidth)) {
|
|
12959
|
+
hasOverlap = true;
|
|
12960
|
+
break;
|
|
12961
|
+
}
|
|
12962
|
+
}
|
|
12963
|
+
if (!hasOverlap) {
|
|
12964
|
+
visibleIndices = candidateIndices;
|
|
12965
|
+
} else {
|
|
12966
|
+
break;
|
|
12967
|
+
}
|
|
12968
|
+
}
|
|
12969
|
+
if (currentSelectionIndex !== -1 && visibleIndices.has(currentSelectionIndex)) {
|
|
12970
|
+
const currentTick = labelsWithTicks[currentSelectionIndex].tick;
|
|
12971
|
+
const currentWidth = estimateLabelWidth(currentTick.label || "");
|
|
12972
|
+
const sortedVisible = Array.from(visibleIndices).sort((a, b) => a - b);
|
|
12973
|
+
const currentIndexInVisible = sortedVisible.indexOf(currentSelectionIndex);
|
|
12974
|
+
if (currentIndexInVisible > 0) {
|
|
12975
|
+
const leftIndex = sortedVisible[currentIndexInVisible - 1];
|
|
12976
|
+
const leftTick = labelsWithTicks[leftIndex].tick;
|
|
12977
|
+
const leftWidth = estimateLabelWidth(leftTick.label || "");
|
|
12978
|
+
if (labelsWouldOverlap(
|
|
12979
|
+
leftTick.percentage,
|
|
12980
|
+
leftWidth,
|
|
12981
|
+
currentTick.percentage,
|
|
12982
|
+
currentWidth,
|
|
12983
|
+
containerWidth
|
|
12984
|
+
)) {
|
|
12985
|
+
visibleIndices.delete(leftIndex);
|
|
12986
|
+
}
|
|
12987
|
+
}
|
|
12988
|
+
if (currentIndexInVisible < sortedVisible.length - 1) {
|
|
12989
|
+
const rightIndex = sortedVisible[currentIndexInVisible + 1];
|
|
12990
|
+
const rightTick = labelsWithTicks[rightIndex].tick;
|
|
12991
|
+
const rightWidth = estimateLabelWidth(rightTick.label || "");
|
|
12992
|
+
if (labelsWouldOverlap(
|
|
12993
|
+
currentTick.percentage,
|
|
12994
|
+
currentWidth,
|
|
12995
|
+
rightTick.percentage,
|
|
12996
|
+
rightWidth,
|
|
12997
|
+
containerWidth
|
|
12998
|
+
)) {
|
|
12999
|
+
visibleIndices.delete(rightIndex);
|
|
13000
|
+
}
|
|
13001
|
+
}
|
|
13002
|
+
}
|
|
13003
|
+
return labelsWithTicks.map(({ index }, arrayIndex) => ({
|
|
13004
|
+
tickIndex: index,
|
|
13005
|
+
isVisible: visibleIndices.has(arrayIndex),
|
|
13006
|
+
priority: visibleIndices.has(arrayIndex) ? 1 : 10
|
|
13007
|
+
// Simple priority for visible vs hidden
|
|
13008
|
+
}));
|
|
13009
|
+
}
|
|
13010
|
+
function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
13011
|
+
const containerRef = useRef9(null);
|
|
13012
|
+
const [measuredWidth, setMeasuredWidth] = useState15(containerWidth);
|
|
13013
|
+
useEffect15(() => {
|
|
13014
|
+
if (containerRef.current) {
|
|
13015
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
13016
|
+
for (const entry of entries) {
|
|
13017
|
+
setMeasuredWidth(entry.contentRect.width);
|
|
13018
|
+
}
|
|
13019
|
+
});
|
|
13020
|
+
resizeObserver.observe(containerRef.current);
|
|
13021
|
+
setMeasuredWidth(containerRef.current.offsetWidth);
|
|
13022
|
+
return () => resizeObserver.disconnect();
|
|
13023
|
+
}
|
|
13024
|
+
}, []);
|
|
13025
|
+
const labelVisibilities = calculateLabelVisibility(ticks, currentValue, measuredWidth);
|
|
13026
|
+
const visibilityMap = new Map(labelVisibilities.map((lv) => [lv.tickIndex, lv.isVisible]));
|
|
13027
|
+
return /* @__PURE__ */ jsx127("div", { ref: containerRef, css: labelsContainer, children: ticks.map((tick, index) => ({ tick, index })).filter(({ tick }) => tick.label).map(({ tick, index }) => {
|
|
13028
|
+
var _a;
|
|
13029
|
+
const isVisible = (_a = visibilityMap.get(index)) != null ? _a : false;
|
|
13030
|
+
return /* @__PURE__ */ jsx127(
|
|
13031
|
+
"div",
|
|
13032
|
+
{
|
|
13033
|
+
css: label,
|
|
13034
|
+
style: {
|
|
13035
|
+
left: `${tick.percentage}%`,
|
|
13036
|
+
opacity: isVisible ? 1 : 0,
|
|
13037
|
+
pointerEvents: isVisible ? "auto" : "none"
|
|
13038
|
+
},
|
|
13039
|
+
"data-position": tick.percentage === 0 ? "0" : tick.percentage === 100 ? "100" : void 0,
|
|
13040
|
+
title: tick.label,
|
|
13041
|
+
children: tick.label
|
|
13042
|
+
},
|
|
13043
|
+
`label-${index}-${tick.position}`
|
|
13044
|
+
);
|
|
13045
|
+
}) });
|
|
13046
|
+
}
|
|
13047
|
+
|
|
13048
|
+
// src/components/Slider/Slider.tsx
|
|
13049
|
+
import { jsx as jsx128, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
|
|
13050
|
+
var Slider = forwardRef25(
|
|
13051
|
+
({
|
|
13052
|
+
value,
|
|
13053
|
+
onChange,
|
|
13054
|
+
onBlur,
|
|
13055
|
+
min: propMin,
|
|
13056
|
+
max: propMax,
|
|
13057
|
+
step: propStep,
|
|
13058
|
+
options,
|
|
13059
|
+
showNumberInput = !options,
|
|
13060
|
+
// Default: show for numeric mode, hide for options mode
|
|
13061
|
+
disabled: disabled2 = false,
|
|
13062
|
+
"aria-label": ariaLabel,
|
|
13063
|
+
id,
|
|
13064
|
+
name
|
|
13065
|
+
}, ref) => {
|
|
13066
|
+
const isOptionsMode = Boolean(options && options.length > 0);
|
|
13067
|
+
const { min, max, step, smallTicks, largeTicks } = useMemo6(() => {
|
|
13068
|
+
if (isOptionsMode && options) {
|
|
13069
|
+
return {
|
|
13070
|
+
min: 0,
|
|
13071
|
+
max: options.length - 1,
|
|
13072
|
+
step: 1,
|
|
13073
|
+
smallTicks: [],
|
|
13074
|
+
// No small ticks for options mode
|
|
13075
|
+
largeTicks: options.map((option, index) => ({
|
|
13076
|
+
position: index,
|
|
13077
|
+
percentage: index / (options.length - 1) * 100,
|
|
13078
|
+
label: option.text,
|
|
13079
|
+
isLarge: true
|
|
13080
|
+
}))
|
|
13081
|
+
};
|
|
13082
|
+
}
|
|
13083
|
+
const numericMin = propMin != null ? propMin : 0;
|
|
13084
|
+
const numericMax = propMax != null ? propMax : 100;
|
|
13085
|
+
const numericStep = propStep != null ? propStep : numericMax - numericMin > 20 ? Math.ceil((numericMax - numericMin) / 20) : 1;
|
|
13086
|
+
const range = numericMax - numericMin;
|
|
13087
|
+
const totalSteps = Math.floor(range / numericStep);
|
|
13088
|
+
const smallTicks2 = [];
|
|
13089
|
+
if (totalSteps <= 100) {
|
|
13090
|
+
for (let i = 0; i <= totalSteps; i++) {
|
|
13091
|
+
const position = numericMin + i * numericStep;
|
|
13092
|
+
const percentage = (position - numericMin) / range * 100;
|
|
13093
|
+
smallTicks2.push({
|
|
13094
|
+
position,
|
|
13095
|
+
percentage,
|
|
13096
|
+
isLarge: false
|
|
13097
|
+
});
|
|
13098
|
+
}
|
|
13099
|
+
} else {
|
|
13100
|
+
const tickInterval = Math.ceil(totalSteps / 100);
|
|
13101
|
+
for (let i = 0; i <= totalSteps; i += tickInterval) {
|
|
13102
|
+
const position = numericMin + i * numericStep;
|
|
13103
|
+
const percentage = (position - numericMin) / range * 100;
|
|
13104
|
+
smallTicks2.push({
|
|
13105
|
+
position,
|
|
13106
|
+
percentage,
|
|
13107
|
+
isLarge: false
|
|
13108
|
+
});
|
|
13109
|
+
}
|
|
13110
|
+
}
|
|
13111
|
+
const largeTicks2 = [
|
|
13112
|
+
{ position: numericMin, percentage: 0, label: numericMin.toString(), isLarge: true },
|
|
13113
|
+
{ position: numericMax, percentage: 100, label: numericMax.toString(), isLarge: true }
|
|
13114
|
+
];
|
|
13115
|
+
if (range >= 20) {
|
|
13116
|
+
const middlePosition = numericMin + range / 2;
|
|
13117
|
+
largeTicks2.push({
|
|
13118
|
+
position: middlePosition,
|
|
13119
|
+
percentage: 50,
|
|
13120
|
+
label: Math.round(middlePosition).toString(),
|
|
13121
|
+
isLarge: true
|
|
13122
|
+
});
|
|
13123
|
+
}
|
|
13124
|
+
return {
|
|
13125
|
+
min: numericMin,
|
|
13126
|
+
max: numericMax,
|
|
13127
|
+
step: numericStep,
|
|
13128
|
+
smallTicks: smallTicks2,
|
|
13129
|
+
largeTicks: largeTicks2
|
|
13130
|
+
};
|
|
13131
|
+
}, [isOptionsMode, options, propMin, propMax, propStep]);
|
|
13132
|
+
const clampedValue = Math.min(Math.max(value, min), max);
|
|
13133
|
+
const handleSliderChange = useCallback8(
|
|
13134
|
+
(event) => {
|
|
13135
|
+
const newValue = Number(event.target.value);
|
|
13136
|
+
onChange(newValue);
|
|
13137
|
+
},
|
|
13138
|
+
[onChange]
|
|
13139
|
+
);
|
|
13140
|
+
const handleNumberInputChange = useCallback8(
|
|
13141
|
+
(event) => {
|
|
13142
|
+
const newValue = event.target.value === "" ? min : Number(event.target.value);
|
|
13143
|
+
onChange(newValue);
|
|
13144
|
+
},
|
|
13145
|
+
[onChange, min]
|
|
13146
|
+
);
|
|
13147
|
+
const fillPercentage = (clampedValue - min) / (max - min) * 100;
|
|
13148
|
+
return /* @__PURE__ */ jsxs84("div", { css: container3, children: [
|
|
13149
|
+
/* @__PURE__ */ jsxs84("div", { css: sliderContainer, children: [
|
|
13150
|
+
/* @__PURE__ */ jsxs84("div", { css: sliderTrackContainer, children: [
|
|
13151
|
+
/* @__PURE__ */ jsxs84("div", { css: progressTrack, children: [
|
|
13152
|
+
/* @__PURE__ */ jsx128("div", { css: progressTrackBackground }),
|
|
13153
|
+
/* @__PURE__ */ jsx128("div", { css: progressTrackFill, style: { width: `${fillPercentage}%` } })
|
|
13154
|
+
] }),
|
|
13155
|
+
/* @__PURE__ */ jsx128(
|
|
13156
|
+
"input",
|
|
13157
|
+
{
|
|
13158
|
+
ref,
|
|
13159
|
+
type: "range",
|
|
13160
|
+
id,
|
|
13161
|
+
name,
|
|
13162
|
+
min,
|
|
13163
|
+
max,
|
|
13164
|
+
step,
|
|
13165
|
+
value: clampedValue,
|
|
13166
|
+
onChange: handleSliderChange,
|
|
13167
|
+
onBlur,
|
|
13168
|
+
disabled: disabled2,
|
|
13169
|
+
"aria-label": ariaLabel,
|
|
13170
|
+
css: slider
|
|
13171
|
+
}
|
|
13172
|
+
)
|
|
13173
|
+
] }),
|
|
13174
|
+
/* @__PURE__ */ jsxs84("div", { css: tickMarksContainer, children: [
|
|
13175
|
+
smallTicks.map((tick, index) => /* @__PURE__ */ jsx128("div", { css: tickMark, style: { left: `${tick.percentage}%` } }, `small-${index}`)),
|
|
13176
|
+
largeTicks.map((tick, index) => /* @__PURE__ */ jsx128(
|
|
13177
|
+
"div",
|
|
13178
|
+
{
|
|
13179
|
+
css: largeTickMark,
|
|
13180
|
+
style: { left: `${tick.percentage}%` }
|
|
13181
|
+
},
|
|
13182
|
+
`large-${index}`
|
|
13183
|
+
))
|
|
13184
|
+
] }),
|
|
13185
|
+
largeTicks.some((tick) => tick.label) && /* @__PURE__ */ jsx128(SliderLabels, { ticks: largeTicks, currentValue: clampedValue })
|
|
13186
|
+
] }),
|
|
13187
|
+
showNumberInput && !isOptionsMode && /* @__PURE__ */ jsx128("div", { css: numberInputContainer, children: /* @__PURE__ */ jsx128(
|
|
13188
|
+
"input",
|
|
13189
|
+
{
|
|
13190
|
+
type: "number",
|
|
13191
|
+
value: clampedValue,
|
|
13192
|
+
onChange: handleNumberInputChange,
|
|
13193
|
+
onBlur,
|
|
13194
|
+
disabled: disabled2,
|
|
13195
|
+
min,
|
|
13196
|
+
max,
|
|
13197
|
+
step,
|
|
13198
|
+
css: numberInput2
|
|
13199
|
+
}
|
|
13200
|
+
) })
|
|
13201
|
+
] });
|
|
13202
|
+
}
|
|
13203
|
+
);
|
|
13204
|
+
Slider.displayName = "Slider";
|
|
13205
|
+
|
|
13206
|
+
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
13207
|
+
import { jsx as jsx129 } from "@emotion/react/jsx-runtime";
|
|
13208
|
+
var ParameterNumberSlider = forwardRef26(
|
|
13209
|
+
(props, ref) => {
|
|
13210
|
+
const { shellProps, innerProps } = extractParameterProps(props);
|
|
13211
|
+
return /* @__PURE__ */ jsx129(ParameterShell, { "data-testid": "parameter-number-slider", ...shellProps, children: /* @__PURE__ */ jsx129(ParameterNumberSliderInner, { ref, ...innerProps }) });
|
|
13212
|
+
}
|
|
13213
|
+
);
|
|
13214
|
+
var ParameterNumberSliderInner = forwardRef26(({ ...props }, ref) => {
|
|
13215
|
+
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
13216
|
+
return /* @__PURE__ */ jsx129(
|
|
13217
|
+
Slider,
|
|
13218
|
+
{
|
|
13219
|
+
ref,
|
|
13220
|
+
id,
|
|
13221
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
13222
|
+
...props
|
|
13223
|
+
}
|
|
13224
|
+
);
|
|
13225
|
+
});
|
|
13226
|
+
ParameterNumberSlider.displayName = "ParameterNumberSlider";
|
|
13227
|
+
ParameterNumberSliderInner.displayName = "ParameterNumberSliderInner";
|
|
13228
|
+
|
|
12527
13229
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
12528
|
-
import { css as
|
|
13230
|
+
import { css as css100 } from "@emotion/react";
|
|
12529
13231
|
import { ListItemNode, ListNode as ListNode3 } from "@lexical/list";
|
|
12530
13232
|
import {
|
|
12531
13233
|
CODE,
|
|
@@ -12669,7 +13371,7 @@ var defaultParameterConfiguration = {
|
|
|
12669
13371
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
12670
13372
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
12671
13373
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
12672
|
-
import { useEffect as
|
|
13374
|
+
import { useEffect as useEffect24, useState as useState21 } from "react";
|
|
12673
13375
|
|
|
12674
13376
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
12675
13377
|
import { CodeNode } from "@lexical/code";
|
|
@@ -12690,10 +13392,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
12690
13392
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
12691
13393
|
import { mergeRegister } from "@lexical/utils";
|
|
12692
13394
|
import { ParagraphNode } from "lexical";
|
|
12693
|
-
import { useEffect as
|
|
13395
|
+
import { useEffect as useEffect16 } from "react";
|
|
12694
13396
|
function DisableStylesPlugin() {
|
|
12695
13397
|
const [editor] = useLexicalComposerContext();
|
|
12696
|
-
|
|
13398
|
+
useEffect16(() => {
|
|
12697
13399
|
return mergeRegister(
|
|
12698
13400
|
// Disable text alignment on paragraph nodes
|
|
12699
13401
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -12707,23 +13409,23 @@ function DisableStylesPlugin() {
|
|
|
12707
13409
|
}
|
|
12708
13410
|
|
|
12709
13411
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
12710
|
-
import { css as
|
|
12711
|
-
var textBold =
|
|
13412
|
+
import { css as css95 } from "@emotion/css";
|
|
13413
|
+
var textBold = css95`
|
|
12712
13414
|
font-weight: 700;
|
|
12713
13415
|
`;
|
|
12714
|
-
var textItalic =
|
|
13416
|
+
var textItalic = css95`
|
|
12715
13417
|
font-style: italic;
|
|
12716
13418
|
`;
|
|
12717
|
-
var textUnderline =
|
|
13419
|
+
var textUnderline = css95`
|
|
12718
13420
|
text-decoration: underline;
|
|
12719
13421
|
`;
|
|
12720
|
-
var textStrikethrough =
|
|
13422
|
+
var textStrikethrough = css95`
|
|
12721
13423
|
text-decoration: line-through;
|
|
12722
13424
|
`;
|
|
12723
|
-
var textUnderlineStrikethrough =
|
|
13425
|
+
var textUnderlineStrikethrough = css95`
|
|
12724
13426
|
text-decoration: underline line-through;
|
|
12725
13427
|
`;
|
|
12726
|
-
var textCode =
|
|
13428
|
+
var textCode = css95`
|
|
12727
13429
|
background-color: var(--gray-100);
|
|
12728
13430
|
border-radius: var(--rounded-sm);
|
|
12729
13431
|
display: inline-block;
|
|
@@ -12734,68 +13436,68 @@ var textCode = css94`
|
|
|
12734
13436
|
padding-left: var(--spacing-xs);
|
|
12735
13437
|
padding-right: var(--spacing-xs);
|
|
12736
13438
|
`;
|
|
12737
|
-
var textSuperscript =
|
|
13439
|
+
var textSuperscript = css95`
|
|
12738
13440
|
vertical-align: super;
|
|
12739
13441
|
font-size: smaller;
|
|
12740
13442
|
`;
|
|
12741
|
-
var textSubscript =
|
|
13443
|
+
var textSubscript = css95`
|
|
12742
13444
|
vertical-align: sub;
|
|
12743
13445
|
font-size: smaller;
|
|
12744
13446
|
`;
|
|
12745
|
-
var linkElement =
|
|
13447
|
+
var linkElement = css95`
|
|
12746
13448
|
${link}
|
|
12747
13449
|
${linkColorDefault}
|
|
12748
13450
|
text-decoration: underline;
|
|
12749
13451
|
`;
|
|
12750
|
-
var h12 =
|
|
13452
|
+
var h12 = css95`
|
|
12751
13453
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
12752
13454
|
`;
|
|
12753
|
-
var h22 =
|
|
13455
|
+
var h22 = css95`
|
|
12754
13456
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
12755
13457
|
`;
|
|
12756
|
-
var h32 =
|
|
13458
|
+
var h32 = css95`
|
|
12757
13459
|
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
12758
13460
|
`;
|
|
12759
|
-
var h42 =
|
|
13461
|
+
var h42 = css95`
|
|
12760
13462
|
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
12761
13463
|
`;
|
|
12762
|
-
var h52 =
|
|
13464
|
+
var h52 = css95`
|
|
12763
13465
|
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
12764
13466
|
`;
|
|
12765
|
-
var h62 =
|
|
13467
|
+
var h62 = css95`
|
|
12766
13468
|
font-size: var(--fs-base);
|
|
12767
13469
|
`;
|
|
12768
|
-
var heading1Element =
|
|
13470
|
+
var heading1Element = css95`
|
|
12769
13471
|
${h12}
|
|
12770
13472
|
${commonHeadingAttr(true)}
|
|
12771
13473
|
${commonLineHeight}
|
|
12772
13474
|
`;
|
|
12773
|
-
var heading2Element =
|
|
13475
|
+
var heading2Element = css95`
|
|
12774
13476
|
${h22}
|
|
12775
13477
|
${commonHeadingAttr(true)}
|
|
12776
13478
|
${commonLineHeight}
|
|
12777
13479
|
`;
|
|
12778
|
-
var heading3Element =
|
|
13480
|
+
var heading3Element = css95`
|
|
12779
13481
|
${h32}
|
|
12780
13482
|
${commonHeadingAttr(true)}
|
|
12781
13483
|
${commonLineHeight}
|
|
12782
13484
|
`;
|
|
12783
|
-
var heading4Element =
|
|
13485
|
+
var heading4Element = css95`
|
|
12784
13486
|
${h42}
|
|
12785
13487
|
${commonHeadingAttr(true)}
|
|
12786
13488
|
${commonLineHeight}
|
|
12787
13489
|
`;
|
|
12788
|
-
var heading5Element =
|
|
13490
|
+
var heading5Element = css95`
|
|
12789
13491
|
${h52}
|
|
12790
13492
|
${commonHeadingAttr(true)}
|
|
12791
13493
|
${commonLineHeight}
|
|
12792
13494
|
`;
|
|
12793
|
-
var heading6Element =
|
|
13495
|
+
var heading6Element = css95`
|
|
12794
13496
|
${h62}
|
|
12795
13497
|
${commonHeadingAttr(true)}
|
|
12796
13498
|
${commonLineHeight}
|
|
12797
13499
|
`;
|
|
12798
|
-
var paragraphElement =
|
|
13500
|
+
var paragraphElement = css95`
|
|
12799
13501
|
line-height: 1.5;
|
|
12800
13502
|
margin-bottom: var(--spacing-base);
|
|
12801
13503
|
|
|
@@ -12803,7 +13505,7 @@ var paragraphElement = css94`
|
|
|
12803
13505
|
margin-bottom: 0;
|
|
12804
13506
|
}
|
|
12805
13507
|
`;
|
|
12806
|
-
var orderedListElement =
|
|
13508
|
+
var orderedListElement = css95`
|
|
12807
13509
|
${commonLineHeight}
|
|
12808
13510
|
display: block;
|
|
12809
13511
|
list-style: decimal;
|
|
@@ -12832,7 +13534,7 @@ var orderedListElement = css94`
|
|
|
12832
13534
|
}
|
|
12833
13535
|
}
|
|
12834
13536
|
`;
|
|
12835
|
-
var unorderedListElement =
|
|
13537
|
+
var unorderedListElement = css95`
|
|
12836
13538
|
${commonLineHeight}
|
|
12837
13539
|
display: block;
|
|
12838
13540
|
list-style: disc;
|
|
@@ -12853,13 +13555,13 @@ var unorderedListElement = css94`
|
|
|
12853
13555
|
}
|
|
12854
13556
|
}
|
|
12855
13557
|
`;
|
|
12856
|
-
var listItemElement =
|
|
13558
|
+
var listItemElement = css95`
|
|
12857
13559
|
margin-left: var(--spacing-md);
|
|
12858
13560
|
`;
|
|
12859
|
-
var nestedListItemElement =
|
|
13561
|
+
var nestedListItemElement = css95`
|
|
12860
13562
|
list-style-type: none;
|
|
12861
13563
|
`;
|
|
12862
|
-
var blockquoteElement =
|
|
13564
|
+
var blockquoteElement = css95`
|
|
12863
13565
|
border-left: 0.25rem solid var(--gray-300);
|
|
12864
13566
|
color: var(--gray-600);
|
|
12865
13567
|
margin-bottom: var(--spacing-base);
|
|
@@ -12869,7 +13571,7 @@ var blockquoteElement = css94`
|
|
|
12869
13571
|
margin-bottom: 0;
|
|
12870
13572
|
}
|
|
12871
13573
|
`;
|
|
12872
|
-
var codeElement =
|
|
13574
|
+
var codeElement = css95`
|
|
12873
13575
|
background-color: var(--gray-100);
|
|
12874
13576
|
border-radius: var(--rounded-sm);
|
|
12875
13577
|
display: block;
|
|
@@ -12884,7 +13586,7 @@ var codeElement = css94`
|
|
|
12884
13586
|
margin-bottom: 0;
|
|
12885
13587
|
}
|
|
12886
13588
|
`;
|
|
12887
|
-
var tableElement =
|
|
13589
|
+
var tableElement = css95`
|
|
12888
13590
|
border-collapse: collapse;
|
|
12889
13591
|
border-spacing: 0;
|
|
12890
13592
|
border-color: var(--gray-300);
|
|
@@ -12897,7 +13599,7 @@ var tableElement = css94`
|
|
|
12897
13599
|
margin-bottom: 0;
|
|
12898
13600
|
}
|
|
12899
13601
|
`;
|
|
12900
|
-
var tableCellElement =
|
|
13602
|
+
var tableCellElement = css95`
|
|
12901
13603
|
background-color: var(--white);
|
|
12902
13604
|
border-color: var(--gray-300);
|
|
12903
13605
|
border-style: solid;
|
|
@@ -12933,7 +13635,7 @@ var tableCellElement = css94`
|
|
|
12933
13635
|
z-index: 1;
|
|
12934
13636
|
}
|
|
12935
13637
|
`;
|
|
12936
|
-
var tableHeaderElement =
|
|
13638
|
+
var tableHeaderElement = css95`
|
|
12937
13639
|
background-color: var(--gray-100);
|
|
12938
13640
|
border-color: var(--gray-300);
|
|
12939
13641
|
border-style: solid;
|
|
@@ -12952,10 +13654,10 @@ var tableHeaderElement = css94`
|
|
|
12952
13654
|
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
12953
13655
|
import { $insertFirst } from "@lexical/utils";
|
|
12954
13656
|
import { $createParagraphNode, $getRoot, $insertNodes } from "lexical";
|
|
12955
|
-
import { useEffect as
|
|
13657
|
+
import { useEffect as useEffect17 } from "react";
|
|
12956
13658
|
var ImprovedAssetSelectionPlugin = () => {
|
|
12957
13659
|
const [editor] = useLexicalComposerContext2();
|
|
12958
|
-
|
|
13660
|
+
useEffect17(() => {
|
|
12959
13661
|
editor.getRootElement();
|
|
12960
13662
|
const onRootClick = (event) => {
|
|
12961
13663
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -13003,7 +13705,7 @@ var ImprovedAssetSelectionPlugin = () => {
|
|
|
13003
13705
|
var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
13004
13706
|
|
|
13005
13707
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
13006
|
-
import { css as
|
|
13708
|
+
import { css as css96 } from "@emotion/react";
|
|
13007
13709
|
import { useLexicalComposerContext as useLexicalComposerContext3 } from "@lexical/react/LexicalComposerContext";
|
|
13008
13710
|
import { NodeEventPlugin } from "@lexical/react/LexicalNodeEventPlugin";
|
|
13009
13711
|
import {
|
|
@@ -13026,7 +13728,7 @@ import {
|
|
|
13026
13728
|
FOCUS_COMMAND,
|
|
13027
13729
|
PASTE_COMMAND
|
|
13028
13730
|
} from "lexical";
|
|
13029
|
-
import { useCallback as
|
|
13731
|
+
import { useCallback as useCallback9, useEffect as useEffect18, useRef as useRef10, useState as useState16 } from "react";
|
|
13030
13732
|
|
|
13031
13733
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
13032
13734
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -13086,7 +13788,7 @@ var normalizeStateForDeepEqualComparison = (editorState) => {
|
|
|
13086
13788
|
};
|
|
13087
13789
|
|
|
13088
13790
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
13089
|
-
import { Fragment as Fragment15, jsx as
|
|
13791
|
+
import { Fragment as Fragment15, jsx as jsx130, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
|
|
13090
13792
|
var isProjectMapLinkValue = (value) => {
|
|
13091
13793
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
13092
13794
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -13375,17 +14077,17 @@ var OPEN_LINK_NODE_MODAL_COMMAND = createCommand(
|
|
|
13375
14077
|
);
|
|
13376
14078
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
13377
14079
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
13378
|
-
var linkPopover =
|
|
14080
|
+
var linkPopover = css96`
|
|
13379
14081
|
position: absolute;
|
|
13380
14082
|
z-index: 11;
|
|
13381
14083
|
`;
|
|
13382
|
-
var linkPopoverContainer =
|
|
14084
|
+
var linkPopoverContainer = css96`
|
|
13383
14085
|
${Popover};
|
|
13384
14086
|
${PopoverVariantSmall};
|
|
13385
14087
|
align-items: center;
|
|
13386
14088
|
display: flex;
|
|
13387
14089
|
`;
|
|
13388
|
-
var linkPopoverAnchor =
|
|
14090
|
+
var linkPopoverAnchor = css96`
|
|
13389
14091
|
${link}
|
|
13390
14092
|
${linkColorDefault}
|
|
13391
14093
|
`;
|
|
@@ -13398,17 +14100,17 @@ function LinkNodePlugin({
|
|
|
13398
14100
|
return path;
|
|
13399
14101
|
};
|
|
13400
14102
|
const [editor] = useLexicalComposerContext3();
|
|
13401
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
13402
|
-
const linkPopoverElRef =
|
|
13403
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
13404
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
13405
|
-
|
|
14103
|
+
const [linkPopoverState, setLinkPopoverState] = useState16();
|
|
14104
|
+
const linkPopoverElRef = useRef10(null);
|
|
14105
|
+
const [isEditorFocused, setIsEditorFocused] = useState16(false);
|
|
14106
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState16(false);
|
|
14107
|
+
useEffect18(() => {
|
|
13406
14108
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
13407
14109
|
setLinkPopoverState(void 0);
|
|
13408
14110
|
return;
|
|
13409
14111
|
}
|
|
13410
14112
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
13411
|
-
|
|
14113
|
+
useEffect18(() => {
|
|
13412
14114
|
if (!editor.hasNodes([LinkNode])) {
|
|
13413
14115
|
throw new Error("LinkNode not registered on editor");
|
|
13414
14116
|
}
|
|
@@ -13512,7 +14214,7 @@ function LinkNodePlugin({
|
|
|
13512
14214
|
)
|
|
13513
14215
|
);
|
|
13514
14216
|
}, [editor, onConnectLink]);
|
|
13515
|
-
const maybeShowLinkToolbar =
|
|
14217
|
+
const maybeShowLinkToolbar = useCallback9(() => {
|
|
13516
14218
|
if (!editor.isEditable()) {
|
|
13517
14219
|
return;
|
|
13518
14220
|
}
|
|
@@ -13546,7 +14248,7 @@ function LinkNodePlugin({
|
|
|
13546
14248
|
}
|
|
13547
14249
|
});
|
|
13548
14250
|
}, [editor, positioningAnchorEl]);
|
|
13549
|
-
|
|
14251
|
+
useEffect18(() => {
|
|
13550
14252
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
13551
14253
|
requestAnimationFrame(() => {
|
|
13552
14254
|
editorState.read(() => {
|
|
@@ -13573,8 +14275,8 @@ function LinkNodePlugin({
|
|
|
13573
14275
|
});
|
|
13574
14276
|
});
|
|
13575
14277
|
};
|
|
13576
|
-
return /* @__PURE__ */
|
|
13577
|
-
/* @__PURE__ */
|
|
14278
|
+
return /* @__PURE__ */ jsxs85(Fragment15, { children: [
|
|
14279
|
+
/* @__PURE__ */ jsx130(
|
|
13578
14280
|
NodeEventPlugin,
|
|
13579
14281
|
{
|
|
13580
14282
|
nodeType: LinkNode,
|
|
@@ -13584,7 +14286,7 @@ function LinkNodePlugin({
|
|
|
13584
14286
|
}
|
|
13585
14287
|
}
|
|
13586
14288
|
),
|
|
13587
|
-
linkPopoverState ? /* @__PURE__ */
|
|
14289
|
+
linkPopoverState ? /* @__PURE__ */ jsx130(
|
|
13588
14290
|
"div",
|
|
13589
14291
|
{
|
|
13590
14292
|
css: linkPopover,
|
|
@@ -13593,8 +14295,8 @@ function LinkNodePlugin({
|
|
|
13593
14295
|
top: linkPopoverState.position.y
|
|
13594
14296
|
},
|
|
13595
14297
|
ref: linkPopoverElRef,
|
|
13596
|
-
children: /* @__PURE__ */
|
|
13597
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */
|
|
14298
|
+
children: /* @__PURE__ */ jsxs85("div", { css: linkPopoverContainer, children: [
|
|
14299
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ jsx130(
|
|
13598
14300
|
"a",
|
|
13599
14301
|
{
|
|
13600
14302
|
href: parsePath(
|
|
@@ -13606,7 +14308,7 @@ function LinkNodePlugin({
|
|
|
13606
14308
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
13607
14309
|
}
|
|
13608
14310
|
),
|
|
13609
|
-
/* @__PURE__ */
|
|
14311
|
+
/* @__PURE__ */ jsx130(
|
|
13610
14312
|
Button,
|
|
13611
14313
|
{
|
|
13612
14314
|
size: "xs",
|
|
@@ -13614,7 +14316,7 @@ function LinkNodePlugin({
|
|
|
13614
14316
|
onEditLinkNode(linkPopoverState.node);
|
|
13615
14317
|
},
|
|
13616
14318
|
buttonType: "ghost",
|
|
13617
|
-
children: /* @__PURE__ */
|
|
14319
|
+
children: /* @__PURE__ */ jsx130(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
13618
14320
|
}
|
|
13619
14321
|
)
|
|
13620
14322
|
] })
|
|
@@ -13650,7 +14352,7 @@ import {
|
|
|
13650
14352
|
OUTDENT_CONTENT_COMMAND,
|
|
13651
14353
|
SELECTION_CHANGE_COMMAND
|
|
13652
14354
|
} from "lexical";
|
|
13653
|
-
import { useEffect as
|
|
14355
|
+
import { useEffect as useEffect19, useRef as useRef11 } from "react";
|
|
13654
14356
|
function isIndentPermitted(maxDepth) {
|
|
13655
14357
|
const selection = $getSelection2();
|
|
13656
14358
|
if (!$isRangeSelection2(selection)) {
|
|
@@ -13705,8 +14407,8 @@ function $indentOverTab(selection) {
|
|
|
13705
14407
|
}
|
|
13706
14408
|
function ListIndentPlugin({ maxDepth }) {
|
|
13707
14409
|
const [editor] = useLexicalComposerContext4();
|
|
13708
|
-
const isInListItemNode =
|
|
13709
|
-
|
|
14410
|
+
const isInListItemNode = useRef11(false);
|
|
14411
|
+
useEffect19(() => {
|
|
13710
14412
|
return editor.registerCommand(
|
|
13711
14413
|
SELECTION_CHANGE_COMMAND,
|
|
13712
14414
|
() => {
|
|
@@ -13723,7 +14425,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
13723
14425
|
COMMAND_PRIORITY_NORMAL
|
|
13724
14426
|
);
|
|
13725
14427
|
}, [editor]);
|
|
13726
|
-
|
|
14428
|
+
useEffect19(() => {
|
|
13727
14429
|
return mergeRegister3(
|
|
13728
14430
|
editor.registerCommand(
|
|
13729
14431
|
INDENT_CONTENT_COMMAND,
|
|
@@ -13752,7 +14454,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
13752
14454
|
}
|
|
13753
14455
|
|
|
13754
14456
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
13755
|
-
import { css as
|
|
14457
|
+
import { css as css97 } from "@emotion/react";
|
|
13756
14458
|
import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
|
|
13757
14459
|
import { useLexicalEditable } from "@lexical/react/useLexicalEditable";
|
|
13758
14460
|
import {
|
|
@@ -13772,8 +14474,8 @@ import {
|
|
|
13772
14474
|
TableCellNode
|
|
13773
14475
|
} from "@lexical/table";
|
|
13774
14476
|
import { $getRoot as $getRoot2, $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3 } from "lexical";
|
|
13775
|
-
import { forwardRef as
|
|
13776
|
-
import { jsx as
|
|
14477
|
+
import { forwardRef as forwardRef27, useCallback as useCallback10, useEffect as useEffect20, useLayoutEffect, useState as useState17 } from "react";
|
|
14478
|
+
import { jsx as jsx131, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
13777
14479
|
function computeSelectionCount(selection) {
|
|
13778
14480
|
const selectionShape = selection.getShape();
|
|
13779
14481
|
return {
|
|
@@ -13781,13 +14483,13 @@ function computeSelectionCount(selection) {
|
|
|
13781
14483
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
13782
14484
|
};
|
|
13783
14485
|
}
|
|
13784
|
-
var tableActionMenuTrigger =
|
|
14486
|
+
var tableActionMenuTrigger = css97`
|
|
13785
14487
|
position: absolute;
|
|
13786
14488
|
transform: translate(calc(-100% - 1px), 1px);
|
|
13787
14489
|
`;
|
|
13788
|
-
var TableActionMenuTrigger =
|
|
14490
|
+
var TableActionMenuTrigger = forwardRef27((props, ref) => {
|
|
13789
14491
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
13790
|
-
const [coordinates, setCoordinates] =
|
|
14492
|
+
const [coordinates, setCoordinates] = useState17({ x: 0, y: 0 });
|
|
13791
14493
|
useLayoutEffect(() => {
|
|
13792
14494
|
const rect = tableCellEl.getBoundingClientRect();
|
|
13793
14495
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -13795,7 +14497,7 @@ var TableActionMenuTrigger = forwardRef25((props, ref) => {
|
|
|
13795
14497
|
const relativeY = rect.top - parentRect.top + positioningAnchorEl.scrollTop;
|
|
13796
14498
|
setCoordinates({ x: relativeX, y: relativeY });
|
|
13797
14499
|
}, [tableCellEl, positioningAnchorEl]);
|
|
13798
|
-
return /* @__PURE__ */
|
|
14500
|
+
return /* @__PURE__ */ jsx131(
|
|
13799
14501
|
IconButton,
|
|
13800
14502
|
{
|
|
13801
14503
|
ref,
|
|
@@ -13809,7 +14511,7 @@ var TableActionMenuTrigger = forwardRef25((props, ref) => {
|
|
|
13809
14511
|
size: "xs",
|
|
13810
14512
|
buttonType: "unimportant",
|
|
13811
14513
|
...rest,
|
|
13812
|
-
children: /* @__PURE__ */
|
|
14514
|
+
children: /* @__PURE__ */ jsx131(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
|
|
13813
14515
|
}
|
|
13814
14516
|
);
|
|
13815
14517
|
});
|
|
@@ -13821,16 +14523,16 @@ function TableActionMenu({
|
|
|
13821
14523
|
positioningAnchorEl
|
|
13822
14524
|
}) {
|
|
13823
14525
|
const [editor] = useLexicalComposerContext5();
|
|
13824
|
-
const [tableCellNode, updateTableCellNode] =
|
|
13825
|
-
const [selectionCounts, updateSelectionCounts] =
|
|
14526
|
+
const [tableCellNode, updateTableCellNode] = useState17(_tableCellNode);
|
|
14527
|
+
const [selectionCounts, updateSelectionCounts] = useState17({
|
|
13826
14528
|
columns: 1,
|
|
13827
14529
|
rows: 1
|
|
13828
14530
|
});
|
|
13829
|
-
const [menuTriggerKey, setMenuTriggerKey] =
|
|
14531
|
+
const [menuTriggerKey, setMenuTriggerKey] = useState17(0);
|
|
13830
14532
|
const incrementMenuTriggerKey = () => {
|
|
13831
14533
|
setMenuTriggerKey((key) => key += 1);
|
|
13832
14534
|
};
|
|
13833
|
-
|
|
14535
|
+
useEffect20(() => {
|
|
13834
14536
|
return editor.registerMutationListener(
|
|
13835
14537
|
TableCellNode,
|
|
13836
14538
|
(nodeMutations) => {
|
|
@@ -13844,7 +14546,7 @@ function TableActionMenu({
|
|
|
13844
14546
|
{ skipInitialization: true }
|
|
13845
14547
|
);
|
|
13846
14548
|
}, [editor, tableCellNode]);
|
|
13847
|
-
|
|
14549
|
+
useEffect20(() => {
|
|
13848
14550
|
editor.getEditorState().read(() => {
|
|
13849
14551
|
const selection = $getSelection3();
|
|
13850
14552
|
if ($isTableSelection(selection)) {
|
|
@@ -13852,7 +14554,7 @@ function TableActionMenu({
|
|
|
13852
14554
|
}
|
|
13853
14555
|
});
|
|
13854
14556
|
}, [editor]);
|
|
13855
|
-
const clearTableSelection =
|
|
14557
|
+
const clearTableSelection = useCallback10(() => {
|
|
13856
14558
|
editor.update(() => {
|
|
13857
14559
|
if (tableCellNode.isAttached()) {
|
|
13858
14560
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
@@ -13873,7 +14575,7 @@ function TableActionMenu({
|
|
|
13873
14575
|
rootNode.selectStart();
|
|
13874
14576
|
});
|
|
13875
14577
|
}, [editor, tableCellNode]);
|
|
13876
|
-
const insertTableRowAtSelection =
|
|
14578
|
+
const insertTableRowAtSelection = useCallback10(
|
|
13877
14579
|
(shouldInsertAfter) => {
|
|
13878
14580
|
editor.update(() => {
|
|
13879
14581
|
$insertTableRow__EXPERIMENTAL(shouldInsertAfter);
|
|
@@ -13882,7 +14584,7 @@ function TableActionMenu({
|
|
|
13882
14584
|
},
|
|
13883
14585
|
[editor]
|
|
13884
14586
|
);
|
|
13885
|
-
const insertTableColumnAtSelection =
|
|
14587
|
+
const insertTableColumnAtSelection = useCallback10(
|
|
13886
14588
|
(shouldInsertAfter) => {
|
|
13887
14589
|
editor.update(() => {
|
|
13888
14590
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -13893,26 +14595,26 @@ function TableActionMenu({
|
|
|
13893
14595
|
},
|
|
13894
14596
|
[editor, selectionCounts.columns]
|
|
13895
14597
|
);
|
|
13896
|
-
const deleteTableRowAtSelection =
|
|
14598
|
+
const deleteTableRowAtSelection = useCallback10(() => {
|
|
13897
14599
|
editor.update(() => {
|
|
13898
14600
|
$deleteTableRow__EXPERIMENTAL();
|
|
13899
14601
|
});
|
|
13900
14602
|
incrementMenuTriggerKey();
|
|
13901
14603
|
}, [editor]);
|
|
13902
|
-
const deleteTableAtSelection =
|
|
14604
|
+
const deleteTableAtSelection = useCallback10(() => {
|
|
13903
14605
|
editor.update(() => {
|
|
13904
14606
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
13905
14607
|
tableNode.remove();
|
|
13906
14608
|
clearTableSelection();
|
|
13907
14609
|
});
|
|
13908
14610
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
13909
|
-
const deleteTableColumnAtSelection =
|
|
14611
|
+
const deleteTableColumnAtSelection = useCallback10(() => {
|
|
13910
14612
|
editor.update(() => {
|
|
13911
14613
|
$deleteTableColumn__EXPERIMENTAL();
|
|
13912
14614
|
});
|
|
13913
14615
|
incrementMenuTriggerKey();
|
|
13914
14616
|
}, [editor]);
|
|
13915
|
-
const toggleTableRowIsHeader =
|
|
14617
|
+
const toggleTableRowIsHeader = useCallback10(() => {
|
|
13916
14618
|
editor.update(() => {
|
|
13917
14619
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
13918
14620
|
const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
|
|
@@ -13933,7 +14635,7 @@ function TableActionMenu({
|
|
|
13933
14635
|
clearTableSelection();
|
|
13934
14636
|
});
|
|
13935
14637
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
13936
|
-
const toggleTableColumnIsHeader =
|
|
14638
|
+
const toggleTableColumnIsHeader = useCallback10(() => {
|
|
13937
14639
|
editor.update(() => {
|
|
13938
14640
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
13939
14641
|
const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
|
|
@@ -13960,13 +14662,13 @@ function TableActionMenu({
|
|
|
13960
14662
|
clearTableSelection();
|
|
13961
14663
|
});
|
|
13962
14664
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
13963
|
-
const menuItemCss =
|
|
14665
|
+
const menuItemCss = css97({
|
|
13964
14666
|
fontSize: "var(--fs-sm)"
|
|
13965
14667
|
});
|
|
13966
|
-
return /* @__PURE__ */
|
|
14668
|
+
return /* @__PURE__ */ jsxs86(
|
|
13967
14669
|
Menu,
|
|
13968
14670
|
{
|
|
13969
|
-
menuTrigger: /* @__PURE__ */
|
|
14671
|
+
menuTrigger: /* @__PURE__ */ jsx131(
|
|
13970
14672
|
TableActionMenuTrigger,
|
|
13971
14673
|
{
|
|
13972
14674
|
tableCellEl,
|
|
@@ -13977,7 +14679,7 @@ function TableActionMenu({
|
|
|
13977
14679
|
portalElement: menuPortalEl,
|
|
13978
14680
|
maxMenuHeight: "300px",
|
|
13979
14681
|
children: [
|
|
13980
|
-
/* @__PURE__ */
|
|
14682
|
+
/* @__PURE__ */ jsxs86(
|
|
13981
14683
|
MenuItem,
|
|
13982
14684
|
{
|
|
13983
14685
|
onClick: () => {
|
|
@@ -13991,33 +14693,33 @@ function TableActionMenu({
|
|
|
13991
14693
|
]
|
|
13992
14694
|
}
|
|
13993
14695
|
),
|
|
13994
|
-
/* @__PURE__ */
|
|
14696
|
+
/* @__PURE__ */ jsxs86(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
|
|
13995
14697
|
"Insert ",
|
|
13996
14698
|
selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
|
|
13997
14699
|
" below"
|
|
13998
14700
|
] }),
|
|
13999
|
-
/* @__PURE__ */
|
|
14000
|
-
/* @__PURE__ */
|
|
14701
|
+
/* @__PURE__ */ jsx131(MenuItemSeparator, {}),
|
|
14702
|
+
/* @__PURE__ */ jsxs86(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
|
|
14001
14703
|
"Insert ",
|
|
14002
14704
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
14003
14705
|
" left"
|
|
14004
14706
|
] }),
|
|
14005
|
-
/* @__PURE__ */
|
|
14707
|
+
/* @__PURE__ */ jsxs86(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
|
|
14006
14708
|
"Insert ",
|
|
14007
14709
|
selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
|
|
14008
14710
|
" right"
|
|
14009
14711
|
] }),
|
|
14010
|
-
/* @__PURE__ */
|
|
14011
|
-
/* @__PURE__ */
|
|
14012
|
-
/* @__PURE__ */
|
|
14013
|
-
/* @__PURE__ */
|
|
14014
|
-
/* @__PURE__ */
|
|
14015
|
-
/* @__PURE__ */
|
|
14712
|
+
/* @__PURE__ */ jsx131(MenuItemSeparator, {}),
|
|
14713
|
+
/* @__PURE__ */ jsx131(MenuItem, { onClick: () => deleteTableColumnAtSelection(), css: menuItemCss, children: "Delete column" }),
|
|
14714
|
+
/* @__PURE__ */ jsx131(MenuItem, { onClick: () => deleteTableRowAtSelection(), css: menuItemCss, children: "Delete row" }),
|
|
14715
|
+
/* @__PURE__ */ jsx131(MenuItem, { onClick: () => deleteTableAtSelection(), css: menuItemCss, children: "Delete table" }),
|
|
14716
|
+
/* @__PURE__ */ jsx131(MenuItemSeparator, {}),
|
|
14717
|
+
/* @__PURE__ */ jsxs86(MenuItem, { onClick: () => toggleTableRowIsHeader(), css: menuItemCss, children: [
|
|
14016
14718
|
(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ? "Remove" : "Add",
|
|
14017
14719
|
" ",
|
|
14018
14720
|
"row header"
|
|
14019
14721
|
] }),
|
|
14020
|
-
/* @__PURE__ */
|
|
14722
|
+
/* @__PURE__ */ jsxs86(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
|
|
14021
14723
|
(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN ? "Remove" : "Add",
|
|
14022
14724
|
" ",
|
|
14023
14725
|
"column header"
|
|
@@ -14031,10 +14733,10 @@ function TableCellActionMenuContainer({
|
|
|
14031
14733
|
positioningAnchorEl
|
|
14032
14734
|
}) {
|
|
14033
14735
|
const [editor] = useLexicalComposerContext5();
|
|
14034
|
-
const [tableCellNode, setTableMenuCellNode] =
|
|
14035
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] =
|
|
14036
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] =
|
|
14037
|
-
|
|
14736
|
+
const [tableCellNode, setTableMenuCellNode] = useState17(null);
|
|
14737
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState17(null);
|
|
14738
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState17(null);
|
|
14739
|
+
useEffect20(() => {
|
|
14038
14740
|
const newPortalEl = document.createElement("div");
|
|
14039
14741
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
14040
14742
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -14042,14 +14744,14 @@ function TableCellActionMenuContainer({
|
|
|
14042
14744
|
newPortalEl.remove();
|
|
14043
14745
|
};
|
|
14044
14746
|
}, [menuPortalEl]);
|
|
14045
|
-
const setTableMenuCellNodeElem =
|
|
14747
|
+
const setTableMenuCellNodeElem = useCallback10((elem) => {
|
|
14046
14748
|
if (elem) {
|
|
14047
14749
|
_setTableMenuCellNodeEl(elem);
|
|
14048
14750
|
} else {
|
|
14049
14751
|
_setTableMenuCellNodeEl(null);
|
|
14050
14752
|
}
|
|
14051
14753
|
}, []);
|
|
14052
|
-
const $moveMenu =
|
|
14754
|
+
const $moveMenu = useCallback10(() => {
|
|
14053
14755
|
const selection = $getSelection3();
|
|
14054
14756
|
const nativeSelection = window.getSelection();
|
|
14055
14757
|
const activeElement = document.activeElement;
|
|
@@ -14078,14 +14780,14 @@ function TableCellActionMenuContainer({
|
|
|
14078
14780
|
setTableMenuCellNodeElem(null);
|
|
14079
14781
|
}
|
|
14080
14782
|
}, [editor, setTableMenuCellNodeElem]);
|
|
14081
|
-
|
|
14783
|
+
useEffect20(() => {
|
|
14082
14784
|
return editor.registerUpdateListener(() => {
|
|
14083
14785
|
editor.getEditorState().read(() => {
|
|
14084
14786
|
$moveMenu();
|
|
14085
14787
|
});
|
|
14086
14788
|
});
|
|
14087
14789
|
});
|
|
14088
|
-
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */
|
|
14790
|
+
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ jsx131(
|
|
14089
14791
|
TableActionMenu,
|
|
14090
14792
|
{
|
|
14091
14793
|
tableCellNode,
|
|
@@ -14101,11 +14803,11 @@ function TableActionMenuPlugin({
|
|
|
14101
14803
|
menuPortalEl
|
|
14102
14804
|
}) {
|
|
14103
14805
|
const isEditable = useLexicalEditable();
|
|
14104
|
-
return isEditable ? /* @__PURE__ */
|
|
14806
|
+
return isEditable ? /* @__PURE__ */ jsx131(TableCellActionMenuContainer, { menuPortalEl, positioningAnchorEl }) : null;
|
|
14105
14807
|
}
|
|
14106
14808
|
|
|
14107
14809
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
14108
|
-
import { css as
|
|
14810
|
+
import { css as css98 } from "@emotion/react";
|
|
14109
14811
|
import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
|
|
14110
14812
|
import { useLexicalEditable as useLexicalEditable2 } from "@lexical/react/useLexicalEditable";
|
|
14111
14813
|
import {
|
|
@@ -14117,12 +14819,12 @@ import {
|
|
|
14117
14819
|
} from "@lexical/table";
|
|
14118
14820
|
import { calculateZoomLevel } from "@lexical/utils";
|
|
14119
14821
|
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
14120
|
-
import { useCallback as
|
|
14822
|
+
import { useCallback as useCallback11, useEffect as useEffect21, useMemo as useMemo7, useRef as useRef12, useState as useState18 } from "react";
|
|
14121
14823
|
import { createPortal as createPortal3 } from "react-dom";
|
|
14122
|
-
import { Fragment as Fragment16, jsx as
|
|
14824
|
+
import { Fragment as Fragment16, jsx as jsx132, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
14123
14825
|
var MIN_ROW_HEIGHT = 33;
|
|
14124
14826
|
var MIN_COLUMN_WIDTH = 50;
|
|
14125
|
-
var tableResizer =
|
|
14827
|
+
var tableResizer = css98`
|
|
14126
14828
|
position: absolute;
|
|
14127
14829
|
z-index: var(--z-10);
|
|
14128
14830
|
`;
|
|
@@ -14144,15 +14846,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
14144
14846
|
return null;
|
|
14145
14847
|
};
|
|
14146
14848
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
14147
|
-
const targetRef =
|
|
14148
|
-
const resizerRef =
|
|
14149
|
-
const tableRectRef =
|
|
14150
|
-
const mouseStartPosRef =
|
|
14151
|
-
const [mouseCurrentPos, updateMouseCurrentPos] =
|
|
14152
|
-
const [activeCell, updateActiveCell] =
|
|
14153
|
-
const [isMouseDown, updateIsMouseDown] =
|
|
14154
|
-
const [draggingDirection, updateDraggingDirection] =
|
|
14155
|
-
const resetState =
|
|
14849
|
+
const targetRef = useRef12(null);
|
|
14850
|
+
const resizerRef = useRef12(null);
|
|
14851
|
+
const tableRectRef = useRef12(null);
|
|
14852
|
+
const mouseStartPosRef = useRef12(null);
|
|
14853
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = useState18(null);
|
|
14854
|
+
const [activeCell, updateActiveCell] = useState18(null);
|
|
14855
|
+
const [isMouseDown, updateIsMouseDown] = useState18(false);
|
|
14856
|
+
const [draggingDirection, updateDraggingDirection] = useState18(null);
|
|
14857
|
+
const resetState = useCallback11(() => {
|
|
14156
14858
|
updateActiveCell(null);
|
|
14157
14859
|
targetRef.current = null;
|
|
14158
14860
|
updateDraggingDirection(null);
|
|
@@ -14162,7 +14864,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14162
14864
|
const isMouseDownOnEvent = (event) => {
|
|
14163
14865
|
return (event.buttons & 1) === 1;
|
|
14164
14866
|
};
|
|
14165
|
-
|
|
14867
|
+
useEffect21(() => {
|
|
14166
14868
|
const onMouseMove = (event) => {
|
|
14167
14869
|
setTimeout(() => {
|
|
14168
14870
|
const target = event.target;
|
|
@@ -14229,7 +14931,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14229
14931
|
}
|
|
14230
14932
|
return false;
|
|
14231
14933
|
};
|
|
14232
|
-
const updateRowHeight =
|
|
14934
|
+
const updateRowHeight = useCallback11(
|
|
14233
14935
|
(heightChange) => {
|
|
14234
14936
|
if (!activeCell) {
|
|
14235
14937
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -14291,7 +14993,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14291
14993
|
}
|
|
14292
14994
|
}
|
|
14293
14995
|
};
|
|
14294
|
-
const updateColumnWidth =
|
|
14996
|
+
const updateColumnWidth = useCallback11(
|
|
14295
14997
|
(widthChange) => {
|
|
14296
14998
|
if (!activeCell) {
|
|
14297
14999
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -14325,7 +15027,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14325
15027
|
},
|
|
14326
15028
|
[activeCell, editor]
|
|
14327
15029
|
);
|
|
14328
|
-
const mouseUpHandler =
|
|
15030
|
+
const mouseUpHandler = useCallback11(
|
|
14329
15031
|
(direction) => {
|
|
14330
15032
|
const handler = (event) => {
|
|
14331
15033
|
event.preventDefault();
|
|
@@ -14354,7 +15056,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14354
15056
|
},
|
|
14355
15057
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
14356
15058
|
);
|
|
14357
|
-
const toggleResize =
|
|
15059
|
+
const toggleResize = useCallback11(
|
|
14358
15060
|
(direction) => (event) => {
|
|
14359
15061
|
event.preventDefault();
|
|
14360
15062
|
event.stopPropagation();
|
|
@@ -14371,7 +15073,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14371
15073
|
},
|
|
14372
15074
|
[activeCell, mouseUpHandler]
|
|
14373
15075
|
);
|
|
14374
|
-
const getResizers =
|
|
15076
|
+
const getResizers = useCallback11(() => {
|
|
14375
15077
|
if (activeCell) {
|
|
14376
15078
|
const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
|
|
14377
15079
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -14420,8 +15122,8 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14420
15122
|
};
|
|
14421
15123
|
}, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
|
|
14422
15124
|
const resizerStyles = getResizers();
|
|
14423
|
-
return /* @__PURE__ */
|
|
14424
|
-
/* @__PURE__ */
|
|
15125
|
+
return /* @__PURE__ */ jsx132("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ jsxs87(Fragment16, { children: [
|
|
15126
|
+
/* @__PURE__ */ jsx132(
|
|
14425
15127
|
"div",
|
|
14426
15128
|
{
|
|
14427
15129
|
css: tableResizer,
|
|
@@ -14429,7 +15131,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14429
15131
|
onMouseDown: toggleResize("right")
|
|
14430
15132
|
}
|
|
14431
15133
|
),
|
|
14432
|
-
/* @__PURE__ */
|
|
15134
|
+
/* @__PURE__ */ jsx132(
|
|
14433
15135
|
"div",
|
|
14434
15136
|
{
|
|
14435
15137
|
css: tableResizer,
|
|
@@ -14442,9 +15144,9 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
14442
15144
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
14443
15145
|
const [editor] = useLexicalComposerContext6();
|
|
14444
15146
|
const isEditable = useLexicalEditable2();
|
|
14445
|
-
return
|
|
15147
|
+
return useMemo7(
|
|
14446
15148
|
() => isEditable ? createPortal3(
|
|
14447
|
-
/* @__PURE__ */
|
|
15149
|
+
/* @__PURE__ */ jsx132(TableCellResizer, { editor, positioningAnchorEl }),
|
|
14448
15150
|
positioningAnchorEl
|
|
14449
15151
|
) : null,
|
|
14450
15152
|
[editor, isEditable, positioningAnchorEl]
|
|
@@ -14461,11 +15163,11 @@ import {
|
|
|
14461
15163
|
COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
|
|
14462
15164
|
SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
|
|
14463
15165
|
} from "lexical";
|
|
14464
|
-
import { useEffect as
|
|
15166
|
+
import { useEffect as useEffect22, useState as useState19 } from "react";
|
|
14465
15167
|
var TableSelectionPlugin = () => {
|
|
14466
15168
|
const [editor] = useLexicalComposerContext7();
|
|
14467
|
-
const [closestTableCellNode, setClosestTableCellNode] =
|
|
14468
|
-
|
|
15169
|
+
const [closestTableCellNode, setClosestTableCellNode] = useState19(null);
|
|
15170
|
+
useEffect22(() => {
|
|
14469
15171
|
return editor.registerCommand(
|
|
14470
15172
|
SELECTION_CHANGE_COMMAND2,
|
|
14471
15173
|
() => {
|
|
@@ -14487,7 +15189,7 @@ var TableSelectionPlugin = () => {
|
|
|
14487
15189
|
COMMAND_PRIORITY_NORMAL2
|
|
14488
15190
|
);
|
|
14489
15191
|
}, [editor]);
|
|
14490
|
-
|
|
15192
|
+
useEffect22(() => {
|
|
14491
15193
|
const onControlA = (event) => {
|
|
14492
15194
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
14493
15195
|
if (!closestTableCellNode) {
|
|
@@ -14510,7 +15212,7 @@ var TableSelectionPlugin = () => {
|
|
|
14510
15212
|
var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
14511
15213
|
|
|
14512
15214
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
14513
|
-
import { css as
|
|
15215
|
+
import { css as css99 } from "@emotion/react";
|
|
14514
15216
|
import { $createCodeNode } from "@lexical/code";
|
|
14515
15217
|
import {
|
|
14516
15218
|
$isListNode as $isListNode2,
|
|
@@ -14534,7 +15236,7 @@ import {
|
|
|
14534
15236
|
FORMAT_TEXT_COMMAND,
|
|
14535
15237
|
SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3
|
|
14536
15238
|
} from "lexical";
|
|
14537
|
-
import { useCallback as
|
|
15239
|
+
import { useCallback as useCallback12, useEffect as useEffect23 } from "react";
|
|
14538
15240
|
|
|
14539
15241
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
14540
15242
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
@@ -14550,29 +15252,29 @@ var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
|
14550
15252
|
var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
14551
15253
|
|
|
14552
15254
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
14553
|
-
import { useMemo as
|
|
15255
|
+
import { useMemo as useMemo8, useState as useState20 } from "react";
|
|
14554
15256
|
var useRichTextToolbarState = ({ config }) => {
|
|
14555
15257
|
var _a;
|
|
14556
|
-
const enabledBuiltInFormats =
|
|
15258
|
+
const enabledBuiltInFormats = useMemo8(() => {
|
|
14557
15259
|
return richTextBuiltInFormats.filter((format) => {
|
|
14558
15260
|
var _a2, _b;
|
|
14559
15261
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
14560
15262
|
});
|
|
14561
15263
|
}, [config]);
|
|
14562
|
-
const enabledBuiltInElements =
|
|
15264
|
+
const enabledBuiltInElements = useMemo8(() => {
|
|
14563
15265
|
return richTextBuiltInElements.filter((element) => {
|
|
14564
15266
|
var _a2, _b;
|
|
14565
15267
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
14566
15268
|
});
|
|
14567
15269
|
}, [config]);
|
|
14568
|
-
const enabledBuiltInFormatsWithIcon =
|
|
15270
|
+
const enabledBuiltInFormatsWithIcon = useMemo8(() => {
|
|
14569
15271
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
14570
15272
|
}, [enabledBuiltInFormats]);
|
|
14571
15273
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
14572
15274
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
14573
15275
|
);
|
|
14574
|
-
const [activeFormats, setActiveFormats] =
|
|
14575
|
-
const visibleFormatsWithIcon =
|
|
15276
|
+
const [activeFormats, setActiveFormats] = useState20([]);
|
|
15277
|
+
const visibleFormatsWithIcon = useMemo8(() => {
|
|
14576
15278
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
14577
15279
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
14578
15280
|
visibleFormats.add(type);
|
|
@@ -14582,7 +15284,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
14582
15284
|
});
|
|
14583
15285
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
14584
15286
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
14585
|
-
const visibleFormatsWithoutIcon =
|
|
15287
|
+
const visibleFormatsWithoutIcon = useMemo8(() => {
|
|
14586
15288
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
14587
15289
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
14588
15290
|
visibleFormats.add(type);
|
|
@@ -14592,11 +15294,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
14592
15294
|
});
|
|
14593
15295
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
14594
15296
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
14595
|
-
const [activeElement, setActiveElement] =
|
|
15297
|
+
const [activeElement, setActiveElement] = useState20("paragraph");
|
|
14596
15298
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
14597
15299
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
14598
15300
|
);
|
|
14599
|
-
const visibleTextualElements =
|
|
15301
|
+
const visibleTextualElements = useMemo8(() => {
|
|
14600
15302
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
14601
15303
|
return enabledTextualElements;
|
|
14602
15304
|
}
|
|
@@ -14607,30 +15309,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
14607
15309
|
}
|
|
14608
15310
|
);
|
|
14609
15311
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
14610
|
-
const [isLink, setIsLink] =
|
|
14611
|
-
const linkElementVisible =
|
|
15312
|
+
const [isLink, setIsLink] = useState20(false);
|
|
15313
|
+
const linkElementVisible = useMemo8(() => {
|
|
14612
15314
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
14613
15315
|
}, [isLink, enabledBuiltInElements]);
|
|
14614
|
-
const visibleLists =
|
|
15316
|
+
const visibleLists = useMemo8(() => {
|
|
14615
15317
|
return new Set(
|
|
14616
15318
|
["orderedList", "unorderedList"].filter(
|
|
14617
15319
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
14618
15320
|
)
|
|
14619
15321
|
);
|
|
14620
15322
|
}, [activeElement, enabledBuiltInElements]);
|
|
14621
|
-
const quoteElementVisible =
|
|
15323
|
+
const quoteElementVisible = useMemo8(() => {
|
|
14622
15324
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
14623
15325
|
}, [activeElement, enabledBuiltInElements]);
|
|
14624
|
-
const codeElementVisible =
|
|
15326
|
+
const codeElementVisible = useMemo8(() => {
|
|
14625
15327
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
14626
15328
|
}, [activeElement, enabledBuiltInElements]);
|
|
14627
|
-
const tableElementVisible =
|
|
15329
|
+
const tableElementVisible = useMemo8(() => {
|
|
14628
15330
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
14629
15331
|
}, [activeElement, enabledBuiltInElements]);
|
|
14630
|
-
const assetElementVisible =
|
|
15332
|
+
const assetElementVisible = useMemo8(() => {
|
|
14631
15333
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
14632
15334
|
}, [activeElement, enabledBuiltInElements]);
|
|
14633
|
-
const visibleElementsWithIcons =
|
|
15335
|
+
const visibleElementsWithIcons = useMemo8(() => {
|
|
14634
15336
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
14635
15337
|
if (linkElementVisible) {
|
|
14636
15338
|
visibleElements.add("link");
|
|
@@ -14642,7 +15344,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
14642
15344
|
}
|
|
14643
15345
|
return visibleElements;
|
|
14644
15346
|
}, [linkElementVisible, visibleLists]);
|
|
14645
|
-
const visibleInsertElementsWithIcons =
|
|
15347
|
+
const visibleInsertElementsWithIcons = useMemo8(() => {
|
|
14646
15348
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
14647
15349
|
if (quoteElementVisible) {
|
|
14648
15350
|
visibleElements.add("quote");
|
|
@@ -14680,8 +15382,8 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
14680
15382
|
};
|
|
14681
15383
|
|
|
14682
15384
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
14683
|
-
import { Fragment as Fragment17, jsx as
|
|
14684
|
-
var toolbar =
|
|
15385
|
+
import { Fragment as Fragment17, jsx as jsx133, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
|
|
15386
|
+
var toolbar = css99`
|
|
14685
15387
|
${scrollbarStyles}
|
|
14686
15388
|
background: var(--gray-50);
|
|
14687
15389
|
border-radius: var(--rounded-base);
|
|
@@ -14695,7 +15397,7 @@ var toolbar = css98`
|
|
|
14695
15397
|
top: calc(var(--spacing-sm) * -2);
|
|
14696
15398
|
z-index: 10;
|
|
14697
15399
|
`;
|
|
14698
|
-
var toolbarGroup =
|
|
15400
|
+
var toolbarGroup = css99`
|
|
14699
15401
|
display: flex;
|
|
14700
15402
|
flex-shrink: 0;
|
|
14701
15403
|
gap: var(--spacing-xs);
|
|
@@ -14712,7 +15414,7 @@ var toolbarGroup = css98`
|
|
|
14712
15414
|
width: 1px;
|
|
14713
15415
|
}
|
|
14714
15416
|
`;
|
|
14715
|
-
var richTextToolbarButton =
|
|
15417
|
+
var richTextToolbarButton = css99`
|
|
14716
15418
|
align-items: center;
|
|
14717
15419
|
appearance: none;
|
|
14718
15420
|
border: 0;
|
|
@@ -14726,21 +15428,21 @@ var richTextToolbarButton = css98`
|
|
|
14726
15428
|
min-width: 32px;
|
|
14727
15429
|
padding: 0 var(--spacing-sm);
|
|
14728
15430
|
`;
|
|
14729
|
-
var richTextToolbarButtonActive =
|
|
15431
|
+
var richTextToolbarButtonActive = css99`
|
|
14730
15432
|
background: var(--gray-200);
|
|
14731
15433
|
`;
|
|
14732
|
-
var textStyleButton =
|
|
15434
|
+
var textStyleButton = css99`
|
|
14733
15435
|
justify-content: space-between;
|
|
14734
15436
|
min-width: 7rem;
|
|
14735
15437
|
`;
|
|
14736
|
-
var toolbarIcon =
|
|
15438
|
+
var toolbarIcon = css99`
|
|
14737
15439
|
color: inherit;
|
|
14738
15440
|
`;
|
|
14739
|
-
var toolbarChevron =
|
|
15441
|
+
var toolbarChevron = css99`
|
|
14740
15442
|
margin-left: var(--spacing-xs);
|
|
14741
15443
|
`;
|
|
14742
15444
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
14743
|
-
return /* @__PURE__ */
|
|
15445
|
+
return /* @__PURE__ */ jsx133(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
14744
15446
|
};
|
|
14745
15447
|
var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset }) => {
|
|
14746
15448
|
const [editor] = useLexicalComposerContext8();
|
|
@@ -14796,7 +15498,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14796
15498
|
});
|
|
14797
15499
|
});
|
|
14798
15500
|
};
|
|
14799
|
-
const updateToolbar =
|
|
15501
|
+
const updateToolbar = useCallback12(() => {
|
|
14800
15502
|
const selection = $getSelection5();
|
|
14801
15503
|
if (!$isRangeSelection5(selection)) {
|
|
14802
15504
|
return;
|
|
@@ -14835,7 +15537,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14835
15537
|
setIsLink(false);
|
|
14836
15538
|
}
|
|
14837
15539
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
14838
|
-
|
|
15540
|
+
useEffect23(() => {
|
|
14839
15541
|
return editor.registerCommand(
|
|
14840
15542
|
SELECTION_CHANGE_COMMAND3,
|
|
14841
15543
|
(_payload) => {
|
|
@@ -14845,7 +15547,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14845
15547
|
COMMAND_PRIORITY_CRITICAL2
|
|
14846
15548
|
);
|
|
14847
15549
|
}, [editor, updateToolbar]);
|
|
14848
|
-
|
|
15550
|
+
useEffect23(() => {
|
|
14849
15551
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
14850
15552
|
requestAnimationFrame(() => {
|
|
14851
15553
|
editorState.read(() => {
|
|
@@ -14854,14 +15556,14 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14854
15556
|
});
|
|
14855
15557
|
});
|
|
14856
15558
|
}, [editor, updateToolbar]);
|
|
14857
|
-
return /* @__PURE__ */
|
|
14858
|
-
/* @__PURE__ */
|
|
15559
|
+
return /* @__PURE__ */ jsxs88("div", { css: toolbar, "data-testid": "rich-text-toolbar", children: [
|
|
15560
|
+
/* @__PURE__ */ jsxs88(
|
|
14859
15561
|
Menu,
|
|
14860
15562
|
{
|
|
14861
|
-
menuTrigger: /* @__PURE__ */
|
|
15563
|
+
menuTrigger: /* @__PURE__ */ jsxs88("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
|
|
14862
15564
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
14863
15565
|
" ",
|
|
14864
|
-
/* @__PURE__ */
|
|
15566
|
+
/* @__PURE__ */ jsx133(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
14865
15567
|
] }),
|
|
14866
15568
|
placement: "bottom-start",
|
|
14867
15569
|
children: [
|
|
@@ -14871,7 +15573,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14871
15573
|
type: "paragraph"
|
|
14872
15574
|
},
|
|
14873
15575
|
...visibleTextualElements
|
|
14874
|
-
].map((element) => /* @__PURE__ */
|
|
15576
|
+
].map((element) => /* @__PURE__ */ jsx133(
|
|
14875
15577
|
MenuItem,
|
|
14876
15578
|
{
|
|
14877
15579
|
"data-testid": "menu-item",
|
|
@@ -14882,12 +15584,12 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14882
15584
|
},
|
|
14883
15585
|
element.type
|
|
14884
15586
|
)),
|
|
14885
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */
|
|
15587
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ jsx133(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
14886
15588
|
]
|
|
14887
15589
|
}
|
|
14888
15590
|
),
|
|
14889
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
14890
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */
|
|
15591
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsxs88("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-formatting", children: [
|
|
15592
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ jsx133(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ jsx133(
|
|
14891
15593
|
"button",
|
|
14892
15594
|
{
|
|
14893
15595
|
"data-testid": `formatting-button-${format.type}`,
|
|
@@ -14899,15 +15601,15 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14899
15601
|
richTextToolbarButton,
|
|
14900
15602
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
14901
15603
|
],
|
|
14902
|
-
children: /* @__PURE__ */
|
|
15604
|
+
children: /* @__PURE__ */ jsx133(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
14903
15605
|
}
|
|
14904
15606
|
) }, format.type)),
|
|
14905
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
15607
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsx133(
|
|
14906
15608
|
Menu,
|
|
14907
15609
|
{
|
|
14908
|
-
menuTrigger: /* @__PURE__ */
|
|
15610
|
+
menuTrigger: /* @__PURE__ */ jsx133("button", { css: richTextToolbarButton, title: "Alternative text styles", type: "button", children: /* @__PURE__ */ jsx133(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
14909
15611
|
placement: "bottom-start",
|
|
14910
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */
|
|
15612
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ jsx133(
|
|
14911
15613
|
MenuItem,
|
|
14912
15614
|
{
|
|
14913
15615
|
onClick: () => {
|
|
@@ -14920,8 +15622,8 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14920
15622
|
}
|
|
14921
15623
|
) : null
|
|
14922
15624
|
] }) : null,
|
|
14923
|
-
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */
|
|
14924
|
-
linkElementVisible ? /* @__PURE__ */
|
|
15625
|
+
visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ jsxs88("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-elements", children: [
|
|
15626
|
+
linkElementVisible ? /* @__PURE__ */ jsx133(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ jsx133(
|
|
14925
15627
|
"button",
|
|
14926
15628
|
{
|
|
14927
15629
|
"data-testid": "element-link",
|
|
@@ -14934,11 +15636,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14934
15636
|
}
|
|
14935
15637
|
},
|
|
14936
15638
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
14937
|
-
children: /* @__PURE__ */
|
|
15639
|
+
children: /* @__PURE__ */ jsx133(RichTextToolbarIcon, { icon: "link" })
|
|
14938
15640
|
}
|
|
14939
15641
|
) }) : null,
|
|
14940
|
-
visibleLists.size > 0 ? /* @__PURE__ */
|
|
14941
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */
|
|
15642
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs88(Fragment17, { children: [
|
|
15643
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx133(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx133(
|
|
14942
15644
|
"button",
|
|
14943
15645
|
{
|
|
14944
15646
|
"data-testid": "element-unordered-list",
|
|
@@ -14954,10 +15656,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14954
15656
|
richTextToolbarButton,
|
|
14955
15657
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
14956
15658
|
],
|
|
14957
|
-
children: /* @__PURE__ */
|
|
15659
|
+
children: /* @__PURE__ */ jsx133(RichTextToolbarIcon, { icon: "layout-list" })
|
|
14958
15660
|
}
|
|
14959
15661
|
) }) : null,
|
|
14960
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */
|
|
15662
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ jsx133(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ jsx133(
|
|
14961
15663
|
"button",
|
|
14962
15664
|
{
|
|
14963
15665
|
"data-testid": "element-ordered-list",
|
|
@@ -14973,58 +15675,58 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14973
15675
|
richTextToolbarButton,
|
|
14974
15676
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
14975
15677
|
],
|
|
14976
|
-
children: /* @__PURE__ */
|
|
15678
|
+
children: /* @__PURE__ */ jsx133(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
14977
15679
|
}
|
|
14978
15680
|
) }) : null
|
|
14979
15681
|
] }) : null,
|
|
14980
15682
|
customControls ? customControls : null
|
|
14981
15683
|
] }) : null,
|
|
14982
|
-
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */
|
|
15684
|
+
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ jsx133("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-insert", children: /* @__PURE__ */ jsxs88(
|
|
14983
15685
|
Menu,
|
|
14984
15686
|
{
|
|
14985
|
-
menuTrigger: /* @__PURE__ */
|
|
15687
|
+
menuTrigger: /* @__PURE__ */ jsxs88("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
|
|
14986
15688
|
"Insert",
|
|
14987
|
-
/* @__PURE__ */
|
|
15689
|
+
/* @__PURE__ */ jsx133(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
14988
15690
|
] }),
|
|
14989
15691
|
placement: "bottom-start",
|
|
14990
15692
|
children: [
|
|
14991
|
-
quoteElementVisible ? /* @__PURE__ */
|
|
15693
|
+
quoteElementVisible ? /* @__PURE__ */ jsx133(
|
|
14992
15694
|
MenuItem,
|
|
14993
15695
|
{
|
|
14994
15696
|
onClick: () => {
|
|
14995
15697
|
onSelectElement("quote");
|
|
14996
15698
|
},
|
|
14997
|
-
icon: /* @__PURE__ */
|
|
15699
|
+
icon: /* @__PURE__ */ jsx133(Icon, { icon: "quote", iconColor: "currentColor" }),
|
|
14998
15700
|
children: "Quote"
|
|
14999
15701
|
}
|
|
15000
15702
|
) : null,
|
|
15001
|
-
codeElementVisible ? /* @__PURE__ */
|
|
15703
|
+
codeElementVisible ? /* @__PURE__ */ jsx133(
|
|
15002
15704
|
MenuItem,
|
|
15003
15705
|
{
|
|
15004
15706
|
onClick: () => {
|
|
15005
15707
|
onSelectElement("code");
|
|
15006
15708
|
},
|
|
15007
|
-
icon: /* @__PURE__ */
|
|
15709
|
+
icon: /* @__PURE__ */ jsx133(Icon, { icon: "code-slash", iconColor: "currentColor" }),
|
|
15008
15710
|
children: "Code"
|
|
15009
15711
|
}
|
|
15010
15712
|
) : null,
|
|
15011
|
-
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */
|
|
15713
|
+
tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ jsx133(
|
|
15012
15714
|
MenuItem,
|
|
15013
15715
|
{
|
|
15014
15716
|
onClick: () => {
|
|
15015
15717
|
onSelectElement("table");
|
|
15016
15718
|
},
|
|
15017
|
-
icon: /* @__PURE__ */
|
|
15719
|
+
icon: /* @__PURE__ */ jsx133(Icon, { icon: "view-grid", iconColor: "currentColor" }),
|
|
15018
15720
|
children: "Table"
|
|
15019
15721
|
}
|
|
15020
15722
|
) : null,
|
|
15021
|
-
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */
|
|
15723
|
+
assetElementVisible && onInsertAsset !== void 0 ? /* @__PURE__ */ jsx133(
|
|
15022
15724
|
MenuItem,
|
|
15023
15725
|
{
|
|
15024
15726
|
onClick: () => {
|
|
15025
15727
|
onSelectElement("asset");
|
|
15026
15728
|
},
|
|
15027
|
-
icon: /* @__PURE__ */
|
|
15729
|
+
icon: /* @__PURE__ */ jsx133(Icon, { icon: "image", iconColor: "currentColor" }),
|
|
15028
15730
|
children: "Asset"
|
|
15029
15731
|
}
|
|
15030
15732
|
) : null
|
|
@@ -15036,9 +15738,9 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
15036
15738
|
var RichTextToolbar_default = RichTextToolbar;
|
|
15037
15739
|
|
|
15038
15740
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15039
|
-
import { Fragment as Fragment18, jsx as
|
|
15741
|
+
import { Fragment as Fragment18, jsx as jsx134, jsxs as jsxs89 } from "@emotion/react/jsx-runtime";
|
|
15040
15742
|
var ParameterRichText = ({
|
|
15041
|
-
label,
|
|
15743
|
+
label: label2,
|
|
15042
15744
|
labelLeadingIcon,
|
|
15043
15745
|
hiddenLabel,
|
|
15044
15746
|
id,
|
|
@@ -15050,11 +15752,11 @@ var ParameterRichText = ({
|
|
|
15050
15752
|
children,
|
|
15051
15753
|
...innerProps
|
|
15052
15754
|
}) => {
|
|
15053
|
-
return /* @__PURE__ */
|
|
15755
|
+
return /* @__PURE__ */ jsxs89(
|
|
15054
15756
|
ParameterShell,
|
|
15055
15757
|
{
|
|
15056
15758
|
"data-testid": "parameter-richtext",
|
|
15057
|
-
label,
|
|
15759
|
+
label: label2,
|
|
15058
15760
|
hiddenLabel,
|
|
15059
15761
|
labelLeadingIcon,
|
|
15060
15762
|
id,
|
|
@@ -15064,13 +15766,13 @@ var ParameterRichText = ({
|
|
|
15064
15766
|
captionTestId,
|
|
15065
15767
|
menuItems,
|
|
15066
15768
|
children: [
|
|
15067
|
-
/* @__PURE__ */
|
|
15068
|
-
menuItems ? /* @__PURE__ */
|
|
15769
|
+
/* @__PURE__ */ jsx134(ParameterRichTextInner, { ...innerProps, children }),
|
|
15770
|
+
menuItems ? /* @__PURE__ */ jsx134(ParameterMenuButton, { label: `${label2} menu`, children: /* @__PURE__ */ jsx134(Fragment18, { children: menuItems }) }) : null
|
|
15069
15771
|
]
|
|
15070
15772
|
}
|
|
15071
15773
|
);
|
|
15072
15774
|
};
|
|
15073
|
-
var editorContainerWrapper =
|
|
15775
|
+
var editorContainerWrapper = css100`
|
|
15074
15776
|
position: relative;
|
|
15075
15777
|
|
|
15076
15778
|
&::before {
|
|
@@ -15086,12 +15788,12 @@ var editorContainerWrapper = css99`
|
|
|
15086
15788
|
z-index: 2;
|
|
15087
15789
|
}
|
|
15088
15790
|
`;
|
|
15089
|
-
var editorWrapper =
|
|
15791
|
+
var editorWrapper = css100`
|
|
15090
15792
|
display: flex;
|
|
15091
15793
|
flex-flow: column;
|
|
15092
15794
|
flex-grow: 1;
|
|
15093
15795
|
`;
|
|
15094
|
-
var editorContainer =
|
|
15796
|
+
var editorContainer = css100`
|
|
15095
15797
|
${scrollbarStyles}
|
|
15096
15798
|
background: var(--white);
|
|
15097
15799
|
border-radius: var(--rounded-sm);
|
|
@@ -15123,7 +15825,7 @@ var editorContainer = css99`
|
|
|
15123
15825
|
max-height: unset;
|
|
15124
15826
|
}
|
|
15125
15827
|
`;
|
|
15126
|
-
var editorContainerOverflowWrapper =
|
|
15828
|
+
var editorContainerOverflowWrapper = css100`
|
|
15127
15829
|
overflow: hidden;
|
|
15128
15830
|
pointer-events: none;
|
|
15129
15831
|
|
|
@@ -15131,7 +15833,7 @@ var editorContainerOverflowWrapper = css99`
|
|
|
15131
15833
|
pointer-events: auto;
|
|
15132
15834
|
}
|
|
15133
15835
|
`;
|
|
15134
|
-
var editorPlaceholder =
|
|
15836
|
+
var editorPlaceholder = css100`
|
|
15135
15837
|
color: var(--gray-500);
|
|
15136
15838
|
font-style: italic;
|
|
15137
15839
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -15142,7 +15844,7 @@ var editorPlaceholder = css99`
|
|
|
15142
15844
|
top: calc(1rem + var(--spacing-sm));
|
|
15143
15845
|
user-select: none;
|
|
15144
15846
|
`;
|
|
15145
|
-
var editorInput =
|
|
15847
|
+
var editorInput = css100`
|
|
15146
15848
|
min-height: 100%;
|
|
15147
15849
|
flex-grow: 1;
|
|
15148
15850
|
|
|
@@ -15215,8 +15917,8 @@ var ParameterRichTextInner = ({
|
|
|
15215
15917
|
},
|
|
15216
15918
|
editable: !richTextProps.readOnly
|
|
15217
15919
|
};
|
|
15218
|
-
return /* @__PURE__ */
|
|
15219
|
-
/* @__PURE__ */
|
|
15920
|
+
return /* @__PURE__ */ jsxs89(Fragment18, { children: [
|
|
15921
|
+
/* @__PURE__ */ jsx134("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx134(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx134(RichText, { ...richTextProps, children }) }) }),
|
|
15220
15922
|
editorFooter ? editorFooter : null
|
|
15221
15923
|
] });
|
|
15222
15924
|
};
|
|
@@ -15246,12 +15948,12 @@ var RichText = ({
|
|
|
15246
15948
|
placeholder
|
|
15247
15949
|
}) => {
|
|
15248
15950
|
const [editor] = useLexicalComposerContext9();
|
|
15249
|
-
|
|
15951
|
+
useEffect24(() => {
|
|
15250
15952
|
if (onRichTextInit) {
|
|
15251
15953
|
onRichTextInit(editor);
|
|
15252
15954
|
}
|
|
15253
15955
|
}, [editor, onRichTextInit]);
|
|
15254
|
-
|
|
15956
|
+
useEffect24(() => {
|
|
15255
15957
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
15256
15958
|
requestAnimationFrame(() => {
|
|
15257
15959
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -15268,23 +15970,23 @@ var RichText = ({
|
|
|
15268
15970
|
removeUpdateListener();
|
|
15269
15971
|
};
|
|
15270
15972
|
}, [editor, onChange]);
|
|
15271
|
-
|
|
15973
|
+
useEffect24(() => {
|
|
15272
15974
|
editor.setEditable(!readOnly);
|
|
15273
15975
|
}, [editor, readOnly]);
|
|
15274
|
-
const [editorContainerRef, setEditorContainerRef] =
|
|
15976
|
+
const [editorContainerRef, setEditorContainerRef] = useState21(null);
|
|
15275
15977
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
15276
15978
|
if (_editorContainerRef !== null) {
|
|
15277
15979
|
setEditorContainerRef(_editorContainerRef);
|
|
15278
15980
|
}
|
|
15279
15981
|
};
|
|
15280
|
-
const [portalContainerRef, setPortalContainerRef] =
|
|
15982
|
+
const [portalContainerRef, setPortalContainerRef] = useState21(null);
|
|
15281
15983
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
15282
15984
|
if (_portalContainerRef !== null) {
|
|
15283
15985
|
setPortalContainerRef(_portalContainerRef);
|
|
15284
15986
|
}
|
|
15285
15987
|
};
|
|
15286
|
-
return /* @__PURE__ */
|
|
15287
|
-
readOnly || minimalInteractivity ? null : /* @__PURE__ */
|
|
15988
|
+
return /* @__PURE__ */ jsxs89(Fragment18, { children: [
|
|
15989
|
+
readOnly || minimalInteractivity ? null : /* @__PURE__ */ jsx134(
|
|
15288
15990
|
RichTextToolbar_default,
|
|
15289
15991
|
{
|
|
15290
15992
|
config,
|
|
@@ -15293,8 +15995,8 @@ var RichText = ({
|
|
|
15293
15995
|
onInsertAsset
|
|
15294
15996
|
}
|
|
15295
15997
|
),
|
|
15296
|
-
/* @__PURE__ */
|
|
15297
|
-
/* @__PURE__ */
|
|
15998
|
+
/* @__PURE__ */ jsxs89("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
|
|
15999
|
+
/* @__PURE__ */ jsxs89(
|
|
15298
16000
|
"div",
|
|
15299
16001
|
{
|
|
15300
16002
|
css: editorContainer,
|
|
@@ -15302,33 +16004,33 @@ var RichText = ({
|
|
|
15302
16004
|
ref: onEditorContainerRef,
|
|
15303
16005
|
"data-testid": "value-container",
|
|
15304
16006
|
children: [
|
|
15305
|
-
/* @__PURE__ */
|
|
16007
|
+
/* @__PURE__ */ jsx134(
|
|
15306
16008
|
RichTextPlugin,
|
|
15307
16009
|
{
|
|
15308
|
-
contentEditable: /* @__PURE__ */
|
|
15309
|
-
placeholder: /* @__PURE__ */
|
|
16010
|
+
contentEditable: /* @__PURE__ */ jsx134(ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
16011
|
+
placeholder: /* @__PURE__ */ jsx134("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
|
|
15310
16012
|
ErrorBoundary: LexicalErrorBoundary
|
|
15311
16013
|
}
|
|
15312
16014
|
),
|
|
15313
|
-
/* @__PURE__ */
|
|
15314
|
-
/* @__PURE__ */
|
|
15315
|
-
/* @__PURE__ */
|
|
15316
|
-
/* @__PURE__ */
|
|
16015
|
+
/* @__PURE__ */ jsx134(ListPlugin, {}),
|
|
16016
|
+
/* @__PURE__ */ jsx134(ListIndentPlugin, { maxDepth: 4 }),
|
|
16017
|
+
/* @__PURE__ */ jsx134(TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
|
|
16018
|
+
/* @__PURE__ */ jsx134("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx134(
|
|
15317
16019
|
TableActionMenuPlugin,
|
|
15318
16020
|
{
|
|
15319
16021
|
positioningAnchorEl: editorContainerRef,
|
|
15320
16022
|
menuPortalEl: portalContainerRef
|
|
15321
16023
|
}
|
|
15322
16024
|
) : null }),
|
|
15323
|
-
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */
|
|
15324
|
-
readOnly ? null : /* @__PURE__ */
|
|
15325
|
-
/* @__PURE__ */
|
|
15326
|
-
/* @__PURE__ */
|
|
16025
|
+
editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx134(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
|
|
16026
|
+
readOnly ? null : /* @__PURE__ */ jsx134(HistoryPlugin, {}),
|
|
16027
|
+
/* @__PURE__ */ jsx134(DisableStylesPlugin, {}),
|
|
16028
|
+
/* @__PURE__ */ jsx134(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
|
|
15327
16029
|
]
|
|
15328
16030
|
}
|
|
15329
16031
|
),
|
|
15330
|
-
/* @__PURE__ */
|
|
15331
|
-
editorContainerRef ? /* @__PURE__ */
|
|
16032
|
+
/* @__PURE__ */ jsx134(Fragment18, { children }),
|
|
16033
|
+
editorContainerRef ? /* @__PURE__ */ jsx134(
|
|
15332
16034
|
LinkNodePlugin,
|
|
15333
16035
|
{
|
|
15334
16036
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -15339,37 +16041,37 @@ var RichText = ({
|
|
|
15339
16041
|
positioningAnchorEl: editorContainerRef
|
|
15340
16042
|
}
|
|
15341
16043
|
) : null,
|
|
15342
|
-
/* @__PURE__ */
|
|
15343
|
-
/* @__PURE__ */
|
|
16044
|
+
/* @__PURE__ */ jsx134(TableSelectionPlugin_default, {}),
|
|
16045
|
+
/* @__PURE__ */ jsx134(ImprovedAssetSelectionPlugin_default, {})
|
|
15344
16046
|
] })
|
|
15345
16047
|
] });
|
|
15346
16048
|
};
|
|
15347
16049
|
|
|
15348
16050
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
15349
|
-
import { forwardRef as
|
|
15350
|
-
import { jsx as
|
|
15351
|
-
var ParameterSelect =
|
|
16051
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
16052
|
+
import { jsx as jsx135, jsxs as jsxs90 } from "@emotion/react/jsx-runtime";
|
|
16053
|
+
var ParameterSelect = forwardRef28(
|
|
15352
16054
|
({ defaultOption, options, ...props }, ref) => {
|
|
15353
16055
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15354
|
-
return /* @__PURE__ */
|
|
16056
|
+
return /* @__PURE__ */ jsx135(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx135(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
15355
16057
|
}
|
|
15356
16058
|
);
|
|
15357
|
-
var ParameterSelectInner =
|
|
16059
|
+
var ParameterSelectInner = forwardRef28(
|
|
15358
16060
|
({ defaultOption, options, ...props }, ref) => {
|
|
15359
|
-
const { id, label, hiddenLabel } = useParameterShell();
|
|
15360
|
-
return /* @__PURE__ */
|
|
16061
|
+
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16062
|
+
return /* @__PURE__ */ jsxs90(
|
|
15361
16063
|
"select",
|
|
15362
16064
|
{
|
|
15363
16065
|
css: [input3, selectInput],
|
|
15364
16066
|
id,
|
|
15365
|
-
"aria-label": hiddenLabel && typeof
|
|
16067
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
15366
16068
|
ref,
|
|
15367
16069
|
...props,
|
|
15368
16070
|
children: [
|
|
15369
|
-
defaultOption ? /* @__PURE__ */
|
|
16071
|
+
defaultOption ? /* @__PURE__ */ jsx135("option", { value: "", children: defaultOption }) : null,
|
|
15370
16072
|
options.map((option) => {
|
|
15371
16073
|
var _a;
|
|
15372
|
-
return /* @__PURE__ */
|
|
16074
|
+
return /* @__PURE__ */ jsx135("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
15373
16075
|
})
|
|
15374
16076
|
]
|
|
15375
16077
|
}
|
|
@@ -15377,48 +16079,104 @@ var ParameterSelectInner = forwardRef26(
|
|
|
15377
16079
|
}
|
|
15378
16080
|
);
|
|
15379
16081
|
|
|
16082
|
+
// src/components/ParameterInputs/ParameterSelectSlider.tsx
|
|
16083
|
+
import { forwardRef as forwardRef29, useCallback as useCallback13, useMemo as useMemo9 } from "react";
|
|
16084
|
+
import { jsx as jsx136 } from "@emotion/react/jsx-runtime";
|
|
16085
|
+
var ParameterSelectSlider = forwardRef29(
|
|
16086
|
+
(props, ref) => {
|
|
16087
|
+
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16088
|
+
return /* @__PURE__ */ jsx136(ParameterShell, { "data-testid": "parameter-select-slider", ...shellProps, children: /* @__PURE__ */ jsx136(ParameterSelectSliderInner, { ref, ...innerProps }) });
|
|
16089
|
+
}
|
|
16090
|
+
);
|
|
16091
|
+
var ParameterSelectSliderInner = forwardRef29(({ options, value, onChange, ...props }, ref) => {
|
|
16092
|
+
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16093
|
+
const numericValue = useMemo9(() => {
|
|
16094
|
+
const index = options.findIndex((option) => option.value === value);
|
|
16095
|
+
return index >= 0 ? index : 0;
|
|
16096
|
+
}, [options, value]);
|
|
16097
|
+
const handleChange = useCallback13(
|
|
16098
|
+
(newIndex) => {
|
|
16099
|
+
const selectedOption = options[newIndex];
|
|
16100
|
+
if (selectedOption) {
|
|
16101
|
+
onChange(selectedOption.value);
|
|
16102
|
+
}
|
|
16103
|
+
},
|
|
16104
|
+
[options, onChange]
|
|
16105
|
+
);
|
|
16106
|
+
return /* @__PURE__ */ jsx136(
|
|
16107
|
+
Slider,
|
|
16108
|
+
{
|
|
16109
|
+
ref,
|
|
16110
|
+
id,
|
|
16111
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
16112
|
+
value: numericValue,
|
|
16113
|
+
onChange: handleChange,
|
|
16114
|
+
options,
|
|
16115
|
+
showNumberInput: false,
|
|
16116
|
+
...props
|
|
16117
|
+
}
|
|
16118
|
+
);
|
|
16119
|
+
});
|
|
16120
|
+
ParameterSelectSlider.displayName = "ParameterSelectSlider";
|
|
16121
|
+
ParameterSelectSliderInner.displayName = "ParameterSelectSliderInner";
|
|
16122
|
+
|
|
15380
16123
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
15381
|
-
import { forwardRef as
|
|
15382
|
-
import { jsx as
|
|
15383
|
-
var ParameterTextarea =
|
|
16124
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
16125
|
+
import { jsx as jsx137 } from "@emotion/react/jsx-runtime";
|
|
16126
|
+
var ParameterTextarea = forwardRef30((props, ref) => {
|
|
15384
16127
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15385
|
-
return /* @__PURE__ */
|
|
16128
|
+
return /* @__PURE__ */ jsx137(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx137(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
15386
16129
|
});
|
|
15387
|
-
var ParameterTextareaInner =
|
|
15388
|
-
const { id, label, hiddenLabel } = useParameterShell();
|
|
15389
|
-
return /* @__PURE__ */
|
|
16130
|
+
var ParameterTextareaInner = forwardRef30(({ ...props }, ref) => {
|
|
16131
|
+
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16132
|
+
return /* @__PURE__ */ jsx137(
|
|
15390
16133
|
"textarea",
|
|
15391
16134
|
{
|
|
15392
16135
|
css: [input3, textarea2],
|
|
15393
16136
|
id,
|
|
15394
16137
|
ref,
|
|
15395
|
-
"aria-label": hiddenLabel && typeof
|
|
16138
|
+
"aria-label": hiddenLabel && typeof label2 === "string" ? label2 : void 0,
|
|
15396
16139
|
...props
|
|
15397
16140
|
}
|
|
15398
16141
|
);
|
|
15399
16142
|
});
|
|
15400
16143
|
|
|
15401
16144
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
15402
|
-
import { forwardRef as
|
|
15403
|
-
import { jsx as
|
|
15404
|
-
var ParameterToggle =
|
|
16145
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
16146
|
+
import { jsx as jsx138, jsxs as jsxs91 } from "@emotion/react/jsx-runtime";
|
|
16147
|
+
var ParameterToggle = forwardRef31((props, ref) => {
|
|
15405
16148
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
15406
|
-
return /* @__PURE__ */
|
|
16149
|
+
return /* @__PURE__ */ jsx138(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx138(ParameterToggleInner, { ref, ...innerProps }) });
|
|
15407
16150
|
});
|
|
15408
|
-
|
|
16151
|
+
ParameterToggle.displayName = "ParameterToggle";
|
|
16152
|
+
var ParameterToggleInner = forwardRef31(
|
|
15409
16153
|
({ children, ...props }, ref) => {
|
|
15410
|
-
const {
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
/* @__PURE__ */
|
|
16154
|
+
const { type, withoutIndeterminateState, ...otherProps } = props;
|
|
16155
|
+
const { id, label: label2 } = useParameterShell();
|
|
16156
|
+
return /* @__PURE__ */ jsxs91("label", { css: inputToggleLabel2, children: [
|
|
16157
|
+
/* @__PURE__ */ jsx138(
|
|
16158
|
+
"input",
|
|
16159
|
+
{
|
|
16160
|
+
css: [
|
|
16161
|
+
toggleInput2,
|
|
16162
|
+
!props.withoutIndeterminateState ? toggleInputIndeterminateState : void 0
|
|
16163
|
+
],
|
|
16164
|
+
type,
|
|
16165
|
+
id,
|
|
16166
|
+
ref,
|
|
16167
|
+
...otherProps
|
|
16168
|
+
}
|
|
16169
|
+
),
|
|
16170
|
+
/* @__PURE__ */ jsx138("span", { css: inlineLabel2, children: label2 }),
|
|
15414
16171
|
children
|
|
15415
16172
|
] });
|
|
15416
16173
|
}
|
|
15417
16174
|
);
|
|
16175
|
+
ParameterToggleInner.displayName = "ParameterToggleInner";
|
|
15418
16176
|
|
|
15419
16177
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
15420
|
-
import { css as
|
|
15421
|
-
var
|
|
16178
|
+
import { css as css101, keyframes as keyframes4 } from "@emotion/react";
|
|
16179
|
+
var container4 = css101`
|
|
15422
16180
|
background: var(--gray-50);
|
|
15423
16181
|
margin-block: var(--spacing-sm);
|
|
15424
16182
|
position: relative;
|
|
@@ -15428,13 +16186,13 @@ var container3 = css100`
|
|
|
15428
16186
|
border: solid 1px var(--gray-300);
|
|
15429
16187
|
`;
|
|
15430
16188
|
var themeMap = {
|
|
15431
|
-
primary:
|
|
16189
|
+
primary: css101`
|
|
15432
16190
|
--progress-color: var(--accent-light);
|
|
15433
16191
|
`,
|
|
15434
|
-
secondary:
|
|
16192
|
+
secondary: css101`
|
|
15435
16193
|
--progress-color: var(--accent-alt-light);
|
|
15436
16194
|
`,
|
|
15437
|
-
destructive:
|
|
16195
|
+
destructive: css101`
|
|
15438
16196
|
--progress-color: var(--brand-secondary-5);
|
|
15439
16197
|
`
|
|
15440
16198
|
};
|
|
@@ -15446,10 +16204,10 @@ var slidingBackgroundPosition = keyframes4`
|
|
|
15446
16204
|
background-position: 64px 0;
|
|
15447
16205
|
}
|
|
15448
16206
|
`;
|
|
15449
|
-
var determinate =
|
|
16207
|
+
var determinate = css101`
|
|
15450
16208
|
background-color: var(--progress-color);
|
|
15451
16209
|
`;
|
|
15452
|
-
var indeterminate =
|
|
16210
|
+
var indeterminate = css101`
|
|
15453
16211
|
background-image: linear-gradient(
|
|
15454
16212
|
45deg,
|
|
15455
16213
|
var(--progress-color) 25%,
|
|
@@ -15463,7 +16221,7 @@ var indeterminate = css100`
|
|
|
15463
16221
|
background-size: 64px 64px;
|
|
15464
16222
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
15465
16223
|
`;
|
|
15466
|
-
var bar =
|
|
16224
|
+
var bar = css101`
|
|
15467
16225
|
position: absolute;
|
|
15468
16226
|
inset: 0;
|
|
15469
16227
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -15471,7 +16229,7 @@ var bar = css100`
|
|
|
15471
16229
|
`;
|
|
15472
16230
|
|
|
15473
16231
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
15474
|
-
import { jsx as
|
|
16232
|
+
import { jsx as jsx139 } from "@emotion/react/jsx-runtime";
|
|
15475
16233
|
function ProgressBar({
|
|
15476
16234
|
current,
|
|
15477
16235
|
max,
|
|
@@ -15481,10 +16239,10 @@ function ProgressBar({
|
|
|
15481
16239
|
}) {
|
|
15482
16240
|
const valueNow = Math.min(current, max);
|
|
15483
16241
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
15484
|
-
return /* @__PURE__ */
|
|
16242
|
+
return /* @__PURE__ */ jsx139(
|
|
15485
16243
|
"div",
|
|
15486
16244
|
{
|
|
15487
|
-
css:
|
|
16245
|
+
css: container4,
|
|
15488
16246
|
role: "progressbar",
|
|
15489
16247
|
"aria-busy": valuePercentage !== 100,
|
|
15490
16248
|
"aria-invalid": false,
|
|
@@ -15492,7 +16250,7 @@ function ProgressBar({
|
|
|
15492
16250
|
"aria-valuemax": max,
|
|
15493
16251
|
"aria-valuenow": valueNow,
|
|
15494
16252
|
...props,
|
|
15495
|
-
children: /* @__PURE__ */
|
|
16253
|
+
children: /* @__PURE__ */ jsx139(
|
|
15496
16254
|
"div",
|
|
15497
16255
|
{
|
|
15498
16256
|
css: [
|
|
@@ -15511,30 +16269,30 @@ function ProgressBar({
|
|
|
15511
16269
|
}
|
|
15512
16270
|
|
|
15513
16271
|
// src/components/ProgressList/ProgressList.tsx
|
|
15514
|
-
import { css as
|
|
16272
|
+
import { css as css103 } from "@emotion/react";
|
|
15515
16273
|
import { CgCheckO as CgCheckO2 } from "@react-icons/all-files/cg/CgCheckO";
|
|
15516
16274
|
import { CgRadioCheck } from "@react-icons/all-files/cg/CgRadioCheck";
|
|
15517
16275
|
import { CgRecord } from "@react-icons/all-files/cg/CgRecord";
|
|
15518
|
-
import { useMemo as
|
|
16276
|
+
import { useMemo as useMemo10 } from "react";
|
|
15519
16277
|
|
|
15520
16278
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
15521
|
-
import { css as
|
|
15522
|
-
var progressListStyles =
|
|
16279
|
+
import { css as css102 } from "@emotion/react";
|
|
16280
|
+
var progressListStyles = css102`
|
|
15523
16281
|
display: flex;
|
|
15524
16282
|
flex-direction: column;
|
|
15525
16283
|
gap: var(--spacing-sm);
|
|
15526
16284
|
list-style-type: none;
|
|
15527
16285
|
`;
|
|
15528
|
-
var progressListItemStyles =
|
|
16286
|
+
var progressListItemStyles = css102`
|
|
15529
16287
|
display: flex;
|
|
15530
16288
|
gap: var(--spacing-base);
|
|
15531
16289
|
align-items: center;
|
|
15532
16290
|
`;
|
|
15533
16291
|
|
|
15534
16292
|
// src/components/ProgressList/ProgressList.tsx
|
|
15535
|
-
import { jsx as
|
|
16293
|
+
import { jsx as jsx140, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
|
|
15536
16294
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
15537
|
-
const itemsWithStatus =
|
|
16295
|
+
const itemsWithStatus = useMemo10(() => {
|
|
15538
16296
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
15539
16297
|
return items.map((item, index) => {
|
|
15540
16298
|
let status = "queued";
|
|
@@ -15546,15 +16304,15 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
15546
16304
|
return { ...item, status };
|
|
15547
16305
|
});
|
|
15548
16306
|
}, [items, inProgressId]);
|
|
15549
|
-
return /* @__PURE__ */
|
|
15550
|
-
return /* @__PURE__ */
|
|
16307
|
+
return /* @__PURE__ */ jsx140("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label: label2, status, error, errorLevel }) => {
|
|
16308
|
+
return /* @__PURE__ */ jsx140(
|
|
15551
16309
|
ProgressListItem,
|
|
15552
16310
|
{
|
|
15553
16311
|
status,
|
|
15554
16312
|
error,
|
|
15555
16313
|
errorLevel,
|
|
15556
16314
|
autoEllipsis,
|
|
15557
|
-
children:
|
|
16315
|
+
children: label2
|
|
15558
16316
|
},
|
|
15559
16317
|
id
|
|
15560
16318
|
);
|
|
@@ -15567,7 +16325,7 @@ var ProgressListItem = ({
|
|
|
15567
16325
|
errorLevel = "danger",
|
|
15568
16326
|
autoEllipsis = false
|
|
15569
16327
|
}) => {
|
|
15570
|
-
const icon =
|
|
16328
|
+
const icon = useMemo10(() => {
|
|
15571
16329
|
if (error) {
|
|
15572
16330
|
return warningIcon;
|
|
15573
16331
|
}
|
|
@@ -15578,14 +16336,14 @@ var ProgressListItem = ({
|
|
|
15578
16336
|
};
|
|
15579
16337
|
return iconPerStatus[status];
|
|
15580
16338
|
}, [status, error]);
|
|
15581
|
-
const statusStyles =
|
|
16339
|
+
const statusStyles = useMemo10(() => {
|
|
15582
16340
|
if (error) {
|
|
15583
|
-
return errorLevel === "caution" ?
|
|
16341
|
+
return errorLevel === "caution" ? css103`
|
|
15584
16342
|
color: rgb(161, 98, 7);
|
|
15585
16343
|
& svg {
|
|
15586
16344
|
color: rgb(250, 204, 21);
|
|
15587
16345
|
}
|
|
15588
|
-
` :
|
|
16346
|
+
` : css103`
|
|
15589
16347
|
color: rgb(185, 28, 28);
|
|
15590
16348
|
& svg {
|
|
15591
16349
|
color: var(--brand-primary-2);
|
|
@@ -15593,38 +16351,38 @@ var ProgressListItem = ({
|
|
|
15593
16351
|
`;
|
|
15594
16352
|
}
|
|
15595
16353
|
const colorPerStatus = {
|
|
15596
|
-
completed:
|
|
16354
|
+
completed: css103`
|
|
15597
16355
|
opacity: 0.75;
|
|
15598
16356
|
`,
|
|
15599
|
-
inProgress:
|
|
16357
|
+
inProgress: css103`
|
|
15600
16358
|
-webkit-text-stroke-width: thin;
|
|
15601
16359
|
`,
|
|
15602
|
-
queued:
|
|
16360
|
+
queued: css103`
|
|
15603
16361
|
opacity: 0.5;
|
|
15604
16362
|
`
|
|
15605
16363
|
};
|
|
15606
16364
|
return colorPerStatus[status];
|
|
15607
16365
|
}, [status, error, errorLevel]);
|
|
15608
|
-
return /* @__PURE__ */
|
|
15609
|
-
/* @__PURE__ */
|
|
15610
|
-
/* @__PURE__ */
|
|
16366
|
+
return /* @__PURE__ */ jsxs92("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
16367
|
+
/* @__PURE__ */ jsx140(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ jsx140("div", { children: /* @__PURE__ */ jsx140(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
16368
|
+
/* @__PURE__ */ jsxs92("div", { children: [
|
|
15611
16369
|
children,
|
|
15612
|
-
/* @__PURE__ */
|
|
16370
|
+
/* @__PURE__ */ jsx140("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
15613
16371
|
] })
|
|
15614
16372
|
] });
|
|
15615
16373
|
};
|
|
15616
16374
|
|
|
15617
16375
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
15618
|
-
import { css as
|
|
16376
|
+
import { css as css105 } from "@emotion/react";
|
|
15619
16377
|
import { CgCheck as CgCheck5 } from "@react-icons/all-files/cg/CgCheck";
|
|
15620
|
-
import { useCallback as
|
|
16378
|
+
import { useCallback as useCallback14, useEffect as useEffect25, useMemo as useMemo11, useRef as useRef13, useState as useState22 } from "react";
|
|
15621
16379
|
|
|
15622
16380
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
15623
|
-
import { css as
|
|
15624
|
-
var segmentedControlRootStyles =
|
|
16381
|
+
import { css as css104 } from "@emotion/react";
|
|
16382
|
+
var segmentedControlRootStyles = css104`
|
|
15625
16383
|
position: relative;
|
|
15626
16384
|
`;
|
|
15627
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
16385
|
+
var segmentedControlScrollIndicatorsStyles = css104`
|
|
15628
16386
|
position: absolute;
|
|
15629
16387
|
inset: 0;
|
|
15630
16388
|
z-index: 1;
|
|
@@ -15652,17 +16410,17 @@ var segmentedControlScrollIndicatorsStyles = css103`
|
|
|
15652
16410
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
15653
16411
|
}
|
|
15654
16412
|
`;
|
|
15655
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
16413
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = css104`
|
|
15656
16414
|
&::before {
|
|
15657
16415
|
opacity: 1;
|
|
15658
16416
|
}
|
|
15659
16417
|
`;
|
|
15660
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
16418
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = css104`
|
|
15661
16419
|
&::after {
|
|
15662
16420
|
opacity: 1;
|
|
15663
16421
|
}
|
|
15664
16422
|
`;
|
|
15665
|
-
var segmentedControlWrapperStyles =
|
|
16423
|
+
var segmentedControlWrapperStyles = css104`
|
|
15666
16424
|
overflow-y: auto;
|
|
15667
16425
|
scroll-behavior: smooth;
|
|
15668
16426
|
scrollbar-width: none;
|
|
@@ -15671,7 +16429,7 @@ var segmentedControlWrapperStyles = css103`
|
|
|
15671
16429
|
height: 0px;
|
|
15672
16430
|
}
|
|
15673
16431
|
`;
|
|
15674
|
-
var segmentedControlStyles =
|
|
16432
|
+
var segmentedControlStyles = css104`
|
|
15675
16433
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
15676
16434
|
--segmented-control-border-width: 1px;
|
|
15677
16435
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -15690,14 +16448,14 @@ var segmentedControlStyles = css103`
|
|
|
15690
16448
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
15691
16449
|
font-size: var(--fs-xs);
|
|
15692
16450
|
`;
|
|
15693
|
-
var segmentedControlVerticalStyles =
|
|
16451
|
+
var segmentedControlVerticalStyles = css104`
|
|
15694
16452
|
flex-direction: column;
|
|
15695
16453
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
15696
16454
|
var(--segmented-control-rounded-value) 0 0;
|
|
15697
16455
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
15698
16456
|
var(--segmented-control-rounded-value);
|
|
15699
16457
|
`;
|
|
15700
|
-
var segmentedControlItemStyles =
|
|
16458
|
+
var segmentedControlItemStyles = css104`
|
|
15701
16459
|
&:first-of-type label {
|
|
15702
16460
|
border-radius: var(--segmented-control-first-border-radius);
|
|
15703
16461
|
}
|
|
@@ -15705,10 +16463,10 @@ var segmentedControlItemStyles = css103`
|
|
|
15705
16463
|
border-radius: var(--segmented-control-last-border-radius);
|
|
15706
16464
|
}
|
|
15707
16465
|
`;
|
|
15708
|
-
var segmentedControlInputStyles =
|
|
16466
|
+
var segmentedControlInputStyles = css104`
|
|
15709
16467
|
${accessibleHidden}
|
|
15710
16468
|
`;
|
|
15711
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
16469
|
+
var segmentedControlLabelStyles = (checked, disabled2) => css104`
|
|
15712
16470
|
position: relative;
|
|
15713
16471
|
display: flex;
|
|
15714
16472
|
align-items: center;
|
|
@@ -15772,25 +16530,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => css103`
|
|
|
15772
16530
|
`}
|
|
15773
16531
|
}
|
|
15774
16532
|
`;
|
|
15775
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
16533
|
+
var segmentedControlLabelIconOnlyStyles = css104`
|
|
15776
16534
|
padding-inline: 0.5em;
|
|
15777
16535
|
`;
|
|
15778
|
-
var segmentedControlLabelCheckStyles =
|
|
16536
|
+
var segmentedControlLabelCheckStyles = css104`
|
|
15779
16537
|
opacity: 0.5;
|
|
15780
16538
|
`;
|
|
15781
|
-
var segmentedControlLabelContentStyles =
|
|
16539
|
+
var segmentedControlLabelContentStyles = css104`
|
|
15782
16540
|
display: flex;
|
|
15783
16541
|
align-items: center;
|
|
15784
16542
|
justify-content: center;
|
|
15785
16543
|
gap: var(--spacing-sm);
|
|
15786
16544
|
height: 100%;
|
|
15787
16545
|
`;
|
|
15788
|
-
var segmentedControlLabelTextStyles =
|
|
16546
|
+
var segmentedControlLabelTextStyles = css104`
|
|
15789
16547
|
white-space: nowrap;
|
|
15790
16548
|
`;
|
|
15791
16549
|
|
|
15792
16550
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
15793
|
-
import { jsx as
|
|
16551
|
+
import { jsx as jsx141, jsxs as jsxs93 } from "@emotion/react/jsx-runtime";
|
|
15794
16552
|
var SegmentedControl = ({
|
|
15795
16553
|
name,
|
|
15796
16554
|
options,
|
|
@@ -15805,10 +16563,10 @@ var SegmentedControl = ({
|
|
|
15805
16563
|
currentBackgroundColor = "white",
|
|
15806
16564
|
...props
|
|
15807
16565
|
}) => {
|
|
15808
|
-
const wrapperRef =
|
|
15809
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] =
|
|
15810
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] =
|
|
15811
|
-
const onOptionChange =
|
|
16566
|
+
const wrapperRef = useRef13(null);
|
|
16567
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState22(false);
|
|
16568
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState22(false);
|
|
16569
|
+
const onOptionChange = useCallback14(
|
|
15812
16570
|
(event) => {
|
|
15813
16571
|
if (event.target.checked) {
|
|
15814
16572
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -15816,19 +16574,19 @@ var SegmentedControl = ({
|
|
|
15816
16574
|
},
|
|
15817
16575
|
[options, onChange]
|
|
15818
16576
|
);
|
|
15819
|
-
const sizeStyles =
|
|
16577
|
+
const sizeStyles = useMemo11(() => {
|
|
15820
16578
|
const map = {
|
|
15821
|
-
sm:
|
|
15822
|
-
md:
|
|
15823
|
-
lg:
|
|
15824
|
-
xl:
|
|
16579
|
+
sm: css105({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
16580
|
+
md: css105({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
16581
|
+
lg: css105({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
16582
|
+
xl: css105({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
15825
16583
|
};
|
|
15826
16584
|
return map[size];
|
|
15827
16585
|
}, [size]);
|
|
15828
|
-
const isIconOnly =
|
|
16586
|
+
const isIconOnly = useMemo11(() => {
|
|
15829
16587
|
return options.every((option) => option && option.icon && !option.label);
|
|
15830
16588
|
}, [options]);
|
|
15831
|
-
|
|
16589
|
+
useEffect25(() => {
|
|
15832
16590
|
const wrapperElement = wrapperRef.current;
|
|
15833
16591
|
const onScroll = () => {
|
|
15834
16592
|
if (!wrapperElement) {
|
|
@@ -15849,8 +16607,8 @@ var SegmentedControl = ({
|
|
|
15849
16607
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
15850
16608
|
};
|
|
15851
16609
|
}, []);
|
|
15852
|
-
return /* @__PURE__ */
|
|
15853
|
-
/* @__PURE__ */
|
|
16610
|
+
return /* @__PURE__ */ jsxs93("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
16611
|
+
/* @__PURE__ */ jsx141("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ jsx141(
|
|
15854
16612
|
"div",
|
|
15855
16613
|
{
|
|
15856
16614
|
css: [
|
|
@@ -15867,12 +16625,12 @@ var SegmentedControl = ({
|
|
|
15867
16625
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
15868
16626
|
const isDisabled = disabled2 || option.disabled;
|
|
15869
16627
|
const isChecked = option.value === value;
|
|
15870
|
-
return /* @__PURE__ */
|
|
16628
|
+
return /* @__PURE__ */ jsx141(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx141(
|
|
15871
16629
|
"div",
|
|
15872
16630
|
{
|
|
15873
16631
|
css: segmentedControlItemStyles,
|
|
15874
16632
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
15875
|
-
children: /* @__PURE__ */
|
|
16633
|
+
children: /* @__PURE__ */ jsxs93(
|
|
15876
16634
|
"label",
|
|
15877
16635
|
{
|
|
15878
16636
|
css: [
|
|
@@ -15881,7 +16639,7 @@ var SegmentedControl = ({
|
|
|
15881
16639
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
15882
16640
|
],
|
|
15883
16641
|
children: [
|
|
15884
|
-
/* @__PURE__ */
|
|
16642
|
+
/* @__PURE__ */ jsx141(
|
|
15885
16643
|
"input",
|
|
15886
16644
|
{
|
|
15887
16645
|
css: segmentedControlInputStyles,
|
|
@@ -15893,10 +16651,10 @@ var SegmentedControl = ({
|
|
|
15893
16651
|
disabled: isDisabled
|
|
15894
16652
|
}
|
|
15895
16653
|
),
|
|
15896
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */
|
|
15897
|
-
/* @__PURE__ */
|
|
15898
|
-
!option.icon ? null : /* @__PURE__ */
|
|
15899
|
-
!text || hideOptionText ? null : /* @__PURE__ */
|
|
16654
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx141(CgCheck5, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
16655
|
+
/* @__PURE__ */ jsxs93("span", { css: segmentedControlLabelContentStyles, children: [
|
|
16656
|
+
!option.icon ? null : /* @__PURE__ */ jsx141(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
16657
|
+
!text || hideOptionText ? null : /* @__PURE__ */ jsx141("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
15900
16658
|
] })
|
|
15901
16659
|
]
|
|
15902
16660
|
}
|
|
@@ -15906,7 +16664,7 @@ var SegmentedControl = ({
|
|
|
15906
16664
|
})
|
|
15907
16665
|
}
|
|
15908
16666
|
) }),
|
|
15909
|
-
/* @__PURE__ */
|
|
16667
|
+
/* @__PURE__ */ jsx141(
|
|
15910
16668
|
"div",
|
|
15911
16669
|
{
|
|
15912
16670
|
css: [
|
|
@@ -15920,18 +16678,18 @@ var SegmentedControl = ({
|
|
|
15920
16678
|
};
|
|
15921
16679
|
|
|
15922
16680
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
15923
|
-
import { css as
|
|
16681
|
+
import { css as css106, keyframes as keyframes5 } from "@emotion/react";
|
|
15924
16682
|
var lightFadingOut = keyframes5`
|
|
15925
16683
|
from { opacity: 0.1; }
|
|
15926
16684
|
to { opacity: 0.025; }
|
|
15927
16685
|
`;
|
|
15928
|
-
var skeletonStyles =
|
|
16686
|
+
var skeletonStyles = css106`
|
|
15929
16687
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
15930
16688
|
background-color: var(--gray-900);
|
|
15931
16689
|
`;
|
|
15932
16690
|
|
|
15933
16691
|
// src/components/Skeleton/Skeleton.tsx
|
|
15934
|
-
import { jsx as
|
|
16692
|
+
import { jsx as jsx142 } from "@emotion/react/jsx-runtime";
|
|
15935
16693
|
var Skeleton = ({
|
|
15936
16694
|
width = "100%",
|
|
15937
16695
|
height = "1.25rem",
|
|
@@ -15939,7 +16697,7 @@ var Skeleton = ({
|
|
|
15939
16697
|
circle = false,
|
|
15940
16698
|
children,
|
|
15941
16699
|
...otherProps
|
|
15942
|
-
}) => /* @__PURE__ */
|
|
16700
|
+
}) => /* @__PURE__ */ jsx142(
|
|
15943
16701
|
"div",
|
|
15944
16702
|
{
|
|
15945
16703
|
css: [
|
|
@@ -15959,11 +16717,11 @@ var Skeleton = ({
|
|
|
15959
16717
|
);
|
|
15960
16718
|
|
|
15961
16719
|
// src/components/Spinner/Spinner.tsx
|
|
15962
|
-
import { useEffect as
|
|
16720
|
+
import { useEffect as useEffect26, useRef as useRef14 } from "react";
|
|
15963
16721
|
|
|
15964
16722
|
// src/components/Spinner/Spinner.styles.ts
|
|
15965
|
-
import { css as
|
|
15966
|
-
var SpinnerStyles =
|
|
16723
|
+
import { css as css107 } from "@emotion/react";
|
|
16724
|
+
var SpinnerStyles = css107`
|
|
15967
16725
|
--color: #00b4ff;
|
|
15968
16726
|
--speed: 5s;
|
|
15969
16727
|
--red: rgb(218, 63, 50);
|
|
@@ -16393,22 +17151,22 @@ var SpinnerStyles = css106`
|
|
|
16393
17151
|
`;
|
|
16394
17152
|
|
|
16395
17153
|
// src/components/Spinner/Spinner.tsx
|
|
16396
|
-
import { jsx as
|
|
17154
|
+
import { jsx as jsx143, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
|
|
16397
17155
|
var Spinner = ({
|
|
16398
17156
|
width,
|
|
16399
|
-
label,
|
|
17157
|
+
label: label2,
|
|
16400
17158
|
isPaused
|
|
16401
17159
|
}) => {
|
|
16402
|
-
const ref =
|
|
16403
|
-
|
|
17160
|
+
const ref = useRef14(null);
|
|
17161
|
+
useEffect26(() => {
|
|
16404
17162
|
var _a, _b, _c;
|
|
16405
17163
|
(_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");
|
|
16406
17164
|
}, [width]);
|
|
16407
|
-
return /* @__PURE__ */
|
|
17165
|
+
return /* @__PURE__ */ jsxs94(
|
|
16408
17166
|
"div",
|
|
16409
17167
|
{
|
|
16410
17168
|
ref,
|
|
16411
|
-
"aria-label":
|
|
17169
|
+
"aria-label": label2,
|
|
16412
17170
|
style: {
|
|
16413
17171
|
width: typeof width === "number" ? `${width}px` : width,
|
|
16414
17172
|
height: typeof width === "number" ? `${width}px` : width
|
|
@@ -16416,51 +17174,51 @@ var Spinner = ({
|
|
|
16416
17174
|
css: SpinnerStyles,
|
|
16417
17175
|
className: `container${isPaused ? " paused" : ""}`,
|
|
16418
17176
|
children: [
|
|
16419
|
-
/* @__PURE__ */
|
|
16420
|
-
/* @__PURE__ */
|
|
16421
|
-
/* @__PURE__ */
|
|
16422
|
-
/* @__PURE__ */
|
|
16423
|
-
/* @__PURE__ */
|
|
16424
|
-
/* @__PURE__ */
|
|
16425
|
-
/* @__PURE__ */
|
|
16426
|
-
/* @__PURE__ */
|
|
16427
|
-
/* @__PURE__ */
|
|
16428
|
-
/* @__PURE__ */
|
|
17177
|
+
/* @__PURE__ */ jsx143("div", { className: "pyramid-container", children: /* @__PURE__ */ jsxs94("div", { className: "pyramid top", children: [
|
|
17178
|
+
/* @__PURE__ */ jsx143("div", { className: "side one" }),
|
|
17179
|
+
/* @__PURE__ */ jsx143("div", { className: "side two" }),
|
|
17180
|
+
/* @__PURE__ */ jsx143("div", { className: "side three" }),
|
|
17181
|
+
/* @__PURE__ */ jsx143("div", { className: "side four" }),
|
|
17182
|
+
/* @__PURE__ */ jsxs94("div", { className: "bottom-pyramid", children: [
|
|
17183
|
+
/* @__PURE__ */ jsx143("div", { className: "side five" }),
|
|
17184
|
+
/* @__PURE__ */ jsx143("div", { className: "side six" }),
|
|
17185
|
+
/* @__PURE__ */ jsx143("div", { className: "side seven" }),
|
|
17186
|
+
/* @__PURE__ */ jsx143("div", { className: "side eight" })
|
|
16429
17187
|
] })
|
|
16430
17188
|
] }) }),
|
|
16431
|
-
/* @__PURE__ */
|
|
16432
|
-
/* @__PURE__ */
|
|
16433
|
-
/* @__PURE__ */
|
|
16434
|
-
/* @__PURE__ */
|
|
16435
|
-
/* @__PURE__ */
|
|
16436
|
-
/* @__PURE__ */
|
|
16437
|
-
/* @__PURE__ */
|
|
17189
|
+
/* @__PURE__ */ jsx143("div", { className: "turning-circle" }),
|
|
17190
|
+
/* @__PURE__ */ jsxs94("div", { className: "pulsating-star delay-top-right", children: [
|
|
17191
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-center" }),
|
|
17192
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-top" }),
|
|
17193
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-bottom" }),
|
|
17194
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-left" }),
|
|
17195
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-right" })
|
|
16438
17196
|
] }),
|
|
16439
|
-
/* @__PURE__ */
|
|
16440
|
-
/* @__PURE__ */
|
|
16441
|
-
/* @__PURE__ */
|
|
16442
|
-
/* @__PURE__ */
|
|
16443
|
-
/* @__PURE__ */
|
|
16444
|
-
/* @__PURE__ */
|
|
17197
|
+
/* @__PURE__ */ jsxs94("div", { className: "pulsating-star delay-top-left-2", children: [
|
|
17198
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-center" }),
|
|
17199
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-top" }),
|
|
17200
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-bottom" }),
|
|
17201
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-left" }),
|
|
17202
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-right" })
|
|
16445
17203
|
] }),
|
|
16446
|
-
/* @__PURE__ */
|
|
16447
|
-
/* @__PURE__ */
|
|
16448
|
-
/* @__PURE__ */
|
|
16449
|
-
/* @__PURE__ */
|
|
16450
|
-
/* @__PURE__ */
|
|
17204
|
+
/* @__PURE__ */ jsxs94("div", { className: "pulsating-star delay-top-left", children: [
|
|
17205
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-top" }),
|
|
17206
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-bottom" }),
|
|
17207
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-left" }),
|
|
17208
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-right" })
|
|
16451
17209
|
] }),
|
|
16452
|
-
/* @__PURE__ */
|
|
16453
|
-
/* @__PURE__ */
|
|
16454
|
-
/* @__PURE__ */
|
|
16455
|
-
/* @__PURE__ */
|
|
16456
|
-
/* @__PURE__ */
|
|
17210
|
+
/* @__PURE__ */ jsxs94("div", { className: "pulsating-star delay-bottom-right", children: [
|
|
17211
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-top" }),
|
|
17212
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-bottom" }),
|
|
17213
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-left" }),
|
|
17214
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-right" })
|
|
16457
17215
|
] }),
|
|
16458
|
-
/* @__PURE__ */
|
|
16459
|
-
/* @__PURE__ */
|
|
16460
|
-
/* @__PURE__ */
|
|
16461
|
-
/* @__PURE__ */
|
|
16462
|
-
/* @__PURE__ */
|
|
16463
|
-
/* @__PURE__ */
|
|
17216
|
+
/* @__PURE__ */ jsxs94("div", { className: "pulsating-star delay-bottom-left", children: [
|
|
17217
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-center" }),
|
|
17218
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-top" }),
|
|
17219
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-bottom" }),
|
|
17220
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-left" }),
|
|
17221
|
+
/* @__PURE__ */ jsx143("div", { className: "star-inner star-right" })
|
|
16464
17222
|
] })
|
|
16465
17223
|
]
|
|
16466
17224
|
}
|
|
@@ -16468,11 +17226,11 @@ var Spinner = ({
|
|
|
16468
17226
|
};
|
|
16469
17227
|
|
|
16470
17228
|
// src/components/Switch/Switch.tsx
|
|
16471
|
-
import { forwardRef as
|
|
17229
|
+
import { forwardRef as forwardRef32, useMemo as useMemo12 } from "react";
|
|
16472
17230
|
|
|
16473
17231
|
// src/components/Switch/Switch.styles.ts
|
|
16474
|
-
import { css as
|
|
16475
|
-
var SwitchInputContainer =
|
|
17232
|
+
import { css as css108 } from "@emotion/react";
|
|
17233
|
+
var SwitchInputContainer = css108`
|
|
16476
17234
|
cursor: pointer;
|
|
16477
17235
|
display: inline-flex;
|
|
16478
17236
|
position: relative;
|
|
@@ -16482,7 +17240,7 @@ var SwitchInputContainer = css107`
|
|
|
16482
17240
|
user-select: none;
|
|
16483
17241
|
z-index: 0;
|
|
16484
17242
|
`;
|
|
16485
|
-
var SwitchInput = (size) =>
|
|
17243
|
+
var SwitchInput = (size) => css108`
|
|
16486
17244
|
appearance: none;
|
|
16487
17245
|
border-radius: var(--rounded-full);
|
|
16488
17246
|
background-color: var(--white);
|
|
@@ -16521,18 +17279,18 @@ var SwitchInput = (size) => css107`
|
|
|
16521
17279
|
cursor: not-allowed;
|
|
16522
17280
|
}
|
|
16523
17281
|
`;
|
|
16524
|
-
var SwitchInputCheckedDirectionLeft =
|
|
17282
|
+
var SwitchInputCheckedDirectionLeft = css108`
|
|
16525
17283
|
&:checked {
|
|
16526
17284
|
transform: translateX(var(--spacing-base));
|
|
16527
17285
|
}
|
|
16528
17286
|
`;
|
|
16529
|
-
var SwitchInputCheckedDirectionRight =
|
|
17287
|
+
var SwitchInputCheckedDirectionRight = css108`
|
|
16530
17288
|
transform: translateX(-var(--spacing-base));
|
|
16531
17289
|
&:checked {
|
|
16532
17290
|
transform: translateX(0);
|
|
16533
17291
|
}
|
|
16534
17292
|
`;
|
|
16535
|
-
var SwitchInputDisabled =
|
|
17293
|
+
var SwitchInputDisabled = css108`
|
|
16536
17294
|
opacity: var(--opacity-50);
|
|
16537
17295
|
cursor: not-allowed;
|
|
16538
17296
|
|
|
@@ -16540,19 +17298,19 @@ var SwitchInputDisabled = css107`
|
|
|
16540
17298
|
cursor: not-allowed;
|
|
16541
17299
|
}
|
|
16542
17300
|
`;
|
|
16543
|
-
var SwitchInputLabelAlignmentLeft = (size) =>
|
|
17301
|
+
var SwitchInputLabelAlignmentLeft = (size) => css108`
|
|
16544
17302
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
16545
17303
|
&:before {
|
|
16546
17304
|
left: 0;
|
|
16547
17305
|
}
|
|
16548
17306
|
`;
|
|
16549
|
-
var SwitchInputLabelAlignmentRight = (size) =>
|
|
17307
|
+
var SwitchInputLabelAlignmentRight = (size) => css108`
|
|
16550
17308
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
16551
17309
|
&:before {
|
|
16552
17310
|
right: 0;
|
|
16553
17311
|
}
|
|
16554
17312
|
`;
|
|
16555
|
-
var SwitchInputLabel = (size) =>
|
|
17313
|
+
var SwitchInputLabel = (size) => css108`
|
|
16556
17314
|
align-items: center;
|
|
16557
17315
|
color: var(--typography-base);
|
|
16558
17316
|
display: inline-flex;
|
|
@@ -16572,28 +17330,28 @@ var SwitchInputLabel = (size) => css107`
|
|
|
16572
17330
|
top: 0;
|
|
16573
17331
|
}
|
|
16574
17332
|
`;
|
|
16575
|
-
var SwitchTextAlignmentLeft = (size) =>
|
|
17333
|
+
var SwitchTextAlignmentLeft = (size) => css108`
|
|
16576
17334
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
16577
17335
|
`;
|
|
16578
|
-
var SwitchTextAlignmentRight = (size) =>
|
|
17336
|
+
var SwitchTextAlignmentRight = (size) => css108`
|
|
16579
17337
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
16580
17338
|
`;
|
|
16581
|
-
var SwitchText =
|
|
17339
|
+
var SwitchText = css108`
|
|
16582
17340
|
color: var(--gray-500);
|
|
16583
17341
|
font-size: var(--fs-sm);
|
|
16584
17342
|
`;
|
|
16585
|
-
var SwitchInputContainerAlignmentLeft =
|
|
17343
|
+
var SwitchInputContainerAlignmentLeft = css108`
|
|
16586
17344
|
flex-direction: row;
|
|
16587
17345
|
`;
|
|
16588
|
-
var SwitchInputContainerAlignmentRight =
|
|
17346
|
+
var SwitchInputContainerAlignmentRight = css108`
|
|
16589
17347
|
flex-direction: row-reverse;
|
|
16590
17348
|
`;
|
|
16591
17349
|
|
|
16592
17350
|
// src/components/Switch/Switch.tsx
|
|
16593
|
-
import { Fragment as Fragment19, jsx as
|
|
16594
|
-
var Switch =
|
|
17351
|
+
import { Fragment as Fragment19, jsx as jsx144, jsxs as jsxs95 } from "@emotion/react/jsx-runtime";
|
|
17352
|
+
var Switch = forwardRef32(
|
|
16595
17353
|
({
|
|
16596
|
-
label,
|
|
17354
|
+
label: label2,
|
|
16597
17355
|
infoText,
|
|
16598
17356
|
toggleText,
|
|
16599
17357
|
children,
|
|
@@ -16602,7 +17360,7 @@ var Switch = forwardRef29(
|
|
|
16602
17360
|
...inputProps
|
|
16603
17361
|
}, ref) => {
|
|
16604
17362
|
let additionalText = infoText;
|
|
16605
|
-
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } =
|
|
17363
|
+
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = useMemo12(() => {
|
|
16606
17364
|
if (alignment === "left") {
|
|
16607
17365
|
return {
|
|
16608
17366
|
SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
|
|
@@ -16619,8 +17377,8 @@ var Switch = forwardRef29(
|
|
|
16619
17377
|
if (infoText && toggleText) {
|
|
16620
17378
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
16621
17379
|
}
|
|
16622
|
-
return /* @__PURE__ */
|
|
16623
|
-
/* @__PURE__ */
|
|
17380
|
+
return /* @__PURE__ */ jsxs95(Fragment19, { children: [
|
|
17381
|
+
/* @__PURE__ */ jsxs95(
|
|
16624
17382
|
"label",
|
|
16625
17383
|
{
|
|
16626
17384
|
css: [
|
|
@@ -16630,7 +17388,7 @@ var Switch = forwardRef29(
|
|
|
16630
17388
|
inputProps.disabled ? SwitchInputDisabled : void 0
|
|
16631
17389
|
],
|
|
16632
17390
|
children: [
|
|
16633
|
-
/* @__PURE__ */
|
|
17391
|
+
/* @__PURE__ */ jsx144(
|
|
16634
17392
|
"input",
|
|
16635
17393
|
{
|
|
16636
17394
|
type: "checkbox",
|
|
@@ -16639,11 +17397,11 @@ var Switch = forwardRef29(
|
|
|
16639
17397
|
ref
|
|
16640
17398
|
}
|
|
16641
17399
|
),
|
|
16642
|
-
/* @__PURE__ */
|
|
17400
|
+
/* @__PURE__ */ jsx144("span", { css: [SwitchInputLabel(switchSize), SwitchInputLabelAlignment], children: label2 })
|
|
16643
17401
|
]
|
|
16644
17402
|
}
|
|
16645
17403
|
),
|
|
16646
|
-
additionalText ? /* @__PURE__ */
|
|
17404
|
+
additionalText ? /* @__PURE__ */ jsx144(
|
|
16647
17405
|
"p",
|
|
16648
17406
|
{
|
|
16649
17407
|
css: [
|
|
@@ -16659,8 +17417,8 @@ var Switch = forwardRef29(
|
|
|
16659
17417
|
);
|
|
16660
17418
|
|
|
16661
17419
|
// src/components/Table/Table.styles.ts
|
|
16662
|
-
import { css as
|
|
16663
|
-
var table = ({ cellPadding = "var(--spacing-sm)" }) =>
|
|
17420
|
+
import { css as css109 } from "@emotion/react";
|
|
17421
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => css109`
|
|
16664
17422
|
border-bottom: 1px solid var(--gray-400);
|
|
16665
17423
|
border-collapse: collapse;
|
|
16666
17424
|
min-width: 100%;
|
|
@@ -16680,21 +17438,21 @@ var table = ({ cellPadding = "var(--spacing-sm)" }) => css108`
|
|
|
16680
17438
|
background-color: var(--gray-50);
|
|
16681
17439
|
}
|
|
16682
17440
|
`;
|
|
16683
|
-
var tableHead =
|
|
17441
|
+
var tableHead = css109`
|
|
16684
17442
|
color: var(--typography-base);
|
|
16685
17443
|
text-align: left;
|
|
16686
17444
|
`;
|
|
16687
|
-
var tableRow =
|
|
17445
|
+
var tableRow = css109`
|
|
16688
17446
|
border-bottom: 1px solid var(--gray-200);
|
|
16689
17447
|
font-size: var(--fs-sm);
|
|
16690
17448
|
`;
|
|
16691
|
-
var tableCellHead =
|
|
17449
|
+
var tableCellHead = css109`
|
|
16692
17450
|
font-size: var(--fs-sm);
|
|
16693
17451
|
font-weight: var(--fw-regular);
|
|
16694
17452
|
line-height: 1.2;
|
|
16695
17453
|
}
|
|
16696
17454
|
`;
|
|
16697
|
-
var responsiveTableContainer =
|
|
17455
|
+
var responsiveTableContainer = css109`
|
|
16698
17456
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
16699
17457
|
overflow-x: auto;
|
|
16700
17458
|
${scrollbarStyles}
|
|
@@ -16713,47 +17471,47 @@ var responsiveTableContainer = css108`
|
|
|
16713
17471
|
`;
|
|
16714
17472
|
|
|
16715
17473
|
// src/components/Table/ResponsiveTableContainer.tsx
|
|
16716
|
-
import { jsx as
|
|
17474
|
+
import { jsx as jsx145 } from "@emotion/react/jsx-runtime";
|
|
16717
17475
|
var ResponsiveTableContainer = ({ children }) => {
|
|
16718
|
-
return /* @__PURE__ */
|
|
17476
|
+
return /* @__PURE__ */ jsx145("div", { css: responsiveTableContainer, children });
|
|
16719
17477
|
};
|
|
16720
17478
|
|
|
16721
17479
|
// src/components/Table/Table.tsx
|
|
16722
17480
|
import * as React22 from "react";
|
|
16723
|
-
import { jsx as
|
|
17481
|
+
import { jsx as jsx146 } from "@emotion/react/jsx-runtime";
|
|
16724
17482
|
var Table = React22.forwardRef(
|
|
16725
17483
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
16726
|
-
return /* @__PURE__ */
|
|
17484
|
+
return /* @__PURE__ */ jsx146("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
16727
17485
|
}
|
|
16728
17486
|
);
|
|
16729
17487
|
var TableHead = React22.forwardRef(
|
|
16730
17488
|
({ children, ...otherProps }, ref) => {
|
|
16731
|
-
return /* @__PURE__ */
|
|
17489
|
+
return /* @__PURE__ */ jsx146("thead", { ref, css: tableHead, ...otherProps, children });
|
|
16732
17490
|
}
|
|
16733
17491
|
);
|
|
16734
17492
|
var TableBody = React22.forwardRef(
|
|
16735
17493
|
({ children, ...otherProps }, ref) => {
|
|
16736
|
-
return /* @__PURE__ */
|
|
17494
|
+
return /* @__PURE__ */ jsx146("tbody", { ref, ...otherProps, children });
|
|
16737
17495
|
}
|
|
16738
17496
|
);
|
|
16739
17497
|
var TableFoot = React22.forwardRef(
|
|
16740
17498
|
({ children, ...otherProps }, ref) => {
|
|
16741
|
-
return /* @__PURE__ */
|
|
17499
|
+
return /* @__PURE__ */ jsx146("tfoot", { ref, ...otherProps, children });
|
|
16742
17500
|
}
|
|
16743
17501
|
);
|
|
16744
17502
|
var TableRow = React22.forwardRef(
|
|
16745
17503
|
({ children, ...otherProps }, ref) => {
|
|
16746
|
-
return /* @__PURE__ */
|
|
17504
|
+
return /* @__PURE__ */ jsx146("tr", { ref, css: tableRow, ...otherProps, children });
|
|
16747
17505
|
}
|
|
16748
17506
|
);
|
|
16749
17507
|
var TableCellHead = React22.forwardRef(
|
|
16750
17508
|
({ children, ...otherProps }, ref) => {
|
|
16751
|
-
return /* @__PURE__ */
|
|
17509
|
+
return /* @__PURE__ */ jsx146("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
16752
17510
|
}
|
|
16753
17511
|
);
|
|
16754
17512
|
var TableCellData = React22.forwardRef(
|
|
16755
17513
|
({ children, ...otherProps }, ref) => {
|
|
16756
|
-
return /* @__PURE__ */
|
|
17514
|
+
return /* @__PURE__ */ jsx146("td", { ref, ...otherProps, children });
|
|
16757
17515
|
}
|
|
16758
17516
|
);
|
|
16759
17517
|
|
|
@@ -16765,11 +17523,11 @@ import {
|
|
|
16765
17523
|
TabProvider as AriakitTabProvider,
|
|
16766
17524
|
useTabStore as useAriakitTabStore
|
|
16767
17525
|
} from "@ariakit/react";
|
|
16768
|
-
import { useCallback as
|
|
17526
|
+
import { useCallback as useCallback15, useMemo as useMemo13 } from "react";
|
|
16769
17527
|
|
|
16770
17528
|
// src/components/Tabs/Tabs.styles.ts
|
|
16771
|
-
import { css as
|
|
16772
|
-
var tabButtonStyles =
|
|
17529
|
+
import { css as css110 } from "@emotion/react";
|
|
17530
|
+
var tabButtonStyles = css110`
|
|
16773
17531
|
align-items: center;
|
|
16774
17532
|
border: 0;
|
|
16775
17533
|
height: 2.5rem;
|
|
@@ -16786,14 +17544,14 @@ var tabButtonStyles = css109`
|
|
|
16786
17544
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
16787
17545
|
}
|
|
16788
17546
|
`;
|
|
16789
|
-
var tabButtonGroupStyles =
|
|
17547
|
+
var tabButtonGroupStyles = css110`
|
|
16790
17548
|
display: flex;
|
|
16791
17549
|
gap: var(--spacing-base);
|
|
16792
17550
|
border-bottom: 1px solid var(--gray-300);
|
|
16793
17551
|
`;
|
|
16794
17552
|
|
|
16795
17553
|
// src/components/Tabs/Tabs.tsx
|
|
16796
|
-
import { jsx as
|
|
17554
|
+
import { jsx as jsx147 } from "@emotion/react/jsx-runtime";
|
|
16797
17555
|
var useCurrentTab = () => {
|
|
16798
17556
|
const context = useAriakitTabStore();
|
|
16799
17557
|
if (!context) {
|
|
@@ -16809,11 +17567,11 @@ var Tabs = ({
|
|
|
16809
17567
|
manual,
|
|
16810
17568
|
...props
|
|
16811
17569
|
}) => {
|
|
16812
|
-
const selected =
|
|
17570
|
+
const selected = useMemo13(() => {
|
|
16813
17571
|
if (selectedId) return selectedId;
|
|
16814
17572
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
16815
17573
|
}, [selectedId, useHashForState]);
|
|
16816
|
-
const onTabSelect =
|
|
17574
|
+
const onTabSelect = useCallback15(
|
|
16817
17575
|
(value) => {
|
|
16818
17576
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
16819
17577
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -16824,28 +17582,28 @@ var Tabs = ({
|
|
|
16824
17582
|
},
|
|
16825
17583
|
[onSelectedIdChange, useHashForState]
|
|
16826
17584
|
);
|
|
16827
|
-
return /* @__PURE__ */
|
|
17585
|
+
return /* @__PURE__ */ jsx147(AriakitTabProvider, { selectedId: selected, selectOnMove: !manual, setSelectedId: onTabSelect, ...props, children });
|
|
16828
17586
|
};
|
|
16829
17587
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
16830
|
-
return /* @__PURE__ */
|
|
17588
|
+
return /* @__PURE__ */ jsx147(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
|
|
16831
17589
|
};
|
|
16832
17590
|
var TabButton = ({
|
|
16833
17591
|
children,
|
|
16834
17592
|
id,
|
|
16835
17593
|
...props
|
|
16836
17594
|
}) => {
|
|
16837
|
-
return /* @__PURE__ */
|
|
17595
|
+
return /* @__PURE__ */ jsx147(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
16838
17596
|
};
|
|
16839
17597
|
var TabContent = ({
|
|
16840
17598
|
children,
|
|
16841
17599
|
...props
|
|
16842
17600
|
}) => {
|
|
16843
|
-
return /* @__PURE__ */
|
|
17601
|
+
return /* @__PURE__ */ jsx147(AriakitTabPanel, { ...props, children });
|
|
16844
17602
|
};
|
|
16845
17603
|
|
|
16846
17604
|
// src/components/Validation/StatusBullet.styles.ts
|
|
16847
|
-
import { css as
|
|
16848
|
-
var StatusBulletContainer =
|
|
17605
|
+
import { css as css111 } from "@emotion/react";
|
|
17606
|
+
var StatusBulletContainer = css111`
|
|
16849
17607
|
align-items: center;
|
|
16850
17608
|
align-self: center;
|
|
16851
17609
|
color: var(--gray-500);
|
|
@@ -16861,33 +17619,33 @@ var StatusBulletContainer = css110`
|
|
|
16861
17619
|
display: block;
|
|
16862
17620
|
}
|
|
16863
17621
|
`;
|
|
16864
|
-
var StatusBulletBase =
|
|
17622
|
+
var StatusBulletBase = css111`
|
|
16865
17623
|
font-size: var(--fs-sm);
|
|
16866
17624
|
&:before {
|
|
16867
17625
|
width: var(--fs-xs);
|
|
16868
17626
|
height: var(--fs-xs);
|
|
16869
17627
|
}
|
|
16870
17628
|
`;
|
|
16871
|
-
var StatusBulletSmall =
|
|
17629
|
+
var StatusBulletSmall = css111`
|
|
16872
17630
|
font-size: var(--fs-xs);
|
|
16873
17631
|
&:before {
|
|
16874
17632
|
width: var(--fs-xxs);
|
|
16875
17633
|
height: var(--fs-xxs);
|
|
16876
17634
|
}
|
|
16877
17635
|
`;
|
|
16878
|
-
var StatusDraft =
|
|
17636
|
+
var StatusDraft = css111`
|
|
16879
17637
|
&:before {
|
|
16880
17638
|
background: var(--white);
|
|
16881
17639
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
16882
17640
|
}
|
|
16883
17641
|
`;
|
|
16884
|
-
var StatusModified =
|
|
17642
|
+
var StatusModified = css111`
|
|
16885
17643
|
&:before {
|
|
16886
17644
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
16887
17645
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
16888
17646
|
}
|
|
16889
17647
|
`;
|
|
16890
|
-
var StatusError =
|
|
17648
|
+
var StatusError = css111`
|
|
16891
17649
|
color: var(--error);
|
|
16892
17650
|
&:before {
|
|
16893
17651
|
/* TODO: replace this with an svg icon */
|
|
@@ -16900,29 +17658,29 @@ var StatusError = css110`
|
|
|
16900
17658
|
);
|
|
16901
17659
|
}
|
|
16902
17660
|
`;
|
|
16903
|
-
var StatusPublished =
|
|
17661
|
+
var StatusPublished = css111`
|
|
16904
17662
|
&:before {
|
|
16905
17663
|
background: var(--accent-dark);
|
|
16906
17664
|
}
|
|
16907
17665
|
`;
|
|
16908
|
-
var StatusOrphan =
|
|
17666
|
+
var StatusOrphan = css111`
|
|
16909
17667
|
&:before {
|
|
16910
17668
|
background: var(--brand-secondary-5);
|
|
16911
17669
|
}
|
|
16912
17670
|
`;
|
|
16913
|
-
var StatusUnknown =
|
|
17671
|
+
var StatusUnknown = css111`
|
|
16914
17672
|
&:before {
|
|
16915
17673
|
background: var(--gray-800);
|
|
16916
17674
|
}
|
|
16917
17675
|
`;
|
|
16918
|
-
var StatusDeleted =
|
|
17676
|
+
var StatusDeleted = css111`
|
|
16919
17677
|
&:before {
|
|
16920
17678
|
background: var(--error);
|
|
16921
17679
|
}
|
|
16922
17680
|
`;
|
|
16923
17681
|
|
|
16924
17682
|
// src/components/Validation/StatusBullet.tsx
|
|
16925
|
-
import { jsx as
|
|
17683
|
+
import { jsx as jsx148 } from "@emotion/react/jsx-runtime";
|
|
16926
17684
|
var currentStateStyles = {
|
|
16927
17685
|
Error: StatusError,
|
|
16928
17686
|
Modified: StatusModified,
|
|
@@ -16946,7 +17704,7 @@ var StatusBullet = ({
|
|
|
16946
17704
|
compact = false,
|
|
16947
17705
|
...props
|
|
16948
17706
|
}) => {
|
|
16949
|
-
const StatusComponent = () => /* @__PURE__ */
|
|
17707
|
+
const StatusComponent = () => /* @__PURE__ */ jsx148(
|
|
16950
17708
|
"span",
|
|
16951
17709
|
{
|
|
16952
17710
|
role: "status",
|
|
@@ -16956,9 +17714,9 @@ var StatusBullet = ({
|
|
|
16956
17714
|
}
|
|
16957
17715
|
);
|
|
16958
17716
|
if (compact) {
|
|
16959
|
-
return /* @__PURE__ */
|
|
17717
|
+
return /* @__PURE__ */ jsx148(StatusComponent, {});
|
|
16960
17718
|
}
|
|
16961
|
-
return /* @__PURE__ */
|
|
17719
|
+
return /* @__PURE__ */ jsx148(Tooltip, { title: message != null ? message : status, children: /* @__PURE__ */ jsx148("div", { children: /* @__PURE__ */ jsx148(StatusComponent, {}) }) });
|
|
16962
17720
|
};
|
|
16963
17721
|
export {
|
|
16964
17722
|
AddButton,
|
|
@@ -17082,11 +17840,15 @@ export {
|
|
|
17082
17840
|
ParameterMultiSelect,
|
|
17083
17841
|
ParameterMultiSelectInner,
|
|
17084
17842
|
ParameterNameAndPublicIdInput,
|
|
17843
|
+
ParameterNumberSlider,
|
|
17844
|
+
ParameterNumberSliderInner,
|
|
17085
17845
|
ParameterOverrideMarker,
|
|
17086
17846
|
ParameterRichText,
|
|
17087
17847
|
ParameterRichTextInner,
|
|
17088
17848
|
ParameterSelect,
|
|
17089
17849
|
ParameterSelectInner,
|
|
17850
|
+
ParameterSelectSlider,
|
|
17851
|
+
ParameterSelectSliderInner,
|
|
17090
17852
|
ParameterShell,
|
|
17091
17853
|
ParameterShellContext,
|
|
17092
17854
|
ParameterShellPlaceholder,
|
|
@@ -17108,6 +17870,8 @@ export {
|
|
|
17108
17870
|
SegmentedControl,
|
|
17109
17871
|
SelectableMenuItem,
|
|
17110
17872
|
Skeleton,
|
|
17873
|
+
Slider,
|
|
17874
|
+
SliderLabels,
|
|
17111
17875
|
Spinner,
|
|
17112
17876
|
StatusBullet,
|
|
17113
17877
|
SuccessMessage,
|