@uniformdev/design-system 19.173.2-alpha.8 → 19.175.1-alpha.35
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 +556 -429
- package/dist/index.d.mts +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +626 -491
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1444,11 +1444,12 @@ __export(src_exports, {
|
|
|
1444
1444
|
ObjectGridItemCoverButton: () => ObjectGridItemCoverButton,
|
|
1445
1445
|
ObjectGridItemHeading: () => ObjectGridItemHeading2,
|
|
1446
1446
|
ObjectGridItemIconWithTooltip: () => ObjectGridItemIconWithTooltip,
|
|
1447
|
+
ObjectGridItemLoadingSkeleton: () => ObjectGridItemLoadingSkeleton2,
|
|
1447
1448
|
ObjectItemLoadingSkeleton: () => ObjectItemLoadingSkeleton,
|
|
1448
1449
|
ObjectListItem: () => ObjectListItem2,
|
|
1449
1450
|
ObjectListItemContainer: () => ObjectListItemContainer2,
|
|
1450
1451
|
ObjectListItemCover: () => ObjectListItemCover2,
|
|
1451
|
-
ObjectListItemHeading: () =>
|
|
1452
|
+
ObjectListItemHeading: () => ObjectListItemHeading2,
|
|
1452
1453
|
PageHeaderSection: () => PageHeaderSection,
|
|
1453
1454
|
Pagination: () => Pagination,
|
|
1454
1455
|
Paragraph: () => Paragraph,
|
|
@@ -13988,7 +13989,6 @@ var menuItem = (textTheme, forceActive) => import_react34.css`
|
|
|
13988
13989
|
font-weight: var(--fw-regular);
|
|
13989
13990
|
flex-grow: 1;
|
|
13990
13991
|
gap: var(--spacing-xs);
|
|
13991
|
-
cursor: default;
|
|
13992
13992
|
white-space: nowrap;
|
|
13993
13993
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
13994
13994
|
${forceActive ? activeMenuItem : ""}
|
|
@@ -17109,6 +17109,7 @@ var input2 = import_react74.css`
|
|
|
17109
17109
|
padding: 0;
|
|
17110
17110
|
display: flex;
|
|
17111
17111
|
justify-content: space-between;
|
|
17112
|
+
gap: var(--spacing-xs);
|
|
17112
17113
|
`;
|
|
17113
17114
|
var inputLabel = import_react74.css`
|
|
17114
17115
|
flex-grow: 1;
|
|
@@ -17127,9 +17128,9 @@ var trigger = import_react74.css`
|
|
|
17127
17128
|
`;
|
|
17128
17129
|
var popover = import_react74.css`
|
|
17129
17130
|
padding: var(--spacing-md);
|
|
17130
|
-
max-width:
|
|
17131
|
+
max-width: unset;
|
|
17131
17132
|
container-type: inline-size;
|
|
17132
|
-
width: 100
|
|
17133
|
+
width: clamp(200px, 100%, 540px);
|
|
17133
17134
|
`;
|
|
17134
17135
|
var popoverInnerContent = import_react74.css`
|
|
17135
17136
|
display: grid;
|
|
@@ -17148,6 +17149,8 @@ var popoverInnerContent = import_react74.css`
|
|
|
17148
17149
|
var calendarSection = import_react74.css`
|
|
17149
17150
|
grid-column: 1;
|
|
17150
17151
|
grid-row: 1 / 3;
|
|
17152
|
+
max-width: 240px;
|
|
17153
|
+
margin-inline: auto;
|
|
17151
17154
|
|
|
17152
17155
|
[data-variant='date'] & {
|
|
17153
17156
|
grid-row: 1 / 2;
|
|
@@ -17169,6 +17172,7 @@ var datePart = import_react74.css`
|
|
|
17169
17172
|
var datePartButton = import_react74.css`
|
|
17170
17173
|
// this allows the button to be as wide as the text
|
|
17171
17174
|
min-width: 0;
|
|
17175
|
+
margin-right: auto;
|
|
17172
17176
|
`;
|
|
17173
17177
|
|
|
17174
17178
|
// src/components/DateTimePicker/DateTimePickerSummary.tsx
|
|
@@ -17312,10 +17316,12 @@ var DateTimePicker = ({
|
|
|
17312
17316
|
warningMessage,
|
|
17313
17317
|
disabled: disabled2,
|
|
17314
17318
|
onChange,
|
|
17315
|
-
testId,
|
|
17319
|
+
testId = "datetime-picker",
|
|
17320
|
+
placement = "bottom-start",
|
|
17321
|
+
offset,
|
|
17316
17322
|
...props
|
|
17317
17323
|
}) => {
|
|
17318
|
-
const popover2 = (0, import_Popover.usePopoverState)({ placement:
|
|
17324
|
+
const popover2 = (0, import_Popover.usePopoverState)({ placement, unstable_offset: offset });
|
|
17319
17325
|
const parsedValue = (0, import_react75.useMemo)(() => tryParseAbsolute(value == null ? void 0 : value.datetime, value == null ? void 0 : value.timeZone), [value]);
|
|
17320
17326
|
const parsedMinVisible = (0, import_react75.useMemo)(
|
|
17321
17327
|
() => tryParseAbsoluteToDateString(minVisible, value == null ? void 0 : value.timeZone),
|
|
@@ -17488,21 +17494,17 @@ var import_react76 = require("@emotion/react");
|
|
|
17488
17494
|
var descriptionListHorizontal = import_react76.css`
|
|
17489
17495
|
display: grid;
|
|
17490
17496
|
grid-template-columns: max-content auto;
|
|
17491
|
-
gap: var(--spacing-
|
|
17497
|
+
gap: var(--spacing-sm) var(--spacing-md);
|
|
17492
17498
|
`;
|
|
17493
17499
|
var descriptionListVertical = import_react76.css`
|
|
17494
17500
|
display: flex;
|
|
17495
17501
|
flex-direction: column;
|
|
17496
|
-
gap: var(--spacing-
|
|
17502
|
+
gap: var(--spacing-sm);
|
|
17497
17503
|
`;
|
|
17498
17504
|
var descriptionListLabelStyles = import_react76.css`
|
|
17499
17505
|
display: flex;
|
|
17500
17506
|
align-items: center;
|
|
17501
17507
|
color: var(--gray-500);
|
|
17502
|
-
|
|
17503
|
-
dd + & {
|
|
17504
|
-
margin-top: var(--spacing-sm);
|
|
17505
|
-
}
|
|
17506
17508
|
`;
|
|
17507
17509
|
var descriptionListValueStyles = import_react76.css`
|
|
17508
17510
|
display: flex;
|
|
@@ -17559,7 +17561,10 @@ var detailsContent = import_react78.css`
|
|
|
17559
17561
|
position: relative;
|
|
17560
17562
|
animation: ${fadeInRtl} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
17561
17563
|
will-change: height;
|
|
17562
|
-
|
|
17564
|
+
|
|
17565
|
+
&:focus-within {
|
|
17566
|
+
z-index: 1;
|
|
17567
|
+
}
|
|
17563
17568
|
`;
|
|
17564
17569
|
var detailsContentIndented = import_react78.css`
|
|
17565
17570
|
margin-left: calc(1.25rem / 2);
|
|
@@ -17658,7 +17663,6 @@ var DragHandleStyles = import_react79.css`
|
|
|
17658
17663
|
background: transparent;
|
|
17659
17664
|
border: 0;
|
|
17660
17665
|
position: relative;
|
|
17661
|
-
height: 3.125rem;
|
|
17662
17666
|
width: 1rem;
|
|
17663
17667
|
cursor: grab;
|
|
17664
17668
|
|
|
@@ -17684,13 +17688,13 @@ var DragHandleDisabled = import_react79.css`
|
|
|
17684
17688
|
// src/components/DragHandle/DragHandle.tsx
|
|
17685
17689
|
var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
|
|
17686
17690
|
var DragHandle = (0, import_react80.forwardRef)(
|
|
17687
|
-
({ disableDnd, ...props }, ref) => {
|
|
17691
|
+
({ disableDnd, height = "3.125rem", ...props }, ref) => {
|
|
17688
17692
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
17689
17693
|
"button",
|
|
17690
17694
|
{
|
|
17691
17695
|
type: "button",
|
|
17692
17696
|
ref,
|
|
17693
|
-
css: [DragHandleStyles, disableDnd ? DragHandleDisabled : null],
|
|
17697
|
+
css: [DragHandleStyles, disableDnd ? DragHandleDisabled : null, { height }],
|
|
17694
17698
|
disabled: disableDnd,
|
|
17695
17699
|
...props
|
|
17696
17700
|
}
|
|
@@ -20748,46 +20752,137 @@ var ObjectGridItemIconWithTooltip = ({
|
|
|
20748
20752
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
20749
20753
|
};
|
|
20750
20754
|
|
|
20751
|
-
// src/components/Objects/
|
|
20755
|
+
// src/components/Objects/ObjectGridItemLoadingSkeleton.tsx
|
|
20752
20756
|
init_emotion_jsx_shim();
|
|
20753
20757
|
|
|
20754
|
-
// src/components/Objects/styles/
|
|
20758
|
+
// src/components/Objects/styles/ObjectGridItemLoadingSkeleton.styles.ts
|
|
20755
20759
|
init_emotion_jsx_shim();
|
|
20756
20760
|
var import_react126 = require("@emotion/react");
|
|
20757
|
-
var
|
|
20758
|
-
|
|
20761
|
+
var ObjectGridItemLoadingSkeleton = import_react126.css`
|
|
20762
|
+
border-radius: var(--rounded-base);
|
|
20759
20763
|
display: flex;
|
|
20764
|
+
flex-direction: column;
|
|
20760
20765
|
gap: var(--spacing-sm);
|
|
20766
|
+
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
20767
|
+
`;
|
|
20768
|
+
var ObjectGridItemLoadingText = (textLength) => import_react126.css`
|
|
20769
|
+
animation: ${fadeIn} 1s linear infinite alternate;
|
|
20770
|
+
border-radius: var(--rounded-base);
|
|
20771
|
+
background: var(--gray-300);
|
|
20772
|
+
display: block;
|
|
20773
|
+
width: clamp(24px, 100%, ${textLength});
|
|
20774
|
+
height: var(--fs-base);
|
|
20775
|
+
`;
|
|
20776
|
+
var ObjectGridItemLoadingImageWrapper = import_react126.css`
|
|
20777
|
+
aspect-ratio: 16/9;
|
|
20778
|
+
max-width: 100%;
|
|
20779
|
+
max-height: 100%;
|
|
20780
|
+
height: auto;
|
|
20781
|
+
padding: var(--spacing-sm);
|
|
20782
|
+
overflow: hidden;
|
|
20783
|
+
`;
|
|
20784
|
+
var ObjectGridItemLoadingImage = import_react126.css`
|
|
20785
|
+
animation: ${fadeIn} 1s linear infinite alternate;
|
|
20786
|
+
border-radius: var(--rounded-base);
|
|
20787
|
+
background: var(--gray-300);
|
|
20788
|
+
display: block;
|
|
20789
|
+
width: 100%;
|
|
20790
|
+
height: auto;
|
|
20791
|
+
aspect-ratio: 1;
|
|
20792
|
+
`;
|
|
20793
|
+
var ObjectGridItemLoadingContentWrapper = import_react126.css`
|
|
20794
|
+
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
20795
|
+
min-height: 52px;
|
|
20796
|
+
`;
|
|
20797
|
+
var ObjectGridItemLoadingContentContainer = import_react126.css`
|
|
20761
20798
|
flex-grow: 1;
|
|
20799
|
+
gap: var(--spacing-xs);
|
|
20800
|
+
`;
|
|
20801
|
+
|
|
20802
|
+
// src/components/Objects/ObjectGridItemLoadingSkeleton.tsx
|
|
20803
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
20804
|
+
var ObjectGridItemLoadingSkeleton2 = () => {
|
|
20805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { css: ObjectGridItemLoadingSkeleton, children: [
|
|
20806
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { css: ObjectGridItemLoadingImageWrapper, "data-testid": "object-grid-item-cover-skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { css: ObjectGridItemLoadingImage, role: "presentation" }) }),
|
|
20807
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
20808
|
+
HorizontalRhythm,
|
|
20809
|
+
{
|
|
20810
|
+
css: ObjectGridItemLoadingContentWrapper,
|
|
20811
|
+
align: "flex-start",
|
|
20812
|
+
justify: "space-between",
|
|
20813
|
+
gap: "sm",
|
|
20814
|
+
children: [
|
|
20815
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(VerticalRhythm, { css: ObjectGridItemLoadingContentContainer, gap: "0", children: [
|
|
20816
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("18ch") }) }),
|
|
20817
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("12ch") })
|
|
20818
|
+
] }),
|
|
20819
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(HorizontalRhythm, { css: ObjectGridItemLoadingContentContainer, gap: "xs", justify: "flex-end", children: [
|
|
20820
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("6ch") }),
|
|
20821
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { role: "presentation", css: ObjectGridItemLoadingText("24px") })
|
|
20822
|
+
] })
|
|
20823
|
+
]
|
|
20824
|
+
}
|
|
20825
|
+
)
|
|
20826
|
+
] });
|
|
20827
|
+
};
|
|
20828
|
+
|
|
20829
|
+
// src/components/Objects/ObjectItemLoadingSkeleton.tsx
|
|
20830
|
+
init_emotion_jsx_shim();
|
|
20831
|
+
|
|
20832
|
+
// src/components/Objects/styles/ObjectListItem.styles.ts
|
|
20833
|
+
init_emotion_jsx_shim();
|
|
20834
|
+
var import_react127 = require("@emotion/react");
|
|
20835
|
+
var ObjectListItem = import_react127.css`
|
|
20836
|
+
background: var(--white);
|
|
20837
|
+
display: grid;
|
|
20838
|
+
gap: var(--spacing-sm);
|
|
20762
20839
|
padding: var(--spacing-sm);
|
|
20763
20840
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
20841
|
+
container-type: inline-size;
|
|
20842
|
+
grid-template-columns: auto 1fr auto;
|
|
20764
20843
|
|
|
20765
20844
|
&:hover {
|
|
20766
20845
|
background: var(--gray-50);
|
|
20767
20846
|
}
|
|
20768
20847
|
`;
|
|
20769
|
-
var ObjectListItemSingle =
|
|
20848
|
+
var ObjectListItemSingle = import_react127.css`
|
|
20770
20849
|
align-items: center;
|
|
20771
20850
|
`;
|
|
20772
|
-
var ObjectListItemContentWrapper =
|
|
20851
|
+
var ObjectListItemContentWrapper = import_react127.css`
|
|
20852
|
+
display: grid;
|
|
20853
|
+
gap: var(--spacing-sm);
|
|
20854
|
+
justify-content: space-between;
|
|
20773
20855
|
flex-grow: 1;
|
|
20856
|
+
|
|
20857
|
+
${cq("34rem")} {
|
|
20858
|
+
grid-template-columns: auto 1fr auto;
|
|
20859
|
+
}
|
|
20774
20860
|
`;
|
|
20775
|
-
var
|
|
20861
|
+
var ObjectListItemRightSlot = import_react127.css`
|
|
20862
|
+
display: flex;
|
|
20863
|
+
gap: var(--spacing-sm);
|
|
20864
|
+
`;
|
|
20865
|
+
var ObjectListItemContainer = import_react127.css`
|
|
20776
20866
|
> [role='listitem'] {
|
|
20777
20867
|
border-top: 1px solid var(--gray-200);
|
|
20778
20868
|
}
|
|
20779
20869
|
`;
|
|
20780
|
-
var ObjectListItemCover =
|
|
20781
|
-
|
|
20782
|
-
|
|
20870
|
+
var ObjectListItemCover = import_react127.css`
|
|
20871
|
+
align-items: center;
|
|
20872
|
+
background: var(--gray-100);
|
|
20873
|
+
color: var(--gray-500);
|
|
20874
|
+
display: flex;
|
|
20875
|
+
width: 80px;
|
|
20876
|
+
height: 45px;
|
|
20877
|
+
text-align: center;
|
|
20878
|
+
font-size: var(--fs-xs);
|
|
20879
|
+
`;
|
|
20880
|
+
var ObjectListItemImage = import_react127.css`
|
|
20783
20881
|
object-fit: cover;
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
background: var(--gray-200);
|
|
20787
|
-
height: 45px;
|
|
20788
|
-
}
|
|
20882
|
+
width: 100%;
|
|
20883
|
+
height: 100%;
|
|
20789
20884
|
`;
|
|
20790
|
-
var ObjectListItemLoading =
|
|
20885
|
+
var ObjectListItemLoading = import_react127.css`
|
|
20791
20886
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
20792
20887
|
background: var(--white);
|
|
20793
20888
|
display: flex;
|
|
@@ -20795,15 +20890,18 @@ var ObjectListItemLoading = import_react126.css`
|
|
|
20795
20890
|
flex-grow: 1;
|
|
20796
20891
|
padding: var(--spacing-sm);
|
|
20797
20892
|
`;
|
|
20798
|
-
var
|
|
20893
|
+
var ObjectListItemLoadingInner = import_react127.css`
|
|
20894
|
+
flex-grow: 1;
|
|
20895
|
+
`;
|
|
20896
|
+
var ObjectListItemLoadingText = (textLength) => import_react127.css`
|
|
20799
20897
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
20800
20898
|
border-radius: var(--rounded-base);
|
|
20801
20899
|
background: var(--gray-300);
|
|
20802
20900
|
display: block;
|
|
20803
|
-
width: ${textLength};
|
|
20901
|
+
width: clamp(10ch, 100%, ${textLength});
|
|
20804
20902
|
height: var(--fs-base);
|
|
20805
20903
|
`;
|
|
20806
|
-
var ObjectListItemLoadingImage =
|
|
20904
|
+
var ObjectListItemLoadingImage = import_react127.css`
|
|
20807
20905
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
20808
20906
|
border-radius: var(--rounded-base);
|
|
20809
20907
|
background: var(--gray-300);
|
|
@@ -20811,31 +20909,43 @@ var ObjectListItemLoadingImage = import_react126.css`
|
|
|
20811
20909
|
width: 80px;
|
|
20812
20910
|
height: 55px;
|
|
20813
20911
|
`;
|
|
20912
|
+
var ObjectListItemHeadingWrapper = import_react127.css`
|
|
20913
|
+
display: flex;
|
|
20914
|
+
gap: var(--spacing-xs);
|
|
20915
|
+
`;
|
|
20814
20916
|
|
|
20815
20917
|
// src/components/Objects/ObjectItemLoadingSkeleton.tsx
|
|
20816
|
-
var
|
|
20817
|
-
var ObjectItemLoadingSkeleton = ({
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
|
|
20821
|
-
|
|
20822
|
-
|
|
20823
|
-
|
|
20824
|
-
|
|
20825
|
-
|
|
20826
|
-
|
|
20827
|
-
|
|
20828
|
-
|
|
20829
|
-
|
|
20830
|
-
|
|
20918
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20919
|
+
var ObjectItemLoadingSkeleton = ({
|
|
20920
|
+
showCover,
|
|
20921
|
+
renderAs = "single"
|
|
20922
|
+
}) => {
|
|
20923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
20924
|
+
"div",
|
|
20925
|
+
{
|
|
20926
|
+
css: [
|
|
20927
|
+
ObjectListItemLoading,
|
|
20928
|
+
{
|
|
20929
|
+
alignItems: renderAs === "multi" ? "flex-start" : "center"
|
|
20930
|
+
}
|
|
20931
|
+
],
|
|
20932
|
+
children: [
|
|
20933
|
+
showCover ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { "data-testid": "object-list-item-cover-skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { role: "presentation", css: ObjectListItemLoadingImage }) }) : null,
|
|
20934
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(VerticalRhythm, { css: ObjectListItemLoadingInner, justify: "space-between", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(VerticalRhythm, { gap: "xs", children: [
|
|
20935
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { role: "presentation", css: ObjectListItemLoadingText("30ch") }) }),
|
|
20936
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { role: "presentation", css: ObjectListItemLoadingText("20ch") })
|
|
20937
|
+
] }) })
|
|
20938
|
+
]
|
|
20939
|
+
}
|
|
20940
|
+
);
|
|
20831
20941
|
};
|
|
20832
20942
|
|
|
20833
20943
|
// src/components/Objects/ObjectListItem.tsx
|
|
20834
20944
|
init_emotion_jsx_shim();
|
|
20835
|
-
var
|
|
20945
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
20836
20946
|
var ObjectListItem2 = (props) => {
|
|
20837
|
-
const { renderAs, isSelected, cover, header: header2, rightSlot, menuItems, ...divProps } = props;
|
|
20838
|
-
return /* @__PURE__ */ (0,
|
|
20947
|
+
const { renderAs, isSelected, cover, header: header2, rightSlot, menuItems, dragHandle, ...divProps } = props;
|
|
20948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
20839
20949
|
"div",
|
|
20840
20950
|
{
|
|
20841
20951
|
role: "listitem",
|
|
@@ -20844,24 +20954,23 @@ var ObjectListItem2 = (props) => {
|
|
|
20844
20954
|
"aria-selected": isSelected,
|
|
20845
20955
|
...divProps,
|
|
20846
20956
|
children: [
|
|
20847
|
-
|
|
20848
|
-
/* @__PURE__ */ (0,
|
|
20849
|
-
/* @__PURE__ */ (0,
|
|
20850
|
-
|
|
20957
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: dragHandle }),
|
|
20958
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { css: ObjectListItemContentWrapper, children: [
|
|
20959
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: cover }),
|
|
20960
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(VerticalRhythm, { gap: "0", children: [
|
|
20961
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: header2 }),
|
|
20851
20962
|
renderAs === "multi" ? props.children : null
|
|
20852
20963
|
] }),
|
|
20853
|
-
/* @__PURE__ */ (0,
|
|
20854
|
-
|
|
20855
|
-
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
|
|
20859
|
-
|
|
20860
|
-
|
|
20861
|
-
|
|
20862
|
-
|
|
20863
|
-
] })
|
|
20864
|
-
] })
|
|
20964
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(HorizontalRhythm, { gap: "xs", align: "flex-start", children: rightSlot })
|
|
20965
|
+
] }),
|
|
20966
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(HorizontalRhythm, { gap: "0", align: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20967
|
+
Menu,
|
|
20968
|
+
{
|
|
20969
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(MenuThreeDots, { "data-testid": "object-list-item-menu-btn" }),
|
|
20970
|
+
placement: "bottom-end",
|
|
20971
|
+
children: menuItems
|
|
20972
|
+
}
|
|
20973
|
+
) }) : null
|
|
20865
20974
|
]
|
|
20866
20975
|
}
|
|
20867
20976
|
);
|
|
@@ -20869,43 +20978,68 @@ var ObjectListItem2 = (props) => {
|
|
|
20869
20978
|
|
|
20870
20979
|
// src/components/Objects/ObjectListItemContainer.tsx
|
|
20871
20980
|
init_emotion_jsx_shim();
|
|
20872
|
-
var
|
|
20873
|
-
var ObjectListItemContainer2 = ({ children, ...props }) => {
|
|
20874
|
-
return /* @__PURE__ */ (0,
|
|
20981
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
20982
|
+
var ObjectListItemContainer2 = ({ children, gap = "0", ...props }) => {
|
|
20983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(VerticalRhythm, { gap, css: ObjectListItemContainer, role: "list", ...props, children });
|
|
20875
20984
|
};
|
|
20876
20985
|
|
|
20877
20986
|
// src/components/Objects/ObjectListItemCover.tsx
|
|
20878
20987
|
init_emotion_jsx_shim();
|
|
20879
|
-
var
|
|
20880
|
-
var ObjectListItemCover2 = ({
|
|
20988
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
20989
|
+
var ObjectListItemCover2 = ({
|
|
20990
|
+
imageUrl,
|
|
20991
|
+
noImageText = "Image not available",
|
|
20992
|
+
...props
|
|
20993
|
+
}) => {
|
|
20881
20994
|
if (!imageUrl) {
|
|
20882
|
-
return /* @__PURE__ */ (0,
|
|
20995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { css: ObjectListItemCover, role: "presentation", "data-testid": "object-list-item-thumbnail", children: noImageText });
|
|
20883
20996
|
}
|
|
20884
|
-
return /* @__PURE__ */ (0,
|
|
20997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { css: ObjectListItemCover, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
20885
20998
|
"img",
|
|
20886
20999
|
{
|
|
20887
|
-
css: ObjectListItemCover,
|
|
20888
21000
|
src: imageUrl,
|
|
21001
|
+
css: ObjectListItemImage,
|
|
20889
21002
|
loading: "lazy",
|
|
20890
21003
|
"data-testid": "object-list-item-thumbnail",
|
|
20891
21004
|
...props
|
|
20892
21005
|
}
|
|
20893
|
-
);
|
|
21006
|
+
) });
|
|
20894
21007
|
};
|
|
20895
21008
|
|
|
20896
21009
|
// src/components/Objects/ObjectListItemHeading.tsx
|
|
20897
21010
|
init_emotion_jsx_shim();
|
|
20898
|
-
|
|
20899
|
-
|
|
21011
|
+
|
|
21012
|
+
// src/components/Objects/styles/ObjectListItemHeading.styles.ts
|
|
21013
|
+
init_emotion_jsx_shim();
|
|
21014
|
+
var import_react128 = require("@emotion/react");
|
|
21015
|
+
var ObjectListItemHeading = import_react128.css`
|
|
21016
|
+
display: flex;
|
|
21017
|
+
flex-direction: column;
|
|
21018
|
+
gap: var(--spacing-xs);
|
|
21019
|
+
|
|
21020
|
+
${cq("34rem")} {
|
|
21021
|
+
align-items: center;
|
|
21022
|
+
flex-direction: row;
|
|
21023
|
+
}
|
|
21024
|
+
`;
|
|
21025
|
+
var ObjectListItemHeadingAfterWrapper = import_react128.css`
|
|
21026
|
+
line-height: 1.25;
|
|
21027
|
+
`;
|
|
21028
|
+
|
|
21029
|
+
// src/components/Objects/ObjectListItemHeading.tsx
|
|
21030
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
21031
|
+
var ObjectListItemHeading2 = ({
|
|
20900
21032
|
heading,
|
|
20901
21033
|
beforeHeadingSlot,
|
|
20902
21034
|
afterHeadingSlot,
|
|
20903
21035
|
...props
|
|
20904
21036
|
}) => {
|
|
20905
|
-
return /* @__PURE__ */ (0,
|
|
20906
|
-
beforeHeadingSlot,
|
|
20907
|
-
/* @__PURE__ */ (0,
|
|
20908
|
-
|
|
21037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { css: ObjectListItemHeading, ...props, children: [
|
|
21038
|
+
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: beforeHeadingSlot }) : null,
|
|
21039
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(HorizontalRhythm, { css: ObjectListItemHeadingAfterWrapper, gap: "xs", align: "flex-start", children: [
|
|
21040
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { role: "heading", children: heading }),
|
|
21041
|
+
afterHeadingSlot
|
|
21042
|
+
] })
|
|
20909
21043
|
] });
|
|
20910
21044
|
};
|
|
20911
21045
|
|
|
@@ -20943,7 +21077,7 @@ var page = import_css.css`
|
|
|
20943
21077
|
`;
|
|
20944
21078
|
|
|
20945
21079
|
// src/components/Pagination/Pagination.tsx
|
|
20946
|
-
var
|
|
21080
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
20947
21081
|
function Pagination({
|
|
20948
21082
|
limit,
|
|
20949
21083
|
offset,
|
|
@@ -20958,12 +21092,12 @@ function Pagination({
|
|
|
20958
21092
|
if (pageCount <= 1) {
|
|
20959
21093
|
return null;
|
|
20960
21094
|
}
|
|
20961
|
-
return /* @__PURE__ */ (0,
|
|
21095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20962
21096
|
import_react_paginate.default,
|
|
20963
21097
|
{
|
|
20964
21098
|
forcePage: currentPage,
|
|
20965
|
-
previousLabel: /* @__PURE__ */ (0,
|
|
20966
|
-
nextLabel: /* @__PURE__ */ (0,
|
|
21099
|
+
previousLabel: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: prevNextControls, children: "<" }),
|
|
21100
|
+
nextLabel: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: prevNextControls, children: ">" }),
|
|
20967
21101
|
breakLabel: "...",
|
|
20968
21102
|
pageCount,
|
|
20969
21103
|
marginPagesDisplayed: 2,
|
|
@@ -20983,8 +21117,8 @@ function Pagination({
|
|
|
20983
21117
|
|
|
20984
21118
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
20985
21119
|
init_emotion_jsx_shim();
|
|
20986
|
-
var
|
|
20987
|
-
var ParameterShellContext = (0,
|
|
21120
|
+
var import_react129 = require("react");
|
|
21121
|
+
var ParameterShellContext = (0, import_react129.createContext)({
|
|
20988
21122
|
id: "",
|
|
20989
21123
|
label: "",
|
|
20990
21124
|
hiddenLabel: void 0,
|
|
@@ -20993,7 +21127,7 @@ var ParameterShellContext = (0, import_react127.createContext)({
|
|
|
20993
21127
|
}
|
|
20994
21128
|
});
|
|
20995
21129
|
var useParameterShell = () => {
|
|
20996
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
21130
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react129.useContext)(ParameterShellContext);
|
|
20997
21131
|
return {
|
|
20998
21132
|
id,
|
|
20999
21133
|
label,
|
|
@@ -21008,8 +21142,8 @@ init_emotion_jsx_shim();
|
|
|
21008
21142
|
|
|
21009
21143
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
21010
21144
|
init_emotion_jsx_shim();
|
|
21011
|
-
var
|
|
21012
|
-
var inputIconBtn =
|
|
21145
|
+
var import_react130 = require("@emotion/react");
|
|
21146
|
+
var inputIconBtn = import_react130.css`
|
|
21013
21147
|
align-items: center;
|
|
21014
21148
|
border: none;
|
|
21015
21149
|
border-radius: var(--rounded-base);
|
|
@@ -21035,7 +21169,7 @@ var inputIconBtn = import_react128.css`
|
|
|
21035
21169
|
`;
|
|
21036
21170
|
|
|
21037
21171
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
21038
|
-
var
|
|
21172
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
21039
21173
|
var LabelLeadingIcon = ({
|
|
21040
21174
|
icon,
|
|
21041
21175
|
iconColor,
|
|
@@ -21047,7 +21181,7 @@ var LabelLeadingIcon = ({
|
|
|
21047
21181
|
...props
|
|
21048
21182
|
}) => {
|
|
21049
21183
|
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
21050
|
-
return /* @__PURE__ */ (0,
|
|
21184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Tooltip, { title: titleFr, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
21051
21185
|
"button",
|
|
21052
21186
|
{
|
|
21053
21187
|
css: inputIconBtn,
|
|
@@ -21057,7 +21191,7 @@ var LabelLeadingIcon = ({
|
|
|
21057
21191
|
...props,
|
|
21058
21192
|
"data-testid": "lock-button",
|
|
21059
21193
|
children: [
|
|
21060
|
-
/* @__PURE__ */ (0,
|
|
21194
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21061
21195
|
Icon,
|
|
21062
21196
|
{
|
|
21063
21197
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -21077,8 +21211,8 @@ init_emotion_jsx_shim();
|
|
|
21077
21211
|
|
|
21078
21212
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
21079
21213
|
init_emotion_jsx_shim();
|
|
21080
|
-
var
|
|
21081
|
-
var inputContainer2 =
|
|
21214
|
+
var import_react131 = require("@emotion/react");
|
|
21215
|
+
var inputContainer2 = import_react131.css`
|
|
21082
21216
|
position: relative;
|
|
21083
21217
|
scroll-margin: var(--spacing-2xl);
|
|
21084
21218
|
|
|
@@ -21091,14 +21225,14 @@ var inputContainer2 = import_react129.css`
|
|
|
21091
21225
|
}
|
|
21092
21226
|
}
|
|
21093
21227
|
`;
|
|
21094
|
-
var labelText2 =
|
|
21228
|
+
var labelText2 = import_react131.css`
|
|
21095
21229
|
align-items: center;
|
|
21096
21230
|
display: flex;
|
|
21097
21231
|
gap: var(--spacing-xs);
|
|
21098
21232
|
font-weight: var(--fw-regular);
|
|
21099
21233
|
margin: 0 0 var(--spacing-xs);
|
|
21100
21234
|
`;
|
|
21101
|
-
var input3 =
|
|
21235
|
+
var input3 = import_react131.css`
|
|
21102
21236
|
display: block;
|
|
21103
21237
|
appearance: none;
|
|
21104
21238
|
box-sizing: border-box;
|
|
@@ -21146,18 +21280,18 @@ var input3 = import_react129.css`
|
|
|
21146
21280
|
color: var(--gray-400);
|
|
21147
21281
|
}
|
|
21148
21282
|
`;
|
|
21149
|
-
var selectInput =
|
|
21283
|
+
var selectInput = import_react131.css`
|
|
21150
21284
|
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");
|
|
21151
21285
|
background-position: right var(--spacing-sm) center;
|
|
21152
21286
|
background-repeat: no-repeat;
|
|
21153
21287
|
background-size: 1rem;
|
|
21154
21288
|
padding-right: var(--spacing-xl);
|
|
21155
21289
|
`;
|
|
21156
|
-
var inputWrapper =
|
|
21290
|
+
var inputWrapper = import_react131.css`
|
|
21157
21291
|
display: flex; // used to correct overflow with chrome textarea
|
|
21158
21292
|
position: relative;
|
|
21159
21293
|
`;
|
|
21160
|
-
var inputIcon2 =
|
|
21294
|
+
var inputIcon2 = import_react131.css`
|
|
21161
21295
|
align-items: center;
|
|
21162
21296
|
background: var(--white);
|
|
21163
21297
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -21173,7 +21307,7 @@ var inputIcon2 = import_react129.css`
|
|
|
21173
21307
|
width: var(--spacing-lg);
|
|
21174
21308
|
z-index: var(--z-10);
|
|
21175
21309
|
`;
|
|
21176
|
-
var inputToggleLabel2 =
|
|
21310
|
+
var inputToggleLabel2 = import_react131.css`
|
|
21177
21311
|
--inline-label-color: var(--typography-base);
|
|
21178
21312
|
align-items: center;
|
|
21179
21313
|
cursor: pointer;
|
|
@@ -21188,7 +21322,7 @@ var inputToggleLabel2 = import_react129.css`
|
|
|
21188
21322
|
--inline-label-color: var(--gray-400);
|
|
21189
21323
|
}
|
|
21190
21324
|
`;
|
|
21191
|
-
var toggleInput2 =
|
|
21325
|
+
var toggleInput2 = import_react131.css`
|
|
21192
21326
|
appearance: none;
|
|
21193
21327
|
border: 1px solid var(--gray-200);
|
|
21194
21328
|
background: var(--white);
|
|
@@ -21241,7 +21375,7 @@ var toggleInput2 = import_react129.css`
|
|
|
21241
21375
|
border-color: var(--gray-300);
|
|
21242
21376
|
}
|
|
21243
21377
|
`;
|
|
21244
|
-
var inlineLabel2 =
|
|
21378
|
+
var inlineLabel2 = import_react131.css`
|
|
21245
21379
|
color: var(--inline-label-color);
|
|
21246
21380
|
padding-left: var(--spacing-md);
|
|
21247
21381
|
font-size: var(--fs-sm);
|
|
@@ -21258,7 +21392,7 @@ var inlineLabel2 = import_react129.css`
|
|
|
21258
21392
|
}
|
|
21259
21393
|
}
|
|
21260
21394
|
`;
|
|
21261
|
-
var inputMenu =
|
|
21395
|
+
var inputMenu = import_react131.css`
|
|
21262
21396
|
background: none;
|
|
21263
21397
|
border: none;
|
|
21264
21398
|
padding: var(--spacing-2xs);
|
|
@@ -21266,10 +21400,10 @@ var inputMenu = import_react129.css`
|
|
|
21266
21400
|
top: calc(var(--spacing-md) * -1.2);
|
|
21267
21401
|
right: 0;
|
|
21268
21402
|
`;
|
|
21269
|
-
var inputActionItems =
|
|
21403
|
+
var inputActionItems = import_react131.css`
|
|
21270
21404
|
display: flex;
|
|
21271
21405
|
`;
|
|
21272
|
-
var inputMenuHover =
|
|
21406
|
+
var inputMenuHover = import_react131.css`
|
|
21273
21407
|
opacity: var(--opacity-50);
|
|
21274
21408
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
21275
21409
|
|
|
@@ -21279,11 +21413,11 @@ var inputMenuHover = import_react129.css`
|
|
|
21279
21413
|
background-color: var(--gray-200);
|
|
21280
21414
|
}
|
|
21281
21415
|
`;
|
|
21282
|
-
var textarea2 =
|
|
21416
|
+
var textarea2 = import_react131.css`
|
|
21283
21417
|
resize: vertical;
|
|
21284
21418
|
min-height: 2rem;
|
|
21285
21419
|
`;
|
|
21286
|
-
var dataConnectButton =
|
|
21420
|
+
var dataConnectButton = import_react131.css`
|
|
21287
21421
|
align-items: center;
|
|
21288
21422
|
appearance: none;
|
|
21289
21423
|
box-sizing: border-box;
|
|
@@ -21318,7 +21452,7 @@ var dataConnectButton = import_react129.css`
|
|
|
21318
21452
|
pointer-events: none;
|
|
21319
21453
|
}
|
|
21320
21454
|
`;
|
|
21321
|
-
var linkParameterBtn =
|
|
21455
|
+
var linkParameterBtn = import_react131.css`
|
|
21322
21456
|
border-radius: var(--rounded-base);
|
|
21323
21457
|
background: transparent;
|
|
21324
21458
|
border: none;
|
|
@@ -21327,7 +21461,7 @@ var linkParameterBtn = import_react129.css`
|
|
|
21327
21461
|
font-size: var(--fs-sm);
|
|
21328
21462
|
line-height: 1;
|
|
21329
21463
|
`;
|
|
21330
|
-
var linkParameterControls =
|
|
21464
|
+
var linkParameterControls = import_react131.css`
|
|
21331
21465
|
position: absolute;
|
|
21332
21466
|
inset: 0 0 0 auto;
|
|
21333
21467
|
padding: 0 var(--spacing-base);
|
|
@@ -21336,7 +21470,7 @@ var linkParameterControls = import_react129.css`
|
|
|
21336
21470
|
justify-content: center;
|
|
21337
21471
|
gap: var(--spacing-base);
|
|
21338
21472
|
`;
|
|
21339
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
21473
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react131.css`
|
|
21340
21474
|
padding-right: calc(
|
|
21341
21475
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
21342
21476
|
var(--spacing-base)
|
|
@@ -21349,7 +21483,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react129.css`
|
|
|
21349
21483
|
}
|
|
21350
21484
|
}
|
|
21351
21485
|
`;
|
|
21352
|
-
var linkParameterIcon =
|
|
21486
|
+
var linkParameterIcon = import_react131.css`
|
|
21353
21487
|
align-items: center;
|
|
21354
21488
|
color: var(--brand-secondary-3);
|
|
21355
21489
|
display: flex;
|
|
@@ -21364,7 +21498,7 @@ var linkParameterIcon = import_react129.css`
|
|
|
21364
21498
|
`;
|
|
21365
21499
|
|
|
21366
21500
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
21367
|
-
var
|
|
21501
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
21368
21502
|
function ParameterDataResource({
|
|
21369
21503
|
label,
|
|
21370
21504
|
labelLeadingIcon,
|
|
@@ -21374,12 +21508,12 @@ function ParameterDataResource({
|
|
|
21374
21508
|
disabled: disabled2,
|
|
21375
21509
|
children
|
|
21376
21510
|
}) {
|
|
21377
|
-
return /* @__PURE__ */ (0,
|
|
21378
|
-
/* @__PURE__ */ (0,
|
|
21511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
21512
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("span", { css: labelText2, children: [
|
|
21379
21513
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
21380
21514
|
label
|
|
21381
21515
|
] }),
|
|
21382
|
-
/* @__PURE__ */ (0,
|
|
21516
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
21383
21517
|
"button",
|
|
21384
21518
|
{
|
|
21385
21519
|
type: "button",
|
|
@@ -21388,12 +21522,12 @@ function ParameterDataResource({
|
|
|
21388
21522
|
disabled: disabled2,
|
|
21389
21523
|
onClick: onConnectDatasource,
|
|
21390
21524
|
children: [
|
|
21391
|
-
/* @__PURE__ */ (0,
|
|
21525
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
21392
21526
|
children
|
|
21393
21527
|
]
|
|
21394
21528
|
}
|
|
21395
21529
|
),
|
|
21396
|
-
caption ? /* @__PURE__ */ (0,
|
|
21530
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Caption, { children: caption }) : null
|
|
21397
21531
|
] });
|
|
21398
21532
|
}
|
|
21399
21533
|
|
|
@@ -21402,20 +21536,20 @@ init_emotion_jsx_shim();
|
|
|
21402
21536
|
|
|
21403
21537
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
21404
21538
|
init_emotion_jsx_shim();
|
|
21405
|
-
var
|
|
21406
|
-
var ParameterDrawerHeaderContainer =
|
|
21539
|
+
var import_react132 = require("@emotion/react");
|
|
21540
|
+
var ParameterDrawerHeaderContainer = import_react132.css`
|
|
21407
21541
|
align-items: center;
|
|
21408
21542
|
display: flex;
|
|
21409
21543
|
gap: var(--spacing-base);
|
|
21410
21544
|
justify-content: space-between;
|
|
21411
21545
|
margin-bottom: var(--spacing-sm);
|
|
21412
21546
|
`;
|
|
21413
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
21547
|
+
var ParameterDrawerHeaderTitleGroup = import_react132.css`
|
|
21414
21548
|
align-items: center;
|
|
21415
21549
|
display: flex;
|
|
21416
21550
|
gap: var(--spacing-sm);
|
|
21417
21551
|
`;
|
|
21418
|
-
var ParameterDrawerHeaderTitle =
|
|
21552
|
+
var ParameterDrawerHeaderTitle = import_react132.css`
|
|
21419
21553
|
text-overflow: ellipsis;
|
|
21420
21554
|
white-space: nowrap;
|
|
21421
21555
|
overflow: hidden;
|
|
@@ -21423,12 +21557,12 @@ var ParameterDrawerHeaderTitle = import_react130.css`
|
|
|
21423
21557
|
`;
|
|
21424
21558
|
|
|
21425
21559
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
21426
|
-
var
|
|
21560
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
21427
21561
|
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
21428
|
-
return /* @__PURE__ */ (0,
|
|
21429
|
-
/* @__PURE__ */ (0,
|
|
21562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
21563
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
21430
21564
|
iconBeforeTitle,
|
|
21431
|
-
/* @__PURE__ */ (0,
|
|
21565
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
21432
21566
|
] }),
|
|
21433
21567
|
children
|
|
21434
21568
|
] });
|
|
@@ -21436,12 +21570,12 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
21436
21570
|
|
|
21437
21571
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
21438
21572
|
init_emotion_jsx_shim();
|
|
21439
|
-
var
|
|
21573
|
+
var import_react134 = require("react");
|
|
21440
21574
|
|
|
21441
21575
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
21442
21576
|
init_emotion_jsx_shim();
|
|
21443
|
-
var
|
|
21444
|
-
var fieldsetStyles =
|
|
21577
|
+
var import_react133 = require("@emotion/react");
|
|
21578
|
+
var fieldsetStyles = import_react133.css`
|
|
21445
21579
|
&:disabled,
|
|
21446
21580
|
[readonly] {
|
|
21447
21581
|
pointer-events: none;
|
|
@@ -21452,7 +21586,7 @@ var fieldsetStyles = import_react131.css`
|
|
|
21452
21586
|
}
|
|
21453
21587
|
}
|
|
21454
21588
|
`;
|
|
21455
|
-
var fieldsetLegend2 =
|
|
21589
|
+
var fieldsetLegend2 = import_react133.css`
|
|
21456
21590
|
display: block;
|
|
21457
21591
|
font-weight: var(--fw-medium);
|
|
21458
21592
|
margin-bottom: var(--spacing-sm);
|
|
@@ -21460,11 +21594,11 @@ var fieldsetLegend2 = import_react131.css`
|
|
|
21460
21594
|
`;
|
|
21461
21595
|
|
|
21462
21596
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
21463
|
-
var
|
|
21464
|
-
var ParameterGroup = (0,
|
|
21597
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
21598
|
+
var ParameterGroup = (0, import_react134.forwardRef)(
|
|
21465
21599
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
21466
|
-
return /* @__PURE__ */ (0,
|
|
21467
|
-
/* @__PURE__ */ (0,
|
|
21600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
21601
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
21468
21602
|
children
|
|
21469
21603
|
] });
|
|
21470
21604
|
}
|
|
@@ -21472,24 +21606,24 @@ var ParameterGroup = (0, import_react132.forwardRef)(
|
|
|
21472
21606
|
|
|
21473
21607
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
21474
21608
|
init_emotion_jsx_shim();
|
|
21475
|
-
var
|
|
21609
|
+
var import_react141 = require("react");
|
|
21476
21610
|
|
|
21477
21611
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
21478
21612
|
init_emotion_jsx_shim();
|
|
21479
|
-
var
|
|
21613
|
+
var import_react136 = require("react");
|
|
21480
21614
|
var import_react_dom2 = require("react-dom");
|
|
21481
21615
|
|
|
21482
21616
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
21483
21617
|
init_emotion_jsx_shim();
|
|
21484
|
-
var
|
|
21485
|
-
var previewWrapper =
|
|
21618
|
+
var import_react135 = require("@emotion/react");
|
|
21619
|
+
var previewWrapper = import_react135.css`
|
|
21486
21620
|
margin-top: var(--spacing-xs);
|
|
21487
21621
|
background: var(--gray-50);
|
|
21488
21622
|
padding: var(--spacing-sm);
|
|
21489
21623
|
border: solid 1px var(--gray-300);
|
|
21490
21624
|
border-radius: var(--rounded-sm);
|
|
21491
21625
|
`;
|
|
21492
|
-
var previewLink =
|
|
21626
|
+
var previewLink = import_react135.css`
|
|
21493
21627
|
display: block;
|
|
21494
21628
|
width: 100%;
|
|
21495
21629
|
|
|
@@ -21497,7 +21631,7 @@ var previewLink = import_react133.css`
|
|
|
21497
21631
|
max-height: 9rem;
|
|
21498
21632
|
}
|
|
21499
21633
|
`;
|
|
21500
|
-
var previewModalWrapper =
|
|
21634
|
+
var previewModalWrapper = import_react135.css`
|
|
21501
21635
|
background: var(--gray-50);
|
|
21502
21636
|
display: flex;
|
|
21503
21637
|
height: 100%;
|
|
@@ -21506,7 +21640,7 @@ var previewModalWrapper = import_react133.css`
|
|
|
21506
21640
|
border: solid 1px var(--gray-300);
|
|
21507
21641
|
border-radius: var(--rounded-sm);
|
|
21508
21642
|
`;
|
|
21509
|
-
var previewModalImage =
|
|
21643
|
+
var previewModalImage = import_react135.css`
|
|
21510
21644
|
display: flex;
|
|
21511
21645
|
height: 100%;
|
|
21512
21646
|
width: 100%;
|
|
@@ -21518,32 +21652,32 @@ var previewModalImage = import_react133.css`
|
|
|
21518
21652
|
`;
|
|
21519
21653
|
|
|
21520
21654
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
21521
|
-
var
|
|
21655
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
21522
21656
|
function ParameterImagePreview({ imageSrc }) {
|
|
21523
|
-
const [showModal, setShowModal] = (0,
|
|
21524
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
21525
|
-
/* @__PURE__ */ (0,
|
|
21526
|
-
/* @__PURE__ */ (0,
|
|
21657
|
+
const [showModal, setShowModal] = (0, import_react136.useState)(false);
|
|
21658
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { css: previewWrapper, children: [
|
|
21659
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
21660
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21527
21661
|
"button",
|
|
21528
21662
|
{
|
|
21529
21663
|
css: previewLink,
|
|
21530
21664
|
onClick: () => {
|
|
21531
21665
|
setShowModal(true);
|
|
21532
21666
|
},
|
|
21533
|
-
children: /* @__PURE__ */ (0,
|
|
21667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
21534
21668
|
}
|
|
21535
21669
|
)
|
|
21536
21670
|
] }) : null;
|
|
21537
21671
|
}
|
|
21538
21672
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
21539
|
-
return open ? /* @__PURE__ */ (0,
|
|
21540
|
-
/* @__PURE__ */ (0,
|
|
21673
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_jsx_runtime119.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
21674
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21541
21675
|
Modal,
|
|
21542
21676
|
{
|
|
21543
21677
|
header: "Image Preview",
|
|
21544
21678
|
onRequestClose,
|
|
21545
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
21546
|
-
children: /* @__PURE__ */ (0,
|
|
21679
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
21680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
21547
21681
|
}
|
|
21548
21682
|
),
|
|
21549
21683
|
document.body
|
|
@@ -21552,27 +21686,27 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
21552
21686
|
|
|
21553
21687
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
21554
21688
|
init_emotion_jsx_shim();
|
|
21555
|
-
var
|
|
21556
|
-
var
|
|
21689
|
+
var import_react139 = require("@emotion/react");
|
|
21690
|
+
var import_react140 = require("react");
|
|
21557
21691
|
|
|
21558
21692
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
21559
21693
|
init_emotion_jsx_shim();
|
|
21560
|
-
var
|
|
21694
|
+
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
21561
21695
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
21562
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
21696
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
21563
21697
|
};
|
|
21564
21698
|
|
|
21565
21699
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
21566
21700
|
init_emotion_jsx_shim();
|
|
21567
|
-
var
|
|
21568
|
-
var
|
|
21569
|
-
var ParameterMenuButton = (0,
|
|
21701
|
+
var import_react137 = require("react");
|
|
21702
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
21703
|
+
var ParameterMenuButton = (0, import_react137.forwardRef)(
|
|
21570
21704
|
({ label, children }, ref) => {
|
|
21571
|
-
return /* @__PURE__ */ (0,
|
|
21705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
21572
21706
|
Menu,
|
|
21573
21707
|
{
|
|
21574
21708
|
menuLabel: `${label} menu`,
|
|
21575
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
21709
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
21576
21710
|
"button",
|
|
21577
21711
|
{
|
|
21578
21712
|
className: "parameter-menu",
|
|
@@ -21580,7 +21714,7 @@ var ParameterMenuButton = (0, import_react135.forwardRef)(
|
|
|
21580
21714
|
type: "button",
|
|
21581
21715
|
"aria-label": `${label} options`,
|
|
21582
21716
|
ref,
|
|
21583
|
-
children: /* @__PURE__ */ (0,
|
|
21717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
21584
21718
|
}
|
|
21585
21719
|
),
|
|
21586
21720
|
children
|
|
@@ -21591,14 +21725,14 @@ var ParameterMenuButton = (0, import_react135.forwardRef)(
|
|
|
21591
21725
|
|
|
21592
21726
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
21593
21727
|
init_emotion_jsx_shim();
|
|
21594
|
-
var
|
|
21595
|
-
var emptyParameterShell =
|
|
21728
|
+
var import_react138 = require("@emotion/react");
|
|
21729
|
+
var emptyParameterShell = import_react138.css`
|
|
21596
21730
|
border-radius: var(--rounded-sm);
|
|
21597
21731
|
flex-grow: 1;
|
|
21598
21732
|
position: relative;
|
|
21599
21733
|
max-width: 100%;
|
|
21600
21734
|
`;
|
|
21601
|
-
var emptyParameterShellText =
|
|
21735
|
+
var emptyParameterShellText = import_react138.css`
|
|
21602
21736
|
background: var(--brand-secondary-6);
|
|
21603
21737
|
border-radius: var(--rounded-sm);
|
|
21604
21738
|
padding: var(--spacing-sm);
|
|
@@ -21606,7 +21740,7 @@ var emptyParameterShellText = import_react136.css`
|
|
|
21606
21740
|
font-size: var(--fs-sm);
|
|
21607
21741
|
margin: 0;
|
|
21608
21742
|
`;
|
|
21609
|
-
var overrideMarker =
|
|
21743
|
+
var overrideMarker = import_react138.css`
|
|
21610
21744
|
border-radius: var(--rounded-sm);
|
|
21611
21745
|
border: 10px solid var(--gray-300);
|
|
21612
21746
|
border-left-color: transparent;
|
|
@@ -21617,7 +21751,7 @@ var overrideMarker = import_react136.css`
|
|
|
21617
21751
|
`;
|
|
21618
21752
|
|
|
21619
21753
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
21620
|
-
var
|
|
21754
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
21621
21755
|
var extractParameterProps = (props) => {
|
|
21622
21756
|
const {
|
|
21623
21757
|
id,
|
|
@@ -21677,36 +21811,36 @@ var ParameterShell = ({
|
|
|
21677
21811
|
isParameterGroup = false,
|
|
21678
21812
|
...props
|
|
21679
21813
|
}) => {
|
|
21680
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
21814
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react140.useState)(void 0);
|
|
21681
21815
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
21682
21816
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
21683
|
-
return /* @__PURE__ */ (0,
|
|
21684
|
-
hiddenLabel || title2 ? null : /* @__PURE__ */ (0,
|
|
21817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
21818
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
21685
21819
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
21686
21820
|
label,
|
|
21687
21821
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
21688
21822
|
] }),
|
|
21689
|
-
!title2 ? null : /* @__PURE__ */ (0,
|
|
21823
|
+
!title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
21690
21824
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
21691
21825
|
title2,
|
|
21692
21826
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
21693
21827
|
] }),
|
|
21694
|
-
/* @__PURE__ */ (0,
|
|
21695
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
21828
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: inputWrapper, children: [
|
|
21829
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
21696
21830
|
"div",
|
|
21697
21831
|
{
|
|
21698
21832
|
css: [
|
|
21699
21833
|
inputMenu,
|
|
21700
21834
|
inputActionItems,
|
|
21701
|
-
menuItems ?
|
|
21835
|
+
menuItems ? import_react139.css`
|
|
21702
21836
|
right: var(--spacing-md);
|
|
21703
21837
|
` : void 0
|
|
21704
21838
|
],
|
|
21705
21839
|
children: actionItems
|
|
21706
21840
|
}
|
|
21707
21841
|
) : null,
|
|
21708
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
21709
|
-
/* @__PURE__ */ (0,
|
|
21842
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
21843
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
21710
21844
|
ParameterShellContext.Provider,
|
|
21711
21845
|
{
|
|
21712
21846
|
value: {
|
|
@@ -21716,14 +21850,14 @@ var ParameterShell = ({
|
|
|
21716
21850
|
errorMessage: errorMessaging,
|
|
21717
21851
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
21718
21852
|
},
|
|
21719
|
-
children: isParameterGroup ? /* @__PURE__ */ (0,
|
|
21853
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(ParameterShellPlaceholder, { children: [
|
|
21720
21854
|
children,
|
|
21721
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
21855
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
21722
21856
|
] })
|
|
21723
21857
|
}
|
|
21724
21858
|
)
|
|
21725
21859
|
] }),
|
|
21726
|
-
/* @__PURE__ */ (0,
|
|
21860
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
21727
21861
|
FieldMessage,
|
|
21728
21862
|
{
|
|
21729
21863
|
helperMessageTestId: captionTestId,
|
|
@@ -21737,27 +21871,27 @@ var ParameterShell = ({
|
|
|
21737
21871
|
] });
|
|
21738
21872
|
};
|
|
21739
21873
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
21740
|
-
return /* @__PURE__ */ (0,
|
|
21874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { css: emptyParameterShell, children });
|
|
21741
21875
|
};
|
|
21742
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
21876
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
21743
21877
|
|
|
21744
21878
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
21745
|
-
var
|
|
21746
|
-
var ParameterImage = (0,
|
|
21879
|
+
var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
|
|
21880
|
+
var ParameterImage = (0, import_react141.forwardRef)(
|
|
21747
21881
|
({ children, ...props }, ref) => {
|
|
21748
21882
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21749
|
-
return /* @__PURE__ */ (0,
|
|
21750
|
-
/* @__PURE__ */ (0,
|
|
21883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
21884
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
21751
21885
|
children
|
|
21752
21886
|
] });
|
|
21753
21887
|
}
|
|
21754
21888
|
);
|
|
21755
|
-
var ParameterImageInner = (0,
|
|
21889
|
+
var ParameterImageInner = (0, import_react141.forwardRef)((props, ref) => {
|
|
21756
21890
|
const { value } = props;
|
|
21757
21891
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
21758
|
-
const deferredValue = (0,
|
|
21759
|
-
return /* @__PURE__ */ (0,
|
|
21760
|
-
/* @__PURE__ */ (0,
|
|
21892
|
+
const deferredValue = (0, import_react141.useDeferredValue)(value);
|
|
21893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
21894
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
21761
21895
|
"input",
|
|
21762
21896
|
{
|
|
21763
21897
|
css: input3,
|
|
@@ -21769,22 +21903,22 @@ var ParameterImageInner = (0, import_react139.forwardRef)((props, ref) => {
|
|
|
21769
21903
|
...props
|
|
21770
21904
|
}
|
|
21771
21905
|
),
|
|
21772
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
21906
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
21773
21907
|
] });
|
|
21774
21908
|
});
|
|
21775
21909
|
|
|
21776
21910
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
21777
21911
|
init_emotion_jsx_shim();
|
|
21778
|
-
var
|
|
21779
|
-
var
|
|
21780
|
-
var ParameterInput = (0,
|
|
21912
|
+
var import_react142 = require("react");
|
|
21913
|
+
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
21914
|
+
var ParameterInput = (0, import_react142.forwardRef)((props, ref) => {
|
|
21781
21915
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21782
|
-
return /* @__PURE__ */ (0,
|
|
21916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
21783
21917
|
});
|
|
21784
|
-
var ParameterInputInner = (0,
|
|
21918
|
+
var ParameterInputInner = (0, import_react142.forwardRef)(
|
|
21785
21919
|
({ ...props }, ref) => {
|
|
21786
21920
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21787
|
-
return /* @__PURE__ */ (0,
|
|
21921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
21788
21922
|
"input",
|
|
21789
21923
|
{
|
|
21790
21924
|
css: input3,
|
|
@@ -21801,19 +21935,19 @@ var ParameterInputInner = (0, import_react140.forwardRef)(
|
|
|
21801
21935
|
|
|
21802
21936
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
21803
21937
|
init_emotion_jsx_shim();
|
|
21804
|
-
var
|
|
21805
|
-
var
|
|
21806
|
-
var ParameterLink = (0,
|
|
21938
|
+
var import_react143 = require("react");
|
|
21939
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
21940
|
+
var ParameterLink = (0, import_react143.forwardRef)(
|
|
21807
21941
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
21808
21942
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21809
|
-
return /* @__PURE__ */ (0,
|
|
21943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
21810
21944
|
ParameterShell,
|
|
21811
21945
|
{
|
|
21812
21946
|
"data-testid": "link-parameter-editor",
|
|
21813
21947
|
...shellProps,
|
|
21814
21948
|
label: innerProps.value ? shellProps.label : "",
|
|
21815
21949
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
21816
|
-
children: /* @__PURE__ */ (0,
|
|
21950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
21817
21951
|
ParameterLinkInner,
|
|
21818
21952
|
{
|
|
21819
21953
|
onConnectLink,
|
|
@@ -21826,13 +21960,13 @@ var ParameterLink = (0, import_react141.forwardRef)(
|
|
|
21826
21960
|
);
|
|
21827
21961
|
}
|
|
21828
21962
|
);
|
|
21829
|
-
var ParameterLinkInner = (0,
|
|
21963
|
+
var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
21830
21964
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
21831
21965
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21832
21966
|
if (!props.value)
|
|
21833
|
-
return /* @__PURE__ */ (0,
|
|
21834
|
-
return /* @__PURE__ */ (0,
|
|
21835
|
-
/* @__PURE__ */ (0,
|
|
21967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
21968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { css: inputWrapper, children: [
|
|
21969
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
21836
21970
|
"input",
|
|
21837
21971
|
{
|
|
21838
21972
|
type: "text",
|
|
@@ -21844,8 +21978,8 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
21844
21978
|
...props
|
|
21845
21979
|
}
|
|
21846
21980
|
),
|
|
21847
|
-
/* @__PURE__ */ (0,
|
|
21848
|
-
/* @__PURE__ */ (0,
|
|
21981
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { css: linkParameterControls, children: [
|
|
21982
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
21849
21983
|
"button",
|
|
21850
21984
|
{
|
|
21851
21985
|
type: "button",
|
|
@@ -21856,7 +21990,7 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
21856
21990
|
children: "edit"
|
|
21857
21991
|
}
|
|
21858
21992
|
),
|
|
21859
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
21993
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
21860
21994
|
"a",
|
|
21861
21995
|
{
|
|
21862
21996
|
href: externalLink,
|
|
@@ -21864,7 +21998,7 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
21864
21998
|
title: "Open link in new tab",
|
|
21865
21999
|
target: "_blank",
|
|
21866
22000
|
rel: "noopener noreferrer",
|
|
21867
|
-
children: /* @__PURE__ */ (0,
|
|
22001
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
21868
22002
|
}
|
|
21869
22003
|
) : null
|
|
21870
22004
|
] })
|
|
@@ -21874,15 +22008,15 @@ var ParameterLinkInner = (0, import_react141.forwardRef)(
|
|
|
21874
22008
|
|
|
21875
22009
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
21876
22010
|
init_emotion_jsx_shim();
|
|
21877
|
-
var
|
|
22011
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
21878
22012
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
21879
22013
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21880
|
-
return /* @__PURE__ */ (0,
|
|
22014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
21881
22015
|
};
|
|
21882
22016
|
var ParameterMultiSelectInner = (props) => {
|
|
21883
22017
|
var _a;
|
|
21884
22018
|
const { id, label } = useParameterShell();
|
|
21885
|
-
return /* @__PURE__ */ (0,
|
|
22019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
21886
22020
|
InputComboBox,
|
|
21887
22021
|
{
|
|
21888
22022
|
menuPortalTarget: document.body,
|
|
@@ -21933,7 +22067,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
21933
22067
|
|
|
21934
22068
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
21935
22069
|
init_emotion_jsx_shim();
|
|
21936
|
-
var
|
|
22070
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
21937
22071
|
var ParameterNameAndPublicIdInput = ({
|
|
21938
22072
|
id,
|
|
21939
22073
|
onBlur,
|
|
@@ -21959,8 +22093,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21959
22093
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
21960
22094
|
};
|
|
21961
22095
|
autoFocus == null ? void 0 : autoFocus();
|
|
21962
|
-
return /* @__PURE__ */ (0,
|
|
21963
|
-
/* @__PURE__ */ (0,
|
|
22096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
22097
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
21964
22098
|
ParameterInput,
|
|
21965
22099
|
{
|
|
21966
22100
|
id: nameIdField,
|
|
@@ -21979,7 +22113,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21979
22113
|
value: values[nameIdField]
|
|
21980
22114
|
}
|
|
21981
22115
|
),
|
|
21982
|
-
/* @__PURE__ */ (0,
|
|
22116
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
21983
22117
|
ParameterInput,
|
|
21984
22118
|
{
|
|
21985
22119
|
id: publicIdFieldName,
|
|
@@ -21993,11 +22127,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21993
22127
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
21994
22128
|
placeholder: publicIdPlaceholderText,
|
|
21995
22129
|
errorMessage: publicIdError,
|
|
21996
|
-
menuItems: /* @__PURE__ */ (0,
|
|
22130
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
21997
22131
|
MenuItem,
|
|
21998
22132
|
{
|
|
21999
22133
|
disabled: !values[publicIdFieldName],
|
|
22000
|
-
icon: /* @__PURE__ */ (0,
|
|
22134
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
22001
22135
|
onClick: handleCopyPidFieldValue,
|
|
22002
22136
|
children: "Copy"
|
|
22003
22137
|
}
|
|
@@ -22005,13 +22139,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
22005
22139
|
value: values[publicIdFieldName]
|
|
22006
22140
|
}
|
|
22007
22141
|
),
|
|
22008
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
22142
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
22009
22143
|
] });
|
|
22010
22144
|
};
|
|
22011
22145
|
|
|
22012
22146
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22013
22147
|
init_emotion_jsx_shim();
|
|
22014
|
-
var
|
|
22148
|
+
var import_react150 = require("@emotion/react");
|
|
22015
22149
|
var import_list3 = require("@lexical/list");
|
|
22016
22150
|
var import_markdown = require("@lexical/markdown");
|
|
22017
22151
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -22118,7 +22252,7 @@ var getLabelForElement = (type) => {
|
|
|
22118
22252
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22119
22253
|
var import_fast_equals2 = require("fast-equals");
|
|
22120
22254
|
var import_lexical6 = require("lexical");
|
|
22121
|
-
var
|
|
22255
|
+
var import_react151 = require("react");
|
|
22122
22256
|
|
|
22123
22257
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
22124
22258
|
init_emotion_jsx_shim();
|
|
@@ -22139,13 +22273,13 @@ CustomCodeNode.importDOM = function() {
|
|
|
22139
22273
|
// src/components/ParameterInputs/rich-text/DisableStylesPlugin.ts
|
|
22140
22274
|
init_emotion_jsx_shim();
|
|
22141
22275
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
22142
|
-
var
|
|
22276
|
+
var import_utils5 = require("@lexical/utils");
|
|
22143
22277
|
var import_lexical = require("lexical");
|
|
22144
|
-
var
|
|
22278
|
+
var import_react144 = require("react");
|
|
22145
22279
|
function DisableStylesPlugin() {
|
|
22146
22280
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
22147
|
-
(0,
|
|
22148
|
-
return (0,
|
|
22281
|
+
(0, import_react144.useEffect)(() => {
|
|
22282
|
+
return (0, import_utils5.mergeRegister)(
|
|
22149
22283
|
// Disable text alignment on paragraph nodes
|
|
22150
22284
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
22151
22285
|
if (node.getFormatType() !== "") {
|
|
@@ -22339,13 +22473,13 @@ var codeElement = import_css2.css`
|
|
|
22339
22473
|
|
|
22340
22474
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
22341
22475
|
init_emotion_jsx_shim();
|
|
22342
|
-
var
|
|
22476
|
+
var import_react145 = require("@emotion/react");
|
|
22343
22477
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
22344
22478
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
22345
|
-
var
|
|
22479
|
+
var import_utils6 = require("@lexical/utils");
|
|
22346
22480
|
var import_fast_equals = require("fast-equals");
|
|
22347
22481
|
var import_lexical3 = require("lexical");
|
|
22348
|
-
var
|
|
22482
|
+
var import_react146 = require("react");
|
|
22349
22483
|
|
|
22350
22484
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
22351
22485
|
init_emotion_jsx_shim();
|
|
@@ -22383,7 +22517,7 @@ var getSelectedNode = (selection) => {
|
|
|
22383
22517
|
};
|
|
22384
22518
|
|
|
22385
22519
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
22386
|
-
var
|
|
22520
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
22387
22521
|
var isProjectMapLinkValue = (value) => {
|
|
22388
22522
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
22389
22523
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -22406,7 +22540,7 @@ var guessLinkTypeFromPath = (path) => {
|
|
|
22406
22540
|
};
|
|
22407
22541
|
function convertAnchorElement(domNode) {
|
|
22408
22542
|
let node = null;
|
|
22409
|
-
if (!(0,
|
|
22543
|
+
if (!(0, import_utils6.isHTMLAnchorElement)(domNode)) {
|
|
22410
22544
|
return { node };
|
|
22411
22545
|
}
|
|
22412
22546
|
const textContent = domNode.textContent;
|
|
@@ -22515,7 +22649,7 @@ var LinkNode = class _LinkNode extends import_lexical3.ElementNode {
|
|
|
22515
22649
|
element.setAttribute("href", `mailto:${this.__link.path}`);
|
|
22516
22650
|
}
|
|
22517
22651
|
}
|
|
22518
|
-
(0,
|
|
22652
|
+
(0, import_utils6.addClassNamesToElement)(element, config.theme.link);
|
|
22519
22653
|
return element;
|
|
22520
22654
|
}
|
|
22521
22655
|
updateDOM(prevNode, a) {
|
|
@@ -22670,16 +22804,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
22670
22804
|
);
|
|
22671
22805
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
22672
22806
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
22673
|
-
var linkPopover =
|
|
22807
|
+
var linkPopover = import_react145.css`
|
|
22674
22808
|
position: absolute;
|
|
22675
22809
|
z-index: 5;
|
|
22676
22810
|
`;
|
|
22677
|
-
var linkPopoverContainer =
|
|
22811
|
+
var linkPopoverContainer = import_react145.css`
|
|
22678
22812
|
${Popover()};
|
|
22679
22813
|
align-items: center;
|
|
22680
22814
|
display: flex;
|
|
22681
22815
|
`;
|
|
22682
|
-
var linkPopoverAnchor =
|
|
22816
|
+
var linkPopoverAnchor = import_react145.css`
|
|
22683
22817
|
${link}
|
|
22684
22818
|
${linkColorDefault}
|
|
22685
22819
|
`;
|
|
@@ -22688,21 +22822,21 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22688
22822
|
return path;
|
|
22689
22823
|
};
|
|
22690
22824
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
22691
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
22692
|
-
const linkPopoverElRef = (0,
|
|
22693
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
22694
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
22695
|
-
(0,
|
|
22825
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react146.useState)();
|
|
22826
|
+
const linkPopoverElRef = (0, import_react146.useRef)(null);
|
|
22827
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react146.useState)(false);
|
|
22828
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react146.useState)(false);
|
|
22829
|
+
(0, import_react146.useEffect)(() => {
|
|
22696
22830
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
22697
22831
|
setLinkPopoverState(void 0);
|
|
22698
22832
|
return;
|
|
22699
22833
|
}
|
|
22700
22834
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
22701
|
-
(0,
|
|
22835
|
+
(0, import_react146.useEffect)(() => {
|
|
22702
22836
|
if (!editor.hasNodes([LinkNode])) {
|
|
22703
22837
|
throw new Error("LinkNode not registered on editor");
|
|
22704
22838
|
}
|
|
22705
|
-
return (0,
|
|
22839
|
+
return (0, import_utils6.mergeRegister)(
|
|
22706
22840
|
editor.registerCommand(
|
|
22707
22841
|
UPSERT_LINK_NODE_COMMAND,
|
|
22708
22842
|
(payload) => {
|
|
@@ -22767,7 +22901,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22767
22901
|
)
|
|
22768
22902
|
);
|
|
22769
22903
|
}, [editor, onConnectLink]);
|
|
22770
|
-
const maybeShowLinkToolbar = (0,
|
|
22904
|
+
const maybeShowLinkToolbar = (0, import_react146.useCallback)(() => {
|
|
22771
22905
|
if (!editor.isEditable()) {
|
|
22772
22906
|
return;
|
|
22773
22907
|
}
|
|
@@ -22799,7 +22933,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22799
22933
|
}
|
|
22800
22934
|
});
|
|
22801
22935
|
}, [editor]);
|
|
22802
|
-
(0,
|
|
22936
|
+
(0, import_react146.useEffect)(() => {
|
|
22803
22937
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
22804
22938
|
requestAnimationFrame(() => {
|
|
22805
22939
|
editorState.read(() => {
|
|
@@ -22826,8 +22960,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22826
22960
|
});
|
|
22827
22961
|
});
|
|
22828
22962
|
};
|
|
22829
|
-
return /* @__PURE__ */ (0,
|
|
22830
|
-
/* @__PURE__ */ (0,
|
|
22963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
22964
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
22831
22965
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
22832
22966
|
{
|
|
22833
22967
|
nodeType: LinkNode,
|
|
@@ -22837,7 +22971,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22837
22971
|
}
|
|
22838
22972
|
}
|
|
22839
22973
|
),
|
|
22840
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
22974
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
22841
22975
|
"div",
|
|
22842
22976
|
{
|
|
22843
22977
|
css: linkPopover,
|
|
@@ -22846,8 +22980,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22846
22980
|
top: linkPopoverState.position.y
|
|
22847
22981
|
},
|
|
22848
22982
|
ref: linkPopoverElRef,
|
|
22849
|
-
children: /* @__PURE__ */ (0,
|
|
22850
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
22983
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
22984
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
22851
22985
|
"a",
|
|
22852
22986
|
{
|
|
22853
22987
|
href: parsePath(
|
|
@@ -22859,7 +22993,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22859
22993
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
22860
22994
|
}
|
|
22861
22995
|
),
|
|
22862
|
-
/* @__PURE__ */ (0,
|
|
22996
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
22863
22997
|
Button,
|
|
22864
22998
|
{
|
|
22865
22999
|
size: "xs",
|
|
@@ -22867,7 +23001,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22867
23001
|
onEditLinkNode(linkPopoverState.node);
|
|
22868
23002
|
},
|
|
22869
23003
|
buttonType: "ghost",
|
|
22870
|
-
children: /* @__PURE__ */ (0,
|
|
23004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
22871
23005
|
}
|
|
22872
23006
|
)
|
|
22873
23007
|
] })
|
|
@@ -22887,8 +23021,8 @@ var import_list = require("@lexical/list");
|
|
|
22887
23021
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
22888
23022
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
22889
23023
|
var import_lexical4 = require("lexical");
|
|
22890
|
-
var
|
|
22891
|
-
var
|
|
23024
|
+
var import_react147 = require("react");
|
|
23025
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
22892
23026
|
function isIndentPermitted(maxDepth) {
|
|
22893
23027
|
const selection = (0, import_lexical4.$getSelection)();
|
|
22894
23028
|
if (!(0, import_lexical4.$isRangeSelection)(selection)) {
|
|
@@ -22911,29 +23045,29 @@ function isIndentPermitted(maxDepth) {
|
|
|
22911
23045
|
}
|
|
22912
23046
|
function ListIndentPlugin({ maxDepth }) {
|
|
22913
23047
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
22914
|
-
(0,
|
|
23048
|
+
(0, import_react147.useEffect)(() => {
|
|
22915
23049
|
return editor.registerCommand(
|
|
22916
23050
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
22917
23051
|
() => !isIndentPermitted(maxDepth),
|
|
22918
23052
|
import_lexical4.COMMAND_PRIORITY_CRITICAL
|
|
22919
23053
|
);
|
|
22920
23054
|
}, [editor, maxDepth]);
|
|
22921
|
-
return /* @__PURE__ */ (0,
|
|
23055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {});
|
|
22922
23056
|
}
|
|
22923
23057
|
|
|
22924
23058
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
22925
23059
|
init_emotion_jsx_shim();
|
|
22926
|
-
var
|
|
23060
|
+
var import_react148 = require("@emotion/react");
|
|
22927
23061
|
var import_code2 = require("@lexical/code");
|
|
22928
23062
|
var import_list2 = require("@lexical/list");
|
|
22929
23063
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
22930
23064
|
var import_rich_text = require("@lexical/rich-text");
|
|
22931
23065
|
var import_selection2 = require("@lexical/selection");
|
|
22932
|
-
var
|
|
23066
|
+
var import_utils9 = require("@lexical/utils");
|
|
22933
23067
|
var import_lexical5 = require("lexical");
|
|
22934
|
-
var
|
|
22935
|
-
var
|
|
22936
|
-
var toolbar =
|
|
23068
|
+
var import_react149 = require("react");
|
|
23069
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23070
|
+
var toolbar = import_react148.css`
|
|
22937
23071
|
background: var(--gray-50);
|
|
22938
23072
|
border-radius: var(--rounded-base);
|
|
22939
23073
|
display: flex;
|
|
@@ -22945,7 +23079,7 @@ var toolbar = import_react146.css`
|
|
|
22945
23079
|
top: calc(var(--spacing-sm) * -2);
|
|
22946
23080
|
z-index: 10;
|
|
22947
23081
|
`;
|
|
22948
|
-
var toolbarGroup =
|
|
23082
|
+
var toolbarGroup = import_react148.css`
|
|
22949
23083
|
display: flex;
|
|
22950
23084
|
gap: var(--spacing-xs);
|
|
22951
23085
|
position: relative;
|
|
@@ -22961,7 +23095,7 @@ var toolbarGroup = import_react146.css`
|
|
|
22961
23095
|
width: 1px;
|
|
22962
23096
|
}
|
|
22963
23097
|
`;
|
|
22964
|
-
var richTextToolbarButton =
|
|
23098
|
+
var richTextToolbarButton = import_react148.css`
|
|
22965
23099
|
align-items: center;
|
|
22966
23100
|
appearance: none;
|
|
22967
23101
|
border: 0;
|
|
@@ -22974,17 +23108,17 @@ var richTextToolbarButton = import_react146.css`
|
|
|
22974
23108
|
min-width: 32px;
|
|
22975
23109
|
padding: 0 var(--spacing-sm);
|
|
22976
23110
|
`;
|
|
22977
|
-
var richTextToolbarButtonActive =
|
|
23111
|
+
var richTextToolbarButtonActive = import_react148.css`
|
|
22978
23112
|
background: var(--gray-200);
|
|
22979
23113
|
`;
|
|
22980
|
-
var toolbarIcon =
|
|
23114
|
+
var toolbarIcon = import_react148.css`
|
|
22981
23115
|
color: inherit;
|
|
22982
23116
|
`;
|
|
22983
|
-
var toolbarChevron =
|
|
23117
|
+
var toolbarChevron = import_react148.css`
|
|
22984
23118
|
margin-left: var(--spacing-xs);
|
|
22985
23119
|
`;
|
|
22986
23120
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
22987
|
-
return /* @__PURE__ */ (0,
|
|
23121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
22988
23122
|
};
|
|
22989
23123
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
22990
23124
|
["bold", "format-bold"],
|
|
@@ -23035,7 +23169,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23035
23169
|
}
|
|
23036
23170
|
});
|
|
23037
23171
|
};
|
|
23038
|
-
const updateToolbar = (0,
|
|
23172
|
+
const updateToolbar = (0, import_react149.useCallback)(() => {
|
|
23039
23173
|
const selection = (0, import_lexical5.$getSelection)();
|
|
23040
23174
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
23041
23175
|
return;
|
|
@@ -23048,7 +23182,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23048
23182
|
}
|
|
23049
23183
|
setActiveFormats(newActiveFormats);
|
|
23050
23184
|
const anchorNode = selection.anchor.getNode();
|
|
23051
|
-
let element = anchorNode.getKey() === "root" ? anchorNode : (0,
|
|
23185
|
+
let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils9.$findMatchingParent)(anchorNode, (e) => {
|
|
23052
23186
|
const parent = e.getParent();
|
|
23053
23187
|
return parent !== null && (0, import_lexical5.$isRootOrShadowRoot)(parent);
|
|
23054
23188
|
});
|
|
@@ -23059,7 +23193,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23059
23193
|
const elementDOM = editor.getElementByKey(elementKey);
|
|
23060
23194
|
if (elementDOM !== null) {
|
|
23061
23195
|
if ((0, import_list2.$isListNode)(element)) {
|
|
23062
|
-
const parentList = (0,
|
|
23196
|
+
const parentList = (0, import_utils9.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
|
|
23063
23197
|
const type = parentList ? parentList.getListType() : element.getListType();
|
|
23064
23198
|
setActiveElement(type === "bullet" ? "unorderedList" : "orderedList");
|
|
23065
23199
|
} else {
|
|
@@ -23074,7 +23208,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23074
23208
|
setIsLink(false);
|
|
23075
23209
|
}
|
|
23076
23210
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
23077
|
-
(0,
|
|
23211
|
+
(0, import_react149.useEffect)(() => {
|
|
23078
23212
|
return editor.registerCommand(
|
|
23079
23213
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
23080
23214
|
(_payload) => {
|
|
@@ -23084,7 +23218,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23084
23218
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
23085
23219
|
);
|
|
23086
23220
|
}, [editor, updateToolbar]);
|
|
23087
|
-
(0,
|
|
23221
|
+
(0, import_react149.useEffect)(() => {
|
|
23088
23222
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
23089
23223
|
requestAnimationFrame(() => {
|
|
23090
23224
|
editorState.read(() => {
|
|
@@ -23093,15 +23227,15 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23093
23227
|
});
|
|
23094
23228
|
});
|
|
23095
23229
|
}, [editor, updateToolbar]);
|
|
23096
|
-
return /* @__PURE__ */ (0,
|
|
23097
|
-
/* @__PURE__ */ (0,
|
|
23230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbar, children: [
|
|
23231
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
23098
23232
|
Menu,
|
|
23099
23233
|
{
|
|
23100
23234
|
menuLabel: "Elements",
|
|
23101
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
23235
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: richTextToolbarButton, title: "Text styles", children: [
|
|
23102
23236
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
23103
23237
|
" ",
|
|
23104
|
-
/* @__PURE__ */ (0,
|
|
23238
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
23105
23239
|
] }),
|
|
23106
23240
|
placement: "bottom-start",
|
|
23107
23241
|
children: [
|
|
@@ -23111,7 +23245,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23111
23245
|
type: "paragraph"
|
|
23112
23246
|
},
|
|
23113
23247
|
...visibleTextualElements
|
|
23114
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
23248
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23115
23249
|
MenuItem,
|
|
23116
23250
|
{
|
|
23117
23251
|
onClick: () => {
|
|
@@ -23121,12 +23255,12 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23121
23255
|
},
|
|
23122
23256
|
element.type
|
|
23123
23257
|
)),
|
|
23124
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
23258
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
23125
23259
|
]
|
|
23126
23260
|
}
|
|
23127
23261
|
),
|
|
23128
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
23129
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
23262
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbarGroup, children: [
|
|
23263
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23130
23264
|
"button",
|
|
23131
23265
|
{
|
|
23132
23266
|
onClick: () => {
|
|
@@ -23136,16 +23270,16 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23136
23270
|
richTextToolbarButton,
|
|
23137
23271
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
23138
23272
|
],
|
|
23139
|
-
children: /* @__PURE__ */ (0,
|
|
23273
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
23140
23274
|
}
|
|
23141
23275
|
) }, format.type)),
|
|
23142
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
23276
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23143
23277
|
Menu,
|
|
23144
23278
|
{
|
|
23145
23279
|
menuLabel: "Alternative text styles",
|
|
23146
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
23280
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
23147
23281
|
placement: "bottom-start",
|
|
23148
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
23282
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23149
23283
|
MenuItem,
|
|
23150
23284
|
{
|
|
23151
23285
|
onClick: () => {
|
|
@@ -23158,19 +23292,19 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23158
23292
|
}
|
|
23159
23293
|
) : null
|
|
23160
23294
|
] }) : null,
|
|
23161
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
23162
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
23295
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbarGroup, children: [
|
|
23296
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23163
23297
|
"button",
|
|
23164
23298
|
{
|
|
23165
23299
|
onClick: () => {
|
|
23166
23300
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
23167
23301
|
},
|
|
23168
23302
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
23169
|
-
children: /* @__PURE__ */ (0,
|
|
23303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
23170
23304
|
}
|
|
23171
23305
|
) }) : null,
|
|
23172
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
23173
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
23306
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
23307
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23174
23308
|
"button",
|
|
23175
23309
|
{
|
|
23176
23310
|
onClick: () => {
|
|
@@ -23180,10 +23314,10 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23180
23314
|
richTextToolbarButton,
|
|
23181
23315
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
23182
23316
|
],
|
|
23183
|
-
children: /* @__PURE__ */ (0,
|
|
23317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
23184
23318
|
}
|
|
23185
23319
|
) }) : null,
|
|
23186
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
23320
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23187
23321
|
"button",
|
|
23188
23322
|
{
|
|
23189
23323
|
onClick: () => {
|
|
@@ -23193,57 +23327,57 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
23193
23327
|
richTextToolbarButton,
|
|
23194
23328
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
23195
23329
|
],
|
|
23196
|
-
children: /* @__PURE__ */ (0,
|
|
23330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
23197
23331
|
}
|
|
23198
23332
|
) }) : null
|
|
23199
23333
|
] }) : null,
|
|
23200
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
23334
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23201
23335
|
"button",
|
|
23202
23336
|
{
|
|
23203
23337
|
onClick: () => {
|
|
23204
23338
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
23205
23339
|
},
|
|
23206
23340
|
css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
|
|
23207
|
-
children: /* @__PURE__ */ (0,
|
|
23341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "quote" })
|
|
23208
23342
|
}
|
|
23209
23343
|
) }) : null,
|
|
23210
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
23344
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23211
23345
|
"button",
|
|
23212
23346
|
{
|
|
23213
23347
|
onClick: () => {
|
|
23214
23348
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
23215
23349
|
},
|
|
23216
23350
|
css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
|
|
23217
|
-
children: /* @__PURE__ */ (0,
|
|
23351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "code-slash" })
|
|
23218
23352
|
}
|
|
23219
23353
|
) }) : null
|
|
23220
23354
|
] }) : null,
|
|
23221
|
-
customControls ? /* @__PURE__ */ (0,
|
|
23355
|
+
customControls ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: toolbarGroup, children: customControls }) : null
|
|
23222
23356
|
] });
|
|
23223
23357
|
};
|
|
23224
23358
|
var RichTextToolbar_default = RichTextToolbar;
|
|
23225
23359
|
var useRichTextToolbarState = ({ config }) => {
|
|
23226
23360
|
var _a;
|
|
23227
|
-
const enabledBuiltInFormats = (0,
|
|
23361
|
+
const enabledBuiltInFormats = (0, import_react149.useMemo)(() => {
|
|
23228
23362
|
return richTextBuiltInFormats.filter((format) => {
|
|
23229
23363
|
var _a2, _b;
|
|
23230
23364
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
23231
23365
|
});
|
|
23232
23366
|
}, [config]);
|
|
23233
|
-
const enabledBuiltInElements = (0,
|
|
23367
|
+
const enabledBuiltInElements = (0, import_react149.useMemo)(() => {
|
|
23234
23368
|
return richTextBuiltInElements.filter((element) => {
|
|
23235
23369
|
var _a2, _b;
|
|
23236
23370
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
23237
23371
|
});
|
|
23238
23372
|
}, [config]);
|
|
23239
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
23373
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react149.useMemo)(() => {
|
|
23240
23374
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
23241
23375
|
}, [enabledBuiltInFormats]);
|
|
23242
23376
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
23243
23377
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
23244
23378
|
);
|
|
23245
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
23246
|
-
const visibleFormatsWithIcon = (0,
|
|
23379
|
+
const [activeFormats, setActiveFormats] = (0, import_react149.useState)([]);
|
|
23380
|
+
const visibleFormatsWithIcon = (0, import_react149.useMemo)(() => {
|
|
23247
23381
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
23248
23382
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
23249
23383
|
visibleFormats.add(type);
|
|
@@ -23253,7 +23387,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
23253
23387
|
});
|
|
23254
23388
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
23255
23389
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
23256
|
-
const visibleFormatsWithoutIcon = (0,
|
|
23390
|
+
const visibleFormatsWithoutIcon = (0, import_react149.useMemo)(() => {
|
|
23257
23391
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
23258
23392
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
23259
23393
|
visibleFormats.add(type);
|
|
@@ -23263,11 +23397,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
23263
23397
|
});
|
|
23264
23398
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
23265
23399
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
23266
|
-
const [activeElement, setActiveElement] = (0,
|
|
23400
|
+
const [activeElement, setActiveElement] = (0, import_react149.useState)("paragraph");
|
|
23267
23401
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
23268
23402
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
23269
23403
|
);
|
|
23270
|
-
const visibleTextualElements = (0,
|
|
23404
|
+
const visibleTextualElements = (0, import_react149.useMemo)(() => {
|
|
23271
23405
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
23272
23406
|
return enabledTextualElements;
|
|
23273
23407
|
}
|
|
@@ -23278,24 +23412,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
23278
23412
|
}
|
|
23279
23413
|
);
|
|
23280
23414
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
23281
|
-
const [isLink, setIsLink] = (0,
|
|
23282
|
-
const linkElementVisible = (0,
|
|
23415
|
+
const [isLink, setIsLink] = (0, import_react149.useState)(false);
|
|
23416
|
+
const linkElementVisible = (0, import_react149.useMemo)(() => {
|
|
23283
23417
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
23284
23418
|
}, [isLink, enabledBuiltInElements]);
|
|
23285
|
-
const visibleLists = (0,
|
|
23419
|
+
const visibleLists = (0, import_react149.useMemo)(() => {
|
|
23286
23420
|
return new Set(
|
|
23287
23421
|
["orderedList", "unorderedList"].filter(
|
|
23288
23422
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
23289
23423
|
)
|
|
23290
23424
|
);
|
|
23291
23425
|
}, [activeElement, enabledBuiltInElements]);
|
|
23292
|
-
const quoteElementVisible = (0,
|
|
23426
|
+
const quoteElementVisible = (0, import_react149.useMemo)(() => {
|
|
23293
23427
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
23294
23428
|
}, [activeElement, enabledBuiltInElements]);
|
|
23295
|
-
const codeElementVisible = (0,
|
|
23429
|
+
const codeElementVisible = (0, import_react149.useMemo)(() => {
|
|
23296
23430
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
23297
23431
|
}, [activeElement, enabledBuiltInElements]);
|
|
23298
|
-
const visibleElementsWithIcons = (0,
|
|
23432
|
+
const visibleElementsWithIcons = (0, import_react149.useMemo)(() => {
|
|
23299
23433
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
23300
23434
|
if (linkElementVisible) {
|
|
23301
23435
|
visibleElements.add("link");
|
|
@@ -23332,7 +23466,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
23332
23466
|
};
|
|
23333
23467
|
|
|
23334
23468
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
23335
|
-
var
|
|
23469
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23336
23470
|
var ParameterRichText = ({
|
|
23337
23471
|
label,
|
|
23338
23472
|
labelLeadingIcon,
|
|
@@ -23357,7 +23491,7 @@ var ParameterRichText = ({
|
|
|
23357
23491
|
variables,
|
|
23358
23492
|
customControls
|
|
23359
23493
|
}) => {
|
|
23360
|
-
return /* @__PURE__ */ (0,
|
|
23494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
23361
23495
|
ParameterShell,
|
|
23362
23496
|
{
|
|
23363
23497
|
"data-testid": "parameter-richtext",
|
|
@@ -23371,7 +23505,7 @@ var ParameterRichText = ({
|
|
|
23371
23505
|
captionTestId,
|
|
23372
23506
|
menuItems,
|
|
23373
23507
|
children: [
|
|
23374
|
-
/* @__PURE__ */ (0,
|
|
23508
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23375
23509
|
ParameterRichTextInner,
|
|
23376
23510
|
{
|
|
23377
23511
|
value,
|
|
@@ -23389,23 +23523,23 @@ var ParameterRichText = ({
|
|
|
23389
23523
|
children
|
|
23390
23524
|
}
|
|
23391
23525
|
),
|
|
23392
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
23526
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children: menuItems }) }) : null
|
|
23393
23527
|
]
|
|
23394
23528
|
}
|
|
23395
23529
|
);
|
|
23396
23530
|
};
|
|
23397
|
-
var editorWrapper =
|
|
23531
|
+
var editorWrapper = import_react150.css`
|
|
23398
23532
|
display: flex;
|
|
23399
23533
|
flex-flow: column;
|
|
23400
23534
|
flex-grow: 1;
|
|
23401
23535
|
`;
|
|
23402
|
-
var editorContainer =
|
|
23536
|
+
var editorContainer = import_react150.css`
|
|
23403
23537
|
display: flex;
|
|
23404
23538
|
flex-flow: column;
|
|
23405
23539
|
flex-grow: 1;
|
|
23406
23540
|
position: relative;
|
|
23407
23541
|
`;
|
|
23408
|
-
var editorPlaceholder =
|
|
23542
|
+
var editorPlaceholder = import_react150.css`
|
|
23409
23543
|
color: var(--gray-500);
|
|
23410
23544
|
font-style: italic;
|
|
23411
23545
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -23416,7 +23550,7 @@ var editorPlaceholder = import_react148.css`
|
|
|
23416
23550
|
top: var(--spacing-sm);
|
|
23417
23551
|
user-select: none;
|
|
23418
23552
|
`;
|
|
23419
|
-
var editorInput =
|
|
23553
|
+
var editorInput = import_react150.css`
|
|
23420
23554
|
background: var(--white);
|
|
23421
23555
|
border: 1px solid var(--gray-200);
|
|
23422
23556
|
border-radius: var(--rounded-sm);
|
|
@@ -23500,8 +23634,8 @@ var ParameterRichTextInner = ({
|
|
|
23500
23634
|
},
|
|
23501
23635
|
editable: !readOnly
|
|
23502
23636
|
};
|
|
23503
|
-
return /* @__PURE__ */ (0,
|
|
23504
|
-
/* @__PURE__ */ (0,
|
|
23637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
23638
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23505
23639
|
RichText,
|
|
23506
23640
|
{
|
|
23507
23641
|
onChange,
|
|
@@ -23538,14 +23672,14 @@ var RichText = ({
|
|
|
23538
23672
|
variables,
|
|
23539
23673
|
customControls
|
|
23540
23674
|
}) => {
|
|
23541
|
-
const editorContainerRef = (0,
|
|
23675
|
+
const editorContainerRef = (0, import_react151.useRef)(null);
|
|
23542
23676
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
23543
|
-
(0,
|
|
23677
|
+
(0, import_react151.useEffect)(() => {
|
|
23544
23678
|
if (onRichTextInit) {
|
|
23545
23679
|
onRichTextInit(editor);
|
|
23546
23680
|
}
|
|
23547
23681
|
}, [editor, onRichTextInit]);
|
|
23548
|
-
(0,
|
|
23682
|
+
(0, import_react151.useEffect)(() => {
|
|
23549
23683
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
23550
23684
|
requestAnimationFrame(() => {
|
|
23551
23685
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -23557,23 +23691,23 @@ var RichText = ({
|
|
|
23557
23691
|
removeUpdateListener();
|
|
23558
23692
|
};
|
|
23559
23693
|
}, [editor, onChange]);
|
|
23560
|
-
(0,
|
|
23694
|
+
(0, import_react151.useEffect)(() => {
|
|
23561
23695
|
editor.setEditable(!readOnly);
|
|
23562
23696
|
}, [editor, readOnly]);
|
|
23563
|
-
return /* @__PURE__ */ (0,
|
|
23564
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
23565
|
-
/* @__PURE__ */ (0,
|
|
23566
|
-
/* @__PURE__ */ (0,
|
|
23697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
23698
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RichTextToolbar_default, { config, customControls }),
|
|
23699
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
23700
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23567
23701
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
23568
23702
|
{
|
|
23569
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
23570
|
-
placeholder: /* @__PURE__ */ (0,
|
|
23703
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
23704
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
23571
23705
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
23572
23706
|
}
|
|
23573
23707
|
),
|
|
23574
|
-
/* @__PURE__ */ (0,
|
|
23575
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
23576
|
-
/* @__PURE__ */ (0,
|
|
23708
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
23709
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
23710
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23577
23711
|
LinkNodePlugin,
|
|
23578
23712
|
{
|
|
23579
23713
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -23583,28 +23717,28 @@ var RichText = ({
|
|
|
23583
23717
|
} : void 0
|
|
23584
23718
|
}
|
|
23585
23719
|
),
|
|
23586
|
-
/* @__PURE__ */ (0,
|
|
23587
|
-
/* @__PURE__ */ (0,
|
|
23588
|
-
/* @__PURE__ */ (0,
|
|
23589
|
-
/* @__PURE__ */ (0,
|
|
23720
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
23721
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(DisableStylesPlugin, {}),
|
|
23722
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
23723
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children })
|
|
23590
23724
|
] })
|
|
23591
23725
|
] });
|
|
23592
23726
|
};
|
|
23593
23727
|
|
|
23594
23728
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
23595
23729
|
init_emotion_jsx_shim();
|
|
23596
|
-
var
|
|
23597
|
-
var
|
|
23598
|
-
var ParameterSelect = (0,
|
|
23730
|
+
var import_react152 = require("react");
|
|
23731
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
23732
|
+
var ParameterSelect = (0, import_react152.forwardRef)(
|
|
23599
23733
|
({ defaultOption, options, ...props }, ref) => {
|
|
23600
23734
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23601
|
-
return /* @__PURE__ */ (0,
|
|
23735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
23602
23736
|
}
|
|
23603
23737
|
);
|
|
23604
|
-
var ParameterSelectInner = (0,
|
|
23738
|
+
var ParameterSelectInner = (0, import_react152.forwardRef)(
|
|
23605
23739
|
({ defaultOption, options, ...props }, ref) => {
|
|
23606
23740
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
23607
|
-
return /* @__PURE__ */ (0,
|
|
23741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
23608
23742
|
"select",
|
|
23609
23743
|
{
|
|
23610
23744
|
css: [input3, selectInput],
|
|
@@ -23613,10 +23747,10 @@ var ParameterSelectInner = (0, import_react150.forwardRef)(
|
|
|
23613
23747
|
ref,
|
|
23614
23748
|
...props,
|
|
23615
23749
|
children: [
|
|
23616
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
23750
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
23617
23751
|
options.map((option) => {
|
|
23618
23752
|
var _a;
|
|
23619
|
-
return /* @__PURE__ */ (0,
|
|
23753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
23620
23754
|
})
|
|
23621
23755
|
]
|
|
23622
23756
|
}
|
|
@@ -23626,15 +23760,15 @@ var ParameterSelectInner = (0, import_react150.forwardRef)(
|
|
|
23626
23760
|
|
|
23627
23761
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
23628
23762
|
init_emotion_jsx_shim();
|
|
23629
|
-
var
|
|
23630
|
-
var
|
|
23631
|
-
var ParameterTextarea = (0,
|
|
23763
|
+
var import_react153 = require("react");
|
|
23764
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
23765
|
+
var ParameterTextarea = (0, import_react153.forwardRef)((props, ref) => {
|
|
23632
23766
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23633
|
-
return /* @__PURE__ */ (0,
|
|
23767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
23634
23768
|
});
|
|
23635
|
-
var ParameterTextareaInner = (0,
|
|
23769
|
+
var ParameterTextareaInner = (0, import_react153.forwardRef)(({ ...props }, ref) => {
|
|
23636
23770
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
23637
|
-
return /* @__PURE__ */ (0,
|
|
23771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
23638
23772
|
"textarea",
|
|
23639
23773
|
{
|
|
23640
23774
|
css: [input3, textarea2],
|
|
@@ -23648,18 +23782,18 @@ var ParameterTextareaInner = (0, import_react151.forwardRef)(({ ...props }, ref)
|
|
|
23648
23782
|
|
|
23649
23783
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
23650
23784
|
init_emotion_jsx_shim();
|
|
23651
|
-
var
|
|
23652
|
-
var
|
|
23653
|
-
var ParameterToggle = (0,
|
|
23785
|
+
var import_react154 = require("react");
|
|
23786
|
+
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
23787
|
+
var ParameterToggle = (0, import_react154.forwardRef)((props, ref) => {
|
|
23654
23788
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23655
|
-
return /* @__PURE__ */ (0,
|
|
23789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
23656
23790
|
});
|
|
23657
|
-
var ParameterToggleInner = (0,
|
|
23791
|
+
var ParameterToggleInner = (0, import_react154.forwardRef)(
|
|
23658
23792
|
({ children, ...props }, ref) => {
|
|
23659
23793
|
const { id, label } = useParameterShell();
|
|
23660
|
-
return /* @__PURE__ */ (0,
|
|
23661
|
-
/* @__PURE__ */ (0,
|
|
23662
|
-
/* @__PURE__ */ (0,
|
|
23794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
23795
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
23796
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { css: inlineLabel2, children: label }),
|
|
23663
23797
|
children
|
|
23664
23798
|
] });
|
|
23665
23799
|
}
|
|
@@ -23670,8 +23804,8 @@ init_emotion_jsx_shim();
|
|
|
23670
23804
|
|
|
23671
23805
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
23672
23806
|
init_emotion_jsx_shim();
|
|
23673
|
-
var
|
|
23674
|
-
var container3 =
|
|
23807
|
+
var import_react155 = require("@emotion/react");
|
|
23808
|
+
var container3 = import_react155.css`
|
|
23675
23809
|
background: var(--gray-50);
|
|
23676
23810
|
margin-block: var(--spacing-sm);
|
|
23677
23811
|
position: relative;
|
|
@@ -23681,17 +23815,17 @@ var container3 = import_react153.css`
|
|
|
23681
23815
|
border: solid 1px var(--gray-300);
|
|
23682
23816
|
`;
|
|
23683
23817
|
var themeMap = {
|
|
23684
|
-
primary:
|
|
23818
|
+
primary: import_react155.css`
|
|
23685
23819
|
--progress-color: var(--accent-light);
|
|
23686
23820
|
`,
|
|
23687
|
-
secondary:
|
|
23821
|
+
secondary: import_react155.css`
|
|
23688
23822
|
--progress-color: var(--accent-alt-light);
|
|
23689
23823
|
`,
|
|
23690
|
-
destructive:
|
|
23824
|
+
destructive: import_react155.css`
|
|
23691
23825
|
--progress-color: var(--brand-secondary-5);
|
|
23692
23826
|
`
|
|
23693
23827
|
};
|
|
23694
|
-
var slidingBackgroundPosition =
|
|
23828
|
+
var slidingBackgroundPosition = import_react155.keyframes`
|
|
23695
23829
|
from {
|
|
23696
23830
|
background-position: 0 0;
|
|
23697
23831
|
}
|
|
@@ -23699,10 +23833,10 @@ var slidingBackgroundPosition = import_react153.keyframes`
|
|
|
23699
23833
|
background-position: 64px 0;
|
|
23700
23834
|
}
|
|
23701
23835
|
`;
|
|
23702
|
-
var determinate =
|
|
23836
|
+
var determinate = import_react155.css`
|
|
23703
23837
|
background-color: var(--progress-color);
|
|
23704
23838
|
`;
|
|
23705
|
-
var indeterminate =
|
|
23839
|
+
var indeterminate = import_react155.css`
|
|
23706
23840
|
background-image: linear-gradient(
|
|
23707
23841
|
45deg,
|
|
23708
23842
|
var(--progress-color) 25%,
|
|
@@ -23716,7 +23850,7 @@ var indeterminate = import_react153.css`
|
|
|
23716
23850
|
background-size: 64px 64px;
|
|
23717
23851
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
23718
23852
|
`;
|
|
23719
|
-
var bar =
|
|
23853
|
+
var bar = import_react155.css`
|
|
23720
23854
|
position: absolute;
|
|
23721
23855
|
inset: 0;
|
|
23722
23856
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -23724,7 +23858,7 @@ var bar = import_react153.css`
|
|
|
23724
23858
|
`;
|
|
23725
23859
|
|
|
23726
23860
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
23727
|
-
var
|
|
23861
|
+
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
23728
23862
|
function ProgressBar({
|
|
23729
23863
|
current,
|
|
23730
23864
|
max,
|
|
@@ -23734,7 +23868,7 @@ function ProgressBar({
|
|
|
23734
23868
|
}) {
|
|
23735
23869
|
const valueNow = Math.min(current, max);
|
|
23736
23870
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
23737
|
-
return /* @__PURE__ */ (0,
|
|
23871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
23738
23872
|
"div",
|
|
23739
23873
|
{
|
|
23740
23874
|
css: container3,
|
|
@@ -23745,7 +23879,7 @@ function ProgressBar({
|
|
|
23745
23879
|
"aria-valuemax": max,
|
|
23746
23880
|
"aria-valuenow": valueNow,
|
|
23747
23881
|
...props,
|
|
23748
|
-
children: /* @__PURE__ */ (0,
|
|
23882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
23749
23883
|
"div",
|
|
23750
23884
|
{
|
|
23751
23885
|
css: [
|
|
@@ -23765,31 +23899,31 @@ function ProgressBar({
|
|
|
23765
23899
|
|
|
23766
23900
|
// src/components/ProgressList/ProgressList.tsx
|
|
23767
23901
|
init_emotion_jsx_shim();
|
|
23768
|
-
var
|
|
23902
|
+
var import_react157 = require("@emotion/react");
|
|
23769
23903
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
23770
23904
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
23771
23905
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
23772
|
-
var
|
|
23906
|
+
var import_react158 = require("react");
|
|
23773
23907
|
|
|
23774
23908
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
23775
23909
|
init_emotion_jsx_shim();
|
|
23776
|
-
var
|
|
23777
|
-
var progressListStyles =
|
|
23910
|
+
var import_react156 = require("@emotion/react");
|
|
23911
|
+
var progressListStyles = import_react156.css`
|
|
23778
23912
|
display: flex;
|
|
23779
23913
|
flex-direction: column;
|
|
23780
23914
|
gap: var(--spacing-sm);
|
|
23781
23915
|
list-style-type: none;
|
|
23782
23916
|
`;
|
|
23783
|
-
var progressListItemStyles =
|
|
23917
|
+
var progressListItemStyles = import_react156.css`
|
|
23784
23918
|
display: flex;
|
|
23785
23919
|
gap: var(--spacing-base);
|
|
23786
23920
|
align-items: center;
|
|
23787
23921
|
`;
|
|
23788
23922
|
|
|
23789
23923
|
// src/components/ProgressList/ProgressList.tsx
|
|
23790
|
-
var
|
|
23924
|
+
var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
|
|
23791
23925
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
23792
|
-
const itemsWithStatus = (0,
|
|
23926
|
+
const itemsWithStatus = (0, import_react158.useMemo)(() => {
|
|
23793
23927
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
23794
23928
|
return items.map((item, index) => {
|
|
23795
23929
|
let status = "queued";
|
|
@@ -23801,8 +23935,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
23801
23935
|
return { ...item, status };
|
|
23802
23936
|
});
|
|
23803
23937
|
}, [items, inProgressId]);
|
|
23804
|
-
return /* @__PURE__ */ (0,
|
|
23805
|
-
return /* @__PURE__ */ (0,
|
|
23938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
23939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
23806
23940
|
ProgressListItem,
|
|
23807
23941
|
{
|
|
23808
23942
|
status,
|
|
@@ -23822,7 +23956,7 @@ var ProgressListItem = ({
|
|
|
23822
23956
|
errorLevel = "danger",
|
|
23823
23957
|
autoEllipsis = false
|
|
23824
23958
|
}) => {
|
|
23825
|
-
const icon = (0,
|
|
23959
|
+
const icon = (0, import_react158.useMemo)(() => {
|
|
23826
23960
|
if (error) {
|
|
23827
23961
|
return warningIcon;
|
|
23828
23962
|
}
|
|
@@ -23833,14 +23967,14 @@ var ProgressListItem = ({
|
|
|
23833
23967
|
};
|
|
23834
23968
|
return iconPerStatus[status];
|
|
23835
23969
|
}, [status, error]);
|
|
23836
|
-
const statusStyles = (0,
|
|
23970
|
+
const statusStyles = (0, import_react158.useMemo)(() => {
|
|
23837
23971
|
if (error) {
|
|
23838
|
-
return errorLevel === "caution" ?
|
|
23972
|
+
return errorLevel === "caution" ? import_react157.css`
|
|
23839
23973
|
color: rgb(161, 98, 7);
|
|
23840
23974
|
& svg {
|
|
23841
23975
|
color: rgb(250, 204, 21);
|
|
23842
23976
|
}
|
|
23843
|
-
` :
|
|
23977
|
+
` : import_react157.css`
|
|
23844
23978
|
color: rgb(185, 28, 28);
|
|
23845
23979
|
& svg {
|
|
23846
23980
|
color: var(--brand-primary-2);
|
|
@@ -23848,40 +23982,40 @@ var ProgressListItem = ({
|
|
|
23848
23982
|
`;
|
|
23849
23983
|
}
|
|
23850
23984
|
const colorPerStatus = {
|
|
23851
|
-
completed:
|
|
23985
|
+
completed: import_react157.css`
|
|
23852
23986
|
opacity: 0.75;
|
|
23853
23987
|
`,
|
|
23854
|
-
inProgress:
|
|
23988
|
+
inProgress: import_react157.css`
|
|
23855
23989
|
-webkit-text-stroke-width: thin;
|
|
23856
23990
|
`,
|
|
23857
|
-
queued:
|
|
23991
|
+
queued: import_react157.css`
|
|
23858
23992
|
opacity: 0.5;
|
|
23859
23993
|
`
|
|
23860
23994
|
};
|
|
23861
23995
|
return colorPerStatus[status];
|
|
23862
23996
|
}, [status, error, errorLevel]);
|
|
23863
|
-
return /* @__PURE__ */ (0,
|
|
23864
|
-
/* @__PURE__ */ (0,
|
|
23865
|
-
/* @__PURE__ */ (0,
|
|
23997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
23998
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
23999
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { children: [
|
|
23866
24000
|
children,
|
|
23867
|
-
/* @__PURE__ */ (0,
|
|
24001
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
23868
24002
|
] })
|
|
23869
24003
|
] });
|
|
23870
24004
|
};
|
|
23871
24005
|
|
|
23872
24006
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23873
24007
|
init_emotion_jsx_shim();
|
|
23874
|
-
var
|
|
24008
|
+
var import_react160 = require("@emotion/react");
|
|
23875
24009
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
23876
|
-
var
|
|
24010
|
+
var import_react161 = require("react");
|
|
23877
24011
|
|
|
23878
24012
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
23879
24013
|
init_emotion_jsx_shim();
|
|
23880
|
-
var
|
|
23881
|
-
var segmentedControlRootStyles =
|
|
24014
|
+
var import_react159 = require("@emotion/react");
|
|
24015
|
+
var segmentedControlRootStyles = import_react159.css`
|
|
23882
24016
|
position: relative;
|
|
23883
24017
|
`;
|
|
23884
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
24018
|
+
var segmentedControlScrollIndicatorsStyles = import_react159.css`
|
|
23885
24019
|
position: absolute;
|
|
23886
24020
|
inset: 0;
|
|
23887
24021
|
z-index: 1;
|
|
@@ -23909,17 +24043,17 @@ var segmentedControlScrollIndicatorsStyles = import_react157.css`
|
|
|
23909
24043
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
23910
24044
|
}
|
|
23911
24045
|
`;
|
|
23912
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
24046
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react159.css`
|
|
23913
24047
|
&::before {
|
|
23914
24048
|
opacity: 1;
|
|
23915
24049
|
}
|
|
23916
24050
|
`;
|
|
23917
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
24051
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react159.css`
|
|
23918
24052
|
&::after {
|
|
23919
24053
|
opacity: 1;
|
|
23920
24054
|
}
|
|
23921
24055
|
`;
|
|
23922
|
-
var segmentedControlWrapperStyles =
|
|
24056
|
+
var segmentedControlWrapperStyles = import_react159.css`
|
|
23923
24057
|
overflow-y: auto;
|
|
23924
24058
|
scroll-behavior: smooth;
|
|
23925
24059
|
scrollbar-width: none;
|
|
@@ -23928,7 +24062,7 @@ var segmentedControlWrapperStyles = import_react157.css`
|
|
|
23928
24062
|
height: 0px;
|
|
23929
24063
|
}
|
|
23930
24064
|
`;
|
|
23931
|
-
var segmentedControlStyles =
|
|
24065
|
+
var segmentedControlStyles = import_react159.css`
|
|
23932
24066
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
23933
24067
|
--segmented-control-border-width: 1px;
|
|
23934
24068
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -23947,14 +24081,14 @@ var segmentedControlStyles = import_react157.css`
|
|
|
23947
24081
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
23948
24082
|
font-size: var(--fs-xs);
|
|
23949
24083
|
`;
|
|
23950
|
-
var segmentedControlVerticalStyles =
|
|
24084
|
+
var segmentedControlVerticalStyles = import_react159.css`
|
|
23951
24085
|
flex-direction: column;
|
|
23952
24086
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
23953
24087
|
var(--segmented-control-rounded-value) 0 0;
|
|
23954
24088
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
23955
24089
|
var(--segmented-control-rounded-value);
|
|
23956
24090
|
`;
|
|
23957
|
-
var segmentedControlItemStyles =
|
|
24091
|
+
var segmentedControlItemStyles = import_react159.css`
|
|
23958
24092
|
&:first-of-type label {
|
|
23959
24093
|
border-radius: var(--segmented-control-first-border-radius);
|
|
23960
24094
|
}
|
|
@@ -23962,10 +24096,10 @@ var segmentedControlItemStyles = import_react157.css`
|
|
|
23962
24096
|
border-radius: var(--segmented-control-last-border-radius);
|
|
23963
24097
|
}
|
|
23964
24098
|
`;
|
|
23965
|
-
var segmentedControlInputStyles =
|
|
24099
|
+
var segmentedControlInputStyles = import_react159.css`
|
|
23966
24100
|
${accessibleHidden}
|
|
23967
24101
|
`;
|
|
23968
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
24102
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react159.css`
|
|
23969
24103
|
position: relative;
|
|
23970
24104
|
display: flex;
|
|
23971
24105
|
align-items: center;
|
|
@@ -24032,25 +24166,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react157.css`
|
|
|
24032
24166
|
`}
|
|
24033
24167
|
}
|
|
24034
24168
|
`;
|
|
24035
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
24169
|
+
var segmentedControlLabelIconOnlyStyles = import_react159.css`
|
|
24036
24170
|
padding-inline: 0.5em;
|
|
24037
24171
|
`;
|
|
24038
|
-
var segmentedControlLabelCheckStyles =
|
|
24172
|
+
var segmentedControlLabelCheckStyles = import_react159.css`
|
|
24039
24173
|
opacity: 0.5;
|
|
24040
24174
|
`;
|
|
24041
|
-
var segmentedControlLabelContentStyles =
|
|
24175
|
+
var segmentedControlLabelContentStyles = import_react159.css`
|
|
24042
24176
|
display: flex;
|
|
24043
24177
|
align-items: center;
|
|
24044
24178
|
justify-content: center;
|
|
24045
24179
|
gap: var(--spacing-sm);
|
|
24046
24180
|
height: 100%;
|
|
24047
24181
|
`;
|
|
24048
|
-
var segmentedControlLabelTextStyles =
|
|
24182
|
+
var segmentedControlLabelTextStyles = import_react159.css`
|
|
24049
24183
|
white-space: nowrap;
|
|
24050
24184
|
`;
|
|
24051
24185
|
|
|
24052
24186
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
24053
|
-
var
|
|
24187
|
+
var import_jsx_runtime137 = require("@emotion/react/jsx-runtime");
|
|
24054
24188
|
var SegmentedControl = ({
|
|
24055
24189
|
name,
|
|
24056
24190
|
options,
|
|
@@ -24065,10 +24199,10 @@ var SegmentedControl = ({
|
|
|
24065
24199
|
currentBackgroundColor = "white",
|
|
24066
24200
|
...props
|
|
24067
24201
|
}) => {
|
|
24068
|
-
const wrapperRef = (0,
|
|
24069
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
24070
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
24071
|
-
const onOptionChange = (0,
|
|
24202
|
+
const wrapperRef = (0, import_react161.useRef)(null);
|
|
24203
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react161.useState)(false);
|
|
24204
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react161.useState)(false);
|
|
24205
|
+
const onOptionChange = (0, import_react161.useCallback)(
|
|
24072
24206
|
(event) => {
|
|
24073
24207
|
if (event.target.checked) {
|
|
24074
24208
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -24076,19 +24210,19 @@ var SegmentedControl = ({
|
|
|
24076
24210
|
},
|
|
24077
24211
|
[options, onChange]
|
|
24078
24212
|
);
|
|
24079
|
-
const sizeStyles = (0,
|
|
24213
|
+
const sizeStyles = (0, import_react161.useMemo)(() => {
|
|
24080
24214
|
const map = {
|
|
24081
|
-
sm: (0,
|
|
24082
|
-
md: (0,
|
|
24083
|
-
lg: (0,
|
|
24084
|
-
xl: (0,
|
|
24215
|
+
sm: (0, import_react160.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
24216
|
+
md: (0, import_react160.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
24217
|
+
lg: (0, import_react160.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
24218
|
+
xl: (0, import_react160.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
24085
24219
|
};
|
|
24086
24220
|
return map[size];
|
|
24087
24221
|
}, [size]);
|
|
24088
|
-
const isIconOnly = (0,
|
|
24222
|
+
const isIconOnly = (0, import_react161.useMemo)(() => {
|
|
24089
24223
|
return options.every((option) => option && option.icon && !option.label);
|
|
24090
24224
|
}, [options]);
|
|
24091
|
-
(0,
|
|
24225
|
+
(0, import_react161.useEffect)(() => {
|
|
24092
24226
|
const wrapperElement = wrapperRef.current;
|
|
24093
24227
|
const onScroll = () => {
|
|
24094
24228
|
if (!wrapperElement) {
|
|
@@ -24109,8 +24243,8 @@ var SegmentedControl = ({
|
|
|
24109
24243
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
24110
24244
|
};
|
|
24111
24245
|
}, []);
|
|
24112
|
-
return /* @__PURE__ */ (0,
|
|
24113
|
-
/* @__PURE__ */ (0,
|
|
24246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
24247
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
24114
24248
|
"div",
|
|
24115
24249
|
{
|
|
24116
24250
|
css: [
|
|
@@ -24126,12 +24260,12 @@ var SegmentedControl = ({
|
|
|
24126
24260
|
}
|
|
24127
24261
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
24128
24262
|
const isDisabled = disabled2 || option.disabled;
|
|
24129
|
-
return /* @__PURE__ */ (0,
|
|
24263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
24130
24264
|
"div",
|
|
24131
24265
|
{
|
|
24132
24266
|
css: segmentedControlItemStyles,
|
|
24133
24267
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
24134
|
-
children: /* @__PURE__ */ (0,
|
|
24268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
24135
24269
|
"label",
|
|
24136
24270
|
{
|
|
24137
24271
|
css: [
|
|
@@ -24140,7 +24274,7 @@ var SegmentedControl = ({
|
|
|
24140
24274
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
24141
24275
|
],
|
|
24142
24276
|
children: [
|
|
24143
|
-
/* @__PURE__ */ (0,
|
|
24277
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
24144
24278
|
"input",
|
|
24145
24279
|
{
|
|
24146
24280
|
css: segmentedControlInputStyles,
|
|
@@ -24152,10 +24286,10 @@ var SegmentedControl = ({
|
|
|
24152
24286
|
disabled: isDisabled
|
|
24153
24287
|
}
|
|
24154
24288
|
),
|
|
24155
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
24156
|
-
/* @__PURE__ */ (0,
|
|
24157
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
24158
|
-
!text || hideOptionText ? null : /* @__PURE__ */ (0,
|
|
24289
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
24290
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
24291
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
24292
|
+
!text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
24159
24293
|
] })
|
|
24160
24294
|
]
|
|
24161
24295
|
}
|
|
@@ -24165,7 +24299,7 @@ var SegmentedControl = ({
|
|
|
24165
24299
|
})
|
|
24166
24300
|
}
|
|
24167
24301
|
) }),
|
|
24168
|
-
/* @__PURE__ */ (0,
|
|
24302
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
24169
24303
|
"div",
|
|
24170
24304
|
{
|
|
24171
24305
|
css: [
|
|
@@ -24183,18 +24317,18 @@ init_emotion_jsx_shim();
|
|
|
24183
24317
|
|
|
24184
24318
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
24185
24319
|
init_emotion_jsx_shim();
|
|
24186
|
-
var
|
|
24187
|
-
var lightFadingOut =
|
|
24320
|
+
var import_react162 = require("@emotion/react");
|
|
24321
|
+
var lightFadingOut = import_react162.keyframes`
|
|
24188
24322
|
from { opacity: 0.1; }
|
|
24189
24323
|
to { opacity: 0.025; }
|
|
24190
24324
|
`;
|
|
24191
|
-
var skeletonStyles =
|
|
24325
|
+
var skeletonStyles = import_react162.css`
|
|
24192
24326
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
24193
24327
|
background-color: var(--gray-900);
|
|
24194
24328
|
`;
|
|
24195
24329
|
|
|
24196
24330
|
// src/components/Skeleton/Skeleton.tsx
|
|
24197
|
-
var
|
|
24331
|
+
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
24198
24332
|
var Skeleton = ({
|
|
24199
24333
|
width = "100%",
|
|
24200
24334
|
height = "1.25rem",
|
|
@@ -24202,7 +24336,7 @@ var Skeleton = ({
|
|
|
24202
24336
|
circle = false,
|
|
24203
24337
|
children,
|
|
24204
24338
|
...otherProps
|
|
24205
|
-
}) => /* @__PURE__ */ (0,
|
|
24339
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
24206
24340
|
"div",
|
|
24207
24341
|
{
|
|
24208
24342
|
css: [
|
|
@@ -24223,12 +24357,12 @@ var Skeleton = ({
|
|
|
24223
24357
|
|
|
24224
24358
|
// src/components/Switch/Switch.tsx
|
|
24225
24359
|
init_emotion_jsx_shim();
|
|
24226
|
-
var
|
|
24360
|
+
var import_react164 = require("react");
|
|
24227
24361
|
|
|
24228
24362
|
// src/components/Switch/Switch.styles.ts
|
|
24229
24363
|
init_emotion_jsx_shim();
|
|
24230
|
-
var
|
|
24231
|
-
var SwitchInputContainer =
|
|
24364
|
+
var import_react163 = require("@emotion/react");
|
|
24365
|
+
var SwitchInputContainer = import_react163.css`
|
|
24232
24366
|
cursor: pointer;
|
|
24233
24367
|
display: inline-block;
|
|
24234
24368
|
position: relative;
|
|
@@ -24237,7 +24371,7 @@ var SwitchInputContainer = import_react161.css`
|
|
|
24237
24371
|
vertical-align: middle;
|
|
24238
24372
|
user-select: none;
|
|
24239
24373
|
`;
|
|
24240
|
-
var SwitchInput = (size) =>
|
|
24374
|
+
var SwitchInput = (size) => import_react163.css`
|
|
24241
24375
|
appearance: none;
|
|
24242
24376
|
border-radius: var(--rounded-full);
|
|
24243
24377
|
background-color: var(--white);
|
|
@@ -24276,7 +24410,7 @@ var SwitchInput = (size) => import_react161.css`
|
|
|
24276
24410
|
cursor: not-allowed;
|
|
24277
24411
|
}
|
|
24278
24412
|
`;
|
|
24279
|
-
var SwitchInputDisabled =
|
|
24413
|
+
var SwitchInputDisabled = import_react163.css`
|
|
24280
24414
|
opacity: var(--opacity-50);
|
|
24281
24415
|
cursor: not-allowed;
|
|
24282
24416
|
|
|
@@ -24284,7 +24418,7 @@ var SwitchInputDisabled = import_react161.css`
|
|
|
24284
24418
|
cursor: not-allowed;
|
|
24285
24419
|
}
|
|
24286
24420
|
`;
|
|
24287
|
-
var SwitchInputLabel = (size) =>
|
|
24421
|
+
var SwitchInputLabel = (size) => import_react163.css`
|
|
24288
24422
|
align-items: center;
|
|
24289
24423
|
color: var(--typography-base);
|
|
24290
24424
|
display: inline-flex;
|
|
@@ -24306,32 +24440,32 @@ var SwitchInputLabel = (size) => import_react161.css`
|
|
|
24306
24440
|
top: 0;
|
|
24307
24441
|
}
|
|
24308
24442
|
`;
|
|
24309
|
-
var SwitchText = (size) =>
|
|
24443
|
+
var SwitchText = (size) => import_react163.css`
|
|
24310
24444
|
color: var(--gray-500);
|
|
24311
24445
|
font-size: var(--fs-sm);
|
|
24312
24446
|
padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
|
|
24313
24447
|
`;
|
|
24314
24448
|
|
|
24315
24449
|
// src/components/Switch/Switch.tsx
|
|
24316
|
-
var
|
|
24317
|
-
var Switch = (0,
|
|
24450
|
+
var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
|
|
24451
|
+
var Switch = (0, import_react164.forwardRef)(
|
|
24318
24452
|
({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
|
|
24319
24453
|
let additionalText = infoText;
|
|
24320
24454
|
if (infoText && toggleText) {
|
|
24321
24455
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
24322
24456
|
}
|
|
24323
|
-
return /* @__PURE__ */ (0,
|
|
24324
|
-
/* @__PURE__ */ (0,
|
|
24457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, { children: [
|
|
24458
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
24325
24459
|
"label",
|
|
24326
24460
|
{
|
|
24327
24461
|
css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0],
|
|
24328
24462
|
children: [
|
|
24329
|
-
/* @__PURE__ */ (0,
|
|
24330
|
-
/* @__PURE__ */ (0,
|
|
24463
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
|
|
24464
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { css: SwitchInputLabel(switchSize), children: label })
|
|
24331
24465
|
]
|
|
24332
24466
|
}
|
|
24333
24467
|
),
|
|
24334
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
24468
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { css: SwitchText(switchSize), children: additionalText }) : null,
|
|
24335
24469
|
children
|
|
24336
24470
|
] });
|
|
24337
24471
|
}
|
|
@@ -24343,8 +24477,8 @@ var React24 = __toESM(require("react"));
|
|
|
24343
24477
|
|
|
24344
24478
|
// src/components/Table/Table.styles.ts
|
|
24345
24479
|
init_emotion_jsx_shim();
|
|
24346
|
-
var
|
|
24347
|
-
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) =>
|
|
24480
|
+
var import_react165 = require("@emotion/react");
|
|
24481
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react165.css`
|
|
24348
24482
|
border-bottom: 1px solid var(--gray-400);
|
|
24349
24483
|
border-collapse: collapse;
|
|
24350
24484
|
min-width: 100%;
|
|
@@ -24364,66 +24498,66 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_
|
|
|
24364
24498
|
background-color: var(--gray-50);
|
|
24365
24499
|
}
|
|
24366
24500
|
`;
|
|
24367
|
-
var tableHead =
|
|
24501
|
+
var tableHead = import_react165.css`
|
|
24368
24502
|
color: var(--typography-base);
|
|
24369
24503
|
text-align: left;
|
|
24370
24504
|
`;
|
|
24371
|
-
var tableRow =
|
|
24505
|
+
var tableRow = import_react165.css`
|
|
24372
24506
|
border-bottom: 1px solid var(--gray-100);
|
|
24373
24507
|
`;
|
|
24374
|
-
var tableCellHead =
|
|
24508
|
+
var tableCellHead = import_react165.css`
|
|
24375
24509
|
font-size: var(--fs-sm);
|
|
24376
24510
|
text-transform: uppercase;
|
|
24377
24511
|
font-weight: var(--fw-bold);
|
|
24378
24512
|
`;
|
|
24379
24513
|
|
|
24380
24514
|
// src/components/Table/Table.tsx
|
|
24381
|
-
var
|
|
24515
|
+
var import_jsx_runtime140 = require("@emotion/react/jsx-runtime");
|
|
24382
24516
|
var Table = React24.forwardRef(
|
|
24383
24517
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
24384
|
-
return /* @__PURE__ */ (0,
|
|
24518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
24385
24519
|
}
|
|
24386
24520
|
);
|
|
24387
24521
|
var TableHead = React24.forwardRef(
|
|
24388
24522
|
({ children, ...otherProps }, ref) => {
|
|
24389
|
-
return /* @__PURE__ */ (0,
|
|
24523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
24390
24524
|
}
|
|
24391
24525
|
);
|
|
24392
24526
|
var TableBody = React24.forwardRef(
|
|
24393
24527
|
({ children, ...otherProps }, ref) => {
|
|
24394
|
-
return /* @__PURE__ */ (0,
|
|
24528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("tbody", { ref, ...otherProps, children });
|
|
24395
24529
|
}
|
|
24396
24530
|
);
|
|
24397
24531
|
var TableFoot = React24.forwardRef(
|
|
24398
24532
|
({ children, ...otherProps }, ref) => {
|
|
24399
|
-
return /* @__PURE__ */ (0,
|
|
24533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("tfoot", { ref, ...otherProps, children });
|
|
24400
24534
|
}
|
|
24401
24535
|
);
|
|
24402
24536
|
var TableRow = React24.forwardRef(
|
|
24403
24537
|
({ children, ...otherProps }, ref) => {
|
|
24404
|
-
return /* @__PURE__ */ (0,
|
|
24538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
24405
24539
|
}
|
|
24406
24540
|
);
|
|
24407
24541
|
var TableCellHead = React24.forwardRef(
|
|
24408
24542
|
({ children, ...otherProps }, ref) => {
|
|
24409
|
-
return /* @__PURE__ */ (0,
|
|
24543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
24410
24544
|
}
|
|
24411
24545
|
);
|
|
24412
24546
|
var TableCellData = React24.forwardRef(
|
|
24413
24547
|
({ children, ...otherProps }, ref) => {
|
|
24414
|
-
return /* @__PURE__ */ (0,
|
|
24548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("td", { ref, ...otherProps, children });
|
|
24415
24549
|
}
|
|
24416
24550
|
);
|
|
24417
24551
|
|
|
24418
24552
|
// src/components/Tabs/Tabs.tsx
|
|
24419
24553
|
init_emotion_jsx_shim();
|
|
24420
|
-
var
|
|
24421
|
-
var
|
|
24554
|
+
var import_react167 = require("@ariakit/react");
|
|
24555
|
+
var import_react168 = require("react");
|
|
24422
24556
|
|
|
24423
24557
|
// src/components/Tabs/Tabs.styles.ts
|
|
24424
24558
|
init_emotion_jsx_shim();
|
|
24425
|
-
var
|
|
24426
|
-
var tabButtonStyles =
|
|
24559
|
+
var import_react166 = require("@emotion/react");
|
|
24560
|
+
var tabButtonStyles = import_react166.css`
|
|
24427
24561
|
align-items: center;
|
|
24428
24562
|
border: 0;
|
|
24429
24563
|
height: 2.5rem;
|
|
@@ -24440,16 +24574,16 @@ var tabButtonStyles = import_react164.css`
|
|
|
24440
24574
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
24441
24575
|
}
|
|
24442
24576
|
`;
|
|
24443
|
-
var tabButtonGroupStyles =
|
|
24577
|
+
var tabButtonGroupStyles = import_react166.css`
|
|
24444
24578
|
display: flex;
|
|
24445
24579
|
gap: var(--spacing-base);
|
|
24446
24580
|
border-bottom: 1px solid var(--gray-300);
|
|
24447
24581
|
`;
|
|
24448
24582
|
|
|
24449
24583
|
// src/components/Tabs/Tabs.tsx
|
|
24450
|
-
var
|
|
24584
|
+
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
24451
24585
|
var useCurrentTab = () => {
|
|
24452
|
-
const context = (0,
|
|
24586
|
+
const context = (0, import_react167.useTabStore)();
|
|
24453
24587
|
if (!context) {
|
|
24454
24588
|
throw new Error("This component can only be used inside <Tabs>");
|
|
24455
24589
|
}
|
|
@@ -24463,12 +24597,12 @@ var Tabs = ({
|
|
|
24463
24597
|
manual,
|
|
24464
24598
|
...props
|
|
24465
24599
|
}) => {
|
|
24466
|
-
const selected = (0,
|
|
24600
|
+
const selected = (0, import_react168.useMemo)(() => {
|
|
24467
24601
|
if (selectedId) return selectedId;
|
|
24468
24602
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
24469
24603
|
}, [selectedId, useHashForState]);
|
|
24470
|
-
const tab = (0,
|
|
24471
|
-
const onTabSelect = (0,
|
|
24604
|
+
const tab = (0, import_react167.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
24605
|
+
const onTabSelect = (0, import_react168.useCallback)(
|
|
24472
24606
|
(value) => {
|
|
24473
24607
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
24474
24608
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -24479,28 +24613,28 @@ var Tabs = ({
|
|
|
24479
24613
|
},
|
|
24480
24614
|
[onSelectedIdChange, useHashForState]
|
|
24481
24615
|
);
|
|
24482
|
-
(0,
|
|
24616
|
+
(0, import_react168.useEffect)(() => {
|
|
24483
24617
|
if (selected && selected !== tab.getState().activeId) {
|
|
24484
24618
|
tab.setSelectedId(selected);
|
|
24485
24619
|
}
|
|
24486
24620
|
}, [selected, tab]);
|
|
24487
|
-
return /* @__PURE__ */ (0,
|
|
24621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react167.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
24488
24622
|
};
|
|
24489
24623
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
24490
|
-
return /* @__PURE__ */ (0,
|
|
24624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react167.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
24491
24625
|
};
|
|
24492
24626
|
var TabButton = ({
|
|
24493
24627
|
children,
|
|
24494
24628
|
id,
|
|
24495
24629
|
...props
|
|
24496
24630
|
}) => {
|
|
24497
|
-
return /* @__PURE__ */ (0,
|
|
24631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react167.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
24498
24632
|
};
|
|
24499
24633
|
var TabContent = ({
|
|
24500
24634
|
children,
|
|
24501
24635
|
...props
|
|
24502
24636
|
}) => {
|
|
24503
|
-
return /* @__PURE__ */ (0,
|
|
24637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react167.TabPanel, { ...props, children });
|
|
24504
24638
|
};
|
|
24505
24639
|
|
|
24506
24640
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -24508,8 +24642,8 @@ init_emotion_jsx_shim();
|
|
|
24508
24642
|
|
|
24509
24643
|
// src/components/Validation/StatusBullet.styles.ts
|
|
24510
24644
|
init_emotion_jsx_shim();
|
|
24511
|
-
var
|
|
24512
|
-
var StatusBulletContainer =
|
|
24645
|
+
var import_react169 = require("@emotion/react");
|
|
24646
|
+
var StatusBulletContainer = import_react169.css`
|
|
24513
24647
|
align-items: center;
|
|
24514
24648
|
align-self: center;
|
|
24515
24649
|
color: var(--gray-500);
|
|
@@ -24526,33 +24660,33 @@ var StatusBulletContainer = import_react167.css`
|
|
|
24526
24660
|
display: block;
|
|
24527
24661
|
}
|
|
24528
24662
|
`;
|
|
24529
|
-
var StatusBulletBase =
|
|
24663
|
+
var StatusBulletBase = import_react169.css`
|
|
24530
24664
|
font-size: var(--fs-sm);
|
|
24531
24665
|
&:before {
|
|
24532
24666
|
width: var(--fs-xs);
|
|
24533
24667
|
height: var(--fs-xs);
|
|
24534
24668
|
}
|
|
24535
24669
|
`;
|
|
24536
|
-
var StatusBulletSmall =
|
|
24670
|
+
var StatusBulletSmall = import_react169.css`
|
|
24537
24671
|
font-size: var(--fs-xs);
|
|
24538
24672
|
&:before {
|
|
24539
24673
|
width: var(--fs-xxs);
|
|
24540
24674
|
height: var(--fs-xxs);
|
|
24541
24675
|
}
|
|
24542
24676
|
`;
|
|
24543
|
-
var StatusDraft =
|
|
24677
|
+
var StatusDraft = import_react169.css`
|
|
24544
24678
|
&:before {
|
|
24545
24679
|
background: var(--white);
|
|
24546
24680
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
24547
24681
|
}
|
|
24548
24682
|
`;
|
|
24549
|
-
var StatusModified =
|
|
24683
|
+
var StatusModified = import_react169.css`
|
|
24550
24684
|
&:before {
|
|
24551
24685
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
24552
24686
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
24553
24687
|
}
|
|
24554
24688
|
`;
|
|
24555
|
-
var StatusError =
|
|
24689
|
+
var StatusError = import_react169.css`
|
|
24556
24690
|
color: var(--error);
|
|
24557
24691
|
&:before {
|
|
24558
24692
|
/* TODO: replace this with an svg icon */
|
|
@@ -24565,29 +24699,29 @@ var StatusError = import_react167.css`
|
|
|
24565
24699
|
);
|
|
24566
24700
|
}
|
|
24567
24701
|
`;
|
|
24568
|
-
var StatusPublished =
|
|
24702
|
+
var StatusPublished = import_react169.css`
|
|
24569
24703
|
&:before {
|
|
24570
24704
|
background: var(--accent-dark);
|
|
24571
24705
|
}
|
|
24572
24706
|
`;
|
|
24573
|
-
var StatusOrphan =
|
|
24707
|
+
var StatusOrphan = import_react169.css`
|
|
24574
24708
|
&:before {
|
|
24575
24709
|
background: var(--brand-secondary-5);
|
|
24576
24710
|
}
|
|
24577
24711
|
`;
|
|
24578
|
-
var StatusUnknown =
|
|
24712
|
+
var StatusUnknown = import_react169.css`
|
|
24579
24713
|
&:before {
|
|
24580
24714
|
background: var(--gray-800);
|
|
24581
24715
|
}
|
|
24582
24716
|
`;
|
|
24583
|
-
var StatusDeleted =
|
|
24717
|
+
var StatusDeleted = import_react169.css`
|
|
24584
24718
|
&:before {
|
|
24585
24719
|
background: var(--error);
|
|
24586
24720
|
}
|
|
24587
24721
|
`;
|
|
24588
24722
|
|
|
24589
24723
|
// src/components/Validation/StatusBullet.tsx
|
|
24590
|
-
var
|
|
24724
|
+
var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
|
|
24591
24725
|
var StatusBullet = ({
|
|
24592
24726
|
status,
|
|
24593
24727
|
hideText = false,
|
|
@@ -24607,7 +24741,7 @@ var StatusBullet = ({
|
|
|
24607
24741
|
Deleted: StatusDeleted
|
|
24608
24742
|
};
|
|
24609
24743
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
24610
|
-
return /* @__PURE__ */ (0,
|
|
24744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
24611
24745
|
"span",
|
|
24612
24746
|
{
|
|
24613
24747
|
role: "status",
|
|
@@ -24718,6 +24852,7 @@ var StatusBullet = ({
|
|
|
24718
24852
|
ObjectGridItemCoverButton,
|
|
24719
24853
|
ObjectGridItemHeading,
|
|
24720
24854
|
ObjectGridItemIconWithTooltip,
|
|
24855
|
+
ObjectGridItemLoadingSkeleton,
|
|
24721
24856
|
ObjectItemLoadingSkeleton,
|
|
24722
24857
|
ObjectListItem,
|
|
24723
24858
|
ObjectListItemContainer,
|