@wistia/ui 0.20.17 → 0.20.18
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 +64 -1
- package/dist/index.js +709 -448
- 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
|
|
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;
|
|
@@ -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(
|
|
@@ -17461,14 +17720,14 @@ var RadioCardRoot = forwardRef28(
|
|
|
17461
17720
|
const radioName = name ?? contextName;
|
|
17462
17721
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17463
17722
|
const isChecked = isNotUndefined15(value) && isNotUndefined15(contextValue) ? contextValue === value : checked;
|
|
17464
|
-
return /* @__PURE__ */
|
|
17723
|
+
return /* @__PURE__ */ jsxs59(
|
|
17465
17724
|
StyledCard2,
|
|
17466
17725
|
{
|
|
17467
17726
|
$aspectRatio: aspectRatio,
|
|
17468
17727
|
$padding: padding,
|
|
17469
17728
|
htmlFor: computedId,
|
|
17470
17729
|
children: [
|
|
17471
|
-
/* @__PURE__ */
|
|
17730
|
+
/* @__PURE__ */ jsx327(
|
|
17472
17731
|
StyledHiddenInput,
|
|
17473
17732
|
{
|
|
17474
17733
|
...props,
|
|
@@ -17491,12 +17750,12 @@ var RadioCardRoot = forwardRef28(
|
|
|
17491
17750
|
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
17492
17751
|
|
|
17493
17752
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17494
|
-
import { styled as
|
|
17495
|
-
import { isNotNil as
|
|
17753
|
+
import { styled as styled92 } from "styled-components";
|
|
17754
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
17496
17755
|
|
|
17497
17756
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
17498
|
-
import { styled as
|
|
17499
|
-
var RadioCardIndicator =
|
|
17757
|
+
import { styled as styled91 } from "styled-components";
|
|
17758
|
+
var RadioCardIndicator = styled91.div`
|
|
17500
17759
|
--wui-radio-card-indicator-size: 14px;
|
|
17501
17760
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
17502
17761
|
--wui-radio-card-indicator-fill-color: var(--wui-color-bg-fill);
|
|
@@ -17545,16 +17804,16 @@ var RadioCardIndicator = styled89.div`
|
|
|
17545
17804
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
17546
17805
|
|
|
17547
17806
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17548
|
-
import { jsx as
|
|
17549
|
-
var StyledCardContent =
|
|
17807
|
+
import { jsx as jsx328, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17808
|
+
var StyledCardContent = styled92.div`
|
|
17550
17809
|
display: grid;
|
|
17551
17810
|
grid-auto-flow: column;
|
|
17552
17811
|
gap: var(--wui-space-02);
|
|
17553
17812
|
`;
|
|
17554
|
-
var StyledCardIcon =
|
|
17813
|
+
var StyledCardIcon = styled92.div`
|
|
17555
17814
|
display: contents;
|
|
17556
17815
|
`;
|
|
17557
|
-
var StyledIndicatorContainer =
|
|
17816
|
+
var StyledIndicatorContainer = styled92.div`
|
|
17558
17817
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
17559
17818
|
display: flex;
|
|
17560
17819
|
align-items: center;
|
|
@@ -17565,18 +17824,18 @@ var RadioCardDefaultLayout = ({
|
|
|
17565
17824
|
description,
|
|
17566
17825
|
showIndicator = true
|
|
17567
17826
|
}) => {
|
|
17568
|
-
return /* @__PURE__ */
|
|
17569
|
-
showIndicator ? /* @__PURE__ */
|
|
17570
|
-
/* @__PURE__ */
|
|
17571
|
-
|
|
17572
|
-
/* @__PURE__ */
|
|
17827
|
+
return /* @__PURE__ */ jsxs60(StyledCardContent, { children: [
|
|
17828
|
+
showIndicator ? /* @__PURE__ */ jsx328(StyledIndicatorContainer, { $hasIcon: isNotNil37(icon), children: /* @__PURE__ */ jsx328(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
17829
|
+
/* @__PURE__ */ jsxs60(Stack, { gap: "space-02", children: [
|
|
17830
|
+
isNotNil37(icon) && /* @__PURE__ */ jsx328(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
17831
|
+
/* @__PURE__ */ jsxs60(
|
|
17573
17832
|
Stack,
|
|
17574
17833
|
{
|
|
17575
17834
|
gap: "space-01",
|
|
17576
|
-
style:
|
|
17835
|
+
style: isNotNil37(icon) ? { paddingLeft: 2 } : void 0,
|
|
17577
17836
|
children: [
|
|
17578
|
-
|
|
17579
|
-
|
|
17837
|
+
isNotNil37(label) && /* @__PURE__ */ jsx328(Text, { variant: "label3", children: /* @__PURE__ */ jsx328("strong", { children: label }) }),
|
|
17838
|
+
isNotNil37(description) && /* @__PURE__ */ jsx328(
|
|
17580
17839
|
Text,
|
|
17581
17840
|
{
|
|
17582
17841
|
prominence: "secondary",
|
|
@@ -17593,22 +17852,22 @@ var RadioCardDefaultLayout = ({
|
|
|
17593
17852
|
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
17594
17853
|
|
|
17595
17854
|
// src/components/RadioCard/RadioCardChildrenContainer.tsx
|
|
17596
|
-
import { styled as
|
|
17597
|
-
var RadioCardChildrenContainer =
|
|
17855
|
+
import { styled as styled93 } from "styled-components";
|
|
17856
|
+
var RadioCardChildrenContainer = styled93.div`
|
|
17598
17857
|
flex: 1 1 auto;
|
|
17599
17858
|
`;
|
|
17600
17859
|
|
|
17601
17860
|
// src/components/RadioCard/RadioCard.tsx
|
|
17602
|
-
import { jsx as
|
|
17861
|
+
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
17603
17862
|
var RadioCard = forwardRef29(
|
|
17604
17863
|
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
17605
|
-
return /* @__PURE__ */
|
|
17864
|
+
return /* @__PURE__ */ jsx329(
|
|
17606
17865
|
RadioCardRoot,
|
|
17607
17866
|
{
|
|
17608
17867
|
ref,
|
|
17609
17868
|
padding: children != null ? "space-00" : "space-04",
|
|
17610
17869
|
...rootProps,
|
|
17611
|
-
children: children != null ? /* @__PURE__ */
|
|
17870
|
+
children: children != null ? /* @__PURE__ */ jsx329(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ jsx329(
|
|
17612
17871
|
RadioCardDefaultLayout,
|
|
17613
17872
|
{
|
|
17614
17873
|
description,
|
|
@@ -17625,17 +17884,17 @@ RadioCard.displayName = "RadioCard_UI";
|
|
|
17625
17884
|
|
|
17626
17885
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
17627
17886
|
import { forwardRef as forwardRef30 } from "react";
|
|
17628
|
-
import { jsx as
|
|
17887
|
+
import { jsx as jsx330 } from "react/jsx-runtime";
|
|
17629
17888
|
var RadioCardImage = forwardRef30(
|
|
17630
17889
|
({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
|
|
17631
|
-
return /* @__PURE__ */
|
|
17890
|
+
return /* @__PURE__ */ jsx330(
|
|
17632
17891
|
RadioCardRoot,
|
|
17633
17892
|
{
|
|
17634
17893
|
ref,
|
|
17635
17894
|
...rootProps,
|
|
17636
17895
|
aspectRatio,
|
|
17637
17896
|
padding,
|
|
17638
|
-
children: /* @__PURE__ */
|
|
17897
|
+
children: /* @__PURE__ */ jsx330(
|
|
17639
17898
|
Image,
|
|
17640
17899
|
{
|
|
17641
17900
|
alt: label,
|
|
@@ -17652,50 +17911,50 @@ var RadioCardImage = forwardRef30(
|
|
|
17652
17911
|
RadioCardImage.displayName = "RadioCardImage_UI";
|
|
17653
17912
|
|
|
17654
17913
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
17655
|
-
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as
|
|
17656
|
-
import { styled as
|
|
17914
|
+
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as useEffect22, useMemo as useMemo16, useRef as useRef22, useState as useState25 } from "react";
|
|
17915
|
+
import { styled as styled94 } from "styled-components";
|
|
17657
17916
|
import { throttle } from "throttle-debounce";
|
|
17658
|
-
import { jsx as
|
|
17917
|
+
import { jsx as jsx331, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
17659
17918
|
var SHADOW_SIZE_PX = 8;
|
|
17660
|
-
var Container10 =
|
|
17919
|
+
var Container10 = styled94.div`
|
|
17661
17920
|
overflow: hidden;
|
|
17662
17921
|
position: relative;
|
|
17663
17922
|
flex: 1 1 auto;
|
|
17664
17923
|
`;
|
|
17665
|
-
var ScrollContainer =
|
|
17924
|
+
var ScrollContainer = styled94.div`
|
|
17666
17925
|
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
17667
17926
|
height: 100%;
|
|
17668
17927
|
width: 100%;
|
|
17669
17928
|
`;
|
|
17670
|
-
var Shadow =
|
|
17929
|
+
var Shadow = styled94.div`
|
|
17671
17930
|
pointer-events: none;
|
|
17672
17931
|
position: absolute;
|
|
17673
17932
|
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
17674
17933
|
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
17675
17934
|
z-index: 1;
|
|
17676
17935
|
`;
|
|
17677
|
-
var ShadowAtTop =
|
|
17936
|
+
var ShadowAtTop = styled94(Shadow)`
|
|
17678
17937
|
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
17679
17938
|
height: 0;
|
|
17680
17939
|
left: 0;
|
|
17681
17940
|
right: 0;
|
|
17682
17941
|
top: 0;
|
|
17683
17942
|
`;
|
|
17684
|
-
var ShadowAtBottom =
|
|
17943
|
+
var ShadowAtBottom = styled94(Shadow)`
|
|
17685
17944
|
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
17686
17945
|
bottom: 0;
|
|
17687
17946
|
height: 0;
|
|
17688
17947
|
left: 0;
|
|
17689
17948
|
right: 0;
|
|
17690
17949
|
`;
|
|
17691
|
-
var ShadowAtLeft =
|
|
17950
|
+
var ShadowAtLeft = styled94(Shadow)`
|
|
17692
17951
|
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
17693
17952
|
bottom: 0;
|
|
17694
17953
|
left: 0;
|
|
17695
17954
|
top: 0;
|
|
17696
17955
|
width: 0;
|
|
17697
17956
|
`;
|
|
17698
|
-
var ShadowAtRight =
|
|
17957
|
+
var ShadowAtRight = styled94(Shadow)`
|
|
17699
17958
|
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
17700
17959
|
bottom: 0;
|
|
17701
17960
|
right: 0;
|
|
@@ -17705,7 +17964,7 @@ var ShadowAtRight = styled92(Shadow)`
|
|
|
17705
17964
|
var ScrollArea = forwardRef31(
|
|
17706
17965
|
({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
|
|
17707
17966
|
const scrollContainerRefInternal = useRef22(null);
|
|
17708
|
-
const [shadowState, setShadowState] =
|
|
17967
|
+
const [shadowState, setShadowState] = useState25({
|
|
17709
17968
|
canScrollUp: false,
|
|
17710
17969
|
canScrollLeft: false,
|
|
17711
17970
|
canScrollDown: false,
|
|
@@ -17724,7 +17983,7 @@ var ScrollArea = forwardRef31(
|
|
|
17724
17983
|
canScrollRight: scrollContainer.scrollLeft + scrollContainer.clientWidth < scrollContainer.scrollWidth
|
|
17725
17984
|
});
|
|
17726
17985
|
}, []);
|
|
17727
|
-
const throttledUpdateShadows =
|
|
17986
|
+
const throttledUpdateShadows = useMemo16(() => throttle(100, updateShadows), [updateShadows]);
|
|
17728
17987
|
const onScrollScrollContainer = useCallback18(
|
|
17729
17988
|
(event) => {
|
|
17730
17989
|
onScroll?.(event);
|
|
@@ -17732,15 +17991,15 @@ var ScrollArea = forwardRef31(
|
|
|
17732
17991
|
},
|
|
17733
17992
|
[onScroll, throttledUpdateShadows]
|
|
17734
17993
|
);
|
|
17735
|
-
|
|
17994
|
+
useEffect22(() => {
|
|
17736
17995
|
updateShadows();
|
|
17737
17996
|
}, [updateShadows]);
|
|
17738
|
-
return /* @__PURE__ */
|
|
17739
|
-
/* @__PURE__ */
|
|
17740
|
-
/* @__PURE__ */
|
|
17741
|
-
/* @__PURE__ */
|
|
17742
|
-
/* @__PURE__ */
|
|
17743
|
-
/* @__PURE__ */
|
|
17997
|
+
return /* @__PURE__ */ jsxs61(Container10, { style, children: [
|
|
17998
|
+
/* @__PURE__ */ jsx331(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
17999
|
+
/* @__PURE__ */ jsx331(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
18000
|
+
/* @__PURE__ */ jsx331(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
18001
|
+
/* @__PURE__ */ jsx331(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
18002
|
+
/* @__PURE__ */ jsx331(
|
|
17744
18003
|
ScrollContainer,
|
|
17745
18004
|
{
|
|
17746
18005
|
ref: scrollContainerRef,
|
|
@@ -17757,19 +18016,19 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
17757
18016
|
|
|
17758
18017
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17759
18018
|
import { forwardRef as forwardRef32 } from "react";
|
|
17760
|
-
import { styled as
|
|
18019
|
+
import { styled as styled96, css as css46 } from "styled-components";
|
|
17761
18020
|
import { Root as ToggleGroupRoot2 } from "@radix-ui/react-toggle-group";
|
|
17762
|
-
import { isNil as
|
|
18021
|
+
import { isNil as isNil19 } from "@wistia/type-guards";
|
|
17763
18022
|
|
|
17764
18023
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
17765
|
-
import { createContext as createContext9, useContext as useContext15, useMemo as
|
|
17766
|
-
import { jsx as
|
|
18024
|
+
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo17, useState as useState26 } from "react";
|
|
18025
|
+
import { jsx as jsx332 } from "react/jsx-runtime";
|
|
17767
18026
|
var SelectedItemStyleContext = createContext9(null);
|
|
17768
18027
|
var SelectedItemStyleProvider = ({
|
|
17769
18028
|
children
|
|
17770
18029
|
}) => {
|
|
17771
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] =
|
|
17772
|
-
const selectedItemIndicatorStyle =
|
|
18030
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = useState26(null);
|
|
18031
|
+
const selectedItemIndicatorStyle = useMemo17(
|
|
17773
18032
|
() => selectedItemMeasurements != null ? {
|
|
17774
18033
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
17775
18034
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
|
|
@@ -17777,14 +18036,14 @@ var SelectedItemStyleProvider = ({
|
|
|
17777
18036
|
} : void 0,
|
|
17778
18037
|
[selectedItemMeasurements]
|
|
17779
18038
|
);
|
|
17780
|
-
const contextValue =
|
|
18039
|
+
const contextValue = useMemo17(
|
|
17781
18040
|
() => ({
|
|
17782
18041
|
setSelectedItemMeasurements,
|
|
17783
18042
|
selectedItemIndicatorStyle
|
|
17784
18043
|
}),
|
|
17785
18044
|
[selectedItemIndicatorStyle]
|
|
17786
18045
|
);
|
|
17787
|
-
return /* @__PURE__ */
|
|
18046
|
+
return /* @__PURE__ */ jsx332(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
17788
18047
|
};
|
|
17789
18048
|
var useSelectedItemStyle = () => {
|
|
17790
18049
|
const context = useContext15(SelectedItemStyleContext);
|
|
@@ -17795,7 +18054,7 @@ var useSelectedItemStyle = () => {
|
|
|
17795
18054
|
};
|
|
17796
18055
|
|
|
17797
18056
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17798
|
-
import { styled as
|
|
18057
|
+
import { styled as styled95, css as css45 } from "styled-components";
|
|
17799
18058
|
import { isUndefined as isUndefined5 } from "@wistia/type-guards";
|
|
17800
18059
|
|
|
17801
18060
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
@@ -17811,13 +18070,13 @@ var useSegmentedControlValue = () => {
|
|
|
17811
18070
|
};
|
|
17812
18071
|
|
|
17813
18072
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17814
|
-
import { jsx as
|
|
18073
|
+
import { jsx as jsx333 } from "react/jsx-runtime";
|
|
17815
18074
|
var selectedItemIndicatorStyles = css45`
|
|
17816
18075
|
background-color: var(--wui-color-bg-fill-white);
|
|
17817
18076
|
border-radius: var(--wui-border-radius-rounded);
|
|
17818
18077
|
box-shadow: var(--wui-elevation-01);
|
|
17819
18078
|
`;
|
|
17820
|
-
var SelectedItemIndicatorDiv =
|
|
18079
|
+
var SelectedItemIndicatorDiv = styled95.div`
|
|
17821
18080
|
${selectedItemIndicatorStyles}
|
|
17822
18081
|
left: 0;
|
|
17823
18082
|
position: absolute;
|
|
@@ -17833,7 +18092,7 @@ var SelectedItemIndicator = () => {
|
|
|
17833
18092
|
if (!selectedValue || isUndefined5(selectedItemIndicatorStyle)) {
|
|
17834
18093
|
return null;
|
|
17835
18094
|
}
|
|
17836
|
-
return /* @__PURE__ */
|
|
18095
|
+
return /* @__PURE__ */ jsx333(
|
|
17837
18096
|
SelectedItemIndicatorDiv,
|
|
17838
18097
|
{
|
|
17839
18098
|
"data-wui-selected-item-indicator": true,
|
|
@@ -17843,7 +18102,7 @@ var SelectedItemIndicator = () => {
|
|
|
17843
18102
|
};
|
|
17844
18103
|
|
|
17845
18104
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17846
|
-
import { jsx as
|
|
18105
|
+
import { jsx as jsx334, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17847
18106
|
var segmentedControlStyles = css46`
|
|
17848
18107
|
${({ $colorScheme }) => $colorScheme && getColorScheme($colorScheme)};
|
|
17849
18108
|
${({ $colorScheme }) => $colorScheme !== "nav" && `--wui-color-text-selected: var(--wui-color-text-link);`}
|
|
@@ -17858,7 +18117,7 @@ var segmentedControlStyles = css46`
|
|
|
17858
18117
|
position: relative;
|
|
17859
18118
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
17860
18119
|
`;
|
|
17861
|
-
var StyledSegmentedControl =
|
|
18120
|
+
var StyledSegmentedControl = styled96(ToggleGroupRoot2)`
|
|
17862
18121
|
${segmentedControlStyles}
|
|
17863
18122
|
`;
|
|
17864
18123
|
var SegmentedControl = forwardRef32(
|
|
@@ -17871,10 +18130,10 @@ var SegmentedControl = forwardRef32(
|
|
|
17871
18130
|
onSelectedValueChange,
|
|
17872
18131
|
...props
|
|
17873
18132
|
}, ref) => {
|
|
17874
|
-
if (
|
|
18133
|
+
if (isNil19(children)) {
|
|
17875
18134
|
return null;
|
|
17876
18135
|
}
|
|
17877
|
-
return /* @__PURE__ */
|
|
18136
|
+
return /* @__PURE__ */ jsx334(
|
|
17878
18137
|
StyledSegmentedControl,
|
|
17879
18138
|
{
|
|
17880
18139
|
ref,
|
|
@@ -17887,9 +18146,9 @@ var SegmentedControl = forwardRef32(
|
|
|
17887
18146
|
type: "single",
|
|
17888
18147
|
value: selectedValue,
|
|
17889
18148
|
...props,
|
|
17890
|
-
children: /* @__PURE__ */
|
|
18149
|
+
children: /* @__PURE__ */ jsx334(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs62(SelectedItemStyleProvider, { children: [
|
|
17891
18150
|
children,
|
|
17892
|
-
/* @__PURE__ */
|
|
18151
|
+
/* @__PURE__ */ jsx334(SelectedItemIndicator, {})
|
|
17893
18152
|
] }) })
|
|
17894
18153
|
}
|
|
17895
18154
|
);
|
|
@@ -17898,11 +18157,11 @@ var SegmentedControl = forwardRef32(
|
|
|
17898
18157
|
SegmentedControl.displayName = "SegmentedControl_UI";
|
|
17899
18158
|
|
|
17900
18159
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
17901
|
-
import { forwardRef as forwardRef33, useEffect as
|
|
17902
|
-
import { styled as
|
|
18160
|
+
import { forwardRef as forwardRef33, useEffect as useEffect23, useRef as useRef23 } from "react";
|
|
18161
|
+
import { styled as styled97, css as css47 } from "styled-components";
|
|
17903
18162
|
import { Item as ToggleGroupItem2 } from "@radix-ui/react-toggle-group";
|
|
17904
|
-
import { isNotNil as
|
|
17905
|
-
import { jsxs as
|
|
18163
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
18164
|
+
import { jsxs as jsxs63 } from "react/jsx-runtime";
|
|
17906
18165
|
var segmentedControlItemStyles = css47`
|
|
17907
18166
|
all: unset; /* ToggleGroupItem is a button element */
|
|
17908
18167
|
align-items: center;
|
|
@@ -17971,7 +18230,7 @@ var segmentedControlItemStyles = css47`
|
|
|
17971
18230
|
}
|
|
17972
18231
|
}
|
|
17973
18232
|
`;
|
|
17974
|
-
var StyledSegmentedControlItem =
|
|
18233
|
+
var StyledSegmentedControlItem = styled97(ToggleGroupItem2)`
|
|
17975
18234
|
${segmentedControlItemStyles}
|
|
17976
18235
|
`;
|
|
17977
18236
|
var SegmentedControlItem = forwardRef33(
|
|
@@ -17987,7 +18246,7 @@ var SegmentedControlItem = forwardRef33(
|
|
|
17987
18246
|
event.preventDefault();
|
|
17988
18247
|
}
|
|
17989
18248
|
};
|
|
17990
|
-
|
|
18249
|
+
useEffect23(() => {
|
|
17991
18250
|
const buttonElem = buttonRef.current;
|
|
17992
18251
|
if (!buttonElem) {
|
|
17993
18252
|
return void 0;
|
|
@@ -18012,13 +18271,13 @@ var SegmentedControlItem = forwardRef33(
|
|
|
18012
18271
|
resizeObserver.disconnect();
|
|
18013
18272
|
};
|
|
18014
18273
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
18015
|
-
return /* @__PURE__ */
|
|
18274
|
+
return /* @__PURE__ */ jsxs63(
|
|
18016
18275
|
StyledSegmentedControlItem,
|
|
18017
18276
|
{
|
|
18018
18277
|
ref: combinedRef,
|
|
18019
18278
|
...otherProps,
|
|
18020
|
-
$hasLabel:
|
|
18021
|
-
"aria-label":
|
|
18279
|
+
$hasLabel: isNotNil38(label),
|
|
18280
|
+
"aria-label": isNotNil38(label) ? void 0 : ariaLabel,
|
|
18022
18281
|
disabled,
|
|
18023
18282
|
onClick: handleClick,
|
|
18024
18283
|
value,
|
|
@@ -18044,9 +18303,9 @@ import {
|
|
|
18044
18303
|
ScrollDownButton
|
|
18045
18304
|
} from "@radix-ui/react-select";
|
|
18046
18305
|
import { forwardRef as forwardRef34 } from "react";
|
|
18047
|
-
import { styled as
|
|
18048
|
-
import { jsx as
|
|
18049
|
-
var StyledTrigger2 =
|
|
18306
|
+
import { styled as styled98, css as css48 } from "styled-components";
|
|
18307
|
+
import { jsx as jsx335, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
18308
|
+
var StyledTrigger2 = styled98(Trigger3)`
|
|
18050
18309
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
18051
18310
|
${inputCss};
|
|
18052
18311
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -18092,7 +18351,7 @@ var StyledTrigger2 = styled96(Trigger3)`
|
|
|
18092
18351
|
color: var(--wui-input-placeholder);
|
|
18093
18352
|
}
|
|
18094
18353
|
`;
|
|
18095
|
-
var StyledContent3 =
|
|
18354
|
+
var StyledContent3 = styled98(Content3)`
|
|
18096
18355
|
--wui-select-content-border: var(--wui-color-border);
|
|
18097
18356
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
18098
18357
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -18119,10 +18378,10 @@ var scrollButtonStyles = css48`
|
|
|
18119
18378
|
display: flex;
|
|
18120
18379
|
justify-content: center;
|
|
18121
18380
|
`;
|
|
18122
|
-
var StyledScrollDownButton =
|
|
18381
|
+
var StyledScrollDownButton = styled98(ScrollDownButton)`
|
|
18123
18382
|
${scrollButtonStyles}
|
|
18124
18383
|
`;
|
|
18125
|
-
var StyledScrollUpButton =
|
|
18384
|
+
var StyledScrollUpButton = styled98(ScrollUpButton)`
|
|
18126
18385
|
${scrollButtonStyles}
|
|
18127
18386
|
`;
|
|
18128
18387
|
var Select = forwardRef34(
|
|
@@ -18145,8 +18404,8 @@ var Select = forwardRef34(
|
|
|
18145
18404
|
if (forceOpen) {
|
|
18146
18405
|
rootProps["open"] = true;
|
|
18147
18406
|
}
|
|
18148
|
-
return /* @__PURE__ */
|
|
18149
|
-
/* @__PURE__ */
|
|
18407
|
+
return /* @__PURE__ */ jsxs64(Root3, { ...rootProps, children: [
|
|
18408
|
+
/* @__PURE__ */ jsxs64(
|
|
18150
18409
|
StyledTrigger2,
|
|
18151
18410
|
{
|
|
18152
18411
|
ref: forwardedRef,
|
|
@@ -18154,8 +18413,8 @@ var Select = forwardRef34(
|
|
|
18154
18413
|
$fullWidth: responsiveFullWidth,
|
|
18155
18414
|
...props,
|
|
18156
18415
|
children: [
|
|
18157
|
-
/* @__PURE__ */
|
|
18158
|
-
/* @__PURE__ */
|
|
18416
|
+
/* @__PURE__ */ jsx335(Value, { placeholder }),
|
|
18417
|
+
/* @__PURE__ */ jsx335(
|
|
18159
18418
|
Icon,
|
|
18160
18419
|
{
|
|
18161
18420
|
size: "md",
|
|
@@ -18165,21 +18424,21 @@ var Select = forwardRef34(
|
|
|
18165
18424
|
]
|
|
18166
18425
|
}
|
|
18167
18426
|
),
|
|
18168
|
-
/* @__PURE__ */
|
|
18427
|
+
/* @__PURE__ */ jsx335(Portal2, { children: /* @__PURE__ */ jsxs64(
|
|
18169
18428
|
StyledContent3,
|
|
18170
18429
|
{
|
|
18171
18430
|
position: "popper",
|
|
18172
18431
|
sideOffset: 8,
|
|
18173
18432
|
children: [
|
|
18174
|
-
/* @__PURE__ */
|
|
18433
|
+
/* @__PURE__ */ jsx335(StyledScrollUpButton, { children: /* @__PURE__ */ jsx335(
|
|
18175
18434
|
Icon,
|
|
18176
18435
|
{
|
|
18177
18436
|
size: "sm",
|
|
18178
18437
|
type: "caret-up"
|
|
18179
18438
|
}
|
|
18180
18439
|
) }),
|
|
18181
|
-
/* @__PURE__ */
|
|
18182
|
-
/* @__PURE__ */
|
|
18440
|
+
/* @__PURE__ */ jsx335(Viewport, { children }),
|
|
18441
|
+
/* @__PURE__ */ jsx335(StyledScrollDownButton, { children: /* @__PURE__ */ jsx335(
|
|
18183
18442
|
Icon,
|
|
18184
18443
|
{
|
|
18185
18444
|
size: "sm",
|
|
@@ -18197,10 +18456,10 @@ Select.displayName = "Select_UI";
|
|
|
18197
18456
|
// src/components/Select/SelectOption.tsx
|
|
18198
18457
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
18199
18458
|
import { forwardRef as forwardRef35 } from "react";
|
|
18200
|
-
import { styled as
|
|
18201
|
-
import { isNotNil as
|
|
18202
|
-
import { jsx as
|
|
18203
|
-
var StyledItem =
|
|
18459
|
+
import { styled as styled99 } from "styled-components";
|
|
18460
|
+
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
18461
|
+
import { jsx as jsx336, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
18462
|
+
var StyledItem = styled99(Item)`
|
|
18204
18463
|
${getTypographicStyles("label3")}
|
|
18205
18464
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
18206
18465
|
background-color: transparent;
|
|
@@ -18228,18 +18487,18 @@ var StyledItem = styled97(Item)`
|
|
|
18228
18487
|
`;
|
|
18229
18488
|
var SelectOption = forwardRef35(
|
|
18230
18489
|
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
18231
|
-
return /* @__PURE__ */
|
|
18490
|
+
return /* @__PURE__ */ jsxs65(
|
|
18232
18491
|
StyledItem,
|
|
18233
18492
|
{
|
|
18234
18493
|
...props,
|
|
18235
18494
|
ref: forwardedRef,
|
|
18236
18495
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
18237
18496
|
children: [
|
|
18238
|
-
|
|
18497
|
+
isNotNil39(selectedDisplayValue) ? /* @__PURE__ */ jsxs65("div", { children: [
|
|
18239
18498
|
children,
|
|
18240
|
-
/* @__PURE__ */
|
|
18241
|
-
] }) : /* @__PURE__ */
|
|
18242
|
-
/* @__PURE__ */
|
|
18499
|
+
/* @__PURE__ */ jsx336("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx336(ItemText, { children: selectedDisplayValue }) })
|
|
18500
|
+
] }) : /* @__PURE__ */ jsx336(ItemText, { children }),
|
|
18501
|
+
/* @__PURE__ */ jsx336(ItemIndicator, { children: /* @__PURE__ */ jsx336(
|
|
18243
18502
|
Icon,
|
|
18244
18503
|
{
|
|
18245
18504
|
size: "md",
|
|
@@ -18255,14 +18514,14 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
18255
18514
|
|
|
18256
18515
|
// src/components/Select/SelectOptionGroup.tsx
|
|
18257
18516
|
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
18258
|
-
import { styled as
|
|
18259
|
-
import { jsx as
|
|
18260
|
-
var StyledLabel4 =
|
|
18517
|
+
import { styled as styled100 } from "styled-components";
|
|
18518
|
+
import { jsx as jsx337, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
18519
|
+
var StyledLabel4 = styled100(Label3)`
|
|
18261
18520
|
padding: var(--wui-select-option-padding);
|
|
18262
18521
|
`;
|
|
18263
18522
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
18264
|
-
return /* @__PURE__ */
|
|
18265
|
-
/* @__PURE__ */
|
|
18523
|
+
return /* @__PURE__ */ jsxs66(Group, { ...props, children: [
|
|
18524
|
+
/* @__PURE__ */ jsx337(StyledLabel4, { children: /* @__PURE__ */ jsx337(
|
|
18266
18525
|
Heading,
|
|
18267
18526
|
{
|
|
18268
18527
|
renderAs: "span",
|
|
@@ -18281,10 +18540,10 @@ import {
|
|
|
18281
18540
|
Range as RadixSliderRange,
|
|
18282
18541
|
Thumb as RadixSliderThumb
|
|
18283
18542
|
} from "@radix-ui/react-slider";
|
|
18284
|
-
import { styled as
|
|
18543
|
+
import { styled as styled101 } from "styled-components";
|
|
18285
18544
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
18286
|
-
import { jsx as
|
|
18287
|
-
var SliderContainer =
|
|
18545
|
+
import { jsx as jsx338, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
18546
|
+
var SliderContainer = styled101.div`
|
|
18288
18547
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
18289
18548
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
18290
18549
|
--wui-slider-range-color: var(--wui-color-bg-fill);
|
|
@@ -18300,7 +18559,7 @@ var SliderContainer = styled99.div`
|
|
|
18300
18559
|
pointer-events: none;
|
|
18301
18560
|
}
|
|
18302
18561
|
`;
|
|
18303
|
-
var StyledSliderRoot =
|
|
18562
|
+
var StyledSliderRoot = styled101(RadixSliderRoot)`
|
|
18304
18563
|
position: relative;
|
|
18305
18564
|
display: flex;
|
|
18306
18565
|
align-items: center;
|
|
@@ -18308,20 +18567,20 @@ var StyledSliderRoot = styled99(RadixSliderRoot)`
|
|
|
18308
18567
|
touch-action: none;
|
|
18309
18568
|
width: 100%;
|
|
18310
18569
|
`;
|
|
18311
|
-
var StyledSliderTrack =
|
|
18570
|
+
var StyledSliderTrack = styled101(RadixSliderTrack)`
|
|
18312
18571
|
background-color: var(--wui-slider-track-color);
|
|
18313
18572
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18314
18573
|
flex-grow: 1;
|
|
18315
18574
|
height: 6px;
|
|
18316
18575
|
position: relative;
|
|
18317
18576
|
`;
|
|
18318
|
-
var StyledSliderRange =
|
|
18577
|
+
var StyledSliderRange = styled101(RadixSliderRange)`
|
|
18319
18578
|
background-color: var(--wui-slider-range-color);
|
|
18320
18579
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18321
18580
|
height: 100%;
|
|
18322
18581
|
position: absolute;
|
|
18323
18582
|
`;
|
|
18324
|
-
var StyledSliderThumb =
|
|
18583
|
+
var StyledSliderThumb = styled101(RadixSliderThumb)`
|
|
18325
18584
|
background-color: var(--wui-slider-thumb-color);
|
|
18326
18585
|
border-radius: var(--wui-border-radius-rounded);
|
|
18327
18586
|
cursor: grab;
|
|
@@ -18372,12 +18631,12 @@ var Slider = ({
|
|
|
18372
18631
|
onChange(newValue);
|
|
18373
18632
|
}
|
|
18374
18633
|
};
|
|
18375
|
-
return /* @__PURE__ */
|
|
18634
|
+
return /* @__PURE__ */ jsx338(
|
|
18376
18635
|
SliderContainer,
|
|
18377
18636
|
{
|
|
18378
18637
|
...otherProps,
|
|
18379
18638
|
"data-testid": dataTestId,
|
|
18380
|
-
children: /* @__PURE__ */
|
|
18639
|
+
children: /* @__PURE__ */ jsxs67(
|
|
18381
18640
|
StyledSliderRoot,
|
|
18382
18641
|
{
|
|
18383
18642
|
"aria-label": ariaLabel,
|
|
@@ -18390,8 +18649,8 @@ var Slider = ({
|
|
|
18390
18649
|
step,
|
|
18391
18650
|
...value ? { value } : {},
|
|
18392
18651
|
children: [
|
|
18393
|
-
/* @__PURE__ */
|
|
18394
|
-
values.map((_, index) => /* @__PURE__ */
|
|
18652
|
+
/* @__PURE__ */ jsx338(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ jsx338(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
18653
|
+
values.map((_, index) => /* @__PURE__ */ jsx338(
|
|
18395
18654
|
StyledSliderThumb,
|
|
18396
18655
|
{
|
|
18397
18656
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -18407,11 +18666,11 @@ var Slider = ({
|
|
|
18407
18666
|
Slider.displayName = "Slider_UI";
|
|
18408
18667
|
|
|
18409
18668
|
// src/components/SplitButton/SplitButton.tsx
|
|
18410
|
-
import { styled as
|
|
18411
|
-
import { isNotNil as
|
|
18669
|
+
import { styled as styled102 } from "styled-components";
|
|
18670
|
+
import { isNotNil as isNotNil40 } from "@wistia/type-guards";
|
|
18412
18671
|
import { cloneElement as cloneElement9 } from "react";
|
|
18413
|
-
import { jsx as
|
|
18414
|
-
var StyledSplitButton =
|
|
18672
|
+
import { jsx as jsx339, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
18673
|
+
var StyledSplitButton = styled102.span`
|
|
18415
18674
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
18416
18675
|
white-space: nowrap;
|
|
18417
18676
|
|
|
@@ -18432,7 +18691,7 @@ var StyledSplitButton = styled100.span`
|
|
|
18432
18691
|
var SplitButton = ({
|
|
18433
18692
|
children,
|
|
18434
18693
|
menuLabel = "Select an option",
|
|
18435
|
-
menuIcon = /* @__PURE__ */
|
|
18694
|
+
menuIcon = /* @__PURE__ */ jsx339(Icon, { type: "caret-down" }),
|
|
18436
18695
|
menuItems,
|
|
18437
18696
|
disabled = false,
|
|
18438
18697
|
colorScheme = "inherit",
|
|
@@ -18443,8 +18702,8 @@ var SplitButton = ({
|
|
|
18443
18702
|
menuProps = {},
|
|
18444
18703
|
...props
|
|
18445
18704
|
}) => {
|
|
18446
|
-
return /* @__PURE__ */
|
|
18447
|
-
/* @__PURE__ */
|
|
18705
|
+
return /* @__PURE__ */ jsxs68(StyledSplitButton, { $colorScheme: colorScheme, children: [
|
|
18706
|
+
/* @__PURE__ */ jsx339(
|
|
18448
18707
|
Button,
|
|
18449
18708
|
{
|
|
18450
18709
|
disabled,
|
|
@@ -18455,12 +18714,12 @@ var SplitButton = ({
|
|
|
18455
18714
|
children
|
|
18456
18715
|
}
|
|
18457
18716
|
),
|
|
18458
|
-
|
|
18717
|
+
isNotNil40(menuItems) && /* @__PURE__ */ jsx339(
|
|
18459
18718
|
Menu,
|
|
18460
18719
|
{
|
|
18461
18720
|
...menuProps,
|
|
18462
18721
|
disabled,
|
|
18463
|
-
trigger: /* @__PURE__ */
|
|
18722
|
+
trigger: /* @__PURE__ */ jsx339(
|
|
18464
18723
|
IconButton,
|
|
18465
18724
|
{
|
|
18466
18725
|
disabled,
|
|
@@ -18474,15 +18733,15 @@ var SplitButton = ({
|
|
|
18474
18733
|
children: menuItems
|
|
18475
18734
|
}
|
|
18476
18735
|
),
|
|
18477
|
-
|
|
18736
|
+
isNotNil40(secondaryAction) && cloneElement9(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
18478
18737
|
] });
|
|
18479
18738
|
};
|
|
18480
18739
|
SplitButton.displayName = "SplitButton_UI";
|
|
18481
18740
|
|
|
18482
18741
|
// src/components/Table/Table.tsx
|
|
18483
|
-
import { styled as
|
|
18484
|
-
import { jsx as
|
|
18485
|
-
var StyledTable =
|
|
18742
|
+
import { styled as styled103, css as css49 } from "styled-components";
|
|
18743
|
+
import { jsx as jsx340 } from "react/jsx-runtime";
|
|
18744
|
+
var StyledTable = styled103.table`
|
|
18486
18745
|
width: 100%;
|
|
18487
18746
|
border-collapse: collapse;
|
|
18488
18747
|
|
|
@@ -18511,7 +18770,7 @@ var Table = ({
|
|
|
18511
18770
|
visuallyHiddenHeader = false,
|
|
18512
18771
|
...props
|
|
18513
18772
|
}) => {
|
|
18514
|
-
return /* @__PURE__ */
|
|
18773
|
+
return /* @__PURE__ */ jsx340(
|
|
18515
18774
|
StyledTable,
|
|
18516
18775
|
{
|
|
18517
18776
|
$divided: divided,
|
|
@@ -18524,37 +18783,37 @@ var Table = ({
|
|
|
18524
18783
|
};
|
|
18525
18784
|
|
|
18526
18785
|
// src/components/Table/TableBody.tsx
|
|
18527
|
-
import { styled as
|
|
18786
|
+
import { styled as styled104 } from "styled-components";
|
|
18528
18787
|
|
|
18529
18788
|
// src/components/Table/TableSectionContext.ts
|
|
18530
18789
|
import { createContext as createContext11 } from "react";
|
|
18531
18790
|
var TableSectionContext = createContext11(null);
|
|
18532
18791
|
|
|
18533
18792
|
// src/components/Table/TableBody.tsx
|
|
18534
|
-
import { jsx as
|
|
18535
|
-
var StyledTableBody =
|
|
18793
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
18794
|
+
var StyledTableBody = styled104.tbody`
|
|
18536
18795
|
width: 100%;
|
|
18537
18796
|
`;
|
|
18538
18797
|
var TableBody = ({ children, ...props }) => {
|
|
18539
|
-
return /* @__PURE__ */
|
|
18798
|
+
return /* @__PURE__ */ jsx341(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx341(StyledTableBody, { ...props, children }) });
|
|
18540
18799
|
};
|
|
18541
18800
|
|
|
18542
18801
|
// src/components/Table/TableCell.tsx
|
|
18543
18802
|
import { useContext as useContext17 } from "react";
|
|
18544
|
-
import { styled as
|
|
18545
|
-
import { jsx as
|
|
18803
|
+
import { styled as styled105, css as css50 } from "styled-components";
|
|
18804
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
18546
18805
|
var sharedStyles = css50`
|
|
18547
18806
|
color: var(--wui-color-text);
|
|
18548
18807
|
padding: var(--wui-space-02);
|
|
18549
18808
|
text-align: left;
|
|
18550
18809
|
`;
|
|
18551
|
-
var StyledTh =
|
|
18810
|
+
var StyledTh = styled105.th`
|
|
18552
18811
|
${sharedStyles}
|
|
18553
18812
|
font-size: var(--wui-typography-body-4-size);
|
|
18554
18813
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
18555
18814
|
line-height: var(--wui-typography-body-4-line-height);
|
|
18556
18815
|
`;
|
|
18557
|
-
var StyledTd =
|
|
18816
|
+
var StyledTd = styled105.td`
|
|
18558
18817
|
${sharedStyles}
|
|
18559
18818
|
font-size: var(--wui-typography-body-2-size);
|
|
18560
18819
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -18563,45 +18822,45 @@ var StyledTd = styled103.td`
|
|
|
18563
18822
|
var TableCell = ({ children, ...props }) => {
|
|
18564
18823
|
const section = useContext17(TableSectionContext);
|
|
18565
18824
|
if (section === "head") {
|
|
18566
|
-
return /* @__PURE__ */
|
|
18825
|
+
return /* @__PURE__ */ jsx342(StyledTh, { ...props, children });
|
|
18567
18826
|
}
|
|
18568
|
-
return /* @__PURE__ */
|
|
18827
|
+
return /* @__PURE__ */ jsx342(StyledTd, { ...props, children });
|
|
18569
18828
|
};
|
|
18570
18829
|
|
|
18571
18830
|
// src/components/Table/TableFoot.tsx
|
|
18572
|
-
import { styled as
|
|
18573
|
-
import { jsx as
|
|
18574
|
-
var StyledTableFoot =
|
|
18831
|
+
import { styled as styled106 } from "styled-components";
|
|
18832
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
18833
|
+
var StyledTableFoot = styled106.tfoot`
|
|
18575
18834
|
width: 100%;
|
|
18576
18835
|
`;
|
|
18577
18836
|
var TableFoot = ({ children, ...props }) => {
|
|
18578
|
-
return /* @__PURE__ */
|
|
18837
|
+
return /* @__PURE__ */ jsx343(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx343(StyledTableFoot, { ...props, children }) });
|
|
18579
18838
|
};
|
|
18580
18839
|
|
|
18581
18840
|
// src/components/Table/TableHead.tsx
|
|
18582
|
-
import { styled as
|
|
18583
|
-
import { jsx as
|
|
18584
|
-
var StyledThead =
|
|
18841
|
+
import { styled as styled107 } from "styled-components";
|
|
18842
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
18843
|
+
var StyledThead = styled107.thead`
|
|
18585
18844
|
width: 100%;
|
|
18586
18845
|
`;
|
|
18587
18846
|
var TableHead = ({ children, ...props }) => {
|
|
18588
|
-
return /* @__PURE__ */
|
|
18847
|
+
return /* @__PURE__ */ jsx344(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx344(StyledThead, { ...props, children }) });
|
|
18589
18848
|
};
|
|
18590
18849
|
|
|
18591
18850
|
// src/components/Table/TableRow.tsx
|
|
18592
|
-
import { styled as
|
|
18593
|
-
import { jsx as
|
|
18594
|
-
var StyledTableRow =
|
|
18851
|
+
import { styled as styled108 } from "styled-components";
|
|
18852
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
18853
|
+
var StyledTableRow = styled108.tr`
|
|
18595
18854
|
width: 100%;
|
|
18596
18855
|
`;
|
|
18597
18856
|
var TableRow = ({ children, ...props }) => {
|
|
18598
|
-
return /* @__PURE__ */
|
|
18857
|
+
return /* @__PURE__ */ jsx345(StyledTableRow, { ...props, children });
|
|
18599
18858
|
};
|
|
18600
18859
|
|
|
18601
18860
|
// src/components/Tabs/Tabs.tsx
|
|
18602
18861
|
import { Root as RadixTabsRoot } from "@radix-ui/react-tabs";
|
|
18603
|
-
import { useCallback as useCallback19, useState as
|
|
18604
|
-
import { isNotNil as
|
|
18862
|
+
import { useCallback as useCallback19, useState as useState27 } from "react";
|
|
18863
|
+
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
18605
18864
|
|
|
18606
18865
|
// src/components/Tabs/useTabsValue.tsx
|
|
18607
18866
|
import { createContext as createContext12, useContext as useContext18 } from "react";
|
|
@@ -18616,7 +18875,7 @@ var useTabsValue = () => {
|
|
|
18616
18875
|
};
|
|
18617
18876
|
|
|
18618
18877
|
// src/components/Tabs/Tabs.tsx
|
|
18619
|
-
import { jsx as
|
|
18878
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
18620
18879
|
var Tabs = ({
|
|
18621
18880
|
children,
|
|
18622
18881
|
value: valueProp,
|
|
@@ -18624,7 +18883,7 @@ var Tabs = ({
|
|
|
18624
18883
|
defaultValue,
|
|
18625
18884
|
...props
|
|
18626
18885
|
}) => {
|
|
18627
|
-
const [value, setValue] =
|
|
18886
|
+
const [value, setValue] = useState27(valueProp ?? defaultValue);
|
|
18628
18887
|
const onValueChange = useCallback19(
|
|
18629
18888
|
(newValue) => {
|
|
18630
18889
|
setValue(newValue);
|
|
@@ -18638,48 +18897,48 @@ var Tabs = ({
|
|
|
18638
18897
|
...props,
|
|
18639
18898
|
onValueChange
|
|
18640
18899
|
};
|
|
18641
|
-
if (
|
|
18900
|
+
if (isNotNil41(value)) {
|
|
18642
18901
|
rootProps.value = value;
|
|
18643
18902
|
}
|
|
18644
|
-
if (
|
|
18903
|
+
if (isNotNil41(defaultValue)) {
|
|
18645
18904
|
rootProps.defaultValue = defaultValue;
|
|
18646
18905
|
}
|
|
18647
|
-
return /* @__PURE__ */
|
|
18906
|
+
return /* @__PURE__ */ jsx346(RadixTabsRoot, { ...rootProps, children: /* @__PURE__ */ jsx346(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx346(SelectedItemStyleProvider, { children }) }) });
|
|
18648
18907
|
};
|
|
18649
18908
|
Tabs.displayName = "Tabs_UI";
|
|
18650
18909
|
|
|
18651
18910
|
// src/components/Tabs/TabsContent.tsx
|
|
18652
18911
|
import { Content as RadixTabsContent } from "@radix-ui/react-tabs";
|
|
18653
|
-
import { jsx as
|
|
18912
|
+
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
18654
18913
|
var TabsContent = ({ children, value }) => {
|
|
18655
|
-
return /* @__PURE__ */
|
|
18914
|
+
return /* @__PURE__ */ jsx347(RadixTabsContent, { value, children });
|
|
18656
18915
|
};
|
|
18657
18916
|
TabsContent.displayName = "TabsContent_UI";
|
|
18658
18917
|
|
|
18659
18918
|
// src/components/Tabs/TabsList.tsx
|
|
18660
18919
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
18661
|
-
import { styled as
|
|
18920
|
+
import { styled as styled110 } from "styled-components";
|
|
18662
18921
|
|
|
18663
18922
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18664
18923
|
import { isUndefined as isUndefined6 } from "@wistia/type-guards";
|
|
18665
18924
|
|
|
18666
18925
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
18667
|
-
import { styled as
|
|
18668
|
-
var TabsSelectedItemIndicatorDiv =
|
|
18926
|
+
import { styled as styled109 } from "styled-components";
|
|
18927
|
+
var TabsSelectedItemIndicatorDiv = styled109(SelectedItemIndicatorDiv)`
|
|
18669
18928
|
:has(button[role='tab']:focus-visible) > & {
|
|
18670
18929
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
18671
18930
|
}
|
|
18672
18931
|
`;
|
|
18673
18932
|
|
|
18674
18933
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18675
|
-
import { jsx as
|
|
18934
|
+
import { jsx as jsx348 } from "react/jsx-runtime";
|
|
18676
18935
|
var SelectedTabIndicator = () => {
|
|
18677
18936
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
18678
18937
|
const selectedValue = useTabsValue();
|
|
18679
18938
|
if (selectedValue == null || isUndefined6(selectedItemIndicatorStyle)) {
|
|
18680
18939
|
return null;
|
|
18681
18940
|
}
|
|
18682
|
-
return /* @__PURE__ */
|
|
18941
|
+
return /* @__PURE__ */ jsx348(
|
|
18683
18942
|
TabsSelectedItemIndicatorDiv,
|
|
18684
18943
|
{
|
|
18685
18944
|
"data-wui-selected-item-indicator": true,
|
|
@@ -18689,19 +18948,19 @@ var SelectedTabIndicator = () => {
|
|
|
18689
18948
|
};
|
|
18690
18949
|
|
|
18691
18950
|
// src/components/Tabs/TabsList.tsx
|
|
18692
|
-
import { jsx as
|
|
18693
|
-
var StyledRadixTabsList =
|
|
18951
|
+
import { jsx as jsx349, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
18952
|
+
var StyledRadixTabsList = styled110(RadixTabList)`
|
|
18694
18953
|
${segmentedControlStyles}
|
|
18695
18954
|
`;
|
|
18696
18955
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
18697
|
-
return /* @__PURE__ */
|
|
18956
|
+
return /* @__PURE__ */ jsxs69(
|
|
18698
18957
|
StyledRadixTabsList,
|
|
18699
18958
|
{
|
|
18700
18959
|
$fullWidth: fullWidth,
|
|
18701
18960
|
"aria-label": props["aria-label"],
|
|
18702
18961
|
children: [
|
|
18703
18962
|
children,
|
|
18704
|
-
/* @__PURE__ */
|
|
18963
|
+
/* @__PURE__ */ jsx349(SelectedTabIndicator, {})
|
|
18705
18964
|
]
|
|
18706
18965
|
}
|
|
18707
18966
|
);
|
|
@@ -18709,13 +18968,13 @@ var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
18709
18968
|
TabsList.displayName = "TabsList_UI";
|
|
18710
18969
|
|
|
18711
18970
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18712
|
-
import { forwardRef as forwardRef36, useEffect as
|
|
18713
|
-
import { isNotNil as
|
|
18971
|
+
import { forwardRef as forwardRef36, useEffect as useEffect24, useRef as useRef24 } from "react";
|
|
18972
|
+
import { isNotNil as isNotNil42 } from "@wistia/type-guards";
|
|
18714
18973
|
|
|
18715
18974
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
18716
|
-
import { styled as
|
|
18975
|
+
import { styled as styled111 } from "styled-components";
|
|
18717
18976
|
import { Trigger as RadixTabsTrigger } from "@radix-ui/react-tabs";
|
|
18718
|
-
var StyledRadixTabsTrigger =
|
|
18977
|
+
var StyledRadixTabsTrigger = styled111(RadixTabsTrigger)`
|
|
18719
18978
|
${segmentedControlItemStyles}
|
|
18720
18979
|
|
|
18721
18980
|
&:focus-visible {
|
|
@@ -18724,14 +18983,14 @@ var StyledRadixTabsTrigger = styled109(RadixTabsTrigger)`
|
|
|
18724
18983
|
`;
|
|
18725
18984
|
|
|
18726
18985
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18727
|
-
import { jsxs as
|
|
18986
|
+
import { jsxs as jsxs70 } from "react/jsx-runtime";
|
|
18728
18987
|
var TabsTrigger = forwardRef36(
|
|
18729
18988
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
18730
18989
|
const selectedValue = useTabsValue();
|
|
18731
18990
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
18732
18991
|
const buttonRef = useRef24(null);
|
|
18733
18992
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
18734
|
-
|
|
18993
|
+
useEffect24(() => {
|
|
18735
18994
|
const buttonElem = buttonRef.current;
|
|
18736
18995
|
if (!buttonElem) {
|
|
18737
18996
|
return void 0;
|
|
@@ -18756,13 +19015,13 @@ var TabsTrigger = forwardRef36(
|
|
|
18756
19015
|
resizeObserver.disconnect();
|
|
18757
19016
|
};
|
|
18758
19017
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
18759
|
-
return /* @__PURE__ */
|
|
19018
|
+
return /* @__PURE__ */ jsxs70(
|
|
18760
19019
|
StyledRadixTabsTrigger,
|
|
18761
19020
|
{
|
|
18762
19021
|
...otherProps,
|
|
18763
19022
|
ref: combinedRef,
|
|
18764
|
-
$hasLabel:
|
|
18765
|
-
"aria-label":
|
|
19023
|
+
$hasLabel: isNotNil42(label),
|
|
19024
|
+
"aria-label": isNotNil42(label) ? void 0 : ariaLabel,
|
|
18766
19025
|
disabled,
|
|
18767
19026
|
value,
|
|
18768
19027
|
children: [
|
|
@@ -18776,10 +19035,10 @@ var TabsTrigger = forwardRef36(
|
|
|
18776
19035
|
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
18777
19036
|
|
|
18778
19037
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
18779
|
-
import { styled as
|
|
18780
|
-
import { isNotNil as
|
|
18781
|
-
import { jsx as
|
|
18782
|
-
var StyledThumbnailBadge =
|
|
19038
|
+
import { styled as styled112 } from "styled-components";
|
|
19039
|
+
import { isNotNil as isNotNil43 } from "@wistia/type-guards";
|
|
19040
|
+
import { jsx as jsx350, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
19041
|
+
var StyledThumbnailBadge = styled112.div`
|
|
18783
19042
|
align-items: center;
|
|
18784
19043
|
background-color: rgb(0 0 0 / 50%);
|
|
18785
19044
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -18805,19 +19064,19 @@ var StyledThumbnailBadge = styled110.div`
|
|
|
18805
19064
|
}
|
|
18806
19065
|
`;
|
|
18807
19066
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
18808
|
-
return /* @__PURE__ */
|
|
18809
|
-
|
|
18810
|
-
/* @__PURE__ */
|
|
19067
|
+
return /* @__PURE__ */ jsxs71(StyledThumbnailBadge, { ...props, children: [
|
|
19068
|
+
isNotNil43(icon) && icon,
|
|
19069
|
+
/* @__PURE__ */ jsx350("span", { children: label })
|
|
18811
19070
|
] });
|
|
18812
19071
|
};
|
|
18813
19072
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
18814
19073
|
|
|
18815
19074
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18816
|
-
import { forwardRef as forwardRef37, useState as
|
|
18817
|
-
import { styled as
|
|
19075
|
+
import { forwardRef as forwardRef37, useState as useState28, useRef as useRef25, useCallback as useCallback20, useMemo as useMemo18 } from "react";
|
|
19076
|
+
import { styled as styled114 } from "styled-components";
|
|
18818
19077
|
import {
|
|
18819
|
-
isNil as
|
|
18820
|
-
isNotNil as
|
|
19078
|
+
isNil as isNil20,
|
|
19079
|
+
isNotNil as isNotNil46,
|
|
18821
19080
|
isUndefined as isUndefined7,
|
|
18822
19081
|
isEmptyString as isEmptyString2,
|
|
18823
19082
|
isString as isString4,
|
|
@@ -18825,7 +19084,7 @@ import {
|
|
|
18825
19084
|
} from "@wistia/type-guards";
|
|
18826
19085
|
|
|
18827
19086
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
18828
|
-
import { isNotNil as
|
|
19087
|
+
import { isNotNil as isNotNil44 } from "@wistia/type-guards";
|
|
18829
19088
|
import { css as css51 } from "styled-components";
|
|
18830
19089
|
var gradients = {
|
|
18831
19090
|
defaultDarkOne: css51`
|
|
@@ -18953,14 +19212,14 @@ var gradients = {
|
|
|
18953
19212
|
};
|
|
18954
19213
|
var gradientMap = Object.keys(gradients);
|
|
18955
19214
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
18956
|
-
return
|
|
19215
|
+
return isNotNil44(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
18957
19216
|
};
|
|
18958
19217
|
|
|
18959
19218
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
18960
|
-
import { styled as
|
|
18961
|
-
import { isNotNil as
|
|
18962
|
-
import { jsx as
|
|
18963
|
-
var ScrubLine =
|
|
19219
|
+
import { styled as styled113 } from "styled-components";
|
|
19220
|
+
import { isNotNil as isNotNil45 } from "@wistia/type-guards";
|
|
19221
|
+
import { jsx as jsx351, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
19222
|
+
var ScrubLine = styled113.div`
|
|
18964
19223
|
position: absolute;
|
|
18965
19224
|
top: 0;
|
|
18966
19225
|
height: 100%;
|
|
@@ -19052,8 +19311,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
19052
19311
|
);
|
|
19053
19312
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
19054
19313
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
19055
|
-
const showScrubLine =
|
|
19056
|
-
const scrubLinePosition =
|
|
19314
|
+
const showScrubLine = isNotNil45(cursorPosition);
|
|
19315
|
+
const scrubLinePosition = isNotNil45(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
19057
19316
|
const viewerStyles = {
|
|
19058
19317
|
position: "relative",
|
|
19059
19318
|
overflow: "hidden",
|
|
@@ -19071,14 +19330,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
19071
19330
|
backgroundPosition,
|
|
19072
19331
|
backgroundSize
|
|
19073
19332
|
};
|
|
19074
|
-
return /* @__PURE__ */
|
|
19333
|
+
return /* @__PURE__ */ jsxs72(
|
|
19075
19334
|
"div",
|
|
19076
19335
|
{
|
|
19077
19336
|
...props,
|
|
19078
19337
|
style: viewerStyles,
|
|
19079
19338
|
children: [
|
|
19080
|
-
/* @__PURE__ */
|
|
19081
|
-
showScrubLine ? /* @__PURE__ */
|
|
19339
|
+
/* @__PURE__ */ jsx351("div", { style: storyboardStyles }),
|
|
19340
|
+
showScrubLine ? /* @__PURE__ */ jsx351(
|
|
19082
19341
|
ScrubLine,
|
|
19083
19342
|
{
|
|
19084
19343
|
style: {
|
|
@@ -19092,7 +19351,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
19092
19351
|
};
|
|
19093
19352
|
|
|
19094
19353
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
19095
|
-
import { jsx as
|
|
19354
|
+
import { jsx as jsx352, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
19096
19355
|
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
19097
19356
|
var SQUARE_ASPECT_RATIO = 1;
|
|
19098
19357
|
var getAspectRatioValue = (aspectRatio) => {
|
|
@@ -19101,19 +19360,19 @@ var getAspectRatioValue = (aspectRatio) => {
|
|
|
19101
19360
|
}
|
|
19102
19361
|
return WIDE_ASPECT_RATIO;
|
|
19103
19362
|
};
|
|
19104
|
-
var WideThumbnailImage =
|
|
19363
|
+
var WideThumbnailImage = styled114.img`
|
|
19105
19364
|
height: 100%;
|
|
19106
19365
|
object-fit: cover;
|
|
19107
19366
|
width: 100%;
|
|
19108
19367
|
`;
|
|
19109
|
-
var SquareThumbnailImage =
|
|
19368
|
+
var SquareThumbnailImage = styled114.img`
|
|
19110
19369
|
backdrop-filter: blur(8px);
|
|
19111
19370
|
object-fit: contain;
|
|
19112
19371
|
width: 100%;
|
|
19113
19372
|
`;
|
|
19114
19373
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
19115
19374
|
if (thumbnailImageType === "wide") {
|
|
19116
|
-
return /* @__PURE__ */
|
|
19375
|
+
return /* @__PURE__ */ jsx352(
|
|
19117
19376
|
WideThumbnailImage,
|
|
19118
19377
|
{
|
|
19119
19378
|
alt: "",
|
|
@@ -19122,7 +19381,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
19122
19381
|
}
|
|
19123
19382
|
);
|
|
19124
19383
|
}
|
|
19125
|
-
return /* @__PURE__ */
|
|
19384
|
+
return /* @__PURE__ */ jsx352(
|
|
19126
19385
|
SquareThumbnailImage,
|
|
19127
19386
|
{
|
|
19128
19387
|
alt: "",
|
|
@@ -19131,7 +19390,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
19131
19390
|
}
|
|
19132
19391
|
);
|
|
19133
19392
|
};
|
|
19134
|
-
var StyledThumbnailContainer =
|
|
19393
|
+
var StyledThumbnailContainer = styled114.div`
|
|
19135
19394
|
container-type: size;
|
|
19136
19395
|
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
19137
19396
|
width: ${({ $width }) => $width};
|
|
@@ -19139,13 +19398,13 @@ var StyledThumbnailContainer = styled112.div`
|
|
|
19139
19398
|
overflow: hidden;
|
|
19140
19399
|
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
19141
19400
|
`;
|
|
19142
|
-
var StyledThumbnail =
|
|
19401
|
+
var StyledThumbnail = styled114.div`
|
|
19143
19402
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
19144
19403
|
|
|
19145
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
19404
|
+
background-image: ${({ $backgroundUrl }) => isNotNil46($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
19146
19405
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
19147
19406
|
// if we don't have $backgroundUrl show a gradient
|
|
19148
|
-
|
|
19407
|
+
isNil20($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
19149
19408
|
)};
|
|
19150
19409
|
background-position: center center;
|
|
19151
19410
|
background-size: cover;
|
|
@@ -19174,7 +19433,7 @@ var StoryboardRenderer = ({
|
|
|
19174
19433
|
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
19175
19434
|
const targetWidth = isString4(width) ? parseInt(width, 10) : Number(width);
|
|
19176
19435
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
19177
|
-
return /* @__PURE__ */
|
|
19436
|
+
return /* @__PURE__ */ jsx352(
|
|
19178
19437
|
ThumbnailStoryboardViewer,
|
|
19179
19438
|
{
|
|
19180
19439
|
cursorPosition: effectiveCursorPosition,
|
|
@@ -19200,7 +19459,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
19200
19459
|
};
|
|
19201
19460
|
};
|
|
19202
19461
|
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
19203
|
-
return
|
|
19462
|
+
return isNotNil46(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
19204
19463
|
};
|
|
19205
19464
|
var Thumbnail = forwardRef37(
|
|
19206
19465
|
({
|
|
@@ -19214,16 +19473,16 @@ var Thumbnail = forwardRef37(
|
|
|
19214
19473
|
aspectRatio = "wide",
|
|
19215
19474
|
...props
|
|
19216
19475
|
}, ref) => {
|
|
19217
|
-
const [percent, setPercent] =
|
|
19218
|
-
const [isMouseOver, setIsMouseOver] =
|
|
19219
|
-
const [isStoryboardReady, setIsStoryboardReady] =
|
|
19476
|
+
const [percent, setPercent] = useState28(0);
|
|
19477
|
+
const [isMouseOver, setIsMouseOver] = useState28(false);
|
|
19478
|
+
const [isStoryboardReady, setIsStoryboardReady] = useState28(false);
|
|
19220
19479
|
const storyboardElementRef = useRef25(null);
|
|
19221
|
-
const [cursorPosition, setCursorPosition] =
|
|
19222
|
-
const backgroundUrl =
|
|
19480
|
+
const [cursorPosition, setCursorPosition] = useState28(null);
|
|
19481
|
+
const backgroundUrl = useMemo18(
|
|
19223
19482
|
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
19224
19483
|
[thumbnailImageType, thumbnailUrl]
|
|
19225
19484
|
);
|
|
19226
|
-
const isScrubbable =
|
|
19485
|
+
const isScrubbable = isNotNil46(storyboard);
|
|
19227
19486
|
const trackStoryboardLoadStatus = useCallback20(() => {
|
|
19228
19487
|
if (storyboardElementRef.current || !storyboard) {
|
|
19229
19488
|
return storyboardElementRef.current;
|
|
@@ -19256,15 +19515,15 @@ var Thumbnail = forwardRef37(
|
|
|
19256
19515
|
setIsMouseOver(false);
|
|
19257
19516
|
setCursorPosition(null);
|
|
19258
19517
|
}, [isScrubbable]);
|
|
19259
|
-
const shouldRenderStoryboard =
|
|
19260
|
-
if (
|
|
19518
|
+
const shouldRenderStoryboard = useMemo18(() => {
|
|
19519
|
+
if (isNil20(storyboard) || isUndefined7(height) || isEmptyString2(height)) {
|
|
19261
19520
|
return false;
|
|
19262
19521
|
}
|
|
19263
19522
|
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
19264
19523
|
}, [isScrubbable, isMouseOver, isStoryboardReady, storyboard, height]);
|
|
19265
19524
|
let thumbnailContent = null;
|
|
19266
19525
|
if (storyboard && shouldRenderStoryboard) {
|
|
19267
|
-
thumbnailContent = /* @__PURE__ */
|
|
19526
|
+
thumbnailContent = /* @__PURE__ */ jsx352(
|
|
19268
19527
|
StoryboardRenderer,
|
|
19269
19528
|
{
|
|
19270
19529
|
aspectRatio,
|
|
@@ -19276,7 +19535,7 @@ var Thumbnail = forwardRef37(
|
|
|
19276
19535
|
}
|
|
19277
19536
|
);
|
|
19278
19537
|
} else if (hasValidThumbnailUrl(thumbnailUrl)) {
|
|
19279
|
-
thumbnailContent = /* @__PURE__ */
|
|
19538
|
+
thumbnailContent = /* @__PURE__ */ jsx352(
|
|
19280
19539
|
ThumbnailImage,
|
|
19281
19540
|
{
|
|
19282
19541
|
thumbnailImageType,
|
|
@@ -19286,7 +19545,7 @@ var Thumbnail = forwardRef37(
|
|
|
19286
19545
|
} else {
|
|
19287
19546
|
thumbnailContent = null;
|
|
19288
19547
|
}
|
|
19289
|
-
return /* @__PURE__ */
|
|
19548
|
+
return /* @__PURE__ */ jsx352(
|
|
19290
19549
|
StyledThumbnailContainer,
|
|
19291
19550
|
{
|
|
19292
19551
|
ref,
|
|
@@ -19299,14 +19558,14 @@ var Thumbnail = forwardRef37(
|
|
|
19299
19558
|
onMouseOut: handleMouseOut,
|
|
19300
19559
|
role: "presentation",
|
|
19301
19560
|
...props,
|
|
19302
|
-
children: /* @__PURE__ */
|
|
19561
|
+
children: /* @__PURE__ */ jsxs73(
|
|
19303
19562
|
StyledThumbnail,
|
|
19304
19563
|
{
|
|
19305
19564
|
$backgroundUrl: backgroundUrl,
|
|
19306
19565
|
$gradientBackground: gradientBackground,
|
|
19307
19566
|
"data-testid": "thumbnail-inner",
|
|
19308
19567
|
children: [
|
|
19309
|
-
|
|
19568
|
+
isNotNil46(children) ? children : null,
|
|
19310
19569
|
thumbnailContent
|
|
19311
19570
|
]
|
|
19312
19571
|
}
|
|
@@ -19319,16 +19578,16 @@ Thumbnail.displayName = "Thumbnail_UI";
|
|
|
19319
19578
|
|
|
19320
19579
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
19321
19580
|
import { cloneElement as cloneElement10, Children as Children11 } from "react";
|
|
19322
|
-
import { styled as
|
|
19581
|
+
import { styled as styled115 } from "styled-components";
|
|
19323
19582
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
19324
|
-
import { jsx as
|
|
19325
|
-
var ThumbnailCollageContainer =
|
|
19583
|
+
import { jsx as jsx353 } from "react/jsx-runtime";
|
|
19584
|
+
var ThumbnailCollageContainer = styled115.div`
|
|
19326
19585
|
container-type: size;
|
|
19327
19586
|
width: 100%;
|
|
19328
19587
|
aspect-ratio: 16 / 9;
|
|
19329
19588
|
display: flex;
|
|
19330
19589
|
`;
|
|
19331
|
-
var StyledThumbnailCollage =
|
|
19590
|
+
var StyledThumbnailCollage = styled115.div`
|
|
19332
19591
|
display: grid;
|
|
19333
19592
|
gap: var(--wui-space-01);
|
|
19334
19593
|
width: 100%;
|
|
@@ -19386,7 +19645,7 @@ var ThumbnailCollage = ({
|
|
|
19386
19645
|
});
|
|
19387
19646
|
}) : [
|
|
19388
19647
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
19389
|
-
/* @__PURE__ */
|
|
19648
|
+
/* @__PURE__ */ jsx353(
|
|
19390
19649
|
Thumbnail,
|
|
19391
19650
|
{
|
|
19392
19651
|
gradientBackground,
|
|
@@ -19395,7 +19654,7 @@ var ThumbnailCollage = ({
|
|
|
19395
19654
|
"fallback"
|
|
19396
19655
|
)
|
|
19397
19656
|
];
|
|
19398
|
-
return /* @__PURE__ */
|
|
19657
|
+
return /* @__PURE__ */ jsx353(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx353(
|
|
19399
19658
|
StyledThumbnailCollage,
|
|
19400
19659
|
{
|
|
19401
19660
|
$gradientBackground: gradientBackground,
|
|
@@ -19407,26 +19666,26 @@ var ThumbnailCollage = ({
|
|
|
19407
19666
|
};
|
|
19408
19667
|
|
|
19409
19668
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
19410
|
-
import { styled as
|
|
19411
|
-
import { isNotNil as
|
|
19412
|
-
import { jsx as
|
|
19669
|
+
import { styled as styled116, css as css52 } from "styled-components";
|
|
19670
|
+
import { isNotNil as isNotNil47 } from "@wistia/type-guards";
|
|
19671
|
+
import { jsx as jsx354, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
19413
19672
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
19414
19673
|
if (iconOnly) {
|
|
19415
|
-
return /* @__PURE__ */
|
|
19674
|
+
return /* @__PURE__ */ jsx354(
|
|
19416
19675
|
"g",
|
|
19417
19676
|
{
|
|
19418
19677
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19419
19678
|
fill: brandmarkColor,
|
|
19420
|
-
children: /* @__PURE__ */
|
|
19679
|
+
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
19680
|
}
|
|
19422
19681
|
);
|
|
19423
19682
|
}
|
|
19424
|
-
return /* @__PURE__ */
|
|
19683
|
+
return /* @__PURE__ */ jsx354(
|
|
19425
19684
|
"g",
|
|
19426
19685
|
{
|
|
19427
19686
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19428
19687
|
fill: brandmarkColor,
|
|
19429
|
-
children: /* @__PURE__ */
|
|
19688
|
+
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
19689
|
}
|
|
19431
19690
|
);
|
|
19432
19691
|
};
|
|
@@ -19434,12 +19693,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
19434
19693
|
if (iconOnly) {
|
|
19435
19694
|
return null;
|
|
19436
19695
|
}
|
|
19437
|
-
return /* @__PURE__ */
|
|
19696
|
+
return /* @__PURE__ */ jsx354(
|
|
19438
19697
|
"g",
|
|
19439
19698
|
{
|
|
19440
19699
|
"data-testid": "ui-wistia-logo-logotype",
|
|
19441
19700
|
fill: logotypeColor,
|
|
19442
|
-
children: /* @__PURE__ */
|
|
19701
|
+
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
19702
|
}
|
|
19444
19703
|
);
|
|
19445
19704
|
};
|
|
@@ -19449,7 +19708,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
19449
19708
|
}
|
|
19450
19709
|
return "0 0 144 31.47";
|
|
19451
19710
|
};
|
|
19452
|
-
var WistiaLogoComponent =
|
|
19711
|
+
var WistiaLogoComponent = styled116.svg`
|
|
19453
19712
|
height: ${({ height }) => `${height}px`};
|
|
19454
19713
|
|
|
19455
19714
|
/* ensure it will always fit on mobile */
|
|
@@ -19507,7 +19766,7 @@ var WistiaLogo = ({
|
|
|
19507
19766
|
};
|
|
19508
19767
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
19509
19768
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
19510
|
-
const Logo = /* @__PURE__ */
|
|
19769
|
+
const Logo = /* @__PURE__ */ jsxs74(
|
|
19511
19770
|
WistiaLogoComponent,
|
|
19512
19771
|
{
|
|
19513
19772
|
$hoverColor: hoverColor,
|
|
@@ -19520,14 +19779,14 @@ var WistiaLogo = ({
|
|
|
19520
19779
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19521
19780
|
...props,
|
|
19522
19781
|
children: [
|
|
19523
|
-
/* @__PURE__ */
|
|
19524
|
-
|
|
19782
|
+
/* @__PURE__ */ jsx354("title", { children: title }),
|
|
19783
|
+
isNotNil47(description) ? /* @__PURE__ */ jsx354("desc", { children: description }) : null,
|
|
19525
19784
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
19526
19785
|
renderLogotype(logotypeColor, iconOnly)
|
|
19527
19786
|
]
|
|
19528
19787
|
}
|
|
19529
19788
|
);
|
|
19530
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
19789
|
+
return href !== void 0 ? /* @__PURE__ */ jsx354("a", { href, children: Logo }) : Logo;
|
|
19531
19790
|
};
|
|
19532
19791
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
19533
19792
|
export {
|
|
@@ -19586,6 +19845,8 @@ export {
|
|
|
19586
19845
|
EditableTextSubmitButton,
|
|
19587
19846
|
EditableTextTrigger,
|
|
19588
19847
|
Ellipsis,
|
|
19848
|
+
FeatureCard,
|
|
19849
|
+
FeatureCardImage,
|
|
19589
19850
|
FileAmountLimitValidator,
|
|
19590
19851
|
FileSizeValidator,
|
|
19591
19852
|
FileTypeValidator,
|