@uniformdev/design-system 19.166.1 → 19.169.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 +1062 -642
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +1067 -655
- package/package.json +8 -4
package/dist/esm/index.js
CHANGED
|
@@ -3138,6 +3138,25 @@ var uniformComponentPatternIcon = GenIcon2({
|
|
|
3138
3138
|
}
|
|
3139
3139
|
]
|
|
3140
3140
|
});
|
|
3141
|
+
var uniformCompositionPatternIcon = GenIcon2({
|
|
3142
|
+
tag: "svg",
|
|
3143
|
+
attr: {
|
|
3144
|
+
role: "img",
|
|
3145
|
+
viewBox: "0 0 24 24"
|
|
3146
|
+
},
|
|
3147
|
+
child: [
|
|
3148
|
+
{
|
|
3149
|
+
tag: "path",
|
|
3150
|
+
attr: {
|
|
3151
|
+
fillRule: "evenodd",
|
|
3152
|
+
clipRule: "evenodd",
|
|
3153
|
+
fill: "currentColor",
|
|
3154
|
+
d: "M6.92163 12H4V13.5H8.42163L6.92163 12ZM12.7397 17.8181C12.6083 17.9314 12.4372 18 12.25 18H3.25C2.83579 18 2.5 17.6642 2.5 17.25V6.75C2.5 6.33579 2.83579 6 3.25 6H8.5V9.75H9.17163L10.6716 8.25H10V6.07501C10.7159 6.22033 11.3577 6.56957 11.8622 7.05945L12.9229 5.99871C11.9761 5.07158 10.6798 4.5 9.25 4.5H3.25C2.00736 4.5 1 5.50736 1 6.75V17.25C1 18.4926 2.00736 19.5 3.25 19.5H12.25C12.8514 19.5 13.3977 19.2641 13.8013 18.8797L12.7397 17.8181ZM11.4216 16.5H4V15H9.92163L11.4216 16.5ZM4 10.5H7V9H4V10.5ZM12.5784 12L16.3497 8.22876L20.1209 12L16.3497 15.7712L12.5784 12ZM16.3497 18.5997L9.75 12L16.3497 5.40034L22.9493 12L16.3497 18.5997Z"
|
|
3155
|
+
},
|
|
3156
|
+
child: []
|
|
3157
|
+
}
|
|
3158
|
+
]
|
|
3159
|
+
});
|
|
3141
3160
|
var uniformContentTypeIcon = CgList;
|
|
3142
3161
|
var uniformEntryIcon = CgPen;
|
|
3143
3162
|
var uniformEntryPatternIcon = GenIcon2({
|
|
@@ -14122,6 +14141,7 @@ var container = css40`
|
|
|
14122
14141
|
--calendar-cell-size: 1.8rem;
|
|
14123
14142
|
width: fit-content;
|
|
14124
14143
|
max-width: 100%;
|
|
14144
|
+
margin: 0 auto;
|
|
14125
14145
|
`;
|
|
14126
14146
|
var header = css40`
|
|
14127
14147
|
display: flex;
|
|
@@ -15311,12 +15331,21 @@ var trigger = css53`
|
|
|
15311
15331
|
var popover = css53`
|
|
15312
15332
|
padding: var(--spacing-md);
|
|
15313
15333
|
max-width: none;
|
|
15314
|
-
|
|
15315
|
-
|
|
15316
|
-
|
|
15334
|
+
container-type: inline-size;
|
|
15335
|
+
width: 100%;
|
|
15336
|
+
`;
|
|
15337
|
+
var popoverInnerContent = css53`
|
|
15338
|
+
display: grid;
|
|
15339
|
+
gap: var(--spacing-base);
|
|
15317
15340
|
|
|
15318
|
-
|
|
15319
|
-
grid-template-
|
|
15341
|
+
${cq("360px")} {
|
|
15342
|
+
grid-template-columns: 0.8fr 1fr;
|
|
15343
|
+
grid-template-rows: 1fr 1fr;
|
|
15344
|
+
gap: var(--spacing-md);
|
|
15345
|
+
|
|
15346
|
+
[data-variant='date'] & {
|
|
15347
|
+
grid-template-rows: 1fr;
|
|
15348
|
+
}
|
|
15320
15349
|
}
|
|
15321
15350
|
`;
|
|
15322
15351
|
var calendarSection = css53`
|
|
@@ -15335,6 +15364,15 @@ var timeSection = css53`
|
|
|
15335
15364
|
var tzSection = css53`
|
|
15336
15365
|
align-self: stretch;
|
|
15337
15366
|
`;
|
|
15367
|
+
var datePart = css53`
|
|
15368
|
+
text-overflow: ellipsis;
|
|
15369
|
+
overflow: hidden;
|
|
15370
|
+
white-space: nowrap;
|
|
15371
|
+
`;
|
|
15372
|
+
var datePartButton = css53`
|
|
15373
|
+
// this allows the button to be as wide as the text
|
|
15374
|
+
min-width: 0;
|
|
15375
|
+
`;
|
|
15338
15376
|
|
|
15339
15377
|
// src/components/DateTimePicker/DateTimePickerSummary.tsx
|
|
15340
15378
|
import { jsx as jsx65, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
|
|
@@ -15372,10 +15410,10 @@ function DateTimePickerSummary({
|
|
|
15372
15410
|
}
|
|
15373
15411
|
}
|
|
15374
15412
|
}
|
|
15375
|
-
const
|
|
15413
|
+
const datePart2 = (value == null ? void 0 : value.datetime) ? dateFormat.format(new Date(value.datetime)) : null;
|
|
15376
15414
|
const timePart = (value == null ? void 0 : value.datetime) ? timeFormat.format(new Date(value.datetime)) : null;
|
|
15377
|
-
return
|
|
15378
|
-
/* @__PURE__ */ jsx65("em", { css: inputLabelFocal, children:
|
|
15415
|
+
return datePart2 ? /* @__PURE__ */ jsxs40("span", { css: datePart, children: [
|
|
15416
|
+
/* @__PURE__ */ jsx65("em", { css: inputLabelFocal, children: datePart2 }),
|
|
15379
15417
|
!!timePart && `, ${timePart}`,
|
|
15380
15418
|
!!(value == null ? void 0 : value.timeZone) && timeZoneWasValid && ` in ${value == null ? void 0 : value.timeZone}`
|
|
15381
15419
|
] }) : /* @__PURE__ */ jsx65("span", { children: placeholder });
|
|
@@ -15561,7 +15599,7 @@ var DateTimePicker = ({
|
|
|
15561
15599
|
PopoverDisclosure,
|
|
15562
15600
|
{
|
|
15563
15601
|
...popover2,
|
|
15564
|
-
css:
|
|
15602
|
+
css: datePartButton,
|
|
15565
15603
|
as: Button,
|
|
15566
15604
|
buttonType: "ghostUnimportant",
|
|
15567
15605
|
disabled: disabled2,
|
|
@@ -15584,36 +15622,48 @@ var DateTimePicker = ({
|
|
|
15584
15622
|
}
|
|
15585
15623
|
),
|
|
15586
15624
|
/* @__PURE__ */ jsxs41(Popover2, { ...popover2, css: [Popover, popover], "aria-label": "Pick a date", children: [
|
|
15587
|
-
/* @__PURE__ */
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
value: draftDate == null ? void 0 : draftDate.toString(),
|
|
15591
|
-
minValue: parsedMinVisible,
|
|
15592
|
-
maxValue: parseMaxVisible,
|
|
15593
|
-
timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
|
|
15594
|
-
onChange: handleDateChange,
|
|
15595
|
-
"data-testid": `${testId}-calendar`
|
|
15596
|
-
}
|
|
15597
|
-
) }),
|
|
15598
|
-
variant !== "date" /* Date */ && /* @__PURE__ */ jsx66("div", { css: timeSection, children: /* @__PURE__ */ jsx66(
|
|
15599
|
-
InputTime,
|
|
15600
|
-
{
|
|
15601
|
-
label: "Time",
|
|
15602
|
-
value: draftTime == null ? void 0 : draftTime.toString(),
|
|
15603
|
-
belowInputSlot: belowTimeInputSlot,
|
|
15604
|
-
onChange: handleTimeChange
|
|
15605
|
-
}
|
|
15606
|
-
) }),
|
|
15607
|
-
/* @__PURE__ */ jsxs41("div", { css: tzSection, children: [
|
|
15608
|
-
/* @__PURE__ */ jsx66(Label, { css: labelText, children: "Timezone" }),
|
|
15609
|
-
/* @__PURE__ */ jsx66(
|
|
15610
|
-
InputComboBox,
|
|
15625
|
+
/* @__PURE__ */ jsxs41("div", { css: popoverInnerContent, children: [
|
|
15626
|
+
/* @__PURE__ */ jsx66("div", { css: calendarSection, children: /* @__PURE__ */ jsx66(
|
|
15627
|
+
Calendar,
|
|
15611
15628
|
{
|
|
15612
|
-
value:
|
|
15613
|
-
|
|
15614
|
-
|
|
15629
|
+
value: draftDate == null ? void 0 : draftDate.toString(),
|
|
15630
|
+
minValue: parsedMinVisible,
|
|
15631
|
+
maxValue: parseMaxVisible,
|
|
15632
|
+
timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
|
|
15633
|
+
onChange: handleDateChange,
|
|
15634
|
+
"data-testid": `${testId}-calendar`
|
|
15615
15635
|
}
|
|
15616
|
-
)
|
|
15636
|
+
) }),
|
|
15637
|
+
variant !== "date" /* Date */ && /* @__PURE__ */ jsx66("div", { css: timeSection, children: /* @__PURE__ */ jsx66(
|
|
15638
|
+
InputTime,
|
|
15639
|
+
{
|
|
15640
|
+
label: "Time",
|
|
15641
|
+
value: draftTime == null ? void 0 : draftTime.toString(),
|
|
15642
|
+
belowInputSlot: belowTimeInputSlot,
|
|
15643
|
+
onChange: handleTimeChange
|
|
15644
|
+
}
|
|
15645
|
+
) }),
|
|
15646
|
+
/* @__PURE__ */ jsxs41("div", { css: tzSection, children: [
|
|
15647
|
+
/* @__PURE__ */ jsx66(Label, { css: labelText, children: "Timezone" }),
|
|
15648
|
+
/* @__PURE__ */ jsx66(
|
|
15649
|
+
InputComboBox,
|
|
15650
|
+
{
|
|
15651
|
+
value: draftTimeZone,
|
|
15652
|
+
options: TIMEZONE_OPTIONS,
|
|
15653
|
+
onChange: handleTimezoneChange,
|
|
15654
|
+
menuPlacement: "auto",
|
|
15655
|
+
styles: {
|
|
15656
|
+
menu(base) {
|
|
15657
|
+
return {
|
|
15658
|
+
...base,
|
|
15659
|
+
width: "fit-content",
|
|
15660
|
+
right: 0
|
|
15661
|
+
};
|
|
15662
|
+
}
|
|
15663
|
+
}
|
|
15664
|
+
}
|
|
15665
|
+
)
|
|
15666
|
+
] })
|
|
15617
15667
|
] }),
|
|
15618
15668
|
/* @__PURE__ */ jsxs41(HorizontalRhythm, { gap: "0", children: [
|
|
15619
15669
|
/* @__PURE__ */ jsx66(Button, { buttonType: "secondary", onClick: handleSelectClick, children: "Select" }),
|
|
@@ -17264,40 +17314,407 @@ var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
|
17264
17314
|
);
|
|
17265
17315
|
};
|
|
17266
17316
|
|
|
17267
|
-
// src/components/
|
|
17317
|
+
// src/components/KeyValueInput/KeyValueInput.tsx
|
|
17318
|
+
import {
|
|
17319
|
+
closestCenter,
|
|
17320
|
+
DndContext,
|
|
17321
|
+
KeyboardSensor,
|
|
17322
|
+
PointerSensor,
|
|
17323
|
+
useSensor,
|
|
17324
|
+
useSensors
|
|
17325
|
+
} from "@dnd-kit/core";
|
|
17326
|
+
import { restrictToParentElement } from "@dnd-kit/modifiers";
|
|
17327
|
+
import {
|
|
17328
|
+
arrayMove,
|
|
17329
|
+
SortableContext,
|
|
17330
|
+
sortableKeyboardCoordinates,
|
|
17331
|
+
useSortable,
|
|
17332
|
+
verticalListSortingStrategy
|
|
17333
|
+
} from "@dnd-kit/sortable";
|
|
17334
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
17335
|
+
import { useCallback as useCallback7, useEffect as useEffect12, useMemo as useMemo5, useRef as useRef7, useState as useState12 } from "react";
|
|
17336
|
+
|
|
17337
|
+
// src/utils/useDebouncedCallback.ts
|
|
17338
|
+
import { useEffect as useEffect11, useMemo as useMemo4, useRef as useRef6 } from "react";
|
|
17339
|
+
function useDebouncedCallback(callback, deps, delay, maxWait = 0) {
|
|
17340
|
+
const timeout = useRef6();
|
|
17341
|
+
const waitTimeout = useRef6();
|
|
17342
|
+
const cb = useRef6(callback);
|
|
17343
|
+
const lastCall = useRef6();
|
|
17344
|
+
const clear = () => {
|
|
17345
|
+
if (timeout.current) {
|
|
17346
|
+
clearTimeout(timeout.current);
|
|
17347
|
+
timeout.current = void 0;
|
|
17348
|
+
}
|
|
17349
|
+
if (waitTimeout.current) {
|
|
17350
|
+
clearTimeout(waitTimeout.current);
|
|
17351
|
+
waitTimeout.current = void 0;
|
|
17352
|
+
}
|
|
17353
|
+
};
|
|
17354
|
+
useEffect11(() => {
|
|
17355
|
+
return () => clear();
|
|
17356
|
+
}, []);
|
|
17357
|
+
useEffect11(() => {
|
|
17358
|
+
cb.current = callback;
|
|
17359
|
+
}, deps);
|
|
17360
|
+
return useMemo4(() => {
|
|
17361
|
+
const execute = () => {
|
|
17362
|
+
clear();
|
|
17363
|
+
if (!lastCall.current) return;
|
|
17364
|
+
const context = lastCall.current;
|
|
17365
|
+
lastCall.current = void 0;
|
|
17366
|
+
cb.current.apply(context.this, context.args);
|
|
17367
|
+
};
|
|
17368
|
+
const wrapped = function(...args) {
|
|
17369
|
+
if (timeout.current) {
|
|
17370
|
+
clearTimeout(timeout.current);
|
|
17371
|
+
}
|
|
17372
|
+
lastCall.current = { args, this: this };
|
|
17373
|
+
timeout.current = setTimeout(execute, delay);
|
|
17374
|
+
if (maxWait > 0 && !waitTimeout.current) {
|
|
17375
|
+
waitTimeout.current = setTimeout(execute, maxWait);
|
|
17376
|
+
}
|
|
17377
|
+
};
|
|
17378
|
+
Object.defineProperties(wrapped, {
|
|
17379
|
+
length: { value: callback.length },
|
|
17380
|
+
name: { value: `${callback.name || "anonymous"}__debounced__${delay}` }
|
|
17381
|
+
});
|
|
17382
|
+
return wrapped;
|
|
17383
|
+
}, [delay, maxWait, ...deps]);
|
|
17384
|
+
}
|
|
17385
|
+
|
|
17386
|
+
// src/components/KeyValueInput/KeyValueInput.styles.ts
|
|
17268
17387
|
import { css as css69 } from "@emotion/react";
|
|
17269
|
-
var
|
|
17388
|
+
var LabelStyles = css69`
|
|
17389
|
+
text-transform: uppercase;
|
|
17390
|
+
font-weight: var(--fw-medium);
|
|
17391
|
+
`;
|
|
17392
|
+
var SelectKeyValueRowStyles = css69`
|
|
17393
|
+
animation: var(--duration-fast) var(--timing-ease-out);
|
|
17394
|
+
align-items: flex-start;
|
|
17395
|
+
display: grid;
|
|
17396
|
+
grid-template-columns: repeat(2, 1fr) 1.5rem;
|
|
17397
|
+
gap: var(--spacing-sm);
|
|
17398
|
+
background-color: white;
|
|
17399
|
+
flex: 1;
|
|
17400
|
+
`;
|
|
17401
|
+
var DragHandle = css69`
|
|
17402
|
+
position: relative;
|
|
17403
|
+
height: 3.125rem;
|
|
17404
|
+
width: 1rem;
|
|
17405
|
+
cursor: grab;
|
|
17406
|
+
background: transparent;
|
|
17407
|
+
border: 0;
|
|
17408
|
+
|
|
17409
|
+
&::after {
|
|
17410
|
+
content: '';
|
|
17411
|
+
display: block;
|
|
17412
|
+
position: absolute;
|
|
17413
|
+
left: 2px;
|
|
17414
|
+
top: var(--spacing-xs);
|
|
17415
|
+
bottom: var(--spacing-xs);
|
|
17416
|
+
width: 5px;
|
|
17417
|
+
border: 2px dotted var(--gray-300);
|
|
17418
|
+
border-top: 0;
|
|
17419
|
+
border-bottom: 0;
|
|
17420
|
+
opacity: 1;
|
|
17421
|
+
}
|
|
17422
|
+
`;
|
|
17423
|
+
var DragHandleDisabled = css69`
|
|
17424
|
+
opacity: 0.3;
|
|
17425
|
+
pointer-events: none;
|
|
17426
|
+
`;
|
|
17427
|
+
var rowWrapper = css69`
|
|
17428
|
+
display: flex;
|
|
17429
|
+
background-color: white;
|
|
17430
|
+
border-radius: var(--rounded-sm);
|
|
17431
|
+
`;
|
|
17432
|
+
|
|
17433
|
+
// src/components/KeyValueInput/KeyValueInput.tsx
|
|
17434
|
+
import { jsx as jsx90, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
17435
|
+
var initialSelectOptionValue = { key: "", value: "" };
|
|
17436
|
+
var generateItemId = (item, index) => item.uniqueId || item.value || item.key || `$index-${index}`;
|
|
17437
|
+
var KeyValueInput = ({
|
|
17438
|
+
value,
|
|
17439
|
+
onChange,
|
|
17440
|
+
label = "Options",
|
|
17441
|
+
newItemDefault = initialSelectOptionValue,
|
|
17442
|
+
keyLabel = "Text",
|
|
17443
|
+
valueLabel = "Value",
|
|
17444
|
+
keyInfoPopover,
|
|
17445
|
+
valueInfoPopover,
|
|
17446
|
+
disabled: disabled2,
|
|
17447
|
+
errors,
|
|
17448
|
+
onFocusChange
|
|
17449
|
+
}) => {
|
|
17450
|
+
const [isDragging, setIsDragging] = useState12(false);
|
|
17451
|
+
const popoverStoresMap = useRef7({});
|
|
17452
|
+
const lastRowFirstInputRef = useRef7(null);
|
|
17453
|
+
const sensors = useSensors(
|
|
17454
|
+
useSensor(PointerSensor),
|
|
17455
|
+
useSensor(KeyboardSensor, {
|
|
17456
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
17457
|
+
})
|
|
17458
|
+
);
|
|
17459
|
+
const valueWithIds = useMemo5(() => {
|
|
17460
|
+
return value.map((item, index) => ({ ...item, id: generateItemId(item, index) }));
|
|
17461
|
+
}, [value]);
|
|
17462
|
+
const handleAddOptionRow = useCallback7(() => {
|
|
17463
|
+
onChange([...value, newItemDefault]);
|
|
17464
|
+
}, [onChange, value, newItemDefault]);
|
|
17465
|
+
const handleDeleteOptionRow = useCallback7(
|
|
17466
|
+
(deleteIndex) => {
|
|
17467
|
+
const updatedOptions = value.filter((_, index) => index !== deleteIndex);
|
|
17468
|
+
onChange(updatedOptions);
|
|
17469
|
+
},
|
|
17470
|
+
[value, onChange]
|
|
17471
|
+
);
|
|
17472
|
+
const handleFocusChange = useDebouncedCallback(
|
|
17473
|
+
(isFocused) => {
|
|
17474
|
+
onFocusChange == null ? void 0 : onFocusChange(isFocused);
|
|
17475
|
+
},
|
|
17476
|
+
[onFocusChange],
|
|
17477
|
+
300
|
|
17478
|
+
);
|
|
17479
|
+
const handleUpdateOptionRow = useCallback7(
|
|
17480
|
+
(rowIndex, rowValue) => {
|
|
17481
|
+
onChange(
|
|
17482
|
+
value.map((item, index) => {
|
|
17483
|
+
if (index === rowIndex) {
|
|
17484
|
+
return rowValue;
|
|
17485
|
+
}
|
|
17486
|
+
return item;
|
|
17487
|
+
})
|
|
17488
|
+
);
|
|
17489
|
+
},
|
|
17490
|
+
[onChange, value]
|
|
17491
|
+
);
|
|
17492
|
+
const handleDragEnd = useCallback7(
|
|
17493
|
+
(e) => {
|
|
17494
|
+
setIsDragging(false);
|
|
17495
|
+
const { active: active2, over } = e;
|
|
17496
|
+
if (!(over == null ? void 0 : over.id) || active2.id === over.id) {
|
|
17497
|
+
return;
|
|
17498
|
+
}
|
|
17499
|
+
const activeIndex = valueWithIds.findIndex(({ id }) => id === active2.id);
|
|
17500
|
+
const overIndex = valueWithIds.findIndex(({ id }) => id === over.id);
|
|
17501
|
+
onChange(arrayMove(value, activeIndex, overIndex));
|
|
17502
|
+
},
|
|
17503
|
+
[value, valueWithIds, onChange, setIsDragging]
|
|
17504
|
+
);
|
|
17505
|
+
const handleDragStart = useCallback7(() => {
|
|
17506
|
+
Object.values(popoverStoresMap.current).forEach((store) => {
|
|
17507
|
+
store.hide();
|
|
17508
|
+
});
|
|
17509
|
+
setIsDragging(true);
|
|
17510
|
+
}, [setIsDragging]);
|
|
17511
|
+
const handleDragCancel = useCallback7(() => {
|
|
17512
|
+
setIsDragging(false);
|
|
17513
|
+
}, [setIsDragging]);
|
|
17514
|
+
useEffect12(() => {
|
|
17515
|
+
if (lastRowFirstInputRef.current && value.length > 1) {
|
|
17516
|
+
lastRowFirstInputRef.current.focus();
|
|
17517
|
+
}
|
|
17518
|
+
}, [value.length]);
|
|
17519
|
+
return /* @__PURE__ */ jsxs57(VerticalRhythm, { gap: "xs", children: [
|
|
17520
|
+
/* @__PURE__ */ jsx90(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ jsx90("span", { css: LabelStyles, children: label }) }),
|
|
17521
|
+
/* @__PURE__ */ jsxs57("div", { css: [SelectKeyValueRowStyles, { paddingLeft: "var(--spacing-base)" }], children: [
|
|
17522
|
+
/* @__PURE__ */ jsxs57(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
17523
|
+
/* @__PURE__ */ jsx90("span", { children: keyLabel }),
|
|
17524
|
+
!keyInfoPopover ? null : /* @__PURE__ */ jsx90(
|
|
17525
|
+
Popover3,
|
|
17526
|
+
{
|
|
17527
|
+
buttonText: `${keyLabel} info`,
|
|
17528
|
+
iconColor: "gray",
|
|
17529
|
+
placement: "bottom-start",
|
|
17530
|
+
onInit: ({ store }) => popoverStoresMap.current.label = store,
|
|
17531
|
+
children: keyInfoPopover
|
|
17532
|
+
}
|
|
17533
|
+
)
|
|
17534
|
+
] }),
|
|
17535
|
+
/* @__PURE__ */ jsxs57(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
17536
|
+
/* @__PURE__ */ jsx90("span", { children: valueLabel }),
|
|
17537
|
+
!valueInfoPopover ? null : /* @__PURE__ */ jsx90(
|
|
17538
|
+
Popover3,
|
|
17539
|
+
{
|
|
17540
|
+
buttonText: `${valueLabel} info`,
|
|
17541
|
+
iconColor: "gray",
|
|
17542
|
+
placement: "bottom-start",
|
|
17543
|
+
onInit: ({ store }) => popoverStoresMap.current.value = store,
|
|
17544
|
+
children: valueInfoPopover
|
|
17545
|
+
}
|
|
17546
|
+
)
|
|
17547
|
+
] })
|
|
17548
|
+
] }),
|
|
17549
|
+
/* @__PURE__ */ jsx90(VerticalRhythm, { gap: "sm", children: /* @__PURE__ */ jsx90(
|
|
17550
|
+
DndContext,
|
|
17551
|
+
{
|
|
17552
|
+
sensors,
|
|
17553
|
+
collisionDetection: closestCenter,
|
|
17554
|
+
onDragEnd: handleDragEnd,
|
|
17555
|
+
onDragStart: handleDragStart,
|
|
17556
|
+
onDragCancel: handleDragCancel,
|
|
17557
|
+
modifiers: [restrictToParentElement],
|
|
17558
|
+
children: /* @__PURE__ */ jsx90(SortableContext, { items: valueWithIds, strategy: verticalListSortingStrategy, children: valueWithIds.map(({ id, ...item }, index) => /* @__PURE__ */ jsx90(
|
|
17559
|
+
KeyValueInputItem,
|
|
17560
|
+
{
|
|
17561
|
+
id,
|
|
17562
|
+
firstInputRef: index === value.length - 1 ? lastRowFirstInputRef : null,
|
|
17563
|
+
value: item,
|
|
17564
|
+
keyLabel: `${keyLabel}, row ${index}`,
|
|
17565
|
+
valueLabel: `${valueLabel}, row ${index}`,
|
|
17566
|
+
disabled: disabled2,
|
|
17567
|
+
disabledDelete: value.length <= 1,
|
|
17568
|
+
disabledDnd: value.length === 1,
|
|
17569
|
+
error: errors == null ? void 0 : errors[index],
|
|
17570
|
+
onChange: (itemValue) => handleUpdateOptionRow(index, itemValue),
|
|
17571
|
+
onDelete: () => handleDeleteOptionRow(index),
|
|
17572
|
+
onFocusChange: handleFocusChange,
|
|
17573
|
+
"data-testid": "key-value-input-item"
|
|
17574
|
+
},
|
|
17575
|
+
isDragging ? id : index
|
|
17576
|
+
)) })
|
|
17577
|
+
}
|
|
17578
|
+
) }),
|
|
17579
|
+
/* @__PURE__ */ jsxs57(
|
|
17580
|
+
Button,
|
|
17581
|
+
{
|
|
17582
|
+
"data-testid": "add-input-row-action",
|
|
17583
|
+
buttonType: "secondaryInvert",
|
|
17584
|
+
size: "xs",
|
|
17585
|
+
onClick: handleAddOptionRow,
|
|
17586
|
+
disabled: disabled2,
|
|
17587
|
+
css: { marginTop: "var(--spacing-base)" },
|
|
17588
|
+
children: [
|
|
17589
|
+
/* @__PURE__ */ jsx90(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.85rem" }),
|
|
17590
|
+
" Add option"
|
|
17591
|
+
]
|
|
17592
|
+
}
|
|
17593
|
+
)
|
|
17594
|
+
] });
|
|
17595
|
+
};
|
|
17596
|
+
var KeyValueInputItem = ({
|
|
17597
|
+
id,
|
|
17598
|
+
firstInputRef,
|
|
17599
|
+
keyLabel,
|
|
17600
|
+
value,
|
|
17601
|
+
valueLabel,
|
|
17602
|
+
disabled: disabled2,
|
|
17603
|
+
onChange,
|
|
17604
|
+
onDelete,
|
|
17605
|
+
error,
|
|
17606
|
+
onFocusChange,
|
|
17607
|
+
disabledDelete = false,
|
|
17608
|
+
disabledDnd = false
|
|
17609
|
+
}) => {
|
|
17610
|
+
const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = useSortable({
|
|
17611
|
+
id,
|
|
17612
|
+
disabled: disabledDnd
|
|
17613
|
+
});
|
|
17614
|
+
const style = {
|
|
17615
|
+
transform: CSS.Transform.toString(transform),
|
|
17616
|
+
transition
|
|
17617
|
+
};
|
|
17618
|
+
return /* @__PURE__ */ jsxs57("div", { css: rowWrapper, ref: setNodeRef, style, children: [
|
|
17619
|
+
/* @__PURE__ */ jsx90(
|
|
17620
|
+
"button",
|
|
17621
|
+
{
|
|
17622
|
+
type: "button",
|
|
17623
|
+
css: [DragHandle, disabledDnd ? DragHandleDisabled : null],
|
|
17624
|
+
ref: setActivatorNodeRef,
|
|
17625
|
+
...attributes,
|
|
17626
|
+
...listeners
|
|
17627
|
+
}
|
|
17628
|
+
),
|
|
17629
|
+
/* @__PURE__ */ jsxs57("div", { css: SelectKeyValueRowStyles, "data-testid": "key-value-input-item", children: [
|
|
17630
|
+
/* @__PURE__ */ jsx90(
|
|
17631
|
+
Input,
|
|
17632
|
+
{
|
|
17633
|
+
ref: firstInputRef,
|
|
17634
|
+
label: keyLabel,
|
|
17635
|
+
showLabel: false,
|
|
17636
|
+
disabled: disabled2,
|
|
17637
|
+
onChange: (e) => {
|
|
17638
|
+
const hasStoredValue = value.value !== value.key;
|
|
17639
|
+
onChange == null ? void 0 : onChange({
|
|
17640
|
+
key: e.currentTarget.value,
|
|
17641
|
+
value: hasStoredValue ? value.value : e.currentTarget.value
|
|
17642
|
+
});
|
|
17643
|
+
},
|
|
17644
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
17645
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
17646
|
+
value: value.key,
|
|
17647
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
|
|
17648
|
+
"data-testid": "key"
|
|
17649
|
+
}
|
|
17650
|
+
),
|
|
17651
|
+
/* @__PURE__ */ jsx90(
|
|
17652
|
+
Input,
|
|
17653
|
+
{
|
|
17654
|
+
label: valueLabel,
|
|
17655
|
+
showLabel: false,
|
|
17656
|
+
disabled: disabled2,
|
|
17657
|
+
onChange: (e) => onChange == null ? void 0 : onChange({
|
|
17658
|
+
key: value.key,
|
|
17659
|
+
value: e.currentTarget.value
|
|
17660
|
+
}),
|
|
17661
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
17662
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
17663
|
+
value: value.value,
|
|
17664
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
|
|
17665
|
+
"data-testid": "value"
|
|
17666
|
+
}
|
|
17667
|
+
),
|
|
17668
|
+
/* @__PURE__ */ jsx90("div", { css: { marginTop: "1rem" }, children: /* @__PURE__ */ jsx90(
|
|
17669
|
+
Button,
|
|
17670
|
+
{
|
|
17671
|
+
type: "button",
|
|
17672
|
+
buttonType: "ghostDestructive",
|
|
17673
|
+
"data-testid": "delete-row",
|
|
17674
|
+
onClick: onDelete,
|
|
17675
|
+
disabled: disabled2 || disabledDelete,
|
|
17676
|
+
size: "zero",
|
|
17677
|
+
children: /* @__PURE__ */ jsx90(Icon, { icon: "trash", size: 16, iconColor: "currentColor" })
|
|
17678
|
+
}
|
|
17679
|
+
) })
|
|
17680
|
+
] })
|
|
17681
|
+
] });
|
|
17682
|
+
};
|
|
17683
|
+
|
|
17684
|
+
// src/components/LimitsBar/LimitsBar.styles.ts
|
|
17685
|
+
import { css as css70 } from "@emotion/react";
|
|
17686
|
+
var LimitsBarContainer = css70`
|
|
17270
17687
|
margin-block: var(--spacing-sm);
|
|
17271
17688
|
`;
|
|
17272
|
-
var LimitsBarProgressBar =
|
|
17689
|
+
var LimitsBarProgressBar = css70`
|
|
17273
17690
|
background: var(--gray-100);
|
|
17274
17691
|
margin-top: var(--spacing-sm);
|
|
17275
17692
|
position: relative;
|
|
17276
17693
|
overflow: hidden;
|
|
17277
17694
|
height: 0.25rem;
|
|
17278
17695
|
`;
|
|
17279
|
-
var LimitsBarProgressBarLine =
|
|
17696
|
+
var LimitsBarProgressBarLine = css70`
|
|
17280
17697
|
position: absolute;
|
|
17281
17698
|
inset: 0;
|
|
17282
17699
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
17283
17700
|
`;
|
|
17284
|
-
var LimitsBarLabelContainer =
|
|
17701
|
+
var LimitsBarLabelContainer = css70`
|
|
17285
17702
|
display: flex;
|
|
17286
17703
|
justify-content: space-between;
|
|
17287
17704
|
font-weight: var(--fw-bold);
|
|
17288
17705
|
`;
|
|
17289
|
-
var LimitsBarLabel =
|
|
17706
|
+
var LimitsBarLabel = css70`
|
|
17290
17707
|
font-size: var(--fs-baase);
|
|
17291
17708
|
`;
|
|
17292
|
-
var LimitsBarBgColor = (statusColor) =>
|
|
17709
|
+
var LimitsBarBgColor = (statusColor) => css70`
|
|
17293
17710
|
background: ${statusColor};
|
|
17294
17711
|
`;
|
|
17295
|
-
var LimitsBarTextColor = (statusColor) =>
|
|
17712
|
+
var LimitsBarTextColor = (statusColor) => css70`
|
|
17296
17713
|
color: ${statusColor};
|
|
17297
17714
|
`;
|
|
17298
17715
|
|
|
17299
17716
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
17300
|
-
import { jsx as
|
|
17717
|
+
import { jsx as jsx91, jsxs as jsxs58 } from "@emotion/react/jsx-runtime";
|
|
17301
17718
|
var LimitsBar = ({ current, max, label }) => {
|
|
17302
17719
|
const maxPercentage = 100;
|
|
17303
17720
|
const progressBarValue = Math.ceil(current / max * maxPercentage);
|
|
@@ -17308,16 +17725,16 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
17308
17725
|
danger: "var(--brand-secondary-5)"
|
|
17309
17726
|
};
|
|
17310
17727
|
const statusColor = progressBarValue === 100 ? colorMap.danger : progressBarValue >= 75 ? colorMap.warn : colorMap.base;
|
|
17311
|
-
return /* @__PURE__ */
|
|
17312
|
-
/* @__PURE__ */
|
|
17313
|
-
/* @__PURE__ */
|
|
17314
|
-
/* @__PURE__ */
|
|
17728
|
+
return /* @__PURE__ */ jsxs58("div", { css: LimitsBarContainer, children: [
|
|
17729
|
+
/* @__PURE__ */ jsxs58("div", { css: LimitsBarLabelContainer, children: [
|
|
17730
|
+
/* @__PURE__ */ jsx91("span", { css: LimitsBarLabel, children: label }),
|
|
17731
|
+
/* @__PURE__ */ jsxs58("span", { css: [LimitsBarLabel, LimitsBarTextColor(statusColor)], children: [
|
|
17315
17732
|
current,
|
|
17316
17733
|
" of ",
|
|
17317
17734
|
max
|
|
17318
17735
|
] })
|
|
17319
17736
|
] }),
|
|
17320
|
-
/* @__PURE__ */
|
|
17737
|
+
/* @__PURE__ */ jsx91(
|
|
17321
17738
|
"div",
|
|
17322
17739
|
{
|
|
17323
17740
|
role: "progressbar",
|
|
@@ -17326,7 +17743,7 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
17326
17743
|
"aria-valuemax": max,
|
|
17327
17744
|
"aria-valuetext": `${current} of ${max}`,
|
|
17328
17745
|
css: LimitsBarProgressBar,
|
|
17329
|
-
children: /* @__PURE__ */
|
|
17746
|
+
children: /* @__PURE__ */ jsx91(
|
|
17330
17747
|
"span",
|
|
17331
17748
|
{
|
|
17332
17749
|
role: "presentation",
|
|
@@ -17342,8 +17759,8 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
17342
17759
|
};
|
|
17343
17760
|
|
|
17344
17761
|
// src/components/LinkList/LinkList.styles.ts
|
|
17345
|
-
import { css as
|
|
17346
|
-
var LinkListContainer = (padding) =>
|
|
17762
|
+
import { css as css71 } from "@emotion/react";
|
|
17763
|
+
var LinkListContainer = (padding) => css71`
|
|
17347
17764
|
padding: ${padding};
|
|
17348
17765
|
|
|
17349
17766
|
${mq("sm")} {
|
|
@@ -17351,30 +17768,30 @@ var LinkListContainer = (padding) => css70`
|
|
|
17351
17768
|
grid-row: 1 / last-line;
|
|
17352
17769
|
}
|
|
17353
17770
|
`;
|
|
17354
|
-
var LinkListTitle =
|
|
17771
|
+
var LinkListTitle = css71`
|
|
17355
17772
|
font-weight: var(--fw-bold);
|
|
17356
17773
|
font-size: var(--fs-sm);
|
|
17357
17774
|
text-transform: uppercase;
|
|
17358
17775
|
`;
|
|
17359
17776
|
|
|
17360
17777
|
// src/components/LinkList/LinkList.tsx
|
|
17361
|
-
import { jsx as
|
|
17778
|
+
import { jsx as jsx92, jsxs as jsxs59 } from "@emotion/react/jsx-runtime";
|
|
17362
17779
|
var LinkList = ({ title: title2, padding = "var(--spacing-md)", children, ...props }) => {
|
|
17363
|
-
return /* @__PURE__ */
|
|
17364
|
-
/* @__PURE__ */
|
|
17780
|
+
return /* @__PURE__ */ jsxs59("div", { css: LinkListContainer(padding), ...props, children: [
|
|
17781
|
+
/* @__PURE__ */ jsx92(Heading2, { level: 3, css: LinkListTitle, children: title2 }),
|
|
17365
17782
|
children
|
|
17366
17783
|
] });
|
|
17367
17784
|
};
|
|
17368
17785
|
|
|
17369
17786
|
// src/components/List/ScrollableList.tsx
|
|
17370
|
-
import { css as
|
|
17787
|
+
import { css as css73 } from "@emotion/react";
|
|
17371
17788
|
|
|
17372
17789
|
// src/components/List/styles/ScrollableList.styles.ts
|
|
17373
|
-
import { css as
|
|
17374
|
-
var ScrollableListContainer =
|
|
17790
|
+
import { css as css72 } from "@emotion/react";
|
|
17791
|
+
var ScrollableListContainer = css72`
|
|
17375
17792
|
position: relative;
|
|
17376
17793
|
`;
|
|
17377
|
-
var ScrollableListInner =
|
|
17794
|
+
var ScrollableListInner = css72`
|
|
17378
17795
|
background: var(--gray-50);
|
|
17379
17796
|
border-top: 1px solid var(--gray-200);
|
|
17380
17797
|
border-bottom: 1px solid var(--gray-200);
|
|
@@ -17397,19 +17814,19 @@ var ScrollableListInner = css71`
|
|
|
17397
17814
|
`;
|
|
17398
17815
|
|
|
17399
17816
|
// src/components/List/ScrollableList.tsx
|
|
17400
|
-
import { jsx as
|
|
17817
|
+
import { jsx as jsx93, jsxs as jsxs60 } from "@emotion/react/jsx-runtime";
|
|
17401
17818
|
var ScrollableList = ({ label, children, ...props }) => {
|
|
17402
|
-
return /* @__PURE__ */
|
|
17403
|
-
label ? /* @__PURE__ */
|
|
17819
|
+
return /* @__PURE__ */ jsxs60("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
17820
|
+
label ? /* @__PURE__ */ jsx93(
|
|
17404
17821
|
"span",
|
|
17405
17822
|
{
|
|
17406
|
-
css:
|
|
17823
|
+
css: css73`
|
|
17407
17824
|
${labelText}
|
|
17408
17825
|
`,
|
|
17409
17826
|
children: label
|
|
17410
17827
|
}
|
|
17411
17828
|
) : null,
|
|
17412
|
-
/* @__PURE__ */
|
|
17829
|
+
/* @__PURE__ */ jsx93("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
17413
17830
|
] });
|
|
17414
17831
|
};
|
|
17415
17832
|
|
|
@@ -17417,8 +17834,8 @@ var ScrollableList = ({ label, children, ...props }) => {
|
|
|
17417
17834
|
import { CgCheck as CgCheck3 } from "@react-icons/all-files/cg/CgCheck";
|
|
17418
17835
|
|
|
17419
17836
|
// src/components/List/styles/ScrollableListItem.styles.ts
|
|
17420
|
-
import { css as
|
|
17421
|
-
var ScrollableListItemContainer =
|
|
17837
|
+
import { css as css74 } from "@emotion/react";
|
|
17838
|
+
var ScrollableListItemContainer = css74`
|
|
17422
17839
|
align-items: center;
|
|
17423
17840
|
background: var(--white);
|
|
17424
17841
|
border-radius: var(--rounded-base);
|
|
@@ -17427,13 +17844,13 @@ var ScrollableListItemContainer = css73`
|
|
|
17427
17844
|
min-height: 52px;
|
|
17428
17845
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
17429
17846
|
`;
|
|
17430
|
-
var ScrollableListItemShadow =
|
|
17847
|
+
var ScrollableListItemShadow = css74`
|
|
17431
17848
|
box-shadow: var(--shadow-base);
|
|
17432
17849
|
`;
|
|
17433
|
-
var ScrollableListItemActive =
|
|
17850
|
+
var ScrollableListItemActive = css74`
|
|
17434
17851
|
border-color: var(--brand-secondary-3);
|
|
17435
17852
|
`;
|
|
17436
|
-
var ScrollableListItemBtn =
|
|
17853
|
+
var ScrollableListItemBtn = css74`
|
|
17437
17854
|
align-items: center;
|
|
17438
17855
|
border: none;
|
|
17439
17856
|
background: transparent;
|
|
@@ -17448,27 +17865,27 @@ var ScrollableListItemBtn = css73`
|
|
|
17448
17865
|
outline: none;
|
|
17449
17866
|
}
|
|
17450
17867
|
`;
|
|
17451
|
-
var ScrollableListInputLabel =
|
|
17868
|
+
var ScrollableListInputLabel = css74`
|
|
17452
17869
|
align-items: center;
|
|
17453
17870
|
cursor: pointer;
|
|
17454
17871
|
display: flex;
|
|
17455
17872
|
padding: var(--spacing-xs) var(--spacing-base) var(--spacing-xs);
|
|
17456
17873
|
flex-grow: 1;
|
|
17457
17874
|
`;
|
|
17458
|
-
var ScrollableListInputText =
|
|
17875
|
+
var ScrollableListInputText = css74`
|
|
17459
17876
|
align-items: center;
|
|
17460
17877
|
display: flex;
|
|
17461
17878
|
gap: var(--spacing-sm);
|
|
17462
17879
|
flex-grow: 1;
|
|
17463
17880
|
flex-wrap: wrap;
|
|
17464
17881
|
`;
|
|
17465
|
-
var ScrollableListHiddenInput =
|
|
17882
|
+
var ScrollableListHiddenInput = css74`
|
|
17466
17883
|
position: absolute;
|
|
17467
17884
|
height: 0;
|
|
17468
17885
|
width: 0;
|
|
17469
17886
|
opacity: 0;
|
|
17470
17887
|
`;
|
|
17471
|
-
var ScrollableListIcon =
|
|
17888
|
+
var ScrollableListIcon = css74`
|
|
17472
17889
|
border-radius: var(--rounded-full);
|
|
17473
17890
|
background: var(--brand-secondary-3);
|
|
17474
17891
|
color: var(--white);
|
|
@@ -17476,12 +17893,12 @@ var ScrollableListIcon = css73`
|
|
|
17476
17893
|
min-width: 24px;
|
|
17477
17894
|
opacity: 0;
|
|
17478
17895
|
`;
|
|
17479
|
-
var ScrollableListIconVisible =
|
|
17896
|
+
var ScrollableListIconVisible = css74`
|
|
17480
17897
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
17481
17898
|
`;
|
|
17482
17899
|
|
|
17483
17900
|
// src/components/List/ScrollableListInputItem.tsx
|
|
17484
|
-
import { jsx as
|
|
17901
|
+
import { jsx as jsx94, jsxs as jsxs61 } from "@emotion/react/jsx-runtime";
|
|
17485
17902
|
var ScrollableListInputItem = ({
|
|
17486
17903
|
label,
|
|
17487
17904
|
icon,
|
|
@@ -17491,7 +17908,7 @@ var ScrollableListInputItem = ({
|
|
|
17491
17908
|
labelTestId,
|
|
17492
17909
|
...props
|
|
17493
17910
|
}) => {
|
|
17494
|
-
return /* @__PURE__ */
|
|
17911
|
+
return /* @__PURE__ */ jsx94(
|
|
17495
17912
|
"div",
|
|
17496
17913
|
{
|
|
17497
17914
|
css: [
|
|
@@ -17500,13 +17917,13 @@ var ScrollableListInputItem = ({
|
|
|
17500
17917
|
active2 ? ScrollableListItemActive : void 0
|
|
17501
17918
|
],
|
|
17502
17919
|
...props,
|
|
17503
|
-
children: /* @__PURE__ */
|
|
17504
|
-
/* @__PURE__ */
|
|
17920
|
+
children: /* @__PURE__ */ jsxs61("label", { "data-testid": labelTestId, css: ScrollableListInputLabel, children: [
|
|
17921
|
+
/* @__PURE__ */ jsxs61("span", { css: ScrollableListInputText, children: [
|
|
17505
17922
|
icon,
|
|
17506
17923
|
label
|
|
17507
17924
|
] }),
|
|
17508
|
-
/* @__PURE__ */
|
|
17509
|
-
/* @__PURE__ */
|
|
17925
|
+
/* @__PURE__ */ jsx94("div", { css: ScrollableListHiddenInput, children }),
|
|
17926
|
+
/* @__PURE__ */ jsx94(
|
|
17510
17927
|
Icon,
|
|
17511
17928
|
{
|
|
17512
17929
|
icon: CgCheck3,
|
|
@@ -17524,7 +17941,7 @@ var ScrollableListInputItem = ({
|
|
|
17524
17941
|
|
|
17525
17942
|
// src/components/List/ScrollableListItem.tsx
|
|
17526
17943
|
import { CgCheck as CgCheck4 } from "@react-icons/all-files/cg/CgCheck";
|
|
17527
|
-
import { jsx as
|
|
17944
|
+
import { jsx as jsx95, jsxs as jsxs62 } from "@emotion/react/jsx-runtime";
|
|
17528
17945
|
var ScrollableListItem = ({
|
|
17529
17946
|
buttonText,
|
|
17530
17947
|
icon,
|
|
@@ -17532,7 +17949,7 @@ var ScrollableListItem = ({
|
|
|
17532
17949
|
disableShadow,
|
|
17533
17950
|
...props
|
|
17534
17951
|
}) => {
|
|
17535
|
-
return /* @__PURE__ */
|
|
17952
|
+
return /* @__PURE__ */ jsx95(
|
|
17536
17953
|
"div",
|
|
17537
17954
|
{
|
|
17538
17955
|
css: [
|
|
@@ -17540,12 +17957,12 @@ var ScrollableListItem = ({
|
|
|
17540
17957
|
disableShadow ? void 0 : ScrollableListItemShadow,
|
|
17541
17958
|
active2 ? ScrollableListItemActive : void 0
|
|
17542
17959
|
],
|
|
17543
|
-
children: /* @__PURE__ */
|
|
17544
|
-
/* @__PURE__ */
|
|
17960
|
+
children: /* @__PURE__ */ jsxs62("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
|
|
17961
|
+
/* @__PURE__ */ jsxs62(HorizontalRhythm, { gap: "xs", align: "center", children: [
|
|
17545
17962
|
icon,
|
|
17546
|
-
/* @__PURE__ */
|
|
17963
|
+
/* @__PURE__ */ jsx95("span", { children: buttonText })
|
|
17547
17964
|
] }),
|
|
17548
|
-
/* @__PURE__ */
|
|
17965
|
+
/* @__PURE__ */ jsx95(
|
|
17549
17966
|
Icon,
|
|
17550
17967
|
{
|
|
17551
17968
|
icon: CgCheck4,
|
|
@@ -17560,7 +17977,7 @@ var ScrollableListItem = ({
|
|
|
17560
17977
|
};
|
|
17561
17978
|
|
|
17562
17979
|
// src/components/LoadingIndicator/LoadingIndicator.styles.ts
|
|
17563
|
-
import { css as
|
|
17980
|
+
import { css as css75, keyframes as keyframes3 } from "@emotion/react";
|
|
17564
17981
|
function bounceFade(size) {
|
|
17565
17982
|
const bounceHeight = size === "lg" ? 10 : 5;
|
|
17566
17983
|
return keyframes3`
|
|
@@ -17581,13 +17998,13 @@ function bounceFade(size) {
|
|
|
17581
17998
|
}
|
|
17582
17999
|
`;
|
|
17583
18000
|
}
|
|
17584
|
-
var loader =
|
|
18001
|
+
var loader = css75`
|
|
17585
18002
|
display: inline-flex;
|
|
17586
18003
|
justify-content: center;
|
|
17587
18004
|
`;
|
|
17588
18005
|
function loadingDot(size) {
|
|
17589
18006
|
const dotSize = size === "lg" ? 8 : 4;
|
|
17590
|
-
return
|
|
18007
|
+
return css75`
|
|
17591
18008
|
background-color: var(--gray-700);
|
|
17592
18009
|
display: block;
|
|
17593
18010
|
border-radius: var(--rounded-full);
|
|
@@ -17612,25 +18029,25 @@ function loadingDot(size) {
|
|
|
17612
18029
|
}
|
|
17613
18030
|
|
|
17614
18031
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
17615
|
-
import { jsx as
|
|
18032
|
+
import { jsx as jsx96, jsxs as jsxs63 } from "@emotion/react/jsx-runtime";
|
|
17616
18033
|
var LoadingIndicator = ({
|
|
17617
18034
|
size = "lg",
|
|
17618
18035
|
...props
|
|
17619
18036
|
}) => {
|
|
17620
18037
|
const dotStyle = loadingDot(size);
|
|
17621
|
-
return /* @__PURE__ */
|
|
17622
|
-
/* @__PURE__ */
|
|
17623
|
-
/* @__PURE__ */
|
|
17624
|
-
/* @__PURE__ */
|
|
18038
|
+
return /* @__PURE__ */ jsxs63("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
|
|
18039
|
+
/* @__PURE__ */ jsx96("span", { css: dotStyle }),
|
|
18040
|
+
/* @__PURE__ */ jsx96("span", { css: dotStyle }),
|
|
18041
|
+
/* @__PURE__ */ jsx96("span", { css: dotStyle })
|
|
17625
18042
|
] });
|
|
17626
18043
|
};
|
|
17627
18044
|
|
|
17628
18045
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
17629
|
-
import { useCallback as
|
|
18046
|
+
import { useCallback as useCallback8, useEffect as useEffect13, useRef as useRef8 } from "react";
|
|
17630
18047
|
|
|
17631
18048
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
17632
|
-
import { css as
|
|
17633
|
-
var loadingOverlayContainer =
|
|
18049
|
+
import { css as css76 } from "@emotion/react";
|
|
18050
|
+
var loadingOverlayContainer = css76`
|
|
17634
18051
|
position: absolute;
|
|
17635
18052
|
inset: 0;
|
|
17636
18053
|
overflow: hidden;
|
|
@@ -17638,30 +18055,30 @@ var loadingOverlayContainer = css75`
|
|
|
17638
18055
|
padding: var(--spacing-xl);
|
|
17639
18056
|
overflow-y: auto;
|
|
17640
18057
|
`;
|
|
17641
|
-
var loadingOverlayVisible =
|
|
18058
|
+
var loadingOverlayVisible = css76`
|
|
17642
18059
|
display: flex;
|
|
17643
18060
|
`;
|
|
17644
|
-
var loadingOverlayHidden =
|
|
18061
|
+
var loadingOverlayHidden = css76`
|
|
17645
18062
|
display: none;
|
|
17646
18063
|
`;
|
|
17647
|
-
var loadingOverlayBackground = (bgColor) =>
|
|
18064
|
+
var loadingOverlayBackground = (bgColor) => css76`
|
|
17648
18065
|
background: ${bgColor};
|
|
17649
18066
|
opacity: 0.92;
|
|
17650
18067
|
position: absolute;
|
|
17651
18068
|
inset: 0 0;
|
|
17652
18069
|
`;
|
|
17653
|
-
var loadingOverlayBody =
|
|
18070
|
+
var loadingOverlayBody = css76`
|
|
17654
18071
|
align-items: center;
|
|
17655
18072
|
display: flex;
|
|
17656
18073
|
flex-direction: column;
|
|
17657
18074
|
`;
|
|
17658
|
-
var loadingOverlayMessage =
|
|
18075
|
+
var loadingOverlayMessage = css76`
|
|
17659
18076
|
color: var(--gray-600);
|
|
17660
18077
|
margin: var(--spacing-base) 0 0;
|
|
17661
18078
|
`;
|
|
17662
18079
|
|
|
17663
18080
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
17664
|
-
import { jsx as
|
|
18081
|
+
import { jsx as jsx97, jsxs as jsxs64 } from "@emotion/react/jsx-runtime";
|
|
17665
18082
|
var LoadingOverlay = ({
|
|
17666
18083
|
isActive,
|
|
17667
18084
|
statusMessage,
|
|
@@ -17672,14 +18089,14 @@ var LoadingOverlay = ({
|
|
|
17672
18089
|
isPaused = false,
|
|
17673
18090
|
children
|
|
17674
18091
|
}) => {
|
|
17675
|
-
const lottieRef =
|
|
17676
|
-
const onLoopComplete =
|
|
18092
|
+
const lottieRef = useRef8(null);
|
|
18093
|
+
const onLoopComplete = useCallback8(() => {
|
|
17677
18094
|
var _a, _b, _c;
|
|
17678
18095
|
if (isPaused && !((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
17679
18096
|
(_c = lottieRef.current) == null ? void 0 : _c.stop();
|
|
17680
18097
|
}
|
|
17681
18098
|
}, [isPaused]);
|
|
17682
|
-
|
|
18099
|
+
useEffect13(() => {
|
|
17683
18100
|
var _a, _b, _c, _d, _e, _f;
|
|
17684
18101
|
if (!isPaused && ((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
17685
18102
|
(_c = lottieRef.current) == null ? void 0 : _c.play();
|
|
@@ -17687,7 +18104,7 @@ var LoadingOverlay = ({
|
|
|
17687
18104
|
(_f = lottieRef.current) == null ? void 0 : _f.stop();
|
|
17688
18105
|
}
|
|
17689
18106
|
}, [isPaused]);
|
|
17690
|
-
return /* @__PURE__ */
|
|
18107
|
+
return /* @__PURE__ */ jsxs64(
|
|
17691
18108
|
"div",
|
|
17692
18109
|
{
|
|
17693
18110
|
role: "alert",
|
|
@@ -17695,9 +18112,9 @@ var LoadingOverlay = ({
|
|
|
17695
18112
|
"aria-hidden": !isActive,
|
|
17696
18113
|
"aria-busy": isActive && !isPaused,
|
|
17697
18114
|
children: [
|
|
17698
|
-
/* @__PURE__ */
|
|
17699
|
-
/* @__PURE__ */
|
|
17700
|
-
/* @__PURE__ */
|
|
18115
|
+
/* @__PURE__ */ jsx97("div", { css: loadingOverlayBackground(overlayBackgroundColor) }),
|
|
18116
|
+
/* @__PURE__ */ jsx97("div", { css: { position: "relative", maxWidth: "100%", margin: isTopAligned ? "0" : "auto" }, children: /* @__PURE__ */ jsxs64("div", { css: loadingOverlayBody, children: [
|
|
18117
|
+
/* @__PURE__ */ jsx97(
|
|
17701
18118
|
AnimationFile,
|
|
17702
18119
|
{
|
|
17703
18120
|
lottieRef,
|
|
@@ -17712,15 +18129,15 @@ var LoadingOverlay = ({
|
|
|
17712
18129
|
}
|
|
17713
18130
|
}
|
|
17714
18131
|
),
|
|
17715
|
-
statusMessage ? /* @__PURE__ */
|
|
17716
|
-
/* @__PURE__ */
|
|
18132
|
+
statusMessage ? /* @__PURE__ */ jsx97("div", { css: loadingOverlayMessage, children: statusMessage }) : null,
|
|
18133
|
+
/* @__PURE__ */ jsx97("div", { css: { width: "100%", marginTop: "var(--spacing-md)" }, children })
|
|
17717
18134
|
] }) })
|
|
17718
18135
|
]
|
|
17719
18136
|
}
|
|
17720
18137
|
);
|
|
17721
18138
|
};
|
|
17722
18139
|
var LoadingIcon = ({ height, width, ...props }) => {
|
|
17723
|
-
return /* @__PURE__ */
|
|
18140
|
+
return /* @__PURE__ */ jsx97(
|
|
17724
18141
|
"svg",
|
|
17725
18142
|
{
|
|
17726
18143
|
viewBox: "0 0 38 38",
|
|
@@ -17730,9 +18147,9 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
17730
18147
|
stroke: "currentColor",
|
|
17731
18148
|
...props,
|
|
17732
18149
|
"data-testid": "loading-icon",
|
|
17733
|
-
children: /* @__PURE__ */
|
|
17734
|
-
/* @__PURE__ */
|
|
17735
|
-
/* @__PURE__ */
|
|
18150
|
+
children: /* @__PURE__ */ jsx97("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsxs64("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
18151
|
+
/* @__PURE__ */ jsx97("circle", { strokeOpacity: ".25", cx: "18", cy: "18", r: "18" }),
|
|
18152
|
+
/* @__PURE__ */ jsx97("path", { d: "M36 18c0-9.94-8.06-18-18-18", transform: "rotate(166.645 18 18)", children: /* @__PURE__ */ jsx97(
|
|
17736
18153
|
"animateTransform",
|
|
17737
18154
|
{
|
|
17738
18155
|
attributeName: "transform",
|
|
@@ -17749,7 +18166,7 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
17749
18166
|
};
|
|
17750
18167
|
|
|
17751
18168
|
// src/components/MediaCard/MediaCard.tsx
|
|
17752
|
-
import { useCallback as
|
|
18169
|
+
import { useCallback as useCallback9 } from "react";
|
|
17753
18170
|
|
|
17754
18171
|
// src/components/Popover/Popover.tsx
|
|
17755
18172
|
import {
|
|
@@ -17759,8 +18176,8 @@ import {
|
|
|
17759
18176
|
usePopoverContext,
|
|
17760
18177
|
usePopoverStore
|
|
17761
18178
|
} from "@ariakit/react";
|
|
17762
|
-
import { useEffect as
|
|
17763
|
-
import { Fragment as Fragment13, jsx as
|
|
18179
|
+
import { useEffect as useEffect14 } from "react";
|
|
18180
|
+
import { Fragment as Fragment13, jsx as jsx98, jsxs as jsxs65 } from "@emotion/react/jsx-runtime";
|
|
17764
18181
|
var Popover3 = ({
|
|
17765
18182
|
iconColor = "action",
|
|
17766
18183
|
icon = "info",
|
|
@@ -17776,23 +18193,23 @@ var Popover3 = ({
|
|
|
17776
18193
|
...otherProps
|
|
17777
18194
|
}) => {
|
|
17778
18195
|
const popover2 = usePopoverStore({ placement });
|
|
17779
|
-
|
|
18196
|
+
useEffect14(() => {
|
|
17780
18197
|
onInit == null ? void 0 : onInit({ store: popover2 });
|
|
17781
18198
|
}, [popover2]);
|
|
17782
|
-
return /* @__PURE__ */
|
|
17783
|
-
/* @__PURE__ */
|
|
18199
|
+
return /* @__PURE__ */ jsxs65(PopoverProvider, { store: popover2, children: [
|
|
18200
|
+
/* @__PURE__ */ jsx98(
|
|
17784
18201
|
PopoverDisclosure2,
|
|
17785
18202
|
{
|
|
17786
18203
|
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
17787
18204
|
title: buttonText,
|
|
17788
18205
|
"data-testid": testId,
|
|
17789
|
-
children: trigger2 ? trigger2 : /* @__PURE__ */
|
|
17790
|
-
/* @__PURE__ */
|
|
17791
|
-
/* @__PURE__ */
|
|
18206
|
+
children: trigger2 ? trigger2 : /* @__PURE__ */ jsxs65(Fragment13, { children: [
|
|
18207
|
+
/* @__PURE__ */ jsx98(Icon, { icon, iconColor, size: iconSize }),
|
|
18208
|
+
/* @__PURE__ */ jsx98("span", { hidden: true, children: buttonText })
|
|
17792
18209
|
] })
|
|
17793
18210
|
}
|
|
17794
18211
|
),
|
|
17795
|
-
/* @__PURE__ */
|
|
18212
|
+
/* @__PURE__ */ jsx98(AriakitPopover, { unmountOnHide: true, css: Popover, ...otherProps, "aria-label": ariaLabel, children })
|
|
17796
18213
|
] });
|
|
17797
18214
|
};
|
|
17798
18215
|
var usePopoverComponentContext = () => {
|
|
@@ -17801,8 +18218,8 @@ var usePopoverComponentContext = () => {
|
|
|
17801
18218
|
};
|
|
17802
18219
|
|
|
17803
18220
|
// src/components/MediaCard/MediaCard.styles.ts
|
|
17804
|
-
import { css as
|
|
17805
|
-
var cardBase =
|
|
18221
|
+
import { css as css77 } from "@emotion/react";
|
|
18222
|
+
var cardBase = css77`
|
|
17806
18223
|
--mediacard-title-color: var(--gray-500);
|
|
17807
18224
|
display: flex;
|
|
17808
18225
|
flex-direction: column;
|
|
@@ -17826,7 +18243,7 @@ var cardBase = css76`
|
|
|
17826
18243
|
cursor: default;
|
|
17827
18244
|
}
|
|
17828
18245
|
`;
|
|
17829
|
-
var coverWrapper =
|
|
18246
|
+
var coverWrapper = css77`
|
|
17830
18247
|
position: relative;
|
|
17831
18248
|
display: flex;
|
|
17832
18249
|
align-items: center;
|
|
@@ -17839,10 +18256,10 @@ var coverWrapper = css76`
|
|
|
17839
18256
|
outline: none;
|
|
17840
18257
|
border: 0;
|
|
17841
18258
|
`;
|
|
17842
|
-
var contentWrapper =
|
|
18259
|
+
var contentWrapper = css77`
|
|
17843
18260
|
padding: var(--spacing-sm);
|
|
17844
18261
|
`;
|
|
17845
|
-
var title =
|
|
18262
|
+
var title = css77`
|
|
17846
18263
|
font-size: var(--fs-sm);
|
|
17847
18264
|
color: var(--mediacard-title-color);
|
|
17848
18265
|
white-space: nowrap;
|
|
@@ -17857,7 +18274,7 @@ var title = css76`
|
|
|
17857
18274
|
outline: 2px solid var(--primary-action-default);
|
|
17858
18275
|
}
|
|
17859
18276
|
`;
|
|
17860
|
-
var subtitle =
|
|
18277
|
+
var subtitle = css77`
|
|
17861
18278
|
font-size: var(--fs-xs);
|
|
17862
18279
|
color: var(--gray-500);
|
|
17863
18280
|
white-space: nowrap;
|
|
@@ -17867,13 +18284,13 @@ var subtitle = css76`
|
|
|
17867
18284
|
border: 0;
|
|
17868
18285
|
background-color: transparent;
|
|
17869
18286
|
`;
|
|
17870
|
-
var sideSection =
|
|
18287
|
+
var sideSection = css77`
|
|
17871
18288
|
cursor: default;
|
|
17872
18289
|
`;
|
|
17873
|
-
var menuSection =
|
|
18290
|
+
var menuSection = css77`
|
|
17874
18291
|
cursor: default;
|
|
17875
18292
|
`;
|
|
17876
|
-
var menuButton =
|
|
18293
|
+
var menuButton = css77`
|
|
17877
18294
|
padding: var(--spacing-2xs);
|
|
17878
18295
|
border-radius: var(--rounded-sm);
|
|
17879
18296
|
border-width: 0;
|
|
@@ -17885,7 +18302,7 @@ var menuButton = css76`
|
|
|
17885
18302
|
`;
|
|
17886
18303
|
|
|
17887
18304
|
// src/components/MediaCard/MediaCard.tsx
|
|
17888
|
-
import { jsx as
|
|
18305
|
+
import { jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17889
18306
|
var MediaCard = ({
|
|
17890
18307
|
title: title2,
|
|
17891
18308
|
subtitle: subtitle2,
|
|
@@ -17897,17 +18314,17 @@ var MediaCard = ({
|
|
|
17897
18314
|
buttonType,
|
|
17898
18315
|
...cardProps
|
|
17899
18316
|
}) => {
|
|
17900
|
-
const onStopPropogation =
|
|
18317
|
+
const onStopPropogation = useCallback9((e) => {
|
|
17901
18318
|
e.stopPropagation();
|
|
17902
18319
|
}, []);
|
|
17903
18320
|
const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
|
|
17904
|
-
return /* @__PURE__ */
|
|
17905
|
-
/* @__PURE__ */
|
|
17906
|
-
/* @__PURE__ */
|
|
17907
|
-
/* @__PURE__ */
|
|
17908
|
-
/* @__PURE__ */
|
|
17909
|
-
/* @__PURE__ */
|
|
17910
|
-
!infoPopover ? null : /* @__PURE__ */
|
|
18321
|
+
return /* @__PURE__ */ jsxs66(Card, { css: cardBase, ...cardProps, onClick, "data-testid": "card-item", children: [
|
|
18322
|
+
/* @__PURE__ */ jsx99("button", { tabIndex: -1, css: coverWrapper, type: buttonType, children: cover }),
|
|
18323
|
+
/* @__PURE__ */ jsx99("div", { css: contentWrapper, children: /* @__PURE__ */ jsxs66(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
18324
|
+
/* @__PURE__ */ jsxs66(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
18325
|
+
/* @__PURE__ */ jsxs66(HorizontalRhythm, { gap: "xs", align: "center", css: { maxWidth: "100%" }, children: [
|
|
18326
|
+
/* @__PURE__ */ jsx99("button", { css: title, "data-testid": "card-title", children: title2 }),
|
|
18327
|
+
!infoPopover ? null : /* @__PURE__ */ jsx99("div", { css: { display: "flex", cursor: "default" }, onClick: onStopPropogation, children: /* @__PURE__ */ jsx99(
|
|
17911
18328
|
Popover3,
|
|
17912
18329
|
{
|
|
17913
18330
|
baseId: `info-of-${title2}`,
|
|
@@ -17916,31 +18333,31 @@ var MediaCard = ({
|
|
|
17916
18333
|
iconColor: "default",
|
|
17917
18334
|
tabIndex: 0,
|
|
17918
18335
|
css: { display: "block", maxWidth: "20rem" },
|
|
17919
|
-
children: /* @__PURE__ */
|
|
18336
|
+
children: /* @__PURE__ */ jsx99("div", { children: infoPopover })
|
|
17920
18337
|
}
|
|
17921
18338
|
) })
|
|
17922
18339
|
] }),
|
|
17923
|
-
subtitle2 ? /* @__PURE__ */
|
|
18340
|
+
subtitle2 ? /* @__PURE__ */ jsx99("button", { tabIndex: -1, css: subtitle, children: subtitle2 }) : null
|
|
17924
18341
|
] }),
|
|
17925
|
-
sideSection2 ? /* @__PURE__ */
|
|
17926
|
-
hasMenuItems ? /* @__PURE__ */
|
|
18342
|
+
sideSection2 ? /* @__PURE__ */ jsx99("div", { css: sideSection, onClick: onStopPropogation, children: sideSection2 }) : null,
|
|
18343
|
+
hasMenuItems ? /* @__PURE__ */ jsx99(
|
|
17927
18344
|
VerticalRhythm,
|
|
17928
18345
|
{
|
|
17929
18346
|
css: menuSection,
|
|
17930
18347
|
align: "center",
|
|
17931
18348
|
justify: "center",
|
|
17932
18349
|
onClick: onStopPropogation,
|
|
17933
|
-
children: /* @__PURE__ */
|
|
18350
|
+
children: /* @__PURE__ */ jsx99(
|
|
17934
18351
|
Menu,
|
|
17935
18352
|
{
|
|
17936
|
-
menuTrigger: /* @__PURE__ */
|
|
18353
|
+
menuTrigger: /* @__PURE__ */ jsx99(
|
|
17937
18354
|
"button",
|
|
17938
18355
|
{
|
|
17939
18356
|
type: "button",
|
|
17940
18357
|
"aria-label": "More options",
|
|
17941
18358
|
css: menuButton,
|
|
17942
18359
|
"data-testid": "button-more",
|
|
17943
|
-
children: /* @__PURE__ */
|
|
18360
|
+
children: /* @__PURE__ */ jsx99(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
|
|
17944
18361
|
}
|
|
17945
18362
|
),
|
|
17946
18363
|
menuLabel: `Menu of ${title2}`,
|
|
@@ -17955,12 +18372,13 @@ var MediaCard = ({
|
|
|
17955
18372
|
};
|
|
17956
18373
|
|
|
17957
18374
|
// src/components/Modal/Modal.tsx
|
|
18375
|
+
import { PortalContext } from "@ariakit/react";
|
|
17958
18376
|
import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
|
|
17959
|
-
import React20, { useEffect as
|
|
18377
|
+
import React20, { useEffect as useEffect15, useRef as useRef9 } from "react";
|
|
17960
18378
|
|
|
17961
18379
|
// src/components/Modal/Modal.styles.ts
|
|
17962
|
-
import { css as
|
|
17963
|
-
var modalStyles =
|
|
18380
|
+
import { css as css78 } from "@emotion/react";
|
|
18381
|
+
var modalStyles = css78`
|
|
17964
18382
|
border: none;
|
|
17965
18383
|
position: relative;
|
|
17966
18384
|
max-width: calc(100% - var(--spacing-base) * 2);
|
|
@@ -17974,16 +18392,16 @@ var modalStyles = css77`
|
|
|
17974
18392
|
opacity: 0.4;
|
|
17975
18393
|
}
|
|
17976
18394
|
`;
|
|
17977
|
-
var modalSizeSmall =
|
|
18395
|
+
var modalSizeSmall = css78`
|
|
17978
18396
|
width: clamp(280px, 100vw, 400px);
|
|
17979
18397
|
`;
|
|
17980
|
-
var modalSizeMedium =
|
|
18398
|
+
var modalSizeMedium = css78`
|
|
17981
18399
|
width: clamp(280px, 100vw, 600px);
|
|
17982
18400
|
`;
|
|
17983
|
-
var modalSizeLarge =
|
|
18401
|
+
var modalSizeLarge = css78`
|
|
17984
18402
|
width: clamp(280px, 100vw, 800px);
|
|
17985
18403
|
`;
|
|
17986
|
-
var modalInnerStyles =
|
|
18404
|
+
var modalInnerStyles = css78`
|
|
17987
18405
|
position: relative;
|
|
17988
18406
|
width: 100%;
|
|
17989
18407
|
display: flex;
|
|
@@ -17996,7 +18414,7 @@ var modalInnerStyles = css77`
|
|
|
17996
18414
|
box-shadow: var(--elevation-500);
|
|
17997
18415
|
border-radius: var(--rounded-base);
|
|
17998
18416
|
`;
|
|
17999
|
-
var modalHeaderStyles =
|
|
18417
|
+
var modalHeaderStyles = css78`
|
|
18000
18418
|
display: flex;
|
|
18001
18419
|
align-items: flex-start;
|
|
18002
18420
|
gap: var(--spacing-base);
|
|
@@ -18004,10 +18422,10 @@ var modalHeaderStyles = css77`
|
|
|
18004
18422
|
font-family: var(--ff-base);
|
|
18005
18423
|
line-height: 1.2;
|
|
18006
18424
|
`;
|
|
18007
|
-
var modalHeaderHeaderStyles =
|
|
18425
|
+
var modalHeaderHeaderStyles = css78`
|
|
18008
18426
|
max-width: calc(100% - 3rem);
|
|
18009
18427
|
`;
|
|
18010
|
-
var modalCloseButtonStyles =
|
|
18428
|
+
var modalCloseButtonStyles = css78`
|
|
18011
18429
|
background: transparent;
|
|
18012
18430
|
border: none;
|
|
18013
18431
|
color: var(--gray-300);
|
|
@@ -18022,7 +18440,7 @@ var modalCloseButtonStyles = css77`
|
|
|
18022
18440
|
color: var(--gray-400);
|
|
18023
18441
|
}
|
|
18024
18442
|
`;
|
|
18025
|
-
var modalContentStyles =
|
|
18443
|
+
var modalContentStyles = css78`
|
|
18026
18444
|
position: relative;
|
|
18027
18445
|
flex: 1;
|
|
18028
18446
|
overflow: auto;
|
|
@@ -18031,10 +18449,10 @@ var modalContentStyles = css77`
|
|
|
18031
18449
|
border-radius: var(--rounded-sm);
|
|
18032
18450
|
${scrollbarStyles}
|
|
18033
18451
|
`;
|
|
18034
|
-
var modalDialogWrapper =
|
|
18452
|
+
var modalDialogWrapper = css78`
|
|
18035
18453
|
padding: 0 var(--spacing-lg) var(--spacing-md);
|
|
18036
18454
|
`;
|
|
18037
|
-
var modalDialogInnerStyles =
|
|
18455
|
+
var modalDialogInnerStyles = css78`
|
|
18038
18456
|
// we need to override the gap of the modalInnerStyles when using a modal dialog
|
|
18039
18457
|
> div {
|
|
18040
18458
|
gap: 0;
|
|
@@ -18042,7 +18460,7 @@ var modalDialogInnerStyles = css77`
|
|
|
18042
18460
|
`;
|
|
18043
18461
|
|
|
18044
18462
|
// src/components/Modal/Modal.tsx
|
|
18045
|
-
import { jsx as
|
|
18463
|
+
import { jsx as jsx100, jsxs as jsxs67 } from "@emotion/react/jsx-runtime";
|
|
18046
18464
|
var defaultModalWidth = "75rem";
|
|
18047
18465
|
var defaultModalHeight = "51rem";
|
|
18048
18466
|
var Modal = React20.forwardRef(
|
|
@@ -18058,7 +18476,7 @@ var Modal = React20.forwardRef(
|
|
|
18058
18476
|
withoutContentBackground = false,
|
|
18059
18477
|
...modalProps
|
|
18060
18478
|
}, ref) => {
|
|
18061
|
-
const dialogRef =
|
|
18479
|
+
const dialogRef = useRef9(null);
|
|
18062
18480
|
const size = {
|
|
18063
18481
|
sm: modalSizeSmall,
|
|
18064
18482
|
md: modalSizeMedium,
|
|
@@ -18070,7 +18488,7 @@ var Modal = React20.forwardRef(
|
|
|
18070
18488
|
},
|
|
18071
18489
|
shortcut: "escape"
|
|
18072
18490
|
});
|
|
18073
|
-
|
|
18491
|
+
useEffect15(() => {
|
|
18074
18492
|
var _a;
|
|
18075
18493
|
if (!document.contains(dialogRef.current)) {
|
|
18076
18494
|
console.warn(
|
|
@@ -18084,7 +18502,7 @@ var Modal = React20.forwardRef(
|
|
|
18084
18502
|
(_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
18085
18503
|
};
|
|
18086
18504
|
}, []);
|
|
18087
|
-
return /* @__PURE__ */
|
|
18505
|
+
return /* @__PURE__ */ jsx100(
|
|
18088
18506
|
"dialog",
|
|
18089
18507
|
{
|
|
18090
18508
|
ref: (element) => {
|
|
@@ -18106,15 +18524,15 @@ var Modal = React20.forwardRef(
|
|
|
18106
18524
|
e.preventDefault();
|
|
18107
18525
|
},
|
|
18108
18526
|
...modalProps,
|
|
18109
|
-
children: /* @__PURE__ */
|
|
18527
|
+
children: /* @__PURE__ */ jsx100(PortalContext.Provider, { value: dialogRef.current, children: /* @__PURE__ */ jsxs67(
|
|
18110
18528
|
"div",
|
|
18111
18529
|
{
|
|
18112
18530
|
css: [modalInnerStyles, { height: height === "auto" ? "auto" : "100%" }],
|
|
18113
18531
|
onClick: (e) => e.stopPropagation(),
|
|
18114
18532
|
children: [
|
|
18115
|
-
/* @__PURE__ */
|
|
18116
|
-
!header2 ? null : /* @__PURE__ */
|
|
18117
|
-
/* @__PURE__ */
|
|
18533
|
+
/* @__PURE__ */ jsxs67("div", { css: modalHeaderStyles, children: [
|
|
18534
|
+
!header2 ? null : /* @__PURE__ */ jsx100("div", { css: modalHeaderHeaderStyles, children: header2 }),
|
|
18535
|
+
/* @__PURE__ */ jsx100(
|
|
18118
18536
|
Button,
|
|
18119
18537
|
{
|
|
18120
18538
|
type: "button",
|
|
@@ -18123,11 +18541,11 @@ var Modal = React20.forwardRef(
|
|
|
18123
18541
|
title: "Close dialog",
|
|
18124
18542
|
buttonType: "ghost",
|
|
18125
18543
|
"data-testid": "close-dialog",
|
|
18126
|
-
children: /* @__PURE__ */
|
|
18544
|
+
children: /* @__PURE__ */ jsx100(Icon, { icon: CgClose4, iconColor: "currentColor", size: 24 })
|
|
18127
18545
|
}
|
|
18128
18546
|
)
|
|
18129
18547
|
] }),
|
|
18130
|
-
/* @__PURE__ */
|
|
18548
|
+
/* @__PURE__ */ jsx100(
|
|
18131
18549
|
"div",
|
|
18132
18550
|
{
|
|
18133
18551
|
css: [
|
|
@@ -18138,10 +18556,10 @@ var Modal = React20.forwardRef(
|
|
|
18138
18556
|
children
|
|
18139
18557
|
}
|
|
18140
18558
|
),
|
|
18141
|
-
buttonGroup ? /* @__PURE__ */
|
|
18559
|
+
buttonGroup ? /* @__PURE__ */ jsx100(HorizontalRhythm, { children: buttonGroup }) : null
|
|
18142
18560
|
]
|
|
18143
18561
|
}
|
|
18144
|
-
)
|
|
18562
|
+
) })
|
|
18145
18563
|
}
|
|
18146
18564
|
);
|
|
18147
18565
|
}
|
|
@@ -18150,10 +18568,10 @@ Modal.displayName = "Modal";
|
|
|
18150
18568
|
|
|
18151
18569
|
// src/components/Modal/ModalDialog.tsx
|
|
18152
18570
|
import { forwardRef as forwardRef15 } from "react";
|
|
18153
|
-
import { jsx as
|
|
18571
|
+
import { jsx as jsx101, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
18154
18572
|
var ModalDialog = forwardRef15(
|
|
18155
18573
|
({ header: header2, buttonGroup, modalSize = "lg", children, height = "auto", onRequestClose, ...props }, ref) => {
|
|
18156
|
-
return /* @__PURE__ */
|
|
18574
|
+
return /* @__PURE__ */ jsx101(
|
|
18157
18575
|
Modal,
|
|
18158
18576
|
{
|
|
18159
18577
|
...props,
|
|
@@ -18165,10 +18583,10 @@ var ModalDialog = forwardRef15(
|
|
|
18165
18583
|
withoutContentPadding: true,
|
|
18166
18584
|
css: modalDialogInnerStyles,
|
|
18167
18585
|
width: "",
|
|
18168
|
-
children: /* @__PURE__ */
|
|
18169
|
-
/* @__PURE__ */
|
|
18170
|
-
/* @__PURE__ */
|
|
18171
|
-
/* @__PURE__ */
|
|
18586
|
+
children: /* @__PURE__ */ jsxs68(VerticalRhythm, { css: modalDialogWrapper, children: [
|
|
18587
|
+
/* @__PURE__ */ jsx101("div", { css: modalHeaderStyles, children: header2 }),
|
|
18588
|
+
/* @__PURE__ */ jsx101("div", { children }),
|
|
18589
|
+
/* @__PURE__ */ jsx101(HorizontalRhythm, { children: buttonGroup })
|
|
18172
18590
|
] })
|
|
18173
18591
|
}
|
|
18174
18592
|
);
|
|
@@ -18177,22 +18595,22 @@ var ModalDialog = forwardRef15(
|
|
|
18177
18595
|
ModalDialog.displayName = "ModalDialog";
|
|
18178
18596
|
|
|
18179
18597
|
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
18180
|
-
import { css as
|
|
18181
|
-
var ObjectGridContainer = (gridCount) =>
|
|
18598
|
+
import { css as css79 } from "@emotion/react";
|
|
18599
|
+
var ObjectGridContainer = (gridCount) => css79`
|
|
18182
18600
|
display: grid;
|
|
18183
18601
|
grid-template-columns: repeat(${gridCount}, minmax(250px, 1fr));
|
|
18184
18602
|
gap: var(--spacing-base);
|
|
18185
18603
|
`;
|
|
18186
18604
|
|
|
18187
18605
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
18188
|
-
import { jsx as
|
|
18606
|
+
import { jsx as jsx102 } from "@emotion/react/jsx-runtime";
|
|
18189
18607
|
var ObjectGridContainer2 = ({ gridCount = 3, children }) => {
|
|
18190
|
-
return /* @__PURE__ */
|
|
18608
|
+
return /* @__PURE__ */ jsx102("div", { "data-testid": "object-grid-container", css: ObjectGridContainer(gridCount), children });
|
|
18191
18609
|
};
|
|
18192
18610
|
|
|
18193
18611
|
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
18194
|
-
import { css as
|
|
18195
|
-
var ObjectGridItem =
|
|
18612
|
+
import { css as css80 } from "@emotion/react";
|
|
18613
|
+
var ObjectGridItem = css80`
|
|
18196
18614
|
border: 1px solid var(--gray-300);
|
|
18197
18615
|
border-radius: var(--rounded-base);
|
|
18198
18616
|
background: var(--white);
|
|
@@ -18210,21 +18628,21 @@ var ObjectGridItem = css79`
|
|
|
18210
18628
|
}
|
|
18211
18629
|
}
|
|
18212
18630
|
`;
|
|
18213
|
-
var ObjectGridItemMediaWrapper =
|
|
18631
|
+
var ObjectGridItemMediaWrapper = css80`
|
|
18214
18632
|
display: flex;
|
|
18215
18633
|
flex: 1 1 0;
|
|
18216
18634
|
position: relative;
|
|
18217
18635
|
`;
|
|
18218
|
-
var ObjectGridItemContentWrapper =
|
|
18636
|
+
var ObjectGridItemContentWrapper = css80`
|
|
18219
18637
|
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
18220
18638
|
min-height: 52px;
|
|
18221
18639
|
`;
|
|
18222
|
-
var ObjectGridItemImage =
|
|
18640
|
+
var ObjectGridItemImage = css80`
|
|
18223
18641
|
object-fit: cover;
|
|
18224
18642
|
width: 100%;
|
|
18225
18643
|
height: auto;
|
|
18226
18644
|
`;
|
|
18227
|
-
var MenuBtn =
|
|
18645
|
+
var MenuBtn = css80`
|
|
18228
18646
|
border: none;
|
|
18229
18647
|
background: transparent;
|
|
18230
18648
|
padding: var(--spacing-xs);
|
|
@@ -18239,7 +18657,7 @@ var MenuBtn = css79`
|
|
|
18239
18657
|
`;
|
|
18240
18658
|
|
|
18241
18659
|
// src/components/Objects/ObjectGridItem.tsx
|
|
18242
|
-
import { jsx as
|
|
18660
|
+
import { jsx as jsx103, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
18243
18661
|
var ObjectGridItem2 = ({
|
|
18244
18662
|
header: header2,
|
|
18245
18663
|
cover,
|
|
@@ -18248,28 +18666,28 @@ var ObjectGridItem2 = ({
|
|
|
18248
18666
|
isSelected,
|
|
18249
18667
|
children
|
|
18250
18668
|
}) => {
|
|
18251
|
-
return /* @__PURE__ */
|
|
18252
|
-
/* @__PURE__ */
|
|
18253
|
-
/* @__PURE__ */
|
|
18254
|
-
/* @__PURE__ */
|
|
18255
|
-
/* @__PURE__ */
|
|
18669
|
+
return /* @__PURE__ */ jsxs69("div", { css: ObjectGridItem, "aria-selected": isSelected, children: [
|
|
18670
|
+
/* @__PURE__ */ jsx103("div", { css: ObjectGridItemMediaWrapper, children: cover }),
|
|
18671
|
+
/* @__PURE__ */ jsxs69(HorizontalRhythm, { css: ObjectGridItemContentWrapper, justify: "space-between", gap: "sm", children: [
|
|
18672
|
+
/* @__PURE__ */ jsxs69(VerticalRhythm, { gap: "0", children: [
|
|
18673
|
+
/* @__PURE__ */ jsx103(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
18256
18674
|
children
|
|
18257
18675
|
] }),
|
|
18258
|
-
/* @__PURE__ */
|
|
18676
|
+
/* @__PURE__ */ jsxs69(HorizontalRhythm, { gap: "xs", align: "flex-start", children: [
|
|
18259
18677
|
rightSlot,
|
|
18260
|
-
menuItems ? /* @__PURE__ */
|
|
18678
|
+
menuItems ? /* @__PURE__ */ jsx103(
|
|
18261
18679
|
Menu,
|
|
18262
18680
|
{
|
|
18263
18681
|
menuTrigger: (
|
|
18264
18682
|
// TODO: once insights lands we should be able to replace this with MenuTrigger component
|
|
18265
|
-
/* @__PURE__ */
|
|
18683
|
+
/* @__PURE__ */ jsx103(
|
|
18266
18684
|
"button",
|
|
18267
18685
|
{
|
|
18268
18686
|
type: "button",
|
|
18269
18687
|
"data-testid": "object-grid-item-menu-btn",
|
|
18270
18688
|
title: "menu options",
|
|
18271
18689
|
css: MenuBtn,
|
|
18272
|
-
children: /* @__PURE__ */
|
|
18690
|
+
children: /* @__PURE__ */ jsx103(Icon, { icon: "more-alt", size: "1rem", iconColor: "currentColor" })
|
|
18273
18691
|
}
|
|
18274
18692
|
)
|
|
18275
18693
|
),
|
|
@@ -18283,15 +18701,15 @@ var ObjectGridItem2 = ({
|
|
|
18283
18701
|
};
|
|
18284
18702
|
|
|
18285
18703
|
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
18286
|
-
import { css as
|
|
18287
|
-
var CoverImage =
|
|
18704
|
+
import { css as css81 } from "@emotion/react";
|
|
18705
|
+
var CoverImage = css81`
|
|
18288
18706
|
aspect-ratio: 16/9;
|
|
18289
18707
|
max-width: 100%;
|
|
18290
18708
|
max-height: 100%;
|
|
18291
18709
|
height: auto;
|
|
18292
18710
|
padding: var(--spacing-sm);
|
|
18293
18711
|
`;
|
|
18294
|
-
var CoverIconWrapper =
|
|
18712
|
+
var CoverIconWrapper = css81`
|
|
18295
18713
|
position: relative;
|
|
18296
18714
|
display: flex;
|
|
18297
18715
|
align-items: center;
|
|
@@ -18299,7 +18717,7 @@ var CoverIconWrapper = css80`
|
|
|
18299
18717
|
flex: 1;
|
|
18300
18718
|
overflow: hidden;
|
|
18301
18719
|
`;
|
|
18302
|
-
var CoverIconGhost =
|
|
18720
|
+
var CoverIconGhost = css81`
|
|
18303
18721
|
position: absolute;
|
|
18304
18722
|
width: 60%;
|
|
18305
18723
|
height: auto;
|
|
@@ -18307,7 +18725,7 @@ var CoverIconGhost = css80`
|
|
|
18307
18725
|
opacity: 0.05;
|
|
18308
18726
|
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
18309
18727
|
`;
|
|
18310
|
-
var CoverSlot =
|
|
18728
|
+
var CoverSlot = css81`
|
|
18311
18729
|
align-items: center;
|
|
18312
18730
|
background: var(--white);
|
|
18313
18731
|
display: flex;
|
|
@@ -18318,15 +18736,15 @@ var CoverSlot = css80`
|
|
|
18318
18736
|
width: 24px;
|
|
18319
18737
|
height: 24px;
|
|
18320
18738
|
`;
|
|
18321
|
-
var CoverSlotLeft =
|
|
18739
|
+
var CoverSlotLeft = css81`
|
|
18322
18740
|
border-bottom-right-radius: var(--rounded-base);
|
|
18323
18741
|
left: var(--spacing-sm);
|
|
18324
18742
|
`;
|
|
18325
|
-
var CoverSlotRight =
|
|
18743
|
+
var CoverSlotRight = css81`
|
|
18326
18744
|
border-bottom-left-radius: var(--rounded-base);
|
|
18327
18745
|
right: var(--spacing-sm);
|
|
18328
18746
|
`;
|
|
18329
|
-
var CoverButton =
|
|
18747
|
+
var CoverButton = css81`
|
|
18330
18748
|
align-items: stretch;
|
|
18331
18749
|
border: none;
|
|
18332
18750
|
background: none;
|
|
@@ -18339,7 +18757,7 @@ var CoverButton = css80`
|
|
|
18339
18757
|
outline: none;
|
|
18340
18758
|
}
|
|
18341
18759
|
`;
|
|
18342
|
-
var CoverSelectedChip =
|
|
18760
|
+
var CoverSelectedChip = css81`
|
|
18343
18761
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
18344
18762
|
opacity: 0;
|
|
18345
18763
|
position: absolute;
|
|
@@ -18348,11 +18766,11 @@ var CoverSelectedChip = css80`
|
|
|
18348
18766
|
`;
|
|
18349
18767
|
|
|
18350
18768
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
18351
|
-
import { Fragment as Fragment14, jsx as
|
|
18769
|
+
import { Fragment as Fragment14, jsx as jsx104, jsxs as jsxs70 } from "@emotion/react/jsx-runtime";
|
|
18352
18770
|
var ObjectGridItemCardCover = (props) => {
|
|
18353
18771
|
if ("imageUrl" in props && props.imageUrl) {
|
|
18354
18772
|
const { imageUrl } = props;
|
|
18355
|
-
return /* @__PURE__ */
|
|
18773
|
+
return /* @__PURE__ */ jsx104(
|
|
18356
18774
|
"img",
|
|
18357
18775
|
{
|
|
18358
18776
|
src: imageUrl,
|
|
@@ -18365,9 +18783,9 @@ var ObjectGridItemCardCover = (props) => {
|
|
|
18365
18783
|
}
|
|
18366
18784
|
if ("icon" in props && props.icon) {
|
|
18367
18785
|
const { icon } = props;
|
|
18368
|
-
return /* @__PURE__ */
|
|
18369
|
-
/* @__PURE__ */
|
|
18370
|
-
/* @__PURE__ */
|
|
18786
|
+
return /* @__PURE__ */ jsxs70("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
18787
|
+
/* @__PURE__ */ jsx104(Icon, { icon, iconColor: "currentColor", css: CoverIconGhost }),
|
|
18788
|
+
/* @__PURE__ */ jsx104(Icon, { icon, iconColor: "currentColor", size: 48 })
|
|
18371
18789
|
] });
|
|
18372
18790
|
}
|
|
18373
18791
|
};
|
|
@@ -18376,10 +18794,10 @@ var ObjectGridItemCover = ({
|
|
|
18376
18794
|
coverSlotRight,
|
|
18377
18795
|
...props
|
|
18378
18796
|
}) => {
|
|
18379
|
-
return /* @__PURE__ */
|
|
18380
|
-
coverSlotLeft ? /* @__PURE__ */
|
|
18381
|
-
/* @__PURE__ */
|
|
18382
|
-
coverSlotRight ? /* @__PURE__ */
|
|
18797
|
+
return /* @__PURE__ */ jsxs70(Fragment14, { children: [
|
|
18798
|
+
coverSlotLeft ? /* @__PURE__ */ jsx104("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
18799
|
+
/* @__PURE__ */ jsx104(ObjectGridItemCardCover, { ...props }),
|
|
18800
|
+
coverSlotRight ? /* @__PURE__ */ jsx104("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null
|
|
18383
18801
|
] });
|
|
18384
18802
|
};
|
|
18385
18803
|
var ObjectGridItemCoverButton = ({
|
|
@@ -18391,20 +18809,20 @@ var ObjectGridItemCoverButton = ({
|
|
|
18391
18809
|
selectedText = "selected",
|
|
18392
18810
|
...props
|
|
18393
18811
|
}) => {
|
|
18394
|
-
return /* @__PURE__ */
|
|
18395
|
-
coverSlotLeft ? /* @__PURE__ */
|
|
18396
|
-
/* @__PURE__ */
|
|
18397
|
-
coverSlotRight ? /* @__PURE__ */
|
|
18398
|
-
isSelected ? /* @__PURE__ */
|
|
18812
|
+
return /* @__PURE__ */ jsxs70("button", { type: "button", css: CoverButton, onClick: () => onSelection(id), "aria-selected": isSelected, children: [
|
|
18813
|
+
coverSlotLeft ? /* @__PURE__ */ jsx104("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
18814
|
+
/* @__PURE__ */ jsx104(ObjectGridItemCardCover, { ...props }),
|
|
18815
|
+
coverSlotRight ? /* @__PURE__ */ jsx104("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
18816
|
+
isSelected ? /* @__PURE__ */ jsx104("div", { css: CoverSelectedChip, children: /* @__PURE__ */ jsx104(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
18399
18817
|
] });
|
|
18400
18818
|
};
|
|
18401
18819
|
|
|
18402
18820
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
18403
|
-
import { useEffect as
|
|
18821
|
+
import { useEffect as useEffect16, useRef as useRef10, useState as useState13 } from "react";
|
|
18404
18822
|
|
|
18405
18823
|
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
18406
|
-
import { css as
|
|
18407
|
-
var ObjectGridItemHeading =
|
|
18824
|
+
import { css as css82 } from "@emotion/react";
|
|
18825
|
+
var ObjectGridItemHeading = css82`
|
|
18408
18826
|
overflow: hidden;
|
|
18409
18827
|
text-overflow: ellipsis;
|
|
18410
18828
|
white-space: initial;
|
|
@@ -18412,20 +18830,20 @@ var ObjectGridItemHeading = css81`
|
|
|
18412
18830
|
-webkit-line-clamp: 1;
|
|
18413
18831
|
-webkit-box-orient: vertical;
|
|
18414
18832
|
`;
|
|
18415
|
-
var PopoverContent =
|
|
18833
|
+
var PopoverContent = css82`
|
|
18416
18834
|
min-width: 50px;
|
|
18417
18835
|
`;
|
|
18418
18836
|
|
|
18419
18837
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
18420
|
-
import { jsx as
|
|
18838
|
+
import { jsx as jsx105, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
18421
18839
|
var ObjectGridItemHeading2 = ({
|
|
18422
18840
|
heading,
|
|
18423
18841
|
beforeHeadingSlot,
|
|
18424
18842
|
afterHeadingSlot
|
|
18425
18843
|
}) => {
|
|
18426
|
-
const [hasTruncation, setHasTruncation] =
|
|
18427
|
-
const headingRef =
|
|
18428
|
-
|
|
18844
|
+
const [hasTruncation, setHasTruncation] = useState13(false);
|
|
18845
|
+
const headingRef = useRef10(null);
|
|
18846
|
+
useEffect16(() => {
|
|
18429
18847
|
const currentHeading = headingRef.current;
|
|
18430
18848
|
const observer = new ResizeObserver((entries) => {
|
|
18431
18849
|
for (const entry of entries) {
|
|
@@ -18442,57 +18860,57 @@ var ObjectGridItemHeading2 = ({
|
|
|
18442
18860
|
}
|
|
18443
18861
|
};
|
|
18444
18862
|
}, []);
|
|
18445
|
-
return /* @__PURE__ */
|
|
18863
|
+
return /* @__PURE__ */ jsxs71(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
18446
18864
|
beforeHeadingSlot,
|
|
18447
|
-
/* @__PURE__ */
|
|
18865
|
+
/* @__PURE__ */ jsx105(Tooltip, { title: hasTruncation ? heading : "", children: /* @__PURE__ */ jsx105("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, children: heading }) }),
|
|
18448
18866
|
afterHeadingSlot
|
|
18449
18867
|
] });
|
|
18450
18868
|
};
|
|
18451
18869
|
|
|
18452
18870
|
// src/components/Objects/ObjectGridItemIconWithTooltip.tsx
|
|
18453
|
-
import { jsx as
|
|
18871
|
+
import { jsx as jsx106 } from "@emotion/react/jsx-runtime";
|
|
18454
18872
|
var ObjectGridItemIconWithTooltip = ({
|
|
18455
18873
|
tooltipTitle,
|
|
18456
18874
|
placement = "bottom-start",
|
|
18457
18875
|
icon,
|
|
18458
18876
|
iconColor = "accent-dark"
|
|
18459
18877
|
}) => {
|
|
18460
|
-
return /* @__PURE__ */
|
|
18878
|
+
return /* @__PURE__ */ jsx106(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ jsx106("span", { children: /* @__PURE__ */ jsx106(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
18461
18879
|
};
|
|
18462
18880
|
|
|
18463
18881
|
// src/components/Pagination/Pagination.tsx
|
|
18464
18882
|
import Paginate from "react-paginate";
|
|
18465
18883
|
|
|
18466
18884
|
// src/components/Pagination/Pagniation.styles.ts
|
|
18467
|
-
import { css as
|
|
18468
|
-
var container2 =
|
|
18885
|
+
import { css as css83 } from "@emotion/css";
|
|
18886
|
+
var container2 = css83`
|
|
18469
18887
|
align-items: center;
|
|
18470
18888
|
display: flex;
|
|
18471
18889
|
`;
|
|
18472
|
-
var disabled =
|
|
18890
|
+
var disabled = css83`
|
|
18473
18891
|
opacity: var(--opacity-50);
|
|
18474
18892
|
`;
|
|
18475
|
-
var disabledLink =
|
|
18893
|
+
var disabledLink = css83`
|
|
18476
18894
|
cursor: pointer-default;
|
|
18477
18895
|
`;
|
|
18478
|
-
var pageLink =
|
|
18896
|
+
var pageLink = css83`
|
|
18479
18897
|
display: block;
|
|
18480
18898
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
18481
18899
|
`;
|
|
18482
|
-
var prevNextControls =
|
|
18900
|
+
var prevNextControls = css83`
|
|
18483
18901
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
18484
18902
|
`;
|
|
18485
|
-
var active =
|
|
18903
|
+
var active = css83`
|
|
18486
18904
|
border-radius: var(--rounded-base);
|
|
18487
18905
|
background: var(--gray-200);
|
|
18488
18906
|
`;
|
|
18489
|
-
var page =
|
|
18907
|
+
var page = css83`
|
|
18490
18908
|
margin-left: var(--spacing-xs);
|
|
18491
18909
|
margin-right: var(--spacing-xs);
|
|
18492
18910
|
`;
|
|
18493
18911
|
|
|
18494
18912
|
// src/components/Pagination/Pagination.tsx
|
|
18495
|
-
import { jsx as
|
|
18913
|
+
import { jsx as jsx107 } from "@emotion/react/jsx-runtime";
|
|
18496
18914
|
function Pagination({
|
|
18497
18915
|
limit,
|
|
18498
18916
|
offset,
|
|
@@ -18507,12 +18925,12 @@ function Pagination({
|
|
|
18507
18925
|
if (pageCount <= 1) {
|
|
18508
18926
|
return null;
|
|
18509
18927
|
}
|
|
18510
|
-
return /* @__PURE__ */
|
|
18928
|
+
return /* @__PURE__ */ jsx107(
|
|
18511
18929
|
Paginate,
|
|
18512
18930
|
{
|
|
18513
18931
|
forcePage: currentPage,
|
|
18514
|
-
previousLabel: /* @__PURE__ */
|
|
18515
|
-
nextLabel: /* @__PURE__ */
|
|
18932
|
+
previousLabel: /* @__PURE__ */ jsx107("div", { className: prevNextControls, children: "<" }),
|
|
18933
|
+
nextLabel: /* @__PURE__ */ jsx107("div", { className: prevNextControls, children: ">" }),
|
|
18516
18934
|
breakLabel: "...",
|
|
18517
18935
|
pageCount,
|
|
18518
18936
|
marginPagesDisplayed: 2,
|
|
@@ -18552,8 +18970,8 @@ var useParameterShell = () => {
|
|
|
18552
18970
|
};
|
|
18553
18971
|
|
|
18554
18972
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
18555
|
-
import { css as
|
|
18556
|
-
var inputIconBtn =
|
|
18973
|
+
import { css as css84 } from "@emotion/react";
|
|
18974
|
+
var inputIconBtn = css84`
|
|
18557
18975
|
align-items: center;
|
|
18558
18976
|
border: none;
|
|
18559
18977
|
border-radius: var(--rounded-base);
|
|
@@ -18579,7 +18997,7 @@ var inputIconBtn = css83`
|
|
|
18579
18997
|
`;
|
|
18580
18998
|
|
|
18581
18999
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
18582
|
-
import { jsx as
|
|
19000
|
+
import { jsx as jsx108, jsxs as jsxs72 } from "@emotion/react/jsx-runtime";
|
|
18583
19001
|
var LabelLeadingIcon = ({
|
|
18584
19002
|
icon,
|
|
18585
19003
|
iconColor,
|
|
@@ -18591,7 +19009,7 @@ var LabelLeadingIcon = ({
|
|
|
18591
19009
|
...props
|
|
18592
19010
|
}) => {
|
|
18593
19011
|
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
18594
|
-
return /* @__PURE__ */
|
|
19012
|
+
return /* @__PURE__ */ jsx108(Tooltip, { title: titleFr, children: /* @__PURE__ */ jsxs72(
|
|
18595
19013
|
"button",
|
|
18596
19014
|
{
|
|
18597
19015
|
css: inputIconBtn,
|
|
@@ -18601,7 +19019,7 @@ var LabelLeadingIcon = ({
|
|
|
18601
19019
|
...props,
|
|
18602
19020
|
"data-testid": "lock-button",
|
|
18603
19021
|
children: [
|
|
18604
|
-
/* @__PURE__ */
|
|
19022
|
+
/* @__PURE__ */ jsx108(
|
|
18605
19023
|
Icon,
|
|
18606
19024
|
{
|
|
18607
19025
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -18617,8 +19035,8 @@ var LabelLeadingIcon = ({
|
|
|
18617
19035
|
var ConnectToDataElementButton = LabelLeadingIcon;
|
|
18618
19036
|
|
|
18619
19037
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
18620
|
-
import { css as
|
|
18621
|
-
var inputContainer2 =
|
|
19038
|
+
import { css as css85 } from "@emotion/react";
|
|
19039
|
+
var inputContainer2 = css85`
|
|
18622
19040
|
position: relative;
|
|
18623
19041
|
scroll-margin: var(--spacing-2xl);
|
|
18624
19042
|
|
|
@@ -18631,14 +19049,14 @@ var inputContainer2 = css84`
|
|
|
18631
19049
|
}
|
|
18632
19050
|
}
|
|
18633
19051
|
`;
|
|
18634
|
-
var labelText2 =
|
|
19052
|
+
var labelText2 = css85`
|
|
18635
19053
|
align-items: center;
|
|
18636
19054
|
display: flex;
|
|
18637
19055
|
gap: var(--spacing-xs);
|
|
18638
19056
|
font-weight: var(--fw-regular);
|
|
18639
19057
|
margin: 0 0 var(--spacing-xs);
|
|
18640
19058
|
`;
|
|
18641
|
-
var input3 =
|
|
19059
|
+
var input3 = css85`
|
|
18642
19060
|
display: block;
|
|
18643
19061
|
appearance: none;
|
|
18644
19062
|
box-sizing: border-box;
|
|
@@ -18686,18 +19104,18 @@ var input3 = css84`
|
|
|
18686
19104
|
color: var(--gray-400);
|
|
18687
19105
|
}
|
|
18688
19106
|
`;
|
|
18689
|
-
var selectInput =
|
|
19107
|
+
var selectInput = css85`
|
|
18690
19108
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
|
18691
19109
|
background-position: right var(--spacing-sm) center;
|
|
18692
19110
|
background-repeat: no-repeat;
|
|
18693
19111
|
background-size: 1rem;
|
|
18694
19112
|
padding-right: var(--spacing-xl);
|
|
18695
19113
|
`;
|
|
18696
|
-
var inputWrapper =
|
|
19114
|
+
var inputWrapper = css85`
|
|
18697
19115
|
display: flex; // used to correct overflow with chrome textarea
|
|
18698
19116
|
position: relative;
|
|
18699
19117
|
`;
|
|
18700
|
-
var inputIcon2 =
|
|
19118
|
+
var inputIcon2 = css85`
|
|
18701
19119
|
align-items: center;
|
|
18702
19120
|
background: var(--white);
|
|
18703
19121
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -18713,7 +19131,7 @@ var inputIcon2 = css84`
|
|
|
18713
19131
|
width: var(--spacing-lg);
|
|
18714
19132
|
z-index: var(--z-10);
|
|
18715
19133
|
`;
|
|
18716
|
-
var inputToggleLabel2 =
|
|
19134
|
+
var inputToggleLabel2 = css85`
|
|
18717
19135
|
--inline-label-color: var(--typography-base);
|
|
18718
19136
|
align-items: center;
|
|
18719
19137
|
cursor: pointer;
|
|
@@ -18728,7 +19146,7 @@ var inputToggleLabel2 = css84`
|
|
|
18728
19146
|
--inline-label-color: var(--gray-400);
|
|
18729
19147
|
}
|
|
18730
19148
|
`;
|
|
18731
|
-
var toggleInput2 =
|
|
19149
|
+
var toggleInput2 = css85`
|
|
18732
19150
|
appearance: none;
|
|
18733
19151
|
border: 1px solid var(--gray-200);
|
|
18734
19152
|
background: var(--white);
|
|
@@ -18781,7 +19199,7 @@ var toggleInput2 = css84`
|
|
|
18781
19199
|
border-color: var(--gray-300);
|
|
18782
19200
|
}
|
|
18783
19201
|
`;
|
|
18784
|
-
var inlineLabel2 =
|
|
19202
|
+
var inlineLabel2 = css85`
|
|
18785
19203
|
color: var(--inline-label-color);
|
|
18786
19204
|
padding-left: var(--spacing-md);
|
|
18787
19205
|
font-size: var(--fs-sm);
|
|
@@ -18798,7 +19216,7 @@ var inlineLabel2 = css84`
|
|
|
18798
19216
|
}
|
|
18799
19217
|
}
|
|
18800
19218
|
`;
|
|
18801
|
-
var inputMenu =
|
|
19219
|
+
var inputMenu = css85`
|
|
18802
19220
|
background: none;
|
|
18803
19221
|
border: none;
|
|
18804
19222
|
padding: var(--spacing-2xs);
|
|
@@ -18806,10 +19224,10 @@ var inputMenu = css84`
|
|
|
18806
19224
|
top: calc(var(--spacing-md) * -1.2);
|
|
18807
19225
|
right: 0;
|
|
18808
19226
|
`;
|
|
18809
|
-
var inputActionItems =
|
|
19227
|
+
var inputActionItems = css85`
|
|
18810
19228
|
display: flex;
|
|
18811
19229
|
`;
|
|
18812
|
-
var inputMenuHover =
|
|
19230
|
+
var inputMenuHover = css85`
|
|
18813
19231
|
opacity: var(--opacity-50);
|
|
18814
19232
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
18815
19233
|
|
|
@@ -18819,11 +19237,11 @@ var inputMenuHover = css84`
|
|
|
18819
19237
|
background-color: var(--gray-200);
|
|
18820
19238
|
}
|
|
18821
19239
|
`;
|
|
18822
|
-
var textarea2 =
|
|
19240
|
+
var textarea2 = css85`
|
|
18823
19241
|
resize: vertical;
|
|
18824
19242
|
min-height: 2rem;
|
|
18825
19243
|
`;
|
|
18826
|
-
var dataConnectButton =
|
|
19244
|
+
var dataConnectButton = css85`
|
|
18827
19245
|
align-items: center;
|
|
18828
19246
|
appearance: none;
|
|
18829
19247
|
box-sizing: border-box;
|
|
@@ -18858,7 +19276,7 @@ var dataConnectButton = css84`
|
|
|
18858
19276
|
pointer-events: none;
|
|
18859
19277
|
}
|
|
18860
19278
|
`;
|
|
18861
|
-
var linkParameterBtn =
|
|
19279
|
+
var linkParameterBtn = css85`
|
|
18862
19280
|
border-radius: var(--rounded-base);
|
|
18863
19281
|
background: transparent;
|
|
18864
19282
|
border: none;
|
|
@@ -18867,7 +19285,7 @@ var linkParameterBtn = css84`
|
|
|
18867
19285
|
font-size: var(--fs-sm);
|
|
18868
19286
|
line-height: 1;
|
|
18869
19287
|
`;
|
|
18870
|
-
var linkParameterControls =
|
|
19288
|
+
var linkParameterControls = css85`
|
|
18871
19289
|
position: absolute;
|
|
18872
19290
|
inset: 0 0 0 auto;
|
|
18873
19291
|
padding: 0 var(--spacing-base);
|
|
@@ -18876,7 +19294,7 @@ var linkParameterControls = css84`
|
|
|
18876
19294
|
justify-content: center;
|
|
18877
19295
|
gap: var(--spacing-base);
|
|
18878
19296
|
`;
|
|
18879
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
19297
|
+
var linkParameterInput = (withExternalLinkIcon) => css85`
|
|
18880
19298
|
padding-right: calc(
|
|
18881
19299
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
18882
19300
|
var(--spacing-base)
|
|
@@ -18889,7 +19307,7 @@ var linkParameterInput = (withExternalLinkIcon) => css84`
|
|
|
18889
19307
|
}
|
|
18890
19308
|
}
|
|
18891
19309
|
`;
|
|
18892
|
-
var linkParameterIcon =
|
|
19310
|
+
var linkParameterIcon = css85`
|
|
18893
19311
|
align-items: center;
|
|
18894
19312
|
color: var(--brand-secondary-3);
|
|
18895
19313
|
display: flex;
|
|
@@ -18904,7 +19322,7 @@ var linkParameterIcon = css84`
|
|
|
18904
19322
|
`;
|
|
18905
19323
|
|
|
18906
19324
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
18907
|
-
import { jsx as
|
|
19325
|
+
import { jsx as jsx109, jsxs as jsxs73 } from "@emotion/react/jsx-runtime";
|
|
18908
19326
|
function ParameterDataResource({
|
|
18909
19327
|
label,
|
|
18910
19328
|
labelLeadingIcon,
|
|
@@ -18914,12 +19332,12 @@ function ParameterDataResource({
|
|
|
18914
19332
|
disabled: disabled2,
|
|
18915
19333
|
children
|
|
18916
19334
|
}) {
|
|
18917
|
-
return /* @__PURE__ */
|
|
18918
|
-
/* @__PURE__ */
|
|
19335
|
+
return /* @__PURE__ */ jsxs73("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
19336
|
+
/* @__PURE__ */ jsxs73("span", { css: labelText2, children: [
|
|
18919
19337
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
18920
19338
|
label
|
|
18921
19339
|
] }),
|
|
18922
|
-
/* @__PURE__ */
|
|
19340
|
+
/* @__PURE__ */ jsxs73(
|
|
18923
19341
|
"button",
|
|
18924
19342
|
{
|
|
18925
19343
|
type: "button",
|
|
@@ -18928,30 +19346,30 @@ function ParameterDataResource({
|
|
|
18928
19346
|
disabled: disabled2,
|
|
18929
19347
|
onClick: onConnectDatasource,
|
|
18930
19348
|
children: [
|
|
18931
|
-
/* @__PURE__ */
|
|
19349
|
+
/* @__PURE__ */ jsx109("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ jsx109(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
18932
19350
|
children
|
|
18933
19351
|
]
|
|
18934
19352
|
}
|
|
18935
19353
|
),
|
|
18936
|
-
caption ? /* @__PURE__ */
|
|
19354
|
+
caption ? /* @__PURE__ */ jsx109(Caption, { children: caption }) : null
|
|
18937
19355
|
] });
|
|
18938
19356
|
}
|
|
18939
19357
|
|
|
18940
19358
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
18941
|
-
import { css as
|
|
18942
|
-
var ParameterDrawerHeaderContainer =
|
|
19359
|
+
import { css as css86 } from "@emotion/react";
|
|
19360
|
+
var ParameterDrawerHeaderContainer = css86`
|
|
18943
19361
|
align-items: center;
|
|
18944
19362
|
display: flex;
|
|
18945
19363
|
gap: var(--spacing-base);
|
|
18946
19364
|
justify-content: space-between;
|
|
18947
19365
|
margin-bottom: var(--spacing-sm);
|
|
18948
19366
|
`;
|
|
18949
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
19367
|
+
var ParameterDrawerHeaderTitleGroup = css86`
|
|
18950
19368
|
align-items: center;
|
|
18951
19369
|
display: flex;
|
|
18952
19370
|
gap: var(--spacing-sm);
|
|
18953
19371
|
`;
|
|
18954
|
-
var ParameterDrawerHeaderTitle =
|
|
19372
|
+
var ParameterDrawerHeaderTitle = css86`
|
|
18955
19373
|
text-overflow: ellipsis;
|
|
18956
19374
|
white-space: nowrap;
|
|
18957
19375
|
overflow: hidden;
|
|
@@ -18959,12 +19377,12 @@ var ParameterDrawerHeaderTitle = css85`
|
|
|
18959
19377
|
`;
|
|
18960
19378
|
|
|
18961
19379
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
18962
|
-
import { jsx as
|
|
19380
|
+
import { jsx as jsx110, jsxs as jsxs74 } from "@emotion/react/jsx-runtime";
|
|
18963
19381
|
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
18964
|
-
return /* @__PURE__ */
|
|
18965
|
-
/* @__PURE__ */
|
|
19382
|
+
return /* @__PURE__ */ jsxs74("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
19383
|
+
/* @__PURE__ */ jsxs74("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
18966
19384
|
iconBeforeTitle,
|
|
18967
|
-
/* @__PURE__ */
|
|
19385
|
+
/* @__PURE__ */ jsx110(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
18968
19386
|
] }),
|
|
18969
19387
|
children
|
|
18970
19388
|
] });
|
|
@@ -18974,8 +19392,8 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
18974
19392
|
import { forwardRef as forwardRef16 } from "react";
|
|
18975
19393
|
|
|
18976
19394
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
18977
|
-
import { css as
|
|
18978
|
-
var fieldsetStyles =
|
|
19395
|
+
import { css as css87 } from "@emotion/react";
|
|
19396
|
+
var fieldsetStyles = css87`
|
|
18979
19397
|
&:disabled,
|
|
18980
19398
|
[readonly] {
|
|
18981
19399
|
pointer-events: none;
|
|
@@ -18986,7 +19404,7 @@ var fieldsetStyles = css86`
|
|
|
18986
19404
|
}
|
|
18987
19405
|
}
|
|
18988
19406
|
`;
|
|
18989
|
-
var fieldsetLegend2 =
|
|
19407
|
+
var fieldsetLegend2 = css87`
|
|
18990
19408
|
display: block;
|
|
18991
19409
|
font-weight: var(--fw-medium);
|
|
18992
19410
|
margin-bottom: var(--spacing-sm);
|
|
@@ -18994,11 +19412,11 @@ var fieldsetLegend2 = css86`
|
|
|
18994
19412
|
`;
|
|
18995
19413
|
|
|
18996
19414
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
18997
|
-
import { jsx as
|
|
19415
|
+
import { jsx as jsx111, jsxs as jsxs75 } from "@emotion/react/jsx-runtime";
|
|
18998
19416
|
var ParameterGroup = forwardRef16(
|
|
18999
19417
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
19000
|
-
return /* @__PURE__ */
|
|
19001
|
-
/* @__PURE__ */
|
|
19418
|
+
return /* @__PURE__ */ jsxs75("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
19419
|
+
/* @__PURE__ */ jsx111("legend", { css: fieldsetLegend2, children: legend }),
|
|
19002
19420
|
children
|
|
19003
19421
|
] });
|
|
19004
19422
|
}
|
|
@@ -19008,19 +19426,19 @@ var ParameterGroup = forwardRef16(
|
|
|
19008
19426
|
import { forwardRef as forwardRef18, useDeferredValue } from "react";
|
|
19009
19427
|
|
|
19010
19428
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
19011
|
-
import { useState as
|
|
19429
|
+
import { useState as useState14 } from "react";
|
|
19012
19430
|
import { createPortal as createPortal2 } from "react-dom";
|
|
19013
19431
|
|
|
19014
19432
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
19015
|
-
import { css as
|
|
19016
|
-
var previewWrapper =
|
|
19433
|
+
import { css as css88 } from "@emotion/react";
|
|
19434
|
+
var previewWrapper = css88`
|
|
19017
19435
|
margin-top: var(--spacing-xs);
|
|
19018
19436
|
background: var(--gray-50);
|
|
19019
19437
|
padding: var(--spacing-sm);
|
|
19020
19438
|
border: solid 1px var(--gray-300);
|
|
19021
19439
|
border-radius: var(--rounded-sm);
|
|
19022
19440
|
`;
|
|
19023
|
-
var previewLink =
|
|
19441
|
+
var previewLink = css88`
|
|
19024
19442
|
display: block;
|
|
19025
19443
|
width: 100%;
|
|
19026
19444
|
|
|
@@ -19028,7 +19446,7 @@ var previewLink = css87`
|
|
|
19028
19446
|
max-height: 9rem;
|
|
19029
19447
|
}
|
|
19030
19448
|
`;
|
|
19031
|
-
var previewModalWrapper =
|
|
19449
|
+
var previewModalWrapper = css88`
|
|
19032
19450
|
background: var(--gray-50);
|
|
19033
19451
|
display: flex;
|
|
19034
19452
|
height: 100%;
|
|
@@ -19037,7 +19455,7 @@ var previewModalWrapper = css87`
|
|
|
19037
19455
|
border: solid 1px var(--gray-300);
|
|
19038
19456
|
border-radius: var(--rounded-sm);
|
|
19039
19457
|
`;
|
|
19040
|
-
var previewModalImage =
|
|
19458
|
+
var previewModalImage = css88`
|
|
19041
19459
|
display: flex;
|
|
19042
19460
|
height: 100%;
|
|
19043
19461
|
width: 100%;
|
|
@@ -19049,32 +19467,32 @@ var previewModalImage = css87`
|
|
|
19049
19467
|
`;
|
|
19050
19468
|
|
|
19051
19469
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
19052
|
-
import { Fragment as Fragment15, jsx as
|
|
19470
|
+
import { Fragment as Fragment15, jsx as jsx112, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
19053
19471
|
function ParameterImagePreview({ imageSrc }) {
|
|
19054
|
-
const [showModal, setShowModal] =
|
|
19055
|
-
return imageSrc ? /* @__PURE__ */
|
|
19056
|
-
/* @__PURE__ */
|
|
19057
|
-
/* @__PURE__ */
|
|
19472
|
+
const [showModal, setShowModal] = useState14(false);
|
|
19473
|
+
return imageSrc ? /* @__PURE__ */ jsxs76("div", { css: previewWrapper, children: [
|
|
19474
|
+
/* @__PURE__ */ jsx112(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
19475
|
+
/* @__PURE__ */ jsx112(
|
|
19058
19476
|
"button",
|
|
19059
19477
|
{
|
|
19060
19478
|
css: previewLink,
|
|
19061
19479
|
onClick: () => {
|
|
19062
19480
|
setShowModal(true);
|
|
19063
19481
|
},
|
|
19064
|
-
children: /* @__PURE__ */
|
|
19482
|
+
children: /* @__PURE__ */ jsx112(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
19065
19483
|
}
|
|
19066
19484
|
)
|
|
19067
19485
|
] }) : null;
|
|
19068
19486
|
}
|
|
19069
19487
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
19070
|
-
return open ? /* @__PURE__ */
|
|
19071
|
-
/* @__PURE__ */
|
|
19488
|
+
return open ? /* @__PURE__ */ jsx112(Fragment15, { children: createPortal2(
|
|
19489
|
+
/* @__PURE__ */ jsx112(
|
|
19072
19490
|
Modal,
|
|
19073
19491
|
{
|
|
19074
19492
|
header: "Image Preview",
|
|
19075
19493
|
onRequestClose,
|
|
19076
|
-
buttonGroup: /* @__PURE__ */
|
|
19077
|
-
children: /* @__PURE__ */
|
|
19494
|
+
buttonGroup: /* @__PURE__ */ jsx112(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
19495
|
+
children: /* @__PURE__ */ jsx112("div", { css: previewModalWrapper, children: /* @__PURE__ */ jsx112(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
19078
19496
|
}
|
|
19079
19497
|
),
|
|
19080
19498
|
document.body
|
|
@@ -19082,25 +19500,25 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
19082
19500
|
};
|
|
19083
19501
|
|
|
19084
19502
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
19085
|
-
import { css as
|
|
19086
|
-
import { useState as
|
|
19503
|
+
import { css as css90 } from "@emotion/react";
|
|
19504
|
+
import { useState as useState15 } from "react";
|
|
19087
19505
|
|
|
19088
19506
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
19089
|
-
import { jsx as
|
|
19507
|
+
import { jsx as jsx113 } from "@emotion/react/jsx-runtime";
|
|
19090
19508
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
19091
|
-
return !asSpan ? /* @__PURE__ */
|
|
19509
|
+
return !asSpan ? /* @__PURE__ */ jsx113("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ jsx113("span", { "aria-labelledby": id, css: labelText2, children });
|
|
19092
19510
|
};
|
|
19093
19511
|
|
|
19094
19512
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
19095
19513
|
import { forwardRef as forwardRef17 } from "react";
|
|
19096
|
-
import { jsx as
|
|
19514
|
+
import { jsx as jsx114 } from "@emotion/react/jsx-runtime";
|
|
19097
19515
|
var ParameterMenuButton = forwardRef17(
|
|
19098
19516
|
({ label, children }, ref) => {
|
|
19099
|
-
return /* @__PURE__ */
|
|
19517
|
+
return /* @__PURE__ */ jsx114(
|
|
19100
19518
|
Menu,
|
|
19101
19519
|
{
|
|
19102
19520
|
menuLabel: `${label} menu`,
|
|
19103
|
-
menuTrigger: /* @__PURE__ */
|
|
19521
|
+
menuTrigger: /* @__PURE__ */ jsx114(
|
|
19104
19522
|
"button",
|
|
19105
19523
|
{
|
|
19106
19524
|
className: "parameter-menu",
|
|
@@ -19108,7 +19526,7 @@ var ParameterMenuButton = forwardRef17(
|
|
|
19108
19526
|
type: "button",
|
|
19109
19527
|
"aria-label": `${label} options`,
|
|
19110
19528
|
ref,
|
|
19111
|
-
children: /* @__PURE__ */
|
|
19529
|
+
children: /* @__PURE__ */ jsx114(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
19112
19530
|
}
|
|
19113
19531
|
),
|
|
19114
19532
|
children
|
|
@@ -19118,14 +19536,14 @@ var ParameterMenuButton = forwardRef17(
|
|
|
19118
19536
|
);
|
|
19119
19537
|
|
|
19120
19538
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
19121
|
-
import { css as
|
|
19122
|
-
var emptyParameterShell =
|
|
19539
|
+
import { css as css89 } from "@emotion/react";
|
|
19540
|
+
var emptyParameterShell = css89`
|
|
19123
19541
|
border-radius: var(--rounded-sm);
|
|
19124
19542
|
flex-grow: 1;
|
|
19125
19543
|
position: relative;
|
|
19126
19544
|
max-width: 100%;
|
|
19127
19545
|
`;
|
|
19128
|
-
var emptyParameterShellText =
|
|
19546
|
+
var emptyParameterShellText = css89`
|
|
19129
19547
|
background: var(--brand-secondary-6);
|
|
19130
19548
|
border-radius: var(--rounded-sm);
|
|
19131
19549
|
padding: var(--spacing-sm);
|
|
@@ -19133,7 +19551,7 @@ var emptyParameterShellText = css88`
|
|
|
19133
19551
|
font-size: var(--fs-sm);
|
|
19134
19552
|
margin: 0;
|
|
19135
19553
|
`;
|
|
19136
|
-
var overrideMarker =
|
|
19554
|
+
var overrideMarker = css89`
|
|
19137
19555
|
border-radius: var(--rounded-sm);
|
|
19138
19556
|
border: 10px solid var(--gray-300);
|
|
19139
19557
|
border-left-color: transparent;
|
|
@@ -19144,7 +19562,7 @@ var overrideMarker = css88`
|
|
|
19144
19562
|
`;
|
|
19145
19563
|
|
|
19146
19564
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
19147
|
-
import { jsx as
|
|
19565
|
+
import { jsx as jsx115, jsxs as jsxs77 } from "@emotion/react/jsx-runtime";
|
|
19148
19566
|
var extractParameterProps = (props) => {
|
|
19149
19567
|
const {
|
|
19150
19568
|
id,
|
|
@@ -19204,36 +19622,36 @@ var ParameterShell = ({
|
|
|
19204
19622
|
isParameterGroup = false,
|
|
19205
19623
|
...props
|
|
19206
19624
|
}) => {
|
|
19207
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
19625
|
+
const [manualErrorMessage, setManualErrorMessage] = useState15(void 0);
|
|
19208
19626
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
19209
19627
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
19210
|
-
return /* @__PURE__ */
|
|
19211
|
-
hiddenLabel || title2 ? null : /* @__PURE__ */
|
|
19628
|
+
return /* @__PURE__ */ jsxs77("div", { css: inputContainer2, ...props, id, children: [
|
|
19629
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ jsxs77(ParameterLabel, { id, css: labelText2, children: [
|
|
19212
19630
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
19213
19631
|
label,
|
|
19214
19632
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
19215
19633
|
] }),
|
|
19216
|
-
!title2 ? null : /* @__PURE__ */
|
|
19634
|
+
!title2 ? null : /* @__PURE__ */ jsxs77(ParameterLabel, { id, asSpan: true, children: [
|
|
19217
19635
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
19218
19636
|
title2,
|
|
19219
19637
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
19220
19638
|
] }),
|
|
19221
|
-
/* @__PURE__ */
|
|
19222
|
-
actionItems ? /* @__PURE__ */
|
|
19639
|
+
/* @__PURE__ */ jsxs77("div", { css: inputWrapper, children: [
|
|
19640
|
+
actionItems ? /* @__PURE__ */ jsx115(
|
|
19223
19641
|
"div",
|
|
19224
19642
|
{
|
|
19225
19643
|
css: [
|
|
19226
19644
|
inputMenu,
|
|
19227
19645
|
inputActionItems,
|
|
19228
|
-
menuItems ?
|
|
19646
|
+
menuItems ? css90`
|
|
19229
19647
|
right: var(--spacing-md);
|
|
19230
19648
|
` : void 0
|
|
19231
19649
|
],
|
|
19232
19650
|
children: actionItems
|
|
19233
19651
|
}
|
|
19234
19652
|
) : null,
|
|
19235
|
-
menuItems ? /* @__PURE__ */
|
|
19236
|
-
/* @__PURE__ */
|
|
19653
|
+
menuItems ? /* @__PURE__ */ jsx115(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
19654
|
+
/* @__PURE__ */ jsx115(
|
|
19237
19655
|
ParameterShellContext.Provider,
|
|
19238
19656
|
{
|
|
19239
19657
|
value: {
|
|
@@ -19243,14 +19661,14 @@ var ParameterShell = ({
|
|
|
19243
19661
|
errorMessage: errorMessaging,
|
|
19244
19662
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
19245
19663
|
},
|
|
19246
|
-
children: isParameterGroup ? /* @__PURE__ */
|
|
19664
|
+
children: isParameterGroup ? /* @__PURE__ */ jsx115("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ jsxs77(ParameterShellPlaceholder, { children: [
|
|
19247
19665
|
children,
|
|
19248
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */
|
|
19666
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx115(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
19249
19667
|
] })
|
|
19250
19668
|
}
|
|
19251
19669
|
)
|
|
19252
19670
|
] }),
|
|
19253
|
-
/* @__PURE__ */
|
|
19671
|
+
/* @__PURE__ */ jsx115(
|
|
19254
19672
|
FieldMessage,
|
|
19255
19673
|
{
|
|
19256
19674
|
helperMessageTestId: captionTestId,
|
|
@@ -19264,17 +19682,17 @@ var ParameterShell = ({
|
|
|
19264
19682
|
] });
|
|
19265
19683
|
};
|
|
19266
19684
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
19267
|
-
return /* @__PURE__ */
|
|
19685
|
+
return /* @__PURE__ */ jsx115("div", { css: emptyParameterShell, children });
|
|
19268
19686
|
};
|
|
19269
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */
|
|
19687
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx115(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx115("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx115("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
19270
19688
|
|
|
19271
19689
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
19272
|
-
import { Fragment as Fragment16, jsx as
|
|
19690
|
+
import { Fragment as Fragment16, jsx as jsx116, jsxs as jsxs78 } from "@emotion/react/jsx-runtime";
|
|
19273
19691
|
var ParameterImage = forwardRef18(
|
|
19274
19692
|
({ children, ...props }, ref) => {
|
|
19275
19693
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19276
|
-
return /* @__PURE__ */
|
|
19277
|
-
/* @__PURE__ */
|
|
19694
|
+
return /* @__PURE__ */ jsxs78(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
19695
|
+
/* @__PURE__ */ jsx116(ParameterImageInner, { ref, ...innerProps }),
|
|
19278
19696
|
children
|
|
19279
19697
|
] });
|
|
19280
19698
|
}
|
|
@@ -19283,8 +19701,8 @@ var ParameterImageInner = forwardRef18((props, ref) => {
|
|
|
19283
19701
|
const { value } = props;
|
|
19284
19702
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
19285
19703
|
const deferredValue = useDeferredValue(value);
|
|
19286
|
-
return /* @__PURE__ */
|
|
19287
|
-
/* @__PURE__ */
|
|
19704
|
+
return /* @__PURE__ */ jsxs78(Fragment16, { children: [
|
|
19705
|
+
/* @__PURE__ */ jsx116(
|
|
19288
19706
|
"input",
|
|
19289
19707
|
{
|
|
19290
19708
|
css: input3,
|
|
@@ -19296,21 +19714,21 @@ var ParameterImageInner = forwardRef18((props, ref) => {
|
|
|
19296
19714
|
...props
|
|
19297
19715
|
}
|
|
19298
19716
|
),
|
|
19299
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */
|
|
19717
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ jsx116(ParameterImagePreview, { imageSrc: deferredValue })
|
|
19300
19718
|
] });
|
|
19301
19719
|
});
|
|
19302
19720
|
|
|
19303
19721
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
19304
19722
|
import { forwardRef as forwardRef19 } from "react";
|
|
19305
|
-
import { jsx as
|
|
19723
|
+
import { jsx as jsx117 } from "@emotion/react/jsx-runtime";
|
|
19306
19724
|
var ParameterInput = forwardRef19((props, ref) => {
|
|
19307
19725
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19308
|
-
return /* @__PURE__ */
|
|
19726
|
+
return /* @__PURE__ */ jsx117(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ jsx117(ParameterInputInner, { ref, ...innerProps }) });
|
|
19309
19727
|
});
|
|
19310
19728
|
var ParameterInputInner = forwardRef19(
|
|
19311
19729
|
({ ...props }, ref) => {
|
|
19312
19730
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
19313
|
-
return /* @__PURE__ */
|
|
19731
|
+
return /* @__PURE__ */ jsx117(
|
|
19314
19732
|
"input",
|
|
19315
19733
|
{
|
|
19316
19734
|
css: input3,
|
|
@@ -19327,18 +19745,18 @@ var ParameterInputInner = forwardRef19(
|
|
|
19327
19745
|
|
|
19328
19746
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
19329
19747
|
import { forwardRef as forwardRef20 } from "react";
|
|
19330
|
-
import { jsx as
|
|
19748
|
+
import { jsx as jsx118, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
|
|
19331
19749
|
var ParameterLink = forwardRef20(
|
|
19332
19750
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
19333
19751
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19334
|
-
return /* @__PURE__ */
|
|
19752
|
+
return /* @__PURE__ */ jsx118(
|
|
19335
19753
|
ParameterShell,
|
|
19336
19754
|
{
|
|
19337
19755
|
"data-testid": "link-parameter-editor",
|
|
19338
19756
|
...shellProps,
|
|
19339
19757
|
label: innerProps.value ? shellProps.label : "",
|
|
19340
19758
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
19341
|
-
children: /* @__PURE__ */
|
|
19759
|
+
children: /* @__PURE__ */ jsx118(
|
|
19342
19760
|
ParameterLinkInner,
|
|
19343
19761
|
{
|
|
19344
19762
|
onConnectLink,
|
|
@@ -19355,9 +19773,9 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19355
19773
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
19356
19774
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
19357
19775
|
if (!props.value)
|
|
19358
|
-
return /* @__PURE__ */
|
|
19359
|
-
return /* @__PURE__ */
|
|
19360
|
-
/* @__PURE__ */
|
|
19776
|
+
return /* @__PURE__ */ jsx118("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
19777
|
+
return /* @__PURE__ */ jsxs79("div", { css: inputWrapper, children: [
|
|
19778
|
+
/* @__PURE__ */ jsx118(
|
|
19361
19779
|
"input",
|
|
19362
19780
|
{
|
|
19363
19781
|
type: "text",
|
|
@@ -19369,8 +19787,8 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19369
19787
|
...props
|
|
19370
19788
|
}
|
|
19371
19789
|
),
|
|
19372
|
-
/* @__PURE__ */
|
|
19373
|
-
/* @__PURE__ */
|
|
19790
|
+
/* @__PURE__ */ jsxs79("div", { css: linkParameterControls, children: [
|
|
19791
|
+
/* @__PURE__ */ jsx118(
|
|
19374
19792
|
"button",
|
|
19375
19793
|
{
|
|
19376
19794
|
type: "button",
|
|
@@ -19381,7 +19799,7 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19381
19799
|
children: "edit"
|
|
19382
19800
|
}
|
|
19383
19801
|
),
|
|
19384
|
-
externalLink ? /* @__PURE__ */
|
|
19802
|
+
externalLink ? /* @__PURE__ */ jsx118(
|
|
19385
19803
|
"a",
|
|
19386
19804
|
{
|
|
19387
19805
|
href: externalLink,
|
|
@@ -19389,7 +19807,7 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19389
19807
|
title: "Open link in new tab",
|
|
19390
19808
|
target: "_blank",
|
|
19391
19809
|
rel: "noopener noreferrer",
|
|
19392
|
-
children: /* @__PURE__ */
|
|
19810
|
+
children: /* @__PURE__ */ jsx118(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
19393
19811
|
}
|
|
19394
19812
|
) : null
|
|
19395
19813
|
] })
|
|
@@ -19398,15 +19816,15 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19398
19816
|
);
|
|
19399
19817
|
|
|
19400
19818
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
19401
|
-
import { jsx as
|
|
19819
|
+
import { jsx as jsx119 } from "@emotion/react/jsx-runtime";
|
|
19402
19820
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
19403
19821
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19404
|
-
return /* @__PURE__ */
|
|
19822
|
+
return /* @__PURE__ */ jsx119(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx119(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
19405
19823
|
};
|
|
19406
19824
|
var ParameterMultiSelectInner = (props) => {
|
|
19407
19825
|
var _a;
|
|
19408
19826
|
const { id, label } = useParameterShell();
|
|
19409
|
-
return /* @__PURE__ */
|
|
19827
|
+
return /* @__PURE__ */ jsx119(
|
|
19410
19828
|
InputComboBox,
|
|
19411
19829
|
{
|
|
19412
19830
|
menuPortalTarget: document.body,
|
|
@@ -19456,7 +19874,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
19456
19874
|
};
|
|
19457
19875
|
|
|
19458
19876
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
19459
|
-
import { Fragment as Fragment17, jsx as
|
|
19877
|
+
import { Fragment as Fragment17, jsx as jsx120, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
|
|
19460
19878
|
var ParameterNameAndPublicIdInput = ({
|
|
19461
19879
|
id,
|
|
19462
19880
|
onBlur,
|
|
@@ -19482,8 +19900,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19482
19900
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
19483
19901
|
};
|
|
19484
19902
|
autoFocus == null ? void 0 : autoFocus();
|
|
19485
|
-
return /* @__PURE__ */
|
|
19486
|
-
/* @__PURE__ */
|
|
19903
|
+
return /* @__PURE__ */ jsxs80(Fragment17, { children: [
|
|
19904
|
+
/* @__PURE__ */ jsx120(
|
|
19487
19905
|
ParameterInput,
|
|
19488
19906
|
{
|
|
19489
19907
|
id: nameIdField,
|
|
@@ -19502,7 +19920,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19502
19920
|
value: values[nameIdField]
|
|
19503
19921
|
}
|
|
19504
19922
|
),
|
|
19505
|
-
/* @__PURE__ */
|
|
19923
|
+
/* @__PURE__ */ jsx120(
|
|
19506
19924
|
ParameterInput,
|
|
19507
19925
|
{
|
|
19508
19926
|
id: publicIdFieldName,
|
|
@@ -19516,11 +19934,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19516
19934
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
19517
19935
|
placeholder: publicIdPlaceholderText,
|
|
19518
19936
|
errorMessage: publicIdError,
|
|
19519
|
-
menuItems: /* @__PURE__ */
|
|
19937
|
+
menuItems: /* @__PURE__ */ jsx120(
|
|
19520
19938
|
MenuItem,
|
|
19521
19939
|
{
|
|
19522
19940
|
disabled: !values[publicIdFieldName],
|
|
19523
|
-
icon: /* @__PURE__ */
|
|
19941
|
+
icon: /* @__PURE__ */ jsx120(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
19524
19942
|
onClick: handleCopyPidFieldValue,
|
|
19525
19943
|
children: "Copy"
|
|
19526
19944
|
}
|
|
@@ -19528,12 +19946,12 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19528
19946
|
value: values[publicIdFieldName]
|
|
19529
19947
|
}
|
|
19530
19948
|
),
|
|
19531
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */
|
|
19949
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ jsx120(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
19532
19950
|
] });
|
|
19533
19951
|
};
|
|
19534
19952
|
|
|
19535
19953
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
19536
|
-
import { css as
|
|
19954
|
+
import { css as css94 } from "@emotion/react";
|
|
19537
19955
|
import { ListItemNode, ListNode as ListNode2 } from "@lexical/list";
|
|
19538
19956
|
import {
|
|
19539
19957
|
CODE,
|
|
@@ -19647,7 +20065,7 @@ var getLabelForElement = (type) => {
|
|
|
19647
20065
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
19648
20066
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
19649
20067
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
19650
|
-
import { useEffect as
|
|
20068
|
+
import { useEffect as useEffect21, useRef as useRef12 } from "react";
|
|
19651
20069
|
|
|
19652
20070
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
19653
20071
|
import { CodeNode } from "@lexical/code";
|
|
@@ -19668,10 +20086,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
19668
20086
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
19669
20087
|
import { mergeRegister } from "@lexical/utils";
|
|
19670
20088
|
import { ParagraphNode } from "lexical";
|
|
19671
|
-
import { useEffect as
|
|
20089
|
+
import { useEffect as useEffect17 } from "react";
|
|
19672
20090
|
function DisableStylesPlugin() {
|
|
19673
20091
|
const [editor] = useLexicalComposerContext();
|
|
19674
|
-
|
|
20092
|
+
useEffect17(() => {
|
|
19675
20093
|
return mergeRegister(
|
|
19676
20094
|
// Disable text alignment on paragraph nodes
|
|
19677
20095
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -19685,23 +20103,23 @@ function DisableStylesPlugin() {
|
|
|
19685
20103
|
}
|
|
19686
20104
|
|
|
19687
20105
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
19688
|
-
import { css as
|
|
19689
|
-
var textBold =
|
|
20106
|
+
import { css as css91 } from "@emotion/css";
|
|
20107
|
+
var textBold = css91`
|
|
19690
20108
|
font-weight: 700;
|
|
19691
20109
|
`;
|
|
19692
|
-
var textItalic =
|
|
20110
|
+
var textItalic = css91`
|
|
19693
20111
|
font-style: italic;
|
|
19694
20112
|
`;
|
|
19695
|
-
var textUnderline =
|
|
20113
|
+
var textUnderline = css91`
|
|
19696
20114
|
text-decoration: underline;
|
|
19697
20115
|
`;
|
|
19698
|
-
var textStrikethrough =
|
|
20116
|
+
var textStrikethrough = css91`
|
|
19699
20117
|
text-decoration: line-through;
|
|
19700
20118
|
`;
|
|
19701
|
-
var textUnderlineStrikethrough =
|
|
20119
|
+
var textUnderlineStrikethrough = css91`
|
|
19702
20120
|
text-decoration: underline line-through;
|
|
19703
20121
|
`;
|
|
19704
|
-
var textCode =
|
|
20122
|
+
var textCode = css91`
|
|
19705
20123
|
background-color: var(--gray-100);
|
|
19706
20124
|
border-radius: var(--rounded-sm);
|
|
19707
20125
|
display: inline-block;
|
|
@@ -19712,68 +20130,68 @@ var textCode = css90`
|
|
|
19712
20130
|
padding-left: var(--spacing-xs);
|
|
19713
20131
|
padding-right: var(--spacing-xs);
|
|
19714
20132
|
`;
|
|
19715
|
-
var textSuperscript =
|
|
20133
|
+
var textSuperscript = css91`
|
|
19716
20134
|
vertical-align: super;
|
|
19717
20135
|
font-size: smaller;
|
|
19718
20136
|
`;
|
|
19719
|
-
var textSubscript =
|
|
20137
|
+
var textSubscript = css91`
|
|
19720
20138
|
vertical-align: sub;
|
|
19721
20139
|
font-size: smaller;
|
|
19722
20140
|
`;
|
|
19723
|
-
var linkElement =
|
|
20141
|
+
var linkElement = css91`
|
|
19724
20142
|
${link}
|
|
19725
20143
|
${linkColorDefault}
|
|
19726
20144
|
text-decoration: underline;
|
|
19727
20145
|
`;
|
|
19728
|
-
var h12 =
|
|
20146
|
+
var h12 = css91`
|
|
19729
20147
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
19730
20148
|
`;
|
|
19731
|
-
var h22 =
|
|
20149
|
+
var h22 = css91`
|
|
19732
20150
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
19733
20151
|
`;
|
|
19734
|
-
var h32 =
|
|
20152
|
+
var h32 = css91`
|
|
19735
20153
|
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
19736
20154
|
`;
|
|
19737
|
-
var h42 =
|
|
20155
|
+
var h42 = css91`
|
|
19738
20156
|
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
19739
20157
|
`;
|
|
19740
|
-
var h52 =
|
|
20158
|
+
var h52 = css91`
|
|
19741
20159
|
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
19742
20160
|
`;
|
|
19743
|
-
var h62 =
|
|
20161
|
+
var h62 = css91`
|
|
19744
20162
|
font-size: var(--fs-base);
|
|
19745
20163
|
`;
|
|
19746
|
-
var heading1Element =
|
|
20164
|
+
var heading1Element = css91`
|
|
19747
20165
|
${h12}
|
|
19748
20166
|
${commonHeadingAttr(true)}
|
|
19749
20167
|
${commonLineHeight}
|
|
19750
20168
|
`;
|
|
19751
|
-
var heading2Element =
|
|
20169
|
+
var heading2Element = css91`
|
|
19752
20170
|
${h22}
|
|
19753
20171
|
${commonHeadingAttr(true)}
|
|
19754
20172
|
${commonLineHeight}
|
|
19755
20173
|
`;
|
|
19756
|
-
var heading3Element =
|
|
20174
|
+
var heading3Element = css91`
|
|
19757
20175
|
${h32}
|
|
19758
20176
|
${commonHeadingAttr(true)}
|
|
19759
20177
|
${commonLineHeight}
|
|
19760
20178
|
`;
|
|
19761
|
-
var heading4Element =
|
|
20179
|
+
var heading4Element = css91`
|
|
19762
20180
|
${h42}
|
|
19763
20181
|
${commonHeadingAttr(true)}
|
|
19764
20182
|
${commonLineHeight}
|
|
19765
20183
|
`;
|
|
19766
|
-
var heading5Element =
|
|
20184
|
+
var heading5Element = css91`
|
|
19767
20185
|
${h52}
|
|
19768
20186
|
${commonHeadingAttr(true)}
|
|
19769
20187
|
${commonLineHeight}
|
|
19770
20188
|
`;
|
|
19771
|
-
var heading6Element =
|
|
20189
|
+
var heading6Element = css91`
|
|
19772
20190
|
${h62}
|
|
19773
20191
|
${commonHeadingAttr(true)}
|
|
19774
20192
|
${commonLineHeight}
|
|
19775
20193
|
`;
|
|
19776
|
-
var paragraphElement =
|
|
20194
|
+
var paragraphElement = css91`
|
|
19777
20195
|
line-height: 1.5;
|
|
19778
20196
|
margin-bottom: var(--spacing-base);
|
|
19779
20197
|
|
|
@@ -19781,7 +20199,7 @@ var paragraphElement = css90`
|
|
|
19781
20199
|
margin-bottom: 0;
|
|
19782
20200
|
}
|
|
19783
20201
|
`;
|
|
19784
|
-
var orderedListElement =
|
|
20202
|
+
var orderedListElement = css91`
|
|
19785
20203
|
${commonLineHeight}
|
|
19786
20204
|
display: block;
|
|
19787
20205
|
list-style: decimal;
|
|
@@ -19810,7 +20228,7 @@ var orderedListElement = css90`
|
|
|
19810
20228
|
}
|
|
19811
20229
|
}
|
|
19812
20230
|
`;
|
|
19813
|
-
var unorderedListElement =
|
|
20231
|
+
var unorderedListElement = css91`
|
|
19814
20232
|
${commonLineHeight}
|
|
19815
20233
|
display: block;
|
|
19816
20234
|
list-style: disc;
|
|
@@ -19831,13 +20249,13 @@ var unorderedListElement = css90`
|
|
|
19831
20249
|
}
|
|
19832
20250
|
}
|
|
19833
20251
|
`;
|
|
19834
|
-
var listItemElement =
|
|
20252
|
+
var listItemElement = css91`
|
|
19835
20253
|
margin-left: var(--spacing-md);
|
|
19836
20254
|
`;
|
|
19837
|
-
var nestedListItemElement =
|
|
20255
|
+
var nestedListItemElement = css91`
|
|
19838
20256
|
list-style-type: none;
|
|
19839
20257
|
`;
|
|
19840
|
-
var blockquoteElement =
|
|
20258
|
+
var blockquoteElement = css91`
|
|
19841
20259
|
border-left: 0.25rem solid var(--gray-300);
|
|
19842
20260
|
color: var(--gray-600);
|
|
19843
20261
|
margin-bottom: var(--spacing-base);
|
|
@@ -19847,7 +20265,7 @@ var blockquoteElement = css90`
|
|
|
19847
20265
|
margin-bottom: 0;
|
|
19848
20266
|
}
|
|
19849
20267
|
`;
|
|
19850
|
-
var codeElement =
|
|
20268
|
+
var codeElement = css91`
|
|
19851
20269
|
background-color: var(--gray-100);
|
|
19852
20270
|
border-radius: var(--rounded-sm);
|
|
19853
20271
|
display: block;
|
|
@@ -19864,7 +20282,7 @@ var codeElement = css90`
|
|
|
19864
20282
|
`;
|
|
19865
20283
|
|
|
19866
20284
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19867
|
-
import { css as
|
|
20285
|
+
import { css as css92 } from "@emotion/react";
|
|
19868
20286
|
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
19869
20287
|
import { NodeEventPlugin } from "@lexical/react/LexicalNodeEventPlugin";
|
|
19870
20288
|
import { addClassNamesToElement, isHTMLAnchorElement, mergeRegister as mergeRegister2 } from "@lexical/utils";
|
|
@@ -19880,7 +20298,7 @@ import {
|
|
|
19880
20298
|
ElementNode as ElementNode2,
|
|
19881
20299
|
FOCUS_COMMAND
|
|
19882
20300
|
} from "lexical";
|
|
19883
|
-
import { useCallback as
|
|
20301
|
+
import { useCallback as useCallback10, useEffect as useEffect18, useRef as useRef11, useState as useState16 } from "react";
|
|
19884
20302
|
|
|
19885
20303
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
19886
20304
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -19917,7 +20335,7 @@ var getSelectedNode = (selection) => {
|
|
|
19917
20335
|
};
|
|
19918
20336
|
|
|
19919
20337
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19920
|
-
import { Fragment as Fragment18, jsx as
|
|
20338
|
+
import { Fragment as Fragment18, jsx as jsx121, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
|
|
19921
20339
|
var isProjectMapLinkValue = (value) => {
|
|
19922
20340
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
19923
20341
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -20204,16 +20622,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = createCommand(
|
|
|
20204
20622
|
);
|
|
20205
20623
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
20206
20624
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
20207
|
-
var linkPopover =
|
|
20625
|
+
var linkPopover = css92`
|
|
20208
20626
|
position: absolute;
|
|
20209
20627
|
z-index: 5;
|
|
20210
20628
|
`;
|
|
20211
|
-
var linkPopoverContainer =
|
|
20629
|
+
var linkPopoverContainer = css92`
|
|
20212
20630
|
${Popover};
|
|
20213
20631
|
align-items: center;
|
|
20214
20632
|
display: flex;
|
|
20215
20633
|
`;
|
|
20216
|
-
var linkPopoverAnchor =
|
|
20634
|
+
var linkPopoverAnchor = css92`
|
|
20217
20635
|
${link}
|
|
20218
20636
|
${linkColorDefault}
|
|
20219
20637
|
`;
|
|
@@ -20222,17 +20640,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20222
20640
|
return path;
|
|
20223
20641
|
};
|
|
20224
20642
|
const [editor] = useLexicalComposerContext2();
|
|
20225
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
20226
|
-
const linkPopoverElRef =
|
|
20227
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
20228
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
20229
|
-
|
|
20643
|
+
const [linkPopoverState, setLinkPopoverState] = useState16();
|
|
20644
|
+
const linkPopoverElRef = useRef11(null);
|
|
20645
|
+
const [isEditorFocused, setIsEditorFocused] = useState16(false);
|
|
20646
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState16(false);
|
|
20647
|
+
useEffect18(() => {
|
|
20230
20648
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
20231
20649
|
setLinkPopoverState(void 0);
|
|
20232
20650
|
return;
|
|
20233
20651
|
}
|
|
20234
20652
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
20235
|
-
|
|
20653
|
+
useEffect18(() => {
|
|
20236
20654
|
if (!editor.hasNodes([LinkNode])) {
|
|
20237
20655
|
throw new Error("LinkNode not registered on editor");
|
|
20238
20656
|
}
|
|
@@ -20301,7 +20719,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20301
20719
|
)
|
|
20302
20720
|
);
|
|
20303
20721
|
}, [editor, onConnectLink]);
|
|
20304
|
-
const maybeShowLinkToolbar =
|
|
20722
|
+
const maybeShowLinkToolbar = useCallback10(() => {
|
|
20305
20723
|
if (!editor.isEditable()) {
|
|
20306
20724
|
return;
|
|
20307
20725
|
}
|
|
@@ -20333,7 +20751,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20333
20751
|
}
|
|
20334
20752
|
});
|
|
20335
20753
|
}, [editor]);
|
|
20336
|
-
|
|
20754
|
+
useEffect18(() => {
|
|
20337
20755
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20338
20756
|
requestAnimationFrame(() => {
|
|
20339
20757
|
editorState.read(() => {
|
|
@@ -20360,8 +20778,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20360
20778
|
});
|
|
20361
20779
|
});
|
|
20362
20780
|
};
|
|
20363
|
-
return /* @__PURE__ */
|
|
20364
|
-
/* @__PURE__ */
|
|
20781
|
+
return /* @__PURE__ */ jsxs81(Fragment18, { children: [
|
|
20782
|
+
/* @__PURE__ */ jsx121(
|
|
20365
20783
|
NodeEventPlugin,
|
|
20366
20784
|
{
|
|
20367
20785
|
nodeType: LinkNode,
|
|
@@ -20371,7 +20789,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20371
20789
|
}
|
|
20372
20790
|
}
|
|
20373
20791
|
),
|
|
20374
|
-
linkPopoverState ? /* @__PURE__ */
|
|
20792
|
+
linkPopoverState ? /* @__PURE__ */ jsx121(
|
|
20375
20793
|
"div",
|
|
20376
20794
|
{
|
|
20377
20795
|
css: linkPopover,
|
|
@@ -20380,8 +20798,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20380
20798
|
top: linkPopoverState.position.y
|
|
20381
20799
|
},
|
|
20382
20800
|
ref: linkPopoverElRef,
|
|
20383
|
-
children: /* @__PURE__ */
|
|
20384
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */
|
|
20801
|
+
children: /* @__PURE__ */ jsxs81("div", { css: linkPopoverContainer, children: [
|
|
20802
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ jsx121(
|
|
20385
20803
|
"a",
|
|
20386
20804
|
{
|
|
20387
20805
|
href: parsePath(
|
|
@@ -20393,7 +20811,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20393
20811
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
20394
20812
|
}
|
|
20395
20813
|
),
|
|
20396
|
-
/* @__PURE__ */
|
|
20814
|
+
/* @__PURE__ */ jsx121(
|
|
20397
20815
|
Button,
|
|
20398
20816
|
{
|
|
20399
20817
|
size: "xs",
|
|
@@ -20401,7 +20819,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20401
20819
|
onEditLinkNode(linkPopoverState.node);
|
|
20402
20820
|
},
|
|
20403
20821
|
buttonType: "ghost",
|
|
20404
|
-
children: /* @__PURE__ */
|
|
20822
|
+
children: /* @__PURE__ */ jsx121(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
20405
20823
|
}
|
|
20406
20824
|
)
|
|
20407
20825
|
] })
|
|
@@ -20425,8 +20843,8 @@ import {
|
|
|
20425
20843
|
COMMAND_PRIORITY_CRITICAL,
|
|
20426
20844
|
INDENT_CONTENT_COMMAND
|
|
20427
20845
|
} from "lexical";
|
|
20428
|
-
import { useEffect as
|
|
20429
|
-
import { jsx as
|
|
20846
|
+
import { useEffect as useEffect19 } from "react";
|
|
20847
|
+
import { jsx as jsx122 } from "@emotion/react/jsx-runtime";
|
|
20430
20848
|
function isIndentPermitted(maxDepth) {
|
|
20431
20849
|
const selection = $getSelection2();
|
|
20432
20850
|
if (!$isRangeSelection2(selection)) {
|
|
@@ -20449,18 +20867,18 @@ function isIndentPermitted(maxDepth) {
|
|
|
20449
20867
|
}
|
|
20450
20868
|
function ListIndentPlugin({ maxDepth }) {
|
|
20451
20869
|
const [editor] = useLexicalComposerContext3();
|
|
20452
|
-
|
|
20870
|
+
useEffect19(() => {
|
|
20453
20871
|
return editor.registerCommand(
|
|
20454
20872
|
INDENT_CONTENT_COMMAND,
|
|
20455
20873
|
() => !isIndentPermitted(maxDepth),
|
|
20456
20874
|
COMMAND_PRIORITY_CRITICAL
|
|
20457
20875
|
);
|
|
20458
20876
|
}, [editor, maxDepth]);
|
|
20459
|
-
return /* @__PURE__ */
|
|
20877
|
+
return /* @__PURE__ */ jsx122(TabIndentationPlugin, {});
|
|
20460
20878
|
}
|
|
20461
20879
|
|
|
20462
20880
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
20463
|
-
import { css as
|
|
20881
|
+
import { css as css93 } from "@emotion/react";
|
|
20464
20882
|
import { $createCodeNode } from "@lexical/code";
|
|
20465
20883
|
import {
|
|
20466
20884
|
$isListNode as $isListNode2,
|
|
@@ -20482,9 +20900,9 @@ import {
|
|
|
20482
20900
|
FORMAT_TEXT_COMMAND,
|
|
20483
20901
|
SELECTION_CHANGE_COMMAND
|
|
20484
20902
|
} from "lexical";
|
|
20485
|
-
import { useCallback as
|
|
20486
|
-
import { Fragment as Fragment19, jsx as
|
|
20487
|
-
var toolbar =
|
|
20903
|
+
import { useCallback as useCallback11, useEffect as useEffect20, useMemo as useMemo6, useState as useState17 } from "react";
|
|
20904
|
+
import { Fragment as Fragment19, jsx as jsx123, jsxs as jsxs82 } from "@emotion/react/jsx-runtime";
|
|
20905
|
+
var toolbar = css93`
|
|
20488
20906
|
background: var(--gray-50);
|
|
20489
20907
|
border-radius: var(--rounded-base);
|
|
20490
20908
|
display: flex;
|
|
@@ -20496,7 +20914,7 @@ var toolbar = css92`
|
|
|
20496
20914
|
top: calc(var(--spacing-sm) * -2);
|
|
20497
20915
|
z-index: 10;
|
|
20498
20916
|
`;
|
|
20499
|
-
var toolbarGroup =
|
|
20917
|
+
var toolbarGroup = css93`
|
|
20500
20918
|
display: flex;
|
|
20501
20919
|
gap: var(--spacing-xs);
|
|
20502
20920
|
position: relative;
|
|
@@ -20512,7 +20930,7 @@ var toolbarGroup = css92`
|
|
|
20512
20930
|
width: 1px;
|
|
20513
20931
|
}
|
|
20514
20932
|
`;
|
|
20515
|
-
var richTextToolbarButton =
|
|
20933
|
+
var richTextToolbarButton = css93`
|
|
20516
20934
|
align-items: center;
|
|
20517
20935
|
appearance: none;
|
|
20518
20936
|
border: 0;
|
|
@@ -20525,17 +20943,17 @@ var richTextToolbarButton = css92`
|
|
|
20525
20943
|
min-width: 32px;
|
|
20526
20944
|
padding: 0 var(--spacing-sm);
|
|
20527
20945
|
`;
|
|
20528
|
-
var richTextToolbarButtonActive =
|
|
20946
|
+
var richTextToolbarButtonActive = css93`
|
|
20529
20947
|
background: var(--gray-200);
|
|
20530
20948
|
`;
|
|
20531
|
-
var toolbarIcon =
|
|
20949
|
+
var toolbarIcon = css93`
|
|
20532
20950
|
color: inherit;
|
|
20533
20951
|
`;
|
|
20534
|
-
var toolbarChevron =
|
|
20952
|
+
var toolbarChevron = css93`
|
|
20535
20953
|
margin-left: var(--spacing-xs);
|
|
20536
20954
|
`;
|
|
20537
20955
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
20538
|
-
return /* @__PURE__ */
|
|
20956
|
+
return /* @__PURE__ */ jsx123(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
20539
20957
|
};
|
|
20540
20958
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
20541
20959
|
["bold", "format-bold"],
|
|
@@ -20586,7 +21004,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20586
21004
|
}
|
|
20587
21005
|
});
|
|
20588
21006
|
};
|
|
20589
|
-
const updateToolbar =
|
|
21007
|
+
const updateToolbar = useCallback11(() => {
|
|
20590
21008
|
const selection = $getSelection3();
|
|
20591
21009
|
if (!$isRangeSelection3(selection)) {
|
|
20592
21010
|
return;
|
|
@@ -20625,7 +21043,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20625
21043
|
setIsLink(false);
|
|
20626
21044
|
}
|
|
20627
21045
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
20628
|
-
|
|
21046
|
+
useEffect20(() => {
|
|
20629
21047
|
return editor.registerCommand(
|
|
20630
21048
|
SELECTION_CHANGE_COMMAND,
|
|
20631
21049
|
(_payload) => {
|
|
@@ -20635,7 +21053,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20635
21053
|
COMMAND_PRIORITY_CRITICAL2
|
|
20636
21054
|
);
|
|
20637
21055
|
}, [editor, updateToolbar]);
|
|
20638
|
-
|
|
21056
|
+
useEffect20(() => {
|
|
20639
21057
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20640
21058
|
requestAnimationFrame(() => {
|
|
20641
21059
|
editorState.read(() => {
|
|
@@ -20644,15 +21062,15 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20644
21062
|
});
|
|
20645
21063
|
});
|
|
20646
21064
|
}, [editor, updateToolbar]);
|
|
20647
|
-
return /* @__PURE__ */
|
|
20648
|
-
/* @__PURE__ */
|
|
21065
|
+
return /* @__PURE__ */ jsxs82("div", { css: toolbar, children: [
|
|
21066
|
+
/* @__PURE__ */ jsxs82(
|
|
20649
21067
|
Menu,
|
|
20650
21068
|
{
|
|
20651
21069
|
menuLabel: "Elements",
|
|
20652
|
-
menuTrigger: /* @__PURE__ */
|
|
21070
|
+
menuTrigger: /* @__PURE__ */ jsxs82("button", { css: richTextToolbarButton, title: "Text styles", children: [
|
|
20653
21071
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
20654
21072
|
" ",
|
|
20655
|
-
/* @__PURE__ */
|
|
21073
|
+
/* @__PURE__ */ jsx123(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
20656
21074
|
] }),
|
|
20657
21075
|
placement: "bottom-start",
|
|
20658
21076
|
children: [
|
|
@@ -20662,7 +21080,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20662
21080
|
type: "paragraph"
|
|
20663
21081
|
},
|
|
20664
21082
|
...visibleTextualElements
|
|
20665
|
-
].map((element) => /* @__PURE__ */
|
|
21083
|
+
].map((element) => /* @__PURE__ */ jsx123(
|
|
20666
21084
|
MenuItem,
|
|
20667
21085
|
{
|
|
20668
21086
|
onClick: () => {
|
|
@@ -20672,12 +21090,12 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20672
21090
|
},
|
|
20673
21091
|
element.type
|
|
20674
21092
|
)),
|
|
20675
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */
|
|
21093
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ jsx123(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
20676
21094
|
]
|
|
20677
21095
|
}
|
|
20678
21096
|
),
|
|
20679
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
20680
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */
|
|
21097
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsxs82("div", { css: toolbarGroup, children: [
|
|
21098
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ jsx123(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ jsx123(
|
|
20681
21099
|
"button",
|
|
20682
21100
|
{
|
|
20683
21101
|
onClick: () => {
|
|
@@ -20687,16 +21105,16 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20687
21105
|
richTextToolbarButton,
|
|
20688
21106
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
20689
21107
|
],
|
|
20690
|
-
children: /* @__PURE__ */
|
|
21108
|
+
children: /* @__PURE__ */ jsx123(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
20691
21109
|
}
|
|
20692
21110
|
) }, format.type)),
|
|
20693
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
21111
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsx123(
|
|
20694
21112
|
Menu,
|
|
20695
21113
|
{
|
|
20696
21114
|
menuLabel: "Alternative text styles",
|
|
20697
|
-
menuTrigger: /* @__PURE__ */
|
|
21115
|
+
menuTrigger: /* @__PURE__ */ jsx123("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ jsx123(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
20698
21116
|
placement: "bottom-start",
|
|
20699
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */
|
|
21117
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ jsx123(
|
|
20700
21118
|
MenuItem,
|
|
20701
21119
|
{
|
|
20702
21120
|
onClick: () => {
|
|
@@ -20709,19 +21127,19 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20709
21127
|
}
|
|
20710
21128
|
) : null
|
|
20711
21129
|
] }) : null,
|
|
20712
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */
|
|
20713
|
-
linkElementVisible ? /* @__PURE__ */
|
|
21130
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ jsxs82("div", { css: toolbarGroup, children: [
|
|
21131
|
+
linkElementVisible ? /* @__PURE__ */ jsx123(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ jsx123(
|
|
20714
21132
|
"button",
|
|
20715
21133
|
{
|
|
20716
21134
|
onClick: () => {
|
|
20717
21135
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
20718
21136
|
},
|
|
20719
21137
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
20720
|
-
children: /* @__PURE__ */
|
|
21138
|
+
children: /* @__PURE__ */ jsx123(RichTextToolbarIcon, { icon: "link" })
|
|
20721
21139
|
}
|
|
20722
21140
|
) }) : null,
|
|
20723
|
-
visibleLists.size > 0 ? /* @__PURE__ */
|
|
20724
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */
|
|
21141
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs82(Fragment19, { children: [
|
|
21142
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx123(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx123(
|
|
20725
21143
|
"button",
|
|
20726
21144
|
{
|
|
20727
21145
|
onClick: () => {
|
|
@@ -20731,10 +21149,10 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20731
21149
|
richTextToolbarButton,
|
|
20732
21150
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
20733
21151
|
],
|
|
20734
|
-
children: /* @__PURE__ */
|
|
21152
|
+
children: /* @__PURE__ */ jsx123(RichTextToolbarIcon, { icon: "layout-list" })
|
|
20735
21153
|
}
|
|
20736
21154
|
) }) : null,
|
|
20737
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */
|
|
21155
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ jsx123(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ jsx123(
|
|
20738
21156
|
"button",
|
|
20739
21157
|
{
|
|
20740
21158
|
onClick: () => {
|
|
@@ -20744,57 +21162,57 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20744
21162
|
richTextToolbarButton,
|
|
20745
21163
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
20746
21164
|
],
|
|
20747
|
-
children: /* @__PURE__ */
|
|
21165
|
+
children: /* @__PURE__ */ jsx123(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
20748
21166
|
}
|
|
20749
21167
|
) }) : null
|
|
20750
21168
|
] }) : null,
|
|
20751
|
-
quoteElementVisible ? /* @__PURE__ */
|
|
21169
|
+
quoteElementVisible ? /* @__PURE__ */ jsx123(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ jsx123(
|
|
20752
21170
|
"button",
|
|
20753
21171
|
{
|
|
20754
21172
|
onClick: () => {
|
|
20755
21173
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
20756
21174
|
},
|
|
20757
21175
|
css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
|
|
20758
|
-
children: /* @__PURE__ */
|
|
21176
|
+
children: /* @__PURE__ */ jsx123(RichTextToolbarIcon, { icon: "quote" })
|
|
20759
21177
|
}
|
|
20760
21178
|
) }) : null,
|
|
20761
|
-
codeElementVisible ? /* @__PURE__ */
|
|
21179
|
+
codeElementVisible ? /* @__PURE__ */ jsx123(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ jsx123(
|
|
20762
21180
|
"button",
|
|
20763
21181
|
{
|
|
20764
21182
|
onClick: () => {
|
|
20765
21183
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
20766
21184
|
},
|
|
20767
21185
|
css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
|
|
20768
|
-
children: /* @__PURE__ */
|
|
21186
|
+
children: /* @__PURE__ */ jsx123(RichTextToolbarIcon, { icon: "code-slash" })
|
|
20769
21187
|
}
|
|
20770
21188
|
) }) : null
|
|
20771
21189
|
] }) : null,
|
|
20772
|
-
customControls ? /* @__PURE__ */
|
|
21190
|
+
customControls ? /* @__PURE__ */ jsx123("div", { css: toolbarGroup, children: customControls }) : null
|
|
20773
21191
|
] });
|
|
20774
21192
|
};
|
|
20775
21193
|
var RichTextToolbar_default = RichTextToolbar;
|
|
20776
21194
|
var useRichTextToolbarState = ({ config }) => {
|
|
20777
21195
|
var _a;
|
|
20778
|
-
const enabledBuiltInFormats =
|
|
21196
|
+
const enabledBuiltInFormats = useMemo6(() => {
|
|
20779
21197
|
return richTextBuiltInFormats.filter((format) => {
|
|
20780
21198
|
var _a2, _b;
|
|
20781
21199
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
20782
21200
|
});
|
|
20783
21201
|
}, [config]);
|
|
20784
|
-
const enabledBuiltInElements =
|
|
21202
|
+
const enabledBuiltInElements = useMemo6(() => {
|
|
20785
21203
|
return richTextBuiltInElements.filter((element) => {
|
|
20786
21204
|
var _a2, _b;
|
|
20787
21205
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
20788
21206
|
});
|
|
20789
21207
|
}, [config]);
|
|
20790
|
-
const enabledBuiltInFormatsWithIcon =
|
|
21208
|
+
const enabledBuiltInFormatsWithIcon = useMemo6(() => {
|
|
20791
21209
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
20792
21210
|
}, [enabledBuiltInFormats]);
|
|
20793
21211
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
20794
21212
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
20795
21213
|
);
|
|
20796
|
-
const [activeFormats, setActiveFormats] =
|
|
20797
|
-
const visibleFormatsWithIcon =
|
|
21214
|
+
const [activeFormats, setActiveFormats] = useState17([]);
|
|
21215
|
+
const visibleFormatsWithIcon = useMemo6(() => {
|
|
20798
21216
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20799
21217
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20800
21218
|
visibleFormats.add(type);
|
|
@@ -20804,7 +21222,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20804
21222
|
});
|
|
20805
21223
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20806
21224
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
20807
|
-
const visibleFormatsWithoutIcon =
|
|
21225
|
+
const visibleFormatsWithoutIcon = useMemo6(() => {
|
|
20808
21226
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20809
21227
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20810
21228
|
visibleFormats.add(type);
|
|
@@ -20814,11 +21232,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20814
21232
|
});
|
|
20815
21233
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20816
21234
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
20817
|
-
const [activeElement, setActiveElement] =
|
|
21235
|
+
const [activeElement, setActiveElement] = useState17("paragraph");
|
|
20818
21236
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
20819
21237
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
20820
21238
|
);
|
|
20821
|
-
const visibleTextualElements =
|
|
21239
|
+
const visibleTextualElements = useMemo6(() => {
|
|
20822
21240
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
20823
21241
|
return enabledTextualElements;
|
|
20824
21242
|
}
|
|
@@ -20829,24 +21247,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20829
21247
|
}
|
|
20830
21248
|
);
|
|
20831
21249
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
20832
|
-
const [isLink, setIsLink] =
|
|
20833
|
-
const linkElementVisible =
|
|
21250
|
+
const [isLink, setIsLink] = useState17(false);
|
|
21251
|
+
const linkElementVisible = useMemo6(() => {
|
|
20834
21252
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
20835
21253
|
}, [isLink, enabledBuiltInElements]);
|
|
20836
|
-
const visibleLists =
|
|
21254
|
+
const visibleLists = useMemo6(() => {
|
|
20837
21255
|
return new Set(
|
|
20838
21256
|
["orderedList", "unorderedList"].filter(
|
|
20839
21257
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
20840
21258
|
)
|
|
20841
21259
|
);
|
|
20842
21260
|
}, [activeElement, enabledBuiltInElements]);
|
|
20843
|
-
const quoteElementVisible =
|
|
21261
|
+
const quoteElementVisible = useMemo6(() => {
|
|
20844
21262
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
20845
21263
|
}, [activeElement, enabledBuiltInElements]);
|
|
20846
|
-
const codeElementVisible =
|
|
21264
|
+
const codeElementVisible = useMemo6(() => {
|
|
20847
21265
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
20848
21266
|
}, [activeElement, enabledBuiltInElements]);
|
|
20849
|
-
const visibleElementsWithIcons =
|
|
21267
|
+
const visibleElementsWithIcons = useMemo6(() => {
|
|
20850
21268
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
20851
21269
|
if (linkElementVisible) {
|
|
20852
21270
|
visibleElements.add("link");
|
|
@@ -20883,7 +21301,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20883
21301
|
};
|
|
20884
21302
|
|
|
20885
21303
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
20886
|
-
import { Fragment as Fragment20, jsx as
|
|
21304
|
+
import { Fragment as Fragment20, jsx as jsx124, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
|
|
20887
21305
|
var ParameterRichText = ({
|
|
20888
21306
|
label,
|
|
20889
21307
|
labelLeadingIcon,
|
|
@@ -20908,7 +21326,7 @@ var ParameterRichText = ({
|
|
|
20908
21326
|
variables,
|
|
20909
21327
|
customControls
|
|
20910
21328
|
}) => {
|
|
20911
|
-
return /* @__PURE__ */
|
|
21329
|
+
return /* @__PURE__ */ jsxs83(
|
|
20912
21330
|
ParameterShell,
|
|
20913
21331
|
{
|
|
20914
21332
|
"data-testid": "parameter-richtext",
|
|
@@ -20922,7 +21340,7 @@ var ParameterRichText = ({
|
|
|
20922
21340
|
captionTestId,
|
|
20923
21341
|
menuItems,
|
|
20924
21342
|
children: [
|
|
20925
|
-
/* @__PURE__ */
|
|
21343
|
+
/* @__PURE__ */ jsx124(
|
|
20926
21344
|
ParameterRichTextInner,
|
|
20927
21345
|
{
|
|
20928
21346
|
value,
|
|
@@ -20940,23 +21358,23 @@ var ParameterRichText = ({
|
|
|
20940
21358
|
children
|
|
20941
21359
|
}
|
|
20942
21360
|
),
|
|
20943
|
-
menuItems ? /* @__PURE__ */
|
|
21361
|
+
menuItems ? /* @__PURE__ */ jsx124(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx124(Fragment20, { children: menuItems }) }) : null
|
|
20944
21362
|
]
|
|
20945
21363
|
}
|
|
20946
21364
|
);
|
|
20947
21365
|
};
|
|
20948
|
-
var editorWrapper =
|
|
21366
|
+
var editorWrapper = css94`
|
|
20949
21367
|
display: flex;
|
|
20950
21368
|
flex-flow: column;
|
|
20951
21369
|
flex-grow: 1;
|
|
20952
21370
|
`;
|
|
20953
|
-
var editorContainer =
|
|
21371
|
+
var editorContainer = css94`
|
|
20954
21372
|
display: flex;
|
|
20955
21373
|
flex-flow: column;
|
|
20956
21374
|
flex-grow: 1;
|
|
20957
21375
|
position: relative;
|
|
20958
21376
|
`;
|
|
20959
|
-
var editorPlaceholder =
|
|
21377
|
+
var editorPlaceholder = css94`
|
|
20960
21378
|
color: var(--gray-500);
|
|
20961
21379
|
font-style: italic;
|
|
20962
21380
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20967,7 +21385,7 @@ var editorPlaceholder = css93`
|
|
|
20967
21385
|
top: var(--spacing-sm);
|
|
20968
21386
|
user-select: none;
|
|
20969
21387
|
`;
|
|
20970
|
-
var editorInput =
|
|
21388
|
+
var editorInput = css94`
|
|
20971
21389
|
background: var(--white);
|
|
20972
21390
|
border: 1px solid var(--gray-200);
|
|
20973
21391
|
border-radius: var(--rounded-sm);
|
|
@@ -21051,8 +21469,8 @@ var ParameterRichTextInner = ({
|
|
|
21051
21469
|
},
|
|
21052
21470
|
editable: !readOnly
|
|
21053
21471
|
};
|
|
21054
|
-
return /* @__PURE__ */
|
|
21055
|
-
/* @__PURE__ */
|
|
21472
|
+
return /* @__PURE__ */ jsxs83(Fragment20, { children: [
|
|
21473
|
+
/* @__PURE__ */ jsx124("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx124(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx124(
|
|
21056
21474
|
RichText,
|
|
21057
21475
|
{
|
|
21058
21476
|
onChange,
|
|
@@ -21089,14 +21507,14 @@ var RichText = ({
|
|
|
21089
21507
|
variables,
|
|
21090
21508
|
customControls
|
|
21091
21509
|
}) => {
|
|
21092
|
-
const editorContainerRef =
|
|
21510
|
+
const editorContainerRef = useRef12(null);
|
|
21093
21511
|
const [editor] = useLexicalComposerContext5();
|
|
21094
|
-
|
|
21512
|
+
useEffect21(() => {
|
|
21095
21513
|
if (onRichTextInit) {
|
|
21096
21514
|
onRichTextInit(editor);
|
|
21097
21515
|
}
|
|
21098
21516
|
}, [editor, onRichTextInit]);
|
|
21099
|
-
|
|
21517
|
+
useEffect21(() => {
|
|
21100
21518
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
21101
21519
|
requestAnimationFrame(() => {
|
|
21102
21520
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -21108,23 +21526,23 @@ var RichText = ({
|
|
|
21108
21526
|
removeUpdateListener();
|
|
21109
21527
|
};
|
|
21110
21528
|
}, [editor, onChange]);
|
|
21111
|
-
|
|
21529
|
+
useEffect21(() => {
|
|
21112
21530
|
editor.setEditable(!readOnly);
|
|
21113
21531
|
}, [editor, readOnly]);
|
|
21114
|
-
return /* @__PURE__ */
|
|
21115
|
-
readOnly ? null : /* @__PURE__ */
|
|
21116
|
-
/* @__PURE__ */
|
|
21117
|
-
/* @__PURE__ */
|
|
21532
|
+
return /* @__PURE__ */ jsxs83(Fragment20, { children: [
|
|
21533
|
+
readOnly ? null : /* @__PURE__ */ jsx124(RichTextToolbar_default, { config, customControls }),
|
|
21534
|
+
/* @__PURE__ */ jsxs83("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
21535
|
+
/* @__PURE__ */ jsx124(
|
|
21118
21536
|
RichTextPlugin,
|
|
21119
21537
|
{
|
|
21120
|
-
contentEditable: /* @__PURE__ */
|
|
21121
|
-
placeholder: /* @__PURE__ */
|
|
21538
|
+
contentEditable: /* @__PURE__ */ jsx124(ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
21539
|
+
placeholder: /* @__PURE__ */ jsx124("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
21122
21540
|
ErrorBoundary: LexicalErrorBoundary
|
|
21123
21541
|
}
|
|
21124
21542
|
),
|
|
21125
|
-
/* @__PURE__ */
|
|
21126
|
-
readOnly ? null : /* @__PURE__ */
|
|
21127
|
-
/* @__PURE__ */
|
|
21543
|
+
/* @__PURE__ */ jsx124(ListPlugin, {}),
|
|
21544
|
+
readOnly ? null : /* @__PURE__ */ jsx124(HistoryPlugin, {}),
|
|
21545
|
+
/* @__PURE__ */ jsx124(
|
|
21128
21546
|
LinkNodePlugin,
|
|
21129
21547
|
{
|
|
21130
21548
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -21134,27 +21552,27 @@ var RichText = ({
|
|
|
21134
21552
|
} : void 0
|
|
21135
21553
|
}
|
|
21136
21554
|
),
|
|
21137
|
-
/* @__PURE__ */
|
|
21138
|
-
/* @__PURE__ */
|
|
21139
|
-
/* @__PURE__ */
|
|
21140
|
-
/* @__PURE__ */
|
|
21555
|
+
/* @__PURE__ */ jsx124(ListIndentPlugin, { maxDepth: 4 }),
|
|
21556
|
+
/* @__PURE__ */ jsx124(DisableStylesPlugin, {}),
|
|
21557
|
+
/* @__PURE__ */ jsx124(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
21558
|
+
/* @__PURE__ */ jsx124(Fragment20, { children })
|
|
21141
21559
|
] })
|
|
21142
21560
|
] });
|
|
21143
21561
|
};
|
|
21144
21562
|
|
|
21145
21563
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
21146
21564
|
import { forwardRef as forwardRef21 } from "react";
|
|
21147
|
-
import { jsx as
|
|
21565
|
+
import { jsx as jsx125, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
|
|
21148
21566
|
var ParameterSelect = forwardRef21(
|
|
21149
21567
|
({ defaultOption, options, ...props }, ref) => {
|
|
21150
21568
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21151
|
-
return /* @__PURE__ */
|
|
21569
|
+
return /* @__PURE__ */ jsx125(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx125(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
21152
21570
|
}
|
|
21153
21571
|
);
|
|
21154
21572
|
var ParameterSelectInner = forwardRef21(
|
|
21155
21573
|
({ defaultOption, options, ...props }, ref) => {
|
|
21156
21574
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21157
|
-
return /* @__PURE__ */
|
|
21575
|
+
return /* @__PURE__ */ jsxs84(
|
|
21158
21576
|
"select",
|
|
21159
21577
|
{
|
|
21160
21578
|
css: [input3, selectInput],
|
|
@@ -21163,10 +21581,10 @@ var ParameterSelectInner = forwardRef21(
|
|
|
21163
21581
|
ref,
|
|
21164
21582
|
...props,
|
|
21165
21583
|
children: [
|
|
21166
|
-
defaultOption ? /* @__PURE__ */
|
|
21584
|
+
defaultOption ? /* @__PURE__ */ jsx125("option", { value: "", children: defaultOption }) : null,
|
|
21167
21585
|
options.map((option) => {
|
|
21168
21586
|
var _a;
|
|
21169
|
-
return /* @__PURE__ */
|
|
21587
|
+
return /* @__PURE__ */ jsx125("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
21170
21588
|
})
|
|
21171
21589
|
]
|
|
21172
21590
|
}
|
|
@@ -21176,14 +21594,14 @@ var ParameterSelectInner = forwardRef21(
|
|
|
21176
21594
|
|
|
21177
21595
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
21178
21596
|
import { forwardRef as forwardRef22 } from "react";
|
|
21179
|
-
import { jsx as
|
|
21597
|
+
import { jsx as jsx126 } from "@emotion/react/jsx-runtime";
|
|
21180
21598
|
var ParameterTextarea = forwardRef22((props, ref) => {
|
|
21181
21599
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21182
|
-
return /* @__PURE__ */
|
|
21600
|
+
return /* @__PURE__ */ jsx126(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx126(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
21183
21601
|
});
|
|
21184
21602
|
var ParameterTextareaInner = forwardRef22(({ ...props }, ref) => {
|
|
21185
21603
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21186
|
-
return /* @__PURE__ */
|
|
21604
|
+
return /* @__PURE__ */ jsx126(
|
|
21187
21605
|
"textarea",
|
|
21188
21606
|
{
|
|
21189
21607
|
css: [input3, textarea2],
|
|
@@ -21197,25 +21615,25 @@ var ParameterTextareaInner = forwardRef22(({ ...props }, ref) => {
|
|
|
21197
21615
|
|
|
21198
21616
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
21199
21617
|
import { forwardRef as forwardRef23 } from "react";
|
|
21200
|
-
import { jsx as
|
|
21618
|
+
import { jsx as jsx127, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
|
|
21201
21619
|
var ParameterToggle = forwardRef23((props, ref) => {
|
|
21202
21620
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21203
|
-
return /* @__PURE__ */
|
|
21621
|
+
return /* @__PURE__ */ jsx127(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx127(ParameterToggleInner, { ref, ...innerProps }) });
|
|
21204
21622
|
});
|
|
21205
21623
|
var ParameterToggleInner = forwardRef23(
|
|
21206
21624
|
({ children, ...props }, ref) => {
|
|
21207
21625
|
const { id, label } = useParameterShell();
|
|
21208
|
-
return /* @__PURE__ */
|
|
21209
|
-
/* @__PURE__ */
|
|
21210
|
-
/* @__PURE__ */
|
|
21626
|
+
return /* @__PURE__ */ jsxs85("label", { css: inputToggleLabel2, children: [
|
|
21627
|
+
/* @__PURE__ */ jsx127("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
21628
|
+
/* @__PURE__ */ jsx127("span", { css: inlineLabel2, children: label }),
|
|
21211
21629
|
children
|
|
21212
21630
|
] });
|
|
21213
21631
|
}
|
|
21214
21632
|
);
|
|
21215
21633
|
|
|
21216
21634
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
21217
|
-
import { css as
|
|
21218
|
-
var container3 =
|
|
21635
|
+
import { css as css95, keyframes as keyframes4 } from "@emotion/react";
|
|
21636
|
+
var container3 = css95`
|
|
21219
21637
|
background: var(--gray-50);
|
|
21220
21638
|
margin-block: var(--spacing-sm);
|
|
21221
21639
|
position: relative;
|
|
@@ -21225,13 +21643,13 @@ var container3 = css94`
|
|
|
21225
21643
|
border: solid 1px var(--gray-300);
|
|
21226
21644
|
`;
|
|
21227
21645
|
var themeMap = {
|
|
21228
|
-
primary:
|
|
21646
|
+
primary: css95`
|
|
21229
21647
|
--progress-color: var(--accent-light);
|
|
21230
21648
|
`,
|
|
21231
|
-
secondary:
|
|
21649
|
+
secondary: css95`
|
|
21232
21650
|
--progress-color: var(--accent-alt-light);
|
|
21233
21651
|
`,
|
|
21234
|
-
destructive:
|
|
21652
|
+
destructive: css95`
|
|
21235
21653
|
--progress-color: var(--brand-secondary-5);
|
|
21236
21654
|
`
|
|
21237
21655
|
};
|
|
@@ -21243,10 +21661,10 @@ var slidingBackgroundPosition = keyframes4`
|
|
|
21243
21661
|
background-position: 64px 0;
|
|
21244
21662
|
}
|
|
21245
21663
|
`;
|
|
21246
|
-
var determinate =
|
|
21664
|
+
var determinate = css95`
|
|
21247
21665
|
background-color: var(--progress-color);
|
|
21248
21666
|
`;
|
|
21249
|
-
var indeterminate =
|
|
21667
|
+
var indeterminate = css95`
|
|
21250
21668
|
background-image: linear-gradient(
|
|
21251
21669
|
45deg,
|
|
21252
21670
|
var(--progress-color) 25%,
|
|
@@ -21260,7 +21678,7 @@ var indeterminate = css94`
|
|
|
21260
21678
|
background-size: 64px 64px;
|
|
21261
21679
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
21262
21680
|
`;
|
|
21263
|
-
var bar =
|
|
21681
|
+
var bar = css95`
|
|
21264
21682
|
position: absolute;
|
|
21265
21683
|
inset: 0;
|
|
21266
21684
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -21268,7 +21686,7 @@ var bar = css94`
|
|
|
21268
21686
|
`;
|
|
21269
21687
|
|
|
21270
21688
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
21271
|
-
import { jsx as
|
|
21689
|
+
import { jsx as jsx128 } from "@emotion/react/jsx-runtime";
|
|
21272
21690
|
function ProgressBar({
|
|
21273
21691
|
current,
|
|
21274
21692
|
max,
|
|
@@ -21278,7 +21696,7 @@ function ProgressBar({
|
|
|
21278
21696
|
}) {
|
|
21279
21697
|
const valueNow = Math.min(current, max);
|
|
21280
21698
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
21281
|
-
return /* @__PURE__ */
|
|
21699
|
+
return /* @__PURE__ */ jsx128(
|
|
21282
21700
|
"div",
|
|
21283
21701
|
{
|
|
21284
21702
|
css: container3,
|
|
@@ -21289,7 +21707,7 @@ function ProgressBar({
|
|
|
21289
21707
|
"aria-valuemax": max,
|
|
21290
21708
|
"aria-valuenow": valueNow,
|
|
21291
21709
|
...props,
|
|
21292
|
-
children: /* @__PURE__ */
|
|
21710
|
+
children: /* @__PURE__ */ jsx128(
|
|
21293
21711
|
"div",
|
|
21294
21712
|
{
|
|
21295
21713
|
css: [
|
|
@@ -21308,30 +21726,30 @@ function ProgressBar({
|
|
|
21308
21726
|
}
|
|
21309
21727
|
|
|
21310
21728
|
// src/components/ProgressList/ProgressList.tsx
|
|
21311
|
-
import { css as
|
|
21729
|
+
import { css as css97 } from "@emotion/react";
|
|
21312
21730
|
import { CgCheckO as CgCheckO2 } from "@react-icons/all-files/cg/CgCheckO";
|
|
21313
21731
|
import { CgRadioCheck } from "@react-icons/all-files/cg/CgRadioCheck";
|
|
21314
21732
|
import { CgRecord } from "@react-icons/all-files/cg/CgRecord";
|
|
21315
|
-
import { useMemo as
|
|
21733
|
+
import { useMemo as useMemo7 } from "react";
|
|
21316
21734
|
|
|
21317
21735
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
21318
|
-
import { css as
|
|
21319
|
-
var progressListStyles =
|
|
21736
|
+
import { css as css96 } from "@emotion/react";
|
|
21737
|
+
var progressListStyles = css96`
|
|
21320
21738
|
display: flex;
|
|
21321
21739
|
flex-direction: column;
|
|
21322
21740
|
gap: var(--spacing-sm);
|
|
21323
21741
|
list-style-type: none;
|
|
21324
21742
|
`;
|
|
21325
|
-
var progressListItemStyles =
|
|
21743
|
+
var progressListItemStyles = css96`
|
|
21326
21744
|
display: flex;
|
|
21327
21745
|
gap: var(--spacing-base);
|
|
21328
21746
|
align-items: center;
|
|
21329
21747
|
`;
|
|
21330
21748
|
|
|
21331
21749
|
// src/components/ProgressList/ProgressList.tsx
|
|
21332
|
-
import { jsx as
|
|
21750
|
+
import { jsx as jsx129, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
21333
21751
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
21334
|
-
const itemsWithStatus =
|
|
21752
|
+
const itemsWithStatus = useMemo7(() => {
|
|
21335
21753
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
21336
21754
|
return items.map((item, index) => {
|
|
21337
21755
|
let status = "queued";
|
|
@@ -21343,8 +21761,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
21343
21761
|
return { ...item, status };
|
|
21344
21762
|
});
|
|
21345
21763
|
}, [items, inProgressId]);
|
|
21346
|
-
return /* @__PURE__ */
|
|
21347
|
-
return /* @__PURE__ */
|
|
21764
|
+
return /* @__PURE__ */ jsx129("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
21765
|
+
return /* @__PURE__ */ jsx129(
|
|
21348
21766
|
ProgressListItem,
|
|
21349
21767
|
{
|
|
21350
21768
|
status,
|
|
@@ -21364,7 +21782,7 @@ var ProgressListItem = ({
|
|
|
21364
21782
|
errorLevel = "danger",
|
|
21365
21783
|
autoEllipsis = false
|
|
21366
21784
|
}) => {
|
|
21367
|
-
const icon =
|
|
21785
|
+
const icon = useMemo7(() => {
|
|
21368
21786
|
if (error) {
|
|
21369
21787
|
return warningIcon;
|
|
21370
21788
|
}
|
|
@@ -21375,14 +21793,14 @@ var ProgressListItem = ({
|
|
|
21375
21793
|
};
|
|
21376
21794
|
return iconPerStatus[status];
|
|
21377
21795
|
}, [status, error]);
|
|
21378
|
-
const statusStyles =
|
|
21796
|
+
const statusStyles = useMemo7(() => {
|
|
21379
21797
|
if (error) {
|
|
21380
|
-
return errorLevel === "caution" ?
|
|
21798
|
+
return errorLevel === "caution" ? css97`
|
|
21381
21799
|
color: rgb(161, 98, 7);
|
|
21382
21800
|
& svg {
|
|
21383
21801
|
color: rgb(250, 204, 21);
|
|
21384
21802
|
}
|
|
21385
|
-
` :
|
|
21803
|
+
` : css97`
|
|
21386
21804
|
color: rgb(185, 28, 28);
|
|
21387
21805
|
& svg {
|
|
21388
21806
|
color: var(--brand-primary-2);
|
|
@@ -21390,38 +21808,38 @@ var ProgressListItem = ({
|
|
|
21390
21808
|
`;
|
|
21391
21809
|
}
|
|
21392
21810
|
const colorPerStatus = {
|
|
21393
|
-
completed:
|
|
21811
|
+
completed: css97`
|
|
21394
21812
|
opacity: 0.75;
|
|
21395
21813
|
`,
|
|
21396
|
-
inProgress:
|
|
21814
|
+
inProgress: css97`
|
|
21397
21815
|
-webkit-text-stroke-width: thin;
|
|
21398
21816
|
`,
|
|
21399
|
-
queued:
|
|
21817
|
+
queued: css97`
|
|
21400
21818
|
opacity: 0.5;
|
|
21401
21819
|
`
|
|
21402
21820
|
};
|
|
21403
21821
|
return colorPerStatus[status];
|
|
21404
21822
|
}, [status, error, errorLevel]);
|
|
21405
|
-
return /* @__PURE__ */
|
|
21406
|
-
/* @__PURE__ */
|
|
21407
|
-
/* @__PURE__ */
|
|
21823
|
+
return /* @__PURE__ */ jsxs86("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
21824
|
+
/* @__PURE__ */ jsx129(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ jsx129("div", { children: /* @__PURE__ */ jsx129(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
21825
|
+
/* @__PURE__ */ jsxs86("div", { children: [
|
|
21408
21826
|
children,
|
|
21409
|
-
/* @__PURE__ */
|
|
21827
|
+
/* @__PURE__ */ jsx129("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
21410
21828
|
] })
|
|
21411
21829
|
] });
|
|
21412
21830
|
};
|
|
21413
21831
|
|
|
21414
21832
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21415
|
-
import { css as
|
|
21833
|
+
import { css as css99 } from "@emotion/react";
|
|
21416
21834
|
import { CgCheck as CgCheck5 } from "@react-icons/all-files/cg/CgCheck";
|
|
21417
|
-
import { useCallback as
|
|
21835
|
+
import { useCallback as useCallback12, useEffect as useEffect22, useMemo as useMemo8, useRef as useRef13, useState as useState18 } from "react";
|
|
21418
21836
|
|
|
21419
21837
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
21420
|
-
import { css as
|
|
21421
|
-
var segmentedControlRootStyles =
|
|
21838
|
+
import { css as css98 } from "@emotion/react";
|
|
21839
|
+
var segmentedControlRootStyles = css98`
|
|
21422
21840
|
position: relative;
|
|
21423
21841
|
`;
|
|
21424
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
21842
|
+
var segmentedControlScrollIndicatorsStyles = css98`
|
|
21425
21843
|
position: absolute;
|
|
21426
21844
|
inset: 0;
|
|
21427
21845
|
z-index: 1;
|
|
@@ -21449,17 +21867,17 @@ var segmentedControlScrollIndicatorsStyles = css97`
|
|
|
21449
21867
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
21450
21868
|
}
|
|
21451
21869
|
`;
|
|
21452
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
21870
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = css98`
|
|
21453
21871
|
&::before {
|
|
21454
21872
|
opacity: 1;
|
|
21455
21873
|
}
|
|
21456
21874
|
`;
|
|
21457
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
21875
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = css98`
|
|
21458
21876
|
&::after {
|
|
21459
21877
|
opacity: 1;
|
|
21460
21878
|
}
|
|
21461
21879
|
`;
|
|
21462
|
-
var segmentedControlWrapperStyles =
|
|
21880
|
+
var segmentedControlWrapperStyles = css98`
|
|
21463
21881
|
overflow-y: auto;
|
|
21464
21882
|
scroll-behavior: smooth;
|
|
21465
21883
|
scrollbar-width: none;
|
|
@@ -21468,7 +21886,7 @@ var segmentedControlWrapperStyles = css97`
|
|
|
21468
21886
|
height: 0px;
|
|
21469
21887
|
}
|
|
21470
21888
|
`;
|
|
21471
|
-
var segmentedControlStyles =
|
|
21889
|
+
var segmentedControlStyles = css98`
|
|
21472
21890
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
21473
21891
|
--segmented-control-border-width: 1px;
|
|
21474
21892
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -21487,14 +21905,14 @@ var segmentedControlStyles = css97`
|
|
|
21487
21905
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
21488
21906
|
font-size: var(--fs-xs);
|
|
21489
21907
|
`;
|
|
21490
|
-
var segmentedControlVerticalStyles =
|
|
21908
|
+
var segmentedControlVerticalStyles = css98`
|
|
21491
21909
|
flex-direction: column;
|
|
21492
21910
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
21493
21911
|
var(--segmented-control-rounded-value) 0 0;
|
|
21494
21912
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
21495
21913
|
var(--segmented-control-rounded-value);
|
|
21496
21914
|
`;
|
|
21497
|
-
var segmentedControlItemStyles =
|
|
21915
|
+
var segmentedControlItemStyles = css98`
|
|
21498
21916
|
&:first-of-type label {
|
|
21499
21917
|
border-radius: var(--segmented-control-first-border-radius);
|
|
21500
21918
|
}
|
|
@@ -21502,10 +21920,10 @@ var segmentedControlItemStyles = css97`
|
|
|
21502
21920
|
border-radius: var(--segmented-control-last-border-radius);
|
|
21503
21921
|
}
|
|
21504
21922
|
`;
|
|
21505
|
-
var segmentedControlInputStyles =
|
|
21923
|
+
var segmentedControlInputStyles = css98`
|
|
21506
21924
|
${accessibleHidden}
|
|
21507
21925
|
`;
|
|
21508
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
21926
|
+
var segmentedControlLabelStyles = (checked, disabled2) => css98`
|
|
21509
21927
|
position: relative;
|
|
21510
21928
|
display: flex;
|
|
21511
21929
|
align-items: center;
|
|
@@ -21572,25 +21990,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => css97`
|
|
|
21572
21990
|
`}
|
|
21573
21991
|
}
|
|
21574
21992
|
`;
|
|
21575
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21993
|
+
var segmentedControlLabelIconOnlyStyles = css98`
|
|
21576
21994
|
padding-inline: 0.5em;
|
|
21577
21995
|
`;
|
|
21578
|
-
var segmentedControlLabelCheckStyles =
|
|
21996
|
+
var segmentedControlLabelCheckStyles = css98`
|
|
21579
21997
|
opacity: 0.5;
|
|
21580
21998
|
`;
|
|
21581
|
-
var segmentedControlLabelContentStyles =
|
|
21999
|
+
var segmentedControlLabelContentStyles = css98`
|
|
21582
22000
|
display: flex;
|
|
21583
22001
|
align-items: center;
|
|
21584
22002
|
justify-content: center;
|
|
21585
22003
|
gap: var(--spacing-sm);
|
|
21586
22004
|
height: 100%;
|
|
21587
22005
|
`;
|
|
21588
|
-
var segmentedControlLabelTextStyles =
|
|
22006
|
+
var segmentedControlLabelTextStyles = css98`
|
|
21589
22007
|
white-space: nowrap;
|
|
21590
22008
|
`;
|
|
21591
22009
|
|
|
21592
22010
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21593
|
-
import { jsx as
|
|
22011
|
+
import { jsx as jsx130, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
21594
22012
|
var SegmentedControl = ({
|
|
21595
22013
|
name,
|
|
21596
22014
|
options,
|
|
@@ -21605,10 +22023,10 @@ var SegmentedControl = ({
|
|
|
21605
22023
|
currentBackgroundColor = "white",
|
|
21606
22024
|
...props
|
|
21607
22025
|
}) => {
|
|
21608
|
-
const wrapperRef =
|
|
21609
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] =
|
|
21610
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] =
|
|
21611
|
-
const onOptionChange =
|
|
22026
|
+
const wrapperRef = useRef13(null);
|
|
22027
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState18(false);
|
|
22028
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState18(false);
|
|
22029
|
+
const onOptionChange = useCallback12(
|
|
21612
22030
|
(event) => {
|
|
21613
22031
|
if (event.target.checked) {
|
|
21614
22032
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -21616,19 +22034,19 @@ var SegmentedControl = ({
|
|
|
21616
22034
|
},
|
|
21617
22035
|
[options, onChange]
|
|
21618
22036
|
);
|
|
21619
|
-
const sizeStyles =
|
|
22037
|
+
const sizeStyles = useMemo8(() => {
|
|
21620
22038
|
const map = {
|
|
21621
|
-
sm:
|
|
21622
|
-
md:
|
|
21623
|
-
lg:
|
|
21624
|
-
xl:
|
|
22039
|
+
sm: css99({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
22040
|
+
md: css99({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
22041
|
+
lg: css99({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
22042
|
+
xl: css99({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
21625
22043
|
};
|
|
21626
22044
|
return map[size];
|
|
21627
22045
|
}, [size]);
|
|
21628
|
-
const isIconOnly =
|
|
22046
|
+
const isIconOnly = useMemo8(() => {
|
|
21629
22047
|
return options.every((option) => option && option.icon && !option.label);
|
|
21630
22048
|
}, [options]);
|
|
21631
|
-
|
|
22049
|
+
useEffect22(() => {
|
|
21632
22050
|
const wrapperElement = wrapperRef.current;
|
|
21633
22051
|
const onScroll = () => {
|
|
21634
22052
|
if (!wrapperElement) {
|
|
@@ -21649,8 +22067,8 @@ var SegmentedControl = ({
|
|
|
21649
22067
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
21650
22068
|
};
|
|
21651
22069
|
}, []);
|
|
21652
|
-
return /* @__PURE__ */
|
|
21653
|
-
/* @__PURE__ */
|
|
22070
|
+
return /* @__PURE__ */ jsxs87("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
22071
|
+
/* @__PURE__ */ jsx130("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ jsx130(
|
|
21654
22072
|
"div",
|
|
21655
22073
|
{
|
|
21656
22074
|
css: [
|
|
@@ -21666,12 +22084,12 @@ var SegmentedControl = ({
|
|
|
21666
22084
|
}
|
|
21667
22085
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
21668
22086
|
const isDisabled = disabled2 || option.disabled;
|
|
21669
|
-
return /* @__PURE__ */
|
|
22087
|
+
return /* @__PURE__ */ jsx130(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx130(
|
|
21670
22088
|
"div",
|
|
21671
22089
|
{
|
|
21672
22090
|
css: segmentedControlItemStyles,
|
|
21673
22091
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
21674
|
-
children: /* @__PURE__ */
|
|
22092
|
+
children: /* @__PURE__ */ jsxs87(
|
|
21675
22093
|
"label",
|
|
21676
22094
|
{
|
|
21677
22095
|
css: [
|
|
@@ -21680,7 +22098,7 @@ var SegmentedControl = ({
|
|
|
21680
22098
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
21681
22099
|
],
|
|
21682
22100
|
children: [
|
|
21683
|
-
/* @__PURE__ */
|
|
22101
|
+
/* @__PURE__ */ jsx130(
|
|
21684
22102
|
"input",
|
|
21685
22103
|
{
|
|
21686
22104
|
css: segmentedControlInputStyles,
|
|
@@ -21692,10 +22110,10 @@ var SegmentedControl = ({
|
|
|
21692
22110
|
disabled: isDisabled
|
|
21693
22111
|
}
|
|
21694
22112
|
),
|
|
21695
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */
|
|
21696
|
-
/* @__PURE__ */
|
|
21697
|
-
!option.icon ? null : /* @__PURE__ */
|
|
21698
|
-
!text || hideOptionText ? null : /* @__PURE__ */
|
|
22113
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx130(CgCheck5, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
22114
|
+
/* @__PURE__ */ jsxs87("span", { css: segmentedControlLabelContentStyles, children: [
|
|
22115
|
+
!option.icon ? null : /* @__PURE__ */ jsx130(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
22116
|
+
!text || hideOptionText ? null : /* @__PURE__ */ jsx130("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
21699
22117
|
] })
|
|
21700
22118
|
]
|
|
21701
22119
|
}
|
|
@@ -21705,7 +22123,7 @@ var SegmentedControl = ({
|
|
|
21705
22123
|
})
|
|
21706
22124
|
}
|
|
21707
22125
|
) }),
|
|
21708
|
-
/* @__PURE__ */
|
|
22126
|
+
/* @__PURE__ */ jsx130(
|
|
21709
22127
|
"div",
|
|
21710
22128
|
{
|
|
21711
22129
|
css: [
|
|
@@ -21719,18 +22137,18 @@ var SegmentedControl = ({
|
|
|
21719
22137
|
};
|
|
21720
22138
|
|
|
21721
22139
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
21722
|
-
import { css as
|
|
22140
|
+
import { css as css100, keyframes as keyframes5 } from "@emotion/react";
|
|
21723
22141
|
var lightFadingOut = keyframes5`
|
|
21724
22142
|
from { opacity: 0.1; }
|
|
21725
22143
|
to { opacity: 0.025; }
|
|
21726
22144
|
`;
|
|
21727
|
-
var skeletonStyles =
|
|
22145
|
+
var skeletonStyles = css100`
|
|
21728
22146
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
21729
22147
|
background-color: var(--gray-900);
|
|
21730
22148
|
`;
|
|
21731
22149
|
|
|
21732
22150
|
// src/components/Skeleton/Skeleton.tsx
|
|
21733
|
-
import { jsx as
|
|
22151
|
+
import { jsx as jsx131 } from "@emotion/react/jsx-runtime";
|
|
21734
22152
|
var Skeleton = ({
|
|
21735
22153
|
width = "100%",
|
|
21736
22154
|
height = "1.25rem",
|
|
@@ -21738,7 +22156,7 @@ var Skeleton = ({
|
|
|
21738
22156
|
circle = false,
|
|
21739
22157
|
children,
|
|
21740
22158
|
...otherProps
|
|
21741
|
-
}) => /* @__PURE__ */
|
|
22159
|
+
}) => /* @__PURE__ */ jsx131(
|
|
21742
22160
|
"div",
|
|
21743
22161
|
{
|
|
21744
22162
|
css: [
|
|
@@ -21761,8 +22179,8 @@ var Skeleton = ({
|
|
|
21761
22179
|
import { forwardRef as forwardRef24 } from "react";
|
|
21762
22180
|
|
|
21763
22181
|
// src/components/Switch/Switch.styles.ts
|
|
21764
|
-
import { css as
|
|
21765
|
-
var SwitchInputContainer =
|
|
22182
|
+
import { css as css101 } from "@emotion/react";
|
|
22183
|
+
var SwitchInputContainer = css101`
|
|
21766
22184
|
cursor: pointer;
|
|
21767
22185
|
display: inline-block;
|
|
21768
22186
|
position: relative;
|
|
@@ -21771,7 +22189,7 @@ var SwitchInputContainer = css100`
|
|
|
21771
22189
|
vertical-align: middle;
|
|
21772
22190
|
user-select: none;
|
|
21773
22191
|
`;
|
|
21774
|
-
var SwitchInput = (size) =>
|
|
22192
|
+
var SwitchInput = (size) => css101`
|
|
21775
22193
|
appearance: none;
|
|
21776
22194
|
border-radius: var(--rounded-full);
|
|
21777
22195
|
background-color: var(--white);
|
|
@@ -21810,7 +22228,7 @@ var SwitchInput = (size) => css100`
|
|
|
21810
22228
|
cursor: not-allowed;
|
|
21811
22229
|
}
|
|
21812
22230
|
`;
|
|
21813
|
-
var SwitchInputDisabled =
|
|
22231
|
+
var SwitchInputDisabled = css101`
|
|
21814
22232
|
opacity: var(--opacity-50);
|
|
21815
22233
|
cursor: not-allowed;
|
|
21816
22234
|
|
|
@@ -21818,7 +22236,7 @@ var SwitchInputDisabled = css100`
|
|
|
21818
22236
|
cursor: not-allowed;
|
|
21819
22237
|
}
|
|
21820
22238
|
`;
|
|
21821
|
-
var SwitchInputLabel = (size) =>
|
|
22239
|
+
var SwitchInputLabel = (size) => css101`
|
|
21822
22240
|
align-items: center;
|
|
21823
22241
|
color: var(--typography-base);
|
|
21824
22242
|
display: inline-flex;
|
|
@@ -21840,32 +22258,32 @@ var SwitchInputLabel = (size) => css100`
|
|
|
21840
22258
|
top: 0;
|
|
21841
22259
|
}
|
|
21842
22260
|
`;
|
|
21843
|
-
var SwitchText = (size) =>
|
|
22261
|
+
var SwitchText = (size) => css101`
|
|
21844
22262
|
color: var(--gray-500);
|
|
21845
22263
|
font-size: var(--fs-sm);
|
|
21846
22264
|
padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
|
|
21847
22265
|
`;
|
|
21848
22266
|
|
|
21849
22267
|
// src/components/Switch/Switch.tsx
|
|
21850
|
-
import { Fragment as Fragment21, jsx as
|
|
22268
|
+
import { Fragment as Fragment21, jsx as jsx132, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
|
|
21851
22269
|
var Switch = forwardRef24(
|
|
21852
22270
|
({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
|
|
21853
22271
|
let additionalText = infoText;
|
|
21854
22272
|
if (infoText && toggleText) {
|
|
21855
22273
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
21856
22274
|
}
|
|
21857
|
-
return /* @__PURE__ */
|
|
21858
|
-
/* @__PURE__ */
|
|
22275
|
+
return /* @__PURE__ */ jsxs88(Fragment21, { children: [
|
|
22276
|
+
/* @__PURE__ */ jsxs88(
|
|
21859
22277
|
"label",
|
|
21860
22278
|
{
|
|
21861
22279
|
css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0],
|
|
21862
22280
|
children: [
|
|
21863
|
-
/* @__PURE__ */
|
|
21864
|
-
/* @__PURE__ */
|
|
22281
|
+
/* @__PURE__ */ jsx132("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
|
|
22282
|
+
/* @__PURE__ */ jsx132("span", { css: SwitchInputLabel(switchSize), children: label })
|
|
21865
22283
|
]
|
|
21866
22284
|
}
|
|
21867
22285
|
),
|
|
21868
|
-
additionalText ? /* @__PURE__ */
|
|
22286
|
+
additionalText ? /* @__PURE__ */ jsx132("p", { css: SwitchText(switchSize), children: additionalText }) : null,
|
|
21869
22287
|
children
|
|
21870
22288
|
] });
|
|
21871
22289
|
}
|
|
@@ -21875,8 +22293,8 @@ var Switch = forwardRef24(
|
|
|
21875
22293
|
import * as React24 from "react";
|
|
21876
22294
|
|
|
21877
22295
|
// src/components/Table/Table.styles.ts
|
|
21878
|
-
import { css as
|
|
21879
|
-
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) =>
|
|
22296
|
+
import { css as css102 } from "@emotion/react";
|
|
22297
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css102`
|
|
21880
22298
|
border-bottom: 1px solid var(--gray-400);
|
|
21881
22299
|
border-collapse: collapse;
|
|
21882
22300
|
min-width: 100%;
|
|
@@ -21896,54 +22314,54 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css101`
|
|
|
21896
22314
|
background-color: var(--gray-50);
|
|
21897
22315
|
}
|
|
21898
22316
|
`;
|
|
21899
|
-
var tableHead =
|
|
22317
|
+
var tableHead = css102`
|
|
21900
22318
|
color: var(--typography-base);
|
|
21901
22319
|
text-align: left;
|
|
21902
22320
|
`;
|
|
21903
|
-
var tableRow =
|
|
22321
|
+
var tableRow = css102`
|
|
21904
22322
|
border-bottom: 1px solid var(--gray-100);
|
|
21905
22323
|
`;
|
|
21906
|
-
var tableCellHead =
|
|
22324
|
+
var tableCellHead = css102`
|
|
21907
22325
|
font-size: var(--fs-sm);
|
|
21908
22326
|
text-transform: uppercase;
|
|
21909
22327
|
font-weight: var(--fw-bold);
|
|
21910
22328
|
`;
|
|
21911
22329
|
|
|
21912
22330
|
// src/components/Table/Table.tsx
|
|
21913
|
-
import { jsx as
|
|
22331
|
+
import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
|
|
21914
22332
|
var Table = React24.forwardRef(
|
|
21915
22333
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
21916
|
-
return /* @__PURE__ */
|
|
22334
|
+
return /* @__PURE__ */ jsx133("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
21917
22335
|
}
|
|
21918
22336
|
);
|
|
21919
22337
|
var TableHead = React24.forwardRef(
|
|
21920
22338
|
({ children, ...otherProps }, ref) => {
|
|
21921
|
-
return /* @__PURE__ */
|
|
22339
|
+
return /* @__PURE__ */ jsx133("thead", { ref, css: tableHead, ...otherProps, children });
|
|
21922
22340
|
}
|
|
21923
22341
|
);
|
|
21924
22342
|
var TableBody = React24.forwardRef(
|
|
21925
22343
|
({ children, ...otherProps }, ref) => {
|
|
21926
|
-
return /* @__PURE__ */
|
|
22344
|
+
return /* @__PURE__ */ jsx133("tbody", { ref, ...otherProps, children });
|
|
21927
22345
|
}
|
|
21928
22346
|
);
|
|
21929
22347
|
var TableFoot = React24.forwardRef(
|
|
21930
22348
|
({ children, ...otherProps }, ref) => {
|
|
21931
|
-
return /* @__PURE__ */
|
|
22349
|
+
return /* @__PURE__ */ jsx133("tfoot", { ref, ...otherProps, children });
|
|
21932
22350
|
}
|
|
21933
22351
|
);
|
|
21934
22352
|
var TableRow = React24.forwardRef(
|
|
21935
22353
|
({ children, ...otherProps }, ref) => {
|
|
21936
|
-
return /* @__PURE__ */
|
|
22354
|
+
return /* @__PURE__ */ jsx133("tr", { ref, css: tableRow, ...otherProps, children });
|
|
21937
22355
|
}
|
|
21938
22356
|
);
|
|
21939
22357
|
var TableCellHead = React24.forwardRef(
|
|
21940
22358
|
({ children, ...otherProps }, ref) => {
|
|
21941
|
-
return /* @__PURE__ */
|
|
22359
|
+
return /* @__PURE__ */ jsx133("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
21942
22360
|
}
|
|
21943
22361
|
);
|
|
21944
22362
|
var TableCellData = React24.forwardRef(
|
|
21945
22363
|
({ children, ...otherProps }, ref) => {
|
|
21946
|
-
return /* @__PURE__ */
|
|
22364
|
+
return /* @__PURE__ */ jsx133("td", { ref, ...otherProps, children });
|
|
21947
22365
|
}
|
|
21948
22366
|
);
|
|
21949
22367
|
|
|
@@ -21955,11 +22373,11 @@ import {
|
|
|
21955
22373
|
TabProvider as AriakitTabProvider,
|
|
21956
22374
|
useTabStore as useAriakitTabStore
|
|
21957
22375
|
} from "@ariakit/react";
|
|
21958
|
-
import { useCallback as
|
|
22376
|
+
import { useCallback as useCallback13, useEffect as useEffect23, useMemo as useMemo9 } from "react";
|
|
21959
22377
|
|
|
21960
22378
|
// src/components/Tabs/Tabs.styles.ts
|
|
21961
|
-
import { css as
|
|
21962
|
-
var tabButtonStyles =
|
|
22379
|
+
import { css as css103 } from "@emotion/react";
|
|
22380
|
+
var tabButtonStyles = css103`
|
|
21963
22381
|
align-items: center;
|
|
21964
22382
|
border: 0;
|
|
21965
22383
|
height: 2.5rem;
|
|
@@ -21976,14 +22394,14 @@ var tabButtonStyles = css102`
|
|
|
21976
22394
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
21977
22395
|
}
|
|
21978
22396
|
`;
|
|
21979
|
-
var tabButtonGroupStyles =
|
|
22397
|
+
var tabButtonGroupStyles = css103`
|
|
21980
22398
|
display: flex;
|
|
21981
22399
|
gap: var(--spacing-base);
|
|
21982
22400
|
border-bottom: 1px solid var(--gray-300);
|
|
21983
22401
|
`;
|
|
21984
22402
|
|
|
21985
22403
|
// src/components/Tabs/Tabs.tsx
|
|
21986
|
-
import { jsx as
|
|
22404
|
+
import { jsx as jsx134 } from "@emotion/react/jsx-runtime";
|
|
21987
22405
|
var useCurrentTab = () => {
|
|
21988
22406
|
const context = useAriakitTabStore();
|
|
21989
22407
|
if (!context) {
|
|
@@ -21999,12 +22417,12 @@ var Tabs = ({
|
|
|
21999
22417
|
manual,
|
|
22000
22418
|
...props
|
|
22001
22419
|
}) => {
|
|
22002
|
-
const selected =
|
|
22420
|
+
const selected = useMemo9(() => {
|
|
22003
22421
|
if (selectedId) return selectedId;
|
|
22004
22422
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
22005
22423
|
}, [selectedId, useHashForState]);
|
|
22006
22424
|
const tab = useAriakitTabStore({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
22007
|
-
const onTabSelect =
|
|
22425
|
+
const onTabSelect = useCallback13(
|
|
22008
22426
|
(value) => {
|
|
22009
22427
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
22010
22428
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -22015,33 +22433,33 @@ var Tabs = ({
|
|
|
22015
22433
|
},
|
|
22016
22434
|
[onSelectedIdChange, useHashForState]
|
|
22017
22435
|
);
|
|
22018
|
-
|
|
22436
|
+
useEffect23(() => {
|
|
22019
22437
|
if (selected && selected !== tab.getState().activeId) {
|
|
22020
22438
|
tab.setSelectedId(selected);
|
|
22021
22439
|
}
|
|
22022
22440
|
}, [selected, tab]);
|
|
22023
|
-
return /* @__PURE__ */
|
|
22441
|
+
return /* @__PURE__ */ jsx134(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
22024
22442
|
};
|
|
22025
22443
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
22026
|
-
return /* @__PURE__ */
|
|
22444
|
+
return /* @__PURE__ */ jsx134(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
|
|
22027
22445
|
};
|
|
22028
22446
|
var TabButton = ({
|
|
22029
22447
|
children,
|
|
22030
22448
|
id,
|
|
22031
22449
|
...props
|
|
22032
22450
|
}) => {
|
|
22033
|
-
return /* @__PURE__ */
|
|
22451
|
+
return /* @__PURE__ */ jsx134(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
22034
22452
|
};
|
|
22035
22453
|
var TabContent = ({
|
|
22036
22454
|
children,
|
|
22037
22455
|
...props
|
|
22038
22456
|
}) => {
|
|
22039
|
-
return /* @__PURE__ */
|
|
22457
|
+
return /* @__PURE__ */ jsx134(AriakitTabPanel, { ...props, children });
|
|
22040
22458
|
};
|
|
22041
22459
|
|
|
22042
22460
|
// src/components/Validation/StatusBullet.styles.ts
|
|
22043
|
-
import { css as
|
|
22044
|
-
var StatusBulletContainer =
|
|
22461
|
+
import { css as css104 } from "@emotion/react";
|
|
22462
|
+
var StatusBulletContainer = css104`
|
|
22045
22463
|
align-items: center;
|
|
22046
22464
|
align-self: center;
|
|
22047
22465
|
color: var(--gray-500);
|
|
@@ -22058,33 +22476,33 @@ var StatusBulletContainer = css103`
|
|
|
22058
22476
|
display: block;
|
|
22059
22477
|
}
|
|
22060
22478
|
`;
|
|
22061
|
-
var StatusBulletBase =
|
|
22479
|
+
var StatusBulletBase = css104`
|
|
22062
22480
|
font-size: var(--fs-sm);
|
|
22063
22481
|
&:before {
|
|
22064
22482
|
width: var(--fs-xs);
|
|
22065
22483
|
height: var(--fs-xs);
|
|
22066
22484
|
}
|
|
22067
22485
|
`;
|
|
22068
|
-
var StatusBulletSmall =
|
|
22486
|
+
var StatusBulletSmall = css104`
|
|
22069
22487
|
font-size: var(--fs-xs);
|
|
22070
22488
|
&:before {
|
|
22071
22489
|
width: var(--fs-xxs);
|
|
22072
22490
|
height: var(--fs-xxs);
|
|
22073
22491
|
}
|
|
22074
22492
|
`;
|
|
22075
|
-
var StatusDraft =
|
|
22493
|
+
var StatusDraft = css104`
|
|
22076
22494
|
&:before {
|
|
22077
22495
|
background: var(--white);
|
|
22078
22496
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22079
22497
|
}
|
|
22080
22498
|
`;
|
|
22081
|
-
var StatusModified =
|
|
22499
|
+
var StatusModified = css104`
|
|
22082
22500
|
&:before {
|
|
22083
22501
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
22084
22502
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22085
22503
|
}
|
|
22086
22504
|
`;
|
|
22087
|
-
var StatusError =
|
|
22505
|
+
var StatusError = css104`
|
|
22088
22506
|
color: var(--error);
|
|
22089
22507
|
&:before {
|
|
22090
22508
|
/* TODO: replace this with an svg icon */
|
|
@@ -22097,29 +22515,29 @@ var StatusError = css103`
|
|
|
22097
22515
|
);
|
|
22098
22516
|
}
|
|
22099
22517
|
`;
|
|
22100
|
-
var StatusPublished =
|
|
22518
|
+
var StatusPublished = css104`
|
|
22101
22519
|
&:before {
|
|
22102
22520
|
background: var(--accent-dark);
|
|
22103
22521
|
}
|
|
22104
22522
|
`;
|
|
22105
|
-
var StatusOrphan =
|
|
22523
|
+
var StatusOrphan = css104`
|
|
22106
22524
|
&:before {
|
|
22107
22525
|
background: var(--brand-secondary-5);
|
|
22108
22526
|
}
|
|
22109
22527
|
`;
|
|
22110
|
-
var StatusUnknown =
|
|
22528
|
+
var StatusUnknown = css104`
|
|
22111
22529
|
&:before {
|
|
22112
22530
|
background: var(--gray-800);
|
|
22113
22531
|
}
|
|
22114
22532
|
`;
|
|
22115
|
-
var StatusDeleted =
|
|
22533
|
+
var StatusDeleted = css104`
|
|
22116
22534
|
&:before {
|
|
22117
22535
|
background: var(--error);
|
|
22118
22536
|
}
|
|
22119
22537
|
`;
|
|
22120
22538
|
|
|
22121
22539
|
// src/components/Validation/StatusBullet.tsx
|
|
22122
|
-
import { jsx as
|
|
22540
|
+
import { jsx as jsx135 } from "@emotion/react/jsx-runtime";
|
|
22123
22541
|
var StatusBullet = ({
|
|
22124
22542
|
status,
|
|
22125
22543
|
hideText = false,
|
|
@@ -22139,7 +22557,7 @@ var StatusBullet = ({
|
|
|
22139
22557
|
Deleted: StatusDeleted
|
|
22140
22558
|
};
|
|
22141
22559
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
22142
|
-
return /* @__PURE__ */
|
|
22560
|
+
return /* @__PURE__ */ jsx135(
|
|
22143
22561
|
"span",
|
|
22144
22562
|
{
|
|
22145
22563
|
role: "status",
|
|
@@ -22215,6 +22633,7 @@ export {
|
|
|
22215
22633
|
IntegrationModalIcon,
|
|
22216
22634
|
IntegrationTile,
|
|
22217
22635
|
JsonEditor,
|
|
22636
|
+
KeyValueInput,
|
|
22218
22637
|
Label,
|
|
22219
22638
|
LabelLeadingIcon,
|
|
22220
22639
|
Legend,
|
|
@@ -22392,6 +22811,7 @@ export {
|
|
|
22392
22811
|
toast,
|
|
22393
22812
|
uniformComponentIcon,
|
|
22394
22813
|
uniformComponentPatternIcon,
|
|
22814
|
+
uniformCompositionPatternIcon,
|
|
22395
22815
|
uniformContentTypeIcon,
|
|
22396
22816
|
uniformEntryIcon,
|
|
22397
22817
|
uniformEntryPatternIcon,
|