@wistia/ui 0.20.17 → 0.20.18-beta.85ff93e1.aa02a44
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.d.ts +69 -1
- package/dist/index.js +731 -451
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.20.
|
|
3
|
+
* @license @wistia/ui v0.20.18-beta.85ff93e1.aa02a44
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -15391,12 +15391,271 @@ var EditableTextTrigger = ({
|
|
|
15391
15391
|
return cloneElement7(onlyChild, triggerProps);
|
|
15392
15392
|
};
|
|
15393
15393
|
|
|
15394
|
+
// src/components/FeatureCard/FeatureCard.tsx
|
|
15395
|
+
import { useEffect as useEffect19, useState as useState21, useMemo as useMemo14 } from "react";
|
|
15396
|
+
import { styled as styled69 } from "styled-components";
|
|
15397
|
+
import { isNil as isNil17, isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
15398
|
+
import { Fragment as Fragment9, jsx as jsx304, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15399
|
+
var BREAKPOINT_WIDTH2 = 600;
|
|
15400
|
+
var VERTICAL_BREAKPOINT_WIDTH2 = 284;
|
|
15401
|
+
var MIN_IMAGE_WIDTH2 = 400;
|
|
15402
|
+
var StyledFeatureCard = styled69.div`
|
|
15403
|
+
--wui-feature-card-padding: var(--wui-space-04);
|
|
15404
|
+
--wui-feature-card-content-height: ${({ $contentHeight }) => $contentHeight}px;
|
|
15405
|
+
|
|
15406
|
+
display: flex;
|
|
15407
|
+
flex-direction: row;
|
|
15408
|
+
background: var(--wui-color-bg-surface-secondary);
|
|
15409
|
+
border-radius: var(--wui-border-radius-03);
|
|
15410
|
+
position: relative;
|
|
15411
|
+
overflow: hidden;
|
|
15412
|
+
align-items: center;
|
|
15413
|
+
|
|
15414
|
+
&[data-wui-feature-card-content-prominence='secondary'] {
|
|
15415
|
+
--wui-feature-card-padding: var(--wui-space-05);
|
|
15416
|
+
|
|
15417
|
+
box-shadow: inset 0 0 0 2px var(--wui-color-border);
|
|
15418
|
+
}
|
|
15419
|
+
|
|
15420
|
+
&:has([data-wui-feature-card-image]) {
|
|
15421
|
+
--wui-feature-card-padding: var(--wui-space-05);
|
|
15422
|
+
}
|
|
15423
|
+
|
|
15424
|
+
&[data-wui-feature-card-content-prominence='small'] {
|
|
15425
|
+
--wui-feature-card-padding: var(--wui-space-04);
|
|
15426
|
+
}
|
|
15427
|
+
|
|
15428
|
+
&[data-wui-feature-card-orientation='vertical'] {
|
|
15429
|
+
flex-direction: column;
|
|
15430
|
+
align-items: stretch;
|
|
15431
|
+
}
|
|
15432
|
+
|
|
15433
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
15434
|
+
`;
|
|
15435
|
+
var FeatureCard = ({
|
|
15436
|
+
bodyText,
|
|
15437
|
+
colorScheme = "inherit",
|
|
15438
|
+
headingText,
|
|
15439
|
+
icon,
|
|
15440
|
+
image,
|
|
15441
|
+
onClose,
|
|
15442
|
+
orientation = "horizontal",
|
|
15443
|
+
primaryAction,
|
|
15444
|
+
prominence = "primary",
|
|
15445
|
+
secondaryAction,
|
|
15446
|
+
...props
|
|
15447
|
+
}) => {
|
|
15448
|
+
const [containerRef, { width }] = useElementObserver();
|
|
15449
|
+
const [contentRef, { height: contentHeight }] = useElementObserver();
|
|
15450
|
+
const [isSmallContainer, setIsSmallContainer] = useState21(false);
|
|
15451
|
+
const [isVerticalLayout, setIsVerticalLayout] = useState21(orientation === "vertical");
|
|
15452
|
+
useEffect19(() => {
|
|
15453
|
+
const breakpoint = orientation === "vertical" ? VERTICAL_BREAKPOINT_WIDTH2 : BREAKPOINT_WIDTH2;
|
|
15454
|
+
setIsSmallContainer(width <= breakpoint);
|
|
15455
|
+
if (orientation === "auto") {
|
|
15456
|
+
setIsVerticalLayout(width <= BREAKPOINT_WIDTH2);
|
|
15457
|
+
}
|
|
15458
|
+
}, [width, orientation]);
|
|
15459
|
+
const hasImage = isNotNil28(image);
|
|
15460
|
+
const shouldShowImage = hasImage && (isVerticalLayout || width >= MIN_IMAGE_WIDTH2);
|
|
15461
|
+
const iconPosition = useMemo14(() => {
|
|
15462
|
+
if (isNil17(icon)) {
|
|
15463
|
+
return "none";
|
|
15464
|
+
}
|
|
15465
|
+
if (isSmallContainer) {
|
|
15466
|
+
return shouldShowImage ? "inline" : "above";
|
|
15467
|
+
}
|
|
15468
|
+
return prominence === "secondary" ? "inline" : "above";
|
|
15469
|
+
}, [icon, isSmallContainer, shouldShowImage, prominence]);
|
|
15470
|
+
const hasActions = isNotNil28(primaryAction) || isNotNil28(secondaryAction);
|
|
15471
|
+
const contentDirection = useMemo14(() => {
|
|
15472
|
+
if (orientation === "horizontal" && !hasActions) {
|
|
15473
|
+
return "row";
|
|
15474
|
+
}
|
|
15475
|
+
return !shouldShowImage && prominence === "primary" && !isSmallContainer && !isVerticalLayout ? "row" : "column";
|
|
15476
|
+
}, [orientation, shouldShowImage, prominence, isSmallContainer, isVerticalLayout, hasActions]);
|
|
15477
|
+
const headingVariant = isSmallContainer || prominence === "primary" ? "heading5" : "heading3";
|
|
15478
|
+
const textVariant = prominence === "primary" || isSmallContainer ? "body3" : "body2";
|
|
15479
|
+
const buttonSize = isSmallContainer ? "sm" : "md";
|
|
15480
|
+
return /* @__PURE__ */ jsxs46(
|
|
15481
|
+
StyledFeatureCard,
|
|
15482
|
+
{
|
|
15483
|
+
...props,
|
|
15484
|
+
ref: containerRef,
|
|
15485
|
+
$colorScheme: colorScheme,
|
|
15486
|
+
$contentHeight: contentHeight,
|
|
15487
|
+
$width: !isSmallContainer && !isVerticalLayout ? width : void 0,
|
|
15488
|
+
"data-wui-feature-card-content-prominence": isSmallContainer ? "small" : prominence,
|
|
15489
|
+
"data-wui-feature-card-orientation": isVerticalLayout ? "vertical" : "horizontal",
|
|
15490
|
+
children: [
|
|
15491
|
+
shouldShowImage ? image : null,
|
|
15492
|
+
/* @__PURE__ */ jsxs46(
|
|
15493
|
+
Box,
|
|
15494
|
+
{
|
|
15495
|
+
ref: contentRef,
|
|
15496
|
+
alignItems: "stretch",
|
|
15497
|
+
direction: contentDirection,
|
|
15498
|
+
flexMode: "grow",
|
|
15499
|
+
gap: "space-04",
|
|
15500
|
+
style: { padding: "var(--wui-feature-card-padding)" },
|
|
15501
|
+
children: [
|
|
15502
|
+
iconPosition === "above" && /* @__PURE__ */ jsx304(
|
|
15503
|
+
Box,
|
|
15504
|
+
{
|
|
15505
|
+
alignSelf: "stretch",
|
|
15506
|
+
direction: "column",
|
|
15507
|
+
justifyContent: "center",
|
|
15508
|
+
children: icon
|
|
15509
|
+
}
|
|
15510
|
+
),
|
|
15511
|
+
/* @__PURE__ */ jsxs46(
|
|
15512
|
+
Box,
|
|
15513
|
+
{
|
|
15514
|
+
direction: "column",
|
|
15515
|
+
flexMode: contentDirection === "row" ? "grow" : "initial",
|
|
15516
|
+
gap: iconPosition === "inline" ? "space-01" : "space-00",
|
|
15517
|
+
justifyContent: "center",
|
|
15518
|
+
children: [
|
|
15519
|
+
isNotNil28(headingText) ? /* @__PURE__ */ jsxs46(Heading, { variant: headingVariant, children: [
|
|
15520
|
+
iconPosition === "inline" && /* @__PURE__ */ jsxs46(Fragment9, { children: [
|
|
15521
|
+
icon,
|
|
15522
|
+
" "
|
|
15523
|
+
] }),
|
|
15524
|
+
headingText
|
|
15525
|
+
] }) : null,
|
|
15526
|
+
/* @__PURE__ */ jsx304(Text, { variant: textVariant, children: bodyText })
|
|
15527
|
+
]
|
|
15528
|
+
}
|
|
15529
|
+
),
|
|
15530
|
+
hasActions ? /* @__PURE__ */ jsxs46(
|
|
15531
|
+
ButtonGroup,
|
|
15532
|
+
{
|
|
15533
|
+
buttonSize,
|
|
15534
|
+
collapseOnSmallScreens: false,
|
|
15535
|
+
style: { paddingRight: "var(--wui-space-02)" },
|
|
15536
|
+
children: [
|
|
15537
|
+
isNotNil28(primaryAction) && primaryAction,
|
|
15538
|
+
isNotNil28(secondaryAction) && secondaryAction
|
|
15539
|
+
]
|
|
15540
|
+
}
|
|
15541
|
+
) : null
|
|
15542
|
+
]
|
|
15543
|
+
}
|
|
15544
|
+
),
|
|
15545
|
+
isNotNil28(onClose) && /* @__PURE__ */ jsx304(
|
|
15546
|
+
IconButton,
|
|
15547
|
+
{
|
|
15548
|
+
label: "Close",
|
|
15549
|
+
onClick: onClose,
|
|
15550
|
+
size: "sm",
|
|
15551
|
+
style: {
|
|
15552
|
+
position: "absolute",
|
|
15553
|
+
top: "var(--wui-space-01)",
|
|
15554
|
+
right: "var(--wui-space-01)"
|
|
15555
|
+
},
|
|
15556
|
+
variant: "soft",
|
|
15557
|
+
children: /* @__PURE__ */ jsx304(Icon, { type: "close" })
|
|
15558
|
+
}
|
|
15559
|
+
)
|
|
15560
|
+
]
|
|
15561
|
+
}
|
|
15562
|
+
);
|
|
15563
|
+
};
|
|
15564
|
+
FeatureCard.displayName = "FeatureCard_UI";
|
|
15565
|
+
|
|
15566
|
+
// src/components/FeatureCard/FeatureCardImage.tsx
|
|
15567
|
+
import { styled as styled70 } from "styled-components";
|
|
15568
|
+
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
15569
|
+
var StyledFeatureCardImageContainer = styled70.div`
|
|
15570
|
+
--wui-feature-card-image-border-radius: var(--wui-border-radius-02);
|
|
15571
|
+
--wui-feature-card-image-height: auto;
|
|
15572
|
+
--wui-feature-card-image-width: auto;
|
|
15573
|
+
|
|
15574
|
+
overflow: hidden;
|
|
15575
|
+
padding: var(--wui-space-04);
|
|
15576
|
+
height: var(--wui-feature-card-image-height);
|
|
15577
|
+
width: var(--wui-feature-card-image-width);
|
|
15578
|
+
justify-self: stretch;
|
|
15579
|
+
align-self: stretch;
|
|
15580
|
+
max-width: 300px;
|
|
15581
|
+
|
|
15582
|
+
/* Make image container stretch full width in vertical layout and remove bottom padding */
|
|
15583
|
+
[data-wui-feature-card-orientation='vertical'] & {
|
|
15584
|
+
max-width: none;
|
|
15585
|
+
width: 100%;
|
|
15586
|
+
padding-bottom: var(--wui-space-00);
|
|
15587
|
+
}
|
|
15588
|
+
|
|
15589
|
+
/* In horizontal layout, make image height equal to the content height and apply aspect ratio */
|
|
15590
|
+
[data-wui-feature-card-orientation='horizontal'] & {
|
|
15591
|
+
--wui-feature-card-image-height: calc(
|
|
15592
|
+
var(--wui-feature-card-content-height) + (var(--wui-feature-card-padding) * 2)
|
|
15593
|
+
);
|
|
15594
|
+
|
|
15595
|
+
/* Handle image alignment and remove padding next to content */
|
|
15596
|
+
&[data-wui-feature-card-image='right'] {
|
|
15597
|
+
padding-left: var(--wui-space-00);
|
|
15598
|
+
order: 2;
|
|
15599
|
+
}
|
|
15600
|
+
|
|
15601
|
+
&[data-wui-feature-card-image='left'] {
|
|
15602
|
+
padding-right: var(--wui-space-00);
|
|
15603
|
+
}
|
|
15604
|
+
}
|
|
15605
|
+
|
|
15606
|
+
/* Remove border radius and padding in small prominence horizontal layout */
|
|
15607
|
+
[data-wui-feature-card-content-prominence='small'] & {
|
|
15608
|
+
--wui-feature-card-image-border-radius: var(--wui-border-radius-00);
|
|
15609
|
+
|
|
15610
|
+
padding: var(--wui-space-00);
|
|
15611
|
+
}
|
|
15612
|
+
|
|
15613
|
+
/* Remove border radius in secondary prominence vertical layout */
|
|
15614
|
+
[data-wui-feature-card-orientation='vertical']
|
|
15615
|
+
[data-wui-feature-card-content-prominence='secondary']
|
|
15616
|
+
& {
|
|
15617
|
+
--wui-feature-card-image-border-radius: var(--wui-border-radius-00);
|
|
15618
|
+
}
|
|
15619
|
+
|
|
15620
|
+
[data-wui-feature-card-orientation='horizontal'][data-wui-feature-card-content-prominence='small']
|
|
15621
|
+
& {
|
|
15622
|
+
flex: 0 0 25%;
|
|
15623
|
+
}
|
|
15624
|
+
|
|
15625
|
+
img {
|
|
15626
|
+
border-radius: var(--wui-feature-card-image-border-radius);
|
|
15627
|
+
}
|
|
15628
|
+
`;
|
|
15629
|
+
var FeatureCardImage = ({
|
|
15630
|
+
alignment = "left",
|
|
15631
|
+
alt,
|
|
15632
|
+
src,
|
|
15633
|
+
...props
|
|
15634
|
+
}) => {
|
|
15635
|
+
return /* @__PURE__ */ jsx305(
|
|
15636
|
+
StyledFeatureCardImageContainer,
|
|
15637
|
+
{
|
|
15638
|
+
"data-wui-feature-card-image": alignment,
|
|
15639
|
+
...props,
|
|
15640
|
+
children: /* @__PURE__ */ jsx305(
|
|
15641
|
+
Image,
|
|
15642
|
+
{
|
|
15643
|
+
alt: alt ?? "",
|
|
15644
|
+
fill: true,
|
|
15645
|
+
fit: "cover",
|
|
15646
|
+
src
|
|
15647
|
+
}
|
|
15648
|
+
)
|
|
15649
|
+
}
|
|
15650
|
+
);
|
|
15651
|
+
};
|
|
15652
|
+
|
|
15394
15653
|
// src/components/Form/useFormState.tsx
|
|
15395
|
-
import { useCallback as useCallback17, useState as
|
|
15654
|
+
import { useCallback as useCallback17, useState as useState22 } from "react";
|
|
15396
15655
|
var useFormState = (action, initialData = {}) => {
|
|
15397
|
-
const [data, setData] =
|
|
15398
|
-
const [isPending, setIsPending] =
|
|
15399
|
-
const [error, setError] =
|
|
15656
|
+
const [data, setData] = useState22(initialData);
|
|
15657
|
+
const [isPending, setIsPending] = useState22(false);
|
|
15658
|
+
const [error, setError] = useState22(null);
|
|
15400
15659
|
const formAction = useCallback17(
|
|
15401
15660
|
async (nextFormData) => {
|
|
15402
15661
|
if (nextFormData === null) {
|
|
@@ -15430,9 +15689,9 @@ var useFormState = (action, initialData = {}) => {
|
|
|
15430
15689
|
// src/components/Form/FormErrorSummary.tsx
|
|
15431
15690
|
import { useContext as useContext12, useRef as useRef20 } from "react";
|
|
15432
15691
|
import { isArray as isArray3, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
15433
|
-
import { jsx as
|
|
15692
|
+
import { jsx as jsx306, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15434
15693
|
var ErrorItem = ({ name, error, formId }) => {
|
|
15435
|
-
return /* @__PURE__ */
|
|
15694
|
+
return /* @__PURE__ */ jsx306("li", { children: /* @__PURE__ */ jsx306(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
15436
15695
|
};
|
|
15437
15696
|
var FormErrorSummary = ({ description }) => {
|
|
15438
15697
|
const ref = useRef20(null);
|
|
@@ -15441,10 +15700,10 @@ var FormErrorSummary = ({ description }) => {
|
|
|
15441
15700
|
if (isValid || !hasSubmitted) {
|
|
15442
15701
|
return null;
|
|
15443
15702
|
}
|
|
15444
|
-
return /* @__PURE__ */
|
|
15445
|
-
/* @__PURE__ */
|
|
15446
|
-
/* @__PURE__ */
|
|
15447
|
-
([name, error]) => isArray3(error) ? error.map((err) => /* @__PURE__ */
|
|
15703
|
+
return /* @__PURE__ */ jsxs47("div", { ref, children: [
|
|
15704
|
+
/* @__PURE__ */ jsx306("p", { children: description }),
|
|
15705
|
+
/* @__PURE__ */ jsx306("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined11(error)).map(
|
|
15706
|
+
([name, error]) => isArray3(error) ? error.map((err) => /* @__PURE__ */ jsx306(
|
|
15448
15707
|
ErrorItem,
|
|
15449
15708
|
{
|
|
15450
15709
|
error: err,
|
|
@@ -15452,7 +15711,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
15452
15711
|
name
|
|
15453
15712
|
},
|
|
15454
15713
|
err
|
|
15455
|
-
)) : /* @__PURE__ */
|
|
15714
|
+
)) : /* @__PURE__ */ jsx306(
|
|
15456
15715
|
ErrorItem,
|
|
15457
15716
|
{
|
|
15458
15717
|
error: error ?? "",
|
|
@@ -15491,9 +15750,9 @@ var validateWithYup = (schema) => {
|
|
|
15491
15750
|
|
|
15492
15751
|
// src/components/FormField/FormField.tsx
|
|
15493
15752
|
import { Children as Children10, cloneElement as cloneElement8, useContext as useContext13 } from "react";
|
|
15494
|
-
import { styled as
|
|
15495
|
-
import { isArray as isArray4, isNotNil as
|
|
15496
|
-
import { jsx as
|
|
15753
|
+
import { styled as styled71, css as css36 } from "styled-components";
|
|
15754
|
+
import { isArray as isArray4, isNotNil as isNotNil29, isNotUndefined as isNotUndefined13, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
15755
|
+
import { jsx as jsx307, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
15497
15756
|
var inlineErrorStyles = css36`
|
|
15498
15757
|
grid-template-rows: 1fr auto;
|
|
15499
15758
|
grid-template-areas: 'label-description input' '. error';
|
|
@@ -15506,7 +15765,7 @@ var blockGridErrorStyles = css36`
|
|
|
15506
15765
|
grid-template-rows: auto 1fr auto;
|
|
15507
15766
|
grid-template-areas: 'label-description' 'input' 'error';
|
|
15508
15767
|
`;
|
|
15509
|
-
var StyledFormField =
|
|
15768
|
+
var StyledFormField = styled71.div`
|
|
15510
15769
|
--form-field-spacing: var(--wui-space-02);
|
|
15511
15770
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
15512
15771
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -15540,10 +15799,10 @@ var StyledFormField = styled69.div`
|
|
|
15540
15799
|
${({ $hasError }) => $hasError && blockGridErrorStyles}
|
|
15541
15800
|
}
|
|
15542
15801
|
`;
|
|
15543
|
-
var ErrorText =
|
|
15802
|
+
var ErrorText = styled71(Text)`
|
|
15544
15803
|
grid-area: error;
|
|
15545
15804
|
`;
|
|
15546
|
-
var StyledErrorList =
|
|
15805
|
+
var StyledErrorList = styled71.ul`
|
|
15547
15806
|
margin: 0;
|
|
15548
15807
|
padding: 0;
|
|
15549
15808
|
padding-left: var(--wui-space-04);
|
|
@@ -15556,7 +15815,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15556
15815
|
const isErrorArray = isArray4(errors);
|
|
15557
15816
|
const isMultipleErrors = isErrorArray && errors.length > 1;
|
|
15558
15817
|
if (!isErrorArray) {
|
|
15559
|
-
return /* @__PURE__ */
|
|
15818
|
+
return /* @__PURE__ */ jsx307(
|
|
15560
15819
|
ErrorText,
|
|
15561
15820
|
{
|
|
15562
15821
|
colorScheme: "error",
|
|
@@ -15569,7 +15828,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15569
15828
|
);
|
|
15570
15829
|
}
|
|
15571
15830
|
if (!isMultipleErrors) {
|
|
15572
|
-
return /* @__PURE__ */
|
|
15831
|
+
return /* @__PURE__ */ jsx307(
|
|
15573
15832
|
ErrorText,
|
|
15574
15833
|
{
|
|
15575
15834
|
colorScheme: "error",
|
|
@@ -15581,7 +15840,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15581
15840
|
id
|
|
15582
15841
|
);
|
|
15583
15842
|
}
|
|
15584
|
-
return /* @__PURE__ */
|
|
15843
|
+
return /* @__PURE__ */ jsx307(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ jsx307(
|
|
15585
15844
|
Text,
|
|
15586
15845
|
{
|
|
15587
15846
|
colorScheme: "error",
|
|
@@ -15615,8 +15874,8 @@ var FormField = ({
|
|
|
15615
15874
|
const descriptionId = `${computedId}-description`;
|
|
15616
15875
|
const errorId = `${computedId}-error`;
|
|
15617
15876
|
const ariaDescribedby = [descriptionId, errorId].filter(Boolean).join(" ") || void 0;
|
|
15618
|
-
const hasDescription =
|
|
15619
|
-
const hasError =
|
|
15877
|
+
const hasDescription = isNotNil29(description);
|
|
15878
|
+
const hasError = isNotNil29(computedError);
|
|
15620
15879
|
const shouldRenderLabelDescriptionWrapper = !isIntegratedLabel || hasDescription;
|
|
15621
15880
|
let childProps = {
|
|
15622
15881
|
name,
|
|
@@ -15633,8 +15892,8 @@ var FormField = ({
|
|
|
15633
15892
|
defaultValue
|
|
15634
15893
|
};
|
|
15635
15894
|
}
|
|
15636
|
-
if (
|
|
15637
|
-
const computedName =
|
|
15895
|
+
if (isNotNil29(checkboxGroup)) {
|
|
15896
|
+
const computedName = isNotNil29(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
15638
15897
|
const handleChange = (event) => {
|
|
15639
15898
|
if (isNotUndefined13(props.onChange)) {
|
|
15640
15899
|
props.onChange(event);
|
|
@@ -15650,14 +15909,14 @@ var FormField = ({
|
|
|
15650
15909
|
};
|
|
15651
15910
|
}
|
|
15652
15911
|
Children10.only(children);
|
|
15653
|
-
return /* @__PURE__ */
|
|
15912
|
+
return /* @__PURE__ */ jsxs48(
|
|
15654
15913
|
StyledFormField,
|
|
15655
15914
|
{
|
|
15656
15915
|
...props,
|
|
15657
15916
|
$hasError: hasError,
|
|
15658
15917
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
15659
15918
|
children: [
|
|
15660
|
-
shouldRenderLabelDescriptionWrapper ? /* @__PURE__ */
|
|
15919
|
+
shouldRenderLabelDescriptionWrapper ? /* @__PURE__ */ jsxs48(
|
|
15661
15920
|
Stack,
|
|
15662
15921
|
{
|
|
15663
15922
|
direction: "vertical",
|
|
@@ -15666,7 +15925,7 @@ var FormField = ({
|
|
|
15666
15925
|
gridArea: "label-description"
|
|
15667
15926
|
},
|
|
15668
15927
|
children: [
|
|
15669
|
-
!isIntegratedLabel && /* @__PURE__ */
|
|
15928
|
+
!isIntegratedLabel && /* @__PURE__ */ jsx307(
|
|
15670
15929
|
Label,
|
|
15671
15930
|
{
|
|
15672
15931
|
htmlFor: computedId,
|
|
@@ -15674,12 +15933,12 @@ var FormField = ({
|
|
|
15674
15933
|
children: label
|
|
15675
15934
|
}
|
|
15676
15935
|
),
|
|
15677
|
-
hasDescription ? /* @__PURE__ */
|
|
15936
|
+
hasDescription ? /* @__PURE__ */ jsx307(FormControlLabelDescription, { id: descriptionId, children: description }) : null
|
|
15678
15937
|
]
|
|
15679
15938
|
}
|
|
15680
15939
|
) : null,
|
|
15681
15940
|
cloneElement8(children, childProps),
|
|
15682
|
-
hasError ? /* @__PURE__ */
|
|
15941
|
+
hasError ? /* @__PURE__ */ jsx307(
|
|
15683
15942
|
ErrorMessages,
|
|
15684
15943
|
{
|
|
15685
15944
|
errors: computedError,
|
|
@@ -15693,8 +15952,8 @@ var FormField = ({
|
|
|
15693
15952
|
FormField.displayName = "FormField_UI";
|
|
15694
15953
|
|
|
15695
15954
|
// src/components/FormGroup/RadioGroup.tsx
|
|
15696
|
-
import { createContext as createContext8, useMemo as
|
|
15697
|
-
import { jsx as
|
|
15955
|
+
import { createContext as createContext8, useMemo as useMemo15, useContext as useContext14 } from "react";
|
|
15956
|
+
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
15698
15957
|
var RadioGroupContext = createContext8(null);
|
|
15699
15958
|
var useRadioGroup = () => {
|
|
15700
15959
|
return useContext14(RadioGroupContext);
|
|
@@ -15708,22 +15967,22 @@ var RadioGroup = ({
|
|
|
15708
15967
|
}) => {
|
|
15709
15968
|
const formState = useContext14(FormContext);
|
|
15710
15969
|
const derivedValue = typeof formState.values[name] === "string" ? formState.values[name] : value;
|
|
15711
|
-
const context =
|
|
15970
|
+
const context = useMemo15(() => {
|
|
15712
15971
|
return {
|
|
15713
15972
|
name,
|
|
15714
15973
|
onChange,
|
|
15715
15974
|
value: derivedValue
|
|
15716
15975
|
};
|
|
15717
15976
|
}, [name, derivedValue, onChange]);
|
|
15718
|
-
return /* @__PURE__ */
|
|
15977
|
+
return /* @__PURE__ */ jsx308(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx308(FormGroup, { ...props, children }) });
|
|
15719
15978
|
};
|
|
15720
15979
|
RadioGroup.displayName = "RadioGroup_UI";
|
|
15721
15980
|
|
|
15722
15981
|
// src/components/Grid/Grid.tsx
|
|
15723
15982
|
import { forwardRef as forwardRef22 } from "react";
|
|
15724
|
-
import { styled as
|
|
15983
|
+
import { styled as styled72, css as css37 } from "styled-components";
|
|
15725
15984
|
import { isRecord as isRecord5 } from "@wistia/type-guards";
|
|
15726
|
-
import { jsx as
|
|
15985
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
15727
15986
|
var DEFAULT_ELEMENT5 = "div";
|
|
15728
15987
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
15729
15988
|
if (minChildWidth === "auto" && maxColumns === "auto") {
|
|
@@ -15751,7 +16010,7 @@ var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
|
15751
16010
|
);
|
|
15752
16011
|
`;
|
|
15753
16012
|
};
|
|
15754
|
-
var StyledGrid =
|
|
16013
|
+
var StyledGrid = styled72.div`
|
|
15755
16014
|
--wui-grid-column-gap: ${({ $columnGap }) => `var(--wui-${$columnGap})`};
|
|
15756
16015
|
--wui-grid-row-gap: ${({ $rowGap }) => `var(--wui-${$rowGap})`};
|
|
15757
16016
|
|
|
@@ -15775,7 +16034,7 @@ var GridComponent = forwardRef22(
|
|
|
15775
16034
|
const { column, row } = isRecord5(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
|
|
15776
16035
|
const responsiveColumns = useResponsiveProp(columns);
|
|
15777
16036
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
15778
|
-
return /* @__PURE__ */
|
|
16037
|
+
return /* @__PURE__ */ jsx309(
|
|
15779
16038
|
StyledGrid,
|
|
15780
16039
|
{
|
|
15781
16040
|
ref,
|
|
@@ -15795,11 +16054,11 @@ GridComponent.displayName = "Grid_UI";
|
|
|
15795
16054
|
var Grid = makePolymorphic(GridComponent);
|
|
15796
16055
|
|
|
15797
16056
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
15798
|
-
import { styled as
|
|
15799
|
-
import { forwardRef as forwardRef23, useEffect as
|
|
16057
|
+
import { styled as styled73 } from "styled-components";
|
|
16058
|
+
import { forwardRef as forwardRef23, useEffect as useEffect20, useState as useState23 } from "react";
|
|
15800
16059
|
import { isFunction as isFunction3 } from "@wistia/type-guards";
|
|
15801
|
-
import { jsx as
|
|
15802
|
-
var StyledIconButton =
|
|
16060
|
+
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
16061
|
+
var StyledIconButton = styled73(IconButton)`
|
|
15803
16062
|
/* override size for icon button since prop gets changed by Input */
|
|
15804
16063
|
height: var(--icon-button-size-sm);
|
|
15805
16064
|
width: var(--icon-button-size-sm);
|
|
@@ -15810,8 +16069,8 @@ var StyledIconButton = styled71(IconButton)`
|
|
|
15810
16069
|
var COPY_SUCCESS_DURATION = 2e3;
|
|
15811
16070
|
var InputClickToCopy = forwardRef23(
|
|
15812
16071
|
({ value, onCopy, disabled = false, ...props }, ref) => {
|
|
15813
|
-
const [isCopied, setIsCopied] =
|
|
15814
|
-
|
|
16072
|
+
const [isCopied, setIsCopied] = useState23(false);
|
|
16073
|
+
useEffect20(() => {
|
|
15815
16074
|
if (isCopied) {
|
|
15816
16075
|
const timeout = setTimeout(() => {
|
|
15817
16076
|
setIsCopied(false);
|
|
@@ -15838,7 +16097,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15838
16097
|
return value;
|
|
15839
16098
|
});
|
|
15840
16099
|
};
|
|
15841
|
-
return /* @__PURE__ */
|
|
16100
|
+
return /* @__PURE__ */ jsx310(
|
|
15842
16101
|
Input,
|
|
15843
16102
|
{
|
|
15844
16103
|
"aria-label": "Click to Copy",
|
|
@@ -15846,7 +16105,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15846
16105
|
ref,
|
|
15847
16106
|
disabled,
|
|
15848
16107
|
readOnly: true,
|
|
15849
|
-
rightIcon: /* @__PURE__ */
|
|
16108
|
+
rightIcon: /* @__PURE__ */ jsx310(
|
|
15850
16109
|
StyledIconButton,
|
|
15851
16110
|
{
|
|
15852
16111
|
colorScheme: isCopied ? "success" : "inherit",
|
|
@@ -15854,7 +16113,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15854
16113
|
label: "Copy to clipboard",
|
|
15855
16114
|
onClick: handleClick,
|
|
15856
16115
|
variant: "ghost",
|
|
15857
|
-
children: isCopied ? /* @__PURE__ */
|
|
16116
|
+
children: isCopied ? /* @__PURE__ */ jsx310(Icon, { type: "checkmark-circle" }) : /* @__PURE__ */ jsx310(Icon, { type: "save-as-copy" })
|
|
15858
16117
|
}
|
|
15859
16118
|
),
|
|
15860
16119
|
value
|
|
@@ -15865,11 +16124,11 @@ var InputClickToCopy = forwardRef23(
|
|
|
15865
16124
|
InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
15866
16125
|
|
|
15867
16126
|
// src/components/InputPassword/InputPassword.tsx
|
|
15868
|
-
import { styled as
|
|
15869
|
-
import { forwardRef as forwardRef24, useState as
|
|
16127
|
+
import { styled as styled74 } from "styled-components";
|
|
16128
|
+
import { forwardRef as forwardRef24, useState as useState24 } from "react";
|
|
15870
16129
|
import { isFunction as isFunction4 } from "@wistia/type-guards";
|
|
15871
|
-
import { jsx as
|
|
15872
|
-
var StyledIconButton2 =
|
|
16130
|
+
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
16131
|
+
var StyledIconButton2 = styled74(IconButton)`
|
|
15873
16132
|
/* override size for icon button since prop gets changed by Input */
|
|
15874
16133
|
height: var(--icon-button-size-sm);
|
|
15875
16134
|
width: var(--icon-button-size-sm);
|
|
@@ -15879,7 +16138,7 @@ var StyledIconButton2 = styled72(IconButton)`
|
|
|
15879
16138
|
`;
|
|
15880
16139
|
var InputPassword = forwardRef24(
|
|
15881
16140
|
({ onVisibilityToggle, disabled = false, ...props }, ref) => {
|
|
15882
|
-
const [isVisible, setIsVisible] =
|
|
16141
|
+
const [isVisible, setIsVisible] = useState24(false);
|
|
15883
16142
|
const handleClick = () => {
|
|
15884
16143
|
const newVisibility = !isVisible;
|
|
15885
16144
|
setIsVisible(newVisibility);
|
|
@@ -15887,13 +16146,13 @@ var InputPassword = forwardRef24(
|
|
|
15887
16146
|
onVisibilityToggle(newVisibility);
|
|
15888
16147
|
}
|
|
15889
16148
|
};
|
|
15890
|
-
return /* @__PURE__ */
|
|
16149
|
+
return /* @__PURE__ */ jsx311(
|
|
15891
16150
|
Input,
|
|
15892
16151
|
{
|
|
15893
16152
|
...props,
|
|
15894
16153
|
ref,
|
|
15895
16154
|
disabled,
|
|
15896
|
-
rightIcon: /* @__PURE__ */
|
|
16155
|
+
rightIcon: /* @__PURE__ */ jsx311(
|
|
15897
16156
|
StyledIconButton2,
|
|
15898
16157
|
{
|
|
15899
16158
|
disabled,
|
|
@@ -15901,7 +16160,7 @@ var InputPassword = forwardRef24(
|
|
|
15901
16160
|
onClick: handleClick,
|
|
15902
16161
|
tabIndex: disabled ? -1 : 0,
|
|
15903
16162
|
variant: "ghost",
|
|
15904
|
-
children: /* @__PURE__ */
|
|
16163
|
+
children: /* @__PURE__ */ jsx311(Icon, { type: isVisible ? "preview" : "hide" })
|
|
15905
16164
|
}
|
|
15906
16165
|
),
|
|
15907
16166
|
type: isVisible ? "text" : "password"
|
|
@@ -15912,16 +16171,16 @@ var InputPassword = forwardRef24(
|
|
|
15912
16171
|
InputPassword.displayName = "InputPassword_UI";
|
|
15913
16172
|
|
|
15914
16173
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
15915
|
-
import { styled as
|
|
15916
|
-
import { isNotNil as
|
|
15917
|
-
import { jsx as
|
|
15918
|
-
var StyledKeyboardShortcut =
|
|
16174
|
+
import { styled as styled75 } from "styled-components";
|
|
16175
|
+
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
16176
|
+
import { jsx as jsx312, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
16177
|
+
var StyledKeyboardShortcut = styled75.div`
|
|
15919
16178
|
align-items: center;
|
|
15920
16179
|
display: flex;
|
|
15921
16180
|
gap: var(--wui-space-02);
|
|
15922
16181
|
${({ $fullWidth }) => $fullWidth && "width: 100%; justify-content: space-between;"}
|
|
15923
16182
|
`;
|
|
15924
|
-
var StyledKey =
|
|
16183
|
+
var StyledKey = styled75.kbd`
|
|
15925
16184
|
align-items: center;
|
|
15926
16185
|
background: var(--wui-color-bg-surface-secondary);
|
|
15927
16186
|
border-bottom: 1px solid var(--wui-color-border-secondary);
|
|
@@ -15944,11 +16203,11 @@ var StyledKey = styled73.kbd`
|
|
|
15944
16203
|
min-width: 20px;
|
|
15945
16204
|
padding: 0 var(--wui-space-01);
|
|
15946
16205
|
`;
|
|
15947
|
-
var Label2 =
|
|
16206
|
+
var Label2 = styled75.span`
|
|
15948
16207
|
color: var(--wui-color-text);
|
|
15949
16208
|
font-size: 12px;
|
|
15950
16209
|
`;
|
|
15951
|
-
var KeysContainer =
|
|
16210
|
+
var KeysContainer = styled75.div`
|
|
15952
16211
|
display: flex;
|
|
15953
16212
|
gap: var(--wui-space-01);
|
|
15954
16213
|
`;
|
|
@@ -16001,14 +16260,14 @@ var KeyboardShortcut = ({
|
|
|
16001
16260
|
keyboardKeys,
|
|
16002
16261
|
fullWidth = false,
|
|
16003
16262
|
...otherProps
|
|
16004
|
-
}) => /* @__PURE__ */
|
|
16263
|
+
}) => /* @__PURE__ */ jsxs49(
|
|
16005
16264
|
StyledKeyboardShortcut,
|
|
16006
16265
|
{
|
|
16007
16266
|
$fullWidth: fullWidth,
|
|
16008
16267
|
...otherProps,
|
|
16009
16268
|
children: [
|
|
16010
|
-
|
|
16011
|
-
/* @__PURE__ */
|
|
16269
|
+
isNotNil30(label) && /* @__PURE__ */ jsx312(Label2, { children: label }),
|
|
16270
|
+
/* @__PURE__ */ jsx312(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx312(
|
|
16012
16271
|
StyledKey,
|
|
16013
16272
|
{
|
|
16014
16273
|
children: keyToString(keyboardKey)
|
|
@@ -16021,26 +16280,26 @@ var KeyboardShortcut = ({
|
|
|
16021
16280
|
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
16022
16281
|
|
|
16023
16282
|
// src/components/List/List.tsx
|
|
16024
|
-
import { isNotNil as
|
|
16025
|
-
import { styled as
|
|
16283
|
+
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
16284
|
+
import { styled as styled77, css as css38 } from "styled-components";
|
|
16026
16285
|
|
|
16027
16286
|
// src/components/List/ListItem.tsx
|
|
16028
|
-
import { styled as
|
|
16029
|
-
import { isNil as
|
|
16030
|
-
import { jsx as
|
|
16031
|
-
var ListItemComponent =
|
|
16287
|
+
import { styled as styled76 } from "styled-components";
|
|
16288
|
+
import { isNil as isNil18 } from "@wistia/type-guards";
|
|
16289
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
16290
|
+
var ListItemComponent = styled76.li`
|
|
16032
16291
|
margin-bottom: var(--wui-space-02);
|
|
16033
16292
|
`;
|
|
16034
16293
|
var ListItem = ({ children }) => {
|
|
16035
|
-
if (
|
|
16294
|
+
if (isNil18(children)) {
|
|
16036
16295
|
return null;
|
|
16037
16296
|
}
|
|
16038
|
-
return /* @__PURE__ */
|
|
16297
|
+
return /* @__PURE__ */ jsx313(ListItemComponent, { children });
|
|
16039
16298
|
};
|
|
16040
16299
|
ListItem.displayName = "ListItem_UI";
|
|
16041
16300
|
|
|
16042
16301
|
// src/components/List/List.tsx
|
|
16043
|
-
import { jsx as
|
|
16302
|
+
import { jsx as jsx314, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
16044
16303
|
var spacesStyle = css38`
|
|
16045
16304
|
overflow: hidden;
|
|
16046
16305
|
padding-left: 0;
|
|
@@ -16099,7 +16358,7 @@ var unbulletedStyle = css38`
|
|
|
16099
16358
|
list-style: none;
|
|
16100
16359
|
padding-left: 0;
|
|
16101
16360
|
`;
|
|
16102
|
-
var ListComponent =
|
|
16361
|
+
var ListComponent = styled77.ul`
|
|
16103
16362
|
list-style-position: outside;
|
|
16104
16363
|
margin: 0 0 var(--wui-space-01);
|
|
16105
16364
|
padding: 0 0 0 var(--wui-space-04);
|
|
@@ -16126,7 +16385,7 @@ var ListComponent = styled75.ul`
|
|
|
16126
16385
|
`;
|
|
16127
16386
|
var renderListComponent = (listItems, variant, { ...otherProps }) => {
|
|
16128
16387
|
const elementType = variant === "ordered" ? "ol" : "ul";
|
|
16129
|
-
return /* @__PURE__ */
|
|
16388
|
+
return /* @__PURE__ */ jsx314(
|
|
16130
16389
|
ListComponent,
|
|
16131
16390
|
{
|
|
16132
16391
|
as: elementType,
|
|
@@ -16143,7 +16402,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
16143
16402
|
const nextItem = listItems[i + 1];
|
|
16144
16403
|
const key = `item-${itemCount += 1}`;
|
|
16145
16404
|
if (Array.isArray(nextItem)) {
|
|
16146
|
-
return /* @__PURE__ */
|
|
16405
|
+
return /* @__PURE__ */ jsxs50(ListItem, { children: [
|
|
16147
16406
|
item,
|
|
16148
16407
|
renderListFromArray(nextItem, variant, otherProps)
|
|
16149
16408
|
] }, key);
|
|
@@ -16151,7 +16410,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
16151
16410
|
if (Array.isArray(item)) {
|
|
16152
16411
|
return null;
|
|
16153
16412
|
}
|
|
16154
|
-
return /* @__PURE__ */
|
|
16413
|
+
return /* @__PURE__ */ jsx314(ListItem, { children: item }, key);
|
|
16155
16414
|
});
|
|
16156
16415
|
return renderListComponent(items, variant, otherProps);
|
|
16157
16416
|
};
|
|
@@ -16162,13 +16421,13 @@ var List = ({
|
|
|
16162
16421
|
...otherProps
|
|
16163
16422
|
}) => {
|
|
16164
16423
|
const listVariant = variant ?? "bullets";
|
|
16165
|
-
if (
|
|
16424
|
+
if (isNotNil31(children)) {
|
|
16166
16425
|
if (Array.isArray(children) && !children.length) {
|
|
16167
16426
|
return null;
|
|
16168
16427
|
}
|
|
16169
16428
|
return renderListComponent(children, listVariant, otherProps);
|
|
16170
16429
|
}
|
|
16171
|
-
if (
|
|
16430
|
+
if (isNotNil31(items)) {
|
|
16172
16431
|
if (!items.length) {
|
|
16173
16432
|
return null;
|
|
16174
16433
|
}
|
|
@@ -16179,9 +16438,9 @@ var List = ({
|
|
|
16179
16438
|
List.displayName = "List_UI";
|
|
16180
16439
|
|
|
16181
16440
|
// src/components/Mark/Mark.tsx
|
|
16182
|
-
import { styled as
|
|
16183
|
-
import { jsx as
|
|
16184
|
-
var StyledMark =
|
|
16441
|
+
import { styled as styled78 } from "styled-components";
|
|
16442
|
+
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
16443
|
+
var StyledMark = styled78.mark`
|
|
16185
16444
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16186
16445
|
background-color: var(--wui-color-bg-surface-tertiary);
|
|
16187
16446
|
color: var(--wui-color-text);
|
|
@@ -16189,7 +16448,7 @@ var StyledMark = styled76.mark`
|
|
|
16189
16448
|
padding-inline: 0.1em;
|
|
16190
16449
|
margin-inline: -0.1em;
|
|
16191
16450
|
`;
|
|
16192
|
-
var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */
|
|
16451
|
+
var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */ jsx315(
|
|
16193
16452
|
StyledMark,
|
|
16194
16453
|
{
|
|
16195
16454
|
$colorScheme: colorScheme,
|
|
@@ -16200,7 +16459,7 @@ var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */
|
|
|
16200
16459
|
Mark.displayName = "Mark_UI";
|
|
16201
16460
|
|
|
16202
16461
|
// src/components/Markdown/Markdown.tsx
|
|
16203
|
-
import { styled as
|
|
16462
|
+
import { styled as styled79 } from "styled-components";
|
|
16204
16463
|
import ReactMarkdown from "react-markdown";
|
|
16205
16464
|
|
|
16206
16465
|
// src/css/baseMarkdownCss.tsx
|
|
@@ -16328,8 +16587,8 @@ var baseMarkdownCss = (textSize = "body2") => css39`
|
|
|
16328
16587
|
`;
|
|
16329
16588
|
|
|
16330
16589
|
// src/components/Markdown/Markdown.tsx
|
|
16331
|
-
import { jsx as
|
|
16332
|
-
var StyledMarkdownWrapper =
|
|
16590
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
16591
|
+
var StyledMarkdownWrapper = styled79.div`
|
|
16333
16592
|
${({ $textSize }) => baseMarkdownCss($textSize)}
|
|
16334
16593
|
`;
|
|
16335
16594
|
var Markdown = ({
|
|
@@ -16338,47 +16597,47 @@ var Markdown = ({
|
|
|
16338
16597
|
...otherProps
|
|
16339
16598
|
}) => {
|
|
16340
16599
|
const responsiveTextSize = useResponsiveProp(textSize);
|
|
16341
|
-
return /* @__PURE__ */
|
|
16600
|
+
return /* @__PURE__ */ jsx316(
|
|
16342
16601
|
StyledMarkdownWrapper,
|
|
16343
16602
|
{
|
|
16344
16603
|
$textSize: responsiveTextSize,
|
|
16345
16604
|
...otherProps,
|
|
16346
|
-
children: /* @__PURE__ */
|
|
16605
|
+
children: /* @__PURE__ */ jsx316(ReactMarkdown, { children })
|
|
16347
16606
|
}
|
|
16348
16607
|
);
|
|
16349
16608
|
};
|
|
16350
16609
|
Markdown.displayName = "Markdown_UI";
|
|
16351
16610
|
|
|
16352
16611
|
// src/components/Meter/Meter.tsx
|
|
16353
|
-
import { styled as
|
|
16612
|
+
import { styled as styled80 } from "styled-components";
|
|
16354
16613
|
import { useId as useId5 } from "react";
|
|
16355
|
-
import { isNotNil as
|
|
16356
|
-
import { jsx as
|
|
16357
|
-
var MeterWrapper =
|
|
16614
|
+
import { isNotNil as isNotNil32 } from "@wistia/type-guards";
|
|
16615
|
+
import { jsx as jsx317, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
16616
|
+
var MeterWrapper = styled80.div`
|
|
16358
16617
|
--meter-height: 16px;
|
|
16359
16618
|
|
|
16360
16619
|
display: flex;
|
|
16361
16620
|
flex-direction: column;
|
|
16362
16621
|
gap: var(--wui-space-02);
|
|
16363
16622
|
`;
|
|
16364
|
-
var MeterLabelContainer =
|
|
16623
|
+
var MeterLabelContainer = styled80.div`
|
|
16365
16624
|
display: flex;
|
|
16366
16625
|
justify-content: space-between;
|
|
16367
16626
|
align-items: baseline;
|
|
16368
16627
|
`;
|
|
16369
|
-
var MeterLabel =
|
|
16628
|
+
var MeterLabel = styled80.div`
|
|
16370
16629
|
font-family: var(--wui-typography-heading-5-family);
|
|
16371
16630
|
line-height: var(--wui-typography-heading-5-line-height);
|
|
16372
16631
|
font-size: var(--wui-typography-heading-5-size);
|
|
16373
16632
|
font-weight: var(--wui-typography-heading-5-weight);
|
|
16374
16633
|
`;
|
|
16375
|
-
var MeterLabelMeta =
|
|
16634
|
+
var MeterLabelMeta = styled80.div`
|
|
16376
16635
|
font-family: var(--wui-typography-heading-5-family);
|
|
16377
16636
|
line-height: var(--wui-typography-heading-5-line-height);
|
|
16378
16637
|
font-size: var(--wui-typography-heading-5-size);
|
|
16379
16638
|
font-weight: var(--wui-typography-heading-5-weight);
|
|
16380
16639
|
`;
|
|
16381
|
-
var MeterBarContainer =
|
|
16640
|
+
var MeterBarContainer = styled80.div`
|
|
16382
16641
|
position: relative;
|
|
16383
16642
|
overflow: hidden;
|
|
16384
16643
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -16387,7 +16646,7 @@ var MeterBarContainer = styled78.div`
|
|
|
16387
16646
|
height: var(--meter-height);
|
|
16388
16647
|
transform: translateZ(0);
|
|
16389
16648
|
`;
|
|
16390
|
-
var MeterSegmentBar =
|
|
16649
|
+
var MeterSegmentBar = styled80.div`
|
|
16391
16650
|
position: absolute;
|
|
16392
16651
|
top: 0;
|
|
16393
16652
|
left: ${({ $offset }) => $offset}%;
|
|
@@ -16405,30 +16664,30 @@ var MeterSegmentBar = styled78.div`
|
|
|
16405
16664
|
border-bottom-right-radius: var(--wui-border-radius-rounded);
|
|
16406
16665
|
}
|
|
16407
16666
|
`;
|
|
16408
|
-
var MeterDescription =
|
|
16667
|
+
var MeterDescription = styled80.div`
|
|
16409
16668
|
line-height: var(--wui-typography-label-3-line-height);
|
|
16410
16669
|
font-size: var(--wui-typography-label-3-size);
|
|
16411
16670
|
font-weight: var(--wui-typography-label-3-weight);
|
|
16412
16671
|
color: var(--wui-color-text-secondary);
|
|
16413
16672
|
`;
|
|
16414
|
-
var MeterKey =
|
|
16673
|
+
var MeterKey = styled80.div`
|
|
16415
16674
|
display: flex;
|
|
16416
16675
|
flex-wrap: wrap;
|
|
16417
16676
|
gap: var(--wui-space-03);
|
|
16418
16677
|
`;
|
|
16419
|
-
var MeterKeyItem =
|
|
16678
|
+
var MeterKeyItem = styled80.div`
|
|
16420
16679
|
display: flex;
|
|
16421
16680
|
align-items: center;
|
|
16422
16681
|
gap: var(--wui-space-01);
|
|
16423
16682
|
`;
|
|
16424
|
-
var MeterKeyColorIndicator =
|
|
16683
|
+
var MeterKeyColorIndicator = styled80.div`
|
|
16425
16684
|
width: 8px;
|
|
16426
16685
|
height: 8px;
|
|
16427
16686
|
border-radius: 50%;
|
|
16428
16687
|
background-color: ${({ $color }) => `var(--wui-${$color})`};
|
|
16429
16688
|
flex-shrink: 0;
|
|
16430
16689
|
`;
|
|
16431
|
-
var MeterKeyLabel =
|
|
16690
|
+
var MeterKeyLabel = styled80.span`
|
|
16432
16691
|
line-height: var(--wui-typography-label-3-line-height);
|
|
16433
16692
|
font-size: var(--wui-typography-label-3-size);
|
|
16434
16693
|
font-weight: var(--wui-typography-label-3-weight);
|
|
@@ -16474,38 +16733,38 @@ var Meter = ({
|
|
|
16474
16733
|
return acc;
|
|
16475
16734
|
}, []);
|
|
16476
16735
|
const keySegments = segmentsWithOffsets.filter(
|
|
16477
|
-
(segment) =>
|
|
16736
|
+
(segment) => isNotNil32(segment.label)
|
|
16478
16737
|
);
|
|
16479
16738
|
const totalValue = segments.reduce((sum, segment) => sum + segment.value, 0);
|
|
16480
16739
|
const generateAriaDescription = () => {
|
|
16481
|
-
const segmentDescriptions = segments.filter((segment) =>
|
|
16740
|
+
const segmentDescriptions = segments.filter((segment) => isNotNil32(segment.label)).map((segment) => `${nodeToString(segment.label)}: ${segment.value}%`).join(", ");
|
|
16482
16741
|
const totalDescription = `Total: ${totalValue} out of ${max}`;
|
|
16483
16742
|
return segmentDescriptions ? `${segmentDescriptions}. ${totalDescription}` : totalDescription;
|
|
16484
16743
|
};
|
|
16485
|
-
const effectiveAriaLabel = ariaLabel ?? (
|
|
16486
|
-
return /* @__PURE__ */
|
|
16487
|
-
/* @__PURE__ */
|
|
16744
|
+
const effectiveAriaLabel = ariaLabel ?? (isNotNil32(label) ? nodeToString(label) : "Data meter");
|
|
16745
|
+
return /* @__PURE__ */ jsxs51(MeterWrapper, { ...props, children: [
|
|
16746
|
+
/* @__PURE__ */ jsx317(
|
|
16488
16747
|
ScreenReaderOnly,
|
|
16489
16748
|
{
|
|
16490
16749
|
id: descriptionId,
|
|
16491
16750
|
text: generateAriaDescription()
|
|
16492
16751
|
}
|
|
16493
16752
|
),
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16753
|
+
isNotNil32(label) || isNotNil32(labelMeta) ? /* @__PURE__ */ jsxs51(MeterLabelContainer, { id: labelId, children: [
|
|
16754
|
+
isNotNil32(label) ? /* @__PURE__ */ jsx317(MeterLabel, { children: label }) : null,
|
|
16755
|
+
isNotNil32(labelMeta) ? /* @__PURE__ */ jsx317(MeterLabelMeta, { children: labelMeta }) : null
|
|
16497
16756
|
] }) : null,
|
|
16498
|
-
/* @__PURE__ */
|
|
16757
|
+
/* @__PURE__ */ jsx317(
|
|
16499
16758
|
MeterBarContainer,
|
|
16500
16759
|
{
|
|
16501
16760
|
"aria-describedby": descriptionId,
|
|
16502
16761
|
"aria-label": effectiveAriaLabel,
|
|
16503
|
-
"aria-labelledby":
|
|
16762
|
+
"aria-labelledby": isNotNil32(label) || isNotNil32(labelMeta) ? labelId : void 0,
|
|
16504
16763
|
"aria-valuemax": max,
|
|
16505
16764
|
"aria-valuemin": 0,
|
|
16506
16765
|
"aria-valuenow": totalValue,
|
|
16507
16766
|
role: "meter",
|
|
16508
|
-
children: segmentsWithOffsets.map((segment) => /* @__PURE__ */
|
|
16767
|
+
children: segmentsWithOffsets.map((segment) => /* @__PURE__ */ jsx317(
|
|
16509
16768
|
MeterSegmentBar,
|
|
16510
16769
|
{
|
|
16511
16770
|
$color: segment.color,
|
|
@@ -16517,25 +16776,25 @@ var Meter = ({
|
|
|
16517
16776
|
))
|
|
16518
16777
|
}
|
|
16519
16778
|
),
|
|
16520
|
-
|
|
16521
|
-
!hideKey && keySegments.length > 0 ? /* @__PURE__ */
|
|
16779
|
+
isNotNil32(description) ? /* @__PURE__ */ jsx317(MeterDescription, { children: description }) : null,
|
|
16780
|
+
!hideKey && keySegments.length > 0 ? /* @__PURE__ */ jsx317(
|
|
16522
16781
|
MeterKey,
|
|
16523
16782
|
{
|
|
16524
16783
|
"aria-label": "Meter legend",
|
|
16525
16784
|
role: "list",
|
|
16526
|
-
children: keySegments.map((segment) => /* @__PURE__ */
|
|
16785
|
+
children: keySegments.map((segment) => /* @__PURE__ */ jsxs51(
|
|
16527
16786
|
MeterKeyItem,
|
|
16528
16787
|
{
|
|
16529
16788
|
role: "listitem",
|
|
16530
16789
|
children: [
|
|
16531
|
-
/* @__PURE__ */
|
|
16790
|
+
/* @__PURE__ */ jsx317(
|
|
16532
16791
|
MeterKeyColorIndicator,
|
|
16533
16792
|
{
|
|
16534
16793
|
$color: segment.color,
|
|
16535
16794
|
"aria-hidden": "true"
|
|
16536
16795
|
}
|
|
16537
16796
|
),
|
|
16538
|
-
/* @__PURE__ */
|
|
16797
|
+
/* @__PURE__ */ jsx317(MeterKeyLabel, { children: segment.label })
|
|
16539
16798
|
]
|
|
16540
16799
|
},
|
|
16541
16800
|
`${segment.color}-${segment.value}-${segment.offset}-${nodeToString(segment.label)}`
|
|
@@ -16548,40 +16807,40 @@ Meter.displayName = "Meter_UI";
|
|
|
16548
16807
|
|
|
16549
16808
|
// src/components/Modal/Modal.tsx
|
|
16550
16809
|
import { forwardRef as forwardRef26 } from "react";
|
|
16551
|
-
import { styled as
|
|
16810
|
+
import { styled as styled85 } from "styled-components";
|
|
16552
16811
|
import {
|
|
16553
16812
|
Root as DialogRoot,
|
|
16554
16813
|
Portal as DialogPortal,
|
|
16555
16814
|
Description as DialogDescription
|
|
16556
16815
|
} from "@radix-ui/react-dialog";
|
|
16557
|
-
import { isNotNil as
|
|
16816
|
+
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
16558
16817
|
|
|
16559
16818
|
// src/components/Modal/ModalHeader.tsx
|
|
16560
|
-
import { styled as
|
|
16819
|
+
import { styled as styled82 } from "styled-components";
|
|
16561
16820
|
import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
16562
16821
|
|
|
16563
16822
|
// src/components/Modal/ModalCloseButton.tsx
|
|
16564
|
-
import { styled as
|
|
16823
|
+
import { styled as styled81 } from "styled-components";
|
|
16565
16824
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
16566
|
-
import { jsx as
|
|
16567
|
-
var CloseButton =
|
|
16825
|
+
import { jsx as jsx318 } from "react/jsx-runtime";
|
|
16826
|
+
var CloseButton = styled81(DialogClose)`
|
|
16568
16827
|
align-self: start;
|
|
16569
16828
|
`;
|
|
16570
16829
|
var ModalCloseButton = () => {
|
|
16571
|
-
return /* @__PURE__ */
|
|
16830
|
+
return /* @__PURE__ */ jsx318(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx318(
|
|
16572
16831
|
IconButton,
|
|
16573
16832
|
{
|
|
16574
16833
|
label: "Dismiss modal",
|
|
16575
16834
|
size: "sm",
|
|
16576
16835
|
variant: "ghost",
|
|
16577
|
-
children: /* @__PURE__ */
|
|
16836
|
+
children: /* @__PURE__ */ jsx318(Icon, { type: "close" })
|
|
16578
16837
|
}
|
|
16579
16838
|
) });
|
|
16580
16839
|
};
|
|
16581
16840
|
|
|
16582
16841
|
// src/components/Modal/ModalHeader.tsx
|
|
16583
|
-
import { jsx as
|
|
16584
|
-
var Header =
|
|
16842
|
+
import { jsx as jsx319, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16843
|
+
var Header = styled82.header`
|
|
16585
16844
|
display: flex;
|
|
16586
16845
|
order: 1;
|
|
16587
16846
|
padding: 0 var(--wui-space-05);
|
|
@@ -16601,7 +16860,7 @@ var Header = styled80.header`
|
|
|
16601
16860
|
top: var(--wui-space-03);
|
|
16602
16861
|
}
|
|
16603
16862
|
`;
|
|
16604
|
-
var Title =
|
|
16863
|
+
var Title = styled82(DialogTitle)`
|
|
16605
16864
|
font-family: var(--wui-typography-heading-2-family);
|
|
16606
16865
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
16607
16866
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -16612,15 +16871,15 @@ var ModalHeader = ({
|
|
|
16612
16871
|
hideTitle,
|
|
16613
16872
|
hideCloseButton
|
|
16614
16873
|
}) => {
|
|
16615
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */
|
|
16616
|
-
return /* @__PURE__ */
|
|
16874
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx319(ScreenReaderOnly, { children: /* @__PURE__ */ jsx319(Title, { children: title }) }) : /* @__PURE__ */ jsx319(Title, { children: title });
|
|
16875
|
+
return /* @__PURE__ */ jsxs52(
|
|
16617
16876
|
Header,
|
|
16618
16877
|
{
|
|
16619
16878
|
$hideCloseButon: hideCloseButton,
|
|
16620
16879
|
$hideTitle: hideTitle,
|
|
16621
16880
|
children: [
|
|
16622
16881
|
TitleComponent,
|
|
16623
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
16882
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx319(ModalCloseButton, {})
|
|
16624
16883
|
]
|
|
16625
16884
|
}
|
|
16626
16885
|
);
|
|
@@ -16628,23 +16887,23 @@ var ModalHeader = ({
|
|
|
16628
16887
|
|
|
16629
16888
|
// src/components/Modal/ModalContent.tsx
|
|
16630
16889
|
import { forwardRef as forwardRef25 } from "react";
|
|
16631
|
-
import { styled as
|
|
16890
|
+
import { styled as styled83, css as css40, keyframes as keyframes5 } from "styled-components";
|
|
16632
16891
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
16633
16892
|
|
|
16634
16893
|
// src/components/Modal/constants.ts
|
|
16635
16894
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
16636
16895
|
|
|
16637
16896
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
16638
|
-
import { useRef as useRef21, useEffect as
|
|
16639
|
-
import { isNotNil as
|
|
16897
|
+
import { useRef as useRef21, useEffect as useEffect21 } from "react";
|
|
16898
|
+
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
16640
16899
|
var useFocusRestore = () => {
|
|
16641
16900
|
const previouslyFocusedRef = useRef21(null);
|
|
16642
|
-
|
|
16901
|
+
useEffect21(() => {
|
|
16643
16902
|
previouslyFocusedRef.current = document.activeElement;
|
|
16644
16903
|
}, []);
|
|
16645
|
-
|
|
16904
|
+
useEffect21(() => {
|
|
16646
16905
|
return () => {
|
|
16647
|
-
if (
|
|
16906
|
+
if (isNotNil33(previouslyFocusedRef.current)) {
|
|
16648
16907
|
setTimeout(() => {
|
|
16649
16908
|
previouslyFocusedRef.current?.focus();
|
|
16650
16909
|
}, 0);
|
|
@@ -16654,7 +16913,7 @@ var useFocusRestore = () => {
|
|
|
16654
16913
|
};
|
|
16655
16914
|
|
|
16656
16915
|
// src/components/Modal/ModalContent.tsx
|
|
16657
|
-
import { jsx as
|
|
16916
|
+
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
16658
16917
|
var modalEnter = keyframes5`
|
|
16659
16918
|
from {
|
|
16660
16919
|
opacity: 0;
|
|
@@ -16752,7 +17011,7 @@ var positionStyleMap = {
|
|
|
16752
17011
|
"fixed-top": fixedTopModalStyles,
|
|
16753
17012
|
"right-side-panel": rightSidePanelModalStyles
|
|
16754
17013
|
};
|
|
16755
|
-
var StyledModalContent =
|
|
17014
|
+
var StyledModalContent = styled83(DialogContent)`
|
|
16756
17015
|
position: fixed;
|
|
16757
17016
|
display: flex;
|
|
16758
17017
|
flex-direction: column;
|
|
@@ -16782,7 +17041,7 @@ var StyledModalContent = styled81(DialogContent)`
|
|
|
16782
17041
|
var ModalContent = forwardRef25(
|
|
16783
17042
|
({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
|
|
16784
17043
|
useFocusRestore();
|
|
16785
|
-
return /* @__PURE__ */
|
|
17044
|
+
return /* @__PURE__ */ jsx320(
|
|
16786
17045
|
StyledModalContent,
|
|
16787
17046
|
{
|
|
16788
17047
|
ref,
|
|
@@ -16797,7 +17056,7 @@ var ModalContent = forwardRef25(
|
|
|
16797
17056
|
|
|
16798
17057
|
// src/components/Modal/ModalOverlay.tsx
|
|
16799
17058
|
import { DialogOverlay } from "@radix-ui/react-dialog";
|
|
16800
|
-
import { styled as
|
|
17059
|
+
import { styled as styled84, keyframes as keyframes6 } from "styled-components";
|
|
16801
17060
|
var backdropShow = keyframes6`
|
|
16802
17061
|
from {
|
|
16803
17062
|
opacity: 0;
|
|
@@ -16816,7 +17075,7 @@ var backdropHide = keyframes6`
|
|
|
16816
17075
|
opacity: 0;
|
|
16817
17076
|
}
|
|
16818
17077
|
`;
|
|
16819
|
-
var ModalOverlay =
|
|
17078
|
+
var ModalOverlay = styled84(DialogOverlay)`
|
|
16820
17079
|
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
16821
17080
|
background: var(--wui-color-backdrop);
|
|
16822
17081
|
inset: 0;
|
|
@@ -16829,20 +17088,20 @@ var ModalOverlay = styled82(DialogOverlay)`
|
|
|
16829
17088
|
`;
|
|
16830
17089
|
|
|
16831
17090
|
// src/components/Modal/Modal.tsx
|
|
16832
|
-
import { jsx as
|
|
16833
|
-
var ModalHiddenDescription =
|
|
16834
|
-
var ModalBody =
|
|
17091
|
+
import { jsx as jsx321, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
17092
|
+
var ModalHiddenDescription = styled85(DialogDescription)({ ...visuallyHiddenStyle });
|
|
17093
|
+
var ModalBody = styled85.div`
|
|
16835
17094
|
flex-direction: column;
|
|
16836
17095
|
display: flex;
|
|
16837
17096
|
flex: 1 0 0;
|
|
16838
17097
|
padding: 0 var(--wui-space-05);
|
|
16839
17098
|
`;
|
|
16840
|
-
var ModalScrollArea =
|
|
17099
|
+
var ModalScrollArea = styled85.div`
|
|
16841
17100
|
order: 2;
|
|
16842
17101
|
max-height: 90vh;
|
|
16843
17102
|
overflow-y: auto;
|
|
16844
17103
|
`;
|
|
16845
|
-
var ModalFooter =
|
|
17104
|
+
var ModalFooter = styled85.footer`
|
|
16846
17105
|
padding: 0 var(--wui-space-05);
|
|
16847
17106
|
order: 3;
|
|
16848
17107
|
`;
|
|
@@ -16860,23 +17119,23 @@ var Modal = forwardRef26(
|
|
|
16860
17119
|
width = DEFAULT_MODAL_WIDTH,
|
|
16861
17120
|
...props
|
|
16862
17121
|
}, ref) => {
|
|
16863
|
-
return /* @__PURE__ */
|
|
17122
|
+
return /* @__PURE__ */ jsx321(
|
|
16864
17123
|
DialogRoot,
|
|
16865
17124
|
{
|
|
16866
17125
|
onOpenChange: (open2) => {
|
|
16867
|
-
if (!open2 &&
|
|
17126
|
+
if (!open2 && isNotNil34(onRequestClose)) {
|
|
16868
17127
|
onRequestClose();
|
|
16869
17128
|
}
|
|
16870
17129
|
},
|
|
16871
17130
|
open: isOpen,
|
|
16872
|
-
children: /* @__PURE__ */
|
|
16873
|
-
/* @__PURE__ */
|
|
16874
|
-
/* @__PURE__ */
|
|
17131
|
+
children: /* @__PURE__ */ jsxs53(DialogPortal, { children: [
|
|
17132
|
+
/* @__PURE__ */ jsx321(ModalOverlay, {}),
|
|
17133
|
+
/* @__PURE__ */ jsxs53(
|
|
16875
17134
|
ModalContent,
|
|
16876
17135
|
{
|
|
16877
17136
|
ref,
|
|
16878
17137
|
onOpenAutoFocus: (event) => {
|
|
16879
|
-
if (
|
|
17138
|
+
if (isNotNil34(initialFocusRef) && initialFocusRef.current) {
|
|
16880
17139
|
event.preventDefault();
|
|
16881
17140
|
requestAnimationFrame(() => {
|
|
16882
17141
|
initialFocusRef.current?.focus();
|
|
@@ -16887,9 +17146,9 @@ var Modal = forwardRef26(
|
|
|
16887
17146
|
width,
|
|
16888
17147
|
...props,
|
|
16889
17148
|
children: [
|
|
16890
|
-
/* @__PURE__ */
|
|
16891
|
-
|
|
16892
|
-
hideCloseButton && hideTitle ? null : /* @__PURE__ */
|
|
17149
|
+
/* @__PURE__ */ jsx321(ModalScrollArea, { children: /* @__PURE__ */ jsx321(ModalBody, { children }) }),
|
|
17150
|
+
isNotNil34(footer) ? /* @__PURE__ */ jsx321(ModalFooter, { children: footer }) : null,
|
|
17151
|
+
hideCloseButton && hideTitle ? null : /* @__PURE__ */ jsx321(
|
|
16893
17152
|
ModalHeader,
|
|
16894
17153
|
{
|
|
16895
17154
|
hideCloseButton,
|
|
@@ -16897,7 +17156,7 @@ var Modal = forwardRef26(
|
|
|
16897
17156
|
title
|
|
16898
17157
|
}
|
|
16899
17158
|
),
|
|
16900
|
-
/* @__PURE__ */
|
|
17159
|
+
/* @__PURE__ */ jsx321(ModalHiddenDescription, {})
|
|
16901
17160
|
]
|
|
16902
17161
|
}
|
|
16903
17162
|
)
|
|
@@ -16909,9 +17168,9 @@ var Modal = forwardRef26(
|
|
|
16909
17168
|
Modal.displayName = "Modal_UI";
|
|
16910
17169
|
|
|
16911
17170
|
// src/components/Modal/ModalCallouts.tsx
|
|
16912
|
-
import { jsx as
|
|
17171
|
+
import { jsx as jsx322, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
16913
17172
|
var ModalCallouts = ({ children }) => {
|
|
16914
|
-
return /* @__PURE__ */
|
|
17173
|
+
return /* @__PURE__ */ jsx322(
|
|
16915
17174
|
Stack,
|
|
16916
17175
|
{
|
|
16917
17176
|
direction: "horizontal",
|
|
@@ -16922,9 +17181,9 @@ var ModalCallouts = ({ children }) => {
|
|
|
16922
17181
|
};
|
|
16923
17182
|
ModalCallouts.displayName = "ModalCallouts_UI";
|
|
16924
17183
|
var ModalCallout = ({ title, image, children }) => {
|
|
16925
|
-
return /* @__PURE__ */
|
|
17184
|
+
return /* @__PURE__ */ jsxs54(Stack, { direction: "vertical", children: [
|
|
16926
17185
|
image,
|
|
16927
|
-
/* @__PURE__ */
|
|
17186
|
+
/* @__PURE__ */ jsx322(Heading, { variant: "heading4", children: title }),
|
|
16928
17187
|
children
|
|
16929
17188
|
] });
|
|
16930
17189
|
};
|
|
@@ -16932,19 +17191,19 @@ ModalCallout.displayName = "ModalCallout_UI";
|
|
|
16932
17191
|
|
|
16933
17192
|
// src/components/Popover/Popover.tsx
|
|
16934
17193
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
16935
|
-
import { styled as
|
|
17194
|
+
import { styled as styled87, css as css42 } from "styled-components";
|
|
16936
17195
|
|
|
16937
17196
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
16938
|
-
import { isNotNil as
|
|
17197
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
16939
17198
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
16940
|
-
return
|
|
17199
|
+
return isNotNil35(onOpenChange) && isNotNil35(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
16941
17200
|
};
|
|
16942
17201
|
|
|
16943
17202
|
// src/components/Popover/PopoverArrow.tsx
|
|
16944
17203
|
import { PopoverArrow as RadixPopoverArrow } from "@radix-ui/react-popover";
|
|
16945
|
-
import { styled as
|
|
16946
|
-
import { jsx as
|
|
16947
|
-
var StyledPath =
|
|
17204
|
+
import { styled as styled86, css as css41, keyframes as keyframes7 } from "styled-components";
|
|
17205
|
+
import { jsx as jsx323, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
17206
|
+
var StyledPath = styled86.path`
|
|
16948
17207
|
fill: var(--wui-color-border-secondary);
|
|
16949
17208
|
`;
|
|
16950
17209
|
var circleAnimation = keyframes7`
|
|
@@ -16955,7 +17214,7 @@ var circleAnimation = keyframes7`
|
|
|
16955
17214
|
opacity: 0;
|
|
16956
17215
|
}
|
|
16957
17216
|
`;
|
|
16958
|
-
var StyledCircle =
|
|
17217
|
+
var StyledCircle = styled86.circle`
|
|
16959
17218
|
stroke: var(--wui-color-border-active);
|
|
16960
17219
|
animation-duration: 2s;
|
|
16961
17220
|
animation-iteration-count: infinite;
|
|
@@ -16982,7 +17241,7 @@ var StyledCircle = styled84.circle`
|
|
|
16982
17241
|
}
|
|
16983
17242
|
`;
|
|
16984
17243
|
var PopoverArrow = ({ isAnimated }) => {
|
|
16985
|
-
return /* @__PURE__ */
|
|
17244
|
+
return /* @__PURE__ */ jsx323(RadixPopoverArrow, { asChild: true, children: /* @__PURE__ */ jsxs55(
|
|
16986
17245
|
"svg",
|
|
16987
17246
|
{
|
|
16988
17247
|
fill: "none",
|
|
@@ -16991,8 +17250,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16991
17250
|
width: "48",
|
|
16992
17251
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16993
17252
|
children: [
|
|
16994
|
-
/* @__PURE__ */
|
|
16995
|
-
/* @__PURE__ */
|
|
17253
|
+
/* @__PURE__ */ jsx323(StyledPath, { d: "M24 26.6667C21.0545 26.6667 18.6667 29.0545 18.6667 32C18.6667 34.9455 21.0545 37.3333 24 37.3333C26.9455 37.3333 29.3333 34.9455 29.3333 32C29.3333 29.0545 26.9455 26.6667 24 26.6667ZM23 0V32H25V0H23Z" }),
|
|
17254
|
+
/* @__PURE__ */ jsx323(
|
|
16996
17255
|
StyledCircle,
|
|
16997
17256
|
{
|
|
16998
17257
|
$isAnimated: isAnimated,
|
|
@@ -17003,7 +17262,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
17003
17262
|
strokeWidth: "4"
|
|
17004
17263
|
}
|
|
17005
17264
|
),
|
|
17006
|
-
/* @__PURE__ */
|
|
17265
|
+
/* @__PURE__ */ jsx323(
|
|
17007
17266
|
StyledCircle,
|
|
17008
17267
|
{
|
|
17009
17268
|
$isAnimated: isAnimated,
|
|
@@ -17021,8 +17280,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
17021
17280
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
17022
17281
|
|
|
17023
17282
|
// src/components/Popover/Popover.tsx
|
|
17024
|
-
import { jsx as
|
|
17025
|
-
var StyledContent2 =
|
|
17283
|
+
import { jsx as jsx324, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
17284
|
+
var StyledContent2 = styled87(Content2)`
|
|
17026
17285
|
z-index: var(--wui-zindex-popover);
|
|
17027
17286
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
17028
17287
|
${({ $unstyled }) => !$unstyled && css42`
|
|
@@ -17061,9 +17320,9 @@ var Popover = ({
|
|
|
17061
17320
|
"--wui-popover-max-width": maxWidth,
|
|
17062
17321
|
"--wui-popover-max-height": maxHeight
|
|
17063
17322
|
};
|
|
17064
|
-
return /* @__PURE__ */
|
|
17065
|
-
/* @__PURE__ */
|
|
17066
|
-
/* @__PURE__ */
|
|
17323
|
+
return /* @__PURE__ */ jsxs56(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
17324
|
+
/* @__PURE__ */ jsx324(Trigger2, { asChild: true, children: trigger }),
|
|
17325
|
+
/* @__PURE__ */ jsx324(Portal, { children: /* @__PURE__ */ jsxs56(
|
|
17067
17326
|
StyledContent2,
|
|
17068
17327
|
{
|
|
17069
17328
|
$colorScheme: colorScheme,
|
|
@@ -17072,17 +17331,17 @@ var Popover = ({
|
|
|
17072
17331
|
$unstyled: unstyled,
|
|
17073
17332
|
style,
|
|
17074
17333
|
children: [
|
|
17075
|
-
!hideCloseButton && /* @__PURE__ */
|
|
17334
|
+
!hideCloseButton && /* @__PURE__ */ jsx324(Close, { asChild: true, children: /* @__PURE__ */ jsx324(
|
|
17076
17335
|
IconButton,
|
|
17077
17336
|
{
|
|
17078
17337
|
"data-wui-popover-close": true,
|
|
17079
17338
|
label: "Close",
|
|
17080
17339
|
variant: "ghost",
|
|
17081
|
-
children: /* @__PURE__ */
|
|
17340
|
+
children: /* @__PURE__ */ jsx324(Icon, { type: "close" })
|
|
17082
17341
|
}
|
|
17083
17342
|
) }),
|
|
17084
|
-
withArrow ? /* @__PURE__ */
|
|
17085
|
-
/* @__PURE__ */
|
|
17343
|
+
withArrow ? /* @__PURE__ */ jsx324(PopoverArrow, { isAnimated }) : null,
|
|
17344
|
+
/* @__PURE__ */ jsx324("div", { children })
|
|
17086
17345
|
]
|
|
17087
17346
|
}
|
|
17088
17347
|
) })
|
|
@@ -17091,11 +17350,11 @@ var Popover = ({
|
|
|
17091
17350
|
Popover.displayName = "Popover_UI";
|
|
17092
17351
|
|
|
17093
17352
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
17094
|
-
import { styled as
|
|
17353
|
+
import { styled as styled88 } from "styled-components";
|
|
17095
17354
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
17096
|
-
import { isNotNil as
|
|
17097
|
-
import { jsx as
|
|
17098
|
-
var ProgressBarWrapper =
|
|
17355
|
+
import { isNotNil as isNotNil36 } from "@wistia/type-guards";
|
|
17356
|
+
import { jsx as jsx325, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
17357
|
+
var ProgressBarWrapper = styled88.div`
|
|
17099
17358
|
--progress-bar-height: 8px;
|
|
17100
17359
|
|
|
17101
17360
|
display: flex;
|
|
@@ -17109,7 +17368,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
17109
17368
|
const progressPercentage = progress / max * 100;
|
|
17110
17369
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
17111
17370
|
};
|
|
17112
|
-
var ProgressBarLabel =
|
|
17371
|
+
var ProgressBarLabel = styled88.div`
|
|
17113
17372
|
display: flex;
|
|
17114
17373
|
line-height: var(--wui-typography-label-3-line-height);
|
|
17115
17374
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -17117,7 +17376,7 @@ var ProgressBarLabel = styled86.div`
|
|
|
17117
17376
|
color: var(--wui-color-text-secondary);
|
|
17118
17377
|
flex-shrink: 0;
|
|
17119
17378
|
`;
|
|
17120
|
-
var StyledProgressIndicator =
|
|
17379
|
+
var StyledProgressIndicator = styled88(ProgressIndicator)`
|
|
17121
17380
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
17122
17381
|
background-color: var(--wui-color-bg-fill);
|
|
17123
17382
|
width: 100%;
|
|
@@ -17127,7 +17386,7 @@ var StyledProgressIndicator = styled86(ProgressIndicator)`
|
|
|
17127
17386
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
17128
17387
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
17129
17388
|
`;
|
|
17130
|
-
var StyledProgressBar =
|
|
17389
|
+
var StyledProgressBar = styled88(ProgressRoot)`
|
|
17131
17390
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
17132
17391
|
position: relative;
|
|
17133
17392
|
overflow: hidden;
|
|
@@ -17148,16 +17407,16 @@ var ProgressBar = ({
|
|
|
17148
17407
|
colorScheme = "inherit",
|
|
17149
17408
|
...props
|
|
17150
17409
|
}) => {
|
|
17151
|
-
return /* @__PURE__ */
|
|
17152
|
-
|
|
17153
|
-
/* @__PURE__ */
|
|
17410
|
+
return /* @__PURE__ */ jsxs57(ProgressBarWrapper, { children: [
|
|
17411
|
+
isNotNil36(labelLeft) ? /* @__PURE__ */ jsx325(ProgressBarLabel, { children: labelLeft }) : null,
|
|
17412
|
+
/* @__PURE__ */ jsx325(
|
|
17154
17413
|
StyledProgressBar,
|
|
17155
17414
|
{
|
|
17156
17415
|
$colorScheme: colorScheme,
|
|
17157
17416
|
max,
|
|
17158
17417
|
value: progress,
|
|
17159
17418
|
...props,
|
|
17160
|
-
children: /* @__PURE__ */
|
|
17419
|
+
children: /* @__PURE__ */ jsx325(
|
|
17161
17420
|
StyledProgressIndicator,
|
|
17162
17421
|
{
|
|
17163
17422
|
$colorScheme: colorScheme,
|
|
@@ -17167,7 +17426,7 @@ var ProgressBar = ({
|
|
|
17167
17426
|
)
|
|
17168
17427
|
}
|
|
17169
17428
|
),
|
|
17170
|
-
|
|
17429
|
+
isNotNil36(labelRight) ? /* @__PURE__ */ jsx325(ProgressBarLabel, { children: labelRight }) : null
|
|
17171
17430
|
] });
|
|
17172
17431
|
};
|
|
17173
17432
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
@@ -17175,8 +17434,8 @@ ProgressBar.displayName = "ProgressBar_UI";
|
|
|
17175
17434
|
// src/components/Radio/Radio.tsx
|
|
17176
17435
|
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
17177
17436
|
import { forwardRef as forwardRef27, useId as useId6 } from "react";
|
|
17178
|
-
import { styled as
|
|
17179
|
-
import { jsx as
|
|
17437
|
+
import { styled as styled89, css as css43 } from "styled-components";
|
|
17438
|
+
import { jsx as jsx326, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17180
17439
|
var sizeSmall2 = css43`
|
|
17181
17440
|
--wui-radio-size: 14px;
|
|
17182
17441
|
--wui-radio-icon-size: 7px;
|
|
@@ -17198,7 +17457,7 @@ var getSizeCss3 = (size) => {
|
|
|
17198
17457
|
}
|
|
17199
17458
|
return sizeMedium2;
|
|
17200
17459
|
};
|
|
17201
|
-
var StyledRadioWrapper =
|
|
17460
|
+
var StyledRadioWrapper = styled89.div`
|
|
17202
17461
|
--wui-radio-background-color: var(--wui-color-bg-surface);
|
|
17203
17462
|
--wui-radio-border-color: var(--wui-color-border-secondary);
|
|
17204
17463
|
--wui-radio-icon-color: transparent;
|
|
@@ -17232,7 +17491,7 @@ var StyledRadioWrapper = styled87.div`
|
|
|
17232
17491
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
17233
17492
|
user-select: none;
|
|
17234
17493
|
`;
|
|
17235
|
-
var StyledRadioInput =
|
|
17494
|
+
var StyledRadioInput = styled89.div`
|
|
17236
17495
|
${({ $size }) => getSizeCss3($size)}
|
|
17237
17496
|
width: var(--wui-radio-size);
|
|
17238
17497
|
height: var(--wui-radio-size);
|
|
@@ -17258,7 +17517,7 @@ var StyledRadioInput = styled87.div`
|
|
|
17258
17517
|
transform: translate(-50%, -50%);
|
|
17259
17518
|
}
|
|
17260
17519
|
`;
|
|
17261
|
-
var StyledHiddenRadioInput =
|
|
17520
|
+
var StyledHiddenRadioInput = styled89.input`
|
|
17262
17521
|
${visuallyHiddenStyle}
|
|
17263
17522
|
`;
|
|
17264
17523
|
var Radio = forwardRef27(
|
|
@@ -17285,14 +17544,14 @@ var Radio = forwardRef27(
|
|
|
17285
17544
|
const radioName = name ?? contextName;
|
|
17286
17545
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17287
17546
|
const isChecked = isNotUndefined14(value) && isNotUndefined14(contextValue) ? contextValue === value : checked;
|
|
17288
|
-
return /* @__PURE__ */
|
|
17547
|
+
return /* @__PURE__ */ jsxs58(
|
|
17289
17548
|
StyledRadioWrapper,
|
|
17290
17549
|
{
|
|
17291
17550
|
$disabled: disabled,
|
|
17292
17551
|
$hideLabel: hideLabel,
|
|
17293
17552
|
"aria-invalid": props["aria-invalid"],
|
|
17294
17553
|
children: [
|
|
17295
|
-
/* @__PURE__ */
|
|
17554
|
+
/* @__PURE__ */ jsx326(
|
|
17296
17555
|
StyledHiddenRadioInput,
|
|
17297
17556
|
{
|
|
17298
17557
|
...props,
|
|
@@ -17307,10 +17566,10 @@ var Radio = forwardRef27(
|
|
|
17307
17566
|
value
|
|
17308
17567
|
}
|
|
17309
17568
|
),
|
|
17310
|
-
/* @__PURE__ */
|
|
17569
|
+
/* @__PURE__ */ jsx326(
|
|
17311
17570
|
FormControlLabel,
|
|
17312
17571
|
{
|
|
17313
|
-
controlSlot: /* @__PURE__ */
|
|
17572
|
+
controlSlot: /* @__PURE__ */ jsx326(StyledRadioInput, { $size: size }),
|
|
17314
17573
|
description,
|
|
17315
17574
|
disabled,
|
|
17316
17575
|
hideLabel,
|
|
@@ -17330,9 +17589,9 @@ import { forwardRef as forwardRef29 } from "react";
|
|
|
17330
17589
|
|
|
17331
17590
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
17332
17591
|
import { forwardRef as forwardRef28, useId as useId7 } from "react";
|
|
17333
|
-
import { styled as
|
|
17592
|
+
import { styled as styled90, css as css44 } from "styled-components";
|
|
17334
17593
|
import { isNonEmptyString as isNonEmptyString8, isNotUndefined as isNotUndefined15 } from "@wistia/type-guards";
|
|
17335
|
-
import { jsx as
|
|
17594
|
+
import { jsx as jsx327, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17336
17595
|
var checkedStyles = css44`
|
|
17337
17596
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
17338
17597
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
@@ -17382,7 +17641,7 @@ var imageCoverStyles = css44`
|
|
|
17382
17641
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
17383
17642
|
}
|
|
17384
17643
|
`;
|
|
17385
|
-
var StyledCard2 =
|
|
17644
|
+
var StyledCard2 = styled90.label`
|
|
17386
17645
|
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
17387
17646
|
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
17388
17647
|
--wui-radio-card-cursor: pointer;
|
|
@@ -17413,7 +17672,7 @@ var StyledCard2 = styled88.label`
|
|
|
17413
17672
|
}
|
|
17414
17673
|
|
|
17415
17674
|
&:has(input:checked) {
|
|
17416
|
-
${checkedStyles}
|
|
17675
|
+
${({ $isGated }) => $isGated ? getColorScheme("purple") : checkedStyles}
|
|
17417
17676
|
}
|
|
17418
17677
|
|
|
17419
17678
|
&:has(input:disabled) {
|
|
@@ -17436,7 +17695,7 @@ var StyledCard2 = styled88.label`
|
|
|
17436
17695
|
}
|
|
17437
17696
|
}
|
|
17438
17697
|
`;
|
|
17439
|
-
var StyledHiddenInput =
|
|
17698
|
+
var StyledHiddenInput = styled90.input`
|
|
17440
17699
|
${visuallyHiddenStyle}
|
|
17441
17700
|
`;
|
|
17442
17701
|
var RadioCardRoot = forwardRef28(
|
|
@@ -17444,6 +17703,7 @@ var RadioCardRoot = forwardRef28(
|
|
|
17444
17703
|
children,
|
|
17445
17704
|
disabled = false,
|
|
17446
17705
|
id,
|
|
17706
|
+
isGated = false,
|
|
17447
17707
|
name,
|
|
17448
17708
|
onChange,
|
|
17449
17709
|
value,
|
|
@@ -17461,14 +17721,15 @@ var RadioCardRoot = forwardRef28(
|
|
|
17461
17721
|
const radioName = name ?? contextName;
|
|
17462
17722
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17463
17723
|
const isChecked = isNotUndefined15(value) && isNotUndefined15(contextValue) ? contextValue === value : checked;
|
|
17464
|
-
return /* @__PURE__ */
|
|
17724
|
+
return /* @__PURE__ */ jsxs59(
|
|
17465
17725
|
StyledCard2,
|
|
17466
17726
|
{
|
|
17467
17727
|
$aspectRatio: aspectRatio,
|
|
17728
|
+
$isGated: isGated,
|
|
17468
17729
|
$padding: padding,
|
|
17469
17730
|
htmlFor: computedId,
|
|
17470
17731
|
children: [
|
|
17471
|
-
/* @__PURE__ */
|
|
17732
|
+
/* @__PURE__ */ jsx327(
|
|
17472
17733
|
StyledHiddenInput,
|
|
17473
17734
|
{
|
|
17474
17735
|
...props,
|
|
@@ -17491,12 +17752,12 @@ var RadioCardRoot = forwardRef28(
|
|
|
17491
17752
|
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
17492
17753
|
|
|
17493
17754
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17494
|
-
import { styled as
|
|
17495
|
-
import { isNotNil as
|
|
17755
|
+
import { styled as styled92 } from "styled-components";
|
|
17756
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
17496
17757
|
|
|
17497
17758
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
17498
|
-
import { styled as
|
|
17499
|
-
var RadioCardIndicator =
|
|
17759
|
+
import { styled as styled91 } from "styled-components";
|
|
17760
|
+
var RadioCardIndicator = styled91.div`
|
|
17500
17761
|
--wui-radio-card-indicator-size: 14px;
|
|
17501
17762
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
17502
17763
|
--wui-radio-card-indicator-fill-color: var(--wui-color-bg-fill);
|
|
@@ -17545,16 +17806,22 @@ var RadioCardIndicator = styled89.div`
|
|
|
17545
17806
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
17546
17807
|
|
|
17547
17808
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17548
|
-
import { jsx as
|
|
17549
|
-
var StyledCardContent =
|
|
17809
|
+
import { jsx as jsx328, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17810
|
+
var StyledCardContent = styled92.div`
|
|
17550
17811
|
display: grid;
|
|
17551
17812
|
grid-auto-flow: column;
|
|
17552
17813
|
gap: var(--wui-space-02);
|
|
17553
17814
|
`;
|
|
17554
|
-
var StyledCardIcon =
|
|
17815
|
+
var StyledCardIcon = styled92.div`
|
|
17555
17816
|
display: contents;
|
|
17556
17817
|
`;
|
|
17557
|
-
var
|
|
17818
|
+
var StyledGatedIcon = styled92.div`
|
|
17819
|
+
position: absolute;
|
|
17820
|
+
right: 10px;
|
|
17821
|
+
top: 10px;
|
|
17822
|
+
z-index: 1;
|
|
17823
|
+
`;
|
|
17824
|
+
var StyledIndicatorContainer = styled92.div`
|
|
17558
17825
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
17559
17826
|
display: flex;
|
|
17560
17827
|
align-items: center;
|
|
@@ -17563,20 +17830,29 @@ var RadioCardDefaultLayout = ({
|
|
|
17563
17830
|
icon,
|
|
17564
17831
|
label,
|
|
17565
17832
|
description,
|
|
17566
|
-
showIndicator = true
|
|
17833
|
+
showIndicator = true,
|
|
17834
|
+
isGated = false
|
|
17567
17835
|
}) => {
|
|
17568
|
-
return /* @__PURE__ */
|
|
17569
|
-
showIndicator ? /* @__PURE__ */
|
|
17570
|
-
/* @__PURE__ */
|
|
17571
|
-
|
|
17572
|
-
|
|
17836
|
+
return /* @__PURE__ */ jsxs60(StyledCardContent, { children: [
|
|
17837
|
+
showIndicator ? /* @__PURE__ */ jsx328(StyledIndicatorContainer, { $hasIcon: isNotNil37(icon), children: /* @__PURE__ */ jsx328(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
17838
|
+
isGated ? /* @__PURE__ */ jsx328(StyledGatedIcon, { "data-testid": "wui-radio-gated-icon", children: /* @__PURE__ */ jsx328(
|
|
17839
|
+
Icon,
|
|
17840
|
+
{
|
|
17841
|
+
colorScheme: "purple",
|
|
17842
|
+
"data-testid": "wui-icon-sparkle",
|
|
17843
|
+
type: "sparkle"
|
|
17844
|
+
}
|
|
17845
|
+
) }) : null,
|
|
17846
|
+
/* @__PURE__ */ jsxs60(Stack, { gap: "space-02", children: [
|
|
17847
|
+
isNotNil37(icon) && /* @__PURE__ */ jsx328(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
17848
|
+
/* @__PURE__ */ jsxs60(
|
|
17573
17849
|
Stack,
|
|
17574
17850
|
{
|
|
17575
17851
|
gap: "space-01",
|
|
17576
|
-
style:
|
|
17852
|
+
style: isNotNil37(icon) ? { paddingLeft: 2 } : void 0,
|
|
17577
17853
|
children: [
|
|
17578
|
-
|
|
17579
|
-
|
|
17854
|
+
isNotNil37(label) && /* @__PURE__ */ jsx328(Text, { variant: "label3", children: /* @__PURE__ */ jsx328("strong", { children: label }) }),
|
|
17855
|
+
isNotNil37(description) && /* @__PURE__ */ jsx328(
|
|
17580
17856
|
Text,
|
|
17581
17857
|
{
|
|
17582
17858
|
prominence: "secondary",
|
|
@@ -17593,26 +17869,28 @@ var RadioCardDefaultLayout = ({
|
|
|
17593
17869
|
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
17594
17870
|
|
|
17595
17871
|
// src/components/RadioCard/RadioCardChildrenContainer.tsx
|
|
17596
|
-
import { styled as
|
|
17597
|
-
var RadioCardChildrenContainer =
|
|
17872
|
+
import { styled as styled93 } from "styled-components";
|
|
17873
|
+
var RadioCardChildrenContainer = styled93.div`
|
|
17598
17874
|
flex: 1 1 auto;
|
|
17599
17875
|
`;
|
|
17600
17876
|
|
|
17601
17877
|
// src/components/RadioCard/RadioCard.tsx
|
|
17602
|
-
import { jsx as
|
|
17878
|
+
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
17603
17879
|
var RadioCard = forwardRef29(
|
|
17604
|
-
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
17605
|
-
return /* @__PURE__ */
|
|
17880
|
+
({ icon, label, description, showIndicator, isGated, children, ...rootProps }, ref) => {
|
|
17881
|
+
return /* @__PURE__ */ jsx329(
|
|
17606
17882
|
RadioCardRoot,
|
|
17607
17883
|
{
|
|
17608
17884
|
ref,
|
|
17885
|
+
isGated,
|
|
17609
17886
|
padding: children != null ? "space-00" : "space-04",
|
|
17610
17887
|
...rootProps,
|
|
17611
|
-
children: children != null ? /* @__PURE__ */
|
|
17888
|
+
children: children != null ? /* @__PURE__ */ jsx329(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ jsx329(
|
|
17612
17889
|
RadioCardDefaultLayout,
|
|
17613
17890
|
{
|
|
17614
17891
|
description,
|
|
17615
17892
|
icon,
|
|
17893
|
+
isGated,
|
|
17616
17894
|
label,
|
|
17617
17895
|
showIndicator
|
|
17618
17896
|
}
|
|
@@ -17625,17 +17903,17 @@ RadioCard.displayName = "RadioCard_UI";
|
|
|
17625
17903
|
|
|
17626
17904
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
17627
17905
|
import { forwardRef as forwardRef30 } from "react";
|
|
17628
|
-
import { jsx as
|
|
17906
|
+
import { jsx as jsx330 } from "react/jsx-runtime";
|
|
17629
17907
|
var RadioCardImage = forwardRef30(
|
|
17630
17908
|
({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
|
|
17631
|
-
return /* @__PURE__ */
|
|
17909
|
+
return /* @__PURE__ */ jsx330(
|
|
17632
17910
|
RadioCardRoot,
|
|
17633
17911
|
{
|
|
17634
17912
|
ref,
|
|
17635
17913
|
...rootProps,
|
|
17636
17914
|
aspectRatio,
|
|
17637
17915
|
padding,
|
|
17638
|
-
children: /* @__PURE__ */
|
|
17916
|
+
children: /* @__PURE__ */ jsx330(
|
|
17639
17917
|
Image,
|
|
17640
17918
|
{
|
|
17641
17919
|
alt: label,
|
|
@@ -17652,50 +17930,50 @@ var RadioCardImage = forwardRef30(
|
|
|
17652
17930
|
RadioCardImage.displayName = "RadioCardImage_UI";
|
|
17653
17931
|
|
|
17654
17932
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
17655
|
-
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as
|
|
17656
|
-
import { styled as
|
|
17933
|
+
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as useEffect22, useMemo as useMemo16, useRef as useRef22, useState as useState25 } from "react";
|
|
17934
|
+
import { styled as styled94 } from "styled-components";
|
|
17657
17935
|
import { throttle } from "throttle-debounce";
|
|
17658
|
-
import { jsx as
|
|
17936
|
+
import { jsx as jsx331, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
17659
17937
|
var SHADOW_SIZE_PX = 8;
|
|
17660
|
-
var Container10 =
|
|
17938
|
+
var Container10 = styled94.div`
|
|
17661
17939
|
overflow: hidden;
|
|
17662
17940
|
position: relative;
|
|
17663
17941
|
flex: 1 1 auto;
|
|
17664
17942
|
`;
|
|
17665
|
-
var ScrollContainer =
|
|
17943
|
+
var ScrollContainer = styled94.div`
|
|
17666
17944
|
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
17667
17945
|
height: 100%;
|
|
17668
17946
|
width: 100%;
|
|
17669
17947
|
`;
|
|
17670
|
-
var Shadow =
|
|
17948
|
+
var Shadow = styled94.div`
|
|
17671
17949
|
pointer-events: none;
|
|
17672
17950
|
position: absolute;
|
|
17673
17951
|
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
17674
17952
|
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
17675
17953
|
z-index: 1;
|
|
17676
17954
|
`;
|
|
17677
|
-
var ShadowAtTop =
|
|
17955
|
+
var ShadowAtTop = styled94(Shadow)`
|
|
17678
17956
|
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
17679
17957
|
height: 0;
|
|
17680
17958
|
left: 0;
|
|
17681
17959
|
right: 0;
|
|
17682
17960
|
top: 0;
|
|
17683
17961
|
`;
|
|
17684
|
-
var ShadowAtBottom =
|
|
17962
|
+
var ShadowAtBottom = styled94(Shadow)`
|
|
17685
17963
|
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
17686
17964
|
bottom: 0;
|
|
17687
17965
|
height: 0;
|
|
17688
17966
|
left: 0;
|
|
17689
17967
|
right: 0;
|
|
17690
17968
|
`;
|
|
17691
|
-
var ShadowAtLeft =
|
|
17969
|
+
var ShadowAtLeft = styled94(Shadow)`
|
|
17692
17970
|
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
17693
17971
|
bottom: 0;
|
|
17694
17972
|
left: 0;
|
|
17695
17973
|
top: 0;
|
|
17696
17974
|
width: 0;
|
|
17697
17975
|
`;
|
|
17698
|
-
var ShadowAtRight =
|
|
17976
|
+
var ShadowAtRight = styled94(Shadow)`
|
|
17699
17977
|
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
17700
17978
|
bottom: 0;
|
|
17701
17979
|
right: 0;
|
|
@@ -17705,7 +17983,7 @@ var ShadowAtRight = styled92(Shadow)`
|
|
|
17705
17983
|
var ScrollArea = forwardRef31(
|
|
17706
17984
|
({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
|
|
17707
17985
|
const scrollContainerRefInternal = useRef22(null);
|
|
17708
|
-
const [shadowState, setShadowState] =
|
|
17986
|
+
const [shadowState, setShadowState] = useState25({
|
|
17709
17987
|
canScrollUp: false,
|
|
17710
17988
|
canScrollLeft: false,
|
|
17711
17989
|
canScrollDown: false,
|
|
@@ -17724,7 +18002,7 @@ var ScrollArea = forwardRef31(
|
|
|
17724
18002
|
canScrollRight: scrollContainer.scrollLeft + scrollContainer.clientWidth < scrollContainer.scrollWidth
|
|
17725
18003
|
});
|
|
17726
18004
|
}, []);
|
|
17727
|
-
const throttledUpdateShadows =
|
|
18005
|
+
const throttledUpdateShadows = useMemo16(() => throttle(100, updateShadows), [updateShadows]);
|
|
17728
18006
|
const onScrollScrollContainer = useCallback18(
|
|
17729
18007
|
(event) => {
|
|
17730
18008
|
onScroll?.(event);
|
|
@@ -17732,15 +18010,15 @@ var ScrollArea = forwardRef31(
|
|
|
17732
18010
|
},
|
|
17733
18011
|
[onScroll, throttledUpdateShadows]
|
|
17734
18012
|
);
|
|
17735
|
-
|
|
18013
|
+
useEffect22(() => {
|
|
17736
18014
|
updateShadows();
|
|
17737
18015
|
}, [updateShadows]);
|
|
17738
|
-
return /* @__PURE__ */
|
|
17739
|
-
/* @__PURE__ */
|
|
17740
|
-
/* @__PURE__ */
|
|
17741
|
-
/* @__PURE__ */
|
|
17742
|
-
/* @__PURE__ */
|
|
17743
|
-
/* @__PURE__ */
|
|
18016
|
+
return /* @__PURE__ */ jsxs61(Container10, { style, children: [
|
|
18017
|
+
/* @__PURE__ */ jsx331(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
18018
|
+
/* @__PURE__ */ jsx331(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
18019
|
+
/* @__PURE__ */ jsx331(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
18020
|
+
/* @__PURE__ */ jsx331(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
18021
|
+
/* @__PURE__ */ jsx331(
|
|
17744
18022
|
ScrollContainer,
|
|
17745
18023
|
{
|
|
17746
18024
|
ref: scrollContainerRef,
|
|
@@ -17757,19 +18035,19 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
17757
18035
|
|
|
17758
18036
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17759
18037
|
import { forwardRef as forwardRef32 } from "react";
|
|
17760
|
-
import { styled as
|
|
18038
|
+
import { styled as styled96, css as css46 } from "styled-components";
|
|
17761
18039
|
import { Root as ToggleGroupRoot2 } from "@radix-ui/react-toggle-group";
|
|
17762
|
-
import { isNil as
|
|
18040
|
+
import { isNil as isNil19 } from "@wistia/type-guards";
|
|
17763
18041
|
|
|
17764
18042
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
17765
|
-
import { createContext as createContext9, useContext as useContext15, useMemo as
|
|
17766
|
-
import { jsx as
|
|
18043
|
+
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo17, useState as useState26 } from "react";
|
|
18044
|
+
import { jsx as jsx332 } from "react/jsx-runtime";
|
|
17767
18045
|
var SelectedItemStyleContext = createContext9(null);
|
|
17768
18046
|
var SelectedItemStyleProvider = ({
|
|
17769
18047
|
children
|
|
17770
18048
|
}) => {
|
|
17771
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] =
|
|
17772
|
-
const selectedItemIndicatorStyle =
|
|
18049
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = useState26(null);
|
|
18050
|
+
const selectedItemIndicatorStyle = useMemo17(
|
|
17773
18051
|
() => selectedItemMeasurements != null ? {
|
|
17774
18052
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
17775
18053
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
|
|
@@ -17777,14 +18055,14 @@ var SelectedItemStyleProvider = ({
|
|
|
17777
18055
|
} : void 0,
|
|
17778
18056
|
[selectedItemMeasurements]
|
|
17779
18057
|
);
|
|
17780
|
-
const contextValue =
|
|
18058
|
+
const contextValue = useMemo17(
|
|
17781
18059
|
() => ({
|
|
17782
18060
|
setSelectedItemMeasurements,
|
|
17783
18061
|
selectedItemIndicatorStyle
|
|
17784
18062
|
}),
|
|
17785
18063
|
[selectedItemIndicatorStyle]
|
|
17786
18064
|
);
|
|
17787
|
-
return /* @__PURE__ */
|
|
18065
|
+
return /* @__PURE__ */ jsx332(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
17788
18066
|
};
|
|
17789
18067
|
var useSelectedItemStyle = () => {
|
|
17790
18068
|
const context = useContext15(SelectedItemStyleContext);
|
|
@@ -17795,7 +18073,7 @@ var useSelectedItemStyle = () => {
|
|
|
17795
18073
|
};
|
|
17796
18074
|
|
|
17797
18075
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17798
|
-
import { styled as
|
|
18076
|
+
import { styled as styled95, css as css45 } from "styled-components";
|
|
17799
18077
|
import { isUndefined as isUndefined5 } from "@wistia/type-guards";
|
|
17800
18078
|
|
|
17801
18079
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
@@ -17811,13 +18089,13 @@ var useSegmentedControlValue = () => {
|
|
|
17811
18089
|
};
|
|
17812
18090
|
|
|
17813
18091
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17814
|
-
import { jsx as
|
|
18092
|
+
import { jsx as jsx333 } from "react/jsx-runtime";
|
|
17815
18093
|
var selectedItemIndicatorStyles = css45`
|
|
17816
18094
|
background-color: var(--wui-color-bg-fill-white);
|
|
17817
18095
|
border-radius: var(--wui-border-radius-rounded);
|
|
17818
18096
|
box-shadow: var(--wui-elevation-01);
|
|
17819
18097
|
`;
|
|
17820
|
-
var SelectedItemIndicatorDiv =
|
|
18098
|
+
var SelectedItemIndicatorDiv = styled95.div`
|
|
17821
18099
|
${selectedItemIndicatorStyles}
|
|
17822
18100
|
left: 0;
|
|
17823
18101
|
position: absolute;
|
|
@@ -17833,7 +18111,7 @@ var SelectedItemIndicator = () => {
|
|
|
17833
18111
|
if (!selectedValue || isUndefined5(selectedItemIndicatorStyle)) {
|
|
17834
18112
|
return null;
|
|
17835
18113
|
}
|
|
17836
|
-
return /* @__PURE__ */
|
|
18114
|
+
return /* @__PURE__ */ jsx333(
|
|
17837
18115
|
SelectedItemIndicatorDiv,
|
|
17838
18116
|
{
|
|
17839
18117
|
"data-wui-selected-item-indicator": true,
|
|
@@ -17843,7 +18121,7 @@ var SelectedItemIndicator = () => {
|
|
|
17843
18121
|
};
|
|
17844
18122
|
|
|
17845
18123
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17846
|
-
import { jsx as
|
|
18124
|
+
import { jsx as jsx334, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17847
18125
|
var segmentedControlStyles = css46`
|
|
17848
18126
|
${({ $colorScheme }) => $colorScheme && getColorScheme($colorScheme)};
|
|
17849
18127
|
${({ $colorScheme }) => $colorScheme !== "nav" && `--wui-color-text-selected: var(--wui-color-text-link);`}
|
|
@@ -17858,7 +18136,7 @@ var segmentedControlStyles = css46`
|
|
|
17858
18136
|
position: relative;
|
|
17859
18137
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
17860
18138
|
`;
|
|
17861
|
-
var StyledSegmentedControl =
|
|
18139
|
+
var StyledSegmentedControl = styled96(ToggleGroupRoot2)`
|
|
17862
18140
|
${segmentedControlStyles}
|
|
17863
18141
|
`;
|
|
17864
18142
|
var SegmentedControl = forwardRef32(
|
|
@@ -17871,10 +18149,10 @@ var SegmentedControl = forwardRef32(
|
|
|
17871
18149
|
onSelectedValueChange,
|
|
17872
18150
|
...props
|
|
17873
18151
|
}, ref) => {
|
|
17874
|
-
if (
|
|
18152
|
+
if (isNil19(children)) {
|
|
17875
18153
|
return null;
|
|
17876
18154
|
}
|
|
17877
|
-
return /* @__PURE__ */
|
|
18155
|
+
return /* @__PURE__ */ jsx334(
|
|
17878
18156
|
StyledSegmentedControl,
|
|
17879
18157
|
{
|
|
17880
18158
|
ref,
|
|
@@ -17887,9 +18165,9 @@ var SegmentedControl = forwardRef32(
|
|
|
17887
18165
|
type: "single",
|
|
17888
18166
|
value: selectedValue,
|
|
17889
18167
|
...props,
|
|
17890
|
-
children: /* @__PURE__ */
|
|
18168
|
+
children: /* @__PURE__ */ jsx334(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs62(SelectedItemStyleProvider, { children: [
|
|
17891
18169
|
children,
|
|
17892
|
-
/* @__PURE__ */
|
|
18170
|
+
/* @__PURE__ */ jsx334(SelectedItemIndicator, {})
|
|
17893
18171
|
] }) })
|
|
17894
18172
|
}
|
|
17895
18173
|
);
|
|
@@ -17898,11 +18176,11 @@ var SegmentedControl = forwardRef32(
|
|
|
17898
18176
|
SegmentedControl.displayName = "SegmentedControl_UI";
|
|
17899
18177
|
|
|
17900
18178
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
17901
|
-
import { forwardRef as forwardRef33, useEffect as
|
|
17902
|
-
import { styled as
|
|
18179
|
+
import { forwardRef as forwardRef33, useEffect as useEffect23, useRef as useRef23 } from "react";
|
|
18180
|
+
import { styled as styled97, css as css47 } from "styled-components";
|
|
17903
18181
|
import { Item as ToggleGroupItem2 } from "@radix-ui/react-toggle-group";
|
|
17904
|
-
import { isNotNil as
|
|
17905
|
-
import { jsxs as
|
|
18182
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
18183
|
+
import { jsxs as jsxs63 } from "react/jsx-runtime";
|
|
17906
18184
|
var segmentedControlItemStyles = css47`
|
|
17907
18185
|
all: unset; /* ToggleGroupItem is a button element */
|
|
17908
18186
|
align-items: center;
|
|
@@ -17971,7 +18249,7 @@ var segmentedControlItemStyles = css47`
|
|
|
17971
18249
|
}
|
|
17972
18250
|
}
|
|
17973
18251
|
`;
|
|
17974
|
-
var StyledSegmentedControlItem =
|
|
18252
|
+
var StyledSegmentedControlItem = styled97(ToggleGroupItem2)`
|
|
17975
18253
|
${segmentedControlItemStyles}
|
|
17976
18254
|
`;
|
|
17977
18255
|
var SegmentedControlItem = forwardRef33(
|
|
@@ -17987,7 +18265,7 @@ var SegmentedControlItem = forwardRef33(
|
|
|
17987
18265
|
event.preventDefault();
|
|
17988
18266
|
}
|
|
17989
18267
|
};
|
|
17990
|
-
|
|
18268
|
+
useEffect23(() => {
|
|
17991
18269
|
const buttonElem = buttonRef.current;
|
|
17992
18270
|
if (!buttonElem) {
|
|
17993
18271
|
return void 0;
|
|
@@ -18012,13 +18290,13 @@ var SegmentedControlItem = forwardRef33(
|
|
|
18012
18290
|
resizeObserver.disconnect();
|
|
18013
18291
|
};
|
|
18014
18292
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
18015
|
-
return /* @__PURE__ */
|
|
18293
|
+
return /* @__PURE__ */ jsxs63(
|
|
18016
18294
|
StyledSegmentedControlItem,
|
|
18017
18295
|
{
|
|
18018
18296
|
ref: combinedRef,
|
|
18019
18297
|
...otherProps,
|
|
18020
|
-
$hasLabel:
|
|
18021
|
-
"aria-label":
|
|
18298
|
+
$hasLabel: isNotNil38(label),
|
|
18299
|
+
"aria-label": isNotNil38(label) ? void 0 : ariaLabel,
|
|
18022
18300
|
disabled,
|
|
18023
18301
|
onClick: handleClick,
|
|
18024
18302
|
value,
|
|
@@ -18044,9 +18322,9 @@ import {
|
|
|
18044
18322
|
ScrollDownButton
|
|
18045
18323
|
} from "@radix-ui/react-select";
|
|
18046
18324
|
import { forwardRef as forwardRef34 } from "react";
|
|
18047
|
-
import { styled as
|
|
18048
|
-
import { jsx as
|
|
18049
|
-
var StyledTrigger2 =
|
|
18325
|
+
import { styled as styled98, css as css48 } from "styled-components";
|
|
18326
|
+
import { jsx as jsx335, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
18327
|
+
var StyledTrigger2 = styled98(Trigger3)`
|
|
18050
18328
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
18051
18329
|
${inputCss};
|
|
18052
18330
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -18092,7 +18370,7 @@ var StyledTrigger2 = styled96(Trigger3)`
|
|
|
18092
18370
|
color: var(--wui-input-placeholder);
|
|
18093
18371
|
}
|
|
18094
18372
|
`;
|
|
18095
|
-
var StyledContent3 =
|
|
18373
|
+
var StyledContent3 = styled98(Content3)`
|
|
18096
18374
|
--wui-select-content-border: var(--wui-color-border);
|
|
18097
18375
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
18098
18376
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -18119,10 +18397,10 @@ var scrollButtonStyles = css48`
|
|
|
18119
18397
|
display: flex;
|
|
18120
18398
|
justify-content: center;
|
|
18121
18399
|
`;
|
|
18122
|
-
var StyledScrollDownButton =
|
|
18400
|
+
var StyledScrollDownButton = styled98(ScrollDownButton)`
|
|
18123
18401
|
${scrollButtonStyles}
|
|
18124
18402
|
`;
|
|
18125
|
-
var StyledScrollUpButton =
|
|
18403
|
+
var StyledScrollUpButton = styled98(ScrollUpButton)`
|
|
18126
18404
|
${scrollButtonStyles}
|
|
18127
18405
|
`;
|
|
18128
18406
|
var Select = forwardRef34(
|
|
@@ -18145,8 +18423,8 @@ var Select = forwardRef34(
|
|
|
18145
18423
|
if (forceOpen) {
|
|
18146
18424
|
rootProps["open"] = true;
|
|
18147
18425
|
}
|
|
18148
|
-
return /* @__PURE__ */
|
|
18149
|
-
/* @__PURE__ */
|
|
18426
|
+
return /* @__PURE__ */ jsxs64(Root3, { ...rootProps, children: [
|
|
18427
|
+
/* @__PURE__ */ jsxs64(
|
|
18150
18428
|
StyledTrigger2,
|
|
18151
18429
|
{
|
|
18152
18430
|
ref: forwardedRef,
|
|
@@ -18154,8 +18432,8 @@ var Select = forwardRef34(
|
|
|
18154
18432
|
$fullWidth: responsiveFullWidth,
|
|
18155
18433
|
...props,
|
|
18156
18434
|
children: [
|
|
18157
|
-
/* @__PURE__ */
|
|
18158
|
-
/* @__PURE__ */
|
|
18435
|
+
/* @__PURE__ */ jsx335(Value, { placeholder }),
|
|
18436
|
+
/* @__PURE__ */ jsx335(
|
|
18159
18437
|
Icon,
|
|
18160
18438
|
{
|
|
18161
18439
|
size: "md",
|
|
@@ -18165,21 +18443,21 @@ var Select = forwardRef34(
|
|
|
18165
18443
|
]
|
|
18166
18444
|
}
|
|
18167
18445
|
),
|
|
18168
|
-
/* @__PURE__ */
|
|
18446
|
+
/* @__PURE__ */ jsx335(Portal2, { children: /* @__PURE__ */ jsxs64(
|
|
18169
18447
|
StyledContent3,
|
|
18170
18448
|
{
|
|
18171
18449
|
position: "popper",
|
|
18172
18450
|
sideOffset: 8,
|
|
18173
18451
|
children: [
|
|
18174
|
-
/* @__PURE__ */
|
|
18452
|
+
/* @__PURE__ */ jsx335(StyledScrollUpButton, { children: /* @__PURE__ */ jsx335(
|
|
18175
18453
|
Icon,
|
|
18176
18454
|
{
|
|
18177
18455
|
size: "sm",
|
|
18178
18456
|
type: "caret-up"
|
|
18179
18457
|
}
|
|
18180
18458
|
) }),
|
|
18181
|
-
/* @__PURE__ */
|
|
18182
|
-
/* @__PURE__ */
|
|
18459
|
+
/* @__PURE__ */ jsx335(Viewport, { children }),
|
|
18460
|
+
/* @__PURE__ */ jsx335(StyledScrollDownButton, { children: /* @__PURE__ */ jsx335(
|
|
18183
18461
|
Icon,
|
|
18184
18462
|
{
|
|
18185
18463
|
size: "sm",
|
|
@@ -18197,10 +18475,10 @@ Select.displayName = "Select_UI";
|
|
|
18197
18475
|
// src/components/Select/SelectOption.tsx
|
|
18198
18476
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
18199
18477
|
import { forwardRef as forwardRef35 } from "react";
|
|
18200
|
-
import { styled as
|
|
18201
|
-
import { isNotNil as
|
|
18202
|
-
import { jsx as
|
|
18203
|
-
var StyledItem =
|
|
18478
|
+
import { styled as styled99 } from "styled-components";
|
|
18479
|
+
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
18480
|
+
import { jsx as jsx336, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
18481
|
+
var StyledItem = styled99(Item)`
|
|
18204
18482
|
${getTypographicStyles("label3")}
|
|
18205
18483
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
18206
18484
|
background-color: transparent;
|
|
@@ -18228,18 +18506,18 @@ var StyledItem = styled97(Item)`
|
|
|
18228
18506
|
`;
|
|
18229
18507
|
var SelectOption = forwardRef35(
|
|
18230
18508
|
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
18231
|
-
return /* @__PURE__ */
|
|
18509
|
+
return /* @__PURE__ */ jsxs65(
|
|
18232
18510
|
StyledItem,
|
|
18233
18511
|
{
|
|
18234
18512
|
...props,
|
|
18235
18513
|
ref: forwardedRef,
|
|
18236
18514
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
18237
18515
|
children: [
|
|
18238
|
-
|
|
18516
|
+
isNotNil39(selectedDisplayValue) ? /* @__PURE__ */ jsxs65("div", { children: [
|
|
18239
18517
|
children,
|
|
18240
|
-
/* @__PURE__ */
|
|
18241
|
-
] }) : /* @__PURE__ */
|
|
18242
|
-
/* @__PURE__ */
|
|
18518
|
+
/* @__PURE__ */ jsx336("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx336(ItemText, { children: selectedDisplayValue }) })
|
|
18519
|
+
] }) : /* @__PURE__ */ jsx336(ItemText, { children }),
|
|
18520
|
+
/* @__PURE__ */ jsx336(ItemIndicator, { children: /* @__PURE__ */ jsx336(
|
|
18243
18521
|
Icon,
|
|
18244
18522
|
{
|
|
18245
18523
|
size: "md",
|
|
@@ -18255,14 +18533,14 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
18255
18533
|
|
|
18256
18534
|
// src/components/Select/SelectOptionGroup.tsx
|
|
18257
18535
|
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
18258
|
-
import { styled as
|
|
18259
|
-
import { jsx as
|
|
18260
|
-
var StyledLabel4 =
|
|
18536
|
+
import { styled as styled100 } from "styled-components";
|
|
18537
|
+
import { jsx as jsx337, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
18538
|
+
var StyledLabel4 = styled100(Label3)`
|
|
18261
18539
|
padding: var(--wui-select-option-padding);
|
|
18262
18540
|
`;
|
|
18263
18541
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
18264
|
-
return /* @__PURE__ */
|
|
18265
|
-
/* @__PURE__ */
|
|
18542
|
+
return /* @__PURE__ */ jsxs66(Group, { ...props, children: [
|
|
18543
|
+
/* @__PURE__ */ jsx337(StyledLabel4, { children: /* @__PURE__ */ jsx337(
|
|
18266
18544
|
Heading,
|
|
18267
18545
|
{
|
|
18268
18546
|
renderAs: "span",
|
|
@@ -18281,10 +18559,10 @@ import {
|
|
|
18281
18559
|
Range as RadixSliderRange,
|
|
18282
18560
|
Thumb as RadixSliderThumb
|
|
18283
18561
|
} from "@radix-ui/react-slider";
|
|
18284
|
-
import { styled as
|
|
18562
|
+
import { styled as styled101 } from "styled-components";
|
|
18285
18563
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
18286
|
-
import { jsx as
|
|
18287
|
-
var SliderContainer =
|
|
18564
|
+
import { jsx as jsx338, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
18565
|
+
var SliderContainer = styled101.div`
|
|
18288
18566
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
18289
18567
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
18290
18568
|
--wui-slider-range-color: var(--wui-color-bg-fill);
|
|
@@ -18300,7 +18578,7 @@ var SliderContainer = styled99.div`
|
|
|
18300
18578
|
pointer-events: none;
|
|
18301
18579
|
}
|
|
18302
18580
|
`;
|
|
18303
|
-
var StyledSliderRoot =
|
|
18581
|
+
var StyledSliderRoot = styled101(RadixSliderRoot)`
|
|
18304
18582
|
position: relative;
|
|
18305
18583
|
display: flex;
|
|
18306
18584
|
align-items: center;
|
|
@@ -18308,20 +18586,20 @@ var StyledSliderRoot = styled99(RadixSliderRoot)`
|
|
|
18308
18586
|
touch-action: none;
|
|
18309
18587
|
width: 100%;
|
|
18310
18588
|
`;
|
|
18311
|
-
var StyledSliderTrack =
|
|
18589
|
+
var StyledSliderTrack = styled101(RadixSliderTrack)`
|
|
18312
18590
|
background-color: var(--wui-slider-track-color);
|
|
18313
18591
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18314
18592
|
flex-grow: 1;
|
|
18315
18593
|
height: 6px;
|
|
18316
18594
|
position: relative;
|
|
18317
18595
|
`;
|
|
18318
|
-
var StyledSliderRange =
|
|
18596
|
+
var StyledSliderRange = styled101(RadixSliderRange)`
|
|
18319
18597
|
background-color: var(--wui-slider-range-color);
|
|
18320
18598
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18321
18599
|
height: 100%;
|
|
18322
18600
|
position: absolute;
|
|
18323
18601
|
`;
|
|
18324
|
-
var StyledSliderThumb =
|
|
18602
|
+
var StyledSliderThumb = styled101(RadixSliderThumb)`
|
|
18325
18603
|
background-color: var(--wui-slider-thumb-color);
|
|
18326
18604
|
border-radius: var(--wui-border-radius-rounded);
|
|
18327
18605
|
cursor: grab;
|
|
@@ -18372,12 +18650,12 @@ var Slider = ({
|
|
|
18372
18650
|
onChange(newValue);
|
|
18373
18651
|
}
|
|
18374
18652
|
};
|
|
18375
|
-
return /* @__PURE__ */
|
|
18653
|
+
return /* @__PURE__ */ jsx338(
|
|
18376
18654
|
SliderContainer,
|
|
18377
18655
|
{
|
|
18378
18656
|
...otherProps,
|
|
18379
18657
|
"data-testid": dataTestId,
|
|
18380
|
-
children: /* @__PURE__ */
|
|
18658
|
+
children: /* @__PURE__ */ jsxs67(
|
|
18381
18659
|
StyledSliderRoot,
|
|
18382
18660
|
{
|
|
18383
18661
|
"aria-label": ariaLabel,
|
|
@@ -18390,8 +18668,8 @@ var Slider = ({
|
|
|
18390
18668
|
step,
|
|
18391
18669
|
...value ? { value } : {},
|
|
18392
18670
|
children: [
|
|
18393
|
-
/* @__PURE__ */
|
|
18394
|
-
values.map((_, index) => /* @__PURE__ */
|
|
18671
|
+
/* @__PURE__ */ jsx338(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ jsx338(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
18672
|
+
values.map((_, index) => /* @__PURE__ */ jsx338(
|
|
18395
18673
|
StyledSliderThumb,
|
|
18396
18674
|
{
|
|
18397
18675
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -18407,11 +18685,11 @@ var Slider = ({
|
|
|
18407
18685
|
Slider.displayName = "Slider_UI";
|
|
18408
18686
|
|
|
18409
18687
|
// src/components/SplitButton/SplitButton.tsx
|
|
18410
|
-
import { styled as
|
|
18411
|
-
import { isNotNil as
|
|
18688
|
+
import { styled as styled102 } from "styled-components";
|
|
18689
|
+
import { isNotNil as isNotNil40 } from "@wistia/type-guards";
|
|
18412
18690
|
import { cloneElement as cloneElement9 } from "react";
|
|
18413
|
-
import { jsx as
|
|
18414
|
-
var StyledSplitButton =
|
|
18691
|
+
import { jsx as jsx339, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
18692
|
+
var StyledSplitButton = styled102.span`
|
|
18415
18693
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
18416
18694
|
white-space: nowrap;
|
|
18417
18695
|
|
|
@@ -18432,7 +18710,7 @@ var StyledSplitButton = styled100.span`
|
|
|
18432
18710
|
var SplitButton = ({
|
|
18433
18711
|
children,
|
|
18434
18712
|
menuLabel = "Select an option",
|
|
18435
|
-
menuIcon = /* @__PURE__ */
|
|
18713
|
+
menuIcon = /* @__PURE__ */ jsx339(Icon, { type: "caret-down" }),
|
|
18436
18714
|
menuItems,
|
|
18437
18715
|
disabled = false,
|
|
18438
18716
|
colorScheme = "inherit",
|
|
@@ -18443,8 +18721,8 @@ var SplitButton = ({
|
|
|
18443
18721
|
menuProps = {},
|
|
18444
18722
|
...props
|
|
18445
18723
|
}) => {
|
|
18446
|
-
return /* @__PURE__ */
|
|
18447
|
-
/* @__PURE__ */
|
|
18724
|
+
return /* @__PURE__ */ jsxs68(StyledSplitButton, { $colorScheme: colorScheme, children: [
|
|
18725
|
+
/* @__PURE__ */ jsx339(
|
|
18448
18726
|
Button,
|
|
18449
18727
|
{
|
|
18450
18728
|
disabled,
|
|
@@ -18455,12 +18733,12 @@ var SplitButton = ({
|
|
|
18455
18733
|
children
|
|
18456
18734
|
}
|
|
18457
18735
|
),
|
|
18458
|
-
|
|
18736
|
+
isNotNil40(menuItems) && /* @__PURE__ */ jsx339(
|
|
18459
18737
|
Menu,
|
|
18460
18738
|
{
|
|
18461
18739
|
...menuProps,
|
|
18462
18740
|
disabled,
|
|
18463
|
-
trigger: /* @__PURE__ */
|
|
18741
|
+
trigger: /* @__PURE__ */ jsx339(
|
|
18464
18742
|
IconButton,
|
|
18465
18743
|
{
|
|
18466
18744
|
disabled,
|
|
@@ -18474,15 +18752,15 @@ var SplitButton = ({
|
|
|
18474
18752
|
children: menuItems
|
|
18475
18753
|
}
|
|
18476
18754
|
),
|
|
18477
|
-
|
|
18755
|
+
isNotNil40(secondaryAction) && cloneElement9(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
18478
18756
|
] });
|
|
18479
18757
|
};
|
|
18480
18758
|
SplitButton.displayName = "SplitButton_UI";
|
|
18481
18759
|
|
|
18482
18760
|
// src/components/Table/Table.tsx
|
|
18483
|
-
import { styled as
|
|
18484
|
-
import { jsx as
|
|
18485
|
-
var StyledTable =
|
|
18761
|
+
import { styled as styled103, css as css49 } from "styled-components";
|
|
18762
|
+
import { jsx as jsx340 } from "react/jsx-runtime";
|
|
18763
|
+
var StyledTable = styled103.table`
|
|
18486
18764
|
width: 100%;
|
|
18487
18765
|
border-collapse: collapse;
|
|
18488
18766
|
|
|
@@ -18511,7 +18789,7 @@ var Table = ({
|
|
|
18511
18789
|
visuallyHiddenHeader = false,
|
|
18512
18790
|
...props
|
|
18513
18791
|
}) => {
|
|
18514
|
-
return /* @__PURE__ */
|
|
18792
|
+
return /* @__PURE__ */ jsx340(
|
|
18515
18793
|
StyledTable,
|
|
18516
18794
|
{
|
|
18517
18795
|
$divided: divided,
|
|
@@ -18524,37 +18802,37 @@ var Table = ({
|
|
|
18524
18802
|
};
|
|
18525
18803
|
|
|
18526
18804
|
// src/components/Table/TableBody.tsx
|
|
18527
|
-
import { styled as
|
|
18805
|
+
import { styled as styled104 } from "styled-components";
|
|
18528
18806
|
|
|
18529
18807
|
// src/components/Table/TableSectionContext.ts
|
|
18530
18808
|
import { createContext as createContext11 } from "react";
|
|
18531
18809
|
var TableSectionContext = createContext11(null);
|
|
18532
18810
|
|
|
18533
18811
|
// src/components/Table/TableBody.tsx
|
|
18534
|
-
import { jsx as
|
|
18535
|
-
var StyledTableBody =
|
|
18812
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
18813
|
+
var StyledTableBody = styled104.tbody`
|
|
18536
18814
|
width: 100%;
|
|
18537
18815
|
`;
|
|
18538
18816
|
var TableBody = ({ children, ...props }) => {
|
|
18539
|
-
return /* @__PURE__ */
|
|
18817
|
+
return /* @__PURE__ */ jsx341(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx341(StyledTableBody, { ...props, children }) });
|
|
18540
18818
|
};
|
|
18541
18819
|
|
|
18542
18820
|
// src/components/Table/TableCell.tsx
|
|
18543
18821
|
import { useContext as useContext17 } from "react";
|
|
18544
|
-
import { styled as
|
|
18545
|
-
import { jsx as
|
|
18822
|
+
import { styled as styled105, css as css50 } from "styled-components";
|
|
18823
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
18546
18824
|
var sharedStyles = css50`
|
|
18547
18825
|
color: var(--wui-color-text);
|
|
18548
18826
|
padding: var(--wui-space-02);
|
|
18549
18827
|
text-align: left;
|
|
18550
18828
|
`;
|
|
18551
|
-
var StyledTh =
|
|
18829
|
+
var StyledTh = styled105.th`
|
|
18552
18830
|
${sharedStyles}
|
|
18553
18831
|
font-size: var(--wui-typography-body-4-size);
|
|
18554
18832
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
18555
18833
|
line-height: var(--wui-typography-body-4-line-height);
|
|
18556
18834
|
`;
|
|
18557
|
-
var StyledTd =
|
|
18835
|
+
var StyledTd = styled105.td`
|
|
18558
18836
|
${sharedStyles}
|
|
18559
18837
|
font-size: var(--wui-typography-body-2-size);
|
|
18560
18838
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -18563,45 +18841,45 @@ var StyledTd = styled103.td`
|
|
|
18563
18841
|
var TableCell = ({ children, ...props }) => {
|
|
18564
18842
|
const section = useContext17(TableSectionContext);
|
|
18565
18843
|
if (section === "head") {
|
|
18566
|
-
return /* @__PURE__ */
|
|
18844
|
+
return /* @__PURE__ */ jsx342(StyledTh, { ...props, children });
|
|
18567
18845
|
}
|
|
18568
|
-
return /* @__PURE__ */
|
|
18846
|
+
return /* @__PURE__ */ jsx342(StyledTd, { ...props, children });
|
|
18569
18847
|
};
|
|
18570
18848
|
|
|
18571
18849
|
// src/components/Table/TableFoot.tsx
|
|
18572
|
-
import { styled as
|
|
18573
|
-
import { jsx as
|
|
18574
|
-
var StyledTableFoot =
|
|
18850
|
+
import { styled as styled106 } from "styled-components";
|
|
18851
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
18852
|
+
var StyledTableFoot = styled106.tfoot`
|
|
18575
18853
|
width: 100%;
|
|
18576
18854
|
`;
|
|
18577
18855
|
var TableFoot = ({ children, ...props }) => {
|
|
18578
|
-
return /* @__PURE__ */
|
|
18856
|
+
return /* @__PURE__ */ jsx343(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx343(StyledTableFoot, { ...props, children }) });
|
|
18579
18857
|
};
|
|
18580
18858
|
|
|
18581
18859
|
// src/components/Table/TableHead.tsx
|
|
18582
|
-
import { styled as
|
|
18583
|
-
import { jsx as
|
|
18584
|
-
var StyledThead =
|
|
18860
|
+
import { styled as styled107 } from "styled-components";
|
|
18861
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
18862
|
+
var StyledThead = styled107.thead`
|
|
18585
18863
|
width: 100%;
|
|
18586
18864
|
`;
|
|
18587
18865
|
var TableHead = ({ children, ...props }) => {
|
|
18588
|
-
return /* @__PURE__ */
|
|
18866
|
+
return /* @__PURE__ */ jsx344(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx344(StyledThead, { ...props, children }) });
|
|
18589
18867
|
};
|
|
18590
18868
|
|
|
18591
18869
|
// src/components/Table/TableRow.tsx
|
|
18592
|
-
import { styled as
|
|
18593
|
-
import { jsx as
|
|
18594
|
-
var StyledTableRow =
|
|
18870
|
+
import { styled as styled108 } from "styled-components";
|
|
18871
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
18872
|
+
var StyledTableRow = styled108.tr`
|
|
18595
18873
|
width: 100%;
|
|
18596
18874
|
`;
|
|
18597
18875
|
var TableRow = ({ children, ...props }) => {
|
|
18598
|
-
return /* @__PURE__ */
|
|
18876
|
+
return /* @__PURE__ */ jsx345(StyledTableRow, { ...props, children });
|
|
18599
18877
|
};
|
|
18600
18878
|
|
|
18601
18879
|
// src/components/Tabs/Tabs.tsx
|
|
18602
18880
|
import { Root as RadixTabsRoot } from "@radix-ui/react-tabs";
|
|
18603
|
-
import { useCallback as useCallback19, useState as
|
|
18604
|
-
import { isNotNil as
|
|
18881
|
+
import { useCallback as useCallback19, useState as useState27 } from "react";
|
|
18882
|
+
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
18605
18883
|
|
|
18606
18884
|
// src/components/Tabs/useTabsValue.tsx
|
|
18607
18885
|
import { createContext as createContext12, useContext as useContext18 } from "react";
|
|
@@ -18616,7 +18894,7 @@ var useTabsValue = () => {
|
|
|
18616
18894
|
};
|
|
18617
18895
|
|
|
18618
18896
|
// src/components/Tabs/Tabs.tsx
|
|
18619
|
-
import { jsx as
|
|
18897
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
18620
18898
|
var Tabs = ({
|
|
18621
18899
|
children,
|
|
18622
18900
|
value: valueProp,
|
|
@@ -18624,7 +18902,7 @@ var Tabs = ({
|
|
|
18624
18902
|
defaultValue,
|
|
18625
18903
|
...props
|
|
18626
18904
|
}) => {
|
|
18627
|
-
const [value, setValue] =
|
|
18905
|
+
const [value, setValue] = useState27(valueProp ?? defaultValue);
|
|
18628
18906
|
const onValueChange = useCallback19(
|
|
18629
18907
|
(newValue) => {
|
|
18630
18908
|
setValue(newValue);
|
|
@@ -18638,48 +18916,48 @@ var Tabs = ({
|
|
|
18638
18916
|
...props,
|
|
18639
18917
|
onValueChange
|
|
18640
18918
|
};
|
|
18641
|
-
if (
|
|
18919
|
+
if (isNotNil41(value)) {
|
|
18642
18920
|
rootProps.value = value;
|
|
18643
18921
|
}
|
|
18644
|
-
if (
|
|
18922
|
+
if (isNotNil41(defaultValue)) {
|
|
18645
18923
|
rootProps.defaultValue = defaultValue;
|
|
18646
18924
|
}
|
|
18647
|
-
return /* @__PURE__ */
|
|
18925
|
+
return /* @__PURE__ */ jsx346(RadixTabsRoot, { ...rootProps, children: /* @__PURE__ */ jsx346(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx346(SelectedItemStyleProvider, { children }) }) });
|
|
18648
18926
|
};
|
|
18649
18927
|
Tabs.displayName = "Tabs_UI";
|
|
18650
18928
|
|
|
18651
18929
|
// src/components/Tabs/TabsContent.tsx
|
|
18652
18930
|
import { Content as RadixTabsContent } from "@radix-ui/react-tabs";
|
|
18653
|
-
import { jsx as
|
|
18931
|
+
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
18654
18932
|
var TabsContent = ({ children, value }) => {
|
|
18655
|
-
return /* @__PURE__ */
|
|
18933
|
+
return /* @__PURE__ */ jsx347(RadixTabsContent, { value, children });
|
|
18656
18934
|
};
|
|
18657
18935
|
TabsContent.displayName = "TabsContent_UI";
|
|
18658
18936
|
|
|
18659
18937
|
// src/components/Tabs/TabsList.tsx
|
|
18660
18938
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
18661
|
-
import { styled as
|
|
18939
|
+
import { styled as styled110 } from "styled-components";
|
|
18662
18940
|
|
|
18663
18941
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18664
18942
|
import { isUndefined as isUndefined6 } from "@wistia/type-guards";
|
|
18665
18943
|
|
|
18666
18944
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
18667
|
-
import { styled as
|
|
18668
|
-
var TabsSelectedItemIndicatorDiv =
|
|
18945
|
+
import { styled as styled109 } from "styled-components";
|
|
18946
|
+
var TabsSelectedItemIndicatorDiv = styled109(SelectedItemIndicatorDiv)`
|
|
18669
18947
|
:has(button[role='tab']:focus-visible) > & {
|
|
18670
18948
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
18671
18949
|
}
|
|
18672
18950
|
`;
|
|
18673
18951
|
|
|
18674
18952
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18675
|
-
import { jsx as
|
|
18953
|
+
import { jsx as jsx348 } from "react/jsx-runtime";
|
|
18676
18954
|
var SelectedTabIndicator = () => {
|
|
18677
18955
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
18678
18956
|
const selectedValue = useTabsValue();
|
|
18679
18957
|
if (selectedValue == null || isUndefined6(selectedItemIndicatorStyle)) {
|
|
18680
18958
|
return null;
|
|
18681
18959
|
}
|
|
18682
|
-
return /* @__PURE__ */
|
|
18960
|
+
return /* @__PURE__ */ jsx348(
|
|
18683
18961
|
TabsSelectedItemIndicatorDiv,
|
|
18684
18962
|
{
|
|
18685
18963
|
"data-wui-selected-item-indicator": true,
|
|
@@ -18689,19 +18967,19 @@ var SelectedTabIndicator = () => {
|
|
|
18689
18967
|
};
|
|
18690
18968
|
|
|
18691
18969
|
// src/components/Tabs/TabsList.tsx
|
|
18692
|
-
import { jsx as
|
|
18693
|
-
var StyledRadixTabsList =
|
|
18970
|
+
import { jsx as jsx349, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
18971
|
+
var StyledRadixTabsList = styled110(RadixTabList)`
|
|
18694
18972
|
${segmentedControlStyles}
|
|
18695
18973
|
`;
|
|
18696
18974
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
18697
|
-
return /* @__PURE__ */
|
|
18975
|
+
return /* @__PURE__ */ jsxs69(
|
|
18698
18976
|
StyledRadixTabsList,
|
|
18699
18977
|
{
|
|
18700
18978
|
$fullWidth: fullWidth,
|
|
18701
18979
|
"aria-label": props["aria-label"],
|
|
18702
18980
|
children: [
|
|
18703
18981
|
children,
|
|
18704
|
-
/* @__PURE__ */
|
|
18982
|
+
/* @__PURE__ */ jsx349(SelectedTabIndicator, {})
|
|
18705
18983
|
]
|
|
18706
18984
|
}
|
|
18707
18985
|
);
|
|
@@ -18709,13 +18987,13 @@ var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
18709
18987
|
TabsList.displayName = "TabsList_UI";
|
|
18710
18988
|
|
|
18711
18989
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18712
|
-
import { forwardRef as forwardRef36, useEffect as
|
|
18713
|
-
import { isNotNil as
|
|
18990
|
+
import { forwardRef as forwardRef36, useEffect as useEffect24, useRef as useRef24 } from "react";
|
|
18991
|
+
import { isNotNil as isNotNil42 } from "@wistia/type-guards";
|
|
18714
18992
|
|
|
18715
18993
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
18716
|
-
import { styled as
|
|
18994
|
+
import { styled as styled111 } from "styled-components";
|
|
18717
18995
|
import { Trigger as RadixTabsTrigger } from "@radix-ui/react-tabs";
|
|
18718
|
-
var StyledRadixTabsTrigger =
|
|
18996
|
+
var StyledRadixTabsTrigger = styled111(RadixTabsTrigger)`
|
|
18719
18997
|
${segmentedControlItemStyles}
|
|
18720
18998
|
|
|
18721
18999
|
&:focus-visible {
|
|
@@ -18724,14 +19002,14 @@ var StyledRadixTabsTrigger = styled109(RadixTabsTrigger)`
|
|
|
18724
19002
|
`;
|
|
18725
19003
|
|
|
18726
19004
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18727
|
-
import { jsxs as
|
|
19005
|
+
import { jsxs as jsxs70 } from "react/jsx-runtime";
|
|
18728
19006
|
var TabsTrigger = forwardRef36(
|
|
18729
19007
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
18730
19008
|
const selectedValue = useTabsValue();
|
|
18731
19009
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
18732
19010
|
const buttonRef = useRef24(null);
|
|
18733
19011
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
18734
|
-
|
|
19012
|
+
useEffect24(() => {
|
|
18735
19013
|
const buttonElem = buttonRef.current;
|
|
18736
19014
|
if (!buttonElem) {
|
|
18737
19015
|
return void 0;
|
|
@@ -18756,13 +19034,13 @@ var TabsTrigger = forwardRef36(
|
|
|
18756
19034
|
resizeObserver.disconnect();
|
|
18757
19035
|
};
|
|
18758
19036
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
18759
|
-
return /* @__PURE__ */
|
|
19037
|
+
return /* @__PURE__ */ jsxs70(
|
|
18760
19038
|
StyledRadixTabsTrigger,
|
|
18761
19039
|
{
|
|
18762
19040
|
...otherProps,
|
|
18763
19041
|
ref: combinedRef,
|
|
18764
|
-
$hasLabel:
|
|
18765
|
-
"aria-label":
|
|
19042
|
+
$hasLabel: isNotNil42(label),
|
|
19043
|
+
"aria-label": isNotNil42(label) ? void 0 : ariaLabel,
|
|
18766
19044
|
disabled,
|
|
18767
19045
|
value,
|
|
18768
19046
|
children: [
|
|
@@ -18776,10 +19054,10 @@ var TabsTrigger = forwardRef36(
|
|
|
18776
19054
|
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
18777
19055
|
|
|
18778
19056
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
18779
|
-
import { styled as
|
|
18780
|
-
import { isNotNil as
|
|
18781
|
-
import { jsx as
|
|
18782
|
-
var StyledThumbnailBadge =
|
|
19057
|
+
import { styled as styled112 } from "styled-components";
|
|
19058
|
+
import { isNotNil as isNotNil43 } from "@wistia/type-guards";
|
|
19059
|
+
import { jsx as jsx350, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
19060
|
+
var StyledThumbnailBadge = styled112.div`
|
|
18783
19061
|
align-items: center;
|
|
18784
19062
|
background-color: rgb(0 0 0 / 50%);
|
|
18785
19063
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -18805,19 +19083,19 @@ var StyledThumbnailBadge = styled110.div`
|
|
|
18805
19083
|
}
|
|
18806
19084
|
`;
|
|
18807
19085
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
18808
|
-
return /* @__PURE__ */
|
|
18809
|
-
|
|
18810
|
-
/* @__PURE__ */
|
|
19086
|
+
return /* @__PURE__ */ jsxs71(StyledThumbnailBadge, { ...props, children: [
|
|
19087
|
+
isNotNil43(icon) && icon,
|
|
19088
|
+
/* @__PURE__ */ jsx350("span", { children: label })
|
|
18811
19089
|
] });
|
|
18812
19090
|
};
|
|
18813
19091
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
18814
19092
|
|
|
18815
19093
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18816
|
-
import { forwardRef as forwardRef37, useState as
|
|
18817
|
-
import { styled as
|
|
19094
|
+
import { forwardRef as forwardRef37, useState as useState28, useRef as useRef25, useCallback as useCallback20, useMemo as useMemo18 } from "react";
|
|
19095
|
+
import { styled as styled114 } from "styled-components";
|
|
18818
19096
|
import {
|
|
18819
|
-
isNil as
|
|
18820
|
-
isNotNil as
|
|
19097
|
+
isNil as isNil20,
|
|
19098
|
+
isNotNil as isNotNil46,
|
|
18821
19099
|
isUndefined as isUndefined7,
|
|
18822
19100
|
isEmptyString as isEmptyString2,
|
|
18823
19101
|
isString as isString4,
|
|
@@ -18825,7 +19103,7 @@ import {
|
|
|
18825
19103
|
} from "@wistia/type-guards";
|
|
18826
19104
|
|
|
18827
19105
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
18828
|
-
import { isNotNil as
|
|
19106
|
+
import { isNotNil as isNotNil44 } from "@wistia/type-guards";
|
|
18829
19107
|
import { css as css51 } from "styled-components";
|
|
18830
19108
|
var gradients = {
|
|
18831
19109
|
defaultDarkOne: css51`
|
|
@@ -18953,14 +19231,14 @@ var gradients = {
|
|
|
18953
19231
|
};
|
|
18954
19232
|
var gradientMap = Object.keys(gradients);
|
|
18955
19233
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
18956
|
-
return
|
|
19234
|
+
return isNotNil44(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
18957
19235
|
};
|
|
18958
19236
|
|
|
18959
19237
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
18960
|
-
import { styled as
|
|
18961
|
-
import { isNotNil as
|
|
18962
|
-
import { jsx as
|
|
18963
|
-
var ScrubLine =
|
|
19238
|
+
import { styled as styled113 } from "styled-components";
|
|
19239
|
+
import { isNotNil as isNotNil45 } from "@wistia/type-guards";
|
|
19240
|
+
import { jsx as jsx351, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
19241
|
+
var ScrubLine = styled113.div`
|
|
18964
19242
|
position: absolute;
|
|
18965
19243
|
top: 0;
|
|
18966
19244
|
height: 100%;
|
|
@@ -19052,8 +19330,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
19052
19330
|
);
|
|
19053
19331
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
19054
19332
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
19055
|
-
const showScrubLine =
|
|
19056
|
-
const scrubLinePosition =
|
|
19333
|
+
const showScrubLine = isNotNil45(cursorPosition);
|
|
19334
|
+
const scrubLinePosition = isNotNil45(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
19057
19335
|
const viewerStyles = {
|
|
19058
19336
|
position: "relative",
|
|
19059
19337
|
overflow: "hidden",
|
|
@@ -19071,14 +19349,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
19071
19349
|
backgroundPosition,
|
|
19072
19350
|
backgroundSize
|
|
19073
19351
|
};
|
|
19074
|
-
return /* @__PURE__ */
|
|
19352
|
+
return /* @__PURE__ */ jsxs72(
|
|
19075
19353
|
"div",
|
|
19076
19354
|
{
|
|
19077
19355
|
...props,
|
|
19078
19356
|
style: viewerStyles,
|
|
19079
19357
|
children: [
|
|
19080
|
-
/* @__PURE__ */
|
|
19081
|
-
showScrubLine ? /* @__PURE__ */
|
|
19358
|
+
/* @__PURE__ */ jsx351("div", { style: storyboardStyles }),
|
|
19359
|
+
showScrubLine ? /* @__PURE__ */ jsx351(
|
|
19082
19360
|
ScrubLine,
|
|
19083
19361
|
{
|
|
19084
19362
|
style: {
|
|
@@ -19092,7 +19370,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
19092
19370
|
};
|
|
19093
19371
|
|
|
19094
19372
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
19095
|
-
import { jsx as
|
|
19373
|
+
import { jsx as jsx352, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
19096
19374
|
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
19097
19375
|
var SQUARE_ASPECT_RATIO = 1;
|
|
19098
19376
|
var getAspectRatioValue = (aspectRatio) => {
|
|
@@ -19101,19 +19379,19 @@ var getAspectRatioValue = (aspectRatio) => {
|
|
|
19101
19379
|
}
|
|
19102
19380
|
return WIDE_ASPECT_RATIO;
|
|
19103
19381
|
};
|
|
19104
|
-
var WideThumbnailImage =
|
|
19382
|
+
var WideThumbnailImage = styled114.img`
|
|
19105
19383
|
height: 100%;
|
|
19106
19384
|
object-fit: cover;
|
|
19107
19385
|
width: 100%;
|
|
19108
19386
|
`;
|
|
19109
|
-
var SquareThumbnailImage =
|
|
19387
|
+
var SquareThumbnailImage = styled114.img`
|
|
19110
19388
|
backdrop-filter: blur(8px);
|
|
19111
19389
|
object-fit: contain;
|
|
19112
19390
|
width: 100%;
|
|
19113
19391
|
`;
|
|
19114
19392
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
19115
19393
|
if (thumbnailImageType === "wide") {
|
|
19116
|
-
return /* @__PURE__ */
|
|
19394
|
+
return /* @__PURE__ */ jsx352(
|
|
19117
19395
|
WideThumbnailImage,
|
|
19118
19396
|
{
|
|
19119
19397
|
alt: "",
|
|
@@ -19122,7 +19400,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
19122
19400
|
}
|
|
19123
19401
|
);
|
|
19124
19402
|
}
|
|
19125
|
-
return /* @__PURE__ */
|
|
19403
|
+
return /* @__PURE__ */ jsx352(
|
|
19126
19404
|
SquareThumbnailImage,
|
|
19127
19405
|
{
|
|
19128
19406
|
alt: "",
|
|
@@ -19131,7 +19409,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
19131
19409
|
}
|
|
19132
19410
|
);
|
|
19133
19411
|
};
|
|
19134
|
-
var StyledThumbnailContainer =
|
|
19412
|
+
var StyledThumbnailContainer = styled114.div`
|
|
19135
19413
|
container-type: size;
|
|
19136
19414
|
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
19137
19415
|
width: ${({ $width }) => $width};
|
|
@@ -19139,13 +19417,13 @@ var StyledThumbnailContainer = styled112.div`
|
|
|
19139
19417
|
overflow: hidden;
|
|
19140
19418
|
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
19141
19419
|
`;
|
|
19142
|
-
var StyledThumbnail =
|
|
19420
|
+
var StyledThumbnail = styled114.div`
|
|
19143
19421
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
19144
19422
|
|
|
19145
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
19423
|
+
background-image: ${({ $backgroundUrl }) => isNotNil46($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
19146
19424
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
19147
19425
|
// if we don't have $backgroundUrl show a gradient
|
|
19148
|
-
|
|
19426
|
+
isNil20($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
19149
19427
|
)};
|
|
19150
19428
|
background-position: center center;
|
|
19151
19429
|
background-size: cover;
|
|
@@ -19174,7 +19452,7 @@ var StoryboardRenderer = ({
|
|
|
19174
19452
|
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
19175
19453
|
const targetWidth = isString4(width) ? parseInt(width, 10) : Number(width);
|
|
19176
19454
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
19177
|
-
return /* @__PURE__ */
|
|
19455
|
+
return /* @__PURE__ */ jsx352(
|
|
19178
19456
|
ThumbnailStoryboardViewer,
|
|
19179
19457
|
{
|
|
19180
19458
|
cursorPosition: effectiveCursorPosition,
|
|
@@ -19200,7 +19478,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
19200
19478
|
};
|
|
19201
19479
|
};
|
|
19202
19480
|
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
19203
|
-
return
|
|
19481
|
+
return isNotNil46(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
19204
19482
|
};
|
|
19205
19483
|
var Thumbnail = forwardRef37(
|
|
19206
19484
|
({
|
|
@@ -19214,16 +19492,16 @@ var Thumbnail = forwardRef37(
|
|
|
19214
19492
|
aspectRatio = "wide",
|
|
19215
19493
|
...props
|
|
19216
19494
|
}, ref) => {
|
|
19217
|
-
const [percent, setPercent] =
|
|
19218
|
-
const [isMouseOver, setIsMouseOver] =
|
|
19219
|
-
const [isStoryboardReady, setIsStoryboardReady] =
|
|
19495
|
+
const [percent, setPercent] = useState28(0);
|
|
19496
|
+
const [isMouseOver, setIsMouseOver] = useState28(false);
|
|
19497
|
+
const [isStoryboardReady, setIsStoryboardReady] = useState28(false);
|
|
19220
19498
|
const storyboardElementRef = useRef25(null);
|
|
19221
|
-
const [cursorPosition, setCursorPosition] =
|
|
19222
|
-
const backgroundUrl =
|
|
19499
|
+
const [cursorPosition, setCursorPosition] = useState28(null);
|
|
19500
|
+
const backgroundUrl = useMemo18(
|
|
19223
19501
|
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
19224
19502
|
[thumbnailImageType, thumbnailUrl]
|
|
19225
19503
|
);
|
|
19226
|
-
const isScrubbable =
|
|
19504
|
+
const isScrubbable = isNotNil46(storyboard);
|
|
19227
19505
|
const trackStoryboardLoadStatus = useCallback20(() => {
|
|
19228
19506
|
if (storyboardElementRef.current || !storyboard) {
|
|
19229
19507
|
return storyboardElementRef.current;
|
|
@@ -19256,15 +19534,15 @@ var Thumbnail = forwardRef37(
|
|
|
19256
19534
|
setIsMouseOver(false);
|
|
19257
19535
|
setCursorPosition(null);
|
|
19258
19536
|
}, [isScrubbable]);
|
|
19259
|
-
const shouldRenderStoryboard =
|
|
19260
|
-
if (
|
|
19537
|
+
const shouldRenderStoryboard = useMemo18(() => {
|
|
19538
|
+
if (isNil20(storyboard) || isUndefined7(height) || isEmptyString2(height)) {
|
|
19261
19539
|
return false;
|
|
19262
19540
|
}
|
|
19263
19541
|
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
19264
19542
|
}, [isScrubbable, isMouseOver, isStoryboardReady, storyboard, height]);
|
|
19265
19543
|
let thumbnailContent = null;
|
|
19266
19544
|
if (storyboard && shouldRenderStoryboard) {
|
|
19267
|
-
thumbnailContent = /* @__PURE__ */
|
|
19545
|
+
thumbnailContent = /* @__PURE__ */ jsx352(
|
|
19268
19546
|
StoryboardRenderer,
|
|
19269
19547
|
{
|
|
19270
19548
|
aspectRatio,
|
|
@@ -19276,7 +19554,7 @@ var Thumbnail = forwardRef37(
|
|
|
19276
19554
|
}
|
|
19277
19555
|
);
|
|
19278
19556
|
} else if (hasValidThumbnailUrl(thumbnailUrl)) {
|
|
19279
|
-
thumbnailContent = /* @__PURE__ */
|
|
19557
|
+
thumbnailContent = /* @__PURE__ */ jsx352(
|
|
19280
19558
|
ThumbnailImage,
|
|
19281
19559
|
{
|
|
19282
19560
|
thumbnailImageType,
|
|
@@ -19286,7 +19564,7 @@ var Thumbnail = forwardRef37(
|
|
|
19286
19564
|
} else {
|
|
19287
19565
|
thumbnailContent = null;
|
|
19288
19566
|
}
|
|
19289
|
-
return /* @__PURE__ */
|
|
19567
|
+
return /* @__PURE__ */ jsx352(
|
|
19290
19568
|
StyledThumbnailContainer,
|
|
19291
19569
|
{
|
|
19292
19570
|
ref,
|
|
@@ -19299,14 +19577,14 @@ var Thumbnail = forwardRef37(
|
|
|
19299
19577
|
onMouseOut: handleMouseOut,
|
|
19300
19578
|
role: "presentation",
|
|
19301
19579
|
...props,
|
|
19302
|
-
children: /* @__PURE__ */
|
|
19580
|
+
children: /* @__PURE__ */ jsxs73(
|
|
19303
19581
|
StyledThumbnail,
|
|
19304
19582
|
{
|
|
19305
19583
|
$backgroundUrl: backgroundUrl,
|
|
19306
19584
|
$gradientBackground: gradientBackground,
|
|
19307
19585
|
"data-testid": "thumbnail-inner",
|
|
19308
19586
|
children: [
|
|
19309
|
-
|
|
19587
|
+
isNotNil46(children) ? children : null,
|
|
19310
19588
|
thumbnailContent
|
|
19311
19589
|
]
|
|
19312
19590
|
}
|
|
@@ -19319,16 +19597,16 @@ Thumbnail.displayName = "Thumbnail_UI";
|
|
|
19319
19597
|
|
|
19320
19598
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
19321
19599
|
import { cloneElement as cloneElement10, Children as Children11 } from "react";
|
|
19322
|
-
import { styled as
|
|
19600
|
+
import { styled as styled115 } from "styled-components";
|
|
19323
19601
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
19324
|
-
import { jsx as
|
|
19325
|
-
var ThumbnailCollageContainer =
|
|
19602
|
+
import { jsx as jsx353 } from "react/jsx-runtime";
|
|
19603
|
+
var ThumbnailCollageContainer = styled115.div`
|
|
19326
19604
|
container-type: size;
|
|
19327
19605
|
width: 100%;
|
|
19328
19606
|
aspect-ratio: 16 / 9;
|
|
19329
19607
|
display: flex;
|
|
19330
19608
|
`;
|
|
19331
|
-
var StyledThumbnailCollage =
|
|
19609
|
+
var StyledThumbnailCollage = styled115.div`
|
|
19332
19610
|
display: grid;
|
|
19333
19611
|
gap: var(--wui-space-01);
|
|
19334
19612
|
width: 100%;
|
|
@@ -19386,7 +19664,7 @@ var ThumbnailCollage = ({
|
|
|
19386
19664
|
});
|
|
19387
19665
|
}) : [
|
|
19388
19666
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
19389
|
-
/* @__PURE__ */
|
|
19667
|
+
/* @__PURE__ */ jsx353(
|
|
19390
19668
|
Thumbnail,
|
|
19391
19669
|
{
|
|
19392
19670
|
gradientBackground,
|
|
@@ -19395,7 +19673,7 @@ var ThumbnailCollage = ({
|
|
|
19395
19673
|
"fallback"
|
|
19396
19674
|
)
|
|
19397
19675
|
];
|
|
19398
|
-
return /* @__PURE__ */
|
|
19676
|
+
return /* @__PURE__ */ jsx353(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx353(
|
|
19399
19677
|
StyledThumbnailCollage,
|
|
19400
19678
|
{
|
|
19401
19679
|
$gradientBackground: gradientBackground,
|
|
@@ -19407,26 +19685,26 @@ var ThumbnailCollage = ({
|
|
|
19407
19685
|
};
|
|
19408
19686
|
|
|
19409
19687
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
19410
|
-
import { styled as
|
|
19411
|
-
import { isNotNil as
|
|
19412
|
-
import { jsx as
|
|
19688
|
+
import { styled as styled116, css as css52 } from "styled-components";
|
|
19689
|
+
import { isNotNil as isNotNil47 } from "@wistia/type-guards";
|
|
19690
|
+
import { jsx as jsx354, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
19413
19691
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
19414
19692
|
if (iconOnly) {
|
|
19415
|
-
return /* @__PURE__ */
|
|
19693
|
+
return /* @__PURE__ */ jsx354(
|
|
19416
19694
|
"g",
|
|
19417
19695
|
{
|
|
19418
19696
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19419
19697
|
fill: brandmarkColor,
|
|
19420
|
-
children: /* @__PURE__ */
|
|
19698
|
+
children: /* @__PURE__ */ jsx354("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
19421
19699
|
}
|
|
19422
19700
|
);
|
|
19423
19701
|
}
|
|
19424
|
-
return /* @__PURE__ */
|
|
19702
|
+
return /* @__PURE__ */ jsx354(
|
|
19425
19703
|
"g",
|
|
19426
19704
|
{
|
|
19427
19705
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19428
19706
|
fill: brandmarkColor,
|
|
19429
|
-
children: /* @__PURE__ */
|
|
19707
|
+
children: /* @__PURE__ */ jsx354("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
19430
19708
|
}
|
|
19431
19709
|
);
|
|
19432
19710
|
};
|
|
@@ -19434,12 +19712,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
19434
19712
|
if (iconOnly) {
|
|
19435
19713
|
return null;
|
|
19436
19714
|
}
|
|
19437
|
-
return /* @__PURE__ */
|
|
19715
|
+
return /* @__PURE__ */ jsx354(
|
|
19438
19716
|
"g",
|
|
19439
19717
|
{
|
|
19440
19718
|
"data-testid": "ui-wistia-logo-logotype",
|
|
19441
19719
|
fill: logotypeColor,
|
|
19442
|
-
children: /* @__PURE__ */
|
|
19720
|
+
children: /* @__PURE__ */ jsx354("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
19443
19721
|
}
|
|
19444
19722
|
);
|
|
19445
19723
|
};
|
|
@@ -19449,7 +19727,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
19449
19727
|
}
|
|
19450
19728
|
return "0 0 144 31.47";
|
|
19451
19729
|
};
|
|
19452
|
-
var WistiaLogoComponent =
|
|
19730
|
+
var WistiaLogoComponent = styled116.svg`
|
|
19453
19731
|
height: ${({ height }) => `${height}px`};
|
|
19454
19732
|
|
|
19455
19733
|
/* ensure it will always fit on mobile */
|
|
@@ -19507,7 +19785,7 @@ var WistiaLogo = ({
|
|
|
19507
19785
|
};
|
|
19508
19786
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
19509
19787
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
19510
|
-
const Logo = /* @__PURE__ */
|
|
19788
|
+
const Logo = /* @__PURE__ */ jsxs74(
|
|
19511
19789
|
WistiaLogoComponent,
|
|
19512
19790
|
{
|
|
19513
19791
|
$hoverColor: hoverColor,
|
|
@@ -19520,14 +19798,14 @@ var WistiaLogo = ({
|
|
|
19520
19798
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19521
19799
|
...props,
|
|
19522
19800
|
children: [
|
|
19523
|
-
/* @__PURE__ */
|
|
19524
|
-
|
|
19801
|
+
/* @__PURE__ */ jsx354("title", { children: title }),
|
|
19802
|
+
isNotNil47(description) ? /* @__PURE__ */ jsx354("desc", { children: description }) : null,
|
|
19525
19803
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
19526
19804
|
renderLogotype(logotypeColor, iconOnly)
|
|
19527
19805
|
]
|
|
19528
19806
|
}
|
|
19529
19807
|
);
|
|
19530
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
19808
|
+
return href !== void 0 ? /* @__PURE__ */ jsx354("a", { href, children: Logo }) : Logo;
|
|
19531
19809
|
};
|
|
19532
19810
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
19533
19811
|
export {
|
|
@@ -19586,6 +19864,8 @@ export {
|
|
|
19586
19864
|
EditableTextSubmitButton,
|
|
19587
19865
|
EditableTextTrigger,
|
|
19588
19866
|
Ellipsis,
|
|
19867
|
+
FeatureCard,
|
|
19868
|
+
FeatureCardImage,
|
|
19589
19869
|
FileAmountLimitValidator,
|
|
19590
19870
|
FileSizeValidator,
|
|
19591
19871
|
FileTypeValidator,
|