@wistia/ui 0.20.16 → 0.20.17
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 +111 -59
- package/dist/index.js +726 -523
- 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.17
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -14287,11 +14287,32 @@ var ContextMenu = ({
|
|
|
14287
14287
|
return menu;
|
|
14288
14288
|
};
|
|
14289
14289
|
|
|
14290
|
+
// src/components/CustomizableThemeWrapper/CustomizableThemeWrapper.tsx
|
|
14291
|
+
import { styled as styled58 } from "styled-components";
|
|
14292
|
+
import { jsx as jsx289 } from "react/jsx-runtime";
|
|
14293
|
+
var StyledCustomizableThemeWrapper = styled58.div(
|
|
14294
|
+
(props) => props.$overrides
|
|
14295
|
+
);
|
|
14296
|
+
var CustomizableThemeWrapper = ({
|
|
14297
|
+
children,
|
|
14298
|
+
overrides,
|
|
14299
|
+
...props
|
|
14300
|
+
}) => /* @__PURE__ */ jsx289(
|
|
14301
|
+
StyledCustomizableThemeWrapper,
|
|
14302
|
+
{
|
|
14303
|
+
...props,
|
|
14304
|
+
$overrides: overrides,
|
|
14305
|
+
"data-wui-theme": "true",
|
|
14306
|
+
children
|
|
14307
|
+
}
|
|
14308
|
+
);
|
|
14309
|
+
CustomizableThemeWrapper.displayName = "CustomizableThemeWrapper_UI";
|
|
14310
|
+
|
|
14290
14311
|
// src/components/DataCards/DataCard.tsx
|
|
14291
14312
|
import { useRef as useRef16 } from "react";
|
|
14292
|
-
import { styled as
|
|
14313
|
+
import { styled as styled59, keyframes as keyframes4 } from "styled-components";
|
|
14293
14314
|
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
14294
|
-
import { jsx as
|
|
14315
|
+
import { jsx as jsx290, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
14295
14316
|
var pulse = keyframes4`
|
|
14296
14317
|
0%,
|
|
14297
14318
|
100% {
|
|
@@ -14301,7 +14322,7 @@ var pulse = keyframes4`
|
|
|
14301
14322
|
opacity: 0.5;
|
|
14302
14323
|
}
|
|
14303
14324
|
`;
|
|
14304
|
-
var StyledDataCard =
|
|
14325
|
+
var StyledDataCard = styled59.div`
|
|
14305
14326
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
14306
14327
|
--wui-color-text: var(--wui-data-card-text);
|
|
14307
14328
|
--wui-data-card-background: var(--wui-color-bg-surface-secondary);
|
|
@@ -14387,7 +14408,7 @@ var StyledDataCard = styled58.div`
|
|
|
14387
14408
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
14388
14409
|
}
|
|
14389
14410
|
`;
|
|
14390
|
-
var StyledLabel3 =
|
|
14411
|
+
var StyledLabel3 = styled59(Heading)`
|
|
14391
14412
|
grid-area: label;
|
|
14392
14413
|
|
|
14393
14414
|
&[data-wui-data-card-skeleton='true'] {
|
|
@@ -14398,25 +14419,25 @@ var StyledLabel3 = styled58(Heading)`
|
|
|
14398
14419
|
text-align: left;
|
|
14399
14420
|
}
|
|
14400
14421
|
`;
|
|
14401
|
-
var StyledValue =
|
|
14422
|
+
var StyledValue = styled59(Heading)`
|
|
14402
14423
|
grid-area: value;
|
|
14403
14424
|
|
|
14404
14425
|
&[data-wui-data-card-skeleton='true'] {
|
|
14405
14426
|
width: min(90%, 156px);
|
|
14406
14427
|
}
|
|
14407
14428
|
`;
|
|
14408
|
-
var StyledSlot =
|
|
14429
|
+
var StyledSlot = styled59.div`
|
|
14409
14430
|
display: flex;
|
|
14410
14431
|
justify-content: flex-end;
|
|
14411
14432
|
grid-area: slot;
|
|
14412
14433
|
align-self: center;
|
|
14413
14434
|
`;
|
|
14414
|
-
var StyledDataCardTrendContainer =
|
|
14435
|
+
var StyledDataCardTrendContainer = styled59.div`
|
|
14415
14436
|
position: absolute;
|
|
14416
14437
|
bottom: var(--wui-space-01);
|
|
14417
14438
|
right: var(--wui-space-01);
|
|
14418
14439
|
`;
|
|
14419
|
-
var StyledSubtitle =
|
|
14440
|
+
var StyledSubtitle = styled59(Text)`
|
|
14420
14441
|
grid-area: subtitle;
|
|
14421
14442
|
`;
|
|
14422
14443
|
var DataCardInner = ({
|
|
@@ -14434,7 +14455,7 @@ var DataCardInner = ({
|
|
|
14434
14455
|
$colorScheme: colorScheme,
|
|
14435
14456
|
...props,
|
|
14436
14457
|
children: [
|
|
14437
|
-
/* @__PURE__ */
|
|
14458
|
+
/* @__PURE__ */ jsx290(
|
|
14438
14459
|
StyledLabel3,
|
|
14439
14460
|
{
|
|
14440
14461
|
"data-wui-data-card-skeleton": isLoading,
|
|
@@ -14443,7 +14464,7 @@ var DataCardInner = ({
|
|
|
14443
14464
|
children: label
|
|
14444
14465
|
}
|
|
14445
14466
|
),
|
|
14446
|
-
/* @__PURE__ */
|
|
14467
|
+
/* @__PURE__ */ jsx290(
|
|
14447
14468
|
StyledValue,
|
|
14448
14469
|
{
|
|
14449
14470
|
"data-wui-data-card-skeleton": isLoading,
|
|
@@ -14452,8 +14473,8 @@ var DataCardInner = ({
|
|
|
14452
14473
|
children: value
|
|
14453
14474
|
}
|
|
14454
14475
|
),
|
|
14455
|
-
isNotNil25(upperRightSlot) && !isLoading && /* @__PURE__ */
|
|
14456
|
-
isNotNil25(subtitle) && !isLoading && /* @__PURE__ */
|
|
14476
|
+
isNotNil25(upperRightSlot) && !isLoading && /* @__PURE__ */ jsx290(StyledSlot, { children: upperRightSlot }),
|
|
14477
|
+
isNotNil25(subtitle) && !isLoading && /* @__PURE__ */ jsx290(
|
|
14457
14478
|
StyledSubtitle,
|
|
14458
14479
|
{
|
|
14459
14480
|
"data-wui-data-card-subtitle": true,
|
|
@@ -14461,7 +14482,7 @@ var DataCardInner = ({
|
|
|
14461
14482
|
children: subtitle
|
|
14462
14483
|
}
|
|
14463
14484
|
),
|
|
14464
|
-
isNotNil25(trend) && !isLoading && /* @__PURE__ */
|
|
14485
|
+
isNotNil25(trend) && !isLoading && /* @__PURE__ */ jsx290(StyledDataCardTrendContainer, { children: trend })
|
|
14465
14486
|
]
|
|
14466
14487
|
}
|
|
14467
14488
|
);
|
|
@@ -14469,12 +14490,12 @@ var DataCard = (props) => {
|
|
|
14469
14490
|
const ref = useRef16(null);
|
|
14470
14491
|
if (isNotNil25(props.href) || isNotNil25(props.onClick)) {
|
|
14471
14492
|
const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
|
|
14472
|
-
return /* @__PURE__ */
|
|
14493
|
+
return /* @__PURE__ */ jsx290(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ jsx290(
|
|
14473
14494
|
DataCardInner,
|
|
14474
14495
|
{
|
|
14475
14496
|
upperRightSlot: props.upperRightSlot,
|
|
14476
14497
|
...dataCardProps,
|
|
14477
|
-
label: /* @__PURE__ */
|
|
14498
|
+
label: /* @__PURE__ */ jsx290(
|
|
14478
14499
|
Button,
|
|
14479
14500
|
{
|
|
14480
14501
|
ref,
|
|
@@ -14491,14 +14512,14 @@ var DataCard = (props) => {
|
|
|
14491
14512
|
}
|
|
14492
14513
|
) });
|
|
14493
14514
|
}
|
|
14494
|
-
return /* @__PURE__ */
|
|
14515
|
+
return /* @__PURE__ */ jsx290(DataCardInner, { ...props });
|
|
14495
14516
|
};
|
|
14496
14517
|
DataCard.displayName = "DataCard_UI";
|
|
14497
14518
|
|
|
14498
14519
|
// src/components/DataCards/DataCards.tsx
|
|
14499
|
-
import { styled as
|
|
14500
|
-
import { jsx as
|
|
14501
|
-
var StyledDataCards =
|
|
14520
|
+
import { styled as styled60 } from "styled-components";
|
|
14521
|
+
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
14522
|
+
var StyledDataCards = styled60(Box)`
|
|
14502
14523
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
14503
14524
|
--wui-data-cards-column-count: ${({ $columns }) => $columns === "auto" ? void 0 : $columns};
|
|
14504
14525
|
--wui-data-cards-total-column-gap-width: calc(var(--wui-data-cards-column-count) - 1) *
|
|
@@ -14522,7 +14543,7 @@ var DataCards = ({
|
|
|
14522
14543
|
}) => {
|
|
14523
14544
|
const responsiveCardMaxWidth = useResponsiveProp(cardMaxWidth);
|
|
14524
14545
|
const responsiveColumns = useResponsiveProp(columns);
|
|
14525
|
-
return /* @__PURE__ */
|
|
14546
|
+
return /* @__PURE__ */ jsx291(
|
|
14526
14547
|
StyledDataCards,
|
|
14527
14548
|
{
|
|
14528
14549
|
...props,
|
|
@@ -14541,9 +14562,9 @@ var DataCards = ({
|
|
|
14541
14562
|
DataCards.displayName = "DataCards_UI";
|
|
14542
14563
|
|
|
14543
14564
|
// src/components/DataCards/DataCardTrend.tsx
|
|
14544
|
-
import { styled as
|
|
14545
|
-
import { jsx as
|
|
14546
|
-
var StyledDataCardTrend =
|
|
14565
|
+
import { styled as styled61 } from "styled-components";
|
|
14566
|
+
import { jsx as jsx292, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
14567
|
+
var StyledDataCardTrend = styled61.div`
|
|
14547
14568
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
14548
14569
|
background: var(--wui-color-bg-app);
|
|
14549
14570
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -14559,7 +14580,7 @@ var DataCardTrend = ({
|
|
|
14559
14580
|
...props
|
|
14560
14581
|
}) => {
|
|
14561
14582
|
return /* @__PURE__ */ jsxs42(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
14562
|
-
/* @__PURE__ */
|
|
14583
|
+
/* @__PURE__ */ jsx292(
|
|
14563
14584
|
Icon,
|
|
14564
14585
|
{
|
|
14565
14586
|
size: "md",
|
|
@@ -14567,7 +14588,7 @@ var DataCardTrend = ({
|
|
|
14567
14588
|
...props
|
|
14568
14589
|
}
|
|
14569
14590
|
),
|
|
14570
|
-
/* @__PURE__ */
|
|
14591
|
+
/* @__PURE__ */ jsx292(
|
|
14571
14592
|
Text,
|
|
14572
14593
|
{
|
|
14573
14594
|
prominence: "secondary",
|
|
@@ -14579,15 +14600,15 @@ var DataCardTrend = ({
|
|
|
14579
14600
|
};
|
|
14580
14601
|
|
|
14581
14602
|
// src/components/DataCards/DataCardHoverArrow.tsx
|
|
14582
|
-
import { styled as
|
|
14583
|
-
import { jsx as
|
|
14584
|
-
var StyledIconContainer =
|
|
14603
|
+
import { styled as styled62 } from "styled-components";
|
|
14604
|
+
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
14605
|
+
var StyledIconContainer = styled62.div`
|
|
14585
14606
|
display: flex;
|
|
14586
14607
|
align-items: center;
|
|
14587
14608
|
align-self: center;
|
|
14588
14609
|
height: 0;
|
|
14589
14610
|
`;
|
|
14590
|
-
var DataCardHoverArrow = () => /* @__PURE__ */
|
|
14611
|
+
var DataCardHoverArrow = () => /* @__PURE__ */ jsx293(StyledIconContainer, { children: /* @__PURE__ */ jsx293(
|
|
14591
14612
|
Icon,
|
|
14592
14613
|
{
|
|
14593
14614
|
"data-wui-data-card-hover-icon": true,
|
|
@@ -14597,9 +14618,9 @@ var DataCardHoverArrow = () => /* @__PURE__ */ jsx292(StyledIconContainer, { chi
|
|
|
14597
14618
|
DataCardHoverArrow.displayName = "DataCardHoverArrow_UI";
|
|
14598
14619
|
|
|
14599
14620
|
// src/components/DataList/DataList.tsx
|
|
14600
|
-
import { styled as
|
|
14601
|
-
import { jsx as
|
|
14602
|
-
var StyledDataList =
|
|
14621
|
+
import { styled as styled63 } from "styled-components";
|
|
14622
|
+
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
14623
|
+
var StyledDataList = styled63.dl`
|
|
14603
14624
|
display: grid;
|
|
14604
14625
|
grid-template-columns: auto 1fr;
|
|
14605
14626
|
column-gap: var(--wui-space-02);
|
|
@@ -14627,7 +14648,7 @@ var DataList = ({
|
|
|
14627
14648
|
labelProminence = "primary",
|
|
14628
14649
|
...props
|
|
14629
14650
|
}) => {
|
|
14630
|
-
return /* @__PURE__ */
|
|
14651
|
+
return /* @__PURE__ */ jsx294(
|
|
14631
14652
|
StyledDataList,
|
|
14632
14653
|
{
|
|
14633
14654
|
role: "list",
|
|
@@ -14650,9 +14671,9 @@ var DataListItem = ({ children }) => {
|
|
|
14650
14671
|
DataListItem.displayName = "DataListItem_UI";
|
|
14651
14672
|
|
|
14652
14673
|
// src/components/DataList/DataListItemLabel.tsx
|
|
14653
|
-
import { jsx as
|
|
14674
|
+
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
14654
14675
|
var DataListItemLabel = (props) => {
|
|
14655
|
-
return /* @__PURE__ */
|
|
14676
|
+
return /* @__PURE__ */ jsx295(
|
|
14656
14677
|
Text,
|
|
14657
14678
|
{
|
|
14658
14679
|
variant: "label4",
|
|
@@ -14664,9 +14685,9 @@ var DataListItemLabel = (props) => {
|
|
|
14664
14685
|
DataListItemLabel.displayName = "DataListItemLabel_UI";
|
|
14665
14686
|
|
|
14666
14687
|
// src/components/DataList/DataListItemValue.tsx
|
|
14667
|
-
import { jsx as
|
|
14688
|
+
import { jsx as jsx296 } from "react/jsx-runtime";
|
|
14668
14689
|
var DataListItemValue = (props) => {
|
|
14669
|
-
return /* @__PURE__ */
|
|
14690
|
+
return /* @__PURE__ */ jsx296(
|
|
14670
14691
|
Text,
|
|
14671
14692
|
{
|
|
14672
14693
|
variant: "body3",
|
|
@@ -14678,8 +14699,8 @@ var DataListItemValue = (props) => {
|
|
|
14678
14699
|
DataListItemValue.displayName = "DataListItemValue_UI";
|
|
14679
14700
|
|
|
14680
14701
|
// src/components/Divider/Divider.tsx
|
|
14681
|
-
import { styled as
|
|
14682
|
-
import { jsx as
|
|
14702
|
+
import { styled as styled64, css as css33 } from "styled-components";
|
|
14703
|
+
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
14683
14704
|
var horizontalBorderCss = css33`
|
|
14684
14705
|
border-top-color: var(--wui-color-border);
|
|
14685
14706
|
border-top-style: solid;
|
|
@@ -14697,7 +14718,7 @@ var verticalBorderCss = css33`
|
|
|
14697
14718
|
margin-top: var(--wui-divider-inset);
|
|
14698
14719
|
margin-bottom: var(--wui-divider-inset);
|
|
14699
14720
|
`;
|
|
14700
|
-
var DividerComponent =
|
|
14721
|
+
var DividerComponent = styled64.div`
|
|
14701
14722
|
${({ $orientation }) => {
|
|
14702
14723
|
switch ($orientation) {
|
|
14703
14724
|
case "vertical":
|
|
@@ -14718,7 +14739,7 @@ var Divider = ({
|
|
|
14718
14739
|
}) => {
|
|
14719
14740
|
const responsiveOrientation = useResponsiveProp(orientation);
|
|
14720
14741
|
const responsiveInset = useResponsiveProp(inset);
|
|
14721
|
-
return /* @__PURE__ */
|
|
14742
|
+
return /* @__PURE__ */ jsx297(
|
|
14722
14743
|
DividerComponent,
|
|
14723
14744
|
{
|
|
14724
14745
|
$inset: responsiveInset,
|
|
@@ -14732,10 +14753,10 @@ var Divider = ({
|
|
|
14732
14753
|
Divider.displayName = "Divider_UI";
|
|
14733
14754
|
|
|
14734
14755
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
14735
|
-
import { styled as
|
|
14756
|
+
import { styled as styled65, css as css34 } from "styled-components";
|
|
14736
14757
|
import { useState as useState19, useRef as useRef17 } from "react";
|
|
14737
|
-
import { Fragment as Fragment8, jsx as
|
|
14738
|
-
var StyledInput =
|
|
14758
|
+
import { Fragment as Fragment8, jsx as jsx298, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
14759
|
+
var StyledInput = styled65(Input)`
|
|
14739
14760
|
&:not([rows]) {
|
|
14740
14761
|
min-height: unset;
|
|
14741
14762
|
}
|
|
@@ -14770,7 +14791,7 @@ var editableStyles = css34`
|
|
|
14770
14791
|
cursor: pointer;
|
|
14771
14792
|
}
|
|
14772
14793
|
`;
|
|
14773
|
-
var StyledHeading2 =
|
|
14794
|
+
var StyledHeading2 = styled65(Heading)`
|
|
14774
14795
|
width: 100%;
|
|
14775
14796
|
border-radius: var(--wui-border-radius-02);
|
|
14776
14797
|
padding: var(--wui-space-02);
|
|
@@ -14827,7 +14848,7 @@ var EditableHeading = ({
|
|
|
14827
14848
|
handleSetEditing(false);
|
|
14828
14849
|
}
|
|
14829
14850
|
};
|
|
14830
|
-
const HeadingComponent2 = /* @__PURE__ */
|
|
14851
|
+
const HeadingComponent2 = /* @__PURE__ */ jsx298(
|
|
14831
14852
|
StyledHeading2,
|
|
14832
14853
|
{
|
|
14833
14854
|
ref: headingRef,
|
|
@@ -14841,7 +14862,7 @@ var EditableHeading = ({
|
|
|
14841
14862
|
return HeadingComponent2;
|
|
14842
14863
|
}
|
|
14843
14864
|
if (isEditing || __forceEditing) {
|
|
14844
|
-
return /* @__PURE__ */
|
|
14865
|
+
return /* @__PURE__ */ jsx298(
|
|
14845
14866
|
StyledInput,
|
|
14846
14867
|
{
|
|
14847
14868
|
$height: headingHeight,
|
|
@@ -14861,8 +14882,8 @@ var EditableHeading = ({
|
|
|
14861
14882
|
);
|
|
14862
14883
|
}
|
|
14863
14884
|
return /* @__PURE__ */ jsxs43(Fragment8, { children: [
|
|
14864
|
-
/* @__PURE__ */
|
|
14865
|
-
/* @__PURE__ */
|
|
14885
|
+
/* @__PURE__ */ jsx298(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
|
|
14886
|
+
/* @__PURE__ */ jsx298(ScreenReaderOnly, { children: /* @__PURE__ */ jsx298(
|
|
14866
14887
|
"button",
|
|
14867
14888
|
{
|
|
14868
14889
|
"aria-label": ariaLabel,
|
|
@@ -14875,14 +14896,14 @@ var EditableHeading = ({
|
|
|
14875
14896
|
|
|
14876
14897
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
14877
14898
|
import { useContext as useContext6, useRef as useRef18, forwardRef as forwardRef21 } from "react";
|
|
14878
|
-
import { styled as
|
|
14899
|
+
import { styled as styled67, css as css35 } from "styled-components";
|
|
14879
14900
|
import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
14880
14901
|
|
|
14881
14902
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
14882
14903
|
import { createContext as createContext7, useMemo as useMemo13, useState as useState20, useCallback as useCallback16, useId as useId4 } from "react";
|
|
14883
14904
|
import { isNonEmptyString as isNonEmptyString6 } from "@wistia/type-guards";
|
|
14884
|
-
import { styled as
|
|
14885
|
-
import { jsx as
|
|
14905
|
+
import { styled as styled66 } from "styled-components";
|
|
14906
|
+
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
14886
14907
|
var LARGE_PADDING = "var(--wui-space-02)";
|
|
14887
14908
|
var SMALL_PADDING = "var(--wui-space-01)";
|
|
14888
14909
|
var getPaddingForVariant = (variant) => {
|
|
@@ -14917,7 +14938,7 @@ var getPaddingForVariant = (variant) => {
|
|
|
14917
14938
|
}
|
|
14918
14939
|
return SMALL_PADDING;
|
|
14919
14940
|
};
|
|
14920
|
-
var StyledEditableTextRoot =
|
|
14941
|
+
var StyledEditableTextRoot = styled66.div`
|
|
14921
14942
|
display: contents;
|
|
14922
14943
|
|
|
14923
14944
|
--wui-editable-text-padding: ${({ $typographicVariant }) => getPaddingForVariant($typographicVariant)};
|
|
@@ -15015,7 +15036,7 @@ var EditableTextRoot = ({
|
|
|
15015
15036
|
}
|
|
15016
15037
|
return "idle";
|
|
15017
15038
|
};
|
|
15018
|
-
return /* @__PURE__ */
|
|
15039
|
+
return /* @__PURE__ */ jsx299(
|
|
15019
15040
|
StyledEditableTextRoot,
|
|
15020
15041
|
{
|
|
15021
15042
|
$typographicVariant: typographicVariant,
|
|
@@ -15023,14 +15044,14 @@ var EditableTextRoot = ({
|
|
|
15023
15044
|
"data-wui-editable-text-root": true,
|
|
15024
15045
|
"data-wui-editable-text-state": getState(),
|
|
15025
15046
|
...props,
|
|
15026
|
-
children: /* @__PURE__ */
|
|
15047
|
+
children: /* @__PURE__ */ jsx299(EditableTextContext.Provider, { value: context, children })
|
|
15027
15048
|
}
|
|
15028
15049
|
);
|
|
15029
15050
|
};
|
|
15030
15051
|
|
|
15031
15052
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
15032
|
-
import { jsx as
|
|
15033
|
-
var StyledEditableTextDisplay =
|
|
15053
|
+
import { jsx as jsx300, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
15054
|
+
var StyledEditableTextDisplay = styled67.div`
|
|
15034
15055
|
${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
|
|
15035
15056
|
padding: var(--wui-editable-text-padding);
|
|
15036
15057
|
border-radius: var(--wui-editable-text-border-radius);
|
|
@@ -15083,7 +15104,7 @@ var EditableTextDisplayComponent = forwardRef21(
|
|
|
15083
15104
|
return null;
|
|
15084
15105
|
}
|
|
15085
15106
|
if (asTrigger && !context.readOnly) {
|
|
15086
|
-
return /* @__PURE__ */
|
|
15107
|
+
return /* @__PURE__ */ jsx300(ClickRegion, { targetRef: triggerButtonRef, children: /* @__PURE__ */ jsxs44(
|
|
15087
15108
|
StyledEditableTextDisplay,
|
|
15088
15109
|
{
|
|
15089
15110
|
ref,
|
|
@@ -15095,7 +15116,7 @@ var EditableTextDisplayComponent = forwardRef21(
|
|
|
15095
15116
|
...props,
|
|
15096
15117
|
children: [
|
|
15097
15118
|
displayText,
|
|
15098
|
-
/* @__PURE__ */
|
|
15119
|
+
/* @__PURE__ */ jsx300(
|
|
15099
15120
|
"button",
|
|
15100
15121
|
{
|
|
15101
15122
|
ref: triggerButtonRef,
|
|
@@ -15109,7 +15130,7 @@ var EditableTextDisplayComponent = forwardRef21(
|
|
|
15109
15130
|
}
|
|
15110
15131
|
) });
|
|
15111
15132
|
}
|
|
15112
|
-
return /* @__PURE__ */
|
|
15133
|
+
return /* @__PURE__ */ jsx300(
|
|
15113
15134
|
StyledEditableTextDisplay,
|
|
15114
15135
|
{
|
|
15115
15136
|
ref,
|
|
@@ -15133,10 +15154,10 @@ var EditableTextDisplay = makePolymorphic(
|
|
|
15133
15154
|
|
|
15134
15155
|
// src/components/EditableText/EditableTextInput.tsx
|
|
15135
15156
|
import { useContext as useContext7, useEffect as useEffect18, useRef as useRef19 } from "react";
|
|
15136
|
-
import { styled as
|
|
15157
|
+
import { styled as styled68 } from "styled-components";
|
|
15137
15158
|
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
15138
|
-
import { jsx as
|
|
15139
|
-
var StyledInput2 =
|
|
15159
|
+
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
15160
|
+
var StyledInput2 = styled68(Input)`
|
|
15140
15161
|
&& {
|
|
15141
15162
|
${({ $minLines }) => isNotNil27($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
|
|
15142
15163
|
${({ $maxLines }) => isNotNil27($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
|
|
@@ -15226,7 +15247,7 @@ var EditableTextInput = (props) => {
|
|
|
15226
15247
|
if (!isEditing) {
|
|
15227
15248
|
return null;
|
|
15228
15249
|
}
|
|
15229
|
-
return /* @__PURE__ */
|
|
15250
|
+
return /* @__PURE__ */ jsx301(
|
|
15230
15251
|
StyledInput2,
|
|
15231
15252
|
{
|
|
15232
15253
|
ref: inputRef,
|
|
@@ -15252,14 +15273,14 @@ var EditableTextInput = (props) => {
|
|
|
15252
15273
|
|
|
15253
15274
|
// src/components/EditableText/EditableTextLabel.tsx
|
|
15254
15275
|
import { useContext as useContext8 } from "react";
|
|
15255
|
-
import { jsx as
|
|
15276
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
15256
15277
|
var EditableTextLabel = ({ ...props }) => {
|
|
15257
15278
|
const context = useContext8(EditableTextContext);
|
|
15258
15279
|
if (!context) {
|
|
15259
15280
|
throw new Error("EditableTextLabel must be used within an EditableTextRoot context");
|
|
15260
15281
|
}
|
|
15261
15282
|
const { id, label, isEditing } = context;
|
|
15262
|
-
return /* @__PURE__ */
|
|
15283
|
+
return /* @__PURE__ */ jsx302(
|
|
15263
15284
|
Label,
|
|
15264
15285
|
{
|
|
15265
15286
|
...isEditing && { htmlFor: id },
|
|
@@ -15270,11 +15291,11 @@ var EditableTextLabel = ({ ...props }) => {
|
|
|
15270
15291
|
};
|
|
15271
15292
|
|
|
15272
15293
|
// src/components/EditableText/EditableText.tsx
|
|
15273
|
-
import { jsx as
|
|
15294
|
+
import { jsx as jsx303, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
15274
15295
|
var EditableText = ({ hideLabel = true, ...props }) => /* @__PURE__ */ jsxs45(EditableTextRoot, { ...props, children: [
|
|
15275
|
-
/* @__PURE__ */
|
|
15276
|
-
/* @__PURE__ */
|
|
15277
|
-
/* @__PURE__ */
|
|
15296
|
+
/* @__PURE__ */ jsx303(EditableTextLabel, { screenReaderOnly: hideLabel }),
|
|
15297
|
+
/* @__PURE__ */ jsx303(EditableTextInput, {}),
|
|
15298
|
+
/* @__PURE__ */ jsx303(EditableTextDisplay, { asTrigger: true })
|
|
15278
15299
|
] });
|
|
15279
15300
|
EditableText.displayName = "EditableText_UI";
|
|
15280
15301
|
|
|
@@ -15409,9 +15430,9 @@ var useFormState = (action, initialData = {}) => {
|
|
|
15409
15430
|
// src/components/Form/FormErrorSummary.tsx
|
|
15410
15431
|
import { useContext as useContext12, useRef as useRef20 } from "react";
|
|
15411
15432
|
import { isArray as isArray3, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
15412
|
-
import { jsx as
|
|
15433
|
+
import { jsx as jsx304, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15413
15434
|
var ErrorItem = ({ name, error, formId }) => {
|
|
15414
|
-
return /* @__PURE__ */
|
|
15435
|
+
return /* @__PURE__ */ jsx304("li", { children: /* @__PURE__ */ jsx304(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
15415
15436
|
};
|
|
15416
15437
|
var FormErrorSummary = ({ description }) => {
|
|
15417
15438
|
const ref = useRef20(null);
|
|
@@ -15421,9 +15442,9 @@ var FormErrorSummary = ({ description }) => {
|
|
|
15421
15442
|
return null;
|
|
15422
15443
|
}
|
|
15423
15444
|
return /* @__PURE__ */ jsxs46("div", { ref, children: [
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
/* @__PURE__ */
|
|
15426
|
-
([name, error]) => isArray3(error) ? error.map((err) => /* @__PURE__ */
|
|
15445
|
+
/* @__PURE__ */ jsx304("p", { children: description }),
|
|
15446
|
+
/* @__PURE__ */ jsx304("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined11(error)).map(
|
|
15447
|
+
([name, error]) => isArray3(error) ? error.map((err) => /* @__PURE__ */ jsx304(
|
|
15427
15448
|
ErrorItem,
|
|
15428
15449
|
{
|
|
15429
15450
|
error: err,
|
|
@@ -15431,7 +15452,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
15431
15452
|
name
|
|
15432
15453
|
},
|
|
15433
15454
|
err
|
|
15434
|
-
)) : /* @__PURE__ */
|
|
15455
|
+
)) : /* @__PURE__ */ jsx304(
|
|
15435
15456
|
ErrorItem,
|
|
15436
15457
|
{
|
|
15437
15458
|
error: error ?? "",
|
|
@@ -15470,9 +15491,9 @@ var validateWithYup = (schema) => {
|
|
|
15470
15491
|
|
|
15471
15492
|
// src/components/FormField/FormField.tsx
|
|
15472
15493
|
import { Children as Children10, cloneElement as cloneElement8, useContext as useContext13 } from "react";
|
|
15473
|
-
import { styled as
|
|
15494
|
+
import { styled as styled69, css as css36 } from "styled-components";
|
|
15474
15495
|
import { isArray as isArray4, isNotNil as isNotNil28, isNotUndefined as isNotUndefined13, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
15475
|
-
import { jsx as
|
|
15496
|
+
import { jsx as jsx305, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15476
15497
|
var inlineErrorStyles = css36`
|
|
15477
15498
|
grid-template-rows: 1fr auto;
|
|
15478
15499
|
grid-template-areas: 'label-description input' '. error';
|
|
@@ -15485,7 +15506,7 @@ var blockGridErrorStyles = css36`
|
|
|
15485
15506
|
grid-template-rows: auto 1fr auto;
|
|
15486
15507
|
grid-template-areas: 'label-description' 'input' 'error';
|
|
15487
15508
|
`;
|
|
15488
|
-
var StyledFormField =
|
|
15509
|
+
var StyledFormField = styled69.div`
|
|
15489
15510
|
--form-field-spacing: var(--wui-space-02);
|
|
15490
15511
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
15491
15512
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -15519,10 +15540,10 @@ var StyledFormField = styled68.div`
|
|
|
15519
15540
|
${({ $hasError }) => $hasError && blockGridErrorStyles}
|
|
15520
15541
|
}
|
|
15521
15542
|
`;
|
|
15522
|
-
var ErrorText =
|
|
15543
|
+
var ErrorText = styled69(Text)`
|
|
15523
15544
|
grid-area: error;
|
|
15524
15545
|
`;
|
|
15525
|
-
var StyledErrorList =
|
|
15546
|
+
var StyledErrorList = styled69.ul`
|
|
15526
15547
|
margin: 0;
|
|
15527
15548
|
padding: 0;
|
|
15528
15549
|
padding-left: var(--wui-space-04);
|
|
@@ -15535,7 +15556,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15535
15556
|
const isErrorArray = isArray4(errors);
|
|
15536
15557
|
const isMultipleErrors = isErrorArray && errors.length > 1;
|
|
15537
15558
|
if (!isErrorArray) {
|
|
15538
|
-
return /* @__PURE__ */
|
|
15559
|
+
return /* @__PURE__ */ jsx305(
|
|
15539
15560
|
ErrorText,
|
|
15540
15561
|
{
|
|
15541
15562
|
colorScheme: "error",
|
|
@@ -15548,7 +15569,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15548
15569
|
);
|
|
15549
15570
|
}
|
|
15550
15571
|
if (!isMultipleErrors) {
|
|
15551
|
-
return /* @__PURE__ */
|
|
15572
|
+
return /* @__PURE__ */ jsx305(
|
|
15552
15573
|
ErrorText,
|
|
15553
15574
|
{
|
|
15554
15575
|
colorScheme: "error",
|
|
@@ -15560,7 +15581,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
15560
15581
|
id
|
|
15561
15582
|
);
|
|
15562
15583
|
}
|
|
15563
|
-
return /* @__PURE__ */
|
|
15584
|
+
return /* @__PURE__ */ jsx305(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ jsx305(
|
|
15564
15585
|
Text,
|
|
15565
15586
|
{
|
|
15566
15587
|
colorScheme: "error",
|
|
@@ -15645,7 +15666,7 @@ var FormField = ({
|
|
|
15645
15666
|
gridArea: "label-description"
|
|
15646
15667
|
},
|
|
15647
15668
|
children: [
|
|
15648
|
-
!isIntegratedLabel && /* @__PURE__ */
|
|
15669
|
+
!isIntegratedLabel && /* @__PURE__ */ jsx305(
|
|
15649
15670
|
Label,
|
|
15650
15671
|
{
|
|
15651
15672
|
htmlFor: computedId,
|
|
@@ -15653,12 +15674,12 @@ var FormField = ({
|
|
|
15653
15674
|
children: label
|
|
15654
15675
|
}
|
|
15655
15676
|
),
|
|
15656
|
-
hasDescription ? /* @__PURE__ */
|
|
15677
|
+
hasDescription ? /* @__PURE__ */ jsx305(FormControlLabelDescription, { id: descriptionId, children: description }) : null
|
|
15657
15678
|
]
|
|
15658
15679
|
}
|
|
15659
15680
|
) : null,
|
|
15660
15681
|
cloneElement8(children, childProps),
|
|
15661
|
-
hasError ? /* @__PURE__ */
|
|
15682
|
+
hasError ? /* @__PURE__ */ jsx305(
|
|
15662
15683
|
ErrorMessages,
|
|
15663
15684
|
{
|
|
15664
15685
|
errors: computedError,
|
|
@@ -15673,7 +15694,7 @@ FormField.displayName = "FormField_UI";
|
|
|
15673
15694
|
|
|
15674
15695
|
// src/components/FormGroup/RadioGroup.tsx
|
|
15675
15696
|
import { createContext as createContext8, useMemo as useMemo14, useContext as useContext14 } from "react";
|
|
15676
|
-
import { jsx as
|
|
15697
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
15677
15698
|
var RadioGroupContext = createContext8(null);
|
|
15678
15699
|
var useRadioGroup = () => {
|
|
15679
15700
|
return useContext14(RadioGroupContext);
|
|
@@ -15694,15 +15715,15 @@ var RadioGroup = ({
|
|
|
15694
15715
|
value: derivedValue
|
|
15695
15716
|
};
|
|
15696
15717
|
}, [name, derivedValue, onChange]);
|
|
15697
|
-
return /* @__PURE__ */
|
|
15718
|
+
return /* @__PURE__ */ jsx306(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx306(FormGroup, { ...props, children }) });
|
|
15698
15719
|
};
|
|
15699
15720
|
RadioGroup.displayName = "RadioGroup_UI";
|
|
15700
15721
|
|
|
15701
15722
|
// src/components/Grid/Grid.tsx
|
|
15702
15723
|
import { forwardRef as forwardRef22 } from "react";
|
|
15703
|
-
import { styled as
|
|
15724
|
+
import { styled as styled70, css as css37 } from "styled-components";
|
|
15704
15725
|
import { isRecord as isRecord5 } from "@wistia/type-guards";
|
|
15705
|
-
import { jsx as
|
|
15726
|
+
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
15706
15727
|
var DEFAULT_ELEMENT5 = "div";
|
|
15707
15728
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
15708
15729
|
if (minChildWidth === "auto" && maxColumns === "auto") {
|
|
@@ -15730,7 +15751,7 @@ var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
|
15730
15751
|
);
|
|
15731
15752
|
`;
|
|
15732
15753
|
};
|
|
15733
|
-
var StyledGrid =
|
|
15754
|
+
var StyledGrid = styled70.div`
|
|
15734
15755
|
--wui-grid-column-gap: ${({ $columnGap }) => `var(--wui-${$columnGap})`};
|
|
15735
15756
|
--wui-grid-row-gap: ${({ $rowGap }) => `var(--wui-${$rowGap})`};
|
|
15736
15757
|
|
|
@@ -15754,7 +15775,7 @@ var GridComponent = forwardRef22(
|
|
|
15754
15775
|
const { column, row } = isRecord5(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
|
|
15755
15776
|
const responsiveColumns = useResponsiveProp(columns);
|
|
15756
15777
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
15757
|
-
return /* @__PURE__ */
|
|
15778
|
+
return /* @__PURE__ */ jsx307(
|
|
15758
15779
|
StyledGrid,
|
|
15759
15780
|
{
|
|
15760
15781
|
ref,
|
|
@@ -15774,11 +15795,11 @@ GridComponent.displayName = "Grid_UI";
|
|
|
15774
15795
|
var Grid = makePolymorphic(GridComponent);
|
|
15775
15796
|
|
|
15776
15797
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
15777
|
-
import { styled as
|
|
15798
|
+
import { styled as styled71 } from "styled-components";
|
|
15778
15799
|
import { forwardRef as forwardRef23, useEffect as useEffect19, useState as useState22 } from "react";
|
|
15779
15800
|
import { isFunction as isFunction3 } from "@wistia/type-guards";
|
|
15780
|
-
import { jsx as
|
|
15781
|
-
var StyledIconButton =
|
|
15801
|
+
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
15802
|
+
var StyledIconButton = styled71(IconButton)`
|
|
15782
15803
|
/* override size for icon button since prop gets changed by Input */
|
|
15783
15804
|
height: var(--icon-button-size-sm);
|
|
15784
15805
|
width: var(--icon-button-size-sm);
|
|
@@ -15817,7 +15838,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15817
15838
|
return value;
|
|
15818
15839
|
});
|
|
15819
15840
|
};
|
|
15820
|
-
return /* @__PURE__ */
|
|
15841
|
+
return /* @__PURE__ */ jsx308(
|
|
15821
15842
|
Input,
|
|
15822
15843
|
{
|
|
15823
15844
|
"aria-label": "Click to Copy",
|
|
@@ -15825,7 +15846,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15825
15846
|
ref,
|
|
15826
15847
|
disabled,
|
|
15827
15848
|
readOnly: true,
|
|
15828
|
-
rightIcon: /* @__PURE__ */
|
|
15849
|
+
rightIcon: /* @__PURE__ */ jsx308(
|
|
15829
15850
|
StyledIconButton,
|
|
15830
15851
|
{
|
|
15831
15852
|
colorScheme: isCopied ? "success" : "inherit",
|
|
@@ -15833,7 +15854,7 @@ var InputClickToCopy = forwardRef23(
|
|
|
15833
15854
|
label: "Copy to clipboard",
|
|
15834
15855
|
onClick: handleClick,
|
|
15835
15856
|
variant: "ghost",
|
|
15836
|
-
children: isCopied ? /* @__PURE__ */
|
|
15857
|
+
children: isCopied ? /* @__PURE__ */ jsx308(Icon, { type: "checkmark-circle" }) : /* @__PURE__ */ jsx308(Icon, { type: "save-as-copy" })
|
|
15837
15858
|
}
|
|
15838
15859
|
),
|
|
15839
15860
|
value
|
|
@@ -15844,11 +15865,11 @@ var InputClickToCopy = forwardRef23(
|
|
|
15844
15865
|
InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
15845
15866
|
|
|
15846
15867
|
// src/components/InputPassword/InputPassword.tsx
|
|
15847
|
-
import { styled as
|
|
15868
|
+
import { styled as styled72 } from "styled-components";
|
|
15848
15869
|
import { forwardRef as forwardRef24, useState as useState23 } from "react";
|
|
15849
15870
|
import { isFunction as isFunction4 } from "@wistia/type-guards";
|
|
15850
|
-
import { jsx as
|
|
15851
|
-
var StyledIconButton2 =
|
|
15871
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
15872
|
+
var StyledIconButton2 = styled72(IconButton)`
|
|
15852
15873
|
/* override size for icon button since prop gets changed by Input */
|
|
15853
15874
|
height: var(--icon-button-size-sm);
|
|
15854
15875
|
width: var(--icon-button-size-sm);
|
|
@@ -15866,13 +15887,13 @@ var InputPassword = forwardRef24(
|
|
|
15866
15887
|
onVisibilityToggle(newVisibility);
|
|
15867
15888
|
}
|
|
15868
15889
|
};
|
|
15869
|
-
return /* @__PURE__ */
|
|
15890
|
+
return /* @__PURE__ */ jsx309(
|
|
15870
15891
|
Input,
|
|
15871
15892
|
{
|
|
15872
15893
|
...props,
|
|
15873
15894
|
ref,
|
|
15874
15895
|
disabled,
|
|
15875
|
-
rightIcon: /* @__PURE__ */
|
|
15896
|
+
rightIcon: /* @__PURE__ */ jsx309(
|
|
15876
15897
|
StyledIconButton2,
|
|
15877
15898
|
{
|
|
15878
15899
|
disabled,
|
|
@@ -15880,7 +15901,7 @@ var InputPassword = forwardRef24(
|
|
|
15880
15901
|
onClick: handleClick,
|
|
15881
15902
|
tabIndex: disabled ? -1 : 0,
|
|
15882
15903
|
variant: "ghost",
|
|
15883
|
-
children: /* @__PURE__ */
|
|
15904
|
+
children: /* @__PURE__ */ jsx309(Icon, { type: isVisible ? "preview" : "hide" })
|
|
15884
15905
|
}
|
|
15885
15906
|
),
|
|
15886
15907
|
type: isVisible ? "text" : "password"
|
|
@@ -15891,16 +15912,16 @@ var InputPassword = forwardRef24(
|
|
|
15891
15912
|
InputPassword.displayName = "InputPassword_UI";
|
|
15892
15913
|
|
|
15893
15914
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
15894
|
-
import { styled as
|
|
15915
|
+
import { styled as styled73 } from "styled-components";
|
|
15895
15916
|
import { isNotNil as isNotNil29 } from "@wistia/type-guards";
|
|
15896
|
-
import { jsx as
|
|
15897
|
-
var StyledKeyboardShortcut =
|
|
15917
|
+
import { jsx as jsx310, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
15918
|
+
var StyledKeyboardShortcut = styled73.div`
|
|
15898
15919
|
align-items: center;
|
|
15899
15920
|
display: flex;
|
|
15900
15921
|
gap: var(--wui-space-02);
|
|
15901
15922
|
${({ $fullWidth }) => $fullWidth && "width: 100%; justify-content: space-between;"}
|
|
15902
15923
|
`;
|
|
15903
|
-
var StyledKey =
|
|
15924
|
+
var StyledKey = styled73.kbd`
|
|
15904
15925
|
align-items: center;
|
|
15905
15926
|
background: var(--wui-color-bg-surface-secondary);
|
|
15906
15927
|
border-bottom: 1px solid var(--wui-color-border-secondary);
|
|
@@ -15923,11 +15944,11 @@ var StyledKey = styled72.kbd`
|
|
|
15923
15944
|
min-width: 20px;
|
|
15924
15945
|
padding: 0 var(--wui-space-01);
|
|
15925
15946
|
`;
|
|
15926
|
-
var Label2 =
|
|
15947
|
+
var Label2 = styled73.span`
|
|
15927
15948
|
color: var(--wui-color-text);
|
|
15928
15949
|
font-size: 12px;
|
|
15929
15950
|
`;
|
|
15930
|
-
var KeysContainer =
|
|
15951
|
+
var KeysContainer = styled73.div`
|
|
15931
15952
|
display: flex;
|
|
15932
15953
|
gap: var(--wui-space-01);
|
|
15933
15954
|
`;
|
|
@@ -15986,8 +16007,8 @@ var KeyboardShortcut = ({
|
|
|
15986
16007
|
$fullWidth: fullWidth,
|
|
15987
16008
|
...otherProps,
|
|
15988
16009
|
children: [
|
|
15989
|
-
isNotNil29(label) && /* @__PURE__ */
|
|
15990
|
-
/* @__PURE__ */
|
|
16010
|
+
isNotNil29(label) && /* @__PURE__ */ jsx310(Label2, { children: label }),
|
|
16011
|
+
/* @__PURE__ */ jsx310(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx310(
|
|
15991
16012
|
StyledKey,
|
|
15992
16013
|
{
|
|
15993
16014
|
children: keyToString(keyboardKey)
|
|
@@ -16001,25 +16022,25 @@ KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
|
16001
16022
|
|
|
16002
16023
|
// src/components/List/List.tsx
|
|
16003
16024
|
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
16004
|
-
import { styled as
|
|
16025
|
+
import { styled as styled75, css as css38 } from "styled-components";
|
|
16005
16026
|
|
|
16006
16027
|
// src/components/List/ListItem.tsx
|
|
16007
|
-
import { styled as
|
|
16028
|
+
import { styled as styled74 } from "styled-components";
|
|
16008
16029
|
import { isNil as isNil17 } from "@wistia/type-guards";
|
|
16009
|
-
import { jsx as
|
|
16010
|
-
var ListItemComponent =
|
|
16030
|
+
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
16031
|
+
var ListItemComponent = styled74.li`
|
|
16011
16032
|
margin-bottom: var(--wui-space-02);
|
|
16012
16033
|
`;
|
|
16013
16034
|
var ListItem = ({ children }) => {
|
|
16014
16035
|
if (isNil17(children)) {
|
|
16015
16036
|
return null;
|
|
16016
16037
|
}
|
|
16017
|
-
return /* @__PURE__ */
|
|
16038
|
+
return /* @__PURE__ */ jsx311(ListItemComponent, { children });
|
|
16018
16039
|
};
|
|
16019
16040
|
ListItem.displayName = "ListItem_UI";
|
|
16020
16041
|
|
|
16021
16042
|
// src/components/List/List.tsx
|
|
16022
|
-
import { jsx as
|
|
16043
|
+
import { jsx as jsx312, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
16023
16044
|
var spacesStyle = css38`
|
|
16024
16045
|
overflow: hidden;
|
|
16025
16046
|
padding-left: 0;
|
|
@@ -16078,7 +16099,7 @@ var unbulletedStyle = css38`
|
|
|
16078
16099
|
list-style: none;
|
|
16079
16100
|
padding-left: 0;
|
|
16080
16101
|
`;
|
|
16081
|
-
var ListComponent =
|
|
16102
|
+
var ListComponent = styled75.ul`
|
|
16082
16103
|
list-style-position: outside;
|
|
16083
16104
|
margin: 0 0 var(--wui-space-01);
|
|
16084
16105
|
padding: 0 0 0 var(--wui-space-04);
|
|
@@ -16105,7 +16126,7 @@ var ListComponent = styled74.ul`
|
|
|
16105
16126
|
`;
|
|
16106
16127
|
var renderListComponent = (listItems, variant, { ...otherProps }) => {
|
|
16107
16128
|
const elementType = variant === "ordered" ? "ol" : "ul";
|
|
16108
|
-
return /* @__PURE__ */
|
|
16129
|
+
return /* @__PURE__ */ jsx312(
|
|
16109
16130
|
ListComponent,
|
|
16110
16131
|
{
|
|
16111
16132
|
as: elementType,
|
|
@@ -16130,7 +16151,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
16130
16151
|
if (Array.isArray(item)) {
|
|
16131
16152
|
return null;
|
|
16132
16153
|
}
|
|
16133
|
-
return /* @__PURE__ */
|
|
16154
|
+
return /* @__PURE__ */ jsx312(ListItem, { children: item }, key);
|
|
16134
16155
|
});
|
|
16135
16156
|
return renderListComponent(items, variant, otherProps);
|
|
16136
16157
|
};
|
|
@@ -16158,9 +16179,9 @@ var List = ({
|
|
|
16158
16179
|
List.displayName = "List_UI";
|
|
16159
16180
|
|
|
16160
16181
|
// src/components/Mark/Mark.tsx
|
|
16161
|
-
import { styled as
|
|
16162
|
-
import { jsx as
|
|
16163
|
-
var StyledMark =
|
|
16182
|
+
import { styled as styled76 } from "styled-components";
|
|
16183
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
16184
|
+
var StyledMark = styled76.mark`
|
|
16164
16185
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16165
16186
|
background-color: var(--wui-color-bg-surface-tertiary);
|
|
16166
16187
|
color: var(--wui-color-text);
|
|
@@ -16168,7 +16189,7 @@ var StyledMark = styled75.mark`
|
|
|
16168
16189
|
padding-inline: 0.1em;
|
|
16169
16190
|
margin-inline: -0.1em;
|
|
16170
16191
|
`;
|
|
16171
|
-
var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */
|
|
16192
|
+
var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */ jsx313(
|
|
16172
16193
|
StyledMark,
|
|
16173
16194
|
{
|
|
16174
16195
|
$colorScheme: colorScheme,
|
|
@@ -16179,7 +16200,7 @@ var Mark = ({ children, colorScheme = "inherit", ...props }) => /* @__PURE__ */
|
|
|
16179
16200
|
Mark.displayName = "Mark_UI";
|
|
16180
16201
|
|
|
16181
16202
|
// src/components/Markdown/Markdown.tsx
|
|
16182
|
-
import { styled as
|
|
16203
|
+
import { styled as styled77 } from "styled-components";
|
|
16183
16204
|
import ReactMarkdown from "react-markdown";
|
|
16184
16205
|
|
|
16185
16206
|
// src/css/baseMarkdownCss.tsx
|
|
@@ -16307,8 +16328,8 @@ var baseMarkdownCss = (textSize = "body2") => css39`
|
|
|
16307
16328
|
`;
|
|
16308
16329
|
|
|
16309
16330
|
// src/components/Markdown/Markdown.tsx
|
|
16310
|
-
import { jsx as
|
|
16311
|
-
var StyledMarkdownWrapper =
|
|
16331
|
+
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
16332
|
+
var StyledMarkdownWrapper = styled77.div`
|
|
16312
16333
|
${({ $textSize }) => baseMarkdownCss($textSize)}
|
|
16313
16334
|
`;
|
|
16314
16335
|
var Markdown = ({
|
|
@@ -16317,49 +16338,250 @@ var Markdown = ({
|
|
|
16317
16338
|
...otherProps
|
|
16318
16339
|
}) => {
|
|
16319
16340
|
const responsiveTextSize = useResponsiveProp(textSize);
|
|
16320
|
-
return /* @__PURE__ */
|
|
16341
|
+
return /* @__PURE__ */ jsx314(
|
|
16321
16342
|
StyledMarkdownWrapper,
|
|
16322
16343
|
{
|
|
16323
16344
|
$textSize: responsiveTextSize,
|
|
16324
16345
|
...otherProps,
|
|
16325
|
-
children: /* @__PURE__ */
|
|
16346
|
+
children: /* @__PURE__ */ jsx314(ReactMarkdown, { children })
|
|
16326
16347
|
}
|
|
16327
16348
|
);
|
|
16328
16349
|
};
|
|
16329
16350
|
Markdown.displayName = "Markdown_UI";
|
|
16330
16351
|
|
|
16352
|
+
// src/components/Meter/Meter.tsx
|
|
16353
|
+
import { styled as styled78 } from "styled-components";
|
|
16354
|
+
import { useId as useId5 } from "react";
|
|
16355
|
+
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
16356
|
+
import { jsx as jsx315, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
16357
|
+
var MeterWrapper = styled78.div`
|
|
16358
|
+
--meter-height: 16px;
|
|
16359
|
+
|
|
16360
|
+
display: flex;
|
|
16361
|
+
flex-direction: column;
|
|
16362
|
+
gap: var(--wui-space-02);
|
|
16363
|
+
`;
|
|
16364
|
+
var MeterLabelContainer = styled78.div`
|
|
16365
|
+
display: flex;
|
|
16366
|
+
justify-content: space-between;
|
|
16367
|
+
align-items: baseline;
|
|
16368
|
+
`;
|
|
16369
|
+
var MeterLabel = styled78.div`
|
|
16370
|
+
font-family: var(--wui-typography-heading-5-family);
|
|
16371
|
+
line-height: var(--wui-typography-heading-5-line-height);
|
|
16372
|
+
font-size: var(--wui-typography-heading-5-size);
|
|
16373
|
+
font-weight: var(--wui-typography-heading-5-weight);
|
|
16374
|
+
`;
|
|
16375
|
+
var MeterLabelMeta = styled78.div`
|
|
16376
|
+
font-family: var(--wui-typography-heading-5-family);
|
|
16377
|
+
line-height: var(--wui-typography-heading-5-line-height);
|
|
16378
|
+
font-size: var(--wui-typography-heading-5-size);
|
|
16379
|
+
font-weight: var(--wui-typography-heading-5-weight);
|
|
16380
|
+
`;
|
|
16381
|
+
var MeterBarContainer = styled78.div`
|
|
16382
|
+
position: relative;
|
|
16383
|
+
overflow: hidden;
|
|
16384
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
16385
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
16386
|
+
width: 100%;
|
|
16387
|
+
height: var(--meter-height);
|
|
16388
|
+
transform: translateZ(0);
|
|
16389
|
+
`;
|
|
16390
|
+
var MeterSegmentBar = styled78.div`
|
|
16391
|
+
position: absolute;
|
|
16392
|
+
top: 0;
|
|
16393
|
+
left: ${({ $offset }) => $offset}%;
|
|
16394
|
+
width: ${({ $width }) => $width}%;
|
|
16395
|
+
height: 100%;
|
|
16396
|
+
background-color: ${({ $color }) => `var(--wui-${$color})`};
|
|
16397
|
+
|
|
16398
|
+
&:first-child {
|
|
16399
|
+
border-top-left-radius: var(--wui-border-radius-rounded);
|
|
16400
|
+
border-bottom-left-radius: var(--wui-border-radius-rounded);
|
|
16401
|
+
}
|
|
16402
|
+
|
|
16403
|
+
&:last-child {
|
|
16404
|
+
border-top-right-radius: var(--wui-border-radius-rounded);
|
|
16405
|
+
border-bottom-right-radius: var(--wui-border-radius-rounded);
|
|
16406
|
+
}
|
|
16407
|
+
`;
|
|
16408
|
+
var MeterDescription = styled78.div`
|
|
16409
|
+
line-height: var(--wui-typography-label-3-line-height);
|
|
16410
|
+
font-size: var(--wui-typography-label-3-size);
|
|
16411
|
+
font-weight: var(--wui-typography-label-3-weight);
|
|
16412
|
+
color: var(--wui-color-text-secondary);
|
|
16413
|
+
`;
|
|
16414
|
+
var MeterKey = styled78.div`
|
|
16415
|
+
display: flex;
|
|
16416
|
+
flex-wrap: wrap;
|
|
16417
|
+
gap: var(--wui-space-03);
|
|
16418
|
+
`;
|
|
16419
|
+
var MeterKeyItem = styled78.div`
|
|
16420
|
+
display: flex;
|
|
16421
|
+
align-items: center;
|
|
16422
|
+
gap: var(--wui-space-01);
|
|
16423
|
+
`;
|
|
16424
|
+
var MeterKeyColorIndicator = styled78.div`
|
|
16425
|
+
width: 8px;
|
|
16426
|
+
height: 8px;
|
|
16427
|
+
border-radius: 50%;
|
|
16428
|
+
background-color: ${({ $color }) => `var(--wui-${$color})`};
|
|
16429
|
+
flex-shrink: 0;
|
|
16430
|
+
`;
|
|
16431
|
+
var MeterKeyLabel = styled78.span`
|
|
16432
|
+
line-height: var(--wui-typography-label-3-line-height);
|
|
16433
|
+
font-size: var(--wui-typography-label-3-size);
|
|
16434
|
+
font-weight: var(--wui-typography-label-3-weight);
|
|
16435
|
+
color: var(--wui-color-text-secondary);
|
|
16436
|
+
`;
|
|
16437
|
+
var nodeToString = (node) => {
|
|
16438
|
+
if (typeof node === "string") {
|
|
16439
|
+
return node;
|
|
16440
|
+
}
|
|
16441
|
+
if (typeof node === "number") {
|
|
16442
|
+
return String(node);
|
|
16443
|
+
}
|
|
16444
|
+
if (node == null || typeof node === "boolean") {
|
|
16445
|
+
return "";
|
|
16446
|
+
}
|
|
16447
|
+
if (Array.isArray(node)) {
|
|
16448
|
+
return node.map(nodeToString).join("");
|
|
16449
|
+
}
|
|
16450
|
+
if (typeof node === "object" && "props" in node) {
|
|
16451
|
+
const element = node;
|
|
16452
|
+
if (element.props?.children != null) {
|
|
16453
|
+
return nodeToString(element.props.children);
|
|
16454
|
+
}
|
|
16455
|
+
}
|
|
16456
|
+
return "";
|
|
16457
|
+
};
|
|
16458
|
+
var Meter = ({
|
|
16459
|
+
segments,
|
|
16460
|
+
label,
|
|
16461
|
+
labelMeta,
|
|
16462
|
+
description,
|
|
16463
|
+
hideKey = false,
|
|
16464
|
+
max = 100,
|
|
16465
|
+
"aria-label": ariaLabel,
|
|
16466
|
+
...props
|
|
16467
|
+
}) => {
|
|
16468
|
+
const labelId = useId5();
|
|
16469
|
+
const descriptionId = useId5();
|
|
16470
|
+
const segmentsWithOffsets = segments.reduce((acc, segment) => {
|
|
16471
|
+
const offset = acc.reduce((sum, prev) => sum + prev.widthPercent, 0);
|
|
16472
|
+
const widthPercent = segment.value / max * 100;
|
|
16473
|
+
acc.push({ ...segment, offset, widthPercent });
|
|
16474
|
+
return acc;
|
|
16475
|
+
}, []);
|
|
16476
|
+
const keySegments = segmentsWithOffsets.filter(
|
|
16477
|
+
(segment) => isNotNil31(segment.label)
|
|
16478
|
+
);
|
|
16479
|
+
const totalValue = segments.reduce((sum, segment) => sum + segment.value, 0);
|
|
16480
|
+
const generateAriaDescription = () => {
|
|
16481
|
+
const segmentDescriptions = segments.filter((segment) => isNotNil31(segment.label)).map((segment) => `${nodeToString(segment.label)}: ${segment.value}%`).join(", ");
|
|
16482
|
+
const totalDescription = `Total: ${totalValue} out of ${max}`;
|
|
16483
|
+
return segmentDescriptions ? `${segmentDescriptions}. ${totalDescription}` : totalDescription;
|
|
16484
|
+
};
|
|
16485
|
+
const effectiveAriaLabel = ariaLabel ?? (isNotNil31(label) ? nodeToString(label) : "Data meter");
|
|
16486
|
+
return /* @__PURE__ */ jsxs50(MeterWrapper, { ...props, children: [
|
|
16487
|
+
/* @__PURE__ */ jsx315(
|
|
16488
|
+
ScreenReaderOnly,
|
|
16489
|
+
{
|
|
16490
|
+
id: descriptionId,
|
|
16491
|
+
text: generateAriaDescription()
|
|
16492
|
+
}
|
|
16493
|
+
),
|
|
16494
|
+
isNotNil31(label) || isNotNil31(labelMeta) ? /* @__PURE__ */ jsxs50(MeterLabelContainer, { id: labelId, children: [
|
|
16495
|
+
isNotNil31(label) ? /* @__PURE__ */ jsx315(MeterLabel, { children: label }) : null,
|
|
16496
|
+
isNotNil31(labelMeta) ? /* @__PURE__ */ jsx315(MeterLabelMeta, { children: labelMeta }) : null
|
|
16497
|
+
] }) : null,
|
|
16498
|
+
/* @__PURE__ */ jsx315(
|
|
16499
|
+
MeterBarContainer,
|
|
16500
|
+
{
|
|
16501
|
+
"aria-describedby": descriptionId,
|
|
16502
|
+
"aria-label": effectiveAriaLabel,
|
|
16503
|
+
"aria-labelledby": isNotNil31(label) || isNotNil31(labelMeta) ? labelId : void 0,
|
|
16504
|
+
"aria-valuemax": max,
|
|
16505
|
+
"aria-valuemin": 0,
|
|
16506
|
+
"aria-valuenow": totalValue,
|
|
16507
|
+
role: "meter",
|
|
16508
|
+
children: segmentsWithOffsets.map((segment) => /* @__PURE__ */ jsx315(
|
|
16509
|
+
MeterSegmentBar,
|
|
16510
|
+
{
|
|
16511
|
+
$color: segment.color,
|
|
16512
|
+
$offset: segment.offset,
|
|
16513
|
+
$width: segment.widthPercent,
|
|
16514
|
+
"aria-hidden": "true"
|
|
16515
|
+
},
|
|
16516
|
+
`${segment.color}-${segment.value}-${segment.offset}`
|
|
16517
|
+
))
|
|
16518
|
+
}
|
|
16519
|
+
),
|
|
16520
|
+
isNotNil31(description) ? /* @__PURE__ */ jsx315(MeterDescription, { children: description }) : null,
|
|
16521
|
+
!hideKey && keySegments.length > 0 ? /* @__PURE__ */ jsx315(
|
|
16522
|
+
MeterKey,
|
|
16523
|
+
{
|
|
16524
|
+
"aria-label": "Meter legend",
|
|
16525
|
+
role: "list",
|
|
16526
|
+
children: keySegments.map((segment) => /* @__PURE__ */ jsxs50(
|
|
16527
|
+
MeterKeyItem,
|
|
16528
|
+
{
|
|
16529
|
+
role: "listitem",
|
|
16530
|
+
children: [
|
|
16531
|
+
/* @__PURE__ */ jsx315(
|
|
16532
|
+
MeterKeyColorIndicator,
|
|
16533
|
+
{
|
|
16534
|
+
$color: segment.color,
|
|
16535
|
+
"aria-hidden": "true"
|
|
16536
|
+
}
|
|
16537
|
+
),
|
|
16538
|
+
/* @__PURE__ */ jsx315(MeterKeyLabel, { children: segment.label })
|
|
16539
|
+
]
|
|
16540
|
+
},
|
|
16541
|
+
`${segment.color}-${segment.value}-${segment.offset}-${nodeToString(segment.label)}`
|
|
16542
|
+
))
|
|
16543
|
+
}
|
|
16544
|
+
) : null
|
|
16545
|
+
] });
|
|
16546
|
+
};
|
|
16547
|
+
Meter.displayName = "Meter_UI";
|
|
16548
|
+
|
|
16331
16549
|
// src/components/Modal/Modal.tsx
|
|
16332
16550
|
import { forwardRef as forwardRef26 } from "react";
|
|
16333
|
-
import { styled as
|
|
16334
|
-
import {
|
|
16335
|
-
|
|
16551
|
+
import { styled as styled83 } from "styled-components";
|
|
16552
|
+
import {
|
|
16553
|
+
Root as DialogRoot,
|
|
16554
|
+
Portal as DialogPortal,
|
|
16555
|
+
Description as DialogDescription
|
|
16556
|
+
} from "@radix-ui/react-dialog";
|
|
16557
|
+
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
16336
16558
|
|
|
16337
16559
|
// src/components/Modal/ModalHeader.tsx
|
|
16338
|
-
import { styled as
|
|
16560
|
+
import { styled as styled80 } from "styled-components";
|
|
16339
16561
|
import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
16340
16562
|
|
|
16341
16563
|
// src/components/Modal/ModalCloseButton.tsx
|
|
16342
|
-
import { styled as
|
|
16564
|
+
import { styled as styled79 } from "styled-components";
|
|
16343
16565
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
16344
|
-
import { jsx as
|
|
16345
|
-
var CloseButton =
|
|
16566
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
16567
|
+
var CloseButton = styled79(DialogClose)`
|
|
16346
16568
|
align-self: start;
|
|
16347
16569
|
`;
|
|
16348
16570
|
var ModalCloseButton = () => {
|
|
16349
|
-
return /* @__PURE__ */
|
|
16571
|
+
return /* @__PURE__ */ jsx316(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx316(
|
|
16350
16572
|
IconButton,
|
|
16351
16573
|
{
|
|
16352
16574
|
label: "Dismiss modal",
|
|
16353
16575
|
size: "sm",
|
|
16354
16576
|
variant: "ghost",
|
|
16355
|
-
children: /* @__PURE__ */
|
|
16577
|
+
children: /* @__PURE__ */ jsx316(Icon, { type: "close" })
|
|
16356
16578
|
}
|
|
16357
16579
|
) });
|
|
16358
16580
|
};
|
|
16359
16581
|
|
|
16360
16582
|
// src/components/Modal/ModalHeader.tsx
|
|
16361
|
-
import { jsx as
|
|
16362
|
-
var Header =
|
|
16583
|
+
import { jsx as jsx317, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
16584
|
+
var Header = styled80.header`
|
|
16363
16585
|
display: flex;
|
|
16364
16586
|
order: 1;
|
|
16365
16587
|
padding: 0 var(--wui-space-05);
|
|
@@ -16379,7 +16601,7 @@ var Header = styled78.header`
|
|
|
16379
16601
|
top: var(--wui-space-03);
|
|
16380
16602
|
}
|
|
16381
16603
|
`;
|
|
16382
|
-
var Title =
|
|
16604
|
+
var Title = styled80(DialogTitle)`
|
|
16383
16605
|
font-family: var(--wui-typography-heading-2-family);
|
|
16384
16606
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
16385
16607
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -16390,15 +16612,15 @@ var ModalHeader = ({
|
|
|
16390
16612
|
hideTitle,
|
|
16391
16613
|
hideCloseButton
|
|
16392
16614
|
}) => {
|
|
16393
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */
|
|
16394
|
-
return /* @__PURE__ */
|
|
16615
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx317(ScreenReaderOnly, { children: /* @__PURE__ */ jsx317(Title, { children: title }) }) : /* @__PURE__ */ jsx317(Title, { children: title });
|
|
16616
|
+
return /* @__PURE__ */ jsxs51(
|
|
16395
16617
|
Header,
|
|
16396
16618
|
{
|
|
16397
16619
|
$hideCloseButon: hideCloseButton,
|
|
16398
16620
|
$hideTitle: hideTitle,
|
|
16399
16621
|
children: [
|
|
16400
16622
|
TitleComponent,
|
|
16401
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
16623
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx317(ModalCloseButton, {})
|
|
16402
16624
|
]
|
|
16403
16625
|
}
|
|
16404
16626
|
);
|
|
@@ -16406,7 +16628,7 @@ var ModalHeader = ({
|
|
|
16406
16628
|
|
|
16407
16629
|
// src/components/Modal/ModalContent.tsx
|
|
16408
16630
|
import { forwardRef as forwardRef25 } from "react";
|
|
16409
|
-
import { styled as
|
|
16631
|
+
import { styled as styled81, css as css40, keyframes as keyframes5 } from "styled-components";
|
|
16410
16632
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
16411
16633
|
|
|
16412
16634
|
// src/components/Modal/constants.ts
|
|
@@ -16414,7 +16636,7 @@ var DEFAULT_MODAL_WIDTH = "532px";
|
|
|
16414
16636
|
|
|
16415
16637
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
16416
16638
|
import { useRef as useRef21, useEffect as useEffect20 } from "react";
|
|
16417
|
-
import { isNotNil as
|
|
16639
|
+
import { isNotNil as isNotNil32 } from "@wistia/type-guards";
|
|
16418
16640
|
var useFocusRestore = () => {
|
|
16419
16641
|
const previouslyFocusedRef = useRef21(null);
|
|
16420
16642
|
useEffect20(() => {
|
|
@@ -16422,7 +16644,7 @@ var useFocusRestore = () => {
|
|
|
16422
16644
|
}, []);
|
|
16423
16645
|
useEffect20(() => {
|
|
16424
16646
|
return () => {
|
|
16425
|
-
if (
|
|
16647
|
+
if (isNotNil32(previouslyFocusedRef.current)) {
|
|
16426
16648
|
setTimeout(() => {
|
|
16427
16649
|
previouslyFocusedRef.current?.focus();
|
|
16428
16650
|
}, 0);
|
|
@@ -16432,7 +16654,7 @@ var useFocusRestore = () => {
|
|
|
16432
16654
|
};
|
|
16433
16655
|
|
|
16434
16656
|
// src/components/Modal/ModalContent.tsx
|
|
16435
|
-
import { jsx as
|
|
16657
|
+
import { jsx as jsx318 } from "react/jsx-runtime";
|
|
16436
16658
|
var modalEnter = keyframes5`
|
|
16437
16659
|
from {
|
|
16438
16660
|
opacity: 0;
|
|
@@ -16530,7 +16752,7 @@ var positionStyleMap = {
|
|
|
16530
16752
|
"fixed-top": fixedTopModalStyles,
|
|
16531
16753
|
"right-side-panel": rightSidePanelModalStyles
|
|
16532
16754
|
};
|
|
16533
|
-
var StyledModalContent =
|
|
16755
|
+
var StyledModalContent = styled81(DialogContent)`
|
|
16534
16756
|
position: fixed;
|
|
16535
16757
|
display: flex;
|
|
16536
16758
|
flex-direction: column;
|
|
@@ -16560,13 +16782,12 @@ var StyledModalContent = styled79(DialogContent)`
|
|
|
16560
16782
|
var ModalContent = forwardRef25(
|
|
16561
16783
|
({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
|
|
16562
16784
|
useFocusRestore();
|
|
16563
|
-
return /* @__PURE__ */
|
|
16785
|
+
return /* @__PURE__ */ jsx318(
|
|
16564
16786
|
StyledModalContent,
|
|
16565
16787
|
{
|
|
16566
16788
|
ref,
|
|
16567
16789
|
$positionVariant: positionVariant,
|
|
16568
16790
|
$width: width,
|
|
16569
|
-
"aria-describedby": void 0,
|
|
16570
16791
|
...props,
|
|
16571
16792
|
children
|
|
16572
16793
|
}
|
|
@@ -16576,7 +16797,7 @@ var ModalContent = forwardRef25(
|
|
|
16576
16797
|
|
|
16577
16798
|
// src/components/Modal/ModalOverlay.tsx
|
|
16578
16799
|
import { DialogOverlay } from "@radix-ui/react-dialog";
|
|
16579
|
-
import { styled as
|
|
16800
|
+
import { styled as styled82, keyframes as keyframes6 } from "styled-components";
|
|
16580
16801
|
var backdropShow = keyframes6`
|
|
16581
16802
|
from {
|
|
16582
16803
|
opacity: 0;
|
|
@@ -16595,7 +16816,7 @@ var backdropHide = keyframes6`
|
|
|
16595
16816
|
opacity: 0;
|
|
16596
16817
|
}
|
|
16597
16818
|
`;
|
|
16598
|
-
var ModalOverlay =
|
|
16819
|
+
var ModalOverlay = styled82(DialogOverlay)`
|
|
16599
16820
|
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
16600
16821
|
background: var(--wui-color-backdrop);
|
|
16601
16822
|
inset: 0;
|
|
@@ -16608,19 +16829,20 @@ var ModalOverlay = styled80(DialogOverlay)`
|
|
|
16608
16829
|
`;
|
|
16609
16830
|
|
|
16610
16831
|
// src/components/Modal/Modal.tsx
|
|
16611
|
-
import { jsx as
|
|
16612
|
-
var
|
|
16832
|
+
import { jsx as jsx319, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16833
|
+
var ModalHiddenDescription = styled83(DialogDescription)({ ...visuallyHiddenStyle });
|
|
16834
|
+
var ModalBody = styled83.div`
|
|
16613
16835
|
flex-direction: column;
|
|
16614
16836
|
display: flex;
|
|
16615
16837
|
flex: 1 0 0;
|
|
16616
16838
|
padding: 0 var(--wui-space-05);
|
|
16617
16839
|
`;
|
|
16618
|
-
var ModalScrollArea =
|
|
16840
|
+
var ModalScrollArea = styled83.div`
|
|
16619
16841
|
order: 2;
|
|
16620
16842
|
max-height: 90vh;
|
|
16621
16843
|
overflow-y: auto;
|
|
16622
16844
|
`;
|
|
16623
|
-
var ModalFooter =
|
|
16845
|
+
var ModalFooter = styled83.footer`
|
|
16624
16846
|
padding: 0 var(--wui-space-05);
|
|
16625
16847
|
order: 3;
|
|
16626
16848
|
`;
|
|
@@ -16638,23 +16860,23 @@ var Modal = forwardRef26(
|
|
|
16638
16860
|
width = DEFAULT_MODAL_WIDTH,
|
|
16639
16861
|
...props
|
|
16640
16862
|
}, ref) => {
|
|
16641
|
-
return /* @__PURE__ */
|
|
16863
|
+
return /* @__PURE__ */ jsx319(
|
|
16642
16864
|
DialogRoot,
|
|
16643
16865
|
{
|
|
16644
16866
|
onOpenChange: (open2) => {
|
|
16645
|
-
if (!open2 &&
|
|
16867
|
+
if (!open2 && isNotNil33(onRequestClose)) {
|
|
16646
16868
|
onRequestClose();
|
|
16647
16869
|
}
|
|
16648
16870
|
},
|
|
16649
16871
|
open: isOpen,
|
|
16650
|
-
children: /* @__PURE__ */
|
|
16651
|
-
/* @__PURE__ */
|
|
16652
|
-
/* @__PURE__ */
|
|
16872
|
+
children: /* @__PURE__ */ jsxs52(DialogPortal, { children: [
|
|
16873
|
+
/* @__PURE__ */ jsx319(ModalOverlay, {}),
|
|
16874
|
+
/* @__PURE__ */ jsxs52(
|
|
16653
16875
|
ModalContent,
|
|
16654
16876
|
{
|
|
16655
16877
|
ref,
|
|
16656
16878
|
onOpenAutoFocus: (event) => {
|
|
16657
|
-
if (
|
|
16879
|
+
if (isNotNil33(initialFocusRef) && initialFocusRef.current) {
|
|
16658
16880
|
event.preventDefault();
|
|
16659
16881
|
requestAnimationFrame(() => {
|
|
16660
16882
|
initialFocusRef.current?.focus();
|
|
@@ -16665,16 +16887,17 @@ var Modal = forwardRef26(
|
|
|
16665
16887
|
width,
|
|
16666
16888
|
...props,
|
|
16667
16889
|
children: [
|
|
16668
|
-
/* @__PURE__ */
|
|
16669
|
-
|
|
16670
|
-
hideCloseButton && hideTitle ? null : /* @__PURE__ */
|
|
16890
|
+
/* @__PURE__ */ jsx319(ModalScrollArea, { children: /* @__PURE__ */ jsx319(ModalBody, { children }) }),
|
|
16891
|
+
isNotNil33(footer) ? /* @__PURE__ */ jsx319(ModalFooter, { children: footer }) : null,
|
|
16892
|
+
hideCloseButton && hideTitle ? null : /* @__PURE__ */ jsx319(
|
|
16671
16893
|
ModalHeader,
|
|
16672
16894
|
{
|
|
16673
16895
|
hideCloseButton,
|
|
16674
16896
|
hideTitle,
|
|
16675
16897
|
title
|
|
16676
16898
|
}
|
|
16677
|
-
)
|
|
16899
|
+
),
|
|
16900
|
+
/* @__PURE__ */ jsx319(ModalHiddenDescription, {})
|
|
16678
16901
|
]
|
|
16679
16902
|
}
|
|
16680
16903
|
)
|
|
@@ -16686,9 +16909,9 @@ var Modal = forwardRef26(
|
|
|
16686
16909
|
Modal.displayName = "Modal_UI";
|
|
16687
16910
|
|
|
16688
16911
|
// src/components/Modal/ModalCallouts.tsx
|
|
16689
|
-
import { jsx as
|
|
16912
|
+
import { jsx as jsx320, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16690
16913
|
var ModalCallouts = ({ children }) => {
|
|
16691
|
-
return /* @__PURE__ */
|
|
16914
|
+
return /* @__PURE__ */ jsx320(
|
|
16692
16915
|
Stack,
|
|
16693
16916
|
{
|
|
16694
16917
|
direction: "horizontal",
|
|
@@ -16699,9 +16922,9 @@ var ModalCallouts = ({ children }) => {
|
|
|
16699
16922
|
};
|
|
16700
16923
|
ModalCallouts.displayName = "ModalCallouts_UI";
|
|
16701
16924
|
var ModalCallout = ({ title, image, children }) => {
|
|
16702
|
-
return /* @__PURE__ */
|
|
16925
|
+
return /* @__PURE__ */ jsxs53(Stack, { direction: "vertical", children: [
|
|
16703
16926
|
image,
|
|
16704
|
-
/* @__PURE__ */
|
|
16927
|
+
/* @__PURE__ */ jsx320(Heading, { variant: "heading4", children: title }),
|
|
16705
16928
|
children
|
|
16706
16929
|
] });
|
|
16707
16930
|
};
|
|
@@ -16709,19 +16932,19 @@ ModalCallout.displayName = "ModalCallout_UI";
|
|
|
16709
16932
|
|
|
16710
16933
|
// src/components/Popover/Popover.tsx
|
|
16711
16934
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
16712
|
-
import { styled as
|
|
16935
|
+
import { styled as styled85, css as css42 } from "styled-components";
|
|
16713
16936
|
|
|
16714
16937
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
16715
|
-
import { isNotNil as
|
|
16938
|
+
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
16716
16939
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
16717
|
-
return
|
|
16940
|
+
return isNotNil34(onOpenChange) && isNotNil34(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
16718
16941
|
};
|
|
16719
16942
|
|
|
16720
16943
|
// src/components/Popover/PopoverArrow.tsx
|
|
16721
16944
|
import { PopoverArrow as RadixPopoverArrow } from "@radix-ui/react-popover";
|
|
16722
|
-
import { styled as
|
|
16723
|
-
import { jsx as
|
|
16724
|
-
var StyledPath =
|
|
16945
|
+
import { styled as styled84, css as css41, keyframes as keyframes7 } from "styled-components";
|
|
16946
|
+
import { jsx as jsx321, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
16947
|
+
var StyledPath = styled84.path`
|
|
16725
16948
|
fill: var(--wui-color-border-secondary);
|
|
16726
16949
|
`;
|
|
16727
16950
|
var circleAnimation = keyframes7`
|
|
@@ -16732,7 +16955,7 @@ var circleAnimation = keyframes7`
|
|
|
16732
16955
|
opacity: 0;
|
|
16733
16956
|
}
|
|
16734
16957
|
`;
|
|
16735
|
-
var StyledCircle =
|
|
16958
|
+
var StyledCircle = styled84.circle`
|
|
16736
16959
|
stroke: var(--wui-color-border-active);
|
|
16737
16960
|
animation-duration: 2s;
|
|
16738
16961
|
animation-iteration-count: infinite;
|
|
@@ -16759,7 +16982,7 @@ var StyledCircle = styled82.circle`
|
|
|
16759
16982
|
}
|
|
16760
16983
|
`;
|
|
16761
16984
|
var PopoverArrow = ({ isAnimated }) => {
|
|
16762
|
-
return /* @__PURE__ */
|
|
16985
|
+
return /* @__PURE__ */ jsx321(RadixPopoverArrow, { asChild: true, children: /* @__PURE__ */ jsxs54(
|
|
16763
16986
|
"svg",
|
|
16764
16987
|
{
|
|
16765
16988
|
fill: "none",
|
|
@@ -16768,8 +16991,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16768
16991
|
width: "48",
|
|
16769
16992
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16770
16993
|
children: [
|
|
16771
|
-
/* @__PURE__ */
|
|
16772
|
-
/* @__PURE__ */
|
|
16994
|
+
/* @__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" }),
|
|
16995
|
+
/* @__PURE__ */ jsx321(
|
|
16773
16996
|
StyledCircle,
|
|
16774
16997
|
{
|
|
16775
16998
|
$isAnimated: isAnimated,
|
|
@@ -16780,7 +17003,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16780
17003
|
strokeWidth: "4"
|
|
16781
17004
|
}
|
|
16782
17005
|
),
|
|
16783
|
-
/* @__PURE__ */
|
|
17006
|
+
/* @__PURE__ */ jsx321(
|
|
16784
17007
|
StyledCircle,
|
|
16785
17008
|
{
|
|
16786
17009
|
$isAnimated: isAnimated,
|
|
@@ -16798,8 +17021,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
16798
17021
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
16799
17022
|
|
|
16800
17023
|
// src/components/Popover/Popover.tsx
|
|
16801
|
-
import { jsx as
|
|
16802
|
-
var StyledContent2 =
|
|
17024
|
+
import { jsx as jsx322, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
17025
|
+
var StyledContent2 = styled85(Content2)`
|
|
16803
17026
|
z-index: var(--wui-zindex-popover);
|
|
16804
17027
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16805
17028
|
${({ $unstyled }) => !$unstyled && css42`
|
|
@@ -16838,9 +17061,9 @@ var Popover = ({
|
|
|
16838
17061
|
"--wui-popover-max-width": maxWidth,
|
|
16839
17062
|
"--wui-popover-max-height": maxHeight
|
|
16840
17063
|
};
|
|
16841
|
-
return /* @__PURE__ */
|
|
16842
|
-
/* @__PURE__ */
|
|
16843
|
-
/* @__PURE__ */
|
|
17064
|
+
return /* @__PURE__ */ jsxs55(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
17065
|
+
/* @__PURE__ */ jsx322(Trigger2, { asChild: true, children: trigger }),
|
|
17066
|
+
/* @__PURE__ */ jsx322(Portal, { children: /* @__PURE__ */ jsxs55(
|
|
16844
17067
|
StyledContent2,
|
|
16845
17068
|
{
|
|
16846
17069
|
$colorScheme: colorScheme,
|
|
@@ -16849,17 +17072,17 @@ var Popover = ({
|
|
|
16849
17072
|
$unstyled: unstyled,
|
|
16850
17073
|
style,
|
|
16851
17074
|
children: [
|
|
16852
|
-
!hideCloseButton && /* @__PURE__ */
|
|
17075
|
+
!hideCloseButton && /* @__PURE__ */ jsx322(Close, { asChild: true, children: /* @__PURE__ */ jsx322(
|
|
16853
17076
|
IconButton,
|
|
16854
17077
|
{
|
|
16855
17078
|
"data-wui-popover-close": true,
|
|
16856
17079
|
label: "Close",
|
|
16857
17080
|
variant: "ghost",
|
|
16858
|
-
children: /* @__PURE__ */
|
|
17081
|
+
children: /* @__PURE__ */ jsx322(Icon, { type: "close" })
|
|
16859
17082
|
}
|
|
16860
17083
|
) }),
|
|
16861
|
-
withArrow ? /* @__PURE__ */
|
|
16862
|
-
/* @__PURE__ */
|
|
17084
|
+
withArrow ? /* @__PURE__ */ jsx322(PopoverArrow, { isAnimated }) : null,
|
|
17085
|
+
/* @__PURE__ */ jsx322("div", { children })
|
|
16863
17086
|
]
|
|
16864
17087
|
}
|
|
16865
17088
|
) })
|
|
@@ -16868,11 +17091,11 @@ var Popover = ({
|
|
|
16868
17091
|
Popover.displayName = "Popover_UI";
|
|
16869
17092
|
|
|
16870
17093
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
16871
|
-
import { styled as
|
|
17094
|
+
import { styled as styled86 } from "styled-components";
|
|
16872
17095
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
16873
|
-
import { isNotNil as
|
|
16874
|
-
import { jsx as
|
|
16875
|
-
var ProgressBarWrapper =
|
|
17096
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
17097
|
+
import { jsx as jsx323, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
17098
|
+
var ProgressBarWrapper = styled86.div`
|
|
16876
17099
|
--progress-bar-height: 8px;
|
|
16877
17100
|
|
|
16878
17101
|
display: flex;
|
|
@@ -16886,7 +17109,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
16886
17109
|
const progressPercentage = progress / max * 100;
|
|
16887
17110
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
16888
17111
|
};
|
|
16889
|
-
var ProgressBarLabel =
|
|
17112
|
+
var ProgressBarLabel = styled86.div`
|
|
16890
17113
|
display: flex;
|
|
16891
17114
|
line-height: var(--wui-typography-label-3-line-height);
|
|
16892
17115
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -16894,7 +17117,7 @@ var ProgressBarLabel = styled84.div`
|
|
|
16894
17117
|
color: var(--wui-color-text-secondary);
|
|
16895
17118
|
flex-shrink: 0;
|
|
16896
17119
|
`;
|
|
16897
|
-
var StyledProgressIndicator =
|
|
17120
|
+
var StyledProgressIndicator = styled86(ProgressIndicator)`
|
|
16898
17121
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
16899
17122
|
background-color: var(--wui-color-bg-fill);
|
|
16900
17123
|
width: 100%;
|
|
@@ -16904,7 +17127,7 @@ var StyledProgressIndicator = styled84(ProgressIndicator)`
|
|
|
16904
17127
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
16905
17128
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
16906
17129
|
`;
|
|
16907
|
-
var StyledProgressBar =
|
|
17130
|
+
var StyledProgressBar = styled86(ProgressRoot)`
|
|
16908
17131
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
16909
17132
|
position: relative;
|
|
16910
17133
|
overflow: hidden;
|
|
@@ -16925,16 +17148,16 @@ var ProgressBar = ({
|
|
|
16925
17148
|
colorScheme = "inherit",
|
|
16926
17149
|
...props
|
|
16927
17150
|
}) => {
|
|
16928
|
-
return /* @__PURE__ */
|
|
16929
|
-
|
|
16930
|
-
/* @__PURE__ */
|
|
17151
|
+
return /* @__PURE__ */ jsxs56(ProgressBarWrapper, { children: [
|
|
17152
|
+
isNotNil35(labelLeft) ? /* @__PURE__ */ jsx323(ProgressBarLabel, { children: labelLeft }) : null,
|
|
17153
|
+
/* @__PURE__ */ jsx323(
|
|
16931
17154
|
StyledProgressBar,
|
|
16932
17155
|
{
|
|
16933
17156
|
$colorScheme: colorScheme,
|
|
16934
17157
|
max,
|
|
16935
17158
|
value: progress,
|
|
16936
17159
|
...props,
|
|
16937
|
-
children: /* @__PURE__ */
|
|
17160
|
+
children: /* @__PURE__ */ jsx323(
|
|
16938
17161
|
StyledProgressIndicator,
|
|
16939
17162
|
{
|
|
16940
17163
|
$colorScheme: colorScheme,
|
|
@@ -16944,16 +17167,16 @@ var ProgressBar = ({
|
|
|
16944
17167
|
)
|
|
16945
17168
|
}
|
|
16946
17169
|
),
|
|
16947
|
-
|
|
17170
|
+
isNotNil35(labelRight) ? /* @__PURE__ */ jsx323(ProgressBarLabel, { children: labelRight }) : null
|
|
16948
17171
|
] });
|
|
16949
17172
|
};
|
|
16950
17173
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
16951
17174
|
|
|
16952
17175
|
// src/components/Radio/Radio.tsx
|
|
16953
17176
|
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
16954
|
-
import { forwardRef as forwardRef27, useId as
|
|
16955
|
-
import { styled as
|
|
16956
|
-
import { jsx as
|
|
17177
|
+
import { forwardRef as forwardRef27, useId as useId6 } from "react";
|
|
17178
|
+
import { styled as styled87, css as css43 } from "styled-components";
|
|
17179
|
+
import { jsx as jsx324, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
16957
17180
|
var sizeSmall2 = css43`
|
|
16958
17181
|
--wui-radio-size: 14px;
|
|
16959
17182
|
--wui-radio-icon-size: 7px;
|
|
@@ -16975,7 +17198,7 @@ var getSizeCss3 = (size) => {
|
|
|
16975
17198
|
}
|
|
16976
17199
|
return sizeMedium2;
|
|
16977
17200
|
};
|
|
16978
|
-
var StyledRadioWrapper =
|
|
17201
|
+
var StyledRadioWrapper = styled87.div`
|
|
16979
17202
|
--wui-radio-background-color: var(--wui-color-bg-surface);
|
|
16980
17203
|
--wui-radio-border-color: var(--wui-color-border-secondary);
|
|
16981
17204
|
--wui-radio-icon-color: transparent;
|
|
@@ -17009,7 +17232,7 @@ var StyledRadioWrapper = styled85.div`
|
|
|
17009
17232
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
17010
17233
|
user-select: none;
|
|
17011
17234
|
`;
|
|
17012
|
-
var StyledRadioInput =
|
|
17235
|
+
var StyledRadioInput = styled87.div`
|
|
17013
17236
|
${({ $size }) => getSizeCss3($size)}
|
|
17014
17237
|
width: var(--wui-radio-size);
|
|
17015
17238
|
height: var(--wui-radio-size);
|
|
@@ -17035,7 +17258,7 @@ var StyledRadioInput = styled85.div`
|
|
|
17035
17258
|
transform: translate(-50%, -50%);
|
|
17036
17259
|
}
|
|
17037
17260
|
`;
|
|
17038
|
-
var StyledHiddenRadioInput =
|
|
17261
|
+
var StyledHiddenRadioInput = styled87.input`
|
|
17039
17262
|
${visuallyHiddenStyle}
|
|
17040
17263
|
`;
|
|
17041
17264
|
var Radio = forwardRef27(
|
|
@@ -17053,7 +17276,7 @@ var Radio = forwardRef27(
|
|
|
17053
17276
|
hideLabel = false,
|
|
17054
17277
|
...props
|
|
17055
17278
|
}, ref) => {
|
|
17056
|
-
const generatedId =
|
|
17279
|
+
const generatedId = useId6();
|
|
17057
17280
|
const computedId = isNonEmptyString7(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
17058
17281
|
const radioGroupContext = useRadioGroup();
|
|
17059
17282
|
const contextName = radioGroupContext?.name;
|
|
@@ -17062,14 +17285,14 @@ var Radio = forwardRef27(
|
|
|
17062
17285
|
const radioName = name ?? contextName;
|
|
17063
17286
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17064
17287
|
const isChecked = isNotUndefined14(value) && isNotUndefined14(contextValue) ? contextValue === value : checked;
|
|
17065
|
-
return /* @__PURE__ */
|
|
17288
|
+
return /* @__PURE__ */ jsxs57(
|
|
17066
17289
|
StyledRadioWrapper,
|
|
17067
17290
|
{
|
|
17068
17291
|
$disabled: disabled,
|
|
17069
17292
|
$hideLabel: hideLabel,
|
|
17070
17293
|
"aria-invalid": props["aria-invalid"],
|
|
17071
17294
|
children: [
|
|
17072
|
-
/* @__PURE__ */
|
|
17295
|
+
/* @__PURE__ */ jsx324(
|
|
17073
17296
|
StyledHiddenRadioInput,
|
|
17074
17297
|
{
|
|
17075
17298
|
...props,
|
|
@@ -17084,10 +17307,10 @@ var Radio = forwardRef27(
|
|
|
17084
17307
|
value
|
|
17085
17308
|
}
|
|
17086
17309
|
),
|
|
17087
|
-
/* @__PURE__ */
|
|
17310
|
+
/* @__PURE__ */ jsx324(
|
|
17088
17311
|
FormControlLabel,
|
|
17089
17312
|
{
|
|
17090
|
-
controlSlot: /* @__PURE__ */
|
|
17313
|
+
controlSlot: /* @__PURE__ */ jsx324(StyledRadioInput, { $size: size }),
|
|
17091
17314
|
description,
|
|
17092
17315
|
disabled,
|
|
17093
17316
|
hideLabel,
|
|
@@ -17106,10 +17329,10 @@ Radio.displayName = "Radio_UI";
|
|
|
17106
17329
|
import { forwardRef as forwardRef29 } from "react";
|
|
17107
17330
|
|
|
17108
17331
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
17109
|
-
import { forwardRef as forwardRef28, useId as
|
|
17110
|
-
import { styled as
|
|
17332
|
+
import { forwardRef as forwardRef28, useId as useId7 } from "react";
|
|
17333
|
+
import { styled as styled88, css as css44 } from "styled-components";
|
|
17111
17334
|
import { isNonEmptyString as isNonEmptyString8, isNotUndefined as isNotUndefined15 } from "@wistia/type-guards";
|
|
17112
|
-
import { jsx as
|
|
17335
|
+
import { jsx as jsx325, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17113
17336
|
var checkedStyles = css44`
|
|
17114
17337
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
17115
17338
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
@@ -17159,7 +17382,7 @@ var imageCoverStyles = css44`
|
|
|
17159
17382
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
17160
17383
|
}
|
|
17161
17384
|
`;
|
|
17162
|
-
var StyledCard2 =
|
|
17385
|
+
var StyledCard2 = styled88.label`
|
|
17163
17386
|
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
17164
17387
|
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
17165
17388
|
--wui-radio-card-cursor: pointer;
|
|
@@ -17213,7 +17436,7 @@ var StyledCard2 = styled86.label`
|
|
|
17213
17436
|
}
|
|
17214
17437
|
}
|
|
17215
17438
|
`;
|
|
17216
|
-
var StyledHiddenInput =
|
|
17439
|
+
var StyledHiddenInput = styled88.input`
|
|
17217
17440
|
${visuallyHiddenStyle}
|
|
17218
17441
|
`;
|
|
17219
17442
|
var RadioCardRoot = forwardRef28(
|
|
@@ -17229,7 +17452,7 @@ var RadioCardRoot = forwardRef28(
|
|
|
17229
17452
|
checked,
|
|
17230
17453
|
...props
|
|
17231
17454
|
}, ref) => {
|
|
17232
|
-
const generatedId =
|
|
17455
|
+
const generatedId = useId7();
|
|
17233
17456
|
const computedId = isNonEmptyString8(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
17234
17457
|
const radioGroupContext = useRadioGroup();
|
|
17235
17458
|
const contextName = radioGroupContext?.name;
|
|
@@ -17238,14 +17461,14 @@ var RadioCardRoot = forwardRef28(
|
|
|
17238
17461
|
const radioName = name ?? contextName;
|
|
17239
17462
|
const handleOnChange = onChange ?? contextOnChange;
|
|
17240
17463
|
const isChecked = isNotUndefined15(value) && isNotUndefined15(contextValue) ? contextValue === value : checked;
|
|
17241
|
-
return /* @__PURE__ */
|
|
17464
|
+
return /* @__PURE__ */ jsxs58(
|
|
17242
17465
|
StyledCard2,
|
|
17243
17466
|
{
|
|
17244
17467
|
$aspectRatio: aspectRatio,
|
|
17245
17468
|
$padding: padding,
|
|
17246
17469
|
htmlFor: computedId,
|
|
17247
17470
|
children: [
|
|
17248
|
-
/* @__PURE__ */
|
|
17471
|
+
/* @__PURE__ */ jsx325(
|
|
17249
17472
|
StyledHiddenInput,
|
|
17250
17473
|
{
|
|
17251
17474
|
...props,
|
|
@@ -17268,12 +17491,12 @@ var RadioCardRoot = forwardRef28(
|
|
|
17268
17491
|
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
17269
17492
|
|
|
17270
17493
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17271
|
-
import { styled as
|
|
17272
|
-
import { isNotNil as
|
|
17494
|
+
import { styled as styled90 } from "styled-components";
|
|
17495
|
+
import { isNotNil as isNotNil36 } from "@wistia/type-guards";
|
|
17273
17496
|
|
|
17274
17497
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
17275
|
-
import { styled as
|
|
17276
|
-
var RadioCardIndicator =
|
|
17498
|
+
import { styled as styled89 } from "styled-components";
|
|
17499
|
+
var RadioCardIndicator = styled89.div`
|
|
17277
17500
|
--wui-radio-card-indicator-size: 14px;
|
|
17278
17501
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
17279
17502
|
--wui-radio-card-indicator-fill-color: var(--wui-color-bg-fill);
|
|
@@ -17322,16 +17545,16 @@ var RadioCardIndicator = styled87.div`
|
|
|
17322
17545
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
17323
17546
|
|
|
17324
17547
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
17325
|
-
import { jsx as
|
|
17326
|
-
var StyledCardContent =
|
|
17548
|
+
import { jsx as jsx326, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17549
|
+
var StyledCardContent = styled90.div`
|
|
17327
17550
|
display: grid;
|
|
17328
17551
|
grid-auto-flow: column;
|
|
17329
17552
|
gap: var(--wui-space-02);
|
|
17330
17553
|
`;
|
|
17331
|
-
var StyledCardIcon =
|
|
17554
|
+
var StyledCardIcon = styled90.div`
|
|
17332
17555
|
display: contents;
|
|
17333
17556
|
`;
|
|
17334
|
-
var StyledIndicatorContainer =
|
|
17557
|
+
var StyledIndicatorContainer = styled90.div`
|
|
17335
17558
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
17336
17559
|
display: flex;
|
|
17337
17560
|
align-items: center;
|
|
@@ -17342,18 +17565,18 @@ var RadioCardDefaultLayout = ({
|
|
|
17342
17565
|
description,
|
|
17343
17566
|
showIndicator = true
|
|
17344
17567
|
}) => {
|
|
17345
|
-
return /* @__PURE__ */
|
|
17346
|
-
showIndicator ? /* @__PURE__ */
|
|
17347
|
-
/* @__PURE__ */
|
|
17348
|
-
|
|
17349
|
-
/* @__PURE__ */
|
|
17568
|
+
return /* @__PURE__ */ jsxs59(StyledCardContent, { children: [
|
|
17569
|
+
showIndicator ? /* @__PURE__ */ jsx326(StyledIndicatorContainer, { $hasIcon: isNotNil36(icon), children: /* @__PURE__ */ jsx326(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
17570
|
+
/* @__PURE__ */ jsxs59(Stack, { gap: "space-02", children: [
|
|
17571
|
+
isNotNil36(icon) && /* @__PURE__ */ jsx326(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
17572
|
+
/* @__PURE__ */ jsxs59(
|
|
17350
17573
|
Stack,
|
|
17351
17574
|
{
|
|
17352
17575
|
gap: "space-01",
|
|
17353
|
-
style:
|
|
17576
|
+
style: isNotNil36(icon) ? { paddingLeft: 2 } : void 0,
|
|
17354
17577
|
children: [
|
|
17355
|
-
|
|
17356
|
-
|
|
17578
|
+
isNotNil36(label) && /* @__PURE__ */ jsx326(Text, { variant: "label3", children: /* @__PURE__ */ jsx326("strong", { children: label }) }),
|
|
17579
|
+
isNotNil36(description) && /* @__PURE__ */ jsx326(
|
|
17357
17580
|
Text,
|
|
17358
17581
|
{
|
|
17359
17582
|
prominence: "secondary",
|
|
@@ -17370,22 +17593,22 @@ var RadioCardDefaultLayout = ({
|
|
|
17370
17593
|
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
17371
17594
|
|
|
17372
17595
|
// src/components/RadioCard/RadioCardChildrenContainer.tsx
|
|
17373
|
-
import { styled as
|
|
17374
|
-
var RadioCardChildrenContainer =
|
|
17596
|
+
import { styled as styled91 } from "styled-components";
|
|
17597
|
+
var RadioCardChildrenContainer = styled91.div`
|
|
17375
17598
|
flex: 1 1 auto;
|
|
17376
17599
|
`;
|
|
17377
17600
|
|
|
17378
17601
|
// src/components/RadioCard/RadioCard.tsx
|
|
17379
|
-
import { jsx as
|
|
17602
|
+
import { jsx as jsx327 } from "react/jsx-runtime";
|
|
17380
17603
|
var RadioCard = forwardRef29(
|
|
17381
17604
|
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
17382
|
-
return /* @__PURE__ */
|
|
17605
|
+
return /* @__PURE__ */ jsx327(
|
|
17383
17606
|
RadioCardRoot,
|
|
17384
17607
|
{
|
|
17385
17608
|
ref,
|
|
17386
17609
|
padding: children != null ? "space-00" : "space-04",
|
|
17387
17610
|
...rootProps,
|
|
17388
|
-
children: children != null ? /* @__PURE__ */
|
|
17611
|
+
children: children != null ? /* @__PURE__ */ jsx327(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ jsx327(
|
|
17389
17612
|
RadioCardDefaultLayout,
|
|
17390
17613
|
{
|
|
17391
17614
|
description,
|
|
@@ -17402,17 +17625,17 @@ RadioCard.displayName = "RadioCard_UI";
|
|
|
17402
17625
|
|
|
17403
17626
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
17404
17627
|
import { forwardRef as forwardRef30 } from "react";
|
|
17405
|
-
import { jsx as
|
|
17628
|
+
import { jsx as jsx328 } from "react/jsx-runtime";
|
|
17406
17629
|
var RadioCardImage = forwardRef30(
|
|
17407
17630
|
({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
|
|
17408
|
-
return /* @__PURE__ */
|
|
17631
|
+
return /* @__PURE__ */ jsx328(
|
|
17409
17632
|
RadioCardRoot,
|
|
17410
17633
|
{
|
|
17411
17634
|
ref,
|
|
17412
17635
|
...rootProps,
|
|
17413
17636
|
aspectRatio,
|
|
17414
17637
|
padding,
|
|
17415
|
-
children: /* @__PURE__ */
|
|
17638
|
+
children: /* @__PURE__ */ jsx328(
|
|
17416
17639
|
Image,
|
|
17417
17640
|
{
|
|
17418
17641
|
alt: label,
|
|
@@ -17430,49 +17653,49 @@ RadioCardImage.displayName = "RadioCardImage_UI";
|
|
|
17430
17653
|
|
|
17431
17654
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
17432
17655
|
import { forwardRef as forwardRef31, useCallback as useCallback18, useEffect as useEffect21, useMemo as useMemo15, useRef as useRef22, useState as useState24 } from "react";
|
|
17433
|
-
import { styled as
|
|
17656
|
+
import { styled as styled92 } from "styled-components";
|
|
17434
17657
|
import { throttle } from "throttle-debounce";
|
|
17435
|
-
import { jsx as
|
|
17658
|
+
import { jsx as jsx329, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17436
17659
|
var SHADOW_SIZE_PX = 8;
|
|
17437
|
-
var Container10 =
|
|
17660
|
+
var Container10 = styled92.div`
|
|
17438
17661
|
overflow: hidden;
|
|
17439
17662
|
position: relative;
|
|
17440
17663
|
flex: 1 1 auto;
|
|
17441
17664
|
`;
|
|
17442
|
-
var ScrollContainer =
|
|
17665
|
+
var ScrollContainer = styled92.div`
|
|
17443
17666
|
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
17444
17667
|
height: 100%;
|
|
17445
17668
|
width: 100%;
|
|
17446
17669
|
`;
|
|
17447
|
-
var Shadow =
|
|
17670
|
+
var Shadow = styled92.div`
|
|
17448
17671
|
pointer-events: none;
|
|
17449
17672
|
position: absolute;
|
|
17450
17673
|
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
17451
17674
|
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
17452
17675
|
z-index: 1;
|
|
17453
17676
|
`;
|
|
17454
|
-
var ShadowAtTop =
|
|
17677
|
+
var ShadowAtTop = styled92(Shadow)`
|
|
17455
17678
|
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
17456
17679
|
height: 0;
|
|
17457
17680
|
left: 0;
|
|
17458
17681
|
right: 0;
|
|
17459
17682
|
top: 0;
|
|
17460
17683
|
`;
|
|
17461
|
-
var ShadowAtBottom =
|
|
17684
|
+
var ShadowAtBottom = styled92(Shadow)`
|
|
17462
17685
|
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
17463
17686
|
bottom: 0;
|
|
17464
17687
|
height: 0;
|
|
17465
17688
|
left: 0;
|
|
17466
17689
|
right: 0;
|
|
17467
17690
|
`;
|
|
17468
|
-
var ShadowAtLeft =
|
|
17691
|
+
var ShadowAtLeft = styled92(Shadow)`
|
|
17469
17692
|
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
17470
17693
|
bottom: 0;
|
|
17471
17694
|
left: 0;
|
|
17472
17695
|
top: 0;
|
|
17473
17696
|
width: 0;
|
|
17474
17697
|
`;
|
|
17475
|
-
var ShadowAtRight =
|
|
17698
|
+
var ShadowAtRight = styled92(Shadow)`
|
|
17476
17699
|
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
17477
17700
|
bottom: 0;
|
|
17478
17701
|
right: 0;
|
|
@@ -17512,12 +17735,12 @@ var ScrollArea = forwardRef31(
|
|
|
17512
17735
|
useEffect21(() => {
|
|
17513
17736
|
updateShadows();
|
|
17514
17737
|
}, [updateShadows]);
|
|
17515
|
-
return /* @__PURE__ */
|
|
17516
|
-
/* @__PURE__ */
|
|
17517
|
-
/* @__PURE__ */
|
|
17518
|
-
/* @__PURE__ */
|
|
17519
|
-
/* @__PURE__ */
|
|
17520
|
-
/* @__PURE__ */
|
|
17738
|
+
return /* @__PURE__ */ jsxs60(Container10, { style, children: [
|
|
17739
|
+
/* @__PURE__ */ jsx329(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
17740
|
+
/* @__PURE__ */ jsx329(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
17741
|
+
/* @__PURE__ */ jsx329(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
17742
|
+
/* @__PURE__ */ jsx329(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
17743
|
+
/* @__PURE__ */ jsx329(
|
|
17521
17744
|
ScrollContainer,
|
|
17522
17745
|
{
|
|
17523
17746
|
ref: scrollContainerRef,
|
|
@@ -17534,13 +17757,13 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
17534
17757
|
|
|
17535
17758
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17536
17759
|
import { forwardRef as forwardRef32 } from "react";
|
|
17537
|
-
import { styled as
|
|
17760
|
+
import { styled as styled94, css as css46 } from "styled-components";
|
|
17538
17761
|
import { Root as ToggleGroupRoot2 } from "@radix-ui/react-toggle-group";
|
|
17539
17762
|
import { isNil as isNil18 } from "@wistia/type-guards";
|
|
17540
17763
|
|
|
17541
17764
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
17542
17765
|
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo16, useState as useState25 } from "react";
|
|
17543
|
-
import { jsx as
|
|
17766
|
+
import { jsx as jsx330 } from "react/jsx-runtime";
|
|
17544
17767
|
var SelectedItemStyleContext = createContext9(null);
|
|
17545
17768
|
var SelectedItemStyleProvider = ({
|
|
17546
17769
|
children
|
|
@@ -17561,7 +17784,7 @@ var SelectedItemStyleProvider = ({
|
|
|
17561
17784
|
}),
|
|
17562
17785
|
[selectedItemIndicatorStyle]
|
|
17563
17786
|
);
|
|
17564
|
-
return /* @__PURE__ */
|
|
17787
|
+
return /* @__PURE__ */ jsx330(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
17565
17788
|
};
|
|
17566
17789
|
var useSelectedItemStyle = () => {
|
|
17567
17790
|
const context = useContext15(SelectedItemStyleContext);
|
|
@@ -17572,7 +17795,7 @@ var useSelectedItemStyle = () => {
|
|
|
17572
17795
|
};
|
|
17573
17796
|
|
|
17574
17797
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17575
|
-
import { styled as
|
|
17798
|
+
import { styled as styled93, css as css45 } from "styled-components";
|
|
17576
17799
|
import { isUndefined as isUndefined5 } from "@wistia/type-guards";
|
|
17577
17800
|
|
|
17578
17801
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
@@ -17588,13 +17811,13 @@ var useSegmentedControlValue = () => {
|
|
|
17588
17811
|
};
|
|
17589
17812
|
|
|
17590
17813
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
17591
|
-
import { jsx as
|
|
17814
|
+
import { jsx as jsx331 } from "react/jsx-runtime";
|
|
17592
17815
|
var selectedItemIndicatorStyles = css45`
|
|
17593
17816
|
background-color: var(--wui-color-bg-fill-white);
|
|
17594
17817
|
border-radius: var(--wui-border-radius-rounded);
|
|
17595
17818
|
box-shadow: var(--wui-elevation-01);
|
|
17596
17819
|
`;
|
|
17597
|
-
var SelectedItemIndicatorDiv =
|
|
17820
|
+
var SelectedItemIndicatorDiv = styled93.div`
|
|
17598
17821
|
${selectedItemIndicatorStyles}
|
|
17599
17822
|
left: 0;
|
|
17600
17823
|
position: absolute;
|
|
@@ -17610,7 +17833,7 @@ var SelectedItemIndicator = () => {
|
|
|
17610
17833
|
if (!selectedValue || isUndefined5(selectedItemIndicatorStyle)) {
|
|
17611
17834
|
return null;
|
|
17612
17835
|
}
|
|
17613
|
-
return /* @__PURE__ */
|
|
17836
|
+
return /* @__PURE__ */ jsx331(
|
|
17614
17837
|
SelectedItemIndicatorDiv,
|
|
17615
17838
|
{
|
|
17616
17839
|
"data-wui-selected-item-indicator": true,
|
|
@@ -17620,7 +17843,7 @@ var SelectedItemIndicator = () => {
|
|
|
17620
17843
|
};
|
|
17621
17844
|
|
|
17622
17845
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17623
|
-
import { jsx as
|
|
17846
|
+
import { jsx as jsx332, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
17624
17847
|
var segmentedControlStyles = css46`
|
|
17625
17848
|
${({ $colorScheme }) => $colorScheme && getColorScheme($colorScheme)};
|
|
17626
17849
|
${({ $colorScheme }) => $colorScheme !== "nav" && `--wui-color-text-selected: var(--wui-color-text-link);`}
|
|
@@ -17635,7 +17858,7 @@ var segmentedControlStyles = css46`
|
|
|
17635
17858
|
position: relative;
|
|
17636
17859
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
17637
17860
|
`;
|
|
17638
|
-
var StyledSegmentedControl =
|
|
17861
|
+
var StyledSegmentedControl = styled94(ToggleGroupRoot2)`
|
|
17639
17862
|
${segmentedControlStyles}
|
|
17640
17863
|
`;
|
|
17641
17864
|
var SegmentedControl = forwardRef32(
|
|
@@ -17651,7 +17874,7 @@ var SegmentedControl = forwardRef32(
|
|
|
17651
17874
|
if (isNil18(children)) {
|
|
17652
17875
|
return null;
|
|
17653
17876
|
}
|
|
17654
|
-
return /* @__PURE__ */
|
|
17877
|
+
return /* @__PURE__ */ jsx332(
|
|
17655
17878
|
StyledSegmentedControl,
|
|
17656
17879
|
{
|
|
17657
17880
|
ref,
|
|
@@ -17664,9 +17887,9 @@ var SegmentedControl = forwardRef32(
|
|
|
17664
17887
|
type: "single",
|
|
17665
17888
|
value: selectedValue,
|
|
17666
17889
|
...props,
|
|
17667
|
-
children: /* @__PURE__ */
|
|
17890
|
+
children: /* @__PURE__ */ jsx332(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs61(SelectedItemStyleProvider, { children: [
|
|
17668
17891
|
children,
|
|
17669
|
-
/* @__PURE__ */
|
|
17892
|
+
/* @__PURE__ */ jsx332(SelectedItemIndicator, {})
|
|
17670
17893
|
] }) })
|
|
17671
17894
|
}
|
|
17672
17895
|
);
|
|
@@ -17676,10 +17899,10 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
17676
17899
|
|
|
17677
17900
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
17678
17901
|
import { forwardRef as forwardRef33, useEffect as useEffect22, useRef as useRef23 } from "react";
|
|
17679
|
-
import { styled as
|
|
17902
|
+
import { styled as styled95, css as css47 } from "styled-components";
|
|
17680
17903
|
import { Item as ToggleGroupItem2 } from "@radix-ui/react-toggle-group";
|
|
17681
|
-
import { isNotNil as
|
|
17682
|
-
import { jsxs as
|
|
17904
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
17905
|
+
import { jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17683
17906
|
var segmentedControlItemStyles = css47`
|
|
17684
17907
|
all: unset; /* ToggleGroupItem is a button element */
|
|
17685
17908
|
align-items: center;
|
|
@@ -17748,7 +17971,7 @@ var segmentedControlItemStyles = css47`
|
|
|
17748
17971
|
}
|
|
17749
17972
|
}
|
|
17750
17973
|
`;
|
|
17751
|
-
var StyledSegmentedControlItem =
|
|
17974
|
+
var StyledSegmentedControlItem = styled95(ToggleGroupItem2)`
|
|
17752
17975
|
${segmentedControlItemStyles}
|
|
17753
17976
|
`;
|
|
17754
17977
|
var SegmentedControlItem = forwardRef33(
|
|
@@ -17789,13 +18012,13 @@ var SegmentedControlItem = forwardRef33(
|
|
|
17789
18012
|
resizeObserver.disconnect();
|
|
17790
18013
|
};
|
|
17791
18014
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
17792
|
-
return /* @__PURE__ */
|
|
18015
|
+
return /* @__PURE__ */ jsxs62(
|
|
17793
18016
|
StyledSegmentedControlItem,
|
|
17794
18017
|
{
|
|
17795
18018
|
ref: combinedRef,
|
|
17796
18019
|
...otherProps,
|
|
17797
|
-
$hasLabel:
|
|
17798
|
-
"aria-label":
|
|
18020
|
+
$hasLabel: isNotNil37(label),
|
|
18021
|
+
"aria-label": isNotNil37(label) ? void 0 : ariaLabel,
|
|
17799
18022
|
disabled,
|
|
17800
18023
|
onClick: handleClick,
|
|
17801
18024
|
value,
|
|
@@ -17821,9 +18044,9 @@ import {
|
|
|
17821
18044
|
ScrollDownButton
|
|
17822
18045
|
} from "@radix-ui/react-select";
|
|
17823
18046
|
import { forwardRef as forwardRef34 } from "react";
|
|
17824
|
-
import { styled as
|
|
17825
|
-
import { jsx as
|
|
17826
|
-
var StyledTrigger2 =
|
|
18047
|
+
import { styled as styled96, css as css48 } from "styled-components";
|
|
18048
|
+
import { jsx as jsx333, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
18049
|
+
var StyledTrigger2 = styled96(Trigger3)`
|
|
17827
18050
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
17828
18051
|
${inputCss};
|
|
17829
18052
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -17869,7 +18092,7 @@ var StyledTrigger2 = styled94(Trigger3)`
|
|
|
17869
18092
|
color: var(--wui-input-placeholder);
|
|
17870
18093
|
}
|
|
17871
18094
|
`;
|
|
17872
|
-
var StyledContent3 =
|
|
18095
|
+
var StyledContent3 = styled96(Content3)`
|
|
17873
18096
|
--wui-select-content-border: var(--wui-color-border);
|
|
17874
18097
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
17875
18098
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -17896,10 +18119,10 @@ var scrollButtonStyles = css48`
|
|
|
17896
18119
|
display: flex;
|
|
17897
18120
|
justify-content: center;
|
|
17898
18121
|
`;
|
|
17899
|
-
var StyledScrollDownButton =
|
|
18122
|
+
var StyledScrollDownButton = styled96(ScrollDownButton)`
|
|
17900
18123
|
${scrollButtonStyles}
|
|
17901
18124
|
`;
|
|
17902
|
-
var StyledScrollUpButton =
|
|
18125
|
+
var StyledScrollUpButton = styled96(ScrollUpButton)`
|
|
17903
18126
|
${scrollButtonStyles}
|
|
17904
18127
|
`;
|
|
17905
18128
|
var Select = forwardRef34(
|
|
@@ -17922,8 +18145,8 @@ var Select = forwardRef34(
|
|
|
17922
18145
|
if (forceOpen) {
|
|
17923
18146
|
rootProps["open"] = true;
|
|
17924
18147
|
}
|
|
17925
|
-
return /* @__PURE__ */
|
|
17926
|
-
/* @__PURE__ */
|
|
18148
|
+
return /* @__PURE__ */ jsxs63(Root3, { ...rootProps, children: [
|
|
18149
|
+
/* @__PURE__ */ jsxs63(
|
|
17927
18150
|
StyledTrigger2,
|
|
17928
18151
|
{
|
|
17929
18152
|
ref: forwardedRef,
|
|
@@ -17931,8 +18154,8 @@ var Select = forwardRef34(
|
|
|
17931
18154
|
$fullWidth: responsiveFullWidth,
|
|
17932
18155
|
...props,
|
|
17933
18156
|
children: [
|
|
17934
|
-
/* @__PURE__ */
|
|
17935
|
-
/* @__PURE__ */
|
|
18157
|
+
/* @__PURE__ */ jsx333(Value, { placeholder }),
|
|
18158
|
+
/* @__PURE__ */ jsx333(
|
|
17936
18159
|
Icon,
|
|
17937
18160
|
{
|
|
17938
18161
|
size: "md",
|
|
@@ -17942,21 +18165,21 @@ var Select = forwardRef34(
|
|
|
17942
18165
|
]
|
|
17943
18166
|
}
|
|
17944
18167
|
),
|
|
17945
|
-
/* @__PURE__ */
|
|
18168
|
+
/* @__PURE__ */ jsx333(Portal2, { children: /* @__PURE__ */ jsxs63(
|
|
17946
18169
|
StyledContent3,
|
|
17947
18170
|
{
|
|
17948
18171
|
position: "popper",
|
|
17949
18172
|
sideOffset: 8,
|
|
17950
18173
|
children: [
|
|
17951
|
-
/* @__PURE__ */
|
|
18174
|
+
/* @__PURE__ */ jsx333(StyledScrollUpButton, { children: /* @__PURE__ */ jsx333(
|
|
17952
18175
|
Icon,
|
|
17953
18176
|
{
|
|
17954
18177
|
size: "sm",
|
|
17955
18178
|
type: "caret-up"
|
|
17956
18179
|
}
|
|
17957
18180
|
) }),
|
|
17958
|
-
/* @__PURE__ */
|
|
17959
|
-
/* @__PURE__ */
|
|
18181
|
+
/* @__PURE__ */ jsx333(Viewport, { children }),
|
|
18182
|
+
/* @__PURE__ */ jsx333(StyledScrollDownButton, { children: /* @__PURE__ */ jsx333(
|
|
17960
18183
|
Icon,
|
|
17961
18184
|
{
|
|
17962
18185
|
size: "sm",
|
|
@@ -17974,10 +18197,10 @@ Select.displayName = "Select_UI";
|
|
|
17974
18197
|
// src/components/Select/SelectOption.tsx
|
|
17975
18198
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
17976
18199
|
import { forwardRef as forwardRef35 } from "react";
|
|
17977
|
-
import { styled as
|
|
17978
|
-
import { isNotNil as
|
|
17979
|
-
import { jsx as
|
|
17980
|
-
var StyledItem =
|
|
18200
|
+
import { styled as styled97 } from "styled-components";
|
|
18201
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
18202
|
+
import { jsx as jsx334, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
18203
|
+
var StyledItem = styled97(Item)`
|
|
17981
18204
|
${getTypographicStyles("label3")}
|
|
17982
18205
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
17983
18206
|
background-color: transparent;
|
|
@@ -18005,18 +18228,18 @@ var StyledItem = styled95(Item)`
|
|
|
18005
18228
|
`;
|
|
18006
18229
|
var SelectOption = forwardRef35(
|
|
18007
18230
|
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
18008
|
-
return /* @__PURE__ */
|
|
18231
|
+
return /* @__PURE__ */ jsxs64(
|
|
18009
18232
|
StyledItem,
|
|
18010
18233
|
{
|
|
18011
18234
|
...props,
|
|
18012
18235
|
ref: forwardedRef,
|
|
18013
18236
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
18014
18237
|
children: [
|
|
18015
|
-
|
|
18238
|
+
isNotNil38(selectedDisplayValue) ? /* @__PURE__ */ jsxs64("div", { children: [
|
|
18016
18239
|
children,
|
|
18017
|
-
/* @__PURE__ */
|
|
18018
|
-
] }) : /* @__PURE__ */
|
|
18019
|
-
/* @__PURE__ */
|
|
18240
|
+
/* @__PURE__ */ jsx334("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx334(ItemText, { children: selectedDisplayValue }) })
|
|
18241
|
+
] }) : /* @__PURE__ */ jsx334(ItemText, { children }),
|
|
18242
|
+
/* @__PURE__ */ jsx334(ItemIndicator, { children: /* @__PURE__ */ jsx334(
|
|
18020
18243
|
Icon,
|
|
18021
18244
|
{
|
|
18022
18245
|
size: "md",
|
|
@@ -18032,14 +18255,14 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
18032
18255
|
|
|
18033
18256
|
// src/components/Select/SelectOptionGroup.tsx
|
|
18034
18257
|
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
18035
|
-
import { styled as
|
|
18036
|
-
import { jsx as
|
|
18037
|
-
var StyledLabel4 =
|
|
18258
|
+
import { styled as styled98 } from "styled-components";
|
|
18259
|
+
import { jsx as jsx335, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
18260
|
+
var StyledLabel4 = styled98(Label3)`
|
|
18038
18261
|
padding: var(--wui-select-option-padding);
|
|
18039
18262
|
`;
|
|
18040
18263
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
18041
|
-
return /* @__PURE__ */
|
|
18042
|
-
/* @__PURE__ */
|
|
18264
|
+
return /* @__PURE__ */ jsxs65(Group, { ...props, children: [
|
|
18265
|
+
/* @__PURE__ */ jsx335(StyledLabel4, { children: /* @__PURE__ */ jsx335(
|
|
18043
18266
|
Heading,
|
|
18044
18267
|
{
|
|
18045
18268
|
renderAs: "span",
|
|
@@ -18058,10 +18281,10 @@ import {
|
|
|
18058
18281
|
Range as RadixSliderRange,
|
|
18059
18282
|
Thumb as RadixSliderThumb
|
|
18060
18283
|
} from "@radix-ui/react-slider";
|
|
18061
|
-
import { styled as
|
|
18284
|
+
import { styled as styled99 } from "styled-components";
|
|
18062
18285
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
18063
|
-
import { jsx as
|
|
18064
|
-
var SliderContainer =
|
|
18286
|
+
import { jsx as jsx336, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
18287
|
+
var SliderContainer = styled99.div`
|
|
18065
18288
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
18066
18289
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
18067
18290
|
--wui-slider-range-color: var(--wui-color-bg-fill);
|
|
@@ -18077,7 +18300,7 @@ var SliderContainer = styled97.div`
|
|
|
18077
18300
|
pointer-events: none;
|
|
18078
18301
|
}
|
|
18079
18302
|
`;
|
|
18080
|
-
var StyledSliderRoot =
|
|
18303
|
+
var StyledSliderRoot = styled99(RadixSliderRoot)`
|
|
18081
18304
|
position: relative;
|
|
18082
18305
|
display: flex;
|
|
18083
18306
|
align-items: center;
|
|
@@ -18085,20 +18308,20 @@ var StyledSliderRoot = styled97(RadixSliderRoot)`
|
|
|
18085
18308
|
touch-action: none;
|
|
18086
18309
|
width: 100%;
|
|
18087
18310
|
`;
|
|
18088
|
-
var StyledSliderTrack =
|
|
18311
|
+
var StyledSliderTrack = styled99(RadixSliderTrack)`
|
|
18089
18312
|
background-color: var(--wui-slider-track-color);
|
|
18090
18313
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18091
18314
|
flex-grow: 1;
|
|
18092
18315
|
height: 6px;
|
|
18093
18316
|
position: relative;
|
|
18094
18317
|
`;
|
|
18095
|
-
var StyledSliderRange =
|
|
18318
|
+
var StyledSliderRange = styled99(RadixSliderRange)`
|
|
18096
18319
|
background-color: var(--wui-slider-range-color);
|
|
18097
18320
|
border-radius: var(--wui-slider-track-border-radius);
|
|
18098
18321
|
height: 100%;
|
|
18099
18322
|
position: absolute;
|
|
18100
18323
|
`;
|
|
18101
|
-
var StyledSliderThumb =
|
|
18324
|
+
var StyledSliderThumb = styled99(RadixSliderThumb)`
|
|
18102
18325
|
background-color: var(--wui-slider-thumb-color);
|
|
18103
18326
|
border-radius: var(--wui-border-radius-rounded);
|
|
18104
18327
|
cursor: grab;
|
|
@@ -18149,12 +18372,12 @@ var Slider = ({
|
|
|
18149
18372
|
onChange(newValue);
|
|
18150
18373
|
}
|
|
18151
18374
|
};
|
|
18152
|
-
return /* @__PURE__ */
|
|
18375
|
+
return /* @__PURE__ */ jsx336(
|
|
18153
18376
|
SliderContainer,
|
|
18154
18377
|
{
|
|
18155
18378
|
...otherProps,
|
|
18156
18379
|
"data-testid": dataTestId,
|
|
18157
|
-
children: /* @__PURE__ */
|
|
18380
|
+
children: /* @__PURE__ */ jsxs66(
|
|
18158
18381
|
StyledSliderRoot,
|
|
18159
18382
|
{
|
|
18160
18383
|
"aria-label": ariaLabel,
|
|
@@ -18167,8 +18390,8 @@ var Slider = ({
|
|
|
18167
18390
|
step,
|
|
18168
18391
|
...value ? { value } : {},
|
|
18169
18392
|
children: [
|
|
18170
|
-
/* @__PURE__ */
|
|
18171
|
-
values.map((_, index) => /* @__PURE__ */
|
|
18393
|
+
/* @__PURE__ */ jsx336(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ jsx336(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
18394
|
+
values.map((_, index) => /* @__PURE__ */ jsx336(
|
|
18172
18395
|
StyledSliderThumb,
|
|
18173
18396
|
{
|
|
18174
18397
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -18183,10 +18406,83 @@ var Slider = ({
|
|
|
18183
18406
|
};
|
|
18184
18407
|
Slider.displayName = "Slider_UI";
|
|
18185
18408
|
|
|
18409
|
+
// src/components/SplitButton/SplitButton.tsx
|
|
18410
|
+
import { styled as styled100 } from "styled-components";
|
|
18411
|
+
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
18412
|
+
import { cloneElement as cloneElement9 } from "react";
|
|
18413
|
+
import { jsx as jsx337, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
18414
|
+
var StyledSplitButton = styled100.span`
|
|
18415
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
18416
|
+
white-space: nowrap;
|
|
18417
|
+
|
|
18418
|
+
&:has(:nth-child(2)) {
|
|
18419
|
+
> [data-wui-button='true']:first-child {
|
|
18420
|
+
border-top-right-radius: 0;
|
|
18421
|
+
border-bottom-right-radius: 0;
|
|
18422
|
+
padding-right: 0;
|
|
18423
|
+
}
|
|
18424
|
+
|
|
18425
|
+
> [data-wui-button='true']:last-child {
|
|
18426
|
+
border-top-left-radius: 0;
|
|
18427
|
+
border-bottom-left-radius: 0;
|
|
18428
|
+
display: inline-flex;
|
|
18429
|
+
}
|
|
18430
|
+
}
|
|
18431
|
+
`;
|
|
18432
|
+
var SplitButton = ({
|
|
18433
|
+
children,
|
|
18434
|
+
menuLabel = "Select an option",
|
|
18435
|
+
menuIcon = /* @__PURE__ */ jsx337(Icon, { type: "caret-down" }),
|
|
18436
|
+
menuItems,
|
|
18437
|
+
disabled = false,
|
|
18438
|
+
colorScheme = "inherit",
|
|
18439
|
+
variant = "solid",
|
|
18440
|
+
secondaryAction,
|
|
18441
|
+
size = "md",
|
|
18442
|
+
unstyled = false,
|
|
18443
|
+
menuProps = {},
|
|
18444
|
+
...props
|
|
18445
|
+
}) => {
|
|
18446
|
+
return /* @__PURE__ */ jsxs67(StyledSplitButton, { $colorScheme: colorScheme, children: [
|
|
18447
|
+
/* @__PURE__ */ jsx337(
|
|
18448
|
+
Button,
|
|
18449
|
+
{
|
|
18450
|
+
disabled,
|
|
18451
|
+
size,
|
|
18452
|
+
unstyled,
|
|
18453
|
+
variant,
|
|
18454
|
+
...props,
|
|
18455
|
+
children
|
|
18456
|
+
}
|
|
18457
|
+
),
|
|
18458
|
+
isNotNil39(menuItems) && /* @__PURE__ */ jsx337(
|
|
18459
|
+
Menu,
|
|
18460
|
+
{
|
|
18461
|
+
...menuProps,
|
|
18462
|
+
disabled,
|
|
18463
|
+
trigger: /* @__PURE__ */ jsx337(
|
|
18464
|
+
IconButton,
|
|
18465
|
+
{
|
|
18466
|
+
disabled,
|
|
18467
|
+
label: menuLabel,
|
|
18468
|
+
size,
|
|
18469
|
+
unstyled,
|
|
18470
|
+
variant,
|
|
18471
|
+
children: menuIcon
|
|
18472
|
+
}
|
|
18473
|
+
),
|
|
18474
|
+
children: menuItems
|
|
18475
|
+
}
|
|
18476
|
+
),
|
|
18477
|
+
isNotNil39(secondaryAction) && cloneElement9(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
18478
|
+
] });
|
|
18479
|
+
};
|
|
18480
|
+
SplitButton.displayName = "SplitButton_UI";
|
|
18481
|
+
|
|
18186
18482
|
// src/components/Table/Table.tsx
|
|
18187
|
-
import { styled as
|
|
18188
|
-
import { jsx as
|
|
18189
|
-
var StyledTable =
|
|
18483
|
+
import { styled as styled101, css as css49 } from "styled-components";
|
|
18484
|
+
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
18485
|
+
var StyledTable = styled101.table`
|
|
18190
18486
|
width: 100%;
|
|
18191
18487
|
border-collapse: collapse;
|
|
18192
18488
|
|
|
@@ -18215,7 +18511,7 @@ var Table = ({
|
|
|
18215
18511
|
visuallyHiddenHeader = false,
|
|
18216
18512
|
...props
|
|
18217
18513
|
}) => {
|
|
18218
|
-
return /* @__PURE__ */
|
|
18514
|
+
return /* @__PURE__ */ jsx338(
|
|
18219
18515
|
StyledTable,
|
|
18220
18516
|
{
|
|
18221
18517
|
$divided: divided,
|
|
@@ -18228,37 +18524,37 @@ var Table = ({
|
|
|
18228
18524
|
};
|
|
18229
18525
|
|
|
18230
18526
|
// src/components/Table/TableBody.tsx
|
|
18231
|
-
import { styled as
|
|
18527
|
+
import { styled as styled102 } from "styled-components";
|
|
18232
18528
|
|
|
18233
18529
|
// src/components/Table/TableSectionContext.ts
|
|
18234
18530
|
import { createContext as createContext11 } from "react";
|
|
18235
18531
|
var TableSectionContext = createContext11(null);
|
|
18236
18532
|
|
|
18237
18533
|
// src/components/Table/TableBody.tsx
|
|
18238
|
-
import { jsx as
|
|
18239
|
-
var StyledTableBody =
|
|
18534
|
+
import { jsx as jsx339 } from "react/jsx-runtime";
|
|
18535
|
+
var StyledTableBody = styled102.tbody`
|
|
18240
18536
|
width: 100%;
|
|
18241
18537
|
`;
|
|
18242
18538
|
var TableBody = ({ children, ...props }) => {
|
|
18243
|
-
return /* @__PURE__ */
|
|
18539
|
+
return /* @__PURE__ */ jsx339(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx339(StyledTableBody, { ...props, children }) });
|
|
18244
18540
|
};
|
|
18245
18541
|
|
|
18246
18542
|
// src/components/Table/TableCell.tsx
|
|
18247
18543
|
import { useContext as useContext17 } from "react";
|
|
18248
|
-
import { styled as
|
|
18249
|
-
import { jsx as
|
|
18544
|
+
import { styled as styled103, css as css50 } from "styled-components";
|
|
18545
|
+
import { jsx as jsx340 } from "react/jsx-runtime";
|
|
18250
18546
|
var sharedStyles = css50`
|
|
18251
18547
|
color: var(--wui-color-text);
|
|
18252
18548
|
padding: var(--wui-space-02);
|
|
18253
18549
|
text-align: left;
|
|
18254
18550
|
`;
|
|
18255
|
-
var StyledTh =
|
|
18551
|
+
var StyledTh = styled103.th`
|
|
18256
18552
|
${sharedStyles}
|
|
18257
18553
|
font-size: var(--wui-typography-body-4-size);
|
|
18258
18554
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
18259
18555
|
line-height: var(--wui-typography-body-4-line-height);
|
|
18260
18556
|
`;
|
|
18261
|
-
var StyledTd =
|
|
18557
|
+
var StyledTd = styled103.td`
|
|
18262
18558
|
${sharedStyles}
|
|
18263
18559
|
font-size: var(--wui-typography-body-2-size);
|
|
18264
18560
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -18267,45 +18563,45 @@ var StyledTd = styled100.td`
|
|
|
18267
18563
|
var TableCell = ({ children, ...props }) => {
|
|
18268
18564
|
const section = useContext17(TableSectionContext);
|
|
18269
18565
|
if (section === "head") {
|
|
18270
|
-
return /* @__PURE__ */
|
|
18566
|
+
return /* @__PURE__ */ jsx340(StyledTh, { ...props, children });
|
|
18271
18567
|
}
|
|
18272
|
-
return /* @__PURE__ */
|
|
18568
|
+
return /* @__PURE__ */ jsx340(StyledTd, { ...props, children });
|
|
18273
18569
|
};
|
|
18274
18570
|
|
|
18275
18571
|
// src/components/Table/TableFoot.tsx
|
|
18276
|
-
import { styled as
|
|
18277
|
-
import { jsx as
|
|
18278
|
-
var StyledTableFoot =
|
|
18572
|
+
import { styled as styled104 } from "styled-components";
|
|
18573
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
18574
|
+
var StyledTableFoot = styled104.tfoot`
|
|
18279
18575
|
width: 100%;
|
|
18280
18576
|
`;
|
|
18281
18577
|
var TableFoot = ({ children, ...props }) => {
|
|
18282
|
-
return /* @__PURE__ */
|
|
18578
|
+
return /* @__PURE__ */ jsx341(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx341(StyledTableFoot, { ...props, children }) });
|
|
18283
18579
|
};
|
|
18284
18580
|
|
|
18285
18581
|
// src/components/Table/TableHead.tsx
|
|
18286
|
-
import { styled as
|
|
18287
|
-
import { jsx as
|
|
18288
|
-
var StyledThead =
|
|
18582
|
+
import { styled as styled105 } from "styled-components";
|
|
18583
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
18584
|
+
var StyledThead = styled105.thead`
|
|
18289
18585
|
width: 100%;
|
|
18290
18586
|
`;
|
|
18291
18587
|
var TableHead = ({ children, ...props }) => {
|
|
18292
|
-
return /* @__PURE__ */
|
|
18588
|
+
return /* @__PURE__ */ jsx342(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx342(StyledThead, { ...props, children }) });
|
|
18293
18589
|
};
|
|
18294
18590
|
|
|
18295
18591
|
// src/components/Table/TableRow.tsx
|
|
18296
|
-
import { styled as
|
|
18297
|
-
import { jsx as
|
|
18298
|
-
var StyledTableRow =
|
|
18592
|
+
import { styled as styled106 } from "styled-components";
|
|
18593
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
18594
|
+
var StyledTableRow = styled106.tr`
|
|
18299
18595
|
width: 100%;
|
|
18300
18596
|
`;
|
|
18301
18597
|
var TableRow = ({ children, ...props }) => {
|
|
18302
|
-
return /* @__PURE__ */
|
|
18598
|
+
return /* @__PURE__ */ jsx343(StyledTableRow, { ...props, children });
|
|
18303
18599
|
};
|
|
18304
18600
|
|
|
18305
18601
|
// src/components/Tabs/Tabs.tsx
|
|
18306
18602
|
import { Root as RadixTabsRoot } from "@radix-ui/react-tabs";
|
|
18307
18603
|
import { useCallback as useCallback19, useState as useState26 } from "react";
|
|
18308
|
-
import { isNotNil as
|
|
18604
|
+
import { isNotNil as isNotNil40 } from "@wistia/type-guards";
|
|
18309
18605
|
|
|
18310
18606
|
// src/components/Tabs/useTabsValue.tsx
|
|
18311
18607
|
import { createContext as createContext12, useContext as useContext18 } from "react";
|
|
@@ -18320,7 +18616,7 @@ var useTabsValue = () => {
|
|
|
18320
18616
|
};
|
|
18321
18617
|
|
|
18322
18618
|
// src/components/Tabs/Tabs.tsx
|
|
18323
|
-
import { jsx as
|
|
18619
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
18324
18620
|
var Tabs = ({
|
|
18325
18621
|
children,
|
|
18326
18622
|
value: valueProp,
|
|
@@ -18342,48 +18638,48 @@ var Tabs = ({
|
|
|
18342
18638
|
...props,
|
|
18343
18639
|
onValueChange
|
|
18344
18640
|
};
|
|
18345
|
-
if (
|
|
18641
|
+
if (isNotNil40(value)) {
|
|
18346
18642
|
rootProps.value = value;
|
|
18347
18643
|
}
|
|
18348
|
-
if (
|
|
18644
|
+
if (isNotNil40(defaultValue)) {
|
|
18349
18645
|
rootProps.defaultValue = defaultValue;
|
|
18350
18646
|
}
|
|
18351
|
-
return /* @__PURE__ */
|
|
18647
|
+
return /* @__PURE__ */ jsx344(RadixTabsRoot, { ...rootProps, children: /* @__PURE__ */ jsx344(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx344(SelectedItemStyleProvider, { children }) }) });
|
|
18352
18648
|
};
|
|
18353
18649
|
Tabs.displayName = "Tabs_UI";
|
|
18354
18650
|
|
|
18355
18651
|
// src/components/Tabs/TabsContent.tsx
|
|
18356
18652
|
import { Content as RadixTabsContent } from "@radix-ui/react-tabs";
|
|
18357
|
-
import { jsx as
|
|
18653
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
18358
18654
|
var TabsContent = ({ children, value }) => {
|
|
18359
|
-
return /* @__PURE__ */
|
|
18655
|
+
return /* @__PURE__ */ jsx345(RadixTabsContent, { value, children });
|
|
18360
18656
|
};
|
|
18361
18657
|
TabsContent.displayName = "TabsContent_UI";
|
|
18362
18658
|
|
|
18363
18659
|
// src/components/Tabs/TabsList.tsx
|
|
18364
18660
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
18365
|
-
import { styled as
|
|
18661
|
+
import { styled as styled108 } from "styled-components";
|
|
18366
18662
|
|
|
18367
18663
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18368
18664
|
import { isUndefined as isUndefined6 } from "@wistia/type-guards";
|
|
18369
18665
|
|
|
18370
18666
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
18371
|
-
import { styled as
|
|
18372
|
-
var TabsSelectedItemIndicatorDiv =
|
|
18667
|
+
import { styled as styled107 } from "styled-components";
|
|
18668
|
+
var TabsSelectedItemIndicatorDiv = styled107(SelectedItemIndicatorDiv)`
|
|
18373
18669
|
:has(button[role='tab']:focus-visible) > & {
|
|
18374
18670
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
18375
18671
|
}
|
|
18376
18672
|
`;
|
|
18377
18673
|
|
|
18378
18674
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
18379
|
-
import { jsx as
|
|
18675
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
18380
18676
|
var SelectedTabIndicator = () => {
|
|
18381
18677
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
18382
18678
|
const selectedValue = useTabsValue();
|
|
18383
18679
|
if (selectedValue == null || isUndefined6(selectedItemIndicatorStyle)) {
|
|
18384
18680
|
return null;
|
|
18385
18681
|
}
|
|
18386
|
-
return /* @__PURE__ */
|
|
18682
|
+
return /* @__PURE__ */ jsx346(
|
|
18387
18683
|
TabsSelectedItemIndicatorDiv,
|
|
18388
18684
|
{
|
|
18389
18685
|
"data-wui-selected-item-indicator": true,
|
|
@@ -18393,19 +18689,19 @@ var SelectedTabIndicator = () => {
|
|
|
18393
18689
|
};
|
|
18394
18690
|
|
|
18395
18691
|
// src/components/Tabs/TabsList.tsx
|
|
18396
|
-
import { jsx as
|
|
18397
|
-
var StyledRadixTabsList =
|
|
18692
|
+
import { jsx as jsx347, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
18693
|
+
var StyledRadixTabsList = styled108(RadixTabList)`
|
|
18398
18694
|
${segmentedControlStyles}
|
|
18399
18695
|
`;
|
|
18400
18696
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
18401
|
-
return /* @__PURE__ */
|
|
18697
|
+
return /* @__PURE__ */ jsxs68(
|
|
18402
18698
|
StyledRadixTabsList,
|
|
18403
18699
|
{
|
|
18404
18700
|
$fullWidth: fullWidth,
|
|
18405
18701
|
"aria-label": props["aria-label"],
|
|
18406
18702
|
children: [
|
|
18407
18703
|
children,
|
|
18408
|
-
/* @__PURE__ */
|
|
18704
|
+
/* @__PURE__ */ jsx347(SelectedTabIndicator, {})
|
|
18409
18705
|
]
|
|
18410
18706
|
}
|
|
18411
18707
|
);
|
|
@@ -18414,12 +18710,12 @@ TabsList.displayName = "TabsList_UI";
|
|
|
18414
18710
|
|
|
18415
18711
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18416
18712
|
import { forwardRef as forwardRef36, useEffect as useEffect23, useRef as useRef24 } from "react";
|
|
18417
|
-
import { isNotNil as
|
|
18713
|
+
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
18418
18714
|
|
|
18419
18715
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
18420
|
-
import { styled as
|
|
18716
|
+
import { styled as styled109 } from "styled-components";
|
|
18421
18717
|
import { Trigger as RadixTabsTrigger } from "@radix-ui/react-tabs";
|
|
18422
|
-
var StyledRadixTabsTrigger =
|
|
18718
|
+
var StyledRadixTabsTrigger = styled109(RadixTabsTrigger)`
|
|
18423
18719
|
${segmentedControlItemStyles}
|
|
18424
18720
|
|
|
18425
18721
|
&:focus-visible {
|
|
@@ -18428,7 +18724,7 @@ var StyledRadixTabsTrigger = styled106(RadixTabsTrigger)`
|
|
|
18428
18724
|
`;
|
|
18429
18725
|
|
|
18430
18726
|
// src/components/Tabs/TabsTrigger.tsx
|
|
18431
|
-
import { jsxs as
|
|
18727
|
+
import { jsxs as jsxs69 } from "react/jsx-runtime";
|
|
18432
18728
|
var TabsTrigger = forwardRef36(
|
|
18433
18729
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
18434
18730
|
const selectedValue = useTabsValue();
|
|
@@ -18460,13 +18756,13 @@ var TabsTrigger = forwardRef36(
|
|
|
18460
18756
|
resizeObserver.disconnect();
|
|
18461
18757
|
};
|
|
18462
18758
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
18463
|
-
return /* @__PURE__ */
|
|
18759
|
+
return /* @__PURE__ */ jsxs69(
|
|
18464
18760
|
StyledRadixTabsTrigger,
|
|
18465
18761
|
{
|
|
18466
18762
|
...otherProps,
|
|
18467
18763
|
ref: combinedRef,
|
|
18468
|
-
$hasLabel:
|
|
18469
|
-
"aria-label":
|
|
18764
|
+
$hasLabel: isNotNil41(label),
|
|
18765
|
+
"aria-label": isNotNil41(label) ? void 0 : ariaLabel,
|
|
18470
18766
|
disabled,
|
|
18471
18767
|
value,
|
|
18472
18768
|
children: [
|
|
@@ -18480,10 +18776,10 @@ var TabsTrigger = forwardRef36(
|
|
|
18480
18776
|
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
18481
18777
|
|
|
18482
18778
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
18483
|
-
import { styled as
|
|
18484
|
-
import { isNotNil as
|
|
18485
|
-
import { jsx as
|
|
18486
|
-
var StyledThumbnailBadge =
|
|
18779
|
+
import { styled as styled110 } from "styled-components";
|
|
18780
|
+
import { isNotNil as isNotNil42 } from "@wistia/type-guards";
|
|
18781
|
+
import { jsx as jsx348, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
18782
|
+
var StyledThumbnailBadge = styled110.div`
|
|
18487
18783
|
align-items: center;
|
|
18488
18784
|
background-color: rgb(0 0 0 / 50%);
|
|
18489
18785
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -18509,19 +18805,19 @@ var StyledThumbnailBadge = styled107.div`
|
|
|
18509
18805
|
}
|
|
18510
18806
|
`;
|
|
18511
18807
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
18512
|
-
return /* @__PURE__ */
|
|
18513
|
-
|
|
18514
|
-
/* @__PURE__ */
|
|
18808
|
+
return /* @__PURE__ */ jsxs70(StyledThumbnailBadge, { ...props, children: [
|
|
18809
|
+
isNotNil42(icon) && icon,
|
|
18810
|
+
/* @__PURE__ */ jsx348("span", { children: label })
|
|
18515
18811
|
] });
|
|
18516
18812
|
};
|
|
18517
18813
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
18518
18814
|
|
|
18519
18815
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18520
18816
|
import { forwardRef as forwardRef37, useState as useState27, useRef as useRef25, useCallback as useCallback20, useMemo as useMemo17 } from "react";
|
|
18521
|
-
import { styled as
|
|
18817
|
+
import { styled as styled112 } from "styled-components";
|
|
18522
18818
|
import {
|
|
18523
18819
|
isNil as isNil19,
|
|
18524
|
-
isNotNil as
|
|
18820
|
+
isNotNil as isNotNil45,
|
|
18525
18821
|
isUndefined as isUndefined7,
|
|
18526
18822
|
isEmptyString as isEmptyString2,
|
|
18527
18823
|
isString as isString4,
|
|
@@ -18529,7 +18825,7 @@ import {
|
|
|
18529
18825
|
} from "@wistia/type-guards";
|
|
18530
18826
|
|
|
18531
18827
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
18532
|
-
import { isNotNil as
|
|
18828
|
+
import { isNotNil as isNotNil43 } from "@wistia/type-guards";
|
|
18533
18829
|
import { css as css51 } from "styled-components";
|
|
18534
18830
|
var gradients = {
|
|
18535
18831
|
defaultDarkOne: css51`
|
|
@@ -18657,14 +18953,14 @@ var gradients = {
|
|
|
18657
18953
|
};
|
|
18658
18954
|
var gradientMap = Object.keys(gradients);
|
|
18659
18955
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
18660
|
-
return
|
|
18956
|
+
return isNotNil43(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
18661
18957
|
};
|
|
18662
18958
|
|
|
18663
18959
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
18664
|
-
import { styled as
|
|
18665
|
-
import { isNotNil as
|
|
18666
|
-
import { jsx as
|
|
18667
|
-
var ScrubLine =
|
|
18960
|
+
import { styled as styled111 } from "styled-components";
|
|
18961
|
+
import { isNotNil as isNotNil44 } from "@wistia/type-guards";
|
|
18962
|
+
import { jsx as jsx349, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
18963
|
+
var ScrubLine = styled111.div`
|
|
18668
18964
|
position: absolute;
|
|
18669
18965
|
top: 0;
|
|
18670
18966
|
height: 100%;
|
|
@@ -18756,8 +19052,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18756
19052
|
);
|
|
18757
19053
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
18758
19054
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
18759
|
-
const showScrubLine =
|
|
18760
|
-
const scrubLinePosition =
|
|
19055
|
+
const showScrubLine = isNotNil44(cursorPosition);
|
|
19056
|
+
const scrubLinePosition = isNotNil44(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
18761
19057
|
const viewerStyles = {
|
|
18762
19058
|
position: "relative",
|
|
18763
19059
|
overflow: "hidden",
|
|
@@ -18775,14 +19071,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18775
19071
|
backgroundPosition,
|
|
18776
19072
|
backgroundSize
|
|
18777
19073
|
};
|
|
18778
|
-
return /* @__PURE__ */
|
|
19074
|
+
return /* @__PURE__ */ jsxs71(
|
|
18779
19075
|
"div",
|
|
18780
19076
|
{
|
|
18781
19077
|
...props,
|
|
18782
19078
|
style: viewerStyles,
|
|
18783
19079
|
children: [
|
|
18784
|
-
/* @__PURE__ */
|
|
18785
|
-
showScrubLine ? /* @__PURE__ */
|
|
19080
|
+
/* @__PURE__ */ jsx349("div", { style: storyboardStyles }),
|
|
19081
|
+
showScrubLine ? /* @__PURE__ */ jsx349(
|
|
18786
19082
|
ScrubLine,
|
|
18787
19083
|
{
|
|
18788
19084
|
style: {
|
|
@@ -18796,7 +19092,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18796
19092
|
};
|
|
18797
19093
|
|
|
18798
19094
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18799
|
-
import { jsx as
|
|
19095
|
+
import { jsx as jsx350, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
18800
19096
|
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
18801
19097
|
var SQUARE_ASPECT_RATIO = 1;
|
|
18802
19098
|
var getAspectRatioValue = (aspectRatio) => {
|
|
@@ -18805,19 +19101,19 @@ var getAspectRatioValue = (aspectRatio) => {
|
|
|
18805
19101
|
}
|
|
18806
19102
|
return WIDE_ASPECT_RATIO;
|
|
18807
19103
|
};
|
|
18808
|
-
var WideThumbnailImage =
|
|
19104
|
+
var WideThumbnailImage = styled112.img`
|
|
18809
19105
|
height: 100%;
|
|
18810
19106
|
object-fit: cover;
|
|
18811
19107
|
width: 100%;
|
|
18812
19108
|
`;
|
|
18813
|
-
var SquareThumbnailImage =
|
|
19109
|
+
var SquareThumbnailImage = styled112.img`
|
|
18814
19110
|
backdrop-filter: blur(8px);
|
|
18815
19111
|
object-fit: contain;
|
|
18816
19112
|
width: 100%;
|
|
18817
19113
|
`;
|
|
18818
19114
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
18819
19115
|
if (thumbnailImageType === "wide") {
|
|
18820
|
-
return /* @__PURE__ */
|
|
19116
|
+
return /* @__PURE__ */ jsx350(
|
|
18821
19117
|
WideThumbnailImage,
|
|
18822
19118
|
{
|
|
18823
19119
|
alt: "",
|
|
@@ -18826,7 +19122,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
18826
19122
|
}
|
|
18827
19123
|
);
|
|
18828
19124
|
}
|
|
18829
|
-
return /* @__PURE__ */
|
|
19125
|
+
return /* @__PURE__ */ jsx350(
|
|
18830
19126
|
SquareThumbnailImage,
|
|
18831
19127
|
{
|
|
18832
19128
|
alt: "",
|
|
@@ -18835,7 +19131,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
18835
19131
|
}
|
|
18836
19132
|
);
|
|
18837
19133
|
};
|
|
18838
|
-
var StyledThumbnailContainer =
|
|
19134
|
+
var StyledThumbnailContainer = styled112.div`
|
|
18839
19135
|
container-type: size;
|
|
18840
19136
|
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
18841
19137
|
width: ${({ $width }) => $width};
|
|
@@ -18843,10 +19139,10 @@ var StyledThumbnailContainer = styled109.div`
|
|
|
18843
19139
|
overflow: hidden;
|
|
18844
19140
|
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
18845
19141
|
`;
|
|
18846
|
-
var StyledThumbnail =
|
|
19142
|
+
var StyledThumbnail = styled112.div`
|
|
18847
19143
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
18848
19144
|
|
|
18849
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
19145
|
+
background-image: ${({ $backgroundUrl }) => isNotNil45($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
18850
19146
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
18851
19147
|
// if we don't have $backgroundUrl show a gradient
|
|
18852
19148
|
isNil19($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
@@ -18878,7 +19174,7 @@ var StoryboardRenderer = ({
|
|
|
18878
19174
|
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
18879
19175
|
const targetWidth = isString4(width) ? parseInt(width, 10) : Number(width);
|
|
18880
19176
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
18881
|
-
return /* @__PURE__ */
|
|
19177
|
+
return /* @__PURE__ */ jsx350(
|
|
18882
19178
|
ThumbnailStoryboardViewer,
|
|
18883
19179
|
{
|
|
18884
19180
|
cursorPosition: effectiveCursorPosition,
|
|
@@ -18904,7 +19200,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18904
19200
|
};
|
|
18905
19201
|
};
|
|
18906
19202
|
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18907
|
-
return
|
|
19203
|
+
return isNotNil45(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
18908
19204
|
};
|
|
18909
19205
|
var Thumbnail = forwardRef37(
|
|
18910
19206
|
({
|
|
@@ -18927,7 +19223,7 @@ var Thumbnail = forwardRef37(
|
|
|
18927
19223
|
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18928
19224
|
[thumbnailImageType, thumbnailUrl]
|
|
18929
19225
|
);
|
|
18930
|
-
const isScrubbable =
|
|
19226
|
+
const isScrubbable = isNotNil45(storyboard);
|
|
18931
19227
|
const trackStoryboardLoadStatus = useCallback20(() => {
|
|
18932
19228
|
if (storyboardElementRef.current || !storyboard) {
|
|
18933
19229
|
return storyboardElementRef.current;
|
|
@@ -18968,7 +19264,7 @@ var Thumbnail = forwardRef37(
|
|
|
18968
19264
|
}, [isScrubbable, isMouseOver, isStoryboardReady, storyboard, height]);
|
|
18969
19265
|
let thumbnailContent = null;
|
|
18970
19266
|
if (storyboard && shouldRenderStoryboard) {
|
|
18971
|
-
thumbnailContent = /* @__PURE__ */
|
|
19267
|
+
thumbnailContent = /* @__PURE__ */ jsx350(
|
|
18972
19268
|
StoryboardRenderer,
|
|
18973
19269
|
{
|
|
18974
19270
|
aspectRatio,
|
|
@@ -18980,7 +19276,7 @@ var Thumbnail = forwardRef37(
|
|
|
18980
19276
|
}
|
|
18981
19277
|
);
|
|
18982
19278
|
} else if (hasValidThumbnailUrl(thumbnailUrl)) {
|
|
18983
|
-
thumbnailContent = /* @__PURE__ */
|
|
19279
|
+
thumbnailContent = /* @__PURE__ */ jsx350(
|
|
18984
19280
|
ThumbnailImage,
|
|
18985
19281
|
{
|
|
18986
19282
|
thumbnailImageType,
|
|
@@ -18990,7 +19286,7 @@ var Thumbnail = forwardRef37(
|
|
|
18990
19286
|
} else {
|
|
18991
19287
|
thumbnailContent = null;
|
|
18992
19288
|
}
|
|
18993
|
-
return /* @__PURE__ */
|
|
19289
|
+
return /* @__PURE__ */ jsx350(
|
|
18994
19290
|
StyledThumbnailContainer,
|
|
18995
19291
|
{
|
|
18996
19292
|
ref,
|
|
@@ -19003,14 +19299,14 @@ var Thumbnail = forwardRef37(
|
|
|
19003
19299
|
onMouseOut: handleMouseOut,
|
|
19004
19300
|
role: "presentation",
|
|
19005
19301
|
...props,
|
|
19006
|
-
children: /* @__PURE__ */
|
|
19302
|
+
children: /* @__PURE__ */ jsxs72(
|
|
19007
19303
|
StyledThumbnail,
|
|
19008
19304
|
{
|
|
19009
19305
|
$backgroundUrl: backgroundUrl,
|
|
19010
19306
|
$gradientBackground: gradientBackground,
|
|
19011
19307
|
"data-testid": "thumbnail-inner",
|
|
19012
19308
|
children: [
|
|
19013
|
-
|
|
19309
|
+
isNotNil45(children) ? children : null,
|
|
19014
19310
|
thumbnailContent
|
|
19015
19311
|
]
|
|
19016
19312
|
}
|
|
@@ -19022,17 +19318,17 @@ var Thumbnail = forwardRef37(
|
|
|
19022
19318
|
Thumbnail.displayName = "Thumbnail_UI";
|
|
19023
19319
|
|
|
19024
19320
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
19025
|
-
import { cloneElement as
|
|
19026
|
-
import { styled as
|
|
19321
|
+
import { cloneElement as cloneElement10, Children as Children11 } from "react";
|
|
19322
|
+
import { styled as styled113 } from "styled-components";
|
|
19027
19323
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
19028
|
-
import { jsx as
|
|
19029
|
-
var ThumbnailCollageContainer =
|
|
19324
|
+
import { jsx as jsx351 } from "react/jsx-runtime";
|
|
19325
|
+
var ThumbnailCollageContainer = styled113.div`
|
|
19030
19326
|
container-type: size;
|
|
19031
19327
|
width: 100%;
|
|
19032
19328
|
aspect-ratio: 16 / 9;
|
|
19033
19329
|
display: flex;
|
|
19034
19330
|
`;
|
|
19035
|
-
var StyledThumbnailCollage =
|
|
19331
|
+
var StyledThumbnailCollage = styled113.div`
|
|
19036
19332
|
display: grid;
|
|
19037
19333
|
gap: var(--wui-space-01);
|
|
19038
19334
|
width: 100%;
|
|
@@ -19084,13 +19380,13 @@ var ThumbnailCollage = ({
|
|
|
19084
19380
|
const thumbnailArray = Children11.toArray(children);
|
|
19085
19381
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
19086
19382
|
const thumbnails = isNonEmptyArray(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
19087
|
-
return
|
|
19383
|
+
return cloneElement10(child, {
|
|
19088
19384
|
...child.props,
|
|
19089
19385
|
children: void 0
|
|
19090
19386
|
});
|
|
19091
19387
|
}) : [
|
|
19092
19388
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
19093
|
-
/* @__PURE__ */
|
|
19389
|
+
/* @__PURE__ */ jsx351(
|
|
19094
19390
|
Thumbnail,
|
|
19095
19391
|
{
|
|
19096
19392
|
gradientBackground,
|
|
@@ -19099,7 +19395,7 @@ var ThumbnailCollage = ({
|
|
|
19099
19395
|
"fallback"
|
|
19100
19396
|
)
|
|
19101
19397
|
];
|
|
19102
|
-
return /* @__PURE__ */
|
|
19398
|
+
return /* @__PURE__ */ jsx351(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx351(
|
|
19103
19399
|
StyledThumbnailCollage,
|
|
19104
19400
|
{
|
|
19105
19401
|
$gradientBackground: gradientBackground,
|
|
@@ -19111,26 +19407,26 @@ var ThumbnailCollage = ({
|
|
|
19111
19407
|
};
|
|
19112
19408
|
|
|
19113
19409
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
19114
|
-
import { styled as
|
|
19115
|
-
import { isNotNil as
|
|
19116
|
-
import { jsx as
|
|
19410
|
+
import { styled as styled114, css as css52 } from "styled-components";
|
|
19411
|
+
import { isNotNil as isNotNil46 } from "@wistia/type-guards";
|
|
19412
|
+
import { jsx as jsx352, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
19117
19413
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
19118
19414
|
if (iconOnly) {
|
|
19119
|
-
return /* @__PURE__ */
|
|
19415
|
+
return /* @__PURE__ */ jsx352(
|
|
19120
19416
|
"g",
|
|
19121
19417
|
{
|
|
19122
19418
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19123
19419
|
fill: brandmarkColor,
|
|
19124
|
-
children: /* @__PURE__ */
|
|
19420
|
+
children: /* @__PURE__ */ jsx352("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
19421
|
}
|
|
19126
19422
|
);
|
|
19127
19423
|
}
|
|
19128
|
-
return /* @__PURE__ */
|
|
19424
|
+
return /* @__PURE__ */ jsx352(
|
|
19129
19425
|
"g",
|
|
19130
19426
|
{
|
|
19131
19427
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
19132
19428
|
fill: brandmarkColor,
|
|
19133
|
-
children: /* @__PURE__ */
|
|
19429
|
+
children: /* @__PURE__ */ jsx352("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
19430
|
}
|
|
19135
19431
|
);
|
|
19136
19432
|
};
|
|
@@ -19138,12 +19434,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
19138
19434
|
if (iconOnly) {
|
|
19139
19435
|
return null;
|
|
19140
19436
|
}
|
|
19141
|
-
return /* @__PURE__ */
|
|
19437
|
+
return /* @__PURE__ */ jsx352(
|
|
19142
19438
|
"g",
|
|
19143
19439
|
{
|
|
19144
19440
|
"data-testid": "ui-wistia-logo-logotype",
|
|
19145
19441
|
fill: logotypeColor,
|
|
19146
|
-
children: /* @__PURE__ */
|
|
19442
|
+
children: /* @__PURE__ */ jsx352("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
19443
|
}
|
|
19148
19444
|
);
|
|
19149
19445
|
};
|
|
@@ -19153,7 +19449,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
19153
19449
|
}
|
|
19154
19450
|
return "0 0 144 31.47";
|
|
19155
19451
|
};
|
|
19156
|
-
var WistiaLogoComponent =
|
|
19452
|
+
var WistiaLogoComponent = styled114.svg`
|
|
19157
19453
|
height: ${({ height }) => `${height}px`};
|
|
19158
19454
|
|
|
19159
19455
|
/* ensure it will always fit on mobile */
|
|
@@ -19211,7 +19507,7 @@ var WistiaLogo = ({
|
|
|
19211
19507
|
};
|
|
19212
19508
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
19213
19509
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
19214
|
-
const Logo = /* @__PURE__ */
|
|
19510
|
+
const Logo = /* @__PURE__ */ jsxs73(
|
|
19215
19511
|
WistiaLogoComponent,
|
|
19216
19512
|
{
|
|
19217
19513
|
$hoverColor: hoverColor,
|
|
@@ -19224,110 +19520,16 @@ var WistiaLogo = ({
|
|
|
19224
19520
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19225
19521
|
...props,
|
|
19226
19522
|
children: [
|
|
19227
|
-
/* @__PURE__ */
|
|
19228
|
-
|
|
19523
|
+
/* @__PURE__ */ jsx352("title", { children: title }),
|
|
19524
|
+
isNotNil46(description) ? /* @__PURE__ */ jsx352("desc", { children: description }) : null,
|
|
19229
19525
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
19230
19526
|
renderLogotype(logotypeColor, iconOnly)
|
|
19231
19527
|
]
|
|
19232
19528
|
}
|
|
19233
19529
|
);
|
|
19234
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
19530
|
+
return href !== void 0 ? /* @__PURE__ */ jsx352("a", { href, children: Logo }) : Logo;
|
|
19235
19531
|
};
|
|
19236
19532
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
19237
|
-
|
|
19238
|
-
// src/components/SplitButton/SplitButton.tsx
|
|
19239
|
-
import { styled as styled112 } from "styled-components";
|
|
19240
|
-
import { isNotNil as isNotNil45 } from "@wistia/type-guards";
|
|
19241
|
-
import { cloneElement as cloneElement10 } from "react";
|
|
19242
|
-
import { jsx as jsx350, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
19243
|
-
var StyledSplitButton = styled112.span`
|
|
19244
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
19245
|
-
white-space: nowrap;
|
|
19246
|
-
|
|
19247
|
-
&:has(:nth-child(2)) {
|
|
19248
|
-
> [data-wui-button='true']:first-child {
|
|
19249
|
-
border-top-right-radius: 0;
|
|
19250
|
-
border-bottom-right-radius: 0;
|
|
19251
|
-
padding-right: 0;
|
|
19252
|
-
}
|
|
19253
|
-
|
|
19254
|
-
> [data-wui-button='true']:last-child {
|
|
19255
|
-
border-top-left-radius: 0;
|
|
19256
|
-
border-bottom-left-radius: 0;
|
|
19257
|
-
display: inline-flex;
|
|
19258
|
-
}
|
|
19259
|
-
}
|
|
19260
|
-
`;
|
|
19261
|
-
var SplitButton = ({
|
|
19262
|
-
children,
|
|
19263
|
-
menuLabel = "Select an option",
|
|
19264
|
-
menuIcon = /* @__PURE__ */ jsx350(Icon, { type: "caret-down" }),
|
|
19265
|
-
menuItems,
|
|
19266
|
-
disabled = false,
|
|
19267
|
-
colorScheme = "inherit",
|
|
19268
|
-
variant = "solid",
|
|
19269
|
-
secondaryAction,
|
|
19270
|
-
size = "md",
|
|
19271
|
-
unstyled = false,
|
|
19272
|
-
menuProps = {},
|
|
19273
|
-
...props
|
|
19274
|
-
}) => {
|
|
19275
|
-
return /* @__PURE__ */ jsxs72(StyledSplitButton, { $colorScheme: colorScheme, children: [
|
|
19276
|
-
/* @__PURE__ */ jsx350(
|
|
19277
|
-
Button,
|
|
19278
|
-
{
|
|
19279
|
-
disabled,
|
|
19280
|
-
size,
|
|
19281
|
-
unstyled,
|
|
19282
|
-
variant,
|
|
19283
|
-
...props,
|
|
19284
|
-
children
|
|
19285
|
-
}
|
|
19286
|
-
),
|
|
19287
|
-
isNotNil45(menuItems) && /* @__PURE__ */ jsx350(
|
|
19288
|
-
Menu,
|
|
19289
|
-
{
|
|
19290
|
-
...menuProps,
|
|
19291
|
-
disabled,
|
|
19292
|
-
trigger: /* @__PURE__ */ jsx350(
|
|
19293
|
-
IconButton,
|
|
19294
|
-
{
|
|
19295
|
-
disabled,
|
|
19296
|
-
label: menuLabel,
|
|
19297
|
-
size,
|
|
19298
|
-
unstyled,
|
|
19299
|
-
variant,
|
|
19300
|
-
children: menuIcon
|
|
19301
|
-
}
|
|
19302
|
-
),
|
|
19303
|
-
children: menuItems
|
|
19304
|
-
}
|
|
19305
|
-
),
|
|
19306
|
-
isNotNil45(secondaryAction) && cloneElement10(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
19307
|
-
] });
|
|
19308
|
-
};
|
|
19309
|
-
SplitButton.displayName = "SplitButton_UI";
|
|
19310
|
-
|
|
19311
|
-
// src/components/CustomizableThemeWrapper/CustomizableThemeWrapper.tsx
|
|
19312
|
-
import { styled as styled113 } from "styled-components";
|
|
19313
|
-
import { jsx as jsx351 } from "react/jsx-runtime";
|
|
19314
|
-
var StyledCustomizableThemeWrapper = styled113.div(
|
|
19315
|
-
(props) => props.$overrides
|
|
19316
|
-
);
|
|
19317
|
-
var CustomizableThemeWrapper = ({
|
|
19318
|
-
children,
|
|
19319
|
-
overrides,
|
|
19320
|
-
...props
|
|
19321
|
-
}) => /* @__PURE__ */ jsx351(
|
|
19322
|
-
StyledCustomizableThemeWrapper,
|
|
19323
|
-
{
|
|
19324
|
-
...props,
|
|
19325
|
-
$overrides: overrides,
|
|
19326
|
-
"data-wui-theme": "true",
|
|
19327
|
-
children
|
|
19328
|
-
}
|
|
19329
|
-
);
|
|
19330
|
-
CustomizableThemeWrapper.displayName = "CustomizableThemeWrapper_UI";
|
|
19331
19533
|
export {
|
|
19332
19534
|
ActionButton,
|
|
19333
19535
|
Avatar,
|
|
@@ -19417,6 +19619,7 @@ export {
|
|
|
19417
19619
|
MenuItemLabel,
|
|
19418
19620
|
MenuLabel,
|
|
19419
19621
|
MenuRadioGroup,
|
|
19622
|
+
Meter,
|
|
19420
19623
|
Modal,
|
|
19421
19624
|
ModalCallout,
|
|
19422
19625
|
ModalCallouts,
|