@uniformdev/design-system 19.159.1-alpha.9 → 19.161.2-alpha.1
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 +681 -382
- package/dist/index.d.mts +66 -1
- package/dist/index.d.ts +66 -1
- package/dist/index.js +719 -398
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1434,6 +1434,13 @@ __export(src_exports, {
|
|
|
1434
1434
|
Modal: () => Modal,
|
|
1435
1435
|
ModalDialog: () => ModalDialog,
|
|
1436
1436
|
MultilineChip: () => MultilineChip,
|
|
1437
|
+
ObjectGridContainer: () => ObjectGridContainer2,
|
|
1438
|
+
ObjectGridItem: () => ObjectGridItem2,
|
|
1439
|
+
ObjectGridItemCardCover: () => ObjectGridItemCardCover,
|
|
1440
|
+
ObjectGridItemCover: () => ObjectGridItemCover,
|
|
1441
|
+
ObjectGridItemCoverButton: () => ObjectGridItemCoverButton,
|
|
1442
|
+
ObjectGridItemHeading: () => ObjectGridItemHeading2,
|
|
1443
|
+
ObjectGridItemIconWithTooltip: () => ObjectGridItemIconWithTooltip,
|
|
1437
1444
|
PageHeaderSection: () => PageHeaderSection,
|
|
1438
1445
|
Pagination: () => Pagination,
|
|
1439
1446
|
Paragraph: () => Paragraph,
|
|
@@ -19961,6 +19968,305 @@ var ModalDialog = (0, import_react114.forwardRef)(
|
|
|
19961
19968
|
);
|
|
19962
19969
|
ModalDialog.displayName = "ModalDialog";
|
|
19963
19970
|
|
|
19971
|
+
// src/components/Objects/ObjectGridContainer.tsx
|
|
19972
|
+
init_emotion_jsx_shim();
|
|
19973
|
+
|
|
19974
|
+
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
19975
|
+
init_emotion_jsx_shim();
|
|
19976
|
+
var import_react115 = require("@emotion/react");
|
|
19977
|
+
var ObjectGridContainer = (gridCount) => import_react115.css`
|
|
19978
|
+
display: grid;
|
|
19979
|
+
grid-template-columns: repeat(${gridCount}, minmax(250px, 1fr));
|
|
19980
|
+
gap: var(--spacing-base);
|
|
19981
|
+
`;
|
|
19982
|
+
|
|
19983
|
+
// src/components/Objects/ObjectGridContainer.tsx
|
|
19984
|
+
var import_jsx_runtime101 = require("@emotion/react/jsx-runtime");
|
|
19985
|
+
var ObjectGridContainer2 = ({ gridCount = 3, children }) => {
|
|
19986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { "data-testid": "object-grid-container", css: ObjectGridContainer(gridCount), children });
|
|
19987
|
+
};
|
|
19988
|
+
|
|
19989
|
+
// src/components/Objects/ObjectGridItem.tsx
|
|
19990
|
+
init_emotion_jsx_shim();
|
|
19991
|
+
|
|
19992
|
+
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
19993
|
+
init_emotion_jsx_shim();
|
|
19994
|
+
var import_react116 = require("@emotion/react");
|
|
19995
|
+
var ObjectGridItem = import_react116.css`
|
|
19996
|
+
border: 1px solid var(--gray-300);
|
|
19997
|
+
border-radius: var(--rounded-base);
|
|
19998
|
+
background: var(--white);
|
|
19999
|
+
display: flex;
|
|
20000
|
+
flex-direction: column;
|
|
20001
|
+
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
20002
|
+
|
|
20003
|
+
&[aria-selected='true'] {
|
|
20004
|
+
border: 1px solid var(--accent-dark);
|
|
20005
|
+
}
|
|
20006
|
+
|
|
20007
|
+
&[aria-selected='false'] {
|
|
20008
|
+
&:hover {
|
|
20009
|
+
border: 1px solid var(--accent-dark);
|
|
20010
|
+
}
|
|
20011
|
+
}
|
|
20012
|
+
`;
|
|
20013
|
+
var ObjectGridItemMediaWrapper = import_react116.css`
|
|
20014
|
+
display: flex;
|
|
20015
|
+
flex: 1 1 0;
|
|
20016
|
+
position: relative;
|
|
20017
|
+
`;
|
|
20018
|
+
var ObjectGridItemContentWrapper = import_react116.css`
|
|
20019
|
+
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
20020
|
+
min-height: 52px;
|
|
20021
|
+
`;
|
|
20022
|
+
var ObjectGridItemImage = import_react116.css`
|
|
20023
|
+
object-fit: cover;
|
|
20024
|
+
width: 100%;
|
|
20025
|
+
height: auto;
|
|
20026
|
+
`;
|
|
20027
|
+
var MenuBtn = import_react116.css`
|
|
20028
|
+
border: none;
|
|
20029
|
+
background: transparent;
|
|
20030
|
+
padding: var(--spacing-xs);
|
|
20031
|
+
color: var(--gray-300);
|
|
20032
|
+
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
20033
|
+
|
|
20034
|
+
&:focus,
|
|
20035
|
+
&:hover {
|
|
20036
|
+
outline: none;
|
|
20037
|
+
color: var(--gray-500);
|
|
20038
|
+
}
|
|
20039
|
+
`;
|
|
20040
|
+
|
|
20041
|
+
// src/components/Objects/ObjectGridItem.tsx
|
|
20042
|
+
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
20043
|
+
var ObjectGridItem2 = ({
|
|
20044
|
+
header: header2,
|
|
20045
|
+
cover,
|
|
20046
|
+
rightSlot,
|
|
20047
|
+
menuItems,
|
|
20048
|
+
isSelected,
|
|
20049
|
+
children
|
|
20050
|
+
}) => {
|
|
20051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { css: ObjectGridItem, "aria-selected": isSelected, children: [
|
|
20052
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { css: ObjectGridItemMediaWrapper, children: cover }),
|
|
20053
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(HorizontalRhythm, { css: ObjectGridItemContentWrapper, justify: "space-between", gap: "sm", children: [
|
|
20054
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(VerticalRhythm, { gap: "0", children: [
|
|
20055
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
20056
|
+
children
|
|
20057
|
+
] }),
|
|
20058
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(HorizontalRhythm, { gap: "xs", align: "flex-start", children: [
|
|
20059
|
+
rightSlot,
|
|
20060
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
20061
|
+
Menu,
|
|
20062
|
+
{
|
|
20063
|
+
menuTrigger: (
|
|
20064
|
+
// TODO: once insights lands we should be able to replace this with MenuTrigger component
|
|
20065
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
20066
|
+
"button",
|
|
20067
|
+
{
|
|
20068
|
+
type: "button",
|
|
20069
|
+
"data-testid": "object-grid-item-menu-btn",
|
|
20070
|
+
title: "menu options",
|
|
20071
|
+
css: MenuBtn,
|
|
20072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Icon, { icon: "more-alt", size: "1rem", iconColor: "currentColor" })
|
|
20073
|
+
}
|
|
20074
|
+
)
|
|
20075
|
+
),
|
|
20076
|
+
placement: "bottom-end",
|
|
20077
|
+
children: menuItems
|
|
20078
|
+
}
|
|
20079
|
+
) : null
|
|
20080
|
+
] })
|
|
20081
|
+
] })
|
|
20082
|
+
] });
|
|
20083
|
+
};
|
|
20084
|
+
|
|
20085
|
+
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
20086
|
+
init_emotion_jsx_shim();
|
|
20087
|
+
|
|
20088
|
+
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
20089
|
+
init_emotion_jsx_shim();
|
|
20090
|
+
var import_react117 = require("@emotion/react");
|
|
20091
|
+
var CoverImage = import_react117.css`
|
|
20092
|
+
aspect-ratio: 16/9;
|
|
20093
|
+
max-width: 100%;
|
|
20094
|
+
max-height: 100%;
|
|
20095
|
+
height: auto;
|
|
20096
|
+
padding: var(--spacing-sm);
|
|
20097
|
+
`;
|
|
20098
|
+
var CoverIconWrapper = import_react117.css`
|
|
20099
|
+
position: relative;
|
|
20100
|
+
display: flex;
|
|
20101
|
+
align-items: center;
|
|
20102
|
+
justify-content: center;
|
|
20103
|
+
flex: 1;
|
|
20104
|
+
overflow: hidden;
|
|
20105
|
+
`;
|
|
20106
|
+
var CoverIconGhost = import_react117.css`
|
|
20107
|
+
position: absolute;
|
|
20108
|
+
width: 60%;
|
|
20109
|
+
height: auto;
|
|
20110
|
+
aspect-ratio: 1;
|
|
20111
|
+
opacity: 0.05;
|
|
20112
|
+
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
20113
|
+
`;
|
|
20114
|
+
var CoverSlot = import_react117.css`
|
|
20115
|
+
align-items: center;
|
|
20116
|
+
background: var(--white);
|
|
20117
|
+
display: flex;
|
|
20118
|
+
justify-content: center;
|
|
20119
|
+
position: absolute;
|
|
20120
|
+
top: var(--spacing-sm);
|
|
20121
|
+
z-index: 1;
|
|
20122
|
+
width: 24px;
|
|
20123
|
+
height: 24px;
|
|
20124
|
+
`;
|
|
20125
|
+
var CoverSlotLeft = import_react117.css`
|
|
20126
|
+
border-bottom-right-radius: var(--rounded-base);
|
|
20127
|
+
left: var(--spacing-sm);
|
|
20128
|
+
`;
|
|
20129
|
+
var CoverSlotRight = import_react117.css`
|
|
20130
|
+
border-bottom-left-radius: var(--rounded-base);
|
|
20131
|
+
right: var(--spacing-sm);
|
|
20132
|
+
`;
|
|
20133
|
+
var CoverButton = import_react117.css`
|
|
20134
|
+
align-items: stretch;
|
|
20135
|
+
border: none;
|
|
20136
|
+
background: none;
|
|
20137
|
+
display: flex;
|
|
20138
|
+
flex: 1 1 0;
|
|
20139
|
+
padding: 0;
|
|
20140
|
+
|
|
20141
|
+
&:focus,
|
|
20142
|
+
&:hover {
|
|
20143
|
+
outline: none;
|
|
20144
|
+
}
|
|
20145
|
+
`;
|
|
20146
|
+
var CoverSelectedChip = import_react117.css`
|
|
20147
|
+
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
20148
|
+
opacity: 0;
|
|
20149
|
+
position: absolute;
|
|
20150
|
+
bottom: var(--spacing-base);
|
|
20151
|
+
right: var(--spacing-base);
|
|
20152
|
+
`;
|
|
20153
|
+
|
|
20154
|
+
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
20155
|
+
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
20156
|
+
var ObjectGridItemCardCover = (props) => {
|
|
20157
|
+
if ("imageUrl" in props && props.imageUrl) {
|
|
20158
|
+
const { imageUrl } = props;
|
|
20159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
20160
|
+
"img",
|
|
20161
|
+
{
|
|
20162
|
+
src: imageUrl,
|
|
20163
|
+
css: CoverImage,
|
|
20164
|
+
loading: "lazy",
|
|
20165
|
+
role: "presentation",
|
|
20166
|
+
"data-testid": "object-grid-item-thumbnail"
|
|
20167
|
+
}
|
|
20168
|
+
);
|
|
20169
|
+
}
|
|
20170
|
+
if ("icon" in props && props.icon) {
|
|
20171
|
+
const { icon } = props;
|
|
20172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
20173
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { icon, iconColor: "currentColor", css: CoverIconGhost }),
|
|
20174
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { icon, iconColor: "currentColor", size: 48 })
|
|
20175
|
+
] });
|
|
20176
|
+
}
|
|
20177
|
+
};
|
|
20178
|
+
var ObjectGridItemCover = ({
|
|
20179
|
+
coverSlotLeft,
|
|
20180
|
+
coverSlotRight,
|
|
20181
|
+
...props
|
|
20182
|
+
}) => {
|
|
20183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_jsx_runtime103.Fragment, { children: [
|
|
20184
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20185
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20186
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null
|
|
20187
|
+
] });
|
|
20188
|
+
};
|
|
20189
|
+
var ObjectGridItemCoverButton = ({
|
|
20190
|
+
id,
|
|
20191
|
+
isSelected,
|
|
20192
|
+
onSelection,
|
|
20193
|
+
coverSlotLeft,
|
|
20194
|
+
coverSlotRight,
|
|
20195
|
+
selectedText = "selected",
|
|
20196
|
+
...props
|
|
20197
|
+
}) => {
|
|
20198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("button", { type: "button", css: CoverButton, onClick: () => onSelection(id), "aria-selected": isSelected, children: [
|
|
20199
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20200
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20201
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
20202
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
20203
|
+
] });
|
|
20204
|
+
};
|
|
20205
|
+
|
|
20206
|
+
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20207
|
+
init_emotion_jsx_shim();
|
|
20208
|
+
var import_react119 = require("react");
|
|
20209
|
+
|
|
20210
|
+
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
20211
|
+
init_emotion_jsx_shim();
|
|
20212
|
+
var import_react118 = require("@emotion/react");
|
|
20213
|
+
var ObjectGridItemHeading = import_react118.css`
|
|
20214
|
+
overflow: hidden;
|
|
20215
|
+
text-overflow: ellipsis;
|
|
20216
|
+
white-space: initial;
|
|
20217
|
+
display: -webkit-box;
|
|
20218
|
+
-webkit-line-clamp: 1;
|
|
20219
|
+
-webkit-box-orient: vertical;
|
|
20220
|
+
`;
|
|
20221
|
+
var PopoverContent = import_react118.css`
|
|
20222
|
+
min-width: 50px;
|
|
20223
|
+
`;
|
|
20224
|
+
|
|
20225
|
+
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20226
|
+
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
20227
|
+
var ObjectGridItemHeading2 = ({
|
|
20228
|
+
heading,
|
|
20229
|
+
beforeHeadingSlot,
|
|
20230
|
+
afterHeadingSlot
|
|
20231
|
+
}) => {
|
|
20232
|
+
const [hasTruncation, setHasTruncation] = (0, import_react119.useState)(false);
|
|
20233
|
+
const headingRef = (0, import_react119.useRef)(null);
|
|
20234
|
+
(0, import_react119.useEffect)(() => {
|
|
20235
|
+
const currentHeading = headingRef.current;
|
|
20236
|
+
const observer = new ResizeObserver((entries) => {
|
|
20237
|
+
for (const entry of entries) {
|
|
20238
|
+
const isHeadingTruncated = entry.target.scrollHeight > entry.target.clientHeight;
|
|
20239
|
+
setHasTruncation(isHeadingTruncated);
|
|
20240
|
+
}
|
|
20241
|
+
});
|
|
20242
|
+
if (currentHeading) {
|
|
20243
|
+
observer.observe(currentHeading);
|
|
20244
|
+
}
|
|
20245
|
+
return () => {
|
|
20246
|
+
if (currentHeading) {
|
|
20247
|
+
observer.unobserve(currentHeading);
|
|
20248
|
+
}
|
|
20249
|
+
};
|
|
20250
|
+
}, []);
|
|
20251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
20252
|
+
beforeHeadingSlot,
|
|
20253
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Tooltip, { title: hasTruncation ? heading : "", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, children: heading }) }),
|
|
20254
|
+
afterHeadingSlot
|
|
20255
|
+
] });
|
|
20256
|
+
};
|
|
20257
|
+
|
|
20258
|
+
// src/components/Objects/ObjectGridItemIconWithTooltip.tsx
|
|
20259
|
+
init_emotion_jsx_shim();
|
|
20260
|
+
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
20261
|
+
var ObjectGridItemIconWithTooltip = ({
|
|
20262
|
+
tooltipTitle,
|
|
20263
|
+
placement = "bottom-start",
|
|
20264
|
+
icon,
|
|
20265
|
+
iconColor = "accent-dark"
|
|
20266
|
+
}) => {
|
|
20267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
20268
|
+
};
|
|
20269
|
+
|
|
19964
20270
|
// src/components/Pagination/Pagination.tsx
|
|
19965
20271
|
init_emotion_jsx_shim();
|
|
19966
20272
|
var import_react_paginate = __toESM(require("react-paginate"));
|
|
@@ -19995,7 +20301,7 @@ var page = import_css.css`
|
|
|
19995
20301
|
`;
|
|
19996
20302
|
|
|
19997
20303
|
// src/components/Pagination/Pagination.tsx
|
|
19998
|
-
var
|
|
20304
|
+
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
19999
20305
|
function Pagination({
|
|
20000
20306
|
limit,
|
|
20001
20307
|
offset,
|
|
@@ -20010,12 +20316,12 @@ function Pagination({
|
|
|
20010
20316
|
if (pageCount <= 1) {
|
|
20011
20317
|
return null;
|
|
20012
20318
|
}
|
|
20013
|
-
return /* @__PURE__ */ (0,
|
|
20319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20014
20320
|
import_react_paginate.default,
|
|
20015
20321
|
{
|
|
20016
20322
|
forcePage: currentPage,
|
|
20017
|
-
previousLabel: /* @__PURE__ */ (0,
|
|
20018
|
-
nextLabel: /* @__PURE__ */ (0,
|
|
20323
|
+
previousLabel: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: prevNextControls, children: "<" }),
|
|
20324
|
+
nextLabel: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: prevNextControls, children: ">" }),
|
|
20019
20325
|
breakLabel: "...",
|
|
20020
20326
|
pageCount,
|
|
20021
20327
|
marginPagesDisplayed: 2,
|
|
@@ -20035,8 +20341,8 @@ function Pagination({
|
|
|
20035
20341
|
|
|
20036
20342
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
20037
20343
|
init_emotion_jsx_shim();
|
|
20038
|
-
var
|
|
20039
|
-
var ParameterShellContext = (0,
|
|
20344
|
+
var import_react120 = require("react");
|
|
20345
|
+
var ParameterShellContext = (0, import_react120.createContext)({
|
|
20040
20346
|
id: "",
|
|
20041
20347
|
label: "",
|
|
20042
20348
|
hiddenLabel: void 0,
|
|
@@ -20045,7 +20351,7 @@ var ParameterShellContext = (0, import_react115.createContext)({
|
|
|
20045
20351
|
}
|
|
20046
20352
|
});
|
|
20047
20353
|
var useParameterShell = () => {
|
|
20048
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
20354
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react120.useContext)(ParameterShellContext);
|
|
20049
20355
|
return {
|
|
20050
20356
|
id,
|
|
20051
20357
|
label,
|
|
@@ -20060,8 +20366,8 @@ init_emotion_jsx_shim();
|
|
|
20060
20366
|
|
|
20061
20367
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
20062
20368
|
init_emotion_jsx_shim();
|
|
20063
|
-
var
|
|
20064
|
-
var inputIconBtn =
|
|
20369
|
+
var import_react121 = require("@emotion/react");
|
|
20370
|
+
var inputIconBtn = import_react121.css`
|
|
20065
20371
|
align-items: center;
|
|
20066
20372
|
border: none;
|
|
20067
20373
|
border-radius: var(--rounded-base);
|
|
@@ -20087,7 +20393,7 @@ var inputIconBtn = import_react116.css`
|
|
|
20087
20393
|
`;
|
|
20088
20394
|
|
|
20089
20395
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
20090
|
-
var
|
|
20396
|
+
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
20091
20397
|
var LabelLeadingIcon = ({
|
|
20092
20398
|
icon,
|
|
20093
20399
|
iconColor,
|
|
@@ -20099,7 +20405,7 @@ var LabelLeadingIcon = ({
|
|
|
20099
20405
|
...props
|
|
20100
20406
|
}) => {
|
|
20101
20407
|
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
20102
|
-
return /* @__PURE__ */ (0,
|
|
20408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { title: titleFr, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
20103
20409
|
"button",
|
|
20104
20410
|
{
|
|
20105
20411
|
css: inputIconBtn,
|
|
@@ -20109,7 +20415,7 @@ var LabelLeadingIcon = ({
|
|
|
20109
20415
|
...props,
|
|
20110
20416
|
"data-testid": "lock-button",
|
|
20111
20417
|
children: [
|
|
20112
|
-
/* @__PURE__ */ (0,
|
|
20418
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
20113
20419
|
Icon,
|
|
20114
20420
|
{
|
|
20115
20421
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -20129,8 +20435,8 @@ init_emotion_jsx_shim();
|
|
|
20129
20435
|
|
|
20130
20436
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
20131
20437
|
init_emotion_jsx_shim();
|
|
20132
|
-
var
|
|
20133
|
-
var inputContainer2 =
|
|
20438
|
+
var import_react122 = require("@emotion/react");
|
|
20439
|
+
var inputContainer2 = import_react122.css`
|
|
20134
20440
|
position: relative;
|
|
20135
20441
|
scroll-margin: var(--spacing-2xl);
|
|
20136
20442
|
|
|
@@ -20143,14 +20449,14 @@ var inputContainer2 = import_react117.css`
|
|
|
20143
20449
|
}
|
|
20144
20450
|
}
|
|
20145
20451
|
`;
|
|
20146
|
-
var labelText2 =
|
|
20452
|
+
var labelText2 = import_react122.css`
|
|
20147
20453
|
align-items: center;
|
|
20148
20454
|
display: flex;
|
|
20149
20455
|
gap: var(--spacing-xs);
|
|
20150
20456
|
font-weight: var(--fw-regular);
|
|
20151
20457
|
margin: 0 0 var(--spacing-xs);
|
|
20152
20458
|
`;
|
|
20153
|
-
var input3 =
|
|
20459
|
+
var input3 = import_react122.css`
|
|
20154
20460
|
display: block;
|
|
20155
20461
|
appearance: none;
|
|
20156
20462
|
box-sizing: border-box;
|
|
@@ -20198,18 +20504,18 @@ var input3 = import_react117.css`
|
|
|
20198
20504
|
color: var(--gray-400);
|
|
20199
20505
|
}
|
|
20200
20506
|
`;
|
|
20201
|
-
var selectInput =
|
|
20507
|
+
var selectInput = import_react122.css`
|
|
20202
20508
|
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");
|
|
20203
20509
|
background-position: right var(--spacing-sm) center;
|
|
20204
20510
|
background-repeat: no-repeat;
|
|
20205
20511
|
background-size: 1rem;
|
|
20206
20512
|
padding-right: var(--spacing-xl);
|
|
20207
20513
|
`;
|
|
20208
|
-
var inputWrapper =
|
|
20514
|
+
var inputWrapper = import_react122.css`
|
|
20209
20515
|
display: flex; // used to correct overflow with chrome textarea
|
|
20210
20516
|
position: relative;
|
|
20211
20517
|
`;
|
|
20212
|
-
var inputIcon2 =
|
|
20518
|
+
var inputIcon2 = import_react122.css`
|
|
20213
20519
|
align-items: center;
|
|
20214
20520
|
background: var(--white);
|
|
20215
20521
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -20225,7 +20531,7 @@ var inputIcon2 = import_react117.css`
|
|
|
20225
20531
|
width: var(--spacing-lg);
|
|
20226
20532
|
z-index: var(--z-10);
|
|
20227
20533
|
`;
|
|
20228
|
-
var inputToggleLabel2 =
|
|
20534
|
+
var inputToggleLabel2 = import_react122.css`
|
|
20229
20535
|
--inline-label-color: var(--typography-base);
|
|
20230
20536
|
align-items: center;
|
|
20231
20537
|
cursor: pointer;
|
|
@@ -20240,7 +20546,7 @@ var inputToggleLabel2 = import_react117.css`
|
|
|
20240
20546
|
--inline-label-color: var(--gray-400);
|
|
20241
20547
|
}
|
|
20242
20548
|
`;
|
|
20243
|
-
var toggleInput2 =
|
|
20549
|
+
var toggleInput2 = import_react122.css`
|
|
20244
20550
|
appearance: none;
|
|
20245
20551
|
border: 1px solid var(--gray-200);
|
|
20246
20552
|
background: var(--white);
|
|
@@ -20293,7 +20599,7 @@ var toggleInput2 = import_react117.css`
|
|
|
20293
20599
|
border-color: var(--gray-300);
|
|
20294
20600
|
}
|
|
20295
20601
|
`;
|
|
20296
|
-
var inlineLabel2 =
|
|
20602
|
+
var inlineLabel2 = import_react122.css`
|
|
20297
20603
|
color: var(--inline-label-color);
|
|
20298
20604
|
padding-left: var(--spacing-md);
|
|
20299
20605
|
font-size: var(--fs-sm);
|
|
@@ -20310,7 +20616,7 @@ var inlineLabel2 = import_react117.css`
|
|
|
20310
20616
|
}
|
|
20311
20617
|
}
|
|
20312
20618
|
`;
|
|
20313
|
-
var inputMenu =
|
|
20619
|
+
var inputMenu = import_react122.css`
|
|
20314
20620
|
background: none;
|
|
20315
20621
|
border: none;
|
|
20316
20622
|
padding: var(--spacing-2xs);
|
|
@@ -20318,10 +20624,10 @@ var inputMenu = import_react117.css`
|
|
|
20318
20624
|
top: calc(var(--spacing-md) * -1.2);
|
|
20319
20625
|
right: 0;
|
|
20320
20626
|
`;
|
|
20321
|
-
var inputActionItems =
|
|
20627
|
+
var inputActionItems = import_react122.css`
|
|
20322
20628
|
display: flex;
|
|
20323
20629
|
`;
|
|
20324
|
-
var inputMenuHover =
|
|
20630
|
+
var inputMenuHover = import_react122.css`
|
|
20325
20631
|
opacity: var(--opacity-50);
|
|
20326
20632
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
20327
20633
|
|
|
@@ -20331,11 +20637,11 @@ var inputMenuHover = import_react117.css`
|
|
|
20331
20637
|
background-color: var(--gray-200);
|
|
20332
20638
|
}
|
|
20333
20639
|
`;
|
|
20334
|
-
var textarea2 =
|
|
20640
|
+
var textarea2 = import_react122.css`
|
|
20335
20641
|
resize: vertical;
|
|
20336
20642
|
min-height: 2rem;
|
|
20337
20643
|
`;
|
|
20338
|
-
var dataConnectButton =
|
|
20644
|
+
var dataConnectButton = import_react122.css`
|
|
20339
20645
|
align-items: center;
|
|
20340
20646
|
appearance: none;
|
|
20341
20647
|
box-sizing: border-box;
|
|
@@ -20370,7 +20676,7 @@ var dataConnectButton = import_react117.css`
|
|
|
20370
20676
|
pointer-events: none;
|
|
20371
20677
|
}
|
|
20372
20678
|
`;
|
|
20373
|
-
var linkParameterBtn =
|
|
20679
|
+
var linkParameterBtn = import_react122.css`
|
|
20374
20680
|
border-radius: var(--rounded-base);
|
|
20375
20681
|
background: transparent;
|
|
20376
20682
|
border: none;
|
|
@@ -20379,7 +20685,7 @@ var linkParameterBtn = import_react117.css`
|
|
|
20379
20685
|
font-size: var(--fs-sm);
|
|
20380
20686
|
line-height: 1;
|
|
20381
20687
|
`;
|
|
20382
|
-
var linkParameterControls =
|
|
20688
|
+
var linkParameterControls = import_react122.css`
|
|
20383
20689
|
position: absolute;
|
|
20384
20690
|
inset: 0 0 0 auto;
|
|
20385
20691
|
padding: 0 var(--spacing-base);
|
|
@@ -20388,7 +20694,7 @@ var linkParameterControls = import_react117.css`
|
|
|
20388
20694
|
justify-content: center;
|
|
20389
20695
|
gap: var(--spacing-base);
|
|
20390
20696
|
`;
|
|
20391
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
20697
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react122.css`
|
|
20392
20698
|
padding-right: calc(
|
|
20393
20699
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
20394
20700
|
var(--spacing-base)
|
|
@@ -20401,7 +20707,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react117.css`
|
|
|
20401
20707
|
}
|
|
20402
20708
|
}
|
|
20403
20709
|
`;
|
|
20404
|
-
var linkParameterIcon =
|
|
20710
|
+
var linkParameterIcon = import_react122.css`
|
|
20405
20711
|
align-items: center;
|
|
20406
20712
|
color: var(--brand-secondary-3);
|
|
20407
20713
|
display: flex;
|
|
@@ -20416,7 +20722,7 @@ var linkParameterIcon = import_react117.css`
|
|
|
20416
20722
|
`;
|
|
20417
20723
|
|
|
20418
20724
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
20419
|
-
var
|
|
20725
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
20420
20726
|
function ParameterDataResource({
|
|
20421
20727
|
label,
|
|
20422
20728
|
labelLeadingIcon,
|
|
@@ -20426,12 +20732,12 @@ function ParameterDataResource({
|
|
|
20426
20732
|
disabled: disabled2,
|
|
20427
20733
|
children
|
|
20428
20734
|
}) {
|
|
20429
|
-
return /* @__PURE__ */ (0,
|
|
20430
|
-
/* @__PURE__ */ (0,
|
|
20735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
20736
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { css: labelText2, children: [
|
|
20431
20737
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
20432
20738
|
label
|
|
20433
20739
|
] }),
|
|
20434
|
-
/* @__PURE__ */ (0,
|
|
20740
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
20435
20741
|
"button",
|
|
20436
20742
|
{
|
|
20437
20743
|
type: "button",
|
|
@@ -20440,12 +20746,12 @@ function ParameterDataResource({
|
|
|
20440
20746
|
disabled: disabled2,
|
|
20441
20747
|
onClick: onConnectDatasource,
|
|
20442
20748
|
children: [
|
|
20443
|
-
/* @__PURE__ */ (0,
|
|
20749
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
20444
20750
|
children
|
|
20445
20751
|
]
|
|
20446
20752
|
}
|
|
20447
20753
|
),
|
|
20448
|
-
caption ? /* @__PURE__ */ (0,
|
|
20754
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Caption, { children: caption }) : null
|
|
20449
20755
|
] });
|
|
20450
20756
|
}
|
|
20451
20757
|
|
|
@@ -20454,20 +20760,20 @@ init_emotion_jsx_shim();
|
|
|
20454
20760
|
|
|
20455
20761
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
20456
20762
|
init_emotion_jsx_shim();
|
|
20457
|
-
var
|
|
20458
|
-
var ParameterDrawerHeaderContainer =
|
|
20763
|
+
var import_react123 = require("@emotion/react");
|
|
20764
|
+
var ParameterDrawerHeaderContainer = import_react123.css`
|
|
20459
20765
|
align-items: center;
|
|
20460
20766
|
display: flex;
|
|
20461
20767
|
gap: var(--spacing-base);
|
|
20462
20768
|
justify-content: space-between;
|
|
20463
20769
|
margin-bottom: var(--spacing-sm);
|
|
20464
20770
|
`;
|
|
20465
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
20771
|
+
var ParameterDrawerHeaderTitleGroup = import_react123.css`
|
|
20466
20772
|
align-items: center;
|
|
20467
20773
|
display: flex;
|
|
20468
20774
|
gap: var(--spacing-sm);
|
|
20469
20775
|
`;
|
|
20470
|
-
var ParameterDrawerHeaderTitle =
|
|
20776
|
+
var ParameterDrawerHeaderTitle = import_react123.css`
|
|
20471
20777
|
text-overflow: ellipsis;
|
|
20472
20778
|
white-space: nowrap;
|
|
20473
20779
|
overflow: hidden;
|
|
@@ -20475,12 +20781,12 @@ var ParameterDrawerHeaderTitle = import_react118.css`
|
|
|
20475
20781
|
`;
|
|
20476
20782
|
|
|
20477
20783
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
20478
|
-
var
|
|
20784
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20479
20785
|
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
20480
|
-
return /* @__PURE__ */ (0,
|
|
20481
|
-
/* @__PURE__ */ (0,
|
|
20786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
20787
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
20482
20788
|
iconBeforeTitle,
|
|
20483
|
-
/* @__PURE__ */ (0,
|
|
20789
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
20484
20790
|
] }),
|
|
20485
20791
|
children
|
|
20486
20792
|
] });
|
|
@@ -20488,12 +20794,12 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
20488
20794
|
|
|
20489
20795
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
20490
20796
|
init_emotion_jsx_shim();
|
|
20491
|
-
var
|
|
20797
|
+
var import_react125 = require("react");
|
|
20492
20798
|
|
|
20493
20799
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
20494
20800
|
init_emotion_jsx_shim();
|
|
20495
|
-
var
|
|
20496
|
-
var fieldsetStyles =
|
|
20801
|
+
var import_react124 = require("@emotion/react");
|
|
20802
|
+
var fieldsetStyles = import_react124.css`
|
|
20497
20803
|
&:disabled,
|
|
20498
20804
|
[readonly] {
|
|
20499
20805
|
pointer-events: none;
|
|
@@ -20504,7 +20810,7 @@ var fieldsetStyles = import_react119.css`
|
|
|
20504
20810
|
}
|
|
20505
20811
|
}
|
|
20506
20812
|
`;
|
|
20507
|
-
var fieldsetLegend2 =
|
|
20813
|
+
var fieldsetLegend2 = import_react124.css`
|
|
20508
20814
|
display: block;
|
|
20509
20815
|
font-weight: var(--fw-medium);
|
|
20510
20816
|
margin-bottom: var(--spacing-sm);
|
|
@@ -20512,11 +20818,11 @@ var fieldsetLegend2 = import_react119.css`
|
|
|
20512
20818
|
`;
|
|
20513
20819
|
|
|
20514
20820
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
20515
|
-
var
|
|
20516
|
-
var ParameterGroup = (0,
|
|
20821
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
20822
|
+
var ParameterGroup = (0, import_react125.forwardRef)(
|
|
20517
20823
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
20518
|
-
return /* @__PURE__ */ (0,
|
|
20519
|
-
/* @__PURE__ */ (0,
|
|
20824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
20825
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
20520
20826
|
children
|
|
20521
20827
|
] });
|
|
20522
20828
|
}
|
|
@@ -20524,24 +20830,24 @@ var ParameterGroup = (0, import_react120.forwardRef)(
|
|
|
20524
20830
|
|
|
20525
20831
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
20526
20832
|
init_emotion_jsx_shim();
|
|
20527
|
-
var
|
|
20833
|
+
var import_react132 = require("react");
|
|
20528
20834
|
|
|
20529
20835
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20530
20836
|
init_emotion_jsx_shim();
|
|
20531
|
-
var
|
|
20837
|
+
var import_react127 = require("react");
|
|
20532
20838
|
var import_react_dom2 = require("react-dom");
|
|
20533
20839
|
|
|
20534
20840
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
20535
20841
|
init_emotion_jsx_shim();
|
|
20536
|
-
var
|
|
20537
|
-
var previewWrapper =
|
|
20842
|
+
var import_react126 = require("@emotion/react");
|
|
20843
|
+
var previewWrapper = import_react126.css`
|
|
20538
20844
|
margin-top: var(--spacing-xs);
|
|
20539
20845
|
background: var(--gray-50);
|
|
20540
20846
|
padding: var(--spacing-sm);
|
|
20541
20847
|
border: solid 1px var(--gray-300);
|
|
20542
20848
|
border-radius: var(--rounded-sm);
|
|
20543
20849
|
`;
|
|
20544
|
-
var previewLink =
|
|
20850
|
+
var previewLink = import_react126.css`
|
|
20545
20851
|
display: block;
|
|
20546
20852
|
width: 100%;
|
|
20547
20853
|
|
|
@@ -20549,7 +20855,7 @@ var previewLink = import_react121.css`
|
|
|
20549
20855
|
max-height: 9rem;
|
|
20550
20856
|
}
|
|
20551
20857
|
`;
|
|
20552
|
-
var previewModalWrapper =
|
|
20858
|
+
var previewModalWrapper = import_react126.css`
|
|
20553
20859
|
background: var(--gray-50);
|
|
20554
20860
|
display: flex;
|
|
20555
20861
|
height: 100%;
|
|
@@ -20558,7 +20864,7 @@ var previewModalWrapper = import_react121.css`
|
|
|
20558
20864
|
border: solid 1px var(--gray-300);
|
|
20559
20865
|
border-radius: var(--rounded-sm);
|
|
20560
20866
|
`;
|
|
20561
|
-
var previewModalImage =
|
|
20867
|
+
var previewModalImage = import_react126.css`
|
|
20562
20868
|
display: flex;
|
|
20563
20869
|
height: 100%;
|
|
20564
20870
|
width: 100%;
|
|
@@ -20570,32 +20876,32 @@ var previewModalImage = import_react121.css`
|
|
|
20570
20876
|
`;
|
|
20571
20877
|
|
|
20572
20878
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20573
|
-
var
|
|
20879
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
20574
20880
|
function ParameterImagePreview({ imageSrc }) {
|
|
20575
|
-
const [showModal, setShowModal] = (0,
|
|
20576
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
20577
|
-
/* @__PURE__ */ (0,
|
|
20578
|
-
/* @__PURE__ */ (0,
|
|
20881
|
+
const [showModal, setShowModal] = (0, import_react127.useState)(false);
|
|
20882
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { css: previewWrapper, children: [
|
|
20883
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
20884
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
20579
20885
|
"button",
|
|
20580
20886
|
{
|
|
20581
20887
|
css: previewLink,
|
|
20582
20888
|
onClick: () => {
|
|
20583
20889
|
setShowModal(true);
|
|
20584
20890
|
},
|
|
20585
|
-
children: /* @__PURE__ */ (0,
|
|
20891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
20586
20892
|
}
|
|
20587
20893
|
)
|
|
20588
20894
|
] }) : null;
|
|
20589
20895
|
}
|
|
20590
20896
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
20591
|
-
return open ? /* @__PURE__ */ (0,
|
|
20592
|
-
/* @__PURE__ */ (0,
|
|
20897
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_jsx_runtime111.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
20898
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
20593
20899
|
Modal,
|
|
20594
20900
|
{
|
|
20595
20901
|
header: "Image Preview",
|
|
20596
20902
|
onRequestClose,
|
|
20597
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
20598
|
-
children: /* @__PURE__ */ (0,
|
|
20903
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
20904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
20599
20905
|
}
|
|
20600
20906
|
),
|
|
20601
20907
|
document.body
|
|
@@ -20604,27 +20910,27 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
20604
20910
|
|
|
20605
20911
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
20606
20912
|
init_emotion_jsx_shim();
|
|
20607
|
-
var
|
|
20608
|
-
var
|
|
20913
|
+
var import_react130 = require("@emotion/react");
|
|
20914
|
+
var import_react131 = require("react");
|
|
20609
20915
|
|
|
20610
20916
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
20611
20917
|
init_emotion_jsx_shim();
|
|
20612
|
-
var
|
|
20918
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
20613
20919
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
20614
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
20920
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
20615
20921
|
};
|
|
20616
20922
|
|
|
20617
20923
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
20618
20924
|
init_emotion_jsx_shim();
|
|
20619
|
-
var
|
|
20620
|
-
var
|
|
20621
|
-
var ParameterMenuButton = (0,
|
|
20925
|
+
var import_react128 = require("react");
|
|
20926
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
20927
|
+
var ParameterMenuButton = (0, import_react128.forwardRef)(
|
|
20622
20928
|
({ label, children }, ref) => {
|
|
20623
|
-
return /* @__PURE__ */ (0,
|
|
20929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
20624
20930
|
Menu,
|
|
20625
20931
|
{
|
|
20626
20932
|
menuLabel: `${label} menu`,
|
|
20627
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
20933
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
20628
20934
|
"button",
|
|
20629
20935
|
{
|
|
20630
20936
|
className: "parameter-menu",
|
|
@@ -20632,7 +20938,7 @@ var ParameterMenuButton = (0, import_react123.forwardRef)(
|
|
|
20632
20938
|
type: "button",
|
|
20633
20939
|
"aria-label": `${label} options`,
|
|
20634
20940
|
ref,
|
|
20635
|
-
children: /* @__PURE__ */ (0,
|
|
20941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
20636
20942
|
}
|
|
20637
20943
|
),
|
|
20638
20944
|
children
|
|
@@ -20643,14 +20949,14 @@ var ParameterMenuButton = (0, import_react123.forwardRef)(
|
|
|
20643
20949
|
|
|
20644
20950
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
20645
20951
|
init_emotion_jsx_shim();
|
|
20646
|
-
var
|
|
20647
|
-
var emptyParameterShell =
|
|
20952
|
+
var import_react129 = require("@emotion/react");
|
|
20953
|
+
var emptyParameterShell = import_react129.css`
|
|
20648
20954
|
border-radius: var(--rounded-sm);
|
|
20649
20955
|
flex-grow: 1;
|
|
20650
20956
|
position: relative;
|
|
20651
20957
|
max-width: 100%;
|
|
20652
20958
|
`;
|
|
20653
|
-
var emptyParameterShellText =
|
|
20959
|
+
var emptyParameterShellText = import_react129.css`
|
|
20654
20960
|
background: var(--brand-secondary-6);
|
|
20655
20961
|
border-radius: var(--rounded-sm);
|
|
20656
20962
|
padding: var(--spacing-sm);
|
|
@@ -20658,7 +20964,7 @@ var emptyParameterShellText = import_react124.css`
|
|
|
20658
20964
|
font-size: var(--fs-sm);
|
|
20659
20965
|
margin: 0;
|
|
20660
20966
|
`;
|
|
20661
|
-
var overrideMarker =
|
|
20967
|
+
var overrideMarker = import_react129.css`
|
|
20662
20968
|
border-radius: var(--rounded-sm);
|
|
20663
20969
|
border: 10px solid var(--gray-300);
|
|
20664
20970
|
border-left-color: transparent;
|
|
@@ -20669,7 +20975,7 @@ var overrideMarker = import_react124.css`
|
|
|
20669
20975
|
`;
|
|
20670
20976
|
|
|
20671
20977
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
20672
|
-
var
|
|
20978
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
20673
20979
|
var extractParameterProps = (props) => {
|
|
20674
20980
|
const {
|
|
20675
20981
|
id,
|
|
@@ -20729,36 +21035,36 @@ var ParameterShell = ({
|
|
|
20729
21035
|
isParameterGroup = false,
|
|
20730
21036
|
...props
|
|
20731
21037
|
}) => {
|
|
20732
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
21038
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react131.useState)(void 0);
|
|
20733
21039
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
20734
21040
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
20735
|
-
return /* @__PURE__ */ (0,
|
|
20736
|
-
hiddenLabel || title2 ? null : /* @__PURE__ */ (0,
|
|
21041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
21042
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
20737
21043
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
20738
21044
|
label,
|
|
20739
21045
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
20740
21046
|
] }),
|
|
20741
|
-
!title2 ? null : /* @__PURE__ */ (0,
|
|
21047
|
+
!title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
20742
21048
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
20743
21049
|
title2,
|
|
20744
21050
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
20745
21051
|
] }),
|
|
20746
|
-
/* @__PURE__ */ (0,
|
|
20747
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
21052
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { css: inputWrapper, children: [
|
|
21053
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20748
21054
|
"div",
|
|
20749
21055
|
{
|
|
20750
21056
|
css: [
|
|
20751
21057
|
inputMenu,
|
|
20752
21058
|
inputActionItems,
|
|
20753
|
-
menuItems ?
|
|
21059
|
+
menuItems ? import_react130.css`
|
|
20754
21060
|
right: var(--spacing-md);
|
|
20755
21061
|
` : void 0
|
|
20756
21062
|
],
|
|
20757
21063
|
children: actionItems
|
|
20758
21064
|
}
|
|
20759
21065
|
) : null,
|
|
20760
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
20761
|
-
/* @__PURE__ */ (0,
|
|
21066
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
21067
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20762
21068
|
ParameterShellContext.Provider,
|
|
20763
21069
|
{
|
|
20764
21070
|
value: {
|
|
@@ -20768,14 +21074,14 @@ var ParameterShell = ({
|
|
|
20768
21074
|
errorMessage: errorMessaging,
|
|
20769
21075
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
20770
21076
|
},
|
|
20771
|
-
children: isParameterGroup ? /* @__PURE__ */ (0,
|
|
21077
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(ParameterShellPlaceholder, { children: [
|
|
20772
21078
|
children,
|
|
20773
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
21079
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
20774
21080
|
] })
|
|
20775
21081
|
}
|
|
20776
21082
|
)
|
|
20777
21083
|
] }),
|
|
20778
|
-
/* @__PURE__ */ (0,
|
|
21084
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20779
21085
|
FieldMessage,
|
|
20780
21086
|
{
|
|
20781
21087
|
helperMessageTestId: captionTestId,
|
|
@@ -20789,27 +21095,27 @@ var ParameterShell = ({
|
|
|
20789
21095
|
] });
|
|
20790
21096
|
};
|
|
20791
21097
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
20792
|
-
return /* @__PURE__ */ (0,
|
|
21098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { css: emptyParameterShell, children });
|
|
20793
21099
|
};
|
|
20794
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
21100
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
20795
21101
|
|
|
20796
21102
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
20797
|
-
var
|
|
20798
|
-
var ParameterImage = (0,
|
|
21103
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
21104
|
+
var ParameterImage = (0, import_react132.forwardRef)(
|
|
20799
21105
|
({ children, ...props }, ref) => {
|
|
20800
21106
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20801
|
-
return /* @__PURE__ */ (0,
|
|
20802
|
-
/* @__PURE__ */ (0,
|
|
21107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
21108
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
20803
21109
|
children
|
|
20804
21110
|
] });
|
|
20805
21111
|
}
|
|
20806
21112
|
);
|
|
20807
|
-
var ParameterImageInner = (0,
|
|
21113
|
+
var ParameterImageInner = (0, import_react132.forwardRef)((props, ref) => {
|
|
20808
21114
|
const { value } = props;
|
|
20809
21115
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
20810
|
-
const deferredValue = (0,
|
|
20811
|
-
return /* @__PURE__ */ (0,
|
|
20812
|
-
/* @__PURE__ */ (0,
|
|
21116
|
+
const deferredValue = (0, import_react132.useDeferredValue)(value);
|
|
21117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
|
|
21118
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20813
21119
|
"input",
|
|
20814
21120
|
{
|
|
20815
21121
|
css: input3,
|
|
@@ -20821,22 +21127,22 @@ var ParameterImageInner = (0, import_react127.forwardRef)((props, ref) => {
|
|
|
20821
21127
|
...props
|
|
20822
21128
|
}
|
|
20823
21129
|
),
|
|
20824
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
21130
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
20825
21131
|
] });
|
|
20826
21132
|
});
|
|
20827
21133
|
|
|
20828
21134
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
20829
21135
|
init_emotion_jsx_shim();
|
|
20830
|
-
var
|
|
20831
|
-
var
|
|
20832
|
-
var ParameterInput = (0,
|
|
21136
|
+
var import_react133 = require("react");
|
|
21137
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
21138
|
+
var ParameterInput = (0, import_react133.forwardRef)((props, ref) => {
|
|
20833
21139
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20834
|
-
return /* @__PURE__ */ (0,
|
|
21140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
20835
21141
|
});
|
|
20836
|
-
var ParameterInputInner = (0,
|
|
21142
|
+
var ParameterInputInner = (0, import_react133.forwardRef)(
|
|
20837
21143
|
({ ...props }, ref) => {
|
|
20838
21144
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20839
|
-
return /* @__PURE__ */ (0,
|
|
21145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
20840
21146
|
"input",
|
|
20841
21147
|
{
|
|
20842
21148
|
css: input3,
|
|
@@ -20853,19 +21159,19 @@ var ParameterInputInner = (0, import_react128.forwardRef)(
|
|
|
20853
21159
|
|
|
20854
21160
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
20855
21161
|
init_emotion_jsx_shim();
|
|
20856
|
-
var
|
|
20857
|
-
var
|
|
20858
|
-
var ParameterLink = (0,
|
|
21162
|
+
var import_react134 = require("react");
|
|
21163
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
21164
|
+
var ParameterLink = (0, import_react134.forwardRef)(
|
|
20859
21165
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
20860
21166
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20861
|
-
return /* @__PURE__ */ (0,
|
|
21167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
20862
21168
|
ParameterShell,
|
|
20863
21169
|
{
|
|
20864
21170
|
"data-testid": "link-parameter-editor",
|
|
20865
21171
|
...shellProps,
|
|
20866
21172
|
label: innerProps.value ? shellProps.label : "",
|
|
20867
21173
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
20868
|
-
children: /* @__PURE__ */ (0,
|
|
21174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
20869
21175
|
ParameterLinkInner,
|
|
20870
21176
|
{
|
|
20871
21177
|
onConnectLink,
|
|
@@ -20878,13 +21184,13 @@ var ParameterLink = (0, import_react129.forwardRef)(
|
|
|
20878
21184
|
);
|
|
20879
21185
|
}
|
|
20880
21186
|
);
|
|
20881
|
-
var ParameterLinkInner = (0,
|
|
21187
|
+
var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
20882
21188
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
20883
21189
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20884
21190
|
if (!props.value)
|
|
20885
|
-
return /* @__PURE__ */ (0,
|
|
20886
|
-
return /* @__PURE__ */ (0,
|
|
20887
|
-
/* @__PURE__ */ (0,
|
|
21191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
21192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { css: inputWrapper, children: [
|
|
21193
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
20888
21194
|
"input",
|
|
20889
21195
|
{
|
|
20890
21196
|
type: "text",
|
|
@@ -20896,8 +21202,8 @@ var ParameterLinkInner = (0, import_react129.forwardRef)(
|
|
|
20896
21202
|
...props
|
|
20897
21203
|
}
|
|
20898
21204
|
),
|
|
20899
|
-
/* @__PURE__ */ (0,
|
|
20900
|
-
/* @__PURE__ */ (0,
|
|
21205
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { css: linkParameterControls, children: [
|
|
21206
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
20901
21207
|
"button",
|
|
20902
21208
|
{
|
|
20903
21209
|
type: "button",
|
|
@@ -20908,7 +21214,7 @@ var ParameterLinkInner = (0, import_react129.forwardRef)(
|
|
|
20908
21214
|
children: "edit"
|
|
20909
21215
|
}
|
|
20910
21216
|
),
|
|
20911
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
21217
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
20912
21218
|
"a",
|
|
20913
21219
|
{
|
|
20914
21220
|
href: externalLink,
|
|
@@ -20916,7 +21222,7 @@ var ParameterLinkInner = (0, import_react129.forwardRef)(
|
|
|
20916
21222
|
title: "Open link in new tab",
|
|
20917
21223
|
target: "_blank",
|
|
20918
21224
|
rel: "noopener noreferrer",
|
|
20919
|
-
children: /* @__PURE__ */ (0,
|
|
21225
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
20920
21226
|
}
|
|
20921
21227
|
) : null
|
|
20922
21228
|
] })
|
|
@@ -20926,15 +21232,15 @@ var ParameterLinkInner = (0, import_react129.forwardRef)(
|
|
|
20926
21232
|
|
|
20927
21233
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
20928
21234
|
init_emotion_jsx_shim();
|
|
20929
|
-
var
|
|
21235
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
20930
21236
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
20931
21237
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20932
|
-
return /* @__PURE__ */ (0,
|
|
21238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
20933
21239
|
};
|
|
20934
21240
|
var ParameterMultiSelectInner = (props) => {
|
|
20935
21241
|
var _a;
|
|
20936
21242
|
const { id, label } = useParameterShell();
|
|
20937
|
-
return /* @__PURE__ */ (0,
|
|
21243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
20938
21244
|
InputComboBox,
|
|
20939
21245
|
{
|
|
20940
21246
|
menuPortalTarget: document.body,
|
|
@@ -20985,7 +21291,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
20985
21291
|
|
|
20986
21292
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
20987
21293
|
init_emotion_jsx_shim();
|
|
20988
|
-
var
|
|
21294
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
20989
21295
|
var ParameterNameAndPublicIdInput = ({
|
|
20990
21296
|
id,
|
|
20991
21297
|
onBlur,
|
|
@@ -21011,8 +21317,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21011
21317
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
21012
21318
|
};
|
|
21013
21319
|
autoFocus == null ? void 0 : autoFocus();
|
|
21014
|
-
return /* @__PURE__ */ (0,
|
|
21015
|
-
/* @__PURE__ */ (0,
|
|
21320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
|
|
21321
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21016
21322
|
ParameterInput,
|
|
21017
21323
|
{
|
|
21018
21324
|
id: nameIdField,
|
|
@@ -21031,7 +21337,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21031
21337
|
value: values[nameIdField]
|
|
21032
21338
|
}
|
|
21033
21339
|
),
|
|
21034
|
-
/* @__PURE__ */ (0,
|
|
21340
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21035
21341
|
ParameterInput,
|
|
21036
21342
|
{
|
|
21037
21343
|
id: publicIdFieldName,
|
|
@@ -21045,11 +21351,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21045
21351
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
21046
21352
|
placeholder: publicIdPlaceholderText,
|
|
21047
21353
|
errorMessage: publicIdError,
|
|
21048
|
-
menuItems: /* @__PURE__ */ (0,
|
|
21354
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21049
21355
|
MenuItem,
|
|
21050
21356
|
{
|
|
21051
21357
|
disabled: !values[publicIdFieldName],
|
|
21052
|
-
icon: /* @__PURE__ */ (0,
|
|
21358
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
21053
21359
|
onClick: handleCopyPidFieldValue,
|
|
21054
21360
|
children: "Copy"
|
|
21055
21361
|
}
|
|
@@ -21057,13 +21363,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21057
21363
|
value: values[publicIdFieldName]
|
|
21058
21364
|
}
|
|
21059
21365
|
),
|
|
21060
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
21366
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
21061
21367
|
] });
|
|
21062
21368
|
};
|
|
21063
21369
|
|
|
21064
21370
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
21065
21371
|
init_emotion_jsx_shim();
|
|
21066
|
-
var
|
|
21372
|
+
var import_react141 = require("@emotion/react");
|
|
21067
21373
|
var import_list3 = require("@lexical/list");
|
|
21068
21374
|
var import_markdown = require("@lexical/markdown");
|
|
21069
21375
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -21170,7 +21476,7 @@ var getLabelForElement = (type) => {
|
|
|
21170
21476
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
21171
21477
|
var import_fast_equals2 = require("fast-equals");
|
|
21172
21478
|
var import_lexical6 = require("lexical");
|
|
21173
|
-
var
|
|
21479
|
+
var import_react142 = require("react");
|
|
21174
21480
|
|
|
21175
21481
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
21176
21482
|
init_emotion_jsx_shim();
|
|
@@ -21193,10 +21499,10 @@ init_emotion_jsx_shim();
|
|
|
21193
21499
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
21194
21500
|
var import_utils2 = require("@lexical/utils");
|
|
21195
21501
|
var import_lexical = require("lexical");
|
|
21196
|
-
var
|
|
21502
|
+
var import_react135 = require("react");
|
|
21197
21503
|
function DisableStylesPlugin() {
|
|
21198
21504
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
21199
|
-
(0,
|
|
21505
|
+
(0, import_react135.useEffect)(() => {
|
|
21200
21506
|
return (0, import_utils2.mergeRegister)(
|
|
21201
21507
|
// Disable text alignment on paragraph nodes
|
|
21202
21508
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -21391,13 +21697,13 @@ var codeElement = import_css2.css`
|
|
|
21391
21697
|
|
|
21392
21698
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21393
21699
|
init_emotion_jsx_shim();
|
|
21394
|
-
var
|
|
21700
|
+
var import_react136 = require("@emotion/react");
|
|
21395
21701
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
21396
21702
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
21397
21703
|
var import_utils3 = require("@lexical/utils");
|
|
21398
21704
|
var import_fast_equals = require("fast-equals");
|
|
21399
21705
|
var import_lexical3 = require("lexical");
|
|
21400
|
-
var
|
|
21706
|
+
var import_react137 = require("react");
|
|
21401
21707
|
|
|
21402
21708
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
21403
21709
|
init_emotion_jsx_shim();
|
|
@@ -21436,7 +21742,7 @@ var getSelectedNode = (selection) => {
|
|
|
21436
21742
|
};
|
|
21437
21743
|
|
|
21438
21744
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21439
|
-
var
|
|
21745
|
+
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
21440
21746
|
var isProjectMapLinkValue = (value) => {
|
|
21441
21747
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
21442
21748
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -21723,16 +22029,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
21723
22029
|
);
|
|
21724
22030
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
21725
22031
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
21726
|
-
var linkPopover =
|
|
22032
|
+
var linkPopover = import_react136.css`
|
|
21727
22033
|
position: absolute;
|
|
21728
22034
|
z-index: 5;
|
|
21729
22035
|
`;
|
|
21730
|
-
var linkPopoverContainer =
|
|
22036
|
+
var linkPopoverContainer = import_react136.css`
|
|
21731
22037
|
${Popover};
|
|
21732
22038
|
align-items: center;
|
|
21733
22039
|
display: flex;
|
|
21734
22040
|
`;
|
|
21735
|
-
var linkPopoverAnchor =
|
|
22041
|
+
var linkPopoverAnchor = import_react136.css`
|
|
21736
22042
|
${link}
|
|
21737
22043
|
${linkColorDefault}
|
|
21738
22044
|
`;
|
|
@@ -21741,17 +22047,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21741
22047
|
return path;
|
|
21742
22048
|
};
|
|
21743
22049
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
21744
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
21745
|
-
const linkPopoverElRef = (0,
|
|
21746
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
21747
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
21748
|
-
(0,
|
|
22050
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react137.useState)();
|
|
22051
|
+
const linkPopoverElRef = (0, import_react137.useRef)(null);
|
|
22052
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react137.useState)(false);
|
|
22053
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react137.useState)(false);
|
|
22054
|
+
(0, import_react137.useEffect)(() => {
|
|
21749
22055
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
21750
22056
|
setLinkPopoverState(void 0);
|
|
21751
22057
|
return;
|
|
21752
22058
|
}
|
|
21753
22059
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
21754
|
-
(0,
|
|
22060
|
+
(0, import_react137.useEffect)(() => {
|
|
21755
22061
|
if (!editor.hasNodes([LinkNode])) {
|
|
21756
22062
|
throw new Error("LinkNode not registered on editor");
|
|
21757
22063
|
}
|
|
@@ -21820,7 +22126,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21820
22126
|
)
|
|
21821
22127
|
);
|
|
21822
22128
|
}, [editor, onConnectLink]);
|
|
21823
|
-
const maybeShowLinkToolbar = (0,
|
|
22129
|
+
const maybeShowLinkToolbar = (0, import_react137.useCallback)(() => {
|
|
21824
22130
|
if (!editor.isEditable()) {
|
|
21825
22131
|
return;
|
|
21826
22132
|
}
|
|
@@ -21852,7 +22158,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21852
22158
|
}
|
|
21853
22159
|
});
|
|
21854
22160
|
}, [editor]);
|
|
21855
|
-
(0,
|
|
22161
|
+
(0, import_react137.useEffect)(() => {
|
|
21856
22162
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
21857
22163
|
requestAnimationFrame(() => {
|
|
21858
22164
|
editorState.read(() => {
|
|
@@ -21879,8 +22185,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21879
22185
|
});
|
|
21880
22186
|
});
|
|
21881
22187
|
};
|
|
21882
|
-
return /* @__PURE__ */ (0,
|
|
21883
|
-
/* @__PURE__ */ (0,
|
|
22188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
22189
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21884
22190
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
21885
22191
|
{
|
|
21886
22192
|
nodeType: LinkNode,
|
|
@@ -21890,7 +22196,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21890
22196
|
}
|
|
21891
22197
|
}
|
|
21892
22198
|
),
|
|
21893
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
22199
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21894
22200
|
"div",
|
|
21895
22201
|
{
|
|
21896
22202
|
css: linkPopover,
|
|
@@ -21899,8 +22205,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21899
22205
|
top: linkPopoverState.position.y
|
|
21900
22206
|
},
|
|
21901
22207
|
ref: linkPopoverElRef,
|
|
21902
|
-
children: /* @__PURE__ */ (0,
|
|
21903
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
22208
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
22209
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21904
22210
|
"a",
|
|
21905
22211
|
{
|
|
21906
22212
|
href: parsePath(
|
|
@@ -21912,7 +22218,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21912
22218
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
21913
22219
|
}
|
|
21914
22220
|
),
|
|
21915
|
-
/* @__PURE__ */ (0,
|
|
22221
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21916
22222
|
Button,
|
|
21917
22223
|
{
|
|
21918
22224
|
size: "xs",
|
|
@@ -21920,7 +22226,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
21920
22226
|
onEditLinkNode(linkPopoverState.node);
|
|
21921
22227
|
},
|
|
21922
22228
|
buttonType: "ghost",
|
|
21923
|
-
children: /* @__PURE__ */ (0,
|
|
22229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
21924
22230
|
}
|
|
21925
22231
|
)
|
|
21926
22232
|
] })
|
|
@@ -21940,8 +22246,8 @@ var import_list = require("@lexical/list");
|
|
|
21940
22246
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
21941
22247
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
21942
22248
|
var import_lexical4 = require("lexical");
|
|
21943
|
-
var
|
|
21944
|
-
var
|
|
22249
|
+
var import_react138 = require("react");
|
|
22250
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
21945
22251
|
function isIndentPermitted(maxDepth) {
|
|
21946
22252
|
const selection = (0, import_lexical4.$getSelection)();
|
|
21947
22253
|
if (!(0, import_lexical4.$isRangeSelection)(selection)) {
|
|
@@ -21964,19 +22270,19 @@ function isIndentPermitted(maxDepth) {
|
|
|
21964
22270
|
}
|
|
21965
22271
|
function ListIndentPlugin({ maxDepth }) {
|
|
21966
22272
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
21967
|
-
(0,
|
|
22273
|
+
(0, import_react138.useEffect)(() => {
|
|
21968
22274
|
return editor.registerCommand(
|
|
21969
22275
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
21970
22276
|
() => !isIndentPermitted(maxDepth),
|
|
21971
22277
|
import_lexical4.COMMAND_PRIORITY_CRITICAL
|
|
21972
22278
|
);
|
|
21973
22279
|
}, [editor, maxDepth]);
|
|
21974
|
-
return /* @__PURE__ */ (0,
|
|
22280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {});
|
|
21975
22281
|
}
|
|
21976
22282
|
|
|
21977
22283
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
21978
22284
|
init_emotion_jsx_shim();
|
|
21979
|
-
var
|
|
22285
|
+
var import_react139 = require("@emotion/react");
|
|
21980
22286
|
var import_code2 = require("@lexical/code");
|
|
21981
22287
|
var import_list2 = require("@lexical/list");
|
|
21982
22288
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -21984,9 +22290,9 @@ var import_rich_text = require("@lexical/rich-text");
|
|
|
21984
22290
|
var import_selection2 = require("@lexical/selection");
|
|
21985
22291
|
var import_utils6 = require("@lexical/utils");
|
|
21986
22292
|
var import_lexical5 = require("lexical");
|
|
21987
|
-
var
|
|
21988
|
-
var
|
|
21989
|
-
var toolbar =
|
|
22293
|
+
var import_react140 = require("react");
|
|
22294
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
22295
|
+
var toolbar = import_react139.css`
|
|
21990
22296
|
background: var(--gray-50);
|
|
21991
22297
|
border-radius: var(--rounded-base);
|
|
21992
22298
|
display: flex;
|
|
@@ -21998,7 +22304,7 @@ var toolbar = import_react134.css`
|
|
|
21998
22304
|
top: calc(var(--spacing-sm) * -2);
|
|
21999
22305
|
z-index: 10;
|
|
22000
22306
|
`;
|
|
22001
|
-
var toolbarGroup =
|
|
22307
|
+
var toolbarGroup = import_react139.css`
|
|
22002
22308
|
display: flex;
|
|
22003
22309
|
gap: var(--spacing-xs);
|
|
22004
22310
|
position: relative;
|
|
@@ -22014,7 +22320,7 @@ var toolbarGroup = import_react134.css`
|
|
|
22014
22320
|
width: 1px;
|
|
22015
22321
|
}
|
|
22016
22322
|
`;
|
|
22017
|
-
var richTextToolbarButton =
|
|
22323
|
+
var richTextToolbarButton = import_react139.css`
|
|
22018
22324
|
align-items: center;
|
|
22019
22325
|
appearance: none;
|
|
22020
22326
|
border: 0;
|
|
@@ -22027,17 +22333,17 @@ var richTextToolbarButton = import_react134.css`
|
|
|
22027
22333
|
min-width: 32px;
|
|
22028
22334
|
padding: 0 var(--spacing-sm);
|
|
22029
22335
|
`;
|
|
22030
|
-
var richTextToolbarButtonActive =
|
|
22336
|
+
var richTextToolbarButtonActive = import_react139.css`
|
|
22031
22337
|
background: var(--gray-200);
|
|
22032
22338
|
`;
|
|
22033
|
-
var toolbarIcon =
|
|
22339
|
+
var toolbarIcon = import_react139.css`
|
|
22034
22340
|
color: inherit;
|
|
22035
22341
|
`;
|
|
22036
|
-
var toolbarChevron =
|
|
22342
|
+
var toolbarChevron = import_react139.css`
|
|
22037
22343
|
margin-left: var(--spacing-xs);
|
|
22038
22344
|
`;
|
|
22039
22345
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
22040
|
-
return /* @__PURE__ */ (0,
|
|
22346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
22041
22347
|
};
|
|
22042
22348
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
22043
22349
|
["bold", "format-bold"],
|
|
@@ -22088,7 +22394,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22088
22394
|
}
|
|
22089
22395
|
});
|
|
22090
22396
|
};
|
|
22091
|
-
const updateToolbar = (0,
|
|
22397
|
+
const updateToolbar = (0, import_react140.useCallback)(() => {
|
|
22092
22398
|
const selection = (0, import_lexical5.$getSelection)();
|
|
22093
22399
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
22094
22400
|
return;
|
|
@@ -22127,7 +22433,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22127
22433
|
setIsLink(false);
|
|
22128
22434
|
}
|
|
22129
22435
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
22130
|
-
(0,
|
|
22436
|
+
(0, import_react140.useEffect)(() => {
|
|
22131
22437
|
return editor.registerCommand(
|
|
22132
22438
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
22133
22439
|
(_payload) => {
|
|
@@ -22137,7 +22443,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22137
22443
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
22138
22444
|
);
|
|
22139
22445
|
}, [editor, updateToolbar]);
|
|
22140
|
-
(0,
|
|
22446
|
+
(0, import_react140.useEffect)(() => {
|
|
22141
22447
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
22142
22448
|
requestAnimationFrame(() => {
|
|
22143
22449
|
editorState.read(() => {
|
|
@@ -22146,15 +22452,15 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22146
22452
|
});
|
|
22147
22453
|
});
|
|
22148
22454
|
}, [editor, updateToolbar]);
|
|
22149
|
-
return /* @__PURE__ */ (0,
|
|
22150
|
-
/* @__PURE__ */ (0,
|
|
22455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: toolbar, children: [
|
|
22456
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
22151
22457
|
Menu,
|
|
22152
22458
|
{
|
|
22153
22459
|
menuLabel: "Elements",
|
|
22154
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
22460
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("button", { css: richTextToolbarButton, title: "Text styles", children: [
|
|
22155
22461
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
22156
22462
|
" ",
|
|
22157
|
-
/* @__PURE__ */ (0,
|
|
22463
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
22158
22464
|
] }),
|
|
22159
22465
|
placement: "bottom-start",
|
|
22160
22466
|
children: [
|
|
@@ -22164,7 +22470,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22164
22470
|
type: "paragraph"
|
|
22165
22471
|
},
|
|
22166
22472
|
...visibleTextualElements
|
|
22167
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
22473
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22168
22474
|
MenuItem,
|
|
22169
22475
|
{
|
|
22170
22476
|
onClick: () => {
|
|
@@ -22174,12 +22480,12 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22174
22480
|
},
|
|
22175
22481
|
element.type
|
|
22176
22482
|
)),
|
|
22177
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
22483
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
22178
22484
|
]
|
|
22179
22485
|
}
|
|
22180
22486
|
),
|
|
22181
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
22182
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
22487
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: toolbarGroup, children: [
|
|
22488
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22183
22489
|
"button",
|
|
22184
22490
|
{
|
|
22185
22491
|
onClick: () => {
|
|
@@ -22189,16 +22495,16 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22189
22495
|
richTextToolbarButton,
|
|
22190
22496
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
22191
22497
|
],
|
|
22192
|
-
children: /* @__PURE__ */ (0,
|
|
22498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
22193
22499
|
}
|
|
22194
22500
|
) }, format.type)),
|
|
22195
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
22501
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22196
22502
|
Menu,
|
|
22197
22503
|
{
|
|
22198
22504
|
menuLabel: "Alternative text styles",
|
|
22199
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
22505
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
22200
22506
|
placement: "bottom-start",
|
|
22201
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
22507
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22202
22508
|
MenuItem,
|
|
22203
22509
|
{
|
|
22204
22510
|
onClick: () => {
|
|
@@ -22211,19 +22517,19 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22211
22517
|
}
|
|
22212
22518
|
) : null
|
|
22213
22519
|
] }) : null,
|
|
22214
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
22215
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
22520
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: toolbarGroup, children: [
|
|
22521
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22216
22522
|
"button",
|
|
22217
22523
|
{
|
|
22218
22524
|
onClick: () => {
|
|
22219
22525
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
22220
22526
|
},
|
|
22221
22527
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
22222
|
-
children: /* @__PURE__ */ (0,
|
|
22528
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
22223
22529
|
}
|
|
22224
22530
|
) }) : null,
|
|
22225
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
22226
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
22531
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
|
|
22532
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22227
22533
|
"button",
|
|
22228
22534
|
{
|
|
22229
22535
|
onClick: () => {
|
|
@@ -22233,10 +22539,10 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22233
22539
|
richTextToolbarButton,
|
|
22234
22540
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
22235
22541
|
],
|
|
22236
|
-
children: /* @__PURE__ */ (0,
|
|
22542
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
22237
22543
|
}
|
|
22238
22544
|
) }) : null,
|
|
22239
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
22545
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22240
22546
|
"button",
|
|
22241
22547
|
{
|
|
22242
22548
|
onClick: () => {
|
|
@@ -22246,57 +22552,57 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22246
22552
|
richTextToolbarButton,
|
|
22247
22553
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
22248
22554
|
],
|
|
22249
|
-
children: /* @__PURE__ */ (0,
|
|
22555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
22250
22556
|
}
|
|
22251
22557
|
) }) : null
|
|
22252
22558
|
] }) : null,
|
|
22253
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
22559
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22254
22560
|
"button",
|
|
22255
22561
|
{
|
|
22256
22562
|
onClick: () => {
|
|
22257
22563
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
22258
22564
|
},
|
|
22259
22565
|
css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
|
|
22260
|
-
children: /* @__PURE__ */ (0,
|
|
22566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RichTextToolbarIcon, { icon: "quote" })
|
|
22261
22567
|
}
|
|
22262
22568
|
) }) : null,
|
|
22263
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
22569
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22264
22570
|
"button",
|
|
22265
22571
|
{
|
|
22266
22572
|
onClick: () => {
|
|
22267
22573
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
22268
22574
|
},
|
|
22269
22575
|
css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
|
|
22270
|
-
children: /* @__PURE__ */ (0,
|
|
22576
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RichTextToolbarIcon, { icon: "code-slash" })
|
|
22271
22577
|
}
|
|
22272
22578
|
) }) : null
|
|
22273
22579
|
] }) : null,
|
|
22274
|
-
customControls ? /* @__PURE__ */ (0,
|
|
22580
|
+
customControls ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { css: toolbarGroup, children: customControls }) : null
|
|
22275
22581
|
] });
|
|
22276
22582
|
};
|
|
22277
22583
|
var RichTextToolbar_default = RichTextToolbar;
|
|
22278
22584
|
var useRichTextToolbarState = ({ config }) => {
|
|
22279
22585
|
var _a;
|
|
22280
|
-
const enabledBuiltInFormats = (0,
|
|
22586
|
+
const enabledBuiltInFormats = (0, import_react140.useMemo)(() => {
|
|
22281
22587
|
return richTextBuiltInFormats.filter((format) => {
|
|
22282
22588
|
var _a2, _b;
|
|
22283
22589
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
22284
22590
|
});
|
|
22285
22591
|
}, [config]);
|
|
22286
|
-
const enabledBuiltInElements = (0,
|
|
22592
|
+
const enabledBuiltInElements = (0, import_react140.useMemo)(() => {
|
|
22287
22593
|
return richTextBuiltInElements.filter((element) => {
|
|
22288
22594
|
var _a2, _b;
|
|
22289
22595
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
22290
22596
|
});
|
|
22291
22597
|
}, [config]);
|
|
22292
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
22598
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react140.useMemo)(() => {
|
|
22293
22599
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
22294
22600
|
}, [enabledBuiltInFormats]);
|
|
22295
22601
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
22296
22602
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
22297
22603
|
);
|
|
22298
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
22299
|
-
const visibleFormatsWithIcon = (0,
|
|
22604
|
+
const [activeFormats, setActiveFormats] = (0, import_react140.useState)([]);
|
|
22605
|
+
const visibleFormatsWithIcon = (0, import_react140.useMemo)(() => {
|
|
22300
22606
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
22301
22607
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
22302
22608
|
visibleFormats.add(type);
|
|
@@ -22306,7 +22612,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22306
22612
|
});
|
|
22307
22613
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
22308
22614
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
22309
|
-
const visibleFormatsWithoutIcon = (0,
|
|
22615
|
+
const visibleFormatsWithoutIcon = (0, import_react140.useMemo)(() => {
|
|
22310
22616
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
22311
22617
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
22312
22618
|
visibleFormats.add(type);
|
|
@@ -22316,11 +22622,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22316
22622
|
});
|
|
22317
22623
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
22318
22624
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
22319
|
-
const [activeElement, setActiveElement] = (0,
|
|
22625
|
+
const [activeElement, setActiveElement] = (0, import_react140.useState)("paragraph");
|
|
22320
22626
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
22321
22627
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
22322
22628
|
);
|
|
22323
|
-
const visibleTextualElements = (0,
|
|
22629
|
+
const visibleTextualElements = (0, import_react140.useMemo)(() => {
|
|
22324
22630
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
22325
22631
|
return enabledTextualElements;
|
|
22326
22632
|
}
|
|
@@ -22331,24 +22637,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22331
22637
|
}
|
|
22332
22638
|
);
|
|
22333
22639
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
22334
|
-
const [isLink, setIsLink] = (0,
|
|
22335
|
-
const linkElementVisible = (0,
|
|
22640
|
+
const [isLink, setIsLink] = (0, import_react140.useState)(false);
|
|
22641
|
+
const linkElementVisible = (0, import_react140.useMemo)(() => {
|
|
22336
22642
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
22337
22643
|
}, [isLink, enabledBuiltInElements]);
|
|
22338
|
-
const visibleLists = (0,
|
|
22644
|
+
const visibleLists = (0, import_react140.useMemo)(() => {
|
|
22339
22645
|
return new Set(
|
|
22340
22646
|
["orderedList", "unorderedList"].filter(
|
|
22341
22647
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
22342
22648
|
)
|
|
22343
22649
|
);
|
|
22344
22650
|
}, [activeElement, enabledBuiltInElements]);
|
|
22345
|
-
const quoteElementVisible = (0,
|
|
22651
|
+
const quoteElementVisible = (0, import_react140.useMemo)(() => {
|
|
22346
22652
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
22347
22653
|
}, [activeElement, enabledBuiltInElements]);
|
|
22348
|
-
const codeElementVisible = (0,
|
|
22654
|
+
const codeElementVisible = (0, import_react140.useMemo)(() => {
|
|
22349
22655
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
22350
22656
|
}, [activeElement, enabledBuiltInElements]);
|
|
22351
|
-
const visibleElementsWithIcons = (0,
|
|
22657
|
+
const visibleElementsWithIcons = (0, import_react140.useMemo)(() => {
|
|
22352
22658
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
22353
22659
|
if (linkElementVisible) {
|
|
22354
22660
|
visibleElements.add("link");
|
|
@@ -22385,7 +22691,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22385
22691
|
};
|
|
22386
22692
|
|
|
22387
22693
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22388
|
-
var
|
|
22694
|
+
var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
|
|
22389
22695
|
var ParameterRichText = ({
|
|
22390
22696
|
label,
|
|
22391
22697
|
labelLeadingIcon,
|
|
@@ -22410,7 +22716,7 @@ var ParameterRichText = ({
|
|
|
22410
22716
|
variables,
|
|
22411
22717
|
customControls
|
|
22412
22718
|
}) => {
|
|
22413
|
-
return /* @__PURE__ */ (0,
|
|
22719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
22414
22720
|
ParameterShell,
|
|
22415
22721
|
{
|
|
22416
22722
|
"data-testid": "parameter-richtext",
|
|
@@ -22424,7 +22730,7 @@ var ParameterRichText = ({
|
|
|
22424
22730
|
captionTestId,
|
|
22425
22731
|
menuItems,
|
|
22426
22732
|
children: [
|
|
22427
|
-
/* @__PURE__ */ (0,
|
|
22733
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22428
22734
|
ParameterRichTextInner,
|
|
22429
22735
|
{
|
|
22430
22736
|
value,
|
|
@@ -22442,23 +22748,23 @@ var ParameterRichText = ({
|
|
|
22442
22748
|
children
|
|
22443
22749
|
}
|
|
22444
22750
|
),
|
|
22445
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
22751
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_jsx_runtime123.Fragment, { children: menuItems }) }) : null
|
|
22446
22752
|
]
|
|
22447
22753
|
}
|
|
22448
22754
|
);
|
|
22449
22755
|
};
|
|
22450
|
-
var editorWrapper =
|
|
22756
|
+
var editorWrapper = import_react141.css`
|
|
22451
22757
|
display: flex;
|
|
22452
22758
|
flex-flow: column;
|
|
22453
22759
|
flex-grow: 1;
|
|
22454
22760
|
`;
|
|
22455
|
-
var editorContainer =
|
|
22761
|
+
var editorContainer = import_react141.css`
|
|
22456
22762
|
display: flex;
|
|
22457
22763
|
flex-flow: column;
|
|
22458
22764
|
flex-grow: 1;
|
|
22459
22765
|
position: relative;
|
|
22460
22766
|
`;
|
|
22461
|
-
var editorPlaceholder =
|
|
22767
|
+
var editorPlaceholder = import_react141.css`
|
|
22462
22768
|
color: var(--gray-500);
|
|
22463
22769
|
font-style: italic;
|
|
22464
22770
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -22469,7 +22775,7 @@ var editorPlaceholder = import_react136.css`
|
|
|
22469
22775
|
top: var(--spacing-sm);
|
|
22470
22776
|
user-select: none;
|
|
22471
22777
|
`;
|
|
22472
|
-
var editorInput =
|
|
22778
|
+
var editorInput = import_react141.css`
|
|
22473
22779
|
background: var(--white);
|
|
22474
22780
|
border: 1px solid var(--gray-200);
|
|
22475
22781
|
border-radius: var(--rounded-sm);
|
|
@@ -22553,8 +22859,8 @@ var ParameterRichTextInner = ({
|
|
|
22553
22859
|
},
|
|
22554
22860
|
editable: !readOnly
|
|
22555
22861
|
};
|
|
22556
|
-
return /* @__PURE__ */ (0,
|
|
22557
|
-
/* @__PURE__ */ (0,
|
|
22862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
22863
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22558
22864
|
RichText,
|
|
22559
22865
|
{
|
|
22560
22866
|
onChange,
|
|
@@ -22591,14 +22897,14 @@ var RichText = ({
|
|
|
22591
22897
|
variables,
|
|
22592
22898
|
customControls
|
|
22593
22899
|
}) => {
|
|
22594
|
-
const editorContainerRef = (0,
|
|
22900
|
+
const editorContainerRef = (0, import_react142.useRef)(null);
|
|
22595
22901
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
22596
|
-
(0,
|
|
22902
|
+
(0, import_react142.useEffect)(() => {
|
|
22597
22903
|
if (onRichTextInit) {
|
|
22598
22904
|
onRichTextInit(editor);
|
|
22599
22905
|
}
|
|
22600
22906
|
}, [editor, onRichTextInit]);
|
|
22601
|
-
(0,
|
|
22907
|
+
(0, import_react142.useEffect)(() => {
|
|
22602
22908
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
22603
22909
|
requestAnimationFrame(() => {
|
|
22604
22910
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -22610,23 +22916,23 @@ var RichText = ({
|
|
|
22610
22916
|
removeUpdateListener();
|
|
22611
22917
|
};
|
|
22612
22918
|
}, [editor, onChange]);
|
|
22613
|
-
(0,
|
|
22919
|
+
(0, import_react142.useEffect)(() => {
|
|
22614
22920
|
editor.setEditable(!readOnly);
|
|
22615
22921
|
}, [editor, readOnly]);
|
|
22616
|
-
return /* @__PURE__ */ (0,
|
|
22617
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
22618
|
-
/* @__PURE__ */ (0,
|
|
22619
|
-
/* @__PURE__ */ (0,
|
|
22922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
22923
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbar_default, { config, customControls }),
|
|
22924
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
22925
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22620
22926
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
22621
22927
|
{
|
|
22622
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
22623
|
-
placeholder: /* @__PURE__ */ (0,
|
|
22928
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
22929
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
22624
22930
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
22625
22931
|
}
|
|
22626
22932
|
),
|
|
22627
|
-
/* @__PURE__ */ (0,
|
|
22628
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
22629
|
-
/* @__PURE__ */ (0,
|
|
22933
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
22934
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
22935
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22630
22936
|
LinkNodePlugin,
|
|
22631
22937
|
{
|
|
22632
22938
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -22636,28 +22942,28 @@ var RichText = ({
|
|
|
22636
22942
|
} : void 0
|
|
22637
22943
|
}
|
|
22638
22944
|
),
|
|
22639
|
-
/* @__PURE__ */ (0,
|
|
22640
|
-
/* @__PURE__ */ (0,
|
|
22641
|
-
/* @__PURE__ */ (0,
|
|
22642
|
-
/* @__PURE__ */ (0,
|
|
22945
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
22946
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DisableStylesPlugin, {}),
|
|
22947
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
22948
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_jsx_runtime123.Fragment, { children })
|
|
22643
22949
|
] })
|
|
22644
22950
|
] });
|
|
22645
22951
|
};
|
|
22646
22952
|
|
|
22647
22953
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
22648
22954
|
init_emotion_jsx_shim();
|
|
22649
|
-
var
|
|
22650
|
-
var
|
|
22651
|
-
var ParameterSelect = (0,
|
|
22955
|
+
var import_react143 = require("react");
|
|
22956
|
+
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
22957
|
+
var ParameterSelect = (0, import_react143.forwardRef)(
|
|
22652
22958
|
({ defaultOption, options, ...props }, ref) => {
|
|
22653
22959
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22654
|
-
return /* @__PURE__ */ (0,
|
|
22960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
22655
22961
|
}
|
|
22656
22962
|
);
|
|
22657
|
-
var ParameterSelectInner = (0,
|
|
22963
|
+
var ParameterSelectInner = (0, import_react143.forwardRef)(
|
|
22658
22964
|
({ defaultOption, options, ...props }, ref) => {
|
|
22659
22965
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
22660
|
-
return /* @__PURE__ */ (0,
|
|
22966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
22661
22967
|
"select",
|
|
22662
22968
|
{
|
|
22663
22969
|
css: [input3, selectInput],
|
|
@@ -22666,10 +22972,10 @@ var ParameterSelectInner = (0, import_react138.forwardRef)(
|
|
|
22666
22972
|
ref,
|
|
22667
22973
|
...props,
|
|
22668
22974
|
children: [
|
|
22669
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
22975
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
22670
22976
|
options.map((option) => {
|
|
22671
22977
|
var _a;
|
|
22672
|
-
return /* @__PURE__ */ (0,
|
|
22978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
22673
22979
|
})
|
|
22674
22980
|
]
|
|
22675
22981
|
}
|
|
@@ -22679,15 +22985,15 @@ var ParameterSelectInner = (0, import_react138.forwardRef)(
|
|
|
22679
22985
|
|
|
22680
22986
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
22681
22987
|
init_emotion_jsx_shim();
|
|
22682
|
-
var
|
|
22683
|
-
var
|
|
22684
|
-
var ParameterTextarea = (0,
|
|
22988
|
+
var import_react144 = require("react");
|
|
22989
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
22990
|
+
var ParameterTextarea = (0, import_react144.forwardRef)((props, ref) => {
|
|
22685
22991
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22686
|
-
return /* @__PURE__ */ (0,
|
|
22992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
22687
22993
|
});
|
|
22688
|
-
var ParameterTextareaInner = (0,
|
|
22994
|
+
var ParameterTextareaInner = (0, import_react144.forwardRef)(({ ...props }, ref) => {
|
|
22689
22995
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
22690
|
-
return /* @__PURE__ */ (0,
|
|
22996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
22691
22997
|
"textarea",
|
|
22692
22998
|
{
|
|
22693
22999
|
css: [input3, textarea2],
|
|
@@ -22701,18 +23007,18 @@ var ParameterTextareaInner = (0, import_react139.forwardRef)(({ ...props }, ref)
|
|
|
22701
23007
|
|
|
22702
23008
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
22703
23009
|
init_emotion_jsx_shim();
|
|
22704
|
-
var
|
|
22705
|
-
var
|
|
22706
|
-
var ParameterToggle = (0,
|
|
23010
|
+
var import_react145 = require("react");
|
|
23011
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
23012
|
+
var ParameterToggle = (0, import_react145.forwardRef)((props, ref) => {
|
|
22707
23013
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22708
|
-
return /* @__PURE__ */ (0,
|
|
23014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
22709
23015
|
});
|
|
22710
|
-
var ParameterToggleInner = (0,
|
|
23016
|
+
var ParameterToggleInner = (0, import_react145.forwardRef)(
|
|
22711
23017
|
({ children, ...props }, ref) => {
|
|
22712
23018
|
const { id, label } = useParameterShell();
|
|
22713
|
-
return /* @__PURE__ */ (0,
|
|
22714
|
-
/* @__PURE__ */ (0,
|
|
22715
|
-
/* @__PURE__ */ (0,
|
|
23019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
23020
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
23021
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { css: inlineLabel2, children: label }),
|
|
22716
23022
|
children
|
|
22717
23023
|
] });
|
|
22718
23024
|
}
|
|
@@ -22723,8 +23029,8 @@ init_emotion_jsx_shim();
|
|
|
22723
23029
|
|
|
22724
23030
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
22725
23031
|
init_emotion_jsx_shim();
|
|
22726
|
-
var
|
|
22727
|
-
var container3 =
|
|
23032
|
+
var import_react146 = require("@emotion/react");
|
|
23033
|
+
var container3 = import_react146.css`
|
|
22728
23034
|
background: var(--gray-50);
|
|
22729
23035
|
margin-block: var(--spacing-sm);
|
|
22730
23036
|
position: relative;
|
|
@@ -22734,17 +23040,17 @@ var container3 = import_react141.css`
|
|
|
22734
23040
|
border: solid 1px var(--gray-300);
|
|
22735
23041
|
`;
|
|
22736
23042
|
var themeMap = {
|
|
22737
|
-
primary:
|
|
23043
|
+
primary: import_react146.css`
|
|
22738
23044
|
--progress-color: var(--accent-light);
|
|
22739
23045
|
`,
|
|
22740
|
-
secondary:
|
|
23046
|
+
secondary: import_react146.css`
|
|
22741
23047
|
--progress-color: var(--accent-alt-light);
|
|
22742
23048
|
`,
|
|
22743
|
-
destructive:
|
|
23049
|
+
destructive: import_react146.css`
|
|
22744
23050
|
--progress-color: var(--brand-secondary-5);
|
|
22745
23051
|
`
|
|
22746
23052
|
};
|
|
22747
|
-
var slidingBackgroundPosition =
|
|
23053
|
+
var slidingBackgroundPosition = import_react146.keyframes`
|
|
22748
23054
|
from {
|
|
22749
23055
|
background-position: 0 0;
|
|
22750
23056
|
}
|
|
@@ -22752,10 +23058,10 @@ var slidingBackgroundPosition = import_react141.keyframes`
|
|
|
22752
23058
|
background-position: 64px 0;
|
|
22753
23059
|
}
|
|
22754
23060
|
`;
|
|
22755
|
-
var determinate =
|
|
23061
|
+
var determinate = import_react146.css`
|
|
22756
23062
|
background-color: var(--progress-color);
|
|
22757
23063
|
`;
|
|
22758
|
-
var indeterminate =
|
|
23064
|
+
var indeterminate = import_react146.css`
|
|
22759
23065
|
background-image: linear-gradient(
|
|
22760
23066
|
45deg,
|
|
22761
23067
|
var(--progress-color) 25%,
|
|
@@ -22769,7 +23075,7 @@ var indeterminate = import_react141.css`
|
|
|
22769
23075
|
background-size: 64px 64px;
|
|
22770
23076
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
22771
23077
|
`;
|
|
22772
|
-
var bar =
|
|
23078
|
+
var bar = import_react146.css`
|
|
22773
23079
|
position: absolute;
|
|
22774
23080
|
inset: 0;
|
|
22775
23081
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -22777,7 +23083,7 @@ var bar = import_react141.css`
|
|
|
22777
23083
|
`;
|
|
22778
23084
|
|
|
22779
23085
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
22780
|
-
var
|
|
23086
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
22781
23087
|
function ProgressBar({
|
|
22782
23088
|
current,
|
|
22783
23089
|
max,
|
|
@@ -22787,7 +23093,7 @@ function ProgressBar({
|
|
|
22787
23093
|
}) {
|
|
22788
23094
|
const valueNow = Math.min(current, max);
|
|
22789
23095
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
22790
|
-
return /* @__PURE__ */ (0,
|
|
23096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
22791
23097
|
"div",
|
|
22792
23098
|
{
|
|
22793
23099
|
css: container3,
|
|
@@ -22798,7 +23104,7 @@ function ProgressBar({
|
|
|
22798
23104
|
"aria-valuemax": max,
|
|
22799
23105
|
"aria-valuenow": valueNow,
|
|
22800
23106
|
...props,
|
|
22801
|
-
children: /* @__PURE__ */ (0,
|
|
23107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
22802
23108
|
"div",
|
|
22803
23109
|
{
|
|
22804
23110
|
css: [
|
|
@@ -22818,31 +23124,31 @@ function ProgressBar({
|
|
|
22818
23124
|
|
|
22819
23125
|
// src/components/ProgressList/ProgressList.tsx
|
|
22820
23126
|
init_emotion_jsx_shim();
|
|
22821
|
-
var
|
|
23127
|
+
var import_react148 = require("@emotion/react");
|
|
22822
23128
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
22823
23129
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
22824
23130
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
22825
|
-
var
|
|
23131
|
+
var import_react149 = require("react");
|
|
22826
23132
|
|
|
22827
23133
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
22828
23134
|
init_emotion_jsx_shim();
|
|
22829
|
-
var
|
|
22830
|
-
var progressListStyles =
|
|
23135
|
+
var import_react147 = require("@emotion/react");
|
|
23136
|
+
var progressListStyles = import_react147.css`
|
|
22831
23137
|
display: flex;
|
|
22832
23138
|
flex-direction: column;
|
|
22833
23139
|
gap: var(--spacing-sm);
|
|
22834
23140
|
list-style-type: none;
|
|
22835
23141
|
`;
|
|
22836
|
-
var progressListItemStyles =
|
|
23142
|
+
var progressListItemStyles = import_react147.css`
|
|
22837
23143
|
display: flex;
|
|
22838
23144
|
gap: var(--spacing-base);
|
|
22839
23145
|
align-items: center;
|
|
22840
23146
|
`;
|
|
22841
23147
|
|
|
22842
23148
|
// src/components/ProgressList/ProgressList.tsx
|
|
22843
|
-
var
|
|
23149
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
22844
23150
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
22845
|
-
const itemsWithStatus = (0,
|
|
23151
|
+
const itemsWithStatus = (0, import_react149.useMemo)(() => {
|
|
22846
23152
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
22847
23153
|
return items.map((item, index) => {
|
|
22848
23154
|
let status = "queued";
|
|
@@ -22854,8 +23160,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
22854
23160
|
return { ...item, status };
|
|
22855
23161
|
});
|
|
22856
23162
|
}, [items, inProgressId]);
|
|
22857
|
-
return /* @__PURE__ */ (0,
|
|
22858
|
-
return /* @__PURE__ */ (0,
|
|
23163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
23164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
22859
23165
|
ProgressListItem,
|
|
22860
23166
|
{
|
|
22861
23167
|
status,
|
|
@@ -22875,7 +23181,7 @@ var ProgressListItem = ({
|
|
|
22875
23181
|
errorLevel = "danger",
|
|
22876
23182
|
autoEllipsis = false
|
|
22877
23183
|
}) => {
|
|
22878
|
-
const icon = (0,
|
|
23184
|
+
const icon = (0, import_react149.useMemo)(() => {
|
|
22879
23185
|
if (error) {
|
|
22880
23186
|
return warningIcon;
|
|
22881
23187
|
}
|
|
@@ -22886,14 +23192,14 @@ var ProgressListItem = ({
|
|
|
22886
23192
|
};
|
|
22887
23193
|
return iconPerStatus[status];
|
|
22888
23194
|
}, [status, error]);
|
|
22889
|
-
const statusStyles = (0,
|
|
23195
|
+
const statusStyles = (0, import_react149.useMemo)(() => {
|
|
22890
23196
|
if (error) {
|
|
22891
|
-
return errorLevel === "caution" ?
|
|
23197
|
+
return errorLevel === "caution" ? import_react148.css`
|
|
22892
23198
|
color: rgb(161, 98, 7);
|
|
22893
23199
|
& svg {
|
|
22894
23200
|
color: rgb(250, 204, 21);
|
|
22895
23201
|
}
|
|
22896
|
-
` :
|
|
23202
|
+
` : import_react148.css`
|
|
22897
23203
|
color: rgb(185, 28, 28);
|
|
22898
23204
|
& svg {
|
|
22899
23205
|
color: var(--brand-primary-2);
|
|
@@ -22901,40 +23207,40 @@ var ProgressListItem = ({
|
|
|
22901
23207
|
`;
|
|
22902
23208
|
}
|
|
22903
23209
|
const colorPerStatus = {
|
|
22904
|
-
completed:
|
|
23210
|
+
completed: import_react148.css`
|
|
22905
23211
|
opacity: 0.75;
|
|
22906
23212
|
`,
|
|
22907
|
-
inProgress:
|
|
23213
|
+
inProgress: import_react148.css`
|
|
22908
23214
|
-webkit-text-stroke-width: thin;
|
|
22909
23215
|
`,
|
|
22910
|
-
queued:
|
|
23216
|
+
queued: import_react148.css`
|
|
22911
23217
|
opacity: 0.5;
|
|
22912
23218
|
`
|
|
22913
23219
|
};
|
|
22914
23220
|
return colorPerStatus[status];
|
|
22915
23221
|
}, [status, error, errorLevel]);
|
|
22916
|
-
return /* @__PURE__ */ (0,
|
|
22917
|
-
/* @__PURE__ */ (0,
|
|
22918
|
-
/* @__PURE__ */ (0,
|
|
23222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
23223
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
23224
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { children: [
|
|
22919
23225
|
children,
|
|
22920
|
-
/* @__PURE__ */ (0,
|
|
23226
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
22921
23227
|
] })
|
|
22922
23228
|
] });
|
|
22923
23229
|
};
|
|
22924
23230
|
|
|
22925
23231
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
22926
23232
|
init_emotion_jsx_shim();
|
|
22927
|
-
var
|
|
23233
|
+
var import_react151 = require("@emotion/react");
|
|
22928
23234
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
22929
|
-
var
|
|
23235
|
+
var import_react152 = require("react");
|
|
22930
23236
|
|
|
22931
23237
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
22932
23238
|
init_emotion_jsx_shim();
|
|
22933
|
-
var
|
|
22934
|
-
var segmentedControlRootStyles =
|
|
23239
|
+
var import_react150 = require("@emotion/react");
|
|
23240
|
+
var segmentedControlRootStyles = import_react150.css`
|
|
22935
23241
|
position: relative;
|
|
22936
23242
|
`;
|
|
22937
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
23243
|
+
var segmentedControlScrollIndicatorsStyles = import_react150.css`
|
|
22938
23244
|
position: absolute;
|
|
22939
23245
|
inset: 0;
|
|
22940
23246
|
z-index: 1;
|
|
@@ -22962,17 +23268,17 @@ var segmentedControlScrollIndicatorsStyles = import_react145.css`
|
|
|
22962
23268
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
22963
23269
|
}
|
|
22964
23270
|
`;
|
|
22965
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
23271
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react150.css`
|
|
22966
23272
|
&::before {
|
|
22967
23273
|
opacity: 1;
|
|
22968
23274
|
}
|
|
22969
23275
|
`;
|
|
22970
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
23276
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react150.css`
|
|
22971
23277
|
&::after {
|
|
22972
23278
|
opacity: 1;
|
|
22973
23279
|
}
|
|
22974
23280
|
`;
|
|
22975
|
-
var segmentedControlWrapperStyles =
|
|
23281
|
+
var segmentedControlWrapperStyles = import_react150.css`
|
|
22976
23282
|
overflow-y: auto;
|
|
22977
23283
|
scroll-behavior: smooth;
|
|
22978
23284
|
scrollbar-width: none;
|
|
@@ -22981,7 +23287,7 @@ var segmentedControlWrapperStyles = import_react145.css`
|
|
|
22981
23287
|
height: 0px;
|
|
22982
23288
|
}
|
|
22983
23289
|
`;
|
|
22984
|
-
var segmentedControlStyles =
|
|
23290
|
+
var segmentedControlStyles = import_react150.css`
|
|
22985
23291
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
22986
23292
|
--segmented-control-border-width: 1px;
|
|
22987
23293
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -23000,14 +23306,14 @@ var segmentedControlStyles = import_react145.css`
|
|
|
23000
23306
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
23001
23307
|
font-size: var(--fs-xs);
|
|
23002
23308
|
`;
|
|
23003
|
-
var segmentedControlVerticalStyles =
|
|
23309
|
+
var segmentedControlVerticalStyles = import_react150.css`
|
|
23004
23310
|
flex-direction: column;
|
|
23005
23311
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
23006
23312
|
var(--segmented-control-rounded-value) 0 0;
|
|
23007
23313
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
23008
23314
|
var(--segmented-control-rounded-value);
|
|
23009
23315
|
`;
|
|
23010
|
-
var segmentedControlItemStyles =
|
|
23316
|
+
var segmentedControlItemStyles = import_react150.css`
|
|
23011
23317
|
&:first-of-type label {
|
|
23012
23318
|
border-radius: var(--segmented-control-first-border-radius);
|
|
23013
23319
|
}
|
|
@@ -23015,10 +23321,10 @@ var segmentedControlItemStyles = import_react145.css`
|
|
|
23015
23321
|
border-radius: var(--segmented-control-last-border-radius);
|
|
23016
23322
|
}
|
|
23017
23323
|
`;
|
|
23018
|
-
var segmentedControlInputStyles =
|
|
23324
|
+
var segmentedControlInputStyles = import_react150.css`
|
|
23019
23325
|
${accessibleHidden}
|
|
23020
23326
|
`;
|
|
23021
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
23327
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react150.css`
|
|
23022
23328
|
position: relative;
|
|
23023
23329
|
display: flex;
|
|
23024
23330
|
align-items: center;
|
|
@@ -23085,25 +23391,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react145.css`
|
|
|
23085
23391
|
`}
|
|
23086
23392
|
}
|
|
23087
23393
|
`;
|
|
23088
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
23394
|
+
var segmentedControlLabelIconOnlyStyles = import_react150.css`
|
|
23089
23395
|
padding-inline: 0.5em;
|
|
23090
23396
|
`;
|
|
23091
|
-
var segmentedControlLabelCheckStyles =
|
|
23397
|
+
var segmentedControlLabelCheckStyles = import_react150.css`
|
|
23092
23398
|
opacity: 0.5;
|
|
23093
23399
|
`;
|
|
23094
|
-
var segmentedControlLabelContentStyles =
|
|
23400
|
+
var segmentedControlLabelContentStyles = import_react150.css`
|
|
23095
23401
|
display: flex;
|
|
23096
23402
|
align-items: center;
|
|
23097
23403
|
justify-content: center;
|
|
23098
23404
|
gap: var(--spacing-sm);
|
|
23099
23405
|
height: 100%;
|
|
23100
23406
|
`;
|
|
23101
|
-
var segmentedControlLabelTextStyles =
|
|
23407
|
+
var segmentedControlLabelTextStyles = import_react150.css`
|
|
23102
23408
|
white-space: nowrap;
|
|
23103
23409
|
`;
|
|
23104
23410
|
|
|
23105
23411
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23106
|
-
var
|
|
23412
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
23107
23413
|
var SegmentedControl = ({
|
|
23108
23414
|
name,
|
|
23109
23415
|
options,
|
|
@@ -23118,10 +23424,10 @@ var SegmentedControl = ({
|
|
|
23118
23424
|
currentBackgroundColor = "white",
|
|
23119
23425
|
...props
|
|
23120
23426
|
}) => {
|
|
23121
|
-
const wrapperRef = (0,
|
|
23122
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
23123
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
23124
|
-
const onOptionChange = (0,
|
|
23427
|
+
const wrapperRef = (0, import_react152.useRef)(null);
|
|
23428
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react152.useState)(false);
|
|
23429
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react152.useState)(false);
|
|
23430
|
+
const onOptionChange = (0, import_react152.useCallback)(
|
|
23125
23431
|
(event) => {
|
|
23126
23432
|
if (event.target.checked) {
|
|
23127
23433
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -23129,19 +23435,19 @@ var SegmentedControl = ({
|
|
|
23129
23435
|
},
|
|
23130
23436
|
[options, onChange]
|
|
23131
23437
|
);
|
|
23132
|
-
const sizeStyles = (0,
|
|
23438
|
+
const sizeStyles = (0, import_react152.useMemo)(() => {
|
|
23133
23439
|
const map = {
|
|
23134
|
-
sm: (0,
|
|
23135
|
-
md: (0,
|
|
23136
|
-
lg: (0,
|
|
23137
|
-
xl: (0,
|
|
23440
|
+
sm: (0, import_react151.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
23441
|
+
md: (0, import_react151.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
23442
|
+
lg: (0, import_react151.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
23443
|
+
xl: (0, import_react151.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
23138
23444
|
};
|
|
23139
23445
|
return map[size];
|
|
23140
23446
|
}, [size]);
|
|
23141
|
-
const isIconOnly = (0,
|
|
23447
|
+
const isIconOnly = (0, import_react152.useMemo)(() => {
|
|
23142
23448
|
return options.every((option) => option && option.icon && !option.label);
|
|
23143
23449
|
}, [options]);
|
|
23144
|
-
(0,
|
|
23450
|
+
(0, import_react152.useEffect)(() => {
|
|
23145
23451
|
const wrapperElement = wrapperRef.current;
|
|
23146
23452
|
const onScroll = () => {
|
|
23147
23453
|
if (!wrapperElement) {
|
|
@@ -23162,8 +23468,8 @@ var SegmentedControl = ({
|
|
|
23162
23468
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
23163
23469
|
};
|
|
23164
23470
|
}, []);
|
|
23165
|
-
return /* @__PURE__ */ (0,
|
|
23166
|
-
/* @__PURE__ */ (0,
|
|
23471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
23472
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
23167
23473
|
"div",
|
|
23168
23474
|
{
|
|
23169
23475
|
css: [
|
|
@@ -23179,12 +23485,12 @@ var SegmentedControl = ({
|
|
|
23179
23485
|
}
|
|
23180
23486
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
23181
23487
|
const isDisabled = disabled2 || option.disabled;
|
|
23182
|
-
return /* @__PURE__ */ (0,
|
|
23488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
23183
23489
|
"div",
|
|
23184
23490
|
{
|
|
23185
23491
|
css: segmentedControlItemStyles,
|
|
23186
23492
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
23187
|
-
children: /* @__PURE__ */ (0,
|
|
23493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
23188
23494
|
"label",
|
|
23189
23495
|
{
|
|
23190
23496
|
css: [
|
|
@@ -23193,7 +23499,7 @@ var SegmentedControl = ({
|
|
|
23193
23499
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
23194
23500
|
],
|
|
23195
23501
|
children: [
|
|
23196
|
-
/* @__PURE__ */ (0,
|
|
23502
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
23197
23503
|
"input",
|
|
23198
23504
|
{
|
|
23199
23505
|
css: segmentedControlInputStyles,
|
|
@@ -23205,10 +23511,10 @@ var SegmentedControl = ({
|
|
|
23205
23511
|
disabled: isDisabled
|
|
23206
23512
|
}
|
|
23207
23513
|
),
|
|
23208
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
23209
|
-
/* @__PURE__ */ (0,
|
|
23210
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
23211
|
-
!text || hideOptionText ? null : /* @__PURE__ */ (0,
|
|
23514
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
23515
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
23516
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
23517
|
+
!text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
23212
23518
|
] })
|
|
23213
23519
|
]
|
|
23214
23520
|
}
|
|
@@ -23218,7 +23524,7 @@ var SegmentedControl = ({
|
|
|
23218
23524
|
})
|
|
23219
23525
|
}
|
|
23220
23526
|
) }),
|
|
23221
|
-
/* @__PURE__ */ (0,
|
|
23527
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
23222
23528
|
"div",
|
|
23223
23529
|
{
|
|
23224
23530
|
css: [
|
|
@@ -23236,18 +23542,18 @@ init_emotion_jsx_shim();
|
|
|
23236
23542
|
|
|
23237
23543
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
23238
23544
|
init_emotion_jsx_shim();
|
|
23239
|
-
var
|
|
23240
|
-
var lightFadingOut =
|
|
23545
|
+
var import_react153 = require("@emotion/react");
|
|
23546
|
+
var lightFadingOut = import_react153.keyframes`
|
|
23241
23547
|
from { opacity: 0.1; }
|
|
23242
23548
|
to { opacity: 0.025; }
|
|
23243
23549
|
`;
|
|
23244
|
-
var skeletonStyles =
|
|
23550
|
+
var skeletonStyles = import_react153.css`
|
|
23245
23551
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
23246
23552
|
background-color: var(--gray-900);
|
|
23247
23553
|
`;
|
|
23248
23554
|
|
|
23249
23555
|
// src/components/Skeleton/Skeleton.tsx
|
|
23250
|
-
var
|
|
23556
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23251
23557
|
var Skeleton = ({
|
|
23252
23558
|
width = "100%",
|
|
23253
23559
|
height = "1.25rem",
|
|
@@ -23255,7 +23561,7 @@ var Skeleton = ({
|
|
|
23255
23561
|
circle = false,
|
|
23256
23562
|
children,
|
|
23257
23563
|
...otherProps
|
|
23258
|
-
}) => /* @__PURE__ */ (0,
|
|
23564
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23259
23565
|
"div",
|
|
23260
23566
|
{
|
|
23261
23567
|
css: [
|
|
@@ -23280,8 +23586,8 @@ var React24 = __toESM(require("react"));
|
|
|
23280
23586
|
|
|
23281
23587
|
// src/components/Switch/Switch.styles.ts
|
|
23282
23588
|
init_emotion_jsx_shim();
|
|
23283
|
-
var
|
|
23284
|
-
var SwitchInputContainer =
|
|
23589
|
+
var import_react154 = require("@emotion/react");
|
|
23590
|
+
var SwitchInputContainer = import_react154.css`
|
|
23285
23591
|
cursor: pointer;
|
|
23286
23592
|
display: inline-block;
|
|
23287
23593
|
position: relative;
|
|
@@ -23290,7 +23596,7 @@ var SwitchInputContainer = import_react149.css`
|
|
|
23290
23596
|
vertical-align: middle;
|
|
23291
23597
|
user-select: none;
|
|
23292
23598
|
`;
|
|
23293
|
-
var SwitchInput =
|
|
23599
|
+
var SwitchInput = import_react154.css`
|
|
23294
23600
|
appearance: none;
|
|
23295
23601
|
border-radius: var(--rounded-full);
|
|
23296
23602
|
background-color: var(--white);
|
|
@@ -23328,7 +23634,7 @@ var SwitchInput = import_react149.css`
|
|
|
23328
23634
|
cursor: not-allowed;
|
|
23329
23635
|
}
|
|
23330
23636
|
`;
|
|
23331
|
-
var SwitchInputDisabled =
|
|
23637
|
+
var SwitchInputDisabled = import_react154.css`
|
|
23332
23638
|
opacity: var(--opacity-50);
|
|
23333
23639
|
cursor: not-allowed;
|
|
23334
23640
|
|
|
@@ -23336,7 +23642,7 @@ var SwitchInputDisabled = import_react149.css`
|
|
|
23336
23642
|
cursor: not-allowed;
|
|
23337
23643
|
}
|
|
23338
23644
|
`;
|
|
23339
|
-
var SwitchInputLabel =
|
|
23645
|
+
var SwitchInputLabel = import_react154.css`
|
|
23340
23646
|
align-items: center;
|
|
23341
23647
|
color: var(--typography-base);
|
|
23342
23648
|
display: inline-flex;
|
|
@@ -23357,26 +23663,26 @@ var SwitchInputLabel = import_react149.css`
|
|
|
23357
23663
|
top: 0;
|
|
23358
23664
|
}
|
|
23359
23665
|
`;
|
|
23360
|
-
var SwitchText =
|
|
23666
|
+
var SwitchText = import_react154.css`
|
|
23361
23667
|
color: var(--gray-500);
|
|
23362
23668
|
font-size: var(--fs-sm);
|
|
23363
23669
|
padding-inline: var(--spacing-2xl) 0;
|
|
23364
23670
|
`;
|
|
23365
23671
|
|
|
23366
23672
|
// src/components/Switch/Switch.tsx
|
|
23367
|
-
var
|
|
23673
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23368
23674
|
var Switch = React24.forwardRef(
|
|
23369
23675
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
23370
23676
|
let additionalText = infoText;
|
|
23371
23677
|
if (infoText && toggleText) {
|
|
23372
23678
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
23373
23679
|
}
|
|
23374
|
-
return /* @__PURE__ */ (0,
|
|
23375
|
-
/* @__PURE__ */ (0,
|
|
23376
|
-
/* @__PURE__ */ (0,
|
|
23377
|
-
/* @__PURE__ */ (0,
|
|
23680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
23681
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
23682
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
23683
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { css: SwitchInputLabel, children: label })
|
|
23378
23684
|
] }),
|
|
23379
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
23685
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { css: SwitchText, children: additionalText }) : null,
|
|
23380
23686
|
children
|
|
23381
23687
|
] });
|
|
23382
23688
|
}
|
|
@@ -23388,79 +23694,87 @@ var React25 = __toESM(require("react"));
|
|
|
23388
23694
|
|
|
23389
23695
|
// src/components/Table/Table.styles.ts
|
|
23390
23696
|
init_emotion_jsx_shim();
|
|
23391
|
-
var
|
|
23392
|
-
var table = ({ cellPadding = "var(--spacing-
|
|
23697
|
+
var import_react155 = require("@emotion/react");
|
|
23698
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react155.css`
|
|
23393
23699
|
border-bottom: 1px solid var(--gray-400);
|
|
23394
23700
|
border-collapse: collapse;
|
|
23395
23701
|
min-width: 100%;
|
|
23396
23702
|
table-layout: auto;
|
|
23703
|
+
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
23397
23704
|
|
|
23398
23705
|
th,
|
|
23399
23706
|
td {
|
|
23400
23707
|
padding: ${cellPadding};
|
|
23401
23708
|
}
|
|
23709
|
+
|
|
23710
|
+
thead tr {
|
|
23711
|
+
border-color: var(--gray-300);
|
|
23712
|
+
}
|
|
23713
|
+
|
|
23714
|
+
tbody tr:hover {
|
|
23715
|
+
background-color: var(--gray-50);
|
|
23716
|
+
}
|
|
23402
23717
|
`;
|
|
23403
|
-
var tableHead =
|
|
23404
|
-
background: var(--gray-100);
|
|
23718
|
+
var tableHead = import_react155.css`
|
|
23405
23719
|
color: var(--typography-base);
|
|
23406
23720
|
text-align: left;
|
|
23407
23721
|
`;
|
|
23408
|
-
var tableRow =
|
|
23409
|
-
border-bottom: 1px solid var(--gray-
|
|
23722
|
+
var tableRow = import_react155.css`
|
|
23723
|
+
border-bottom: 1px solid var(--gray-100);
|
|
23410
23724
|
`;
|
|
23411
|
-
var tableCellHead =
|
|
23725
|
+
var tableCellHead = import_react155.css`
|
|
23412
23726
|
font-size: var(--fs-sm);
|
|
23413
23727
|
text-transform: uppercase;
|
|
23414
23728
|
font-weight: var(--fw-bold);
|
|
23415
23729
|
`;
|
|
23416
23730
|
|
|
23417
23731
|
// src/components/Table/Table.tsx
|
|
23418
|
-
var
|
|
23732
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
23419
23733
|
var Table = React25.forwardRef(
|
|
23420
23734
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
23421
|
-
return /* @__PURE__ */ (0,
|
|
23735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
23422
23736
|
}
|
|
23423
23737
|
);
|
|
23424
23738
|
var TableHead = React25.forwardRef(
|
|
23425
23739
|
({ children, ...otherProps }, ref) => {
|
|
23426
|
-
return /* @__PURE__ */ (0,
|
|
23740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
23427
23741
|
}
|
|
23428
23742
|
);
|
|
23429
23743
|
var TableBody = React25.forwardRef(
|
|
23430
23744
|
({ children, ...otherProps }, ref) => {
|
|
23431
|
-
return /* @__PURE__ */ (0,
|
|
23745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("tbody", { ref, ...otherProps, children });
|
|
23432
23746
|
}
|
|
23433
23747
|
);
|
|
23434
23748
|
var TableFoot = React25.forwardRef(
|
|
23435
23749
|
({ children, ...otherProps }, ref) => {
|
|
23436
|
-
return /* @__PURE__ */ (0,
|
|
23750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("tfoot", { ref, ...otherProps, children });
|
|
23437
23751
|
}
|
|
23438
23752
|
);
|
|
23439
23753
|
var TableRow = React25.forwardRef(
|
|
23440
23754
|
({ children, ...otherProps }, ref) => {
|
|
23441
|
-
return /* @__PURE__ */ (0,
|
|
23755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
23442
23756
|
}
|
|
23443
23757
|
);
|
|
23444
23758
|
var TableCellHead = React25.forwardRef(
|
|
23445
23759
|
({ children, ...otherProps }, ref) => {
|
|
23446
|
-
return /* @__PURE__ */ (0,
|
|
23760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
23447
23761
|
}
|
|
23448
23762
|
);
|
|
23449
23763
|
var TableCellData = React25.forwardRef(
|
|
23450
23764
|
({ children, ...otherProps }, ref) => {
|
|
23451
|
-
return /* @__PURE__ */ (0,
|
|
23765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("td", { ref, ...otherProps, children });
|
|
23452
23766
|
}
|
|
23453
23767
|
);
|
|
23454
23768
|
|
|
23455
23769
|
// src/components/Tabs/Tabs.tsx
|
|
23456
23770
|
init_emotion_jsx_shim();
|
|
23457
|
-
var
|
|
23458
|
-
var
|
|
23771
|
+
var import_react157 = require("@ariakit/react");
|
|
23772
|
+
var import_react158 = require("react");
|
|
23459
23773
|
|
|
23460
23774
|
// src/components/Tabs/Tabs.styles.ts
|
|
23461
23775
|
init_emotion_jsx_shim();
|
|
23462
|
-
var
|
|
23463
|
-
var tabButtonStyles =
|
|
23776
|
+
var import_react156 = require("@emotion/react");
|
|
23777
|
+
var tabButtonStyles = import_react156.css`
|
|
23464
23778
|
align-items: center;
|
|
23465
23779
|
border: 0;
|
|
23466
23780
|
height: 2.5rem;
|
|
@@ -23477,16 +23791,16 @@ var tabButtonStyles = import_react151.css`
|
|
|
23477
23791
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
23478
23792
|
}
|
|
23479
23793
|
`;
|
|
23480
|
-
var tabButtonGroupStyles =
|
|
23794
|
+
var tabButtonGroupStyles = import_react156.css`
|
|
23481
23795
|
display: flex;
|
|
23482
23796
|
gap: var(--spacing-base);
|
|
23483
23797
|
border-bottom: 1px solid var(--gray-300);
|
|
23484
23798
|
`;
|
|
23485
23799
|
|
|
23486
23800
|
// src/components/Tabs/Tabs.tsx
|
|
23487
|
-
var
|
|
23801
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
23488
23802
|
var useCurrentTab = () => {
|
|
23489
|
-
const context = (0,
|
|
23803
|
+
const context = (0, import_react157.useTabStore)();
|
|
23490
23804
|
if (!context) {
|
|
23491
23805
|
throw new Error("This component can only be used inside <Tabs>");
|
|
23492
23806
|
}
|
|
@@ -23500,13 +23814,13 @@ var Tabs = ({
|
|
|
23500
23814
|
manual,
|
|
23501
23815
|
...props
|
|
23502
23816
|
}) => {
|
|
23503
|
-
const selected = (0,
|
|
23817
|
+
const selected = (0, import_react158.useMemo)(() => {
|
|
23504
23818
|
if (selectedId)
|
|
23505
23819
|
return selectedId;
|
|
23506
23820
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
23507
23821
|
}, [selectedId, useHashForState]);
|
|
23508
|
-
const tab = (0,
|
|
23509
|
-
const onTabSelect = (0,
|
|
23822
|
+
const tab = (0, import_react157.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
23823
|
+
const onTabSelect = (0, import_react158.useCallback)(
|
|
23510
23824
|
(value) => {
|
|
23511
23825
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
23512
23826
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -23517,28 +23831,28 @@ var Tabs = ({
|
|
|
23517
23831
|
},
|
|
23518
23832
|
[onSelectedIdChange, useHashForState]
|
|
23519
23833
|
);
|
|
23520
|
-
(0,
|
|
23834
|
+
(0, import_react158.useEffect)(() => {
|
|
23521
23835
|
if (selected && selected !== tab.getState().activeId) {
|
|
23522
23836
|
tab.setSelectedId(selected);
|
|
23523
23837
|
}
|
|
23524
23838
|
}, [selected, tab]);
|
|
23525
|
-
return /* @__PURE__ */ (0,
|
|
23839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react157.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
23526
23840
|
};
|
|
23527
23841
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
23528
|
-
return /* @__PURE__ */ (0,
|
|
23842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react157.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
23529
23843
|
};
|
|
23530
23844
|
var TabButton = ({
|
|
23531
23845
|
children,
|
|
23532
23846
|
id,
|
|
23533
23847
|
...props
|
|
23534
23848
|
}) => {
|
|
23535
|
-
return /* @__PURE__ */ (0,
|
|
23849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react157.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
23536
23850
|
};
|
|
23537
23851
|
var TabContent = ({
|
|
23538
23852
|
children,
|
|
23539
23853
|
...props
|
|
23540
23854
|
}) => {
|
|
23541
|
-
return /* @__PURE__ */ (0,
|
|
23855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react157.TabPanel, { ...props, children });
|
|
23542
23856
|
};
|
|
23543
23857
|
|
|
23544
23858
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -23546,8 +23860,8 @@ init_emotion_jsx_shim();
|
|
|
23546
23860
|
|
|
23547
23861
|
// src/components/Validation/StatusBullet.styles.ts
|
|
23548
23862
|
init_emotion_jsx_shim();
|
|
23549
|
-
var
|
|
23550
|
-
var StatusBulletContainer =
|
|
23863
|
+
var import_react159 = require("@emotion/react");
|
|
23864
|
+
var StatusBulletContainer = import_react159.css`
|
|
23551
23865
|
align-items: center;
|
|
23552
23866
|
align-self: center;
|
|
23553
23867
|
color: var(--gray-500);
|
|
@@ -23564,33 +23878,33 @@ var StatusBulletContainer = import_react154.css`
|
|
|
23564
23878
|
display: block;
|
|
23565
23879
|
}
|
|
23566
23880
|
`;
|
|
23567
|
-
var StatusBulletBase =
|
|
23881
|
+
var StatusBulletBase = import_react159.css`
|
|
23568
23882
|
font-size: var(--fs-sm);
|
|
23569
23883
|
&:before {
|
|
23570
23884
|
width: var(--fs-xs);
|
|
23571
23885
|
height: var(--fs-xs);
|
|
23572
23886
|
}
|
|
23573
23887
|
`;
|
|
23574
|
-
var StatusBulletSmall =
|
|
23888
|
+
var StatusBulletSmall = import_react159.css`
|
|
23575
23889
|
font-size: var(--fs-xs);
|
|
23576
23890
|
&:before {
|
|
23577
23891
|
width: var(--fs-xxs);
|
|
23578
23892
|
height: var(--fs-xxs);
|
|
23579
23893
|
}
|
|
23580
23894
|
`;
|
|
23581
|
-
var StatusDraft =
|
|
23895
|
+
var StatusDraft = import_react159.css`
|
|
23582
23896
|
&:before {
|
|
23583
23897
|
background: var(--white);
|
|
23584
23898
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
23585
23899
|
}
|
|
23586
23900
|
`;
|
|
23587
|
-
var StatusModified =
|
|
23901
|
+
var StatusModified = import_react159.css`
|
|
23588
23902
|
&:before {
|
|
23589
23903
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
23590
23904
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
23591
23905
|
}
|
|
23592
23906
|
`;
|
|
23593
|
-
var StatusError =
|
|
23907
|
+
var StatusError = import_react159.css`
|
|
23594
23908
|
color: var(--error);
|
|
23595
23909
|
&:before {
|
|
23596
23910
|
/* TODO: replace this with an svg icon */
|
|
@@ -23603,29 +23917,29 @@ var StatusError = import_react154.css`
|
|
|
23603
23917
|
);
|
|
23604
23918
|
}
|
|
23605
23919
|
`;
|
|
23606
|
-
var StatusPublished =
|
|
23920
|
+
var StatusPublished = import_react159.css`
|
|
23607
23921
|
&:before {
|
|
23608
23922
|
background: var(--accent-dark);
|
|
23609
23923
|
}
|
|
23610
23924
|
`;
|
|
23611
|
-
var StatusOrphan =
|
|
23925
|
+
var StatusOrphan = import_react159.css`
|
|
23612
23926
|
&:before {
|
|
23613
23927
|
background: var(--brand-secondary-5);
|
|
23614
23928
|
}
|
|
23615
23929
|
`;
|
|
23616
|
-
var StatusUnknown =
|
|
23930
|
+
var StatusUnknown = import_react159.css`
|
|
23617
23931
|
&:before {
|
|
23618
23932
|
background: var(--gray-800);
|
|
23619
23933
|
}
|
|
23620
23934
|
`;
|
|
23621
|
-
var StatusDeleted =
|
|
23935
|
+
var StatusDeleted = import_react159.css`
|
|
23622
23936
|
&:before {
|
|
23623
23937
|
background: var(--error);
|
|
23624
23938
|
}
|
|
23625
23939
|
`;
|
|
23626
23940
|
|
|
23627
23941
|
// src/components/Validation/StatusBullet.tsx
|
|
23628
|
-
var
|
|
23942
|
+
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
23629
23943
|
var StatusBullet = ({
|
|
23630
23944
|
status,
|
|
23631
23945
|
hideText = false,
|
|
@@ -23645,7 +23959,7 @@ var StatusBullet = ({
|
|
|
23645
23959
|
Deleted: StatusDeleted
|
|
23646
23960
|
};
|
|
23647
23961
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
23648
|
-
return /* @__PURE__ */ (0,
|
|
23962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
23649
23963
|
"span",
|
|
23650
23964
|
{
|
|
23651
23965
|
role: "status",
|
|
@@ -23746,6 +24060,13 @@ var StatusBullet = ({
|
|
|
23746
24060
|
Modal,
|
|
23747
24061
|
ModalDialog,
|
|
23748
24062
|
MultilineChip,
|
|
24063
|
+
ObjectGridContainer,
|
|
24064
|
+
ObjectGridItem,
|
|
24065
|
+
ObjectGridItemCardCover,
|
|
24066
|
+
ObjectGridItemCover,
|
|
24067
|
+
ObjectGridItemCoverButton,
|
|
24068
|
+
ObjectGridItemHeading,
|
|
24069
|
+
ObjectGridItemIconWithTooltip,
|
|
23749
24070
|
PageHeaderSection,
|
|
23750
24071
|
Pagination,
|
|
23751
24072
|
Paragraph,
|