@wistia/ui 0.6.42 → 0.6.43-beta.2091ddd5.7b17d2f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +83 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +16 -11
- package/dist/index.d.ts +16 -11
- package/dist/index.mjs +78 -86
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.43-beta.2091ddd5.7b17d2f
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2363,11 +2363,11 @@ var EllipsisComponent = import_styled_components13.default.span`
|
|
|
2363
2363
|
return void 0;
|
|
2364
2364
|
}}
|
|
2365
2365
|
`;
|
|
2366
|
-
var Ellipsis = ({ children, lines, ...
|
|
2366
|
+
var Ellipsis = ({ children, lines, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2367
2367
|
EllipsisComponent,
|
|
2368
2368
|
{
|
|
2369
2369
|
$lines: lines,
|
|
2370
|
-
...
|
|
2370
|
+
...props,
|
|
2371
2371
|
children
|
|
2372
2372
|
}
|
|
2373
2373
|
);
|
|
@@ -6934,7 +6934,7 @@ var Icon = ({
|
|
|
6934
6934
|
size = "lg",
|
|
6935
6935
|
style,
|
|
6936
6936
|
type,
|
|
6937
|
-
...
|
|
6937
|
+
...props
|
|
6938
6938
|
}) => {
|
|
6939
6939
|
const responsiveSize = useResponsiveProp(size);
|
|
6940
6940
|
if ((0, import_type_guards13.isNil)(type)) {
|
|
@@ -6966,7 +6966,7 @@ var Icon = ({
|
|
|
6966
6966
|
viewBox: "0 0 24 24",
|
|
6967
6967
|
width: `${iconSizeMap[responsiveSize]}px`,
|
|
6968
6968
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6969
|
-
...
|
|
6969
|
+
...props,
|
|
6970
6970
|
color: iconColor
|
|
6971
6971
|
}
|
|
6972
6972
|
);
|
|
@@ -7028,7 +7028,7 @@ var Link = (0, import_react15.forwardRef)(
|
|
|
7028
7028
|
}, ref) => {
|
|
7029
7029
|
const inRouterContext = (0, import_react_router_dom.useInRouterContext)();
|
|
7030
7030
|
const to = generateHref(props.href, type, disabled);
|
|
7031
|
-
const handleClick = async (event
|
|
7031
|
+
const handleClick = async (event) => {
|
|
7032
7032
|
if (disabled) {
|
|
7033
7033
|
event.preventDefault();
|
|
7034
7034
|
} else if (beforeAction) {
|
|
@@ -7040,11 +7040,9 @@ var Link = (0, import_react15.forwardRef)(
|
|
|
7040
7040
|
} finally {
|
|
7041
7041
|
if ((0, import_type_guards14.isFunction)(props.onClick)) {
|
|
7042
7042
|
props.onClick(event);
|
|
7043
|
-
}
|
|
7044
|
-
|
|
7045
|
-
} else if ((0, import_type_guards14.isNotNil)(to)) {
|
|
7043
|
+
}
|
|
7044
|
+
if (!inRouterContext && (0, import_type_guards14.isNotNil)(to)) {
|
|
7046
7045
|
window.location.assign(to);
|
|
7047
|
-
} else {
|
|
7048
7046
|
}
|
|
7049
7047
|
}
|
|
7050
7048
|
} else if ((0, import_type_guards14.isFunction)(props.onClick)) {
|
|
@@ -7414,13 +7412,13 @@ var ColorSchemeWrapper = ({
|
|
|
7414
7412
|
__nav = false,
|
|
7415
7413
|
colorScheme = "inherit",
|
|
7416
7414
|
children,
|
|
7417
|
-
...
|
|
7415
|
+
...props
|
|
7418
7416
|
}) => /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
7419
7417
|
StyledColorSchemeWrapper,
|
|
7420
7418
|
{
|
|
7421
7419
|
$colorScheme: colorScheme,
|
|
7422
7420
|
$nav: __nav,
|
|
7423
|
-
...
|
|
7421
|
+
...props,
|
|
7424
7422
|
children
|
|
7425
7423
|
}
|
|
7426
7424
|
);
|
|
@@ -7513,7 +7511,7 @@ var Avatar = ({
|
|
|
7513
7511
|
name,
|
|
7514
7512
|
size = "md",
|
|
7515
7513
|
onImageLoad,
|
|
7516
|
-
...
|
|
7514
|
+
...props
|
|
7517
7515
|
}) => {
|
|
7518
7516
|
const [imageLoadState, setImageLoadState] = (0, import_react18.useState)("loading");
|
|
7519
7517
|
(0, import_react18.useEffect)(() => {
|
|
@@ -7533,7 +7531,7 @@ var Avatar = ({
|
|
|
7533
7531
|
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7534
7532
|
AvatarWrapper,
|
|
7535
7533
|
{
|
|
7536
|
-
...
|
|
7534
|
+
...props,
|
|
7537
7535
|
$maxHeight: avatarSize,
|
|
7538
7536
|
children: showInitials ? /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7539
7537
|
InitialsContainer,
|
|
@@ -7583,13 +7581,13 @@ var StyledBadge = import_styled_components24.default.div`
|
|
|
7583
7581
|
}
|
|
7584
7582
|
`;
|
|
7585
7583
|
var Badge = (0, import_react19.forwardRef)(
|
|
7586
|
-
({ colorScheme = "inherit", label, icon, ...
|
|
7584
|
+
({ colorScheme = "inherit", label, icon, ...props }, ref) => {
|
|
7587
7585
|
const hasIcon = (0, import_type_guards18.isNotNil)(icon);
|
|
7588
7586
|
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7589
7587
|
StyledBadge,
|
|
7590
7588
|
{
|
|
7591
7589
|
ref,
|
|
7592
|
-
...
|
|
7590
|
+
...props,
|
|
7593
7591
|
$colorScheme: colorScheme,
|
|
7594
7592
|
$hasIcon: hasIcon,
|
|
7595
7593
|
children: [
|
|
@@ -7749,7 +7747,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
|
|
|
7749
7747
|
width,
|
|
7750
7748
|
wrapItems = false,
|
|
7751
7749
|
flexMode,
|
|
7752
|
-
...
|
|
7750
|
+
...props
|
|
7753
7751
|
}, ref) => {
|
|
7754
7752
|
if ((0, import_type_guards19.isNotUndefined)(height)) {
|
|
7755
7753
|
if (fill === true || fill === "vertical") {
|
|
@@ -7793,7 +7791,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
|
|
|
7793
7791
|
$width: width,
|
|
7794
7792
|
$wrapItems: wrapItems,
|
|
7795
7793
|
as: renderAs ?? DEFAULT_ELEMENT,
|
|
7796
|
-
...
|
|
7794
|
+
...props,
|
|
7797
7795
|
children: wrapChildren(children)
|
|
7798
7796
|
}
|
|
7799
7797
|
);
|
|
@@ -7930,7 +7928,7 @@ var ButtonGroup = ({
|
|
|
7930
7928
|
align = "left",
|
|
7931
7929
|
fullWidth = false,
|
|
7932
7930
|
collapseOnSmallScreens = true,
|
|
7933
|
-
...
|
|
7931
|
+
...props
|
|
7934
7932
|
}) => {
|
|
7935
7933
|
if ((0, import_type_guards20.isNil)(children)) {
|
|
7936
7934
|
return null;
|
|
@@ -7941,7 +7939,7 @@ var ButtonGroup = ({
|
|
|
7941
7939
|
$align: align,
|
|
7942
7940
|
$collapse: collapseOnSmallScreens,
|
|
7943
7941
|
$fullWidth: fullWidth,
|
|
7944
|
-
...
|
|
7942
|
+
...props,
|
|
7945
7943
|
children
|
|
7946
7944
|
}
|
|
7947
7945
|
);
|
|
@@ -8093,13 +8091,13 @@ var ScreenReaderOnly = ({
|
|
|
8093
8091
|
text,
|
|
8094
8092
|
children,
|
|
8095
8093
|
focusable = false,
|
|
8096
|
-
...
|
|
8094
|
+
...props
|
|
8097
8095
|
}) => {
|
|
8098
8096
|
const accessibleText = (0, import_type_guards22.isNotNil)(text) ? text : children;
|
|
8099
8097
|
if (focusable) {
|
|
8100
|
-
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...
|
|
8098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
|
|
8101
8099
|
}
|
|
8102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHidden, { ...
|
|
8100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHidden, { ...props, children: accessibleText });
|
|
8103
8101
|
};
|
|
8104
8102
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
8105
8103
|
|
|
@@ -8503,7 +8501,7 @@ var HeadingComponent = (0, import_react26.forwardRef)(
|
|
|
8503
8501
|
preventUserSelect = false,
|
|
8504
8502
|
variant = "heading1",
|
|
8505
8503
|
renderAs,
|
|
8506
|
-
...
|
|
8504
|
+
...props
|
|
8507
8505
|
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
8508
8506
|
StyledHeading,
|
|
8509
8507
|
{
|
|
@@ -8516,7 +8514,7 @@ var HeadingComponent = (0, import_react26.forwardRef)(
|
|
|
8516
8514
|
$preventUserSelect: preventUserSelect,
|
|
8517
8515
|
$variant: variant,
|
|
8518
8516
|
as: renderAs ?? variantElementMap[variant],
|
|
8519
|
-
...
|
|
8517
|
+
...props
|
|
8520
8518
|
}
|
|
8521
8519
|
)
|
|
8522
8520
|
);
|
|
@@ -8834,7 +8832,7 @@ var TextComponent = (0, import_react27.forwardRef)(
|
|
|
8834
8832
|
prominence = "primary",
|
|
8835
8833
|
variant = "body2",
|
|
8836
8834
|
renderAs,
|
|
8837
|
-
...
|
|
8835
|
+
...props
|
|
8838
8836
|
}, ref) => {
|
|
8839
8837
|
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
8840
8838
|
StyledText,
|
|
@@ -8849,7 +8847,7 @@ var TextComponent = (0, import_react27.forwardRef)(
|
|
|
8849
8847
|
$prominence: prominence,
|
|
8850
8848
|
$variant: variant,
|
|
8851
8849
|
as: renderAs ?? variantElementMap2[variant],
|
|
8852
|
-
...
|
|
8850
|
+
...props
|
|
8853
8851
|
}
|
|
8854
8852
|
);
|
|
8855
8853
|
}
|
|
@@ -8921,17 +8919,14 @@ var DividerComponent = import_styled_components42.default.div`
|
|
|
8921
8919
|
}
|
|
8922
8920
|
}}
|
|
8923
8921
|
`;
|
|
8924
|
-
var Divider = ({
|
|
8925
|
-
orientation = "horizontal",
|
|
8926
|
-
...otherProps
|
|
8927
|
-
}) => {
|
|
8922
|
+
var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
8928
8923
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
8929
8924
|
DividerComponent,
|
|
8930
8925
|
{
|
|
8931
8926
|
$orientation: orientation,
|
|
8932
8927
|
"aria-orientation": orientation,
|
|
8933
8928
|
role: "separator",
|
|
8934
|
-
...
|
|
8929
|
+
...props
|
|
8935
8930
|
}
|
|
8936
8931
|
);
|
|
8937
8932
|
};
|
|
@@ -9646,12 +9641,12 @@ var Label = ({
|
|
|
9646
9641
|
htmlFor,
|
|
9647
9642
|
required = false,
|
|
9648
9643
|
screenReaderOnly = false,
|
|
9649
|
-
...
|
|
9644
|
+
...props
|
|
9650
9645
|
}) => {
|
|
9651
9646
|
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9652
9647
|
StyledLabel3,
|
|
9653
9648
|
{
|
|
9654
|
-
...
|
|
9649
|
+
...props,
|
|
9655
9650
|
$disabled: disabled,
|
|
9656
9651
|
$required: required,
|
|
9657
9652
|
$screenReaderOnly: screenReaderOnly,
|
|
@@ -9951,7 +9946,7 @@ var Image = ({
|
|
|
9951
9946
|
fit: objFit,
|
|
9952
9947
|
loading = "lazy",
|
|
9953
9948
|
position: objPosition,
|
|
9954
|
-
...
|
|
9949
|
+
...props
|
|
9955
9950
|
}) => /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9956
9951
|
StyledImage,
|
|
9957
9952
|
{
|
|
@@ -9962,7 +9957,7 @@ var Image = ({
|
|
|
9962
9957
|
alt,
|
|
9963
9958
|
loading,
|
|
9964
9959
|
src,
|
|
9965
|
-
...
|
|
9960
|
+
...props
|
|
9966
9961
|
}
|
|
9967
9962
|
);
|
|
9968
9963
|
Image.displayName = "Image";
|
|
@@ -10642,7 +10637,7 @@ var StyledModalContent = (0, import_styled_components61.default)(import_react_di
|
|
|
10642
10637
|
}
|
|
10643
10638
|
`;
|
|
10644
10639
|
var ModalContent = (0, import_react45.forwardRef)(
|
|
10645
|
-
({ fullHeight, width, children, ...
|
|
10640
|
+
({ fullHeight, width, children, ...props }, ref) => {
|
|
10646
10641
|
useFocusRestore();
|
|
10647
10642
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10648
10643
|
StyledModalContent,
|
|
@@ -10651,7 +10646,7 @@ var ModalContent = (0, import_react45.forwardRef)(
|
|
|
10651
10646
|
$fullHeight: fullHeight,
|
|
10652
10647
|
$width: width,
|
|
10653
10648
|
"aria-describedby": void 0,
|
|
10654
|
-
...
|
|
10649
|
+
...props,
|
|
10655
10650
|
children
|
|
10656
10651
|
}
|
|
10657
10652
|
);
|
|
@@ -11487,6 +11482,7 @@ Select.displayName = "Select";
|
|
|
11487
11482
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11488
11483
|
var import_react55 = require("react");
|
|
11489
11484
|
var import_styled_components71 = __toESM(require("styled-components"));
|
|
11485
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
11490
11486
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11491
11487
|
var StyledItem = (0, import_styled_components71.default)(import_react_select2.Item)`
|
|
11492
11488
|
${variantStyleMap2.body3};
|
|
@@ -11516,21 +11512,24 @@ var StyledIconContainer = import_styled_components71.default.span`
|
|
|
11516
11512
|
width: 12px;
|
|
11517
11513
|
`;
|
|
11518
11514
|
var SelectOption = (0, import_react55.forwardRef)(
|
|
11519
|
-
({ children, ...props }, forwardedRef) => {
|
|
11515
|
+
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
11520
11516
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11521
11517
|
StyledItem,
|
|
11522
11518
|
{
|
|
11523
11519
|
...props,
|
|
11524
11520
|
ref: forwardedRef,
|
|
11525
11521
|
children: [
|
|
11526
|
-
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11522
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11527
11523
|
Icon,
|
|
11528
11524
|
{
|
|
11529
11525
|
size: "sm",
|
|
11530
11526
|
type: "checkmark"
|
|
11531
11527
|
}
|
|
11532
11528
|
) }) }),
|
|
11533
|
-
/* @__PURE__ */ (0, import_jsx_runtime252.
|
|
11529
|
+
(0, import_type_guards43.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", { children: [
|
|
11530
|
+
children,
|
|
11531
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
11532
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
|
|
11534
11533
|
]
|
|
11535
11534
|
}
|
|
11536
11535
|
);
|
|
@@ -11562,7 +11561,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11562
11561
|
// src/components/Switch/Switch.tsx
|
|
11563
11562
|
var import_react56 = require("react");
|
|
11564
11563
|
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11565
|
-
var
|
|
11564
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
11566
11565
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11567
11566
|
var sizeSmall3 = import_styled_components73.css`
|
|
11568
11567
|
--wui-size-small-width: 24px;
|
|
@@ -11681,7 +11680,7 @@ var Switch = (0, import_react56.forwardRef)(
|
|
|
11681
11680
|
...props
|
|
11682
11681
|
}, ref) => {
|
|
11683
11682
|
const generatedId = (0, import_react56.useId)();
|
|
11684
|
-
const computedId = (0,
|
|
11683
|
+
const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11685
11684
|
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11686
11685
|
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11687
11686
|
StyledHiddenSwitchInput,
|
|
@@ -11828,7 +11827,7 @@ var TableRow = ({ children, ...props }) => {
|
|
|
11828
11827
|
// src/components/Tabs/Tabs.tsx
|
|
11829
11828
|
var import_react63 = require("react");
|
|
11830
11829
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11831
|
-
var
|
|
11830
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
11832
11831
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11833
11832
|
|
|
11834
11833
|
// src/components/Tabs/TabPanel.tsx
|
|
@@ -11884,7 +11883,7 @@ TabList.displayName = "TabList";
|
|
|
11884
11883
|
var import_react60 = require("react");
|
|
11885
11884
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11886
11885
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11887
|
-
var
|
|
11886
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
11888
11887
|
|
|
11889
11888
|
// src/components/Tabs/useTabsValue.tsx
|
|
11890
11889
|
var import_react59 = require("react");
|
|
@@ -11942,8 +11941,8 @@ var TabItem = (0, import_react60.forwardRef)(
|
|
|
11942
11941
|
StyledTabItem,
|
|
11943
11942
|
{
|
|
11944
11943
|
ref: combinedRef,
|
|
11945
|
-
$hasLabel: (0,
|
|
11946
|
-
"aria-label": (0,
|
|
11944
|
+
$hasLabel: (0, import_type_guards45.isNotNil)(label),
|
|
11945
|
+
"aria-label": (0, import_type_guards45.isNotNil)(label) ? void 0 : ariaLabel,
|
|
11947
11946
|
disabled,
|
|
11948
11947
|
value,
|
|
11949
11948
|
children: [
|
|
@@ -12040,7 +12039,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12040
12039
|
selectedValue,
|
|
12041
12040
|
onSelectedValueChange,
|
|
12042
12041
|
stickyHeaders = true,
|
|
12043
|
-
...
|
|
12042
|
+
...props
|
|
12044
12043
|
}, ref) => {
|
|
12045
12044
|
const tabItems = extractTabItems(children);
|
|
12046
12045
|
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react63.useState)(defaultSelectedValue);
|
|
@@ -12055,7 +12054,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12055
12054
|
ref,
|
|
12056
12055
|
$stickyHeaders: stickyHeaders,
|
|
12057
12056
|
activationMode: "automatic",
|
|
12058
|
-
...
|
|
12057
|
+
...props,
|
|
12059
12058
|
...modeProps,
|
|
12060
12059
|
children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
12061
12060
|
/* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
|
|
@@ -12073,7 +12072,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12073
12072
|
label,
|
|
12074
12073
|
"aria-label": ariaLabelForTab
|
|
12075
12074
|
} = tab.props;
|
|
12076
|
-
if ((0,
|
|
12075
|
+
if ((0, import_type_guards46.isNil)(icon)) {
|
|
12077
12076
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12078
12077
|
TabItem,
|
|
12079
12078
|
{
|
|
@@ -12084,7 +12083,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12084
12083
|
value
|
|
12085
12084
|
);
|
|
12086
12085
|
}
|
|
12087
|
-
if ((0,
|
|
12086
|
+
if ((0, import_type_guards46.isNotNil)(label)) {
|
|
12088
12087
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12089
12088
|
TabItem,
|
|
12090
12089
|
{
|
|
@@ -12096,7 +12095,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12096
12095
|
value
|
|
12097
12096
|
);
|
|
12098
12097
|
}
|
|
12099
|
-
if ((0,
|
|
12098
|
+
if ((0, import_type_guards46.isNotNil)(ariaLabelForTab)) {
|
|
12100
12099
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12101
12100
|
TabItem,
|
|
12102
12101
|
{
|
|
@@ -12139,7 +12138,7 @@ Tab.displayName = "Tab";
|
|
|
12139
12138
|
// src/components/Tag/Tag.tsx
|
|
12140
12139
|
var import_react65 = require("react");
|
|
12141
12140
|
var import_styled_components85 = __toESM(require("styled-components"));
|
|
12142
|
-
var
|
|
12141
|
+
var import_type_guards47 = require("@wistia/type-guards");
|
|
12143
12142
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
12144
12143
|
var TagLabel = import_styled_components85.default.a`
|
|
12145
12144
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -12224,10 +12223,10 @@ var StyledTag = import_styled_components85.default.div`
|
|
|
12224
12223
|
}
|
|
12225
12224
|
`;
|
|
12226
12225
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
12227
|
-
if ((0,
|
|
12226
|
+
if ((0, import_type_guards47.isNil)(onClickRemove)) {
|
|
12228
12227
|
return null;
|
|
12229
12228
|
}
|
|
12230
|
-
if ((0,
|
|
12229
|
+
if ((0, import_type_guards47.isNil)(onClickRemoveLabel)) {
|
|
12231
12230
|
throw new Error(
|
|
12232
12231
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
12233
12232
|
);
|
|
@@ -12255,23 +12254,15 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12255
12254
|
] });
|
|
12256
12255
|
};
|
|
12257
12256
|
var Tag = (0, import_react65.forwardRef)(
|
|
12258
|
-
({
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
href,
|
|
12262
|
-
icon,
|
|
12263
|
-
label,
|
|
12264
|
-
onClickRemoveLabel,
|
|
12265
|
-
...otherProps
|
|
12266
|
-
}, ref) => {
|
|
12267
|
-
const hasIcon = (0, import_type_guards46.isNotNil)(icon);
|
|
12268
|
-
const labelProps = (0, import_type_guards46.isNotNil)(href) && (0, import_type_guards46.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
12257
|
+
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12258
|
+
const hasIcon = (0, import_type_guards47.isNotNil)(icon);
|
|
12259
|
+
const labelProps = (0, import_type_guards47.isNotNil)(href) && (0, import_type_guards47.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
12269
12260
|
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
12270
12261
|
StyledTag,
|
|
12271
12262
|
{
|
|
12272
12263
|
ref,
|
|
12273
12264
|
$colorScheme: colorScheme,
|
|
12274
|
-
...
|
|
12265
|
+
...props,
|
|
12275
12266
|
children: [
|
|
12276
12267
|
/* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
12277
12268
|
TagLabel,
|
|
@@ -12301,7 +12292,7 @@ Tag.displayName = "Tag";
|
|
|
12301
12292
|
|
|
12302
12293
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12303
12294
|
var import_styled_components86 = __toESM(require("styled-components"));
|
|
12304
|
-
var
|
|
12295
|
+
var import_type_guards48 = require("@wistia/type-guards");
|
|
12305
12296
|
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
12306
12297
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12307
12298
|
if (iconOnly) {
|
|
@@ -12379,7 +12370,7 @@ var WistiaLogo = ({
|
|
|
12379
12370
|
opticallyCentered = false,
|
|
12380
12371
|
title = "Wistia Logo",
|
|
12381
12372
|
variant = "standard",
|
|
12382
|
-
...
|
|
12373
|
+
...props
|
|
12383
12374
|
}) => {
|
|
12384
12375
|
const primaryColor = "#2949e5";
|
|
12385
12376
|
const darkColor = "#000934";
|
|
@@ -12411,10 +12402,10 @@ var WistiaLogo = ({
|
|
|
12411
12402
|
role: "img",
|
|
12412
12403
|
viewBox: computedViewBox(iconOnly),
|
|
12413
12404
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12414
|
-
...
|
|
12405
|
+
...props,
|
|
12415
12406
|
children: [
|
|
12416
12407
|
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)("title", { children: title }),
|
|
12417
|
-
(0,
|
|
12408
|
+
(0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
|
|
12418
12409
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
12419
12410
|
renderLogotype(logotypeColor, iconOnly)
|
|
12420
12411
|
]
|
|
@@ -12426,7 +12417,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12426
12417
|
|
|
12427
12418
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12428
12419
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
12429
|
-
var
|
|
12420
|
+
var import_type_guards49 = require("@wistia/type-guards");
|
|
12430
12421
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
12431
12422
|
var StyledThumbnailBadge = import_styled_components87.default.div`
|
|
12432
12423
|
align-items: center;
|
|
@@ -12452,13 +12443,9 @@ var StyledThumbnailBadge = import_styled_components87.default.div`
|
|
|
12452
12443
|
}
|
|
12453
12444
|
}
|
|
12454
12445
|
`;
|
|
12455
|
-
var ThumbnailBadge = ({
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
...otherProps
|
|
12459
|
-
}) => {
|
|
12460
|
-
return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(StyledThumbnailBadge, { ...otherProps, children: [
|
|
12461
|
-
(0, import_type_guards48.isNotNil)(icon) && icon,
|
|
12446
|
+
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
12447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(StyledThumbnailBadge, { ...props, children: [
|
|
12448
|
+
(0, import_type_guards49.isNotNil)(icon) && icon,
|
|
12462
12449
|
/* @__PURE__ */ (0, import_jsx_runtime269.jsx)("span", { children: label })
|
|
12463
12450
|
] });
|
|
12464
12451
|
};
|
|
@@ -12467,10 +12454,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
|
12467
12454
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12468
12455
|
var import_react66 = require("react");
|
|
12469
12456
|
var import_styled_components89 = __toESM(require("styled-components"));
|
|
12470
|
-
var
|
|
12457
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
12471
12458
|
|
|
12472
12459
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12473
|
-
var
|
|
12460
|
+
var import_type_guards50 = require("@wistia/type-guards");
|
|
12474
12461
|
var import_styled_components88 = require("styled-components");
|
|
12475
12462
|
var gradients = {
|
|
12476
12463
|
defaultDarkOne: import_styled_components88.css`
|
|
@@ -12598,7 +12585,7 @@ var gradients = {
|
|
|
12598
12585
|
};
|
|
12599
12586
|
var gradientMap = Object.keys(gradients);
|
|
12600
12587
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
12601
|
-
return (0,
|
|
12588
|
+
return (0, import_type_guards50.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
12602
12589
|
};
|
|
12603
12590
|
|
|
12604
12591
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
@@ -12632,10 +12619,15 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12632
12619
|
);
|
|
12633
12620
|
};
|
|
12634
12621
|
var StyledThumbnail = import_styled_components89.default.div`
|
|
12635
|
-
${({ $
|
|
12622
|
+
background-image: ${({ $backgroundUrl }) => (0, import_type_guards51.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
12623
|
+
${({ $backgroundUrl, $gradientBackground }) => (
|
|
12624
|
+
// if we don't have $backgroundUrl show a gradient
|
|
12625
|
+
(0, import_type_guards51.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
12626
|
+
)};
|
|
12627
|
+
background-position: center center;
|
|
12628
|
+
background-size: cover;
|
|
12636
12629
|
aspect-ratio: 16 / 9;
|
|
12637
|
-
|
|
12638
|
-
border-radius: 4px;
|
|
12630
|
+
border-radius: var(--wui-border-radius-01);
|
|
12639
12631
|
display: flex;
|
|
12640
12632
|
overflow: hidden;
|
|
12641
12633
|
position: relative;
|
|
@@ -12648,9 +12640,9 @@ var Thumbnail = (0, import_react66.forwardRef)(
|
|
|
12648
12640
|
thumbnailUrl,
|
|
12649
12641
|
width = "100%",
|
|
12650
12642
|
children,
|
|
12651
|
-
...
|
|
12643
|
+
...props
|
|
12652
12644
|
}, ref) => {
|
|
12653
|
-
const backgroundUrl = thumbnailImageType === "square" && (0,
|
|
12645
|
+
const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards51.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
|
|
12654
12646
|
return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
|
|
12655
12647
|
StyledThumbnail,
|
|
12656
12648
|
{
|
|
@@ -12658,16 +12650,16 @@ var Thumbnail = (0, import_react66.forwardRef)(
|
|
|
12658
12650
|
$backgroundUrl: backgroundUrl,
|
|
12659
12651
|
$gradientBackground: gradientBackground,
|
|
12660
12652
|
$width: width,
|
|
12661
|
-
...
|
|
12653
|
+
...props,
|
|
12662
12654
|
children: [
|
|
12663
|
-
(0,
|
|
12664
|
-
(0,
|
|
12655
|
+
(0, import_type_guards51.isNotNil)(children) ? children : null,
|
|
12656
|
+
(0, import_type_guards51.isNotNil)(thumbnailUrl) ? /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
12665
12657
|
ThumbnailImage,
|
|
12666
12658
|
{
|
|
12667
12659
|
thumbnailImageType,
|
|
12668
12660
|
thumbnailUrl
|
|
12669
12661
|
}
|
|
12670
|
-
)
|
|
12662
|
+
) : null
|
|
12671
12663
|
]
|
|
12672
12664
|
}
|
|
12673
12665
|
);
|