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