@wistia/ui 0.20.15 → 0.20.16-beta.85dca629.ce55c6d
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 +682 -421
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
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.16-beta.85dca629.ce55c6d
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -15370,12 +15370,271 @@ var EditableTextTrigger = ({
|
|
|
15370
15370
|
return cloneElement7(onlyChild, triggerProps);
|
|
15371
15371
|
};
|
|
15372
15372
|
|
|
15373
|
+
// src/components/FeatureCard/FeatureCard.tsx
|
|
15374
|
+
import { useEffect as useEffect19, useState as useState21, useMemo as useMemo14 } from "react";
|
|
15375
|
+
import { styled as styled68 } from "styled-components";
|
|
15376
|
+
import { isNil as isNil17, isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
15377
|
+
import { Fragment as Fragment9, jsx as jsx303, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15378
|
+
var BREAKPOINT_WIDTH2 = 600;
|
|
15379
|
+
var VERTICAL_BREAKPOINT_WIDTH2 = 284;
|
|
15380
|
+
var MIN_IMAGE_WIDTH2 = 400;
|
|
15381
|
+
var StyledFeatureCard = styled68.div`
|
|
15382
|
+
--wui-feature-card-padding: var(--wui-space-04);
|
|
15383
|
+
--wui-feature-card-content-height: ${({ $contentHeight }) => $contentHeight}px;
|
|
15384
|
+
|
|
15385
|
+
display: flex;
|
|
15386
|
+
flex-direction: row;
|
|
15387
|
+
background: var(--wui-color-bg-surface-secondary);
|
|
15388
|
+
border-radius: var(--wui-border-radius-03);
|
|
15389
|
+
position: relative;
|
|
15390
|
+
overflow: hidden;
|
|
15391
|
+
align-items: center;
|
|
15392
|
+
|
|
15393
|
+
&[data-wui-feature-card-content-prominence='secondary'] {
|
|
15394
|
+
--wui-feature-card-padding: var(--wui-space-05);
|
|
15395
|
+
|
|
15396
|
+
box-shadow: inset 0 0 0 2px var(--wui-color-border);
|
|
15397
|
+
}
|
|
15398
|
+
|
|
15399
|
+
&:has([data-wui-feature-card-image]) {
|
|
15400
|
+
--wui-feature-card-padding: var(--wui-space-05);
|
|
15401
|
+
}
|
|
15402
|
+
|
|
15403
|
+
&[data-wui-feature-card-content-prominence='small'] {
|
|
15404
|
+
--wui-feature-card-padding: var(--wui-space-04);
|
|
15405
|
+
}
|
|
15406
|
+
|
|
15407
|
+
&[data-wui-feature-card-orientation='vertical'] {
|
|
15408
|
+
flex-direction: column;
|
|
15409
|
+
align-items: stretch;
|
|
15410
|
+
}
|
|
15411
|
+
|
|
15412
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
15413
|
+
`;
|
|
15414
|
+
var FeatureCard = ({
|
|
15415
|
+
bodyText,
|
|
15416
|
+
colorScheme = "inherit",
|
|
15417
|
+
headingText,
|
|
15418
|
+
icon,
|
|
15419
|
+
image,
|
|
15420
|
+
onClose,
|
|
15421
|
+
orientation = "horizontal",
|
|
15422
|
+
primaryAction,
|
|
15423
|
+
prominence = "primary",
|
|
15424
|
+
secondaryAction,
|
|
15425
|
+
...props
|
|
15426
|
+
}) => {
|
|
15427
|
+
const [containerRef, { width }] = useElementObserver();
|
|
15428
|
+
const [contentRef, { height: contentHeight }] = useElementObserver();
|
|
15429
|
+
const [isSmallContainer, setIsSmallContainer] = useState21(false);
|
|
15430
|
+
const [isVerticalLayout, setIsVerticalLayout] = useState21(orientation === "vertical");
|
|
15431
|
+
useEffect19(() => {
|
|
15432
|
+
const breakpoint = orientation === "vertical" ? VERTICAL_BREAKPOINT_WIDTH2 : BREAKPOINT_WIDTH2;
|
|
15433
|
+
setIsSmallContainer(width <= breakpoint);
|
|
15434
|
+
if (orientation === "auto") {
|
|
15435
|
+
setIsVerticalLayout(width <= BREAKPOINT_WIDTH2);
|
|
15436
|
+
}
|
|
15437
|
+
}, [width, orientation]);
|
|
15438
|
+
const hasImage = isNotNil28(image);
|
|
15439
|
+
const shouldShowImage = hasImage && (isVerticalLayout || width >= MIN_IMAGE_WIDTH2);
|
|
15440
|
+
const iconPosition = useMemo14(() => {
|
|
15441
|
+
if (isNil17(icon)) {
|
|
15442
|
+
return "none";
|
|
15443
|
+
}
|
|
15444
|
+
if (isSmallContainer) {
|
|
15445
|
+
return shouldShowImage ? "inline" : "above";
|
|
15446
|
+
}
|
|
15447
|
+
return prominence === "secondary" ? "inline" : "above";
|
|
15448
|
+
}, [icon, isSmallContainer, shouldShowImage, prominence]);
|
|
15449
|
+
const hasActions = isNotNil28(primaryAction) || isNotNil28(secondaryAction);
|
|
15450
|
+
const contentDirection = useMemo14(() => {
|
|
15451
|
+
if (orientation === "horizontal" && !hasActions) {
|
|
15452
|
+
return "row";
|
|
15453
|
+
}
|
|
15454
|
+
return !shouldShowImage && prominence === "primary" && !isSmallContainer && !isVerticalLayout ? "row" : "column";
|
|
15455
|
+
}, [orientation, shouldShowImage, prominence, isSmallContainer, isVerticalLayout, hasActions]);
|
|
15456
|
+
const headingVariant = isSmallContainer || prominence === "primary" ? "heading5" : "heading3";
|
|
15457
|
+
const textVariant = prominence === "primary" || isSmallContainer ? "body3" : "body2";
|
|
15458
|
+
const buttonSize = isSmallContainer ? "sm" : "md";
|
|
15459
|
+
return /* @__PURE__ */ jsxs46(
|
|
15460
|
+
StyledFeatureCard,
|
|
15461
|
+
{
|
|
15462
|
+
...props,
|
|
15463
|
+
ref: containerRef,
|
|
15464
|
+
$colorScheme: colorScheme,
|
|
15465
|
+
$contentHeight: contentHeight,
|
|
15466
|
+
$width: !isSmallContainer && !isVerticalLayout ? width : void 0,
|
|
15467
|
+
"data-wui-feature-card-content-prominence": isSmallContainer ? "small" : prominence,
|
|
15468
|
+
"data-wui-feature-card-orientation": isVerticalLayout ? "vertical" : "horizontal",
|
|
15469
|
+
children: [
|
|
15470
|
+
shouldShowImage ? image : null,
|
|
15471
|
+
/* @__PURE__ */ jsxs46(
|
|
15472
|
+
Box,
|
|
15473
|
+
{
|
|
15474
|
+
ref: contentRef,
|
|
15475
|
+
alignItems: "stretch",
|
|
15476
|
+
direction: contentDirection,
|
|
15477
|
+
flexMode: "grow",
|
|
15478
|
+
gap: "space-04",
|
|
15479
|
+
style: { padding: "var(--wui-feature-card-padding)" },
|
|
15480
|
+
children: [
|
|
15481
|
+
iconPosition === "above" && /* @__PURE__ */ jsx303(
|
|
15482
|
+
Box,
|
|
15483
|
+
{
|
|
15484
|
+
alignSelf: "stretch",
|
|
15485
|
+
direction: "column",
|
|
15486
|
+
justifyContent: "center",
|
|
15487
|
+
children: icon
|
|
15488
|
+
}
|
|
15489
|
+
),
|
|
15490
|
+
/* @__PURE__ */ jsxs46(
|
|
15491
|
+
Box,
|
|
15492
|
+
{
|
|
15493
|
+
direction: "column",
|
|
15494
|
+
flexMode: contentDirection === "row" ? "grow" : "initial",
|
|
15495
|
+
gap: iconPosition === "inline" ? "space-01" : "space-00",
|
|
15496
|
+
justifyContent: "center",
|
|
15497
|
+
children: [
|
|
15498
|
+
isNotNil28(headingText) ? /* @__PURE__ */ jsxs46(Heading, { variant: headingVariant, children: [
|
|
15499
|
+
iconPosition === "inline" && /* @__PURE__ */ jsxs46(Fragment9, { children: [
|
|
15500
|
+
icon,
|
|
15501
|
+
" "
|
|
15502
|
+
] }),
|
|
15503
|
+
headingText
|
|
15504
|
+
] }) : null,
|
|
15505
|
+
/* @__PURE__ */ jsx303(Text, { variant: textVariant, children: bodyText })
|
|
15506
|
+
]
|
|
15507
|
+
}
|
|
15508
|
+
),
|
|
15509
|
+
hasActions ? /* @__PURE__ */ jsxs46(
|
|
15510
|
+
ButtonGroup,
|
|
15511
|
+
{
|
|
15512
|
+
buttonSize,
|
|
15513
|
+
collapseOnSmallScreens: false,
|
|
15514
|
+
style: { paddingRight: "var(--wui-space-02)" },
|
|
15515
|
+
children: [
|
|
15516
|
+
isNotNil28(primaryAction) && primaryAction,
|
|
15517
|
+
isNotNil28(secondaryAction) && secondaryAction
|
|
15518
|
+
]
|
|
15519
|
+
}
|
|
15520
|
+
) : null
|
|
15521
|
+
]
|
|
15522
|
+
}
|
|
15523
|
+
),
|
|
15524
|
+
isNotNil28(onClose) && /* @__PURE__ */ jsx303(
|
|
15525
|
+
IconButton,
|
|
15526
|
+
{
|
|
15527
|
+
label: "Close",
|
|
15528
|
+
onClick: onClose,
|
|
15529
|
+
size: "sm",
|
|
15530
|
+
style: {
|
|
15531
|
+
position: "absolute",
|
|
15532
|
+
top: "var(--wui-space-01)",
|
|
15533
|
+
right: "var(--wui-space-01)"
|
|
15534
|
+
},
|
|
15535
|
+
variant: "soft",
|
|
15536
|
+
children: /* @__PURE__ */ jsx303(Icon, { type: "close" })
|
|
15537
|
+
}
|
|
15538
|
+
)
|
|
15539
|
+
]
|
|
15540
|
+
}
|
|
15541
|
+
);
|
|
15542
|
+
};
|
|
15543
|
+
FeatureCard.displayName = "FeatureCard_UI";
|
|
15544
|
+
|
|
15545
|
+
// src/components/FeatureCard/FeatureCardImage.tsx
|
|
15546
|
+
import { styled as styled69 } from "styled-components";
|
|
15547
|
+
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
15548
|
+
var StyledFeatureCardImageContainer = styled69.div`
|
|
15549
|
+
--wui-feature-card-image-border-radius: var(--wui-border-radius-02);
|
|
15550
|
+
--wui-feature-card-image-height: auto;
|
|
15551
|
+
--wui-feature-card-image-width: auto;
|
|
15552
|
+
|
|
15553
|
+
overflow: hidden;
|
|
15554
|
+
padding: var(--wui-space-04);
|
|
15555
|
+
height: var(--wui-feature-card-image-height);
|
|
15556
|
+
width: var(--wui-feature-card-image-width);
|
|
15557
|
+
justify-self: stretch;
|
|
15558
|
+
align-self: stretch;
|
|
15559
|
+
max-width: 300px;
|
|
15560
|
+
|
|
15561
|
+
/* Make image container stretch full width in vertical layout and remove bottom padding */
|
|
15562
|
+
[data-wui-feature-card-orientation='vertical'] & {
|
|
15563
|
+
max-width: none;
|
|
15564
|
+
width: 100%;
|
|
15565
|
+
padding-bottom: var(--wui-space-00);
|
|
15566
|
+
}
|
|
15567
|
+
|
|
15568
|
+
/* In horizontal layout, make image height equal to the content height and apply aspect ratio */
|
|
15569
|
+
[data-wui-feature-card-orientation='horizontal'] & {
|
|
15570
|
+
--wui-feature-card-image-height: calc(
|
|
15571
|
+
var(--wui-feature-card-content-height) + (var(--wui-feature-card-padding) * 2)
|
|
15572
|
+
);
|
|
15573
|
+
|
|
15574
|
+
/* Handle image alignment and remove padding next to content */
|
|
15575
|
+
&[data-wui-feature-card-image='right'] {
|
|
15576
|
+
padding-left: var(--wui-space-00);
|
|
15577
|
+
order: 2;
|
|
15578
|
+
}
|
|
15579
|
+
|
|
15580
|
+
&[data-wui-feature-card-image='left'] {
|
|
15581
|
+
padding-right: var(--wui-space-00);
|
|
15582
|
+
}
|
|
15583
|
+
}
|
|
15584
|
+
|
|
15585
|
+
/* Remove border radius and padding in small prominence horizontal layout */
|
|
15586
|
+
[data-wui-feature-card-content-prominence='small'] & {
|
|
15587
|
+
--wui-feature-card-image-border-radius: var(--wui-border-radius-00);
|
|
15588
|
+
|
|
15589
|
+
padding: var(--wui-space-00);
|
|
15590
|
+
}
|
|
15591
|
+
|
|
15592
|
+
/* Remove border radius in secondary prominence vertical layout */
|
|
15593
|
+
[data-wui-feature-card-orientation='vertical']
|
|
15594
|
+
[data-wui-feature-card-content-prominence='secondary']
|
|
15595
|
+
& {
|
|
15596
|
+
--wui-feature-card-image-border-radius: var(--wui-border-radius-00);
|
|
15597
|
+
}
|
|
15598
|
+
|
|
15599
|
+
[data-wui-feature-card-orientation='horizontal'][data-wui-feature-card-content-prominence='small']
|
|
15600
|
+
& {
|
|
15601
|
+
flex: 0 0 25%;
|
|
15602
|
+
}
|
|
15603
|
+
|
|
15604
|
+
img {
|
|
15605
|
+
border-radius: var(--wui-feature-card-image-border-radius);
|
|
15606
|
+
}
|
|
15607
|
+
`;
|
|
15608
|
+
var FeatureCardImage = ({
|
|
15609
|
+
alignment = "left",
|
|
15610
|
+
alt,
|
|
15611
|
+
src,
|
|
15612
|
+
...props
|
|
15613
|
+
}) => {
|
|
15614
|
+
return /* @__PURE__ */ jsx304(
|
|
15615
|
+
StyledFeatureCardImageContainer,
|
|
15616
|
+
{
|
|
15617
|
+
"data-wui-feature-card-image": alignment,
|
|
15618
|
+
...props,
|
|
15619
|
+
children: /* @__PURE__ */ jsx304(
|
|
15620
|
+
Image,
|
|
15621
|
+
{
|
|
15622
|
+
alt: alt ?? "",
|
|
15623
|
+
fill: true,
|
|
15624
|
+
fit: "cover",
|
|
15625
|
+
src
|
|
15626
|
+
}
|
|
15627
|
+
)
|
|
15628
|
+
}
|
|
15629
|
+
);
|
|
15630
|
+
};
|
|
15631
|
+
|
|
15373
15632
|
// src/components/Form/useFormState.tsx
|
|
15374
|
-
import { useCallback as useCallback17, useState as
|
|
15633
|
+
import { useCallback as useCallback17, useState as useState22 } from "react";
|
|
15375
15634
|
var useFormState = (action, initialData = {}) => {
|
|
15376
|
-
const [data, setData] =
|
|
15377
|
-
const [isPending, setIsPending] =
|
|
15378
|
-
const [error, setError] =
|
|
15635
|
+
const [data, setData] = useState22(initialData);
|
|
15636
|
+
const [isPending, setIsPending] = useState22(false);
|
|
15637
|
+
const [error, setError] = useState22(null);
|
|
15379
15638
|
const formAction = useCallback17(
|
|
15380
15639
|
async (nextFormData) => {
|
|
15381
15640
|
if (nextFormData === null) {
|
|
@@ -15409,9 +15668,9 @@ var useFormState = (action, initialData = {}) => {
|
|
|
15409
15668
|
// src/components/Form/FormErrorSummary.tsx
|
|
15410
15669
|
import { useContext as useContext12, useRef as useRef20 } from "react";
|
|
15411
15670
|
import { isArray as isArray3, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
15412
|
-
import { jsx as
|
|
15671
|
+
import { jsx as jsx305, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15413
15672
|
var ErrorItem = ({ name, error, formId }) => {
|
|
15414
|
-
return /* @__PURE__ */
|
|
15673
|
+
return /* @__PURE__ */ jsx305("li", { children: /* @__PURE__ */ jsx305(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
15415
15674
|
};
|
|
15416
15675
|
var FormErrorSummary = ({ description }) => {
|
|
15417
15676
|
const ref = useRef20(null);
|
|
@@ -15420,10 +15679,10 @@ var FormErrorSummary = ({ description }) => {
|
|
|
15420
15679
|
if (isValid || !hasSubmitted) {
|
|
15421
15680
|
return null;
|
|
15422
15681
|
}
|
|
15423
|
-
return /* @__PURE__ */
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
/* @__PURE__ */
|
|
15426
|
-
([name, error]) => isArray3(error) ? error.map((err) => /* @__PURE__ */
|
|
15682
|
+
return /* @__PURE__ */ jsxs47("div", { ref, children: [
|
|
15683
|
+
/* @__PURE__ */ jsx305("p", { children: description }),
|
|
15684
|
+
/* @__PURE__ */ jsx305("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined11(error)).map(
|
|
15685
|
+
([name, error]) => isArray3(error) ? error.map((err) => /* @__PURE__ */ jsx305(
|
|
15427
15686
|
ErrorItem,
|
|
15428
15687
|
{
|
|
15429
15688
|
error: err,
|
|
@@ -15431,7 +15690,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
15431
15690
|
name
|
|
15432
15691
|
},
|
|
15433
15692
|
err
|
|
15434
|
-
)) : /* @__PURE__ */
|
|
15693
|
+
)) : /* @__PURE__ */ jsx305(
|
|
15435
15694
|
ErrorItem,
|
|
15436
15695
|
{
|
|
15437
15696
|
error: error ?? "",
|
|
@@ -15470,9 +15729,9 @@ var validateWithYup = (schema) => {
|
|
|
15470
15729
|
|
|
15471
15730
|
// src/components/FormField/FormField.tsx
|
|
15472
15731
|
import { Children as Children10, cloneElement as cloneElement8, useContext as useContext13 } from "react";
|
|
15473
|
-
import { styled as
|
|
15474
|
-
import { isArray as isArray4, isNotNil as
|
|
15475
|
-
import { jsx as
|
|
15732
|
+
import { styled as styled70, css as css36 } from "styled-components";
|
|
15733
|
+
import { isArray as isArray4, isNotNil as isNotNil29, isNotUndefined as isNotUndefined13, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
15734
|
+
import { jsx as jsx306, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
15476
15735
|
var inlineErrorStyles = css36`
|
|
15477
15736
|
grid-template-rows: 1fr auto;
|
|
15478
15737
|
grid-template-areas: 'label-description input' '. error';
|
|
@@ -15485,7 +15744,7 @@ var blockGridErrorStyles = css36`
|
|
|
15485
15744
|
grid-template-rows: auto 1fr auto;
|
|
15486
15745
|
grid-template-areas: 'label-description' 'input' 'error';
|
|
15487
15746
|
`;
|
|
15488
|
-
var StyledFormField =
|
|
15747
|
+
var StyledFormField = styled70.div`
|
|
15489
15748
|
--form-field-spacing: var(--wui-space-02);
|
|
15490
15749
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
15491
15750
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -15519,10 +15778,10 @@ var StyledFormField = styled68.div`
|
|
|
15519
15778
|
${({ $hasError }) => $hasError && blockGridErrorStyles}
|
|
15520
15779
|
}
|
|
15521
15780
|
`;
|
|
15522
|
-
var ErrorText =
|
|
15781
|
+
var ErrorText = styled70(Text)`
|
|
15523
15782
|
grid-area: error;
|
|
15524
15783
|
`;
|
|
15525
|
-
var StyledErrorList =
|
|
15784
|
+
var StyledErrorList = styled70.ul`
|
|
15526
15785
|
margin: 0;
|
|
15527
15786
|
padding: 0;
|
|
15528
15787
|
padding-left: var(--wui-space-04);
|
|
@@ -15535,7 +15794,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15535
15794
|
const isErrorArray = isArray4(errors);
|
|
15536
15795
|
const isMultipleErrors = isErrorArray && errors.length > 1;
|
|
15537
15796
|
if (!isErrorArray) {
|
|
15538
|
-
return /* @__PURE__ */
|
|
15797
|
+
return /* @__PURE__ */ jsx306(
|
|
15539
15798
|
ErrorText,
|
|
15540
15799
|
{
|
|
15541
15800
|
colorScheme: "error",
|
|
@@ -15548,7 +15807,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15548
15807
|
);
|
|
15549
15808
|
}
|
|
15550
15809
|
if (!isMultipleErrors) {
|
|
15551
|
-
return /* @__PURE__ */
|
|
15810
|
+
return /* @__PURE__ */ jsx306(
|
|
15552
15811
|
ErrorText,
|
|
15553
15812
|
{
|
|
15554
15813
|
colorScheme: "error",
|
|
@@ -15560,7 +15819,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15560
15819
|
id
|
|
15561
15820
|
);
|
|
15562
15821
|
}
|
|
15563
|
-
return /* @__PURE__ */
|
|
15822
|
+
return /* @__PURE__ */ jsx306(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ jsx306(
|
|
15564
15823
|
Text,
|
|
15565
15824
|
{
|
|
15566
15825
|
colorScheme: "error",
|
|
@@ -15594,8 +15853,8 @@ var FormField = ({
|
|
|
15594
15853
|
const descriptionId = `${computedId}-description`;
|
|
15595
15854
|
const errorId = `${computedId}-error`;
|
|
15596
15855
|
const ariaDescribedby = [descriptionId, errorId].filter(Boolean).join(" ") || void 0;
|
|
15597
|
-
const hasDescription =
|
|
15598
|
-
const hasError =
|
|
15856
|
+
const hasDescription = isNotNil29(description);
|
|
15857
|
+
const hasError = isNotNil29(computedError);
|
|
15599
15858
|
const shouldRenderLabelDescriptionWrapper = !isIntegratedLabel || hasDescription;
|
|
15600
15859
|
let childProps = {
|
|
15601
15860
|
name,
|
|
@@ -15612,8 +15871,8 @@ var FormField = ({
|
|
|
15612
15871
|
defaultValue
|
|
15613
15872
|
};
|
|
15614
15873
|
}
|
|
15615
|
-
if (
|
|
15616
|
-
const computedName =
|
|
15874
|
+
if (isNotNil29(checkboxGroup)) {
|
|
15875
|
+
const computedName = isNotNil29(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
15617
15876
|
const handleChange = (event) => {
|
|
15618
15877
|
if (isNotUndefined13(props.onChange)) {
|
|
15619
15878
|
props.onChange(event);
|
|
@@ -15629,14 +15888,14 @@ var FormField = ({
|
|
|
15629
15888
|
};
|
|
15630
15889
|
}
|
|
15631
15890
|
Children10.only(children);
|
|
15632
|
-
return /* @__PURE__ */
|
|
15891
|
+
return /* @__PURE__ */ jsxs48(
|
|
15633
15892
|
StyledFormField,
|
|
15634
15893
|
{
|
|
15635
15894
|
...props,
|
|
15636
15895
|
$hasError: hasError,
|
|
15637
15896
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
15638
15897
|
children: [
|
|
15639
|
-
shouldRenderLabelDescriptionWrapper ? /* @__PURE__ */
|
|
15898
|
+
shouldRenderLabelDescriptionWrapper ? /* @__PURE__ */ jsxs48(
|
|
15640
15899
|
Stack,
|
|
15641
15900
|
{
|
|
15642
15901
|
direction: "vertical",
|
|
@@ -15645,7 +15904,7 @@ var FormField = ({
|
|
|
15645
15904
|
gridArea: "label-description"
|
|
15646
15905
|
},
|
|
15647
15906
|
children: [
|
|
15648
|
-
!isIntegratedLabel && /* @__PURE__ */
|
|
15907
|
+
!isIntegratedLabel && /* @__PURE__ */ jsx306(
|
|
15649
15908
|
Label,
|
|
15650
15909
|
{
|
|
15651
15910
|
htmlFor: computedId,
|
|
@@ -15653,12 +15912,12 @@ var FormField = ({
|
|
|
15653
15912
|
children: label
|
|
15654
15913
|
}
|
|
15655
15914
|
),
|
|
15656
|
-
hasDescription ? /* @__PURE__ */
|
|
15915
|
+
hasDescription ? /* @__PURE__ */ jsx306(FormControlLabelDescription, { id: descriptionId, children: description }) : null
|
|
15657
15916
|
]
|
|
15658
15917
|
}
|
|
15659
15918
|
) : null,
|
|
15660
15919
|
cloneElement8(children, childProps),
|
|
15661
|
-
hasError ? /* @__PURE__ */
|
|
15920
|
+
hasError ? /* @__PURE__ */ jsx306(
|
|
15662
15921
|
ErrorMessages,
|
|
15663
15922
|
{
|
|
15664
15923
|
errors: computedError,
|
|
@@ -15672,8 +15931,8 @@ var FormField = ({
|
|
|
15672
15931
|
FormField.displayName = "FormField_UI";
|
|
15673
15932
|
|
|
15674
15933
|
// src/components/FormGroup/RadioGroup.tsx
|
|
15675
|
-
import { createContext as createContext8, useMemo as
|
|
15676
|
-
import { jsx as
|
|
15934
|
+
import { createContext as createContext8, useMemo as useMemo15, useContext as useContext14 } from "react";
|
|
15935
|
+
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
15677
15936
|
var RadioGroupContext = createContext8(null);
|
|
15678
15937
|
var useRadioGroup = () => {
|
|
15679
15938
|
return useContext14(RadioGroupContext);
|
|
@@ -15687,22 +15946,22 @@ var RadioGroup = ({
|
|
|
15687
15946
|
}) => {
|
|
15688
15947
|
const formState = useContext14(FormContext);
|
|
15689
15948
|
const derivedValue = typeof formState.values[name] === "string" ? formState.values[name] : value;
|
|
15690
|
-
const context =
|
|
15949
|
+
const context = useMemo15(() => {
|
|
15691
15950
|
return {
|
|
15692
15951
|
name,
|
|
15693
15952
|
onChange,
|
|
15694
15953
|
value: derivedValue
|
|
15695
15954
|
};
|
|
15696
15955
|
}, [name, derivedValue, onChange]);
|
|
15697
|
-
return /* @__PURE__ */
|
|
15956
|
+
return /* @__PURE__ */ jsx307(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx307(FormGroup, { ...props, children }) });
|
|
15698
15957
|
};
|
|
15699
15958
|
RadioGroup.displayName = "RadioGroup_UI";
|
|
15700
15959
|
|
|
15701
15960
|
// src/components/Grid/Grid.tsx
|
|
15702
15961
|
import { forwardRef as forwardRef22 } from "react";
|
|
15703
|
-
import { styled as
|
|
15962
|
+
import { styled as styled71, css as css37 } from "styled-components";
|
|
15704
15963
|
import { isRecord as isRecord5 } from "@wistia/type-guards";
|
|
15705
|
-
import { jsx as
|
|
15964
|
+
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
15706
15965
|
var DEFAULT_ELEMENT5 = "div";
|
|
15707
15966
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
15708
15967
|
if (minChildWidth === "auto" && maxColumns === "auto") {
|
|
@@ -15730,7 +15989,7 @@ var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
|
15730
15989
|
);
|
|
15731
15990
|
`;
|
|
15732
15991
|
};
|
|
15733
|
-
var StyledGrid =
|
|
15992
|
+
var StyledGrid = styled71.div`
|
|
15734
15993
|
--wui-grid-column-gap: ${({ $columnGap }) => `var(--wui-${$columnGap})`};
|
|
15735
15994
|
--wui-grid-row-gap: ${({ $rowGap }) => `var(--wui-${$rowGap})`};
|
|
15736
15995
|
|
|
@@ -15754,7 +16013,7 @@ var GridComponent = forwardRef22(
|
|
|
15754
16013
|
const { column, row } = isRecord5(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
|
|
15755
16014
|
const responsiveColumns = useResponsiveProp(columns);
|
|
15756
16015
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
15757
|
-
return /* @__PURE__ */
|
|
16016
|
+
return /* @__PURE__ */ jsx308(
|
|
15758
16017
|
StyledGrid,
|
|
15759
16018
|
{
|
|
15760
16019
|
ref,
|
|
@@ -15774,11 +16033,11 @@ GridComponent.displayName = "Grid_UI";
|
|
|
15774
16033
|
var Grid = makePolymorphic(GridComponent);
|
|
15775
16034
|
|
|
15776
16035
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
15777
|
-
import { styled as
|
|
15778
|
-
import { forwardRef as forwardRef23, useEffect as
|
|
16036
|
+
import { styled as styled72 } from "styled-components";
|
|
16037
|
+
import { forwardRef as forwardRef23, useEffect as useEffect20, useState as useState23 } from "react";
|
|
15779
16038
|
import { isFunction as isFunction3 } from "@wistia/type-guards";
|
|
15780
|
-
import { jsx as
|
|
15781
|
-
var StyledIconButton =
|
|
16039
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
16040
|
+
var StyledIconButton = styled72(IconButton)`
|
|
15782
16041
|
/* override size for icon button since prop gets changed by Input */
|
|
15783
16042
|
height: var(--icon-button-size-sm);
|
|
15784
16043
|
width: var(--icon-button-size-sm);
|
|
@@ -15789,8 +16048,8 @@ var StyledIconButton = styled70(IconButton)`
|
|
|
15789
16048
|
var COPY_SUCCESS_DURATION = 2e3;
|
|
15790
16049
|
var InputClickToCopy = forwardRef23(
|
|
15791
16050
|
({ value, onCopy, disabled = false, ...props }, ref) => {
|
|
15792
|
-
const [isCopied, setIsCopied] =
|
|
15793
|
-
|
|
16051
|
+
const [isCopied, setIsCopied] = useState23(false);
|
|
16052
|
+
useEffect20(() => {
|
|
15794
16053
|
if (isCopied) {
|
|
15795
16054
|
const timeout = setTimeout(() => {
|
|
15796
16055
|
setIsCopied(false);
|
|
@@ -15817,7 +16076,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15817
16076
|
return value;
|
|
15818
16077
|
});
|
|
15819
16078
|
};
|
|
15820
|
-
return /* @__PURE__ */
|
|
16079
|
+
return /* @__PURE__ */ jsx309(
|
|
15821
16080
|
Input,
|
|
15822
16081
|
{
|
|
15823
16082
|
"aria-label": "Click to Copy",
|
|
@@ -15825,7 +16084,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15825
16084
|
ref,
|
|
15826
16085
|
disabled,
|
|
15827
16086
|
readOnly: true,
|
|
15828
|
-
rightIcon: /* @__PURE__ */
|
|
16087
|
+
rightIcon: /* @__PURE__ */ jsx309(
|
|
15829
16088
|
StyledIconButton,
|
|
15830
16089
|
{
|
|
15831
16090
|
colorScheme: isCopied ? "success" : "inherit",
|
|
@@ -15833,7 +16092,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15833
16092
|
label: "Copy to clipboard",
|
|
15834
16093
|
onClick: handleClick,
|
|
15835
16094
|
variant: "ghost",
|
|
15836
|
-
children: isCopied ? /* @__PURE__ */
|
|
16095
|
+
children: isCopied ? /* @__PURE__ */ jsx309(Icon, { type: "checkmark-circle" }) : /* @__PURE__ */ jsx309(Icon, { type: "save-as-copy" })
|
|
15837
16096
|
}
|
|
15838
16097
|
),
|
|
15839
16098
|
value
|
|
@@ -15844,11 +16103,11 @@ var InputClickToCopy = forwardRef23(
|
|
|
15844
16103
|
InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
15845
16104
|
|
|
15846
16105
|
// src/components/InputPassword/InputPassword.tsx
|
|
15847
|
-
import { styled as
|
|
15848
|
-
import { forwardRef as forwardRef24, useState as
|
|
16106
|
+
import { styled as styled73 } from "styled-components";
|
|
16107
|
+
import { forwardRef as forwardRef24, useState as useState24 } from "react";
|
|
15849
16108
|
import { isFunction as isFunction4 } from "@wistia/type-guards";
|
|
15850
|
-
import { jsx as
|
|
15851
|
-
var StyledIconButton2 =
|
|
16109
|
+
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
16110
|
+
var StyledIconButton2 = styled73(IconButton)`
|
|
15852
16111
|
/* override size for icon button since prop gets changed by Input */
|
|
15853
16112
|
height: var(--icon-button-size-sm);
|
|
15854
16113
|
width: var(--icon-button-size-sm);
|
|
@@ -15858,7 +16117,7 @@ var StyledIconButton2 = styled71(IconButton)`
|
|
|
15858
16117
|
`;
|
|
15859
16118
|
var InputPassword = forwardRef24(
|
|
15860
16119
|
({ onVisibilityToggle, disabled = false, ...props }, ref) => {
|
|
15861
|
-
const [isVisible, setIsVisible] =
|
|
16120
|
+
const [isVisible, setIsVisible] = useState24(false);
|
|
15862
16121
|
const handleClick = () => {
|
|
15863
16122
|
const newVisibility = !isVisible;
|
|
15864
16123
|
setIsVisible(newVisibility);
|
|
@@ -15866,13 +16125,13 @@ var InputPassword = forwardRef24(
|
|
|
15866
16125
|
onVisibilityToggle(newVisibility);
|
|
15867
16126
|
}
|
|
15868
16127
|
};
|
|
15869
|
-
return /* @__PURE__ */
|
|
16128
|
+
return /* @__PURE__ */ jsx310(
|
|
15870
16129
|
Input,
|
|
15871
16130
|
{
|
|
15872
16131
|
...props,
|
|
15873
16132
|
ref,
|
|
15874
16133
|
disabled,
|
|
15875
|
-
rightIcon: /* @__PURE__ */
|
|
16134
|
+
rightIcon: /* @__PURE__ */ jsx310(
|
|
15876
16135
|
StyledIconButton2,
|
|
15877
16136
|
{
|
|
15878
16137
|
disabled,
|
|
@@ -15880,7 +16139,7 @@ var InputPassword = forwardRef24(
|
|
|
15880
16139
|
onClick: handleClick,
|
|
15881
16140
|
tabIndex: disabled ? -1 : 0,
|
|
15882
16141
|
variant: "ghost",
|
|
15883
|
-
children: /* @__PURE__ */
|
|
16142
|
+
children: /* @__PURE__ */ jsx310(Icon, { type: isVisible ? "preview" : "hide" })
|
|
15884
16143
|
}
|
|
15885
16144
|
),
|
|
15886
16145
|
type: isVisible ? "text" : "password"
|
|
@@ -15891,16 +16150,16 @@ var InputPassword = forwardRef24(
|
|
|
15891
16150
|
InputPassword.displayName = "InputPassword_UI";
|
|
15892
16151
|
|
|
15893
16152
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
15894
|
-
import { styled as
|
|
15895
|
-
import { isNotNil as
|
|
15896
|
-
import { jsx as
|
|
15897
|
-
var StyledKeyboardShortcut =
|
|
16153
|
+
import { styled as styled74 } from "styled-components";
|
|
16154
|
+
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
16155
|
+
import { jsx as jsx311, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
16156
|
+
var StyledKeyboardShortcut = styled74.div`
|
|
15898
16157
|
align-items: center;
|
|
15899
16158
|
display: flex;
|
|
15900
16159
|
gap: var(--wui-space-02);
|
|
15901
16160
|
${({ $fullWidth }) => $fullWidth && "width: 100%; justify-content: space-between;"}
|
|
15902
16161
|
`;
|
|
15903
|
-
var StyledKey =
|
|
16162
|
+
var StyledKey = styled74.kbd`
|
|
15904
16163
|
align-items: center;
|
|
15905
16164
|
background: var(--wui-color-bg-surface-secondary);
|
|
15906
16165
|
border-bottom: 1px solid var(--wui-color-border-secondary);
|
|
@@ -15923,11 +16182,11 @@ var StyledKey = styled72.kbd`
|
|
|
15923
16182
|
min-width: 20px;
|
|
15924
16183
|
padding: 0 var(--wui-space-01);
|
|
15925
16184
|
`;
|
|
15926
|
-
var Label2 =
|
|
16185
|
+
var Label2 = styled74.span`
|
|
15927
16186
|
color: var(--wui-color-text);
|
|
15928
16187
|
font-size: 12px;
|
|
15929
16188
|
`;
|
|
15930
|
-
var KeysContainer =
|
|
16189
|
+
var KeysContainer = styled74.div`
|
|
15931
16190
|
display: flex;
|
|
15932
16191
|
gap: var(--wui-space-01);
|
|
15933
16192
|
`;
|
|
@@ -15980,14 +16239,14 @@ var KeyboardShortcut = ({
|
|
|
15980
16239
|
keyboardKeys,
|
|
15981
16240
|
fullWidth = false,
|
|
15982
16241
|
...otherProps
|
|
15983
|
-
}) => /* @__PURE__ */
|
|
16242
|
+
}) => /* @__PURE__ */ jsxs49(
|
|
15984
16243
|
StyledKeyboardShortcut,
|
|
15985
16244
|
{
|
|
15986
16245
|
$fullWidth: fullWidth,
|
|
15987
16246
|
...otherProps,
|
|
15988
16247
|
children: [
|
|
15989
|
-
|
|
15990
|
-
/* @__PURE__ */
|
|
16248
|
+
isNotNil30(label) && /* @__PURE__ */ jsx311(Label2, { children: label }),
|
|
16249
|
+
/* @__PURE__ */ jsx311(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx311(
|
|
15991
16250
|
StyledKey,
|
|
15992
16251
|
{
|
|
15993
16252
|
children: keyToString(keyboardKey)
|
|
@@ -16000,26 +16259,26 @@ var KeyboardShortcut = ({
|
|
|
16000
16259
|
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
16001
16260
|
|
|
16002
16261
|
// src/components/List/List.tsx
|
|
16003
|
-
import { isNotNil as
|
|
16004
|
-
import { styled as
|
|
16262
|
+
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
16263
|
+
import { styled as styled76, css as css38 } from "styled-components";
|
|
16005
16264
|
|
|
16006
16265
|
// src/components/List/ListItem.tsx
|
|
16007
|
-
import { styled as
|
|
16008
|
-
import { isNil as
|
|
16009
|
-
import { jsx as
|
|
16010
|
-
var ListItemComponent =
|
|
16266
|
+
import { styled as styled75 } from "styled-components";
|
|
16267
|
+
import { isNil as isNil18 } from "@wistia/type-guards";
|
|
16268
|
+
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
16269
|
+
var ListItemComponent = styled75.li`
|
|
16011
16270
|
margin-bottom: var(--wui-space-02);
|
|
16012
16271
|
`;
|
|
16013
16272
|
var ListItem = ({ children }) => {
|
|
16014
|
-
if (
|
|
16273
|
+
if (isNil18(children)) {
|
|
16015
16274
|
return null;
|
|
16016
16275
|
}
|
|
16017
|
-
return /* @__PURE__ */
|
|
16276
|
+
return /* @__PURE__ */ jsx312(ListItemComponent, { children });
|
|
16018
16277
|
};
|
|
16019
16278
|
ListItem.displayName = "ListItem_UI";
|
|
16020
16279
|
|
|
16021
16280
|
// src/components/List/List.tsx
|
|
16022
|
-
import { jsx as
|
|
16281
|
+
import { jsx as jsx313, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
16023
16282
|
var spacesStyle = css38`
|
|
16024
16283
|
overflow: hidden;
|
|
16025
16284
|
padding-left: 0;
|
|
@@ -16078,7 +16337,7 @@ var unbulletedStyle = css38`
|
|
|
16078
16337
|
list-style: none;
|
|
16079
16338
|
padding-left: 0;
|
|
16080
16339
|
`;
|
|
16081
|
-
var ListComponent =
|
|
16340
|
+
var ListComponent = styled76.ul`
|
|
16082
16341
|
list-style-position: outside;
|
|
16083
16342
|
margin: 0 0 var(--wui-space-01);
|
|
16084
16343
|
padding: 0 0 0 var(--wui-space-04);
|
|
@@ -16105,7 +16364,7 @@ var ListComponent = styled74.ul`
|
|
|
16105
16364
|
`;
|
|
16106
16365
|
var renderListComponent = (listItems, variant, { ...otherProps }) => {
|
|
16107
16366
|
const elementType = variant === "ordered" ? "ol" : "ul";
|
|
16108
|
-
return /* @__PURE__ */
|
|
16367
|
+
return /* @__PURE__ */ jsx313(
|
|
16109
16368
|
ListComponent,
|
|
16110
16369
|
{
|
|
16111
16370
|
as: elementType,
|
|
@@ -16122,7 +16381,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
16122
16381
|
const nextItem = listItems[i + 1];
|
|
16123
16382
|
const key = `item-${itemCount += 1}`;
|
|
16124
16383
|
if (Array.isArray(nextItem)) {
|
|
16125
|
-
return /* @__PURE__ */
|
|
16384
|
+
return /* @__PURE__ */ jsxs50(ListItem, { children: [
|
|
16126
16385
|
item,
|
|
16127
16386
|
renderListFromArray(nextItem, variant, otherProps)
|
|
16128
16387
|
] }, key);
|
|
@@ -16130,7 +16389,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
16130
16389
|
if (Array.isArray(item)) {
|
|
16131
16390
|
return null;
|
|
16132
16391
|
}
|
|
16133
|
-
return /* @__PURE__ */
|
|
16392
|
+
return /* @__PURE__ */ jsx313(ListItem, { children: item }, key);
|
|
16134
16393
|
});
|
|
16135
16394
|
return renderListComponent(items, variant, otherProps);
|
|
16136
16395
|
};
|
|
@@ -16141,13 +16400,13 @@ var List = ({
|
|
|
16141
16400
|
...otherProps
|
|
16142
16401
|
}) => {
|
|
16143
16402
|
const listVariant = variant ?? "bullets";
|
|
16144
|
-
if (
|
|
16403
|
+
if (isNotNil31(children)) {
|
|
16145
16404
|
if (Array.isArray(children) && !children.length) {
|
|
16146
16405
|
return null;
|
|
16147
16406
|
}
|
|
16148
16407
|
return renderListComponent(children, listVariant, otherProps);
|
|
16149
16408
|
}
|
|
16150
|
-
if (
|
|
16409
|
+
if (isNotNil31(items)) {
|
|
16151
16410
|
if (!items.length) {
|
|
16152
16411
|
return null;
|
|
16153
16412
|
}
|
|
@@ -16158,9 +16417,9 @@ var List = ({
|
|
|
16158
16417
|
List.displayName = "List_UI";
|
|
16159
16418
|
|
|
16160
16419
|
// src/components/Mark/Mark.tsx
|
|
16161
|
-
import { styled as
|
|
16162
|
-
import { jsx as
|
|
16163
|
-
var StyledMark =
|
|
16420
|
+
import { styled as styled77 } from "styled-components";
|
|
16421
|
+
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
16422
|
+
var StyledMark = styled77.mark`
|
|
16164
16423
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16165
16424
|
background-color: var(--wui-color-bg-surface-tertiary);
|
|
16166
16425
|
color: var(--wui-color-text);
|
|
@@ -16168,7 +16427,7 @@ var StyledMark = styled75.mark`
|
|
|
16168
16427
|
padding-inline: 0.1em;
|
|
16169
16428
|
margin-inline: -0.1em;
|
|
16170
16429
|
`;
|
|
16171
|
-
var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */
|
|
16430
|
+
var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */ jsx314(
|
|
16172
16431
|
StyledMark,
|
|
16173
16432
|
{
|
|
16174
16433
|
$colorScheme: colorScheme,
|
|
@@ -16179,7 +16438,7 @@ var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */
|
|
|
16179
16438
|
Mark.displayName = "Mark_UI";
|
|
16180
16439
|
|
|
16181
16440
|
// src/components/Markdown/Markdown.tsx
|
|
16182
|
-
import { styled as
|
|
16441
|
+
import { styled as styled78 } from "styled-components";
|
|
16183
16442
|
import ReactMarkdown from "react-markdown";
|
|
16184
16443
|
|
|
16185
16444
|
// src/css/baseMarkdownCss.tsx
|
|
@@ -16307,8 +16566,8 @@ var baseMarkdownCss = (textSize = "body2") => css39`
|
|
|
16307
16566
|
`;
|
|
16308
16567
|
|
|
16309
16568
|
// src/components/Markdown/Markdown.tsx
|
|
16310
|
-
import { jsx as
|
|
16311
|
-
var StyledMarkdownWrapper =
|
|
16569
|
+
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
16570
|
+
var StyledMarkdownWrapper = styled78.div`
|
|
16312
16571
|
${({ $textSize }) => baseMarkdownCss($textSize)}
|
|
16313
16572
|
`;
|
|
16314
16573
|
var Markdown = ({
|
|
@@ -16317,12 +16576,12 @@ var Markdown = ({
|
|
|
16317
16576
|
...otherProps
|
|
16318
16577
|
}) => {
|
|
16319
16578
|
const responsiveTextSize = useResponsiveProp(textSize);
|
|
16320
|
-
return /* @__PURE__ */
|
|
16579
|
+
return /* @__PURE__ */ jsx315(
|
|
16321
16580
|
StyledMarkdownWrapper,
|
|
16322
16581
|
{
|
|
16323
16582
|
$textSize: responsiveTextSize,
|
|
16324
16583
|
...otherProps,
|
|
16325
|
-
children: /* @__PURE__ */
|
|
16584
|
+
children: /* @__PURE__ */ jsx315(ReactMarkdown, { children })
|
|
16326
16585
|
}
|
|
16327
16586
|
);
|
|
16328
16587
|
};
|
|
@@ -16330,36 +16589,36 @@ Markdown.displayName = "Markdown_UI";
|
|
|
16330
16589
|
|
|
16331
16590
|
// src/components/Modal/Modal.tsx
|
|
16332
16591
|
import { forwardRef as forwardRef26 } from "react";
|
|
16333
|
-
import { styled as
|
|
16592
|
+
import { styled as styled83 } from "styled-components";
|
|
16334
16593
|
import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
|
|
16335
|
-
import { isNotNil as
|
|
16594
|
+
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
16336
16595
|
|
|
16337
16596
|
// src/components/Modal/ModalHeader.tsx
|
|
16338
|
-
import { styled as
|
|
16597
|
+
import { styled as styled80 } from "styled-components";
|
|
16339
16598
|
import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
16340
16599
|
|
|
16341
16600
|
// src/components/Modal/ModalCloseButton.tsx
|
|
16342
|
-
import { styled as
|
|
16601
|
+
import { styled as styled79 } from "styled-components";
|
|
16343
16602
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
16344
|
-
import { jsx as
|
|
16345
|
-
var CloseButton =
|
|
16603
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
16604
|
+
var CloseButton = styled79(DialogClose)`
|
|
16346
16605
|
align-self: start;
|
|
16347
16606
|
`;
|
|
16348
16607
|
var ModalCloseButton = () => {
|
|
16349
|
-
return /* @__PURE__ */
|
|
16608
|
+
return /* @__PURE__ */ jsx316(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx316(
|
|
16350
16609
|
IconButton,
|
|
16351
16610
|
{
|
|
16352
16611
|
label: "Dismiss modal",
|
|
16353
16612
|
size: "sm",
|
|
16354
16613
|
variant: "ghost",
|
|
16355
|
-
children: /* @__PURE__ */
|
|
16614
|
+
children: /* @__PURE__ */ jsx316(Icon, { type: "close" })
|
|
16356
16615
|
}
|
|
16357
16616
|
) });
|
|
16358
16617
|
};
|
|
16359
16618
|
|
|
16360
16619
|
// src/components/Modal/ModalHeader.tsx
|
|
16361
|
-
import { jsx as
|
|
16362
|
-
var Header =
|
|
16620
|
+
import { jsx as jsx317, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
16621
|
+
var Header = styled80.header`
|
|
16363
16622
|
display: flex;
|
|
16364
16623
|
order: 1;
|
|
16365
16624
|
padding: 0 var(--wui-space-05);
|
|
@@ -16379,7 +16638,7 @@ var Header = styled78.header`
|
|
|
16379
16638
|
top: var(--wui-space-03);
|
|
16380
16639
|
}
|
|
16381
16640
|
`;
|
|
16382
|
-
var Title =
|
|
16641
|
+
var Title = styled80(DialogTitle)`
|
|
16383
16642
|
font-family: var(--wui-typography-heading-2-family);
|
|
16384
16643
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
16385
16644
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -16390,15 +16649,15 @@ var ModalHeader = ({
|
|
|
16390
16649
|
hideTitle,
|
|
16391
16650
|
hideCloseButton
|
|
16392
16651
|
}) => {
|
|
16393
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */
|
|
16394
|
-
return /* @__PURE__ */
|
|
16652
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx317(ScreenReaderOnly, { children: /* @__PURE__ */ jsx317(Title, { children: title }) }) : /* @__PURE__ */ jsx317(Title, { children: title });
|
|
16653
|
+
return /* @__PURE__ */ jsxs51(
|
|
16395
16654
|
Header,
|
|
16396
16655
|
{
|
|
16397
16656
|
$hideCloseButon: hideCloseButton,
|
|
16398
16657
|
$hideTitle: hideTitle,
|
|
16399
16658
|
children: [
|
|
16400
16659
|
TitleComponent,
|
|
16401
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
16660
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx317(ModalCloseButton, {})
|
|
16402
16661
|
]
|
|
16403
16662
|
}
|
|
16404
16663
|
);
|
|
@@ -16406,23 +16665,23 @@ var ModalHeader = ({
|
|
|
16406
16665
|
|
|
16407
16666
|
// src/components/Modal/ModalContent.tsx
|
|
16408
16667
|
import { forwardRef as forwardRef25 } from "react";
|
|
16409
|
-
import { styled as
|
|
16668
|
+
import { styled as styled81, css as css40, keyframes as keyframes5 } from "styled-components";
|
|
16410
16669
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
16411
16670
|
|
|
16412
16671
|
// src/components/Modal/constants.ts
|
|
16413
16672
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
16414
16673
|
|
|
16415
16674
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
16416
|
-
import { useRef as useRef21, useEffect as
|
|
16417
|
-
import { isNotNil as
|
|
16675
|
+
import { useRef as useRef21, useEffect as useEffect21 } from "react";
|
|
16676
|
+
import { isNotNil as isNotNil32 } from "@wistia/type-guards";
|
|
16418
16677
|
var useFocusRestore = () => {
|
|
16419
16678
|
const previouslyFocusedRef = useRef21(null);
|
|
16420
|
-
|
|
16679
|
+
useEffect21(() => {
|
|
16421
16680
|
previouslyFocusedRef.current = document.activeElement;
|
|
16422
16681
|
}, []);
|
|
16423
|
-
|
|
16682
|
+
useEffect21(() => {
|
|
16424
16683
|
return () => {
|
|
16425
|
-
if (
|
|
16684
|
+
if (isNotNil32(previouslyFocusedRef.current)) {
|
|
16426
16685
|
setTimeout(() => {
|
|
16427
16686
|
previouslyFocusedRef.current?.focus();
|
|
16428
16687
|
}, 0);
|
|
@@ -16432,7 +16691,7 @@ var useFocusRestore = () => {
|
|
|
16432
16691
|
};
|
|
16433
16692
|
|
|
16434
16693
|
// src/components/Modal/ModalContent.tsx
|
|
16435
|
-
import { jsx as
|
|
16694
|
+
import { jsx as jsx318 } from "react/jsx-runtime";
|
|
16436
16695
|
var modalEnter = keyframes5`
|
|
16437
16696
|
from {
|
|
16438
16697
|
opacity: 0;
|
|
@@ -16530,7 +16789,7 @@ var positionStyleMap = {
|
|
|
16530
16789
|
"fixed-top": fixedTopModalStyles,
|
|
16531
16790
|
"right-side-panel": rightSidePanelModalStyles
|
|
16532
16791
|
};
|
|
16533
|
-
var StyledModalContent =
|
|
16792
|
+
var StyledModalContent = styled81(DialogContent)`
|
|
16534
16793
|
position: fixed;
|
|
16535
16794
|
display: flex;
|
|
16536
16795
|
flex-direction: column;
|
|
@@ -16560,7 +16819,7 @@ var StyledModalContent = styled79(DialogContent)`
|
|
|
16560
16819
|
var ModalContent = forwardRef25(
|
|
16561
16820
|
({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
|
|
16562
16821
|
useFocusRestore();
|
|
16563
|
-
return /* @__PURE__ */
|
|
16822
|
+
return /* @__PURE__ */ jsx318(
|
|
16564
16823
|
StyledModalContent,
|
|
16565
16824
|
{
|
|
16566
16825
|
ref,
|
|
@@ -16576,7 +16835,7 @@ var ModalContent = forwardRef25(
|
|
|
16576
16835
|
|
|
16577
16836
|
// src/components/Modal/ModalOverlay.tsx
|
|
16578
16837
|
import { DialogOverlay } from "@radix-ui/react-dialog";
|
|
16579
|
-
import { styled as
|
|
16838
|
+
import { styled as styled82, keyframes as keyframes6 } from "styled-components";
|
|
16580
16839
|
var backdropShow = keyframes6`
|
|
16581
16840
|
from {
|
|
16582
16841
|
opacity: 0;
|
|
@@ -16595,7 +16854,7 @@ var backdropHide = keyframes6`
|
|
|
16595
16854
|
opacity: 0;
|
|
16596
16855
|
}
|
|
16597
16856
|
`;
|
|
16598
|
-
var ModalOverlay =
|
|
16857
|
+
var ModalOverlay = styled82(DialogOverlay)`
|
|
16599
16858
|
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
16600
16859
|
background: var(--wui-color-backdrop);
|
|
16601
16860
|
inset: 0;
|
|
@@ -16608,19 +16867,19 @@ var ModalOverlay = styled80(DialogOverlay)`
|
|
|
16608
16867
|
`;
|
|
16609
16868
|
|
|
16610
16869
|
// src/components/Modal/Modal.tsx
|
|
16611
|
-
import { jsx as
|
|
16612
|
-
var ModalBody =
|
|
16870
|
+
import { jsx as jsx319, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16871
|
+
var ModalBody = styled83.div`
|
|
16613
16872
|
flex-direction: column;
|
|
16614
16873
|
display: flex;
|
|
16615
16874
|
flex: 1 0 0;
|
|
16616
16875
|
padding: 0 var(--wui-space-05);
|
|
16617
16876
|
`;
|
|
16618
|
-
var ModalScrollArea =
|
|
16877
|
+
var ModalScrollArea = styled83.div`
|
|
16619
16878
|
order: 2;
|
|
16620
16879
|
max-height: 90vh;
|
|
16621
16880
|
overflow-y: auto;
|
|
16622
16881
|
`;
|
|
16623
|
-
var ModalFooter =
|
|
16882
|
+
var ModalFooter = styled83.footer`
|
|
16624
16883
|
padding: 0 var(--wui-space-05);
|
|
16625
16884
|
order: 3;
|
|
16626
16885
|
`;
|
|
@@ -16638,23 +16897,23 @@ var Modal = forwardRef26(
|
|
|
16638
16897
|
width = DEFAULT_MODAL_WIDTH,
|
|
16639
16898
|
...props
|
|
16640
16899
|
}, ref) => {
|
|
16641
|
-
return /* @__PURE__ */
|
|
16900
|
+
return /* @__PURE__ */ jsx319(
|
|
16642
16901
|
DialogRoot,
|
|
16643
16902
|
{
|
|
16644
16903
|
onOpenChange: (open2) => {
|
|
16645
|
-
if (!open2 &&
|
|
16904
|
+
if (!open2 && isNotNil33(onRequestClose)) {
|
|
16646
16905
|
onRequestClose();
|
|
16647
16906
|
}
|
|
16648
16907
|
},
|
|
16649
16908
|
open: isOpen,
|
|
16650
|
-
children: /* @__PURE__ */
|
|
16651
|
-
/* @__PURE__ */
|
|
16652
|
-
/* @__PURE__ */
|
|
16909
|
+
children: /* @__PURE__ */ jsxs52(DialogPortal, { children: [
|
|
16910
|
+
/* @__PURE__ */ jsx319(ModalOverlay, {}),
|
|
16911
|
+
/* @__PURE__ */ jsxs52(
|
|
16653
16912
|
ModalContent,
|
|
16654
16913
|
{
|
|
16655
16914
|
ref,
|
|
16656
16915
|
onOpenAutoFocus: (event) => {
|
|
16657
|
-
if (
|
|
16916
|
+
if (isNotNil33(initialFocusRef) && initialFocusRef.current) {
|
|
16658
16917
|
event.preventDefault();
|
|
16659
16918
|
requestAnimationFrame(() => {
|
|
16660
16919
|
initialFocusRef.current?.focus();
|
|
@@ -16665,9 +16924,9 @@ var Modal = forwardRef26(
|
|
|
16665
16924
|
width,
|
|
16666
16925
|
...props,
|
|
16667
16926
|
children: [
|
|
16668
|
-
/* @__PURE__ */
|
|
16669
|
-
|
|
16670
|
-
hideCloseButton && hideTitle ? null : /* @__PURE__ */
|
|
16927
|
+
/* @__PURE__ */ jsx319(ModalScrollArea, { children: /* @__PURE__ */ jsx319(ModalBody, { children }) }),
|
|
16928
|
+
isNotNil33(footer) ? /* @__PURE__ */ jsx319(ModalFooter, { children: footer }) : null,
|
|
16929
|
+
hideCloseButton && hideTitle ? null : /* @__PURE__ */ jsx319(
|
|
16671
16930
|
ModalHeader,
|
|
16672
16931
|
{
|
|
16673
16932
|
hideCloseButton,
|
|
@@ -16686,9 +16945,9 @@ var Modal = forwardRef26(
|
|
|
16686
16945
|
Modal.displayName = "Modal_UI";
|
|
16687
16946
|
|
|
16688
16947
|
// src/components/Modal/ModalCallouts.tsx
|
|
16689
|
-
import { jsx as
|
|
16948
|
+
import { jsx as jsx320, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16690
16949
|
var ModalCallouts = ({ children }) => {
|
|
16691
|
-
return /* @__PURE__ */
|
|
16950
|
+
return /* @__PURE__ */ jsx320(
|
|
16692
16951
|
Stack,
|
|
16693
16952
|
{
|
|
16694
16953
|
direction: "horizontal",
|
|
@@ -16699,9 +16958,9 @@ var ModalCallouts = ({ children }) => {
|
|
|
16699
16958
|
};
|
|
16700
16959
|
ModalCallouts.displayName = "ModalCallouts_UI";
|
|
16701
16960
|
var ModalCallout = ({ title, image, children }) => {
|
|
16702
|
-
return /* @__PURE__ */
|
|
16961
|
+
return /* @__PURE__ */ jsxs53(Stack, { direction: "vertical", children: [
|
|
16703
16962
|
image,
|
|
16704
|
-
/* @__PURE__ */
|
|
16963
|
+
/* @__PURE__ */ jsx320(Heading, { variant: "heading4", children: title }),
|
|
16705
16964
|
children
|
|
16706
16965
|
] });
|
|
16707
16966
|
};
|
|
@@ -16709,19 +16968,19 @@ ModalCallout.displayName = "ModalCallout_UI";
|
|
|
16709
16968
|
|
|
16710
16969
|
// src/components/Popover/Popover.tsx
|
|
16711
16970
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
16712
|
-
import { styled as
|
|
16971
|
+
import { styled as styled85, css as css42 } from "styled-components";
|
|
16713
16972
|
|
|
16714
16973
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
16715
|
-
import { isNotNil as
|
|
16974
|
+
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
16716
16975
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
16717
|
-
return
|
|
16976
|
+
return isNotNil34(onOpenChange) && isNotNil34(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
16718
16977
|
};
|
|
16719
16978
|
|
|
16720
16979
|
// src/components/Popover/PopoverArrow.tsx
|
|
16721
16980
|
import { PopoverArrow as RadixPopoverArrow } from "@radix-ui/react-popover";
|
|
16722
|
-
import { styled as
|
|
16723
|
-
import { jsx as
|
|
16724
|
-
var StyledPath =
|
|
16981
|
+
import { styled as styled84, css as css41, keyframes as keyframes7 } from "styled-components";
|
|
16982
|
+
import { jsx as jsx321, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
16983
|
+
var StyledPath = styled84.path`
|
|
16725
16984
|
fill: var(--wui-color-border-secondary);
|
|
16726
16985
|
`;
|
|
16727
16986
|
var circleAnimation = keyframes7`
|
|
@@ -16732,7 +16991,7 @@ var circleAnimation = keyframes7`
|
|
|
16732
16991
|
opacity: 0;
|
|
16733
16992
|
}
|
|
16734
16993
|
`;
|
|
16735
|
-
var StyledCircle =
|
|
16994
|
+
var StyledCircle = styled84.circle`
|
|
16736
16995
|
stroke: var(--wui-color-border-active);
|
|
16737
16996
|
animation-duration: 2s;
|
|
16738
16997
|
animation-iteration-count: infinite;
|
|
@@ -16759,7 +17018,7 @@ var StyledCircle = styled82.circle`
|
|
|
16759
17018
|
}
|
|
16760
17019
|
`;
|
|
16761
17020
|
var PopoverArrow = ({ isAnimated }) => {
|
|
16762
|
-
return /* @__PURE__ */
|
|
17021
|
+
return /* @__PURE__ */ jsx321(RadixPopoverArrow, { asChild: true, children: /* @__PURE__ */ jsxs54(
|
|
16763
17022
|
"svg",
|
|
16764
17023
|
{
|
|
16765
17024
|
fill: "none",
|
|
@@ -16768,8 +17027,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16768
17027
|
width: "48",
|
|
16769
17028
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16770
17029
|
children: [
|
|
16771
|
-
/* @__PURE__ */
|
|
16772
|
-
/* @__PURE__ */
|
|
17030
|
+
/* @__PURE__ */ jsx321(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" }),
|
|
17031
|
+
/* @__PURE__ */ jsx321(
|
|
16773
17032
|
StyledCircle,
|
|
16774
17033
|
{
|
|
16775
17034
|
$isAnimated: isAnimated,
|
|
@@ -16780,7 +17039,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16780
17039
|
strokeWidth: "4"
|
|
16781
17040
|
}
|
|
16782
17041
|
),
|
|
16783
|
-
/* @__PURE__ */
|
|
17042
|
+
/* @__PURE__ */ jsx321(
|
|
16784
17043
|
StyledCircle,
|
|
16785
17044
|
{
|
|
16786
17045
|
$isAnimated: isAnimated,
|
|
@@ -16798,8 +17057,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16798
17057
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
16799
17058
|
|
|
16800
17059
|
// src/components/Popover/Popover.tsx
|
|
16801
|
-
import { jsx as
|
|
16802
|
-
var StyledContent2 =
|
|
17060
|
+
import { jsx as jsx322, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
17061
|
+
var StyledContent2 = styled85(Content2)`
|
|
16803
17062
|
z-index: var(--wui-zindex-popover);
|
|
16804
17063
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16805
17064
|
${({ $unstyled }) => !$unstyled && css42`
|
|
@@ -16838,9 +17097,9 @@ var Popover = ({
|
|
|
16838
17097
|
"--wui-popover-max-width": maxWidth,
|
|
16839
17098
|
"--wui-popover-max-height": maxHeight
|
|
16840
17099
|
};
|
|
16841
|
-
return /* @__PURE__ */
|
|
16842
|
-
/* @__PURE__ */
|
|
16843
|
-
/* @__PURE__ */
|
|
17100
|
+
return /* @__PURE__ */ jsxs55(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
17101
|
+
/* @__PURE__ */ jsx322(Trigger2, { asChild: true, children: trigger }),
|
|
17102
|
+
/* @__PURE__ */ jsx322(Portal, { children: /* @__PURE__ */ jsxs55(
|
|
16844
17103
|
StyledContent2,
|
|
16845
17104
|
{
|
|
16846
17105
|
$colorScheme: colorScheme,
|
|
@@ -16849,17 +17108,17 @@ var Popover = ({
|
|
|
16849
17108
|
$unstyled: unstyled,
|
|
16850
17109
|
style,
|
|
16851
17110
|
children: [
|
|
16852
|
-
!hideCloseButton && /* @__PURE__ */
|
|
17111
|
+
!hideCloseButton && /* @__PURE__ */ jsx322(Close, { asChild: true, children: /* @__PURE__ */ jsx322(
|
|
16853
17112
|
IconButton,
|
|
16854
17113
|
{
|
|
16855
17114
|
"data-wui-popover-close": true,
|
|
16856
17115
|
label: "Close",
|
|
16857
17116
|
variant: "ghost",
|
|
16858
|
-
children: /* @__PURE__ */
|
|
17117
|
+
children: /* @__PURE__ */ jsx322(Icon, { type: "close" })
|
|
16859
17118
|
}
|
|
16860
17119
|
) }),
|
|
16861
|
-
withArrow ? /* @__PURE__ */
|
|
16862
|
-
/* @__PURE__ */
|
|
17120
|
+
withArrow ? /* @__PURE__ */ jsx322(PopoverArrow, { isAnimated }) : null,
|
|
17121
|
+
/* @__PURE__ */ jsx322("div", { children })
|
|
16863
17122
|
]
|
|
16864
17123
|
}
|
|
16865
17124
|
) })
|
|
@@ -16868,11 +17127,11 @@ var Popover = ({
|
|
|
16868
17127
|
Popover.displayName = "Popover_UI";
|
|
16869
17128
|
|
|
16870
17129
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
16871
|
-
import { styled as
|
|
17130
|
+
import { styled as styled86 } from "styled-components";
|
|
16872
17131
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
16873
|
-
import { isNotNil as
|
|
16874
|
-
import { jsx as
|
|
16875
|
-
var ProgressBarWrapper =
|
|
17132
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
17133
|
+
import { jsx as jsx323, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
17134
|
+
var ProgressBarWrapper = styled86.div`
|
|
16876
17135
|
--progress-bar-height: 8px;
|
|
16877
17136
|
|
|
16878
17137
|
display: flex;
|
|
@@ -16886,7 +17145,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
16886
17145
|
const progressPercentage = progress / max * 100;
|
|
16887
17146
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
16888
17147
|
};
|
|
16889
|
-
var ProgressBarLabel =
|
|
17148
|
+
var ProgressBarLabel = styled86.div`
|
|
16890
17149
|
display: flex;
|
|
16891
17150
|
line-height: var(--wui-typography-label-3-line-height);
|
|
16892
17151
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -16894,7 +17153,7 @@ var ProgressBarLabel = styled84.div`
|
|
|
16894
17153
|
color: var(--wui-color-text-secondary);
|
|
16895
17154
|
flex-shrink: 0;
|
|
16896
17155
|
`;
|
|
16897
|
-
var StyledProgressIndicator =
|
|
17156
|
+
var StyledProgressIndicator = styled86(ProgressIndicator)`
|
|
16898
17157
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
16899
17158
|
background-color: var(--wui-color-bg-fill);
|
|
16900
17159
|
width: 100%;
|
|
@@ -16904,7 +17163,7 @@ var StyledProgressIndicator = styled84(ProgressIndicator)`
|
|
|
16904
17163
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
16905
17164
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
16906
17165
|
`;
|
|
16907
|
-
var StyledProgressBar =
|
|
17166
|
+
var StyledProgressBar = styled86(ProgressRoot)`
|
|
16908
17167
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
16909
17168
|
position: relative;
|
|
16910
17169
|
overflow: hidden;
|
|
@@ -16925,16 +17184,16 @@ var ProgressBar = ({
|
|
|
16925
17184
|
colorScheme = "inherit",
|
|
16926
17185
|
...props
|
|
16927
17186
|
}) => {
|
|
16928
|
-
return /* @__PURE__ */
|
|
16929
|
-
|
|
16930
|
-
/* @__PURE__ */
|
|
17187
|
+
return /* @__PURE__ */ jsxs56(ProgressBarWrapper, { children: [
|
|
17188
|
+
isNotNil35(labelLeft) ? /* @__PURE__ */ jsx323(ProgressBarLabel, { children: labelLeft }) : null,
|
|
17189
|
+
/* @__PURE__ */ jsx323(
|
|
16931
17190
|
StyledProgressBar,
|
|
16932
17191
|
{
|
|
16933
17192
|
$colorScheme: colorScheme,
|
|
16934
17193
|
max,
|
|
16935
17194
|
value: progress,
|
|
16936
17195
|
...props,
|
|
16937
|
-
children: /* @__PURE__ */
|
|
17196
|
+
children: /* @__PURE__ */ jsx323(
|
|
16938
17197
|
StyledProgressIndicator,
|
|
16939
17198
|
{
|
|
16940
17199
|
$colorScheme: colorScheme,
|
|
@@ -16944,7 +17203,7 @@ var ProgressBar = ({
|
|
|
16944
17203
|
)
|
|
16945
17204
|
}
|
|
16946
17205
|
),
|
|
16947
|
-
|
|
17206
|
+
isNotNil35(labelRight) ? /* @__PURE__ */ jsx323(ProgressBarLabel, { children: labelRight }) : null
|
|
16948
17207
|
] });
|
|
16949
17208
|
};
|
|
16950
17209
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
@@ -16952,8 +17211,8 @@ ProgressBar.displayName = "ProgressBar_UI";
|
|
|
16952
17211
|
// src/components/Radio/Radio.tsx
|
|
16953
17212
|
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
16954
17213
|
import { forwardRef as forwardRef27, useId as useId5 } from "react";
|
|
16955
|
-
import { styled as
|
|
16956
|
-
import { jsx as
|
|
17214
|
+
import { styled as styled87, css as css43 } from "styled-components";
|
|
17215
|
+
import { jsx as jsx324, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
16957
17216
|
var sizeSmall2 = css43`
|
|
16958
17217
|
--wui-radio-size: 14px;
|
|
16959
17218
|
--wui-radio-icon-size: 7px;
|
|
@@ -16975,7 +17234,7 @@ var getSizeCss3 = (size) => {
|
|
|
16975
17234
|
}
|
|
16976
17235
|
return sizeMedium2;
|
|
16977
17236
|
};
|
|
16978
|
-
var StyledRadioWrapper =
|
|
17237
|
+
var StyledRadioWrapper = styled87.div`
|
|
16979
17238
|
--wui-radio-background-color: var(--wui-color-bg-surface);
|
|
16980
17239
|
--wui-radio-border-color: var(--wui-color-border-secondary);
|
|
16981
17240
|
--wui-radio-icon-color: transparent;
|
|
@@ -17009,7 +17268,7 @@ var StyledRadioWrapper = styled85.div`
|
|
|
17009
17268
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
17010
17269
|
user-select: none;
|
|
17011
17270
|
`;
|
|
17012
|
-
var StyledRadioInput =
|
|
17271
|
+
var StyledRadioInput = styled87.div`
|
|
17013
17272
|
${({ $size }) => getSizeCss3($size)}
|
|
17014
17273
|
width: var(--wui-radio-size);
|
|
17015
17274
|
height: var(--wui-radio-size);
|
|
@@ -17035,7 +17294,7 @@ var StyledRadioInput = styled85.div`
|
|
|
17035
17294
|
transform: translate(-50%, -50%);
|
|
17036
17295
|
}
|
|
17037
17296
|
`;
|
|
17038
|
-
var StyledHiddenRadioInput =
|
|
17297
|
+
var StyledHiddenRadioInput = styled87.input`
|
|
17039
17298
|
${visuallyHiddenStyle}
|
|
17040
17299
|
`;
|
|
17041
17300
|
var Radio = forwardRef27(
|
|
@@ -17062,14 +17321,14 @@ var Radio = forwardRef27(
|
|
|
17062
17321
|
const radioName = name ?? contextName;
|
|
17063
17322
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17064
17323
|
const isChecked = isNotUndefined14(value) && isNotUndefined14(contextValue) ? contextValue === value : checked;
|
|
17065
|
-
return /* @__PURE__ */
|
|
17324
|
+
return /* @__PURE__ */ jsxs57(
|
|
17066
17325
|
StyledRadioWrapper,
|
|
17067
17326
|
{
|
|
17068
17327
|
$disabled: disabled,
|
|
17069
17328
|
$hideLabel: hideLabel,
|
|
17070
17329
|
"aria-invalid": props["aria-invalid"],
|
|
17071
17330
|
children: [
|
|
17072
|
-
/* @__PURE__ */
|
|
17331
|
+
/* @__PURE__ */ jsx324(
|
|
17073
17332
|
StyledHiddenRadioInput,
|
|
17074
17333
|
{
|
|
17075
17334
|
...props,
|
|
@@ -17084,10 +17343,10 @@ var Radio = forwardRef27(
|
|
|
17084
17343
|
value
|
|
17085
17344
|
}
|
|
17086
17345
|
),
|
|
17087
|
-
/* @__PURE__ */
|
|
17346
|
+
/* @__PURE__ */ jsx324(
|
|
17088
17347
|
FormControlLabel,
|
|
17089
17348
|
{
|
|
17090
|
-
controlSlot: /* @__PURE__ */
|
|
17349
|
+
controlSlot: /* @__PURE__ */ jsx324(StyledRadioInput, { $size: size }),
|
|
17091
17350
|
description,
|
|
17092
17351
|
disabled,
|
|
17093
17352
|
hideLabel,
|
|
@@ -17107,9 +17366,9 @@ import { forwardRef as forwardRef29 } from "react";
|
|
|
17107
17366
|
|
|
17108
17367
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
17109
17368
|
import { forwardRef as forwardRef28, useId as useId6 } from "react";
|
|
17110
|
-
import { styled as
|
|
17369
|
+
import { styled as styled88, css as css44 } from "styled-components";
|
|
17111
17370
|
import { isNonEmptyString as isNonEmptyString8, isNotUndefined as isNotUndefined15 } from "@wistia/type-guards";
|
|
17112
|
-
import { jsx as
|
|
17371
|
+
import { jsx as jsx325, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17113
17372
|
var checkedStyles = css44`
|
|
17114
17373
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
17115
17374
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
@@ -17159,7 +17418,7 @@ var imageCoverStyles = css44`
|
|
|
17159
17418
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
17160
17419
|
}
|
|
17161
17420
|
`;
|
|
17162
|
-
var StyledCard2 =
|
|
17421
|
+
var StyledCard2 = styled88.label`
|
|
17163
17422
|
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
17164
17423
|
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
17165
17424
|
--wui-radio-card-cursor: pointer;
|
|
@@ -17213,7 +17472,7 @@ var StyledCard2 = styled86.label`
|
|
|
17213
17472
|
}
|
|
17214
17473
|
}
|
|
17215
17474
|
`;
|
|
17216
|
-
var StyledHiddenInput =
|
|
17475
|
+
var StyledHiddenInput = styled88.input`
|
|
17217
17476
|
${visuallyHiddenStyle}
|
|
17218
17477
|
`;
|
|
17219
17478
|
var RadioCardRoot = forwardRef28(
|
|
@@ -17238,14 +17497,14 @@ var RadioCardRoot = forwardRef28(
|
|
|
17238
17497
|
const radioName = name ?? contextName;
|
|
17239
17498
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17240
17499
|
const isChecked = isNotUndefined15(value) && isNotUndefined15(contextValue) ? contextValue === value : checked;
|
|
17241
|
-
return /* @__PURE__ */
|
|
17500
|
+
return /* @__PURE__ */ jsxs58(
|
|
17242
17501
|
StyledCard2,
|
|
17243
17502
|
{
|
|
17244
17503
|
$aspectRatio: aspectRatio,
|
|
17245
17504
|
$padding: padding,
|
|
17246
17505
|
htmlFor: computedId,
|
|
17247
17506
|
children: [
|
|
17248
|
-
/* @__PURE__ */
|
|
17507
|
+
/* @__PURE__ */ jsx325(
|
|
17249
17508
|
StyledHiddenInput,
|
|
17250
17509
|
{
|
|
17251
17510
|
...props,
|
|
@@ -17268,12 +17527,12 @@ var RadioCardRoot = forwardRef28(
|
|
|
17268
17527
|
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
17269
17528
|
|
|
17270
17529
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17271
|
-
import { styled as
|
|
17272
|
-
import { isNotNil as
|
|
17530
|
+
import { styled as styled90 } from "styled-components";
|
|
17531
|
+
import { isNotNil as isNotNil36 } from "@wistia/type-guards";
|
|
17273
17532
|
|
|
17274
17533
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
17275
|
-
import { styled as
|
|
17276
|
-
var RadioCardIndicator =
|
|
17534
|
+
import { styled as styled89 } from "styled-components";
|
|
17535
|
+
var RadioCardIndicator = styled89.div`
|
|
17277
17536
|
--wui-radio-card-indicator-size: 14px;
|
|
17278
17537
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
17279
17538
|
--wui-radio-card-indicator-fill-color: var(--wui-color-bg-fill);
|
|
@@ -17322,16 +17581,16 @@ var RadioCardIndicator = styled87.div`
|
|
|
17322
17581
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
17323
17582
|
|
|
17324
17583
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17325
|
-
import { jsx as
|
|
17326
|
-
var StyledCardContent =
|
|
17584
|
+
import { jsx as jsx326, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17585
|
+
var StyledCardContent = styled90.div`
|
|
17327
17586
|
display: grid;
|
|
17328
17587
|
grid-auto-flow: column;
|
|
17329
17588
|
gap: var(--wui-space-02);
|
|
17330
17589
|
`;
|
|
17331
|
-
var StyledCardIcon =
|
|
17590
|
+
var StyledCardIcon = styled90.div`
|
|
17332
17591
|
display: contents;
|
|
17333
17592
|
`;
|
|
17334
|
-
var StyledIndicatorContainer =
|
|
17593
|
+
var StyledIndicatorContainer = styled90.div`
|
|
17335
17594
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
17336
17595
|
display: flex;
|
|
17337
17596
|
align-items: center;
|
|
@@ -17342,18 +17601,18 @@ var RadioCardDefaultLayout = ({
|
|
|
17342
17601
|
description,
|
|
17343
17602
|
showIndicator = true
|
|
17344
17603
|
}) => {
|
|
17345
|
-
return /* @__PURE__ */
|
|
17346
|
-
showIndicator ? /* @__PURE__ */
|
|
17347
|
-
/* @__PURE__ */
|
|
17348
|
-
|
|
17349
|
-
/* @__PURE__ */
|
|
17604
|
+
return /* @__PURE__ */ jsxs59(StyledCardContent, { children: [
|
|
17605
|
+
showIndicator ? /* @__PURE__ */ jsx326(StyledIndicatorContainer, { $hasIcon: isNotNil36(icon), children: /* @__PURE__ */ jsx326(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
17606
|
+
/* @__PURE__ */ jsxs59(Stack, { gap: "space-02", children: [
|
|
17607
|
+
isNotNil36(icon) && /* @__PURE__ */ jsx326(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
17608
|
+
/* @__PURE__ */ jsxs59(
|
|
17350
17609
|
Stack,
|
|
17351
17610
|
{
|
|
17352
17611
|
gap: "space-01",
|
|
17353
|
-
style:
|
|
17612
|
+
style: isNotNil36(icon) ? { paddingLeft: 2 } : void 0,
|
|
17354
17613
|
children: [
|
|
17355
|
-
|
|
17356
|
-
|
|
17614
|
+
isNotNil36(label) && /* @__PURE__ */ jsx326(Text, { variant: "label3", children: /* @__PURE__ */ jsx326("strong", { children: label }) }),
|
|
17615
|
+
isNotNil36(description) && /* @__PURE__ */ jsx326(
|
|
17357
17616
|
Text,
|
|
17358
17617
|
{
|
|
17359
17618
|
prominence: "secondary",
|
|
@@ -17370,22 +17629,22 @@ var RadioCardDefaultLayout = ({
|
|
|
17370
17629
|
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
17371
17630
|
|
|
17372
17631
|
// src/components/RadioCard/RadioCardChildrenContainer.tsx
|
|
17373
|
-
import { styled as
|
|
17374
|
-
var RadioCardChildrenContainer =
|
|
17632
|
+
import { styled as styled91 } from "styled-components";
|
|
17633
|
+
var RadioCardChildrenContainer = styled91.div`
|
|
17375
17634
|
flex: 1 1 auto;
|
|
17376
17635
|
`;
|
|
17377
17636
|
|
|
17378
17637
|
// src/components/RadioCard/RadioCard.tsx
|
|
17379
|
-
import { jsx as
|
|
17638
|
+
import { jsx as jsx327 } from "react/jsx-runtime";
|
|
17380
17639
|
var RadioCard = forwardRef29(
|
|
17381
17640
|
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
17382
|
-
return /* @__PURE__ */
|
|
17641
|
+
return /* @__PURE__ */ jsx327(
|
|
17383
17642
|
RadioCardRoot,
|
|
17384
17643
|
{
|
|
17385
17644
|
ref,
|
|
17386
17645
|
padding: children != null ? "space-00" : "space-04",
|
|
17387
17646
|
...rootProps,
|
|
17388
|
-
children: children != null ? /* @__PURE__ */
|
|
17647
|
+
children: children != null ? /* @__PURE__ */ jsx327(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ jsx327(
|
|
17389
17648
|
RadioCardDefaultLayout,
|
|
17390
17649
|
{
|
|
17391
17650
|
description,
|
|
@@ -17402,17 +17661,17 @@ RadioCard.displayName = "RadioCard_UI";
|
|
|
17402
17661
|
|
|
17403
17662
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
17404
17663
|
import { forwardRef as forwardRef30 } from "react";
|
|
17405
|
-
import { jsx as
|
|
17664
|
+
import { jsx as jsx328 } from "react/jsx-runtime";
|
|
17406
17665
|
var RadioCardImage = forwardRef30(
|
|
17407
17666
|
({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
|
|
17408
|
-
return /* @__PURE__ */
|
|
17667
|
+
return /* @__PURE__ */ jsx328(
|
|
17409
17668
|
RadioCardRoot,
|
|
17410
17669
|
{
|
|
17411
17670
|
ref,
|
|
17412
17671
|
...rootProps,
|
|
17413
17672
|
aspectRatio,
|
|
17414
17673
|
padding,
|
|
17415
|
-
children: /* @__PURE__ */
|
|
17674
|
+
children: /* @__PURE__ */ jsx328(
|
|
17416
17675
|
Image,
|
|
17417
17676
|
{
|
|
17418
17677
|
alt: label,
|
|
@@ -17429,50 +17688,50 @@ var RadioCardImage = forwardRef30(
|
|
|
17429
17688
|
RadioCardImage.displayName = "RadioCardImage_UI";
|
|
17430
17689
|
|
|
17431
17690
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
17432
|
-
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as
|
|
17433
|
-
import { styled as
|
|
17691
|
+
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as useEffect22, useMemo as useMemo16, useRef as useRef22, useState as useState25 } from "react";
|
|
17692
|
+
import { styled as styled92 } from "styled-components";
|
|
17434
17693
|
import { throttle } from "throttle-debounce";
|
|
17435
|
-
import { jsx as
|
|
17694
|
+
import { jsx as jsx329, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17436
17695
|
var SHADOW_SIZE_PX = 8;
|
|
17437
|
-
var Container10 =
|
|
17696
|
+
var Container10 = styled92.div`
|
|
17438
17697
|
overflow: hidden;
|
|
17439
17698
|
position: relative;
|
|
17440
17699
|
flex: 1 1 auto;
|
|
17441
17700
|
`;
|
|
17442
|
-
var ScrollContainer =
|
|
17701
|
+
var ScrollContainer = styled92.div`
|
|
17443
17702
|
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
17444
17703
|
height: 100%;
|
|
17445
17704
|
width: 100%;
|
|
17446
17705
|
`;
|
|
17447
|
-
var Shadow =
|
|
17706
|
+
var Shadow = styled92.div`
|
|
17448
17707
|
pointer-events: none;
|
|
17449
17708
|
position: absolute;
|
|
17450
17709
|
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
17451
17710
|
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
17452
17711
|
z-index: 1;
|
|
17453
17712
|
`;
|
|
17454
|
-
var ShadowAtTop =
|
|
17713
|
+
var ShadowAtTop = styled92(Shadow)`
|
|
17455
17714
|
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
17456
17715
|
height: 0;
|
|
17457
17716
|
left: 0;
|
|
17458
17717
|
right: 0;
|
|
17459
17718
|
top: 0;
|
|
17460
17719
|
`;
|
|
17461
|
-
var ShadowAtBottom =
|
|
17720
|
+
var ShadowAtBottom = styled92(Shadow)`
|
|
17462
17721
|
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
17463
17722
|
bottom: 0;
|
|
17464
17723
|
height: 0;
|
|
17465
17724
|
left: 0;
|
|
17466
17725
|
right: 0;
|
|
17467
17726
|
`;
|
|
17468
|
-
var ShadowAtLeft =
|
|
17727
|
+
var ShadowAtLeft = styled92(Shadow)`
|
|
17469
17728
|
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
17470
17729
|
bottom: 0;
|
|
17471
17730
|
left: 0;
|
|
17472
17731
|
top: 0;
|
|
17473
17732
|
width: 0;
|
|
17474
17733
|
`;
|
|
17475
|
-
var ShadowAtRight =
|
|
17734
|
+
var ShadowAtRight = styled92(Shadow)`
|
|
17476
17735
|
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
17477
17736
|
bottom: 0;
|
|
17478
17737
|
right: 0;
|
|
@@ -17482,7 +17741,7 @@ var ShadowAtRight = styled90(Shadow)`
|
|
|
17482
17741
|
var ScrollArea = forwardRef31(
|
|
17483
17742
|
({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
|
|
17484
17743
|
const scrollContainerRefInternal = useRef22(null);
|
|
17485
|
-
const [shadowState, setShadowState] =
|
|
17744
|
+
const [shadowState, setShadowState] = useState25({
|
|
17486
17745
|
canScrollUp: false,
|
|
17487
17746
|
canScrollLeft: false,
|
|
17488
17747
|
canScrollDown: false,
|
|
@@ -17501,7 +17760,7 @@ var ScrollArea = forwardRef31(
|
|
|
17501
17760
|
canScrollRight: scrollContainer.scrollLeft + scrollContainer.clientWidth < scrollContainer.scrollWidth
|
|
17502
17761
|
});
|
|
17503
17762
|
}, []);
|
|
17504
|
-
const throttledUpdateShadows =
|
|
17763
|
+
const throttledUpdateShadows = useMemo16(() => throttle(100, updateShadows), [updateShadows]);
|
|
17505
17764
|
const onScrollScrollContainer = useCallback18(
|
|
17506
17765
|
(event) => {
|
|
17507
17766
|
onScroll?.(event);
|
|
@@ -17509,15 +17768,15 @@ var ScrollArea = forwardRef31(
|
|
|
17509
17768
|
},
|
|
17510
17769
|
[onScroll, throttledUpdateShadows]
|
|
17511
17770
|
);
|
|
17512
|
-
|
|
17771
|
+
useEffect22(() => {
|
|
17513
17772
|
updateShadows();
|
|
17514
17773
|
}, [updateShadows]);
|
|
17515
|
-
return /* @__PURE__ */
|
|
17516
|
-
/* @__PURE__ */
|
|
17517
|
-
/* @__PURE__ */
|
|
17518
|
-
/* @__PURE__ */
|
|
17519
|
-
/* @__PURE__ */
|
|
17520
|
-
/* @__PURE__ */
|
|
17774
|
+
return /* @__PURE__ */ jsxs60(Container10, { style, children: [
|
|
17775
|
+
/* @__PURE__ */ jsx329(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
17776
|
+
/* @__PURE__ */ jsx329(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
17777
|
+
/* @__PURE__ */ jsx329(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
17778
|
+
/* @__PURE__ */ jsx329(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
17779
|
+
/* @__PURE__ */ jsx329(
|
|
17521
17780
|
ScrollContainer,
|
|
17522
17781
|
{
|
|
17523
17782
|
ref: scrollContainerRef,
|
|
@@ -17534,19 +17793,19 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
17534
17793
|
|
|
17535
17794
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17536
17795
|
import { forwardRef as forwardRef32 } from "react";
|
|
17537
|
-
import { styled as
|
|
17796
|
+
import { styled as styled94, css as css46 } from "styled-components";
|
|
17538
17797
|
import { Root as ToggleGroupRoot2 } from "@radix-ui/react-toggle-group";
|
|
17539
|
-
import { isNil as
|
|
17798
|
+
import { isNil as isNil19 } from "@wistia/type-guards";
|
|
17540
17799
|
|
|
17541
17800
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
17542
|
-
import { createContext as createContext9, useContext as useContext15, useMemo as
|
|
17543
|
-
import { jsx as
|
|
17801
|
+
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo17, useState as useState26 } from "react";
|
|
17802
|
+
import { jsx as jsx330 } from "react/jsx-runtime";
|
|
17544
17803
|
var SelectedItemStyleContext = createContext9(null);
|
|
17545
17804
|
var SelectedItemStyleProvider = ({
|
|
17546
17805
|
children
|
|
17547
17806
|
}) => {
|
|
17548
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] =
|
|
17549
|
-
const selectedItemIndicatorStyle =
|
|
17807
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = useState26(null);
|
|
17808
|
+
const selectedItemIndicatorStyle = useMemo17(
|
|
17550
17809
|
() => selectedItemMeasurements != null ? {
|
|
17551
17810
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
17552
17811
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
|
|
@@ -17554,14 +17813,14 @@ var SelectedItemStyleProvider = ({
|
|
|
17554
17813
|
} : void 0,
|
|
17555
17814
|
[selectedItemMeasurements]
|
|
17556
17815
|
);
|
|
17557
|
-
const contextValue =
|
|
17816
|
+
const contextValue = useMemo17(
|
|
17558
17817
|
() => ({
|
|
17559
17818
|
setSelectedItemMeasurements,
|
|
17560
17819
|
selectedItemIndicatorStyle
|
|
17561
17820
|
}),
|
|
17562
17821
|
[selectedItemIndicatorStyle]
|
|
17563
17822
|
);
|
|
17564
|
-
return /* @__PURE__ */
|
|
17823
|
+
return /* @__PURE__ */ jsx330(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
17565
17824
|
};
|
|
17566
17825
|
var useSelectedItemStyle = () => {
|
|
17567
17826
|
const context = useContext15(SelectedItemStyleContext);
|
|
@@ -17572,7 +17831,7 @@ var useSelectedItemStyle = () => {
|
|
|
17572
17831
|
};
|
|
17573
17832
|
|
|
17574
17833
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17575
|
-
import { styled as
|
|
17834
|
+
import { styled as styled93, css as css45 } from "styled-components";
|
|
17576
17835
|
import { isUndefined as isUndefined5 } from "@wistia/type-guards";
|
|
17577
17836
|
|
|
17578
17837
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
@@ -17588,13 +17847,13 @@ var useSegmentedControlValue = () => {
|
|
|
17588
17847
|
};
|
|
17589
17848
|
|
|
17590
17849
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17591
|
-
import { jsx as
|
|
17850
|
+
import { jsx as jsx331 } from "react/jsx-runtime";
|
|
17592
17851
|
var selectedItemIndicatorStyles = css45`
|
|
17593
17852
|
background-color: var(--wui-color-bg-fill-white);
|
|
17594
17853
|
border-radius: var(--wui-border-radius-rounded);
|
|
17595
17854
|
box-shadow: var(--wui-elevation-01);
|
|
17596
17855
|
`;
|
|
17597
|
-
var SelectedItemIndicatorDiv =
|
|
17856
|
+
var SelectedItemIndicatorDiv = styled93.div`
|
|
17598
17857
|
${selectedItemIndicatorStyles}
|
|
17599
17858
|
left: 0;
|
|
17600
17859
|
position: absolute;
|
|
@@ -17610,7 +17869,7 @@ var SelectedItemIndicator = () => {
|
|
|
17610
17869
|
if (!selectedValue || isUndefined5(selectedItemIndicatorStyle)) {
|
|
17611
17870
|
return null;
|
|
17612
17871
|
}
|
|
17613
|
-
return /* @__PURE__ */
|
|
17872
|
+
return /* @__PURE__ */ jsx331(
|
|
17614
17873
|
SelectedItemIndicatorDiv,
|
|
17615
17874
|
{
|
|
17616
17875
|
"data-wui-selected-item-indicator": true,
|
|
@@ -17620,10 +17879,10 @@ var SelectedItemIndicator = () => {
|
|
|
17620
17879
|
};
|
|
17621
17880
|
|
|
17622
17881
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17623
|
-
import { jsx as
|
|
17882
|
+
import { jsx as jsx332, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
17624
17883
|
var segmentedControlStyles = css46`
|
|
17625
17884
|
${({ $colorScheme }) => $colorScheme && getColorScheme($colorScheme)};
|
|
17626
|
-
|
|
17885
|
+
${({ $colorScheme }) => $colorScheme !== "nav" && `--wui-color-text-selected: var(--wui-color-text-link);`}
|
|
17627
17886
|
|
|
17628
17887
|
display: inline-flex;
|
|
17629
17888
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -17635,7 +17894,7 @@ var segmentedControlStyles = css46`
|
|
|
17635
17894
|
position: relative;
|
|
17636
17895
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
17637
17896
|
`;
|
|
17638
|
-
var StyledSegmentedControl =
|
|
17897
|
+
var StyledSegmentedControl = styled94(ToggleGroupRoot2)`
|
|
17639
17898
|
${segmentedControlStyles}
|
|
17640
17899
|
`;
|
|
17641
17900
|
var SegmentedControl = forwardRef32(
|
|
@@ -17648,10 +17907,10 @@ var SegmentedControl = forwardRef32(
|
|
|
17648
17907
|
onSelectedValueChange,
|
|
17649
17908
|
...props
|
|
17650
17909
|
}, ref) => {
|
|
17651
|
-
if (
|
|
17910
|
+
if (isNil19(children)) {
|
|
17652
17911
|
return null;
|
|
17653
17912
|
}
|
|
17654
|
-
return /* @__PURE__ */
|
|
17913
|
+
return /* @__PURE__ */ jsx332(
|
|
17655
17914
|
StyledSegmentedControl,
|
|
17656
17915
|
{
|
|
17657
17916
|
ref,
|
|
@@ -17664,9 +17923,9 @@ var SegmentedControl = forwardRef32(
|
|
|
17664
17923
|
type: "single",
|
|
17665
17924
|
value: selectedValue,
|
|
17666
17925
|
...props,
|
|
17667
|
-
children: /* @__PURE__ */
|
|
17926
|
+
children: /* @__PURE__ */ jsx332(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs61(SelectedItemStyleProvider, { children: [
|
|
17668
17927
|
children,
|
|
17669
|
-
/* @__PURE__ */
|
|
17928
|
+
/* @__PURE__ */ jsx332(SelectedItemIndicator, {})
|
|
17670
17929
|
] }) })
|
|
17671
17930
|
}
|
|
17672
17931
|
);
|
|
@@ -17675,11 +17934,11 @@ var SegmentedControl = forwardRef32(
|
|
|
17675
17934
|
SegmentedControl.displayName = "SegmentedControl_UI";
|
|
17676
17935
|
|
|
17677
17936
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
17678
|
-
import { forwardRef as forwardRef33, useEffect as
|
|
17679
|
-
import { styled as
|
|
17937
|
+
import { forwardRef as forwardRef33, useEffect as useEffect23, useRef as useRef23 } from "react";
|
|
17938
|
+
import { styled as styled95, css as css47 } from "styled-components";
|
|
17680
17939
|
import { Item as ToggleGroupItem2 } from "@radix-ui/react-toggle-group";
|
|
17681
|
-
import { isNotNil as
|
|
17682
|
-
import { jsxs as
|
|
17940
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
17941
|
+
import { jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17683
17942
|
var segmentedControlItemStyles = css47`
|
|
17684
17943
|
all: unset; /* ToggleGroupItem is a button element */
|
|
17685
17944
|
align-items: center;
|
|
@@ -17748,7 +18007,7 @@ var segmentedControlItemStyles = css47`
|
|
|
17748
18007
|
}
|
|
17749
18008
|
}
|
|
17750
18009
|
`;
|
|
17751
|
-
var StyledSegmentedControlItem =
|
|
18010
|
+
var StyledSegmentedControlItem = styled95(ToggleGroupItem2)`
|
|
17752
18011
|
${segmentedControlItemStyles}
|
|
17753
18012
|
`;
|
|
17754
18013
|
var SegmentedControlItem = forwardRef33(
|
|
@@ -17764,7 +18023,7 @@ var SegmentedControlItem = forwardRef33(
|
|
|
17764
18023
|
event.preventDefault();
|
|
17765
18024
|
}
|
|
17766
18025
|
};
|
|
17767
|
-
|
|
18026
|
+
useEffect23(() => {
|
|
17768
18027
|
const buttonElem = buttonRef.current;
|
|
17769
18028
|
if (!buttonElem) {
|
|
17770
18029
|
return void 0;
|
|
@@ -17789,13 +18048,13 @@ var SegmentedControlItem = forwardRef33(
|
|
|
17789
18048
|
resizeObserver.disconnect();
|
|
17790
18049
|
};
|
|
17791
18050
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
17792
|
-
return /* @__PURE__ */
|
|
18051
|
+
return /* @__PURE__ */ jsxs62(
|
|
17793
18052
|
StyledSegmentedControlItem,
|
|
17794
18053
|
{
|
|
17795
18054
|
ref: combinedRef,
|
|
17796
18055
|
...otherProps,
|
|
17797
|
-
$hasLabel:
|
|
17798
|
-
"aria-label":
|
|
18056
|
+
$hasLabel: isNotNil37(label),
|
|
18057
|
+
"aria-label": isNotNil37(label) ? void 0 : ariaLabel,
|
|
17799
18058
|
disabled,
|
|
17800
18059
|
onClick: handleClick,
|
|
17801
18060
|
value,
|
|
@@ -17821,9 +18080,9 @@ import {
|
|
|
17821
18080
|
ScrollDownButton
|
|
17822
18081
|
} from "@radix-ui/react-select";
|
|
17823
18082
|
import { forwardRef as forwardRef34 } from "react";
|
|
17824
|
-
import { styled as
|
|
17825
|
-
import { jsx as
|
|
17826
|
-
var StyledTrigger2 =
|
|
18083
|
+
import { styled as styled96, css as css48 } from "styled-components";
|
|
18084
|
+
import { jsx as jsx333, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
18085
|
+
var StyledTrigger2 = styled96(Trigger3)`
|
|
17827
18086
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
17828
18087
|
${inputCss};
|
|
17829
18088
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -17869,7 +18128,7 @@ var StyledTrigger2 = styled94(Trigger3)`
|
|
|
17869
18128
|
color: var(--wui-input-placeholder);
|
|
17870
18129
|
}
|
|
17871
18130
|
`;
|
|
17872
|
-
var StyledContent3 =
|
|
18131
|
+
var StyledContent3 = styled96(Content3)`
|
|
17873
18132
|
--wui-select-content-border: var(--wui-color-border);
|
|
17874
18133
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
17875
18134
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -17896,10 +18155,10 @@ var scrollButtonStyles = css48`
|
|
|
17896
18155
|
display: flex;
|
|
17897
18156
|
justify-content: center;
|
|
17898
18157
|
`;
|
|
17899
|
-
var StyledScrollDownButton =
|
|
18158
|
+
var StyledScrollDownButton = styled96(ScrollDownButton)`
|
|
17900
18159
|
${scrollButtonStyles}
|
|
17901
18160
|
`;
|
|
17902
|
-
var StyledScrollUpButton =
|
|
18161
|
+
var StyledScrollUpButton = styled96(ScrollUpButton)`
|
|
17903
18162
|
${scrollButtonStyles}
|
|
17904
18163
|
`;
|
|
17905
18164
|
var Select = forwardRef34(
|
|
@@ -17922,8 +18181,8 @@ var Select = forwardRef34(
|
|
|
17922
18181
|
if (forceOpen) {
|
|
17923
18182
|
rootProps["open"] = true;
|
|
17924
18183
|
}
|
|
17925
|
-
return /* @__PURE__ */
|
|
17926
|
-
/* @__PURE__ */
|
|
18184
|
+
return /* @__PURE__ */ jsxs63(Root3, { ...rootProps, children: [
|
|
18185
|
+
/* @__PURE__ */ jsxs63(
|
|
17927
18186
|
StyledTrigger2,
|
|
17928
18187
|
{
|
|
17929
18188
|
ref: forwardedRef,
|
|
@@ -17931,8 +18190,8 @@ var Select = forwardRef34(
|
|
|
17931
18190
|
$fullWidth: responsiveFullWidth,
|
|
17932
18191
|
...props,
|
|
17933
18192
|
children: [
|
|
17934
|
-
/* @__PURE__ */
|
|
17935
|
-
/* @__PURE__ */
|
|
18193
|
+
/* @__PURE__ */ jsx333(Value, { placeholder }),
|
|
18194
|
+
/* @__PURE__ */ jsx333(
|
|
17936
18195
|
Icon,
|
|
17937
18196
|
{
|
|
17938
18197
|
size: "md",
|
|
@@ -17942,21 +18201,21 @@ var Select = forwardRef34(
|
|
|
17942
18201
|
]
|
|
17943
18202
|
}
|
|
17944
18203
|
),
|
|
17945
|
-
/* @__PURE__ */
|
|
18204
|
+
/* @__PURE__ */ jsx333(Portal2, { children: /* @__PURE__ */ jsxs63(
|
|
17946
18205
|
StyledContent3,
|
|
17947
18206
|
{
|
|
17948
18207
|
position: "popper",
|
|
17949
18208
|
sideOffset: 8,
|
|
17950
18209
|
children: [
|
|
17951
|
-
/* @__PURE__ */
|
|
18210
|
+
/* @__PURE__ */ jsx333(StyledScrollUpButton, { children: /* @__PURE__ */ jsx333(
|
|
17952
18211
|
Icon,
|
|
17953
18212
|
{
|
|
17954
18213
|
size: "sm",
|
|
17955
18214
|
type: "caret-up"
|
|
17956
18215
|
}
|
|
17957
18216
|
) }),
|
|
17958
|
-
/* @__PURE__ */
|
|
17959
|
-
/* @__PURE__ */
|
|
18217
|
+
/* @__PURE__ */ jsx333(Viewport, { children }),
|
|
18218
|
+
/* @__PURE__ */ jsx333(StyledScrollDownButton, { children: /* @__PURE__ */ jsx333(
|
|
17960
18219
|
Icon,
|
|
17961
18220
|
{
|
|
17962
18221
|
size: "sm",
|
|
@@ -17974,10 +18233,10 @@ Select.displayName = "Select_UI";
|
|
|
17974
18233
|
// src/components/Select/SelectOption.tsx
|
|
17975
18234
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
17976
18235
|
import { forwardRef as forwardRef35 } from "react";
|
|
17977
|
-
import { styled as
|
|
17978
|
-
import { isNotNil as
|
|
17979
|
-
import { jsx as
|
|
17980
|
-
var StyledItem =
|
|
18236
|
+
import { styled as styled97 } from "styled-components";
|
|
18237
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
18238
|
+
import { jsx as jsx334, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
18239
|
+
var StyledItem = styled97(Item)`
|
|
17981
18240
|
${getTypographicStyles("label3")}
|
|
17982
18241
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
17983
18242
|
background-color: transparent;
|
|
@@ -18005,18 +18264,18 @@ var StyledItem = styled95(Item)`
|
|
|
18005
18264
|
`;
|
|
18006
18265
|
var SelectOption = forwardRef35(
|
|
18007
18266
|
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
18008
|
-
return /* @__PURE__ */
|
|
18267
|
+
return /* @__PURE__ */ jsxs64(
|
|
18009
18268
|
StyledItem,
|
|
18010
18269
|
{
|
|
18011
18270
|
...props,
|
|
18012
18271
|
ref: forwardedRef,
|
|
18013
18272
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
18014
18273
|
children: [
|
|
18015
|
-
|
|
18274
|
+
isNotNil38(selectedDisplayValue) ? /* @__PURE__ */ jsxs64("div", { children: [
|
|
18016
18275
|
children,
|
|
18017
|
-
/* @__PURE__ */
|
|
18018
|
-
] }) : /* @__PURE__ */
|
|
18019
|
-
/* @__PURE__ */
|
|
18276
|
+
/* @__PURE__ */ jsx334("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx334(ItemText, { children: selectedDisplayValue }) })
|
|
18277
|
+
] }) : /* @__PURE__ */ jsx334(ItemText, { children }),
|
|
18278
|
+
/* @__PURE__ */ jsx334(ItemIndicator, { children: /* @__PURE__ */ jsx334(
|
|
18020
18279
|
Icon,
|
|
18021
18280
|
{
|
|
18022
18281
|
size: "md",
|
|
@@ -18032,14 +18291,14 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
18032
18291
|
|
|
18033
18292
|
// src/components/Select/SelectOptionGroup.tsx
|
|
18034
18293
|
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
18035
|
-
import { styled as
|
|
18036
|
-
import { jsx as
|
|
18037
|
-
var StyledLabel4 =
|
|
18294
|
+
import { styled as styled98 } from "styled-components";
|
|
18295
|
+
import { jsx as jsx335, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
18296
|
+
var StyledLabel4 = styled98(Label3)`
|
|
18038
18297
|
padding: var(--wui-select-option-padding);
|
|
18039
18298
|
`;
|
|
18040
18299
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
18041
|
-
return /* @__PURE__ */
|
|
18042
|
-
/* @__PURE__ */
|
|
18300
|
+
return /* @__PURE__ */ jsxs65(Group, { ...props, children: [
|
|
18301
|
+
/* @__PURE__ */ jsx335(StyledLabel4, { children: /* @__PURE__ */ jsx335(
|
|
18043
18302
|
Heading,
|
|
18044
18303
|
{
|
|
18045
18304
|
renderAs: "span",
|
|
@@ -18058,10 +18317,10 @@ import {
|
|
|
18058
18317
|
Range as RadixSliderRange,
|
|
18059
18318
|
Thumb as RadixSliderThumb
|
|
18060
18319
|
} from "@radix-ui/react-slider";
|
|
18061
|
-
import { styled as
|
|
18320
|
+
import { styled as styled99 } from "styled-components";
|
|
18062
18321
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
18063
|
-
import { jsx as
|
|
18064
|
-
var SliderContainer =
|
|
18322
|
+
import { jsx as jsx336, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
18323
|
+
var SliderContainer = styled99.div`
|
|
18065
18324
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
18066
18325
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
18067
18326
|
--wui-slider-range-color: var(--wui-color-bg-fill);
|
|
@@ -18077,7 +18336,7 @@ var SliderContainer = styled97.div`
|
|
|
18077
18336
|
pointer-events: none;
|
|
18078
18337
|
}
|
|
18079
18338
|
`;
|
|
18080
|
-
var StyledSliderRoot =
|
|
18339
|
+
var StyledSliderRoot = styled99(RadixSliderRoot)`
|
|
18081
18340
|
position: relative;
|
|
18082
18341
|
display: flex;
|
|
18083
18342
|
align-items: center;
|
|
@@ -18085,20 +18344,20 @@ var StyledSliderRoot = styled97(RadixSliderRoot)`
|
|
|
18085
18344
|
touch-action: none;
|
|
18086
18345
|
width: 100%;
|
|
18087
18346
|
`;
|
|
18088
|
-
var StyledSliderTrack =
|
|
18347
|
+
var StyledSliderTrack = styled99(RadixSliderTrack)`
|
|
18089
18348
|
background-color: var(--wui-slider-track-color);
|
|
18090
18349
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18091
18350
|
flex-grow: 1;
|
|
18092
18351
|
height: 6px;
|
|
18093
18352
|
position: relative;
|
|
18094
18353
|
`;
|
|
18095
|
-
var StyledSliderRange =
|
|
18354
|
+
var StyledSliderRange = styled99(RadixSliderRange)`
|
|
18096
18355
|
background-color: var(--wui-slider-range-color);
|
|
18097
18356
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18098
18357
|
height: 100%;
|
|
18099
18358
|
position: absolute;
|
|
18100
18359
|
`;
|
|
18101
|
-
var StyledSliderThumb =
|
|
18360
|
+
var StyledSliderThumb = styled99(RadixSliderThumb)`
|
|
18102
18361
|
background-color: var(--wui-slider-thumb-color);
|
|
18103
18362
|
border-radius: var(--wui-border-radius-rounded);
|
|
18104
18363
|
cursor: grab;
|
|
@@ -18149,12 +18408,12 @@ var Slider = ({
|
|
|
18149
18408
|
onChange(newValue);
|
|
18150
18409
|
}
|
|
18151
18410
|
};
|
|
18152
|
-
return /* @__PURE__ */
|
|
18411
|
+
return /* @__PURE__ */ jsx336(
|
|
18153
18412
|
SliderContainer,
|
|
18154
18413
|
{
|
|
18155
18414
|
...otherProps,
|
|
18156
18415
|
"data-testid": dataTestId,
|
|
18157
|
-
children: /* @__PURE__ */
|
|
18416
|
+
children: /* @__PURE__ */ jsxs66(
|
|
18158
18417
|
StyledSliderRoot,
|
|
18159
18418
|
{
|
|
18160
18419
|
"aria-label": ariaLabel,
|
|
@@ -18167,8 +18426,8 @@ var Slider = ({
|
|
|
18167
18426
|
step,
|
|
18168
18427
|
...value ? { value } : {},
|
|
18169
18428
|
children: [
|
|
18170
|
-
/* @__PURE__ */
|
|
18171
|
-
values.map((_, index) => /* @__PURE__ */
|
|
18429
|
+
/* @__PURE__ */ jsx336(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ jsx336(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
18430
|
+
values.map((_, index) => /* @__PURE__ */ jsx336(
|
|
18172
18431
|
StyledSliderThumb,
|
|
18173
18432
|
{
|
|
18174
18433
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -18184,9 +18443,9 @@ var Slider = ({
|
|
|
18184
18443
|
Slider.displayName = "Slider_UI";
|
|
18185
18444
|
|
|
18186
18445
|
// src/components/Table/Table.tsx
|
|
18187
|
-
import { styled as
|
|
18188
|
-
import { jsx as
|
|
18189
|
-
var StyledTable =
|
|
18446
|
+
import { styled as styled100, css as css49 } from "styled-components";
|
|
18447
|
+
import { jsx as jsx337 } from "react/jsx-runtime";
|
|
18448
|
+
var StyledTable = styled100.table`
|
|
18190
18449
|
width: 100%;
|
|
18191
18450
|
border-collapse: collapse;
|
|
18192
18451
|
|
|
@@ -18215,7 +18474,7 @@ var Table = ({
|
|
|
18215
18474
|
visuallyHiddenHeader = false,
|
|
18216
18475
|
...props
|
|
18217
18476
|
}) => {
|
|
18218
|
-
return /* @__PURE__ */
|
|
18477
|
+
return /* @__PURE__ */ jsx337(
|
|
18219
18478
|
StyledTable,
|
|
18220
18479
|
{
|
|
18221
18480
|
$divided: divided,
|
|
@@ -18228,37 +18487,37 @@ var Table = ({
|
|
|
18228
18487
|
};
|
|
18229
18488
|
|
|
18230
18489
|
// src/components/Table/TableBody.tsx
|
|
18231
|
-
import { styled as
|
|
18490
|
+
import { styled as styled101 } from "styled-components";
|
|
18232
18491
|
|
|
18233
18492
|
// src/components/Table/TableSectionContext.ts
|
|
18234
18493
|
import { createContext as createContext11 } from "react";
|
|
18235
18494
|
var TableSectionContext = createContext11(null);
|
|
18236
18495
|
|
|
18237
18496
|
// src/components/Table/TableBody.tsx
|
|
18238
|
-
import { jsx as
|
|
18239
|
-
var StyledTableBody =
|
|
18497
|
+
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
18498
|
+
var StyledTableBody = styled101.tbody`
|
|
18240
18499
|
width: 100%;
|
|
18241
18500
|
`;
|
|
18242
18501
|
var TableBody = ({ children, ...props }) => {
|
|
18243
|
-
return /* @__PURE__ */
|
|
18502
|
+
return /* @__PURE__ */ jsx338(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx338(StyledTableBody, { ...props, children }) });
|
|
18244
18503
|
};
|
|
18245
18504
|
|
|
18246
18505
|
// src/components/Table/TableCell.tsx
|
|
18247
18506
|
import { useContext as useContext17 } from "react";
|
|
18248
|
-
import { styled as
|
|
18249
|
-
import { jsx as
|
|
18507
|
+
import { styled as styled102, css as css50 } from "styled-components";
|
|
18508
|
+
import { jsx as jsx339 } from "react/jsx-runtime";
|
|
18250
18509
|
var sharedStyles = css50`
|
|
18251
18510
|
color: var(--wui-color-text);
|
|
18252
18511
|
padding: var(--wui-space-02);
|
|
18253
18512
|
text-align: left;
|
|
18254
18513
|
`;
|
|
18255
|
-
var StyledTh =
|
|
18514
|
+
var StyledTh = styled102.th`
|
|
18256
18515
|
${sharedStyles}
|
|
18257
18516
|
font-size: var(--wui-typography-body-4-size);
|
|
18258
18517
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
18259
18518
|
line-height: var(--wui-typography-body-4-line-height);
|
|
18260
18519
|
`;
|
|
18261
|
-
var StyledTd =
|
|
18520
|
+
var StyledTd = styled102.td`
|
|
18262
18521
|
${sharedStyles}
|
|
18263
18522
|
font-size: var(--wui-typography-body-2-size);
|
|
18264
18523
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -18267,45 +18526,45 @@ var StyledTd = styled100.td`
|
|
|
18267
18526
|
var TableCell = ({ children, ...props }) => {
|
|
18268
18527
|
const section = useContext17(TableSectionContext);
|
|
18269
18528
|
if (section === "head") {
|
|
18270
|
-
return /* @__PURE__ */
|
|
18529
|
+
return /* @__PURE__ */ jsx339(StyledTh, { ...props, children });
|
|
18271
18530
|
}
|
|
18272
|
-
return /* @__PURE__ */
|
|
18531
|
+
return /* @__PURE__ */ jsx339(StyledTd, { ...props, children });
|
|
18273
18532
|
};
|
|
18274
18533
|
|
|
18275
18534
|
// src/components/Table/TableFoot.tsx
|
|
18276
|
-
import { styled as
|
|
18277
|
-
import { jsx as
|
|
18278
|
-
var StyledTableFoot =
|
|
18535
|
+
import { styled as styled103 } from "styled-components";
|
|
18536
|
+
import { jsx as jsx340 } from "react/jsx-runtime";
|
|
18537
|
+
var StyledTableFoot = styled103.tfoot`
|
|
18279
18538
|
width: 100%;
|
|
18280
18539
|
`;
|
|
18281
18540
|
var TableFoot = ({ children, ...props }) => {
|
|
18282
|
-
return /* @__PURE__ */
|
|
18541
|
+
return /* @__PURE__ */ jsx340(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx340(StyledTableFoot, { ...props, children }) });
|
|
18283
18542
|
};
|
|
18284
18543
|
|
|
18285
18544
|
// src/components/Table/TableHead.tsx
|
|
18286
|
-
import { styled as
|
|
18287
|
-
import { jsx as
|
|
18288
|
-
var StyledThead =
|
|
18545
|
+
import { styled as styled104 } from "styled-components";
|
|
18546
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
18547
|
+
var StyledThead = styled104.thead`
|
|
18289
18548
|
width: 100%;
|
|
18290
18549
|
`;
|
|
18291
18550
|
var TableHead = ({ children, ...props }) => {
|
|
18292
|
-
return /* @__PURE__ */
|
|
18551
|
+
return /* @__PURE__ */ jsx341(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx341(StyledThead, { ...props, children }) });
|
|
18293
18552
|
};
|
|
18294
18553
|
|
|
18295
18554
|
// src/components/Table/TableRow.tsx
|
|
18296
|
-
import { styled as
|
|
18297
|
-
import { jsx as
|
|
18298
|
-
var StyledTableRow =
|
|
18555
|
+
import { styled as styled105 } from "styled-components";
|
|
18556
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
18557
|
+
var StyledTableRow = styled105.tr`
|
|
18299
18558
|
width: 100%;
|
|
18300
18559
|
`;
|
|
18301
18560
|
var TableRow = ({ children, ...props }) => {
|
|
18302
|
-
return /* @__PURE__ */
|
|
18561
|
+
return /* @__PURE__ */ jsx342(StyledTableRow, { ...props, children });
|
|
18303
18562
|
};
|
|
18304
18563
|
|
|
18305
18564
|
// src/components/Tabs/Tabs.tsx
|
|
18306
18565
|
import { Root as RadixTabsRoot } from "@radix-ui/react-tabs";
|
|
18307
|
-
import { useCallback as useCallback19, useState as
|
|
18308
|
-
import { isNotNil as
|
|
18566
|
+
import { useCallback as useCallback19, useState as useState27 } from "react";
|
|
18567
|
+
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
18309
18568
|
|
|
18310
18569
|
// src/components/Tabs/useTabsValue.tsx
|
|
18311
18570
|
import { createContext as createContext12, useContext as useContext18 } from "react";
|
|
@@ -18320,7 +18579,7 @@ var useTabsValue = () => {
|
|
|
18320
18579
|
};
|
|
18321
18580
|
|
|
18322
18581
|
// src/components/Tabs/Tabs.tsx
|
|
18323
|
-
import { jsx as
|
|
18582
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
18324
18583
|
var Tabs = ({
|
|
18325
18584
|
children,
|
|
18326
18585
|
value: valueProp,
|
|
@@ -18328,7 +18587,7 @@ var Tabs = ({
|
|
|
18328
18587
|
defaultValue,
|
|
18329
18588
|
...props
|
|
18330
18589
|
}) => {
|
|
18331
|
-
const [value, setValue] =
|
|
18590
|
+
const [value, setValue] = useState27(valueProp ?? defaultValue);
|
|
18332
18591
|
const onValueChange = useCallback19(
|
|
18333
18592
|
(newValue) => {
|
|
18334
18593
|
setValue(newValue);
|
|
@@ -18342,48 +18601,48 @@ var Tabs = ({
|
|
|
18342
18601
|
...props,
|
|
18343
18602
|
onValueChange
|
|
18344
18603
|
};
|
|
18345
|
-
if (
|
|
18604
|
+
if (isNotNil39(value)) {
|
|
18346
18605
|
rootProps.value = value;
|
|
18347
18606
|
}
|
|
18348
|
-
if (
|
|
18607
|
+
if (isNotNil39(defaultValue)) {
|
|
18349
18608
|
rootProps.defaultValue = defaultValue;
|
|
18350
18609
|
}
|
|
18351
|
-
return /* @__PURE__ */
|
|
18610
|
+
return /* @__PURE__ */ jsx343(RadixTabsRoot, { ...rootProps, children: /* @__PURE__ */ jsx343(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx343(SelectedItemStyleProvider, { children }) }) });
|
|
18352
18611
|
};
|
|
18353
18612
|
Tabs.displayName = "Tabs_UI";
|
|
18354
18613
|
|
|
18355
18614
|
// src/components/Tabs/TabsContent.tsx
|
|
18356
18615
|
import { Content as RadixTabsContent } from "@radix-ui/react-tabs";
|
|
18357
|
-
import { jsx as
|
|
18616
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
18358
18617
|
var TabsContent = ({ children, value }) => {
|
|
18359
|
-
return /* @__PURE__ */
|
|
18618
|
+
return /* @__PURE__ */ jsx344(RadixTabsContent, { value, children });
|
|
18360
18619
|
};
|
|
18361
18620
|
TabsContent.displayName = "TabsContent_UI";
|
|
18362
18621
|
|
|
18363
18622
|
// src/components/Tabs/TabsList.tsx
|
|
18364
18623
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
18365
|
-
import { styled as
|
|
18624
|
+
import { styled as styled107 } from "styled-components";
|
|
18366
18625
|
|
|
18367
18626
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18368
18627
|
import { isUndefined as isUndefined6 } from "@wistia/type-guards";
|
|
18369
18628
|
|
|
18370
18629
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
18371
|
-
import { styled as
|
|
18372
|
-
var TabsSelectedItemIndicatorDiv =
|
|
18630
|
+
import { styled as styled106 } from "styled-components";
|
|
18631
|
+
var TabsSelectedItemIndicatorDiv = styled106(SelectedItemIndicatorDiv)`
|
|
18373
18632
|
:has(button[role='tab']:focus-visible) > & {
|
|
18374
18633
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
18375
18634
|
}
|
|
18376
18635
|
`;
|
|
18377
18636
|
|
|
18378
18637
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18379
|
-
import { jsx as
|
|
18638
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
18380
18639
|
var SelectedTabIndicator = () => {
|
|
18381
18640
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
18382
18641
|
const selectedValue = useTabsValue();
|
|
18383
18642
|
if (selectedValue == null || isUndefined6(selectedItemIndicatorStyle)) {
|
|
18384
18643
|
return null;
|
|
18385
18644
|
}
|
|
18386
|
-
return /* @__PURE__ */
|
|
18645
|
+
return /* @__PURE__ */ jsx345(
|
|
18387
18646
|
TabsSelectedItemIndicatorDiv,
|
|
18388
18647
|
{
|
|
18389
18648
|
"data-wui-selected-item-indicator": true,
|
|
@@ -18393,19 +18652,19 @@ var SelectedTabIndicator = () => {
|
|
|
18393
18652
|
};
|
|
18394
18653
|
|
|
18395
18654
|
// src/components/Tabs/TabsList.tsx
|
|
18396
|
-
import { jsx as
|
|
18397
|
-
var StyledRadixTabsList =
|
|
18655
|
+
import { jsx as jsx346, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
18656
|
+
var StyledRadixTabsList = styled107(RadixTabList)`
|
|
18398
18657
|
${segmentedControlStyles}
|
|
18399
18658
|
`;
|
|
18400
18659
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
18401
|
-
return /* @__PURE__ */
|
|
18660
|
+
return /* @__PURE__ */ jsxs67(
|
|
18402
18661
|
StyledRadixTabsList,
|
|
18403
18662
|
{
|
|
18404
18663
|
$fullWidth: fullWidth,
|
|
18405
18664
|
"aria-label": props["aria-label"],
|
|
18406
18665
|
children: [
|
|
18407
18666
|
children,
|
|
18408
|
-
/* @__PURE__ */
|
|
18667
|
+
/* @__PURE__ */ jsx346(SelectedTabIndicator, {})
|
|
18409
18668
|
]
|
|
18410
18669
|
}
|
|
18411
18670
|
);
|
|
@@ -18413,13 +18672,13 @@ var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
18413
18672
|
TabsList.displayName = "TabsList_UI";
|
|
18414
18673
|
|
|
18415
18674
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18416
|
-
import { forwardRef as forwardRef36, useEffect as
|
|
18417
|
-
import { isNotNil as
|
|
18675
|
+
import { forwardRef as forwardRef36, useEffect as useEffect24, useRef as useRef24 } from "react";
|
|
18676
|
+
import { isNotNil as isNotNil40 } from "@wistia/type-guards";
|
|
18418
18677
|
|
|
18419
18678
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
18420
|
-
import { styled as
|
|
18679
|
+
import { styled as styled108 } from "styled-components";
|
|
18421
18680
|
import { Trigger as RadixTabsTrigger } from "@radix-ui/react-tabs";
|
|
18422
|
-
var StyledRadixTabsTrigger =
|
|
18681
|
+
var StyledRadixTabsTrigger = styled108(RadixTabsTrigger)`
|
|
18423
18682
|
${segmentedControlItemStyles}
|
|
18424
18683
|
|
|
18425
18684
|
&:focus-visible {
|
|
@@ -18428,14 +18687,14 @@ var StyledRadixTabsTrigger = styled106(RadixTabsTrigger)`
|
|
|
18428
18687
|
`;
|
|
18429
18688
|
|
|
18430
18689
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18431
|
-
import { jsxs as
|
|
18690
|
+
import { jsxs as jsxs68 } from "react/jsx-runtime";
|
|
18432
18691
|
var TabsTrigger = forwardRef36(
|
|
18433
18692
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
18434
18693
|
const selectedValue = useTabsValue();
|
|
18435
18694
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
18436
18695
|
const buttonRef = useRef24(null);
|
|
18437
18696
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
18438
|
-
|
|
18697
|
+
useEffect24(() => {
|
|
18439
18698
|
const buttonElem = buttonRef.current;
|
|
18440
18699
|
if (!buttonElem) {
|
|
18441
18700
|
return void 0;
|
|
@@ -18460,13 +18719,13 @@ var TabsTrigger = forwardRef36(
|
|
|
18460
18719
|
resizeObserver.disconnect();
|
|
18461
18720
|
};
|
|
18462
18721
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
18463
|
-
return /* @__PURE__ */
|
|
18722
|
+
return /* @__PURE__ */ jsxs68(
|
|
18464
18723
|
StyledRadixTabsTrigger,
|
|
18465
18724
|
{
|
|
18466
18725
|
...otherProps,
|
|
18467
18726
|
ref: combinedRef,
|
|
18468
|
-
$hasLabel:
|
|
18469
|
-
"aria-label":
|
|
18727
|
+
$hasLabel: isNotNil40(label),
|
|
18728
|
+
"aria-label": isNotNil40(label) ? void 0 : ariaLabel,
|
|
18470
18729
|
disabled,
|
|
18471
18730
|
value,
|
|
18472
18731
|
children: [
|
|
@@ -18480,10 +18739,10 @@ var TabsTrigger = forwardRef36(
|
|
|
18480
18739
|
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
18481
18740
|
|
|
18482
18741
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
18483
|
-
import { styled as
|
|
18484
|
-
import { isNotNil as
|
|
18485
|
-
import { jsx as
|
|
18486
|
-
var StyledThumbnailBadge =
|
|
18742
|
+
import { styled as styled109 } from "styled-components";
|
|
18743
|
+
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
18744
|
+
import { jsx as jsx347, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
18745
|
+
var StyledThumbnailBadge = styled109.div`
|
|
18487
18746
|
align-items: center;
|
|
18488
18747
|
background-color: rgb(0 0 0 / 50%);
|
|
18489
18748
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -18509,19 +18768,19 @@ var StyledThumbnailBadge = styled107.div`
|
|
|
18509
18768
|
}
|
|
18510
18769
|
`;
|
|
18511
18770
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
18512
|
-
return /* @__PURE__ */
|
|
18513
|
-
|
|
18514
|
-
/* @__PURE__ */
|
|
18771
|
+
return /* @__PURE__ */ jsxs69(StyledThumbnailBadge, { ...props, children: [
|
|
18772
|
+
isNotNil41(icon) && icon,
|
|
18773
|
+
/* @__PURE__ */ jsx347("span", { children: label })
|
|
18515
18774
|
] });
|
|
18516
18775
|
};
|
|
18517
18776
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
18518
18777
|
|
|
18519
18778
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18520
|
-
import { forwardRef as forwardRef37, useState as
|
|
18521
|
-
import { styled as
|
|
18779
|
+
import { forwardRef as forwardRef37, useState as useState28, useRef as useRef25, useCallback as useCallback20, useMemo as useMemo18 } from "react";
|
|
18780
|
+
import { styled as styled111 } from "styled-components";
|
|
18522
18781
|
import {
|
|
18523
|
-
isNil as
|
|
18524
|
-
isNotNil as
|
|
18782
|
+
isNil as isNil20,
|
|
18783
|
+
isNotNil as isNotNil44,
|
|
18525
18784
|
isUndefined as isUndefined7,
|
|
18526
18785
|
isEmptyString as isEmptyString2,
|
|
18527
18786
|
isString as isString4,
|
|
@@ -18529,7 +18788,7 @@ import {
|
|
|
18529
18788
|
} from "@wistia/type-guards";
|
|
18530
18789
|
|
|
18531
18790
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
18532
|
-
import { isNotNil as
|
|
18791
|
+
import { isNotNil as isNotNil42 } from "@wistia/type-guards";
|
|
18533
18792
|
import { css as css51 } from "styled-components";
|
|
18534
18793
|
var gradients = {
|
|
18535
18794
|
defaultDarkOne: css51`
|
|
@@ -18657,14 +18916,14 @@ var gradients = {
|
|
|
18657
18916
|
};
|
|
18658
18917
|
var gradientMap = Object.keys(gradients);
|
|
18659
18918
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
18660
|
-
return
|
|
18919
|
+
return isNotNil42(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
18661
18920
|
};
|
|
18662
18921
|
|
|
18663
18922
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
18664
|
-
import { styled as
|
|
18665
|
-
import { isNotNil as
|
|
18666
|
-
import { jsx as
|
|
18667
|
-
var ScrubLine =
|
|
18923
|
+
import { styled as styled110 } from "styled-components";
|
|
18924
|
+
import { isNotNil as isNotNil43 } from "@wistia/type-guards";
|
|
18925
|
+
import { jsx as jsx348, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
18926
|
+
var ScrubLine = styled110.div`
|
|
18668
18927
|
position: absolute;
|
|
18669
18928
|
top: 0;
|
|
18670
18929
|
height: 100%;
|
|
@@ -18756,8 +19015,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18756
19015
|
);
|
|
18757
19016
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
18758
19017
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
18759
|
-
const showScrubLine =
|
|
18760
|
-
const scrubLinePosition =
|
|
19018
|
+
const showScrubLine = isNotNil43(cursorPosition);
|
|
19019
|
+
const scrubLinePosition = isNotNil43(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
18761
19020
|
const viewerStyles = {
|
|
18762
19021
|
position: "relative",
|
|
18763
19022
|
overflow: "hidden",
|
|
@@ -18775,14 +19034,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18775
19034
|
backgroundPosition,
|
|
18776
19035
|
backgroundSize
|
|
18777
19036
|
};
|
|
18778
|
-
return /* @__PURE__ */
|
|
19037
|
+
return /* @__PURE__ */ jsxs70(
|
|
18779
19038
|
"div",
|
|
18780
19039
|
{
|
|
18781
19040
|
...props,
|
|
18782
19041
|
style: viewerStyles,
|
|
18783
19042
|
children: [
|
|
18784
|
-
/* @__PURE__ */
|
|
18785
|
-
showScrubLine ? /* @__PURE__ */
|
|
19043
|
+
/* @__PURE__ */ jsx348("div", { style: storyboardStyles }),
|
|
19044
|
+
showScrubLine ? /* @__PURE__ */ jsx348(
|
|
18786
19045
|
ScrubLine,
|
|
18787
19046
|
{
|
|
18788
19047
|
style: {
|
|
@@ -18796,7 +19055,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18796
19055
|
};
|
|
18797
19056
|
|
|
18798
19057
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18799
|
-
import { jsx as
|
|
19058
|
+
import { jsx as jsx349, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
18800
19059
|
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
18801
19060
|
var SQUARE_ASPECT_RATIO = 1;
|
|
18802
19061
|
var getAspectRatioValue = (aspectRatio) => {
|
|
@@ -18805,19 +19064,19 @@ var getAspectRatioValue = (aspectRatio) => {
|
|
|
18805
19064
|
}
|
|
18806
19065
|
return WIDE_ASPECT_RATIO;
|
|
18807
19066
|
};
|
|
18808
|
-
var WideThumbnailImage =
|
|
19067
|
+
var WideThumbnailImage = styled111.img`
|
|
18809
19068
|
height: 100%;
|
|
18810
19069
|
object-fit: cover;
|
|
18811
19070
|
width: 100%;
|
|
18812
19071
|
`;
|
|
18813
|
-
var SquareThumbnailImage =
|
|
19072
|
+
var SquareThumbnailImage = styled111.img`
|
|
18814
19073
|
backdrop-filter: blur(8px);
|
|
18815
19074
|
object-fit: contain;
|
|
18816
19075
|
width: 100%;
|
|
18817
19076
|
`;
|
|
18818
19077
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
18819
19078
|
if (thumbnailImageType === "wide") {
|
|
18820
|
-
return /* @__PURE__ */
|
|
19079
|
+
return /* @__PURE__ */ jsx349(
|
|
18821
19080
|
WideThumbnailImage,
|
|
18822
19081
|
{
|
|
18823
19082
|
alt: "",
|
|
@@ -18826,7 +19085,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
18826
19085
|
}
|
|
18827
19086
|
);
|
|
18828
19087
|
}
|
|
18829
|
-
return /* @__PURE__ */
|
|
19088
|
+
return /* @__PURE__ */ jsx349(
|
|
18830
19089
|
SquareThumbnailImage,
|
|
18831
19090
|
{
|
|
18832
19091
|
alt: "",
|
|
@@ -18835,7 +19094,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
18835
19094
|
}
|
|
18836
19095
|
);
|
|
18837
19096
|
};
|
|
18838
|
-
var StyledThumbnailContainer =
|
|
19097
|
+
var StyledThumbnailContainer = styled111.div`
|
|
18839
19098
|
container-type: size;
|
|
18840
19099
|
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
18841
19100
|
width: ${({ $width }) => $width};
|
|
@@ -18843,13 +19102,13 @@ var StyledThumbnailContainer = styled109.div`
|
|
|
18843
19102
|
overflow: hidden;
|
|
18844
19103
|
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
18845
19104
|
`;
|
|
18846
|
-
var StyledThumbnail =
|
|
19105
|
+
var StyledThumbnail = styled111.div`
|
|
18847
19106
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
18848
19107
|
|
|
18849
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
19108
|
+
background-image: ${({ $backgroundUrl }) => isNotNil44($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
18850
19109
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
18851
19110
|
// if we don't have $backgroundUrl show a gradient
|
|
18852
|
-
|
|
19111
|
+
isNil20($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
18853
19112
|
)};
|
|
18854
19113
|
background-position: center center;
|
|
18855
19114
|
background-size: cover;
|
|
@@ -18878,7 +19137,7 @@ var StoryboardRenderer = ({
|
|
|
18878
19137
|
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
18879
19138
|
const targetWidth = isString4(width) ? parseInt(width, 10) : Number(width);
|
|
18880
19139
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
18881
|
-
return /* @__PURE__ */
|
|
19140
|
+
return /* @__PURE__ */ jsx349(
|
|
18882
19141
|
ThumbnailStoryboardViewer,
|
|
18883
19142
|
{
|
|
18884
19143
|
cursorPosition: effectiveCursorPosition,
|
|
@@ -18904,7 +19163,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18904
19163
|
};
|
|
18905
19164
|
};
|
|
18906
19165
|
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18907
|
-
return
|
|
19166
|
+
return isNotNil44(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
18908
19167
|
};
|
|
18909
19168
|
var Thumbnail = forwardRef37(
|
|
18910
19169
|
({
|
|
@@ -18918,16 +19177,16 @@ var Thumbnail = forwardRef37(
|
|
|
18918
19177
|
aspectRatio = "wide",
|
|
18919
19178
|
...props
|
|
18920
19179
|
}, ref) => {
|
|
18921
|
-
const [percent, setPercent] =
|
|
18922
|
-
const [isMouseOver, setIsMouseOver] =
|
|
18923
|
-
const [isStoryboardReady, setIsStoryboardReady] =
|
|
19180
|
+
const [percent, setPercent] = useState28(0);
|
|
19181
|
+
const [isMouseOver, setIsMouseOver] = useState28(false);
|
|
19182
|
+
const [isStoryboardReady, setIsStoryboardReady] = useState28(false);
|
|
18924
19183
|
const storyboardElementRef = useRef25(null);
|
|
18925
|
-
const [cursorPosition, setCursorPosition] =
|
|
18926
|
-
const backgroundUrl =
|
|
19184
|
+
const [cursorPosition, setCursorPosition] = useState28(null);
|
|
19185
|
+
const backgroundUrl = useMemo18(
|
|
18927
19186
|
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18928
19187
|
[thumbnailImageType, thumbnailUrl]
|
|
18929
19188
|
);
|
|
18930
|
-
const isScrubbable =
|
|
19189
|
+
const isScrubbable = isNotNil44(storyboard);
|
|
18931
19190
|
const trackStoryboardLoadStatus = useCallback20(() => {
|
|
18932
19191
|
if (storyboardElementRef.current || !storyboard) {
|
|
18933
19192
|
return storyboardElementRef.current;
|
|
@@ -18960,15 +19219,15 @@ var Thumbnail = forwardRef37(
|
|
|
18960
19219
|
setIsMouseOver(false);
|
|
18961
19220
|
setCursorPosition(null);
|
|
18962
19221
|
}, [isScrubbable]);
|
|
18963
|
-
const shouldRenderStoryboard =
|
|
18964
|
-
if (
|
|
19222
|
+
const shouldRenderStoryboard = useMemo18(() => {
|
|
19223
|
+
if (isNil20(storyboard) || isUndefined7(height) || isEmptyString2(height)) {
|
|
18965
19224
|
return false;
|
|
18966
19225
|
}
|
|
18967
19226
|
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
18968
19227
|
}, [isScrubbable, isMouseOver, isStoryboardReady, storyboard, height]);
|
|
18969
19228
|
let thumbnailContent = null;
|
|
18970
19229
|
if (storyboard && shouldRenderStoryboard) {
|
|
18971
|
-
thumbnailContent = /* @__PURE__ */
|
|
19230
|
+
thumbnailContent = /* @__PURE__ */ jsx349(
|
|
18972
19231
|
StoryboardRenderer,
|
|
18973
19232
|
{
|
|
18974
19233
|
aspectRatio,
|
|
@@ -18980,7 +19239,7 @@ var Thumbnail = forwardRef37(
|
|
|
18980
19239
|
}
|
|
18981
19240
|
);
|
|
18982
19241
|
} else if (hasValidThumbnailUrl(thumbnailUrl)) {
|
|
18983
|
-
thumbnailContent = /* @__PURE__ */
|
|
19242
|
+
thumbnailContent = /* @__PURE__ */ jsx349(
|
|
18984
19243
|
ThumbnailImage,
|
|
18985
19244
|
{
|
|
18986
19245
|
thumbnailImageType,
|
|
@@ -18990,7 +19249,7 @@ var Thumbnail = forwardRef37(
|
|
|
18990
19249
|
} else {
|
|
18991
19250
|
thumbnailContent = null;
|
|
18992
19251
|
}
|
|
18993
|
-
return /* @__PURE__ */
|
|
19252
|
+
return /* @__PURE__ */ jsx349(
|
|
18994
19253
|
StyledThumbnailContainer,
|
|
18995
19254
|
{
|
|
18996
19255
|
ref,
|
|
@@ -19003,14 +19262,14 @@ var Thumbnail = forwardRef37(
|
|
|
19003
19262
|
onMouseOut: handleMouseOut,
|
|
19004
19263
|
role: "presentation",
|
|
19005
19264
|
...props,
|
|
19006
|
-
children: /* @__PURE__ */
|
|
19265
|
+
children: /* @__PURE__ */ jsxs71(
|
|
19007
19266
|
StyledThumbnail,
|
|
19008
19267
|
{
|
|
19009
19268
|
$backgroundUrl: backgroundUrl,
|
|
19010
19269
|
$gradientBackground: gradientBackground,
|
|
19011
19270
|
"data-testid": "thumbnail-inner",
|
|
19012
19271
|
children: [
|
|
19013
|
-
|
|
19272
|
+
isNotNil44(children) ? children : null,
|
|
19014
19273
|
thumbnailContent
|
|
19015
19274
|
]
|
|
19016
19275
|
}
|
|
@@ -19023,16 +19282,16 @@ Thumbnail.displayName = "Thumbnail_UI";
|
|
|
19023
19282
|
|
|
19024
19283
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
19025
19284
|
import { cloneElement as cloneElement9, Children as Children11 } from "react";
|
|
19026
|
-
import { styled as
|
|
19285
|
+
import { styled as styled112 } from "styled-components";
|
|
19027
19286
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
19028
|
-
import { jsx as
|
|
19029
|
-
var ThumbnailCollageContainer =
|
|
19287
|
+
import { jsx as jsx350 } from "react/jsx-runtime";
|
|
19288
|
+
var ThumbnailCollageContainer = styled112.div`
|
|
19030
19289
|
container-type: size;
|
|
19031
19290
|
width: 100%;
|
|
19032
19291
|
aspect-ratio: 16 / 9;
|
|
19033
19292
|
display: flex;
|
|
19034
19293
|
`;
|
|
19035
|
-
var StyledThumbnailCollage =
|
|
19294
|
+
var StyledThumbnailCollage = styled112.div`
|
|
19036
19295
|
display: grid;
|
|
19037
19296
|
gap: var(--wui-space-01);
|
|
19038
19297
|
width: 100%;
|
|
@@ -19090,7 +19349,7 @@ var ThumbnailCollage = ({
|
|
|
19090
19349
|
});
|
|
19091
19350
|
}) : [
|
|
19092
19351
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
19093
|
-
/* @__PURE__ */
|
|
19352
|
+
/* @__PURE__ */ jsx350(
|
|
19094
19353
|
Thumbnail,
|
|
19095
19354
|
{
|
|
19096
19355
|
gradientBackground,
|
|
@@ -19099,7 +19358,7 @@ var ThumbnailCollage = ({
|
|
|
19099
19358
|
"fallback"
|
|
19100
19359
|
)
|
|
19101
19360
|
];
|
|
19102
|
-
return /* @__PURE__ */
|
|
19361
|
+
return /* @__PURE__ */ jsx350(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx350(
|
|
19103
19362
|
StyledThumbnailCollage,
|
|
19104
19363
|
{
|
|
19105
19364
|
$gradientBackground: gradientBackground,
|
|
@@ -19111,26 +19370,26 @@ var ThumbnailCollage = ({
|
|
|
19111
19370
|
};
|
|
19112
19371
|
|
|
19113
19372
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
19114
|
-
import { styled as
|
|
19115
|
-
import { isNotNil as
|
|
19116
|
-
import { jsx as
|
|
19373
|
+
import { styled as styled113, css as css52 } from "styled-components";
|
|
19374
|
+
import { isNotNil as isNotNil45 } from "@wistia/type-guards";
|
|
19375
|
+
import { jsx as jsx351, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
19117
19376
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
19118
19377
|
if (iconOnly) {
|
|
19119
|
-
return /* @__PURE__ */
|
|
19378
|
+
return /* @__PURE__ */ jsx351(
|
|
19120
19379
|
"g",
|
|
19121
19380
|
{
|
|
19122
19381
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19123
19382
|
fill: brandmarkColor,
|
|
19124
|
-
children: /* @__PURE__ */
|
|
19383
|
+
children: /* @__PURE__ */ jsx351("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" })
|
|
19125
19384
|
}
|
|
19126
19385
|
);
|
|
19127
19386
|
}
|
|
19128
|
-
return /* @__PURE__ */
|
|
19387
|
+
return /* @__PURE__ */ jsx351(
|
|
19129
19388
|
"g",
|
|
19130
19389
|
{
|
|
19131
19390
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19132
19391
|
fill: brandmarkColor,
|
|
19133
|
-
children: /* @__PURE__ */
|
|
19392
|
+
children: /* @__PURE__ */ jsx351("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" })
|
|
19134
19393
|
}
|
|
19135
19394
|
);
|
|
19136
19395
|
};
|
|
@@ -19138,12 +19397,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
19138
19397
|
if (iconOnly) {
|
|
19139
19398
|
return null;
|
|
19140
19399
|
}
|
|
19141
|
-
return /* @__PURE__ */
|
|
19400
|
+
return /* @__PURE__ */ jsx351(
|
|
19142
19401
|
"g",
|
|
19143
19402
|
{
|
|
19144
19403
|
"data-testid": "ui-wistia-logo-logotype",
|
|
19145
19404
|
fill: logotypeColor,
|
|
19146
|
-
children: /* @__PURE__ */
|
|
19405
|
+
children: /* @__PURE__ */ jsx351("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" })
|
|
19147
19406
|
}
|
|
19148
19407
|
);
|
|
19149
19408
|
};
|
|
@@ -19153,7 +19412,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
19153
19412
|
}
|
|
19154
19413
|
return "0 0 144 31.47";
|
|
19155
19414
|
};
|
|
19156
|
-
var WistiaLogoComponent =
|
|
19415
|
+
var WistiaLogoComponent = styled113.svg`
|
|
19157
19416
|
height: ${({ height }) => `${height}px`};
|
|
19158
19417
|
|
|
19159
19418
|
/* ensure it will always fit on mobile */
|
|
@@ -19211,7 +19470,7 @@ var WistiaLogo = ({
|
|
|
19211
19470
|
};
|
|
19212
19471
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
19213
19472
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
19214
|
-
const Logo = /* @__PURE__ */
|
|
19473
|
+
const Logo = /* @__PURE__ */ jsxs72(
|
|
19215
19474
|
WistiaLogoComponent,
|
|
19216
19475
|
{
|
|
19217
19476
|
$hoverColor: hoverColor,
|
|
@@ -19224,23 +19483,23 @@ var WistiaLogo = ({
|
|
|
19224
19483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19225
19484
|
...props,
|
|
19226
19485
|
children: [
|
|
19227
|
-
/* @__PURE__ */
|
|
19228
|
-
|
|
19486
|
+
/* @__PURE__ */ jsx351("title", { children: title }),
|
|
19487
|
+
isNotNil45(description) ? /* @__PURE__ */ jsx351("desc", { children: description }) : null,
|
|
19229
19488
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
19230
19489
|
renderLogotype(logotypeColor, iconOnly)
|
|
19231
19490
|
]
|
|
19232
19491
|
}
|
|
19233
19492
|
);
|
|
19234
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
19493
|
+
return href !== void 0 ? /* @__PURE__ */ jsx351("a", { href, children: Logo }) : Logo;
|
|
19235
19494
|
};
|
|
19236
19495
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
19237
19496
|
|
|
19238
19497
|
// src/components/SplitButton/SplitButton.tsx
|
|
19239
|
-
import { styled as
|
|
19240
|
-
import { isNotNil as
|
|
19498
|
+
import { styled as styled114 } from "styled-components";
|
|
19499
|
+
import { isNotNil as isNotNil46 } from "@wistia/type-guards";
|
|
19241
19500
|
import { cloneElement as cloneElement10 } from "react";
|
|
19242
|
-
import { jsx as
|
|
19243
|
-
var StyledSplitButton =
|
|
19501
|
+
import { jsx as jsx352, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
19502
|
+
var StyledSplitButton = styled114.span`
|
|
19244
19503
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
19245
19504
|
white-space: nowrap;
|
|
19246
19505
|
|
|
@@ -19261,7 +19520,7 @@ var StyledSplitButton = styled112.span`
|
|
|
19261
19520
|
var SplitButton = ({
|
|
19262
19521
|
children,
|
|
19263
19522
|
menuLabel = "Select an option",
|
|
19264
|
-
menuIcon = /* @__PURE__ */
|
|
19523
|
+
menuIcon = /* @__PURE__ */ jsx352(Icon, { type: "caret-down" }),
|
|
19265
19524
|
menuItems,
|
|
19266
19525
|
disabled = false,
|
|
19267
19526
|
colorScheme = "inherit",
|
|
@@ -19272,8 +19531,8 @@ var SplitButton = ({
|
|
|
19272
19531
|
menuProps = {},
|
|
19273
19532
|
...props
|
|
19274
19533
|
}) => {
|
|
19275
|
-
return /* @__PURE__ */
|
|
19276
|
-
/* @__PURE__ */
|
|
19534
|
+
return /* @__PURE__ */ jsxs73(StyledSplitButton, { $colorScheme: colorScheme, children: [
|
|
19535
|
+
/* @__PURE__ */ jsx352(
|
|
19277
19536
|
Button,
|
|
19278
19537
|
{
|
|
19279
19538
|
disabled,
|
|
@@ -19284,12 +19543,12 @@ var SplitButton = ({
|
|
|
19284
19543
|
children
|
|
19285
19544
|
}
|
|
19286
19545
|
),
|
|
19287
|
-
|
|
19546
|
+
isNotNil46(menuItems) && /* @__PURE__ */ jsx352(
|
|
19288
19547
|
Menu,
|
|
19289
19548
|
{
|
|
19290
19549
|
...menuProps,
|
|
19291
19550
|
disabled,
|
|
19292
|
-
trigger: /* @__PURE__ */
|
|
19551
|
+
trigger: /* @__PURE__ */ jsx352(
|
|
19293
19552
|
IconButton,
|
|
19294
19553
|
{
|
|
19295
19554
|
disabled,
|
|
@@ -19303,22 +19562,22 @@ var SplitButton = ({
|
|
|
19303
19562
|
children: menuItems
|
|
19304
19563
|
}
|
|
19305
19564
|
),
|
|
19306
|
-
|
|
19565
|
+
isNotNil46(secondaryAction) && cloneElement10(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
19307
19566
|
] });
|
|
19308
19567
|
};
|
|
19309
19568
|
SplitButton.displayName = "SplitButton_UI";
|
|
19310
19569
|
|
|
19311
19570
|
// src/components/CustomizableThemeWrapper/CustomizableThemeWrapper.tsx
|
|
19312
|
-
import { styled as
|
|
19313
|
-
import { jsx as
|
|
19314
|
-
var StyledCustomizableThemeWrapper =
|
|
19571
|
+
import { styled as styled115 } from "styled-components";
|
|
19572
|
+
import { jsx as jsx353 } from "react/jsx-runtime";
|
|
19573
|
+
var StyledCustomizableThemeWrapper = styled115.div(
|
|
19315
19574
|
(props) => props.$overrides
|
|
19316
19575
|
);
|
|
19317
19576
|
var CustomizableThemeWrapper = ({
|
|
19318
19577
|
children,
|
|
19319
19578
|
overrides,
|
|
19320
19579
|
...props
|
|
19321
|
-
}) => /* @__PURE__ */
|
|
19580
|
+
}) => /* @__PURE__ */ jsx353(
|
|
19322
19581
|
StyledCustomizableThemeWrapper,
|
|
19323
19582
|
{
|
|
19324
19583
|
...props,
|
|
@@ -19384,6 +19643,8 @@ export {
|
|
|
19384
19643
|
EditableTextSubmitButton,
|
|
19385
19644
|
EditableTextTrigger,
|
|
19386
19645
|
Ellipsis,
|
|
19646
|
+
FeatureCard,
|
|
19647
|
+
FeatureCardImage,
|
|
19387
19648
|
FileAmountLimitValidator,
|
|
19388
19649
|
FileSizeValidator,
|
|
19389
19650
|
FileTypeValidator,
|