@uniformdev/design-system 20.64.1-alpha.3 → 20.66.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 +370 -196
- package/dist/index.d.mts +20 -7
- package/dist/index.d.ts +20 -7
- package/dist/index.js +680 -502
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1533,6 +1533,7 @@ __export(src_exports, {
|
|
|
1533
1533
|
SliderLabels: () => SliderLabels,
|
|
1534
1534
|
Spinner: () => Spinner,
|
|
1535
1535
|
StackedModal: () => StackedModal,
|
|
1536
|
+
StackedModalHeader: () => StackedModalHeader,
|
|
1536
1537
|
StackedModalStep: () => StackedModalStep,
|
|
1537
1538
|
StatusBullet: () => StatusBullet,
|
|
1538
1539
|
SuccessMessage: () => SuccessMessage,
|
|
@@ -5111,18 +5112,11 @@ var linkButtonDisabled = import_react21.css`
|
|
|
5111
5112
|
pointer-events: none;
|
|
5112
5113
|
`;
|
|
5113
5114
|
var linkButtonTruncated = import_react21.css`
|
|
5114
|
-
|
|
5115
|
+
display: block;
|
|
5116
|
+
width: 100%;
|
|
5115
5117
|
overflow: hidden;
|
|
5116
5118
|
text-overflow: ellipsis;
|
|
5117
|
-
|
|
5118
|
-
display: inline-block;
|
|
5119
|
-
vertical-align: bottom;
|
|
5120
|
-
|
|
5121
|
-
/* Truncate over two lines */
|
|
5122
|
-
display: -webkit-box;
|
|
5123
|
-
-webkit-line-clamp: 1;
|
|
5124
|
-
-webkit-box-orient: vertical;
|
|
5125
|
-
white-space: normal;
|
|
5119
|
+
white-space: nowrap;
|
|
5126
5120
|
`;
|
|
5127
5121
|
|
|
5128
5122
|
// src/components/Button/LinkButton.tsx
|
|
@@ -6887,9 +6881,18 @@ var menuSelectSizeStyles = {
|
|
|
6887
6881
|
`
|
|
6888
6882
|
};
|
|
6889
6883
|
|
|
6884
|
+
// src/components/Menu/resolveMenuPlacement.ts
|
|
6885
|
+
init_emotion_jsx_shim();
|
|
6886
|
+
var legacyPlacements = ["auto", "auto-start", "auto-end"];
|
|
6887
|
+
function resolveMenuPlacement(placement, isNested) {
|
|
6888
|
+
const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
|
|
6889
|
+
const defaultSide = isNested ? "right" : "bottom";
|
|
6890
|
+
const defaultAlignment = isNested ? "start" : "end";
|
|
6891
|
+
return placementOverride ? parsePlacement(placementOverride) : { side: defaultSide, alignment: defaultAlignment };
|
|
6892
|
+
}
|
|
6893
|
+
|
|
6890
6894
|
// src/components/Menu/Menu.tsx
|
|
6891
6895
|
var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
|
|
6892
|
-
var legacyPlacements = ["auto", "auto-start", "auto-end"];
|
|
6893
6896
|
var MenuNestingContext = (0, import_react40.createContext)({ isNested: false });
|
|
6894
6897
|
var SubmenuTriggerModeContext = (0, import_react40.createContext)(false);
|
|
6895
6898
|
function useIsSubmenuTriggerMode() {
|
|
@@ -6921,10 +6924,7 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
6921
6924
|
const { isNested } = (0, import_react40.useContext)(MenuNestingContext);
|
|
6922
6925
|
const modalContainer = useModalPortalContainer();
|
|
6923
6926
|
const [inlineContainer, setInlineContainer] = (0, import_react40.useState)(null);
|
|
6924
|
-
const
|
|
6925
|
-
const defaultSide = isNested ? "right" : "bottom";
|
|
6926
|
-
const defaultAlignment = isNested ? "start" : "center";
|
|
6927
|
-
const { side, alignment } = placementOverride ? parsePlacement(placementOverride) : { side: defaultSide, alignment: defaultAlignment };
|
|
6927
|
+
const { side, alignment } = resolveMenuPlacement(placement, isNested);
|
|
6928
6928
|
const anchor = getAnchorRect ? {
|
|
6929
6929
|
getBoundingClientRect: () => {
|
|
6930
6930
|
var _a, _b, _c, _d;
|
|
@@ -11671,14 +11671,14 @@ var img = import_react98.css`
|
|
|
11671
11671
|
max-width: 100%;
|
|
11672
11672
|
max-height: 100%;
|
|
11673
11673
|
height: auto;
|
|
11674
|
-
opacity:
|
|
11674
|
+
opacity: 1;
|
|
11675
|
+
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
11675
11676
|
margin: 0 auto;
|
|
11676
11677
|
`;
|
|
11677
11678
|
var imgLoading = import_react98.css`
|
|
11678
11679
|
opacity: 0;
|
|
11679
11680
|
`;
|
|
11680
11681
|
var imgLoaded = import_react98.css`
|
|
11681
|
-
animation: ${fadeIn} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
11682
11682
|
opacity: 1;
|
|
11683
11683
|
`;
|
|
11684
11684
|
var brokenImage = import_react98.css`
|
|
@@ -11790,23 +11790,27 @@ function Image({
|
|
|
11790
11790
|
(0, import_react99.useEffect)(() => {
|
|
11791
11791
|
currentUpdateImageSrcRef.current();
|
|
11792
11792
|
}, [currentSrc]);
|
|
11793
|
-
const handleLoadEvent = () => {
|
|
11793
|
+
const handleLoadEvent = (event) => {
|
|
11794
11794
|
setLoadErrorText("");
|
|
11795
11795
|
if (currentSrc) {
|
|
11796
11796
|
setLoading(true);
|
|
11797
11797
|
}
|
|
11798
11798
|
const timer = setTimeout(() => {
|
|
11799
|
+
var _a;
|
|
11799
11800
|
setLoading(false);
|
|
11801
|
+
(_a = imgAttribs.onLoad) == null ? void 0 : _a.call(imgAttribs, event);
|
|
11800
11802
|
}, MIN_LOADING_MS);
|
|
11801
11803
|
return () => clearTimeout(timer);
|
|
11802
11804
|
};
|
|
11803
|
-
const handleErrorEvent = () => {
|
|
11805
|
+
const handleErrorEvent = (event) => {
|
|
11806
|
+
var _a;
|
|
11804
11807
|
if (tryFallback()) {
|
|
11805
11808
|
setLoading(true);
|
|
11806
11809
|
return;
|
|
11807
11810
|
}
|
|
11808
11811
|
setLoadErrorText("Image failed to load");
|
|
11809
11812
|
setLoading(false);
|
|
11813
|
+
(_a = imgAttribs.onError) == null ? void 0 : _a.call(imgAttribs, event);
|
|
11810
11814
|
};
|
|
11811
11815
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
11812
11816
|
"span",
|
|
@@ -14874,6 +14878,9 @@ var ObjectGridItemMediaInner = import_react132.css`
|
|
|
14874
14878
|
height: 100%;
|
|
14875
14879
|
z-index: 0;
|
|
14876
14880
|
`;
|
|
14881
|
+
var ObjectGridItemMediaOnlyInner = import_react132.css`
|
|
14882
|
+
border-radius: var(--rounded-base);
|
|
14883
|
+
`;
|
|
14877
14884
|
var ObjectGridItemContentWrapper = import_react132.css`
|
|
14878
14885
|
display: grid;
|
|
14879
14886
|
grid-template-columns: 1fr auto;
|
|
@@ -14915,6 +14922,7 @@ var ObjectGridItem2 = ({
|
|
|
14915
14922
|
const onStopPropagation = (e) => {
|
|
14916
14923
|
e.stopPropagation();
|
|
14917
14924
|
};
|
|
14925
|
+
const mediaOnly = !(header2 || children || rightSlot || menuItems);
|
|
14918
14926
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
14919
14927
|
"div",
|
|
14920
14928
|
{
|
|
@@ -14922,13 +14930,19 @@ var ObjectGridItem2 = ({
|
|
|
14922
14930
|
"aria-selected": isSelected,
|
|
14923
14931
|
...props,
|
|
14924
14932
|
children: [
|
|
14925
|
-
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { css: ObjectGridItemMediaWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14933
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { css: ObjectGridItemMediaWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
14934
|
+
"div",
|
|
14935
|
+
{
|
|
14936
|
+
css: [ObjectGridItemMediaInner, mediaOnly ? ObjectGridItemMediaOnlyInner : void 0],
|
|
14937
|
+
children: cover
|
|
14938
|
+
}
|
|
14939
|
+
) }),
|
|
14940
|
+
header2 || children || rightSlot || menuItems ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { css: ObjectGridItemContentWrapper, children: [
|
|
14941
|
+
header2 || children ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(VerticalRhythm, { gap: "0", css: ObjectGridItemInnerWrapper, children: [
|
|
14942
|
+
header2 ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }) : null,
|
|
14943
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { css: ObjectGridItemSubtitle, children }) : null
|
|
14944
|
+
] }) : null,
|
|
14945
|
+
rightSlot || menuItems ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
14932
14946
|
HorizontalRhythm,
|
|
14933
14947
|
{
|
|
14934
14948
|
gap: "xs",
|
|
@@ -14947,8 +14961,8 @@ var ObjectGridItem2 = ({
|
|
|
14947
14961
|
) : null
|
|
14948
14962
|
]
|
|
14949
14963
|
}
|
|
14950
|
-
)
|
|
14951
|
-
] })
|
|
14964
|
+
) : null
|
|
14965
|
+
] }) : null
|
|
14952
14966
|
]
|
|
14953
14967
|
}
|
|
14954
14968
|
);
|
|
@@ -15090,6 +15104,7 @@ var ObjectGridItemCoverButton = ({
|
|
|
15090
15104
|
isSelected,
|
|
15091
15105
|
onSelection,
|
|
15092
15106
|
selectedText = "selected",
|
|
15107
|
+
coverSlotBottomRight,
|
|
15093
15108
|
...props
|
|
15094
15109
|
}) => {
|
|
15095
15110
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
@@ -15106,7 +15121,7 @@ var ObjectGridItemCoverButton = ({
|
|
|
15106
15121
|
ObjectGridItemCover,
|
|
15107
15122
|
{
|
|
15108
15123
|
...props,
|
|
15109
|
-
coverSlotBottomRight: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) :
|
|
15124
|
+
coverSlotBottomRight: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : coverSlotBottomRight
|
|
15110
15125
|
}
|
|
15111
15126
|
)
|
|
15112
15127
|
}
|
|
@@ -15271,7 +15286,7 @@ var ObjectListItem = import_react137.css`
|
|
|
15271
15286
|
padding: var(--spacing-sm);
|
|
15272
15287
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
15273
15288
|
container-type: inline-size;
|
|
15274
|
-
grid-template-columns: minmax(0, auto) 1fr auto;
|
|
15289
|
+
grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
|
|
15275
15290
|
|
|
15276
15291
|
&[aria-selected='true'] {
|
|
15277
15292
|
background: var(--gray-50);
|
|
@@ -15295,6 +15310,21 @@ var ObjectListItemContentWrapper = import_react137.css`
|
|
|
15295
15310
|
gap: var(--spacing-sm);
|
|
15296
15311
|
justify-content: space-between;
|
|
15297
15312
|
flex-grow: 1;
|
|
15313
|
+
min-width: 0;
|
|
15314
|
+
`;
|
|
15315
|
+
var ObjectListItemTitleArea = import_react137.css`
|
|
15316
|
+
min-width: 0;
|
|
15317
|
+
overflow: hidden;
|
|
15318
|
+
`;
|
|
15319
|
+
var ObjectListItemTitleColumnContent = import_react137.css`
|
|
15320
|
+
flex: 1;
|
|
15321
|
+
min-width: 0;
|
|
15322
|
+
overflow: hidden;
|
|
15323
|
+
`;
|
|
15324
|
+
var objectListItemContentWrapperColumns = (minContainerQueryWidth, hasCover) => import_react137.css`
|
|
15325
|
+
${cq(minContainerQueryWidth)} {
|
|
15326
|
+
grid-template-columns: ${hasCover ? "minmax(0, auto) " : ""}minmax(0, 1fr) minmax(0, auto);
|
|
15327
|
+
}
|
|
15298
15328
|
`;
|
|
15299
15329
|
var ObjectListItemRightSlot = import_react137.css`
|
|
15300
15330
|
display: flex;
|
|
@@ -15438,36 +15468,44 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
15438
15468
|
{
|
|
15439
15469
|
css: [
|
|
15440
15470
|
ObjectListItemContentWrapper,
|
|
15441
|
-
|
|
15442
|
-
grid-template-columns: ${cover ? "minmax(0, auto)" : ""} minmax(0, 1fr) minmax(0, auto);
|
|
15443
|
-
}`,
|
|
15471
|
+
objectListItemContentWrapperColumns(minContainerQueryWidth, Boolean(cover)),
|
|
15444
15472
|
renderAs === "single" ? ObjectListItemSingle : null
|
|
15445
15473
|
],
|
|
15446
15474
|
children: [
|
|
15447
15475
|
cover ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
|
|
15448
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
"
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15476
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15477
|
+
HorizontalRhythm,
|
|
15478
|
+
{
|
|
15479
|
+
gap: "xs",
|
|
15480
|
+
align: renderAs === "multi" ? "flex-start" : "center",
|
|
15481
|
+
css: ObjectListItemTitleArea,
|
|
15482
|
+
children: [
|
|
15483
|
+
leftSlot ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(HorizontalRhythm, { gap: "xs", align: "baseline", children: leftSlot }) : null,
|
|
15484
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15485
|
+
VerticalRhythm,
|
|
15486
|
+
{
|
|
15487
|
+
gap: "0",
|
|
15488
|
+
justify: renderAs === "multi" ? "flex-start" : "center",
|
|
15489
|
+
"data-testid": "title-container",
|
|
15490
|
+
css: ObjectListItemTitleColumnContent,
|
|
15491
|
+
children: [
|
|
15492
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15493
|
+
HorizontalRhythm,
|
|
15494
|
+
{
|
|
15495
|
+
gap: "xs",
|
|
15496
|
+
align: renderAs === "multi" ? "flex-start" : "center",
|
|
15497
|
+
"data-testid": "title",
|
|
15498
|
+
css: ObjectListItemTitleArea,
|
|
15499
|
+
children: header2
|
|
15500
|
+
}
|
|
15501
|
+
),
|
|
15502
|
+
renderAs === "multi" ? props.children : null
|
|
15503
|
+
]
|
|
15504
|
+
}
|
|
15505
|
+
)
|
|
15506
|
+
]
|
|
15507
|
+
}
|
|
15508
|
+
),
|
|
15471
15509
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
|
|
15472
15510
|
]
|
|
15473
15511
|
}
|
|
@@ -15533,6 +15571,10 @@ var ObjectListItemHeading = import_react138.css`
|
|
|
15533
15571
|
display: flex;
|
|
15534
15572
|
flex-direction: column;
|
|
15535
15573
|
gap: var(--spacing-xs);
|
|
15574
|
+
width: 100%;
|
|
15575
|
+
min-width: 0;
|
|
15576
|
+
max-width: 100%;
|
|
15577
|
+
overflow: hidden;
|
|
15536
15578
|
|
|
15537
15579
|
${cq("34rem")} {
|
|
15538
15580
|
align-items: center;
|
|
@@ -15541,6 +15583,20 @@ var ObjectListItemHeading = import_react138.css`
|
|
|
15541
15583
|
`;
|
|
15542
15584
|
var ObjectListItemHeadingAfterWrapper = import_react138.css`
|
|
15543
15585
|
line-height: 1.25;
|
|
15586
|
+
min-width: 0;
|
|
15587
|
+
flex: 1;
|
|
15588
|
+
width: 100%;
|
|
15589
|
+
overflow: hidden;
|
|
15590
|
+
`;
|
|
15591
|
+
var ObjectListItemHeadingText = import_react138.css`
|
|
15592
|
+
flex: 1;
|
|
15593
|
+
min-width: 0;
|
|
15594
|
+
overflow: hidden;
|
|
15595
|
+
text-overflow: ellipsis;
|
|
15596
|
+
white-space: nowrap;
|
|
15597
|
+
`;
|
|
15598
|
+
var ObjectListItemHeadingAfterSlot = import_react138.css`
|
|
15599
|
+
flex-shrink: 0;
|
|
15544
15600
|
`;
|
|
15545
15601
|
|
|
15546
15602
|
// src/components/Objects/ObjectListItemHeading.tsx
|
|
@@ -15555,8 +15611,8 @@ var ObjectListItemHeading2 = ({
|
|
|
15555
15611
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: ObjectListItemHeading, ...props, children: [
|
|
15556
15612
|
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: beforeHeadingSlot }) : null,
|
|
15557
15613
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(HorizontalRhythm, { css: ObjectListItemHeadingAfterWrapper, gap: "xs", align: "flex-start", children: [
|
|
15558
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { role: "heading", "data-testid": headingTestId, children: heading }),
|
|
15559
|
-
afterHeadingSlot
|
|
15614
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { role: "heading", "data-testid": headingTestId, css: ObjectListItemHeadingText, children: heading }),
|
|
15615
|
+
afterHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { css: ObjectListItemHeadingAfterSlot, children: afterHeadingSlot }) : null
|
|
15560
15616
|
] })
|
|
15561
15617
|
] });
|
|
15562
15618
|
};
|
|
@@ -15570,6 +15626,11 @@ var import_react139 = require("@emotion/react");
|
|
|
15570
15626
|
var ObjectListSubText = import_react139.css`
|
|
15571
15627
|
color: var(--gray-500);
|
|
15572
15628
|
font-size: var(--fs-sm);
|
|
15629
|
+
min-width: 0;
|
|
15630
|
+
max-width: 100%;
|
|
15631
|
+
overflow: hidden;
|
|
15632
|
+
text-overflow: ellipsis;
|
|
15633
|
+
white-space: nowrap;
|
|
15573
15634
|
`;
|
|
15574
15635
|
|
|
15575
15636
|
// src/components/Objects/ObjectListSubText.tsx
|
|
@@ -15580,11 +15641,17 @@ var ObjectListSubText2 = ({ children, ...props }) => {
|
|
|
15580
15641
|
|
|
15581
15642
|
// src/components/Pagination/Pagination.tsx
|
|
15582
15643
|
init_emotion_jsx_shim();
|
|
15644
|
+
var React20 = __toESM(require("react"));
|
|
15583
15645
|
var import_react_paginate = __toESM(require("react-paginate"));
|
|
15584
15646
|
|
|
15585
15647
|
// src/components/Pagination/Pagniation.styles.ts
|
|
15586
15648
|
init_emotion_jsx_shim();
|
|
15587
15649
|
var import_css = require("@emotion/css");
|
|
15650
|
+
var wrapper = import_css.css`
|
|
15651
|
+
display: inline-flex;
|
|
15652
|
+
max-width: 100%;
|
|
15653
|
+
overflow-x: auto;
|
|
15654
|
+
`;
|
|
15588
15655
|
var container2 = import_css.css`
|
|
15589
15656
|
align-items: center;
|
|
15590
15657
|
display: flex;
|
|
@@ -15611,6 +15678,91 @@ var page = import_css.css`
|
|
|
15611
15678
|
margin-right: var(--spacing-xs);
|
|
15612
15679
|
`;
|
|
15613
15680
|
|
|
15681
|
+
// src/components/Pagination/usePaginationDisplayRange.ts
|
|
15682
|
+
init_emotion_jsx_shim();
|
|
15683
|
+
var import_react140 = require("react");
|
|
15684
|
+
var DEFAULT_PAGINATION_DISPLAY_RANGE = {
|
|
15685
|
+
marginPagesDisplayed: 2,
|
|
15686
|
+
pageRangeDisplayed: 5
|
|
15687
|
+
};
|
|
15688
|
+
var PREV_NEXT_WIDTH = 64;
|
|
15689
|
+
var BREAK_WIDTH = 28;
|
|
15690
|
+
var PAGE_PADDING = 32;
|
|
15691
|
+
var PAGE_MARGIN = 8;
|
|
15692
|
+
var DIGIT_WIDTH = 10;
|
|
15693
|
+
var WIDE_DISPLAY_RANGE = {
|
|
15694
|
+
marginPagesDisplayed: 2,
|
|
15695
|
+
pageRangeDisplayed: 5
|
|
15696
|
+
};
|
|
15697
|
+
var MEDIUM_DISPLAY_RANGE = {
|
|
15698
|
+
marginPagesDisplayed: 1,
|
|
15699
|
+
pageRangeDisplayed: 3
|
|
15700
|
+
};
|
|
15701
|
+
var COMPACT_DISPLAY_RANGE = {
|
|
15702
|
+
marginPagesDisplayed: 0,
|
|
15703
|
+
pageRangeDisplayed: 3
|
|
15704
|
+
};
|
|
15705
|
+
var MINIMAL_DISPLAY_RANGE = {
|
|
15706
|
+
marginPagesDisplayed: 0,
|
|
15707
|
+
pageRangeDisplayed: 1
|
|
15708
|
+
};
|
|
15709
|
+
function estimatePageButtonWidth(pageCount) {
|
|
15710
|
+
const digits = Math.max(1, String(pageCount).length);
|
|
15711
|
+
return PAGE_PADDING + PAGE_MARGIN + digits * DIGIT_WIDTH;
|
|
15712
|
+
}
|
|
15713
|
+
function getMinimumWidthForDisplayRange(pageCount, displayRange) {
|
|
15714
|
+
const pageButtonWidth = estimatePageButtonWidth(pageCount);
|
|
15715
|
+
const pageButtons = displayRange.marginPagesDisplayed * 2 + displayRange.pageRangeDisplayed;
|
|
15716
|
+
return pageButtons * pageButtonWidth + PREV_NEXT_WIDTH + BREAK_WIDTH * 2;
|
|
15717
|
+
}
|
|
15718
|
+
function getPaginationDisplayRange(containerWidth, pageCount) {
|
|
15719
|
+
if (containerWidth <= 0) {
|
|
15720
|
+
return MINIMAL_DISPLAY_RANGE;
|
|
15721
|
+
}
|
|
15722
|
+
if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, WIDE_DISPLAY_RANGE)) {
|
|
15723
|
+
return WIDE_DISPLAY_RANGE;
|
|
15724
|
+
}
|
|
15725
|
+
if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, MEDIUM_DISPLAY_RANGE)) {
|
|
15726
|
+
return MEDIUM_DISPLAY_RANGE;
|
|
15727
|
+
}
|
|
15728
|
+
if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, COMPACT_DISPLAY_RANGE)) {
|
|
15729
|
+
return COMPACT_DISPLAY_RANGE;
|
|
15730
|
+
}
|
|
15731
|
+
return MINIMAL_DISPLAY_RANGE;
|
|
15732
|
+
}
|
|
15733
|
+
function getAvailablePaginationWidth(container5) {
|
|
15734
|
+
var _a;
|
|
15735
|
+
const measurementElement = (_a = container5.parentElement) != null ? _a : container5;
|
|
15736
|
+
return measurementElement.getBoundingClientRect().width;
|
|
15737
|
+
}
|
|
15738
|
+
function usePaginationDisplayRange(containerRef, pageCount) {
|
|
15739
|
+
const [displayRange, setDisplayRange] = (0, import_react140.useState)(DEFAULT_PAGINATION_DISPLAY_RANGE);
|
|
15740
|
+
(0, import_react140.useEffect)(() => {
|
|
15741
|
+
var _a;
|
|
15742
|
+
const container5 = containerRef.current;
|
|
15743
|
+
if (!container5) {
|
|
15744
|
+
return;
|
|
15745
|
+
}
|
|
15746
|
+
const measurementElement = (_a = container5.parentElement) != null ? _a : container5;
|
|
15747
|
+
const updateDisplayRange = () => {
|
|
15748
|
+
const currentContainer = containerRef.current;
|
|
15749
|
+
if (!currentContainer) {
|
|
15750
|
+
return;
|
|
15751
|
+
}
|
|
15752
|
+
setDisplayRange(getPaginationDisplayRange(getAvailablePaginationWidth(currentContainer), pageCount));
|
|
15753
|
+
};
|
|
15754
|
+
updateDisplayRange();
|
|
15755
|
+
const observer = new ResizeObserver(() => {
|
|
15756
|
+
updateDisplayRange();
|
|
15757
|
+
});
|
|
15758
|
+
observer.observe(measurementElement);
|
|
15759
|
+
return () => {
|
|
15760
|
+
observer.disconnect();
|
|
15761
|
+
};
|
|
15762
|
+
}, [containerRef, pageCount]);
|
|
15763
|
+
return displayRange;
|
|
15764
|
+
}
|
|
15765
|
+
|
|
15614
15766
|
// src/components/Pagination/Pagination.tsx
|
|
15615
15767
|
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
15616
15768
|
function Pagination({
|
|
@@ -15619,15 +15771,14 @@ function Pagination({
|
|
|
15619
15771
|
total,
|
|
15620
15772
|
onPageChange
|
|
15621
15773
|
}) {
|
|
15622
|
-
|
|
15774
|
+
const containerRef = React20.useRef(null);
|
|
15775
|
+
const pageCount = limit >= 1 ? Math.ceil(total / limit) : 0;
|
|
15776
|
+
const currentPage = limit >= 1 ? Math.ceil(offset / limit) : 0;
|
|
15777
|
+
const { marginPagesDisplayed, pageRangeDisplayed } = usePaginationDisplayRange(containerRef, pageCount);
|
|
15778
|
+
if (limit < 1 || pageCount <= 1) {
|
|
15623
15779
|
return null;
|
|
15624
15780
|
}
|
|
15625
|
-
|
|
15626
|
-
const currentPage = Math.ceil(offset / limit);
|
|
15627
|
-
if (pageCount <= 1) {
|
|
15628
|
-
return null;
|
|
15629
|
-
}
|
|
15630
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
15781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { ref: containerRef, className: wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
15631
15782
|
import_react_paginate.default,
|
|
15632
15783
|
{
|
|
15633
15784
|
forcePage: currentPage,
|
|
@@ -15635,8 +15786,8 @@ function Pagination({
|
|
|
15635
15786
|
nextLabel: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: prevNextControls, children: ">" }),
|
|
15636
15787
|
breakLabel: "...",
|
|
15637
15788
|
pageCount,
|
|
15638
|
-
marginPagesDisplayed
|
|
15639
|
-
pageRangeDisplayed
|
|
15789
|
+
marginPagesDisplayed,
|
|
15790
|
+
pageRangeDisplayed,
|
|
15640
15791
|
onPageChange: ({ selected }) => {
|
|
15641
15792
|
onPageChange(limit, selected * limit);
|
|
15642
15793
|
},
|
|
@@ -15647,13 +15798,13 @@ function Pagination({
|
|
|
15647
15798
|
activeClassName: active,
|
|
15648
15799
|
pageClassName: page
|
|
15649
15800
|
}
|
|
15650
|
-
);
|
|
15801
|
+
) });
|
|
15651
15802
|
}
|
|
15652
15803
|
|
|
15653
15804
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
15654
15805
|
init_emotion_jsx_shim();
|
|
15655
|
-
var
|
|
15656
|
-
var ParameterShellContext = (0,
|
|
15806
|
+
var import_react141 = require("react");
|
|
15807
|
+
var ParameterShellContext = (0, import_react141.createContext)({
|
|
15657
15808
|
id: "",
|
|
15658
15809
|
label: "",
|
|
15659
15810
|
hiddenLabel: void 0,
|
|
@@ -15662,7 +15813,7 @@ var ParameterShellContext = (0, import_react140.createContext)({
|
|
|
15662
15813
|
}
|
|
15663
15814
|
});
|
|
15664
15815
|
var useParameterShell = () => {
|
|
15665
|
-
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
15816
|
+
const { id, label: label2, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react141.useContext)(ParameterShellContext);
|
|
15666
15817
|
return {
|
|
15667
15818
|
id,
|
|
15668
15819
|
label: label2,
|
|
@@ -15677,8 +15828,8 @@ init_emotion_jsx_shim();
|
|
|
15677
15828
|
|
|
15678
15829
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
15679
15830
|
init_emotion_jsx_shim();
|
|
15680
|
-
var
|
|
15681
|
-
var inputIconBtn =
|
|
15831
|
+
var import_react142 = require("@emotion/react");
|
|
15832
|
+
var inputIconBtn = import_react142.css`
|
|
15682
15833
|
align-items: center;
|
|
15683
15834
|
border: none;
|
|
15684
15835
|
border-radius: var(--rounded-base);
|
|
@@ -15743,12 +15894,12 @@ var LabelLeadingIcon = ({
|
|
|
15743
15894
|
|
|
15744
15895
|
// src/components/ParameterInputs/ParameterActionButton.tsx
|
|
15745
15896
|
init_emotion_jsx_shim();
|
|
15746
|
-
var
|
|
15897
|
+
var import_react144 = __toESM(require("react"));
|
|
15747
15898
|
|
|
15748
15899
|
// src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
|
|
15749
15900
|
init_emotion_jsx_shim();
|
|
15750
|
-
var
|
|
15751
|
-
var baseStyles =
|
|
15901
|
+
var import_react143 = require("@emotion/react");
|
|
15902
|
+
var baseStyles = import_react143.css`
|
|
15752
15903
|
--hover-color: var(--accent-dark-hover);
|
|
15753
15904
|
--active-color: var(--accent-dark-active);
|
|
15754
15905
|
border: 1px solid transparent;
|
|
@@ -15773,7 +15924,7 @@ var baseStyles = import_react142.css`
|
|
|
15773
15924
|
cursor: default;
|
|
15774
15925
|
}
|
|
15775
15926
|
`;
|
|
15776
|
-
var solidHoverStyles =
|
|
15927
|
+
var solidHoverStyles = import_react143.css`
|
|
15777
15928
|
--text-color: var(--typography-inverted);
|
|
15778
15929
|
&:hover,
|
|
15779
15930
|
&:focus,
|
|
@@ -15790,7 +15941,7 @@ var solidHoverStyles = import_react142.css`
|
|
|
15790
15941
|
color: var(--text-color);
|
|
15791
15942
|
}
|
|
15792
15943
|
`;
|
|
15793
|
-
var outlineHoverStyles =
|
|
15944
|
+
var outlineHoverStyles = import_react143.css`
|
|
15794
15945
|
--text-color: var(--typography-light);
|
|
15795
15946
|
&:hover:not([aria-disabled='true']),
|
|
15796
15947
|
&:focus:not([aria-disabled='true']),
|
|
@@ -15803,7 +15954,7 @@ var outlineHoverStyles = import_react142.css`
|
|
|
15803
15954
|
border-color: var(--active-color);
|
|
15804
15955
|
}
|
|
15805
15956
|
`;
|
|
15806
|
-
var invertedStyles =
|
|
15957
|
+
var invertedStyles = import_react143.css`
|
|
15807
15958
|
--text-color: var(--typography-inverted);
|
|
15808
15959
|
box-shadow: inset 0 0 0 1px transparent;
|
|
15809
15960
|
&:hover,
|
|
@@ -15848,7 +15999,7 @@ var ParameterActionButton = ({
|
|
|
15848
15999
|
children
|
|
15849
16000
|
}
|
|
15850
16001
|
);
|
|
15851
|
-
if (tooltip && (typeof tooltip === "string" ||
|
|
16002
|
+
if (tooltip && (typeof tooltip === "string" || import_react144.default.isValidElement(tooltip))) {
|
|
15852
16003
|
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Tooltip, { title: tooltip, ...tooltipProps, children: buttonElement });
|
|
15853
16004
|
}
|
|
15854
16005
|
return buttonElement;
|
|
@@ -15859,20 +16010,20 @@ init_emotion_jsx_shim();
|
|
|
15859
16010
|
|
|
15860
16011
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
15861
16012
|
init_emotion_jsx_shim();
|
|
15862
|
-
var
|
|
15863
|
-
var ParameterDrawerHeaderContainer =
|
|
16013
|
+
var import_react145 = require("@emotion/react");
|
|
16014
|
+
var ParameterDrawerHeaderContainer = import_react145.css`
|
|
15864
16015
|
align-items: center;
|
|
15865
16016
|
display: flex;
|
|
15866
16017
|
gap: var(--spacing-base);
|
|
15867
16018
|
justify-content: space-between;
|
|
15868
16019
|
margin-bottom: var(--spacing-sm);
|
|
15869
16020
|
`;
|
|
15870
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
16021
|
+
var ParameterDrawerHeaderTitleGroup = import_react145.css`
|
|
15871
16022
|
align-items: center;
|
|
15872
16023
|
display: flex;
|
|
15873
16024
|
gap: var(--spacing-sm);
|
|
15874
16025
|
`;
|
|
15875
|
-
var ParameterDrawerHeaderTitle =
|
|
16026
|
+
var ParameterDrawerHeaderTitle = import_react145.css`
|
|
15876
16027
|
text-overflow: ellipsis;
|
|
15877
16028
|
white-space: nowrap;
|
|
15878
16029
|
overflow: hidden;
|
|
@@ -15893,12 +16044,12 @@ var ParameterDrawerHeader = ({ title, iconBeforeTitle, children }) => {
|
|
|
15893
16044
|
|
|
15894
16045
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
15895
16046
|
init_emotion_jsx_shim();
|
|
15896
|
-
var
|
|
16047
|
+
var import_react147 = require("react");
|
|
15897
16048
|
|
|
15898
16049
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
15899
16050
|
init_emotion_jsx_shim();
|
|
15900
|
-
var
|
|
15901
|
-
var fieldsetStyles =
|
|
16051
|
+
var import_react146 = require("@emotion/react");
|
|
16052
|
+
var fieldsetStyles = import_react146.css`
|
|
15902
16053
|
&:disabled,
|
|
15903
16054
|
[readonly] {
|
|
15904
16055
|
input,
|
|
@@ -15913,7 +16064,7 @@ var fieldsetStyles = import_react145.css`
|
|
|
15913
16064
|
}
|
|
15914
16065
|
}
|
|
15915
16066
|
`;
|
|
15916
|
-
var fieldsetLegend2 =
|
|
16067
|
+
var fieldsetLegend2 = import_react146.css`
|
|
15917
16068
|
display: block;
|
|
15918
16069
|
font-weight: var(--fw-medium);
|
|
15919
16070
|
margin-bottom: var(--spacing-base);
|
|
@@ -15922,7 +16073,7 @@ var fieldsetLegend2 = import_react145.css`
|
|
|
15922
16073
|
|
|
15923
16074
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
15924
16075
|
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
15925
|
-
var ParameterGroup = (0,
|
|
16076
|
+
var ParameterGroup = (0, import_react147.forwardRef)(
|
|
15926
16077
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
15927
16078
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
15928
16079
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
@@ -15933,24 +16084,24 @@ var ParameterGroup = (0, import_react146.forwardRef)(
|
|
|
15933
16084
|
|
|
15934
16085
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
15935
16086
|
init_emotion_jsx_shim();
|
|
15936
|
-
var
|
|
16087
|
+
var import_react155 = require("react");
|
|
15937
16088
|
|
|
15938
16089
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
15939
16090
|
init_emotion_jsx_shim();
|
|
15940
|
-
var
|
|
16091
|
+
var import_react149 = require("react");
|
|
15941
16092
|
var import_react_dom2 = require("react-dom");
|
|
15942
16093
|
|
|
15943
16094
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
15944
16095
|
init_emotion_jsx_shim();
|
|
15945
|
-
var
|
|
15946
|
-
var previewWrapper =
|
|
16096
|
+
var import_react148 = require("@emotion/react");
|
|
16097
|
+
var previewWrapper = import_react148.css`
|
|
15947
16098
|
margin-top: var(--spacing-xs);
|
|
15948
16099
|
background: var(--gray-50);
|
|
15949
16100
|
padding: var(--spacing-sm);
|
|
15950
16101
|
border: solid 1px var(--gray-300);
|
|
15951
16102
|
border-radius: var(--rounded-sm);
|
|
15952
16103
|
`;
|
|
15953
|
-
var previewLink =
|
|
16104
|
+
var previewLink = import_react148.css`
|
|
15954
16105
|
display: block;
|
|
15955
16106
|
width: 100%;
|
|
15956
16107
|
|
|
@@ -15958,7 +16109,7 @@ var previewLink = import_react147.css`
|
|
|
15958
16109
|
max-height: 9rem;
|
|
15959
16110
|
}
|
|
15960
16111
|
`;
|
|
15961
|
-
var previewModalWrapper =
|
|
16112
|
+
var previewModalWrapper = import_react148.css`
|
|
15962
16113
|
background: var(--gray-50);
|
|
15963
16114
|
display: flex;
|
|
15964
16115
|
height: 100%;
|
|
@@ -15967,7 +16118,7 @@ var previewModalWrapper = import_react147.css`
|
|
|
15967
16118
|
border: solid 1px var(--gray-300);
|
|
15968
16119
|
border-radius: var(--rounded-sm);
|
|
15969
16120
|
`;
|
|
15970
|
-
var previewModalImage =
|
|
16121
|
+
var previewModalImage = import_react148.css`
|
|
15971
16122
|
display: flex;
|
|
15972
16123
|
height: 100%;
|
|
15973
16124
|
width: 100%;
|
|
@@ -15981,7 +16132,7 @@ var previewModalImage = import_react147.css`
|
|
|
15981
16132
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
15982
16133
|
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
15983
16134
|
function ParameterImagePreview({ imageSrc }) {
|
|
15984
|
-
const [showModal, setShowModal] = (0,
|
|
16135
|
+
const [showModal, setShowModal] = (0, import_react149.useState)(false);
|
|
15985
16136
|
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { css: previewWrapper, children: [
|
|
15986
16137
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
15987
16138
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
@@ -16014,16 +16165,16 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
16014
16165
|
|
|
16015
16166
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
16016
16167
|
init_emotion_jsx_shim();
|
|
16017
|
-
var
|
|
16018
|
-
var
|
|
16168
|
+
var import_react153 = require("@emotion/react");
|
|
16169
|
+
var import_react154 = require("react");
|
|
16019
16170
|
|
|
16020
16171
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
16021
16172
|
init_emotion_jsx_shim();
|
|
16022
16173
|
|
|
16023
16174
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
16024
16175
|
init_emotion_jsx_shim();
|
|
16025
|
-
var
|
|
16026
|
-
var actionBarVisibilityStyles =
|
|
16176
|
+
var import_react150 = require("@emotion/react");
|
|
16177
|
+
var actionBarVisibilityStyles = import_react150.css`
|
|
16027
16178
|
[data-action-bar] {
|
|
16028
16179
|
opacity: 1;
|
|
16029
16180
|
transform: translateX(0);
|
|
@@ -16032,14 +16183,14 @@ var actionBarVisibilityStyles = import_react149.css`
|
|
|
16032
16183
|
transform var(--duration-fast) var(--timing-ease-out);
|
|
16033
16184
|
}
|
|
16034
16185
|
`;
|
|
16035
|
-
var actionBarVisibilityHiddenStyles =
|
|
16186
|
+
var actionBarVisibilityHiddenStyles = import_react150.css`
|
|
16036
16187
|
opacity: 0;
|
|
16037
16188
|
transform: translateX(1rem);
|
|
16038
16189
|
transition:
|
|
16039
16190
|
opacity var(--duration-fast) var(--timing-ease-out),
|
|
16040
16191
|
transform var(--duration-fast) var(--timing-ease-out);
|
|
16041
16192
|
`;
|
|
16042
|
-
var inputContainer2 =
|
|
16193
|
+
var inputContainer2 = import_react150.css`
|
|
16043
16194
|
position: relative;
|
|
16044
16195
|
scroll-margin: var(--spacing-2xl);
|
|
16045
16196
|
|
|
@@ -16053,14 +16204,14 @@ var inputContainer2 = import_react149.css`
|
|
|
16053
16204
|
${actionBarVisibilityStyles}
|
|
16054
16205
|
}
|
|
16055
16206
|
`;
|
|
16056
|
-
var labelText2 =
|
|
16207
|
+
var labelText2 = import_react150.css`
|
|
16057
16208
|
align-items: center;
|
|
16058
16209
|
display: flex;
|
|
16059
16210
|
gap: var(--spacing-xs);
|
|
16060
16211
|
font-weight: var(--fw-regular);
|
|
16061
16212
|
margin: 0 0 var(--spacing-xs);
|
|
16062
16213
|
`;
|
|
16063
|
-
var input3 =
|
|
16214
|
+
var input3 = import_react150.css`
|
|
16064
16215
|
display: block;
|
|
16065
16216
|
appearance: none;
|
|
16066
16217
|
box-sizing: border-box;
|
|
@@ -16113,18 +16264,18 @@ var input3 = import_react149.css`
|
|
|
16113
16264
|
opacity: var(--opacity-50);
|
|
16114
16265
|
}
|
|
16115
16266
|
`;
|
|
16116
|
-
var selectInput =
|
|
16267
|
+
var selectInput = import_react150.css`
|
|
16117
16268
|
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");
|
|
16118
16269
|
background-position: right var(--spacing-sm) center;
|
|
16119
16270
|
background-repeat: no-repeat;
|
|
16120
16271
|
background-size: 1rem;
|
|
16121
16272
|
padding-right: var(--spacing-xl);
|
|
16122
16273
|
`;
|
|
16123
|
-
var inputWrapper =
|
|
16274
|
+
var inputWrapper = import_react150.css`
|
|
16124
16275
|
display: flex; // used to correct overflow with chrome textarea
|
|
16125
16276
|
position: relative;
|
|
16126
16277
|
`;
|
|
16127
|
-
var inputIcon2 =
|
|
16278
|
+
var inputIcon2 = import_react150.css`
|
|
16128
16279
|
align-items: center;
|
|
16129
16280
|
background: var(--white);
|
|
16130
16281
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -16140,7 +16291,7 @@ var inputIcon2 = import_react149.css`
|
|
|
16140
16291
|
width: var(--spacing-lg);
|
|
16141
16292
|
z-index: var(--z-10);
|
|
16142
16293
|
`;
|
|
16143
|
-
var inputToggleLabel2 =
|
|
16294
|
+
var inputToggleLabel2 = import_react150.css`
|
|
16144
16295
|
--inline-label-color: var(--typography-base);
|
|
16145
16296
|
align-items: center;
|
|
16146
16297
|
cursor: pointer;
|
|
@@ -16155,7 +16306,7 @@ var inputToggleLabel2 = import_react149.css`
|
|
|
16155
16306
|
--inline-label-color: var(--gray-400);
|
|
16156
16307
|
}
|
|
16157
16308
|
`;
|
|
16158
|
-
var toggleInput2 =
|
|
16309
|
+
var toggleInput2 = import_react150.css`
|
|
16159
16310
|
appearance: none;
|
|
16160
16311
|
border: 1px solid var(--gray-200);
|
|
16161
16312
|
background: var(--white);
|
|
@@ -16199,7 +16350,7 @@ var toggleInput2 = import_react149.css`
|
|
|
16199
16350
|
border-color: var(--gray-200);
|
|
16200
16351
|
}
|
|
16201
16352
|
`;
|
|
16202
|
-
var toggleInputIndeterminateState =
|
|
16353
|
+
var toggleInputIndeterminateState = import_react150.css`
|
|
16203
16354
|
&:indeterminate,
|
|
16204
16355
|
&:indeterminate:hover,
|
|
16205
16356
|
&:indeterminate:focus {
|
|
@@ -16210,7 +16361,7 @@ var toggleInputIndeterminateState = import_react149.css`
|
|
|
16210
16361
|
color: var(--accent-dark-active);
|
|
16211
16362
|
}
|
|
16212
16363
|
`;
|
|
16213
|
-
var inlineLabel2 =
|
|
16364
|
+
var inlineLabel2 = import_react150.css`
|
|
16214
16365
|
color: var(--inline-label-color);
|
|
16215
16366
|
padding-left: var(--spacing-md);
|
|
16216
16367
|
font-size: var(--fs-sm);
|
|
@@ -16227,7 +16378,7 @@ var inlineLabel2 = import_react149.css`
|
|
|
16227
16378
|
}
|
|
16228
16379
|
}
|
|
16229
16380
|
`;
|
|
16230
|
-
var inputMenu =
|
|
16381
|
+
var inputMenu = import_react150.css`
|
|
16231
16382
|
background: none;
|
|
16232
16383
|
border: none;
|
|
16233
16384
|
padding: var(--spacing-2xs);
|
|
@@ -16241,12 +16392,12 @@ var inputMenu = import_react149.css`
|
|
|
16241
16392
|
cursor: default;
|
|
16242
16393
|
}
|
|
16243
16394
|
`;
|
|
16244
|
-
var inputActionItems =
|
|
16395
|
+
var inputActionItems = import_react150.css`
|
|
16245
16396
|
display: flex;
|
|
16246
16397
|
z-index: var(--z-1);
|
|
16247
16398
|
${actionBarVisibilityHiddenStyles}
|
|
16248
16399
|
`;
|
|
16249
|
-
var inputMenuHover =
|
|
16400
|
+
var inputMenuHover = import_react150.css`
|
|
16250
16401
|
opacity: var(--opacity-50);
|
|
16251
16402
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
16252
16403
|
margin-top: 0.25rem;
|
|
@@ -16258,11 +16409,11 @@ var inputMenuHover = import_react149.css`
|
|
|
16258
16409
|
background-color: var(--gray-200);
|
|
16259
16410
|
}
|
|
16260
16411
|
`;
|
|
16261
|
-
var textarea2 =
|
|
16412
|
+
var textarea2 = import_react150.css`
|
|
16262
16413
|
resize: vertical;
|
|
16263
16414
|
min-height: 2rem;
|
|
16264
16415
|
`;
|
|
16265
|
-
var dataConnectButton =
|
|
16416
|
+
var dataConnectButton = import_react150.css`
|
|
16266
16417
|
align-items: center;
|
|
16267
16418
|
appearance: none;
|
|
16268
16419
|
box-sizing: border-box;
|
|
@@ -16298,7 +16449,7 @@ var dataConnectButton = import_react149.css`
|
|
|
16298
16449
|
pointer-events: none;
|
|
16299
16450
|
}
|
|
16300
16451
|
`;
|
|
16301
|
-
var linkParameterEmptyContainer =
|
|
16452
|
+
var linkParameterEmptyContainer = import_react150.css`
|
|
16302
16453
|
box-sizing: border-box;
|
|
16303
16454
|
background: var(--white);
|
|
16304
16455
|
border: 1px solid var(--gray-200);
|
|
@@ -16310,7 +16461,7 @@ var linkParameterEmptyContainer = import_react149.css`
|
|
|
16310
16461
|
min-height: 2rem;
|
|
16311
16462
|
width: 100%;
|
|
16312
16463
|
`;
|
|
16313
|
-
var linkParameterControls =
|
|
16464
|
+
var linkParameterControls = import_react150.css`
|
|
16314
16465
|
position: absolute;
|
|
16315
16466
|
inset: 0 0 0 auto;
|
|
16316
16467
|
padding: 0 var(--spacing-base);
|
|
@@ -16319,7 +16470,7 @@ var linkParameterControls = import_react149.css`
|
|
|
16319
16470
|
justify-content: center;
|
|
16320
16471
|
gap: var(--spacing-base);
|
|
16321
16472
|
`;
|
|
16322
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
16473
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react150.css`
|
|
16323
16474
|
padding-right: calc(
|
|
16324
16475
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
16325
16476
|
var(--spacing-base)
|
|
@@ -16332,7 +16483,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react149.css`
|
|
|
16332
16483
|
}
|
|
16333
16484
|
}
|
|
16334
16485
|
`;
|
|
16335
|
-
var linkParameterIcon =
|
|
16486
|
+
var linkParameterIcon = import_react150.css`
|
|
16336
16487
|
align-items: center;
|
|
16337
16488
|
color: var(--primary-action-default);
|
|
16338
16489
|
display: flex;
|
|
@@ -16358,9 +16509,9 @@ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
|
16358
16509
|
|
|
16359
16510
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
16360
16511
|
init_emotion_jsx_shim();
|
|
16361
|
-
var
|
|
16512
|
+
var import_react151 = require("react");
|
|
16362
16513
|
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
16363
|
-
var ParameterMenuButton = (0,
|
|
16514
|
+
var ParameterMenuButton = (0, import_react151.forwardRef)(
|
|
16364
16515
|
({ label: label2, children, disabled: disabled2, withoutPortal }, ref) => {
|
|
16365
16516
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16366
16517
|
Menu,
|
|
@@ -16388,14 +16539,14 @@ var ParameterMenuButton = (0, import_react150.forwardRef)(
|
|
|
16388
16539
|
|
|
16389
16540
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
16390
16541
|
init_emotion_jsx_shim();
|
|
16391
|
-
var
|
|
16392
|
-
var emptyParameterShell =
|
|
16542
|
+
var import_react152 = require("@emotion/react");
|
|
16543
|
+
var emptyParameterShell = import_react152.css`
|
|
16393
16544
|
border-radius: var(--rounded-sm);
|
|
16394
16545
|
flex-grow: 1;
|
|
16395
16546
|
position: relative;
|
|
16396
16547
|
max-width: 100%;
|
|
16397
16548
|
`;
|
|
16398
|
-
var emptyParameterShellText =
|
|
16549
|
+
var emptyParameterShellText = import_react152.css`
|
|
16399
16550
|
background: var(--brand-secondary-6);
|
|
16400
16551
|
border-radius: var(--rounded-sm);
|
|
16401
16552
|
padding: var(--spacing-sm);
|
|
@@ -16403,7 +16554,7 @@ var emptyParameterShellText = import_react151.css`
|
|
|
16403
16554
|
font-size: var(--fs-sm);
|
|
16404
16555
|
margin: 0;
|
|
16405
16556
|
`;
|
|
16406
|
-
var overrideMarker =
|
|
16557
|
+
var overrideMarker = import_react152.css`
|
|
16407
16558
|
border-radius: var(--rounded-sm);
|
|
16408
16559
|
border: 10px solid var(--gray-300);
|
|
16409
16560
|
border-left-color: transparent;
|
|
@@ -16475,7 +16626,7 @@ var ParameterShell = ({
|
|
|
16475
16626
|
menuWithoutPortal,
|
|
16476
16627
|
...props
|
|
16477
16628
|
}) => {
|
|
16478
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
16629
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react154.useState)(void 0);
|
|
16479
16630
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
16480
16631
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
16481
16632
|
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -16497,7 +16648,7 @@ var ParameterShell = ({
|
|
|
16497
16648
|
css: [
|
|
16498
16649
|
inputMenu,
|
|
16499
16650
|
inputActionItems,
|
|
16500
|
-
menuItems ?
|
|
16651
|
+
menuItems ? import_react153.css`
|
|
16501
16652
|
right: var(--spacing-md);
|
|
16502
16653
|
` : void 0
|
|
16503
16654
|
],
|
|
@@ -16556,7 +16707,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
16556
16707
|
|
|
16557
16708
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
16558
16709
|
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
16559
|
-
var ParameterImage = (0,
|
|
16710
|
+
var ParameterImage = (0, import_react155.forwardRef)(
|
|
16560
16711
|
({ children, ...props }, ref) => {
|
|
16561
16712
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16562
16713
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -16565,10 +16716,10 @@ var ParameterImage = (0, import_react154.forwardRef)(
|
|
|
16565
16716
|
] });
|
|
16566
16717
|
}
|
|
16567
16718
|
);
|
|
16568
|
-
var ParameterImageInner = (0,
|
|
16719
|
+
var ParameterImageInner = (0, import_react155.forwardRef)((props, ref) => {
|
|
16569
16720
|
const { value } = props;
|
|
16570
16721
|
const { id, label: label2, hiddenLabel, errorMessage } = useParameterShell();
|
|
16571
|
-
const deferredValue = (0,
|
|
16722
|
+
const deferredValue = (0, import_react155.useDeferredValue)(value);
|
|
16572
16723
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
16573
16724
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
16574
16725
|
"input",
|
|
@@ -16588,13 +16739,13 @@ var ParameterImageInner = (0, import_react154.forwardRef)((props, ref) => {
|
|
|
16588
16739
|
|
|
16589
16740
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
16590
16741
|
init_emotion_jsx_shim();
|
|
16591
|
-
var
|
|
16742
|
+
var import_react156 = require("react");
|
|
16592
16743
|
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
16593
|
-
var ParameterInput = (0,
|
|
16744
|
+
var ParameterInput = (0, import_react156.forwardRef)((props, ref) => {
|
|
16594
16745
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16595
16746
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
16596
16747
|
});
|
|
16597
|
-
var ParameterInputInner = (0,
|
|
16748
|
+
var ParameterInputInner = (0, import_react156.forwardRef)(({ enableMouseWheel = false, ...props }, ref) => {
|
|
16598
16749
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16599
16750
|
const isNumberInputAndMouseWheelDisabled = enableMouseWheel !== true && props.type === "number";
|
|
16600
16751
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
@@ -16614,7 +16765,7 @@ var ParameterInputInner = (0, import_react155.forwardRef)(({ enableMouseWheel =
|
|
|
16614
16765
|
|
|
16615
16766
|
// src/components/ParameterInputs/ParameterLabels.tsx
|
|
16616
16767
|
init_emotion_jsx_shim();
|
|
16617
|
-
var
|
|
16768
|
+
var import_react157 = require("react");
|
|
16618
16769
|
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
16619
16770
|
var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
|
|
16620
16771
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
@@ -16676,18 +16827,18 @@ var ParameterLabelsInner = (props) => {
|
|
|
16676
16827
|
var _a;
|
|
16677
16828
|
const { label: label2 } = useParameterShell();
|
|
16678
16829
|
const { onChange } = props;
|
|
16679
|
-
const containerRef = (0,
|
|
16680
|
-
const hasPositionedRef = (0,
|
|
16681
|
-
const selectedValues = (0,
|
|
16830
|
+
const containerRef = (0, import_react157.useRef)(null);
|
|
16831
|
+
const hasPositionedRef = (0, import_react157.useRef)(false);
|
|
16832
|
+
const selectedValues = (0, import_react157.useMemo)(
|
|
16682
16833
|
() => {
|
|
16683
16834
|
var _a2, _b;
|
|
16684
16835
|
return (_b = (_a2 = props.value) != null ? _a2 : props.defaultValue) != null ? _b : [];
|
|
16685
16836
|
},
|
|
16686
16837
|
[props.value, props.defaultValue]
|
|
16687
16838
|
);
|
|
16688
|
-
const items = (0,
|
|
16689
|
-
const optionsMap = (0,
|
|
16690
|
-
const selectedIds = (0,
|
|
16839
|
+
const items = (0, import_react157.useMemo)(() => convertOptionsToItems(props.options), [props.options]);
|
|
16840
|
+
const optionsMap = (0, import_react157.useMemo)(() => createOptionsMap(props.options), [props.options]);
|
|
16841
|
+
const selectedIds = (0, import_react157.useMemo)(() => {
|
|
16691
16842
|
if (!Array.isArray(selectedValues)) {
|
|
16692
16843
|
return /* @__PURE__ */ new Set();
|
|
16693
16844
|
}
|
|
@@ -16779,9 +16930,9 @@ var ParameterLabelsInner = (props) => {
|
|
|
16779
16930
|
|
|
16780
16931
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
16781
16932
|
init_emotion_jsx_shim();
|
|
16782
|
-
var
|
|
16933
|
+
var import_react158 = require("react");
|
|
16783
16934
|
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
16784
|
-
var ParameterLink = (0,
|
|
16935
|
+
var ParameterLink = (0, import_react158.forwardRef)(
|
|
16785
16936
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
16786
16937
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
16787
16938
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
@@ -16805,7 +16956,7 @@ var ParameterLink = (0, import_react157.forwardRef)(
|
|
|
16805
16956
|
);
|
|
16806
16957
|
}
|
|
16807
16958
|
);
|
|
16808
|
-
var ParameterLinkInner = (0,
|
|
16959
|
+
var ParameterLinkInner = (0, import_react158.forwardRef)(
|
|
16809
16960
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
16810
16961
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
16811
16962
|
if (!props.value)
|
|
@@ -16991,24 +17142,24 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
16991
17142
|
|
|
16992
17143
|
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
16993
17144
|
init_emotion_jsx_shim();
|
|
16994
|
-
var
|
|
17145
|
+
var import_react162 = require("react");
|
|
16995
17146
|
|
|
16996
17147
|
// src/components/Slider/index.ts
|
|
16997
17148
|
init_emotion_jsx_shim();
|
|
16998
17149
|
|
|
16999
17150
|
// src/components/Slider/Slider.tsx
|
|
17000
17151
|
init_emotion_jsx_shim();
|
|
17001
|
-
var
|
|
17152
|
+
var import_react161 = require("react");
|
|
17002
17153
|
|
|
17003
17154
|
// src/components/Slider/SliderLabels.tsx
|
|
17004
17155
|
init_emotion_jsx_shim();
|
|
17005
|
-
var
|
|
17156
|
+
var import_react160 = require("react");
|
|
17006
17157
|
|
|
17007
17158
|
// src/components/Slider/styles/Slider.styles.ts
|
|
17008
17159
|
init_emotion_jsx_shim();
|
|
17009
|
-
var
|
|
17160
|
+
var import_react159 = require("@emotion/react");
|
|
17010
17161
|
var thumbSize = "20px";
|
|
17011
|
-
var disabledThumbStyles =
|
|
17162
|
+
var disabledThumbStyles = import_react159.css`
|
|
17012
17163
|
background: var(--white);
|
|
17013
17164
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cline x1='4' y1='9' x2='16' y2='9' stroke='%236b7280' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
17014
17165
|
background-repeat: no-repeat;
|
|
@@ -17016,22 +17167,22 @@ var disabledThumbStyles = import_react158.css`
|
|
|
17016
17167
|
background-size: 12px 12px;
|
|
17017
17168
|
border: 1px solid var(--gray-500);
|
|
17018
17169
|
`;
|
|
17019
|
-
var container3 =
|
|
17170
|
+
var container3 = import_react159.css`
|
|
17020
17171
|
display: flex;
|
|
17021
17172
|
align-items: flex-start;
|
|
17022
17173
|
gap: var(--spacing-base);
|
|
17023
17174
|
width: 100%;
|
|
17024
17175
|
`;
|
|
17025
|
-
var sliderContainer =
|
|
17176
|
+
var sliderContainer = import_react159.css`
|
|
17026
17177
|
flex: 1;
|
|
17027
17178
|
display: flex;
|
|
17028
17179
|
flex-direction: column;
|
|
17029
17180
|
`;
|
|
17030
|
-
var sliderTrackContainer =
|
|
17181
|
+
var sliderTrackContainer = import_react159.css`
|
|
17031
17182
|
position: relative;
|
|
17032
17183
|
padding: var(--spacing-xs) 0;
|
|
17033
17184
|
`;
|
|
17034
|
-
var progressTrack =
|
|
17185
|
+
var progressTrack = import_react159.css`
|
|
17035
17186
|
position: absolute;
|
|
17036
17187
|
top: 50%;
|
|
17037
17188
|
left: 0;
|
|
@@ -17041,7 +17192,7 @@ var progressTrack = import_react158.css`
|
|
|
17041
17192
|
margin-top: -3px;
|
|
17042
17193
|
border-radius: var(--rounded-sm);
|
|
17043
17194
|
`;
|
|
17044
|
-
var progressTrackBackground =
|
|
17195
|
+
var progressTrackBackground = import_react159.css`
|
|
17045
17196
|
position: absolute;
|
|
17046
17197
|
top: 0;
|
|
17047
17198
|
left: 0;
|
|
@@ -17051,7 +17202,7 @@ var progressTrackBackground = import_react158.css`
|
|
|
17051
17202
|
border: 1px solid var(--gray-200);
|
|
17052
17203
|
border-radius: var(--rounded-sm);
|
|
17053
17204
|
`;
|
|
17054
|
-
var progressTrackFill =
|
|
17205
|
+
var progressTrackFill = import_react159.css`
|
|
17055
17206
|
position: absolute;
|
|
17056
17207
|
top: 0;
|
|
17057
17208
|
left: 0;
|
|
@@ -17059,19 +17210,19 @@ var progressTrackFill = import_react158.css`
|
|
|
17059
17210
|
background: var(--accent-light);
|
|
17060
17211
|
border-radius: var(--rounded-sm);
|
|
17061
17212
|
`;
|
|
17062
|
-
var tickMarksContainer =
|
|
17213
|
+
var tickMarksContainer = import_react159.css`
|
|
17063
17214
|
position: relative;
|
|
17064
17215
|
height: 1rem;
|
|
17065
17216
|
margin-top: calc(-1 * var(--spacing-base) + var(--spacing-xs));
|
|
17066
17217
|
`;
|
|
17067
|
-
var tickMark =
|
|
17218
|
+
var tickMark = import_react159.css`
|
|
17068
17219
|
position: absolute;
|
|
17069
17220
|
top: 0;
|
|
17070
17221
|
width: 0.5px;
|
|
17071
17222
|
height: 8px;
|
|
17072
17223
|
background-color: var(--gray-300);
|
|
17073
17224
|
`;
|
|
17074
|
-
var largeTickMark =
|
|
17225
|
+
var largeTickMark = import_react159.css`
|
|
17075
17226
|
position: absolute;
|
|
17076
17227
|
top: 0;
|
|
17077
17228
|
width: 1px;
|
|
@@ -17079,7 +17230,7 @@ var largeTickMark = import_react158.css`
|
|
|
17079
17230
|
background-color: var(--gray-400);
|
|
17080
17231
|
transform: translateX(-50%);
|
|
17081
17232
|
`;
|
|
17082
|
-
var slider =
|
|
17233
|
+
var slider = import_react159.css`
|
|
17083
17234
|
appearance: none;
|
|
17084
17235
|
width: 100%;
|
|
17085
17236
|
width: calc(100% + ${thumbSize});
|
|
@@ -17196,12 +17347,12 @@ var slider = import_react158.css`
|
|
|
17196
17347
|
0 0 0 3px var(--accent-light);
|
|
17197
17348
|
}
|
|
17198
17349
|
`;
|
|
17199
|
-
var labelsContainer =
|
|
17350
|
+
var labelsContainer = import_react159.css`
|
|
17200
17351
|
position: relative;
|
|
17201
17352
|
height: 1.5rem;
|
|
17202
17353
|
width: 100%;
|
|
17203
17354
|
`;
|
|
17204
|
-
var label =
|
|
17355
|
+
var label = import_react159.css`
|
|
17205
17356
|
position: absolute;
|
|
17206
17357
|
top: 0;
|
|
17207
17358
|
font-size: var(--text-sm);
|
|
@@ -17245,12 +17396,12 @@ var label = import_react158.css`
|
|
|
17245
17396
|
max-width: 100%;
|
|
17246
17397
|
}
|
|
17247
17398
|
`;
|
|
17248
|
-
var numberInputContainer =
|
|
17399
|
+
var numberInputContainer = import_react159.css`
|
|
17249
17400
|
flex-shrink: 0;
|
|
17250
17401
|
min-width: 2rem;
|
|
17251
17402
|
margin-top: var(--spacing-sm);
|
|
17252
17403
|
`;
|
|
17253
|
-
var numberInput2 =
|
|
17404
|
+
var numberInput2 = import_react159.css`
|
|
17254
17405
|
appearance: none;
|
|
17255
17406
|
background-color: var(--white);
|
|
17256
17407
|
border: 1px solid var(--gray-200);
|
|
@@ -17428,9 +17579,9 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
|
|
|
17428
17579
|
}));
|
|
17429
17580
|
}
|
|
17430
17581
|
function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
17431
|
-
const containerRef = (0,
|
|
17432
|
-
const [measuredWidth, setMeasuredWidth] = (0,
|
|
17433
|
-
(0,
|
|
17582
|
+
const containerRef = (0, import_react160.useRef)(null);
|
|
17583
|
+
const [measuredWidth, setMeasuredWidth] = (0, import_react160.useState)(containerWidth);
|
|
17584
|
+
(0, import_react160.useEffect)(() => {
|
|
17434
17585
|
if (containerRef.current) {
|
|
17435
17586
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
17436
17587
|
for (const entry of entries) {
|
|
@@ -17467,7 +17618,7 @@ function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
|
|
|
17467
17618
|
|
|
17468
17619
|
// src/components/Slider/Slider.tsx
|
|
17469
17620
|
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
17470
|
-
var Slider = (0,
|
|
17621
|
+
var Slider = (0, import_react161.forwardRef)(
|
|
17471
17622
|
({
|
|
17472
17623
|
value,
|
|
17473
17624
|
onChange,
|
|
@@ -17484,7 +17635,7 @@ var Slider = (0, import_react160.forwardRef)(
|
|
|
17484
17635
|
name
|
|
17485
17636
|
}, ref) => {
|
|
17486
17637
|
const isOptionsMode = Boolean(options && options.length > 0);
|
|
17487
|
-
const { min, max, step, smallTicks, largeTicks } = (0,
|
|
17638
|
+
const { min, max, step, smallTicks, largeTicks } = (0, import_react161.useMemo)(() => {
|
|
17488
17639
|
if (isOptionsMode && options) {
|
|
17489
17640
|
if (options.length === 0) {
|
|
17490
17641
|
return {
|
|
@@ -17562,14 +17713,14 @@ var Slider = (0, import_react160.forwardRef)(
|
|
|
17562
17713
|
}, [isOptionsMode, options, propMin, propMax, propStep]);
|
|
17563
17714
|
const isValueUnset = value === void 0 || value === null || typeof value === "number" && isNaN(value);
|
|
17564
17715
|
const clampedValue = isValueUnset ? min : Math.min(Math.max(value, min), max);
|
|
17565
|
-
const handleSliderChange = (0,
|
|
17716
|
+
const handleSliderChange = (0, import_react161.useCallback)(
|
|
17566
17717
|
(event) => {
|
|
17567
17718
|
const newValue = Number(event.target.value);
|
|
17568
17719
|
onChange(newValue);
|
|
17569
17720
|
},
|
|
17570
17721
|
[onChange]
|
|
17571
17722
|
);
|
|
17572
|
-
const handleNumberInputChange = (0,
|
|
17723
|
+
const handleNumberInputChange = (0, import_react161.useCallback)(
|
|
17573
17724
|
(event) => {
|
|
17574
17725
|
if (event.target.value === "") {
|
|
17575
17726
|
onChange(void 0);
|
|
@@ -17642,13 +17793,13 @@ Slider.displayName = "Slider";
|
|
|
17642
17793
|
|
|
17643
17794
|
// src/components/ParameterInputs/ParameterNumberSlider.tsx
|
|
17644
17795
|
var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
|
|
17645
|
-
var ParameterNumberSlider = (0,
|
|
17796
|
+
var ParameterNumberSlider = (0, import_react162.forwardRef)(
|
|
17646
17797
|
(props, ref) => {
|
|
17647
17798
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
17648
17799
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ParameterShell, { "data-testid": "parameter-number-slider", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ParameterNumberSliderInner, { ref, ...innerProps }) });
|
|
17649
17800
|
}
|
|
17650
17801
|
);
|
|
17651
|
-
var ParameterNumberSliderInner = (0,
|
|
17802
|
+
var ParameterNumberSliderInner = (0, import_react162.forwardRef)(({ ...props }, ref) => {
|
|
17652
17803
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
17653
17804
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
17654
17805
|
Slider,
|
|
@@ -17665,7 +17816,7 @@ ParameterNumberSliderInner.displayName = "ParameterNumberSliderInner";
|
|
|
17665
17816
|
|
|
17666
17817
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17667
17818
|
init_emotion_jsx_shim();
|
|
17668
|
-
var
|
|
17819
|
+
var import_react176 = require("@emotion/react");
|
|
17669
17820
|
var import_list3 = require("@lexical/list");
|
|
17670
17821
|
var import_markdown = require("@lexical/markdown");
|
|
17671
17822
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -17802,7 +17953,7 @@ var defaultParameterConfiguration = {
|
|
|
17802
17953
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
17803
17954
|
var import_fast_equals2 = require("fast-equals");
|
|
17804
17955
|
var import_lexical10 = require("lexical");
|
|
17805
|
-
var
|
|
17956
|
+
var import_react177 = require("react");
|
|
17806
17957
|
|
|
17807
17958
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
17808
17959
|
init_emotion_jsx_shim();
|
|
@@ -17823,13 +17974,13 @@ CustomCodeNode.importDOM = function() {
|
|
|
17823
17974
|
// src/components/ParameterInputs/rich-text/DisableStylesPlugin.ts
|
|
17824
17975
|
init_emotion_jsx_shim();
|
|
17825
17976
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
17826
|
-
var
|
|
17977
|
+
var import_utils5 = require("@lexical/utils");
|
|
17827
17978
|
var import_lexical = require("lexical");
|
|
17828
|
-
var
|
|
17979
|
+
var import_react163 = require("react");
|
|
17829
17980
|
function DisableStylesPlugin() {
|
|
17830
17981
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
17831
|
-
(0,
|
|
17832
|
-
return (0,
|
|
17982
|
+
(0, import_react163.useEffect)(() => {
|
|
17983
|
+
return (0, import_utils5.mergeRegister)(
|
|
17833
17984
|
// Disable text alignment on paragraph nodes
|
|
17834
17985
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
17835
17986
|
if (node.getFormatType() !== "") {
|
|
@@ -18087,12 +18238,12 @@ var tableHeaderElement = import_css2.css`
|
|
|
18087
18238
|
// src/components/ParameterInputs/rich-text/ImprovedAssetSelectionPlugin.tsx
|
|
18088
18239
|
init_emotion_jsx_shim();
|
|
18089
18240
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
18090
|
-
var
|
|
18241
|
+
var import_utils6 = require("@lexical/utils");
|
|
18091
18242
|
var import_lexical2 = require("lexical");
|
|
18092
|
-
var
|
|
18243
|
+
var import_react164 = require("react");
|
|
18093
18244
|
var ImprovedAssetSelectionPlugin = () => {
|
|
18094
18245
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
18095
|
-
(0,
|
|
18246
|
+
(0, import_react164.useEffect)(() => {
|
|
18096
18247
|
editor.getRootElement();
|
|
18097
18248
|
const onRootClick = (event) => {
|
|
18098
18249
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -18104,7 +18255,7 @@ var ImprovedAssetSelectionPlugin = () => {
|
|
|
18104
18255
|
const lastNode = state.root.children.at(-1);
|
|
18105
18256
|
if (isRichTextNodeType(firstNode, "asset") && clickArea === "top") {
|
|
18106
18257
|
editor.update(() => {
|
|
18107
|
-
(0,
|
|
18258
|
+
(0, import_utils6.$insertFirst)((0, import_lexical2.$getRoot)(), (0, import_lexical2.$createParagraphNode)());
|
|
18108
18259
|
requestAnimationFrame(() => {
|
|
18109
18260
|
var _a, _b;
|
|
18110
18261
|
(_b = (_a = editor.getRootElement()) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.scrollTo({
|
|
@@ -18141,13 +18292,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
18141
18292
|
|
|
18142
18293
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
18143
18294
|
init_emotion_jsx_shim();
|
|
18144
|
-
var
|
|
18295
|
+
var import_react165 = require("@emotion/react");
|
|
18145
18296
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
18146
18297
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
18147
|
-
var
|
|
18298
|
+
var import_utils7 = require("@lexical/utils");
|
|
18148
18299
|
var import_fast_equals = require("fast-equals");
|
|
18149
18300
|
var import_lexical4 = require("lexical");
|
|
18150
|
-
var
|
|
18301
|
+
var import_react166 = require("react");
|
|
18151
18302
|
|
|
18152
18303
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
18153
18304
|
init_emotion_jsx_shim();
|
|
@@ -18229,7 +18380,7 @@ var guessLinkTypeFromPath = (path) => {
|
|
|
18229
18380
|
};
|
|
18230
18381
|
function convertAnchorElement(domNode) {
|
|
18231
18382
|
let node = null;
|
|
18232
|
-
if (!(0,
|
|
18383
|
+
if (!(0, import_utils7.isHTMLAnchorElement)(domNode)) {
|
|
18233
18384
|
return { node };
|
|
18234
18385
|
}
|
|
18235
18386
|
const textContent = domNode.textContent;
|
|
@@ -18336,7 +18487,7 @@ var LinkNode = class _LinkNode extends import_lexical4.ElementNode {
|
|
|
18336
18487
|
element.setAttribute("href", `mailto:${this.__link.path}`);
|
|
18337
18488
|
}
|
|
18338
18489
|
}
|
|
18339
|
-
(0,
|
|
18490
|
+
(0, import_utils7.addClassNamesToElement)(element, config.theme.link);
|
|
18340
18491
|
return element;
|
|
18341
18492
|
}
|
|
18342
18493
|
updateDOM(prevNode, a) {
|
|
@@ -18495,18 +18646,18 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
18495
18646
|
);
|
|
18496
18647
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
18497
18648
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
18498
|
-
var linkPopover =
|
|
18649
|
+
var linkPopover = import_react165.css`
|
|
18499
18650
|
position: absolute;
|
|
18500
18651
|
z-index: 11;
|
|
18501
18652
|
`;
|
|
18502
|
-
var linkPopoverContainer =
|
|
18653
|
+
var linkPopoverContainer = import_react165.css`
|
|
18503
18654
|
${Popover};
|
|
18504
18655
|
${PopoverBody};
|
|
18505
18656
|
${PopoverVariantSmall};
|
|
18506
18657
|
align-items: center;
|
|
18507
18658
|
display: flex;
|
|
18508
18659
|
`;
|
|
18509
|
-
var linkPopoverAnchor =
|
|
18660
|
+
var linkPopoverAnchor = import_react165.css`
|
|
18510
18661
|
${link}
|
|
18511
18662
|
${linkColorDefault}
|
|
18512
18663
|
`;
|
|
@@ -18519,21 +18670,21 @@ function LinkNodePlugin({
|
|
|
18519
18670
|
return path;
|
|
18520
18671
|
};
|
|
18521
18672
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
18522
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
18523
|
-
const linkPopoverElRef = (0,
|
|
18524
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
18525
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
18526
|
-
(0,
|
|
18673
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react166.useState)();
|
|
18674
|
+
const linkPopoverElRef = (0, import_react166.useRef)(null);
|
|
18675
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react166.useState)(false);
|
|
18676
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react166.useState)(false);
|
|
18677
|
+
(0, import_react166.useEffect)(() => {
|
|
18527
18678
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
18528
18679
|
setLinkPopoverState(void 0);
|
|
18529
18680
|
return;
|
|
18530
18681
|
}
|
|
18531
18682
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
18532
|
-
(0,
|
|
18683
|
+
(0, import_react166.useEffect)(() => {
|
|
18533
18684
|
if (!editor.hasNodes([LinkNode])) {
|
|
18534
18685
|
throw new Error("LinkNode not registered on editor");
|
|
18535
18686
|
}
|
|
18536
|
-
return (0,
|
|
18687
|
+
return (0, import_utils7.mergeRegister)(
|
|
18537
18688
|
editor.registerCommand(
|
|
18538
18689
|
UPSERT_LINK_NODE_COMMAND,
|
|
18539
18690
|
(payload) => {
|
|
@@ -18601,7 +18752,7 @@ function LinkNodePlugin({
|
|
|
18601
18752
|
import_lexical4.PASTE_COMMAND,
|
|
18602
18753
|
(event) => {
|
|
18603
18754
|
const selection = (0, import_lexical4.$getSelection)();
|
|
18604
|
-
if (!(0, import_lexical4.$isRangeSelection)(selection) || selection.isCollapsed() || !(0,
|
|
18755
|
+
if (!(0, import_lexical4.$isRangeSelection)(selection) || selection.isCollapsed() || !(0, import_utils7.objectKlassEquals)(event, ClipboardEvent)) {
|
|
18605
18756
|
return false;
|
|
18606
18757
|
}
|
|
18607
18758
|
const clipboardEvent = event;
|
|
@@ -18633,7 +18784,7 @@ function LinkNodePlugin({
|
|
|
18633
18784
|
)
|
|
18634
18785
|
);
|
|
18635
18786
|
}, [editor, onConnectLink]);
|
|
18636
|
-
const maybeShowLinkToolbar = (0,
|
|
18787
|
+
const maybeShowLinkToolbar = (0, import_react166.useCallback)(() => {
|
|
18637
18788
|
if (!editor.isEditable()) {
|
|
18638
18789
|
return;
|
|
18639
18790
|
}
|
|
@@ -18667,7 +18818,7 @@ function LinkNodePlugin({
|
|
|
18667
18818
|
}
|
|
18668
18819
|
});
|
|
18669
18820
|
}, [editor, positioningAnchorEl]);
|
|
18670
|
-
(0,
|
|
18821
|
+
(0, import_react166.useEffect)(() => {
|
|
18671
18822
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
18672
18823
|
requestAnimationFrame(() => {
|
|
18673
18824
|
editorState.read(() => {
|
|
@@ -18753,9 +18904,9 @@ function getLinkAncestor(node) {
|
|
|
18753
18904
|
init_emotion_jsx_shim();
|
|
18754
18905
|
var import_list = require("@lexical/list");
|
|
18755
18906
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
18756
|
-
var
|
|
18907
|
+
var import_utils10 = require("@lexical/utils");
|
|
18757
18908
|
var import_lexical5 = require("lexical");
|
|
18758
|
-
var
|
|
18909
|
+
var import_react167 = require("react");
|
|
18759
18910
|
function isIndentPermitted(maxDepth) {
|
|
18760
18911
|
const selection = (0, import_lexical5.$getSelection)();
|
|
18761
18912
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -18778,11 +18929,11 @@ function isIndentPermitted(maxDepth) {
|
|
|
18778
18929
|
}
|
|
18779
18930
|
function $isAnyOfSelectedNodesAListItemNode(selection) {
|
|
18780
18931
|
const nodes = selection.getNodes();
|
|
18781
|
-
return (0,
|
|
18932
|
+
return (0, import_utils10.$filter)(nodes, (node) => (0, import_list.$isListItemNode)(node) ? node : null).length > 0;
|
|
18782
18933
|
}
|
|
18783
18934
|
function $indentOverTab(selection) {
|
|
18784
18935
|
const nodes = selection.getNodes();
|
|
18785
|
-
const canIndentBlockNodes = (0,
|
|
18936
|
+
const canIndentBlockNodes = (0, import_utils10.$filter)(nodes, (node) => {
|
|
18786
18937
|
if ((0, import_lexical5.$isBlockElementNode)(node) && node.canIndent()) {
|
|
18787
18938
|
return node;
|
|
18788
18939
|
}
|
|
@@ -18795,7 +18946,7 @@ function $indentOverTab(selection) {
|
|
|
18795
18946
|
const focus = selection.focus;
|
|
18796
18947
|
const first = focus.isBefore(anchor) ? focus : anchor;
|
|
18797
18948
|
const firstNode = first.getNode();
|
|
18798
|
-
const firstBlock = (0,
|
|
18949
|
+
const firstBlock = (0, import_utils10.$getNearestBlockElementAncestorOrThrow)(firstNode);
|
|
18799
18950
|
if (firstBlock.canIndent()) {
|
|
18800
18951
|
const firstBlockKey = firstBlock.getKey();
|
|
18801
18952
|
let selectionAtStart = (0, import_lexical5.$createRangeSelection)();
|
|
@@ -18810,8 +18961,8 @@ function $indentOverTab(selection) {
|
|
|
18810
18961
|
}
|
|
18811
18962
|
function ListIndentPlugin({ maxDepth }) {
|
|
18812
18963
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
18813
|
-
const isInListItemNode = (0,
|
|
18814
|
-
(0,
|
|
18964
|
+
const isInListItemNode = (0, import_react167.useRef)(false);
|
|
18965
|
+
(0, import_react167.useEffect)(() => {
|
|
18815
18966
|
return editor.registerCommand(
|
|
18816
18967
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
18817
18968
|
() => {
|
|
@@ -18821,15 +18972,15 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
18821
18972
|
isInListItemNode.current = false;
|
|
18822
18973
|
return false;
|
|
18823
18974
|
}
|
|
18824
|
-
isInListItemNode.current = (0,
|
|
18975
|
+
isInListItemNode.current = (0, import_utils10.$getNearestNodeOfType)(selection.anchor.getNode(), import_list.ListNode) !== null;
|
|
18825
18976
|
});
|
|
18826
18977
|
return false;
|
|
18827
18978
|
},
|
|
18828
18979
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
18829
18980
|
);
|
|
18830
18981
|
}, [editor]);
|
|
18831
|
-
(0,
|
|
18832
|
-
return (0,
|
|
18982
|
+
(0, import_react167.useEffect)(() => {
|
|
18983
|
+
return (0, import_utils10.mergeRegister)(
|
|
18833
18984
|
editor.registerCommand(
|
|
18834
18985
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
18835
18986
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -18858,12 +19009,12 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
18858
19009
|
|
|
18859
19010
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
18860
19011
|
init_emotion_jsx_shim();
|
|
18861
|
-
var
|
|
19012
|
+
var import_react168 = require("@emotion/react");
|
|
18862
19013
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
18863
19014
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
18864
19015
|
var import_table = require("@lexical/table");
|
|
18865
19016
|
var import_lexical6 = require("lexical");
|
|
18866
|
-
var
|
|
19017
|
+
var import_react169 = require("react");
|
|
18867
19018
|
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
18868
19019
|
function computeSelectionCount(selection) {
|
|
18869
19020
|
const selectionShape = selection.getShape();
|
|
@@ -18872,14 +19023,14 @@ function computeSelectionCount(selection) {
|
|
|
18872
19023
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
18873
19024
|
};
|
|
18874
19025
|
}
|
|
18875
|
-
var tableActionMenuTrigger =
|
|
19026
|
+
var tableActionMenuTrigger = import_react168.css`
|
|
18876
19027
|
position: absolute;
|
|
18877
19028
|
transform: translate(calc(-100% - 1px), 1px);
|
|
18878
19029
|
`;
|
|
18879
|
-
var TableActionMenuTrigger = (0,
|
|
19030
|
+
var TableActionMenuTrigger = (0, import_react169.forwardRef)((props, ref) => {
|
|
18880
19031
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
18881
|
-
const [coordinates, setCoordinates] = (0,
|
|
18882
|
-
(0,
|
|
19032
|
+
const [coordinates, setCoordinates] = (0, import_react169.useState)({ x: 0, y: 0 });
|
|
19033
|
+
(0, import_react169.useLayoutEffect)(() => {
|
|
18883
19034
|
const rect = tableCellEl.getBoundingClientRect();
|
|
18884
19035
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
18885
19036
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
@@ -18912,16 +19063,16 @@ function TableActionMenu({
|
|
|
18912
19063
|
positioningAnchorEl
|
|
18913
19064
|
}) {
|
|
18914
19065
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
18915
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
18916
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
19066
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react169.useState)(_tableCellNode);
|
|
19067
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react169.useState)({
|
|
18917
19068
|
columns: 1,
|
|
18918
19069
|
rows: 1
|
|
18919
19070
|
});
|
|
18920
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
19071
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react169.useState)(0);
|
|
18921
19072
|
const incrementMenuTriggerKey = () => {
|
|
18922
19073
|
setMenuTriggerKey((key) => key += 1);
|
|
18923
19074
|
};
|
|
18924
|
-
(0,
|
|
19075
|
+
(0, import_react169.useEffect)(() => {
|
|
18925
19076
|
return editor.registerMutationListener(
|
|
18926
19077
|
import_table.TableCellNode,
|
|
18927
19078
|
(nodeMutations) => {
|
|
@@ -18935,7 +19086,7 @@ function TableActionMenu({
|
|
|
18935
19086
|
{ skipInitialization: true }
|
|
18936
19087
|
);
|
|
18937
19088
|
}, [editor, tableCellNode]);
|
|
18938
|
-
(0,
|
|
19089
|
+
(0, import_react169.useEffect)(() => {
|
|
18939
19090
|
editor.getEditorState().read(() => {
|
|
18940
19091
|
const selection = (0, import_lexical6.$getSelection)();
|
|
18941
19092
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -18943,7 +19094,7 @@ function TableActionMenu({
|
|
|
18943
19094
|
}
|
|
18944
19095
|
});
|
|
18945
19096
|
}, [editor]);
|
|
18946
|
-
const clearTableSelection = (0,
|
|
19097
|
+
const clearTableSelection = (0, import_react169.useCallback)(() => {
|
|
18947
19098
|
editor.update(() => {
|
|
18948
19099
|
if (tableCellNode.isAttached()) {
|
|
18949
19100
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -18960,7 +19111,7 @@ function TableActionMenu({
|
|
|
18960
19111
|
(0, import_lexical6.$setSelection)(null);
|
|
18961
19112
|
});
|
|
18962
19113
|
}, [editor, tableCellNode]);
|
|
18963
|
-
const insertTableRowAtSelection = (0,
|
|
19114
|
+
const insertTableRowAtSelection = (0, import_react169.useCallback)(
|
|
18964
19115
|
(shouldInsertAfter) => {
|
|
18965
19116
|
editor.update(() => {
|
|
18966
19117
|
for (let i = 0; i < selectionCounts.rows; i++) {
|
|
@@ -18970,7 +19121,7 @@ function TableActionMenu({
|
|
|
18970
19121
|
},
|
|
18971
19122
|
[editor, selectionCounts.rows]
|
|
18972
19123
|
);
|
|
18973
|
-
const insertTableColumnAtSelection = (0,
|
|
19124
|
+
const insertTableColumnAtSelection = (0, import_react169.useCallback)(
|
|
18974
19125
|
(shouldInsertAfter) => {
|
|
18975
19126
|
editor.update(() => {
|
|
18976
19127
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -18980,26 +19131,26 @@ function TableActionMenu({
|
|
|
18980
19131
|
},
|
|
18981
19132
|
[editor, selectionCounts.columns]
|
|
18982
19133
|
);
|
|
18983
|
-
const deleteTableRowAtSelection = (0,
|
|
19134
|
+
const deleteTableRowAtSelection = (0, import_react169.useCallback)(() => {
|
|
18984
19135
|
editor.update(() => {
|
|
18985
19136
|
(0, import_table.$deleteTableRowAtSelection)();
|
|
18986
19137
|
});
|
|
18987
19138
|
incrementMenuTriggerKey();
|
|
18988
19139
|
}, [editor]);
|
|
18989
|
-
const deleteTableAtSelection = (0,
|
|
19140
|
+
const deleteTableAtSelection = (0, import_react169.useCallback)(() => {
|
|
18990
19141
|
editor.update(() => {
|
|
18991
19142
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
18992
19143
|
tableNode.remove();
|
|
18993
19144
|
clearTableSelection();
|
|
18994
19145
|
});
|
|
18995
19146
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
18996
|
-
const deleteTableColumnAtSelection = (0,
|
|
19147
|
+
const deleteTableColumnAtSelection = (0, import_react169.useCallback)(() => {
|
|
18997
19148
|
editor.update(() => {
|
|
18998
19149
|
(0, import_table.$deleteTableColumnAtSelection)();
|
|
18999
19150
|
});
|
|
19000
19151
|
incrementMenuTriggerKey();
|
|
19001
19152
|
}, [editor]);
|
|
19002
|
-
const toggleTableRowIsHeader = (0,
|
|
19153
|
+
const toggleTableRowIsHeader = (0, import_react169.useCallback)(() => {
|
|
19003
19154
|
editor.update(() => {
|
|
19004
19155
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19005
19156
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -19019,7 +19170,7 @@ function TableActionMenu({
|
|
|
19019
19170
|
clearTableSelection();
|
|
19020
19171
|
});
|
|
19021
19172
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19022
|
-
const toggleTableColumnIsHeader = (0,
|
|
19173
|
+
const toggleTableColumnIsHeader = (0, import_react169.useCallback)(() => {
|
|
19023
19174
|
editor.update(() => {
|
|
19024
19175
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
19025
19176
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -19039,7 +19190,7 @@ function TableActionMenu({
|
|
|
19039
19190
|
clearTableSelection();
|
|
19040
19191
|
});
|
|
19041
19192
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
19042
|
-
const menuItemCss = (0,
|
|
19193
|
+
const menuItemCss = (0, import_react168.css)({
|
|
19043
19194
|
fontSize: "var(--fs-sm)"
|
|
19044
19195
|
});
|
|
19045
19196
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
@@ -19110,10 +19261,10 @@ function TableCellActionMenuContainer({
|
|
|
19110
19261
|
positioningAnchorEl
|
|
19111
19262
|
}) {
|
|
19112
19263
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
19113
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
19114
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
19115
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
19116
|
-
(0,
|
|
19264
|
+
const [tableCellNode, setTableMenuCellNode] = (0, import_react169.useState)(null);
|
|
19265
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0, import_react169.useState)(null);
|
|
19266
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0, import_react169.useState)(null);
|
|
19267
|
+
(0, import_react169.useEffect)(() => {
|
|
19117
19268
|
const newPortalEl = document.createElement("div");
|
|
19118
19269
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
19119
19270
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -19121,14 +19272,14 @@ function TableCellActionMenuContainer({
|
|
|
19121
19272
|
newPortalEl.remove();
|
|
19122
19273
|
};
|
|
19123
19274
|
}, [menuPortalEl]);
|
|
19124
|
-
const setTableMenuCellNodeElem = (0,
|
|
19275
|
+
const setTableMenuCellNodeElem = (0, import_react169.useCallback)((elem) => {
|
|
19125
19276
|
if (elem) {
|
|
19126
19277
|
_setTableMenuCellNodeEl(elem);
|
|
19127
19278
|
} else {
|
|
19128
19279
|
_setTableMenuCellNodeEl(null);
|
|
19129
19280
|
}
|
|
19130
19281
|
}, []);
|
|
19131
|
-
const $moveMenu = (0,
|
|
19282
|
+
const $moveMenu = (0, import_react169.useCallback)(() => {
|
|
19132
19283
|
const selection = (0, import_lexical6.$getSelection)();
|
|
19133
19284
|
const nativeSelection = window.getSelection();
|
|
19134
19285
|
const activeElement = document.activeElement;
|
|
@@ -19157,7 +19308,7 @@ function TableCellActionMenuContainer({
|
|
|
19157
19308
|
setTableMenuCellNodeElem(null);
|
|
19158
19309
|
}
|
|
19159
19310
|
}, [editor, setTableMenuCellNodeElem]);
|
|
19160
|
-
(0,
|
|
19311
|
+
(0, import_react169.useEffect)(() => {
|
|
19161
19312
|
return editor.registerUpdateListener(() => {
|
|
19162
19313
|
editor.getEditorState().read(() => {
|
|
19163
19314
|
$moveMenu();
|
|
@@ -19185,18 +19336,18 @@ function TableActionMenuPlugin({
|
|
|
19185
19336
|
|
|
19186
19337
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
19187
19338
|
init_emotion_jsx_shim();
|
|
19188
|
-
var
|
|
19339
|
+
var import_react170 = require("@emotion/react");
|
|
19189
19340
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
19190
19341
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
19191
19342
|
var import_table2 = require("@lexical/table");
|
|
19192
|
-
var
|
|
19343
|
+
var import_utils12 = require("@lexical/utils");
|
|
19193
19344
|
var import_lexical7 = require("lexical");
|
|
19194
|
-
var
|
|
19345
|
+
var import_react171 = require("react");
|
|
19195
19346
|
var import_react_dom3 = require("react-dom");
|
|
19196
19347
|
var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
|
|
19197
19348
|
var MIN_ROW_HEIGHT = 33;
|
|
19198
19349
|
var MIN_COLUMN_WIDTH = 50;
|
|
19199
|
-
var tableResizer =
|
|
19350
|
+
var tableResizer = import_react170.css`
|
|
19200
19351
|
position: absolute;
|
|
19201
19352
|
z-index: var(--z-10);
|
|
19202
19353
|
`;
|
|
@@ -19218,15 +19369,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
19218
19369
|
return null;
|
|
19219
19370
|
};
|
|
19220
19371
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
19221
|
-
const targetRef = (0,
|
|
19222
|
-
const resizerRef = (0,
|
|
19223
|
-
const tableRectRef = (0,
|
|
19224
|
-
const mouseStartPosRef = (0,
|
|
19225
|
-
const [mouseCurrentPos, updateMouseCurrentPos] = (0,
|
|
19226
|
-
const [activeCell, updateActiveCell] = (0,
|
|
19227
|
-
const [isMouseDown, updateIsMouseDown] = (0,
|
|
19228
|
-
const [draggingDirection, updateDraggingDirection] = (0,
|
|
19229
|
-
const resetState = (0,
|
|
19372
|
+
const targetRef = (0, import_react171.useRef)(null);
|
|
19373
|
+
const resizerRef = (0, import_react171.useRef)(null);
|
|
19374
|
+
const tableRectRef = (0, import_react171.useRef)(null);
|
|
19375
|
+
const mouseStartPosRef = (0, import_react171.useRef)(null);
|
|
19376
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = (0, import_react171.useState)(null);
|
|
19377
|
+
const [activeCell, updateActiveCell] = (0, import_react171.useState)(null);
|
|
19378
|
+
const [isMouseDown, updateIsMouseDown] = (0, import_react171.useState)(false);
|
|
19379
|
+
const [draggingDirection, updateDraggingDirection] = (0, import_react171.useState)(null);
|
|
19380
|
+
const resetState = (0, import_react171.useCallback)(() => {
|
|
19230
19381
|
updateActiveCell(null);
|
|
19231
19382
|
targetRef.current = null;
|
|
19232
19383
|
updateDraggingDirection(null);
|
|
@@ -19236,7 +19387,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19236
19387
|
const isMouseDownOnEvent = (event) => {
|
|
19237
19388
|
return (event.buttons & 1) === 1;
|
|
19238
19389
|
};
|
|
19239
|
-
(0,
|
|
19390
|
+
(0, import_react171.useEffect)(() => {
|
|
19240
19391
|
const onMouseMove = (event) => {
|
|
19241
19392
|
setTimeout(() => {
|
|
19242
19393
|
const target = event.target;
|
|
@@ -19303,7 +19454,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19303
19454
|
}
|
|
19304
19455
|
return false;
|
|
19305
19456
|
};
|
|
19306
|
-
const updateRowHeight = (0,
|
|
19457
|
+
const updateRowHeight = (0, import_react171.useCallback)(
|
|
19307
19458
|
(heightChange) => {
|
|
19308
19459
|
if (!activeCell) {
|
|
19309
19460
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -19365,7 +19516,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19365
19516
|
}
|
|
19366
19517
|
}
|
|
19367
19518
|
};
|
|
19368
|
-
const updateColumnWidth = (0,
|
|
19519
|
+
const updateColumnWidth = (0, import_react171.useCallback)(
|
|
19369
19520
|
(widthChange) => {
|
|
19370
19521
|
if (!activeCell) {
|
|
19371
19522
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -19399,7 +19550,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19399
19550
|
},
|
|
19400
19551
|
[activeCell, editor]
|
|
19401
19552
|
);
|
|
19402
|
-
const mouseUpHandler = (0,
|
|
19553
|
+
const mouseUpHandler = (0, import_react171.useCallback)(
|
|
19403
19554
|
(direction) => {
|
|
19404
19555
|
const handler = (event) => {
|
|
19405
19556
|
event.preventDefault();
|
|
@@ -19412,7 +19563,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19412
19563
|
if (activeCell === null) {
|
|
19413
19564
|
return;
|
|
19414
19565
|
}
|
|
19415
|
-
const zoom = (0,
|
|
19566
|
+
const zoom = (0, import_utils12.calculateZoomLevel)(event.target);
|
|
19416
19567
|
if (isHeightChanging(direction)) {
|
|
19417
19568
|
const heightChange = (event.clientY - y) / zoom;
|
|
19418
19569
|
updateRowHeight(heightChange);
|
|
@@ -19428,7 +19579,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19428
19579
|
},
|
|
19429
19580
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
19430
19581
|
);
|
|
19431
|
-
const toggleResize = (0,
|
|
19582
|
+
const toggleResize = (0, import_react171.useCallback)(
|
|
19432
19583
|
(direction) => (event) => {
|
|
19433
19584
|
event.preventDefault();
|
|
19434
19585
|
event.stopPropagation();
|
|
@@ -19445,11 +19596,11 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19445
19596
|
},
|
|
19446
19597
|
[activeCell, mouseUpHandler]
|
|
19447
19598
|
);
|
|
19448
|
-
const getResizers = (0,
|
|
19599
|
+
const getResizers = (0, import_react171.useCallback)(() => {
|
|
19449
19600
|
if (activeCell) {
|
|
19450
19601
|
const { height, width, top: top2, left } = activeCell.elem.getBoundingClientRect();
|
|
19451
19602
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
19452
|
-
const zoom = (0,
|
|
19603
|
+
const zoom = (0, import_utils12.calculateZoomLevel)(activeCell.elem);
|
|
19453
19604
|
const zoneWidth = 10;
|
|
19454
19605
|
const styles = {
|
|
19455
19606
|
bottom: {
|
|
@@ -19516,7 +19667,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
19516
19667
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
19517
19668
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
19518
19669
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
19519
|
-
return (0,
|
|
19670
|
+
return (0, import_react171.useMemo)(
|
|
19520
19671
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
19521
19672
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
19522
19673
|
positioningAnchorEl
|
|
@@ -19530,11 +19681,11 @@ init_emotion_jsx_shim();
|
|
|
19530
19681
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
19531
19682
|
var import_table3 = require("@lexical/table");
|
|
19532
19683
|
var import_lexical8 = require("lexical");
|
|
19533
|
-
var
|
|
19684
|
+
var import_react172 = require("react");
|
|
19534
19685
|
var TableSelectionPlugin = () => {
|
|
19535
19686
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
19536
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
19537
|
-
(0,
|
|
19687
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react172.useState)(null);
|
|
19688
|
+
(0, import_react172.useEffect)(() => {
|
|
19538
19689
|
return editor.registerCommand(
|
|
19539
19690
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
19540
19691
|
() => {
|
|
@@ -19556,7 +19707,7 @@ var TableSelectionPlugin = () => {
|
|
|
19556
19707
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
19557
19708
|
);
|
|
19558
19709
|
}, [editor]);
|
|
19559
|
-
(0,
|
|
19710
|
+
(0, import_react172.useEffect)(() => {
|
|
19560
19711
|
const onControlA = (event) => {
|
|
19561
19712
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
19562
19713
|
if (!closestTableCellNode) {
|
|
@@ -19580,16 +19731,16 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
19580
19731
|
|
|
19581
19732
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
19582
19733
|
init_emotion_jsx_shim();
|
|
19583
|
-
var
|
|
19734
|
+
var import_react174 = require("@emotion/react");
|
|
19584
19735
|
var import_code2 = require("@lexical/code");
|
|
19585
19736
|
var import_list2 = require("@lexical/list");
|
|
19586
19737
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
19587
19738
|
var import_rich_text = require("@lexical/rich-text");
|
|
19588
19739
|
var import_selection2 = require("@lexical/selection");
|
|
19589
19740
|
var import_table4 = require("@lexical/table");
|
|
19590
|
-
var
|
|
19741
|
+
var import_utils13 = require("@lexical/utils");
|
|
19591
19742
|
var import_lexical9 = require("lexical");
|
|
19592
|
-
var
|
|
19743
|
+
var import_react175 = require("react");
|
|
19593
19744
|
|
|
19594
19745
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
19595
19746
|
init_emotion_jsx_shim();
|
|
@@ -19607,29 +19758,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
19607
19758
|
|
|
19608
19759
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
19609
19760
|
init_emotion_jsx_shim();
|
|
19610
|
-
var
|
|
19761
|
+
var import_react173 = require("react");
|
|
19611
19762
|
var useRichTextToolbarState = ({ config }) => {
|
|
19612
19763
|
var _a;
|
|
19613
|
-
const enabledBuiltInFormats = (0,
|
|
19764
|
+
const enabledBuiltInFormats = (0, import_react173.useMemo)(() => {
|
|
19614
19765
|
return richTextBuiltInFormats.filter((format) => {
|
|
19615
19766
|
var _a2, _b;
|
|
19616
19767
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
19617
19768
|
});
|
|
19618
19769
|
}, [config]);
|
|
19619
|
-
const enabledBuiltInElements = (0,
|
|
19770
|
+
const enabledBuiltInElements = (0, import_react173.useMemo)(() => {
|
|
19620
19771
|
return richTextBuiltInElements.filter((element) => {
|
|
19621
19772
|
var _a2, _b;
|
|
19622
19773
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
19623
19774
|
});
|
|
19624
19775
|
}, [config]);
|
|
19625
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
19776
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react173.useMemo)(() => {
|
|
19626
19777
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
19627
19778
|
}, [enabledBuiltInFormats]);
|
|
19628
19779
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
19629
19780
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
19630
19781
|
);
|
|
19631
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
19632
|
-
const visibleFormatsWithIcon = (0,
|
|
19782
|
+
const [activeFormats, setActiveFormats] = (0, import_react173.useState)([]);
|
|
19783
|
+
const visibleFormatsWithIcon = (0, import_react173.useMemo)(() => {
|
|
19633
19784
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19634
19785
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19635
19786
|
visibleFormats.add(type);
|
|
@@ -19639,7 +19790,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19639
19790
|
});
|
|
19640
19791
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19641
19792
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
19642
|
-
const visibleFormatsWithoutIcon = (0,
|
|
19793
|
+
const visibleFormatsWithoutIcon = (0, import_react173.useMemo)(() => {
|
|
19643
19794
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19644
19795
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
19645
19796
|
visibleFormats.add(type);
|
|
@@ -19649,11 +19800,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19649
19800
|
});
|
|
19650
19801
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19651
19802
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
19652
|
-
const [activeElement, setActiveElement] = (0,
|
|
19803
|
+
const [activeElement, setActiveElement] = (0, import_react173.useState)("paragraph");
|
|
19653
19804
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
19654
19805
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
19655
19806
|
);
|
|
19656
|
-
const visibleTextualElements = (0,
|
|
19807
|
+
const visibleTextualElements = (0, import_react173.useMemo)(() => {
|
|
19657
19808
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
19658
19809
|
return enabledTextualElements;
|
|
19659
19810
|
}
|
|
@@ -19664,30 +19815,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19664
19815
|
}
|
|
19665
19816
|
);
|
|
19666
19817
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
19667
|
-
const [isLink, setIsLink] = (0,
|
|
19668
|
-
const linkElementVisible = (0,
|
|
19818
|
+
const [isLink, setIsLink] = (0, import_react173.useState)(false);
|
|
19819
|
+
const linkElementVisible = (0, import_react173.useMemo)(() => {
|
|
19669
19820
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
19670
19821
|
}, [isLink, enabledBuiltInElements]);
|
|
19671
|
-
const visibleLists = (0,
|
|
19822
|
+
const visibleLists = (0, import_react173.useMemo)(() => {
|
|
19672
19823
|
return new Set(
|
|
19673
19824
|
["orderedList", "unorderedList"].filter(
|
|
19674
19825
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
19675
19826
|
)
|
|
19676
19827
|
);
|
|
19677
19828
|
}, [activeElement, enabledBuiltInElements]);
|
|
19678
|
-
const quoteElementVisible = (0,
|
|
19829
|
+
const quoteElementVisible = (0, import_react173.useMemo)(() => {
|
|
19679
19830
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
19680
19831
|
}, [activeElement, enabledBuiltInElements]);
|
|
19681
|
-
const codeElementVisible = (0,
|
|
19832
|
+
const codeElementVisible = (0, import_react173.useMemo)(() => {
|
|
19682
19833
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
19683
19834
|
}, [activeElement, enabledBuiltInElements]);
|
|
19684
|
-
const tableElementVisible = (0,
|
|
19835
|
+
const tableElementVisible = (0, import_react173.useMemo)(() => {
|
|
19685
19836
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
19686
19837
|
}, [activeElement, enabledBuiltInElements]);
|
|
19687
|
-
const assetElementVisible = (0,
|
|
19838
|
+
const assetElementVisible = (0, import_react173.useMemo)(() => {
|
|
19688
19839
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
19689
19840
|
}, [activeElement, enabledBuiltInElements]);
|
|
19690
|
-
const visibleElementsWithIcons = (0,
|
|
19841
|
+
const visibleElementsWithIcons = (0, import_react173.useMemo)(() => {
|
|
19691
19842
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19692
19843
|
if (linkElementVisible) {
|
|
19693
19844
|
visibleElements.add("link");
|
|
@@ -19699,7 +19850,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19699
19850
|
}
|
|
19700
19851
|
return visibleElements;
|
|
19701
19852
|
}, [linkElementVisible, visibleLists]);
|
|
19702
|
-
const visibleInsertElementsWithIcons = (0,
|
|
19853
|
+
const visibleInsertElementsWithIcons = (0, import_react173.useMemo)(() => {
|
|
19703
19854
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
19704
19855
|
if (quoteElementVisible) {
|
|
19705
19856
|
visibleElements.add("quote");
|
|
@@ -19738,7 +19889,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19738
19889
|
|
|
19739
19890
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
19740
19891
|
var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
|
|
19741
|
-
var toolbar =
|
|
19892
|
+
var toolbar = import_react174.css`
|
|
19742
19893
|
${scrollbarStyles}
|
|
19743
19894
|
background: var(--gray-50);
|
|
19744
19895
|
border-radius: var(--rounded-base);
|
|
@@ -19752,7 +19903,7 @@ var toolbar = import_react173.css`
|
|
|
19752
19903
|
top: calc(var(--spacing-sm) * -2);
|
|
19753
19904
|
z-index: 10;
|
|
19754
19905
|
`;
|
|
19755
|
-
var toolbarGroup =
|
|
19906
|
+
var toolbarGroup = import_react174.css`
|
|
19756
19907
|
display: flex;
|
|
19757
19908
|
flex-shrink: 0;
|
|
19758
19909
|
gap: var(--spacing-xs);
|
|
@@ -19769,7 +19920,7 @@ var toolbarGroup = import_react173.css`
|
|
|
19769
19920
|
width: 1px;
|
|
19770
19921
|
}
|
|
19771
19922
|
`;
|
|
19772
|
-
var richTextToolbarButton =
|
|
19923
|
+
var richTextToolbarButton = import_react174.css`
|
|
19773
19924
|
align-items: center;
|
|
19774
19925
|
appearance: none;
|
|
19775
19926
|
border: 0;
|
|
@@ -19783,17 +19934,17 @@ var richTextToolbarButton = import_react173.css`
|
|
|
19783
19934
|
min-width: 32px;
|
|
19784
19935
|
padding: 0 var(--spacing-sm);
|
|
19785
19936
|
`;
|
|
19786
|
-
var richTextToolbarButtonActive =
|
|
19937
|
+
var richTextToolbarButtonActive = import_react174.css`
|
|
19787
19938
|
background: var(--gray-200);
|
|
19788
19939
|
`;
|
|
19789
|
-
var textStyleButton =
|
|
19940
|
+
var textStyleButton = import_react174.css`
|
|
19790
19941
|
justify-content: space-between;
|
|
19791
19942
|
min-width: 7rem;
|
|
19792
19943
|
`;
|
|
19793
|
-
var toolbarIcon =
|
|
19944
|
+
var toolbarIcon = import_react174.css`
|
|
19794
19945
|
color: inherit;
|
|
19795
19946
|
`;
|
|
19796
|
-
var toolbarChevron =
|
|
19947
|
+
var toolbarChevron = import_react174.css`
|
|
19797
19948
|
margin-left: var(--spacing-xs);
|
|
19798
19949
|
`;
|
|
19799
19950
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19853,7 +20004,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19853
20004
|
});
|
|
19854
20005
|
});
|
|
19855
20006
|
};
|
|
19856
|
-
const updateToolbar = (0,
|
|
20007
|
+
const updateToolbar = (0, import_react175.useCallback)(() => {
|
|
19857
20008
|
const selection = (0, import_lexical9.$getSelection)();
|
|
19858
20009
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
19859
20010
|
return;
|
|
@@ -19866,7 +20017,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19866
20017
|
}
|
|
19867
20018
|
setActiveFormats(newActiveFormats);
|
|
19868
20019
|
const anchorNode = selection.anchor.getNode();
|
|
19869
|
-
let element = anchorNode.getKey() === "root" ? anchorNode : (0,
|
|
20020
|
+
let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils13.$findMatchingParent)(anchorNode, (e) => {
|
|
19870
20021
|
const parent = e.getParent();
|
|
19871
20022
|
return parent !== null && (0, import_lexical9.$isRootOrShadowRoot)(parent);
|
|
19872
20023
|
});
|
|
@@ -19877,7 +20028,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19877
20028
|
const elementDOM = editor.getElementByKey(elementKey);
|
|
19878
20029
|
if (elementDOM !== null) {
|
|
19879
20030
|
if ((0, import_list2.$isListNode)(element)) {
|
|
19880
|
-
const parentList = (0,
|
|
20031
|
+
const parentList = (0, import_utils13.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
|
|
19881
20032
|
const type = parentList ? parentList.getListType() : element.getListType();
|
|
19882
20033
|
setActiveElement(type === "bullet" ? "unorderedList" : "orderedList");
|
|
19883
20034
|
} else {
|
|
@@ -19892,7 +20043,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19892
20043
|
setIsLink(false);
|
|
19893
20044
|
}
|
|
19894
20045
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
19895
|
-
(0,
|
|
20046
|
+
(0, import_react175.useEffect)(() => {
|
|
19896
20047
|
return editor.registerCommand(
|
|
19897
20048
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
19898
20049
|
(_payload) => {
|
|
@@ -19902,7 +20053,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
19902
20053
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
19903
20054
|
);
|
|
19904
20055
|
}, [editor, updateToolbar]);
|
|
19905
|
-
(0,
|
|
20056
|
+
(0, import_react175.useEffect)(() => {
|
|
19906
20057
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19907
20058
|
requestAnimationFrame(() => {
|
|
19908
20059
|
editorState.read(() => {
|
|
@@ -20127,7 +20278,7 @@ var ParameterRichText = ({
|
|
|
20127
20278
|
}
|
|
20128
20279
|
);
|
|
20129
20280
|
};
|
|
20130
|
-
var editorContainerWrapper =
|
|
20281
|
+
var editorContainerWrapper = import_react176.css`
|
|
20131
20282
|
position: relative;
|
|
20132
20283
|
|
|
20133
20284
|
&::before {
|
|
@@ -20143,12 +20294,12 @@ var editorContainerWrapper = import_react175.css`
|
|
|
20143
20294
|
z-index: 2;
|
|
20144
20295
|
}
|
|
20145
20296
|
`;
|
|
20146
|
-
var editorWrapper =
|
|
20297
|
+
var editorWrapper = import_react176.css`
|
|
20147
20298
|
display: flex;
|
|
20148
20299
|
flex-flow: column;
|
|
20149
20300
|
flex-grow: 1;
|
|
20150
20301
|
`;
|
|
20151
|
-
var editorContainer =
|
|
20302
|
+
var editorContainer = import_react176.css`
|
|
20152
20303
|
${scrollbarStyles}
|
|
20153
20304
|
background: var(--white);
|
|
20154
20305
|
border-radius: var(--rounded-sm);
|
|
@@ -20180,7 +20331,7 @@ var editorContainer = import_react175.css`
|
|
|
20180
20331
|
max-height: unset;
|
|
20181
20332
|
}
|
|
20182
20333
|
`;
|
|
20183
|
-
var editorContainerOverflowWrapper =
|
|
20334
|
+
var editorContainerOverflowWrapper = import_react176.css`
|
|
20184
20335
|
overflow: hidden;
|
|
20185
20336
|
pointer-events: none;
|
|
20186
20337
|
|
|
@@ -20188,7 +20339,7 @@ var editorContainerOverflowWrapper = import_react175.css`
|
|
|
20188
20339
|
pointer-events: auto;
|
|
20189
20340
|
}
|
|
20190
20341
|
`;
|
|
20191
|
-
var editorPlaceholder =
|
|
20342
|
+
var editorPlaceholder = import_react176.css`
|
|
20192
20343
|
color: var(--gray-500);
|
|
20193
20344
|
font-style: italic;
|
|
20194
20345
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20199,7 +20350,7 @@ var editorPlaceholder = import_react175.css`
|
|
|
20199
20350
|
top: calc(1rem + var(--spacing-sm));
|
|
20200
20351
|
user-select: none;
|
|
20201
20352
|
`;
|
|
20202
|
-
var editorInput =
|
|
20353
|
+
var editorInput = import_react176.css`
|
|
20203
20354
|
min-height: 100%;
|
|
20204
20355
|
flex-grow: 1;
|
|
20205
20356
|
|
|
@@ -20303,12 +20454,12 @@ var RichText = ({
|
|
|
20303
20454
|
placeholder
|
|
20304
20455
|
}) => {
|
|
20305
20456
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
20306
|
-
(0,
|
|
20457
|
+
(0, import_react177.useEffect)(() => {
|
|
20307
20458
|
if (onRichTextInit) {
|
|
20308
20459
|
onRichTextInit(editor);
|
|
20309
20460
|
}
|
|
20310
20461
|
}, [editor, onRichTextInit]);
|
|
20311
|
-
(0,
|
|
20462
|
+
(0, import_react177.useEffect)(() => {
|
|
20312
20463
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
20313
20464
|
requestAnimationFrame(() => {
|
|
20314
20465
|
const previousEditorState = prevEditorState.toJSON();
|
|
@@ -20325,16 +20476,16 @@ var RichText = ({
|
|
|
20325
20476
|
removeUpdateListener();
|
|
20326
20477
|
};
|
|
20327
20478
|
}, [editor, onChange]);
|
|
20328
|
-
(0,
|
|
20479
|
+
(0, import_react177.useEffect)(() => {
|
|
20329
20480
|
editor.setEditable(!readOnly);
|
|
20330
20481
|
}, [editor, readOnly]);
|
|
20331
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
20482
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react177.useState)(null);
|
|
20332
20483
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
20333
20484
|
if (_editorContainerRef !== null) {
|
|
20334
20485
|
setEditorContainerRef(_editorContainerRef);
|
|
20335
20486
|
}
|
|
20336
20487
|
};
|
|
20337
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
20488
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react177.useState)(null);
|
|
20338
20489
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
20339
20490
|
if (_portalContainerRef !== null) {
|
|
20340
20491
|
setPortalContainerRef(_portalContainerRef);
|
|
@@ -20412,15 +20563,15 @@ var RichText = ({
|
|
|
20412
20563
|
|
|
20413
20564
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20414
20565
|
init_emotion_jsx_shim();
|
|
20415
|
-
var
|
|
20566
|
+
var import_react178 = require("react");
|
|
20416
20567
|
var import_jsx_runtime145 = require("@emotion/react/jsx-runtime");
|
|
20417
|
-
var ParameterSelect = (0,
|
|
20568
|
+
var ParameterSelect = (0, import_react178.forwardRef)(
|
|
20418
20569
|
({ defaultOption, options, ...props }, ref) => {
|
|
20419
20570
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20420
20571
|
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20421
20572
|
}
|
|
20422
20573
|
);
|
|
20423
|
-
var ParameterSelectInner = (0,
|
|
20574
|
+
var ParameterSelectInner = (0, import_react178.forwardRef)(
|
|
20424
20575
|
({ defaultOption, options, ...props }, ref) => {
|
|
20425
20576
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20426
20577
|
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
@@ -20445,24 +20596,24 @@ var ParameterSelectInner = (0, import_react177.forwardRef)(
|
|
|
20445
20596
|
|
|
20446
20597
|
// src/components/ParameterInputs/ParameterSelectSlider.tsx
|
|
20447
20598
|
init_emotion_jsx_shim();
|
|
20448
|
-
var
|
|
20599
|
+
var import_react179 = require("react");
|
|
20449
20600
|
var import_jsx_runtime146 = require("@emotion/react/jsx-runtime");
|
|
20450
|
-
var ParameterSelectSlider = (0,
|
|
20601
|
+
var ParameterSelectSlider = (0, import_react179.forwardRef)(
|
|
20451
20602
|
(props, ref) => {
|
|
20452
20603
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20453
20604
|
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(ParameterShell, { "data-testid": "parameter-select-slider", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(ParameterSelectSliderInner, { ref, ...innerProps }) });
|
|
20454
20605
|
}
|
|
20455
20606
|
);
|
|
20456
|
-
var ParameterSelectSliderInner = (0,
|
|
20607
|
+
var ParameterSelectSliderInner = (0, import_react179.forwardRef)(({ options, value, onChange, ...props }, ref) => {
|
|
20457
20608
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20458
|
-
const numericValue = (0,
|
|
20609
|
+
const numericValue = (0, import_react179.useMemo)(() => {
|
|
20459
20610
|
if (value === void 0 || value === null || value === "") {
|
|
20460
20611
|
return void 0;
|
|
20461
20612
|
}
|
|
20462
20613
|
const index = options.findIndex((option) => option.value === value);
|
|
20463
20614
|
return index >= 0 ? index : void 0;
|
|
20464
20615
|
}, [options, value]);
|
|
20465
|
-
const handleChange = (0,
|
|
20616
|
+
const handleChange = (0, import_react179.useCallback)(
|
|
20466
20617
|
(newValue) => {
|
|
20467
20618
|
var _a;
|
|
20468
20619
|
if (newValue === void 0) {
|
|
@@ -20492,13 +20643,13 @@ ParameterSelectSliderInner.displayName = "ParameterSelectSliderInner";
|
|
|
20492
20643
|
|
|
20493
20644
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20494
20645
|
init_emotion_jsx_shim();
|
|
20495
|
-
var
|
|
20646
|
+
var import_react180 = require("react");
|
|
20496
20647
|
var import_jsx_runtime147 = require("@emotion/react/jsx-runtime");
|
|
20497
|
-
var ParameterTextarea = (0,
|
|
20648
|
+
var ParameterTextarea = (0, import_react180.forwardRef)((props, ref) => {
|
|
20498
20649
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20499
20650
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20500
20651
|
});
|
|
20501
|
-
var ParameterTextareaInner = (0,
|
|
20652
|
+
var ParameterTextareaInner = (0, import_react180.forwardRef)(({ ...props }, ref) => {
|
|
20502
20653
|
const { id, label: label2, hiddenLabel } = useParameterShell();
|
|
20503
20654
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
20504
20655
|
"textarea",
|
|
@@ -20514,14 +20665,14 @@ var ParameterTextareaInner = (0, import_react179.forwardRef)(({ ...props }, ref)
|
|
|
20514
20665
|
|
|
20515
20666
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20516
20667
|
init_emotion_jsx_shim();
|
|
20517
|
-
var
|
|
20668
|
+
var import_react181 = require("react");
|
|
20518
20669
|
var import_jsx_runtime148 = require("@emotion/react/jsx-runtime");
|
|
20519
|
-
var ParameterToggle = (0,
|
|
20670
|
+
var ParameterToggle = (0, import_react181.forwardRef)((props, ref) => {
|
|
20520
20671
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20521
20672
|
return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20522
20673
|
});
|
|
20523
20674
|
ParameterToggle.displayName = "ParameterToggle";
|
|
20524
|
-
var ParameterToggleInner = (0,
|
|
20675
|
+
var ParameterToggleInner = (0, import_react181.forwardRef)(
|
|
20525
20676
|
({ children, ...props }, ref) => {
|
|
20526
20677
|
const { type, withoutIndeterminateState, ...otherProps } = props;
|
|
20527
20678
|
const { id, label: label2 } = useParameterShell();
|
|
@@ -20551,8 +20702,8 @@ init_emotion_jsx_shim();
|
|
|
20551
20702
|
|
|
20552
20703
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20553
20704
|
init_emotion_jsx_shim();
|
|
20554
|
-
var
|
|
20555
|
-
var container4 =
|
|
20705
|
+
var import_react182 = require("@emotion/react");
|
|
20706
|
+
var container4 = import_react182.css`
|
|
20556
20707
|
background: var(--gray-50);
|
|
20557
20708
|
margin-block: var(--spacing-sm);
|
|
20558
20709
|
position: relative;
|
|
@@ -20562,17 +20713,17 @@ var container4 = import_react181.css`
|
|
|
20562
20713
|
border: solid 1px var(--gray-300);
|
|
20563
20714
|
`;
|
|
20564
20715
|
var themeMap = {
|
|
20565
|
-
primary:
|
|
20716
|
+
primary: import_react182.css`
|
|
20566
20717
|
--progress-color: var(--accent-light);
|
|
20567
20718
|
`,
|
|
20568
|
-
secondary:
|
|
20719
|
+
secondary: import_react182.css`
|
|
20569
20720
|
--progress-color: var(--accent-alt-light);
|
|
20570
20721
|
`,
|
|
20571
|
-
destructive:
|
|
20722
|
+
destructive: import_react182.css`
|
|
20572
20723
|
--progress-color: var(--brand-secondary-5);
|
|
20573
20724
|
`
|
|
20574
20725
|
};
|
|
20575
|
-
var slidingBackgroundPosition =
|
|
20726
|
+
var slidingBackgroundPosition = import_react182.keyframes`
|
|
20576
20727
|
from {
|
|
20577
20728
|
background-position: 0 0;
|
|
20578
20729
|
}
|
|
@@ -20580,10 +20731,10 @@ var slidingBackgroundPosition = import_react181.keyframes`
|
|
|
20580
20731
|
background-position: 64px 0;
|
|
20581
20732
|
}
|
|
20582
20733
|
`;
|
|
20583
|
-
var determinate =
|
|
20734
|
+
var determinate = import_react182.css`
|
|
20584
20735
|
background-color: var(--progress-color);
|
|
20585
20736
|
`;
|
|
20586
|
-
var indeterminate =
|
|
20737
|
+
var indeterminate = import_react182.css`
|
|
20587
20738
|
background-image: linear-gradient(
|
|
20588
20739
|
45deg,
|
|
20589
20740
|
var(--progress-color) 25%,
|
|
@@ -20597,7 +20748,7 @@ var indeterminate = import_react181.css`
|
|
|
20597
20748
|
background-size: 64px 64px;
|
|
20598
20749
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
20599
20750
|
`;
|
|
20600
|
-
var bar =
|
|
20751
|
+
var bar = import_react182.css`
|
|
20601
20752
|
position: absolute;
|
|
20602
20753
|
inset: 0;
|
|
20603
20754
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20646,22 +20797,22 @@ function ProgressBar({
|
|
|
20646
20797
|
|
|
20647
20798
|
// src/components/ProgressList/ProgressList.tsx
|
|
20648
20799
|
init_emotion_jsx_shim();
|
|
20649
|
-
var
|
|
20800
|
+
var import_react184 = require("@emotion/react");
|
|
20650
20801
|
var import_CgCheckO4 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20651
20802
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20652
20803
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20653
|
-
var
|
|
20804
|
+
var import_react185 = require("react");
|
|
20654
20805
|
|
|
20655
20806
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20656
20807
|
init_emotion_jsx_shim();
|
|
20657
|
-
var
|
|
20658
|
-
var progressListStyles =
|
|
20808
|
+
var import_react183 = require("@emotion/react");
|
|
20809
|
+
var progressListStyles = import_react183.css`
|
|
20659
20810
|
display: flex;
|
|
20660
20811
|
flex-direction: column;
|
|
20661
20812
|
gap: var(--spacing-sm);
|
|
20662
20813
|
list-style-type: none;
|
|
20663
20814
|
`;
|
|
20664
|
-
var progressListItemStyles =
|
|
20815
|
+
var progressListItemStyles = import_react183.css`
|
|
20665
20816
|
display: flex;
|
|
20666
20817
|
gap: var(--spacing-base);
|
|
20667
20818
|
align-items: center;
|
|
@@ -20670,7 +20821,7 @@ var progressListItemStyles = import_react182.css`
|
|
|
20670
20821
|
// src/components/ProgressList/ProgressList.tsx
|
|
20671
20822
|
var import_jsx_runtime150 = require("@emotion/react/jsx-runtime");
|
|
20672
20823
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20673
|
-
const itemsWithStatus = (0,
|
|
20824
|
+
const itemsWithStatus = (0, import_react185.useMemo)(() => {
|
|
20674
20825
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20675
20826
|
return items.map((item, index) => {
|
|
20676
20827
|
let status = "queued";
|
|
@@ -20703,7 +20854,7 @@ var ProgressListItem = ({
|
|
|
20703
20854
|
errorLevel = "danger",
|
|
20704
20855
|
autoEllipsis = false
|
|
20705
20856
|
}) => {
|
|
20706
|
-
const icon = (0,
|
|
20857
|
+
const icon = (0, import_react185.useMemo)(() => {
|
|
20707
20858
|
if (error) {
|
|
20708
20859
|
return warningIcon;
|
|
20709
20860
|
}
|
|
@@ -20714,14 +20865,14 @@ var ProgressListItem = ({
|
|
|
20714
20865
|
};
|
|
20715
20866
|
return iconPerStatus[status];
|
|
20716
20867
|
}, [status, error]);
|
|
20717
|
-
const statusStyles = (0,
|
|
20868
|
+
const statusStyles = (0, import_react185.useMemo)(() => {
|
|
20718
20869
|
if (error) {
|
|
20719
|
-
return errorLevel === "caution" ?
|
|
20870
|
+
return errorLevel === "caution" ? import_react184.css`
|
|
20720
20871
|
color: rgb(161, 98, 7);
|
|
20721
20872
|
& svg {
|
|
20722
20873
|
color: rgb(250, 204, 21);
|
|
20723
20874
|
}
|
|
20724
|
-
` :
|
|
20875
|
+
` : import_react184.css`
|
|
20725
20876
|
color: rgb(185, 28, 28);
|
|
20726
20877
|
& svg {
|
|
20727
20878
|
color: var(--brand-primary-2);
|
|
@@ -20729,13 +20880,13 @@ var ProgressListItem = ({
|
|
|
20729
20880
|
`;
|
|
20730
20881
|
}
|
|
20731
20882
|
const colorPerStatus = {
|
|
20732
|
-
completed:
|
|
20883
|
+
completed: import_react184.css`
|
|
20733
20884
|
opacity: 0.75;
|
|
20734
20885
|
`,
|
|
20735
|
-
inProgress:
|
|
20886
|
+
inProgress: import_react184.css`
|
|
20736
20887
|
-webkit-text-stroke-width: thin;
|
|
20737
20888
|
`,
|
|
20738
|
-
queued:
|
|
20889
|
+
queued: import_react184.css`
|
|
20739
20890
|
opacity: 0.5;
|
|
20740
20891
|
`
|
|
20741
20892
|
};
|
|
@@ -20752,16 +20903,16 @@ var ProgressListItem = ({
|
|
|
20752
20903
|
|
|
20753
20904
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20754
20905
|
init_emotion_jsx_shim();
|
|
20755
|
-
var
|
|
20756
|
-
var
|
|
20906
|
+
var import_react187 = require("@emotion/react");
|
|
20907
|
+
var import_react188 = require("react");
|
|
20757
20908
|
|
|
20758
20909
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20759
20910
|
init_emotion_jsx_shim();
|
|
20760
|
-
var
|
|
20761
|
-
var segmentedControlRootStyles =
|
|
20911
|
+
var import_react186 = require("@emotion/react");
|
|
20912
|
+
var segmentedControlRootStyles = import_react186.css`
|
|
20762
20913
|
position: relative;
|
|
20763
20914
|
`;
|
|
20764
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
20915
|
+
var segmentedControlScrollIndicatorsStyles = import_react186.css`
|
|
20765
20916
|
position: absolute;
|
|
20766
20917
|
inset: 0;
|
|
20767
20918
|
z-index: 1;
|
|
@@ -20789,17 +20940,17 @@ var segmentedControlScrollIndicatorsStyles = import_react185.css`
|
|
|
20789
20940
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
20790
20941
|
}
|
|
20791
20942
|
`;
|
|
20792
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
20943
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react186.css`
|
|
20793
20944
|
&::before {
|
|
20794
20945
|
opacity: 1;
|
|
20795
20946
|
}
|
|
20796
20947
|
`;
|
|
20797
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
20948
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react186.css`
|
|
20798
20949
|
&::after {
|
|
20799
20950
|
opacity: 1;
|
|
20800
20951
|
}
|
|
20801
20952
|
`;
|
|
20802
|
-
var segmentedControlWrapperStyles =
|
|
20953
|
+
var segmentedControlWrapperStyles = import_react186.css`
|
|
20803
20954
|
overflow-y: auto;
|
|
20804
20955
|
scroll-behavior: smooth;
|
|
20805
20956
|
scrollbar-width: none;
|
|
@@ -20808,7 +20959,7 @@ var segmentedControlWrapperStyles = import_react185.css`
|
|
|
20808
20959
|
height: 0px;
|
|
20809
20960
|
}
|
|
20810
20961
|
`;
|
|
20811
|
-
var segmentedControlStyles =
|
|
20962
|
+
var segmentedControlStyles = import_react186.css`
|
|
20812
20963
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20813
20964
|
--segmented-control-border-width: 1px;
|
|
20814
20965
|
--segmented-control-selected-color: var(--accent-dark);
|
|
@@ -20828,14 +20979,14 @@ var segmentedControlStyles = import_react185.css`
|
|
|
20828
20979
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20829
20980
|
font-size: var(--fs-xs);
|
|
20830
20981
|
`;
|
|
20831
|
-
var segmentedControlVerticalStyles =
|
|
20982
|
+
var segmentedControlVerticalStyles = import_react186.css`
|
|
20832
20983
|
flex-direction: column;
|
|
20833
20984
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20834
20985
|
var(--segmented-control-rounded-value) 0 0;
|
|
20835
20986
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20836
20987
|
var(--segmented-control-rounded-value);
|
|
20837
20988
|
`;
|
|
20838
|
-
var segmentedControlItemStyles =
|
|
20989
|
+
var segmentedControlItemStyles = import_react186.css`
|
|
20839
20990
|
position: relative;
|
|
20840
20991
|
|
|
20841
20992
|
&:first-of-type label {
|
|
@@ -20861,10 +21012,10 @@ var segmentedControlItemStyles = import_react185.css`
|
|
|
20861
21012
|
box-shadow: var(--segmented-control-border-width) 0 0 0 transparent;
|
|
20862
21013
|
}
|
|
20863
21014
|
`;
|
|
20864
|
-
var segmentedControlInputStyles =
|
|
21015
|
+
var segmentedControlInputStyles = import_react186.css`
|
|
20865
21016
|
${accessibleHidden}
|
|
20866
21017
|
`;
|
|
20867
|
-
var segmentedControlLabelStyles =
|
|
21018
|
+
var segmentedControlLabelStyles = import_react186.css`
|
|
20868
21019
|
position: relative;
|
|
20869
21020
|
display: flex;
|
|
20870
21021
|
align-items: center;
|
|
@@ -20899,20 +21050,20 @@ var segmentedControlLabelStyles = import_react185.css`
|
|
|
20899
21050
|
background-color: var(--gray-400);
|
|
20900
21051
|
}
|
|
20901
21052
|
`;
|
|
20902
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21053
|
+
var segmentedControlLabelIconOnlyStyles = import_react186.css`
|
|
20903
21054
|
padding-inline: 0.5em;
|
|
20904
21055
|
`;
|
|
20905
|
-
var segmentedControlLabelCheckStyles =
|
|
21056
|
+
var segmentedControlLabelCheckStyles = import_react186.css`
|
|
20906
21057
|
opacity: 0.5;
|
|
20907
21058
|
`;
|
|
20908
|
-
var segmentedControlLabelContentStyles =
|
|
21059
|
+
var segmentedControlLabelContentStyles = import_react186.css`
|
|
20909
21060
|
display: flex;
|
|
20910
21061
|
align-items: center;
|
|
20911
21062
|
justify-content: center;
|
|
20912
21063
|
gap: var(--spacing-sm);
|
|
20913
21064
|
height: 100%;
|
|
20914
21065
|
`;
|
|
20915
|
-
var segmentedControlLabelTextStyles =
|
|
21066
|
+
var segmentedControlLabelTextStyles = import_react186.css`
|
|
20916
21067
|
white-space: nowrap;
|
|
20917
21068
|
`;
|
|
20918
21069
|
|
|
@@ -20933,10 +21084,10 @@ var SegmentedControl = ({
|
|
|
20933
21084
|
// deprecated, destructured to prevent spreading to DOM
|
|
20934
21085
|
...props
|
|
20935
21086
|
}) => {
|
|
20936
|
-
const wrapperRef = (0,
|
|
20937
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
20938
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
20939
|
-
const onOptionChange = (0,
|
|
21087
|
+
const wrapperRef = (0, import_react188.useRef)(null);
|
|
21088
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react188.useState)(false);
|
|
21089
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react188.useState)(false);
|
|
21090
|
+
const onOptionChange = (0, import_react188.useCallback)(
|
|
20940
21091
|
(event) => {
|
|
20941
21092
|
if (event.target.checked) {
|
|
20942
21093
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20944,19 +21095,19 @@ var SegmentedControl = ({
|
|
|
20944
21095
|
},
|
|
20945
21096
|
[options, onChange]
|
|
20946
21097
|
);
|
|
20947
|
-
const sizeStyles = (0,
|
|
21098
|
+
const sizeStyles = (0, import_react188.useMemo)(() => {
|
|
20948
21099
|
const map = {
|
|
20949
|
-
sm: (0,
|
|
20950
|
-
md: (0,
|
|
20951
|
-
lg: (0,
|
|
20952
|
-
xl: (0,
|
|
21100
|
+
sm: (0, import_react187.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
21101
|
+
md: (0, import_react187.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
21102
|
+
lg: (0, import_react187.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
21103
|
+
xl: (0, import_react187.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
20953
21104
|
};
|
|
20954
21105
|
return map[size];
|
|
20955
21106
|
}, [size]);
|
|
20956
|
-
const isIconOnly = (0,
|
|
21107
|
+
const isIconOnly = (0, import_react188.useMemo)(() => {
|
|
20957
21108
|
return options.every((option) => option && option.icon && !option.label);
|
|
20958
21109
|
}, [options]);
|
|
20959
|
-
(0,
|
|
21110
|
+
(0, import_react188.useEffect)(() => {
|
|
20960
21111
|
const wrapperElement = wrapperRef.current;
|
|
20961
21112
|
const onScroll = () => {
|
|
20962
21113
|
if (!wrapperElement) {
|
|
@@ -21051,12 +21202,12 @@ init_emotion_jsx_shim();
|
|
|
21051
21202
|
|
|
21052
21203
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
21053
21204
|
init_emotion_jsx_shim();
|
|
21054
|
-
var
|
|
21055
|
-
var lightFadingOut =
|
|
21205
|
+
var import_react189 = require("@emotion/react");
|
|
21206
|
+
var lightFadingOut = import_react189.keyframes`
|
|
21056
21207
|
from { opacity: 0.1; }
|
|
21057
21208
|
to { opacity: 0.025; }
|
|
21058
21209
|
`;
|
|
21059
|
-
var skeletonStyles =
|
|
21210
|
+
var skeletonStyles = import_react189.css`
|
|
21060
21211
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
21061
21212
|
background-color: var(--gray-500);
|
|
21062
21213
|
`;
|
|
@@ -21094,12 +21245,12 @@ init_emotion_jsx_shim();
|
|
|
21094
21245
|
|
|
21095
21246
|
// src/components/Spinner/Spinner.tsx
|
|
21096
21247
|
init_emotion_jsx_shim();
|
|
21097
|
-
var
|
|
21248
|
+
var import_react191 = require("react");
|
|
21098
21249
|
|
|
21099
21250
|
// src/components/Spinner/Spinner.styles.ts
|
|
21100
21251
|
init_emotion_jsx_shim();
|
|
21101
|
-
var
|
|
21102
|
-
var SpinnerStyles =
|
|
21252
|
+
var import_react190 = require("@emotion/react");
|
|
21253
|
+
var SpinnerStyles = import_react190.css`
|
|
21103
21254
|
--color: #00b4ff;
|
|
21104
21255
|
--speed: 5s;
|
|
21105
21256
|
--red: rgb(218, 63, 50);
|
|
@@ -21535,8 +21686,8 @@ var Spinner = ({
|
|
|
21535
21686
|
label: label2,
|
|
21536
21687
|
isPaused
|
|
21537
21688
|
}) => {
|
|
21538
|
-
const ref = (0,
|
|
21539
|
-
(0,
|
|
21689
|
+
const ref = (0, import_react191.useRef)(null);
|
|
21690
|
+
(0, import_react191.useEffect)(() => {
|
|
21540
21691
|
var _a, _b, _c;
|
|
21541
21692
|
(_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
|
|
21542
21693
|
}, [width]);
|
|
@@ -21608,11 +21759,11 @@ init_emotion_jsx_shim();
|
|
|
21608
21759
|
|
|
21609
21760
|
// src/components/StackedModal/hooks/StackedModalProvider.tsx
|
|
21610
21761
|
init_emotion_jsx_shim();
|
|
21611
|
-
var
|
|
21762
|
+
var import_react192 = require("react");
|
|
21612
21763
|
var import_jsx_runtime154 = require("@emotion/react/jsx-runtime");
|
|
21613
|
-
var StackedModalContext = (0,
|
|
21764
|
+
var StackedModalContext = (0, import_react192.createContext)(null);
|
|
21614
21765
|
function useStackedModal() {
|
|
21615
|
-
const context = (0,
|
|
21766
|
+
const context = (0, import_react192.useContext)(StackedModalContext);
|
|
21616
21767
|
if (!context) {
|
|
21617
21768
|
throw new Error("useStackedModal must be used within a <StackedModal> component.");
|
|
21618
21769
|
}
|
|
@@ -21628,10 +21779,10 @@ function useStepTransition(index) {
|
|
|
21628
21779
|
};
|
|
21629
21780
|
}
|
|
21630
21781
|
function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
21631
|
-
const [currentStep, setCurrentStep] = (0,
|
|
21632
|
-
const [direction, setDirection] = (0,
|
|
21633
|
-
const previousStepRef = (0,
|
|
21634
|
-
const nextStep = (0,
|
|
21782
|
+
const [currentStep, setCurrentStep] = (0, import_react192.useState)(initialStep);
|
|
21783
|
+
const [direction, setDirection] = (0, import_react192.useState)("forward");
|
|
21784
|
+
const previousStepRef = (0, import_react192.useRef)(initialStep);
|
|
21785
|
+
const nextStep = (0, import_react192.useCallback)(() => {
|
|
21635
21786
|
setCurrentStep((prev) => {
|
|
21636
21787
|
if (prev >= totalSteps - 1) {
|
|
21637
21788
|
return prev;
|
|
@@ -21641,7 +21792,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21641
21792
|
return prev + 1;
|
|
21642
21793
|
});
|
|
21643
21794
|
}, [totalSteps]);
|
|
21644
|
-
const goBack = (0,
|
|
21795
|
+
const goBack = (0, import_react192.useCallback)(() => {
|
|
21645
21796
|
setCurrentStep((prev) => {
|
|
21646
21797
|
if (prev <= 0) {
|
|
21647
21798
|
return prev;
|
|
@@ -21651,7 +21802,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21651
21802
|
return prev - 1;
|
|
21652
21803
|
});
|
|
21653
21804
|
}, []);
|
|
21654
|
-
const goToStep = (0,
|
|
21805
|
+
const goToStep = (0, import_react192.useCallback)(
|
|
21655
21806
|
(index) => {
|
|
21656
21807
|
setCurrentStep((prev) => {
|
|
21657
21808
|
if (index < 0 || index >= totalSteps || index === prev) {
|
|
@@ -21664,7 +21815,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21664
21815
|
},
|
|
21665
21816
|
[totalSteps]
|
|
21666
21817
|
);
|
|
21667
|
-
const value = (0,
|
|
21818
|
+
const value = (0, import_react192.useMemo)(
|
|
21668
21819
|
() => ({
|
|
21669
21820
|
currentStep,
|
|
21670
21821
|
totalSteps,
|
|
@@ -21681,7 +21832,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
|
|
|
21681
21832
|
|
|
21682
21833
|
// src/components/StackedModal/StackedModal.tsx
|
|
21683
21834
|
init_emotion_jsx_shim();
|
|
21684
|
-
var
|
|
21835
|
+
var import_react194 = __toESM(require("react"));
|
|
21685
21836
|
|
|
21686
21837
|
// src/components/StackedModal/AnimatedStepHeader.tsx
|
|
21687
21838
|
init_emotion_jsx_shim();
|
|
@@ -21691,13 +21842,13 @@ init_emotion_jsx_shim();
|
|
|
21691
21842
|
|
|
21692
21843
|
// src/components/StackedModal/styles/StackedModal.styles.ts
|
|
21693
21844
|
init_emotion_jsx_shim();
|
|
21694
|
-
var
|
|
21695
|
-
var stackedModalRootStyles =
|
|
21696
|
-
dialog > div {
|
|
21697
|
-
background: var(--
|
|
21845
|
+
var import_react193 = require("@emotion/react");
|
|
21846
|
+
var stackedModalRootStyles = import_react193.css`
|
|
21847
|
+
& > dialog > div {
|
|
21848
|
+
background: var(--gray-50);
|
|
21698
21849
|
}
|
|
21699
21850
|
`;
|
|
21700
|
-
var slideInFromRight =
|
|
21851
|
+
var slideInFromRight = import_react193.keyframes`
|
|
21701
21852
|
from {
|
|
21702
21853
|
transform: translateX(100%);
|
|
21703
21854
|
opacity: 0;
|
|
@@ -21707,7 +21858,7 @@ var slideInFromRight = import_react192.keyframes`
|
|
|
21707
21858
|
opacity: 1;
|
|
21708
21859
|
}
|
|
21709
21860
|
`;
|
|
21710
|
-
var slideOutToLeft =
|
|
21861
|
+
var slideOutToLeft = import_react193.keyframes`
|
|
21711
21862
|
from {
|
|
21712
21863
|
transform: translateX(0);
|
|
21713
21864
|
opacity: 1;
|
|
@@ -21717,7 +21868,7 @@ var slideOutToLeft = import_react192.keyframes`
|
|
|
21717
21868
|
opacity: 0;
|
|
21718
21869
|
}
|
|
21719
21870
|
`;
|
|
21720
|
-
var slideInFromLeft =
|
|
21871
|
+
var slideInFromLeft = import_react193.keyframes`
|
|
21721
21872
|
from {
|
|
21722
21873
|
transform: translateX(-100%);
|
|
21723
21874
|
opacity: 0;
|
|
@@ -21727,7 +21878,7 @@ var slideInFromLeft = import_react192.keyframes`
|
|
|
21727
21878
|
opacity: 1;
|
|
21728
21879
|
}
|
|
21729
21880
|
`;
|
|
21730
|
-
var slideOutToRight =
|
|
21881
|
+
var slideOutToRight = import_react193.keyframes`
|
|
21731
21882
|
from {
|
|
21732
21883
|
transform: translateX(0);
|
|
21733
21884
|
opacity: 1;
|
|
@@ -21737,70 +21888,73 @@ var slideOutToRight = import_react192.keyframes`
|
|
|
21737
21888
|
opacity: 0;
|
|
21738
21889
|
}
|
|
21739
21890
|
`;
|
|
21740
|
-
var stepContainerStyles =
|
|
21891
|
+
var stepContainerStyles = import_react193.css`
|
|
21741
21892
|
position: relative;
|
|
21742
21893
|
flex: 1;
|
|
21743
|
-
overflow:
|
|
21894
|
+
overflow: clip;
|
|
21895
|
+
min-width: 0;
|
|
21744
21896
|
height: 100%;
|
|
21745
21897
|
`;
|
|
21746
|
-
var stepBaseStyles =
|
|
21898
|
+
var stepBaseStyles = import_react193.css`
|
|
21747
21899
|
position: absolute;
|
|
21748
21900
|
inset: 0;
|
|
21749
21901
|
display: flex;
|
|
21750
21902
|
flex-direction: column;
|
|
21751
21903
|
gap: var(--spacing-base);
|
|
21752
21904
|
`;
|
|
21753
|
-
var stepActiveStyles =
|
|
21905
|
+
var stepActiveStyles = import_react193.css`
|
|
21754
21906
|
visibility: visible;
|
|
21755
21907
|
`;
|
|
21756
|
-
var stepInactiveStyles =
|
|
21908
|
+
var stepInactiveStyles = import_react193.css`
|
|
21757
21909
|
visibility: hidden;
|
|
21758
21910
|
`;
|
|
21759
|
-
var stepEnterForwardStyles =
|
|
21911
|
+
var stepEnterForwardStyles = import_react193.css`
|
|
21760
21912
|
animation: ${slideInFromRight} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21761
21913
|
|
|
21762
21914
|
${prefersReducedMotion("reduce")} {
|
|
21763
21915
|
animation: none;
|
|
21764
21916
|
}
|
|
21765
21917
|
`;
|
|
21766
|
-
var stepExitForwardStyles =
|
|
21918
|
+
var stepExitForwardStyles = import_react193.css`
|
|
21767
21919
|
animation: ${slideOutToLeft} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21768
21920
|
|
|
21769
21921
|
${prefersReducedMotion("reduce")} {
|
|
21770
21922
|
animation: none;
|
|
21771
21923
|
}
|
|
21772
21924
|
`;
|
|
21773
|
-
var stepEnterBackwardStyles =
|
|
21925
|
+
var stepEnterBackwardStyles = import_react193.css`
|
|
21774
21926
|
animation: ${slideInFromLeft} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21775
21927
|
|
|
21776
21928
|
${prefersReducedMotion("reduce")} {
|
|
21777
21929
|
animation: none;
|
|
21778
21930
|
}
|
|
21779
21931
|
`;
|
|
21780
|
-
var stepExitBackwardStyles =
|
|
21932
|
+
var stepExitBackwardStyles = import_react193.css`
|
|
21781
21933
|
animation: ${slideOutToRight} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
21782
21934
|
|
|
21783
21935
|
${prefersReducedMotion("reduce")} {
|
|
21784
21936
|
animation: none;
|
|
21785
21937
|
}
|
|
21786
21938
|
`;
|
|
21787
|
-
var headerContainerStyles =
|
|
21939
|
+
var headerContainerStyles = import_react193.css`
|
|
21788
21940
|
position: relative;
|
|
21789
21941
|
overflow: hidden;
|
|
21790
21942
|
flex: 1;
|
|
21791
21943
|
`;
|
|
21792
|
-
var headerItemStyles = (isActive) =>
|
|
21944
|
+
var headerItemStyles = (isActive) => import_react193.css`
|
|
21793
21945
|
position: ${isActive ? "relative" : "absolute"};
|
|
21794
21946
|
inset: 0;
|
|
21795
21947
|
white-space: nowrap;
|
|
21948
|
+
overflow: hidden;
|
|
21949
|
+
text-overflow: ellipsis;
|
|
21796
21950
|
`;
|
|
21797
|
-
var stepContentStyles =
|
|
21951
|
+
var stepContentStyles = import_react193.css`
|
|
21798
21952
|
position: relative;
|
|
21799
21953
|
flex: 1;
|
|
21800
21954
|
overflow: auto;
|
|
21801
|
-
padding: var(--spacing-md);
|
|
21802
21955
|
border-radius: var(--rounded-sm);
|
|
21803
21956
|
${scrollbarStyles}
|
|
21957
|
+
background: var(--white);
|
|
21804
21958
|
`;
|
|
21805
21959
|
|
|
21806
21960
|
// src/components/StackedModal/styles/getStepAnimationStyles.ts
|
|
@@ -21850,30 +22004,42 @@ var import_jsx_runtime156 = require("@emotion/react/jsx-runtime");
|
|
|
21850
22004
|
function StackedModalStep({ children, buttonGroup }) {
|
|
21851
22005
|
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(import_jsx_runtime156.Fragment, { children: [
|
|
21852
22006
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { css: stepContentStyles, children }),
|
|
21853
|
-
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
22007
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
22008
|
+
HorizontalRhythm,
|
|
22009
|
+
{
|
|
22010
|
+
gap: "sm",
|
|
22011
|
+
align: "center",
|
|
22012
|
+
css: {
|
|
22013
|
+
// Some buttons rely on an outline for their border which gets cut by overflow: hidden;
|
|
22014
|
+
padding: "1px"
|
|
22015
|
+
},
|
|
22016
|
+
children: buttonGroup
|
|
22017
|
+
}
|
|
22018
|
+
) : null
|
|
21854
22019
|
] });
|
|
21855
22020
|
}
|
|
21856
22021
|
|
|
21857
22022
|
// src/components/StackedModal/StackedModal.tsx
|
|
21858
22023
|
var import_jsx_runtime157 = require("@emotion/react/jsx-runtime");
|
|
21859
22024
|
function filterSteps(children) {
|
|
21860
|
-
return
|
|
21861
|
-
(child) =>
|
|
22025
|
+
return import_react194.default.Children.toArray(children).filter(
|
|
22026
|
+
(child) => import_react194.default.isValidElement(child) && child.type === StackedModalStep
|
|
21862
22027
|
);
|
|
21863
22028
|
}
|
|
21864
|
-
var StackedModal =
|
|
22029
|
+
var StackedModal = import_react194.default.forwardRef(
|
|
21865
22030
|
({ children, initialStep = 0, ...rest }, ref) => {
|
|
21866
22031
|
const steps = filterSteps(children);
|
|
21867
22032
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(StackedModalProvider, { totalSteps: steps.length, initialStep, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(StackedModalInner, { ref, steps, ...rest }) });
|
|
21868
22033
|
}
|
|
21869
22034
|
);
|
|
21870
22035
|
StackedModal.displayName = "StackedModal";
|
|
21871
|
-
var StackedModalInner =
|
|
21872
|
-
({ steps, onRequestClose, modalSize = "lg", width, height }, ref) => {
|
|
22036
|
+
var StackedModalInner = import_react194.default.forwardRef(
|
|
22037
|
+
({ steps, onRequestClose, modalSize = "lg", width, height, "data-testid": dataTestId }, ref) => {
|
|
21873
22038
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { css: stackedModalRootStyles, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
21874
22039
|
Modal,
|
|
21875
22040
|
{
|
|
21876
22041
|
ref,
|
|
22042
|
+
...dataTestId ? { "data-testid": dataTestId } : {},
|
|
21877
22043
|
header: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(AnimatedStepHeader, { steps }),
|
|
21878
22044
|
onRequestClose,
|
|
21879
22045
|
modalSize,
|
|
@@ -21896,14 +22062,25 @@ function StackedModalStepWrapper({ index, children }) {
|
|
|
21896
22062
|
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { css: [stepBaseStyles, getStepAnimationStyles(transition)], "aria-hidden": !transition.isActive, children });
|
|
21897
22063
|
}
|
|
21898
22064
|
|
|
22065
|
+
// src/components/StackedModal/StackedModalHeader.tsx
|
|
22066
|
+
init_emotion_jsx_shim();
|
|
22067
|
+
var import_CgChevronLeft3 = require("@react-icons/all-files/cg/CgChevronLeft");
|
|
22068
|
+
var import_jsx_runtime158 = require("@emotion/react/jsx-runtime");
|
|
22069
|
+
var StackedModalHeader = ({ children, onBack, icon = import_CgChevronLeft3.CgChevronLeft }) => {
|
|
22070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(HorizontalRhythm, { gap: "sm", align: "center", children: [
|
|
22071
|
+
onBack ? /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(IconButton, { onClick: onBack, buttonType: "unimportant", size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(Icon, { icon, size: "1rem" }) }) : null,
|
|
22072
|
+
children
|
|
22073
|
+
] });
|
|
22074
|
+
};
|
|
22075
|
+
|
|
21899
22076
|
// src/components/Switch/Switch.tsx
|
|
21900
22077
|
init_emotion_jsx_shim();
|
|
21901
|
-
var
|
|
22078
|
+
var import_react196 = require("react");
|
|
21902
22079
|
|
|
21903
22080
|
// src/components/Switch/Switch.styles.ts
|
|
21904
22081
|
init_emotion_jsx_shim();
|
|
21905
|
-
var
|
|
21906
|
-
var SwitchInputContainer =
|
|
22082
|
+
var import_react195 = require("@emotion/react");
|
|
22083
|
+
var SwitchInputContainer = import_react195.css`
|
|
21907
22084
|
cursor: pointer;
|
|
21908
22085
|
display: inline-flex;
|
|
21909
22086
|
position: relative;
|
|
@@ -21913,7 +22090,7 @@ var SwitchInputContainer = import_react194.css`
|
|
|
21913
22090
|
user-select: none;
|
|
21914
22091
|
z-index: 0;
|
|
21915
22092
|
`;
|
|
21916
|
-
var SwitchInput = (size) =>
|
|
22093
|
+
var SwitchInput = (size) => import_react195.css`
|
|
21917
22094
|
appearance: none;
|
|
21918
22095
|
border-radius: var(--rounded-full);
|
|
21919
22096
|
background-color: var(--white);
|
|
@@ -21964,18 +22141,18 @@ var SwitchInput = (size) => import_react194.css`
|
|
|
21964
22141
|
cursor: not-allowed;
|
|
21965
22142
|
}
|
|
21966
22143
|
`;
|
|
21967
|
-
var SwitchInputCheckedDirectionLeft =
|
|
22144
|
+
var SwitchInputCheckedDirectionLeft = import_react195.css`
|
|
21968
22145
|
&:checked {
|
|
21969
22146
|
transform: translateX(var(--spacing-base));
|
|
21970
22147
|
}
|
|
21971
22148
|
`;
|
|
21972
|
-
var SwitchInputCheckedDirectionRight =
|
|
22149
|
+
var SwitchInputCheckedDirectionRight = import_react195.css`
|
|
21973
22150
|
transform: translateX(-var(--spacing-base));
|
|
21974
22151
|
&:checked {
|
|
21975
22152
|
transform: translateX(0);
|
|
21976
22153
|
}
|
|
21977
22154
|
`;
|
|
21978
|
-
var SwitchInputDisabled =
|
|
22155
|
+
var SwitchInputDisabled = import_react195.css`
|
|
21979
22156
|
opacity: var(--opacity-50);
|
|
21980
22157
|
cursor: not-allowed;
|
|
21981
22158
|
|
|
@@ -21983,19 +22160,19 @@ var SwitchInputDisabled = import_react194.css`
|
|
|
21983
22160
|
cursor: not-allowed;
|
|
21984
22161
|
}
|
|
21985
22162
|
`;
|
|
21986
|
-
var SwitchInputLabelAlignmentLeft = (size) =>
|
|
22163
|
+
var SwitchInputLabelAlignmentLeft = (size) => import_react195.css`
|
|
21987
22164
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
21988
22165
|
&:before {
|
|
21989
22166
|
left: 0;
|
|
21990
22167
|
}
|
|
21991
22168
|
`;
|
|
21992
|
-
var SwitchInputLabelAlignmentRight = (size) =>
|
|
22169
|
+
var SwitchInputLabelAlignmentRight = (size) => import_react195.css`
|
|
21993
22170
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
21994
22171
|
&:before {
|
|
21995
22172
|
right: 0;
|
|
21996
22173
|
}
|
|
21997
22174
|
`;
|
|
21998
|
-
var SwitchInputLabel = (size) =>
|
|
22175
|
+
var SwitchInputLabel = (size) => import_react195.css`
|
|
21999
22176
|
align-items: center;
|
|
22000
22177
|
color: var(--typography-base);
|
|
22001
22178
|
display: inline-flex;
|
|
@@ -22016,26 +22193,26 @@ var SwitchInputLabel = (size) => import_react194.css`
|
|
|
22016
22193
|
top: 0;
|
|
22017
22194
|
}
|
|
22018
22195
|
`;
|
|
22019
|
-
var SwitchTextAlignmentLeft = (size) =>
|
|
22196
|
+
var SwitchTextAlignmentLeft = (size) => import_react195.css`
|
|
22020
22197
|
padding-inline-start: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22021
22198
|
`;
|
|
22022
|
-
var SwitchTextAlignmentRight = (size) =>
|
|
22199
|
+
var SwitchTextAlignmentRight = (size) => import_react195.css`
|
|
22023
22200
|
padding-inline-end: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"};
|
|
22024
22201
|
`;
|
|
22025
|
-
var SwitchText =
|
|
22202
|
+
var SwitchText = import_react195.css`
|
|
22026
22203
|
color: var(--gray-500);
|
|
22027
22204
|
font-size: var(--fs-sm);
|
|
22028
22205
|
`;
|
|
22029
|
-
var SwitchInputContainerAlignmentLeft =
|
|
22206
|
+
var SwitchInputContainerAlignmentLeft = import_react195.css`
|
|
22030
22207
|
flex-direction: row;
|
|
22031
22208
|
`;
|
|
22032
|
-
var SwitchInputContainerAlignmentRight =
|
|
22209
|
+
var SwitchInputContainerAlignmentRight = import_react195.css`
|
|
22033
22210
|
flex-direction: row-reverse;
|
|
22034
22211
|
`;
|
|
22035
22212
|
|
|
22036
22213
|
// src/components/Switch/Switch.tsx
|
|
22037
|
-
var
|
|
22038
|
-
var Switch = (0,
|
|
22214
|
+
var import_jsx_runtime159 = require("@emotion/react/jsx-runtime");
|
|
22215
|
+
var Switch = (0, import_react196.forwardRef)(
|
|
22039
22216
|
({
|
|
22040
22217
|
label: label2,
|
|
22041
22218
|
infoText,
|
|
@@ -22046,7 +22223,7 @@ var Switch = (0, import_react195.forwardRef)(
|
|
|
22046
22223
|
...inputProps
|
|
22047
22224
|
}, ref) => {
|
|
22048
22225
|
let additionalText = infoText;
|
|
22049
|
-
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0,
|
|
22226
|
+
const { SwitchInputContainerAlignmentStyles, SwitchInputCheckedDirection, SwitchInputLabelAlignment } = (0, import_react196.useMemo)(() => {
|
|
22050
22227
|
if (alignment === "left") {
|
|
22051
22228
|
return {
|
|
22052
22229
|
SwitchInputContainerAlignmentStyles: SwitchInputContainerAlignmentLeft,
|
|
@@ -22063,8 +22240,8 @@ var Switch = (0, import_react195.forwardRef)(
|
|
|
22063
22240
|
if (infoText && toggleText) {
|
|
22064
22241
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
22065
22242
|
}
|
|
22066
|
-
return /* @__PURE__ */ (0,
|
|
22067
|
-
/* @__PURE__ */ (0,
|
|
22243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_jsx_runtime159.Fragment, { children: [
|
|
22244
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
|
|
22068
22245
|
"label",
|
|
22069
22246
|
{
|
|
22070
22247
|
css: [
|
|
@@ -22074,7 +22251,7 @@ var Switch = (0, import_react195.forwardRef)(
|
|
|
22074
22251
|
inputProps.disabled ? SwitchInputDisabled : void 0
|
|
22075
22252
|
],
|
|
22076
22253
|
children: [
|
|
22077
|
-
/* @__PURE__ */ (0,
|
|
22254
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
|
|
22078
22255
|
"input",
|
|
22079
22256
|
{
|
|
22080
22257
|
type: "checkbox",
|
|
@@ -22083,11 +22260,11 @@ var Switch = (0, import_react195.forwardRef)(
|
|
|
22083
22260
|
ref
|
|
22084
22261
|
}
|
|
22085
22262
|
),
|
|
22086
|
-
/* @__PURE__ */ (0,
|
|
22263
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { css: [SwitchInputLabel(switchSize), SwitchInputLabelAlignment], children: label2 })
|
|
22087
22264
|
]
|
|
22088
22265
|
}
|
|
22089
22266
|
),
|
|
22090
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
22267
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
|
|
22091
22268
|
"p",
|
|
22092
22269
|
{
|
|
22093
22270
|
css: [
|
|
@@ -22107,8 +22284,8 @@ init_emotion_jsx_shim();
|
|
|
22107
22284
|
|
|
22108
22285
|
// src/components/Table/Table.styles.ts
|
|
22109
22286
|
init_emotion_jsx_shim();
|
|
22110
|
-
var
|
|
22111
|
-
var table = ({ cellPadding = "var(--spacing-sm)" }) =>
|
|
22287
|
+
var import_react197 = require("@emotion/react");
|
|
22288
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react197.css`
|
|
22112
22289
|
border-bottom: 1px solid var(--gray-400);
|
|
22113
22290
|
border-collapse: collapse;
|
|
22114
22291
|
min-width: 100%;
|
|
@@ -22128,21 +22305,21 @@ var table = ({ cellPadding = "var(--spacing-sm)" }) => import_react196.css`
|
|
|
22128
22305
|
background-color: var(--gray-50);
|
|
22129
22306
|
}
|
|
22130
22307
|
`;
|
|
22131
|
-
var tableHead =
|
|
22308
|
+
var tableHead = import_react197.css`
|
|
22132
22309
|
color: var(--typography-base);
|
|
22133
22310
|
text-align: left;
|
|
22134
22311
|
`;
|
|
22135
|
-
var tableRow =
|
|
22312
|
+
var tableRow = import_react197.css`
|
|
22136
22313
|
border-bottom: 1px solid var(--gray-200);
|
|
22137
22314
|
font-size: var(--fs-sm);
|
|
22138
22315
|
`;
|
|
22139
|
-
var tableCellHead =
|
|
22316
|
+
var tableCellHead = import_react197.css`
|
|
22140
22317
|
font-size: var(--fs-sm);
|
|
22141
22318
|
font-weight: var(--fw-regular);
|
|
22142
22319
|
line-height: 1.2;
|
|
22143
22320
|
}
|
|
22144
22321
|
`;
|
|
22145
|
-
var responsiveTableContainer =
|
|
22322
|
+
var responsiveTableContainer = import_react197.css`
|
|
22146
22323
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
22147
22324
|
overflow-x: auto;
|
|
22148
22325
|
${scrollbarStyles}
|
|
@@ -22161,60 +22338,60 @@ var responsiveTableContainer = import_react196.css`
|
|
|
22161
22338
|
`;
|
|
22162
22339
|
|
|
22163
22340
|
// src/components/Table/ResponsiveTableContainer.tsx
|
|
22164
|
-
var
|
|
22341
|
+
var import_jsx_runtime160 = require("@emotion/react/jsx-runtime");
|
|
22165
22342
|
var ResponsiveTableContainer = ({ children }) => {
|
|
22166
|
-
return /* @__PURE__ */ (0,
|
|
22343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("div", { css: responsiveTableContainer, children });
|
|
22167
22344
|
};
|
|
22168
22345
|
|
|
22169
22346
|
// src/components/Table/Table.tsx
|
|
22170
22347
|
init_emotion_jsx_shim();
|
|
22171
|
-
var
|
|
22172
|
-
var
|
|
22173
|
-
var Table =
|
|
22348
|
+
var React26 = __toESM(require("react"));
|
|
22349
|
+
var import_jsx_runtime161 = require("@emotion/react/jsx-runtime");
|
|
22350
|
+
var Table = React26.forwardRef(
|
|
22174
22351
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
22175
|
-
return /* @__PURE__ */ (0,
|
|
22352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
22176
22353
|
}
|
|
22177
22354
|
);
|
|
22178
|
-
var TableHead =
|
|
22355
|
+
var TableHead = React26.forwardRef(
|
|
22179
22356
|
({ children, ...otherProps }, ref) => {
|
|
22180
|
-
return /* @__PURE__ */ (0,
|
|
22357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
22181
22358
|
}
|
|
22182
22359
|
);
|
|
22183
|
-
var TableBody =
|
|
22360
|
+
var TableBody = React26.forwardRef(
|
|
22184
22361
|
({ children, ...otherProps }, ref) => {
|
|
22185
|
-
return /* @__PURE__ */ (0,
|
|
22362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("tbody", { ref, ...otherProps, children });
|
|
22186
22363
|
}
|
|
22187
22364
|
);
|
|
22188
|
-
var TableFoot =
|
|
22365
|
+
var TableFoot = React26.forwardRef(
|
|
22189
22366
|
({ children, ...otherProps }, ref) => {
|
|
22190
|
-
return /* @__PURE__ */ (0,
|
|
22367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("tfoot", { ref, ...otherProps, children });
|
|
22191
22368
|
}
|
|
22192
22369
|
);
|
|
22193
|
-
var TableRow =
|
|
22370
|
+
var TableRow = React26.forwardRef(
|
|
22194
22371
|
({ children, ...otherProps }, ref) => {
|
|
22195
|
-
return /* @__PURE__ */ (0,
|
|
22372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
22196
22373
|
}
|
|
22197
22374
|
);
|
|
22198
|
-
var TableCellHead =
|
|
22375
|
+
var TableCellHead = React26.forwardRef(
|
|
22199
22376
|
({ children, ...otherProps }, ref) => {
|
|
22200
|
-
return /* @__PURE__ */ (0,
|
|
22377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
22201
22378
|
}
|
|
22202
22379
|
);
|
|
22203
|
-
var TableCellData =
|
|
22380
|
+
var TableCellData = React26.forwardRef(
|
|
22204
22381
|
({ children, ...otherProps }, ref) => {
|
|
22205
|
-
return /* @__PURE__ */ (0,
|
|
22382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("td", { ref, ...otherProps, children });
|
|
22206
22383
|
}
|
|
22207
22384
|
);
|
|
22208
22385
|
|
|
22209
22386
|
// src/components/Tabs/Tabs.tsx
|
|
22210
22387
|
init_emotion_jsx_shim();
|
|
22211
22388
|
var import_tabs = require("@base-ui/react/tabs");
|
|
22212
|
-
var
|
|
22389
|
+
var import_react199 = require("react");
|
|
22213
22390
|
|
|
22214
22391
|
// src/components/Tabs/Tabs.styles.ts
|
|
22215
22392
|
init_emotion_jsx_shim();
|
|
22216
|
-
var
|
|
22217
|
-
var tabButtonStyles =
|
|
22393
|
+
var import_react198 = require("@emotion/react");
|
|
22394
|
+
var tabButtonStyles = import_react198.css`
|
|
22218
22395
|
align-items: center;
|
|
22219
22396
|
border: 0;
|
|
22220
22397
|
height: 2.5rem;
|
|
@@ -22231,24 +22408,24 @@ var tabButtonStyles = import_react197.css`
|
|
|
22231
22408
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
22232
22409
|
}
|
|
22233
22410
|
`;
|
|
22234
|
-
var tabButtonGroupStyles =
|
|
22411
|
+
var tabButtonGroupStyles = import_react198.css`
|
|
22235
22412
|
display: flex;
|
|
22236
22413
|
gap: var(--spacing-base);
|
|
22237
22414
|
border-bottom: 1px solid var(--gray-300);
|
|
22238
22415
|
`;
|
|
22239
22416
|
|
|
22240
22417
|
// src/components/Tabs/Tabs.tsx
|
|
22241
|
-
var
|
|
22242
|
-
var TabsContext = (0,
|
|
22418
|
+
var import_jsx_runtime162 = require("@emotion/react/jsx-runtime");
|
|
22419
|
+
var TabsContext = (0, import_react199.createContext)(null);
|
|
22243
22420
|
var useCurrentTab = () => {
|
|
22244
|
-
const context = (0,
|
|
22421
|
+
const context = (0, import_react199.useContext)(TabsContext);
|
|
22245
22422
|
if (!context) {
|
|
22246
22423
|
throw new Error("This component can only be used inside <Tabs>");
|
|
22247
22424
|
}
|
|
22248
22425
|
return context;
|
|
22249
22426
|
};
|
|
22250
|
-
var ManualContext = (0,
|
|
22251
|
-
var TabRegistrationContext = (0,
|
|
22427
|
+
var ManualContext = (0, import_react199.createContext)(false);
|
|
22428
|
+
var TabRegistrationContext = (0, import_react199.createContext)(null);
|
|
22252
22429
|
var Tabs = ({
|
|
22253
22430
|
children,
|
|
22254
22431
|
onSelectedIdChange,
|
|
@@ -22259,14 +22436,14 @@ var Tabs = ({
|
|
|
22259
22436
|
className,
|
|
22260
22437
|
style
|
|
22261
22438
|
}) => {
|
|
22262
|
-
const selected = (0,
|
|
22439
|
+
const selected = (0, import_react199.useMemo)(() => {
|
|
22263
22440
|
if (selectedId) return selectedId;
|
|
22264
22441
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
22265
22442
|
}, [selectedId, useHashForState]);
|
|
22266
22443
|
const isControlled = selected !== void 0;
|
|
22267
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
22268
|
-
const firstTabRegistered = (0,
|
|
22269
|
-
const registerTab = (0,
|
|
22444
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react199.useState)(void 0);
|
|
22445
|
+
const firstTabRegistered = (0, import_react199.useRef)(false);
|
|
22446
|
+
const registerTab = (0, import_react199.useCallback)(
|
|
22270
22447
|
(value) => {
|
|
22271
22448
|
if (!firstTabRegistered.current) {
|
|
22272
22449
|
firstTabRegistered.current = true;
|
|
@@ -22278,7 +22455,7 @@ var Tabs = ({
|
|
|
22278
22455
|
[isControlled]
|
|
22279
22456
|
);
|
|
22280
22457
|
const currentValue = isControlled ? selected : uncontrolledValue;
|
|
22281
|
-
const onTabSelect = (0,
|
|
22458
|
+
const onTabSelect = (0, import_react199.useCallback)(
|
|
22282
22459
|
(value) => {
|
|
22283
22460
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
22284
22461
|
if (!isControlled) {
|
|
@@ -22292,14 +22469,14 @@ var Tabs = ({
|
|
|
22292
22469
|
},
|
|
22293
22470
|
[isControlled, onSelectedIdChange, useHashForState]
|
|
22294
22471
|
);
|
|
22295
|
-
const tabsContextValue = (0,
|
|
22472
|
+
const tabsContextValue = (0, import_react199.useMemo)(
|
|
22296
22473
|
() => ({
|
|
22297
22474
|
value: currentValue,
|
|
22298
22475
|
setValue: (v) => onTabSelect(v)
|
|
22299
22476
|
}),
|
|
22300
22477
|
[currentValue, onTabSelect]
|
|
22301
22478
|
);
|
|
22302
|
-
return /* @__PURE__ */ (0,
|
|
22479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(TabsContext.Provider, { value: tabsContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(TabRegistrationContext.Provider, { value: { registerTab }, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(ManualContext.Provider, { value: !!manual, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
|
|
22303
22480
|
import_tabs.Tabs.Root,
|
|
22304
22481
|
{
|
|
22305
22482
|
value: currentValue != null ? currentValue : null,
|
|
@@ -22312,19 +22489,19 @@ var Tabs = ({
|
|
|
22312
22489
|
) }) }) });
|
|
22313
22490
|
};
|
|
22314
22491
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
22315
|
-
const manual = (0,
|
|
22316
|
-
return /* @__PURE__ */ (0,
|
|
22492
|
+
const manual = (0, import_react199.useContext)(ManualContext);
|
|
22493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_tabs.Tabs.List, { activateOnFocus: !manual, ...props, css: tabButtonGroupStyles, children });
|
|
22317
22494
|
};
|
|
22318
22495
|
var TabButton = ({
|
|
22319
22496
|
children,
|
|
22320
22497
|
id,
|
|
22321
22498
|
...props
|
|
22322
22499
|
}) => {
|
|
22323
|
-
const registration = (0,
|
|
22324
|
-
(0,
|
|
22500
|
+
const registration = (0, import_react199.useContext)(TabRegistrationContext);
|
|
22501
|
+
(0, import_react199.useEffect)(() => {
|
|
22325
22502
|
registration == null ? void 0 : registration.registerTab(id);
|
|
22326
22503
|
}, []);
|
|
22327
|
-
return /* @__PURE__ */ (0,
|
|
22504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_tabs.Tabs.Tab, { type: "button", value: id, "data-tab-id": id, ...props, css: tabButtonStyles, children });
|
|
22328
22505
|
};
|
|
22329
22506
|
var TabContent = ({
|
|
22330
22507
|
children,
|
|
@@ -22335,7 +22512,7 @@ var TabContent = ({
|
|
|
22335
22512
|
}) => {
|
|
22336
22513
|
const panelValue = tabId != null ? tabId : id;
|
|
22337
22514
|
const htmlId = id;
|
|
22338
|
-
return /* @__PURE__ */ (0,
|
|
22515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_tabs.Tabs.Panel, { value: panelValue, id: htmlId, keepMounted, ...props, children });
|
|
22339
22516
|
};
|
|
22340
22517
|
|
|
22341
22518
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -22343,8 +22520,8 @@ init_emotion_jsx_shim();
|
|
|
22343
22520
|
|
|
22344
22521
|
// src/components/Validation/StatusBullet.styles.ts
|
|
22345
22522
|
init_emotion_jsx_shim();
|
|
22346
|
-
var
|
|
22347
|
-
var StatusBulletContainer =
|
|
22523
|
+
var import_react200 = require("@emotion/react");
|
|
22524
|
+
var StatusBulletContainer = import_react200.css`
|
|
22348
22525
|
align-items: center;
|
|
22349
22526
|
align-self: center;
|
|
22350
22527
|
color: var(--gray-500);
|
|
@@ -22360,33 +22537,33 @@ var StatusBulletContainer = import_react199.css`
|
|
|
22360
22537
|
display: block;
|
|
22361
22538
|
}
|
|
22362
22539
|
`;
|
|
22363
|
-
var StatusBulletBase =
|
|
22540
|
+
var StatusBulletBase = import_react200.css`
|
|
22364
22541
|
font-size: var(--fs-sm);
|
|
22365
22542
|
&:before {
|
|
22366
22543
|
width: var(--fs-xs);
|
|
22367
22544
|
height: var(--fs-xs);
|
|
22368
22545
|
}
|
|
22369
22546
|
`;
|
|
22370
|
-
var StatusBulletSmall =
|
|
22547
|
+
var StatusBulletSmall = import_react200.css`
|
|
22371
22548
|
font-size: var(--fs-xs);
|
|
22372
22549
|
&:before {
|
|
22373
22550
|
width: var(--fs-xxs);
|
|
22374
22551
|
height: var(--fs-xxs);
|
|
22375
22552
|
}
|
|
22376
22553
|
`;
|
|
22377
|
-
var StatusDraft =
|
|
22554
|
+
var StatusDraft = import_react200.css`
|
|
22378
22555
|
&:before {
|
|
22379
22556
|
background: var(--white);
|
|
22380
22557
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22381
22558
|
}
|
|
22382
22559
|
`;
|
|
22383
|
-
var StatusModified =
|
|
22560
|
+
var StatusModified = import_react200.css`
|
|
22384
22561
|
&:before {
|
|
22385
22562
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
22386
22563
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
22387
22564
|
}
|
|
22388
22565
|
`;
|
|
22389
|
-
var StatusError =
|
|
22566
|
+
var StatusError = import_react200.css`
|
|
22390
22567
|
color: var(--error);
|
|
22391
22568
|
&:before {
|
|
22392
22569
|
/* TODO: replace this with an svg icon */
|
|
@@ -22399,29 +22576,29 @@ var StatusError = import_react199.css`
|
|
|
22399
22576
|
);
|
|
22400
22577
|
}
|
|
22401
22578
|
`;
|
|
22402
|
-
var StatusPublished =
|
|
22579
|
+
var StatusPublished = import_react200.css`
|
|
22403
22580
|
&:before {
|
|
22404
22581
|
background: var(--accent-dark);
|
|
22405
22582
|
}
|
|
22406
22583
|
`;
|
|
22407
|
-
var StatusOrphan =
|
|
22584
|
+
var StatusOrphan = import_react200.css`
|
|
22408
22585
|
&:before {
|
|
22409
22586
|
background: var(--brand-secondary-5);
|
|
22410
22587
|
}
|
|
22411
22588
|
`;
|
|
22412
|
-
var StatusUnknown =
|
|
22589
|
+
var StatusUnknown = import_react200.css`
|
|
22413
22590
|
&:before {
|
|
22414
22591
|
background: var(--gray-800);
|
|
22415
22592
|
}
|
|
22416
22593
|
`;
|
|
22417
|
-
var StatusDeleted =
|
|
22594
|
+
var StatusDeleted = import_react200.css`
|
|
22418
22595
|
&:before {
|
|
22419
22596
|
background: var(--error);
|
|
22420
22597
|
}
|
|
22421
22598
|
`;
|
|
22422
22599
|
|
|
22423
22600
|
// src/components/Validation/StatusBullet.tsx
|
|
22424
|
-
var
|
|
22601
|
+
var import_jsx_runtime163 = require("@emotion/react/jsx-runtime");
|
|
22425
22602
|
var currentStateStyles = {
|
|
22426
22603
|
Error: StatusError,
|
|
22427
22604
|
Modified: StatusModified,
|
|
@@ -22445,7 +22622,7 @@ var StatusBullet = ({
|
|
|
22445
22622
|
compact = false,
|
|
22446
22623
|
...props
|
|
22447
22624
|
}) => {
|
|
22448
|
-
const StatusComponent = () => /* @__PURE__ */ (0,
|
|
22625
|
+
const StatusComponent = () => /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
|
|
22449
22626
|
"span",
|
|
22450
22627
|
{
|
|
22451
22628
|
role: "status",
|
|
@@ -22456,9 +22633,9 @@ var StatusBullet = ({
|
|
|
22456
22633
|
}
|
|
22457
22634
|
);
|
|
22458
22635
|
if (compact) {
|
|
22459
|
-
return /* @__PURE__ */ (0,
|
|
22636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(StatusComponent, {});
|
|
22460
22637
|
}
|
|
22461
|
-
return /* @__PURE__ */ (0,
|
|
22638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(Tooltip, { title: message != null ? message : status, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(StatusComponent, {}) }) });
|
|
22462
22639
|
};
|
|
22463
22640
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22464
22641
|
0 && (module.exports = {
|
|
@@ -22635,6 +22812,7 @@ var StatusBullet = ({
|
|
|
22635
22812
|
SliderLabels,
|
|
22636
22813
|
Spinner,
|
|
22637
22814
|
StackedModal,
|
|
22815
|
+
StackedModalHeader,
|
|
22638
22816
|
StackedModalStep,
|
|
22639
22817
|
StatusBullet,
|
|
22640
22818
|
SuccessMessage,
|