@uniformdev/design-system 19.161.0 → 19.162.2-alpha.11
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 +698 -393
- package/dist/index.d.mts +69 -4
- package/dist/index.d.ts +69 -4
- package/dist/index.js +736 -409
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -66,6 +66,10 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
66
66
|
|
|
67
67
|
--action-destructive-default: var(--brand-secondary-5);
|
|
68
68
|
--action-destructive-hover: #e07571;
|
|
69
|
+
--action-destructive-active: rbga(210, 50, 45, 0.05); /* #d2322d */
|
|
70
|
+
--action-destructive-disabled: #f87171;
|
|
71
|
+
|
|
72
|
+
|
|
69
73
|
|
|
70
74
|
/* tertiary action */
|
|
71
75
|
--tertiary-action-default: var(--gray-700);
|
|
@@ -934,16 +938,16 @@ var buttonPrimary = css8`
|
|
|
934
938
|
})}
|
|
935
939
|
`;
|
|
936
940
|
var buttonDestructive = css8`
|
|
937
|
-
background: var(--
|
|
941
|
+
background: var(--action-destructive-default);
|
|
938
942
|
color: var(--white);
|
|
939
943
|
|
|
940
944
|
&:disabled {
|
|
941
|
-
background: var(--gray-300);
|
|
942
945
|
color: var(--white);
|
|
946
|
+
opacity: var(--opacity-50);
|
|
943
947
|
}
|
|
944
948
|
|
|
945
949
|
${buttonRippleEffect({
|
|
946
|
-
hoverColor: "var(--
|
|
950
|
+
hoverColor: "var(--action-destructive-default)",
|
|
947
951
|
activeColor: "var(--action-destructive-hover)"
|
|
948
952
|
})}
|
|
949
953
|
`;
|
|
@@ -1021,19 +1025,20 @@ var buttonGhost = css8`
|
|
|
1021
1025
|
`;
|
|
1022
1026
|
var buttonGhostDestructive = css8`
|
|
1023
1027
|
background: transparent;
|
|
1024
|
-
color: var(--
|
|
1028
|
+
color: var(--action-destructive-default);
|
|
1025
1029
|
|
|
1026
1030
|
&:hover {
|
|
1027
|
-
|
|
1031
|
+
outline: 1px solid var(--action-destructive-hover);
|
|
1032
|
+
color: var(--action-destructive-hover);
|
|
1028
1033
|
}
|
|
1029
1034
|
|
|
1030
1035
|
&:disabled {
|
|
1031
1036
|
background: transparent;
|
|
1032
|
-
|
|
1033
|
-
|
|
1037
|
+
color: var(--action-destructive-disabled);
|
|
1038
|
+
opacity: var(--opacity-50);
|
|
1034
1039
|
}
|
|
1035
1040
|
|
|
1036
|
-
${buttonRippleEffect({ hoverColor: "var(--white)", activeColor: "var(--
|
|
1041
|
+
${buttonRippleEffect({ hoverColor: "var(--white)", activeColor: "var(--action-destructive-active)" })}
|
|
1037
1042
|
`;
|
|
1038
1043
|
var buttonTertiary = css8`
|
|
1039
1044
|
background: var(--tertiary-action-default);
|
|
@@ -1150,7 +1155,7 @@ var toastContainerStyles = css10`
|
|
|
1150
1155
|
${functionalColors}
|
|
1151
1156
|
|
|
1152
1157
|
--toastify-color-light: white;
|
|
1153
|
-
--toastify-color-info: var(--utility-
|
|
1158
|
+
--toastify-color-info: var(--utility-info-icon);
|
|
1154
1159
|
--toastify-color-success: var(--utility-success-icon);
|
|
1155
1160
|
--toastify-color-warning: var(--utility-caution-icon);
|
|
1156
1161
|
--toastify-color-error: var(--utility-danger-icon);
|
|
@@ -13116,10 +13121,11 @@ function convertComboBoxGroupsToSelectableGroups(args) {
|
|
|
13116
13121
|
return { groupedOptions, selectedOptions };
|
|
13117
13122
|
}
|
|
13118
13123
|
function getComboBoxSelectedSelectableGroups(selectedValues) {
|
|
13119
|
-
const
|
|
13124
|
+
const selectedValuesNormalized = selectedValues ? Array.isArray(selectedValues) ? selectedValues : [selectedValues] : null;
|
|
13125
|
+
const selectedOptionValues = selectedValuesNormalized == null ? void 0 : selectedValuesNormalized.flatMap(
|
|
13120
13126
|
(selectedValue) => Array.isArray(selectedValue.value) ? selectedValue.value : [selectedValue.value]
|
|
13121
13127
|
);
|
|
13122
|
-
return new Set(selectedOptionValues.filter((value) => value !== void 0));
|
|
13128
|
+
return new Set(selectedOptionValues == null ? void 0 : selectedOptionValues.filter((value) => value !== void 0));
|
|
13123
13129
|
}
|
|
13124
13130
|
function flatMapOptionValues(options) {
|
|
13125
13131
|
return options.flatMap((option) => {
|
|
@@ -18129,39 +18135,323 @@ var ModalDialog = forwardRef15(
|
|
|
18129
18135
|
);
|
|
18130
18136
|
ModalDialog.displayName = "ModalDialog";
|
|
18131
18137
|
|
|
18138
|
+
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
18139
|
+
import { css as css78 } from "@emotion/react";
|
|
18140
|
+
var ObjectGridContainer = (gridCount) => css78`
|
|
18141
|
+
display: grid;
|
|
18142
|
+
grid-template-columns: repeat(${gridCount}, minmax(250px, 1fr));
|
|
18143
|
+
gap: var(--spacing-base);
|
|
18144
|
+
`;
|
|
18145
|
+
|
|
18146
|
+
// src/components/Objects/ObjectGridContainer.tsx
|
|
18147
|
+
import { jsx as jsx101 } from "@emotion/react/jsx-runtime";
|
|
18148
|
+
var ObjectGridContainer2 = ({ gridCount = 3, children }) => {
|
|
18149
|
+
return /* @__PURE__ */ jsx101("div", { "data-testid": "object-grid-container", css: ObjectGridContainer(gridCount), children });
|
|
18150
|
+
};
|
|
18151
|
+
|
|
18152
|
+
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
18153
|
+
import { css as css79 } from "@emotion/react";
|
|
18154
|
+
var ObjectGridItem = css79`
|
|
18155
|
+
border: 1px solid var(--gray-300);
|
|
18156
|
+
border-radius: var(--rounded-base);
|
|
18157
|
+
background: var(--white);
|
|
18158
|
+
display: flex;
|
|
18159
|
+
flex-direction: column;
|
|
18160
|
+
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
18161
|
+
|
|
18162
|
+
&[aria-selected='true'] {
|
|
18163
|
+
border: 1px solid var(--accent-dark);
|
|
18164
|
+
}
|
|
18165
|
+
|
|
18166
|
+
&[aria-selected='false'] {
|
|
18167
|
+
&:hover {
|
|
18168
|
+
border: 1px solid var(--accent-dark);
|
|
18169
|
+
}
|
|
18170
|
+
}
|
|
18171
|
+
`;
|
|
18172
|
+
var ObjectGridItemMediaWrapper = css79`
|
|
18173
|
+
display: flex;
|
|
18174
|
+
flex: 1 1 0;
|
|
18175
|
+
position: relative;
|
|
18176
|
+
`;
|
|
18177
|
+
var ObjectGridItemContentWrapper = css79`
|
|
18178
|
+
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
18179
|
+
min-height: 52px;
|
|
18180
|
+
`;
|
|
18181
|
+
var ObjectGridItemImage = css79`
|
|
18182
|
+
object-fit: cover;
|
|
18183
|
+
width: 100%;
|
|
18184
|
+
height: auto;
|
|
18185
|
+
`;
|
|
18186
|
+
var MenuBtn = css79`
|
|
18187
|
+
border: none;
|
|
18188
|
+
background: transparent;
|
|
18189
|
+
padding: var(--spacing-xs);
|
|
18190
|
+
color: var(--gray-300);
|
|
18191
|
+
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
18192
|
+
|
|
18193
|
+
&:focus,
|
|
18194
|
+
&:hover {
|
|
18195
|
+
outline: none;
|
|
18196
|
+
color: var(--gray-500);
|
|
18197
|
+
}
|
|
18198
|
+
`;
|
|
18199
|
+
|
|
18200
|
+
// src/components/Objects/ObjectGridItem.tsx
|
|
18201
|
+
import { jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
18202
|
+
var ObjectGridItem2 = ({
|
|
18203
|
+
header: header2,
|
|
18204
|
+
cover,
|
|
18205
|
+
rightSlot,
|
|
18206
|
+
menuItems,
|
|
18207
|
+
isSelected,
|
|
18208
|
+
children
|
|
18209
|
+
}) => {
|
|
18210
|
+
return /* @__PURE__ */ jsxs68("div", { css: ObjectGridItem, "aria-selected": isSelected, children: [
|
|
18211
|
+
/* @__PURE__ */ jsx102("div", { css: ObjectGridItemMediaWrapper, children: cover }),
|
|
18212
|
+
/* @__PURE__ */ jsxs68(HorizontalRhythm, { css: ObjectGridItemContentWrapper, justify: "space-between", gap: "sm", children: [
|
|
18213
|
+
/* @__PURE__ */ jsxs68(VerticalRhythm, { gap: "0", children: [
|
|
18214
|
+
/* @__PURE__ */ jsx102(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
18215
|
+
children
|
|
18216
|
+
] }),
|
|
18217
|
+
/* @__PURE__ */ jsxs68(HorizontalRhythm, { gap: "xs", align: "flex-start", children: [
|
|
18218
|
+
rightSlot,
|
|
18219
|
+
menuItems ? /* @__PURE__ */ jsx102(
|
|
18220
|
+
Menu,
|
|
18221
|
+
{
|
|
18222
|
+
menuTrigger: (
|
|
18223
|
+
// TODO: once insights lands we should be able to replace this with MenuTrigger component
|
|
18224
|
+
/* @__PURE__ */ jsx102(
|
|
18225
|
+
"button",
|
|
18226
|
+
{
|
|
18227
|
+
type: "button",
|
|
18228
|
+
"data-testid": "object-grid-item-menu-btn",
|
|
18229
|
+
title: "menu options",
|
|
18230
|
+
css: MenuBtn,
|
|
18231
|
+
children: /* @__PURE__ */ jsx102(Icon, { icon: "more-alt", size: "1rem", iconColor: "currentColor" })
|
|
18232
|
+
}
|
|
18233
|
+
)
|
|
18234
|
+
),
|
|
18235
|
+
placement: "bottom-end",
|
|
18236
|
+
children: menuItems
|
|
18237
|
+
}
|
|
18238
|
+
) : null
|
|
18239
|
+
] })
|
|
18240
|
+
] })
|
|
18241
|
+
] });
|
|
18242
|
+
};
|
|
18243
|
+
|
|
18244
|
+
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
18245
|
+
import { css as css80 } from "@emotion/react";
|
|
18246
|
+
var CoverImage = css80`
|
|
18247
|
+
aspect-ratio: 16/9;
|
|
18248
|
+
max-width: 100%;
|
|
18249
|
+
max-height: 100%;
|
|
18250
|
+
height: auto;
|
|
18251
|
+
padding: var(--spacing-sm);
|
|
18252
|
+
`;
|
|
18253
|
+
var CoverIconWrapper = css80`
|
|
18254
|
+
position: relative;
|
|
18255
|
+
display: flex;
|
|
18256
|
+
align-items: center;
|
|
18257
|
+
justify-content: center;
|
|
18258
|
+
flex: 1;
|
|
18259
|
+
overflow: hidden;
|
|
18260
|
+
`;
|
|
18261
|
+
var CoverIconGhost = css80`
|
|
18262
|
+
position: absolute;
|
|
18263
|
+
width: 60%;
|
|
18264
|
+
height: auto;
|
|
18265
|
+
aspect-ratio: 1;
|
|
18266
|
+
opacity: 0.05;
|
|
18267
|
+
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
18268
|
+
`;
|
|
18269
|
+
var CoverSlot = css80`
|
|
18270
|
+
align-items: center;
|
|
18271
|
+
background: var(--white);
|
|
18272
|
+
display: flex;
|
|
18273
|
+
justify-content: center;
|
|
18274
|
+
position: absolute;
|
|
18275
|
+
top: var(--spacing-sm);
|
|
18276
|
+
z-index: 1;
|
|
18277
|
+
width: 24px;
|
|
18278
|
+
height: 24px;
|
|
18279
|
+
`;
|
|
18280
|
+
var CoverSlotLeft = css80`
|
|
18281
|
+
border-bottom-right-radius: var(--rounded-base);
|
|
18282
|
+
left: var(--spacing-sm);
|
|
18283
|
+
`;
|
|
18284
|
+
var CoverSlotRight = css80`
|
|
18285
|
+
border-bottom-left-radius: var(--rounded-base);
|
|
18286
|
+
right: var(--spacing-sm);
|
|
18287
|
+
`;
|
|
18288
|
+
var CoverButton = css80`
|
|
18289
|
+
align-items: stretch;
|
|
18290
|
+
border: none;
|
|
18291
|
+
background: none;
|
|
18292
|
+
display: flex;
|
|
18293
|
+
flex: 1 1 0;
|
|
18294
|
+
padding: 0;
|
|
18295
|
+
|
|
18296
|
+
&:focus,
|
|
18297
|
+
&:hover {
|
|
18298
|
+
outline: none;
|
|
18299
|
+
}
|
|
18300
|
+
`;
|
|
18301
|
+
var CoverSelectedChip = css80`
|
|
18302
|
+
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
18303
|
+
opacity: 0;
|
|
18304
|
+
position: absolute;
|
|
18305
|
+
bottom: var(--spacing-base);
|
|
18306
|
+
right: var(--spacing-base);
|
|
18307
|
+
`;
|
|
18308
|
+
|
|
18309
|
+
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
18310
|
+
import { Fragment as Fragment14, jsx as jsx103, jsxs as jsxs69 } from "@emotion/react/jsx-runtime";
|
|
18311
|
+
var ObjectGridItemCardCover = (props) => {
|
|
18312
|
+
if ("imageUrl" in props && props.imageUrl) {
|
|
18313
|
+
const { imageUrl } = props;
|
|
18314
|
+
return /* @__PURE__ */ jsx103(
|
|
18315
|
+
"img",
|
|
18316
|
+
{
|
|
18317
|
+
src: imageUrl,
|
|
18318
|
+
css: CoverImage,
|
|
18319
|
+
loading: "lazy",
|
|
18320
|
+
role: "presentation",
|
|
18321
|
+
"data-testid": "object-grid-item-thumbnail"
|
|
18322
|
+
}
|
|
18323
|
+
);
|
|
18324
|
+
}
|
|
18325
|
+
if ("icon" in props && props.icon) {
|
|
18326
|
+
const { icon } = props;
|
|
18327
|
+
return /* @__PURE__ */ jsxs69("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
18328
|
+
/* @__PURE__ */ jsx103(Icon, { icon, iconColor: "currentColor", css: CoverIconGhost }),
|
|
18329
|
+
/* @__PURE__ */ jsx103(Icon, { icon, iconColor: "currentColor", size: 48 })
|
|
18330
|
+
] });
|
|
18331
|
+
}
|
|
18332
|
+
};
|
|
18333
|
+
var ObjectGridItemCover = ({
|
|
18334
|
+
coverSlotLeft,
|
|
18335
|
+
coverSlotRight,
|
|
18336
|
+
...props
|
|
18337
|
+
}) => {
|
|
18338
|
+
return /* @__PURE__ */ jsxs69(Fragment14, { children: [
|
|
18339
|
+
coverSlotLeft ? /* @__PURE__ */ jsx103("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
18340
|
+
/* @__PURE__ */ jsx103(ObjectGridItemCardCover, { ...props }),
|
|
18341
|
+
coverSlotRight ? /* @__PURE__ */ jsx103("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null
|
|
18342
|
+
] });
|
|
18343
|
+
};
|
|
18344
|
+
var ObjectGridItemCoverButton = ({
|
|
18345
|
+
id,
|
|
18346
|
+
isSelected,
|
|
18347
|
+
onSelection,
|
|
18348
|
+
coverSlotLeft,
|
|
18349
|
+
coverSlotRight,
|
|
18350
|
+
selectedText = "selected",
|
|
18351
|
+
...props
|
|
18352
|
+
}) => {
|
|
18353
|
+
return /* @__PURE__ */ jsxs69("button", { type: "button", css: CoverButton, onClick: () => onSelection(id), "aria-selected": isSelected, children: [
|
|
18354
|
+
coverSlotLeft ? /* @__PURE__ */ jsx103("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
18355
|
+
/* @__PURE__ */ jsx103(ObjectGridItemCardCover, { ...props }),
|
|
18356
|
+
coverSlotRight ? /* @__PURE__ */ jsx103("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
18357
|
+
isSelected ? /* @__PURE__ */ jsx103("div", { css: CoverSelectedChip, children: /* @__PURE__ */ jsx103(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
18358
|
+
] });
|
|
18359
|
+
};
|
|
18360
|
+
|
|
18361
|
+
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
18362
|
+
import { useEffect as useEffect14, useRef as useRef8, useState as useState12 } from "react";
|
|
18363
|
+
|
|
18364
|
+
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
18365
|
+
import { css as css81 } from "@emotion/react";
|
|
18366
|
+
var ObjectGridItemHeading = css81`
|
|
18367
|
+
overflow: hidden;
|
|
18368
|
+
text-overflow: ellipsis;
|
|
18369
|
+
white-space: initial;
|
|
18370
|
+
display: -webkit-box;
|
|
18371
|
+
-webkit-line-clamp: 1;
|
|
18372
|
+
-webkit-box-orient: vertical;
|
|
18373
|
+
`;
|
|
18374
|
+
var PopoverContent = css81`
|
|
18375
|
+
min-width: 50px;
|
|
18376
|
+
`;
|
|
18377
|
+
|
|
18378
|
+
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
18379
|
+
import { jsx as jsx104, jsxs as jsxs70 } from "@emotion/react/jsx-runtime";
|
|
18380
|
+
var ObjectGridItemHeading2 = ({
|
|
18381
|
+
heading,
|
|
18382
|
+
beforeHeadingSlot,
|
|
18383
|
+
afterHeadingSlot
|
|
18384
|
+
}) => {
|
|
18385
|
+
const [hasTruncation, setHasTruncation] = useState12(false);
|
|
18386
|
+
const headingRef = useRef8(null);
|
|
18387
|
+
useEffect14(() => {
|
|
18388
|
+
const currentHeading = headingRef.current;
|
|
18389
|
+
const observer = new ResizeObserver((entries) => {
|
|
18390
|
+
for (const entry of entries) {
|
|
18391
|
+
const isHeadingTruncated = entry.target.scrollHeight > entry.target.clientHeight;
|
|
18392
|
+
setHasTruncation(isHeadingTruncated);
|
|
18393
|
+
}
|
|
18394
|
+
});
|
|
18395
|
+
if (currentHeading) {
|
|
18396
|
+
observer.observe(currentHeading);
|
|
18397
|
+
}
|
|
18398
|
+
return () => {
|
|
18399
|
+
if (currentHeading) {
|
|
18400
|
+
observer.unobserve(currentHeading);
|
|
18401
|
+
}
|
|
18402
|
+
};
|
|
18403
|
+
}, []);
|
|
18404
|
+
return /* @__PURE__ */ jsxs70(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
18405
|
+
beforeHeadingSlot,
|
|
18406
|
+
/* @__PURE__ */ jsx104(Tooltip, { title: hasTruncation ? heading : "", children: /* @__PURE__ */ jsx104("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, children: heading }) }),
|
|
18407
|
+
afterHeadingSlot
|
|
18408
|
+
] });
|
|
18409
|
+
};
|
|
18410
|
+
|
|
18411
|
+
// src/components/Objects/ObjectGridItemIconWithTooltip.tsx
|
|
18412
|
+
import { jsx as jsx105 } from "@emotion/react/jsx-runtime";
|
|
18413
|
+
var ObjectGridItemIconWithTooltip = ({
|
|
18414
|
+
tooltipTitle,
|
|
18415
|
+
placement = "bottom-start",
|
|
18416
|
+
icon,
|
|
18417
|
+
iconColor = "accent-dark"
|
|
18418
|
+
}) => {
|
|
18419
|
+
return /* @__PURE__ */ jsx105(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ jsx105("span", { children: /* @__PURE__ */ jsx105(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
18420
|
+
};
|
|
18421
|
+
|
|
18132
18422
|
// src/components/Pagination/Pagination.tsx
|
|
18133
18423
|
import Paginate from "react-paginate";
|
|
18134
18424
|
|
|
18135
18425
|
// src/components/Pagination/Pagniation.styles.ts
|
|
18136
|
-
import { css as
|
|
18137
|
-
var container2 =
|
|
18426
|
+
import { css as css82 } from "@emotion/css";
|
|
18427
|
+
var container2 = css82`
|
|
18138
18428
|
align-items: center;
|
|
18139
18429
|
display: flex;
|
|
18140
18430
|
`;
|
|
18141
|
-
var disabled =
|
|
18431
|
+
var disabled = css82`
|
|
18142
18432
|
opacity: var(--opacity-50);
|
|
18143
18433
|
`;
|
|
18144
|
-
var disabledLink =
|
|
18434
|
+
var disabledLink = css82`
|
|
18145
18435
|
cursor: pointer-default;
|
|
18146
18436
|
`;
|
|
18147
|
-
var pageLink =
|
|
18437
|
+
var pageLink = css82`
|
|
18148
18438
|
display: block;
|
|
18149
18439
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
18150
18440
|
`;
|
|
18151
|
-
var prevNextControls =
|
|
18441
|
+
var prevNextControls = css82`
|
|
18152
18442
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
18153
18443
|
`;
|
|
18154
|
-
var active =
|
|
18444
|
+
var active = css82`
|
|
18155
18445
|
border-radius: var(--rounded-base);
|
|
18156
18446
|
background: var(--gray-200);
|
|
18157
18447
|
`;
|
|
18158
|
-
var page =
|
|
18448
|
+
var page = css82`
|
|
18159
18449
|
margin-left: var(--spacing-xs);
|
|
18160
18450
|
margin-right: var(--spacing-xs);
|
|
18161
18451
|
`;
|
|
18162
18452
|
|
|
18163
18453
|
// src/components/Pagination/Pagination.tsx
|
|
18164
|
-
import { jsx as
|
|
18454
|
+
import { jsx as jsx106 } from "@emotion/react/jsx-runtime";
|
|
18165
18455
|
function Pagination({
|
|
18166
18456
|
limit,
|
|
18167
18457
|
offset,
|
|
@@ -18176,12 +18466,12 @@ function Pagination({
|
|
|
18176
18466
|
if (pageCount <= 1) {
|
|
18177
18467
|
return null;
|
|
18178
18468
|
}
|
|
18179
|
-
return /* @__PURE__ */
|
|
18469
|
+
return /* @__PURE__ */ jsx106(
|
|
18180
18470
|
Paginate,
|
|
18181
18471
|
{
|
|
18182
18472
|
forcePage: currentPage,
|
|
18183
|
-
previousLabel: /* @__PURE__ */
|
|
18184
|
-
nextLabel: /* @__PURE__ */
|
|
18473
|
+
previousLabel: /* @__PURE__ */ jsx106("div", { className: prevNextControls, children: "<" }),
|
|
18474
|
+
nextLabel: /* @__PURE__ */ jsx106("div", { className: prevNextControls, children: ">" }),
|
|
18185
18475
|
breakLabel: "...",
|
|
18186
18476
|
pageCount,
|
|
18187
18477
|
marginPagesDisplayed: 2,
|
|
@@ -18221,8 +18511,8 @@ var useParameterShell = () => {
|
|
|
18221
18511
|
};
|
|
18222
18512
|
|
|
18223
18513
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
18224
|
-
import { css as
|
|
18225
|
-
var inputIconBtn =
|
|
18514
|
+
import { css as css83 } from "@emotion/react";
|
|
18515
|
+
var inputIconBtn = css83`
|
|
18226
18516
|
align-items: center;
|
|
18227
18517
|
border: none;
|
|
18228
18518
|
border-radius: var(--rounded-base);
|
|
@@ -18248,7 +18538,7 @@ var inputIconBtn = css79`
|
|
|
18248
18538
|
`;
|
|
18249
18539
|
|
|
18250
18540
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
18251
|
-
import { jsx as
|
|
18541
|
+
import { jsx as jsx107, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
18252
18542
|
var LabelLeadingIcon = ({
|
|
18253
18543
|
icon,
|
|
18254
18544
|
iconColor,
|
|
@@ -18260,7 +18550,7 @@ var LabelLeadingIcon = ({
|
|
|
18260
18550
|
...props
|
|
18261
18551
|
}) => {
|
|
18262
18552
|
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
18263
|
-
return /* @__PURE__ */
|
|
18553
|
+
return /* @__PURE__ */ jsx107(Tooltip, { title: titleFr, children: /* @__PURE__ */ jsxs71(
|
|
18264
18554
|
"button",
|
|
18265
18555
|
{
|
|
18266
18556
|
css: inputIconBtn,
|
|
@@ -18270,7 +18560,7 @@ var LabelLeadingIcon = ({
|
|
|
18270
18560
|
...props,
|
|
18271
18561
|
"data-testid": "lock-button",
|
|
18272
18562
|
children: [
|
|
18273
|
-
/* @__PURE__ */
|
|
18563
|
+
/* @__PURE__ */ jsx107(
|
|
18274
18564
|
Icon,
|
|
18275
18565
|
{
|
|
18276
18566
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -18286,8 +18576,8 @@ var LabelLeadingIcon = ({
|
|
|
18286
18576
|
var ConnectToDataElementButton = LabelLeadingIcon;
|
|
18287
18577
|
|
|
18288
18578
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
18289
|
-
import { css as
|
|
18290
|
-
var inputContainer2 =
|
|
18579
|
+
import { css as css84 } from "@emotion/react";
|
|
18580
|
+
var inputContainer2 = css84`
|
|
18291
18581
|
position: relative;
|
|
18292
18582
|
scroll-margin: var(--spacing-2xl);
|
|
18293
18583
|
|
|
@@ -18300,14 +18590,14 @@ var inputContainer2 = css80`
|
|
|
18300
18590
|
}
|
|
18301
18591
|
}
|
|
18302
18592
|
`;
|
|
18303
|
-
var labelText2 =
|
|
18593
|
+
var labelText2 = css84`
|
|
18304
18594
|
align-items: center;
|
|
18305
18595
|
display: flex;
|
|
18306
18596
|
gap: var(--spacing-xs);
|
|
18307
18597
|
font-weight: var(--fw-regular);
|
|
18308
18598
|
margin: 0 0 var(--spacing-xs);
|
|
18309
18599
|
`;
|
|
18310
|
-
var input3 =
|
|
18600
|
+
var input3 = css84`
|
|
18311
18601
|
display: block;
|
|
18312
18602
|
appearance: none;
|
|
18313
18603
|
box-sizing: border-box;
|
|
@@ -18355,18 +18645,18 @@ var input3 = css80`
|
|
|
18355
18645
|
color: var(--gray-400);
|
|
18356
18646
|
}
|
|
18357
18647
|
`;
|
|
18358
|
-
var selectInput =
|
|
18648
|
+
var selectInput = css84`
|
|
18359
18649
|
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");
|
|
18360
18650
|
background-position: right var(--spacing-sm) center;
|
|
18361
18651
|
background-repeat: no-repeat;
|
|
18362
18652
|
background-size: 1rem;
|
|
18363
18653
|
padding-right: var(--spacing-xl);
|
|
18364
18654
|
`;
|
|
18365
|
-
var inputWrapper =
|
|
18655
|
+
var inputWrapper = css84`
|
|
18366
18656
|
display: flex; // used to correct overflow with chrome textarea
|
|
18367
18657
|
position: relative;
|
|
18368
18658
|
`;
|
|
18369
|
-
var inputIcon2 =
|
|
18659
|
+
var inputIcon2 = css84`
|
|
18370
18660
|
align-items: center;
|
|
18371
18661
|
background: var(--white);
|
|
18372
18662
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -18382,7 +18672,7 @@ var inputIcon2 = css80`
|
|
|
18382
18672
|
width: var(--spacing-lg);
|
|
18383
18673
|
z-index: var(--z-10);
|
|
18384
18674
|
`;
|
|
18385
|
-
var inputToggleLabel2 =
|
|
18675
|
+
var inputToggleLabel2 = css84`
|
|
18386
18676
|
--inline-label-color: var(--typography-base);
|
|
18387
18677
|
align-items: center;
|
|
18388
18678
|
cursor: pointer;
|
|
@@ -18397,7 +18687,7 @@ var inputToggleLabel2 = css80`
|
|
|
18397
18687
|
--inline-label-color: var(--gray-400);
|
|
18398
18688
|
}
|
|
18399
18689
|
`;
|
|
18400
|
-
var toggleInput2 =
|
|
18690
|
+
var toggleInput2 = css84`
|
|
18401
18691
|
appearance: none;
|
|
18402
18692
|
border: 1px solid var(--gray-200);
|
|
18403
18693
|
background: var(--white);
|
|
@@ -18450,7 +18740,7 @@ var toggleInput2 = css80`
|
|
|
18450
18740
|
border-color: var(--gray-300);
|
|
18451
18741
|
}
|
|
18452
18742
|
`;
|
|
18453
|
-
var inlineLabel2 =
|
|
18743
|
+
var inlineLabel2 = css84`
|
|
18454
18744
|
color: var(--inline-label-color);
|
|
18455
18745
|
padding-left: var(--spacing-md);
|
|
18456
18746
|
font-size: var(--fs-sm);
|
|
@@ -18467,7 +18757,7 @@ var inlineLabel2 = css80`
|
|
|
18467
18757
|
}
|
|
18468
18758
|
}
|
|
18469
18759
|
`;
|
|
18470
|
-
var inputMenu =
|
|
18760
|
+
var inputMenu = css84`
|
|
18471
18761
|
background: none;
|
|
18472
18762
|
border: none;
|
|
18473
18763
|
padding: var(--spacing-2xs);
|
|
@@ -18475,10 +18765,10 @@ var inputMenu = css80`
|
|
|
18475
18765
|
top: calc(var(--spacing-md) * -1.2);
|
|
18476
18766
|
right: 0;
|
|
18477
18767
|
`;
|
|
18478
|
-
var inputActionItems =
|
|
18768
|
+
var inputActionItems = css84`
|
|
18479
18769
|
display: flex;
|
|
18480
18770
|
`;
|
|
18481
|
-
var inputMenuHover =
|
|
18771
|
+
var inputMenuHover = css84`
|
|
18482
18772
|
opacity: var(--opacity-50);
|
|
18483
18773
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
18484
18774
|
|
|
@@ -18488,11 +18778,11 @@ var inputMenuHover = css80`
|
|
|
18488
18778
|
background-color: var(--gray-200);
|
|
18489
18779
|
}
|
|
18490
18780
|
`;
|
|
18491
|
-
var textarea2 =
|
|
18781
|
+
var textarea2 = css84`
|
|
18492
18782
|
resize: vertical;
|
|
18493
18783
|
min-height: 2rem;
|
|
18494
18784
|
`;
|
|
18495
|
-
var dataConnectButton =
|
|
18785
|
+
var dataConnectButton = css84`
|
|
18496
18786
|
align-items: center;
|
|
18497
18787
|
appearance: none;
|
|
18498
18788
|
box-sizing: border-box;
|
|
@@ -18527,7 +18817,7 @@ var dataConnectButton = css80`
|
|
|
18527
18817
|
pointer-events: none;
|
|
18528
18818
|
}
|
|
18529
18819
|
`;
|
|
18530
|
-
var linkParameterBtn =
|
|
18820
|
+
var linkParameterBtn = css84`
|
|
18531
18821
|
border-radius: var(--rounded-base);
|
|
18532
18822
|
background: transparent;
|
|
18533
18823
|
border: none;
|
|
@@ -18536,7 +18826,7 @@ var linkParameterBtn = css80`
|
|
|
18536
18826
|
font-size: var(--fs-sm);
|
|
18537
18827
|
line-height: 1;
|
|
18538
18828
|
`;
|
|
18539
|
-
var linkParameterControls =
|
|
18829
|
+
var linkParameterControls = css84`
|
|
18540
18830
|
position: absolute;
|
|
18541
18831
|
inset: 0 0 0 auto;
|
|
18542
18832
|
padding: 0 var(--spacing-base);
|
|
@@ -18545,7 +18835,7 @@ var linkParameterControls = css80`
|
|
|
18545
18835
|
justify-content: center;
|
|
18546
18836
|
gap: var(--spacing-base);
|
|
18547
18837
|
`;
|
|
18548
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
18838
|
+
var linkParameterInput = (withExternalLinkIcon) => css84`
|
|
18549
18839
|
padding-right: calc(
|
|
18550
18840
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
18551
18841
|
var(--spacing-base)
|
|
@@ -18558,7 +18848,7 @@ var linkParameterInput = (withExternalLinkIcon) => css80`
|
|
|
18558
18848
|
}
|
|
18559
18849
|
}
|
|
18560
18850
|
`;
|
|
18561
|
-
var linkParameterIcon =
|
|
18851
|
+
var linkParameterIcon = css84`
|
|
18562
18852
|
align-items: center;
|
|
18563
18853
|
color: var(--brand-secondary-3);
|
|
18564
18854
|
display: flex;
|
|
@@ -18573,7 +18863,7 @@ var linkParameterIcon = css80`
|
|
|
18573
18863
|
`;
|
|
18574
18864
|
|
|
18575
18865
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
18576
|
-
import { jsx as
|
|
18866
|
+
import { jsx as jsx108, jsxs as jsxs72 } from "@emotion/react/jsx-runtime";
|
|
18577
18867
|
function ParameterDataResource({
|
|
18578
18868
|
label,
|
|
18579
18869
|
labelLeadingIcon,
|
|
@@ -18583,12 +18873,12 @@ function ParameterDataResource({
|
|
|
18583
18873
|
disabled: disabled2,
|
|
18584
18874
|
children
|
|
18585
18875
|
}) {
|
|
18586
|
-
return /* @__PURE__ */
|
|
18587
|
-
/* @__PURE__ */
|
|
18876
|
+
return /* @__PURE__ */ jsxs72("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
18877
|
+
/* @__PURE__ */ jsxs72("span", { css: labelText2, children: [
|
|
18588
18878
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
18589
18879
|
label
|
|
18590
18880
|
] }),
|
|
18591
|
-
/* @__PURE__ */
|
|
18881
|
+
/* @__PURE__ */ jsxs72(
|
|
18592
18882
|
"button",
|
|
18593
18883
|
{
|
|
18594
18884
|
type: "button",
|
|
@@ -18597,30 +18887,30 @@ function ParameterDataResource({
|
|
|
18597
18887
|
disabled: disabled2,
|
|
18598
18888
|
onClick: onConnectDatasource,
|
|
18599
18889
|
children: [
|
|
18600
|
-
/* @__PURE__ */
|
|
18890
|
+
/* @__PURE__ */ jsx108("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ jsx108(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
18601
18891
|
children
|
|
18602
18892
|
]
|
|
18603
18893
|
}
|
|
18604
18894
|
),
|
|
18605
|
-
caption ? /* @__PURE__ */
|
|
18895
|
+
caption ? /* @__PURE__ */ jsx108(Caption, { children: caption }) : null
|
|
18606
18896
|
] });
|
|
18607
18897
|
}
|
|
18608
18898
|
|
|
18609
18899
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
18610
|
-
import { css as
|
|
18611
|
-
var ParameterDrawerHeaderContainer =
|
|
18900
|
+
import { css as css85 } from "@emotion/react";
|
|
18901
|
+
var ParameterDrawerHeaderContainer = css85`
|
|
18612
18902
|
align-items: center;
|
|
18613
18903
|
display: flex;
|
|
18614
18904
|
gap: var(--spacing-base);
|
|
18615
18905
|
justify-content: space-between;
|
|
18616
18906
|
margin-bottom: var(--spacing-sm);
|
|
18617
18907
|
`;
|
|
18618
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
18908
|
+
var ParameterDrawerHeaderTitleGroup = css85`
|
|
18619
18909
|
align-items: center;
|
|
18620
18910
|
display: flex;
|
|
18621
18911
|
gap: var(--spacing-sm);
|
|
18622
18912
|
`;
|
|
18623
|
-
var ParameterDrawerHeaderTitle =
|
|
18913
|
+
var ParameterDrawerHeaderTitle = css85`
|
|
18624
18914
|
text-overflow: ellipsis;
|
|
18625
18915
|
white-space: nowrap;
|
|
18626
18916
|
overflow: hidden;
|
|
@@ -18628,12 +18918,12 @@ var ParameterDrawerHeaderTitle = css81`
|
|
|
18628
18918
|
`;
|
|
18629
18919
|
|
|
18630
18920
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
18631
|
-
import { jsx as
|
|
18921
|
+
import { jsx as jsx109, jsxs as jsxs73 } from "@emotion/react/jsx-runtime";
|
|
18632
18922
|
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
18633
|
-
return /* @__PURE__ */
|
|
18634
|
-
/* @__PURE__ */
|
|
18923
|
+
return /* @__PURE__ */ jsxs73("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
18924
|
+
/* @__PURE__ */ jsxs73("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
18635
18925
|
iconBeforeTitle,
|
|
18636
|
-
/* @__PURE__ */
|
|
18926
|
+
/* @__PURE__ */ jsx109(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
18637
18927
|
] }),
|
|
18638
18928
|
children
|
|
18639
18929
|
] });
|
|
@@ -18643,8 +18933,8 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
18643
18933
|
import { forwardRef as forwardRef16 } from "react";
|
|
18644
18934
|
|
|
18645
18935
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
18646
|
-
import { css as
|
|
18647
|
-
var fieldsetStyles =
|
|
18936
|
+
import { css as css86 } from "@emotion/react";
|
|
18937
|
+
var fieldsetStyles = css86`
|
|
18648
18938
|
&:disabled,
|
|
18649
18939
|
[readonly] {
|
|
18650
18940
|
pointer-events: none;
|
|
@@ -18655,7 +18945,7 @@ var fieldsetStyles = css82`
|
|
|
18655
18945
|
}
|
|
18656
18946
|
}
|
|
18657
18947
|
`;
|
|
18658
|
-
var fieldsetLegend2 =
|
|
18948
|
+
var fieldsetLegend2 = css86`
|
|
18659
18949
|
display: block;
|
|
18660
18950
|
font-weight: var(--fw-medium);
|
|
18661
18951
|
margin-bottom: var(--spacing-sm);
|
|
@@ -18663,11 +18953,11 @@ var fieldsetLegend2 = css82`
|
|
|
18663
18953
|
`;
|
|
18664
18954
|
|
|
18665
18955
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
18666
|
-
import { jsx as
|
|
18956
|
+
import { jsx as jsx110, jsxs as jsxs74 } from "@emotion/react/jsx-runtime";
|
|
18667
18957
|
var ParameterGroup = forwardRef16(
|
|
18668
18958
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
18669
|
-
return /* @__PURE__ */
|
|
18670
|
-
/* @__PURE__ */
|
|
18959
|
+
return /* @__PURE__ */ jsxs74("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
18960
|
+
/* @__PURE__ */ jsx110("legend", { css: fieldsetLegend2, children: legend }),
|
|
18671
18961
|
children
|
|
18672
18962
|
] });
|
|
18673
18963
|
}
|
|
@@ -18677,19 +18967,19 @@ var ParameterGroup = forwardRef16(
|
|
|
18677
18967
|
import { forwardRef as forwardRef18, useDeferredValue } from "react";
|
|
18678
18968
|
|
|
18679
18969
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
18680
|
-
import { useState as
|
|
18970
|
+
import { useState as useState13 } from "react";
|
|
18681
18971
|
import { createPortal as createPortal2 } from "react-dom";
|
|
18682
18972
|
|
|
18683
18973
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
18684
|
-
import { css as
|
|
18685
|
-
var previewWrapper =
|
|
18974
|
+
import { css as css87 } from "@emotion/react";
|
|
18975
|
+
var previewWrapper = css87`
|
|
18686
18976
|
margin-top: var(--spacing-xs);
|
|
18687
18977
|
background: var(--gray-50);
|
|
18688
18978
|
padding: var(--spacing-sm);
|
|
18689
18979
|
border: solid 1px var(--gray-300);
|
|
18690
18980
|
border-radius: var(--rounded-sm);
|
|
18691
18981
|
`;
|
|
18692
|
-
var previewLink =
|
|
18982
|
+
var previewLink = css87`
|
|
18693
18983
|
display: block;
|
|
18694
18984
|
width: 100%;
|
|
18695
18985
|
|
|
@@ -18697,7 +18987,7 @@ var previewLink = css83`
|
|
|
18697
18987
|
max-height: 9rem;
|
|
18698
18988
|
}
|
|
18699
18989
|
`;
|
|
18700
|
-
var previewModalWrapper =
|
|
18990
|
+
var previewModalWrapper = css87`
|
|
18701
18991
|
background: var(--gray-50);
|
|
18702
18992
|
display: flex;
|
|
18703
18993
|
height: 100%;
|
|
@@ -18706,7 +18996,7 @@ var previewModalWrapper = css83`
|
|
|
18706
18996
|
border: solid 1px var(--gray-300);
|
|
18707
18997
|
border-radius: var(--rounded-sm);
|
|
18708
18998
|
`;
|
|
18709
|
-
var previewModalImage =
|
|
18999
|
+
var previewModalImage = css87`
|
|
18710
19000
|
display: flex;
|
|
18711
19001
|
height: 100%;
|
|
18712
19002
|
width: 100%;
|
|
@@ -18718,32 +19008,32 @@ var previewModalImage = css83`
|
|
|
18718
19008
|
`;
|
|
18719
19009
|
|
|
18720
19010
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
18721
|
-
import { Fragment as
|
|
19011
|
+
import { Fragment as Fragment15, jsx as jsx111, jsxs as jsxs75 } from "@emotion/react/jsx-runtime";
|
|
18722
19012
|
function ParameterImagePreview({ imageSrc }) {
|
|
18723
|
-
const [showModal, setShowModal] =
|
|
18724
|
-
return imageSrc ? /* @__PURE__ */
|
|
18725
|
-
/* @__PURE__ */
|
|
18726
|
-
/* @__PURE__ */
|
|
19013
|
+
const [showModal, setShowModal] = useState13(false);
|
|
19014
|
+
return imageSrc ? /* @__PURE__ */ jsxs75("div", { css: previewWrapper, children: [
|
|
19015
|
+
/* @__PURE__ */ jsx111(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
19016
|
+
/* @__PURE__ */ jsx111(
|
|
18727
19017
|
"button",
|
|
18728
19018
|
{
|
|
18729
19019
|
css: previewLink,
|
|
18730
19020
|
onClick: () => {
|
|
18731
19021
|
setShowModal(true);
|
|
18732
19022
|
},
|
|
18733
|
-
children: /* @__PURE__ */
|
|
19023
|
+
children: /* @__PURE__ */ jsx111(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
18734
19024
|
}
|
|
18735
19025
|
)
|
|
18736
19026
|
] }) : null;
|
|
18737
19027
|
}
|
|
18738
19028
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
18739
|
-
return open ? /* @__PURE__ */
|
|
18740
|
-
/* @__PURE__ */
|
|
19029
|
+
return open ? /* @__PURE__ */ jsx111(Fragment15, { children: createPortal2(
|
|
19030
|
+
/* @__PURE__ */ jsx111(
|
|
18741
19031
|
Modal,
|
|
18742
19032
|
{
|
|
18743
19033
|
header: "Image Preview",
|
|
18744
19034
|
onRequestClose,
|
|
18745
|
-
buttonGroup: /* @__PURE__ */
|
|
18746
|
-
children: /* @__PURE__ */
|
|
19035
|
+
buttonGroup: /* @__PURE__ */ jsx111(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
19036
|
+
children: /* @__PURE__ */ jsx111("div", { css: previewModalWrapper, children: /* @__PURE__ */ jsx111(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
18747
19037
|
}
|
|
18748
19038
|
),
|
|
18749
19039
|
document.body
|
|
@@ -18751,25 +19041,25 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
18751
19041
|
};
|
|
18752
19042
|
|
|
18753
19043
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
18754
|
-
import { css as
|
|
18755
|
-
import { useState as
|
|
19044
|
+
import { css as css89 } from "@emotion/react";
|
|
19045
|
+
import { useState as useState14 } from "react";
|
|
18756
19046
|
|
|
18757
19047
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
18758
|
-
import { jsx as
|
|
19048
|
+
import { jsx as jsx112 } from "@emotion/react/jsx-runtime";
|
|
18759
19049
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
18760
|
-
return !asSpan ? /* @__PURE__ */
|
|
19050
|
+
return !asSpan ? /* @__PURE__ */ jsx112("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ jsx112("span", { "aria-labelledby": id, css: labelText2, children });
|
|
18761
19051
|
};
|
|
18762
19052
|
|
|
18763
19053
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
18764
19054
|
import { forwardRef as forwardRef17 } from "react";
|
|
18765
|
-
import { jsx as
|
|
19055
|
+
import { jsx as jsx113 } from "@emotion/react/jsx-runtime";
|
|
18766
19056
|
var ParameterMenuButton = forwardRef17(
|
|
18767
19057
|
({ label, children }, ref) => {
|
|
18768
|
-
return /* @__PURE__ */
|
|
19058
|
+
return /* @__PURE__ */ jsx113(
|
|
18769
19059
|
Menu,
|
|
18770
19060
|
{
|
|
18771
19061
|
menuLabel: `${label} menu`,
|
|
18772
|
-
menuTrigger: /* @__PURE__ */
|
|
19062
|
+
menuTrigger: /* @__PURE__ */ jsx113(
|
|
18773
19063
|
"button",
|
|
18774
19064
|
{
|
|
18775
19065
|
className: "parameter-menu",
|
|
@@ -18777,7 +19067,7 @@ var ParameterMenuButton = forwardRef17(
|
|
|
18777
19067
|
type: "button",
|
|
18778
19068
|
"aria-label": `${label} options`,
|
|
18779
19069
|
ref,
|
|
18780
|
-
children: /* @__PURE__ */
|
|
19070
|
+
children: /* @__PURE__ */ jsx113(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
18781
19071
|
}
|
|
18782
19072
|
),
|
|
18783
19073
|
children
|
|
@@ -18787,14 +19077,14 @@ var ParameterMenuButton = forwardRef17(
|
|
|
18787
19077
|
);
|
|
18788
19078
|
|
|
18789
19079
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
18790
|
-
import { css as
|
|
18791
|
-
var emptyParameterShell =
|
|
19080
|
+
import { css as css88 } from "@emotion/react";
|
|
19081
|
+
var emptyParameterShell = css88`
|
|
18792
19082
|
border-radius: var(--rounded-sm);
|
|
18793
19083
|
flex-grow: 1;
|
|
18794
19084
|
position: relative;
|
|
18795
19085
|
max-width: 100%;
|
|
18796
19086
|
`;
|
|
18797
|
-
var emptyParameterShellText =
|
|
19087
|
+
var emptyParameterShellText = css88`
|
|
18798
19088
|
background: var(--brand-secondary-6);
|
|
18799
19089
|
border-radius: var(--rounded-sm);
|
|
18800
19090
|
padding: var(--spacing-sm);
|
|
@@ -18802,7 +19092,7 @@ var emptyParameterShellText = css84`
|
|
|
18802
19092
|
font-size: var(--fs-sm);
|
|
18803
19093
|
margin: 0;
|
|
18804
19094
|
`;
|
|
18805
|
-
var overrideMarker =
|
|
19095
|
+
var overrideMarker = css88`
|
|
18806
19096
|
border-radius: var(--rounded-sm);
|
|
18807
19097
|
border: 10px solid var(--gray-300);
|
|
18808
19098
|
border-left-color: transparent;
|
|
@@ -18813,7 +19103,7 @@ var overrideMarker = css84`
|
|
|
18813
19103
|
`;
|
|
18814
19104
|
|
|
18815
19105
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
18816
|
-
import { jsx as
|
|
19106
|
+
import { jsx as jsx114, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
18817
19107
|
var extractParameterProps = (props) => {
|
|
18818
19108
|
const {
|
|
18819
19109
|
id,
|
|
@@ -18873,36 +19163,36 @@ var ParameterShell = ({
|
|
|
18873
19163
|
isParameterGroup = false,
|
|
18874
19164
|
...props
|
|
18875
19165
|
}) => {
|
|
18876
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
19166
|
+
const [manualErrorMessage, setManualErrorMessage] = useState14(void 0);
|
|
18877
19167
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
18878
19168
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
18879
|
-
return /* @__PURE__ */
|
|
18880
|
-
hiddenLabel || title2 ? null : /* @__PURE__ */
|
|
19169
|
+
return /* @__PURE__ */ jsxs76("div", { css: inputContainer2, ...props, id, children: [
|
|
19170
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ jsxs76(ParameterLabel, { id, css: labelText2, children: [
|
|
18881
19171
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
18882
19172
|
label,
|
|
18883
19173
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
18884
19174
|
] }),
|
|
18885
|
-
!title2 ? null : /* @__PURE__ */
|
|
19175
|
+
!title2 ? null : /* @__PURE__ */ jsxs76(ParameterLabel, { id, asSpan: true, children: [
|
|
18886
19176
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
18887
19177
|
title2,
|
|
18888
19178
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
18889
19179
|
] }),
|
|
18890
|
-
/* @__PURE__ */
|
|
18891
|
-
actionItems ? /* @__PURE__ */
|
|
19180
|
+
/* @__PURE__ */ jsxs76("div", { css: inputWrapper, children: [
|
|
19181
|
+
actionItems ? /* @__PURE__ */ jsx114(
|
|
18892
19182
|
"div",
|
|
18893
19183
|
{
|
|
18894
19184
|
css: [
|
|
18895
19185
|
inputMenu,
|
|
18896
19186
|
inputActionItems,
|
|
18897
|
-
menuItems ?
|
|
19187
|
+
menuItems ? css89`
|
|
18898
19188
|
right: var(--spacing-md);
|
|
18899
19189
|
` : void 0
|
|
18900
19190
|
],
|
|
18901
19191
|
children: actionItems
|
|
18902
19192
|
}
|
|
18903
19193
|
) : null,
|
|
18904
|
-
menuItems ? /* @__PURE__ */
|
|
18905
|
-
/* @__PURE__ */
|
|
19194
|
+
menuItems ? /* @__PURE__ */ jsx114(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
19195
|
+
/* @__PURE__ */ jsx114(
|
|
18906
19196
|
ParameterShellContext.Provider,
|
|
18907
19197
|
{
|
|
18908
19198
|
value: {
|
|
@@ -18912,14 +19202,14 @@ var ParameterShell = ({
|
|
|
18912
19202
|
errorMessage: errorMessaging,
|
|
18913
19203
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
18914
19204
|
},
|
|
18915
|
-
children: isParameterGroup ? /* @__PURE__ */
|
|
19205
|
+
children: isParameterGroup ? /* @__PURE__ */ jsx114("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ jsxs76(ParameterShellPlaceholder, { children: [
|
|
18916
19206
|
children,
|
|
18917
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */
|
|
19207
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx114(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
18918
19208
|
] })
|
|
18919
19209
|
}
|
|
18920
19210
|
)
|
|
18921
19211
|
] }),
|
|
18922
|
-
/* @__PURE__ */
|
|
19212
|
+
/* @__PURE__ */ jsx114(
|
|
18923
19213
|
FieldMessage,
|
|
18924
19214
|
{
|
|
18925
19215
|
helperMessageTestId: captionTestId,
|
|
@@ -18933,17 +19223,17 @@ var ParameterShell = ({
|
|
|
18933
19223
|
] });
|
|
18934
19224
|
};
|
|
18935
19225
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
18936
|
-
return /* @__PURE__ */
|
|
19226
|
+
return /* @__PURE__ */ jsx114("div", { css: emptyParameterShell, children });
|
|
18937
19227
|
};
|
|
18938
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */
|
|
19228
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx114(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx114("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx114("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
18939
19229
|
|
|
18940
19230
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18941
|
-
import { Fragment as
|
|
19231
|
+
import { Fragment as Fragment16, jsx as jsx115, jsxs as jsxs77 } from "@emotion/react/jsx-runtime";
|
|
18942
19232
|
var ParameterImage = forwardRef18(
|
|
18943
19233
|
({ children, ...props }, ref) => {
|
|
18944
19234
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18945
|
-
return /* @__PURE__ */
|
|
18946
|
-
/* @__PURE__ */
|
|
19235
|
+
return /* @__PURE__ */ jsxs77(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
19236
|
+
/* @__PURE__ */ jsx115(ParameterImageInner, { ref, ...innerProps }),
|
|
18947
19237
|
children
|
|
18948
19238
|
] });
|
|
18949
19239
|
}
|
|
@@ -18952,8 +19242,8 @@ var ParameterImageInner = forwardRef18((props, ref) => {
|
|
|
18952
19242
|
const { value } = props;
|
|
18953
19243
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
18954
19244
|
const deferredValue = useDeferredValue(value);
|
|
18955
|
-
return /* @__PURE__ */
|
|
18956
|
-
/* @__PURE__ */
|
|
19245
|
+
return /* @__PURE__ */ jsxs77(Fragment16, { children: [
|
|
19246
|
+
/* @__PURE__ */ jsx115(
|
|
18957
19247
|
"input",
|
|
18958
19248
|
{
|
|
18959
19249
|
css: input3,
|
|
@@ -18965,21 +19255,21 @@ var ParameterImageInner = forwardRef18((props, ref) => {
|
|
|
18965
19255
|
...props
|
|
18966
19256
|
}
|
|
18967
19257
|
),
|
|
18968
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */
|
|
19258
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ jsx115(ParameterImagePreview, { imageSrc: deferredValue })
|
|
18969
19259
|
] });
|
|
18970
19260
|
});
|
|
18971
19261
|
|
|
18972
19262
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
18973
19263
|
import { forwardRef as forwardRef19 } from "react";
|
|
18974
|
-
import { jsx as
|
|
19264
|
+
import { jsx as jsx116 } from "@emotion/react/jsx-runtime";
|
|
18975
19265
|
var ParameterInput = forwardRef19((props, ref) => {
|
|
18976
19266
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18977
|
-
return /* @__PURE__ */
|
|
19267
|
+
return /* @__PURE__ */ jsx116(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ jsx116(ParameterInputInner, { ref, ...innerProps }) });
|
|
18978
19268
|
});
|
|
18979
19269
|
var ParameterInputInner = forwardRef19(
|
|
18980
19270
|
({ ...props }, ref) => {
|
|
18981
19271
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18982
|
-
return /* @__PURE__ */
|
|
19272
|
+
return /* @__PURE__ */ jsx116(
|
|
18983
19273
|
"input",
|
|
18984
19274
|
{
|
|
18985
19275
|
css: input3,
|
|
@@ -18996,18 +19286,18 @@ var ParameterInputInner = forwardRef19(
|
|
|
18996
19286
|
|
|
18997
19287
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
18998
19288
|
import { forwardRef as forwardRef20 } from "react";
|
|
18999
|
-
import { jsx as
|
|
19289
|
+
import { jsx as jsx117, jsxs as jsxs78 } from "@emotion/react/jsx-runtime";
|
|
19000
19290
|
var ParameterLink = forwardRef20(
|
|
19001
19291
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
19002
19292
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19003
|
-
return /* @__PURE__ */
|
|
19293
|
+
return /* @__PURE__ */ jsx117(
|
|
19004
19294
|
ParameterShell,
|
|
19005
19295
|
{
|
|
19006
19296
|
"data-testid": "link-parameter-editor",
|
|
19007
19297
|
...shellProps,
|
|
19008
19298
|
label: innerProps.value ? shellProps.label : "",
|
|
19009
19299
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
19010
|
-
children: /* @__PURE__ */
|
|
19300
|
+
children: /* @__PURE__ */ jsx117(
|
|
19011
19301
|
ParameterLinkInner,
|
|
19012
19302
|
{
|
|
19013
19303
|
onConnectLink,
|
|
@@ -19024,9 +19314,9 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19024
19314
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
19025
19315
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
19026
19316
|
if (!props.value)
|
|
19027
|
-
return /* @__PURE__ */
|
|
19028
|
-
return /* @__PURE__ */
|
|
19029
|
-
/* @__PURE__ */
|
|
19317
|
+
return /* @__PURE__ */ jsx117("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
19318
|
+
return /* @__PURE__ */ jsxs78("div", { css: inputWrapper, children: [
|
|
19319
|
+
/* @__PURE__ */ jsx117(
|
|
19030
19320
|
"input",
|
|
19031
19321
|
{
|
|
19032
19322
|
type: "text",
|
|
@@ -19038,8 +19328,8 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19038
19328
|
...props
|
|
19039
19329
|
}
|
|
19040
19330
|
),
|
|
19041
|
-
/* @__PURE__ */
|
|
19042
|
-
/* @__PURE__ */
|
|
19331
|
+
/* @__PURE__ */ jsxs78("div", { css: linkParameterControls, children: [
|
|
19332
|
+
/* @__PURE__ */ jsx117(
|
|
19043
19333
|
"button",
|
|
19044
19334
|
{
|
|
19045
19335
|
type: "button",
|
|
@@ -19050,7 +19340,7 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19050
19340
|
children: "edit"
|
|
19051
19341
|
}
|
|
19052
19342
|
),
|
|
19053
|
-
externalLink ? /* @__PURE__ */
|
|
19343
|
+
externalLink ? /* @__PURE__ */ jsx117(
|
|
19054
19344
|
"a",
|
|
19055
19345
|
{
|
|
19056
19346
|
href: externalLink,
|
|
@@ -19058,7 +19348,7 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19058
19348
|
title: "Open link in new tab",
|
|
19059
19349
|
target: "_blank",
|
|
19060
19350
|
rel: "noopener noreferrer",
|
|
19061
|
-
children: /* @__PURE__ */
|
|
19351
|
+
children: /* @__PURE__ */ jsx117(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
19062
19352
|
}
|
|
19063
19353
|
) : null
|
|
19064
19354
|
] })
|
|
@@ -19067,15 +19357,15 @@ var ParameterLinkInner = forwardRef20(
|
|
|
19067
19357
|
);
|
|
19068
19358
|
|
|
19069
19359
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
19070
|
-
import { jsx as
|
|
19360
|
+
import { jsx as jsx118 } from "@emotion/react/jsx-runtime";
|
|
19071
19361
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
19072
19362
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
19073
|
-
return /* @__PURE__ */
|
|
19363
|
+
return /* @__PURE__ */ jsx118(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx118(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
19074
19364
|
};
|
|
19075
19365
|
var ParameterMultiSelectInner = (props) => {
|
|
19076
19366
|
var _a;
|
|
19077
19367
|
const { id, label } = useParameterShell();
|
|
19078
|
-
return /* @__PURE__ */
|
|
19368
|
+
return /* @__PURE__ */ jsx118(
|
|
19079
19369
|
InputComboBox,
|
|
19080
19370
|
{
|
|
19081
19371
|
menuPortalTarget: document.body,
|
|
@@ -19125,7 +19415,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
19125
19415
|
};
|
|
19126
19416
|
|
|
19127
19417
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
19128
|
-
import { Fragment as
|
|
19418
|
+
import { Fragment as Fragment17, jsx as jsx119, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
|
|
19129
19419
|
var ParameterNameAndPublicIdInput = ({
|
|
19130
19420
|
id,
|
|
19131
19421
|
onBlur,
|
|
@@ -19151,8 +19441,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19151
19441
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
19152
19442
|
};
|
|
19153
19443
|
autoFocus == null ? void 0 : autoFocus();
|
|
19154
|
-
return /* @__PURE__ */
|
|
19155
|
-
/* @__PURE__ */
|
|
19444
|
+
return /* @__PURE__ */ jsxs79(Fragment17, { children: [
|
|
19445
|
+
/* @__PURE__ */ jsx119(
|
|
19156
19446
|
ParameterInput,
|
|
19157
19447
|
{
|
|
19158
19448
|
id: nameIdField,
|
|
@@ -19171,7 +19461,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19171
19461
|
value: values[nameIdField]
|
|
19172
19462
|
}
|
|
19173
19463
|
),
|
|
19174
|
-
/* @__PURE__ */
|
|
19464
|
+
/* @__PURE__ */ jsx119(
|
|
19175
19465
|
ParameterInput,
|
|
19176
19466
|
{
|
|
19177
19467
|
id: publicIdFieldName,
|
|
@@ -19185,11 +19475,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19185
19475
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
19186
19476
|
placeholder: publicIdPlaceholderText,
|
|
19187
19477
|
errorMessage: publicIdError,
|
|
19188
|
-
menuItems: /* @__PURE__ */
|
|
19478
|
+
menuItems: /* @__PURE__ */ jsx119(
|
|
19189
19479
|
MenuItem,
|
|
19190
19480
|
{
|
|
19191
19481
|
disabled: !values[publicIdFieldName],
|
|
19192
|
-
icon: /* @__PURE__ */
|
|
19482
|
+
icon: /* @__PURE__ */ jsx119(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
19193
19483
|
onClick: handleCopyPidFieldValue,
|
|
19194
19484
|
children: "Copy"
|
|
19195
19485
|
}
|
|
@@ -19197,12 +19487,12 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
19197
19487
|
value: values[publicIdFieldName]
|
|
19198
19488
|
}
|
|
19199
19489
|
),
|
|
19200
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */
|
|
19490
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ jsx119(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
19201
19491
|
] });
|
|
19202
19492
|
};
|
|
19203
19493
|
|
|
19204
19494
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
19205
|
-
import { css as
|
|
19495
|
+
import { css as css93 } from "@emotion/react";
|
|
19206
19496
|
import { ListItemNode, ListNode as ListNode2 } from "@lexical/list";
|
|
19207
19497
|
import {
|
|
19208
19498
|
CODE,
|
|
@@ -19316,7 +19606,7 @@ var getLabelForElement = (type) => {
|
|
|
19316
19606
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
19317
19607
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
19318
19608
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
19319
|
-
import { useEffect as
|
|
19609
|
+
import { useEffect as useEffect19, useRef as useRef10 } from "react";
|
|
19320
19610
|
|
|
19321
19611
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
19322
19612
|
import { CodeNode } from "@lexical/code";
|
|
@@ -19337,10 +19627,10 @@ CustomCodeNode.importDOM = function() {
|
|
|
19337
19627
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
19338
19628
|
import { mergeRegister } from "@lexical/utils";
|
|
19339
19629
|
import { ParagraphNode } from "lexical";
|
|
19340
|
-
import { useEffect as
|
|
19630
|
+
import { useEffect as useEffect15 } from "react";
|
|
19341
19631
|
function DisableStylesPlugin() {
|
|
19342
19632
|
const [editor] = useLexicalComposerContext();
|
|
19343
|
-
|
|
19633
|
+
useEffect15(() => {
|
|
19344
19634
|
return mergeRegister(
|
|
19345
19635
|
// Disable text alignment on paragraph nodes
|
|
19346
19636
|
editor.registerNodeTransform(ParagraphNode, (node) => {
|
|
@@ -19354,23 +19644,23 @@ function DisableStylesPlugin() {
|
|
|
19354
19644
|
}
|
|
19355
19645
|
|
|
19356
19646
|
// src/components/ParameterInputs/rich-text/editorStyles.ts
|
|
19357
|
-
import { css as
|
|
19358
|
-
var textBold =
|
|
19647
|
+
import { css as css90 } from "@emotion/css";
|
|
19648
|
+
var textBold = css90`
|
|
19359
19649
|
font-weight: 700;
|
|
19360
19650
|
`;
|
|
19361
|
-
var textItalic =
|
|
19651
|
+
var textItalic = css90`
|
|
19362
19652
|
font-style: italic;
|
|
19363
19653
|
`;
|
|
19364
|
-
var textUnderline =
|
|
19654
|
+
var textUnderline = css90`
|
|
19365
19655
|
text-decoration: underline;
|
|
19366
19656
|
`;
|
|
19367
|
-
var textStrikethrough =
|
|
19657
|
+
var textStrikethrough = css90`
|
|
19368
19658
|
text-decoration: line-through;
|
|
19369
19659
|
`;
|
|
19370
|
-
var textUnderlineStrikethrough =
|
|
19660
|
+
var textUnderlineStrikethrough = css90`
|
|
19371
19661
|
text-decoration: underline line-through;
|
|
19372
19662
|
`;
|
|
19373
|
-
var textCode =
|
|
19663
|
+
var textCode = css90`
|
|
19374
19664
|
background-color: var(--gray-100);
|
|
19375
19665
|
border-radius: var(--rounded-sm);
|
|
19376
19666
|
display: inline-block;
|
|
@@ -19381,68 +19671,68 @@ var textCode = css86`
|
|
|
19381
19671
|
padding-left: var(--spacing-xs);
|
|
19382
19672
|
padding-right: var(--spacing-xs);
|
|
19383
19673
|
`;
|
|
19384
|
-
var textSuperscript =
|
|
19674
|
+
var textSuperscript = css90`
|
|
19385
19675
|
vertical-align: super;
|
|
19386
19676
|
font-size: smaller;
|
|
19387
19677
|
`;
|
|
19388
|
-
var textSubscript =
|
|
19678
|
+
var textSubscript = css90`
|
|
19389
19679
|
vertical-align: sub;
|
|
19390
19680
|
font-size: smaller;
|
|
19391
19681
|
`;
|
|
19392
|
-
var linkElement =
|
|
19682
|
+
var linkElement = css90`
|
|
19393
19683
|
${link}
|
|
19394
19684
|
${linkColorDefault}
|
|
19395
19685
|
text-decoration: underline;
|
|
19396
19686
|
`;
|
|
19397
|
-
var h12 =
|
|
19687
|
+
var h12 = css90`
|
|
19398
19688
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.7rem);
|
|
19399
19689
|
`;
|
|
19400
|
-
var h22 =
|
|
19690
|
+
var h22 = css90`
|
|
19401
19691
|
font-size: clamp(1.35rem, var(--fluid-font-base), 1.6rem);
|
|
19402
19692
|
`;
|
|
19403
|
-
var h32 =
|
|
19693
|
+
var h32 = css90`
|
|
19404
19694
|
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
19405
19695
|
`;
|
|
19406
|
-
var h42 =
|
|
19696
|
+
var h42 = css90`
|
|
19407
19697
|
font-size: clamp(1.15rem, var(--fluid-font-base), 1.25rem);
|
|
19408
19698
|
`;
|
|
19409
|
-
var h52 =
|
|
19699
|
+
var h52 = css90`
|
|
19410
19700
|
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
19411
19701
|
`;
|
|
19412
|
-
var h62 =
|
|
19702
|
+
var h62 = css90`
|
|
19413
19703
|
font-size: var(--fs-base);
|
|
19414
19704
|
`;
|
|
19415
|
-
var heading1Element =
|
|
19705
|
+
var heading1Element = css90`
|
|
19416
19706
|
${h12}
|
|
19417
19707
|
${commonHeadingAttr(true)}
|
|
19418
19708
|
${commonLineHeight}
|
|
19419
19709
|
`;
|
|
19420
|
-
var heading2Element =
|
|
19710
|
+
var heading2Element = css90`
|
|
19421
19711
|
${h22}
|
|
19422
19712
|
${commonHeadingAttr(true)}
|
|
19423
19713
|
${commonLineHeight}
|
|
19424
19714
|
`;
|
|
19425
|
-
var heading3Element =
|
|
19715
|
+
var heading3Element = css90`
|
|
19426
19716
|
${h32}
|
|
19427
19717
|
${commonHeadingAttr(true)}
|
|
19428
19718
|
${commonLineHeight}
|
|
19429
19719
|
`;
|
|
19430
|
-
var heading4Element =
|
|
19720
|
+
var heading4Element = css90`
|
|
19431
19721
|
${h42}
|
|
19432
19722
|
${commonHeadingAttr(true)}
|
|
19433
19723
|
${commonLineHeight}
|
|
19434
19724
|
`;
|
|
19435
|
-
var heading5Element =
|
|
19725
|
+
var heading5Element = css90`
|
|
19436
19726
|
${h52}
|
|
19437
19727
|
${commonHeadingAttr(true)}
|
|
19438
19728
|
${commonLineHeight}
|
|
19439
19729
|
`;
|
|
19440
|
-
var heading6Element =
|
|
19730
|
+
var heading6Element = css90`
|
|
19441
19731
|
${h62}
|
|
19442
19732
|
${commonHeadingAttr(true)}
|
|
19443
19733
|
${commonLineHeight}
|
|
19444
19734
|
`;
|
|
19445
|
-
var paragraphElement =
|
|
19735
|
+
var paragraphElement = css90`
|
|
19446
19736
|
line-height: 1.5;
|
|
19447
19737
|
margin-bottom: var(--spacing-base);
|
|
19448
19738
|
|
|
@@ -19450,7 +19740,7 @@ var paragraphElement = css86`
|
|
|
19450
19740
|
margin-bottom: 0;
|
|
19451
19741
|
}
|
|
19452
19742
|
`;
|
|
19453
|
-
var orderedListElement =
|
|
19743
|
+
var orderedListElement = css90`
|
|
19454
19744
|
${commonLineHeight}
|
|
19455
19745
|
display: block;
|
|
19456
19746
|
list-style: decimal;
|
|
@@ -19479,7 +19769,7 @@ var orderedListElement = css86`
|
|
|
19479
19769
|
}
|
|
19480
19770
|
}
|
|
19481
19771
|
`;
|
|
19482
|
-
var unorderedListElement =
|
|
19772
|
+
var unorderedListElement = css90`
|
|
19483
19773
|
${commonLineHeight}
|
|
19484
19774
|
display: block;
|
|
19485
19775
|
list-style: disc;
|
|
@@ -19500,13 +19790,13 @@ var unorderedListElement = css86`
|
|
|
19500
19790
|
}
|
|
19501
19791
|
}
|
|
19502
19792
|
`;
|
|
19503
|
-
var listItemElement =
|
|
19793
|
+
var listItemElement = css90`
|
|
19504
19794
|
margin-left: var(--spacing-md);
|
|
19505
19795
|
`;
|
|
19506
|
-
var nestedListItemElement =
|
|
19796
|
+
var nestedListItemElement = css90`
|
|
19507
19797
|
list-style-type: none;
|
|
19508
19798
|
`;
|
|
19509
|
-
var blockquoteElement =
|
|
19799
|
+
var blockquoteElement = css90`
|
|
19510
19800
|
border-left: 0.25rem solid var(--gray-300);
|
|
19511
19801
|
color: var(--gray-600);
|
|
19512
19802
|
margin-bottom: var(--spacing-base);
|
|
@@ -19516,7 +19806,7 @@ var blockquoteElement = css86`
|
|
|
19516
19806
|
margin-bottom: 0;
|
|
19517
19807
|
}
|
|
19518
19808
|
`;
|
|
19519
|
-
var codeElement =
|
|
19809
|
+
var codeElement = css90`
|
|
19520
19810
|
background-color: var(--gray-100);
|
|
19521
19811
|
border-radius: var(--rounded-sm);
|
|
19522
19812
|
display: block;
|
|
@@ -19533,7 +19823,7 @@ var codeElement = css86`
|
|
|
19533
19823
|
`;
|
|
19534
19824
|
|
|
19535
19825
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19536
|
-
import { css as
|
|
19826
|
+
import { css as css91 } from "@emotion/react";
|
|
19537
19827
|
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
19538
19828
|
import { NodeEventPlugin } from "@lexical/react/LexicalNodeEventPlugin";
|
|
19539
19829
|
import { addClassNamesToElement, isHTMLAnchorElement, mergeRegister as mergeRegister2 } from "@lexical/utils";
|
|
@@ -19549,7 +19839,7 @@ import {
|
|
|
19549
19839
|
ElementNode as ElementNode2,
|
|
19550
19840
|
FOCUS_COMMAND
|
|
19551
19841
|
} from "lexical";
|
|
19552
|
-
import { useCallback as useCallback9, useEffect as
|
|
19842
|
+
import { useCallback as useCallback9, useEffect as useEffect16, useRef as useRef9, useState as useState15 } from "react";
|
|
19553
19843
|
|
|
19554
19844
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
19555
19845
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -19587,7 +19877,7 @@ var getSelectedNode = (selection) => {
|
|
|
19587
19877
|
};
|
|
19588
19878
|
|
|
19589
19879
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19590
|
-
import { Fragment as
|
|
19880
|
+
import { Fragment as Fragment18, jsx as jsx120, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
|
|
19591
19881
|
var isProjectMapLinkValue = (value) => {
|
|
19592
19882
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
19593
19883
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -19874,16 +20164,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = createCommand(
|
|
|
19874
20164
|
);
|
|
19875
20165
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
19876
20166
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
19877
|
-
var linkPopover =
|
|
20167
|
+
var linkPopover = css91`
|
|
19878
20168
|
position: absolute;
|
|
19879
20169
|
z-index: 5;
|
|
19880
20170
|
`;
|
|
19881
|
-
var linkPopoverContainer =
|
|
20171
|
+
var linkPopoverContainer = css91`
|
|
19882
20172
|
${Popover};
|
|
19883
20173
|
align-items: center;
|
|
19884
20174
|
display: flex;
|
|
19885
20175
|
`;
|
|
19886
|
-
var linkPopoverAnchor =
|
|
20176
|
+
var linkPopoverAnchor = css91`
|
|
19887
20177
|
${link}
|
|
19888
20178
|
${linkColorDefault}
|
|
19889
20179
|
`;
|
|
@@ -19892,17 +20182,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19892
20182
|
return path;
|
|
19893
20183
|
};
|
|
19894
20184
|
const [editor] = useLexicalComposerContext2();
|
|
19895
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
19896
|
-
const linkPopoverElRef =
|
|
19897
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
19898
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
19899
|
-
|
|
20185
|
+
const [linkPopoverState, setLinkPopoverState] = useState15();
|
|
20186
|
+
const linkPopoverElRef = useRef9(null);
|
|
20187
|
+
const [isEditorFocused, setIsEditorFocused] = useState15(false);
|
|
20188
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState15(false);
|
|
20189
|
+
useEffect16(() => {
|
|
19900
20190
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
19901
20191
|
setLinkPopoverState(void 0);
|
|
19902
20192
|
return;
|
|
19903
20193
|
}
|
|
19904
20194
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
19905
|
-
|
|
20195
|
+
useEffect16(() => {
|
|
19906
20196
|
if (!editor.hasNodes([LinkNode])) {
|
|
19907
20197
|
throw new Error("LinkNode not registered on editor");
|
|
19908
20198
|
}
|
|
@@ -20003,7 +20293,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20003
20293
|
}
|
|
20004
20294
|
});
|
|
20005
20295
|
}, [editor]);
|
|
20006
|
-
|
|
20296
|
+
useEffect16(() => {
|
|
20007
20297
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20008
20298
|
requestAnimationFrame(() => {
|
|
20009
20299
|
editorState.read(() => {
|
|
@@ -20030,8 +20320,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20030
20320
|
});
|
|
20031
20321
|
});
|
|
20032
20322
|
};
|
|
20033
|
-
return /* @__PURE__ */
|
|
20034
|
-
/* @__PURE__ */
|
|
20323
|
+
return /* @__PURE__ */ jsxs80(Fragment18, { children: [
|
|
20324
|
+
/* @__PURE__ */ jsx120(
|
|
20035
20325
|
NodeEventPlugin,
|
|
20036
20326
|
{
|
|
20037
20327
|
nodeType: LinkNode,
|
|
@@ -20041,7 +20331,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20041
20331
|
}
|
|
20042
20332
|
}
|
|
20043
20333
|
),
|
|
20044
|
-
linkPopoverState ? /* @__PURE__ */
|
|
20334
|
+
linkPopoverState ? /* @__PURE__ */ jsx120(
|
|
20045
20335
|
"div",
|
|
20046
20336
|
{
|
|
20047
20337
|
css: linkPopover,
|
|
@@ -20050,8 +20340,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20050
20340
|
top: linkPopoverState.position.y
|
|
20051
20341
|
},
|
|
20052
20342
|
ref: linkPopoverElRef,
|
|
20053
|
-
children: /* @__PURE__ */
|
|
20054
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */
|
|
20343
|
+
children: /* @__PURE__ */ jsxs80("div", { css: linkPopoverContainer, children: [
|
|
20344
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ jsx120(
|
|
20055
20345
|
"a",
|
|
20056
20346
|
{
|
|
20057
20347
|
href: parsePath(
|
|
@@ -20063,7 +20353,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20063
20353
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
20064
20354
|
}
|
|
20065
20355
|
),
|
|
20066
|
-
/* @__PURE__ */
|
|
20356
|
+
/* @__PURE__ */ jsx120(
|
|
20067
20357
|
Button,
|
|
20068
20358
|
{
|
|
20069
20359
|
size: "xs",
|
|
@@ -20071,7 +20361,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
20071
20361
|
onEditLinkNode(linkPopoverState.node);
|
|
20072
20362
|
},
|
|
20073
20363
|
buttonType: "ghost",
|
|
20074
|
-
children: /* @__PURE__ */
|
|
20364
|
+
children: /* @__PURE__ */ jsx120(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
20075
20365
|
}
|
|
20076
20366
|
)
|
|
20077
20367
|
] })
|
|
@@ -20095,8 +20385,8 @@ import {
|
|
|
20095
20385
|
COMMAND_PRIORITY_CRITICAL,
|
|
20096
20386
|
INDENT_CONTENT_COMMAND
|
|
20097
20387
|
} from "lexical";
|
|
20098
|
-
import { useEffect as
|
|
20099
|
-
import { jsx as
|
|
20388
|
+
import { useEffect as useEffect17 } from "react";
|
|
20389
|
+
import { jsx as jsx121 } from "@emotion/react/jsx-runtime";
|
|
20100
20390
|
function isIndentPermitted(maxDepth) {
|
|
20101
20391
|
const selection = $getSelection2();
|
|
20102
20392
|
if (!$isRangeSelection2(selection)) {
|
|
@@ -20119,18 +20409,18 @@ function isIndentPermitted(maxDepth) {
|
|
|
20119
20409
|
}
|
|
20120
20410
|
function ListIndentPlugin({ maxDepth }) {
|
|
20121
20411
|
const [editor] = useLexicalComposerContext3();
|
|
20122
|
-
|
|
20412
|
+
useEffect17(() => {
|
|
20123
20413
|
return editor.registerCommand(
|
|
20124
20414
|
INDENT_CONTENT_COMMAND,
|
|
20125
20415
|
() => !isIndentPermitted(maxDepth),
|
|
20126
20416
|
COMMAND_PRIORITY_CRITICAL
|
|
20127
20417
|
);
|
|
20128
20418
|
}, [editor, maxDepth]);
|
|
20129
|
-
return /* @__PURE__ */
|
|
20419
|
+
return /* @__PURE__ */ jsx121(TabIndentationPlugin, {});
|
|
20130
20420
|
}
|
|
20131
20421
|
|
|
20132
20422
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
20133
|
-
import { css as
|
|
20423
|
+
import { css as css92 } from "@emotion/react";
|
|
20134
20424
|
import { $createCodeNode } from "@lexical/code";
|
|
20135
20425
|
import {
|
|
20136
20426
|
$isListNode as $isListNode2,
|
|
@@ -20152,9 +20442,9 @@ import {
|
|
|
20152
20442
|
FORMAT_TEXT_COMMAND,
|
|
20153
20443
|
SELECTION_CHANGE_COMMAND
|
|
20154
20444
|
} from "lexical";
|
|
20155
|
-
import { useCallback as useCallback10, useEffect as
|
|
20156
|
-
import { Fragment as
|
|
20157
|
-
var toolbar =
|
|
20445
|
+
import { useCallback as useCallback10, useEffect as useEffect18, useMemo as useMemo4, useState as useState16 } from "react";
|
|
20446
|
+
import { Fragment as Fragment19, jsx as jsx122, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
|
|
20447
|
+
var toolbar = css92`
|
|
20158
20448
|
background: var(--gray-50);
|
|
20159
20449
|
border-radius: var(--rounded-base);
|
|
20160
20450
|
display: flex;
|
|
@@ -20166,7 +20456,7 @@ var toolbar = css88`
|
|
|
20166
20456
|
top: calc(var(--spacing-sm) * -2);
|
|
20167
20457
|
z-index: 10;
|
|
20168
20458
|
`;
|
|
20169
|
-
var toolbarGroup =
|
|
20459
|
+
var toolbarGroup = css92`
|
|
20170
20460
|
display: flex;
|
|
20171
20461
|
gap: var(--spacing-xs);
|
|
20172
20462
|
position: relative;
|
|
@@ -20182,7 +20472,7 @@ var toolbarGroup = css88`
|
|
|
20182
20472
|
width: 1px;
|
|
20183
20473
|
}
|
|
20184
20474
|
`;
|
|
20185
|
-
var richTextToolbarButton =
|
|
20475
|
+
var richTextToolbarButton = css92`
|
|
20186
20476
|
align-items: center;
|
|
20187
20477
|
appearance: none;
|
|
20188
20478
|
border: 0;
|
|
@@ -20195,17 +20485,17 @@ var richTextToolbarButton = css88`
|
|
|
20195
20485
|
min-width: 32px;
|
|
20196
20486
|
padding: 0 var(--spacing-sm);
|
|
20197
20487
|
`;
|
|
20198
|
-
var richTextToolbarButtonActive =
|
|
20488
|
+
var richTextToolbarButtonActive = css92`
|
|
20199
20489
|
background: var(--gray-200);
|
|
20200
20490
|
`;
|
|
20201
|
-
var toolbarIcon =
|
|
20491
|
+
var toolbarIcon = css92`
|
|
20202
20492
|
color: inherit;
|
|
20203
20493
|
`;
|
|
20204
|
-
var toolbarChevron =
|
|
20494
|
+
var toolbarChevron = css92`
|
|
20205
20495
|
margin-left: var(--spacing-xs);
|
|
20206
20496
|
`;
|
|
20207
20497
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
20208
|
-
return /* @__PURE__ */
|
|
20498
|
+
return /* @__PURE__ */ jsx122(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
20209
20499
|
};
|
|
20210
20500
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
20211
20501
|
["bold", "format-bold"],
|
|
@@ -20295,7 +20585,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20295
20585
|
setIsLink(false);
|
|
20296
20586
|
}
|
|
20297
20587
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
20298
|
-
|
|
20588
|
+
useEffect18(() => {
|
|
20299
20589
|
return editor.registerCommand(
|
|
20300
20590
|
SELECTION_CHANGE_COMMAND,
|
|
20301
20591
|
(_payload) => {
|
|
@@ -20305,7 +20595,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20305
20595
|
COMMAND_PRIORITY_CRITICAL2
|
|
20306
20596
|
);
|
|
20307
20597
|
}, [editor, updateToolbar]);
|
|
20308
|
-
|
|
20598
|
+
useEffect18(() => {
|
|
20309
20599
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
20310
20600
|
requestAnimationFrame(() => {
|
|
20311
20601
|
editorState.read(() => {
|
|
@@ -20314,15 +20604,15 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20314
20604
|
});
|
|
20315
20605
|
});
|
|
20316
20606
|
}, [editor, updateToolbar]);
|
|
20317
|
-
return /* @__PURE__ */
|
|
20318
|
-
/* @__PURE__ */
|
|
20607
|
+
return /* @__PURE__ */ jsxs81("div", { css: toolbar, children: [
|
|
20608
|
+
/* @__PURE__ */ jsxs81(
|
|
20319
20609
|
Menu,
|
|
20320
20610
|
{
|
|
20321
20611
|
menuLabel: "Elements",
|
|
20322
|
-
menuTrigger: /* @__PURE__ */
|
|
20612
|
+
menuTrigger: /* @__PURE__ */ jsxs81("button", { css: richTextToolbarButton, title: "Text styles", children: [
|
|
20323
20613
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
20324
20614
|
" ",
|
|
20325
|
-
/* @__PURE__ */
|
|
20615
|
+
/* @__PURE__ */ jsx122(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
20326
20616
|
] }),
|
|
20327
20617
|
placement: "bottom-start",
|
|
20328
20618
|
children: [
|
|
@@ -20332,7 +20622,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20332
20622
|
type: "paragraph"
|
|
20333
20623
|
},
|
|
20334
20624
|
...visibleTextualElements
|
|
20335
|
-
].map((element) => /* @__PURE__ */
|
|
20625
|
+
].map((element) => /* @__PURE__ */ jsx122(
|
|
20336
20626
|
MenuItem,
|
|
20337
20627
|
{
|
|
20338
20628
|
onClick: () => {
|
|
@@ -20342,12 +20632,12 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20342
20632
|
},
|
|
20343
20633
|
element.type
|
|
20344
20634
|
)),
|
|
20345
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */
|
|
20635
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ jsx122(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
20346
20636
|
]
|
|
20347
20637
|
}
|
|
20348
20638
|
),
|
|
20349
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
20350
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */
|
|
20639
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsxs81("div", { css: toolbarGroup, children: [
|
|
20640
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ jsx122(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ jsx122(
|
|
20351
20641
|
"button",
|
|
20352
20642
|
{
|
|
20353
20643
|
onClick: () => {
|
|
@@ -20357,16 +20647,16 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20357
20647
|
richTextToolbarButton,
|
|
20358
20648
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
20359
20649
|
],
|
|
20360
|
-
children: /* @__PURE__ */
|
|
20650
|
+
children: /* @__PURE__ */ jsx122(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
20361
20651
|
}
|
|
20362
20652
|
) }, format.type)),
|
|
20363
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */
|
|
20653
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsx122(
|
|
20364
20654
|
Menu,
|
|
20365
20655
|
{
|
|
20366
20656
|
menuLabel: "Alternative text styles",
|
|
20367
|
-
menuTrigger: /* @__PURE__ */
|
|
20657
|
+
menuTrigger: /* @__PURE__ */ jsx122("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ jsx122(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
20368
20658
|
placement: "bottom-start",
|
|
20369
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */
|
|
20659
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ jsx122(
|
|
20370
20660
|
MenuItem,
|
|
20371
20661
|
{
|
|
20372
20662
|
onClick: () => {
|
|
@@ -20379,19 +20669,19 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20379
20669
|
}
|
|
20380
20670
|
) : null
|
|
20381
20671
|
] }) : null,
|
|
20382
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */
|
|
20383
|
-
linkElementVisible ? /* @__PURE__ */
|
|
20672
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ jsxs81("div", { css: toolbarGroup, children: [
|
|
20673
|
+
linkElementVisible ? /* @__PURE__ */ jsx122(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ jsx122(
|
|
20384
20674
|
"button",
|
|
20385
20675
|
{
|
|
20386
20676
|
onClick: () => {
|
|
20387
20677
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
20388
20678
|
},
|
|
20389
20679
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
20390
|
-
children: /* @__PURE__ */
|
|
20680
|
+
children: /* @__PURE__ */ jsx122(RichTextToolbarIcon, { icon: "link" })
|
|
20391
20681
|
}
|
|
20392
20682
|
) }) : null,
|
|
20393
|
-
visibleLists.size > 0 ? /* @__PURE__ */
|
|
20394
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */
|
|
20683
|
+
visibleLists.size > 0 ? /* @__PURE__ */ jsxs81(Fragment19, { children: [
|
|
20684
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ jsx122(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ jsx122(
|
|
20395
20685
|
"button",
|
|
20396
20686
|
{
|
|
20397
20687
|
onClick: () => {
|
|
@@ -20401,10 +20691,10 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20401
20691
|
richTextToolbarButton,
|
|
20402
20692
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
20403
20693
|
],
|
|
20404
|
-
children: /* @__PURE__ */
|
|
20694
|
+
children: /* @__PURE__ */ jsx122(RichTextToolbarIcon, { icon: "layout-list" })
|
|
20405
20695
|
}
|
|
20406
20696
|
) }) : null,
|
|
20407
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */
|
|
20697
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ jsx122(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ jsx122(
|
|
20408
20698
|
"button",
|
|
20409
20699
|
{
|
|
20410
20700
|
onClick: () => {
|
|
@@ -20414,32 +20704,32 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20414
20704
|
richTextToolbarButton,
|
|
20415
20705
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
20416
20706
|
],
|
|
20417
|
-
children: /* @__PURE__ */
|
|
20707
|
+
children: /* @__PURE__ */ jsx122(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
20418
20708
|
}
|
|
20419
20709
|
) }) : null
|
|
20420
20710
|
] }) : null,
|
|
20421
|
-
quoteElementVisible ? /* @__PURE__ */
|
|
20711
|
+
quoteElementVisible ? /* @__PURE__ */ jsx122(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ jsx122(
|
|
20422
20712
|
"button",
|
|
20423
20713
|
{
|
|
20424
20714
|
onClick: () => {
|
|
20425
20715
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
20426
20716
|
},
|
|
20427
20717
|
css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
|
|
20428
|
-
children: /* @__PURE__ */
|
|
20718
|
+
children: /* @__PURE__ */ jsx122(RichTextToolbarIcon, { icon: "quote" })
|
|
20429
20719
|
}
|
|
20430
20720
|
) }) : null,
|
|
20431
|
-
codeElementVisible ? /* @__PURE__ */
|
|
20721
|
+
codeElementVisible ? /* @__PURE__ */ jsx122(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ jsx122(
|
|
20432
20722
|
"button",
|
|
20433
20723
|
{
|
|
20434
20724
|
onClick: () => {
|
|
20435
20725
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
20436
20726
|
},
|
|
20437
20727
|
css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
|
|
20438
|
-
children: /* @__PURE__ */
|
|
20728
|
+
children: /* @__PURE__ */ jsx122(RichTextToolbarIcon, { icon: "code-slash" })
|
|
20439
20729
|
}
|
|
20440
20730
|
) }) : null
|
|
20441
20731
|
] }) : null,
|
|
20442
|
-
customControls ? /* @__PURE__ */
|
|
20732
|
+
customControls ? /* @__PURE__ */ jsx122("div", { css: toolbarGroup, children: customControls }) : null
|
|
20443
20733
|
] });
|
|
20444
20734
|
};
|
|
20445
20735
|
var RichTextToolbar_default = RichTextToolbar;
|
|
@@ -20463,7 +20753,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20463
20753
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
20464
20754
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
20465
20755
|
);
|
|
20466
|
-
const [activeFormats, setActiveFormats] =
|
|
20756
|
+
const [activeFormats, setActiveFormats] = useState16([]);
|
|
20467
20757
|
const visibleFormatsWithIcon = useMemo4(() => {
|
|
20468
20758
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20469
20759
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
@@ -20484,7 +20774,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20484
20774
|
});
|
|
20485
20775
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20486
20776
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
20487
|
-
const [activeElement, setActiveElement] =
|
|
20777
|
+
const [activeElement, setActiveElement] = useState16("paragraph");
|
|
20488
20778
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
20489
20779
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
20490
20780
|
);
|
|
@@ -20499,7 +20789,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20499
20789
|
}
|
|
20500
20790
|
);
|
|
20501
20791
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
20502
|
-
const [isLink, setIsLink] =
|
|
20792
|
+
const [isLink, setIsLink] = useState16(false);
|
|
20503
20793
|
const linkElementVisible = useMemo4(() => {
|
|
20504
20794
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
20505
20795
|
}, [isLink, enabledBuiltInElements]);
|
|
@@ -20553,7 +20843,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20553
20843
|
};
|
|
20554
20844
|
|
|
20555
20845
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
20556
|
-
import { Fragment as
|
|
20846
|
+
import { Fragment as Fragment20, jsx as jsx123, jsxs as jsxs82 } from "@emotion/react/jsx-runtime";
|
|
20557
20847
|
var ParameterRichText = ({
|
|
20558
20848
|
label,
|
|
20559
20849
|
labelLeadingIcon,
|
|
@@ -20578,7 +20868,7 @@ var ParameterRichText = ({
|
|
|
20578
20868
|
variables,
|
|
20579
20869
|
customControls
|
|
20580
20870
|
}) => {
|
|
20581
|
-
return /* @__PURE__ */
|
|
20871
|
+
return /* @__PURE__ */ jsxs82(
|
|
20582
20872
|
ParameterShell,
|
|
20583
20873
|
{
|
|
20584
20874
|
"data-testid": "parameter-richtext",
|
|
@@ -20592,7 +20882,7 @@ var ParameterRichText = ({
|
|
|
20592
20882
|
captionTestId,
|
|
20593
20883
|
menuItems,
|
|
20594
20884
|
children: [
|
|
20595
|
-
/* @__PURE__ */
|
|
20885
|
+
/* @__PURE__ */ jsx123(
|
|
20596
20886
|
ParameterRichTextInner,
|
|
20597
20887
|
{
|
|
20598
20888
|
value,
|
|
@@ -20610,23 +20900,23 @@ var ParameterRichText = ({
|
|
|
20610
20900
|
children
|
|
20611
20901
|
}
|
|
20612
20902
|
),
|
|
20613
|
-
menuItems ? /* @__PURE__ */
|
|
20903
|
+
menuItems ? /* @__PURE__ */ jsx123(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx123(Fragment20, { children: menuItems }) }) : null
|
|
20614
20904
|
]
|
|
20615
20905
|
}
|
|
20616
20906
|
);
|
|
20617
20907
|
};
|
|
20618
|
-
var editorWrapper =
|
|
20908
|
+
var editorWrapper = css93`
|
|
20619
20909
|
display: flex;
|
|
20620
20910
|
flex-flow: column;
|
|
20621
20911
|
flex-grow: 1;
|
|
20622
20912
|
`;
|
|
20623
|
-
var editorContainer =
|
|
20913
|
+
var editorContainer = css93`
|
|
20624
20914
|
display: flex;
|
|
20625
20915
|
flex-flow: column;
|
|
20626
20916
|
flex-grow: 1;
|
|
20627
20917
|
position: relative;
|
|
20628
20918
|
`;
|
|
20629
|
-
var editorPlaceholder =
|
|
20919
|
+
var editorPlaceholder = css93`
|
|
20630
20920
|
color: var(--gray-500);
|
|
20631
20921
|
font-style: italic;
|
|
20632
20922
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20637,7 +20927,7 @@ var editorPlaceholder = css89`
|
|
|
20637
20927
|
top: var(--spacing-sm);
|
|
20638
20928
|
user-select: none;
|
|
20639
20929
|
`;
|
|
20640
|
-
var editorInput =
|
|
20930
|
+
var editorInput = css93`
|
|
20641
20931
|
background: var(--white);
|
|
20642
20932
|
border: 1px solid var(--gray-200);
|
|
20643
20933
|
border-radius: var(--rounded-sm);
|
|
@@ -20721,8 +21011,8 @@ var ParameterRichTextInner = ({
|
|
|
20721
21011
|
},
|
|
20722
21012
|
editable: !readOnly
|
|
20723
21013
|
};
|
|
20724
|
-
return /* @__PURE__ */
|
|
20725
|
-
/* @__PURE__ */
|
|
21014
|
+
return /* @__PURE__ */ jsxs82(Fragment20, { children: [
|
|
21015
|
+
/* @__PURE__ */ jsx123("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx123(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx123(
|
|
20726
21016
|
RichText,
|
|
20727
21017
|
{
|
|
20728
21018
|
onChange,
|
|
@@ -20759,14 +21049,14 @@ var RichText = ({
|
|
|
20759
21049
|
variables,
|
|
20760
21050
|
customControls
|
|
20761
21051
|
}) => {
|
|
20762
|
-
const editorContainerRef =
|
|
21052
|
+
const editorContainerRef = useRef10(null);
|
|
20763
21053
|
const [editor] = useLexicalComposerContext5();
|
|
20764
|
-
|
|
21054
|
+
useEffect19(() => {
|
|
20765
21055
|
if (onRichTextInit) {
|
|
20766
21056
|
onRichTextInit(editor);
|
|
20767
21057
|
}
|
|
20768
21058
|
}, [editor, onRichTextInit]);
|
|
20769
|
-
|
|
21059
|
+
useEffect19(() => {
|
|
20770
21060
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
20771
21061
|
requestAnimationFrame(() => {
|
|
20772
21062
|
if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -20778,23 +21068,23 @@ var RichText = ({
|
|
|
20778
21068
|
removeUpdateListener();
|
|
20779
21069
|
};
|
|
20780
21070
|
}, [editor, onChange]);
|
|
20781
|
-
|
|
21071
|
+
useEffect19(() => {
|
|
20782
21072
|
editor.setEditable(!readOnly);
|
|
20783
21073
|
}, [editor, readOnly]);
|
|
20784
|
-
return /* @__PURE__ */
|
|
20785
|
-
readOnly ? null : /* @__PURE__ */
|
|
20786
|
-
/* @__PURE__ */
|
|
20787
|
-
/* @__PURE__ */
|
|
21074
|
+
return /* @__PURE__ */ jsxs82(Fragment20, { children: [
|
|
21075
|
+
readOnly ? null : /* @__PURE__ */ jsx123(RichTextToolbar_default, { config, customControls }),
|
|
21076
|
+
/* @__PURE__ */ jsxs82("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
21077
|
+
/* @__PURE__ */ jsx123(
|
|
20788
21078
|
RichTextPlugin,
|
|
20789
21079
|
{
|
|
20790
|
-
contentEditable: /* @__PURE__ */
|
|
20791
|
-
placeholder: /* @__PURE__ */
|
|
21080
|
+
contentEditable: /* @__PURE__ */ jsx123(ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
21081
|
+
placeholder: /* @__PURE__ */ jsx123("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
20792
21082
|
ErrorBoundary: LexicalErrorBoundary
|
|
20793
21083
|
}
|
|
20794
21084
|
),
|
|
20795
|
-
/* @__PURE__ */
|
|
20796
|
-
readOnly ? null : /* @__PURE__ */
|
|
20797
|
-
/* @__PURE__ */
|
|
21085
|
+
/* @__PURE__ */ jsx123(ListPlugin, {}),
|
|
21086
|
+
readOnly ? null : /* @__PURE__ */ jsx123(HistoryPlugin, {}),
|
|
21087
|
+
/* @__PURE__ */ jsx123(
|
|
20798
21088
|
LinkNodePlugin,
|
|
20799
21089
|
{
|
|
20800
21090
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -20804,27 +21094,27 @@ var RichText = ({
|
|
|
20804
21094
|
} : void 0
|
|
20805
21095
|
}
|
|
20806
21096
|
),
|
|
20807
|
-
/* @__PURE__ */
|
|
20808
|
-
/* @__PURE__ */
|
|
20809
|
-
/* @__PURE__ */
|
|
20810
|
-
/* @__PURE__ */
|
|
21097
|
+
/* @__PURE__ */ jsx123(ListIndentPlugin, { maxDepth: 4 }),
|
|
21098
|
+
/* @__PURE__ */ jsx123(DisableStylesPlugin, {}),
|
|
21099
|
+
/* @__PURE__ */ jsx123(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
21100
|
+
/* @__PURE__ */ jsx123(Fragment20, { children })
|
|
20811
21101
|
] })
|
|
20812
21102
|
] });
|
|
20813
21103
|
};
|
|
20814
21104
|
|
|
20815
21105
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20816
21106
|
import { forwardRef as forwardRef21 } from "react";
|
|
20817
|
-
import { jsx as
|
|
21107
|
+
import { jsx as jsx124, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
|
|
20818
21108
|
var ParameterSelect = forwardRef21(
|
|
20819
21109
|
({ defaultOption, options, ...props }, ref) => {
|
|
20820
21110
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20821
|
-
return /* @__PURE__ */
|
|
21111
|
+
return /* @__PURE__ */ jsx124(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx124(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20822
21112
|
}
|
|
20823
21113
|
);
|
|
20824
21114
|
var ParameterSelectInner = forwardRef21(
|
|
20825
21115
|
({ defaultOption, options, ...props }, ref) => {
|
|
20826
21116
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20827
|
-
return /* @__PURE__ */
|
|
21117
|
+
return /* @__PURE__ */ jsxs83(
|
|
20828
21118
|
"select",
|
|
20829
21119
|
{
|
|
20830
21120
|
css: [input3, selectInput],
|
|
@@ -20833,10 +21123,10 @@ var ParameterSelectInner = forwardRef21(
|
|
|
20833
21123
|
ref,
|
|
20834
21124
|
...props,
|
|
20835
21125
|
children: [
|
|
20836
|
-
defaultOption ? /* @__PURE__ */
|
|
21126
|
+
defaultOption ? /* @__PURE__ */ jsx124("option", { value: "", children: defaultOption }) : null,
|
|
20837
21127
|
options.map((option) => {
|
|
20838
21128
|
var _a;
|
|
20839
|
-
return /* @__PURE__ */
|
|
21129
|
+
return /* @__PURE__ */ jsx124("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
20840
21130
|
})
|
|
20841
21131
|
]
|
|
20842
21132
|
}
|
|
@@ -20846,14 +21136,14 @@ var ParameterSelectInner = forwardRef21(
|
|
|
20846
21136
|
|
|
20847
21137
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20848
21138
|
import { forwardRef as forwardRef22 } from "react";
|
|
20849
|
-
import { jsx as
|
|
21139
|
+
import { jsx as jsx125 } from "@emotion/react/jsx-runtime";
|
|
20850
21140
|
var ParameterTextarea = forwardRef22((props, ref) => {
|
|
20851
21141
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20852
|
-
return /* @__PURE__ */
|
|
21142
|
+
return /* @__PURE__ */ jsx125(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx125(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20853
21143
|
});
|
|
20854
21144
|
var ParameterTextareaInner = forwardRef22(({ ...props }, ref) => {
|
|
20855
21145
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20856
|
-
return /* @__PURE__ */
|
|
21146
|
+
return /* @__PURE__ */ jsx125(
|
|
20857
21147
|
"textarea",
|
|
20858
21148
|
{
|
|
20859
21149
|
css: [input3, textarea2],
|
|
@@ -20867,25 +21157,25 @@ var ParameterTextareaInner = forwardRef22(({ ...props }, ref) => {
|
|
|
20867
21157
|
|
|
20868
21158
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20869
21159
|
import { forwardRef as forwardRef23 } from "react";
|
|
20870
|
-
import { jsx as
|
|
21160
|
+
import { jsx as jsx126, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
|
|
20871
21161
|
var ParameterToggle = forwardRef23((props, ref) => {
|
|
20872
21162
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20873
|
-
return /* @__PURE__ */
|
|
21163
|
+
return /* @__PURE__ */ jsx126(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx126(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20874
21164
|
});
|
|
20875
21165
|
var ParameterToggleInner = forwardRef23(
|
|
20876
21166
|
({ children, ...props }, ref) => {
|
|
20877
21167
|
const { id, label } = useParameterShell();
|
|
20878
|
-
return /* @__PURE__ */
|
|
20879
|
-
/* @__PURE__ */
|
|
20880
|
-
/* @__PURE__ */
|
|
21168
|
+
return /* @__PURE__ */ jsxs84("label", { css: inputToggleLabel2, children: [
|
|
21169
|
+
/* @__PURE__ */ jsx126("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
21170
|
+
/* @__PURE__ */ jsx126("span", { css: inlineLabel2, children: label }),
|
|
20881
21171
|
children
|
|
20882
21172
|
] });
|
|
20883
21173
|
}
|
|
20884
21174
|
);
|
|
20885
21175
|
|
|
20886
21176
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20887
|
-
import { css as
|
|
20888
|
-
var container3 =
|
|
21177
|
+
import { css as css94, keyframes as keyframes4 } from "@emotion/react";
|
|
21178
|
+
var container3 = css94`
|
|
20889
21179
|
background: var(--gray-50);
|
|
20890
21180
|
margin-block: var(--spacing-sm);
|
|
20891
21181
|
position: relative;
|
|
@@ -20895,13 +21185,13 @@ var container3 = css90`
|
|
|
20895
21185
|
border: solid 1px var(--gray-300);
|
|
20896
21186
|
`;
|
|
20897
21187
|
var themeMap = {
|
|
20898
|
-
primary:
|
|
21188
|
+
primary: css94`
|
|
20899
21189
|
--progress-color: var(--accent-light);
|
|
20900
21190
|
`,
|
|
20901
|
-
secondary:
|
|
21191
|
+
secondary: css94`
|
|
20902
21192
|
--progress-color: var(--accent-alt-light);
|
|
20903
21193
|
`,
|
|
20904
|
-
destructive:
|
|
21194
|
+
destructive: css94`
|
|
20905
21195
|
--progress-color: var(--brand-secondary-5);
|
|
20906
21196
|
`
|
|
20907
21197
|
};
|
|
@@ -20913,10 +21203,10 @@ var slidingBackgroundPosition = keyframes4`
|
|
|
20913
21203
|
background-position: 64px 0;
|
|
20914
21204
|
}
|
|
20915
21205
|
`;
|
|
20916
|
-
var determinate =
|
|
21206
|
+
var determinate = css94`
|
|
20917
21207
|
background-color: var(--progress-color);
|
|
20918
21208
|
`;
|
|
20919
|
-
var indeterminate =
|
|
21209
|
+
var indeterminate = css94`
|
|
20920
21210
|
background-image: linear-gradient(
|
|
20921
21211
|
45deg,
|
|
20922
21212
|
var(--progress-color) 25%,
|
|
@@ -20930,7 +21220,7 @@ var indeterminate = css90`
|
|
|
20930
21220
|
background-size: 64px 64px;
|
|
20931
21221
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
20932
21222
|
`;
|
|
20933
|
-
var bar =
|
|
21223
|
+
var bar = css94`
|
|
20934
21224
|
position: absolute;
|
|
20935
21225
|
inset: 0;
|
|
20936
21226
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20938,7 +21228,7 @@ var bar = css90`
|
|
|
20938
21228
|
`;
|
|
20939
21229
|
|
|
20940
21230
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
20941
|
-
import { jsx as
|
|
21231
|
+
import { jsx as jsx127 } from "@emotion/react/jsx-runtime";
|
|
20942
21232
|
function ProgressBar({
|
|
20943
21233
|
current,
|
|
20944
21234
|
max,
|
|
@@ -20948,7 +21238,7 @@ function ProgressBar({
|
|
|
20948
21238
|
}) {
|
|
20949
21239
|
const valueNow = Math.min(current, max);
|
|
20950
21240
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
20951
|
-
return /* @__PURE__ */
|
|
21241
|
+
return /* @__PURE__ */ jsx127(
|
|
20952
21242
|
"div",
|
|
20953
21243
|
{
|
|
20954
21244
|
css: container3,
|
|
@@ -20959,7 +21249,7 @@ function ProgressBar({
|
|
|
20959
21249
|
"aria-valuemax": max,
|
|
20960
21250
|
"aria-valuenow": valueNow,
|
|
20961
21251
|
...props,
|
|
20962
|
-
children: /* @__PURE__ */
|
|
21252
|
+
children: /* @__PURE__ */ jsx127(
|
|
20963
21253
|
"div",
|
|
20964
21254
|
{
|
|
20965
21255
|
css: [
|
|
@@ -20978,28 +21268,28 @@ function ProgressBar({
|
|
|
20978
21268
|
}
|
|
20979
21269
|
|
|
20980
21270
|
// src/components/ProgressList/ProgressList.tsx
|
|
20981
|
-
import { css as
|
|
21271
|
+
import { css as css96 } from "@emotion/react";
|
|
20982
21272
|
import { CgCheckO as CgCheckO2 } from "@react-icons/all-files/cg/CgCheckO";
|
|
20983
21273
|
import { CgRadioCheck } from "@react-icons/all-files/cg/CgRadioCheck";
|
|
20984
21274
|
import { CgRecord } from "@react-icons/all-files/cg/CgRecord";
|
|
20985
21275
|
import { useMemo as useMemo5 } from "react";
|
|
20986
21276
|
|
|
20987
21277
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20988
|
-
import { css as
|
|
20989
|
-
var progressListStyles =
|
|
21278
|
+
import { css as css95 } from "@emotion/react";
|
|
21279
|
+
var progressListStyles = css95`
|
|
20990
21280
|
display: flex;
|
|
20991
21281
|
flex-direction: column;
|
|
20992
21282
|
gap: var(--spacing-sm);
|
|
20993
21283
|
list-style-type: none;
|
|
20994
21284
|
`;
|
|
20995
|
-
var progressListItemStyles =
|
|
21285
|
+
var progressListItemStyles = css95`
|
|
20996
21286
|
display: flex;
|
|
20997
21287
|
gap: var(--spacing-base);
|
|
20998
21288
|
align-items: center;
|
|
20999
21289
|
`;
|
|
21000
21290
|
|
|
21001
21291
|
// src/components/ProgressList/ProgressList.tsx
|
|
21002
|
-
import { jsx as
|
|
21292
|
+
import { jsx as jsx128, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
|
|
21003
21293
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
21004
21294
|
const itemsWithStatus = useMemo5(() => {
|
|
21005
21295
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
@@ -21013,8 +21303,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
21013
21303
|
return { ...item, status };
|
|
21014
21304
|
});
|
|
21015
21305
|
}, [items, inProgressId]);
|
|
21016
|
-
return /* @__PURE__ */
|
|
21017
|
-
return /* @__PURE__ */
|
|
21306
|
+
return /* @__PURE__ */ jsx128("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
21307
|
+
return /* @__PURE__ */ jsx128(
|
|
21018
21308
|
ProgressListItem,
|
|
21019
21309
|
{
|
|
21020
21310
|
status,
|
|
@@ -21047,12 +21337,12 @@ var ProgressListItem = ({
|
|
|
21047
21337
|
}, [status, error]);
|
|
21048
21338
|
const statusStyles = useMemo5(() => {
|
|
21049
21339
|
if (error) {
|
|
21050
|
-
return errorLevel === "caution" ?
|
|
21340
|
+
return errorLevel === "caution" ? css96`
|
|
21051
21341
|
color: rgb(161, 98, 7);
|
|
21052
21342
|
& svg {
|
|
21053
21343
|
color: rgb(250, 204, 21);
|
|
21054
21344
|
}
|
|
21055
|
-
` :
|
|
21345
|
+
` : css96`
|
|
21056
21346
|
color: rgb(185, 28, 28);
|
|
21057
21347
|
& svg {
|
|
21058
21348
|
color: var(--brand-primary-2);
|
|
@@ -21060,38 +21350,38 @@ var ProgressListItem = ({
|
|
|
21060
21350
|
`;
|
|
21061
21351
|
}
|
|
21062
21352
|
const colorPerStatus = {
|
|
21063
|
-
completed:
|
|
21353
|
+
completed: css96`
|
|
21064
21354
|
opacity: 0.75;
|
|
21065
21355
|
`,
|
|
21066
|
-
inProgress:
|
|
21356
|
+
inProgress: css96`
|
|
21067
21357
|
-webkit-text-stroke-width: thin;
|
|
21068
21358
|
`,
|
|
21069
|
-
queued:
|
|
21359
|
+
queued: css96`
|
|
21070
21360
|
opacity: 0.5;
|
|
21071
21361
|
`
|
|
21072
21362
|
};
|
|
21073
21363
|
return colorPerStatus[status];
|
|
21074
21364
|
}, [status, error, errorLevel]);
|
|
21075
|
-
return /* @__PURE__ */
|
|
21076
|
-
/* @__PURE__ */
|
|
21077
|
-
/* @__PURE__ */
|
|
21365
|
+
return /* @__PURE__ */ jsxs85("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
21366
|
+
/* @__PURE__ */ jsx128(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ jsx128("div", { children: /* @__PURE__ */ jsx128(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
21367
|
+
/* @__PURE__ */ jsxs85("div", { children: [
|
|
21078
21368
|
children,
|
|
21079
|
-
/* @__PURE__ */
|
|
21369
|
+
/* @__PURE__ */ jsx128("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
21080
21370
|
] })
|
|
21081
21371
|
] });
|
|
21082
21372
|
};
|
|
21083
21373
|
|
|
21084
21374
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21085
|
-
import { css as
|
|
21375
|
+
import { css as css98 } from "@emotion/react";
|
|
21086
21376
|
import { CgCheck as CgCheck5 } from "@react-icons/all-files/cg/CgCheck";
|
|
21087
|
-
import { useCallback as useCallback11, useEffect as
|
|
21377
|
+
import { useCallback as useCallback11, useEffect as useEffect20, useMemo as useMemo6, useRef as useRef11, useState as useState17 } from "react";
|
|
21088
21378
|
|
|
21089
21379
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
21090
|
-
import { css as
|
|
21091
|
-
var segmentedControlRootStyles =
|
|
21380
|
+
import { css as css97 } from "@emotion/react";
|
|
21381
|
+
var segmentedControlRootStyles = css97`
|
|
21092
21382
|
position: relative;
|
|
21093
21383
|
`;
|
|
21094
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
21384
|
+
var segmentedControlScrollIndicatorsStyles = css97`
|
|
21095
21385
|
position: absolute;
|
|
21096
21386
|
inset: 0;
|
|
21097
21387
|
z-index: 1;
|
|
@@ -21119,17 +21409,17 @@ var segmentedControlScrollIndicatorsStyles = css93`
|
|
|
21119
21409
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
21120
21410
|
}
|
|
21121
21411
|
`;
|
|
21122
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
21412
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = css97`
|
|
21123
21413
|
&::before {
|
|
21124
21414
|
opacity: 1;
|
|
21125
21415
|
}
|
|
21126
21416
|
`;
|
|
21127
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
21417
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = css97`
|
|
21128
21418
|
&::after {
|
|
21129
21419
|
opacity: 1;
|
|
21130
21420
|
}
|
|
21131
21421
|
`;
|
|
21132
|
-
var segmentedControlWrapperStyles =
|
|
21422
|
+
var segmentedControlWrapperStyles = css97`
|
|
21133
21423
|
overflow-y: auto;
|
|
21134
21424
|
scroll-behavior: smooth;
|
|
21135
21425
|
scrollbar-width: none;
|
|
@@ -21138,7 +21428,7 @@ var segmentedControlWrapperStyles = css93`
|
|
|
21138
21428
|
height: 0px;
|
|
21139
21429
|
}
|
|
21140
21430
|
`;
|
|
21141
|
-
var segmentedControlStyles =
|
|
21431
|
+
var segmentedControlStyles = css97`
|
|
21142
21432
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
21143
21433
|
--segmented-control-border-width: 1px;
|
|
21144
21434
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -21157,14 +21447,14 @@ var segmentedControlStyles = css93`
|
|
|
21157
21447
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
21158
21448
|
font-size: var(--fs-xs);
|
|
21159
21449
|
`;
|
|
21160
|
-
var segmentedControlVerticalStyles =
|
|
21450
|
+
var segmentedControlVerticalStyles = css97`
|
|
21161
21451
|
flex-direction: column;
|
|
21162
21452
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
21163
21453
|
var(--segmented-control-rounded-value) 0 0;
|
|
21164
21454
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
21165
21455
|
var(--segmented-control-rounded-value);
|
|
21166
21456
|
`;
|
|
21167
|
-
var segmentedControlItemStyles =
|
|
21457
|
+
var segmentedControlItemStyles = css97`
|
|
21168
21458
|
&:first-of-type label {
|
|
21169
21459
|
border-radius: var(--segmented-control-first-border-radius);
|
|
21170
21460
|
}
|
|
@@ -21172,10 +21462,10 @@ var segmentedControlItemStyles = css93`
|
|
|
21172
21462
|
border-radius: var(--segmented-control-last-border-radius);
|
|
21173
21463
|
}
|
|
21174
21464
|
`;
|
|
21175
|
-
var segmentedControlInputStyles =
|
|
21465
|
+
var segmentedControlInputStyles = css97`
|
|
21176
21466
|
${accessibleHidden}
|
|
21177
21467
|
`;
|
|
21178
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
21468
|
+
var segmentedControlLabelStyles = (checked, disabled2) => css97`
|
|
21179
21469
|
position: relative;
|
|
21180
21470
|
display: flex;
|
|
21181
21471
|
align-items: center;
|
|
@@ -21242,25 +21532,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => css93`
|
|
|
21242
21532
|
`}
|
|
21243
21533
|
}
|
|
21244
21534
|
`;
|
|
21245
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21535
|
+
var segmentedControlLabelIconOnlyStyles = css97`
|
|
21246
21536
|
padding-inline: 0.5em;
|
|
21247
21537
|
`;
|
|
21248
|
-
var segmentedControlLabelCheckStyles =
|
|
21538
|
+
var segmentedControlLabelCheckStyles = css97`
|
|
21249
21539
|
opacity: 0.5;
|
|
21250
21540
|
`;
|
|
21251
|
-
var segmentedControlLabelContentStyles =
|
|
21541
|
+
var segmentedControlLabelContentStyles = css97`
|
|
21252
21542
|
display: flex;
|
|
21253
21543
|
align-items: center;
|
|
21254
21544
|
justify-content: center;
|
|
21255
21545
|
gap: var(--spacing-sm);
|
|
21256
21546
|
height: 100%;
|
|
21257
21547
|
`;
|
|
21258
|
-
var segmentedControlLabelTextStyles =
|
|
21548
|
+
var segmentedControlLabelTextStyles = css97`
|
|
21259
21549
|
white-space: nowrap;
|
|
21260
21550
|
`;
|
|
21261
21551
|
|
|
21262
21552
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21263
|
-
import { jsx as
|
|
21553
|
+
import { jsx as jsx129, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
21264
21554
|
var SegmentedControl = ({
|
|
21265
21555
|
name,
|
|
21266
21556
|
options,
|
|
@@ -21275,9 +21565,9 @@ var SegmentedControl = ({
|
|
|
21275
21565
|
currentBackgroundColor = "white",
|
|
21276
21566
|
...props
|
|
21277
21567
|
}) => {
|
|
21278
|
-
const wrapperRef =
|
|
21279
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] =
|
|
21280
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] =
|
|
21568
|
+
const wrapperRef = useRef11(null);
|
|
21569
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState17(false);
|
|
21570
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState17(false);
|
|
21281
21571
|
const onOptionChange = useCallback11(
|
|
21282
21572
|
(event) => {
|
|
21283
21573
|
if (event.target.checked) {
|
|
@@ -21288,17 +21578,17 @@ var SegmentedControl = ({
|
|
|
21288
21578
|
);
|
|
21289
21579
|
const sizeStyles = useMemo6(() => {
|
|
21290
21580
|
const map = {
|
|
21291
|
-
sm:
|
|
21292
|
-
md:
|
|
21293
|
-
lg:
|
|
21294
|
-
xl:
|
|
21581
|
+
sm: css98({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
21582
|
+
md: css98({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
21583
|
+
lg: css98({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
21584
|
+
xl: css98({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
21295
21585
|
};
|
|
21296
21586
|
return map[size];
|
|
21297
21587
|
}, [size]);
|
|
21298
21588
|
const isIconOnly = useMemo6(() => {
|
|
21299
21589
|
return options.every((option) => option && option.icon && !option.label);
|
|
21300
21590
|
}, [options]);
|
|
21301
|
-
|
|
21591
|
+
useEffect20(() => {
|
|
21302
21592
|
const wrapperElement = wrapperRef.current;
|
|
21303
21593
|
const onScroll = () => {
|
|
21304
21594
|
if (!wrapperElement) {
|
|
@@ -21319,8 +21609,8 @@ var SegmentedControl = ({
|
|
|
21319
21609
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
21320
21610
|
};
|
|
21321
21611
|
}, []);
|
|
21322
|
-
return /* @__PURE__ */
|
|
21323
|
-
/* @__PURE__ */
|
|
21612
|
+
return /* @__PURE__ */ jsxs86("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
21613
|
+
/* @__PURE__ */ jsx129("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ jsx129(
|
|
21324
21614
|
"div",
|
|
21325
21615
|
{
|
|
21326
21616
|
css: [
|
|
@@ -21336,12 +21626,12 @@ var SegmentedControl = ({
|
|
|
21336
21626
|
}
|
|
21337
21627
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
21338
21628
|
const isDisabled = disabled2 || option.disabled;
|
|
21339
|
-
return /* @__PURE__ */
|
|
21629
|
+
return /* @__PURE__ */ jsx129(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx129(
|
|
21340
21630
|
"div",
|
|
21341
21631
|
{
|
|
21342
21632
|
css: segmentedControlItemStyles,
|
|
21343
21633
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
21344
|
-
children: /* @__PURE__ */
|
|
21634
|
+
children: /* @__PURE__ */ jsxs86(
|
|
21345
21635
|
"label",
|
|
21346
21636
|
{
|
|
21347
21637
|
css: [
|
|
@@ -21350,7 +21640,7 @@ var SegmentedControl = ({
|
|
|
21350
21640
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
21351
21641
|
],
|
|
21352
21642
|
children: [
|
|
21353
|
-
/* @__PURE__ */
|
|
21643
|
+
/* @__PURE__ */ jsx129(
|
|
21354
21644
|
"input",
|
|
21355
21645
|
{
|
|
21356
21646
|
css: segmentedControlInputStyles,
|
|
@@ -21362,10 +21652,10 @@ var SegmentedControl = ({
|
|
|
21362
21652
|
disabled: isDisabled
|
|
21363
21653
|
}
|
|
21364
21654
|
),
|
|
21365
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */
|
|
21366
|
-
/* @__PURE__ */
|
|
21367
|
-
!option.icon ? null : /* @__PURE__ */
|
|
21368
|
-
!text || hideOptionText ? null : /* @__PURE__ */
|
|
21655
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx129(CgCheck5, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
21656
|
+
/* @__PURE__ */ jsxs86("span", { css: segmentedControlLabelContentStyles, children: [
|
|
21657
|
+
!option.icon ? null : /* @__PURE__ */ jsx129(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
21658
|
+
!text || hideOptionText ? null : /* @__PURE__ */ jsx129("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
21369
21659
|
] })
|
|
21370
21660
|
]
|
|
21371
21661
|
}
|
|
@@ -21375,7 +21665,7 @@ var SegmentedControl = ({
|
|
|
21375
21665
|
})
|
|
21376
21666
|
}
|
|
21377
21667
|
) }),
|
|
21378
|
-
/* @__PURE__ */
|
|
21668
|
+
/* @__PURE__ */ jsx129(
|
|
21379
21669
|
"div",
|
|
21380
21670
|
{
|
|
21381
21671
|
css: [
|
|
@@ -21389,18 +21679,18 @@ var SegmentedControl = ({
|
|
|
21389
21679
|
};
|
|
21390
21680
|
|
|
21391
21681
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
21392
|
-
import { css as
|
|
21682
|
+
import { css as css99, keyframes as keyframes5 } from "@emotion/react";
|
|
21393
21683
|
var lightFadingOut = keyframes5`
|
|
21394
21684
|
from { opacity: 0.1; }
|
|
21395
21685
|
to { opacity: 0.025; }
|
|
21396
21686
|
`;
|
|
21397
|
-
var skeletonStyles =
|
|
21687
|
+
var skeletonStyles = css99`
|
|
21398
21688
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
21399
21689
|
background-color: var(--gray-900);
|
|
21400
21690
|
`;
|
|
21401
21691
|
|
|
21402
21692
|
// src/components/Skeleton/Skeleton.tsx
|
|
21403
|
-
import { jsx as
|
|
21693
|
+
import { jsx as jsx130 } from "@emotion/react/jsx-runtime";
|
|
21404
21694
|
var Skeleton = ({
|
|
21405
21695
|
width = "100%",
|
|
21406
21696
|
height = "1.25rem",
|
|
@@ -21408,7 +21698,7 @@ var Skeleton = ({
|
|
|
21408
21698
|
circle = false,
|
|
21409
21699
|
children,
|
|
21410
21700
|
...otherProps
|
|
21411
|
-
}) => /* @__PURE__ */
|
|
21701
|
+
}) => /* @__PURE__ */ jsx130(
|
|
21412
21702
|
"div",
|
|
21413
21703
|
{
|
|
21414
21704
|
css: [
|
|
@@ -21431,8 +21721,8 @@ var Skeleton = ({
|
|
|
21431
21721
|
import * as React24 from "react";
|
|
21432
21722
|
|
|
21433
21723
|
// src/components/Switch/Switch.styles.ts
|
|
21434
|
-
import { css as
|
|
21435
|
-
var SwitchInputContainer =
|
|
21724
|
+
import { css as css100 } from "@emotion/react";
|
|
21725
|
+
var SwitchInputContainer = css100`
|
|
21436
21726
|
cursor: pointer;
|
|
21437
21727
|
display: inline-block;
|
|
21438
21728
|
position: relative;
|
|
@@ -21441,7 +21731,7 @@ var SwitchInputContainer = css96`
|
|
|
21441
21731
|
vertical-align: middle;
|
|
21442
21732
|
user-select: none;
|
|
21443
21733
|
`;
|
|
21444
|
-
var SwitchInput =
|
|
21734
|
+
var SwitchInput = css100`
|
|
21445
21735
|
appearance: none;
|
|
21446
21736
|
border-radius: var(--rounded-full);
|
|
21447
21737
|
background-color: var(--white);
|
|
@@ -21479,7 +21769,7 @@ var SwitchInput = css96`
|
|
|
21479
21769
|
cursor: not-allowed;
|
|
21480
21770
|
}
|
|
21481
21771
|
`;
|
|
21482
|
-
var SwitchInputDisabled =
|
|
21772
|
+
var SwitchInputDisabled = css100`
|
|
21483
21773
|
opacity: var(--opacity-50);
|
|
21484
21774
|
cursor: not-allowed;
|
|
21485
21775
|
|
|
@@ -21487,7 +21777,7 @@ var SwitchInputDisabled = css96`
|
|
|
21487
21777
|
cursor: not-allowed;
|
|
21488
21778
|
}
|
|
21489
21779
|
`;
|
|
21490
|
-
var SwitchInputLabel =
|
|
21780
|
+
var SwitchInputLabel = css100`
|
|
21491
21781
|
align-items: center;
|
|
21492
21782
|
color: var(--typography-base);
|
|
21493
21783
|
display: inline-flex;
|
|
@@ -21508,26 +21798,26 @@ var SwitchInputLabel = css96`
|
|
|
21508
21798
|
top: 0;
|
|
21509
21799
|
}
|
|
21510
21800
|
`;
|
|
21511
|
-
var SwitchText =
|
|
21801
|
+
var SwitchText = css100`
|
|
21512
21802
|
color: var(--gray-500);
|
|
21513
21803
|
font-size: var(--fs-sm);
|
|
21514
21804
|
padding-inline: var(--spacing-2xl) 0;
|
|
21515
21805
|
`;
|
|
21516
21806
|
|
|
21517
21807
|
// src/components/Switch/Switch.tsx
|
|
21518
|
-
import { Fragment as
|
|
21808
|
+
import { Fragment as Fragment21, jsx as jsx131, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
21519
21809
|
var Switch = React24.forwardRef(
|
|
21520
21810
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
21521
21811
|
let additionalText = infoText;
|
|
21522
21812
|
if (infoText && toggleText) {
|
|
21523
21813
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
21524
21814
|
}
|
|
21525
|
-
return /* @__PURE__ */
|
|
21526
|
-
/* @__PURE__ */
|
|
21527
|
-
/* @__PURE__ */
|
|
21528
|
-
/* @__PURE__ */
|
|
21815
|
+
return /* @__PURE__ */ jsxs87(Fragment21, { children: [
|
|
21816
|
+
/* @__PURE__ */ jsxs87("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
21817
|
+
/* @__PURE__ */ jsx131("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
21818
|
+
/* @__PURE__ */ jsx131("span", { css: SwitchInputLabel, children: label })
|
|
21529
21819
|
] }),
|
|
21530
|
-
additionalText ? /* @__PURE__ */
|
|
21820
|
+
additionalText ? /* @__PURE__ */ jsx131("p", { css: SwitchText, children: additionalText }) : null,
|
|
21531
21821
|
children
|
|
21532
21822
|
] });
|
|
21533
21823
|
}
|
|
@@ -21537,67 +21827,75 @@ var Switch = React24.forwardRef(
|
|
|
21537
21827
|
import * as React25 from "react";
|
|
21538
21828
|
|
|
21539
21829
|
// src/components/Table/Table.styles.ts
|
|
21540
|
-
import { css as
|
|
21541
|
-
var table = ({ cellPadding = "var(--spacing-
|
|
21830
|
+
import { css as css101 } from "@emotion/react";
|
|
21831
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css101`
|
|
21542
21832
|
border-bottom: 1px solid var(--gray-400);
|
|
21543
21833
|
border-collapse: collapse;
|
|
21544
21834
|
min-width: 100%;
|
|
21545
21835
|
table-layout: auto;
|
|
21836
|
+
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
21546
21837
|
|
|
21547
21838
|
th,
|
|
21548
21839
|
td {
|
|
21549
21840
|
padding: ${cellPadding};
|
|
21550
21841
|
}
|
|
21842
|
+
|
|
21843
|
+
thead tr {
|
|
21844
|
+
border-color: var(--gray-300);
|
|
21845
|
+
}
|
|
21846
|
+
|
|
21847
|
+
tbody tr:hover {
|
|
21848
|
+
background-color: var(--gray-50);
|
|
21849
|
+
}
|
|
21551
21850
|
`;
|
|
21552
|
-
var tableHead =
|
|
21553
|
-
background: var(--gray-100);
|
|
21851
|
+
var tableHead = css101`
|
|
21554
21852
|
color: var(--typography-base);
|
|
21555
21853
|
text-align: left;
|
|
21556
21854
|
`;
|
|
21557
|
-
var tableRow =
|
|
21558
|
-
border-bottom: 1px solid var(--gray-
|
|
21855
|
+
var tableRow = css101`
|
|
21856
|
+
border-bottom: 1px solid var(--gray-100);
|
|
21559
21857
|
`;
|
|
21560
|
-
var tableCellHead =
|
|
21858
|
+
var tableCellHead = css101`
|
|
21561
21859
|
font-size: var(--fs-sm);
|
|
21562
21860
|
text-transform: uppercase;
|
|
21563
21861
|
font-weight: var(--fw-bold);
|
|
21564
21862
|
`;
|
|
21565
21863
|
|
|
21566
21864
|
// src/components/Table/Table.tsx
|
|
21567
|
-
import { jsx as
|
|
21865
|
+
import { jsx as jsx132 } from "@emotion/react/jsx-runtime";
|
|
21568
21866
|
var Table = React25.forwardRef(
|
|
21569
21867
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
21570
|
-
return /* @__PURE__ */
|
|
21868
|
+
return /* @__PURE__ */ jsx132("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
21571
21869
|
}
|
|
21572
21870
|
);
|
|
21573
21871
|
var TableHead = React25.forwardRef(
|
|
21574
21872
|
({ children, ...otherProps }, ref) => {
|
|
21575
|
-
return /* @__PURE__ */
|
|
21873
|
+
return /* @__PURE__ */ jsx132("thead", { ref, css: tableHead, ...otherProps, children });
|
|
21576
21874
|
}
|
|
21577
21875
|
);
|
|
21578
21876
|
var TableBody = React25.forwardRef(
|
|
21579
21877
|
({ children, ...otherProps }, ref) => {
|
|
21580
|
-
return /* @__PURE__ */
|
|
21878
|
+
return /* @__PURE__ */ jsx132("tbody", { ref, ...otherProps, children });
|
|
21581
21879
|
}
|
|
21582
21880
|
);
|
|
21583
21881
|
var TableFoot = React25.forwardRef(
|
|
21584
21882
|
({ children, ...otherProps }, ref) => {
|
|
21585
|
-
return /* @__PURE__ */
|
|
21883
|
+
return /* @__PURE__ */ jsx132("tfoot", { ref, ...otherProps, children });
|
|
21586
21884
|
}
|
|
21587
21885
|
);
|
|
21588
21886
|
var TableRow = React25.forwardRef(
|
|
21589
21887
|
({ children, ...otherProps }, ref) => {
|
|
21590
|
-
return /* @__PURE__ */
|
|
21888
|
+
return /* @__PURE__ */ jsx132("tr", { ref, css: tableRow, ...otherProps, children });
|
|
21591
21889
|
}
|
|
21592
21890
|
);
|
|
21593
21891
|
var TableCellHead = React25.forwardRef(
|
|
21594
21892
|
({ children, ...otherProps }, ref) => {
|
|
21595
|
-
return /* @__PURE__ */
|
|
21893
|
+
return /* @__PURE__ */ jsx132("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
21596
21894
|
}
|
|
21597
21895
|
);
|
|
21598
21896
|
var TableCellData = React25.forwardRef(
|
|
21599
21897
|
({ children, ...otherProps }, ref) => {
|
|
21600
|
-
return /* @__PURE__ */
|
|
21898
|
+
return /* @__PURE__ */ jsx132("td", { ref, ...otherProps, children });
|
|
21601
21899
|
}
|
|
21602
21900
|
);
|
|
21603
21901
|
|
|
@@ -21609,11 +21907,11 @@ import {
|
|
|
21609
21907
|
TabProvider as AriakitTabProvider,
|
|
21610
21908
|
useTabStore as useAriakitTabStore
|
|
21611
21909
|
} from "@ariakit/react";
|
|
21612
|
-
import { useCallback as useCallback12, useEffect as
|
|
21910
|
+
import { useCallback as useCallback12, useEffect as useEffect21, useMemo as useMemo7 } from "react";
|
|
21613
21911
|
|
|
21614
21912
|
// src/components/Tabs/Tabs.styles.ts
|
|
21615
|
-
import { css as
|
|
21616
|
-
var tabButtonStyles =
|
|
21913
|
+
import { css as css102 } from "@emotion/react";
|
|
21914
|
+
var tabButtonStyles = css102`
|
|
21617
21915
|
align-items: center;
|
|
21618
21916
|
border: 0;
|
|
21619
21917
|
height: 2.5rem;
|
|
@@ -21630,14 +21928,14 @@ var tabButtonStyles = css98`
|
|
|
21630
21928
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
21631
21929
|
}
|
|
21632
21930
|
`;
|
|
21633
|
-
var tabButtonGroupStyles =
|
|
21931
|
+
var tabButtonGroupStyles = css102`
|
|
21634
21932
|
display: flex;
|
|
21635
21933
|
gap: var(--spacing-base);
|
|
21636
21934
|
border-bottom: 1px solid var(--gray-300);
|
|
21637
21935
|
`;
|
|
21638
21936
|
|
|
21639
21937
|
// src/components/Tabs/Tabs.tsx
|
|
21640
|
-
import { jsx as
|
|
21938
|
+
import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
|
|
21641
21939
|
var useCurrentTab = () => {
|
|
21642
21940
|
const context = useAriakitTabStore();
|
|
21643
21941
|
if (!context) {
|
|
@@ -21670,33 +21968,33 @@ var Tabs = ({
|
|
|
21670
21968
|
},
|
|
21671
21969
|
[onSelectedIdChange, useHashForState]
|
|
21672
21970
|
);
|
|
21673
|
-
|
|
21971
|
+
useEffect21(() => {
|
|
21674
21972
|
if (selected && selected !== tab.getState().activeId) {
|
|
21675
21973
|
tab.setSelectedId(selected);
|
|
21676
21974
|
}
|
|
21677
21975
|
}, [selected, tab]);
|
|
21678
|
-
return /* @__PURE__ */
|
|
21976
|
+
return /* @__PURE__ */ jsx133(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
21679
21977
|
};
|
|
21680
21978
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
21681
|
-
return /* @__PURE__ */
|
|
21979
|
+
return /* @__PURE__ */ jsx133(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
|
|
21682
21980
|
};
|
|
21683
21981
|
var TabButton = ({
|
|
21684
21982
|
children,
|
|
21685
21983
|
id,
|
|
21686
21984
|
...props
|
|
21687
21985
|
}) => {
|
|
21688
|
-
return /* @__PURE__ */
|
|
21986
|
+
return /* @__PURE__ */ jsx133(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
21689
21987
|
};
|
|
21690
21988
|
var TabContent = ({
|
|
21691
21989
|
children,
|
|
21692
21990
|
...props
|
|
21693
21991
|
}) => {
|
|
21694
|
-
return /* @__PURE__ */
|
|
21992
|
+
return /* @__PURE__ */ jsx133(AriakitTabPanel, { ...props, children });
|
|
21695
21993
|
};
|
|
21696
21994
|
|
|
21697
21995
|
// src/components/Validation/StatusBullet.styles.ts
|
|
21698
|
-
import { css as
|
|
21699
|
-
var StatusBulletContainer =
|
|
21996
|
+
import { css as css103 } from "@emotion/react";
|
|
21997
|
+
var StatusBulletContainer = css103`
|
|
21700
21998
|
align-items: center;
|
|
21701
21999
|
align-self: center;
|
|
21702
22000
|
color: var(--gray-500);
|
|
@@ -21713,33 +22011,33 @@ var StatusBulletContainer = css99`
|
|
|
21713
22011
|
display: block;
|
|
21714
22012
|
}
|
|
21715
22013
|
`;
|
|
21716
|
-
var StatusBulletBase =
|
|
22014
|
+
var StatusBulletBase = css103`
|
|
21717
22015
|
font-size: var(--fs-sm);
|
|
21718
22016
|
&:before {
|
|
21719
22017
|
width: var(--fs-xs);
|
|
21720
22018
|
height: var(--fs-xs);
|
|
21721
22019
|
}
|
|
21722
22020
|
`;
|
|
21723
|
-
var StatusBulletSmall =
|
|
22021
|
+
var StatusBulletSmall = css103`
|
|
21724
22022
|
font-size: var(--fs-xs);
|
|
21725
22023
|
&:before {
|
|
21726
22024
|
width: var(--fs-xxs);
|
|
21727
22025
|
height: var(--fs-xxs);
|
|
21728
22026
|
}
|
|
21729
22027
|
`;
|
|
21730
|
-
var StatusDraft =
|
|
22028
|
+
var StatusDraft = css103`
|
|
21731
22029
|
&:before {
|
|
21732
22030
|
background: var(--white);
|
|
21733
22031
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
21734
22032
|
}
|
|
21735
22033
|
`;
|
|
21736
|
-
var StatusModified =
|
|
22034
|
+
var StatusModified = css103`
|
|
21737
22035
|
&:before {
|
|
21738
22036
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
21739
22037
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
21740
22038
|
}
|
|
21741
22039
|
`;
|
|
21742
|
-
var StatusError =
|
|
22040
|
+
var StatusError = css103`
|
|
21743
22041
|
color: var(--error);
|
|
21744
22042
|
&:before {
|
|
21745
22043
|
/* TODO: replace this with an svg icon */
|
|
@@ -21752,29 +22050,29 @@ var StatusError = css99`
|
|
|
21752
22050
|
);
|
|
21753
22051
|
}
|
|
21754
22052
|
`;
|
|
21755
|
-
var StatusPublished =
|
|
22053
|
+
var StatusPublished = css103`
|
|
21756
22054
|
&:before {
|
|
21757
22055
|
background: var(--accent-dark);
|
|
21758
22056
|
}
|
|
21759
22057
|
`;
|
|
21760
|
-
var StatusOrphan =
|
|
22058
|
+
var StatusOrphan = css103`
|
|
21761
22059
|
&:before {
|
|
21762
22060
|
background: var(--brand-secondary-5);
|
|
21763
22061
|
}
|
|
21764
22062
|
`;
|
|
21765
|
-
var StatusUnknown =
|
|
22063
|
+
var StatusUnknown = css103`
|
|
21766
22064
|
&:before {
|
|
21767
22065
|
background: var(--gray-800);
|
|
21768
22066
|
}
|
|
21769
22067
|
`;
|
|
21770
|
-
var StatusDeleted =
|
|
22068
|
+
var StatusDeleted = css103`
|
|
21771
22069
|
&:before {
|
|
21772
22070
|
background: var(--error);
|
|
21773
22071
|
}
|
|
21774
22072
|
`;
|
|
21775
22073
|
|
|
21776
22074
|
// src/components/Validation/StatusBullet.tsx
|
|
21777
|
-
import { jsx as
|
|
22075
|
+
import { jsx as jsx134 } from "@emotion/react/jsx-runtime";
|
|
21778
22076
|
var StatusBullet = ({
|
|
21779
22077
|
status,
|
|
21780
22078
|
hideText = false,
|
|
@@ -21794,7 +22092,7 @@ var StatusBullet = ({
|
|
|
21794
22092
|
Deleted: StatusDeleted
|
|
21795
22093
|
};
|
|
21796
22094
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
21797
|
-
return /* @__PURE__ */
|
|
22095
|
+
return /* @__PURE__ */ jsx134(
|
|
21798
22096
|
"span",
|
|
21799
22097
|
{
|
|
21800
22098
|
role: "status",
|
|
@@ -21894,6 +22192,13 @@ export {
|
|
|
21894
22192
|
Modal,
|
|
21895
22193
|
ModalDialog,
|
|
21896
22194
|
MultilineChip,
|
|
22195
|
+
ObjectGridContainer2 as ObjectGridContainer,
|
|
22196
|
+
ObjectGridItem2 as ObjectGridItem,
|
|
22197
|
+
ObjectGridItemCardCover,
|
|
22198
|
+
ObjectGridItemCover,
|
|
22199
|
+
ObjectGridItemCoverButton,
|
|
22200
|
+
ObjectGridItemHeading2 as ObjectGridItemHeading,
|
|
22201
|
+
ObjectGridItemIconWithTooltip,
|
|
21897
22202
|
PageHeaderSection,
|
|
21898
22203
|
Pagination,
|
|
21899
22204
|
Paragraph,
|