@uniformdev/design-system 18.21.1-alpha.4 → 18.23.1-alpha.34
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 +278 -195
- package/dist/index.d.ts +51 -25
- package/dist/index.js +448 -367
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -8209,19 +8209,19 @@ var UniformBadge = ({
|
|
|
8209
8209
|
css: [SVG, theme === "dark" ? SVGDark : SVGLight],
|
|
8210
8210
|
...props,
|
|
8211
8211
|
children: [
|
|
8212
|
-
/* @__PURE__ */ jsx16("path", { d: "M28.998 0 0 16.744V50.23l28.998-16.744 29.004-16.743L28.998 0Z", fill: "#
|
|
8212
|
+
/* @__PURE__ */ jsx16("path", { d: "M28.998 0 0 16.744V50.23l28.998-16.744 29.004-16.743L28.998 0Z", fill: "#7BB3FF" }),
|
|
8213
8213
|
/* @__PURE__ */ jsx16(
|
|
8214
8214
|
"path",
|
|
8215
8215
|
{
|
|
8216
8216
|
d: "M28.998 66.974V33.487L0 50.231v33.487l28.998 16.744 29.004-16.744V50.23L28.998 66.974Z",
|
|
8217
|
-
fill: "#
|
|
8217
|
+
fill: "#498DFF"
|
|
8218
8218
|
}
|
|
8219
8219
|
),
|
|
8220
8220
|
/* @__PURE__ */ jsx16(
|
|
8221
8221
|
"path",
|
|
8222
8222
|
{
|
|
8223
8223
|
d: "M58.002 16.744 28.998 33.487l29.004 16.744v33.487L87 66.975V33.487L58.002 16.744Z",
|
|
8224
|
-
fill: "#
|
|
8224
|
+
fill: "#E61408"
|
|
8225
8225
|
}
|
|
8226
8226
|
)
|
|
8227
8227
|
]
|
|
@@ -8246,15 +8246,15 @@ var UniformLogo = ({
|
|
|
8246
8246
|
css: [SVG, theme === "dark" ? SVGDark : SVGLight],
|
|
8247
8247
|
...props,
|
|
8248
8248
|
children: [
|
|
8249
|
-
/* @__PURE__ */ jsx17("path", { d: "M11.249 0 0 6.495v12.99l11.249-6.495L22.5 6.495 11.25 0Z", fill: "#
|
|
8249
|
+
/* @__PURE__ */ jsx17("path", { d: "M11.249 0 0 6.495v12.99l11.249-6.495L22.5 6.495 11.25 0Z", fill: "#7BB3FF" }),
|
|
8250
8250
|
/* @__PURE__ */ jsx17(
|
|
8251
8251
|
"path",
|
|
8252
8252
|
{
|
|
8253
8253
|
d: "M11.249 25.98V12.99L0 19.486v12.99l11.249 6.495L22.5 32.476v-12.99L11.25 25.98Z",
|
|
8254
|
-
fill: "#
|
|
8254
|
+
fill: "#498DFF"
|
|
8255
8255
|
}
|
|
8256
8256
|
),
|
|
8257
|
-
/* @__PURE__ */ jsx17("path", { d: "m22.5 6.495-11.25 6.496 11.25 6.495v12.99l11.25-6.495V12.99L22.5 6.495Z", fill: "#
|
|
8257
|
+
/* @__PURE__ */ jsx17("path", { d: "m22.5 6.495-11.25 6.496 11.25 6.495v12.99l11.25-6.495V12.99L22.5 6.495Z", fill: "#E61408" }),
|
|
8258
8258
|
/* @__PURE__ */ jsx17(
|
|
8259
8259
|
"path",
|
|
8260
8260
|
{
|
|
@@ -9103,7 +9103,7 @@ var summary = css26`
|
|
|
9103
9103
|
display: grid;
|
|
9104
9104
|
grid-template-columns: 1.25rem 1fr;
|
|
9105
9105
|
gap: var(--spacing-sm);
|
|
9106
|
-
padding: var(--spacing-sm);
|
|
9106
|
+
padding: var(--spacing-sm) 0;
|
|
9107
9107
|
|
|
9108
9108
|
// hides the native arrow icon
|
|
9109
9109
|
list-style: none;
|
|
@@ -9147,7 +9147,7 @@ var Details = ({ summary: summary2, children, isOpenByDefault = false, ...props
|
|
|
9147
9147
|
};
|
|
9148
9148
|
|
|
9149
9149
|
// src/components/Drawer/Drawer.tsx
|
|
9150
|
-
import
|
|
9150
|
+
import React11, { useEffect as useEffect5, useMemo, useRef as useRef2 } from "react";
|
|
9151
9151
|
import { CgChevronRight } from "react-icons/cg";
|
|
9152
9152
|
|
|
9153
9153
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -9283,71 +9283,15 @@ function isEqualDrawerInstance(a, b) {
|
|
|
9283
9283
|
return isEqualDrawer(a, b) && a.instanceKey === b.instanceKey;
|
|
9284
9284
|
}
|
|
9285
9285
|
|
|
9286
|
-
// src/components/Drawer/Drawer.tsx
|
|
9287
|
-
import { jsx as jsx31, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
|
|
9288
|
-
var Drawer = React10.forwardRef(
|
|
9289
|
-
({ id, stackId, instanceKey, onRequestClose, header, bgColor, children }, ref) => {
|
|
9290
|
-
const { registerDrawer, unregisterDrawer } = useDrawer();
|
|
9291
|
-
const closeButtonRef = useRef2(null);
|
|
9292
|
-
const component = useMemo(() => {
|
|
9293
|
-
const headerId = `dialog-header-${stackId}-${id}`;
|
|
9294
|
-
return /* @__PURE__ */ jsxs17(
|
|
9295
|
-
"div",
|
|
9296
|
-
{
|
|
9297
|
-
ref,
|
|
9298
|
-
id,
|
|
9299
|
-
role: "dialog",
|
|
9300
|
-
tabIndex: -1,
|
|
9301
|
-
"aria-labelledby": headerId,
|
|
9302
|
-
css: drawerStyles(bgColor),
|
|
9303
|
-
"data-test-id": "side-dialog",
|
|
9304
|
-
children: [
|
|
9305
|
-
/* @__PURE__ */ jsx31(
|
|
9306
|
-
Button,
|
|
9307
|
-
{
|
|
9308
|
-
ref: closeButtonRef,
|
|
9309
|
-
type: "button",
|
|
9310
|
-
onClick: onRequestClose,
|
|
9311
|
-
css: drawerCloseButtonStyles,
|
|
9312
|
-
title: "Close dialog",
|
|
9313
|
-
buttonType: "ghost",
|
|
9314
|
-
children: /* @__PURE__ */ jsx31(Icon, { icon: CgChevronRight, iconColor: "gray", size: "1.5rem" })
|
|
9315
|
-
}
|
|
9316
|
-
),
|
|
9317
|
-
header ? /* @__PURE__ */ jsx31("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
9318
|
-
/* @__PURE__ */ jsx31("div", { css: drawerInnerStyles, children })
|
|
9319
|
-
]
|
|
9320
|
-
}
|
|
9321
|
-
);
|
|
9322
|
-
}, [children, header, id, stackId, bgColor, onRequestClose, ref]);
|
|
9323
|
-
useEffect5(() => {
|
|
9324
|
-
registerDrawer({
|
|
9325
|
-
drawer: {
|
|
9326
|
-
id,
|
|
9327
|
-
component,
|
|
9328
|
-
stackId,
|
|
9329
|
-
onRequestClose,
|
|
9330
|
-
instanceKey
|
|
9331
|
-
},
|
|
9332
|
-
onFirstRender: () => {
|
|
9333
|
-
setTimeout(() => {
|
|
9334
|
-
var _a;
|
|
9335
|
-
(_a = closeButtonRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
9336
|
-
}, 0);
|
|
9337
|
-
}
|
|
9338
|
-
});
|
|
9339
|
-
}, [component, instanceKey, registerDrawer]);
|
|
9340
|
-
useEffect5(() => {
|
|
9341
|
-
return () => unregisterDrawer({ id, stackId, instanceKey });
|
|
9342
|
-
}, [id, stackId, instanceKey, unregisterDrawer]);
|
|
9343
|
-
return null;
|
|
9344
|
-
}
|
|
9345
|
-
);
|
|
9346
|
-
|
|
9347
9286
|
// src/components/Drawer/DrawerRenderer.tsx
|
|
9348
|
-
import {
|
|
9287
|
+
import { createContext as createContext4, useContext as useContext5 } from "react";
|
|
9288
|
+
import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs17 } from "@emotion/react/jsx-runtime";
|
|
9349
9289
|
var maxLayeringInPx = 64;
|
|
9350
9290
|
var idealDistanceBetweenLayersInPx = 16;
|
|
9291
|
+
var CurrentDrawerRendererContext = createContext4({});
|
|
9292
|
+
var useCurrentDrawerRenderer = () => {
|
|
9293
|
+
return useContext5(CurrentDrawerRendererContext);
|
|
9294
|
+
};
|
|
9351
9295
|
var DrawerRenderer = ({
|
|
9352
9296
|
stackId,
|
|
9353
9297
|
position = "absolute",
|
|
@@ -9361,7 +9305,7 @@ var DrawerRenderer = ({
|
|
|
9361
9305
|
if (drawersToRender.length === 0) {
|
|
9362
9306
|
return null;
|
|
9363
9307
|
}
|
|
9364
|
-
return /* @__PURE__ */
|
|
9308
|
+
return /* @__PURE__ */ jsx31(CurrentDrawerRendererContext.Provider, { value: { stackId }, children: /* @__PURE__ */ jsx31("div", { css: drawerRendererStyles(position), ...otherProps, children: drawersToRender.map(({ component, id, stackId: stackId2, onRequestClose }, index) => /* @__PURE__ */ jsx31(
|
|
9365
9309
|
DrawerWrapper,
|
|
9366
9310
|
{
|
|
9367
9311
|
index,
|
|
@@ -9373,7 +9317,7 @@ var DrawerRenderer = ({
|
|
|
9373
9317
|
children: component
|
|
9374
9318
|
},
|
|
9375
9319
|
`${stackId2}-${id}`
|
|
9376
|
-
)) });
|
|
9320
|
+
)) }) });
|
|
9377
9321
|
};
|
|
9378
9322
|
var DrawerWrapper = ({
|
|
9379
9323
|
index,
|
|
@@ -9390,12 +9334,91 @@ var DrawerWrapper = ({
|
|
|
9390
9334
|
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
9391
9335
|
}
|
|
9392
9336
|
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
9393
|
-
return /* @__PURE__ */
|
|
9394
|
-
/* @__PURE__ */
|
|
9395
|
-
/* @__PURE__ */
|
|
9337
|
+
return /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
9338
|
+
/* @__PURE__ */ jsx31("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
9339
|
+
/* @__PURE__ */ jsx31("div", { css: [drawerWrapperStyles, { width: calculatedWidth, minWidth, maxWidth }], children })
|
|
9396
9340
|
] });
|
|
9397
9341
|
};
|
|
9398
9342
|
|
|
9343
|
+
// src/components/Drawer/Drawer.tsx
|
|
9344
|
+
import { jsx as jsx32, jsxs as jsxs18 } from "@emotion/react/jsx-runtime";
|
|
9345
|
+
var defaultSackId = "_default";
|
|
9346
|
+
var Drawer = React11.forwardRef(
|
|
9347
|
+
({ width, minWidth, maxWidth, position, ...drawerProps }, ref) => {
|
|
9348
|
+
const drawerRendererProps = { width, minWidth, maxWidth, position };
|
|
9349
|
+
const { stackId: inheritedStackId } = useCurrentDrawerRenderer();
|
|
9350
|
+
return inheritedStackId ? /* @__PURE__ */ jsx32(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : drawerProps.stackId ? /* @__PURE__ */ jsx32(DrawerInner, { ref, ...drawerProps }) : /* @__PURE__ */ jsxs18(DrawerProvider, { children: [
|
|
9351
|
+
/* @__PURE__ */ jsx32(DrawerInner, { ref, ...drawerProps }),
|
|
9352
|
+
/* @__PURE__ */ jsx32(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
9353
|
+
] });
|
|
9354
|
+
}
|
|
9355
|
+
);
|
|
9356
|
+
var DrawerInner = ({
|
|
9357
|
+
ref,
|
|
9358
|
+
stackId = defaultSackId,
|
|
9359
|
+
id,
|
|
9360
|
+
bgColor,
|
|
9361
|
+
children,
|
|
9362
|
+
header,
|
|
9363
|
+
instanceKey,
|
|
9364
|
+
onRequestClose
|
|
9365
|
+
}) => {
|
|
9366
|
+
const { registerDrawer, unregisterDrawer } = useDrawer();
|
|
9367
|
+
const closeButtonRef = useRef2(null);
|
|
9368
|
+
const component = useMemo(() => {
|
|
9369
|
+
const headerId = `dialog-header-${stackId}-${id}`;
|
|
9370
|
+
return /* @__PURE__ */ jsxs18(
|
|
9371
|
+
"div",
|
|
9372
|
+
{
|
|
9373
|
+
ref,
|
|
9374
|
+
id,
|
|
9375
|
+
role: "dialog",
|
|
9376
|
+
tabIndex: -1,
|
|
9377
|
+
"aria-labelledby": headerId,
|
|
9378
|
+
css: drawerStyles(bgColor),
|
|
9379
|
+
"data-test-id": "side-dialog",
|
|
9380
|
+
children: [
|
|
9381
|
+
/* @__PURE__ */ jsx32(
|
|
9382
|
+
Button,
|
|
9383
|
+
{
|
|
9384
|
+
ref: closeButtonRef,
|
|
9385
|
+
type: "button",
|
|
9386
|
+
onClick: onRequestClose,
|
|
9387
|
+
css: drawerCloseButtonStyles,
|
|
9388
|
+
title: "Close dialog",
|
|
9389
|
+
buttonType: "ghost",
|
|
9390
|
+
children: /* @__PURE__ */ jsx32(Icon, { icon: CgChevronRight, iconColor: "gray", size: "1.5rem" })
|
|
9391
|
+
}
|
|
9392
|
+
),
|
|
9393
|
+
header ? /* @__PURE__ */ jsx32("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
9394
|
+
/* @__PURE__ */ jsx32("div", { css: drawerInnerStyles, children })
|
|
9395
|
+
]
|
|
9396
|
+
}
|
|
9397
|
+
);
|
|
9398
|
+
}, [children, header, id, stackId, bgColor, onRequestClose, ref]);
|
|
9399
|
+
useEffect5(() => {
|
|
9400
|
+
registerDrawer({
|
|
9401
|
+
drawer: {
|
|
9402
|
+
id,
|
|
9403
|
+
component,
|
|
9404
|
+
stackId,
|
|
9405
|
+
onRequestClose,
|
|
9406
|
+
instanceKey
|
|
9407
|
+
},
|
|
9408
|
+
onFirstRender: () => {
|
|
9409
|
+
setTimeout(() => {
|
|
9410
|
+
var _a;
|
|
9411
|
+
(_a = closeButtonRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
9412
|
+
}, 0);
|
|
9413
|
+
}
|
|
9414
|
+
});
|
|
9415
|
+
}, [component, instanceKey, registerDrawer]);
|
|
9416
|
+
useEffect5(() => {
|
|
9417
|
+
return () => unregisterDrawer({ id, stackId, instanceKey });
|
|
9418
|
+
}, [id, stackId, instanceKey, unregisterDrawer]);
|
|
9419
|
+
return null;
|
|
9420
|
+
};
|
|
9421
|
+
|
|
9399
9422
|
// src/components/Input/styles/CaptionText.styles.ts
|
|
9400
9423
|
import { css as css28 } from "@emotion/react";
|
|
9401
9424
|
var CaptionText = (dynamicSize) => css28`
|
|
@@ -9529,7 +9552,7 @@ var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
|
9529
9552
|
};
|
|
9530
9553
|
|
|
9531
9554
|
// src/components/Input/Fieldset.tsx
|
|
9532
|
-
import * as
|
|
9555
|
+
import * as React12 from "react";
|
|
9533
9556
|
|
|
9534
9557
|
// src/components/Input/styles/Fieldset.styles.ts
|
|
9535
9558
|
import { css as css31 } from "@emotion/react";
|
|
@@ -9573,7 +9596,7 @@ var fieldsetBody = css31`
|
|
|
9573
9596
|
|
|
9574
9597
|
// src/components/Input/Fieldset.tsx
|
|
9575
9598
|
import { jsx as jsx36, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
|
|
9576
|
-
var Fieldset =
|
|
9599
|
+
var Fieldset = React12.forwardRef(
|
|
9577
9600
|
({ legend, disabled, children, invert, ...props }, ref) => {
|
|
9578
9601
|
return /* @__PURE__ */ jsxs21("fieldset", { css: fieldsetContainer(Boolean(invert)), ref, disabled, ...props, children: [
|
|
9579
9602
|
legend,
|
|
@@ -9583,7 +9606,7 @@ var Fieldset = React11.forwardRef(
|
|
|
9583
9606
|
);
|
|
9584
9607
|
|
|
9585
9608
|
// src/components/Input/Input.tsx
|
|
9586
|
-
import * as
|
|
9609
|
+
import * as React13 from "react";
|
|
9587
9610
|
|
|
9588
9611
|
// src/components/Input/Label.tsx
|
|
9589
9612
|
import { jsx as jsx37 } from "@emotion/react/jsx-runtime";
|
|
@@ -9626,7 +9649,7 @@ var WarningMessage = ({ message, testId, ...props }) => {
|
|
|
9626
9649
|
|
|
9627
9650
|
// src/components/Input/Input.tsx
|
|
9628
9651
|
import { jsx as jsx39, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
|
|
9629
|
-
var Input =
|
|
9652
|
+
var Input = React13.forwardRef(
|
|
9630
9653
|
({
|
|
9631
9654
|
label,
|
|
9632
9655
|
icon,
|
|
@@ -11115,7 +11138,7 @@ var IntegrationModalHeader = ({ icon, name, menu: menu2, children }) => {
|
|
|
11115
11138
|
};
|
|
11116
11139
|
|
|
11117
11140
|
// src/components/Tooltip/Tooltip.tsx
|
|
11118
|
-
import
|
|
11141
|
+
import React14 from "react";
|
|
11119
11142
|
import {
|
|
11120
11143
|
Tooltip as ReakitTooltip,
|
|
11121
11144
|
TooltipArrow,
|
|
@@ -11144,7 +11167,7 @@ import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs44 } from "@emotion/re
|
|
|
11144
11167
|
function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
|
|
11145
11168
|
const tooltip = useTooltipState({ placement });
|
|
11146
11169
|
return /* @__PURE__ */ jsxs44(Fragment9, { children: [
|
|
11147
|
-
/* @__PURE__ */ jsx64(TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) =>
|
|
11170
|
+
/* @__PURE__ */ jsx64(TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => React14.cloneElement(children, referenceProps) }),
|
|
11148
11171
|
/* @__PURE__ */ jsxs44(ReakitTooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
|
|
11149
11172
|
/* @__PURE__ */ jsx64(TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
|
|
11150
11173
|
title
|
|
@@ -11169,6 +11192,11 @@ var inputIconBtn = css52`
|
|
|
11169
11192
|
background: var(--brand-secondary-3);
|
|
11170
11193
|
color: var(--white);
|
|
11171
11194
|
}
|
|
11195
|
+
|
|
11196
|
+
&[aria-disabled='true'] {
|
|
11197
|
+
background: none;
|
|
11198
|
+
color: currentColor;
|
|
11199
|
+
}
|
|
11172
11200
|
`;
|
|
11173
11201
|
|
|
11174
11202
|
// src/components/ParameterInputs/ConnectToDataElementButton.tsx
|
|
@@ -11182,22 +11210,32 @@ var ConnectToDataElementButton = ({
|
|
|
11182
11210
|
...props
|
|
11183
11211
|
}) => {
|
|
11184
11212
|
const title = isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
11185
|
-
return /* @__PURE__ */ jsx65(Tooltip, { title, children: /* @__PURE__ */ jsxs45(
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11213
|
+
return /* @__PURE__ */ jsx65(Tooltip, { title, children: /* @__PURE__ */ jsxs45(
|
|
11214
|
+
"button",
|
|
11215
|
+
{
|
|
11216
|
+
css: inputIconBtn,
|
|
11217
|
+
type: "button",
|
|
11218
|
+
"aria-pressed": isBound,
|
|
11219
|
+
"aria-disabled": isLocked,
|
|
11220
|
+
...props,
|
|
11221
|
+
children: [
|
|
11222
|
+
/* @__PURE__ */ jsx65(
|
|
11223
|
+
Icon,
|
|
11224
|
+
{
|
|
11225
|
+
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
11226
|
+
iconColor: iconColor ? iconColor : "currentColor",
|
|
11227
|
+
size: "1rem"
|
|
11228
|
+
}
|
|
11229
|
+
),
|
|
11230
|
+
children
|
|
11231
|
+
]
|
|
11232
|
+
}
|
|
11233
|
+
) });
|
|
11196
11234
|
};
|
|
11197
11235
|
|
|
11198
11236
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
11199
|
-
import { createContext as
|
|
11200
|
-
var ParameterShellContext =
|
|
11237
|
+
import { createContext as createContext5, useContext as useContext6 } from "react";
|
|
11238
|
+
var ParameterShellContext = createContext5({
|
|
11201
11239
|
id: "",
|
|
11202
11240
|
label: "",
|
|
11203
11241
|
hiddenLabel: void 0,
|
|
@@ -11206,7 +11244,7 @@ var ParameterShellContext = createContext4({
|
|
|
11206
11244
|
}
|
|
11207
11245
|
});
|
|
11208
11246
|
var useParameterShell = () => {
|
|
11209
|
-
const { id, label, hiddenLabel, errorMessage, onManuallySetErrorMessage } =
|
|
11247
|
+
const { id, label, hiddenLabel, errorMessage, onManuallySetErrorMessage } = useContext6(ParameterShellContext);
|
|
11210
11248
|
return {
|
|
11211
11249
|
id,
|
|
11212
11250
|
label,
|
|
@@ -11404,11 +11442,11 @@ var imageWrapper = css53`
|
|
|
11404
11442
|
`;
|
|
11405
11443
|
var img = css53`
|
|
11406
11444
|
animation: ${fadeIn} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
11407
|
-
|
|
11445
|
+
object-fit: contain;
|
|
11408
11446
|
max-width: 100%;
|
|
11409
11447
|
height: auto;
|
|
11410
11448
|
opacity: var(--opacity-0);
|
|
11411
|
-
margin
|
|
11449
|
+
margin: var(--spacing-sm) auto 0;
|
|
11412
11450
|
`;
|
|
11413
11451
|
var dataConnectButton = css53`
|
|
11414
11452
|
align-items: center;
|
|
@@ -11526,7 +11564,7 @@ var ParameterDrawerHeaderTitle = css54`
|
|
|
11526
11564
|
text-overflow: ellipsis;
|
|
11527
11565
|
white-space: nowrap;
|
|
11528
11566
|
overflow: hidden;
|
|
11529
|
-
max-width:
|
|
11567
|
+
max-width: 22ch;
|
|
11530
11568
|
`;
|
|
11531
11569
|
|
|
11532
11570
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
@@ -11561,6 +11599,7 @@ var fieldsetLegend2 = css55`
|
|
|
11561
11599
|
display: block;
|
|
11562
11600
|
font-weight: var(--fw-medium);
|
|
11563
11601
|
margin-bottom: var(--spacing-sm);
|
|
11602
|
+
width: 100%;
|
|
11564
11603
|
`;
|
|
11565
11604
|
|
|
11566
11605
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
@@ -11575,7 +11614,7 @@ var ParameterGroup = forwardRef7(
|
|
|
11575
11614
|
);
|
|
11576
11615
|
|
|
11577
11616
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
11578
|
-
import { forwardRef as forwardRef9, useCallback as useCallback2, useDeferredValue, useState as useState8 } from "react";
|
|
11617
|
+
import { forwardRef as forwardRef9, useCallback as useCallback2, useDeferredValue, useEffect as useEffect7, useState as useState8 } from "react";
|
|
11579
11618
|
|
|
11580
11619
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
11581
11620
|
import { useState as useState7 } from "react";
|
|
@@ -11654,7 +11693,8 @@ var extractParameterProps = (props) => {
|
|
|
11654
11693
|
menuItems,
|
|
11655
11694
|
onManuallySetErrorMessage,
|
|
11656
11695
|
title,
|
|
11657
|
-
|
|
11696
|
+
hasOverriddenValue,
|
|
11697
|
+
onResetOverriddenValue,
|
|
11658
11698
|
...innerProps
|
|
11659
11699
|
} = props;
|
|
11660
11700
|
return {
|
|
@@ -11670,7 +11710,8 @@ var extractParameterProps = (props) => {
|
|
|
11670
11710
|
menuItems,
|
|
11671
11711
|
onManuallySetErrorMessage,
|
|
11672
11712
|
title,
|
|
11673
|
-
|
|
11713
|
+
hasOverriddenValue,
|
|
11714
|
+
onResetOverriddenValue
|
|
11674
11715
|
},
|
|
11675
11716
|
innerProps
|
|
11676
11717
|
};
|
|
@@ -11685,7 +11726,8 @@ var ParameterShell = ({
|
|
|
11685
11726
|
errorTestId,
|
|
11686
11727
|
captionTestId,
|
|
11687
11728
|
menuItems,
|
|
11688
|
-
|
|
11729
|
+
hasOverriddenValue,
|
|
11730
|
+
onResetOverriddenValue,
|
|
11689
11731
|
title,
|
|
11690
11732
|
children,
|
|
11691
11733
|
...props
|
|
@@ -11714,10 +11756,10 @@ var ParameterShell = ({
|
|
|
11714
11756
|
errorMessage: errorMessaging,
|
|
11715
11757
|
onManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
11716
11758
|
},
|
|
11717
|
-
children:
|
|
11759
|
+
children: /* @__PURE__ */ jsxs49(ParameterShellPlaceholder, { children: [
|
|
11718
11760
|
children,
|
|
11719
|
-
|
|
11720
|
-
] })
|
|
11761
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ jsx71(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
11762
|
+
] })
|
|
11721
11763
|
}
|
|
11722
11764
|
)
|
|
11723
11765
|
] }),
|
|
@@ -11725,13 +11767,10 @@ var ParameterShell = ({
|
|
|
11725
11767
|
errorMessaging ? /* @__PURE__ */ jsx71(ErrorMessage, { message: errorMessaging, testId: errorTestId }) : null
|
|
11726
11768
|
] });
|
|
11727
11769
|
};
|
|
11728
|
-
var ParameterShellPlaceholder = ({
|
|
11729
|
-
return /* @__PURE__ */
|
|
11730
|
-
/* @__PURE__ */ jsx71("p", { css: emptyParameterShellText, children: "Use component swap to replace with a parameter slot component" }),
|
|
11731
|
-
hasOverridingParams ? /* @__PURE__ */ jsx71(ParameterOverrideMarker, {}) : null
|
|
11732
|
-
] });
|
|
11770
|
+
var ParameterShellPlaceholder = ({ children }) => {
|
|
11771
|
+
return /* @__PURE__ */ jsx71("div", { css: emptyParameterShell, children });
|
|
11733
11772
|
};
|
|
11734
|
-
var ParameterOverrideMarker = () => /* @__PURE__ */ jsx71(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx71("
|
|
11773
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ jsx71(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ jsx71("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ jsx71("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
11735
11774
|
|
|
11736
11775
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
11737
11776
|
import { Fragment as Fragment10, jsx as jsx72, jsxs as jsxs50 } from "@emotion/react/jsx-runtime";
|
|
@@ -11771,29 +11810,25 @@ var BrokenImage = ({ ...props }) => {
|
|
|
11771
11810
|
};
|
|
11772
11811
|
var ParameterImageInner = forwardRef9(
|
|
11773
11812
|
({ ...props }, ref) => {
|
|
11813
|
+
const { value } = props;
|
|
11774
11814
|
const { id, label, hiddenLabel, errorMessage, onManuallySetErrorMessage } = useParameterShell();
|
|
11775
|
-
const [imageSrc, setImageSrc] = useState8();
|
|
11776
11815
|
const [loading, setLoading] = useState8(false);
|
|
11777
|
-
const deferredValue = useDeferredValue(
|
|
11816
|
+
const deferredValue = useDeferredValue(value);
|
|
11778
11817
|
const errorText = "The text you provided is not a valid URL";
|
|
11779
|
-
const updateImageSrc = useCallback2(
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
new URL(e.currentTarget.value);
|
|
11785
|
-
setImageSrc(e.currentTarget.value);
|
|
11786
|
-
}
|
|
11787
|
-
message = void 0;
|
|
11788
|
-
} catch (e2) {
|
|
11789
|
-
message = errorText;
|
|
11790
|
-
}
|
|
11791
|
-
if (onManuallySetErrorMessage) {
|
|
11792
|
-
onManuallySetErrorMessage(message);
|
|
11818
|
+
const updateImageSrc = useCallback2(() => {
|
|
11819
|
+
let message = void 0;
|
|
11820
|
+
try {
|
|
11821
|
+
if (value !== "") {
|
|
11822
|
+
new URL(value);
|
|
11793
11823
|
}
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11824
|
+
message = void 0;
|
|
11825
|
+
} catch (e) {
|
|
11826
|
+
message = errorText;
|
|
11827
|
+
}
|
|
11828
|
+
if (onManuallySetErrorMessage) {
|
|
11829
|
+
onManuallySetErrorMessage(message);
|
|
11830
|
+
}
|
|
11831
|
+
}, [onManuallySetErrorMessage, value]);
|
|
11797
11832
|
const handleLoadEvent = () => {
|
|
11798
11833
|
if (deferredValue) {
|
|
11799
11834
|
setLoading(true);
|
|
@@ -11808,6 +11843,9 @@ var ParameterImageInner = forwardRef9(
|
|
|
11808
11843
|
onManuallySetErrorMessage(errorText);
|
|
11809
11844
|
}
|
|
11810
11845
|
};
|
|
11846
|
+
useEffect7(() => {
|
|
11847
|
+
updateImageSrc();
|
|
11848
|
+
}, [value]);
|
|
11811
11849
|
return /* @__PURE__ */ jsxs50(Fragment10, { children: [
|
|
11812
11850
|
/* @__PURE__ */ jsx72(
|
|
11813
11851
|
"input",
|
|
@@ -11818,7 +11856,6 @@ var ParameterImageInner = forwardRef9(
|
|
|
11818
11856
|
ref,
|
|
11819
11857
|
"aria-label": hiddenLabel ? label : void 0,
|
|
11820
11858
|
autoComplete: "off",
|
|
11821
|
-
onChange: (e) => updateImageSrc(e),
|
|
11822
11859
|
...props
|
|
11823
11860
|
}
|
|
11824
11861
|
),
|
|
@@ -11830,8 +11867,6 @@ var ParameterImageInner = forwardRef9(
|
|
|
11830
11867
|
css: img,
|
|
11831
11868
|
onLoad: handleLoadEvent,
|
|
11832
11869
|
onError: handleErrorEvent,
|
|
11833
|
-
width: 214,
|
|
11834
|
-
height: 214,
|
|
11835
11870
|
loading: "lazy"
|
|
11836
11871
|
}
|
|
11837
11872
|
) : null,
|
|
@@ -12132,19 +12167,65 @@ var ParameterToggleInner = forwardRef15(
|
|
|
12132
12167
|
}
|
|
12133
12168
|
);
|
|
12134
12169
|
|
|
12170
|
+
// src/components/Popover/Popover.tsx
|
|
12171
|
+
import {
|
|
12172
|
+
Popover as ReakitPopover,
|
|
12173
|
+
PopoverDisclosure,
|
|
12174
|
+
usePopoverState
|
|
12175
|
+
} from "reakit/Popover";
|
|
12176
|
+
import { Portal as Portal2 } from "reakit/Portal";
|
|
12177
|
+
|
|
12178
|
+
// src/components/Popover/Popover.styles.ts
|
|
12179
|
+
import { css as css57 } from "@emotion/react";
|
|
12180
|
+
var PopoverBtn = css57`
|
|
12181
|
+
border: none;
|
|
12182
|
+
background: none;
|
|
12183
|
+
padding: 0;
|
|
12184
|
+
`;
|
|
12185
|
+
var Popover = css57`
|
|
12186
|
+
border-left: var(--spacing-xs) solid var(--brand-secondary-3);
|
|
12187
|
+
border-radius: var(--rounded-base);
|
|
12188
|
+
box-shadow: var(--shadow-base);
|
|
12189
|
+
background: var(--white);
|
|
12190
|
+
display: grid;
|
|
12191
|
+
gap: var(--spacing-sm);
|
|
12192
|
+
padding: var(--spacing-sm);
|
|
12193
|
+
font-size: var(--fs-sm);
|
|
12194
|
+
max-width: 220px;
|
|
12195
|
+
`;
|
|
12196
|
+
|
|
12197
|
+
// src/components/Popover/Popover.tsx
|
|
12198
|
+
import { Fragment as Fragment13, jsx as jsx80, jsxs as jsxs56 } from "@emotion/react/jsx-runtime";
|
|
12199
|
+
var Popover2 = ({
|
|
12200
|
+
iconColor = "green",
|
|
12201
|
+
buttonText,
|
|
12202
|
+
ariaLabel,
|
|
12203
|
+
placement = "bottom",
|
|
12204
|
+
children
|
|
12205
|
+
}) => {
|
|
12206
|
+
const popover = usePopoverState({ placement });
|
|
12207
|
+
return /* @__PURE__ */ jsxs56(Fragment13, { children: [
|
|
12208
|
+
/* @__PURE__ */ jsxs56(PopoverDisclosure, { ...popover, css: PopoverBtn, title: buttonText, children: [
|
|
12209
|
+
/* @__PURE__ */ jsx80(Icon, { icon: "info", iconColor, size: "1rem" }),
|
|
12210
|
+
/* @__PURE__ */ jsx80("span", { hidden: true, children: buttonText })
|
|
12211
|
+
] }),
|
|
12212
|
+
/* @__PURE__ */ jsx80(Portal2, { children: /* @__PURE__ */ jsx80(ReakitPopover, { css: Popover, ...popover, "aria-label": ariaLabel, children }) })
|
|
12213
|
+
] });
|
|
12214
|
+
};
|
|
12215
|
+
|
|
12135
12216
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
12136
|
-
import { css as
|
|
12217
|
+
import { css as css58, keyframes as keyframes4 } from "@emotion/react";
|
|
12137
12218
|
var lightFadingOut = keyframes4`
|
|
12138
12219
|
from { opacity: 0.1; }
|
|
12139
12220
|
to { opacity: 0.025; }
|
|
12140
12221
|
`;
|
|
12141
|
-
var skeletonStyles =
|
|
12222
|
+
var skeletonStyles = css58`
|
|
12142
12223
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
12143
12224
|
background-color: var(--gray-900);
|
|
12144
12225
|
`;
|
|
12145
12226
|
|
|
12146
12227
|
// src/components/Skeleton/Skeleton.tsx
|
|
12147
|
-
import { jsx as
|
|
12228
|
+
import { jsx as jsx81 } from "@emotion/react/jsx-runtime";
|
|
12148
12229
|
var Skeleton = ({
|
|
12149
12230
|
width = "100%",
|
|
12150
12231
|
height = "1.25rem",
|
|
@@ -12152,7 +12233,7 @@ var Skeleton = ({
|
|
|
12152
12233
|
circle = false,
|
|
12153
12234
|
children,
|
|
12154
12235
|
...otherProps
|
|
12155
|
-
}) => /* @__PURE__ */
|
|
12236
|
+
}) => /* @__PURE__ */ jsx81(
|
|
12156
12237
|
"div",
|
|
12157
12238
|
{
|
|
12158
12239
|
css: [
|
|
@@ -12172,11 +12253,11 @@ var Skeleton = ({
|
|
|
12172
12253
|
);
|
|
12173
12254
|
|
|
12174
12255
|
// src/components/Switch/Switch.tsx
|
|
12175
|
-
import * as
|
|
12256
|
+
import * as React15 from "react";
|
|
12176
12257
|
|
|
12177
12258
|
// src/components/Switch/Switch.styles.ts
|
|
12178
|
-
import { css as
|
|
12179
|
-
var SwitchInputContainer =
|
|
12259
|
+
import { css as css59 } from "@emotion/react";
|
|
12260
|
+
var SwitchInputContainer = css59`
|
|
12180
12261
|
cursor: pointer;
|
|
12181
12262
|
display: inline-block;
|
|
12182
12263
|
position: relative;
|
|
@@ -12185,7 +12266,7 @@ var SwitchInputContainer = css58`
|
|
|
12185
12266
|
vertical-align: middle;
|
|
12186
12267
|
user-select: none;
|
|
12187
12268
|
`;
|
|
12188
|
-
var SwitchInput =
|
|
12269
|
+
var SwitchInput = css59`
|
|
12189
12270
|
appearance: none;
|
|
12190
12271
|
border-radius: var(--rounded-full);
|
|
12191
12272
|
background-color: var(--white);
|
|
@@ -12223,7 +12304,7 @@ var SwitchInput = css58`
|
|
|
12223
12304
|
cursor: not-allowed;
|
|
12224
12305
|
}
|
|
12225
12306
|
`;
|
|
12226
|
-
var SwitchInputDisabled =
|
|
12307
|
+
var SwitchInputDisabled = css59`
|
|
12227
12308
|
opacity: var(--opacity-50);
|
|
12228
12309
|
cursor: not-allowed;
|
|
12229
12310
|
|
|
@@ -12231,7 +12312,7 @@ var SwitchInputDisabled = css58`
|
|
|
12231
12312
|
cursor: not-allowed;
|
|
12232
12313
|
}
|
|
12233
12314
|
`;
|
|
12234
|
-
var SwitchInputLabel =
|
|
12315
|
+
var SwitchInputLabel = css59`
|
|
12235
12316
|
align-items: center;
|
|
12236
12317
|
color: var(--brand-secondary-1);
|
|
12237
12318
|
display: inline-flex;
|
|
@@ -12253,98 +12334,98 @@ var SwitchInputLabel = css58`
|
|
|
12253
12334
|
top: 0;
|
|
12254
12335
|
}
|
|
12255
12336
|
`;
|
|
12256
|
-
var SwitchText =
|
|
12337
|
+
var SwitchText = css59`
|
|
12257
12338
|
color: var(--gray-500);
|
|
12258
12339
|
font-size: var(--fs-sm);
|
|
12259
12340
|
padding-inline: var(--spacing-2xl) 0;
|
|
12260
12341
|
`;
|
|
12261
12342
|
|
|
12262
12343
|
// src/components/Switch/Switch.tsx
|
|
12263
|
-
import { Fragment as
|
|
12264
|
-
var Switch =
|
|
12344
|
+
import { Fragment as Fragment14, jsx as jsx82, jsxs as jsxs57 } from "@emotion/react/jsx-runtime";
|
|
12345
|
+
var Switch = React15.forwardRef(
|
|
12265
12346
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
12266
12347
|
let additionalText = infoText;
|
|
12267
12348
|
if (infoText && toggleText) {
|
|
12268
12349
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
12269
12350
|
}
|
|
12270
|
-
return /* @__PURE__ */
|
|
12271
|
-
/* @__PURE__ */
|
|
12272
|
-
/* @__PURE__ */
|
|
12273
|
-
/* @__PURE__ */
|
|
12351
|
+
return /* @__PURE__ */ jsxs57(Fragment14, { children: [
|
|
12352
|
+
/* @__PURE__ */ jsxs57("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
12353
|
+
/* @__PURE__ */ jsx82("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
12354
|
+
/* @__PURE__ */ jsx82("span", { css: SwitchInputLabel, children: label })
|
|
12274
12355
|
] }),
|
|
12275
|
-
additionalText ? /* @__PURE__ */
|
|
12356
|
+
additionalText ? /* @__PURE__ */ jsx82("p", { css: SwitchText, children: additionalText }) : null,
|
|
12276
12357
|
children
|
|
12277
12358
|
] });
|
|
12278
12359
|
}
|
|
12279
12360
|
);
|
|
12280
12361
|
|
|
12281
12362
|
// src/components/Table/Table.tsx
|
|
12282
|
-
import * as
|
|
12363
|
+
import * as React16 from "react";
|
|
12283
12364
|
|
|
12284
12365
|
// src/components/Table/Table.styles.ts
|
|
12285
|
-
import { css as
|
|
12286
|
-
var table =
|
|
12366
|
+
import { css as css60 } from "@emotion/react";
|
|
12367
|
+
var table = css60`
|
|
12287
12368
|
border-bottom: 1px solid var(--gray-400);
|
|
12288
12369
|
border-collapse: collapse;
|
|
12289
12370
|
min-width: 100%;
|
|
12290
12371
|
table-layout: auto;
|
|
12291
12372
|
`;
|
|
12292
|
-
var tableHead =
|
|
12373
|
+
var tableHead = css60`
|
|
12293
12374
|
background: var(--gray-100);
|
|
12294
12375
|
color: var(--brand-secondary-1);
|
|
12295
12376
|
text-align: left;
|
|
12296
12377
|
`;
|
|
12297
|
-
var tableRow =
|
|
12378
|
+
var tableRow = css60`
|
|
12298
12379
|
border-bottom: 1px solid var(--gray-200);
|
|
12299
12380
|
`;
|
|
12300
|
-
var tableCellHead =
|
|
12381
|
+
var tableCellHead = css60`
|
|
12301
12382
|
font-size: var(--fs-sm);
|
|
12302
12383
|
padding: var(--spacing-base) var(--spacing-md);
|
|
12303
12384
|
text-transform: uppercase;
|
|
12304
12385
|
font-weight: var(--fw-bold);
|
|
12305
12386
|
`;
|
|
12306
|
-
var tableCellData =
|
|
12387
|
+
var tableCellData = css60`
|
|
12307
12388
|
padding: var(--spacing-base) var(--spacing-md);
|
|
12308
12389
|
`;
|
|
12309
12390
|
|
|
12310
12391
|
// src/components/Table/Table.tsx
|
|
12311
|
-
import { jsx as
|
|
12312
|
-
var Table =
|
|
12313
|
-
return /* @__PURE__ */
|
|
12392
|
+
import { jsx as jsx83 } from "@emotion/react/jsx-runtime";
|
|
12393
|
+
var Table = React16.forwardRef(({ children, ...otherProps }, ref) => {
|
|
12394
|
+
return /* @__PURE__ */ jsx83("table", { ref, css: table, ...otherProps, children });
|
|
12314
12395
|
});
|
|
12315
|
-
var TableHead =
|
|
12396
|
+
var TableHead = React16.forwardRef(
|
|
12316
12397
|
({ children, ...otherProps }, ref) => {
|
|
12317
|
-
return /* @__PURE__ */
|
|
12398
|
+
return /* @__PURE__ */ jsx83("thead", { ref, css: tableHead, ...otherProps, children });
|
|
12318
12399
|
}
|
|
12319
12400
|
);
|
|
12320
|
-
var TableBody =
|
|
12401
|
+
var TableBody = React16.forwardRef(
|
|
12321
12402
|
({ children, ...otherProps }, ref) => {
|
|
12322
|
-
return /* @__PURE__ */
|
|
12403
|
+
return /* @__PURE__ */ jsx83("tbody", { ref, ...otherProps, children });
|
|
12323
12404
|
}
|
|
12324
12405
|
);
|
|
12325
|
-
var TableFoot =
|
|
12406
|
+
var TableFoot = React16.forwardRef(
|
|
12326
12407
|
({ children, ...otherProps }, ref) => {
|
|
12327
|
-
return /* @__PURE__ */
|
|
12408
|
+
return /* @__PURE__ */ jsx83("tfoot", { ref, ...otherProps, children });
|
|
12328
12409
|
}
|
|
12329
12410
|
);
|
|
12330
|
-
var TableRow =
|
|
12411
|
+
var TableRow = React16.forwardRef(
|
|
12331
12412
|
({ children, ...otherProps }, ref) => {
|
|
12332
|
-
return /* @__PURE__ */
|
|
12413
|
+
return /* @__PURE__ */ jsx83("tr", { ref, css: tableRow, ...otherProps, children });
|
|
12333
12414
|
}
|
|
12334
12415
|
);
|
|
12335
|
-
var TableCellHead =
|
|
12416
|
+
var TableCellHead = React16.forwardRef(
|
|
12336
12417
|
({ children, ...otherProps }, ref) => {
|
|
12337
|
-
return /* @__PURE__ */
|
|
12418
|
+
return /* @__PURE__ */ jsx83("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
12338
12419
|
}
|
|
12339
12420
|
);
|
|
12340
|
-
var TableCellData =
|
|
12421
|
+
var TableCellData = React16.forwardRef(
|
|
12341
12422
|
({ children, ...otherProps }, ref) => {
|
|
12342
|
-
return /* @__PURE__ */
|
|
12423
|
+
return /* @__PURE__ */ jsx83("td", { ref, css: tableCellData, ...otherProps, children });
|
|
12343
12424
|
}
|
|
12344
12425
|
);
|
|
12345
12426
|
|
|
12346
12427
|
// src/components/Tabs/Tabs.tsx
|
|
12347
|
-
import { createContext as
|
|
12428
|
+
import { createContext as createContext6, useContext as useContext7, useEffect as useEffect8, useMemo as useMemo2 } from "react";
|
|
12348
12429
|
import {
|
|
12349
12430
|
Tab as ReakitTab,
|
|
12350
12431
|
TabList as ReakitTabList,
|
|
@@ -12353,8 +12434,8 @@ import {
|
|
|
12353
12434
|
} from "reakit/Tab";
|
|
12354
12435
|
|
|
12355
12436
|
// src/components/Tabs/Tabs.styles.ts
|
|
12356
|
-
import { css as
|
|
12357
|
-
var tabButtonStyles =
|
|
12437
|
+
import { css as css61 } from "@emotion/react";
|
|
12438
|
+
var tabButtonStyles = css61`
|
|
12358
12439
|
align-items: center;
|
|
12359
12440
|
border: 0;
|
|
12360
12441
|
height: 2.5rem;
|
|
@@ -12371,17 +12452,17 @@ var tabButtonStyles = css60`
|
|
|
12371
12452
|
-webkit-text-stroke-width: thin;
|
|
12372
12453
|
}
|
|
12373
12454
|
`;
|
|
12374
|
-
var tabButtonGroupStyles =
|
|
12455
|
+
var tabButtonGroupStyles = css61`
|
|
12375
12456
|
display: flex;
|
|
12376
12457
|
gap: var(--spacing-base);
|
|
12377
12458
|
border-bottom: 1px solid var(--gray-300);
|
|
12378
12459
|
`;
|
|
12379
12460
|
|
|
12380
12461
|
// src/components/Tabs/Tabs.tsx
|
|
12381
|
-
import { jsx as
|
|
12382
|
-
var CurrentTabContext =
|
|
12462
|
+
import { jsx as jsx84 } from "@emotion/react/jsx-runtime";
|
|
12463
|
+
var CurrentTabContext = createContext6(null);
|
|
12383
12464
|
var useCurrentTab = () => {
|
|
12384
|
-
const context =
|
|
12465
|
+
const context = useContext7(CurrentTabContext);
|
|
12385
12466
|
if (!context) {
|
|
12386
12467
|
throw new Error("This component can only be used inside <Tabs>");
|
|
12387
12468
|
}
|
|
@@ -12394,7 +12475,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
12394
12475
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
12395
12476
|
}, [selectedId, useHashForState]);
|
|
12396
12477
|
const tab = useTabState({ ...props, selectedId: selected });
|
|
12397
|
-
|
|
12478
|
+
useEffect8(() => {
|
|
12398
12479
|
var _a;
|
|
12399
12480
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
12400
12481
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -12402,29 +12483,29 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
12402
12483
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
12403
12484
|
}
|
|
12404
12485
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
12405
|
-
|
|
12486
|
+
useEffect8(() => {
|
|
12406
12487
|
if (selected && selected !== tab.selectedId) {
|
|
12407
12488
|
tab.setSelectedId(selected);
|
|
12408
12489
|
}
|
|
12409
12490
|
}, [selected]);
|
|
12410
|
-
return /* @__PURE__ */
|
|
12491
|
+
return /* @__PURE__ */ jsx84(CurrentTabContext.Provider, { value: tab, children });
|
|
12411
12492
|
};
|
|
12412
12493
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
12413
12494
|
const currentTab = useCurrentTab();
|
|
12414
|
-
return /* @__PURE__ */
|
|
12495
|
+
return /* @__PURE__ */ jsx84(ReakitTabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
12415
12496
|
};
|
|
12416
12497
|
var TabButton = ({ children, id, ...props }) => {
|
|
12417
12498
|
const currentTab = useCurrentTab();
|
|
12418
|
-
return /* @__PURE__ */
|
|
12499
|
+
return /* @__PURE__ */ jsx84(ReakitTab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
12419
12500
|
};
|
|
12420
12501
|
var TabContent = ({ children, ...props }) => {
|
|
12421
12502
|
const currentTab = useCurrentTab();
|
|
12422
|
-
return /* @__PURE__ */
|
|
12503
|
+
return /* @__PURE__ */ jsx84(ReakitTabPanel, { ...props, ...currentTab, children });
|
|
12423
12504
|
};
|
|
12424
12505
|
|
|
12425
12506
|
// src/components/Validation/StatusBullet.styles.ts
|
|
12426
|
-
import { css as
|
|
12427
|
-
var StatusBulletContainer =
|
|
12507
|
+
import { css as css62 } from "@emotion/react";
|
|
12508
|
+
var StatusBulletContainer = css62`
|
|
12428
12509
|
align-items: center;
|
|
12429
12510
|
align-self: center;
|
|
12430
12511
|
color: var(--gray-500);
|
|
@@ -12444,19 +12525,19 @@ var StatusBulletContainer = css61`
|
|
|
12444
12525
|
height: var(--fs-xs);
|
|
12445
12526
|
}
|
|
12446
12527
|
`;
|
|
12447
|
-
var StatusDraft =
|
|
12528
|
+
var StatusDraft = css62`
|
|
12448
12529
|
&:before {
|
|
12449
12530
|
background: var(--white);
|
|
12450
12531
|
box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
|
|
12451
12532
|
}
|
|
12452
12533
|
`;
|
|
12453
|
-
var StatusModified =
|
|
12534
|
+
var StatusModified = css62`
|
|
12454
12535
|
&:before {
|
|
12455
12536
|
background: linear-gradient(to right, var(--white) 50%, var(--brand-primary-1) 50% 100%);
|
|
12456
12537
|
box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
|
|
12457
12538
|
}
|
|
12458
12539
|
`;
|
|
12459
|
-
var StatusError =
|
|
12540
|
+
var StatusError = css62`
|
|
12460
12541
|
color: var(--error);
|
|
12461
12542
|
&:before {
|
|
12462
12543
|
background: var(--error);
|
|
@@ -12472,19 +12553,19 @@ var StatusError = css61`
|
|
|
12472
12553
|
rotate: -45deg;
|
|
12473
12554
|
}
|
|
12474
12555
|
`;
|
|
12475
|
-
var StatusPublished =
|
|
12556
|
+
var StatusPublished = css62`
|
|
12476
12557
|
&:before {
|
|
12477
12558
|
background: var(--brand-secondary-3);
|
|
12478
12559
|
}
|
|
12479
12560
|
`;
|
|
12480
|
-
var StatusOrphan =
|
|
12561
|
+
var StatusOrphan = css62`
|
|
12481
12562
|
&:before {
|
|
12482
12563
|
background: var(--brand-secondary-5);
|
|
12483
12564
|
}
|
|
12484
12565
|
`;
|
|
12485
12566
|
|
|
12486
12567
|
// src/components/Validation/StatusBullet.tsx
|
|
12487
|
-
import { jsx as
|
|
12568
|
+
import { jsx as jsx85 } from "@emotion/react/jsx-runtime";
|
|
12488
12569
|
var StatusBullet = ({ status, hideText = false, message, ...props }) => {
|
|
12489
12570
|
const currentStateStyles = {
|
|
12490
12571
|
Error: StatusError,
|
|
@@ -12494,7 +12575,7 @@ var StatusBullet = ({ status, hideText = false, message, ...props }) => {
|
|
|
12494
12575
|
Published: StatusPublished,
|
|
12495
12576
|
Draft: StatusDraft
|
|
12496
12577
|
};
|
|
12497
|
-
return /* @__PURE__ */
|
|
12578
|
+
return /* @__PURE__ */ jsx85(
|
|
12498
12579
|
"span",
|
|
12499
12580
|
{
|
|
12500
12581
|
css: [StatusBulletContainer, currentStateStyles[status]],
|
|
@@ -12584,6 +12665,7 @@ export {
|
|
|
12584
12665
|
ParameterTextareaInner,
|
|
12585
12666
|
ParameterToggle,
|
|
12586
12667
|
ParameterToggleInner,
|
|
12668
|
+
Popover2 as Popover,
|
|
12587
12669
|
ResolveIcon,
|
|
12588
12670
|
ScrollableList,
|
|
12589
12671
|
ScrollableListInputItem,
|
|
@@ -12641,6 +12723,7 @@ export {
|
|
|
12641
12723
|
skeletonLoading,
|
|
12642
12724
|
supports,
|
|
12643
12725
|
useBreakpoint,
|
|
12726
|
+
useCurrentDrawerRenderer,
|
|
12644
12727
|
useCurrentTab,
|
|
12645
12728
|
useDrawer,
|
|
12646
12729
|
useIconContext,
|