@wistia/ui 0.6.43 → 0.6.45-beta.2edb41a9.b87a21e
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/index.cjs +462 -441
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.mjs +485 -464
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.45-beta.2edb41a9.b87a21e
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2109,6 +2109,10 @@ var isValidRef = (value) => {
|
|
|
2109
2109
|
return (0, import_type_guards7.isNotNil)(value) && (0, import_type_guards7.isRecord)(value) && "current" in value;
|
|
2110
2110
|
};
|
|
2111
2111
|
|
|
2112
|
+
// src/private/helpers/noOpFn/noOpFn.ts
|
|
2113
|
+
var noOpFn = () => {
|
|
2114
|
+
};
|
|
2115
|
+
|
|
2112
2116
|
// src/private/hooks/useEvent/useEvent.ts
|
|
2113
2117
|
var isEventTargetSupported = (eventTarget) => (
|
|
2114
2118
|
// @ts-expect-error the compiler thinks that addEventListener may not exist on eventTarget, but we still need to check it.
|
|
@@ -2133,8 +2137,7 @@ var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}
|
|
|
2133
2137
|
if (savedEventHandler.current !== void 0) {
|
|
2134
2138
|
return savedEventHandler.current(event);
|
|
2135
2139
|
}
|
|
2136
|
-
return
|
|
2137
|
-
};
|
|
2140
|
+
return noOpFn;
|
|
2138
2141
|
};
|
|
2139
2142
|
target.addEventListener(eventName, eventListener, savedEventOptions.current);
|
|
2140
2143
|
return () => {
|
|
@@ -2208,8 +2211,7 @@ var useLockBodyScroll = (locked) => {
|
|
|
2208
2211
|
document.body.style.overflow = originalStyle;
|
|
2209
2212
|
};
|
|
2210
2213
|
}
|
|
2211
|
-
return
|
|
2212
|
-
};
|
|
2214
|
+
return noOpFn;
|
|
2213
2215
|
}, [locked]);
|
|
2214
2216
|
};
|
|
2215
2217
|
|
|
@@ -7384,30 +7386,101 @@ ActionButton.displayName = "ActionButton";
|
|
|
7384
7386
|
|
|
7385
7387
|
// src/components/Avatar/Avatar.tsx
|
|
7386
7388
|
var import_react18 = require("react");
|
|
7387
|
-
var
|
|
7388
|
-
var
|
|
7389
|
+
var import_type_guards18 = require("@wistia/type-guards");
|
|
7390
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
7389
7391
|
|
|
7390
|
-
// src/components/
|
|
7392
|
+
// src/components/Avatar/formatNameForDisplay.tsx
|
|
7393
|
+
var import_type_guards16 = require("@wistia/type-guards");
|
|
7394
|
+
var containsEmojiCharacter = (char) => {
|
|
7395
|
+
const emojiRegex = /<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu;
|
|
7396
|
+
return emojiRegex.test(char);
|
|
7397
|
+
};
|
|
7398
|
+
var formatNameForDisplay = (name) => {
|
|
7399
|
+
if ((0, import_type_guards16.isNil)(name) || !(0, import_type_guards16.isString)(name) || (0, import_type_guards16.isEmptyString)(name) || containsEmojiCharacter(name)) {
|
|
7400
|
+
return "U";
|
|
7401
|
+
}
|
|
7402
|
+
const firstChar = name.trim().substring(0, 1);
|
|
7403
|
+
return firstChar.toUpperCase();
|
|
7404
|
+
};
|
|
7405
|
+
|
|
7406
|
+
// src/components/Image/Image.tsx
|
|
7391
7407
|
var import_styled_components22 = __toESM(require("styled-components"));
|
|
7408
|
+
var import_type_guards17 = require("@wistia/type-guards");
|
|
7392
7409
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
7393
|
-
var
|
|
7394
|
-
"
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
"
|
|
7398
|
-
|
|
7399
|
-
|
|
7410
|
+
var getFillStyle = (fillContainer) => {
|
|
7411
|
+
if (fillContainer === "horizontal") {
|
|
7412
|
+
return "width: 100%;";
|
|
7413
|
+
}
|
|
7414
|
+
if (fillContainer === "vertical") {
|
|
7415
|
+
return "height: 100%;";
|
|
7416
|
+
}
|
|
7417
|
+
if (fillContainer === true) {
|
|
7418
|
+
return `
|
|
7419
|
+
width: 100%;
|
|
7420
|
+
height: 100%;
|
|
7421
|
+
`;
|
|
7422
|
+
}
|
|
7423
|
+
return void 0;
|
|
7424
|
+
};
|
|
7425
|
+
var StyledImage = import_styled_components22.default.img`
|
|
7426
|
+
border-radius: ${({ $borderRadius }) => (0, import_type_guards17.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
7427
|
+
${({ $fillContainer }) => getFillStyle($fillContainer)};
|
|
7428
|
+
object-fit: ${({ $objFit }) => $objFit};
|
|
7429
|
+
object-position: ${({ $objPosition }) => $objPosition};
|
|
7430
|
+
`;
|
|
7431
|
+
var Image = ({
|
|
7432
|
+
src,
|
|
7433
|
+
alt,
|
|
7434
|
+
borderRadius,
|
|
7435
|
+
fill: fillContainer = false,
|
|
7436
|
+
fit: objFit,
|
|
7437
|
+
loading = "lazy",
|
|
7438
|
+
position: objPosition,
|
|
7439
|
+
onLoad,
|
|
7440
|
+
onError,
|
|
7441
|
+
...props
|
|
7442
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
7443
|
+
StyledImage,
|
|
7444
|
+
{
|
|
7445
|
+
$borderRadius: borderRadius,
|
|
7446
|
+
$fillContainer: fillContainer,
|
|
7447
|
+
$objFit: objFit,
|
|
7448
|
+
$objPosition: objPosition,
|
|
7449
|
+
alt,
|
|
7450
|
+
loading,
|
|
7451
|
+
onError,
|
|
7452
|
+
onLoad,
|
|
7453
|
+
src,
|
|
7454
|
+
...props
|
|
7455
|
+
}
|
|
7456
|
+
);
|
|
7457
|
+
Image.displayName = "Image";
|
|
7458
|
+
|
|
7459
|
+
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
7460
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
7461
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
7462
|
+
var defaultColorSchemeOptions = ["default", "inherit"];
|
|
7463
|
+
var semanticColorSchemeOptions = ["error", "info", "success", "warning"];
|
|
7464
|
+
var brandColorSchemeOptions = [
|
|
7400
7465
|
"blue",
|
|
7401
7466
|
"green",
|
|
7402
7467
|
"orange",
|
|
7403
7468
|
"pink",
|
|
7404
7469
|
"purple",
|
|
7405
|
-
"yellow"
|
|
7470
|
+
"yellow"
|
|
7471
|
+
];
|
|
7472
|
+
var vendorColorSchemeOptions = [
|
|
7406
7473
|
"vendor-hubspot",
|
|
7407
7474
|
"vendor-marketo",
|
|
7408
7475
|
"vendor-pardot"
|
|
7409
7476
|
];
|
|
7410
|
-
var
|
|
7477
|
+
var colorSchemeOptions = [
|
|
7478
|
+
...defaultColorSchemeOptions,
|
|
7479
|
+
...semanticColorSchemeOptions,
|
|
7480
|
+
...brandColorSchemeOptions,
|
|
7481
|
+
...vendorColorSchemeOptions
|
|
7482
|
+
];
|
|
7483
|
+
var StyledColorSchemeWrapper = import_styled_components23.default.div`
|
|
7411
7484
|
${({ $colorScheme, $nav }) => getColorScheme($nav ? "nav" : $colorScheme)};
|
|
7412
7485
|
`;
|
|
7413
7486
|
var ColorSchemeWrapper = ({
|
|
@@ -7415,7 +7488,7 @@ var ColorSchemeWrapper = ({
|
|
|
7415
7488
|
colorScheme = "inherit",
|
|
7416
7489
|
children,
|
|
7417
7490
|
...props
|
|
7418
|
-
}) => /* @__PURE__ */ (0,
|
|
7491
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7419
7492
|
StyledColorSchemeWrapper,
|
|
7420
7493
|
{
|
|
7421
7494
|
$colorScheme: colorScheme,
|
|
@@ -7426,86 +7499,91 @@ var ColorSchemeWrapper = ({
|
|
|
7426
7499
|
);
|
|
7427
7500
|
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
7428
7501
|
|
|
7429
|
-
// src/components/Avatar/formatNameForDisplay.tsx
|
|
7430
|
-
var import_type_guards16 = require("@wistia/type-guards");
|
|
7431
|
-
var containsEmojiCharacter = (char) => {
|
|
7432
|
-
const emojiRegex = /<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu;
|
|
7433
|
-
return emojiRegex.test(char);
|
|
7434
|
-
};
|
|
7435
|
-
var formatNameForDisplay = (name) => {
|
|
7436
|
-
if ((0, import_type_guards16.isNil)(name) || !(0, import_type_guards16.isString)(name) || (0, import_type_guards16.isEmptyString)(name) || containsEmojiCharacter(name)) {
|
|
7437
|
-
return "U";
|
|
7438
|
-
}
|
|
7439
|
-
const firstChar = name.trim().substring(0, 1);
|
|
7440
|
-
return firstChar.toUpperCase();
|
|
7441
|
-
};
|
|
7442
|
-
|
|
7443
7502
|
// src/components/Avatar/Avatar.tsx
|
|
7444
|
-
var
|
|
7445
|
-
var AvatarImage = import_styled_components23.default.img`
|
|
7446
|
-
align-items: center;
|
|
7447
|
-
background-color: white;
|
|
7448
|
-
border-radius: 50%;
|
|
7449
|
-
display: flex;
|
|
7450
|
-
height: ${({ $heightAndWidth }) => $heightAndWidth}px;
|
|
7451
|
-
justify-content: center;
|
|
7452
|
-
object-fit: cover;
|
|
7453
|
-
overflow: hidden;
|
|
7454
|
-
pointer-events: none;
|
|
7455
|
-
user-select: none;
|
|
7456
|
-
width: ${({ $heightAndWidth }) => $heightAndWidth}px;
|
|
7457
|
-
transition: box-shadow var(--wui-duration-01) var(--wui-motion-ease);
|
|
7458
|
-
|
|
7459
|
-
a:hover & {
|
|
7460
|
-
box-shadow: inset 0 0 0 2px rgb(0 0 0 / 25%);
|
|
7461
|
-
}
|
|
7462
|
-
|
|
7463
|
-
a:active & {
|
|
7464
|
-
box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);
|
|
7465
|
-
}
|
|
7466
|
-
`;
|
|
7503
|
+
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7467
7504
|
var avatarSizeMap = {
|
|
7468
7505
|
sm: 16,
|
|
7469
7506
|
md: 24,
|
|
7470
7507
|
lg: 32
|
|
7471
7508
|
};
|
|
7472
|
-
var
|
|
7473
|
-
|
|
7509
|
+
var Initial = ({ initial }) => /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7510
|
+
"svg",
|
|
7511
|
+
{
|
|
7512
|
+
"data-wui-avatar-initial": true,
|
|
7513
|
+
style: { width: "100%", height: "100%", color: "var(--wui-color-text-on-fill)" },
|
|
7514
|
+
viewBox: "0 0 24 24",
|
|
7515
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7516
|
+
children: [
|
|
7517
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7518
|
+
"path",
|
|
7519
|
+
{
|
|
7520
|
+
d: "M0 13.5h24",
|
|
7521
|
+
id: "P"
|
|
7522
|
+
}
|
|
7523
|
+
),
|
|
7524
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)("text", { children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7525
|
+
"textPath",
|
|
7526
|
+
{
|
|
7527
|
+
dominantBaseline: "middle",
|
|
7528
|
+
fill: "currentColor",
|
|
7529
|
+
fontSize: "16px",
|
|
7530
|
+
href: "#P",
|
|
7531
|
+
startOffset: "50%",
|
|
7532
|
+
textAnchor: "middle",
|
|
7533
|
+
children: initial
|
|
7534
|
+
}
|
|
7535
|
+
) })
|
|
7536
|
+
]
|
|
7537
|
+
}
|
|
7538
|
+
);
|
|
7539
|
+
var AvatarWrapper = import_styled_components24.default.div`
|
|
7474
7540
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7475
|
-
|
|
7476
|
-
background-color: var(--wui-color-bg-fill);
|
|
7477
|
-
border: 1px solid var(--wui-color-border);
|
|
7478
|
-
border-radius: 50%;
|
|
7479
|
-
color: var(--wui-color-text-on-fill);
|
|
7480
|
-
display: flex;
|
|
7481
|
-
font-size: ${({ $heightAndWidth }) => $heightAndWidth * fontSizeScaleMultiplier}px;
|
|
7541
|
+
width: ${({ $heightAndWidth }) => $heightAndWidth}px;
|
|
7482
7542
|
height: ${({ $heightAndWidth }) => $heightAndWidth}px;
|
|
7483
|
-
|
|
7543
|
+
place-content: center;
|
|
7484
7544
|
overflow: hidden;
|
|
7485
|
-
|
|
7545
|
+
background-color: var(--wui-color-bg-fill);
|
|
7546
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
7547
|
+
display: grid;
|
|
7548
|
+
user-select: none;
|
|
7549
|
+
|
|
7550
|
+
> * {
|
|
7551
|
+
grid-area: 1 / 1;
|
|
7552
|
+
}
|
|
7553
|
+
|
|
7554
|
+
--wui-avatar-inset-opacity: 10%;
|
|
7486
7555
|
|
|
7487
|
-
|
|
7488
|
-
|
|
7556
|
+
outline: 2px solid rgb(0 0 0 / var(--wui-avatar-inset-opacity));
|
|
7557
|
+
outline-offset: -2px;
|
|
7558
|
+
|
|
7559
|
+
[data-wui-avatar-initial] {
|
|
7560
|
+
font-family: var(--wui-typography-family-default);
|
|
7561
|
+
font-weight: var(--wui-typography-weight-label-bold);
|
|
7562
|
+
padding: min(12.5%, 4px);
|
|
7489
7563
|
}
|
|
7490
7564
|
|
|
7491
|
-
|
|
7492
|
-
|
|
7565
|
+
&:only-child {
|
|
7566
|
+
a:hover & {
|
|
7567
|
+
--wui-avatar-inset-opacity: 20%;
|
|
7568
|
+
|
|
7569
|
+
background-color: var(--wui-color-bg-fill-hover);
|
|
7570
|
+
}
|
|
7571
|
+
|
|
7572
|
+
a:active & {
|
|
7573
|
+
--wui-avatar-inset-opacity: 30%;
|
|
7574
|
+
|
|
7575
|
+
background-color: var(--wui-color-bg-fill-active);
|
|
7576
|
+
}
|
|
7493
7577
|
}
|
|
7494
7578
|
`;
|
|
7495
|
-
var AvatarWrapper = import_styled_components23.default.div`
|
|
7496
|
-
max-height: ${({ $maxHeight }) => $maxHeight}px;
|
|
7497
|
-
`;
|
|
7498
7579
|
var chooseColorScheme = (name) => {
|
|
7499
|
-
if ((0,
|
|
7500
|
-
return "
|
|
7580
|
+
if ((0, import_type_guards18.isNil)(name) || name === "Anonymous") {
|
|
7581
|
+
return "blue";
|
|
7501
7582
|
}
|
|
7502
|
-
const filteredColors = colorSchemeOptions.filter(
|
|
7503
|
-
(color) => color !== "inherit" && color !== "default"
|
|
7504
|
-
);
|
|
7505
7583
|
const multiplier = 31;
|
|
7506
7584
|
const hashCode = (str) => Array.from(str).reduce((sum, char) => Math.imul(multiplier, sum) + char.charCodeAt(0) | 0, 0);
|
|
7507
|
-
const index = Math.abs(hashCode(name)) %
|
|
7508
|
-
return
|
|
7585
|
+
const index = Math.abs(hashCode(name)) % brandColorSchemeOptions.length;
|
|
7586
|
+
return brandColorSchemeOptions[index] ?? "blue";
|
|
7509
7587
|
};
|
|
7510
7588
|
var Avatar = ({
|
|
7511
7589
|
imageUrl,
|
|
@@ -7529,29 +7607,26 @@ var Avatar = ({
|
|
|
7529
7607
|
};
|
|
7530
7608
|
const avatarSize = heightAndWidth ?? avatarSizeMap[size];
|
|
7531
7609
|
const avatarColor = (0, import_react18.useMemo)(() => chooseColorScheme(name), [name]);
|
|
7532
|
-
|
|
7533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7534
7611
|
AvatarWrapper,
|
|
7535
7612
|
{
|
|
7613
|
+
$colorScheme: avatarColor,
|
|
7614
|
+
$heightAndWidth: avatarSize,
|
|
7536
7615
|
...props,
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
onLoad: handleImageLoad,
|
|
7552
|
-
src: imageUrl
|
|
7553
|
-
}
|
|
7554
|
-
)
|
|
7616
|
+
children: [
|
|
7617
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Initial, { initial: formatNameForDisplay(name) }),
|
|
7618
|
+
(0, import_type_guards18.isNotNil)(imageUrl) && imageLoadState !== "error" && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7619
|
+
Image,
|
|
7620
|
+
{
|
|
7621
|
+
alt: (0, import_type_guards18.isNotNil)(name) ? name : "",
|
|
7622
|
+
"data-state": imageLoadState,
|
|
7623
|
+
fit: "cover",
|
|
7624
|
+
onError: handleImageLoadError,
|
|
7625
|
+
onLoad: handleImageLoad,
|
|
7626
|
+
src: imageUrl
|
|
7627
|
+
}
|
|
7628
|
+
)
|
|
7629
|
+
]
|
|
7555
7630
|
}
|
|
7556
7631
|
);
|
|
7557
7632
|
};
|
|
@@ -7559,10 +7634,10 @@ Avatar.displayName = "Avatar";
|
|
|
7559
7634
|
|
|
7560
7635
|
// src/components/Badge/Badge.tsx
|
|
7561
7636
|
var import_react19 = require("react");
|
|
7562
|
-
var
|
|
7563
|
-
var
|
|
7564
|
-
var
|
|
7565
|
-
var StyledBadge =
|
|
7637
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
7638
|
+
var import_type_guards19 = require("@wistia/type-guards");
|
|
7639
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7640
|
+
var StyledBadge = import_styled_components25.default.div`
|
|
7566
7641
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7567
7642
|
align-items: center;
|
|
7568
7643
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -7584,8 +7659,8 @@ var StyledBadge = import_styled_components24.default.div`
|
|
|
7584
7659
|
`;
|
|
7585
7660
|
var Badge = (0, import_react19.forwardRef)(
|
|
7586
7661
|
({ colorScheme = "inherit", label, icon, ...props }, ref) => {
|
|
7587
|
-
const hasIcon = (0,
|
|
7588
|
-
return /* @__PURE__ */ (0,
|
|
7662
|
+
const hasIcon = (0, import_type_guards19.isNotNil)(icon);
|
|
7663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
7589
7664
|
StyledBadge,
|
|
7590
7665
|
{
|
|
7591
7666
|
ref,
|
|
@@ -7594,7 +7669,7 @@ var Badge = (0, import_react19.forwardRef)(
|
|
|
7594
7669
|
$hasIcon: hasIcon,
|
|
7595
7670
|
children: [
|
|
7596
7671
|
hasIcon ? icon : null,
|
|
7597
|
-
/* @__PURE__ */ (0,
|
|
7672
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)("span", { children: label })
|
|
7598
7673
|
]
|
|
7599
7674
|
}
|
|
7600
7675
|
);
|
|
@@ -7604,8 +7679,8 @@ Badge.displayName = "Badge";
|
|
|
7604
7679
|
|
|
7605
7680
|
// src/components/Box/Box.tsx
|
|
7606
7681
|
var import_react20 = require("react");
|
|
7607
|
-
var
|
|
7608
|
-
var
|
|
7682
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
7683
|
+
var import_type_guards20 = require("@wistia/type-guards");
|
|
7609
7684
|
|
|
7610
7685
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
7611
7686
|
var makePolymorphic = (component) => {
|
|
@@ -7613,11 +7688,11 @@ var makePolymorphic = (component) => {
|
|
|
7613
7688
|
};
|
|
7614
7689
|
|
|
7615
7690
|
// src/components/Box/Box.tsx
|
|
7616
|
-
var
|
|
7691
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7617
7692
|
var isDev = process.env["NODE_ENV"] === "development" || process.env["NODE_ENV"] === "test";
|
|
7618
7693
|
var getGapStyle = (gap) => {
|
|
7619
|
-
if ((0,
|
|
7620
|
-
if ((0,
|
|
7694
|
+
if ((0, import_type_guards20.isNotNil)(gap)) {
|
|
7695
|
+
if ((0, import_type_guards20.isRecord)(gap)) {
|
|
7621
7696
|
return Object.entries(gap).map(([key, value]) => {
|
|
7622
7697
|
return `${key}-gap: var(--wui-${value})};`;
|
|
7623
7698
|
}).join("");
|
|
@@ -7626,7 +7701,7 @@ var getGapStyle = (gap) => {
|
|
|
7626
7701
|
}
|
|
7627
7702
|
return void 0;
|
|
7628
7703
|
};
|
|
7629
|
-
var
|
|
7704
|
+
var getFillStyle2 = (fill) => {
|
|
7630
7705
|
if (fill === "horizontal") {
|
|
7631
7706
|
return "width: 100%;";
|
|
7632
7707
|
}
|
|
@@ -7661,41 +7736,41 @@ var getFlexStyle = (flexMode) => {
|
|
|
7661
7736
|
switch (flexMode) {
|
|
7662
7737
|
// grows to fill space, won't shrink, starts at 0
|
|
7663
7738
|
case "grow":
|
|
7664
|
-
return
|
|
7739
|
+
return import_styled_components26.css`
|
|
7665
7740
|
flex: 1 0 0;
|
|
7666
7741
|
`;
|
|
7667
7742
|
// default behavior, can shrink but won't grow
|
|
7668
7743
|
case "initial":
|
|
7669
|
-
return
|
|
7744
|
+
return import_styled_components26.css`
|
|
7670
7745
|
flex: 0 1 auto;
|
|
7671
7746
|
`;
|
|
7672
7747
|
// equal distribution of space
|
|
7673
7748
|
case "equal":
|
|
7674
|
-
return
|
|
7749
|
+
return import_styled_components26.css`
|
|
7675
7750
|
flex: 1;
|
|
7676
7751
|
`;
|
|
7677
7752
|
// won't grow or shrink
|
|
7678
7753
|
case "rigid":
|
|
7679
|
-
return
|
|
7754
|
+
return import_styled_components26.css`
|
|
7680
7755
|
flex: 0 0 auto;
|
|
7681
7756
|
`;
|
|
7682
7757
|
// can grow and shrink from content size
|
|
7683
7758
|
case "fluid":
|
|
7684
|
-
return
|
|
7759
|
+
return import_styled_components26.css`
|
|
7685
7760
|
flex: 1 1 auto;
|
|
7686
7761
|
`;
|
|
7687
7762
|
default:
|
|
7688
7763
|
return null;
|
|
7689
7764
|
}
|
|
7690
7765
|
};
|
|
7691
|
-
var StyledBoxComponent =
|
|
7766
|
+
var StyledBoxComponent = import_styled_components26.default.div`
|
|
7692
7767
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7693
7768
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
7694
7769
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
7695
|
-
display: ${({ $inline }) => (0,
|
|
7696
|
-
flex-basis: ${({ $basis }) => (0,
|
|
7770
|
+
display: ${({ $inline }) => (0, import_type_guards20.isNotNil)($inline) && $inline ? "inline-flex" : "flex"};
|
|
7771
|
+
flex-basis: ${({ $basis }) => (0, import_type_guards20.isNotNil)($basis) ? $basis : null};
|
|
7697
7772
|
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
7698
|
-
${({ $fillBox: fill }) =>
|
|
7773
|
+
${({ $fillBox: fill }) => getFillStyle2(fill)};
|
|
7699
7774
|
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
7700
7775
|
${({ $flexMode }) => getFlexStyle($flexMode)};
|
|
7701
7776
|
${({ $gap }) => getGapStyle($gap)};
|
|
@@ -7703,17 +7778,17 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7703
7778
|
width: ${({ $width }) => $width ?? null};
|
|
7704
7779
|
|
|
7705
7780
|
/* Box children styles */
|
|
7706
|
-
flex-grow: ${({ $grow }) => (0,
|
|
7707
|
-
flex-shrink: ${({ $shrink }) => (0,
|
|
7781
|
+
flex-grow: ${({ $grow }) => (0, import_type_guards20.isNotNil)($grow) ? $grow : null};
|
|
7782
|
+
flex-shrink: ${({ $shrink }) => (0, import_type_guards20.isNotNil)($shrink) ? $shrink : null};
|
|
7708
7783
|
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
7709
7784
|
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
7710
|
-
order: ${({ $order }) => (0,
|
|
7785
|
+
order: ${({ $order }) => (0, import_type_guards20.isNotNil)($order) ? $order : null};
|
|
7711
7786
|
`;
|
|
7712
7787
|
var wrapChildren = (children) => {
|
|
7713
|
-
if ((0,
|
|
7788
|
+
if ((0, import_type_guards20.isNotNil)(children)) {
|
|
7714
7789
|
if (typeof children === "object" && isDev) {
|
|
7715
7790
|
return import_react20.Children.map(children, (child) => {
|
|
7716
|
-
if ((0,
|
|
7791
|
+
if ((0, import_type_guards20.isNil)(child)) return null;
|
|
7717
7792
|
const elementParams = {};
|
|
7718
7793
|
if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
|
|
7719
7794
|
elementParams.hasBoxParent = true;
|
|
@@ -7751,7 +7826,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
|
|
|
7751
7826
|
flexMode,
|
|
7752
7827
|
...props
|
|
7753
7828
|
}, ref) => {
|
|
7754
|
-
if ((0,
|
|
7829
|
+
if ((0, import_type_guards20.isNotUndefined)(height)) {
|
|
7755
7830
|
if (fill === true || fill === "vertical") {
|
|
7756
7831
|
throw new Error('Cannot use height prop with fill="vertical" or fill={true}');
|
|
7757
7832
|
}
|
|
@@ -7761,7 +7836,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
|
|
|
7761
7836
|
);
|
|
7762
7837
|
}
|
|
7763
7838
|
}
|
|
7764
|
-
if ((0,
|
|
7839
|
+
if ((0, import_type_guards20.isNotUndefined)(width)) {
|
|
7765
7840
|
if (fill === true || fill === "horizontal") {
|
|
7766
7841
|
throw new Error('Cannot use width prop with fill="horizontal" or fill={true}');
|
|
7767
7842
|
}
|
|
@@ -7771,7 +7846,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
|
|
|
7771
7846
|
);
|
|
7772
7847
|
}
|
|
7773
7848
|
}
|
|
7774
|
-
return /* @__PURE__ */ (0,
|
|
7849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
7775
7850
|
StyledBoxComponent,
|
|
7776
7851
|
{
|
|
7777
7852
|
ref,
|
|
@@ -7804,9 +7879,9 @@ var Box = makePolymorphic(BoxComponent);
|
|
|
7804
7879
|
|
|
7805
7880
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
7806
7881
|
var import_react21 = require("react");
|
|
7807
|
-
var
|
|
7808
|
-
var
|
|
7809
|
-
var StyledBreadcrumbs =
|
|
7882
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
7883
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
7884
|
+
var StyledBreadcrumbs = import_styled_components27.default.nav`
|
|
7810
7885
|
display: flex;
|
|
7811
7886
|
align-items: center;
|
|
7812
7887
|
gap: var(--wui-space-01);
|
|
@@ -7824,8 +7899,8 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
7824
7899
|
crumbs = crumbs.slice(-1);
|
|
7825
7900
|
}
|
|
7826
7901
|
const crumbMaxWidth = Math.floor(100 / crumbs.length) - BUFFER_WIDTH;
|
|
7827
|
-
return /* @__PURE__ */ (0,
|
|
7828
|
-
/* @__PURE__ */ (0,
|
|
7902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
7903
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("style", { type: "text/css", children: `
|
|
7829
7904
|
[data-wui-breadcrumbs] {
|
|
7830
7905
|
container-type: inline-size;
|
|
7831
7906
|
container-name: breadcrumbs;
|
|
@@ -7837,7 +7912,7 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
7837
7912
|
}
|
|
7838
7913
|
}
|
|
7839
7914
|
` }),
|
|
7840
|
-
/* @__PURE__ */ (0,
|
|
7915
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
7841
7916
|
StyledBreadcrumbs,
|
|
7842
7917
|
{
|
|
7843
7918
|
"aria-label": "Breadcrumbs",
|
|
@@ -7851,9 +7926,9 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
7851
7926
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
7852
7927
|
|
|
7853
7928
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
7854
|
-
var
|
|
7855
|
-
var
|
|
7856
|
-
var BreadcrumbContent =
|
|
7929
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
7930
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7931
|
+
var BreadcrumbContent = import_styled_components28.default.span`
|
|
7857
7932
|
overflow: hidden;
|
|
7858
7933
|
white-space: nowrap;
|
|
7859
7934
|
display: block;
|
|
@@ -7862,18 +7937,18 @@ var BreadcrumbContent = import_styled_components27.default.span`
|
|
|
7862
7937
|
flex: 0;
|
|
7863
7938
|
`;
|
|
7864
7939
|
var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
7865
|
-
return /* @__PURE__ */ (0,
|
|
7866
|
-
/* @__PURE__ */ (0,
|
|
7940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(import_jsx_runtime201.Fragment, { children: [
|
|
7941
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
7867
7942
|
Button,
|
|
7868
7943
|
{
|
|
7869
7944
|
...props,
|
|
7870
7945
|
href,
|
|
7871
7946
|
leftIcon: icon,
|
|
7872
7947
|
variant: "ghost",
|
|
7873
|
-
children: /* @__PURE__ */ (0,
|
|
7948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(BreadcrumbContent, { "data-wui-breadcrumb": true, children })
|
|
7874
7949
|
}
|
|
7875
7950
|
),
|
|
7876
|
-
/* @__PURE__ */ (0,
|
|
7951
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", { "data-wui-breadcrumb-divider": true, children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
7877
7952
|
Icon,
|
|
7878
7953
|
{
|
|
7879
7954
|
size: "sm",
|
|
@@ -7885,9 +7960,9 @@ var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
|
7885
7960
|
};
|
|
7886
7961
|
|
|
7887
7962
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
7888
|
-
var
|
|
7889
|
-
var
|
|
7890
|
-
var
|
|
7963
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
7964
|
+
var import_type_guards21 = require("@wistia/type-guards");
|
|
7965
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
7891
7966
|
var getAlignment = (align) => {
|
|
7892
7967
|
if (align === "center") {
|
|
7893
7968
|
return "center";
|
|
@@ -7900,7 +7975,7 @@ var getAlignment = (align) => {
|
|
|
7900
7975
|
}
|
|
7901
7976
|
return "flex-start";
|
|
7902
7977
|
};
|
|
7903
|
-
var ButtonGroupComponent =
|
|
7978
|
+
var ButtonGroupComponent = import_styled_components29.default.div`
|
|
7904
7979
|
display: flex;
|
|
7905
7980
|
|
|
7906
7981
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
@@ -7932,10 +8007,10 @@ var ButtonGroup = ({
|
|
|
7932
8007
|
collapseOnSmallScreens = true,
|
|
7933
8008
|
...props
|
|
7934
8009
|
}) => {
|
|
7935
|
-
if ((0,
|
|
8010
|
+
if ((0, import_type_guards21.isNil)(children)) {
|
|
7936
8011
|
return null;
|
|
7937
8012
|
}
|
|
7938
|
-
return /* @__PURE__ */ (0,
|
|
8013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
7939
8014
|
ButtonGroupComponent,
|
|
7940
8015
|
{
|
|
7941
8016
|
$align: align,
|
|
@@ -7949,9 +8024,9 @@ var ButtonGroup = ({
|
|
|
7949
8024
|
ButtonGroup.displayName = "ButtonGroup";
|
|
7950
8025
|
|
|
7951
8026
|
// src/components/Card/Card.tsx
|
|
7952
|
-
var
|
|
7953
|
-
var
|
|
7954
|
-
var StyledCard = (0,
|
|
8027
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
8028
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8029
|
+
var StyledCard = (0, import_styled_components30.default)(Box)`
|
|
7955
8030
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7956
8031
|
box-sizing: border-box;
|
|
7957
8032
|
padding: ${({ $paddingSize }) => `var(--wui-${$paddingSize})`};
|
|
@@ -7988,7 +8063,7 @@ var Card = ({
|
|
|
7988
8063
|
height,
|
|
7989
8064
|
width,
|
|
7990
8065
|
...props
|
|
7991
|
-
}) => /* @__PURE__ */ (0,
|
|
8066
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
7992
8067
|
StyledCard,
|
|
7993
8068
|
{
|
|
7994
8069
|
$backgroundColor: prominenceMap[prominence].backgroundColor,
|
|
@@ -8007,9 +8082,9 @@ Card.displayName = "Card";
|
|
|
8007
8082
|
|
|
8008
8083
|
// src/components/Center/Center.tsx
|
|
8009
8084
|
var import_react22 = require("react");
|
|
8010
|
-
var
|
|
8011
|
-
var
|
|
8012
|
-
var StyledCenter =
|
|
8085
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
8086
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8087
|
+
var StyledCenter = import_styled_components31.default.div`
|
|
8013
8088
|
box-sizing: border-box;
|
|
8014
8089
|
margin-left: auto;
|
|
8015
8090
|
margin-right: auto;
|
|
@@ -8022,7 +8097,7 @@ var StyledCenter = import_styled_components30.default.div`
|
|
|
8022
8097
|
`}
|
|
8023
8098
|
`;
|
|
8024
8099
|
var Center = (0, import_react22.forwardRef)(
|
|
8025
|
-
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8100
|
+
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8026
8101
|
StyledCenter,
|
|
8027
8102
|
{
|
|
8028
8103
|
ref,
|
|
@@ -8038,21 +8113,21 @@ Center.displayName = "Center";
|
|
|
8038
8113
|
|
|
8039
8114
|
// src/components/Checkbox/Checkbox.tsx
|
|
8040
8115
|
var import_react23 = require("react");
|
|
8041
|
-
var
|
|
8042
|
-
var
|
|
8116
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
8117
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
8043
8118
|
|
|
8044
8119
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
8045
|
-
var
|
|
8046
|
-
var
|
|
8120
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
8121
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
8047
8122
|
|
|
8048
8123
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
8049
|
-
var
|
|
8050
|
-
var
|
|
8051
|
-
var
|
|
8052
|
-
var disabledStyle =
|
|
8124
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
8125
|
+
var import_type_guards22 = require("@wistia/type-guards");
|
|
8126
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
8127
|
+
var disabledStyle = import_styled_components32.css`
|
|
8053
8128
|
color: var(--wui-color-text-disabled);
|
|
8054
8129
|
`;
|
|
8055
|
-
var StyledFormControlLabelDescription =
|
|
8130
|
+
var StyledFormControlLabelDescription = import_styled_components32.default.div`
|
|
8056
8131
|
color: var(--wui-color-text-secondary);
|
|
8057
8132
|
display: block;
|
|
8058
8133
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -8067,10 +8142,10 @@ var FormControlLabelDescription = ({
|
|
|
8067
8142
|
disabled = false,
|
|
8068
8143
|
...props
|
|
8069
8144
|
}) => {
|
|
8070
|
-
if ((0,
|
|
8145
|
+
if ((0, import_type_guards22.isNil)(children)) {
|
|
8071
8146
|
return null;
|
|
8072
8147
|
}
|
|
8073
|
-
return /* @__PURE__ */ (0,
|
|
8148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8074
8149
|
StyledFormControlLabelDescription,
|
|
8075
8150
|
{
|
|
8076
8151
|
...props,
|
|
@@ -8082,11 +8157,11 @@ var FormControlLabelDescription = ({
|
|
|
8082
8157
|
FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
8083
8158
|
|
|
8084
8159
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8085
|
-
var
|
|
8086
|
-
var
|
|
8087
|
-
var
|
|
8088
|
-
var VisuallyHidden =
|
|
8089
|
-
var VisuallyHiddenButFocusable =
|
|
8160
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
8161
|
+
var import_type_guards23 = require("@wistia/type-guards");
|
|
8162
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
8163
|
+
var VisuallyHidden = import_styled_components33.default.div({ ...visuallyHiddenStyle });
|
|
8164
|
+
var VisuallyHiddenButFocusable = import_styled_components33.default.div({
|
|
8090
8165
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8091
8166
|
});
|
|
8092
8167
|
var ScreenReaderOnly = ({
|
|
@@ -8095,25 +8170,25 @@ var ScreenReaderOnly = ({
|
|
|
8095
8170
|
focusable = false,
|
|
8096
8171
|
...props
|
|
8097
8172
|
}) => {
|
|
8098
|
-
const accessibleText = (0,
|
|
8173
|
+
const accessibleText = (0, import_type_guards23.isNotNil)(text) ? text : children;
|
|
8099
8174
|
if (focusable) {
|
|
8100
|
-
return /* @__PURE__ */ (0,
|
|
8175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
|
|
8101
8176
|
}
|
|
8102
|
-
return /* @__PURE__ */ (0,
|
|
8177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(VisuallyHidden, { ...props, children: accessibleText });
|
|
8103
8178
|
};
|
|
8104
8179
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
8105
8180
|
|
|
8106
8181
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
8107
|
-
var
|
|
8108
|
-
var disabledStyle2 =
|
|
8182
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8183
|
+
var disabledStyle2 = import_styled_components34.css`
|
|
8109
8184
|
cursor: not-allowed;
|
|
8110
8185
|
color: var(--wui-color-text-disabled);
|
|
8111
8186
|
`;
|
|
8112
|
-
var StyledLabelWrapper =
|
|
8187
|
+
var StyledLabelWrapper = import_styled_components34.default.div`
|
|
8113
8188
|
display: flex;
|
|
8114
8189
|
flex-direction: column;
|
|
8115
8190
|
`;
|
|
8116
|
-
var StyledFormControlLabel =
|
|
8191
|
+
var StyledFormControlLabel = import_styled_components34.default.label`
|
|
8117
8192
|
cursor: pointer;
|
|
8118
8193
|
display: flex;
|
|
8119
8194
|
align-items: center;
|
|
@@ -8135,21 +8210,21 @@ var FormControlLabel = ({
|
|
|
8135
8210
|
hideLabel = false,
|
|
8136
8211
|
...props
|
|
8137
8212
|
}) => {
|
|
8138
|
-
if ((0,
|
|
8213
|
+
if ((0, import_type_guards24.isNil)(label)) {
|
|
8139
8214
|
return null;
|
|
8140
8215
|
}
|
|
8141
|
-
const labelContent = hideLabel ? /* @__PURE__ */ (0,
|
|
8216
|
+
const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledLabelWrapper, { children: [
|
|
8142
8217
|
label,
|
|
8143
|
-
/* @__PURE__ */ (0,
|
|
8218
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(FormControlLabelDescription, { children: description })
|
|
8144
8219
|
] });
|
|
8145
|
-
return /* @__PURE__ */ (0,
|
|
8220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
|
|
8146
8221
|
StyledFormControlLabel,
|
|
8147
8222
|
{
|
|
8148
8223
|
$disabled: disabled,
|
|
8149
8224
|
htmlFor,
|
|
8150
8225
|
...props,
|
|
8151
8226
|
children: [
|
|
8152
|
-
(0,
|
|
8227
|
+
(0, import_type_guards24.isNotNil)(controlSlot) ? controlSlot : null,
|
|
8153
8228
|
labelContent
|
|
8154
8229
|
]
|
|
8155
8230
|
}
|
|
@@ -8158,8 +8233,8 @@ var FormControlLabel = ({
|
|
|
8158
8233
|
FormControlLabel.displayName = "FormControlLabel";
|
|
8159
8234
|
|
|
8160
8235
|
// src/components/Checkbox/Checkbox.tsx
|
|
8161
|
-
var
|
|
8162
|
-
var CheckIcon = () => /* @__PURE__ */ (0,
|
|
8236
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8237
|
+
var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8163
8238
|
"svg",
|
|
8164
8239
|
{
|
|
8165
8240
|
fill: "inherit",
|
|
@@ -8167,7 +8242,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
|
8167
8242
|
viewBox: "0 0 10 8",
|
|
8168
8243
|
width: "10",
|
|
8169
8244
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8170
|
-
children: /* @__PURE__ */ (0,
|
|
8245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8171
8246
|
"path",
|
|
8172
8247
|
{
|
|
8173
8248
|
d: "M3.47281 7.19303L0.377565 4.07999C0.191609 3.89297 0.191609 3.58973 0.377565 3.40268L1.05098 2.72537C1.23694 2.53833 1.53847 2.53833 1.72442 2.72537L3.80953 4.82245L8.27558 0.330729C8.46154 0.143704 8.76306 0.143704 8.94902 0.330729L9.62244 1.00804C9.8084 1.19506 9.8084 1.49831 9.62244 1.68535L4.14624 7.19305C3.96027 7.38008 3.65876 7.38008 3.47281 7.19303Z",
|
|
@@ -8176,7 +8251,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
|
8176
8251
|
)
|
|
8177
8252
|
}
|
|
8178
8253
|
);
|
|
8179
|
-
var sizeSmall =
|
|
8254
|
+
var sizeSmall = import_styled_components35.css`
|
|
8180
8255
|
width: 14px;
|
|
8181
8256
|
height: 14px;
|
|
8182
8257
|
min-width: 14px;
|
|
@@ -8187,7 +8262,7 @@ var sizeSmall = import_styled_components34.css`
|
|
|
8187
8262
|
height: 7px;
|
|
8188
8263
|
}
|
|
8189
8264
|
`;
|
|
8190
|
-
var sizeMedium =
|
|
8265
|
+
var sizeMedium = import_styled_components35.css`
|
|
8191
8266
|
width: 16px;
|
|
8192
8267
|
height: 16px;
|
|
8193
8268
|
min-width: 16px;
|
|
@@ -8198,7 +8273,7 @@ var sizeMedium = import_styled_components34.css`
|
|
|
8198
8273
|
height: 9px;
|
|
8199
8274
|
}
|
|
8200
8275
|
`;
|
|
8201
|
-
var sizeLarge =
|
|
8276
|
+
var sizeLarge = import_styled_components35.css`
|
|
8202
8277
|
width: 20px;
|
|
8203
8278
|
height: 20px;
|
|
8204
8279
|
min-width: 20px;
|
|
@@ -8214,14 +8289,14 @@ var getSizeCss = (size) => {
|
|
|
8214
8289
|
if (size === "lg") return sizeLarge;
|
|
8215
8290
|
return sizeMedium;
|
|
8216
8291
|
};
|
|
8217
|
-
var StyledCheckboxWrapper =
|
|
8292
|
+
var StyledCheckboxWrapper = import_styled_components35.default.div`
|
|
8218
8293
|
display: flex;
|
|
8219
8294
|
margin: 0;
|
|
8220
8295
|
|
|
8221
8296
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
8222
8297
|
user-select: none;
|
|
8223
8298
|
`;
|
|
8224
|
-
var StyledCheckboxInput =
|
|
8299
|
+
var StyledCheckboxInput = import_styled_components35.default.div`
|
|
8225
8300
|
${({ $size }) => getSizeCss($size)}
|
|
8226
8301
|
line-height: 0;
|
|
8227
8302
|
margin: 0;
|
|
@@ -8243,7 +8318,7 @@ var StyledCheckboxInput = import_styled_components34.default.div`
|
|
|
8243
8318
|
}
|
|
8244
8319
|
}
|
|
8245
8320
|
`;
|
|
8246
|
-
var StyledHiddenCheckboxInput =
|
|
8321
|
+
var StyledHiddenCheckboxInput = import_styled_components35.default.input`
|
|
8247
8322
|
${visuallyHiddenStyle}
|
|
8248
8323
|
|
|
8249
8324
|
/* toggles display of faux-input background-color */
|
|
@@ -8273,9 +8348,9 @@ var Checkbox = (0, import_react23.forwardRef)(
|
|
|
8273
8348
|
...props
|
|
8274
8349
|
}, ref) => {
|
|
8275
8350
|
const generatedId = (0, import_react23.useId)();
|
|
8276
|
-
const computedId = (0,
|
|
8277
|
-
return /* @__PURE__ */ (0,
|
|
8278
|
-
/* @__PURE__ */ (0,
|
|
8351
|
+
const computedId = (0, import_type_guards25.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
8352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
8353
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8279
8354
|
StyledHiddenCheckboxInput,
|
|
8280
8355
|
{
|
|
8281
8356
|
...props,
|
|
@@ -8290,16 +8365,16 @@ var Checkbox = (0, import_react23.forwardRef)(
|
|
|
8290
8365
|
value
|
|
8291
8366
|
}
|
|
8292
8367
|
),
|
|
8293
|
-
/* @__PURE__ */ (0,
|
|
8368
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8294
8369
|
FormControlLabel,
|
|
8295
8370
|
{
|
|
8296
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
8371
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8297
8372
|
StyledCheckboxInput,
|
|
8298
8373
|
{
|
|
8299
8374
|
$disabled: disabled,
|
|
8300
8375
|
$size: size,
|
|
8301
8376
|
"data-wui-faux-input": "true",
|
|
8302
|
-
children: /* @__PURE__ */ (0,
|
|
8377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(CheckIcon, {})
|
|
8303
8378
|
}
|
|
8304
8379
|
),
|
|
8305
8380
|
description,
|
|
@@ -8351,10 +8426,10 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
8351
8426
|
|
|
8352
8427
|
// src/components/Collapsible/Collapsible.tsx
|
|
8353
8428
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
8354
|
-
var
|
|
8355
|
-
var
|
|
8356
|
-
var
|
|
8357
|
-
var StyledRoot = (0,
|
|
8429
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
8430
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
8431
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8432
|
+
var StyledRoot = (0, import_styled_components36.default)(import_react_collapsible.Root)`
|
|
8358
8433
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
8359
8434
|
display: -webkit-box;
|
|
8360
8435
|
-webkit-box-orient: vertical;
|
|
@@ -8368,84 +8443,84 @@ var Collapsible = ({
|
|
|
8368
8443
|
onOpenChange
|
|
8369
8444
|
}) => {
|
|
8370
8445
|
const controlProps = {
|
|
8371
|
-
...(0,
|
|
8446
|
+
...(0, import_type_guards26.isNotNil)(onOpenChange) && (0, import_type_guards26.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8372
8447
|
};
|
|
8373
|
-
return /* @__PURE__ */ (0,
|
|
8448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(StyledRoot, { ...controlProps, children });
|
|
8374
8449
|
};
|
|
8375
8450
|
Collapsible.displayName = "Collapsible";
|
|
8376
8451
|
|
|
8377
8452
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8378
8453
|
var import_react25 = require("react");
|
|
8379
8454
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
8380
|
-
var
|
|
8455
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8381
8456
|
var CollapsibleTrigger = ({ children }) => {
|
|
8382
8457
|
import_react25.Children.only(children);
|
|
8383
|
-
return /* @__PURE__ */ (0,
|
|
8458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
8384
8459
|
};
|
|
8385
8460
|
|
|
8386
8461
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
8387
|
-
var
|
|
8462
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
8388
8463
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
8389
|
-
var
|
|
8390
|
-
var
|
|
8391
|
-
var ClampedContent =
|
|
8464
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
8465
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8466
|
+
var ClampedContent = import_styled_components37.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
8392
8467
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8393
8468
|
`;
|
|
8394
8469
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
8395
|
-
if ((0,
|
|
8396
|
-
return /* @__PURE__ */ (0,
|
|
8470
|
+
if ((0, import_type_guards27.isNotUndefined)(clamp)) {
|
|
8471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
8397
8472
|
}
|
|
8398
|
-
return /* @__PURE__ */ (0,
|
|
8473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(import_jsx_runtime211.Fragment, { children: [
|
|
8399
8474
|
children,
|
|
8400
8475
|
" "
|
|
8401
8476
|
] }) });
|
|
8402
8477
|
};
|
|
8403
8478
|
|
|
8404
8479
|
// src/components/DataCards/DataCard.tsx
|
|
8405
|
-
var
|
|
8406
|
-
var
|
|
8480
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8481
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
8407
8482
|
|
|
8408
8483
|
// src/components/Heading/Heading.tsx
|
|
8409
8484
|
var import_react26 = require("react");
|
|
8410
|
-
var
|
|
8411
|
-
var
|
|
8412
|
-
var heroStyle =
|
|
8485
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8486
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
8487
|
+
var heroStyle = import_styled_components38.css`
|
|
8413
8488
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
8414
8489
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
8415
8490
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
8416
8491
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
8417
8492
|
`;
|
|
8418
|
-
var heading1TextStyle =
|
|
8493
|
+
var heading1TextStyle = import_styled_components38.css`
|
|
8419
8494
|
--font-family: var(--wui-typography-heading-1-family);
|
|
8420
8495
|
--font-size: var(--wui-typography-heading-1-size);
|
|
8421
8496
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
8422
8497
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
8423
8498
|
`;
|
|
8424
|
-
var heading2TextStyle =
|
|
8499
|
+
var heading2TextStyle = import_styled_components38.css`
|
|
8425
8500
|
--font-family: var(--wui-typography-heading-2-family);
|
|
8426
8501
|
--font-size: var(--wui-typography-heading-2-size);
|
|
8427
8502
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
8428
8503
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
8429
8504
|
`;
|
|
8430
|
-
var heading3TextStyle =
|
|
8505
|
+
var heading3TextStyle = import_styled_components38.css`
|
|
8431
8506
|
--font-family: var(--wui-typography-heading-3-family);
|
|
8432
8507
|
--font-size: var(--wui-typography-heading-3-size);
|
|
8433
8508
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
8434
8509
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
8435
8510
|
`;
|
|
8436
|
-
var heading4TextStyle =
|
|
8511
|
+
var heading4TextStyle = import_styled_components38.css`
|
|
8437
8512
|
--font-family: var(--wui-typography-heading-4-family);
|
|
8438
8513
|
--font-size: var(--wui-typography-heading-4-size);
|
|
8439
8514
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
8440
8515
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
8441
8516
|
`;
|
|
8442
|
-
var heading5TextStyle =
|
|
8517
|
+
var heading5TextStyle = import_styled_components38.css`
|
|
8443
8518
|
--font-family: var(--wui-typography-heading-5-family);
|
|
8444
8519
|
--font-size: var(--wui-typography-heading-5-size);
|
|
8445
8520
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
8446
8521
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
8447
8522
|
`;
|
|
8448
|
-
var heading6TextStyle =
|
|
8523
|
+
var heading6TextStyle = import_styled_components38.css`
|
|
8449
8524
|
--font-family: var(--wui-typography-heading-6-family);
|
|
8450
8525
|
--font-size: var(--wui-typography-heading-6-size);
|
|
8451
8526
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -8461,7 +8536,7 @@ var variantStyleMap = {
|
|
|
8461
8536
|
heading6: heading6TextStyle
|
|
8462
8537
|
};
|
|
8463
8538
|
var DEFAULT_ELEMENT2 = "h1";
|
|
8464
|
-
var StyledHeading =
|
|
8539
|
+
var StyledHeading = import_styled_components38.default.div`
|
|
8465
8540
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8466
8541
|
font-family: var(--font-family);
|
|
8467
8542
|
font-size: var(--font-size);
|
|
@@ -8470,16 +8545,16 @@ var StyledHeading = import_styled_components37.default.div`
|
|
|
8470
8545
|
color: var(--wui-color-text);
|
|
8471
8546
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
8472
8547
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8473
|
-
${({ $inline }) => $inline &&
|
|
8548
|
+
${({ $inline }) => $inline && import_styled_components38.css`
|
|
8474
8549
|
display: inline-block;
|
|
8475
8550
|
`}
|
|
8476
|
-
${({ $disabled }) => $disabled &&
|
|
8551
|
+
${({ $disabled }) => $disabled && import_styled_components38.css`
|
|
8477
8552
|
color: var(--wui-color-text-disabled);
|
|
8478
8553
|
`}
|
|
8479
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8554
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components38.css`
|
|
8480
8555
|
user-select: none;
|
|
8481
8556
|
`}
|
|
8482
|
-
${({ $align }) =>
|
|
8557
|
+
${({ $align }) => import_styled_components38.css`
|
|
8483
8558
|
text-align: ${$align};
|
|
8484
8559
|
`}
|
|
8485
8560
|
margin: 0;
|
|
@@ -8504,7 +8579,7 @@ var HeadingComponent = (0, import_react26.forwardRef)(
|
|
|
8504
8579
|
variant = "heading1",
|
|
8505
8580
|
renderAs,
|
|
8506
8581
|
...props
|
|
8507
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
8582
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8508
8583
|
StyledHeading,
|
|
8509
8584
|
{
|
|
8510
8585
|
ref,
|
|
@@ -8524,8 +8599,8 @@ HeadingComponent.displayName = "Heading";
|
|
|
8524
8599
|
var Heading = makePolymorphic(HeadingComponent);
|
|
8525
8600
|
|
|
8526
8601
|
// src/components/DataCards/DataCard.tsx
|
|
8527
|
-
var
|
|
8528
|
-
var StyledDataCard =
|
|
8602
|
+
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8603
|
+
var StyledDataCard = import_styled_components39.default.div`
|
|
8529
8604
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
8530
8605
|
display: grid;
|
|
8531
8606
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -8538,7 +8613,7 @@ var StyledDataCard = import_styled_components38.default.div`
|
|
|
8538
8613
|
border-radius: var(--wui-border-radius-02);
|
|
8539
8614
|
position: relative;
|
|
8540
8615
|
`;
|
|
8541
|
-
var shimmer =
|
|
8616
|
+
var shimmer = import_styled_components39.keyframes`
|
|
8542
8617
|
0% {
|
|
8543
8618
|
background-position: 200% 0;
|
|
8544
8619
|
}
|
|
@@ -8546,7 +8621,7 @@ var shimmer = import_styled_components38.keyframes`
|
|
|
8546
8621
|
background-position: -200% 0;
|
|
8547
8622
|
}
|
|
8548
8623
|
`;
|
|
8549
|
-
var LoadingBackground =
|
|
8624
|
+
var LoadingBackground = import_styled_components39.default.div`
|
|
8550
8625
|
background: linear-gradient(
|
|
8551
8626
|
90deg,
|
|
8552
8627
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -8557,27 +8632,27 @@ var LoadingBackground = import_styled_components38.default.div`
|
|
|
8557
8632
|
animation: ${shimmer} 1.5s infinite;
|
|
8558
8633
|
border-radius: var(--wui-border-radius-01);
|
|
8559
8634
|
`;
|
|
8560
|
-
var StyledLoadingLabel = (0,
|
|
8635
|
+
var StyledLoadingLabel = (0, import_styled_components39.default)(LoadingBackground)`
|
|
8561
8636
|
width: 80px;
|
|
8562
8637
|
height: var(--wui-typography-heading-6-line-height);
|
|
8563
8638
|
`;
|
|
8564
|
-
var StyledLoadingValue = (0,
|
|
8639
|
+
var StyledLoadingValue = (0, import_styled_components39.default)(LoadingBackground)`
|
|
8565
8640
|
width: 90%;
|
|
8566
8641
|
height: var(--wui-typography-heading-3-line-height);
|
|
8567
8642
|
`;
|
|
8568
|
-
var StyledLabel2 = (0,
|
|
8643
|
+
var StyledLabel2 = (0, import_styled_components39.default)(Heading)`
|
|
8569
8644
|
grid-area: label;
|
|
8570
8645
|
`;
|
|
8571
|
-
var StyledValue = (0,
|
|
8646
|
+
var StyledValue = (0, import_styled_components39.default)(Heading)`
|
|
8572
8647
|
grid-area: value;
|
|
8573
8648
|
`;
|
|
8574
|
-
var StyledSlot =
|
|
8649
|
+
var StyledSlot = import_styled_components39.default.div`
|
|
8575
8650
|
display: flex;
|
|
8576
8651
|
justify-content: flex-end;
|
|
8577
8652
|
grid-area: slot;
|
|
8578
8653
|
align-self: center;
|
|
8579
8654
|
`;
|
|
8580
|
-
var StyledDataCardTrendContainer =
|
|
8655
|
+
var StyledDataCardTrendContainer = import_styled_components39.default.div`
|
|
8581
8656
|
position: absolute;
|
|
8582
8657
|
bottom: var(--wui-space-01);
|
|
8583
8658
|
right: var(--wui-space-01);
|
|
@@ -8590,39 +8665,39 @@ var DataCard = ({
|
|
|
8590
8665
|
isLoading = false,
|
|
8591
8666
|
trend,
|
|
8592
8667
|
...props
|
|
8593
|
-
}) => /* @__PURE__ */ (0,
|
|
8668
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(
|
|
8594
8669
|
StyledDataCard,
|
|
8595
8670
|
{
|
|
8596
8671
|
$colorScheme: colorScheme,
|
|
8597
8672
|
...props,
|
|
8598
8673
|
children: [
|
|
8599
|
-
/* @__PURE__ */ (0,
|
|
8674
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8600
8675
|
StyledLabel2,
|
|
8601
8676
|
{
|
|
8602
8677
|
renderAs: "dt",
|
|
8603
8678
|
variant: "heading6",
|
|
8604
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8679
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(StyledLoadingLabel, {}) : label
|
|
8605
8680
|
}
|
|
8606
8681
|
),
|
|
8607
|
-
/* @__PURE__ */ (0,
|
|
8682
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8608
8683
|
StyledValue,
|
|
8609
8684
|
{
|
|
8610
8685
|
renderAs: "dd",
|
|
8611
8686
|
variant: "heading3",
|
|
8612
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8687
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(StyledLoadingValue, {}) : value
|
|
8613
8688
|
}
|
|
8614
8689
|
),
|
|
8615
|
-
(0,
|
|
8616
|
-
(0,
|
|
8690
|
+
(0, import_type_guards28.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
8691
|
+
(0, import_type_guards28.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8617
8692
|
]
|
|
8618
8693
|
}
|
|
8619
8694
|
);
|
|
8620
8695
|
DataCard.displayName = "DataCard";
|
|
8621
8696
|
|
|
8622
8697
|
// src/components/DataCards/DataCards.tsx
|
|
8623
|
-
var
|
|
8624
|
-
var
|
|
8625
|
-
var StyledDataCards = (0,
|
|
8698
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8699
|
+
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8700
|
+
var StyledDataCards = (0, import_styled_components40.default)(Box)`
|
|
8626
8701
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8627
8702
|
margin-top: 0; /* Remove default <dl> style */
|
|
8628
8703
|
> * {
|
|
@@ -8636,7 +8711,7 @@ var DataCards = ({
|
|
|
8636
8711
|
colorScheme = "inherit",
|
|
8637
8712
|
...props
|
|
8638
8713
|
}) => {
|
|
8639
|
-
return /* @__PURE__ */ (0,
|
|
8714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
8640
8715
|
StyledDataCards,
|
|
8641
8716
|
{
|
|
8642
8717
|
...props,
|
|
@@ -8654,25 +8729,25 @@ var DataCards = ({
|
|
|
8654
8729
|
DataCards.displayName = "DataCards";
|
|
8655
8730
|
|
|
8656
8731
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8657
|
-
var
|
|
8732
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8658
8733
|
|
|
8659
8734
|
// src/components/Text/Text.tsx
|
|
8660
8735
|
var import_react27 = require("react");
|
|
8661
|
-
var
|
|
8662
|
-
var
|
|
8663
|
-
var bodyBoldStyles =
|
|
8736
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8737
|
+
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8738
|
+
var bodyBoldStyles = import_styled_components41.css`
|
|
8664
8739
|
> strong,
|
|
8665
8740
|
b {
|
|
8666
8741
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8667
8742
|
}
|
|
8668
8743
|
`;
|
|
8669
|
-
var labelBoldStyles =
|
|
8744
|
+
var labelBoldStyles = import_styled_components41.css`
|
|
8670
8745
|
> strong,
|
|
8671
8746
|
b {
|
|
8672
8747
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8673
8748
|
}
|
|
8674
8749
|
`;
|
|
8675
|
-
var body1TextStyle =
|
|
8750
|
+
var body1TextStyle = import_styled_components41.css`
|
|
8676
8751
|
--font-family: var(--wui-typography-body-1-family);
|
|
8677
8752
|
--font-size: var(--wui-typography-body-1-size);
|
|
8678
8753
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8680,7 +8755,7 @@ var body1TextStyle = import_styled_components40.css`
|
|
|
8680
8755
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8681
8756
|
${bodyBoldStyles}
|
|
8682
8757
|
`;
|
|
8683
|
-
var body2TextStyle =
|
|
8758
|
+
var body2TextStyle = import_styled_components41.css`
|
|
8684
8759
|
--font-family: var(--wui-typography-body-2-family);
|
|
8685
8760
|
--font-size: var(--wui-typography-body-2-size);
|
|
8686
8761
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8688,7 +8763,7 @@ var body2TextStyle = import_styled_components40.css`
|
|
|
8688
8763
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8689
8764
|
${bodyBoldStyles}
|
|
8690
8765
|
`;
|
|
8691
|
-
var body3TextStyle =
|
|
8766
|
+
var body3TextStyle = import_styled_components41.css`
|
|
8692
8767
|
--font-family: var(--wui-typography-body-3-family);
|
|
8693
8768
|
--font-size: var(--wui-typography-body-3-size);
|
|
8694
8769
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8696,7 +8771,7 @@ var body3TextStyle = import_styled_components40.css`
|
|
|
8696
8771
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8697
8772
|
${bodyBoldStyles}
|
|
8698
8773
|
`;
|
|
8699
|
-
var body4TextStyle =
|
|
8774
|
+
var body4TextStyle = import_styled_components41.css`
|
|
8700
8775
|
--font-family: var(--wui-typography-body-4-family);
|
|
8701
8776
|
--font-size: var(--wui-typography-body-4-size);
|
|
8702
8777
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8704,47 +8779,47 @@ var body4TextStyle = import_styled_components40.css`
|
|
|
8704
8779
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8705
8780
|
${bodyBoldStyles}
|
|
8706
8781
|
`;
|
|
8707
|
-
var label1TextStyle =
|
|
8782
|
+
var label1TextStyle = import_styled_components41.css`
|
|
8708
8783
|
--font-family: var(--wui-typography-label-1-family);
|
|
8709
8784
|
--font-size: var(--wui-typography-label-1-size);
|
|
8710
8785
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8711
8786
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8712
8787
|
${labelBoldStyles}
|
|
8713
8788
|
`;
|
|
8714
|
-
var label2TextStyle =
|
|
8789
|
+
var label2TextStyle = import_styled_components41.css`
|
|
8715
8790
|
--font-family: var(--wui-typography-label-2-family);
|
|
8716
8791
|
--font-size: var(--wui-typography-label-2-size);
|
|
8717
8792
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8718
8793
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8719
8794
|
${labelBoldStyles}
|
|
8720
8795
|
`;
|
|
8721
|
-
var label3TextStyle =
|
|
8796
|
+
var label3TextStyle = import_styled_components41.css`
|
|
8722
8797
|
--font-family: var(--wui-typography-label-3-family);
|
|
8723
8798
|
--font-size: var(--wui-typography-label-3-size);
|
|
8724
8799
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8725
8800
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8726
8801
|
${labelBoldStyles}
|
|
8727
8802
|
`;
|
|
8728
|
-
var label4TextStyle =
|
|
8803
|
+
var label4TextStyle = import_styled_components41.css`
|
|
8729
8804
|
--font-family: var(--wui-typography-label-4-family);
|
|
8730
8805
|
--font-size: var(--wui-typography-label-4-size);
|
|
8731
8806
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8732
8807
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8733
8808
|
${labelBoldStyles}
|
|
8734
8809
|
`;
|
|
8735
|
-
var body1MonoTextStyle =
|
|
8810
|
+
var body1MonoTextStyle = import_styled_components41.css`
|
|
8736
8811
|
${body1TextStyle};
|
|
8737
8812
|
--font-family: var(--wui-typography-family-mono);
|
|
8738
8813
|
`;
|
|
8739
|
-
var body2MonoTextStyle =
|
|
8814
|
+
var body2MonoTextStyle = import_styled_components41.css`
|
|
8740
8815
|
${body2TextStyle};
|
|
8741
8816
|
--font-family: var(--wui-typography-family-mono);
|
|
8742
8817
|
`;
|
|
8743
|
-
var body3MonoTextStyle =
|
|
8818
|
+
var body3MonoTextStyle = import_styled_components41.css`
|
|
8744
8819
|
${body3TextStyle};
|
|
8745
8820
|
--font-family: var(--wui-typography-family-mono);
|
|
8746
8821
|
`;
|
|
8747
|
-
var body4MonoTextStyle =
|
|
8822
|
+
var body4MonoTextStyle = import_styled_components41.css`
|
|
8748
8823
|
${body4TextStyle};
|
|
8749
8824
|
--font-family: var(--wui-typography-family-mono);
|
|
8750
8825
|
`;
|
|
@@ -8779,7 +8854,7 @@ var variantElementMap2 = {
|
|
|
8779
8854
|
label3: labelElement,
|
|
8780
8855
|
label4: labelElement
|
|
8781
8856
|
};
|
|
8782
|
-
var StyledText =
|
|
8857
|
+
var StyledText = import_styled_components41.default.div`
|
|
8783
8858
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8784
8859
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8785
8860
|
if ($disabled) {
|
|
@@ -8803,19 +8878,19 @@ var StyledText = import_styled_components40.default.div`
|
|
|
8803
8878
|
margin: 0;
|
|
8804
8879
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8805
8880
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8806
|
-
${({ $inline }) => $inline &&
|
|
8881
|
+
${({ $inline }) => $inline && import_styled_components41.css`
|
|
8807
8882
|
display: inline-block;
|
|
8808
8883
|
`}
|
|
8809
|
-
${({ $disabled }) => $disabled &&
|
|
8884
|
+
${({ $disabled }) => $disabled && import_styled_components41.css`
|
|
8810
8885
|
--text-color: var(--wui-color-text-disabled);
|
|
8811
8886
|
`}
|
|
8812
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8887
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components41.css`
|
|
8813
8888
|
user-select: none;
|
|
8814
8889
|
`}
|
|
8815
|
-
${({ $align }) =>
|
|
8890
|
+
${({ $align }) => import_styled_components41.css`
|
|
8816
8891
|
text-align: ${$align};
|
|
8817
8892
|
`}
|
|
8818
|
-
${({ as }) => as === "p" &&
|
|
8893
|
+
${({ as }) => as === "p" && import_styled_components41.css`
|
|
8819
8894
|
display: block;
|
|
8820
8895
|
|
|
8821
8896
|
+ p {
|
|
@@ -8836,7 +8911,7 @@ var TextComponent = (0, import_react27.forwardRef)(
|
|
|
8836
8911
|
renderAs,
|
|
8837
8912
|
...props
|
|
8838
8913
|
}, ref) => {
|
|
8839
|
-
return /* @__PURE__ */ (0,
|
|
8914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
8840
8915
|
StyledText,
|
|
8841
8916
|
{
|
|
8842
8917
|
ref,
|
|
@@ -8858,8 +8933,8 @@ TextComponent.displayName = "Text";
|
|
|
8858
8933
|
var Text = makePolymorphic(TextComponent);
|
|
8859
8934
|
|
|
8860
8935
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8861
|
-
var
|
|
8862
|
-
var StyledDataCardTrend =
|
|
8936
|
+
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
8937
|
+
var StyledDataCardTrend = import_styled_components42.default.div`
|
|
8863
8938
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8864
8939
|
background: var(--wui-color-bg-app);
|
|
8865
8940
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8874,8 +8949,8 @@ var DataCardTrend = ({
|
|
|
8874
8949
|
children,
|
|
8875
8950
|
...props
|
|
8876
8951
|
}) => {
|
|
8877
|
-
return /* @__PURE__ */ (0,
|
|
8878
|
-
/* @__PURE__ */ (0,
|
|
8952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
8953
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
8879
8954
|
Icon,
|
|
8880
8955
|
{
|
|
8881
8956
|
size: "md",
|
|
@@ -8883,7 +8958,7 @@ var DataCardTrend = ({
|
|
|
8883
8958
|
...props
|
|
8884
8959
|
}
|
|
8885
8960
|
),
|
|
8886
|
-
/* @__PURE__ */ (0,
|
|
8961
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
8887
8962
|
Text,
|
|
8888
8963
|
{
|
|
8889
8964
|
prominence: "secondary",
|
|
@@ -8895,22 +8970,22 @@ var DataCardTrend = ({
|
|
|
8895
8970
|
};
|
|
8896
8971
|
|
|
8897
8972
|
// src/components/Divider/Divider.tsx
|
|
8898
|
-
var
|
|
8899
|
-
var
|
|
8900
|
-
var horizontalBorderCss =
|
|
8973
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
8974
|
+
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
8975
|
+
var horizontalBorderCss = import_styled_components43.css`
|
|
8901
8976
|
border-top-color: var(--wui-color-border);
|
|
8902
8977
|
border-top-style: solid;
|
|
8903
8978
|
border-top-width: 1px;
|
|
8904
8979
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8905
8980
|
height: 0;
|
|
8906
8981
|
`;
|
|
8907
|
-
var verticalBorderCss =
|
|
8982
|
+
var verticalBorderCss = import_styled_components43.css`
|
|
8908
8983
|
background-color: var(--wui-color-border);
|
|
8909
8984
|
max-width: 1px;
|
|
8910
8985
|
min-height: 100%;
|
|
8911
8986
|
width: 1px;
|
|
8912
8987
|
`;
|
|
8913
|
-
var DividerComponent =
|
|
8988
|
+
var DividerComponent = import_styled_components43.default.div`
|
|
8914
8989
|
${({ $orientation }) => {
|
|
8915
8990
|
switch ($orientation) {
|
|
8916
8991
|
case "vertical":
|
|
@@ -8922,7 +8997,7 @@ var DividerComponent = import_styled_components42.default.div`
|
|
|
8922
8997
|
}}
|
|
8923
8998
|
`;
|
|
8924
8999
|
var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
8925
|
-
return /* @__PURE__ */ (0,
|
|
9000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
8926
9001
|
DividerComponent,
|
|
8927
9002
|
{
|
|
8928
9003
|
$orientation: orientation,
|
|
@@ -8935,21 +9010,21 @@ var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
|
8935
9010
|
Divider.displayName = "Divider";
|
|
8936
9011
|
|
|
8937
9012
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8938
|
-
var
|
|
9013
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8939
9014
|
var import_react29 = require("react");
|
|
8940
9015
|
|
|
8941
9016
|
// src/components/Tooltip/Tooltip.tsx
|
|
8942
9017
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8943
|
-
var
|
|
8944
|
-
var
|
|
8945
|
-
var CompactTooltipStyles =
|
|
9018
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
9019
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9020
|
+
var CompactTooltipStyles = import_styled_components44.css`
|
|
8946
9021
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8947
9022
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8948
9023
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8949
9024
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8950
9025
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8951
9026
|
`;
|
|
8952
|
-
var StyledContent = (0,
|
|
9027
|
+
var StyledContent = (0, import_styled_components44.default)(import_react_tooltip2.Content)`
|
|
8953
9028
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8954
9029
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8955
9030
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -9008,14 +9083,14 @@ var Tooltip = ({
|
|
|
9008
9083
|
if (forceOpen === true) {
|
|
9009
9084
|
rootProps.open = true;
|
|
9010
9085
|
}
|
|
9011
|
-
return /* @__PURE__ */ (0,
|
|
9086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
9012
9087
|
import_react_tooltip2.Root,
|
|
9013
9088
|
{
|
|
9014
9089
|
delayDuration: delay,
|
|
9015
9090
|
...rootProps,
|
|
9016
9091
|
children: [
|
|
9017
|
-
/* @__PURE__ */ (0,
|
|
9018
|
-
/* @__PURE__ */ (0,
|
|
9092
|
+
/* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
9093
|
+
/* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
9019
9094
|
StyledContent,
|
|
9020
9095
|
{
|
|
9021
9096
|
$compact: compact,
|
|
@@ -9023,7 +9098,7 @@ var Tooltip = ({
|
|
|
9023
9098
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
9024
9099
|
children: [
|
|
9025
9100
|
content,
|
|
9026
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
9101
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9027
9102
|
"svg",
|
|
9028
9103
|
{
|
|
9029
9104
|
fill: "var(--tooltip-bg)",
|
|
@@ -9032,7 +9107,7 @@ var Tooltip = ({
|
|
|
9032
9107
|
viewBox: "0 0 12 8",
|
|
9033
9108
|
width: "12",
|
|
9034
9109
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9035
|
-
children: /* @__PURE__ */ (0,
|
|
9110
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
9036
9111
|
}
|
|
9037
9112
|
) }) : null
|
|
9038
9113
|
]
|
|
@@ -9046,18 +9121,19 @@ Tooltip.displayName = "Tooltip";
|
|
|
9046
9121
|
|
|
9047
9122
|
// src/components/Input/Input.tsx
|
|
9048
9123
|
var import_react28 = require("react");
|
|
9049
|
-
var
|
|
9050
|
-
var
|
|
9124
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
9125
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
9051
9126
|
|
|
9052
9127
|
// src/css/sharedStyles/inputCssVariables.ts
|
|
9053
|
-
var
|
|
9054
|
-
var inputCssVariables =
|
|
9128
|
+
var import_styled_components45 = require("styled-components");
|
|
9129
|
+
var inputCssVariables = import_styled_components45.css`
|
|
9055
9130
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
9056
9131
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
9057
9132
|
--wui-input-color-border: var(--wui-color-border-secondary);
|
|
9058
9133
|
--wui-input-color-border-focus: var(--wui-color-focus-ring);
|
|
9059
9134
|
--wui-input-color-border-error: var(--wui-color-invalid-indicator);
|
|
9060
9135
|
--wui-input-color-border-disabled: var(--wui-color-border-disabled);
|
|
9136
|
+
--wui-input-color-text: var(--wui-color-text);
|
|
9061
9137
|
--wui-input-border-radius: var(--wui-border-radius-03);
|
|
9062
9138
|
--wui-input-multiline-border-radius: var(--wui-border-radius-02);
|
|
9063
9139
|
--wui-input-vertical-padding: var(--wui-space-02);
|
|
@@ -9068,8 +9144,8 @@ var inputCssVariables = import_styled_components44.css`
|
|
|
9068
9144
|
`;
|
|
9069
9145
|
|
|
9070
9146
|
// src/components/Input/Input.tsx
|
|
9071
|
-
var
|
|
9072
|
-
var inputStyles =
|
|
9147
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
9148
|
+
var inputStyles = import_styled_components46.css`
|
|
9073
9149
|
${inputCssVariables}
|
|
9074
9150
|
input,
|
|
9075
9151
|
textarea {
|
|
@@ -9082,7 +9158,7 @@ var inputStyles = import_styled_components45.css`
|
|
|
9082
9158
|
font-size: var(--wui-input-font-size);
|
|
9083
9159
|
line-height: var(--wui-input-line-height);
|
|
9084
9160
|
font-weight: var(--wui-typography-weight-body);
|
|
9085
|
-
color: var(--wui-color-text
|
|
9161
|
+
color: var(--wui-input-color-text);
|
|
9086
9162
|
|
|
9087
9163
|
&::placeholder {
|
|
9088
9164
|
color: var(--wui-input-placeholder);
|
|
@@ -9104,7 +9180,7 @@ var inputStyles = import_styled_components45.css`
|
|
|
9104
9180
|
}
|
|
9105
9181
|
}
|
|
9106
9182
|
`;
|
|
9107
|
-
var StyledInputContainer =
|
|
9183
|
+
var StyledInputContainer = import_styled_components46.default.div`
|
|
9108
9184
|
display: inline-flex;
|
|
9109
9185
|
position: relative;
|
|
9110
9186
|
${inputStyles};
|
|
@@ -9184,27 +9260,27 @@ var Input = (0, import_react28.forwardRef)(
|
|
|
9184
9260
|
const internalRef = (0, import_react28.useRef)();
|
|
9185
9261
|
const ref = (
|
|
9186
9262
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
9187
|
-
(0,
|
|
9263
|
+
(0, import_type_guards29.isNotNil)(externalRef) && (0, import_type_guards29.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
9188
9264
|
);
|
|
9189
9265
|
let leftIconToDisplay = leftIcon;
|
|
9190
|
-
if ((0,
|
|
9191
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
9266
|
+
if ((0, import_type_guards29.isNil)(leftIcon) && type === "search") {
|
|
9267
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Icon, { type: "search" });
|
|
9192
9268
|
}
|
|
9193
|
-
if ((0,
|
|
9269
|
+
if ((0, import_type_guards29.isNotNil)(leftIconToDisplay)) {
|
|
9194
9270
|
leftIconToDisplay = (0, import_react28.cloneElement)(leftIconToDisplay, {
|
|
9195
9271
|
size: "md",
|
|
9196
9272
|
className: "wui-input-left-icon"
|
|
9197
9273
|
});
|
|
9198
9274
|
}
|
|
9199
9275
|
let rightIconToDisplay = rightIcon;
|
|
9200
|
-
if ((0,
|
|
9276
|
+
if ((0, import_type_guards29.isNotNil)(rightIconToDisplay)) {
|
|
9201
9277
|
rightIconToDisplay = (0, import_react28.cloneElement)(rightIconToDisplay, {
|
|
9202
9278
|
size: "md",
|
|
9203
9279
|
className: "wui-input-right-icon"
|
|
9204
9280
|
});
|
|
9205
9281
|
}
|
|
9206
9282
|
const handleFocus2 = (event) => {
|
|
9207
|
-
if ((0,
|
|
9283
|
+
if ((0, import_type_guards29.isNotNil)(props.onFocus)) {
|
|
9208
9284
|
props.onFocus(event);
|
|
9209
9285
|
}
|
|
9210
9286
|
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
@@ -9213,21 +9289,21 @@ var Input = (0, import_react28.forwardRef)(
|
|
|
9213
9289
|
});
|
|
9214
9290
|
}
|
|
9215
9291
|
};
|
|
9216
|
-
return /* @__PURE__ */ (0,
|
|
9292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
|
|
9217
9293
|
StyledInputContainer,
|
|
9218
9294
|
{
|
|
9219
9295
|
$fullWidth: fullWidth,
|
|
9220
9296
|
$monospace: monospace,
|
|
9221
9297
|
children: [
|
|
9222
9298
|
leftIconToDisplay ?? null,
|
|
9223
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
9299
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
9224
9300
|
"textarea",
|
|
9225
9301
|
{
|
|
9226
9302
|
...props,
|
|
9227
9303
|
ref,
|
|
9228
9304
|
onFocus: handleFocus2
|
|
9229
9305
|
}
|
|
9230
|
-
) : /* @__PURE__ */ (0,
|
|
9306
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
9231
9307
|
"input",
|
|
9232
9308
|
{
|
|
9233
9309
|
...props,
|
|
@@ -9245,8 +9321,8 @@ var Input = (0, import_react28.forwardRef)(
|
|
|
9245
9321
|
Input.displayName = "Input";
|
|
9246
9322
|
|
|
9247
9323
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
9248
|
-
var
|
|
9249
|
-
var StyledInput = (0,
|
|
9324
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9325
|
+
var StyledInput = (0, import_styled_components47.default)(Input)`
|
|
9250
9326
|
:not([rows]) {
|
|
9251
9327
|
min-height: unset;
|
|
9252
9328
|
}
|
|
@@ -9266,7 +9342,7 @@ var StyledInput = (0, import_styled_components46.default)(Input)`
|
|
|
9266
9342
|
height: ${({ $height }) => `${$height}px`};
|
|
9267
9343
|
}
|
|
9268
9344
|
`;
|
|
9269
|
-
var editableStyles =
|
|
9345
|
+
var editableStyles = import_styled_components47.css`
|
|
9270
9346
|
&:has(+ :focus-within) {
|
|
9271
9347
|
background: var(--wui-color-bg-surface-hover);
|
|
9272
9348
|
}
|
|
@@ -9276,7 +9352,7 @@ var editableStyles = import_styled_components46.css`
|
|
|
9276
9352
|
cursor: pointer;
|
|
9277
9353
|
}
|
|
9278
9354
|
`;
|
|
9279
|
-
var StyledHeading2 = (0,
|
|
9355
|
+
var StyledHeading2 = (0, import_styled_components47.default)(Heading)`
|
|
9280
9356
|
width: 100%;
|
|
9281
9357
|
border-radius: var(--wui-border-radius-02);
|
|
9282
9358
|
padding: var(--wui-space-02);
|
|
@@ -9330,7 +9406,7 @@ var EditableHeading = ({
|
|
|
9330
9406
|
handleSetEditing(false);
|
|
9331
9407
|
}
|
|
9332
9408
|
};
|
|
9333
|
-
const HeadingComponent2 = /* @__PURE__ */ (0,
|
|
9409
|
+
const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9334
9410
|
StyledHeading2,
|
|
9335
9411
|
{
|
|
9336
9412
|
ref: headingRef,
|
|
@@ -9344,7 +9420,7 @@ var EditableHeading = ({
|
|
|
9344
9420
|
return HeadingComponent2;
|
|
9345
9421
|
}
|
|
9346
9422
|
if (isEditing || forceEditing) {
|
|
9347
|
-
return /* @__PURE__ */ (0,
|
|
9423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9348
9424
|
StyledInput,
|
|
9349
9425
|
{
|
|
9350
9426
|
$height: headingHeight,
|
|
@@ -9362,8 +9438,8 @@ var EditableHeading = ({
|
|
|
9362
9438
|
}
|
|
9363
9439
|
);
|
|
9364
9440
|
}
|
|
9365
|
-
return /* @__PURE__ */ (0,
|
|
9366
|
-
/* @__PURE__ */ (0,
|
|
9441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
|
|
9442
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9367
9443
|
Tooltip,
|
|
9368
9444
|
{
|
|
9369
9445
|
compact: true,
|
|
@@ -9371,7 +9447,7 @@ var EditableHeading = ({
|
|
|
9371
9447
|
children: HeadingComponent2
|
|
9372
9448
|
}
|
|
9373
9449
|
),
|
|
9374
|
-
/* @__PURE__ */ (0,
|
|
9450
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9375
9451
|
"button",
|
|
9376
9452
|
{
|
|
9377
9453
|
"aria-label": ariaLabel,
|
|
@@ -9384,15 +9460,15 @@ var EditableHeading = ({
|
|
|
9384
9460
|
|
|
9385
9461
|
// src/components/Form/Form.tsx
|
|
9386
9462
|
var import_react31 = require("react");
|
|
9387
|
-
var
|
|
9388
|
-
var
|
|
9463
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9464
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
9389
9465
|
|
|
9390
9466
|
// src/components/Stack/Stack.tsx
|
|
9391
9467
|
var import_react30 = require("react");
|
|
9392
|
-
var
|
|
9393
|
-
var
|
|
9468
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
9469
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
9394
9470
|
var DEFAULT_ELEMENT4 = "div";
|
|
9395
|
-
var StyledStack =
|
|
9471
|
+
var StyledStack = import_styled_components48.default.div`
|
|
9396
9472
|
display: flex;
|
|
9397
9473
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
9398
9474
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
@@ -9403,7 +9479,7 @@ var StackComponent = (0, import_react30.forwardRef)(
|
|
|
9403
9479
|
const responsiveGap = useResponsiveProp(gap);
|
|
9404
9480
|
const responsiveDirection = useResponsiveProp(direction);
|
|
9405
9481
|
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
9406
|
-
return /* @__PURE__ */ (0,
|
|
9482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
9407
9483
|
StyledStack,
|
|
9408
9484
|
{
|
|
9409
9485
|
ref,
|
|
@@ -9420,8 +9496,8 @@ StackComponent.displayName = "Stack";
|
|
|
9420
9496
|
var Stack = makePolymorphic(StackComponent);
|
|
9421
9497
|
|
|
9422
9498
|
// src/components/Form/Form.tsx
|
|
9423
|
-
var
|
|
9424
|
-
var StyledForm =
|
|
9499
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9500
|
+
var StyledForm = import_styled_components49.default.form`
|
|
9425
9501
|
--form-default-width: 690px;
|
|
9426
9502
|
|
|
9427
9503
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
@@ -9451,7 +9527,7 @@ var FormComponent = ({
|
|
|
9451
9527
|
const id = props.id ?? autoId;
|
|
9452
9528
|
const handleValidate = (nextFormData) => {
|
|
9453
9529
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
9454
|
-
if ((0,
|
|
9530
|
+
if ((0, import_type_guards30.isUndefined)(validate)) {
|
|
9455
9531
|
return {};
|
|
9456
9532
|
}
|
|
9457
9533
|
return validate(nextData);
|
|
@@ -9461,7 +9537,7 @@ var FormComponent = ({
|
|
|
9461
9537
|
props.onBlur(event);
|
|
9462
9538
|
}
|
|
9463
9539
|
const formData = new FormData(event.currentTarget);
|
|
9464
|
-
if ((0,
|
|
9540
|
+
if ((0, import_type_guards30.isNotUndefined)(validate)) {
|
|
9465
9541
|
handleValidate(formData);
|
|
9466
9542
|
}
|
|
9467
9543
|
};
|
|
@@ -9500,7 +9576,7 @@ var FormComponent = ({
|
|
|
9500
9576
|
}, [labelPosition, values, errors, id, hasSubmitted]);
|
|
9501
9577
|
return (
|
|
9502
9578
|
// @ts-expect-error - generic context providers are a giant pain
|
|
9503
|
-
/* @__PURE__ */ (0,
|
|
9579
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9504
9580
|
Stack,
|
|
9505
9581
|
{
|
|
9506
9582
|
...props,
|
|
@@ -9558,10 +9634,10 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9558
9634
|
|
|
9559
9635
|
// src/components/Form/FormErrorSummary.tsx
|
|
9560
9636
|
var import_react33 = require("react");
|
|
9561
|
-
var
|
|
9562
|
-
var
|
|
9637
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
9638
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9563
9639
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9564
|
-
return /* @__PURE__ */ (0,
|
|
9640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9565
9641
|
};
|
|
9566
9642
|
var FormErrorSummary = ({ description }) => {
|
|
9567
9643
|
const ref = (0, import_react33.useRef)(null);
|
|
@@ -9570,10 +9646,10 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9570
9646
|
if (isValid || !hasSubmitted) {
|
|
9571
9647
|
return null;
|
|
9572
9648
|
}
|
|
9573
|
-
return /* @__PURE__ */ (0,
|
|
9574
|
-
/* @__PURE__ */ (0,
|
|
9575
|
-
/* @__PURE__ */ (0,
|
|
9576
|
-
([name, error]) => (0,
|
|
9649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)("div", { ref, children: [
|
|
9650
|
+
/* @__PURE__ */ (0, import_jsx_runtime223.jsx)("p", { children: description }),
|
|
9651
|
+
/* @__PURE__ */ (0, import_jsx_runtime223.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards31.isNotUndefined)(error)).map(
|
|
9652
|
+
([name, error]) => (0, import_type_guards31.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9577
9653
|
ErrorItem,
|
|
9578
9654
|
{
|
|
9579
9655
|
error: err,
|
|
@@ -9581,7 +9657,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9581
9657
|
name
|
|
9582
9658
|
},
|
|
9583
9659
|
err
|
|
9584
|
-
)) : /* @__PURE__ */ (0,
|
|
9660
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9585
9661
|
ErrorItem,
|
|
9586
9662
|
{
|
|
9587
9663
|
error: error ?? "",
|
|
@@ -9596,13 +9672,13 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9596
9672
|
|
|
9597
9673
|
// src/components/FormField/FormField.tsx
|
|
9598
9674
|
var import_react36 = require("react");
|
|
9599
|
-
var
|
|
9600
|
-
var
|
|
9675
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9676
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9601
9677
|
|
|
9602
9678
|
// src/components/Label/Label.tsx
|
|
9603
|
-
var
|
|
9604
|
-
var
|
|
9605
|
-
var requiredStyle =
|
|
9679
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9680
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9681
|
+
var requiredStyle = import_styled_components50.css`
|
|
9606
9682
|
&::after {
|
|
9607
9683
|
color: var(--wui-color-text-error);
|
|
9608
9684
|
display: inline;
|
|
@@ -9610,10 +9686,10 @@ var requiredStyle = import_styled_components49.css`
|
|
|
9610
9686
|
content: '*';
|
|
9611
9687
|
}
|
|
9612
9688
|
`;
|
|
9613
|
-
var disabledStyle3 =
|
|
9689
|
+
var disabledStyle3 = import_styled_components50.css`
|
|
9614
9690
|
color: var(--wui-color-text-disabled);
|
|
9615
9691
|
`;
|
|
9616
|
-
var StyledLabel3 =
|
|
9692
|
+
var StyledLabel3 = import_styled_components50.default.label`
|
|
9617
9693
|
display: block;
|
|
9618
9694
|
width: 100%;
|
|
9619
9695
|
color: var(--wui-color-text);
|
|
@@ -9645,7 +9721,7 @@ var Label = ({
|
|
|
9645
9721
|
screenReaderOnly = false,
|
|
9646
9722
|
...props
|
|
9647
9723
|
}) => {
|
|
9648
|
-
return /* @__PURE__ */ (0,
|
|
9724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
9649
9725
|
StyledLabel3,
|
|
9650
9726
|
{
|
|
9651
9727
|
...props,
|
|
@@ -9663,25 +9739,25 @@ Label.displayName = "Label";
|
|
|
9663
9739
|
var import_react35 = require("react");
|
|
9664
9740
|
|
|
9665
9741
|
// src/components/FormGroup/FormGroup.tsx
|
|
9666
|
-
var
|
|
9742
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9667
9743
|
var import_react34 = require("react");
|
|
9668
|
-
var
|
|
9669
|
-
var StyledFieldset =
|
|
9744
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9745
|
+
var StyledFieldset = import_styled_components51.default.fieldset`
|
|
9670
9746
|
border: 0;
|
|
9671
9747
|
`;
|
|
9672
|
-
var StyledLegend =
|
|
9748
|
+
var StyledLegend = import_styled_components51.default.legend`
|
|
9673
9749
|
margin-bottom: var(--space-01);
|
|
9674
9750
|
`;
|
|
9675
9751
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9676
9752
|
const ref = (0, import_react34.useRef)();
|
|
9677
|
-
return /* @__PURE__ */ (0,
|
|
9753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
|
|
9678
9754
|
Stack,
|
|
9679
9755
|
{
|
|
9680
9756
|
...props,
|
|
9681
9757
|
ref,
|
|
9682
9758
|
renderAs: StyledFieldset,
|
|
9683
9759
|
children: [
|
|
9684
|
-
/* @__PURE__ */ (0,
|
|
9760
|
+
/* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
|
|
9685
9761
|
Heading,
|
|
9686
9762
|
{
|
|
9687
9763
|
renderAs: StyledLegend,
|
|
@@ -9697,7 +9773,7 @@ var FormGroup = ({ children, label, ...props }) => {
|
|
|
9697
9773
|
FormGroup.displayName = "FormGroup";
|
|
9698
9774
|
|
|
9699
9775
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9700
|
-
var
|
|
9776
|
+
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
9701
9777
|
var CheckboxGroupContext = (0, import_react35.createContext)(null);
|
|
9702
9778
|
var CheckboxGroup = ({
|
|
9703
9779
|
children,
|
|
@@ -9712,13 +9788,13 @@ var CheckboxGroup = ({
|
|
|
9712
9788
|
onChange
|
|
9713
9789
|
};
|
|
9714
9790
|
}, [name, onChange]);
|
|
9715
|
-
return /* @__PURE__ */ (0,
|
|
9791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(FormGroup, { ...props, children }) });
|
|
9716
9792
|
};
|
|
9717
9793
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9718
9794
|
|
|
9719
9795
|
// src/components/FormField/FormField.tsx
|
|
9720
|
-
var
|
|
9721
|
-
var StyledFormField =
|
|
9796
|
+
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9797
|
+
var StyledFormField = import_styled_components52.default.div`
|
|
9722
9798
|
--form-field-spacing: var(--wui-space-01);
|
|
9723
9799
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
9724
9800
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -9748,7 +9824,7 @@ var StyledFormField = import_styled_components51.default.div`
|
|
|
9748
9824
|
grid-template-rows: 1fr;
|
|
9749
9825
|
}
|
|
9750
9826
|
`;
|
|
9751
|
-
var StyledErrorList =
|
|
9827
|
+
var StyledErrorList = import_styled_components52.default.ul`
|
|
9752
9828
|
margin: 0;
|
|
9753
9829
|
padding: 0;
|
|
9754
9830
|
padding-left: var(--wui-space-04);
|
|
@@ -9757,8 +9833,8 @@ var StyledErrorList = import_styled_components51.default.ul`
|
|
|
9757
9833
|
gap: var(--wui-space-01);
|
|
9758
9834
|
`;
|
|
9759
9835
|
var ErrorMessages = ({ errors, id }) => {
|
|
9760
|
-
const isMultipleErrors = (0,
|
|
9761
|
-
return isMultipleErrors ? /* @__PURE__ */ (0,
|
|
9836
|
+
const isMultipleErrors = (0, import_type_guards32.isArray)(errors);
|
|
9837
|
+
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
|
|
9762
9838
|
Text,
|
|
9763
9839
|
{
|
|
9764
9840
|
colorScheme: "error",
|
|
@@ -9768,7 +9844,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
9768
9844
|
children: error
|
|
9769
9845
|
},
|
|
9770
9846
|
`${id}-${index}`
|
|
9771
|
-
)) }) : /* @__PURE__ */ (0,
|
|
9847
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
|
|
9772
9848
|
Text,
|
|
9773
9849
|
{
|
|
9774
9850
|
colorScheme: "error",
|
|
@@ -9807,19 +9883,19 @@ var FormField = ({
|
|
|
9807
9883
|
"aria-describedby": ariaDescribedby,
|
|
9808
9884
|
...props
|
|
9809
9885
|
};
|
|
9810
|
-
if ((0,
|
|
9886
|
+
if ((0, import_type_guards32.isUndefined)(value) && (0, import_type_guards32.isNotUndefined)(defaultValue)) {
|
|
9811
9887
|
childProps = {
|
|
9812
9888
|
...childProps,
|
|
9813
9889
|
defaultValue
|
|
9814
9890
|
};
|
|
9815
9891
|
}
|
|
9816
|
-
if ((0,
|
|
9817
|
-
const computedName = (0,
|
|
9892
|
+
if ((0, import_type_guards32.isNotNil)(checkboxGroup)) {
|
|
9893
|
+
const computedName = (0, import_type_guards32.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
9818
9894
|
const handleChange = (event) => {
|
|
9819
|
-
if ((0,
|
|
9895
|
+
if ((0, import_type_guards32.isNotUndefined)(props.onChange)) {
|
|
9820
9896
|
props.onChange(event);
|
|
9821
9897
|
}
|
|
9822
|
-
if ((0,
|
|
9898
|
+
if ((0, import_type_guards32.isNotUndefined)(checkboxGroup.onChange)) {
|
|
9823
9899
|
checkboxGroup.onChange(event);
|
|
9824
9900
|
}
|
|
9825
9901
|
};
|
|
@@ -9827,22 +9903,22 @@ var FormField = ({
|
|
|
9827
9903
|
...childProps,
|
|
9828
9904
|
name: computedName,
|
|
9829
9905
|
onChange: handleChange,
|
|
9830
|
-
"aria-invalid": (0,
|
|
9906
|
+
"aria-invalid": (0, import_type_guards32.isNotNil)(error)
|
|
9831
9907
|
};
|
|
9832
9908
|
}
|
|
9833
9909
|
import_react36.Children.only(children);
|
|
9834
|
-
return /* @__PURE__ */ (0,
|
|
9910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
|
|
9835
9911
|
StyledFormField,
|
|
9836
9912
|
{
|
|
9837
9913
|
...props,
|
|
9838
9914
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9839
9915
|
children: [
|
|
9840
|
-
!isIntegratedLabel && /* @__PURE__ */ (0,
|
|
9841
|
-
(0,
|
|
9916
|
+
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9917
|
+
(0, import_type_guards32.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9842
9918
|
(0, import_react36.cloneElement)(children, childProps),
|
|
9843
|
-
(0,
|
|
9844
|
-
/* @__PURE__ */ (0,
|
|
9845
|
-
/* @__PURE__ */ (0,
|
|
9919
|
+
(0, import_type_guards32.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
|
|
9920
|
+
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", {}),
|
|
9921
|
+
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
|
|
9846
9922
|
ErrorMessages,
|
|
9847
9923
|
{
|
|
9848
9924
|
errors: computedError,
|
|
@@ -9858,7 +9934,7 @@ FormField.displayName = "FormField";
|
|
|
9858
9934
|
|
|
9859
9935
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9860
9936
|
var import_react37 = require("react");
|
|
9861
|
-
var
|
|
9937
|
+
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9862
9938
|
var RadioGroupContext = (0, import_react37.createContext)(null);
|
|
9863
9939
|
var RadioGroup = ({
|
|
9864
9940
|
children,
|
|
@@ -9873,15 +9949,15 @@ var RadioGroup = ({
|
|
|
9873
9949
|
onChange
|
|
9874
9950
|
};
|
|
9875
9951
|
}, [name, onChange]);
|
|
9876
|
-
return /* @__PURE__ */ (0,
|
|
9952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(FormGroup, { ...props, children }) });
|
|
9877
9953
|
};
|
|
9878
9954
|
RadioGroup.displayName = "RadioGroup";
|
|
9879
9955
|
|
|
9880
9956
|
// src/components/IconButton/IconButton.tsx
|
|
9881
9957
|
var import_react38 = require("react");
|
|
9882
|
-
var
|
|
9883
|
-
var
|
|
9884
|
-
var StyledButton2 = (0,
|
|
9958
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9959
|
+
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9960
|
+
var StyledButton2 = (0, import_styled_components53.default)(Button)`
|
|
9885
9961
|
--icon-button-size-sm: 24px;
|
|
9886
9962
|
--icon-button-size-md: 32px;
|
|
9887
9963
|
--icon-button-size-lg: 40px;
|
|
@@ -9898,7 +9974,7 @@ var StyledButton2 = (0, import_styled_components52.default)(Button)`
|
|
|
9898
9974
|
var IconButton = (0, import_react38.forwardRef)(
|
|
9899
9975
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9900
9976
|
const responsiveSize = useResponsiveProp(size);
|
|
9901
|
-
return /* @__PURE__ */ (0,
|
|
9977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9902
9978
|
StyledButton2,
|
|
9903
9979
|
{
|
|
9904
9980
|
...props,
|
|
@@ -9915,55 +9991,6 @@ var IconButton = (0, import_react38.forwardRef)(
|
|
|
9915
9991
|
);
|
|
9916
9992
|
IconButton.displayName = "IconButton";
|
|
9917
9993
|
|
|
9918
|
-
// src/components/Image/Image.tsx
|
|
9919
|
-
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9920
|
-
var import_type_guards32 = require("@wistia/type-guards");
|
|
9921
|
-
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9922
|
-
var getFillStyle2 = (fillContainer) => {
|
|
9923
|
-
if (fillContainer === "horizontal") {
|
|
9924
|
-
return "width: 100%;";
|
|
9925
|
-
}
|
|
9926
|
-
if (fillContainer === "vertical") {
|
|
9927
|
-
return "height: 100%;";
|
|
9928
|
-
}
|
|
9929
|
-
if (fillContainer === true) {
|
|
9930
|
-
return `
|
|
9931
|
-
width: 100%;
|
|
9932
|
-
height: 100%;
|
|
9933
|
-
`;
|
|
9934
|
-
}
|
|
9935
|
-
return void 0;
|
|
9936
|
-
};
|
|
9937
|
-
var StyledImage = import_styled_components53.default.img`
|
|
9938
|
-
border-radius: ${({ $borderRadius }) => (0, import_type_guards32.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9939
|
-
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9940
|
-
object-fit: ${({ $objFit }) => $objFit};
|
|
9941
|
-
object-position: ${({ $objPosition }) => $objPosition};
|
|
9942
|
-
`;
|
|
9943
|
-
var Image = ({
|
|
9944
|
-
src,
|
|
9945
|
-
alt,
|
|
9946
|
-
borderRadius,
|
|
9947
|
-
fill: fillContainer = false,
|
|
9948
|
-
fit: objFit,
|
|
9949
|
-
loading = "lazy",
|
|
9950
|
-
position: objPosition,
|
|
9951
|
-
...props
|
|
9952
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9953
|
-
StyledImage,
|
|
9954
|
-
{
|
|
9955
|
-
$borderRadius: borderRadius,
|
|
9956
|
-
$fillContainer: fillContainer,
|
|
9957
|
-
$objFit: objFit,
|
|
9958
|
-
$objPosition: objPosition,
|
|
9959
|
-
alt,
|
|
9960
|
-
loading,
|
|
9961
|
-
src,
|
|
9962
|
-
...props
|
|
9963
|
-
}
|
|
9964
|
-
);
|
|
9965
|
-
Image.displayName = "Image";
|
|
9966
|
-
|
|
9967
9994
|
// src/components/Menu/Menu.tsx
|
|
9968
9995
|
var import_styled_components54 = __toESM(require("styled-components"));
|
|
9969
9996
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
@@ -11381,9 +11408,9 @@ var StyledTrigger = (0, import_styled_components70.default)(import_react_select.
|
|
|
11381
11408
|
justify-content: space-between;
|
|
11382
11409
|
max-width: 100%;
|
|
11383
11410
|
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
11384
|
-
color: var(--wui-input-color-text);
|
|
11385
11411
|
font-size: var(--wui-input-font-size);
|
|
11386
11412
|
line-height: var(--wui-input-line-height);
|
|
11413
|
+
color: var(--wui-input-color-text);
|
|
11387
11414
|
|
|
11388
11415
|
> span {
|
|
11389
11416
|
white-space: nowrap;
|
|
@@ -11405,7 +11432,7 @@ var StyledTrigger = (0, import_styled_components70.default)(import_react_select.
|
|
|
11405
11432
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
11406
11433
|
}
|
|
11407
11434
|
|
|
11408
|
-
[data-placeholder] {
|
|
11435
|
+
&[data-placeholder] {
|
|
11409
11436
|
color: var(--wui-input-placeholder);
|
|
11410
11437
|
}
|
|
11411
11438
|
`;
|
|
@@ -11451,13 +11478,7 @@ var Select = (0, import_react54.forwardRef)(
|
|
|
11451
11478
|
$fullWidth: responsiveFullWidth,
|
|
11452
11479
|
...props,
|
|
11453
11480
|
children: [
|
|
11454
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
|
|
11455
|
-
import_react_select.Value,
|
|
11456
|
-
{
|
|
11457
|
-
"data-placeholder": placeholder,
|
|
11458
|
-
placeholder
|
|
11459
|
-
}
|
|
11460
|
-
),
|
|
11481
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Value, { placeholder }),
|
|
11461
11482
|
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
|
|
11462
11483
|
Icon,
|
|
11463
11484
|
{
|