@uniformdev/design-system 19.166.1 → 19.167.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +1062 -642
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +1067 -655
- package/package.json +8 -4
package/dist/index.js
CHANGED
|
@@ -1410,6 +1410,7 @@ __export(src_exports, {
|
|
|
1410
1410
|
IntegrationModalIcon: () => IntegrationModalIcon,
|
|
1411
1411
|
IntegrationTile: () => IntegrationTile,
|
|
1412
1412
|
JsonEditor: () => JsonEditor,
|
|
1413
|
+
KeyValueInput: () => KeyValueInput,
|
|
1413
1414
|
Label: () => Label,
|
|
1414
1415
|
LabelLeadingIcon: () => LabelLeadingIcon,
|
|
1415
1416
|
Legend: () => Legend,
|
|
@@ -1587,6 +1588,7 @@ __export(src_exports, {
|
|
|
1587
1588
|
toast: () => import_react_toastify.toast,
|
|
1588
1589
|
uniformComponentIcon: () => uniformComponentIcon,
|
|
1589
1590
|
uniformComponentPatternIcon: () => uniformComponentPatternIcon,
|
|
1591
|
+
uniformCompositionPatternIcon: () => uniformCompositionPatternIcon,
|
|
1590
1592
|
uniformContentTypeIcon: () => uniformContentTypeIcon,
|
|
1591
1593
|
uniformEntryIcon: () => uniformEntryIcon,
|
|
1592
1594
|
uniformEntryPatternIcon: () => uniformEntryPatternIcon,
|
|
@@ -4798,6 +4800,25 @@ var uniformComponentPatternIcon = (0, import_all_files2.GenIcon)({
|
|
|
4798
4800
|
}
|
|
4799
4801
|
]
|
|
4800
4802
|
});
|
|
4803
|
+
var uniformCompositionPatternIcon = (0, import_all_files2.GenIcon)({
|
|
4804
|
+
tag: "svg",
|
|
4805
|
+
attr: {
|
|
4806
|
+
role: "img",
|
|
4807
|
+
viewBox: "0 0 24 24"
|
|
4808
|
+
},
|
|
4809
|
+
child: [
|
|
4810
|
+
{
|
|
4811
|
+
tag: "path",
|
|
4812
|
+
attr: {
|
|
4813
|
+
fillRule: "evenodd",
|
|
4814
|
+
clipRule: "evenodd",
|
|
4815
|
+
fill: "currentColor",
|
|
4816
|
+
d: "M6.92163 12H4V13.5H8.42163L6.92163 12ZM12.7397 17.8181C12.6083 17.9314 12.4372 18 12.25 18H3.25C2.83579 18 2.5 17.6642 2.5 17.25V6.75C2.5 6.33579 2.83579 6 3.25 6H8.5V9.75H9.17163L10.6716 8.25H10V6.07501C10.7159 6.22033 11.3577 6.56957 11.8622 7.05945L12.9229 5.99871C11.9761 5.07158 10.6798 4.5 9.25 4.5H3.25C2.00736 4.5 1 5.50736 1 6.75V17.25C1 18.4926 2.00736 19.5 3.25 19.5H12.25C12.8514 19.5 13.3977 19.2641 13.8013 18.8797L12.7397 17.8181ZM11.4216 16.5H4V15H9.92163L11.4216 16.5ZM4 10.5H7V9H4V10.5ZM12.5784 12L16.3497 8.22876L20.1209 12L16.3497 15.7712L12.5784 12ZM16.3497 18.5997L9.75 12L16.3497 5.40034L22.9493 12L16.3497 18.5997Z"
|
|
4817
|
+
},
|
|
4818
|
+
child: []
|
|
4819
|
+
}
|
|
4820
|
+
]
|
|
4821
|
+
});
|
|
4801
4822
|
var uniformContentTypeIcon = import_CgList2.CgList;
|
|
4802
4823
|
var uniformEntryIcon = import_CgPen2.CgPen;
|
|
4803
4824
|
var uniformEntryPatternIcon = (0, import_all_files2.GenIcon)({
|
|
@@ -15843,6 +15864,7 @@ var container = import_react59.css`
|
|
|
15843
15864
|
--calendar-cell-size: 1.8rem;
|
|
15844
15865
|
width: fit-content;
|
|
15845
15866
|
max-width: 100%;
|
|
15867
|
+
margin: 0 auto;
|
|
15846
15868
|
`;
|
|
15847
15869
|
var header = import_react59.css`
|
|
15848
15870
|
display: flex;
|
|
@@ -17076,12 +17098,21 @@ var trigger = import_react74.css`
|
|
|
17076
17098
|
var popover = import_react74.css`
|
|
17077
17099
|
padding: var(--spacing-md);
|
|
17078
17100
|
max-width: none;
|
|
17079
|
-
|
|
17080
|
-
|
|
17081
|
-
|
|
17101
|
+
container-type: inline-size;
|
|
17102
|
+
width: 100%;
|
|
17103
|
+
`;
|
|
17104
|
+
var popoverInnerContent = import_react74.css`
|
|
17105
|
+
display: grid;
|
|
17106
|
+
gap: var(--spacing-base);
|
|
17082
17107
|
|
|
17083
|
-
|
|
17084
|
-
grid-template-
|
|
17108
|
+
${cq("360px")} {
|
|
17109
|
+
grid-template-columns: 0.8fr 1fr;
|
|
17110
|
+
grid-template-rows: 1fr 1fr;
|
|
17111
|
+
gap: var(--spacing-md);
|
|
17112
|
+
|
|
17113
|
+
[data-variant='date'] & {
|
|
17114
|
+
grid-template-rows: 1fr;
|
|
17115
|
+
}
|
|
17085
17116
|
}
|
|
17086
17117
|
`;
|
|
17087
17118
|
var calendarSection = import_react74.css`
|
|
@@ -17100,6 +17131,15 @@ var timeSection = import_react74.css`
|
|
|
17100
17131
|
var tzSection = import_react74.css`
|
|
17101
17132
|
align-self: stretch;
|
|
17102
17133
|
`;
|
|
17134
|
+
var datePart = import_react74.css`
|
|
17135
|
+
text-overflow: ellipsis;
|
|
17136
|
+
overflow: hidden;
|
|
17137
|
+
white-space: nowrap;
|
|
17138
|
+
`;
|
|
17139
|
+
var datePartButton = import_react74.css`
|
|
17140
|
+
// this allows the button to be as wide as the text
|
|
17141
|
+
min-width: 0;
|
|
17142
|
+
`;
|
|
17103
17143
|
|
|
17104
17144
|
// src/components/DateTimePicker/DateTimePickerSummary.tsx
|
|
17105
17145
|
init_emotion_jsx_shim();
|
|
@@ -17138,10 +17178,10 @@ function DateTimePickerSummary({
|
|
|
17138
17178
|
}
|
|
17139
17179
|
}
|
|
17140
17180
|
}
|
|
17141
|
-
const
|
|
17181
|
+
const datePart2 = (value == null ? void 0 : value.datetime) ? dateFormat.format(new Date(value.datetime)) : null;
|
|
17142
17182
|
const timePart = (value == null ? void 0 : value.datetime) ? timeFormat.format(new Date(value.datetime)) : null;
|
|
17143
|
-
return
|
|
17144
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("em", { css: inputLabelFocal, children:
|
|
17183
|
+
return datePart2 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { css: datePart, children: [
|
|
17184
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("em", { css: inputLabelFocal, children: datePart2 }),
|
|
17145
17185
|
!!timePart && `, ${timePart}`,
|
|
17146
17186
|
!!(value == null ? void 0 : value.timeZone) && timeZoneWasValid && ` in ${value == null ? void 0 : value.timeZone}`
|
|
17147
17187
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: placeholder });
|
|
@@ -17321,7 +17361,7 @@ var DateTimePicker = ({
|
|
|
17321
17361
|
import_Popover.PopoverDisclosure,
|
|
17322
17362
|
{
|
|
17323
17363
|
...popover2,
|
|
17324
|
-
css:
|
|
17364
|
+
css: datePartButton,
|
|
17325
17365
|
as: Button,
|
|
17326
17366
|
buttonType: "ghostUnimportant",
|
|
17327
17367
|
disabled: disabled2,
|
|
@@ -17344,36 +17384,48 @@ var DateTimePicker = ({
|
|
|
17344
17384
|
}
|
|
17345
17385
|
),
|
|
17346
17386
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_Popover.Popover, { ...popover2, css: [Popover, popover], "aria-label": "Pick a date", children: [
|
|
17347
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.
|
|
17348
|
-
|
|
17349
|
-
|
|
17350
|
-
value: draftDate == null ? void 0 : draftDate.toString(),
|
|
17351
|
-
minValue: parsedMinVisible,
|
|
17352
|
-
maxValue: parseMaxVisible,
|
|
17353
|
-
timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
|
|
17354
|
-
onChange: handleDateChange,
|
|
17355
|
-
"data-testid": `${testId}-calendar`
|
|
17356
|
-
}
|
|
17357
|
-
) }),
|
|
17358
|
-
variant !== "date" /* Date */ && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: timeSection, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17359
|
-
InputTime,
|
|
17360
|
-
{
|
|
17361
|
-
label: "Time",
|
|
17362
|
-
value: draftTime == null ? void 0 : draftTime.toString(),
|
|
17363
|
-
belowInputSlot: belowTimeInputSlot,
|
|
17364
|
-
onChange: handleTimeChange
|
|
17365
|
-
}
|
|
17366
|
-
) }),
|
|
17367
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: tzSection, children: [
|
|
17368
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { css: labelText, children: "Timezone" }),
|
|
17369
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17370
|
-
InputComboBox,
|
|
17387
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: popoverInnerContent, children: [
|
|
17388
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: calendarSection, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17389
|
+
Calendar,
|
|
17371
17390
|
{
|
|
17372
|
-
value:
|
|
17373
|
-
|
|
17374
|
-
|
|
17391
|
+
value: draftDate == null ? void 0 : draftDate.toString(),
|
|
17392
|
+
minValue: parsedMinVisible,
|
|
17393
|
+
maxValue: parseMaxVisible,
|
|
17394
|
+
timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
|
|
17395
|
+
onChange: handleDateChange,
|
|
17396
|
+
"data-testid": `${testId}-calendar`
|
|
17375
17397
|
}
|
|
17376
|
-
)
|
|
17398
|
+
) }),
|
|
17399
|
+
variant !== "date" /* Date */ && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: timeSection, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17400
|
+
InputTime,
|
|
17401
|
+
{
|
|
17402
|
+
label: "Time",
|
|
17403
|
+
value: draftTime == null ? void 0 : draftTime.toString(),
|
|
17404
|
+
belowInputSlot: belowTimeInputSlot,
|
|
17405
|
+
onChange: handleTimeChange
|
|
17406
|
+
}
|
|
17407
|
+
) }),
|
|
17408
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: tzSection, children: [
|
|
17409
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { css: labelText, children: "Timezone" }),
|
|
17410
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17411
|
+
InputComboBox,
|
|
17412
|
+
{
|
|
17413
|
+
value: draftTimeZone,
|
|
17414
|
+
options: TIMEZONE_OPTIONS,
|
|
17415
|
+
onChange: handleTimezoneChange,
|
|
17416
|
+
menuPlacement: "auto",
|
|
17417
|
+
styles: {
|
|
17418
|
+
menu(base) {
|
|
17419
|
+
return {
|
|
17420
|
+
...base,
|
|
17421
|
+
width: "fit-content",
|
|
17422
|
+
right: 0
|
|
17423
|
+
};
|
|
17424
|
+
}
|
|
17425
|
+
}
|
|
17426
|
+
}
|
|
17427
|
+
)
|
|
17428
|
+
] })
|
|
17377
17429
|
] }),
|
|
17378
17430
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(HorizontalRhythm, { gap: "0", children: [
|
|
17379
17431
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { buttonType: "secondary", onClick: handleSelectClick, children: "Select" }),
|
|
@@ -19082,44 +19134,401 @@ var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
|
19082
19134
|
);
|
|
19083
19135
|
};
|
|
19084
19136
|
|
|
19137
|
+
// src/components/KeyValueInput/KeyValueInput.tsx
|
|
19138
|
+
init_emotion_jsx_shim();
|
|
19139
|
+
var import_core = require("@dnd-kit/core");
|
|
19140
|
+
var import_modifiers = require("@dnd-kit/modifiers");
|
|
19141
|
+
var import_sortable = require("@dnd-kit/sortable");
|
|
19142
|
+
var import_utilities = require("@dnd-kit/utilities");
|
|
19143
|
+
var import_react102 = require("react");
|
|
19144
|
+
|
|
19145
|
+
// src/utils/useDebouncedCallback.ts
|
|
19146
|
+
init_emotion_jsx_shim();
|
|
19147
|
+
var import_react100 = require("react");
|
|
19148
|
+
function useDebouncedCallback(callback, deps, delay, maxWait = 0) {
|
|
19149
|
+
const timeout = (0, import_react100.useRef)();
|
|
19150
|
+
const waitTimeout = (0, import_react100.useRef)();
|
|
19151
|
+
const cb = (0, import_react100.useRef)(callback);
|
|
19152
|
+
const lastCall = (0, import_react100.useRef)();
|
|
19153
|
+
const clear = () => {
|
|
19154
|
+
if (timeout.current) {
|
|
19155
|
+
clearTimeout(timeout.current);
|
|
19156
|
+
timeout.current = void 0;
|
|
19157
|
+
}
|
|
19158
|
+
if (waitTimeout.current) {
|
|
19159
|
+
clearTimeout(waitTimeout.current);
|
|
19160
|
+
waitTimeout.current = void 0;
|
|
19161
|
+
}
|
|
19162
|
+
};
|
|
19163
|
+
(0, import_react100.useEffect)(() => {
|
|
19164
|
+
return () => clear();
|
|
19165
|
+
}, []);
|
|
19166
|
+
(0, import_react100.useEffect)(() => {
|
|
19167
|
+
cb.current = callback;
|
|
19168
|
+
}, deps);
|
|
19169
|
+
return (0, import_react100.useMemo)(() => {
|
|
19170
|
+
const execute = () => {
|
|
19171
|
+
clear();
|
|
19172
|
+
if (!lastCall.current) return;
|
|
19173
|
+
const context = lastCall.current;
|
|
19174
|
+
lastCall.current = void 0;
|
|
19175
|
+
cb.current.apply(context.this, context.args);
|
|
19176
|
+
};
|
|
19177
|
+
const wrapped = function(...args) {
|
|
19178
|
+
if (timeout.current) {
|
|
19179
|
+
clearTimeout(timeout.current);
|
|
19180
|
+
}
|
|
19181
|
+
lastCall.current = { args, this: this };
|
|
19182
|
+
timeout.current = setTimeout(execute, delay);
|
|
19183
|
+
if (maxWait > 0 && !waitTimeout.current) {
|
|
19184
|
+
waitTimeout.current = setTimeout(execute, maxWait);
|
|
19185
|
+
}
|
|
19186
|
+
};
|
|
19187
|
+
Object.defineProperties(wrapped, {
|
|
19188
|
+
length: { value: callback.length },
|
|
19189
|
+
name: { value: `${callback.name || "anonymous"}__debounced__${delay}` }
|
|
19190
|
+
});
|
|
19191
|
+
return wrapped;
|
|
19192
|
+
}, [delay, maxWait, ...deps]);
|
|
19193
|
+
}
|
|
19194
|
+
|
|
19195
|
+
// src/components/KeyValueInput/KeyValueInput.styles.ts
|
|
19196
|
+
init_emotion_jsx_shim();
|
|
19197
|
+
var import_react101 = require("@emotion/react");
|
|
19198
|
+
var LabelStyles = import_react101.css`
|
|
19199
|
+
text-transform: uppercase;
|
|
19200
|
+
font-weight: var(--fw-medium);
|
|
19201
|
+
`;
|
|
19202
|
+
var SelectKeyValueRowStyles = import_react101.css`
|
|
19203
|
+
animation: var(--duration-fast) var(--timing-ease-out);
|
|
19204
|
+
align-items: flex-start;
|
|
19205
|
+
display: grid;
|
|
19206
|
+
grid-template-columns: repeat(2, 1fr) 1.5rem;
|
|
19207
|
+
gap: var(--spacing-sm);
|
|
19208
|
+
background-color: white;
|
|
19209
|
+
flex: 1;
|
|
19210
|
+
`;
|
|
19211
|
+
var DragHandle = import_react101.css`
|
|
19212
|
+
position: relative;
|
|
19213
|
+
height: 3.125rem;
|
|
19214
|
+
width: 1rem;
|
|
19215
|
+
cursor: grab;
|
|
19216
|
+
background: transparent;
|
|
19217
|
+
border: 0;
|
|
19218
|
+
|
|
19219
|
+
&::after {
|
|
19220
|
+
content: '';
|
|
19221
|
+
display: block;
|
|
19222
|
+
position: absolute;
|
|
19223
|
+
left: 2px;
|
|
19224
|
+
top: var(--spacing-xs);
|
|
19225
|
+
bottom: var(--spacing-xs);
|
|
19226
|
+
width: 5px;
|
|
19227
|
+
border: 2px dotted var(--gray-300);
|
|
19228
|
+
border-top: 0;
|
|
19229
|
+
border-bottom: 0;
|
|
19230
|
+
opacity: 1;
|
|
19231
|
+
}
|
|
19232
|
+
`;
|
|
19233
|
+
var DragHandleDisabled = import_react101.css`
|
|
19234
|
+
opacity: 0.3;
|
|
19235
|
+
pointer-events: none;
|
|
19236
|
+
`;
|
|
19237
|
+
var rowWrapper = import_react101.css`
|
|
19238
|
+
display: flex;
|
|
19239
|
+
background-color: white;
|
|
19240
|
+
border-radius: var(--rounded-sm);
|
|
19241
|
+
`;
|
|
19242
|
+
|
|
19243
|
+
// src/components/KeyValueInput/KeyValueInput.tsx
|
|
19244
|
+
var import_jsx_runtime90 = require("@emotion/react/jsx-runtime");
|
|
19245
|
+
var initialSelectOptionValue = { key: "", value: "" };
|
|
19246
|
+
var generateItemId = (item, index) => item.uniqueId || item.value || item.key || `$index-${index}`;
|
|
19247
|
+
var KeyValueInput = ({
|
|
19248
|
+
value,
|
|
19249
|
+
onChange,
|
|
19250
|
+
label = "Options",
|
|
19251
|
+
newItemDefault = initialSelectOptionValue,
|
|
19252
|
+
keyLabel = "Text",
|
|
19253
|
+
valueLabel = "Value",
|
|
19254
|
+
keyInfoPopover,
|
|
19255
|
+
valueInfoPopover,
|
|
19256
|
+
disabled: disabled2,
|
|
19257
|
+
errors,
|
|
19258
|
+
onFocusChange
|
|
19259
|
+
}) => {
|
|
19260
|
+
const [isDragging, setIsDragging] = (0, import_react102.useState)(false);
|
|
19261
|
+
const popoverStoresMap = (0, import_react102.useRef)({});
|
|
19262
|
+
const lastRowFirstInputRef = (0, import_react102.useRef)(null);
|
|
19263
|
+
const sensors = (0, import_core.useSensors)(
|
|
19264
|
+
(0, import_core.useSensor)(import_core.PointerSensor),
|
|
19265
|
+
(0, import_core.useSensor)(import_core.KeyboardSensor, {
|
|
19266
|
+
coordinateGetter: import_sortable.sortableKeyboardCoordinates
|
|
19267
|
+
})
|
|
19268
|
+
);
|
|
19269
|
+
const valueWithIds = (0, import_react102.useMemo)(() => {
|
|
19270
|
+
return value.map((item, index) => ({ ...item, id: generateItemId(item, index) }));
|
|
19271
|
+
}, [value]);
|
|
19272
|
+
const handleAddOptionRow = (0, import_react102.useCallback)(() => {
|
|
19273
|
+
onChange([...value, newItemDefault]);
|
|
19274
|
+
}, [onChange, value, newItemDefault]);
|
|
19275
|
+
const handleDeleteOptionRow = (0, import_react102.useCallback)(
|
|
19276
|
+
(deleteIndex) => {
|
|
19277
|
+
const updatedOptions = value.filter((_, index) => index !== deleteIndex);
|
|
19278
|
+
onChange(updatedOptions);
|
|
19279
|
+
},
|
|
19280
|
+
[value, onChange]
|
|
19281
|
+
);
|
|
19282
|
+
const handleFocusChange = useDebouncedCallback(
|
|
19283
|
+
(isFocused) => {
|
|
19284
|
+
onFocusChange == null ? void 0 : onFocusChange(isFocused);
|
|
19285
|
+
},
|
|
19286
|
+
[onFocusChange],
|
|
19287
|
+
300
|
|
19288
|
+
);
|
|
19289
|
+
const handleUpdateOptionRow = (0, import_react102.useCallback)(
|
|
19290
|
+
(rowIndex, rowValue) => {
|
|
19291
|
+
onChange(
|
|
19292
|
+
value.map((item, index) => {
|
|
19293
|
+
if (index === rowIndex) {
|
|
19294
|
+
return rowValue;
|
|
19295
|
+
}
|
|
19296
|
+
return item;
|
|
19297
|
+
})
|
|
19298
|
+
);
|
|
19299
|
+
},
|
|
19300
|
+
[onChange, value]
|
|
19301
|
+
);
|
|
19302
|
+
const handleDragEnd = (0, import_react102.useCallback)(
|
|
19303
|
+
(e) => {
|
|
19304
|
+
setIsDragging(false);
|
|
19305
|
+
const { active: active2, over } = e;
|
|
19306
|
+
if (!(over == null ? void 0 : over.id) || active2.id === over.id) {
|
|
19307
|
+
return;
|
|
19308
|
+
}
|
|
19309
|
+
const activeIndex = valueWithIds.findIndex(({ id }) => id === active2.id);
|
|
19310
|
+
const overIndex = valueWithIds.findIndex(({ id }) => id === over.id);
|
|
19311
|
+
onChange((0, import_sortable.arrayMove)(value, activeIndex, overIndex));
|
|
19312
|
+
},
|
|
19313
|
+
[value, valueWithIds, onChange, setIsDragging]
|
|
19314
|
+
);
|
|
19315
|
+
const handleDragStart = (0, import_react102.useCallback)(() => {
|
|
19316
|
+
Object.values(popoverStoresMap.current).forEach((store) => {
|
|
19317
|
+
store.hide();
|
|
19318
|
+
});
|
|
19319
|
+
setIsDragging(true);
|
|
19320
|
+
}, [setIsDragging]);
|
|
19321
|
+
const handleDragCancel = (0, import_react102.useCallback)(() => {
|
|
19322
|
+
setIsDragging(false);
|
|
19323
|
+
}, [setIsDragging]);
|
|
19324
|
+
(0, import_react102.useEffect)(() => {
|
|
19325
|
+
if (lastRowFirstInputRef.current && value.length > 1) {
|
|
19326
|
+
lastRowFirstInputRef.current.focus();
|
|
19327
|
+
}
|
|
19328
|
+
}, [value.length]);
|
|
19329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(VerticalRhythm, { gap: "xs", children: [
|
|
19330
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { css: LabelStyles, children: label }) }),
|
|
19331
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: [SelectKeyValueRowStyles, { paddingLeft: "var(--spacing-base)" }], children: [
|
|
19332
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
19333
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: keyLabel }),
|
|
19334
|
+
!keyInfoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19335
|
+
Popover3,
|
|
19336
|
+
{
|
|
19337
|
+
buttonText: `${keyLabel} info`,
|
|
19338
|
+
iconColor: "gray",
|
|
19339
|
+
placement: "bottom-start",
|
|
19340
|
+
onInit: ({ store }) => popoverStoresMap.current.label = store,
|
|
19341
|
+
children: keyInfoPopover
|
|
19342
|
+
}
|
|
19343
|
+
)
|
|
19344
|
+
] }),
|
|
19345
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
19346
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: valueLabel }),
|
|
19347
|
+
!valueInfoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19348
|
+
Popover3,
|
|
19349
|
+
{
|
|
19350
|
+
buttonText: `${valueLabel} info`,
|
|
19351
|
+
iconColor: "gray",
|
|
19352
|
+
placement: "bottom-start",
|
|
19353
|
+
onInit: ({ store }) => popoverStoresMap.current.value = store,
|
|
19354
|
+
children: valueInfoPopover
|
|
19355
|
+
}
|
|
19356
|
+
)
|
|
19357
|
+
] })
|
|
19358
|
+
] }),
|
|
19359
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(VerticalRhythm, { gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19360
|
+
import_core.DndContext,
|
|
19361
|
+
{
|
|
19362
|
+
sensors,
|
|
19363
|
+
collisionDetection: import_core.closestCenter,
|
|
19364
|
+
onDragEnd: handleDragEnd,
|
|
19365
|
+
onDragStart: handleDragStart,
|
|
19366
|
+
onDragCancel: handleDragCancel,
|
|
19367
|
+
modifiers: [import_modifiers.restrictToParentElement],
|
|
19368
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_sortable.SortableContext, { items: valueWithIds, strategy: import_sortable.verticalListSortingStrategy, children: valueWithIds.map(({ id, ...item }, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19369
|
+
KeyValueInputItem,
|
|
19370
|
+
{
|
|
19371
|
+
id,
|
|
19372
|
+
firstInputRef: index === value.length - 1 ? lastRowFirstInputRef : null,
|
|
19373
|
+
value: item,
|
|
19374
|
+
keyLabel: `${keyLabel}, row ${index}`,
|
|
19375
|
+
valueLabel: `${valueLabel}, row ${index}`,
|
|
19376
|
+
disabled: disabled2,
|
|
19377
|
+
disabledDelete: value.length <= 1,
|
|
19378
|
+
disabledDnd: value.length === 1,
|
|
19379
|
+
error: errors == null ? void 0 : errors[index],
|
|
19380
|
+
onChange: (itemValue) => handleUpdateOptionRow(index, itemValue),
|
|
19381
|
+
onDelete: () => handleDeleteOptionRow(index),
|
|
19382
|
+
onFocusChange: handleFocusChange,
|
|
19383
|
+
"data-testid": "key-value-input-item"
|
|
19384
|
+
},
|
|
19385
|
+
isDragging ? id : index
|
|
19386
|
+
)) })
|
|
19387
|
+
}
|
|
19388
|
+
) }),
|
|
19389
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
19390
|
+
Button,
|
|
19391
|
+
{
|
|
19392
|
+
"data-testid": "add-input-row-action",
|
|
19393
|
+
buttonType: "secondaryInvert",
|
|
19394
|
+
size: "xs",
|
|
19395
|
+
onClick: handleAddOptionRow,
|
|
19396
|
+
disabled: disabled2,
|
|
19397
|
+
css: { marginTop: "var(--spacing-base)" },
|
|
19398
|
+
children: [
|
|
19399
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.85rem" }),
|
|
19400
|
+
" Add option"
|
|
19401
|
+
]
|
|
19402
|
+
}
|
|
19403
|
+
)
|
|
19404
|
+
] });
|
|
19405
|
+
};
|
|
19406
|
+
var KeyValueInputItem = ({
|
|
19407
|
+
id,
|
|
19408
|
+
firstInputRef,
|
|
19409
|
+
keyLabel,
|
|
19410
|
+
value,
|
|
19411
|
+
valueLabel,
|
|
19412
|
+
disabled: disabled2,
|
|
19413
|
+
onChange,
|
|
19414
|
+
onDelete,
|
|
19415
|
+
error,
|
|
19416
|
+
onFocusChange,
|
|
19417
|
+
disabledDelete = false,
|
|
19418
|
+
disabledDnd = false
|
|
19419
|
+
}) => {
|
|
19420
|
+
const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = (0, import_sortable.useSortable)({
|
|
19421
|
+
id,
|
|
19422
|
+
disabled: disabledDnd
|
|
19423
|
+
});
|
|
19424
|
+
const style = {
|
|
19425
|
+
transform: import_utilities.CSS.Transform.toString(transform),
|
|
19426
|
+
transition
|
|
19427
|
+
};
|
|
19428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: rowWrapper, ref: setNodeRef, style, children: [
|
|
19429
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19430
|
+
"button",
|
|
19431
|
+
{
|
|
19432
|
+
type: "button",
|
|
19433
|
+
css: [DragHandle, disabledDnd ? DragHandleDisabled : null],
|
|
19434
|
+
ref: setActivatorNodeRef,
|
|
19435
|
+
...attributes,
|
|
19436
|
+
...listeners
|
|
19437
|
+
}
|
|
19438
|
+
),
|
|
19439
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: SelectKeyValueRowStyles, "data-testid": "key-value-input-item", children: [
|
|
19440
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19441
|
+
Input,
|
|
19442
|
+
{
|
|
19443
|
+
ref: firstInputRef,
|
|
19444
|
+
label: keyLabel,
|
|
19445
|
+
showLabel: false,
|
|
19446
|
+
disabled: disabled2,
|
|
19447
|
+
onChange: (e) => {
|
|
19448
|
+
const hasStoredValue = value.value !== value.key;
|
|
19449
|
+
onChange == null ? void 0 : onChange({
|
|
19450
|
+
key: e.currentTarget.value,
|
|
19451
|
+
value: hasStoredValue ? value.value : e.currentTarget.value
|
|
19452
|
+
});
|
|
19453
|
+
},
|
|
19454
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
19455
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
19456
|
+
value: value.key,
|
|
19457
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
|
|
19458
|
+
"data-testid": "key"
|
|
19459
|
+
}
|
|
19460
|
+
),
|
|
19461
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19462
|
+
Input,
|
|
19463
|
+
{
|
|
19464
|
+
label: valueLabel,
|
|
19465
|
+
showLabel: false,
|
|
19466
|
+
disabled: disabled2,
|
|
19467
|
+
onChange: (e) => onChange == null ? void 0 : onChange({
|
|
19468
|
+
key: value.key,
|
|
19469
|
+
value: e.currentTarget.value
|
|
19470
|
+
}),
|
|
19471
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
19472
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
19473
|
+
value: value.value,
|
|
19474
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
|
|
19475
|
+
"data-testid": "value"
|
|
19476
|
+
}
|
|
19477
|
+
),
|
|
19478
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { css: { marginTop: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19479
|
+
Button,
|
|
19480
|
+
{
|
|
19481
|
+
type: "button",
|
|
19482
|
+
buttonType: "ghostDestructive",
|
|
19483
|
+
"data-testid": "delete-row",
|
|
19484
|
+
onClick: onDelete,
|
|
19485
|
+
disabled: disabled2 || disabledDelete,
|
|
19486
|
+
size: "zero",
|
|
19487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { icon: "trash", size: 16, iconColor: "currentColor" })
|
|
19488
|
+
}
|
|
19489
|
+
) })
|
|
19490
|
+
] })
|
|
19491
|
+
] });
|
|
19492
|
+
};
|
|
19493
|
+
|
|
19085
19494
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
19086
19495
|
init_emotion_jsx_shim();
|
|
19087
19496
|
|
|
19088
19497
|
// src/components/LimitsBar/LimitsBar.styles.ts
|
|
19089
19498
|
init_emotion_jsx_shim();
|
|
19090
|
-
var
|
|
19091
|
-
var LimitsBarContainer =
|
|
19499
|
+
var import_react103 = require("@emotion/react");
|
|
19500
|
+
var LimitsBarContainer = import_react103.css`
|
|
19092
19501
|
margin-block: var(--spacing-sm);
|
|
19093
19502
|
`;
|
|
19094
|
-
var LimitsBarProgressBar =
|
|
19503
|
+
var LimitsBarProgressBar = import_react103.css`
|
|
19095
19504
|
background: var(--gray-100);
|
|
19096
19505
|
margin-top: var(--spacing-sm);
|
|
19097
19506
|
position: relative;
|
|
19098
19507
|
overflow: hidden;
|
|
19099
19508
|
height: 0.25rem;
|
|
19100
19509
|
`;
|
|
19101
|
-
var LimitsBarProgressBarLine =
|
|
19510
|
+
var LimitsBarProgressBarLine = import_react103.css`
|
|
19102
19511
|
position: absolute;
|
|
19103
19512
|
inset: 0;
|
|
19104
19513
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
19105
19514
|
`;
|
|
19106
|
-
var LimitsBarLabelContainer =
|
|
19515
|
+
var LimitsBarLabelContainer = import_react103.css`
|
|
19107
19516
|
display: flex;
|
|
19108
19517
|
justify-content: space-between;
|
|
19109
19518
|
font-weight: var(--fw-bold);
|
|
19110
19519
|
`;
|
|
19111
|
-
var LimitsBarLabel =
|
|
19520
|
+
var LimitsBarLabel = import_react103.css`
|
|
19112
19521
|
font-size: var(--fs-baase);
|
|
19113
19522
|
`;
|
|
19114
|
-
var LimitsBarBgColor = (statusColor) =>
|
|
19523
|
+
var LimitsBarBgColor = (statusColor) => import_react103.css`
|
|
19115
19524
|
background: ${statusColor};
|
|
19116
19525
|
`;
|
|
19117
|
-
var LimitsBarTextColor = (statusColor) =>
|
|
19526
|
+
var LimitsBarTextColor = (statusColor) => import_react103.css`
|
|
19118
19527
|
color: ${statusColor};
|
|
19119
19528
|
`;
|
|
19120
19529
|
|
|
19121
19530
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
19122
|
-
var
|
|
19531
|
+
var import_jsx_runtime91 = require("@emotion/react/jsx-runtime");
|
|
19123
19532
|
var LimitsBar = ({ current, max, label }) => {
|
|
19124
19533
|
const maxPercentage = 100;
|
|
19125
19534
|
const progressBarValue = Math.ceil(current / max * maxPercentage);
|
|
@@ -19130,16 +19539,16 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
19130
19539
|
danger: "var(--brand-secondary-5)"
|
|
19131
19540
|
};
|
|
19132
19541
|
const statusColor = progressBarValue === 100 ? colorMap.danger : progressBarValue >= 75 ? colorMap.warn : colorMap.base;
|
|
19133
|
-
return /* @__PURE__ */ (0,
|
|
19134
|
-
/* @__PURE__ */ (0,
|
|
19135
|
-
/* @__PURE__ */ (0,
|
|
19136
|
-
/* @__PURE__ */ (0,
|
|
19542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: LimitsBarContainer, children: [
|
|
19543
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: LimitsBarLabelContainer, children: [
|
|
19544
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { css: LimitsBarLabel, children: label }),
|
|
19545
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { css: [LimitsBarLabel, LimitsBarTextColor(statusColor)], children: [
|
|
19137
19546
|
current,
|
|
19138
19547
|
" of ",
|
|
19139
19548
|
max
|
|
19140
19549
|
] })
|
|
19141
19550
|
] }),
|
|
19142
|
-
/* @__PURE__ */ (0,
|
|
19551
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
19143
19552
|
"div",
|
|
19144
19553
|
{
|
|
19145
19554
|
role: "progressbar",
|
|
@@ -19148,7 +19557,7 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
19148
19557
|
"aria-valuemax": max,
|
|
19149
19558
|
"aria-valuetext": `${current} of ${max}`,
|
|
19150
19559
|
css: LimitsBarProgressBar,
|
|
19151
|
-
children: /* @__PURE__ */ (0,
|
|
19560
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
19152
19561
|
"span",
|
|
19153
19562
|
{
|
|
19154
19563
|
role: "presentation",
|
|
@@ -19168,8 +19577,8 @@ init_emotion_jsx_shim();
|
|
|
19168
19577
|
|
|
19169
19578
|
// src/components/LinkList/LinkList.styles.ts
|
|
19170
19579
|
init_emotion_jsx_shim();
|
|
19171
|
-
var
|
|
19172
|
-
var LinkListContainer = (padding) =>
|
|
19580
|
+
var import_react104 = require("@emotion/react");
|
|
19581
|
+
var LinkListContainer = (padding) => import_react104.css`
|
|
19173
19582
|
padding: ${padding};
|
|
19174
19583
|
|
|
19175
19584
|
${mq("sm")} {
|
|
@@ -19177,32 +19586,32 @@ var LinkListContainer = (padding) => import_react101.css`
|
|
|
19177
19586
|
grid-row: 1 / last-line;
|
|
19178
19587
|
}
|
|
19179
19588
|
`;
|
|
19180
|
-
var LinkListTitle =
|
|
19589
|
+
var LinkListTitle = import_react104.css`
|
|
19181
19590
|
font-weight: var(--fw-bold);
|
|
19182
19591
|
font-size: var(--fs-sm);
|
|
19183
19592
|
text-transform: uppercase;
|
|
19184
19593
|
`;
|
|
19185
19594
|
|
|
19186
19595
|
// src/components/LinkList/LinkList.tsx
|
|
19187
|
-
var
|
|
19596
|
+
var import_jsx_runtime92 = require("@emotion/react/jsx-runtime");
|
|
19188
19597
|
var LinkList = ({ title: title2, padding = "var(--spacing-md)", children, ...props }) => {
|
|
19189
|
-
return /* @__PURE__ */ (0,
|
|
19190
|
-
/* @__PURE__ */ (0,
|
|
19598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: LinkListContainer(padding), ...props, children: [
|
|
19599
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Heading2, { level: 3, css: LinkListTitle, children: title2 }),
|
|
19191
19600
|
children
|
|
19192
19601
|
] });
|
|
19193
19602
|
};
|
|
19194
19603
|
|
|
19195
19604
|
// src/components/List/ScrollableList.tsx
|
|
19196
19605
|
init_emotion_jsx_shim();
|
|
19197
|
-
var
|
|
19606
|
+
var import_react106 = require("@emotion/react");
|
|
19198
19607
|
|
|
19199
19608
|
// src/components/List/styles/ScrollableList.styles.ts
|
|
19200
19609
|
init_emotion_jsx_shim();
|
|
19201
|
-
var
|
|
19202
|
-
var ScrollableListContainer =
|
|
19610
|
+
var import_react105 = require("@emotion/react");
|
|
19611
|
+
var ScrollableListContainer = import_react105.css`
|
|
19203
19612
|
position: relative;
|
|
19204
19613
|
`;
|
|
19205
|
-
var ScrollableListInner =
|
|
19614
|
+
var ScrollableListInner = import_react105.css`
|
|
19206
19615
|
background: var(--gray-50);
|
|
19207
19616
|
border-top: 1px solid var(--gray-200);
|
|
19208
19617
|
border-bottom: 1px solid var(--gray-200);
|
|
@@ -19225,19 +19634,19 @@ var ScrollableListInner = import_react102.css`
|
|
|
19225
19634
|
`;
|
|
19226
19635
|
|
|
19227
19636
|
// src/components/List/ScrollableList.tsx
|
|
19228
|
-
var
|
|
19637
|
+
var import_jsx_runtime93 = require("@emotion/react/jsx-runtime");
|
|
19229
19638
|
var ScrollableList = ({ label, children, ...props }) => {
|
|
19230
|
-
return /* @__PURE__ */ (0,
|
|
19231
|
-
label ? /* @__PURE__ */ (0,
|
|
19639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
19640
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
19232
19641
|
"span",
|
|
19233
19642
|
{
|
|
19234
|
-
css:
|
|
19643
|
+
css: import_react106.css`
|
|
19235
19644
|
${labelText}
|
|
19236
19645
|
`,
|
|
19237
19646
|
children: label
|
|
19238
19647
|
}
|
|
19239
19648
|
) : null,
|
|
19240
|
-
/* @__PURE__ */ (0,
|
|
19649
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
19241
19650
|
] });
|
|
19242
19651
|
};
|
|
19243
19652
|
|
|
@@ -19247,8 +19656,8 @@ var import_CgCheck4 = require("@react-icons/all-files/cg/CgCheck");
|
|
|
19247
19656
|
|
|
19248
19657
|
// src/components/List/styles/ScrollableListItem.styles.ts
|
|
19249
19658
|
init_emotion_jsx_shim();
|
|
19250
|
-
var
|
|
19251
|
-
var ScrollableListItemContainer =
|
|
19659
|
+
var import_react107 = require("@emotion/react");
|
|
19660
|
+
var ScrollableListItemContainer = import_react107.css`
|
|
19252
19661
|
align-items: center;
|
|
19253
19662
|
background: var(--white);
|
|
19254
19663
|
border-radius: var(--rounded-base);
|
|
@@ -19257,13 +19666,13 @@ var ScrollableListItemContainer = import_react104.css`
|
|
|
19257
19666
|
min-height: 52px;
|
|
19258
19667
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
19259
19668
|
`;
|
|
19260
|
-
var ScrollableListItemShadow =
|
|
19669
|
+
var ScrollableListItemShadow = import_react107.css`
|
|
19261
19670
|
box-shadow: var(--shadow-base);
|
|
19262
19671
|
`;
|
|
19263
|
-
var ScrollableListItemActive =
|
|
19672
|
+
var ScrollableListItemActive = import_react107.css`
|
|
19264
19673
|
border-color: var(--brand-secondary-3);
|
|
19265
19674
|
`;
|
|
19266
|
-
var ScrollableListItemBtn =
|
|
19675
|
+
var ScrollableListItemBtn = import_react107.css`
|
|
19267
19676
|
align-items: center;
|
|
19268
19677
|
border: none;
|
|
19269
19678
|
background: transparent;
|
|
@@ -19278,27 +19687,27 @@ var ScrollableListItemBtn = import_react104.css`
|
|
|
19278
19687
|
outline: none;
|
|
19279
19688
|
}
|
|
19280
19689
|
`;
|
|
19281
|
-
var ScrollableListInputLabel =
|
|
19690
|
+
var ScrollableListInputLabel = import_react107.css`
|
|
19282
19691
|
align-items: center;
|
|
19283
19692
|
cursor: pointer;
|
|
19284
19693
|
display: flex;
|
|
19285
19694
|
padding: var(--spacing-xs) var(--spacing-base) var(--spacing-xs);
|
|
19286
19695
|
flex-grow: 1;
|
|
19287
19696
|
`;
|
|
19288
|
-
var ScrollableListInputText =
|
|
19697
|
+
var ScrollableListInputText = import_react107.css`
|
|
19289
19698
|
align-items: center;
|
|
19290
19699
|
display: flex;
|
|
19291
19700
|
gap: var(--spacing-sm);
|
|
19292
19701
|
flex-grow: 1;
|
|
19293
19702
|
flex-wrap: wrap;
|
|
19294
19703
|
`;
|
|
19295
|
-
var ScrollableListHiddenInput =
|
|
19704
|
+
var ScrollableListHiddenInput = import_react107.css`
|
|
19296
19705
|
position: absolute;
|
|
19297
19706
|
height: 0;
|
|
19298
19707
|
width: 0;
|
|
19299
19708
|
opacity: 0;
|
|
19300
19709
|
`;
|
|
19301
|
-
var ScrollableListIcon =
|
|
19710
|
+
var ScrollableListIcon = import_react107.css`
|
|
19302
19711
|
border-radius: var(--rounded-full);
|
|
19303
19712
|
background: var(--brand-secondary-3);
|
|
19304
19713
|
color: var(--white);
|
|
@@ -19306,12 +19715,12 @@ var ScrollableListIcon = import_react104.css`
|
|
|
19306
19715
|
min-width: 24px;
|
|
19307
19716
|
opacity: 0;
|
|
19308
19717
|
`;
|
|
19309
|
-
var ScrollableListIconVisible =
|
|
19718
|
+
var ScrollableListIconVisible = import_react107.css`
|
|
19310
19719
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
19311
19720
|
`;
|
|
19312
19721
|
|
|
19313
19722
|
// src/components/List/ScrollableListInputItem.tsx
|
|
19314
|
-
var
|
|
19723
|
+
var import_jsx_runtime94 = require("@emotion/react/jsx-runtime");
|
|
19315
19724
|
var ScrollableListInputItem = ({
|
|
19316
19725
|
label,
|
|
19317
19726
|
icon,
|
|
@@ -19321,7 +19730,7 @@ var ScrollableListInputItem = ({
|
|
|
19321
19730
|
labelTestId,
|
|
19322
19731
|
...props
|
|
19323
19732
|
}) => {
|
|
19324
|
-
return /* @__PURE__ */ (0,
|
|
19733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19325
19734
|
"div",
|
|
19326
19735
|
{
|
|
19327
19736
|
css: [
|
|
@@ -19330,13 +19739,13 @@ var ScrollableListInputItem = ({
|
|
|
19330
19739
|
active2 ? ScrollableListItemActive : void 0
|
|
19331
19740
|
],
|
|
19332
19741
|
...props,
|
|
19333
|
-
children: /* @__PURE__ */ (0,
|
|
19334
|
-
/* @__PURE__ */ (0,
|
|
19742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { "data-testid": labelTestId, css: ScrollableListInputLabel, children: [
|
|
19743
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { css: ScrollableListInputText, children: [
|
|
19335
19744
|
icon,
|
|
19336
19745
|
label
|
|
19337
19746
|
] }),
|
|
19338
|
-
/* @__PURE__ */ (0,
|
|
19339
|
-
/* @__PURE__ */ (0,
|
|
19747
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { css: ScrollableListHiddenInput, children }),
|
|
19748
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19340
19749
|
Icon,
|
|
19341
19750
|
{
|
|
19342
19751
|
icon: import_CgCheck4.CgCheck,
|
|
@@ -19355,7 +19764,7 @@ var ScrollableListInputItem = ({
|
|
|
19355
19764
|
// src/components/List/ScrollableListItem.tsx
|
|
19356
19765
|
init_emotion_jsx_shim();
|
|
19357
19766
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
19358
|
-
var
|
|
19767
|
+
var import_jsx_runtime95 = require("@emotion/react/jsx-runtime");
|
|
19359
19768
|
var ScrollableListItem = ({
|
|
19360
19769
|
buttonText,
|
|
19361
19770
|
icon,
|
|
@@ -19363,7 +19772,7 @@ var ScrollableListItem = ({
|
|
|
19363
19772
|
disableShadow,
|
|
19364
19773
|
...props
|
|
19365
19774
|
}) => {
|
|
19366
|
-
return /* @__PURE__ */ (0,
|
|
19775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
19367
19776
|
"div",
|
|
19368
19777
|
{
|
|
19369
19778
|
css: [
|
|
@@ -19371,12 +19780,12 @@ var ScrollableListItem = ({
|
|
|
19371
19780
|
disableShadow ? void 0 : ScrollableListItemShadow,
|
|
19372
19781
|
active2 ? ScrollableListItemActive : void 0
|
|
19373
19782
|
],
|
|
19374
|
-
children: /* @__PURE__ */ (0,
|
|
19375
|
-
/* @__PURE__ */ (0,
|
|
19783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
|
|
19784
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", children: [
|
|
19376
19785
|
icon,
|
|
19377
|
-
/* @__PURE__ */ (0,
|
|
19786
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: buttonText })
|
|
19378
19787
|
] }),
|
|
19379
|
-
/* @__PURE__ */ (0,
|
|
19788
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
19380
19789
|
Icon,
|
|
19381
19790
|
{
|
|
19382
19791
|
icon: import_CgCheck5.CgCheck,
|
|
@@ -19395,10 +19804,10 @@ init_emotion_jsx_shim();
|
|
|
19395
19804
|
|
|
19396
19805
|
// src/components/LoadingIndicator/LoadingIndicator.styles.ts
|
|
19397
19806
|
init_emotion_jsx_shim();
|
|
19398
|
-
var
|
|
19807
|
+
var import_react108 = require("@emotion/react");
|
|
19399
19808
|
function bounceFade(size) {
|
|
19400
19809
|
const bounceHeight = size === "lg" ? 10 : 5;
|
|
19401
|
-
return
|
|
19810
|
+
return import_react108.keyframes`
|
|
19402
19811
|
0%, 100% {
|
|
19403
19812
|
opacity: 1.0;
|
|
19404
19813
|
transform: translateY(0);
|
|
@@ -19416,13 +19825,13 @@ function bounceFade(size) {
|
|
|
19416
19825
|
}
|
|
19417
19826
|
`;
|
|
19418
19827
|
}
|
|
19419
|
-
var loader =
|
|
19828
|
+
var loader = import_react108.css`
|
|
19420
19829
|
display: inline-flex;
|
|
19421
19830
|
justify-content: center;
|
|
19422
19831
|
`;
|
|
19423
19832
|
function loadingDot(size) {
|
|
19424
19833
|
const dotSize = size === "lg" ? 8 : 4;
|
|
19425
|
-
return
|
|
19834
|
+
return import_react108.css`
|
|
19426
19835
|
background-color: var(--gray-700);
|
|
19427
19836
|
display: block;
|
|
19428
19837
|
border-radius: var(--rounded-full);
|
|
@@ -19447,27 +19856,27 @@ function loadingDot(size) {
|
|
|
19447
19856
|
}
|
|
19448
19857
|
|
|
19449
19858
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
19450
|
-
var
|
|
19859
|
+
var import_jsx_runtime96 = require("@emotion/react/jsx-runtime");
|
|
19451
19860
|
var LoadingIndicator = ({
|
|
19452
19861
|
size = "lg",
|
|
19453
19862
|
...props
|
|
19454
19863
|
}) => {
|
|
19455
19864
|
const dotStyle = loadingDot(size);
|
|
19456
|
-
return /* @__PURE__ */ (0,
|
|
19457
|
-
/* @__PURE__ */ (0,
|
|
19458
|
-
/* @__PURE__ */ (0,
|
|
19459
|
-
/* @__PURE__ */ (0,
|
|
19865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
|
|
19866
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: dotStyle }),
|
|
19867
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: dotStyle }),
|
|
19868
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: dotStyle })
|
|
19460
19869
|
] });
|
|
19461
19870
|
};
|
|
19462
19871
|
|
|
19463
19872
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
19464
19873
|
init_emotion_jsx_shim();
|
|
19465
|
-
var
|
|
19874
|
+
var import_react110 = require("react");
|
|
19466
19875
|
|
|
19467
19876
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
19468
19877
|
init_emotion_jsx_shim();
|
|
19469
|
-
var
|
|
19470
|
-
var loadingOverlayContainer =
|
|
19878
|
+
var import_react109 = require("@emotion/react");
|
|
19879
|
+
var loadingOverlayContainer = import_react109.css`
|
|
19471
19880
|
position: absolute;
|
|
19472
19881
|
inset: 0;
|
|
19473
19882
|
overflow: hidden;
|
|
@@ -19475,30 +19884,30 @@ var loadingOverlayContainer = import_react106.css`
|
|
|
19475
19884
|
padding: var(--spacing-xl);
|
|
19476
19885
|
overflow-y: auto;
|
|
19477
19886
|
`;
|
|
19478
|
-
var loadingOverlayVisible =
|
|
19887
|
+
var loadingOverlayVisible = import_react109.css`
|
|
19479
19888
|
display: flex;
|
|
19480
19889
|
`;
|
|
19481
|
-
var loadingOverlayHidden =
|
|
19890
|
+
var loadingOverlayHidden = import_react109.css`
|
|
19482
19891
|
display: none;
|
|
19483
19892
|
`;
|
|
19484
|
-
var loadingOverlayBackground = (bgColor) =>
|
|
19893
|
+
var loadingOverlayBackground = (bgColor) => import_react109.css`
|
|
19485
19894
|
background: ${bgColor};
|
|
19486
19895
|
opacity: 0.92;
|
|
19487
19896
|
position: absolute;
|
|
19488
19897
|
inset: 0 0;
|
|
19489
19898
|
`;
|
|
19490
|
-
var loadingOverlayBody =
|
|
19899
|
+
var loadingOverlayBody = import_react109.css`
|
|
19491
19900
|
align-items: center;
|
|
19492
19901
|
display: flex;
|
|
19493
19902
|
flex-direction: column;
|
|
19494
19903
|
`;
|
|
19495
|
-
var loadingOverlayMessage =
|
|
19904
|
+
var loadingOverlayMessage = import_react109.css`
|
|
19496
19905
|
color: var(--gray-600);
|
|
19497
19906
|
margin: var(--spacing-base) 0 0;
|
|
19498
19907
|
`;
|
|
19499
19908
|
|
|
19500
19909
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
19501
|
-
var
|
|
19910
|
+
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
19502
19911
|
var LoadingOverlay = ({
|
|
19503
19912
|
isActive,
|
|
19504
19913
|
statusMessage,
|
|
@@ -19509,14 +19918,14 @@ var LoadingOverlay = ({
|
|
|
19509
19918
|
isPaused = false,
|
|
19510
19919
|
children
|
|
19511
19920
|
}) => {
|
|
19512
|
-
const lottieRef = (0,
|
|
19513
|
-
const onLoopComplete = (0,
|
|
19921
|
+
const lottieRef = (0, import_react110.useRef)(null);
|
|
19922
|
+
const onLoopComplete = (0, import_react110.useCallback)(() => {
|
|
19514
19923
|
var _a, _b, _c;
|
|
19515
19924
|
if (isPaused && !((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
19516
19925
|
(_c = lottieRef.current) == null ? void 0 : _c.stop();
|
|
19517
19926
|
}
|
|
19518
19927
|
}, [isPaused]);
|
|
19519
|
-
(0,
|
|
19928
|
+
(0, import_react110.useEffect)(() => {
|
|
19520
19929
|
var _a, _b, _c, _d, _e, _f;
|
|
19521
19930
|
if (!isPaused && ((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
19522
19931
|
(_c = lottieRef.current) == null ? void 0 : _c.play();
|
|
@@ -19524,7 +19933,7 @@ var LoadingOverlay = ({
|
|
|
19524
19933
|
(_f = lottieRef.current) == null ? void 0 : _f.stop();
|
|
19525
19934
|
}
|
|
19526
19935
|
}, [isPaused]);
|
|
19527
|
-
return /* @__PURE__ */ (0,
|
|
19936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
19528
19937
|
"div",
|
|
19529
19938
|
{
|
|
19530
19939
|
role: "alert",
|
|
@@ -19532,9 +19941,9 @@ var LoadingOverlay = ({
|
|
|
19532
19941
|
"aria-hidden": !isActive,
|
|
19533
19942
|
"aria-busy": isActive && !isPaused,
|
|
19534
19943
|
children: [
|
|
19535
|
-
/* @__PURE__ */ (0,
|
|
19536
|
-
/* @__PURE__ */ (0,
|
|
19537
|
-
/* @__PURE__ */ (0,
|
|
19944
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: loadingOverlayBackground(overlayBackgroundColor) }),
|
|
19945
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: { position: "relative", maxWidth: "100%", margin: isTopAligned ? "0" : "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { css: loadingOverlayBody, children: [
|
|
19946
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
19538
19947
|
AnimationFile,
|
|
19539
19948
|
{
|
|
19540
19949
|
lottieRef,
|
|
@@ -19549,15 +19958,15 @@ var LoadingOverlay = ({
|
|
|
19549
19958
|
}
|
|
19550
19959
|
}
|
|
19551
19960
|
),
|
|
19552
|
-
statusMessage ? /* @__PURE__ */ (0,
|
|
19553
|
-
/* @__PURE__ */ (0,
|
|
19961
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: loadingOverlayMessage, children: statusMessage }) : null,
|
|
19962
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: { width: "100%", marginTop: "var(--spacing-md)" }, children })
|
|
19554
19963
|
] }) })
|
|
19555
19964
|
]
|
|
19556
19965
|
}
|
|
19557
19966
|
);
|
|
19558
19967
|
};
|
|
19559
19968
|
var LoadingIcon = ({ height, width, ...props }) => {
|
|
19560
|
-
return /* @__PURE__ */ (0,
|
|
19969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
19561
19970
|
"svg",
|
|
19562
19971
|
{
|
|
19563
19972
|
viewBox: "0 0 38 38",
|
|
@@ -19567,9 +19976,9 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
19567
19976
|
stroke: "currentColor",
|
|
19568
19977
|
...props,
|
|
19569
19978
|
"data-testid": "loading-icon",
|
|
19570
|
-
children: /* @__PURE__ */ (0,
|
|
19571
|
-
/* @__PURE__ */ (0,
|
|
19572
|
-
/* @__PURE__ */ (0,
|
|
19979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
19980
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("circle", { strokeOpacity: ".25", cx: "18", cy: "18", r: "18" }),
|
|
19981
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", transform: "rotate(166.645 18 18)", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
19573
19982
|
"animateTransform",
|
|
19574
19983
|
{
|
|
19575
19984
|
attributeName: "transform",
|
|
@@ -19590,13 +19999,13 @@ init_emotion_jsx_shim();
|
|
|
19590
19999
|
|
|
19591
20000
|
// src/components/MediaCard/MediaCard.tsx
|
|
19592
20001
|
init_emotion_jsx_shim();
|
|
19593
|
-
var
|
|
20002
|
+
var import_react114 = require("react");
|
|
19594
20003
|
|
|
19595
20004
|
// src/components/Popover/Popover.tsx
|
|
19596
20005
|
init_emotion_jsx_shim();
|
|
19597
|
-
var
|
|
19598
|
-
var
|
|
19599
|
-
var
|
|
20006
|
+
var import_react111 = require("@ariakit/react");
|
|
20007
|
+
var import_react112 = require("react");
|
|
20008
|
+
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
19600
20009
|
var Popover3 = ({
|
|
19601
20010
|
iconColor = "action",
|
|
19602
20011
|
icon = "info",
|
|
@@ -19611,35 +20020,35 @@ var Popover3 = ({
|
|
|
19611
20020
|
onInit,
|
|
19612
20021
|
...otherProps
|
|
19613
20022
|
}) => {
|
|
19614
|
-
const popover2 = (0,
|
|
19615
|
-
(0,
|
|
20023
|
+
const popover2 = (0, import_react111.usePopoverStore)({ placement });
|
|
20024
|
+
(0, import_react112.useEffect)(() => {
|
|
19616
20025
|
onInit == null ? void 0 : onInit({ store: popover2 });
|
|
19617
20026
|
}, [popover2]);
|
|
19618
|
-
return /* @__PURE__ */ (0,
|
|
19619
|
-
/* @__PURE__ */ (0,
|
|
19620
|
-
|
|
20027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_react111.PopoverProvider, { store: popover2, children: [
|
|
20028
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
20029
|
+
import_react111.PopoverDisclosure,
|
|
19621
20030
|
{
|
|
19622
20031
|
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
19623
20032
|
title: buttonText,
|
|
19624
20033
|
"data-testid": testId,
|
|
19625
|
-
children: trigger2 ? trigger2 : /* @__PURE__ */ (0,
|
|
19626
|
-
/* @__PURE__ */ (0,
|
|
19627
|
-
/* @__PURE__ */ (0,
|
|
20034
|
+
children: trigger2 ? trigger2 : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
20035
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon, { icon, iconColor, size: iconSize }),
|
|
20036
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { hidden: true, children: buttonText })
|
|
19628
20037
|
] })
|
|
19629
20038
|
}
|
|
19630
20039
|
),
|
|
19631
|
-
/* @__PURE__ */ (0,
|
|
20040
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react111.Popover, { unmountOnHide: true, css: Popover, ...otherProps, "aria-label": ariaLabel, children })
|
|
19632
20041
|
] });
|
|
19633
20042
|
};
|
|
19634
20043
|
var usePopoverComponentContext = () => {
|
|
19635
|
-
const contextValue = (0,
|
|
20044
|
+
const contextValue = (0, import_react111.usePopoverContext)();
|
|
19636
20045
|
return contextValue;
|
|
19637
20046
|
};
|
|
19638
20047
|
|
|
19639
20048
|
// src/components/MediaCard/MediaCard.styles.ts
|
|
19640
20049
|
init_emotion_jsx_shim();
|
|
19641
|
-
var
|
|
19642
|
-
var cardBase =
|
|
20050
|
+
var import_react113 = require("@emotion/react");
|
|
20051
|
+
var cardBase = import_react113.css`
|
|
19643
20052
|
--mediacard-title-color: var(--gray-500);
|
|
19644
20053
|
display: flex;
|
|
19645
20054
|
flex-direction: column;
|
|
@@ -19663,7 +20072,7 @@ var cardBase = import_react110.css`
|
|
|
19663
20072
|
cursor: default;
|
|
19664
20073
|
}
|
|
19665
20074
|
`;
|
|
19666
|
-
var coverWrapper =
|
|
20075
|
+
var coverWrapper = import_react113.css`
|
|
19667
20076
|
position: relative;
|
|
19668
20077
|
display: flex;
|
|
19669
20078
|
align-items: center;
|
|
@@ -19676,10 +20085,10 @@ var coverWrapper = import_react110.css`
|
|
|
19676
20085
|
outline: none;
|
|
19677
20086
|
border: 0;
|
|
19678
20087
|
`;
|
|
19679
|
-
var contentWrapper =
|
|
20088
|
+
var contentWrapper = import_react113.css`
|
|
19680
20089
|
padding: var(--spacing-sm);
|
|
19681
20090
|
`;
|
|
19682
|
-
var title =
|
|
20091
|
+
var title = import_react113.css`
|
|
19683
20092
|
font-size: var(--fs-sm);
|
|
19684
20093
|
color: var(--mediacard-title-color);
|
|
19685
20094
|
white-space: nowrap;
|
|
@@ -19694,7 +20103,7 @@ var title = import_react110.css`
|
|
|
19694
20103
|
outline: 2px solid var(--primary-action-default);
|
|
19695
20104
|
}
|
|
19696
20105
|
`;
|
|
19697
|
-
var subtitle =
|
|
20106
|
+
var subtitle = import_react113.css`
|
|
19698
20107
|
font-size: var(--fs-xs);
|
|
19699
20108
|
color: var(--gray-500);
|
|
19700
20109
|
white-space: nowrap;
|
|
@@ -19704,13 +20113,13 @@ var subtitle = import_react110.css`
|
|
|
19704
20113
|
border: 0;
|
|
19705
20114
|
background-color: transparent;
|
|
19706
20115
|
`;
|
|
19707
|
-
var sideSection =
|
|
20116
|
+
var sideSection = import_react113.css`
|
|
19708
20117
|
cursor: default;
|
|
19709
20118
|
`;
|
|
19710
|
-
var menuSection =
|
|
20119
|
+
var menuSection = import_react113.css`
|
|
19711
20120
|
cursor: default;
|
|
19712
20121
|
`;
|
|
19713
|
-
var menuButton =
|
|
20122
|
+
var menuButton = import_react113.css`
|
|
19714
20123
|
padding: var(--spacing-2xs);
|
|
19715
20124
|
border-radius: var(--rounded-sm);
|
|
19716
20125
|
border-width: 0;
|
|
@@ -19722,7 +20131,7 @@ var menuButton = import_react110.css`
|
|
|
19722
20131
|
`;
|
|
19723
20132
|
|
|
19724
20133
|
// src/components/MediaCard/MediaCard.tsx
|
|
19725
|
-
var
|
|
20134
|
+
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
19726
20135
|
var MediaCard = ({
|
|
19727
20136
|
title: title2,
|
|
19728
20137
|
subtitle: subtitle2,
|
|
@@ -19734,17 +20143,17 @@ var MediaCard = ({
|
|
|
19734
20143
|
buttonType,
|
|
19735
20144
|
...cardProps
|
|
19736
20145
|
}) => {
|
|
19737
|
-
const onStopPropogation = (0,
|
|
20146
|
+
const onStopPropogation = (0, import_react114.useCallback)((e) => {
|
|
19738
20147
|
e.stopPropagation();
|
|
19739
20148
|
}, []);
|
|
19740
20149
|
const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
|
|
19741
|
-
return /* @__PURE__ */ (0,
|
|
19742
|
-
/* @__PURE__ */ (0,
|
|
19743
|
-
/* @__PURE__ */ (0,
|
|
19744
|
-
/* @__PURE__ */ (0,
|
|
19745
|
-
/* @__PURE__ */ (0,
|
|
19746
|
-
/* @__PURE__ */ (0,
|
|
19747
|
-
!infoPopover ? null : /* @__PURE__ */ (0,
|
|
20150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Card, { css: cardBase, ...cardProps, onClick, "data-testid": "card-item", children: [
|
|
20151
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { tabIndex: -1, css: coverWrapper, type: buttonType, children: cover }),
|
|
20152
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: contentWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
20153
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
20154
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", css: { maxWidth: "100%" }, children: [
|
|
20155
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { css: title, "data-testid": "card-title", children: title2 }),
|
|
20156
|
+
!infoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: { display: "flex", cursor: "default" }, onClick: onStopPropogation, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19748
20157
|
Popover3,
|
|
19749
20158
|
{
|
|
19750
20159
|
baseId: `info-of-${title2}`,
|
|
@@ -19753,31 +20162,31 @@ var MediaCard = ({
|
|
|
19753
20162
|
iconColor: "default",
|
|
19754
20163
|
tabIndex: 0,
|
|
19755
20164
|
css: { display: "block", maxWidth: "20rem" },
|
|
19756
|
-
children: /* @__PURE__ */ (0,
|
|
20165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { children: infoPopover })
|
|
19757
20166
|
}
|
|
19758
20167
|
) })
|
|
19759
20168
|
] }),
|
|
19760
|
-
subtitle2 ? /* @__PURE__ */ (0,
|
|
20169
|
+
subtitle2 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { tabIndex: -1, css: subtitle, children: subtitle2 }) : null
|
|
19761
20170
|
] }),
|
|
19762
|
-
sideSection2 ? /* @__PURE__ */ (0,
|
|
19763
|
-
hasMenuItems ? /* @__PURE__ */ (0,
|
|
20171
|
+
sideSection2 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: sideSection, onClick: onStopPropogation, children: sideSection2 }) : null,
|
|
20172
|
+
hasMenuItems ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19764
20173
|
VerticalRhythm,
|
|
19765
20174
|
{
|
|
19766
20175
|
css: menuSection,
|
|
19767
20176
|
align: "center",
|
|
19768
20177
|
justify: "center",
|
|
19769
20178
|
onClick: onStopPropogation,
|
|
19770
|
-
children: /* @__PURE__ */ (0,
|
|
20179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19771
20180
|
Menu,
|
|
19772
20181
|
{
|
|
19773
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
20182
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19774
20183
|
"button",
|
|
19775
20184
|
{
|
|
19776
20185
|
type: "button",
|
|
19777
20186
|
"aria-label": "More options",
|
|
19778
20187
|
css: menuButton,
|
|
19779
20188
|
"data-testid": "button-more",
|
|
19780
|
-
children: /* @__PURE__ */ (0,
|
|
20189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
|
|
19781
20190
|
}
|
|
19782
20191
|
),
|
|
19783
20192
|
menuLabel: `Menu of ${title2}`,
|
|
@@ -19793,13 +20202,14 @@ var MediaCard = ({
|
|
|
19793
20202
|
|
|
19794
20203
|
// src/components/Modal/Modal.tsx
|
|
19795
20204
|
init_emotion_jsx_shim();
|
|
20205
|
+
var import_react116 = require("@ariakit/react");
|
|
19796
20206
|
var import_CgClose5 = require("@react-icons/all-files/cg/CgClose");
|
|
19797
|
-
var
|
|
20207
|
+
var import_react117 = __toESM(require("react"));
|
|
19798
20208
|
|
|
19799
20209
|
// src/components/Modal/Modal.styles.ts
|
|
19800
20210
|
init_emotion_jsx_shim();
|
|
19801
|
-
var
|
|
19802
|
-
var modalStyles =
|
|
20211
|
+
var import_react115 = require("@emotion/react");
|
|
20212
|
+
var modalStyles = import_react115.css`
|
|
19803
20213
|
border: none;
|
|
19804
20214
|
position: relative;
|
|
19805
20215
|
max-width: calc(100% - var(--spacing-base) * 2);
|
|
@@ -19813,16 +20223,16 @@ var modalStyles = import_react112.css`
|
|
|
19813
20223
|
opacity: 0.4;
|
|
19814
20224
|
}
|
|
19815
20225
|
`;
|
|
19816
|
-
var modalSizeSmall =
|
|
20226
|
+
var modalSizeSmall = import_react115.css`
|
|
19817
20227
|
width: clamp(280px, 100vw, 400px);
|
|
19818
20228
|
`;
|
|
19819
|
-
var modalSizeMedium =
|
|
20229
|
+
var modalSizeMedium = import_react115.css`
|
|
19820
20230
|
width: clamp(280px, 100vw, 600px);
|
|
19821
20231
|
`;
|
|
19822
|
-
var modalSizeLarge =
|
|
20232
|
+
var modalSizeLarge = import_react115.css`
|
|
19823
20233
|
width: clamp(280px, 100vw, 800px);
|
|
19824
20234
|
`;
|
|
19825
|
-
var modalInnerStyles =
|
|
20235
|
+
var modalInnerStyles = import_react115.css`
|
|
19826
20236
|
position: relative;
|
|
19827
20237
|
width: 100%;
|
|
19828
20238
|
display: flex;
|
|
@@ -19835,7 +20245,7 @@ var modalInnerStyles = import_react112.css`
|
|
|
19835
20245
|
box-shadow: var(--elevation-500);
|
|
19836
20246
|
border-radius: var(--rounded-base);
|
|
19837
20247
|
`;
|
|
19838
|
-
var modalHeaderStyles =
|
|
20248
|
+
var modalHeaderStyles = import_react115.css`
|
|
19839
20249
|
display: flex;
|
|
19840
20250
|
align-items: flex-start;
|
|
19841
20251
|
gap: var(--spacing-base);
|
|
@@ -19843,10 +20253,10 @@ var modalHeaderStyles = import_react112.css`
|
|
|
19843
20253
|
font-family: var(--ff-base);
|
|
19844
20254
|
line-height: 1.2;
|
|
19845
20255
|
`;
|
|
19846
|
-
var modalHeaderHeaderStyles =
|
|
20256
|
+
var modalHeaderHeaderStyles = import_react115.css`
|
|
19847
20257
|
max-width: calc(100% - 3rem);
|
|
19848
20258
|
`;
|
|
19849
|
-
var modalCloseButtonStyles =
|
|
20259
|
+
var modalCloseButtonStyles = import_react115.css`
|
|
19850
20260
|
background: transparent;
|
|
19851
20261
|
border: none;
|
|
19852
20262
|
color: var(--gray-300);
|
|
@@ -19861,7 +20271,7 @@ var modalCloseButtonStyles = import_react112.css`
|
|
|
19861
20271
|
color: var(--gray-400);
|
|
19862
20272
|
}
|
|
19863
20273
|
`;
|
|
19864
|
-
var modalContentStyles =
|
|
20274
|
+
var modalContentStyles = import_react115.css`
|
|
19865
20275
|
position: relative;
|
|
19866
20276
|
flex: 1;
|
|
19867
20277
|
overflow: auto;
|
|
@@ -19870,10 +20280,10 @@ var modalContentStyles = import_react112.css`
|
|
|
19870
20280
|
border-radius: var(--rounded-sm);
|
|
19871
20281
|
${scrollbarStyles}
|
|
19872
20282
|
`;
|
|
19873
|
-
var modalDialogWrapper =
|
|
20283
|
+
var modalDialogWrapper = import_react115.css`
|
|
19874
20284
|
padding: 0 var(--spacing-lg) var(--spacing-md);
|
|
19875
20285
|
`;
|
|
19876
|
-
var modalDialogInnerStyles =
|
|
20286
|
+
var modalDialogInnerStyles = import_react115.css`
|
|
19877
20287
|
// we need to override the gap of the modalInnerStyles when using a modal dialog
|
|
19878
20288
|
> div {
|
|
19879
20289
|
gap: 0;
|
|
@@ -19881,10 +20291,10 @@ var modalDialogInnerStyles = import_react112.css`
|
|
|
19881
20291
|
`;
|
|
19882
20292
|
|
|
19883
20293
|
// src/components/Modal/Modal.tsx
|
|
19884
|
-
var
|
|
20294
|
+
var import_jsx_runtime100 = require("@emotion/react/jsx-runtime");
|
|
19885
20295
|
var defaultModalWidth = "75rem";
|
|
19886
20296
|
var defaultModalHeight = "51rem";
|
|
19887
|
-
var Modal =
|
|
20297
|
+
var Modal = import_react117.default.forwardRef(
|
|
19888
20298
|
({
|
|
19889
20299
|
header: header2,
|
|
19890
20300
|
children,
|
|
@@ -19897,7 +20307,7 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19897
20307
|
withoutContentBackground = false,
|
|
19898
20308
|
...modalProps
|
|
19899
20309
|
}, ref) => {
|
|
19900
|
-
const dialogRef = (0,
|
|
20310
|
+
const dialogRef = (0, import_react117.useRef)(null);
|
|
19901
20311
|
const size = {
|
|
19902
20312
|
sm: modalSizeSmall,
|
|
19903
20313
|
md: modalSizeMedium,
|
|
@@ -19909,7 +20319,7 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19909
20319
|
},
|
|
19910
20320
|
shortcut: "escape"
|
|
19911
20321
|
});
|
|
19912
|
-
(0,
|
|
20322
|
+
(0, import_react117.useEffect)(() => {
|
|
19913
20323
|
var _a;
|
|
19914
20324
|
if (!document.contains(dialogRef.current)) {
|
|
19915
20325
|
console.warn(
|
|
@@ -19923,7 +20333,7 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19923
20333
|
(_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
19924
20334
|
};
|
|
19925
20335
|
}, []);
|
|
19926
|
-
return /* @__PURE__ */ (0,
|
|
20336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
19927
20337
|
"dialog",
|
|
19928
20338
|
{
|
|
19929
20339
|
ref: (element) => {
|
|
@@ -19945,15 +20355,15 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19945
20355
|
e.preventDefault();
|
|
19946
20356
|
},
|
|
19947
20357
|
...modalProps,
|
|
19948
|
-
children: /* @__PURE__ */ (0,
|
|
20358
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react116.PortalContext.Provider, { value: dialogRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
19949
20359
|
"div",
|
|
19950
20360
|
{
|
|
19951
20361
|
css: [modalInnerStyles, { height: height === "auto" ? "auto" : "100%" }],
|
|
19952
20362
|
onClick: (e) => e.stopPropagation(),
|
|
19953
20363
|
children: [
|
|
19954
|
-
/* @__PURE__ */ (0,
|
|
19955
|
-
!header2 ? null : /* @__PURE__ */ (0,
|
|
19956
|
-
/* @__PURE__ */ (0,
|
|
20364
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { css: modalHeaderStyles, children: [
|
|
20365
|
+
!header2 ? null : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { css: modalHeaderHeaderStyles, children: header2 }),
|
|
20366
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
19957
20367
|
Button,
|
|
19958
20368
|
{
|
|
19959
20369
|
type: "button",
|
|
@@ -19962,11 +20372,11 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19962
20372
|
title: "Close dialog",
|
|
19963
20373
|
buttonType: "ghost",
|
|
19964
20374
|
"data-testid": "close-dialog",
|
|
19965
|
-
children: /* @__PURE__ */ (0,
|
|
20375
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Icon, { icon: import_CgClose5.CgClose, iconColor: "currentColor", size: 24 })
|
|
19966
20376
|
}
|
|
19967
20377
|
)
|
|
19968
20378
|
] }),
|
|
19969
|
-
/* @__PURE__ */ (0,
|
|
20379
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
19970
20380
|
"div",
|
|
19971
20381
|
{
|
|
19972
20382
|
css: [
|
|
@@ -19977,10 +20387,10 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19977
20387
|
children
|
|
19978
20388
|
}
|
|
19979
20389
|
),
|
|
19980
|
-
buttonGroup ? /* @__PURE__ */ (0,
|
|
20390
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(HorizontalRhythm, { children: buttonGroup }) : null
|
|
19981
20391
|
]
|
|
19982
20392
|
}
|
|
19983
|
-
)
|
|
20393
|
+
) })
|
|
19984
20394
|
}
|
|
19985
20395
|
);
|
|
19986
20396
|
}
|
|
@@ -19989,11 +20399,11 @@ Modal.displayName = "Modal";
|
|
|
19989
20399
|
|
|
19990
20400
|
// src/components/Modal/ModalDialog.tsx
|
|
19991
20401
|
init_emotion_jsx_shim();
|
|
19992
|
-
var
|
|
19993
|
-
var
|
|
19994
|
-
var ModalDialog = (0,
|
|
20402
|
+
var import_react118 = require("react");
|
|
20403
|
+
var import_jsx_runtime101 = require("@emotion/react/jsx-runtime");
|
|
20404
|
+
var ModalDialog = (0, import_react118.forwardRef)(
|
|
19995
20405
|
({ header: header2, buttonGroup, modalSize = "lg", children, height = "auto", onRequestClose, ...props }, ref) => {
|
|
19996
|
-
return /* @__PURE__ */ (0,
|
|
20406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
19997
20407
|
Modal,
|
|
19998
20408
|
{
|
|
19999
20409
|
...props,
|
|
@@ -20005,10 +20415,10 @@ var ModalDialog = (0, import_react114.forwardRef)(
|
|
|
20005
20415
|
withoutContentPadding: true,
|
|
20006
20416
|
css: modalDialogInnerStyles,
|
|
20007
20417
|
width: "",
|
|
20008
|
-
children: /* @__PURE__ */ (0,
|
|
20009
|
-
/* @__PURE__ */ (0,
|
|
20010
|
-
/* @__PURE__ */ (0,
|
|
20011
|
-
/* @__PURE__ */ (0,
|
|
20418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(VerticalRhythm, { css: modalDialogWrapper, children: [
|
|
20419
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { css: modalHeaderStyles, children: header2 }),
|
|
20420
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { children }),
|
|
20421
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(HorizontalRhythm, { children: buttonGroup })
|
|
20012
20422
|
] })
|
|
20013
20423
|
}
|
|
20014
20424
|
);
|
|
@@ -20021,17 +20431,17 @@ init_emotion_jsx_shim();
|
|
|
20021
20431
|
|
|
20022
20432
|
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
20023
20433
|
init_emotion_jsx_shim();
|
|
20024
|
-
var
|
|
20025
|
-
var ObjectGridContainer = (gridCount) =>
|
|
20434
|
+
var import_react119 = require("@emotion/react");
|
|
20435
|
+
var ObjectGridContainer = (gridCount) => import_react119.css`
|
|
20026
20436
|
display: grid;
|
|
20027
20437
|
grid-template-columns: repeat(${gridCount}, minmax(250px, 1fr));
|
|
20028
20438
|
gap: var(--spacing-base);
|
|
20029
20439
|
`;
|
|
20030
20440
|
|
|
20031
20441
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
20032
|
-
var
|
|
20442
|
+
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
20033
20443
|
var ObjectGridContainer2 = ({ gridCount = 3, children }) => {
|
|
20034
|
-
return /* @__PURE__ */ (0,
|
|
20444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { "data-testid": "object-grid-container", css: ObjectGridContainer(gridCount), children });
|
|
20035
20445
|
};
|
|
20036
20446
|
|
|
20037
20447
|
// src/components/Objects/ObjectGridItem.tsx
|
|
@@ -20039,8 +20449,8 @@ init_emotion_jsx_shim();
|
|
|
20039
20449
|
|
|
20040
20450
|
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
20041
20451
|
init_emotion_jsx_shim();
|
|
20042
|
-
var
|
|
20043
|
-
var ObjectGridItem =
|
|
20452
|
+
var import_react120 = require("@emotion/react");
|
|
20453
|
+
var ObjectGridItem = import_react120.css`
|
|
20044
20454
|
border: 1px solid var(--gray-300);
|
|
20045
20455
|
border-radius: var(--rounded-base);
|
|
20046
20456
|
background: var(--white);
|
|
@@ -20058,21 +20468,21 @@ var ObjectGridItem = import_react116.css`
|
|
|
20058
20468
|
}
|
|
20059
20469
|
}
|
|
20060
20470
|
`;
|
|
20061
|
-
var ObjectGridItemMediaWrapper =
|
|
20471
|
+
var ObjectGridItemMediaWrapper = import_react120.css`
|
|
20062
20472
|
display: flex;
|
|
20063
20473
|
flex: 1 1 0;
|
|
20064
20474
|
position: relative;
|
|
20065
20475
|
`;
|
|
20066
|
-
var ObjectGridItemContentWrapper =
|
|
20476
|
+
var ObjectGridItemContentWrapper = import_react120.css`
|
|
20067
20477
|
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
20068
20478
|
min-height: 52px;
|
|
20069
20479
|
`;
|
|
20070
|
-
var ObjectGridItemImage =
|
|
20480
|
+
var ObjectGridItemImage = import_react120.css`
|
|
20071
20481
|
object-fit: cover;
|
|
20072
20482
|
width: 100%;
|
|
20073
20483
|
height: auto;
|
|
20074
20484
|
`;
|
|
20075
|
-
var MenuBtn =
|
|
20485
|
+
var MenuBtn = import_react120.css`
|
|
20076
20486
|
border: none;
|
|
20077
20487
|
background: transparent;
|
|
20078
20488
|
padding: var(--spacing-xs);
|
|
@@ -20087,7 +20497,7 @@ var MenuBtn = import_react116.css`
|
|
|
20087
20497
|
`;
|
|
20088
20498
|
|
|
20089
20499
|
// src/components/Objects/ObjectGridItem.tsx
|
|
20090
|
-
var
|
|
20500
|
+
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
20091
20501
|
var ObjectGridItem2 = ({
|
|
20092
20502
|
header: header2,
|
|
20093
20503
|
cover,
|
|
@@ -20096,28 +20506,28 @@ var ObjectGridItem2 = ({
|
|
|
20096
20506
|
isSelected,
|
|
20097
20507
|
children
|
|
20098
20508
|
}) => {
|
|
20099
|
-
return /* @__PURE__ */ (0,
|
|
20100
|
-
/* @__PURE__ */ (0,
|
|
20101
|
-
/* @__PURE__ */ (0,
|
|
20102
|
-
/* @__PURE__ */ (0,
|
|
20103
|
-
/* @__PURE__ */ (0,
|
|
20509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { css: ObjectGridItem, "aria-selected": isSelected, children: [
|
|
20510
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: ObjectGridItemMediaWrapper, children: cover }),
|
|
20511
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(HorizontalRhythm, { css: ObjectGridItemContentWrapper, justify: "space-between", gap: "sm", children: [
|
|
20512
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(VerticalRhythm, { gap: "0", children: [
|
|
20513
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
20104
20514
|
children
|
|
20105
20515
|
] }),
|
|
20106
|
-
/* @__PURE__ */ (0,
|
|
20516
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(HorizontalRhythm, { gap: "xs", align: "flex-start", children: [
|
|
20107
20517
|
rightSlot,
|
|
20108
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
20518
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
20109
20519
|
Menu,
|
|
20110
20520
|
{
|
|
20111
20521
|
menuTrigger: (
|
|
20112
20522
|
// TODO: once insights lands we should be able to replace this with MenuTrigger component
|
|
20113
|
-
/* @__PURE__ */ (0,
|
|
20523
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
20114
20524
|
"button",
|
|
20115
20525
|
{
|
|
20116
20526
|
type: "button",
|
|
20117
20527
|
"data-testid": "object-grid-item-menu-btn",
|
|
20118
20528
|
title: "menu options",
|
|
20119
20529
|
css: MenuBtn,
|
|
20120
|
-
children: /* @__PURE__ */ (0,
|
|
20530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { icon: "more-alt", size: "1rem", iconColor: "currentColor" })
|
|
20121
20531
|
}
|
|
20122
20532
|
)
|
|
20123
20533
|
),
|
|
@@ -20135,15 +20545,15 @@ init_emotion_jsx_shim();
|
|
|
20135
20545
|
|
|
20136
20546
|
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
20137
20547
|
init_emotion_jsx_shim();
|
|
20138
|
-
var
|
|
20139
|
-
var CoverImage =
|
|
20548
|
+
var import_react121 = require("@emotion/react");
|
|
20549
|
+
var CoverImage = import_react121.css`
|
|
20140
20550
|
aspect-ratio: 16/9;
|
|
20141
20551
|
max-width: 100%;
|
|
20142
20552
|
max-height: 100%;
|
|
20143
20553
|
height: auto;
|
|
20144
20554
|
padding: var(--spacing-sm);
|
|
20145
20555
|
`;
|
|
20146
|
-
var CoverIconWrapper =
|
|
20556
|
+
var CoverIconWrapper = import_react121.css`
|
|
20147
20557
|
position: relative;
|
|
20148
20558
|
display: flex;
|
|
20149
20559
|
align-items: center;
|
|
@@ -20151,7 +20561,7 @@ var CoverIconWrapper = import_react117.css`
|
|
|
20151
20561
|
flex: 1;
|
|
20152
20562
|
overflow: hidden;
|
|
20153
20563
|
`;
|
|
20154
|
-
var CoverIconGhost =
|
|
20564
|
+
var CoverIconGhost = import_react121.css`
|
|
20155
20565
|
position: absolute;
|
|
20156
20566
|
width: 60%;
|
|
20157
20567
|
height: auto;
|
|
@@ -20159,7 +20569,7 @@ var CoverIconGhost = import_react117.css`
|
|
|
20159
20569
|
opacity: 0.05;
|
|
20160
20570
|
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
20161
20571
|
`;
|
|
20162
|
-
var CoverSlot =
|
|
20572
|
+
var CoverSlot = import_react121.css`
|
|
20163
20573
|
align-items: center;
|
|
20164
20574
|
background: var(--white);
|
|
20165
20575
|
display: flex;
|
|
@@ -20170,15 +20580,15 @@ var CoverSlot = import_react117.css`
|
|
|
20170
20580
|
width: 24px;
|
|
20171
20581
|
height: 24px;
|
|
20172
20582
|
`;
|
|
20173
|
-
var CoverSlotLeft =
|
|
20583
|
+
var CoverSlotLeft = import_react121.css`
|
|
20174
20584
|
border-bottom-right-radius: var(--rounded-base);
|
|
20175
20585
|
left: var(--spacing-sm);
|
|
20176
20586
|
`;
|
|
20177
|
-
var CoverSlotRight =
|
|
20587
|
+
var CoverSlotRight = import_react121.css`
|
|
20178
20588
|
border-bottom-left-radius: var(--rounded-base);
|
|
20179
20589
|
right: var(--spacing-sm);
|
|
20180
20590
|
`;
|
|
20181
|
-
var CoverButton =
|
|
20591
|
+
var CoverButton = import_react121.css`
|
|
20182
20592
|
align-items: stretch;
|
|
20183
20593
|
border: none;
|
|
20184
20594
|
background: none;
|
|
@@ -20191,7 +20601,7 @@ var CoverButton = import_react117.css`
|
|
|
20191
20601
|
outline: none;
|
|
20192
20602
|
}
|
|
20193
20603
|
`;
|
|
20194
|
-
var CoverSelectedChip =
|
|
20604
|
+
var CoverSelectedChip = import_react121.css`
|
|
20195
20605
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
20196
20606
|
opacity: 0;
|
|
20197
20607
|
position: absolute;
|
|
@@ -20200,11 +20610,11 @@ var CoverSelectedChip = import_react117.css`
|
|
|
20200
20610
|
`;
|
|
20201
20611
|
|
|
20202
20612
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
20203
|
-
var
|
|
20613
|
+
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
20204
20614
|
var ObjectGridItemCardCover = (props) => {
|
|
20205
20615
|
if ("imageUrl" in props && props.imageUrl) {
|
|
20206
20616
|
const { imageUrl } = props;
|
|
20207
|
-
return /* @__PURE__ */ (0,
|
|
20617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20208
20618
|
"img",
|
|
20209
20619
|
{
|
|
20210
20620
|
src: imageUrl,
|
|
@@ -20217,9 +20627,9 @@ var ObjectGridItemCardCover = (props) => {
|
|
|
20217
20627
|
}
|
|
20218
20628
|
if ("icon" in props && props.icon) {
|
|
20219
20629
|
const { icon } = props;
|
|
20220
|
-
return /* @__PURE__ */ (0,
|
|
20221
|
-
/* @__PURE__ */ (0,
|
|
20222
|
-
/* @__PURE__ */ (0,
|
|
20630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
20631
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { icon, iconColor: "currentColor", css: CoverIconGhost }),
|
|
20632
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { icon, iconColor: "currentColor", size: 48 })
|
|
20223
20633
|
] });
|
|
20224
20634
|
}
|
|
20225
20635
|
};
|
|
@@ -20228,10 +20638,10 @@ var ObjectGridItemCover = ({
|
|
|
20228
20638
|
coverSlotRight,
|
|
20229
20639
|
...props
|
|
20230
20640
|
}) => {
|
|
20231
|
-
return /* @__PURE__ */ (0,
|
|
20232
|
-
coverSlotLeft ? /* @__PURE__ */ (0,
|
|
20233
|
-
/* @__PURE__ */ (0,
|
|
20234
|
-
coverSlotRight ? /* @__PURE__ */ (0,
|
|
20641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
20642
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20643
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20644
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null
|
|
20235
20645
|
] });
|
|
20236
20646
|
};
|
|
20237
20647
|
var ObjectGridItemCoverButton = ({
|
|
@@ -20243,22 +20653,22 @@ var ObjectGridItemCoverButton = ({
|
|
|
20243
20653
|
selectedText = "selected",
|
|
20244
20654
|
...props
|
|
20245
20655
|
}) => {
|
|
20246
|
-
return /* @__PURE__ */ (0,
|
|
20247
|
-
coverSlotLeft ? /* @__PURE__ */ (0,
|
|
20248
|
-
/* @__PURE__ */ (0,
|
|
20249
|
-
coverSlotRight ? /* @__PURE__ */ (0,
|
|
20250
|
-
isSelected ? /* @__PURE__ */ (0,
|
|
20656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("button", { type: "button", css: CoverButton, onClick: () => onSelection(id), "aria-selected": isSelected, children: [
|
|
20657
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20658
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20659
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
20660
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
20251
20661
|
] });
|
|
20252
20662
|
};
|
|
20253
20663
|
|
|
20254
20664
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20255
20665
|
init_emotion_jsx_shim();
|
|
20256
|
-
var
|
|
20666
|
+
var import_react123 = require("react");
|
|
20257
20667
|
|
|
20258
20668
|
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
20259
20669
|
init_emotion_jsx_shim();
|
|
20260
|
-
var
|
|
20261
|
-
var ObjectGridItemHeading =
|
|
20670
|
+
var import_react122 = require("@emotion/react");
|
|
20671
|
+
var ObjectGridItemHeading = import_react122.css`
|
|
20262
20672
|
overflow: hidden;
|
|
20263
20673
|
text-overflow: ellipsis;
|
|
20264
20674
|
white-space: initial;
|
|
@@ -20266,20 +20676,20 @@ var ObjectGridItemHeading = import_react118.css`
|
|
|
20266
20676
|
-webkit-line-clamp: 1;
|
|
20267
20677
|
-webkit-box-orient: vertical;
|
|
20268
20678
|
`;
|
|
20269
|
-
var PopoverContent =
|
|
20679
|
+
var PopoverContent = import_react122.css`
|
|
20270
20680
|
min-width: 50px;
|
|
20271
20681
|
`;
|
|
20272
20682
|
|
|
20273
20683
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20274
|
-
var
|
|
20684
|
+
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
20275
20685
|
var ObjectGridItemHeading2 = ({
|
|
20276
20686
|
heading,
|
|
20277
20687
|
beforeHeadingSlot,
|
|
20278
20688
|
afterHeadingSlot
|
|
20279
20689
|
}) => {
|
|
20280
|
-
const [hasTruncation, setHasTruncation] = (0,
|
|
20281
|
-
const headingRef = (0,
|
|
20282
|
-
(0,
|
|
20690
|
+
const [hasTruncation, setHasTruncation] = (0, import_react123.useState)(false);
|
|
20691
|
+
const headingRef = (0, import_react123.useRef)(null);
|
|
20692
|
+
(0, import_react123.useEffect)(() => {
|
|
20283
20693
|
const currentHeading = headingRef.current;
|
|
20284
20694
|
const observer = new ResizeObserver((entries) => {
|
|
20285
20695
|
for (const entry of entries) {
|
|
@@ -20296,23 +20706,23 @@ var ObjectGridItemHeading2 = ({
|
|
|
20296
20706
|
}
|
|
20297
20707
|
};
|
|
20298
20708
|
}, []);
|
|
20299
|
-
return /* @__PURE__ */ (0,
|
|
20709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
20300
20710
|
beforeHeadingSlot,
|
|
20301
|
-
/* @__PURE__ */ (0,
|
|
20711
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { title: hasTruncation ? heading : "", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, children: heading }) }),
|
|
20302
20712
|
afterHeadingSlot
|
|
20303
20713
|
] });
|
|
20304
20714
|
};
|
|
20305
20715
|
|
|
20306
20716
|
// src/components/Objects/ObjectGridItemIconWithTooltip.tsx
|
|
20307
20717
|
init_emotion_jsx_shim();
|
|
20308
|
-
var
|
|
20718
|
+
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
20309
20719
|
var ObjectGridItemIconWithTooltip = ({
|
|
20310
20720
|
tooltipTitle,
|
|
20311
20721
|
placement = "bottom-start",
|
|
20312
20722
|
icon,
|
|
20313
20723
|
iconColor = "accent-dark"
|
|
20314
20724
|
}) => {
|
|
20315
|
-
return /* @__PURE__ */ (0,
|
|
20725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
20316
20726
|
};
|
|
20317
20727
|
|
|
20318
20728
|
// src/components/Pagination/Pagination.tsx
|
|
@@ -20349,7 +20759,7 @@ var page = import_css.css`
|
|
|
20349
20759
|
`;
|
|
20350
20760
|
|
|
20351
20761
|
// src/components/Pagination/Pagination.tsx
|
|
20352
|
-
var
|
|
20762
|
+
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
20353
20763
|
function Pagination({
|
|
20354
20764
|
limit,
|
|
20355
20765
|
offset,
|
|
@@ -20364,12 +20774,12 @@ function Pagination({
|
|
|
20364
20774
|
if (pageCount <= 1) {
|
|
20365
20775
|
return null;
|
|
20366
20776
|
}
|
|
20367
|
-
return /* @__PURE__ */ (0,
|
|
20777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
20368
20778
|
import_react_paginate.default,
|
|
20369
20779
|
{
|
|
20370
20780
|
forcePage: currentPage,
|
|
20371
|
-
previousLabel: /* @__PURE__ */ (0,
|
|
20372
|
-
nextLabel: /* @__PURE__ */ (0,
|
|
20781
|
+
previousLabel: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: prevNextControls, children: "<" }),
|
|
20782
|
+
nextLabel: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: prevNextControls, children: ">" }),
|
|
20373
20783
|
breakLabel: "...",
|
|
20374
20784
|
pageCount,
|
|
20375
20785
|
marginPagesDisplayed: 2,
|
|
@@ -20389,8 +20799,8 @@ function Pagination({
|
|
|
20389
20799
|
|
|
20390
20800
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
20391
20801
|
init_emotion_jsx_shim();
|
|
20392
|
-
var
|
|
20393
|
-
var ParameterShellContext = (0,
|
|
20802
|
+
var import_react124 = require("react");
|
|
20803
|
+
var ParameterShellContext = (0, import_react124.createContext)({
|
|
20394
20804
|
id: "",
|
|
20395
20805
|
label: "",
|
|
20396
20806
|
hiddenLabel: void 0,
|
|
@@ -20399,7 +20809,7 @@ var ParameterShellContext = (0, import_react120.createContext)({
|
|
|
20399
20809
|
}
|
|
20400
20810
|
});
|
|
20401
20811
|
var useParameterShell = () => {
|
|
20402
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
20812
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react124.useContext)(ParameterShellContext);
|
|
20403
20813
|
return {
|
|
20404
20814
|
id,
|
|
20405
20815
|
label,
|
|
@@ -20414,8 +20824,8 @@ init_emotion_jsx_shim();
|
|
|
20414
20824
|
|
|
20415
20825
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
20416
20826
|
init_emotion_jsx_shim();
|
|
20417
|
-
var
|
|
20418
|
-
var inputIconBtn =
|
|
20827
|
+
var import_react125 = require("@emotion/react");
|
|
20828
|
+
var inputIconBtn = import_react125.css`
|
|
20419
20829
|
align-items: center;
|
|
20420
20830
|
border: none;
|
|
20421
20831
|
border-radius: var(--rounded-base);
|
|
@@ -20441,7 +20851,7 @@ var inputIconBtn = import_react121.css`
|
|
|
20441
20851
|
`;
|
|
20442
20852
|
|
|
20443
20853
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
20444
|
-
var
|
|
20854
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
20445
20855
|
var LabelLeadingIcon = ({
|
|
20446
20856
|
icon,
|
|
20447
20857
|
iconColor,
|
|
@@ -20453,7 +20863,7 @@ var LabelLeadingIcon = ({
|
|
|
20453
20863
|
...props
|
|
20454
20864
|
}) => {
|
|
20455
20865
|
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
20456
|
-
return /* @__PURE__ */ (0,
|
|
20866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Tooltip, { title: titleFr, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
20457
20867
|
"button",
|
|
20458
20868
|
{
|
|
20459
20869
|
css: inputIconBtn,
|
|
@@ -20463,7 +20873,7 @@ var LabelLeadingIcon = ({
|
|
|
20463
20873
|
...props,
|
|
20464
20874
|
"data-testid": "lock-button",
|
|
20465
20875
|
children: [
|
|
20466
|
-
/* @__PURE__ */ (0,
|
|
20876
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
20467
20877
|
Icon,
|
|
20468
20878
|
{
|
|
20469
20879
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -20483,8 +20893,8 @@ init_emotion_jsx_shim();
|
|
|
20483
20893
|
|
|
20484
20894
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
20485
20895
|
init_emotion_jsx_shim();
|
|
20486
|
-
var
|
|
20487
|
-
var inputContainer2 =
|
|
20896
|
+
var import_react126 = require("@emotion/react");
|
|
20897
|
+
var inputContainer2 = import_react126.css`
|
|
20488
20898
|
position: relative;
|
|
20489
20899
|
scroll-margin: var(--spacing-2xl);
|
|
20490
20900
|
|
|
@@ -20497,14 +20907,14 @@ var inputContainer2 = import_react122.css`
|
|
|
20497
20907
|
}
|
|
20498
20908
|
}
|
|
20499
20909
|
`;
|
|
20500
|
-
var labelText2 =
|
|
20910
|
+
var labelText2 = import_react126.css`
|
|
20501
20911
|
align-items: center;
|
|
20502
20912
|
display: flex;
|
|
20503
20913
|
gap: var(--spacing-xs);
|
|
20504
20914
|
font-weight: var(--fw-regular);
|
|
20505
20915
|
margin: 0 0 var(--spacing-xs);
|
|
20506
20916
|
`;
|
|
20507
|
-
var input3 =
|
|
20917
|
+
var input3 = import_react126.css`
|
|
20508
20918
|
display: block;
|
|
20509
20919
|
appearance: none;
|
|
20510
20920
|
box-sizing: border-box;
|
|
@@ -20552,18 +20962,18 @@ var input3 = import_react122.css`
|
|
|
20552
20962
|
color: var(--gray-400);
|
|
20553
20963
|
}
|
|
20554
20964
|
`;
|
|
20555
|
-
var selectInput =
|
|
20965
|
+
var selectInput = import_react126.css`
|
|
20556
20966
|
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");
|
|
20557
20967
|
background-position: right var(--spacing-sm) center;
|
|
20558
20968
|
background-repeat: no-repeat;
|
|
20559
20969
|
background-size: 1rem;
|
|
20560
20970
|
padding-right: var(--spacing-xl);
|
|
20561
20971
|
`;
|
|
20562
|
-
var inputWrapper =
|
|
20972
|
+
var inputWrapper = import_react126.css`
|
|
20563
20973
|
display: flex; // used to correct overflow with chrome textarea
|
|
20564
20974
|
position: relative;
|
|
20565
20975
|
`;
|
|
20566
|
-
var inputIcon2 =
|
|
20976
|
+
var inputIcon2 = import_react126.css`
|
|
20567
20977
|
align-items: center;
|
|
20568
20978
|
background: var(--white);
|
|
20569
20979
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -20579,7 +20989,7 @@ var inputIcon2 = import_react122.css`
|
|
|
20579
20989
|
width: var(--spacing-lg);
|
|
20580
20990
|
z-index: var(--z-10);
|
|
20581
20991
|
`;
|
|
20582
|
-
var inputToggleLabel2 =
|
|
20992
|
+
var inputToggleLabel2 = import_react126.css`
|
|
20583
20993
|
--inline-label-color: var(--typography-base);
|
|
20584
20994
|
align-items: center;
|
|
20585
20995
|
cursor: pointer;
|
|
@@ -20594,7 +21004,7 @@ var inputToggleLabel2 = import_react122.css`
|
|
|
20594
21004
|
--inline-label-color: var(--gray-400);
|
|
20595
21005
|
}
|
|
20596
21006
|
`;
|
|
20597
|
-
var toggleInput2 =
|
|
21007
|
+
var toggleInput2 = import_react126.css`
|
|
20598
21008
|
appearance: none;
|
|
20599
21009
|
border: 1px solid var(--gray-200);
|
|
20600
21010
|
background: var(--white);
|
|
@@ -20647,7 +21057,7 @@ var toggleInput2 = import_react122.css`
|
|
|
20647
21057
|
border-color: var(--gray-300);
|
|
20648
21058
|
}
|
|
20649
21059
|
`;
|
|
20650
|
-
var inlineLabel2 =
|
|
21060
|
+
var inlineLabel2 = import_react126.css`
|
|
20651
21061
|
color: var(--inline-label-color);
|
|
20652
21062
|
padding-left: var(--spacing-md);
|
|
20653
21063
|
font-size: var(--fs-sm);
|
|
@@ -20664,7 +21074,7 @@ var inlineLabel2 = import_react122.css`
|
|
|
20664
21074
|
}
|
|
20665
21075
|
}
|
|
20666
21076
|
`;
|
|
20667
|
-
var inputMenu =
|
|
21077
|
+
var inputMenu = import_react126.css`
|
|
20668
21078
|
background: none;
|
|
20669
21079
|
border: none;
|
|
20670
21080
|
padding: var(--spacing-2xs);
|
|
@@ -20672,10 +21082,10 @@ var inputMenu = import_react122.css`
|
|
|
20672
21082
|
top: calc(var(--spacing-md) * -1.2);
|
|
20673
21083
|
right: 0;
|
|
20674
21084
|
`;
|
|
20675
|
-
var inputActionItems =
|
|
21085
|
+
var inputActionItems = import_react126.css`
|
|
20676
21086
|
display: flex;
|
|
20677
21087
|
`;
|
|
20678
|
-
var inputMenuHover =
|
|
21088
|
+
var inputMenuHover = import_react126.css`
|
|
20679
21089
|
opacity: var(--opacity-50);
|
|
20680
21090
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
20681
21091
|
|
|
@@ -20685,11 +21095,11 @@ var inputMenuHover = import_react122.css`
|
|
|
20685
21095
|
background-color: var(--gray-200);
|
|
20686
21096
|
}
|
|
20687
21097
|
`;
|
|
20688
|
-
var textarea2 =
|
|
21098
|
+
var textarea2 = import_react126.css`
|
|
20689
21099
|
resize: vertical;
|
|
20690
21100
|
min-height: 2rem;
|
|
20691
21101
|
`;
|
|
20692
|
-
var dataConnectButton =
|
|
21102
|
+
var dataConnectButton = import_react126.css`
|
|
20693
21103
|
align-items: center;
|
|
20694
21104
|
appearance: none;
|
|
20695
21105
|
box-sizing: border-box;
|
|
@@ -20724,7 +21134,7 @@ var dataConnectButton = import_react122.css`
|
|
|
20724
21134
|
pointer-events: none;
|
|
20725
21135
|
}
|
|
20726
21136
|
`;
|
|
20727
|
-
var linkParameterBtn =
|
|
21137
|
+
var linkParameterBtn = import_react126.css`
|
|
20728
21138
|
border-radius: var(--rounded-base);
|
|
20729
21139
|
background: transparent;
|
|
20730
21140
|
border: none;
|
|
@@ -20733,7 +21143,7 @@ var linkParameterBtn = import_react122.css`
|
|
|
20733
21143
|
font-size: var(--fs-sm);
|
|
20734
21144
|
line-height: 1;
|
|
20735
21145
|
`;
|
|
20736
|
-
var linkParameterControls =
|
|
21146
|
+
var linkParameterControls = import_react126.css`
|
|
20737
21147
|
position: absolute;
|
|
20738
21148
|
inset: 0 0 0 auto;
|
|
20739
21149
|
padding: 0 var(--spacing-base);
|
|
@@ -20742,7 +21152,7 @@ var linkParameterControls = import_react122.css`
|
|
|
20742
21152
|
justify-content: center;
|
|
20743
21153
|
gap: var(--spacing-base);
|
|
20744
21154
|
`;
|
|
20745
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
21155
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react126.css`
|
|
20746
21156
|
padding-right: calc(
|
|
20747
21157
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
20748
21158
|
var(--spacing-base)
|
|
@@ -20755,7 +21165,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react122.css`
|
|
|
20755
21165
|
}
|
|
20756
21166
|
}
|
|
20757
21167
|
`;
|
|
20758
|
-
var linkParameterIcon =
|
|
21168
|
+
var linkParameterIcon = import_react126.css`
|
|
20759
21169
|
align-items: center;
|
|
20760
21170
|
color: var(--brand-secondary-3);
|
|
20761
21171
|
display: flex;
|
|
@@ -20770,7 +21180,7 @@ var linkParameterIcon = import_react122.css`
|
|
|
20770
21180
|
`;
|
|
20771
21181
|
|
|
20772
21182
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
20773
|
-
var
|
|
21183
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20774
21184
|
function ParameterDataResource({
|
|
20775
21185
|
label,
|
|
20776
21186
|
labelLeadingIcon,
|
|
@@ -20780,12 +21190,12 @@ function ParameterDataResource({
|
|
|
20780
21190
|
disabled: disabled2,
|
|
20781
21191
|
children
|
|
20782
21192
|
}) {
|
|
20783
|
-
return /* @__PURE__ */ (0,
|
|
20784
|
-
/* @__PURE__ */ (0,
|
|
21193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
21194
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { css: labelText2, children: [
|
|
20785
21195
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
20786
21196
|
label
|
|
20787
21197
|
] }),
|
|
20788
|
-
/* @__PURE__ */ (0,
|
|
21198
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
20789
21199
|
"button",
|
|
20790
21200
|
{
|
|
20791
21201
|
type: "button",
|
|
@@ -20794,12 +21204,12 @@ function ParameterDataResource({
|
|
|
20794
21204
|
disabled: disabled2,
|
|
20795
21205
|
onClick: onConnectDatasource,
|
|
20796
21206
|
children: [
|
|
20797
|
-
/* @__PURE__ */ (0,
|
|
21207
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
20798
21208
|
children
|
|
20799
21209
|
]
|
|
20800
21210
|
}
|
|
20801
21211
|
),
|
|
20802
|
-
caption ? /* @__PURE__ */ (0,
|
|
21212
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Caption, { children: caption }) : null
|
|
20803
21213
|
] });
|
|
20804
21214
|
}
|
|
20805
21215
|
|
|
@@ -20808,20 +21218,20 @@ init_emotion_jsx_shim();
|
|
|
20808
21218
|
|
|
20809
21219
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
20810
21220
|
init_emotion_jsx_shim();
|
|
20811
|
-
var
|
|
20812
|
-
var ParameterDrawerHeaderContainer =
|
|
21221
|
+
var import_react127 = require("@emotion/react");
|
|
21222
|
+
var ParameterDrawerHeaderContainer = import_react127.css`
|
|
20813
21223
|
align-items: center;
|
|
20814
21224
|
display: flex;
|
|
20815
21225
|
gap: var(--spacing-base);
|
|
20816
21226
|
justify-content: space-between;
|
|
20817
21227
|
margin-bottom: var(--spacing-sm);
|
|
20818
21228
|
`;
|
|
20819
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
21229
|
+
var ParameterDrawerHeaderTitleGroup = import_react127.css`
|
|
20820
21230
|
align-items: center;
|
|
20821
21231
|
display: flex;
|
|
20822
21232
|
gap: var(--spacing-sm);
|
|
20823
21233
|
`;
|
|
20824
|
-
var ParameterDrawerHeaderTitle =
|
|
21234
|
+
var ParameterDrawerHeaderTitle = import_react127.css`
|
|
20825
21235
|
text-overflow: ellipsis;
|
|
20826
21236
|
white-space: nowrap;
|
|
20827
21237
|
overflow: hidden;
|
|
@@ -20829,12 +21239,12 @@ var ParameterDrawerHeaderTitle = import_react123.css`
|
|
|
20829
21239
|
`;
|
|
20830
21240
|
|
|
20831
21241
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
20832
|
-
var
|
|
21242
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
20833
21243
|
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
20834
|
-
return /* @__PURE__ */ (0,
|
|
20835
|
-
/* @__PURE__ */ (0,
|
|
21244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
21245
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
20836
21246
|
iconBeforeTitle,
|
|
20837
|
-
/* @__PURE__ */ (0,
|
|
21247
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
20838
21248
|
] }),
|
|
20839
21249
|
children
|
|
20840
21250
|
] });
|
|
@@ -20842,12 +21252,12 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
20842
21252
|
|
|
20843
21253
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
20844
21254
|
init_emotion_jsx_shim();
|
|
20845
|
-
var
|
|
21255
|
+
var import_react129 = require("react");
|
|
20846
21256
|
|
|
20847
21257
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
20848
21258
|
init_emotion_jsx_shim();
|
|
20849
|
-
var
|
|
20850
|
-
var fieldsetStyles =
|
|
21259
|
+
var import_react128 = require("@emotion/react");
|
|
21260
|
+
var fieldsetStyles = import_react128.css`
|
|
20851
21261
|
&:disabled,
|
|
20852
21262
|
[readonly] {
|
|
20853
21263
|
pointer-events: none;
|
|
@@ -20858,7 +21268,7 @@ var fieldsetStyles = import_react124.css`
|
|
|
20858
21268
|
}
|
|
20859
21269
|
}
|
|
20860
21270
|
`;
|
|
20861
|
-
var fieldsetLegend2 =
|
|
21271
|
+
var fieldsetLegend2 = import_react128.css`
|
|
20862
21272
|
display: block;
|
|
20863
21273
|
font-weight: var(--fw-medium);
|
|
20864
21274
|
margin-bottom: var(--spacing-sm);
|
|
@@ -20866,11 +21276,11 @@ var fieldsetLegend2 = import_react124.css`
|
|
|
20866
21276
|
`;
|
|
20867
21277
|
|
|
20868
21278
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
20869
|
-
var
|
|
20870
|
-
var ParameterGroup = (0,
|
|
21279
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
21280
|
+
var ParameterGroup = (0, import_react129.forwardRef)(
|
|
20871
21281
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
20872
|
-
return /* @__PURE__ */ (0,
|
|
20873
|
-
/* @__PURE__ */ (0,
|
|
21282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
21283
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
20874
21284
|
children
|
|
20875
21285
|
] });
|
|
20876
21286
|
}
|
|
@@ -20878,24 +21288,24 @@ var ParameterGroup = (0, import_react125.forwardRef)(
|
|
|
20878
21288
|
|
|
20879
21289
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
20880
21290
|
init_emotion_jsx_shim();
|
|
20881
|
-
var
|
|
21291
|
+
var import_react136 = require("react");
|
|
20882
21292
|
|
|
20883
21293
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20884
21294
|
init_emotion_jsx_shim();
|
|
20885
|
-
var
|
|
21295
|
+
var import_react131 = require("react");
|
|
20886
21296
|
var import_react_dom2 = require("react-dom");
|
|
20887
21297
|
|
|
20888
21298
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
20889
21299
|
init_emotion_jsx_shim();
|
|
20890
|
-
var
|
|
20891
|
-
var previewWrapper =
|
|
21300
|
+
var import_react130 = require("@emotion/react");
|
|
21301
|
+
var previewWrapper = import_react130.css`
|
|
20892
21302
|
margin-top: var(--spacing-xs);
|
|
20893
21303
|
background: var(--gray-50);
|
|
20894
21304
|
padding: var(--spacing-sm);
|
|
20895
21305
|
border: solid 1px var(--gray-300);
|
|
20896
21306
|
border-radius: var(--rounded-sm);
|
|
20897
21307
|
`;
|
|
20898
|
-
var previewLink =
|
|
21308
|
+
var previewLink = import_react130.css`
|
|
20899
21309
|
display: block;
|
|
20900
21310
|
width: 100%;
|
|
20901
21311
|
|
|
@@ -20903,7 +21313,7 @@ var previewLink = import_react126.css`
|
|
|
20903
21313
|
max-height: 9rem;
|
|
20904
21314
|
}
|
|
20905
21315
|
`;
|
|
20906
|
-
var previewModalWrapper =
|
|
21316
|
+
var previewModalWrapper = import_react130.css`
|
|
20907
21317
|
background: var(--gray-50);
|
|
20908
21318
|
display: flex;
|
|
20909
21319
|
height: 100%;
|
|
@@ -20912,7 +21322,7 @@ var previewModalWrapper = import_react126.css`
|
|
|
20912
21322
|
border: solid 1px var(--gray-300);
|
|
20913
21323
|
border-radius: var(--rounded-sm);
|
|
20914
21324
|
`;
|
|
20915
|
-
var previewModalImage =
|
|
21325
|
+
var previewModalImage = import_react130.css`
|
|
20916
21326
|
display: flex;
|
|
20917
21327
|
height: 100%;
|
|
20918
21328
|
width: 100%;
|
|
@@ -20924,32 +21334,32 @@ var previewModalImage = import_react126.css`
|
|
|
20924
21334
|
`;
|
|
20925
21335
|
|
|
20926
21336
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20927
|
-
var
|
|
21337
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
20928
21338
|
function ParameterImagePreview({ imageSrc }) {
|
|
20929
|
-
const [showModal, setShowModal] = (0,
|
|
20930
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
20931
|
-
/* @__PURE__ */ (0,
|
|
20932
|
-
/* @__PURE__ */ (0,
|
|
21339
|
+
const [showModal, setShowModal] = (0, import_react131.useState)(false);
|
|
21340
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { css: previewWrapper, children: [
|
|
21341
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
21342
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
20933
21343
|
"button",
|
|
20934
21344
|
{
|
|
20935
21345
|
css: previewLink,
|
|
20936
21346
|
onClick: () => {
|
|
20937
21347
|
setShowModal(true);
|
|
20938
21348
|
},
|
|
20939
|
-
children: /* @__PURE__ */ (0,
|
|
21349
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
20940
21350
|
}
|
|
20941
21351
|
)
|
|
20942
21352
|
] }) : null;
|
|
20943
21353
|
}
|
|
20944
21354
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
20945
|
-
return open ? /* @__PURE__ */ (0,
|
|
20946
|
-
/* @__PURE__ */ (0,
|
|
21355
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_jsx_runtime112.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
21356
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
20947
21357
|
Modal,
|
|
20948
21358
|
{
|
|
20949
21359
|
header: "Image Preview",
|
|
20950
21360
|
onRequestClose,
|
|
20951
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
20952
|
-
children: /* @__PURE__ */ (0,
|
|
21361
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
21362
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
20953
21363
|
}
|
|
20954
21364
|
),
|
|
20955
21365
|
document.body
|
|
@@ -20958,27 +21368,27 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
20958
21368
|
|
|
20959
21369
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
20960
21370
|
init_emotion_jsx_shim();
|
|
20961
|
-
var
|
|
20962
|
-
var
|
|
21371
|
+
var import_react134 = require("@emotion/react");
|
|
21372
|
+
var import_react135 = require("react");
|
|
20963
21373
|
|
|
20964
21374
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
20965
21375
|
init_emotion_jsx_shim();
|
|
20966
|
-
var
|
|
21376
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
20967
21377
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
20968
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
21378
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
20969
21379
|
};
|
|
20970
21380
|
|
|
20971
21381
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
20972
21382
|
init_emotion_jsx_shim();
|
|
20973
|
-
var
|
|
20974
|
-
var
|
|
20975
|
-
var ParameterMenuButton = (0,
|
|
21383
|
+
var import_react132 = require("react");
|
|
21384
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
21385
|
+
var ParameterMenuButton = (0, import_react132.forwardRef)(
|
|
20976
21386
|
({ label, children }, ref) => {
|
|
20977
|
-
return /* @__PURE__ */ (0,
|
|
21387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20978
21388
|
Menu,
|
|
20979
21389
|
{
|
|
20980
21390
|
menuLabel: `${label} menu`,
|
|
20981
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
21391
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20982
21392
|
"button",
|
|
20983
21393
|
{
|
|
20984
21394
|
className: "parameter-menu",
|
|
@@ -20986,7 +21396,7 @@ var ParameterMenuButton = (0, import_react128.forwardRef)(
|
|
|
20986
21396
|
type: "button",
|
|
20987
21397
|
"aria-label": `${label} options`,
|
|
20988
21398
|
ref,
|
|
20989
|
-
children: /* @__PURE__ */ (0,
|
|
21399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
20990
21400
|
}
|
|
20991
21401
|
),
|
|
20992
21402
|
children
|
|
@@ -20997,14 +21407,14 @@ var ParameterMenuButton = (0, import_react128.forwardRef)(
|
|
|
20997
21407
|
|
|
20998
21408
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
20999
21409
|
init_emotion_jsx_shim();
|
|
21000
|
-
var
|
|
21001
|
-
var emptyParameterShell =
|
|
21410
|
+
var import_react133 = require("@emotion/react");
|
|
21411
|
+
var emptyParameterShell = import_react133.css`
|
|
21002
21412
|
border-radius: var(--rounded-sm);
|
|
21003
21413
|
flex-grow: 1;
|
|
21004
21414
|
position: relative;
|
|
21005
21415
|
max-width: 100%;
|
|
21006
21416
|
`;
|
|
21007
|
-
var emptyParameterShellText =
|
|
21417
|
+
var emptyParameterShellText = import_react133.css`
|
|
21008
21418
|
background: var(--brand-secondary-6);
|
|
21009
21419
|
border-radius: var(--rounded-sm);
|
|
21010
21420
|
padding: var(--spacing-sm);
|
|
@@ -21012,7 +21422,7 @@ var emptyParameterShellText = import_react129.css`
|
|
|
21012
21422
|
font-size: var(--fs-sm);
|
|
21013
21423
|
margin: 0;
|
|
21014
21424
|
`;
|
|
21015
|
-
var overrideMarker =
|
|
21425
|
+
var overrideMarker = import_react133.css`
|
|
21016
21426
|
border-radius: var(--rounded-sm);
|
|
21017
21427
|
border: 10px solid var(--gray-300);
|
|
21018
21428
|
border-left-color: transparent;
|
|
@@ -21023,7 +21433,7 @@ var overrideMarker = import_react129.css`
|
|
|
21023
21433
|
`;
|
|
21024
21434
|
|
|
21025
21435
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
21026
|
-
var
|
|
21436
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
21027
21437
|
var extractParameterProps = (props) => {
|
|
21028
21438
|
const {
|
|
21029
21439
|
id,
|
|
@@ -21083,36 +21493,36 @@ var ParameterShell = ({
|
|
|
21083
21493
|
isParameterGroup = false,
|
|
21084
21494
|
...props
|
|
21085
21495
|
}) => {
|
|
21086
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
21496
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react135.useState)(void 0);
|
|
21087
21497
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
21088
21498
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
21089
|
-
return /* @__PURE__ */ (0,
|
|
21090
|
-
hiddenLabel || title2 ? null : /* @__PURE__ */ (0,
|
|
21499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
21500
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
21091
21501
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
21092
21502
|
label,
|
|
21093
21503
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
21094
21504
|
] }),
|
|
21095
|
-
!title2 ? null : /* @__PURE__ */ (0,
|
|
21505
|
+
!title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
21096
21506
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
21097
21507
|
title2,
|
|
21098
21508
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
21099
21509
|
] }),
|
|
21100
|
-
/* @__PURE__ */ (0,
|
|
21101
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
21510
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { css: inputWrapper, children: [
|
|
21511
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21102
21512
|
"div",
|
|
21103
21513
|
{
|
|
21104
21514
|
css: [
|
|
21105
21515
|
inputMenu,
|
|
21106
21516
|
inputActionItems,
|
|
21107
|
-
menuItems ?
|
|
21517
|
+
menuItems ? import_react134.css`
|
|
21108
21518
|
right: var(--spacing-md);
|
|
21109
21519
|
` : void 0
|
|
21110
21520
|
],
|
|
21111
21521
|
children: actionItems
|
|
21112
21522
|
}
|
|
21113
21523
|
) : null,
|
|
21114
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
21115
|
-
/* @__PURE__ */ (0,
|
|
21524
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
21525
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21116
21526
|
ParameterShellContext.Provider,
|
|
21117
21527
|
{
|
|
21118
21528
|
value: {
|
|
@@ -21122,14 +21532,14 @@ var ParameterShell = ({
|
|
|
21122
21532
|
errorMessage: errorMessaging,
|
|
21123
21533
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
21124
21534
|
},
|
|
21125
|
-
children: isParameterGroup ? /* @__PURE__ */ (0,
|
|
21535
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterShellPlaceholder, { children: [
|
|
21126
21536
|
children,
|
|
21127
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
21537
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
21128
21538
|
] })
|
|
21129
21539
|
}
|
|
21130
21540
|
)
|
|
21131
21541
|
] }),
|
|
21132
|
-
/* @__PURE__ */ (0,
|
|
21542
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21133
21543
|
FieldMessage,
|
|
21134
21544
|
{
|
|
21135
21545
|
helperMessageTestId: captionTestId,
|
|
@@ -21143,27 +21553,27 @@ var ParameterShell = ({
|
|
|
21143
21553
|
] });
|
|
21144
21554
|
};
|
|
21145
21555
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
21146
|
-
return /* @__PURE__ */ (0,
|
|
21556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { css: emptyParameterShell, children });
|
|
21147
21557
|
};
|
|
21148
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
21558
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
21149
21559
|
|
|
21150
21560
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
21151
|
-
var
|
|
21152
|
-
var ParameterImage = (0,
|
|
21561
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
21562
|
+
var ParameterImage = (0, import_react136.forwardRef)(
|
|
21153
21563
|
({ children, ...props }, ref) => {
|
|
21154
21564
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21155
|
-
return /* @__PURE__ */ (0,
|
|
21156
|
-
/* @__PURE__ */ (0,
|
|
21565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
21566
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
21157
21567
|
children
|
|
21158
21568
|
] });
|
|
21159
21569
|
}
|
|
21160
21570
|
);
|
|
21161
|
-
var ParameterImageInner = (0,
|
|
21571
|
+
var ParameterImageInner = (0, import_react136.forwardRef)((props, ref) => {
|
|
21162
21572
|
const { value } = props;
|
|
21163
21573
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
21164
|
-
const deferredValue = (0,
|
|
21165
|
-
return /* @__PURE__ */ (0,
|
|
21166
|
-
/* @__PURE__ */ (0,
|
|
21574
|
+
const deferredValue = (0, import_react136.useDeferredValue)(value);
|
|
21575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
|
|
21576
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
21167
21577
|
"input",
|
|
21168
21578
|
{
|
|
21169
21579
|
css: input3,
|
|
@@ -21175,22 +21585,22 @@ var ParameterImageInner = (0, import_react132.forwardRef)((props, ref) => {
|
|
|
21175
21585
|
...props
|
|
21176
21586
|
}
|
|
21177
21587
|
),
|
|
21178
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
21588
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
21179
21589
|
] });
|
|
21180
21590
|
});
|
|
21181
21591
|
|
|
21182
21592
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
21183
21593
|
init_emotion_jsx_shim();
|
|
21184
|
-
var
|
|
21185
|
-
var
|
|
21186
|
-
var ParameterInput = (0,
|
|
21594
|
+
var import_react137 = require("react");
|
|
21595
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
21596
|
+
var ParameterInput = (0, import_react137.forwardRef)((props, ref) => {
|
|
21187
21597
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21188
|
-
return /* @__PURE__ */ (0,
|
|
21598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
21189
21599
|
});
|
|
21190
|
-
var ParameterInputInner = (0,
|
|
21600
|
+
var ParameterInputInner = (0, import_react137.forwardRef)(
|
|
21191
21601
|
({ ...props }, ref) => {
|
|
21192
21602
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21193
|
-
return /* @__PURE__ */ (0,
|
|
21603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
21194
21604
|
"input",
|
|
21195
21605
|
{
|
|
21196
21606
|
css: input3,
|
|
@@ -21207,19 +21617,19 @@ var ParameterInputInner = (0, import_react133.forwardRef)(
|
|
|
21207
21617
|
|
|
21208
21618
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
21209
21619
|
init_emotion_jsx_shim();
|
|
21210
|
-
var
|
|
21211
|
-
var
|
|
21212
|
-
var ParameterLink = (0,
|
|
21620
|
+
var import_react138 = require("react");
|
|
21621
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
21622
|
+
var ParameterLink = (0, import_react138.forwardRef)(
|
|
21213
21623
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
21214
21624
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21215
|
-
return /* @__PURE__ */ (0,
|
|
21625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21216
21626
|
ParameterShell,
|
|
21217
21627
|
{
|
|
21218
21628
|
"data-testid": "link-parameter-editor",
|
|
21219
21629
|
...shellProps,
|
|
21220
21630
|
label: innerProps.value ? shellProps.label : "",
|
|
21221
21631
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
21222
|
-
children: /* @__PURE__ */ (0,
|
|
21632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21223
21633
|
ParameterLinkInner,
|
|
21224
21634
|
{
|
|
21225
21635
|
onConnectLink,
|
|
@@ -21232,13 +21642,13 @@ var ParameterLink = (0, import_react134.forwardRef)(
|
|
|
21232
21642
|
);
|
|
21233
21643
|
}
|
|
21234
21644
|
);
|
|
21235
|
-
var ParameterLinkInner = (0,
|
|
21645
|
+
var ParameterLinkInner = (0, import_react138.forwardRef)(
|
|
21236
21646
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
21237
21647
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21238
21648
|
if (!props.value)
|
|
21239
|
-
return /* @__PURE__ */ (0,
|
|
21240
|
-
return /* @__PURE__ */ (0,
|
|
21241
|
-
/* @__PURE__ */ (0,
|
|
21649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
21650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { css: inputWrapper, children: [
|
|
21651
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21242
21652
|
"input",
|
|
21243
21653
|
{
|
|
21244
21654
|
type: "text",
|
|
@@ -21250,8 +21660,8 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21250
21660
|
...props
|
|
21251
21661
|
}
|
|
21252
21662
|
),
|
|
21253
|
-
/* @__PURE__ */ (0,
|
|
21254
|
-
/* @__PURE__ */ (0,
|
|
21663
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { css: linkParameterControls, children: [
|
|
21664
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21255
21665
|
"button",
|
|
21256
21666
|
{
|
|
21257
21667
|
type: "button",
|
|
@@ -21262,7 +21672,7 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21262
21672
|
children: "edit"
|
|
21263
21673
|
}
|
|
21264
21674
|
),
|
|
21265
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
21675
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21266
21676
|
"a",
|
|
21267
21677
|
{
|
|
21268
21678
|
href: externalLink,
|
|
@@ -21270,7 +21680,7 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21270
21680
|
title: "Open link in new tab",
|
|
21271
21681
|
target: "_blank",
|
|
21272
21682
|
rel: "noopener noreferrer",
|
|
21273
|
-
children: /* @__PURE__ */ (0,
|
|
21683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
21274
21684
|
}
|
|
21275
21685
|
) : null
|
|
21276
21686
|
] })
|
|
@@ -21280,15 +21690,15 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21280
21690
|
|
|
21281
21691
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
21282
21692
|
init_emotion_jsx_shim();
|
|
21283
|
-
var
|
|
21693
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
21284
21694
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
21285
21695
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21286
|
-
return /* @__PURE__ */ (0,
|
|
21696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
21287
21697
|
};
|
|
21288
21698
|
var ParameterMultiSelectInner = (props) => {
|
|
21289
21699
|
var _a;
|
|
21290
21700
|
const { id, label } = useParameterShell();
|
|
21291
|
-
return /* @__PURE__ */ (0,
|
|
21701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21292
21702
|
InputComboBox,
|
|
21293
21703
|
{
|
|
21294
21704
|
menuPortalTarget: document.body,
|
|
@@ -21339,7 +21749,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
21339
21749
|
|
|
21340
21750
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
21341
21751
|
init_emotion_jsx_shim();
|
|
21342
|
-
var
|
|
21752
|
+
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
21343
21753
|
var ParameterNameAndPublicIdInput = ({
|
|
21344
21754
|
id,
|
|
21345
21755
|
onBlur,
|
|
@@ -21365,8 +21775,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21365
21775
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
21366
21776
|
};
|
|
21367
21777
|
autoFocus == null ? void 0 : autoFocus();
|
|
21368
|
-
return /* @__PURE__ */ (0,
|
|
21369
|
-
/* @__PURE__ */ (0,
|
|
21778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
21779
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21370
21780
|
ParameterInput,
|
|
21371
21781
|
{
|
|
21372
21782
|
id: nameIdField,
|
|
@@ -21385,7 +21795,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21385
21795
|
value: values[nameIdField]
|
|
21386
21796
|
}
|
|
21387
21797
|
),
|
|
21388
|
-
/* @__PURE__ */ (0,
|
|
21798
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21389
21799
|
ParameterInput,
|
|
21390
21800
|
{
|
|
21391
21801
|
id: publicIdFieldName,
|
|
@@ -21399,11 +21809,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21399
21809
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
21400
21810
|
placeholder: publicIdPlaceholderText,
|
|
21401
21811
|
errorMessage: publicIdError,
|
|
21402
|
-
menuItems: /* @__PURE__ */ (0,
|
|
21812
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21403
21813
|
MenuItem,
|
|
21404
21814
|
{
|
|
21405
21815
|
disabled: !values[publicIdFieldName],
|
|
21406
|
-
icon: /* @__PURE__ */ (0,
|
|
21816
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
21407
21817
|
onClick: handleCopyPidFieldValue,
|
|
21408
21818
|
children: "Copy"
|
|
21409
21819
|
}
|
|
@@ -21411,13 +21821,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21411
21821
|
value: values[publicIdFieldName]
|
|
21412
21822
|
}
|
|
21413
21823
|
),
|
|
21414
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
21824
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
21415
21825
|
] });
|
|
21416
21826
|
};
|
|
21417
21827
|
|
|
21418
21828
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
21419
21829
|
init_emotion_jsx_shim();
|
|
21420
|
-
var
|
|
21830
|
+
var import_react145 = require("@emotion/react");
|
|
21421
21831
|
var import_list3 = require("@lexical/list");
|
|
21422
21832
|
var import_markdown = require("@lexical/markdown");
|
|
21423
21833
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -21524,7 +21934,7 @@ var getLabelForElement = (type) => {
|
|
|
21524
21934
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
21525
21935
|
var import_fast_equals2 = require("fast-equals");
|
|
21526
21936
|
var import_lexical6 = require("lexical");
|
|
21527
|
-
var
|
|
21937
|
+
var import_react146 = require("react");
|
|
21528
21938
|
|
|
21529
21939
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
21530
21940
|
init_emotion_jsx_shim();
|
|
@@ -21545,13 +21955,13 @@ CustomCodeNode.importDOM = function() {
|
|
|
21545
21955
|
// src/components/ParameterInputs/rich-text/DisableStylesPlugin.ts
|
|
21546
21956
|
init_emotion_jsx_shim();
|
|
21547
21957
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
21548
|
-
var
|
|
21958
|
+
var import_utils3 = require("@lexical/utils");
|
|
21549
21959
|
var import_lexical = require("lexical");
|
|
21550
|
-
var
|
|
21960
|
+
var import_react139 = require("react");
|
|
21551
21961
|
function DisableStylesPlugin() {
|
|
21552
21962
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
21553
|
-
(0,
|
|
21554
|
-
return (0,
|
|
21963
|
+
(0, import_react139.useEffect)(() => {
|
|
21964
|
+
return (0, import_utils3.mergeRegister)(
|
|
21555
21965
|
// Disable text alignment on paragraph nodes
|
|
21556
21966
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
21557
21967
|
if (node.getFormatType() !== "") {
|
|
@@ -21745,13 +22155,13 @@ var codeElement = import_css2.css`
|
|
|
21745
22155
|
|
|
21746
22156
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21747
22157
|
init_emotion_jsx_shim();
|
|
21748
|
-
var
|
|
22158
|
+
var import_react140 = require("@emotion/react");
|
|
21749
22159
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
21750
22160
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
21751
|
-
var
|
|
22161
|
+
var import_utils4 = require("@lexical/utils");
|
|
21752
22162
|
var import_fast_equals = require("fast-equals");
|
|
21753
22163
|
var import_lexical3 = require("lexical");
|
|
21754
|
-
var
|
|
22164
|
+
var import_react141 = require("react");
|
|
21755
22165
|
|
|
21756
22166
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
21757
22167
|
init_emotion_jsx_shim();
|
|
@@ -21789,7 +22199,7 @@ var getSelectedNode = (selection) => {
|
|
|
21789
22199
|
};
|
|
21790
22200
|
|
|
21791
22201
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21792
|
-
var
|
|
22202
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
21793
22203
|
var isProjectMapLinkValue = (value) => {
|
|
21794
22204
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
21795
22205
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -21812,7 +22222,7 @@ var guessLinkTypeFromPath = (path) => {
|
|
|
21812
22222
|
};
|
|
21813
22223
|
function convertAnchorElement(domNode) {
|
|
21814
22224
|
let node = null;
|
|
21815
|
-
if (!(0,
|
|
22225
|
+
if (!(0, import_utils4.isHTMLAnchorElement)(domNode)) {
|
|
21816
22226
|
return { node };
|
|
21817
22227
|
}
|
|
21818
22228
|
const textContent = domNode.textContent;
|
|
@@ -21921,7 +22331,7 @@ var LinkNode = class _LinkNode extends import_lexical3.ElementNode {
|
|
|
21921
22331
|
element.setAttribute("href", `mailto:${this.__link.path}`);
|
|
21922
22332
|
}
|
|
21923
22333
|
}
|
|
21924
|
-
(0,
|
|
22334
|
+
(0, import_utils4.addClassNamesToElement)(element, config.theme.link);
|
|
21925
22335
|
return element;
|
|
21926
22336
|
}
|
|
21927
22337
|
updateDOM(prevNode, a) {
|
|
@@ -22076,16 +22486,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
22076
22486
|
);
|
|
22077
22487
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
22078
22488
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
22079
|
-
var linkPopover =
|
|
22489
|
+
var linkPopover = import_react140.css`
|
|
22080
22490
|
position: absolute;
|
|
22081
22491
|
z-index: 5;
|
|
22082
22492
|
`;
|
|
22083
|
-
var linkPopoverContainer =
|
|
22493
|
+
var linkPopoverContainer = import_react140.css`
|
|
22084
22494
|
${Popover};
|
|
22085
22495
|
align-items: center;
|
|
22086
22496
|
display: flex;
|
|
22087
22497
|
`;
|
|
22088
|
-
var linkPopoverAnchor =
|
|
22498
|
+
var linkPopoverAnchor = import_react140.css`
|
|
22089
22499
|
${link}
|
|
22090
22500
|
${linkColorDefault}
|
|
22091
22501
|
`;
|
|
@@ -22094,21 +22504,21 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22094
22504
|
return path;
|
|
22095
22505
|
};
|
|
22096
22506
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
22097
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
22098
|
-
const linkPopoverElRef = (0,
|
|
22099
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
22100
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
22101
|
-
(0,
|
|
22507
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react141.useState)();
|
|
22508
|
+
const linkPopoverElRef = (0, import_react141.useRef)(null);
|
|
22509
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react141.useState)(false);
|
|
22510
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react141.useState)(false);
|
|
22511
|
+
(0, import_react141.useEffect)(() => {
|
|
22102
22512
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
22103
22513
|
setLinkPopoverState(void 0);
|
|
22104
22514
|
return;
|
|
22105
22515
|
}
|
|
22106
22516
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
22107
|
-
(0,
|
|
22517
|
+
(0, import_react141.useEffect)(() => {
|
|
22108
22518
|
if (!editor.hasNodes([LinkNode])) {
|
|
22109
22519
|
throw new Error("LinkNode not registered on editor");
|
|
22110
22520
|
}
|
|
22111
|
-
return (0,
|
|
22521
|
+
return (0, import_utils4.mergeRegister)(
|
|
22112
22522
|
editor.registerCommand(
|
|
22113
22523
|
UPSERT_LINK_NODE_COMMAND,
|
|
22114
22524
|
(payload) => {
|
|
@@ -22173,7 +22583,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22173
22583
|
)
|
|
22174
22584
|
);
|
|
22175
22585
|
}, [editor, onConnectLink]);
|
|
22176
|
-
const maybeShowLinkToolbar = (0,
|
|
22586
|
+
const maybeShowLinkToolbar = (0, import_react141.useCallback)(() => {
|
|
22177
22587
|
if (!editor.isEditable()) {
|
|
22178
22588
|
return;
|
|
22179
22589
|
}
|
|
@@ -22205,7 +22615,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22205
22615
|
}
|
|
22206
22616
|
});
|
|
22207
22617
|
}, [editor]);
|
|
22208
|
-
(0,
|
|
22618
|
+
(0, import_react141.useEffect)(() => {
|
|
22209
22619
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
22210
22620
|
requestAnimationFrame(() => {
|
|
22211
22621
|
editorState.read(() => {
|
|
@@ -22232,8 +22642,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22232
22642
|
});
|
|
22233
22643
|
});
|
|
22234
22644
|
};
|
|
22235
|
-
return /* @__PURE__ */ (0,
|
|
22236
|
-
/* @__PURE__ */ (0,
|
|
22645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
|
|
22646
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22237
22647
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
22238
22648
|
{
|
|
22239
22649
|
nodeType: LinkNode,
|
|
@@ -22243,7 +22653,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22243
22653
|
}
|
|
22244
22654
|
}
|
|
22245
22655
|
),
|
|
22246
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
22656
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22247
22657
|
"div",
|
|
22248
22658
|
{
|
|
22249
22659
|
css: linkPopover,
|
|
@@ -22252,8 +22662,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22252
22662
|
top: linkPopoverState.position.y
|
|
22253
22663
|
},
|
|
22254
22664
|
ref: linkPopoverElRef,
|
|
22255
|
-
children: /* @__PURE__ */ (0,
|
|
22256
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
22665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
22666
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22257
22667
|
"a",
|
|
22258
22668
|
{
|
|
22259
22669
|
href: parsePath(
|
|
@@ -22265,7 +22675,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22265
22675
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
22266
22676
|
}
|
|
22267
22677
|
),
|
|
22268
|
-
/* @__PURE__ */ (0,
|
|
22678
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22269
22679
|
Button,
|
|
22270
22680
|
{
|
|
22271
22681
|
size: "xs",
|
|
@@ -22273,7 +22683,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22273
22683
|
onEditLinkNode(linkPopoverState.node);
|
|
22274
22684
|
},
|
|
22275
22685
|
buttonType: "ghost",
|
|
22276
|
-
children: /* @__PURE__ */ (0,
|
|
22686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
22277
22687
|
}
|
|
22278
22688
|
)
|
|
22279
22689
|
] })
|
|
@@ -22293,8 +22703,8 @@ var import_list = require("@lexical/list");
|
|
|
22293
22703
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
22294
22704
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
22295
22705
|
var import_lexical4 = require("lexical");
|
|
22296
|
-
var
|
|
22297
|
-
var
|
|
22706
|
+
var import_react142 = require("react");
|
|
22707
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
22298
22708
|
function isIndentPermitted(maxDepth) {
|
|
22299
22709
|
const selection = (0, import_lexical4.$getSelection)();
|
|
22300
22710
|
if (!(0, import_lexical4.$isRangeSelection)(selection)) {
|
|
@@ -22317,29 +22727,29 @@ function isIndentPermitted(maxDepth) {
|
|
|
22317
22727
|
}
|
|
22318
22728
|
function ListIndentPlugin({ maxDepth }) {
|
|
22319
22729
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
22320
|
-
(0,
|
|
22730
|
+
(0, import_react142.useEffect)(() => {
|
|
22321
22731
|
return editor.registerCommand(
|
|
22322
22732
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
22323
22733
|
() => !isIndentPermitted(maxDepth),
|
|
22324
22734
|
import_lexical4.COMMAND_PRIORITY_CRITICAL
|
|
22325
22735
|
);
|
|
22326
22736
|
}, [editor, maxDepth]);
|
|
22327
|
-
return /* @__PURE__ */ (0,
|
|
22737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {});
|
|
22328
22738
|
}
|
|
22329
22739
|
|
|
22330
22740
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
22331
22741
|
init_emotion_jsx_shim();
|
|
22332
|
-
var
|
|
22742
|
+
var import_react143 = require("@emotion/react");
|
|
22333
22743
|
var import_code2 = require("@lexical/code");
|
|
22334
22744
|
var import_list2 = require("@lexical/list");
|
|
22335
22745
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
22336
22746
|
var import_rich_text = require("@lexical/rich-text");
|
|
22337
22747
|
var import_selection2 = require("@lexical/selection");
|
|
22338
|
-
var
|
|
22748
|
+
var import_utils7 = require("@lexical/utils");
|
|
22339
22749
|
var import_lexical5 = require("lexical");
|
|
22340
|
-
var
|
|
22341
|
-
var
|
|
22342
|
-
var toolbar =
|
|
22750
|
+
var import_react144 = require("react");
|
|
22751
|
+
var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
|
|
22752
|
+
var toolbar = import_react143.css`
|
|
22343
22753
|
background: var(--gray-50);
|
|
22344
22754
|
border-radius: var(--rounded-base);
|
|
22345
22755
|
display: flex;
|
|
@@ -22351,7 +22761,7 @@ var toolbar = import_react139.css`
|
|
|
22351
22761
|
top: calc(var(--spacing-sm) * -2);
|
|
22352
22762
|
z-index: 10;
|
|
22353
22763
|
`;
|
|
22354
|
-
var toolbarGroup =
|
|
22764
|
+
var toolbarGroup = import_react143.css`
|
|
22355
22765
|
display: flex;
|
|
22356
22766
|
gap: var(--spacing-xs);
|
|
22357
22767
|
position: relative;
|
|
@@ -22367,7 +22777,7 @@ var toolbarGroup = import_react139.css`
|
|
|
22367
22777
|
width: 1px;
|
|
22368
22778
|
}
|
|
22369
22779
|
`;
|
|
22370
|
-
var richTextToolbarButton =
|
|
22780
|
+
var richTextToolbarButton = import_react143.css`
|
|
22371
22781
|
align-items: center;
|
|
22372
22782
|
appearance: none;
|
|
22373
22783
|
border: 0;
|
|
@@ -22380,17 +22790,17 @@ var richTextToolbarButton = import_react139.css`
|
|
|
22380
22790
|
min-width: 32px;
|
|
22381
22791
|
padding: 0 var(--spacing-sm);
|
|
22382
22792
|
`;
|
|
22383
|
-
var richTextToolbarButtonActive =
|
|
22793
|
+
var richTextToolbarButtonActive = import_react143.css`
|
|
22384
22794
|
background: var(--gray-200);
|
|
22385
22795
|
`;
|
|
22386
|
-
var toolbarIcon =
|
|
22796
|
+
var toolbarIcon = import_react143.css`
|
|
22387
22797
|
color: inherit;
|
|
22388
22798
|
`;
|
|
22389
|
-
var toolbarChevron =
|
|
22799
|
+
var toolbarChevron = import_react143.css`
|
|
22390
22800
|
margin-left: var(--spacing-xs);
|
|
22391
22801
|
`;
|
|
22392
22802
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
22393
|
-
return /* @__PURE__ */ (0,
|
|
22803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
22394
22804
|
};
|
|
22395
22805
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
22396
22806
|
["bold", "format-bold"],
|
|
@@ -22441,7 +22851,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22441
22851
|
}
|
|
22442
22852
|
});
|
|
22443
22853
|
};
|
|
22444
|
-
const updateToolbar = (0,
|
|
22854
|
+
const updateToolbar = (0, import_react144.useCallback)(() => {
|
|
22445
22855
|
const selection = (0, import_lexical5.$getSelection)();
|
|
22446
22856
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
22447
22857
|
return;
|
|
@@ -22454,7 +22864,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22454
22864
|
}
|
|
22455
22865
|
setActiveFormats(newActiveFormats);
|
|
22456
22866
|
const anchorNode = selection.anchor.getNode();
|
|
22457
|
-
let element = anchorNode.getKey() === "root" ? anchorNode : (0,
|
|
22867
|
+
let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils7.$findMatchingParent)(anchorNode, (e) => {
|
|
22458
22868
|
const parent = e.getParent();
|
|
22459
22869
|
return parent !== null && (0, import_lexical5.$isRootOrShadowRoot)(parent);
|
|
22460
22870
|
});
|
|
@@ -22465,7 +22875,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22465
22875
|
const elementDOM = editor.getElementByKey(elementKey);
|
|
22466
22876
|
if (elementDOM !== null) {
|
|
22467
22877
|
if ((0, import_list2.$isListNode)(element)) {
|
|
22468
|
-
const parentList = (0,
|
|
22878
|
+
const parentList = (0, import_utils7.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
|
|
22469
22879
|
const type = parentList ? parentList.getListType() : element.getListType();
|
|
22470
22880
|
setActiveElement(type === "bullet" ? "unorderedList" : "orderedList");
|
|
22471
22881
|
} else {
|
|
@@ -22480,7 +22890,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22480
22890
|
setIsLink(false);
|
|
22481
22891
|
}
|
|
22482
22892
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
22483
|
-
(0,
|
|
22893
|
+
(0, import_react144.useEffect)(() => {
|
|
22484
22894
|
return editor.registerCommand(
|
|
22485
22895
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
22486
22896
|
(_payload) => {
|
|
@@ -22490,7 +22900,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22490
22900
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
22491
22901
|
);
|
|
22492
22902
|
}, [editor, updateToolbar]);
|
|
22493
|
-
(0,
|
|
22903
|
+
(0, import_react144.useEffect)(() => {
|
|
22494
22904
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
22495
22905
|
requestAnimationFrame(() => {
|
|
22496
22906
|
editorState.read(() => {
|
|
@@ -22499,15 +22909,15 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22499
22909
|
});
|
|
22500
22910
|
});
|
|
22501
22911
|
}, [editor, updateToolbar]);
|
|
22502
|
-
return /* @__PURE__ */ (0,
|
|
22503
|
-
/* @__PURE__ */ (0,
|
|
22912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: toolbar, children: [
|
|
22913
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
22504
22914
|
Menu,
|
|
22505
22915
|
{
|
|
22506
22916
|
menuLabel: "Elements",
|
|
22507
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
22917
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("button", { css: richTextToolbarButton, title: "Text styles", children: [
|
|
22508
22918
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
22509
22919
|
" ",
|
|
22510
|
-
/* @__PURE__ */ (0,
|
|
22920
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
22511
22921
|
] }),
|
|
22512
22922
|
placement: "bottom-start",
|
|
22513
22923
|
children: [
|
|
@@ -22517,7 +22927,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22517
22927
|
type: "paragraph"
|
|
22518
22928
|
},
|
|
22519
22929
|
...visibleTextualElements
|
|
22520
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
22930
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22521
22931
|
MenuItem,
|
|
22522
22932
|
{
|
|
22523
22933
|
onClick: () => {
|
|
@@ -22527,12 +22937,12 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22527
22937
|
},
|
|
22528
22938
|
element.type
|
|
22529
22939
|
)),
|
|
22530
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
22940
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
22531
22941
|
]
|
|
22532
22942
|
}
|
|
22533
22943
|
),
|
|
22534
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
22535
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
22944
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: toolbarGroup, children: [
|
|
22945
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22536
22946
|
"button",
|
|
22537
22947
|
{
|
|
22538
22948
|
onClick: () => {
|
|
@@ -22542,16 +22952,16 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22542
22952
|
richTextToolbarButton,
|
|
22543
22953
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
22544
22954
|
],
|
|
22545
|
-
children: /* @__PURE__ */ (0,
|
|
22955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
22546
22956
|
}
|
|
22547
22957
|
) }, format.type)),
|
|
22548
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
22958
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22549
22959
|
Menu,
|
|
22550
22960
|
{
|
|
22551
22961
|
menuLabel: "Alternative text styles",
|
|
22552
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
22962
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
22553
22963
|
placement: "bottom-start",
|
|
22554
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
22964
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22555
22965
|
MenuItem,
|
|
22556
22966
|
{
|
|
22557
22967
|
onClick: () => {
|
|
@@ -22564,19 +22974,19 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22564
22974
|
}
|
|
22565
22975
|
) : null
|
|
22566
22976
|
] }) : null,
|
|
22567
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
22568
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
22977
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: toolbarGroup, children: [
|
|
22978
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22569
22979
|
"button",
|
|
22570
22980
|
{
|
|
22571
22981
|
onClick: () => {
|
|
22572
22982
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
22573
22983
|
},
|
|
22574
22984
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
22575
|
-
children: /* @__PURE__ */ (0,
|
|
22985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
22576
22986
|
}
|
|
22577
22987
|
) }) : null,
|
|
22578
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
22579
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
22988
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
22989
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22580
22990
|
"button",
|
|
22581
22991
|
{
|
|
22582
22992
|
onClick: () => {
|
|
@@ -22586,10 +22996,10 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22586
22996
|
richTextToolbarButton,
|
|
22587
22997
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
22588
22998
|
],
|
|
22589
|
-
children: /* @__PURE__ */ (0,
|
|
22999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
22590
23000
|
}
|
|
22591
23001
|
) }) : null,
|
|
22592
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
23002
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22593
23003
|
"button",
|
|
22594
23004
|
{
|
|
22595
23005
|
onClick: () => {
|
|
@@ -22599,57 +23009,57 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22599
23009
|
richTextToolbarButton,
|
|
22600
23010
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
22601
23011
|
],
|
|
22602
|
-
children: /* @__PURE__ */ (0,
|
|
23012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
22603
23013
|
}
|
|
22604
23014
|
) }) : null
|
|
22605
23015
|
] }) : null,
|
|
22606
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
23016
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22607
23017
|
"button",
|
|
22608
23018
|
{
|
|
22609
23019
|
onClick: () => {
|
|
22610
23020
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
22611
23021
|
},
|
|
22612
23022
|
css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
|
|
22613
|
-
children: /* @__PURE__ */ (0,
|
|
23023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "quote" })
|
|
22614
23024
|
}
|
|
22615
23025
|
) }) : null,
|
|
22616
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
23026
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22617
23027
|
"button",
|
|
22618
23028
|
{
|
|
22619
23029
|
onClick: () => {
|
|
22620
23030
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
22621
23031
|
},
|
|
22622
23032
|
css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
|
|
22623
|
-
children: /* @__PURE__ */ (0,
|
|
23033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "code-slash" })
|
|
22624
23034
|
}
|
|
22625
23035
|
) }) : null
|
|
22626
23036
|
] }) : null,
|
|
22627
|
-
customControls ? /* @__PURE__ */ (0,
|
|
23037
|
+
customControls ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { css: toolbarGroup, children: customControls }) : null
|
|
22628
23038
|
] });
|
|
22629
23039
|
};
|
|
22630
23040
|
var RichTextToolbar_default = RichTextToolbar;
|
|
22631
23041
|
var useRichTextToolbarState = ({ config }) => {
|
|
22632
23042
|
var _a;
|
|
22633
|
-
const enabledBuiltInFormats = (0,
|
|
23043
|
+
const enabledBuiltInFormats = (0, import_react144.useMemo)(() => {
|
|
22634
23044
|
return richTextBuiltInFormats.filter((format) => {
|
|
22635
23045
|
var _a2, _b;
|
|
22636
23046
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
22637
23047
|
});
|
|
22638
23048
|
}, [config]);
|
|
22639
|
-
const enabledBuiltInElements = (0,
|
|
23049
|
+
const enabledBuiltInElements = (0, import_react144.useMemo)(() => {
|
|
22640
23050
|
return richTextBuiltInElements.filter((element) => {
|
|
22641
23051
|
var _a2, _b;
|
|
22642
23052
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
22643
23053
|
});
|
|
22644
23054
|
}, [config]);
|
|
22645
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
23055
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react144.useMemo)(() => {
|
|
22646
23056
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
22647
23057
|
}, [enabledBuiltInFormats]);
|
|
22648
23058
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
22649
23059
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
22650
23060
|
);
|
|
22651
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
22652
|
-
const visibleFormatsWithIcon = (0,
|
|
23061
|
+
const [activeFormats, setActiveFormats] = (0, import_react144.useState)([]);
|
|
23062
|
+
const visibleFormatsWithIcon = (0, import_react144.useMemo)(() => {
|
|
22653
23063
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
22654
23064
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
22655
23065
|
visibleFormats.add(type);
|
|
@@ -22659,7 +23069,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22659
23069
|
});
|
|
22660
23070
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
22661
23071
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
22662
|
-
const visibleFormatsWithoutIcon = (0,
|
|
23072
|
+
const visibleFormatsWithoutIcon = (0, import_react144.useMemo)(() => {
|
|
22663
23073
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
22664
23074
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
22665
23075
|
visibleFormats.add(type);
|
|
@@ -22669,11 +23079,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22669
23079
|
});
|
|
22670
23080
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
22671
23081
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
22672
|
-
const [activeElement, setActiveElement] = (0,
|
|
23082
|
+
const [activeElement, setActiveElement] = (0, import_react144.useState)("paragraph");
|
|
22673
23083
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
22674
23084
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
22675
23085
|
);
|
|
22676
|
-
const visibleTextualElements = (0,
|
|
23086
|
+
const visibleTextualElements = (0, import_react144.useMemo)(() => {
|
|
22677
23087
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
22678
23088
|
return enabledTextualElements;
|
|
22679
23089
|
}
|
|
@@ -22684,24 +23094,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22684
23094
|
}
|
|
22685
23095
|
);
|
|
22686
23096
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
22687
|
-
const [isLink, setIsLink] = (0,
|
|
22688
|
-
const linkElementVisible = (0,
|
|
23097
|
+
const [isLink, setIsLink] = (0, import_react144.useState)(false);
|
|
23098
|
+
const linkElementVisible = (0, import_react144.useMemo)(() => {
|
|
22689
23099
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
22690
23100
|
}, [isLink, enabledBuiltInElements]);
|
|
22691
|
-
const visibleLists = (0,
|
|
23101
|
+
const visibleLists = (0, import_react144.useMemo)(() => {
|
|
22692
23102
|
return new Set(
|
|
22693
23103
|
["orderedList", "unorderedList"].filter(
|
|
22694
23104
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
22695
23105
|
)
|
|
22696
23106
|
);
|
|
22697
23107
|
}, [activeElement, enabledBuiltInElements]);
|
|
22698
|
-
const quoteElementVisible = (0,
|
|
23108
|
+
const quoteElementVisible = (0, import_react144.useMemo)(() => {
|
|
22699
23109
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
22700
23110
|
}, [activeElement, enabledBuiltInElements]);
|
|
22701
|
-
const codeElementVisible = (0,
|
|
23111
|
+
const codeElementVisible = (0, import_react144.useMemo)(() => {
|
|
22702
23112
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
22703
23113
|
}, [activeElement, enabledBuiltInElements]);
|
|
22704
|
-
const visibleElementsWithIcons = (0,
|
|
23114
|
+
const visibleElementsWithIcons = (0, import_react144.useMemo)(() => {
|
|
22705
23115
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
22706
23116
|
if (linkElementVisible) {
|
|
22707
23117
|
visibleElements.add("link");
|
|
@@ -22738,7 +23148,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22738
23148
|
};
|
|
22739
23149
|
|
|
22740
23150
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22741
|
-
var
|
|
23151
|
+
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
22742
23152
|
var ParameterRichText = ({
|
|
22743
23153
|
label,
|
|
22744
23154
|
labelLeadingIcon,
|
|
@@ -22763,7 +23173,7 @@ var ParameterRichText = ({
|
|
|
22763
23173
|
variables,
|
|
22764
23174
|
customControls
|
|
22765
23175
|
}) => {
|
|
22766
|
-
return /* @__PURE__ */ (0,
|
|
23176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
22767
23177
|
ParameterShell,
|
|
22768
23178
|
{
|
|
22769
23179
|
"data-testid": "parameter-richtext",
|
|
@@ -22777,7 +23187,7 @@ var ParameterRichText = ({
|
|
|
22777
23187
|
captionTestId,
|
|
22778
23188
|
menuItems,
|
|
22779
23189
|
children: [
|
|
22780
|
-
/* @__PURE__ */ (0,
|
|
23190
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22781
23191
|
ParameterRichTextInner,
|
|
22782
23192
|
{
|
|
22783
23193
|
value,
|
|
@@ -22795,23 +23205,23 @@ var ParameterRichText = ({
|
|
|
22795
23205
|
children
|
|
22796
23206
|
}
|
|
22797
23207
|
),
|
|
22798
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
23208
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children: menuItems }) }) : null
|
|
22799
23209
|
]
|
|
22800
23210
|
}
|
|
22801
23211
|
);
|
|
22802
23212
|
};
|
|
22803
|
-
var editorWrapper =
|
|
23213
|
+
var editorWrapper = import_react145.css`
|
|
22804
23214
|
display: flex;
|
|
22805
23215
|
flex-flow: column;
|
|
22806
23216
|
flex-grow: 1;
|
|
22807
23217
|
`;
|
|
22808
|
-
var editorContainer =
|
|
23218
|
+
var editorContainer = import_react145.css`
|
|
22809
23219
|
display: flex;
|
|
22810
23220
|
flex-flow: column;
|
|
22811
23221
|
flex-grow: 1;
|
|
22812
23222
|
position: relative;
|
|
22813
23223
|
`;
|
|
22814
|
-
var editorPlaceholder =
|
|
23224
|
+
var editorPlaceholder = import_react145.css`
|
|
22815
23225
|
color: var(--gray-500);
|
|
22816
23226
|
font-style: italic;
|
|
22817
23227
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -22822,7 +23232,7 @@ var editorPlaceholder = import_react141.css`
|
|
|
22822
23232
|
top: var(--spacing-sm);
|
|
22823
23233
|
user-select: none;
|
|
22824
23234
|
`;
|
|
22825
|
-
var editorInput =
|
|
23235
|
+
var editorInput = import_react145.css`
|
|
22826
23236
|
background: var(--white);
|
|
22827
23237
|
border: 1px solid var(--gray-200);
|
|
22828
23238
|
border-radius: var(--rounded-sm);
|
|
@@ -22906,8 +23316,8 @@ var ParameterRichTextInner = ({
|
|
|
22906
23316
|
},
|
|
22907
23317
|
editable: !readOnly
|
|
22908
23318
|
};
|
|
22909
|
-
return /* @__PURE__ */ (0,
|
|
22910
|
-
/* @__PURE__ */ (0,
|
|
23319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
23320
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22911
23321
|
RichText,
|
|
22912
23322
|
{
|
|
22913
23323
|
onChange,
|
|
@@ -22944,14 +23354,14 @@ var RichText = ({
|
|
|
22944
23354
|
variables,
|
|
22945
23355
|
customControls
|
|
22946
23356
|
}) => {
|
|
22947
|
-
const editorContainerRef = (0,
|
|
23357
|
+
const editorContainerRef = (0, import_react146.useRef)(null);
|
|
22948
23358
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
22949
|
-
(0,
|
|
23359
|
+
(0, import_react146.useEffect)(() => {
|
|
22950
23360
|
if (onRichTextInit) {
|
|
22951
23361
|
onRichTextInit(editor);
|
|
22952
23362
|
}
|
|
22953
23363
|
}, [editor, onRichTextInit]);
|
|
22954
|
-
(0,
|
|
23364
|
+
(0, import_react146.useEffect)(() => {
|
|
22955
23365
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
22956
23366
|
requestAnimationFrame(() => {
|
|
22957
23367
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -22963,23 +23373,23 @@ var RichText = ({
|
|
|
22963
23373
|
removeUpdateListener();
|
|
22964
23374
|
};
|
|
22965
23375
|
}, [editor, onChange]);
|
|
22966
|
-
(0,
|
|
23376
|
+
(0, import_react146.useEffect)(() => {
|
|
22967
23377
|
editor.setEditable(!readOnly);
|
|
22968
23378
|
}, [editor, readOnly]);
|
|
22969
|
-
return /* @__PURE__ */ (0,
|
|
22970
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
22971
|
-
/* @__PURE__ */ (0,
|
|
22972
|
-
/* @__PURE__ */ (0,
|
|
23379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
23380
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RichTextToolbar_default, { config, customControls }),
|
|
23381
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
23382
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22973
23383
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
22974
23384
|
{
|
|
22975
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
22976
|
-
placeholder: /* @__PURE__ */ (0,
|
|
23385
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
23386
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
22977
23387
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
22978
23388
|
}
|
|
22979
23389
|
),
|
|
22980
|
-
/* @__PURE__ */ (0,
|
|
22981
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
22982
|
-
/* @__PURE__ */ (0,
|
|
23390
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
23391
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
23392
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22983
23393
|
LinkNodePlugin,
|
|
22984
23394
|
{
|
|
22985
23395
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -22989,28 +23399,28 @@ var RichText = ({
|
|
|
22989
23399
|
} : void 0
|
|
22990
23400
|
}
|
|
22991
23401
|
),
|
|
22992
|
-
/* @__PURE__ */ (0,
|
|
22993
|
-
/* @__PURE__ */ (0,
|
|
22994
|
-
/* @__PURE__ */ (0,
|
|
22995
|
-
/* @__PURE__ */ (0,
|
|
23402
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
23403
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DisableStylesPlugin, {}),
|
|
23404
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
23405
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children })
|
|
22996
23406
|
] })
|
|
22997
23407
|
] });
|
|
22998
23408
|
};
|
|
22999
23409
|
|
|
23000
23410
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
23001
23411
|
init_emotion_jsx_shim();
|
|
23002
|
-
var
|
|
23003
|
-
var
|
|
23004
|
-
var ParameterSelect = (0,
|
|
23412
|
+
var import_react147 = require("react");
|
|
23413
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
23414
|
+
var ParameterSelect = (0, import_react147.forwardRef)(
|
|
23005
23415
|
({ defaultOption, options, ...props }, ref) => {
|
|
23006
23416
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23007
|
-
return /* @__PURE__ */ (0,
|
|
23417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
23008
23418
|
}
|
|
23009
23419
|
);
|
|
23010
|
-
var ParameterSelectInner = (0,
|
|
23420
|
+
var ParameterSelectInner = (0, import_react147.forwardRef)(
|
|
23011
23421
|
({ defaultOption, options, ...props }, ref) => {
|
|
23012
23422
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
23013
|
-
return /* @__PURE__ */ (0,
|
|
23423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
23014
23424
|
"select",
|
|
23015
23425
|
{
|
|
23016
23426
|
css: [input3, selectInput],
|
|
@@ -23019,10 +23429,10 @@ var ParameterSelectInner = (0, import_react143.forwardRef)(
|
|
|
23019
23429
|
ref,
|
|
23020
23430
|
...props,
|
|
23021
23431
|
children: [
|
|
23022
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
23432
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
23023
23433
|
options.map((option) => {
|
|
23024
23434
|
var _a;
|
|
23025
|
-
return /* @__PURE__ */ (0,
|
|
23435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
23026
23436
|
})
|
|
23027
23437
|
]
|
|
23028
23438
|
}
|
|
@@ -23032,15 +23442,15 @@ var ParameterSelectInner = (0, import_react143.forwardRef)(
|
|
|
23032
23442
|
|
|
23033
23443
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
23034
23444
|
init_emotion_jsx_shim();
|
|
23035
|
-
var
|
|
23036
|
-
var
|
|
23037
|
-
var ParameterTextarea = (0,
|
|
23445
|
+
var import_react148 = require("react");
|
|
23446
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
23447
|
+
var ParameterTextarea = (0, import_react148.forwardRef)((props, ref) => {
|
|
23038
23448
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23039
|
-
return /* @__PURE__ */ (0,
|
|
23449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
23040
23450
|
});
|
|
23041
|
-
var ParameterTextareaInner = (0,
|
|
23451
|
+
var ParameterTextareaInner = (0, import_react148.forwardRef)(({ ...props }, ref) => {
|
|
23042
23452
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
23043
|
-
return /* @__PURE__ */ (0,
|
|
23453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23044
23454
|
"textarea",
|
|
23045
23455
|
{
|
|
23046
23456
|
css: [input3, textarea2],
|
|
@@ -23054,18 +23464,18 @@ var ParameterTextareaInner = (0, import_react144.forwardRef)(({ ...props }, ref)
|
|
|
23054
23464
|
|
|
23055
23465
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
23056
23466
|
init_emotion_jsx_shim();
|
|
23057
|
-
var
|
|
23058
|
-
var
|
|
23059
|
-
var ParameterToggle = (0,
|
|
23467
|
+
var import_react149 = require("react");
|
|
23468
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
23469
|
+
var ParameterToggle = (0, import_react149.forwardRef)((props, ref) => {
|
|
23060
23470
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23061
|
-
return /* @__PURE__ */ (0,
|
|
23471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
23062
23472
|
});
|
|
23063
|
-
var ParameterToggleInner = (0,
|
|
23473
|
+
var ParameterToggleInner = (0, import_react149.forwardRef)(
|
|
23064
23474
|
({ children, ...props }, ref) => {
|
|
23065
23475
|
const { id, label } = useParameterShell();
|
|
23066
|
-
return /* @__PURE__ */ (0,
|
|
23067
|
-
/* @__PURE__ */ (0,
|
|
23068
|
-
/* @__PURE__ */ (0,
|
|
23476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
23477
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
23478
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { css: inlineLabel2, children: label }),
|
|
23069
23479
|
children
|
|
23070
23480
|
] });
|
|
23071
23481
|
}
|
|
@@ -23076,8 +23486,8 @@ init_emotion_jsx_shim();
|
|
|
23076
23486
|
|
|
23077
23487
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
23078
23488
|
init_emotion_jsx_shim();
|
|
23079
|
-
var
|
|
23080
|
-
var container3 =
|
|
23489
|
+
var import_react150 = require("@emotion/react");
|
|
23490
|
+
var container3 = import_react150.css`
|
|
23081
23491
|
background: var(--gray-50);
|
|
23082
23492
|
margin-block: var(--spacing-sm);
|
|
23083
23493
|
position: relative;
|
|
@@ -23087,17 +23497,17 @@ var container3 = import_react146.css`
|
|
|
23087
23497
|
border: solid 1px var(--gray-300);
|
|
23088
23498
|
`;
|
|
23089
23499
|
var themeMap = {
|
|
23090
|
-
primary:
|
|
23500
|
+
primary: import_react150.css`
|
|
23091
23501
|
--progress-color: var(--accent-light);
|
|
23092
23502
|
`,
|
|
23093
|
-
secondary:
|
|
23503
|
+
secondary: import_react150.css`
|
|
23094
23504
|
--progress-color: var(--accent-alt-light);
|
|
23095
23505
|
`,
|
|
23096
|
-
destructive:
|
|
23506
|
+
destructive: import_react150.css`
|
|
23097
23507
|
--progress-color: var(--brand-secondary-5);
|
|
23098
23508
|
`
|
|
23099
23509
|
};
|
|
23100
|
-
var slidingBackgroundPosition =
|
|
23510
|
+
var slidingBackgroundPosition = import_react150.keyframes`
|
|
23101
23511
|
from {
|
|
23102
23512
|
background-position: 0 0;
|
|
23103
23513
|
}
|
|
@@ -23105,10 +23515,10 @@ var slidingBackgroundPosition = import_react146.keyframes`
|
|
|
23105
23515
|
background-position: 64px 0;
|
|
23106
23516
|
}
|
|
23107
23517
|
`;
|
|
23108
|
-
var determinate =
|
|
23518
|
+
var determinate = import_react150.css`
|
|
23109
23519
|
background-color: var(--progress-color);
|
|
23110
23520
|
`;
|
|
23111
|
-
var indeterminate =
|
|
23521
|
+
var indeterminate = import_react150.css`
|
|
23112
23522
|
background-image: linear-gradient(
|
|
23113
23523
|
45deg,
|
|
23114
23524
|
var(--progress-color) 25%,
|
|
@@ -23122,7 +23532,7 @@ var indeterminate = import_react146.css`
|
|
|
23122
23532
|
background-size: 64px 64px;
|
|
23123
23533
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
23124
23534
|
`;
|
|
23125
|
-
var bar =
|
|
23535
|
+
var bar = import_react150.css`
|
|
23126
23536
|
position: absolute;
|
|
23127
23537
|
inset: 0;
|
|
23128
23538
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -23130,7 +23540,7 @@ var bar = import_react146.css`
|
|
|
23130
23540
|
`;
|
|
23131
23541
|
|
|
23132
23542
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
23133
|
-
var
|
|
23543
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
23134
23544
|
function ProgressBar({
|
|
23135
23545
|
current,
|
|
23136
23546
|
max,
|
|
@@ -23140,7 +23550,7 @@ function ProgressBar({
|
|
|
23140
23550
|
}) {
|
|
23141
23551
|
const valueNow = Math.min(current, max);
|
|
23142
23552
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
23143
|
-
return /* @__PURE__ */ (0,
|
|
23553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
23144
23554
|
"div",
|
|
23145
23555
|
{
|
|
23146
23556
|
css: container3,
|
|
@@ -23151,7 +23561,7 @@ function ProgressBar({
|
|
|
23151
23561
|
"aria-valuemax": max,
|
|
23152
23562
|
"aria-valuenow": valueNow,
|
|
23153
23563
|
...props,
|
|
23154
|
-
children: /* @__PURE__ */ (0,
|
|
23564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
23155
23565
|
"div",
|
|
23156
23566
|
{
|
|
23157
23567
|
css: [
|
|
@@ -23171,31 +23581,31 @@ function ProgressBar({
|
|
|
23171
23581
|
|
|
23172
23582
|
// src/components/ProgressList/ProgressList.tsx
|
|
23173
23583
|
init_emotion_jsx_shim();
|
|
23174
|
-
var
|
|
23584
|
+
var import_react152 = require("@emotion/react");
|
|
23175
23585
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
23176
23586
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
23177
23587
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
23178
|
-
var
|
|
23588
|
+
var import_react153 = require("react");
|
|
23179
23589
|
|
|
23180
23590
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
23181
23591
|
init_emotion_jsx_shim();
|
|
23182
|
-
var
|
|
23183
|
-
var progressListStyles =
|
|
23592
|
+
var import_react151 = require("@emotion/react");
|
|
23593
|
+
var progressListStyles = import_react151.css`
|
|
23184
23594
|
display: flex;
|
|
23185
23595
|
flex-direction: column;
|
|
23186
23596
|
gap: var(--spacing-sm);
|
|
23187
23597
|
list-style-type: none;
|
|
23188
23598
|
`;
|
|
23189
|
-
var progressListItemStyles =
|
|
23599
|
+
var progressListItemStyles = import_react151.css`
|
|
23190
23600
|
display: flex;
|
|
23191
23601
|
gap: var(--spacing-base);
|
|
23192
23602
|
align-items: center;
|
|
23193
23603
|
`;
|
|
23194
23604
|
|
|
23195
23605
|
// src/components/ProgressList/ProgressList.tsx
|
|
23196
|
-
var
|
|
23606
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
23197
23607
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
23198
|
-
const itemsWithStatus = (0,
|
|
23608
|
+
const itemsWithStatus = (0, import_react153.useMemo)(() => {
|
|
23199
23609
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
23200
23610
|
return items.map((item, index) => {
|
|
23201
23611
|
let status = "queued";
|
|
@@ -23207,8 +23617,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
23207
23617
|
return { ...item, status };
|
|
23208
23618
|
});
|
|
23209
23619
|
}, [items, inProgressId]);
|
|
23210
|
-
return /* @__PURE__ */ (0,
|
|
23211
|
-
return /* @__PURE__ */ (0,
|
|
23620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
23621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
23212
23622
|
ProgressListItem,
|
|
23213
23623
|
{
|
|
23214
23624
|
status,
|
|
@@ -23228,7 +23638,7 @@ var ProgressListItem = ({
|
|
|
23228
23638
|
errorLevel = "danger",
|
|
23229
23639
|
autoEllipsis = false
|
|
23230
23640
|
}) => {
|
|
23231
|
-
const icon = (0,
|
|
23641
|
+
const icon = (0, import_react153.useMemo)(() => {
|
|
23232
23642
|
if (error) {
|
|
23233
23643
|
return warningIcon;
|
|
23234
23644
|
}
|
|
@@ -23239,14 +23649,14 @@ var ProgressListItem = ({
|
|
|
23239
23649
|
};
|
|
23240
23650
|
return iconPerStatus[status];
|
|
23241
23651
|
}, [status, error]);
|
|
23242
|
-
const statusStyles = (0,
|
|
23652
|
+
const statusStyles = (0, import_react153.useMemo)(() => {
|
|
23243
23653
|
if (error) {
|
|
23244
|
-
return errorLevel === "caution" ?
|
|
23654
|
+
return errorLevel === "caution" ? import_react152.css`
|
|
23245
23655
|
color: rgb(161, 98, 7);
|
|
23246
23656
|
& svg {
|
|
23247
23657
|
color: rgb(250, 204, 21);
|
|
23248
23658
|
}
|
|
23249
|
-
` :
|
|
23659
|
+
` : import_react152.css`
|
|
23250
23660
|
color: rgb(185, 28, 28);
|
|
23251
23661
|
& svg {
|
|
23252
23662
|
color: var(--brand-primary-2);
|
|
@@ -23254,40 +23664,40 @@ var ProgressListItem = ({
|
|
|
23254
23664
|
`;
|
|
23255
23665
|
}
|
|
23256
23666
|
const colorPerStatus = {
|
|
23257
|
-
completed:
|
|
23667
|
+
completed: import_react152.css`
|
|
23258
23668
|
opacity: 0.75;
|
|
23259
23669
|
`,
|
|
23260
|
-
inProgress:
|
|
23670
|
+
inProgress: import_react152.css`
|
|
23261
23671
|
-webkit-text-stroke-width: thin;
|
|
23262
23672
|
`,
|
|
23263
|
-
queued:
|
|
23673
|
+
queued: import_react152.css`
|
|
23264
23674
|
opacity: 0.5;
|
|
23265
23675
|
`
|
|
23266
23676
|
};
|
|
23267
23677
|
return colorPerStatus[status];
|
|
23268
23678
|
}, [status, error, errorLevel]);
|
|
23269
|
-
return /* @__PURE__ */ (0,
|
|
23270
|
-
/* @__PURE__ */ (0,
|
|
23271
|
-
/* @__PURE__ */ (0,
|
|
23679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
23680
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
23681
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { children: [
|
|
23272
23682
|
children,
|
|
23273
|
-
/* @__PURE__ */ (0,
|
|
23683
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
23274
23684
|
] })
|
|
23275
23685
|
] });
|
|
23276
23686
|
};
|
|
23277
23687
|
|
|
23278
23688
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23279
23689
|
init_emotion_jsx_shim();
|
|
23280
|
-
var
|
|
23690
|
+
var import_react155 = require("@emotion/react");
|
|
23281
23691
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
23282
|
-
var
|
|
23692
|
+
var import_react156 = require("react");
|
|
23283
23693
|
|
|
23284
23694
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
23285
23695
|
init_emotion_jsx_shim();
|
|
23286
|
-
var
|
|
23287
|
-
var segmentedControlRootStyles =
|
|
23696
|
+
var import_react154 = require("@emotion/react");
|
|
23697
|
+
var segmentedControlRootStyles = import_react154.css`
|
|
23288
23698
|
position: relative;
|
|
23289
23699
|
`;
|
|
23290
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
23700
|
+
var segmentedControlScrollIndicatorsStyles = import_react154.css`
|
|
23291
23701
|
position: absolute;
|
|
23292
23702
|
inset: 0;
|
|
23293
23703
|
z-index: 1;
|
|
@@ -23315,17 +23725,17 @@ var segmentedControlScrollIndicatorsStyles = import_react150.css`
|
|
|
23315
23725
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
23316
23726
|
}
|
|
23317
23727
|
`;
|
|
23318
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
23728
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react154.css`
|
|
23319
23729
|
&::before {
|
|
23320
23730
|
opacity: 1;
|
|
23321
23731
|
}
|
|
23322
23732
|
`;
|
|
23323
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
23733
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react154.css`
|
|
23324
23734
|
&::after {
|
|
23325
23735
|
opacity: 1;
|
|
23326
23736
|
}
|
|
23327
23737
|
`;
|
|
23328
|
-
var segmentedControlWrapperStyles =
|
|
23738
|
+
var segmentedControlWrapperStyles = import_react154.css`
|
|
23329
23739
|
overflow-y: auto;
|
|
23330
23740
|
scroll-behavior: smooth;
|
|
23331
23741
|
scrollbar-width: none;
|
|
@@ -23334,7 +23744,7 @@ var segmentedControlWrapperStyles = import_react150.css`
|
|
|
23334
23744
|
height: 0px;
|
|
23335
23745
|
}
|
|
23336
23746
|
`;
|
|
23337
|
-
var segmentedControlStyles =
|
|
23747
|
+
var segmentedControlStyles = import_react154.css`
|
|
23338
23748
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
23339
23749
|
--segmented-control-border-width: 1px;
|
|
23340
23750
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -23353,14 +23763,14 @@ var segmentedControlStyles = import_react150.css`
|
|
|
23353
23763
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
23354
23764
|
font-size: var(--fs-xs);
|
|
23355
23765
|
`;
|
|
23356
|
-
var segmentedControlVerticalStyles =
|
|
23766
|
+
var segmentedControlVerticalStyles = import_react154.css`
|
|
23357
23767
|
flex-direction: column;
|
|
23358
23768
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
23359
23769
|
var(--segmented-control-rounded-value) 0 0;
|
|
23360
23770
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
23361
23771
|
var(--segmented-control-rounded-value);
|
|
23362
23772
|
`;
|
|
23363
|
-
var segmentedControlItemStyles =
|
|
23773
|
+
var segmentedControlItemStyles = import_react154.css`
|
|
23364
23774
|
&:first-of-type label {
|
|
23365
23775
|
border-radius: var(--segmented-control-first-border-radius);
|
|
23366
23776
|
}
|
|
@@ -23368,10 +23778,10 @@ var segmentedControlItemStyles = import_react150.css`
|
|
|
23368
23778
|
border-radius: var(--segmented-control-last-border-radius);
|
|
23369
23779
|
}
|
|
23370
23780
|
`;
|
|
23371
|
-
var segmentedControlInputStyles =
|
|
23781
|
+
var segmentedControlInputStyles = import_react154.css`
|
|
23372
23782
|
${accessibleHidden}
|
|
23373
23783
|
`;
|
|
23374
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
23784
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react154.css`
|
|
23375
23785
|
position: relative;
|
|
23376
23786
|
display: flex;
|
|
23377
23787
|
align-items: center;
|
|
@@ -23438,25 +23848,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react150.css`
|
|
|
23438
23848
|
`}
|
|
23439
23849
|
}
|
|
23440
23850
|
`;
|
|
23441
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
23851
|
+
var segmentedControlLabelIconOnlyStyles = import_react154.css`
|
|
23442
23852
|
padding-inline: 0.5em;
|
|
23443
23853
|
`;
|
|
23444
|
-
var segmentedControlLabelCheckStyles =
|
|
23854
|
+
var segmentedControlLabelCheckStyles = import_react154.css`
|
|
23445
23855
|
opacity: 0.5;
|
|
23446
23856
|
`;
|
|
23447
|
-
var segmentedControlLabelContentStyles =
|
|
23857
|
+
var segmentedControlLabelContentStyles = import_react154.css`
|
|
23448
23858
|
display: flex;
|
|
23449
23859
|
align-items: center;
|
|
23450
23860
|
justify-content: center;
|
|
23451
23861
|
gap: var(--spacing-sm);
|
|
23452
23862
|
height: 100%;
|
|
23453
23863
|
`;
|
|
23454
|
-
var segmentedControlLabelTextStyles =
|
|
23864
|
+
var segmentedControlLabelTextStyles = import_react154.css`
|
|
23455
23865
|
white-space: nowrap;
|
|
23456
23866
|
`;
|
|
23457
23867
|
|
|
23458
23868
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23459
|
-
var
|
|
23869
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23460
23870
|
var SegmentedControl = ({
|
|
23461
23871
|
name,
|
|
23462
23872
|
options,
|
|
@@ -23471,10 +23881,10 @@ var SegmentedControl = ({
|
|
|
23471
23881
|
currentBackgroundColor = "white",
|
|
23472
23882
|
...props
|
|
23473
23883
|
}) => {
|
|
23474
|
-
const wrapperRef = (0,
|
|
23475
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
23476
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
23477
|
-
const onOptionChange = (0,
|
|
23884
|
+
const wrapperRef = (0, import_react156.useRef)(null);
|
|
23885
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react156.useState)(false);
|
|
23886
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react156.useState)(false);
|
|
23887
|
+
const onOptionChange = (0, import_react156.useCallback)(
|
|
23478
23888
|
(event) => {
|
|
23479
23889
|
if (event.target.checked) {
|
|
23480
23890
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -23482,19 +23892,19 @@ var SegmentedControl = ({
|
|
|
23482
23892
|
},
|
|
23483
23893
|
[options, onChange]
|
|
23484
23894
|
);
|
|
23485
|
-
const sizeStyles = (0,
|
|
23895
|
+
const sizeStyles = (0, import_react156.useMemo)(() => {
|
|
23486
23896
|
const map = {
|
|
23487
|
-
sm: (0,
|
|
23488
|
-
md: (0,
|
|
23489
|
-
lg: (0,
|
|
23490
|
-
xl: (0,
|
|
23897
|
+
sm: (0, import_react155.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
23898
|
+
md: (0, import_react155.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
23899
|
+
lg: (0, import_react155.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
23900
|
+
xl: (0, import_react155.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
23491
23901
|
};
|
|
23492
23902
|
return map[size];
|
|
23493
23903
|
}, [size]);
|
|
23494
|
-
const isIconOnly = (0,
|
|
23904
|
+
const isIconOnly = (0, import_react156.useMemo)(() => {
|
|
23495
23905
|
return options.every((option) => option && option.icon && !option.label);
|
|
23496
23906
|
}, [options]);
|
|
23497
|
-
(0,
|
|
23907
|
+
(0, import_react156.useEffect)(() => {
|
|
23498
23908
|
const wrapperElement = wrapperRef.current;
|
|
23499
23909
|
const onScroll = () => {
|
|
23500
23910
|
if (!wrapperElement) {
|
|
@@ -23515,8 +23925,8 @@ var SegmentedControl = ({
|
|
|
23515
23925
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
23516
23926
|
};
|
|
23517
23927
|
}, []);
|
|
23518
|
-
return /* @__PURE__ */ (0,
|
|
23519
|
-
/* @__PURE__ */ (0,
|
|
23928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
23929
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23520
23930
|
"div",
|
|
23521
23931
|
{
|
|
23522
23932
|
css: [
|
|
@@ -23532,12 +23942,12 @@ var SegmentedControl = ({
|
|
|
23532
23942
|
}
|
|
23533
23943
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
23534
23944
|
const isDisabled = disabled2 || option.disabled;
|
|
23535
|
-
return /* @__PURE__ */ (0,
|
|
23945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23536
23946
|
"div",
|
|
23537
23947
|
{
|
|
23538
23948
|
css: segmentedControlItemStyles,
|
|
23539
23949
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
23540
|
-
children: /* @__PURE__ */ (0,
|
|
23950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
23541
23951
|
"label",
|
|
23542
23952
|
{
|
|
23543
23953
|
css: [
|
|
@@ -23546,7 +23956,7 @@ var SegmentedControl = ({
|
|
|
23546
23956
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
23547
23957
|
],
|
|
23548
23958
|
children: [
|
|
23549
|
-
/* @__PURE__ */ (0,
|
|
23959
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23550
23960
|
"input",
|
|
23551
23961
|
{
|
|
23552
23962
|
css: segmentedControlInputStyles,
|
|
@@ -23558,10 +23968,10 @@ var SegmentedControl = ({
|
|
|
23558
23968
|
disabled: isDisabled
|
|
23559
23969
|
}
|
|
23560
23970
|
),
|
|
23561
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
23562
|
-
/* @__PURE__ */ (0,
|
|
23563
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
23564
|
-
!text || hideOptionText ? null : /* @__PURE__ */ (0,
|
|
23971
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
23972
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
23973
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
23974
|
+
!text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
23565
23975
|
] })
|
|
23566
23976
|
]
|
|
23567
23977
|
}
|
|
@@ -23571,7 +23981,7 @@ var SegmentedControl = ({
|
|
|
23571
23981
|
})
|
|
23572
23982
|
}
|
|
23573
23983
|
) }),
|
|
23574
|
-
/* @__PURE__ */ (0,
|
|
23984
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23575
23985
|
"div",
|
|
23576
23986
|
{
|
|
23577
23987
|
css: [
|
|
@@ -23589,18 +23999,18 @@ init_emotion_jsx_shim();
|
|
|
23589
23999
|
|
|
23590
24000
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
23591
24001
|
init_emotion_jsx_shim();
|
|
23592
|
-
var
|
|
23593
|
-
var lightFadingOut =
|
|
24002
|
+
var import_react157 = require("@emotion/react");
|
|
24003
|
+
var lightFadingOut = import_react157.keyframes`
|
|
23594
24004
|
from { opacity: 0.1; }
|
|
23595
24005
|
to { opacity: 0.025; }
|
|
23596
24006
|
`;
|
|
23597
|
-
var skeletonStyles =
|
|
24007
|
+
var skeletonStyles = import_react157.css`
|
|
23598
24008
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
23599
24009
|
background-color: var(--gray-900);
|
|
23600
24010
|
`;
|
|
23601
24011
|
|
|
23602
24012
|
// src/components/Skeleton/Skeleton.tsx
|
|
23603
|
-
var
|
|
24013
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23604
24014
|
var Skeleton = ({
|
|
23605
24015
|
width = "100%",
|
|
23606
24016
|
height = "1.25rem",
|
|
@@ -23608,7 +24018,7 @@ var Skeleton = ({
|
|
|
23608
24018
|
circle = false,
|
|
23609
24019
|
children,
|
|
23610
24020
|
...otherProps
|
|
23611
|
-
}) => /* @__PURE__ */ (0,
|
|
24021
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23612
24022
|
"div",
|
|
23613
24023
|
{
|
|
23614
24024
|
css: [
|
|
@@ -23629,12 +24039,12 @@ var Skeleton = ({
|
|
|
23629
24039
|
|
|
23630
24040
|
// src/components/Switch/Switch.tsx
|
|
23631
24041
|
init_emotion_jsx_shim();
|
|
23632
|
-
var
|
|
24042
|
+
var import_react159 = require("react");
|
|
23633
24043
|
|
|
23634
24044
|
// src/components/Switch/Switch.styles.ts
|
|
23635
24045
|
init_emotion_jsx_shim();
|
|
23636
|
-
var
|
|
23637
|
-
var SwitchInputContainer =
|
|
24046
|
+
var import_react158 = require("@emotion/react");
|
|
24047
|
+
var SwitchInputContainer = import_react158.css`
|
|
23638
24048
|
cursor: pointer;
|
|
23639
24049
|
display: inline-block;
|
|
23640
24050
|
position: relative;
|
|
@@ -23643,7 +24053,7 @@ var SwitchInputContainer = import_react154.css`
|
|
|
23643
24053
|
vertical-align: middle;
|
|
23644
24054
|
user-select: none;
|
|
23645
24055
|
`;
|
|
23646
|
-
var SwitchInput = (size) =>
|
|
24056
|
+
var SwitchInput = (size) => import_react158.css`
|
|
23647
24057
|
appearance: none;
|
|
23648
24058
|
border-radius: var(--rounded-full);
|
|
23649
24059
|
background-color: var(--white);
|
|
@@ -23682,7 +24092,7 @@ var SwitchInput = (size) => import_react154.css`
|
|
|
23682
24092
|
cursor: not-allowed;
|
|
23683
24093
|
}
|
|
23684
24094
|
`;
|
|
23685
|
-
var SwitchInputDisabled =
|
|
24095
|
+
var SwitchInputDisabled = import_react158.css`
|
|
23686
24096
|
opacity: var(--opacity-50);
|
|
23687
24097
|
cursor: not-allowed;
|
|
23688
24098
|
|
|
@@ -23690,7 +24100,7 @@ var SwitchInputDisabled = import_react154.css`
|
|
|
23690
24100
|
cursor: not-allowed;
|
|
23691
24101
|
}
|
|
23692
24102
|
`;
|
|
23693
|
-
var SwitchInputLabel = (size) =>
|
|
24103
|
+
var SwitchInputLabel = (size) => import_react158.css`
|
|
23694
24104
|
align-items: center;
|
|
23695
24105
|
color: var(--typography-base);
|
|
23696
24106
|
display: inline-flex;
|
|
@@ -23712,32 +24122,32 @@ var SwitchInputLabel = (size) => import_react154.css`
|
|
|
23712
24122
|
top: 0;
|
|
23713
24123
|
}
|
|
23714
24124
|
`;
|
|
23715
|
-
var SwitchText = (size) =>
|
|
24125
|
+
var SwitchText = (size) => import_react158.css`
|
|
23716
24126
|
color: var(--gray-500);
|
|
23717
24127
|
font-size: var(--fs-sm);
|
|
23718
24128
|
padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
|
|
23719
24129
|
`;
|
|
23720
24130
|
|
|
23721
24131
|
// src/components/Switch/Switch.tsx
|
|
23722
|
-
var
|
|
23723
|
-
var Switch = (0,
|
|
24132
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
24133
|
+
var Switch = (0, import_react159.forwardRef)(
|
|
23724
24134
|
({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
|
|
23725
24135
|
let additionalText = infoText;
|
|
23726
24136
|
if (infoText && toggleText) {
|
|
23727
24137
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
23728
24138
|
}
|
|
23729
|
-
return /* @__PURE__ */ (0,
|
|
23730
|
-
/* @__PURE__ */ (0,
|
|
24139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
24140
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
23731
24141
|
"label",
|
|
23732
24142
|
{
|
|
23733
24143
|
css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0],
|
|
23734
24144
|
children: [
|
|
23735
|
-
/* @__PURE__ */ (0,
|
|
23736
|
-
/* @__PURE__ */ (0,
|
|
24145
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
|
|
24146
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { css: SwitchInputLabel(switchSize), children: label })
|
|
23737
24147
|
]
|
|
23738
24148
|
}
|
|
23739
24149
|
),
|
|
23740
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
24150
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { css: SwitchText(switchSize), children: additionalText }) : null,
|
|
23741
24151
|
children
|
|
23742
24152
|
] });
|
|
23743
24153
|
}
|
|
@@ -23749,8 +24159,8 @@ var React24 = __toESM(require("react"));
|
|
|
23749
24159
|
|
|
23750
24160
|
// src/components/Table/Table.styles.ts
|
|
23751
24161
|
init_emotion_jsx_shim();
|
|
23752
|
-
var
|
|
23753
|
-
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) =>
|
|
24162
|
+
var import_react160 = require("@emotion/react");
|
|
24163
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react160.css`
|
|
23754
24164
|
border-bottom: 1px solid var(--gray-400);
|
|
23755
24165
|
border-collapse: collapse;
|
|
23756
24166
|
min-width: 100%;
|
|
@@ -23770,66 +24180,66 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_
|
|
|
23770
24180
|
background-color: var(--gray-50);
|
|
23771
24181
|
}
|
|
23772
24182
|
`;
|
|
23773
|
-
var tableHead =
|
|
24183
|
+
var tableHead = import_react160.css`
|
|
23774
24184
|
color: var(--typography-base);
|
|
23775
24185
|
text-align: left;
|
|
23776
24186
|
`;
|
|
23777
|
-
var tableRow =
|
|
24187
|
+
var tableRow = import_react160.css`
|
|
23778
24188
|
border-bottom: 1px solid var(--gray-100);
|
|
23779
24189
|
`;
|
|
23780
|
-
var tableCellHead =
|
|
24190
|
+
var tableCellHead = import_react160.css`
|
|
23781
24191
|
font-size: var(--fs-sm);
|
|
23782
24192
|
text-transform: uppercase;
|
|
23783
24193
|
font-weight: var(--fw-bold);
|
|
23784
24194
|
`;
|
|
23785
24195
|
|
|
23786
24196
|
// src/components/Table/Table.tsx
|
|
23787
|
-
var
|
|
24197
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
23788
24198
|
var Table = React24.forwardRef(
|
|
23789
24199
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
23790
|
-
return /* @__PURE__ */ (0,
|
|
24200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
23791
24201
|
}
|
|
23792
24202
|
);
|
|
23793
24203
|
var TableHead = React24.forwardRef(
|
|
23794
24204
|
({ children, ...otherProps }, ref) => {
|
|
23795
|
-
return /* @__PURE__ */ (0,
|
|
24205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
23796
24206
|
}
|
|
23797
24207
|
);
|
|
23798
24208
|
var TableBody = React24.forwardRef(
|
|
23799
24209
|
({ children, ...otherProps }, ref) => {
|
|
23800
|
-
return /* @__PURE__ */ (0,
|
|
24210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("tbody", { ref, ...otherProps, children });
|
|
23801
24211
|
}
|
|
23802
24212
|
);
|
|
23803
24213
|
var TableFoot = React24.forwardRef(
|
|
23804
24214
|
({ children, ...otherProps }, ref) => {
|
|
23805
|
-
return /* @__PURE__ */ (0,
|
|
24215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("tfoot", { ref, ...otherProps, children });
|
|
23806
24216
|
}
|
|
23807
24217
|
);
|
|
23808
24218
|
var TableRow = React24.forwardRef(
|
|
23809
24219
|
({ children, ...otherProps }, ref) => {
|
|
23810
|
-
return /* @__PURE__ */ (0,
|
|
24220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
23811
24221
|
}
|
|
23812
24222
|
);
|
|
23813
24223
|
var TableCellHead = React24.forwardRef(
|
|
23814
24224
|
({ children, ...otherProps }, ref) => {
|
|
23815
|
-
return /* @__PURE__ */ (0,
|
|
24225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
23816
24226
|
}
|
|
23817
24227
|
);
|
|
23818
24228
|
var TableCellData = React24.forwardRef(
|
|
23819
24229
|
({ children, ...otherProps }, ref) => {
|
|
23820
|
-
return /* @__PURE__ */ (0,
|
|
24230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("td", { ref, ...otherProps, children });
|
|
23821
24231
|
}
|
|
23822
24232
|
);
|
|
23823
24233
|
|
|
23824
24234
|
// src/components/Tabs/Tabs.tsx
|
|
23825
24235
|
init_emotion_jsx_shim();
|
|
23826
|
-
var
|
|
23827
|
-
var
|
|
24236
|
+
var import_react162 = require("@ariakit/react");
|
|
24237
|
+
var import_react163 = require("react");
|
|
23828
24238
|
|
|
23829
24239
|
// src/components/Tabs/Tabs.styles.ts
|
|
23830
24240
|
init_emotion_jsx_shim();
|
|
23831
|
-
var
|
|
23832
|
-
var tabButtonStyles =
|
|
24241
|
+
var import_react161 = require("@emotion/react");
|
|
24242
|
+
var tabButtonStyles = import_react161.css`
|
|
23833
24243
|
align-items: center;
|
|
23834
24244
|
border: 0;
|
|
23835
24245
|
height: 2.5rem;
|
|
@@ -23846,16 +24256,16 @@ var tabButtonStyles = import_react157.css`
|
|
|
23846
24256
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
23847
24257
|
}
|
|
23848
24258
|
`;
|
|
23849
|
-
var tabButtonGroupStyles =
|
|
24259
|
+
var tabButtonGroupStyles = import_react161.css`
|
|
23850
24260
|
display: flex;
|
|
23851
24261
|
gap: var(--spacing-base);
|
|
23852
24262
|
border-bottom: 1px solid var(--gray-300);
|
|
23853
24263
|
`;
|
|
23854
24264
|
|
|
23855
24265
|
// src/components/Tabs/Tabs.tsx
|
|
23856
|
-
var
|
|
24266
|
+
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
23857
24267
|
var useCurrentTab = () => {
|
|
23858
|
-
const context = (0,
|
|
24268
|
+
const context = (0, import_react162.useTabStore)();
|
|
23859
24269
|
if (!context) {
|
|
23860
24270
|
throw new Error("This component can only be used inside <Tabs>");
|
|
23861
24271
|
}
|
|
@@ -23869,12 +24279,12 @@ var Tabs = ({
|
|
|
23869
24279
|
manual,
|
|
23870
24280
|
...props
|
|
23871
24281
|
}) => {
|
|
23872
|
-
const selected = (0,
|
|
24282
|
+
const selected = (0, import_react163.useMemo)(() => {
|
|
23873
24283
|
if (selectedId) return selectedId;
|
|
23874
24284
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
23875
24285
|
}, [selectedId, useHashForState]);
|
|
23876
|
-
const tab = (0,
|
|
23877
|
-
const onTabSelect = (0,
|
|
24286
|
+
const tab = (0, import_react162.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
24287
|
+
const onTabSelect = (0, import_react163.useCallback)(
|
|
23878
24288
|
(value) => {
|
|
23879
24289
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
23880
24290
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -23885,28 +24295,28 @@ var Tabs = ({
|
|
|
23885
24295
|
},
|
|
23886
24296
|
[onSelectedIdChange, useHashForState]
|
|
23887
24297
|
);
|
|
23888
|
-
(0,
|
|
24298
|
+
(0, import_react163.useEffect)(() => {
|
|
23889
24299
|
if (selected && selected !== tab.getState().activeId) {
|
|
23890
24300
|
tab.setSelectedId(selected);
|
|
23891
24301
|
}
|
|
23892
24302
|
}, [selected, tab]);
|
|
23893
|
-
return /* @__PURE__ */ (0,
|
|
24303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
23894
24304
|
};
|
|
23895
24305
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
23896
|
-
return /* @__PURE__ */ (0,
|
|
24306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
23897
24307
|
};
|
|
23898
24308
|
var TabButton = ({
|
|
23899
24309
|
children,
|
|
23900
24310
|
id,
|
|
23901
24311
|
...props
|
|
23902
24312
|
}) => {
|
|
23903
|
-
return /* @__PURE__ */ (0,
|
|
24313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
23904
24314
|
};
|
|
23905
24315
|
var TabContent = ({
|
|
23906
24316
|
children,
|
|
23907
24317
|
...props
|
|
23908
24318
|
}) => {
|
|
23909
|
-
return /* @__PURE__ */ (0,
|
|
24319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.TabPanel, { ...props, children });
|
|
23910
24320
|
};
|
|
23911
24321
|
|
|
23912
24322
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -23914,8 +24324,8 @@ init_emotion_jsx_shim();
|
|
|
23914
24324
|
|
|
23915
24325
|
// src/components/Validation/StatusBullet.styles.ts
|
|
23916
24326
|
init_emotion_jsx_shim();
|
|
23917
|
-
var
|
|
23918
|
-
var StatusBulletContainer =
|
|
24327
|
+
var import_react164 = require("@emotion/react");
|
|
24328
|
+
var StatusBulletContainer = import_react164.css`
|
|
23919
24329
|
align-items: center;
|
|
23920
24330
|
align-self: center;
|
|
23921
24331
|
color: var(--gray-500);
|
|
@@ -23932,33 +24342,33 @@ var StatusBulletContainer = import_react160.css`
|
|
|
23932
24342
|
display: block;
|
|
23933
24343
|
}
|
|
23934
24344
|
`;
|
|
23935
|
-
var StatusBulletBase =
|
|
24345
|
+
var StatusBulletBase = import_react164.css`
|
|
23936
24346
|
font-size: var(--fs-sm);
|
|
23937
24347
|
&:before {
|
|
23938
24348
|
width: var(--fs-xs);
|
|
23939
24349
|
height: var(--fs-xs);
|
|
23940
24350
|
}
|
|
23941
24351
|
`;
|
|
23942
|
-
var StatusBulletSmall =
|
|
24352
|
+
var StatusBulletSmall = import_react164.css`
|
|
23943
24353
|
font-size: var(--fs-xs);
|
|
23944
24354
|
&:before {
|
|
23945
24355
|
width: var(--fs-xxs);
|
|
23946
24356
|
height: var(--fs-xxs);
|
|
23947
24357
|
}
|
|
23948
24358
|
`;
|
|
23949
|
-
var StatusDraft =
|
|
24359
|
+
var StatusDraft = import_react164.css`
|
|
23950
24360
|
&:before {
|
|
23951
24361
|
background: var(--white);
|
|
23952
24362
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
23953
24363
|
}
|
|
23954
24364
|
`;
|
|
23955
|
-
var StatusModified =
|
|
24365
|
+
var StatusModified = import_react164.css`
|
|
23956
24366
|
&:before {
|
|
23957
24367
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
23958
24368
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
23959
24369
|
}
|
|
23960
24370
|
`;
|
|
23961
|
-
var StatusError =
|
|
24371
|
+
var StatusError = import_react164.css`
|
|
23962
24372
|
color: var(--error);
|
|
23963
24373
|
&:before {
|
|
23964
24374
|
/* TODO: replace this with an svg icon */
|
|
@@ -23971,29 +24381,29 @@ var StatusError = import_react160.css`
|
|
|
23971
24381
|
);
|
|
23972
24382
|
}
|
|
23973
24383
|
`;
|
|
23974
|
-
var StatusPublished =
|
|
24384
|
+
var StatusPublished = import_react164.css`
|
|
23975
24385
|
&:before {
|
|
23976
24386
|
background: var(--accent-dark);
|
|
23977
24387
|
}
|
|
23978
24388
|
`;
|
|
23979
|
-
var StatusOrphan =
|
|
24389
|
+
var StatusOrphan = import_react164.css`
|
|
23980
24390
|
&:before {
|
|
23981
24391
|
background: var(--brand-secondary-5);
|
|
23982
24392
|
}
|
|
23983
24393
|
`;
|
|
23984
|
-
var StatusUnknown =
|
|
24394
|
+
var StatusUnknown = import_react164.css`
|
|
23985
24395
|
&:before {
|
|
23986
24396
|
background: var(--gray-800);
|
|
23987
24397
|
}
|
|
23988
24398
|
`;
|
|
23989
|
-
var StatusDeleted =
|
|
24399
|
+
var StatusDeleted = import_react164.css`
|
|
23990
24400
|
&:before {
|
|
23991
24401
|
background: var(--error);
|
|
23992
24402
|
}
|
|
23993
24403
|
`;
|
|
23994
24404
|
|
|
23995
24405
|
// src/components/Validation/StatusBullet.tsx
|
|
23996
|
-
var
|
|
24406
|
+
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
23997
24407
|
var StatusBullet = ({
|
|
23998
24408
|
status,
|
|
23999
24409
|
hideText = false,
|
|
@@ -24013,7 +24423,7 @@ var StatusBullet = ({
|
|
|
24013
24423
|
Deleted: StatusDeleted
|
|
24014
24424
|
};
|
|
24015
24425
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
24016
|
-
return /* @__PURE__ */ (0,
|
|
24426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
24017
24427
|
"span",
|
|
24018
24428
|
{
|
|
24019
24429
|
role: "status",
|
|
@@ -24090,6 +24500,7 @@ var StatusBullet = ({
|
|
|
24090
24500
|
IntegrationModalIcon,
|
|
24091
24501
|
IntegrationTile,
|
|
24092
24502
|
JsonEditor,
|
|
24503
|
+
KeyValueInput,
|
|
24093
24504
|
Label,
|
|
24094
24505
|
LabelLeadingIcon,
|
|
24095
24506
|
Legend,
|
|
@@ -24267,6 +24678,7 @@ var StatusBullet = ({
|
|
|
24267
24678
|
toast,
|
|
24268
24679
|
uniformComponentIcon,
|
|
24269
24680
|
uniformComponentPatternIcon,
|
|
24681
|
+
uniformCompositionPatternIcon,
|
|
24270
24682
|
uniformContentTypeIcon,
|
|
24271
24683
|
uniformEntryIcon,
|
|
24272
24684
|
uniformEntryPatternIcon,
|