@wistia/ui 0.14.40 → 0.14.41-beta.602ccdec.8c5e469
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 +178 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +59 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.41-beta.602ccdec.8c5e469
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -12489,6 +12489,7 @@ var Ariakit = __toESM(require("@ariakit/react"));
|
|
|
12489
12489
|
var import_react54 = require("react");
|
|
12490
12490
|
var import_match_sorter = require("match-sorter");
|
|
12491
12491
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
12492
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
12492
12493
|
|
|
12493
12494
|
// src/components/Tag/Tag.tsx
|
|
12494
12495
|
var import_react53 = require("react");
|
|
@@ -12808,7 +12809,8 @@ var extractOptions = (children) => {
|
|
|
12808
12809
|
return options;
|
|
12809
12810
|
};
|
|
12810
12811
|
var defaultDisplayValues = (values, onRemove) => {
|
|
12811
|
-
|
|
12812
|
+
const valueArray = Array.isArray(values) ? values : [values];
|
|
12813
|
+
return valueArray.map((selectedValue) => /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
12812
12814
|
Tag,
|
|
12813
12815
|
{
|
|
12814
12816
|
href: "https://example.com",
|
|
@@ -12849,7 +12851,11 @@ var Combobox2 = ({
|
|
|
12849
12851
|
return () => null;
|
|
12850
12852
|
}, []);
|
|
12851
12853
|
const handleRemoveValue = (valueToRemove) => {
|
|
12852
|
-
|
|
12854
|
+
if ((0, import_type_guards37.isString)(value)) {
|
|
12855
|
+
onChange("");
|
|
12856
|
+
return;
|
|
12857
|
+
}
|
|
12858
|
+
onChange(typeof value === "string" ? "" : value.filter((val) => val !== valueToRemove));
|
|
12853
12859
|
};
|
|
12854
12860
|
const matches = (0, import_react54.useMemo)(() => {
|
|
12855
12861
|
return (0, import_match_sorter.matchSorter)(Object.keys(options), searchValue);
|
|
@@ -12923,12 +12929,12 @@ var Combobox2 = ({
|
|
|
12923
12929
|
};
|
|
12924
12930
|
|
|
12925
12931
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
12926
|
-
var
|
|
12932
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
12927
12933
|
var import_react61 = require("react");
|
|
12928
12934
|
|
|
12929
12935
|
// src/components/Menu/Menu.tsx
|
|
12930
12936
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
12931
|
-
var
|
|
12937
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
12932
12938
|
var import_react56 = require("react");
|
|
12933
12939
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
12934
12940
|
|
|
@@ -13043,7 +13049,7 @@ var Menu = (0, import_react56.forwardRef)(
|
|
|
13043
13049
|
}, ref) => {
|
|
13044
13050
|
const contextValue = (0, import_react56.useMemo)(() => ({ compact }), [compact]);
|
|
13045
13051
|
let controlProps = {
|
|
13046
|
-
...(0,
|
|
13052
|
+
...(0, import_type_guards38.isNotNil)(onOpenChange) && (0, import_type_guards38.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
13047
13053
|
};
|
|
13048
13054
|
if (disabled) {
|
|
13049
13055
|
controlProps = {
|
|
@@ -13057,7 +13063,7 @@ var Menu = (0, import_react56.forwardRef)(
|
|
|
13057
13063
|
modal: false,
|
|
13058
13064
|
...controlProps,
|
|
13059
13065
|
children: [
|
|
13060
|
-
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0,
|
|
13066
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards38.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
13061
13067
|
Button,
|
|
13062
13068
|
{
|
|
13063
13069
|
ref,
|
|
@@ -13123,12 +13129,12 @@ MenuLabel.displayName = "MenuLabel_UI";
|
|
|
13123
13129
|
var import_react58 = require("react");
|
|
13124
13130
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
13125
13131
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
13126
|
-
var
|
|
13132
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
13127
13133
|
|
|
13128
13134
|
// src/components/Menu/MenuItemButton.tsx
|
|
13129
13135
|
var import_react57 = require("react");
|
|
13130
13136
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
13131
|
-
var
|
|
13137
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
13132
13138
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
13133
13139
|
var StyledButton3 = (0, import_styled_components72.default)(Button)`
|
|
13134
13140
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
@@ -13208,7 +13214,7 @@ var StyledBadgeContainer = import_styled_components72.default.div`
|
|
|
13208
13214
|
var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
13209
13215
|
let { colorScheme, badge } = props;
|
|
13210
13216
|
if (appearance === "dangerous") {
|
|
13211
|
-
if ((0,
|
|
13217
|
+
if ((0, import_type_guards39.isNotUndefined)(colorScheme)) {
|
|
13212
13218
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
13213
13219
|
}
|
|
13214
13220
|
colorScheme = "error";
|
|
@@ -13236,10 +13242,10 @@ var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, com
|
|
|
13236
13242
|
fullWidth: true,
|
|
13237
13243
|
unstyled: true,
|
|
13238
13244
|
children: [
|
|
13239
|
-
(0,
|
|
13245
|
+
(0, import_type_guards39.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
13240
13246
|
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
13241
|
-
(0,
|
|
13242
|
-
(0,
|
|
13247
|
+
(0, import_type_guards39.isNotNil)(badge) || (0, import_type_guards39.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
13248
|
+
(0, import_type_guards39.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
13243
13249
|
]
|
|
13244
13250
|
}
|
|
13245
13251
|
);
|
|
@@ -13310,7 +13316,7 @@ var SubMenu = ({
|
|
|
13310
13316
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
13311
13317
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
13312
13318
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(MenuItemLabel, { children: label }),
|
|
13313
|
-
(0,
|
|
13319
|
+
(0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(MenuItemDescription, { children: description }) : null
|
|
13314
13320
|
] }),
|
|
13315
13321
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
13316
13322
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
@@ -13402,7 +13408,7 @@ RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
|
13402
13408
|
|
|
13403
13409
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
13404
13410
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
13405
|
-
var
|
|
13411
|
+
var import_type_guards41 = require("@wistia/type-guards");
|
|
13406
13412
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
13407
13413
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
13408
13414
|
return checked ? /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
@@ -13476,8 +13482,8 @@ var CheckboxMenuItem = ({
|
|
|
13476
13482
|
MenuItemButton,
|
|
13477
13483
|
{
|
|
13478
13484
|
...props,
|
|
13479
|
-
leftIcon: (0,
|
|
13480
|
-
rightIcon: (0,
|
|
13485
|
+
leftIcon: (0, import_type_guards41.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(CheckboxIndicator, { checked }),
|
|
13486
|
+
rightIcon: (0, import_type_guards41.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Icon, { type: "checkmark" }) }) : void 0
|
|
13481
13487
|
}
|
|
13482
13488
|
)
|
|
13483
13489
|
}
|
|
@@ -13599,7 +13605,7 @@ var ContextMenu = ({
|
|
|
13599
13605
|
const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
|
|
13600
13606
|
const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
|
|
13601
13607
|
(0, import_react61.useEffect)(() => {
|
|
13602
|
-
if ((0,
|
|
13608
|
+
if ((0, import_type_guards42.isNil)(position)) {
|
|
13603
13609
|
const onContextMenu = (event) => {
|
|
13604
13610
|
event.preventDefault();
|
|
13605
13611
|
setMenuPosition({ x: event.clientX, y: event.clientY });
|
|
@@ -13613,7 +13619,7 @@ var ContextMenu = ({
|
|
|
13613
13619
|
}
|
|
13614
13620
|
return () => null;
|
|
13615
13621
|
}, [position, triggerRef]);
|
|
13616
|
-
const isOpen = (0,
|
|
13622
|
+
const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
|
|
13617
13623
|
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13618
13624
|
Menu,
|
|
13619
13625
|
{
|
|
@@ -13648,7 +13654,7 @@ var ContextMenu = ({
|
|
|
13648
13654
|
// src/components/DataCards/DataCard.tsx
|
|
13649
13655
|
var import_react62 = require("react");
|
|
13650
13656
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
13651
|
-
var
|
|
13657
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
13652
13658
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
13653
13659
|
var StyledDataCard = import_styled_components75.default.div`
|
|
13654
13660
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
@@ -13802,8 +13808,8 @@ var DataCardInner = ({
|
|
|
13802
13808
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledLoadingValue, {}) : value
|
|
13803
13809
|
}
|
|
13804
13810
|
),
|
|
13805
|
-
(0,
|
|
13806
|
-
(0,
|
|
13811
|
+
(0, import_type_guards43.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
13812
|
+
(0, import_type_guards43.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13807
13813
|
StyledSubtitle,
|
|
13808
13814
|
{
|
|
13809
13815
|
"data-wui-data-card-subtitle": true,
|
|
@@ -13811,13 +13817,13 @@ var DataCardInner = ({
|
|
|
13811
13817
|
children: subtitle
|
|
13812
13818
|
}
|
|
13813
13819
|
),
|
|
13814
|
-
(0,
|
|
13820
|
+
(0, import_type_guards43.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
13815
13821
|
]
|
|
13816
13822
|
}
|
|
13817
13823
|
);
|
|
13818
13824
|
var DataCard = (props) => {
|
|
13819
13825
|
const ref = (0, import_react62.useRef)(null);
|
|
13820
|
-
if ((0,
|
|
13826
|
+
if ((0, import_type_guards43.isNotNil)(props.href) || (0, import_type_guards43.isNotNil)(props.onClick)) {
|
|
13821
13827
|
const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
|
|
13822
13828
|
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13823
13829
|
DataCardInner,
|
|
@@ -13828,8 +13834,8 @@ var DataCard = (props) => {
|
|
|
13828
13834
|
Button,
|
|
13829
13835
|
{
|
|
13830
13836
|
ref,
|
|
13831
|
-
...(0,
|
|
13832
|
-
...(0,
|
|
13837
|
+
...(0, import_type_guards43.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
|
|
13838
|
+
...(0, import_type_guards43.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
|
|
13833
13839
|
"aria-pressed": ariaPressed,
|
|
13834
13840
|
disabled: props.disabled ?? false,
|
|
13835
13841
|
href: props.href,
|
|
@@ -14197,11 +14203,11 @@ var EditableHeading = ({
|
|
|
14197
14203
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
14198
14204
|
var import_react65 = require("react");
|
|
14199
14205
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
14200
|
-
var
|
|
14206
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
14201
14207
|
|
|
14202
14208
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
14203
14209
|
var import_react64 = require("react");
|
|
14204
|
-
var
|
|
14210
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
14205
14211
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
14206
14212
|
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
14207
14213
|
var StyledEditableTextRoot = import_styled_components82.default.div`
|
|
@@ -14236,7 +14242,7 @@ var EditableTextRoot = ({
|
|
|
14236
14242
|
const [isEditing, setIsEditing] = (0, import_react64.useState)(false);
|
|
14237
14243
|
const value = isControlled ? controlledValue : internalValue;
|
|
14238
14244
|
const generatedId = (0, import_react64.useId)();
|
|
14239
|
-
const computedId = (0,
|
|
14245
|
+
const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
14240
14246
|
const handleSetIsEditing = (0, import_react64.useCallback)(
|
|
14241
14247
|
(editing) => {
|
|
14242
14248
|
if (editing && !isEditing) {
|
|
@@ -14323,7 +14329,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
|
|
|
14323
14329
|
margin: 0;
|
|
14324
14330
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
14325
14331
|
${({ $maxLines }) => {
|
|
14326
|
-
if ((0,
|
|
14332
|
+
if ((0, import_type_guards45.isNotNil)($maxLines)) {
|
|
14327
14333
|
return import_styled_components83.css`
|
|
14328
14334
|
${ellipsisStyle};
|
|
14329
14335
|
${lineClampCss($maxLines)};
|
|
@@ -14331,7 +14337,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
|
|
|
14331
14337
|
}
|
|
14332
14338
|
return void 0;
|
|
14333
14339
|
}}
|
|
14334
|
-
${({ $minLines }) => (0,
|
|
14340
|
+
${({ $minLines }) => (0, import_type_guards45.isNotNil)($minLines) && import_styled_components83.css`
|
|
14335
14341
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14336
14342
|
`}
|
|
14337
14343
|
word-break: break-word;
|
|
@@ -14418,12 +14424,12 @@ var EditableTextDisplay = makePolymorphic(
|
|
|
14418
14424
|
// src/components/EditableText/EditableTextInput.tsx
|
|
14419
14425
|
var import_react66 = require("react");
|
|
14420
14426
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
14421
|
-
var
|
|
14427
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
14422
14428
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
14423
14429
|
var StyledInput2 = (0, import_styled_components84.default)(Input)`
|
|
14424
14430
|
&& {
|
|
14425
|
-
${({ $minLines }) => (0,
|
|
14426
|
-
${({ $maxLines }) => (0,
|
|
14431
|
+
${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
|
|
14432
|
+
${({ $maxLines }) => (0, import_type_guards46.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
|
|
14427
14433
|
${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
|
|
14428
14434
|
background-color: var(--wui-color-bg-surface);
|
|
14429
14435
|
border-radius: var(--wui-editable-text-border-radius);
|
|
@@ -14536,11 +14542,11 @@ var EditableTextLabel = ({ ...props }) => {
|
|
|
14536
14542
|
if (!context) {
|
|
14537
14543
|
throw new Error("EditableTextLabel must be used within an EditableTextRoot context");
|
|
14538
14544
|
}
|
|
14539
|
-
const { id, label } = context;
|
|
14545
|
+
const { id, label, isEditing } = context;
|
|
14540
14546
|
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
14541
14547
|
Label,
|
|
14542
14548
|
{
|
|
14543
|
-
htmlFor: id,
|
|
14549
|
+
...isEditing && { htmlFor: id },
|
|
14544
14550
|
...props,
|
|
14545
14551
|
children: label
|
|
14546
14552
|
}
|
|
@@ -14680,7 +14686,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
14680
14686
|
|
|
14681
14687
|
// src/components/Form/FormErrorSummary.tsx
|
|
14682
14688
|
var import_react72 = require("react");
|
|
14683
|
-
var
|
|
14689
|
+
var import_type_guards47 = require("@wistia/type-guards");
|
|
14684
14690
|
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
14685
14691
|
var ErrorItem = ({ name, error, formId }) => {
|
|
14686
14692
|
return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
@@ -14694,8 +14700,8 @@ var FormErrorSummary = ({ description }) => {
|
|
|
14694
14700
|
}
|
|
14695
14701
|
return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)("div", { ref, children: [
|
|
14696
14702
|
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("p", { children: description }),
|
|
14697
|
-
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0,
|
|
14698
|
-
([name, error]) => (0,
|
|
14703
|
+
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards47.isNotUndefined)(error)).map(
|
|
14704
|
+
([name, error]) => (0, import_type_guards47.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
|
|
14699
14705
|
ErrorItem,
|
|
14700
14706
|
{
|
|
14701
14707
|
error: err,
|
|
@@ -14719,7 +14725,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
14719
14725
|
// src/components/FormField/FormField.tsx
|
|
14720
14726
|
var import_react73 = require("react");
|
|
14721
14727
|
var import_styled_components85 = __toESM(require("styled-components"));
|
|
14722
|
-
var
|
|
14728
|
+
var import_type_guards48 = require("@wistia/type-guards");
|
|
14723
14729
|
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
14724
14730
|
var StyledFormField = import_styled_components85.default.div`
|
|
14725
14731
|
--form-field-spacing: var(--wui-space-01);
|
|
@@ -14760,7 +14766,7 @@ var StyledErrorList = import_styled_components85.default.ul`
|
|
|
14760
14766
|
gap: var(--wui-space-01);
|
|
14761
14767
|
`;
|
|
14762
14768
|
var ErrorMessages = ({ errors, id }) => {
|
|
14763
|
-
const isErrorArray = (0,
|
|
14769
|
+
const isErrorArray = (0, import_type_guards48.isArray)(errors);
|
|
14764
14770
|
const isMultipleErrors = isErrorArray && errors.length > 1;
|
|
14765
14771
|
if (!isErrorArray) {
|
|
14766
14772
|
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
@@ -14828,19 +14834,19 @@ var FormField = ({
|
|
|
14828
14834
|
"aria-describedby": ariaDescribedby,
|
|
14829
14835
|
...props
|
|
14830
14836
|
};
|
|
14831
|
-
if ((0,
|
|
14837
|
+
if ((0, import_type_guards48.isUndefined)(value) && (0, import_type_guards48.isNotUndefined)(defaultValue)) {
|
|
14832
14838
|
childProps = {
|
|
14833
14839
|
...childProps,
|
|
14834
14840
|
defaultValue
|
|
14835
14841
|
};
|
|
14836
14842
|
}
|
|
14837
|
-
if ((0,
|
|
14838
|
-
const computedName = (0,
|
|
14843
|
+
if ((0, import_type_guards48.isNotNil)(checkboxGroup)) {
|
|
14844
|
+
const computedName = (0, import_type_guards48.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
14839
14845
|
const handleChange = (event) => {
|
|
14840
|
-
if ((0,
|
|
14846
|
+
if ((0, import_type_guards48.isNotUndefined)(props.onChange)) {
|
|
14841
14847
|
props.onChange(event);
|
|
14842
14848
|
}
|
|
14843
|
-
if ((0,
|
|
14849
|
+
if ((0, import_type_guards48.isNotUndefined)(checkboxGroup.onChange)) {
|
|
14844
14850
|
checkboxGroup.onChange(event);
|
|
14845
14851
|
}
|
|
14846
14852
|
};
|
|
@@ -14848,7 +14854,7 @@ var FormField = ({
|
|
|
14848
14854
|
...childProps,
|
|
14849
14855
|
name: computedName,
|
|
14850
14856
|
onChange: handleChange,
|
|
14851
|
-
"aria-invalid": (0,
|
|
14857
|
+
"aria-invalid": (0, import_type_guards48.isNotNil)(error)
|
|
14852
14858
|
};
|
|
14853
14859
|
}
|
|
14854
14860
|
import_react73.Children.only(children);
|
|
@@ -14859,9 +14865,9 @@ var FormField = ({
|
|
|
14859
14865
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
14860
14866
|
children: [
|
|
14861
14867
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
14862
|
-
(0,
|
|
14868
|
+
(0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
14863
14869
|
(0, import_react73.cloneElement)(children, childProps),
|
|
14864
|
-
(0,
|
|
14870
|
+
(0, import_type_guards48.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_jsx_runtime281.Fragment, { children: [
|
|
14865
14871
|
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", {}),
|
|
14866
14872
|
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14867
14873
|
ErrorMessages,
|
|
@@ -14907,7 +14913,7 @@ RadioGroup.displayName = "RadioGroup_UI";
|
|
|
14907
14913
|
// src/components/Grid/Grid.tsx
|
|
14908
14914
|
var import_react75 = require("react");
|
|
14909
14915
|
var import_styled_components86 = __toESM(require("styled-components"));
|
|
14910
|
-
var
|
|
14916
|
+
var import_type_guards49 = require("@wistia/type-guards");
|
|
14911
14917
|
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
14912
14918
|
var DEFAULT_ELEMENT5 = "div";
|
|
14913
14919
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
@@ -14957,7 +14963,7 @@ var GridComponent = (0, import_react75.forwardRef)(
|
|
|
14957
14963
|
...props
|
|
14958
14964
|
}, ref) => {
|
|
14959
14965
|
const responsiveGap = useResponsiveProp(gap);
|
|
14960
|
-
const { column, row } = (0,
|
|
14966
|
+
const { column, row } = (0, import_type_guards49.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
|
|
14961
14967
|
const responsiveColumns = useResponsiveProp(columns);
|
|
14962
14968
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
14963
14969
|
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
@@ -14982,7 +14988,7 @@ var Grid = makePolymorphic(GridComponent);
|
|
|
14982
14988
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
14983
14989
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
14984
14990
|
var import_react76 = require("react");
|
|
14985
|
-
var
|
|
14991
|
+
var import_type_guards50 = require("@wistia/type-guards");
|
|
14986
14992
|
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
14987
14993
|
var StyledIconButton = (0, import_styled_components87.default)(IconButton)`
|
|
14988
14994
|
/* override size for icon button since prop gets changed by Input */
|
|
@@ -15012,12 +15018,12 @@ var InputClickToCopy = (0, import_react76.forwardRef)(
|
|
|
15012
15018
|
if (disabled) {
|
|
15013
15019
|
return;
|
|
15014
15020
|
}
|
|
15015
|
-
if ((0,
|
|
15021
|
+
if ((0, import_type_guards50.isFunction)(props.onClick)) {
|
|
15016
15022
|
props.onClick(event);
|
|
15017
15023
|
}
|
|
15018
15024
|
void copyToClipboard(value).then(() => {
|
|
15019
15025
|
setIsCopied(true);
|
|
15020
|
-
if ((0,
|
|
15026
|
+
if ((0, import_type_guards50.isFunction)(onCopy)) {
|
|
15021
15027
|
onCopy(value);
|
|
15022
15028
|
}
|
|
15023
15029
|
return value;
|
|
@@ -15052,7 +15058,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
|
15052
15058
|
// src/components/InputPassword/InputPassword.tsx
|
|
15053
15059
|
var import_styled_components88 = __toESM(require("styled-components"));
|
|
15054
15060
|
var import_react77 = require("react");
|
|
15055
|
-
var
|
|
15061
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
15056
15062
|
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
15057
15063
|
var StyledIconButton2 = (0, import_styled_components88.default)(IconButton)`
|
|
15058
15064
|
/* override size for icon button since prop gets changed by Input */
|
|
@@ -15068,7 +15074,7 @@ var InputPassword = (0, import_react77.forwardRef)(
|
|
|
15068
15074
|
const handleClick = () => {
|
|
15069
15075
|
const newVisibility = !isVisible;
|
|
15070
15076
|
setIsVisible(newVisibility);
|
|
15071
|
-
if ((0,
|
|
15077
|
+
if ((0, import_type_guards51.isFunction)(onVisibilityToggle)) {
|
|
15072
15078
|
onVisibilityToggle(newVisibility);
|
|
15073
15079
|
}
|
|
15074
15080
|
};
|
|
@@ -15098,7 +15104,7 @@ InputPassword.displayName = "InputPassword_UI";
|
|
|
15098
15104
|
|
|
15099
15105
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
15100
15106
|
var import_styled_components89 = __toESM(require("styled-components"));
|
|
15101
|
-
var
|
|
15107
|
+
var import_type_guards52 = require("@wistia/type-guards");
|
|
15102
15108
|
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
15103
15109
|
var StyledKeyboardShortcut = import_styled_components89.default.div`
|
|
15104
15110
|
align-items: center;
|
|
@@ -15192,7 +15198,7 @@ var KeyboardShortcut = ({
|
|
|
15192
15198
|
$fullWidth: fullWidth,
|
|
15193
15199
|
...otherProps,
|
|
15194
15200
|
children: [
|
|
15195
|
-
(0,
|
|
15201
|
+
(0, import_type_guards52.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(Label2, { children: label }),
|
|
15196
15202
|
/* @__PURE__ */ (0, import_jsx_runtime286.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
|
|
15197
15203
|
StyledKey,
|
|
15198
15204
|
{
|
|
@@ -15206,18 +15212,18 @@ var KeyboardShortcut = ({
|
|
|
15206
15212
|
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
15207
15213
|
|
|
15208
15214
|
// src/components/List/List.tsx
|
|
15209
|
-
var
|
|
15215
|
+
var import_type_guards54 = require("@wistia/type-guards");
|
|
15210
15216
|
var import_styled_components91 = __toESM(require("styled-components"));
|
|
15211
15217
|
|
|
15212
15218
|
// src/components/List/ListItem.tsx
|
|
15213
15219
|
var import_styled_components90 = __toESM(require("styled-components"));
|
|
15214
|
-
var
|
|
15220
|
+
var import_type_guards53 = require("@wistia/type-guards");
|
|
15215
15221
|
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
15216
15222
|
var ListItemComponent = import_styled_components90.default.li`
|
|
15217
15223
|
margin-bottom: var(--wui-space-02);
|
|
15218
15224
|
`;
|
|
15219
15225
|
var ListItem = ({ children }) => {
|
|
15220
|
-
if ((0,
|
|
15226
|
+
if ((0, import_type_guards53.isNil)(children)) {
|
|
15221
15227
|
return null;
|
|
15222
15228
|
}
|
|
15223
15229
|
return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(ListItemComponent, { children });
|
|
@@ -15347,13 +15353,13 @@ var List = ({
|
|
|
15347
15353
|
...otherProps
|
|
15348
15354
|
}) => {
|
|
15349
15355
|
const listVariant = variant ?? "bullets";
|
|
15350
|
-
if ((0,
|
|
15356
|
+
if ((0, import_type_guards54.isNotNil)(children)) {
|
|
15351
15357
|
if (Array.isArray(children) && !children.length) {
|
|
15352
15358
|
return null;
|
|
15353
15359
|
}
|
|
15354
15360
|
return renderListComponent(children, listVariant, otherProps);
|
|
15355
15361
|
}
|
|
15356
|
-
if ((0,
|
|
15362
|
+
if ((0, import_type_guards54.isNotNil)(items)) {
|
|
15357
15363
|
if (!items.length) {
|
|
15358
15364
|
return null;
|
|
15359
15365
|
}
|
|
@@ -15388,7 +15394,7 @@ Mark.displayName = "Mark_UI";
|
|
|
15388
15394
|
var import_react80 = require("react");
|
|
15389
15395
|
var import_styled_components97 = __toESM(require("styled-components"));
|
|
15390
15396
|
var import_react_dialog5 = require("@radix-ui/react-dialog");
|
|
15391
|
-
var
|
|
15397
|
+
var import_type_guards56 = require("@wistia/type-guards");
|
|
15392
15398
|
|
|
15393
15399
|
// src/components/Modal/ModalHeader.tsx
|
|
15394
15400
|
var import_styled_components94 = __toESM(require("styled-components"));
|
|
@@ -15465,7 +15471,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
|
15465
15471
|
|
|
15466
15472
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
15467
15473
|
var import_react78 = require("react");
|
|
15468
|
-
var
|
|
15474
|
+
var import_type_guards55 = require("@wistia/type-guards");
|
|
15469
15475
|
var useFocusRestore = () => {
|
|
15470
15476
|
const previouslyFocusedRef = (0, import_react78.useRef)(null);
|
|
15471
15477
|
(0, import_react78.useEffect)(() => {
|
|
@@ -15473,7 +15479,7 @@ var useFocusRestore = () => {
|
|
|
15473
15479
|
}, []);
|
|
15474
15480
|
(0, import_react78.useEffect)(() => {
|
|
15475
15481
|
return () => {
|
|
15476
|
-
if ((0,
|
|
15482
|
+
if ((0, import_type_guards55.isNotNil)(previouslyFocusedRef.current)) {
|
|
15477
15483
|
setTimeout(() => {
|
|
15478
15484
|
previouslyFocusedRef.current?.focus();
|
|
15479
15485
|
}, 0);
|
|
@@ -15685,7 +15691,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15685
15691
|
import_react_dialog5.Root,
|
|
15686
15692
|
{
|
|
15687
15693
|
onOpenChange: (open2) => {
|
|
15688
|
-
if (!open2 && (0,
|
|
15694
|
+
if (!open2 && (0, import_type_guards56.isNotNil)(onRequestClose)) {
|
|
15689
15695
|
onRequestClose();
|
|
15690
15696
|
}
|
|
15691
15697
|
},
|
|
@@ -15697,7 +15703,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15697
15703
|
{
|
|
15698
15704
|
ref,
|
|
15699
15705
|
onOpenAutoFocus: (event) => {
|
|
15700
|
-
if ((0,
|
|
15706
|
+
if ((0, import_type_guards56.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
15701
15707
|
event.preventDefault();
|
|
15702
15708
|
requestAnimationFrame(() => {
|
|
15703
15709
|
initialFocusRef.current?.focus();
|
|
@@ -15732,9 +15738,9 @@ var import_react_popover5 = require("@radix-ui/react-popover");
|
|
|
15732
15738
|
var import_styled_components99 = __toESM(require("styled-components"));
|
|
15733
15739
|
|
|
15734
15740
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
15735
|
-
var
|
|
15741
|
+
var import_type_guards57 = require("@wistia/type-guards");
|
|
15736
15742
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
15737
|
-
return (0,
|
|
15743
|
+
return (0, import_type_guards57.isNotNil)(onOpenChange) && (0, import_type_guards57.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
15738
15744
|
};
|
|
15739
15745
|
|
|
15740
15746
|
// src/components/Popover/PopoverArrow.tsx
|
|
@@ -15890,7 +15896,7 @@ Popover.displayName = "Popover_UI";
|
|
|
15890
15896
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
15891
15897
|
var import_styled_components100 = __toESM(require("styled-components"));
|
|
15892
15898
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
15893
|
-
var
|
|
15899
|
+
var import_type_guards58 = require("@wistia/type-guards");
|
|
15894
15900
|
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
15895
15901
|
var ProgressBarWrapper = import_styled_components100.default.div`
|
|
15896
15902
|
--progress-bar-height: 8px;
|
|
@@ -15946,7 +15952,7 @@ var ProgressBar = ({
|
|
|
15946
15952
|
...props
|
|
15947
15953
|
}) => {
|
|
15948
15954
|
return /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(ProgressBarWrapper, { children: [
|
|
15949
|
-
(0,
|
|
15955
|
+
(0, import_type_guards58.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
15950
15956
|
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
15951
15957
|
StyledProgressBar,
|
|
15952
15958
|
{
|
|
@@ -15964,13 +15970,13 @@ var ProgressBar = ({
|
|
|
15964
15970
|
)
|
|
15965
15971
|
}
|
|
15966
15972
|
),
|
|
15967
|
-
(0,
|
|
15973
|
+
(0, import_type_guards58.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
15968
15974
|
] });
|
|
15969
15975
|
};
|
|
15970
15976
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
15971
15977
|
|
|
15972
15978
|
// src/components/Radio/Radio.tsx
|
|
15973
|
-
var
|
|
15979
|
+
var import_type_guards59 = require("@wistia/type-guards");
|
|
15974
15980
|
var import_react81 = require("react");
|
|
15975
15981
|
var import_styled_components101 = __toESM(require("styled-components"));
|
|
15976
15982
|
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
@@ -16070,14 +16076,14 @@ var Radio = (0, import_react81.forwardRef)(
|
|
|
16070
16076
|
...props
|
|
16071
16077
|
}, ref) => {
|
|
16072
16078
|
const generatedId = (0, import_react81.useId)();
|
|
16073
|
-
const computedId = (0,
|
|
16079
|
+
const computedId = (0, import_type_guards59.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16074
16080
|
const radioGroupContext = useRadioGroup();
|
|
16075
16081
|
const contextName = radioGroupContext?.name;
|
|
16076
16082
|
const contextOnChange = radioGroupContext?.onChange;
|
|
16077
16083
|
const contextValue = radioGroupContext?.value;
|
|
16078
16084
|
const radioName = name ?? contextName;
|
|
16079
16085
|
const handleOnChange = onChange ?? contextOnChange;
|
|
16080
|
-
const isChecked = (0,
|
|
16086
|
+
const isChecked = (0, import_type_guards59.isNotUndefined)(value) && (0, import_type_guards59.isNotUndefined)(contextValue) ? contextValue === value : checked;
|
|
16081
16087
|
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
16082
16088
|
StyledRadioWrapper,
|
|
16083
16089
|
{
|
|
@@ -16124,7 +16130,7 @@ var import_react83 = require("react");
|
|
|
16124
16130
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
16125
16131
|
var import_react82 = require("react");
|
|
16126
16132
|
var import_styled_components102 = __toESM(require("styled-components"));
|
|
16127
|
-
var
|
|
16133
|
+
var import_type_guards60 = require("@wistia/type-guards");
|
|
16128
16134
|
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
16129
16135
|
var checkedStyles = import_styled_components102.css`
|
|
16130
16136
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
@@ -16246,14 +16252,14 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
|
|
|
16246
16252
|
...props
|
|
16247
16253
|
}, ref) => {
|
|
16248
16254
|
const generatedId = (0, import_react82.useId)();
|
|
16249
|
-
const computedId = (0,
|
|
16255
|
+
const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16250
16256
|
const radioGroupContext = useRadioGroup();
|
|
16251
16257
|
const contextName = radioGroupContext?.name;
|
|
16252
16258
|
const contextOnChange = radioGroupContext?.onChange;
|
|
16253
16259
|
const contextValue = radioGroupContext?.value;
|
|
16254
16260
|
const radioName = name ?? contextName;
|
|
16255
16261
|
const handleOnChange = onChange ?? contextOnChange;
|
|
16256
|
-
const isChecked = (0,
|
|
16262
|
+
const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
|
|
16257
16263
|
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(
|
|
16258
16264
|
StyledCard2,
|
|
16259
16265
|
{
|
|
@@ -16285,7 +16291,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
|
16285
16291
|
|
|
16286
16292
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16287
16293
|
var import_styled_components104 = __toESM(require("styled-components"));
|
|
16288
|
-
var
|
|
16294
|
+
var import_type_guards61 = require("@wistia/type-guards");
|
|
16289
16295
|
|
|
16290
16296
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
16291
16297
|
var import_styled_components103 = __toESM(require("styled-components"));
|
|
@@ -16359,17 +16365,17 @@ var RadioCardDefaultLayout = ({
|
|
|
16359
16365
|
showIndicator = true
|
|
16360
16366
|
}) => {
|
|
16361
16367
|
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(StyledCardContent, { children: [
|
|
16362
|
-
showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(StyledIndicatorContainer, { $hasIcon: (0,
|
|
16368
|
+
showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(StyledIndicatorContainer, { $hasIcon: (0, import_type_guards61.isNotNil)(icon), children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
16363
16369
|
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(Stack, { gap: "space-02", children: [
|
|
16364
|
-
(0,
|
|
16370
|
+
(0, import_type_guards61.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
16365
16371
|
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
16366
16372
|
Stack,
|
|
16367
16373
|
{
|
|
16368
16374
|
gap: "space-01",
|
|
16369
|
-
style: (0,
|
|
16375
|
+
style: (0, import_type_guards61.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
|
|
16370
16376
|
children: [
|
|
16371
|
-
(0,
|
|
16372
|
-
(0,
|
|
16377
|
+
(0, import_type_guards61.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Text, { variant: "label3", children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("strong", { children: label }) }),
|
|
16378
|
+
(0, import_type_guards61.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
16373
16379
|
Text,
|
|
16374
16380
|
{
|
|
16375
16381
|
prominence: "secondary",
|
|
@@ -16551,7 +16557,7 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
16551
16557
|
var import_react88 = require("react");
|
|
16552
16558
|
var import_styled_components108 = __toESM(require("styled-components"));
|
|
16553
16559
|
var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
|
|
16554
|
-
var
|
|
16560
|
+
var import_type_guards63 = require("@wistia/type-guards");
|
|
16555
16561
|
|
|
16556
16562
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
16557
16563
|
var import_react86 = require("react");
|
|
@@ -16588,7 +16594,7 @@ var useSelectedItemStyle = () => {
|
|
|
16588
16594
|
|
|
16589
16595
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16590
16596
|
var import_styled_components107 = __toESM(require("styled-components"));
|
|
16591
|
-
var
|
|
16597
|
+
var import_type_guards62 = require("@wistia/type-guards");
|
|
16592
16598
|
|
|
16593
16599
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
16594
16600
|
var import_react87 = require("react");
|
|
@@ -16622,7 +16628,7 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
|
|
|
16622
16628
|
var SelectedItemIndicator = () => {
|
|
16623
16629
|
const selectedValue = useSegmentedControlValue();
|
|
16624
16630
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
16625
|
-
if (!selectedValue || (0,
|
|
16631
|
+
if (!selectedValue || (0, import_type_guards62.isUndefined)(selectedItemIndicatorStyle)) {
|
|
16626
16632
|
return null;
|
|
16627
16633
|
}
|
|
16628
16634
|
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
@@ -16659,7 +16665,7 @@ var SegmentedControl = (0, import_react88.forwardRef)(
|
|
|
16659
16665
|
onSelectedValueChange,
|
|
16660
16666
|
...props
|
|
16661
16667
|
}, ref) => {
|
|
16662
|
-
if ((0,
|
|
16668
|
+
if ((0, import_type_guards63.isNil)(children)) {
|
|
16663
16669
|
return null;
|
|
16664
16670
|
}
|
|
16665
16671
|
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
@@ -16688,7 +16694,7 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
16688
16694
|
var import_react89 = require("react");
|
|
16689
16695
|
var import_styled_components109 = __toESM(require("styled-components"));
|
|
16690
16696
|
var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
|
|
16691
|
-
var
|
|
16697
|
+
var import_type_guards64 = require("@wistia/type-guards");
|
|
16692
16698
|
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
16693
16699
|
var segmentedControlItemStyles = import_styled_components109.css`
|
|
16694
16700
|
all: unset; /* ToggleGroupItem is a button element */
|
|
@@ -16804,8 +16810,8 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
|
|
|
16804
16810
|
{
|
|
16805
16811
|
ref: combinedRef,
|
|
16806
16812
|
...otherProps,
|
|
16807
|
-
$hasLabel: (0,
|
|
16808
|
-
"aria-label": (0,
|
|
16813
|
+
$hasLabel: (0, import_type_guards64.isNotNil)(label),
|
|
16814
|
+
"aria-label": (0, import_type_guards64.isNotNil)(label) ? void 0 : ariaLabel,
|
|
16809
16815
|
disabled,
|
|
16810
16816
|
onClick: handleClick,
|
|
16811
16817
|
value,
|
|
@@ -16946,7 +16952,7 @@ Select.displayName = "Select_UI";
|
|
|
16946
16952
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
16947
16953
|
var import_react91 = require("react");
|
|
16948
16954
|
var import_styled_components111 = __toESM(require("styled-components"));
|
|
16949
|
-
var
|
|
16955
|
+
var import_type_guards65 = require("@wistia/type-guards");
|
|
16950
16956
|
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
16951
16957
|
var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
|
|
16952
16958
|
${getTypographicStyles("label3")}
|
|
@@ -16980,7 +16986,7 @@ var SelectOption = (0, import_react91.forwardRef)(
|
|
|
16980
16986
|
...props,
|
|
16981
16987
|
ref: forwardedRef,
|
|
16982
16988
|
children: [
|
|
16983
|
-
(0,
|
|
16989
|
+
(0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("div", { children: [
|
|
16984
16990
|
children,
|
|
16985
16991
|
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
16986
16992
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select2.ItemText, { children }),
|
|
@@ -17022,7 +17028,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
17022
17028
|
// src/components/Slider/Slider.tsx
|
|
17023
17029
|
var import_react_slider2 = require("@radix-ui/react-slider");
|
|
17024
17030
|
var import_styled_components113 = __toESM(require("styled-components"));
|
|
17025
|
-
var
|
|
17031
|
+
var import_type_guards66 = require("@wistia/type-guards");
|
|
17026
17032
|
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
17027
17033
|
var SliderContainer = import_styled_components113.default.div`
|
|
17028
17034
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
@@ -17101,7 +17107,7 @@ var Slider = ({
|
|
|
17101
17107
|
"data-testid": dataTestId = "ui-slider",
|
|
17102
17108
|
...otherProps
|
|
17103
17109
|
}) => {
|
|
17104
|
-
if (!((0,
|
|
17110
|
+
if (!((0, import_type_guards66.isNonEmptyString)(ariaLabel) || (0, import_type_guards66.isNonEmptyString)(ariaLabelledby))) {
|
|
17105
17111
|
throw new Error(
|
|
17106
17112
|
"UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
|
|
17107
17113
|
);
|
|
@@ -17263,7 +17269,7 @@ var TableRow = ({ children, ...props }) => {
|
|
|
17263
17269
|
// src/components/Tabs/Tabs.tsx
|
|
17264
17270
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
17265
17271
|
var import_react98 = require("react");
|
|
17266
|
-
var
|
|
17272
|
+
var import_type_guards67 = require("@wistia/type-guards");
|
|
17267
17273
|
|
|
17268
17274
|
// src/components/Tabs/useTabsValue.tsx
|
|
17269
17275
|
var import_react97 = require("react");
|
|
@@ -17300,10 +17306,10 @@ var Tabs = ({
|
|
|
17300
17306
|
...props,
|
|
17301
17307
|
onValueChange
|
|
17302
17308
|
};
|
|
17303
|
-
if ((0,
|
|
17309
|
+
if ((0, import_type_guards67.isNotNil)(value)) {
|
|
17304
17310
|
rootProps.value = value;
|
|
17305
17311
|
}
|
|
17306
|
-
if ((0,
|
|
17312
|
+
if ((0, import_type_guards67.isNotNil)(defaultValue)) {
|
|
17307
17313
|
rootProps.defaultValue = defaultValue;
|
|
17308
17314
|
}
|
|
17309
17315
|
return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(SelectedItemStyleProvider, { children }) }) });
|
|
@@ -17323,7 +17329,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
|
17323
17329
|
var import_styled_components121 = __toESM(require("styled-components"));
|
|
17324
17330
|
|
|
17325
17331
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17326
|
-
var
|
|
17332
|
+
var import_type_guards68 = require("@wistia/type-guards");
|
|
17327
17333
|
|
|
17328
17334
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
17329
17335
|
var import_styled_components120 = __toESM(require("styled-components"));
|
|
@@ -17338,7 +17344,7 @@ var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
|
17338
17344
|
var SelectedTabIndicator = () => {
|
|
17339
17345
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
17340
17346
|
const selectedValue = useTabsValue();
|
|
17341
|
-
if (selectedValue == null || (0,
|
|
17347
|
+
if (selectedValue == null || (0, import_type_guards68.isUndefined)(selectedItemIndicatorStyle)) {
|
|
17342
17348
|
return null;
|
|
17343
17349
|
}
|
|
17344
17350
|
return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
@@ -17372,7 +17378,7 @@ TabsList.displayName = "TabsList_UI";
|
|
|
17372
17378
|
|
|
17373
17379
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17374
17380
|
var import_react99 = require("react");
|
|
17375
|
-
var
|
|
17381
|
+
var import_type_guards69 = require("@wistia/type-guards");
|
|
17376
17382
|
|
|
17377
17383
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
17378
17384
|
var import_styled_components122 = __toESM(require("styled-components"));
|
|
@@ -17423,8 +17429,8 @@ var TabsTrigger = (0, import_react99.forwardRef)(
|
|
|
17423
17429
|
{
|
|
17424
17430
|
...otherProps,
|
|
17425
17431
|
ref: combinedRef,
|
|
17426
|
-
$hasLabel: (0,
|
|
17427
|
-
"aria-label": (0,
|
|
17432
|
+
$hasLabel: (0, import_type_guards69.isNotNil)(label),
|
|
17433
|
+
"aria-label": (0, import_type_guards69.isNotNil)(label) ? void 0 : ariaLabel,
|
|
17428
17434
|
disabled,
|
|
17429
17435
|
value,
|
|
17430
17436
|
children: [
|
|
@@ -17439,7 +17445,7 @@ TabsTrigger.displayName = "TabsTrigger_UI";
|
|
|
17439
17445
|
|
|
17440
17446
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
17441
17447
|
var import_styled_components123 = __toESM(require("styled-components"));
|
|
17442
|
-
var
|
|
17448
|
+
var import_type_guards70 = require("@wistia/type-guards");
|
|
17443
17449
|
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
17444
17450
|
var StyledThumbnailBadge = import_styled_components123.default.div`
|
|
17445
17451
|
align-items: center;
|
|
@@ -17468,7 +17474,7 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
|
|
|
17468
17474
|
`;
|
|
17469
17475
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
17470
17476
|
return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(StyledThumbnailBadge, { ...props, children: [
|
|
17471
|
-
(0,
|
|
17477
|
+
(0, import_type_guards70.isNotNil)(icon) && icon,
|
|
17472
17478
|
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { children: label })
|
|
17473
17479
|
] });
|
|
17474
17480
|
};
|
|
@@ -17477,10 +17483,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
|
17477
17483
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17478
17484
|
var import_react100 = require("react");
|
|
17479
17485
|
var import_styled_components126 = __toESM(require("styled-components"));
|
|
17480
|
-
var
|
|
17486
|
+
var import_type_guards73 = require("@wistia/type-guards");
|
|
17481
17487
|
|
|
17482
17488
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17483
|
-
var
|
|
17489
|
+
var import_type_guards71 = require("@wistia/type-guards");
|
|
17484
17490
|
var import_styled_components124 = require("styled-components");
|
|
17485
17491
|
var gradients = {
|
|
17486
17492
|
defaultDarkOne: import_styled_components124.css`
|
|
@@ -17608,12 +17614,12 @@ var gradients = {
|
|
|
17608
17614
|
};
|
|
17609
17615
|
var gradientMap = Object.keys(gradients);
|
|
17610
17616
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
17611
|
-
return (0,
|
|
17617
|
+
return (0, import_type_guards71.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
17612
17618
|
};
|
|
17613
17619
|
|
|
17614
17620
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
17615
17621
|
var import_styled_components125 = __toESM(require("styled-components"));
|
|
17616
|
-
var
|
|
17622
|
+
var import_type_guards72 = require("@wistia/type-guards");
|
|
17617
17623
|
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
17618
17624
|
var ScrubLine = import_styled_components125.default.div`
|
|
17619
17625
|
position: absolute;
|
|
@@ -17707,8 +17713,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17707
17713
|
);
|
|
17708
17714
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
17709
17715
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
17710
|
-
const showScrubLine = (0,
|
|
17711
|
-
const scrubLinePosition = (0,
|
|
17716
|
+
const showScrubLine = (0, import_type_guards72.isNotNil)(cursorPosition);
|
|
17717
|
+
const scrubLinePosition = (0, import_type_guards72.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
17712
17718
|
const viewerStyles = {
|
|
17713
17719
|
position: "relative",
|
|
17714
17720
|
overflow: "hidden",
|
|
@@ -17779,10 +17785,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17779
17785
|
);
|
|
17780
17786
|
};
|
|
17781
17787
|
var StyledThumbnail = import_styled_components126.default.div`
|
|
17782
|
-
background-image: ${({ $backgroundUrl }) => (0,
|
|
17788
|
+
background-image: ${({ $backgroundUrl }) => (0, import_type_guards73.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17783
17789
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17784
17790
|
// if we don't have $backgroundUrl show a gradient
|
|
17785
|
-
(0,
|
|
17791
|
+
(0, import_type_guards73.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
17786
17792
|
)};
|
|
17787
17793
|
background-position: center center;
|
|
17788
17794
|
background-size: cover;
|
|
@@ -17798,6 +17804,40 @@ var StyledThumbnail = import_styled_components126.default.div`
|
|
|
17798
17804
|
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
17799
17805
|
}
|
|
17800
17806
|
`;
|
|
17807
|
+
var StoryboardRenderer = ({
|
|
17808
|
+
storyboard,
|
|
17809
|
+
width,
|
|
17810
|
+
percent,
|
|
17811
|
+
cursorPosition,
|
|
17812
|
+
isStoryboardReady
|
|
17813
|
+
}) => {
|
|
17814
|
+
const {
|
|
17815
|
+
url,
|
|
17816
|
+
width: sbWidth,
|
|
17817
|
+
height: sbHeight,
|
|
17818
|
+
frameHeight,
|
|
17819
|
+
frameWidth,
|
|
17820
|
+
frameCount,
|
|
17821
|
+
aspectRatio
|
|
17822
|
+
} = storyboard;
|
|
17823
|
+
const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
17824
|
+
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17826
|
+
ThumbnailStoryboardViewer,
|
|
17827
|
+
{
|
|
17828
|
+
cursorPosition: effectiveCursorPosition,
|
|
17829
|
+
frameCount,
|
|
17830
|
+
frameHeight,
|
|
17831
|
+
frameWidth,
|
|
17832
|
+
percent,
|
|
17833
|
+
storyboardHeight: sbHeight,
|
|
17834
|
+
storyboardUrl: url,
|
|
17835
|
+
storyboardWidth: sbWidth,
|
|
17836
|
+
targetAspectRatio: aspectRatio,
|
|
17837
|
+
targetWidth
|
|
17838
|
+
}
|
|
17839
|
+
);
|
|
17840
|
+
};
|
|
17801
17841
|
var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
17802
17842
|
const rect = elem.getBoundingClientRect();
|
|
17803
17843
|
const relativeLeft = mouseEvent.clientX - rect.left;
|
|
@@ -17824,10 +17864,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17824
17864
|
const storyboardElementRef = (0, import_react100.useRef)(null);
|
|
17825
17865
|
const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
|
|
17826
17866
|
const backgroundUrl = (0, import_react100.useMemo)(
|
|
17827
|
-
() => thumbnailImageType === "square" && (0,
|
|
17867
|
+
() => thumbnailImageType === "square" && (0, import_type_guards73.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
17828
17868
|
[thumbnailImageType, thumbnailUrl]
|
|
17829
17869
|
);
|
|
17830
|
-
const isScrubbable = (0,
|
|
17870
|
+
const isScrubbable = (0, import_type_guards73.isNotNil)(storyboard);
|
|
17831
17871
|
const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
|
|
17832
17872
|
if (storyboardElementRef.current || !storyboard) {
|
|
17833
17873
|
return storyboardElementRef.current;
|
|
@@ -17857,41 +17897,24 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17857
17897
|
setCursorPosition(null);
|
|
17858
17898
|
}, [isScrubbable]);
|
|
17859
17899
|
const shouldRenderStoryboard = (0, import_react100.useMemo)(() => {
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17863
|
-
|
|
17864
|
-
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
frameWidth,
|
|
17870
|
-
frameCount,
|
|
17871
|
-
aspectRatio
|
|
17872
|
-
} = storyboard;
|
|
17873
|
-
const targetWidth = (0, import_type_guards72.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
17874
|
-
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17875
|
-
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17876
|
-
ThumbnailStoryboardViewer,
|
|
17900
|
+
if ((0, import_type_guards73.isNil)(storyboard) || (0, import_type_guards73.isUndefined)(height) || (0, import_type_guards73.isEmptyString)(height)) {
|
|
17901
|
+
return false;
|
|
17902
|
+
}
|
|
17903
|
+
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
17904
|
+
}, [isScrubbable, isMouseOver, isStoryboardReady, storyboard, height]);
|
|
17905
|
+
let thumbnailContent = null;
|
|
17906
|
+
if (storyboard && shouldRenderStoryboard) {
|
|
17907
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17908
|
+
StoryboardRenderer,
|
|
17877
17909
|
{
|
|
17878
|
-
cursorPosition
|
|
17879
|
-
|
|
17880
|
-
frameHeight,
|
|
17881
|
-
frameWidth,
|
|
17910
|
+
cursorPosition,
|
|
17911
|
+
isStoryboardReady,
|
|
17882
17912
|
percent,
|
|
17883
|
-
|
|
17884
|
-
|
|
17885
|
-
storyboardWidth: sbWidth,
|
|
17886
|
-
targetAspectRatio: aspectRatio,
|
|
17887
|
-
targetWidth
|
|
17913
|
+
storyboard,
|
|
17914
|
+
width
|
|
17888
17915
|
}
|
|
17889
17916
|
);
|
|
17890
|
-
}
|
|
17891
|
-
let thumbnailContent = null;
|
|
17892
|
-
if (shouldRenderStoryboard) {
|
|
17893
|
-
thumbnailContent = renderStoryboard();
|
|
17894
|
-
} else if ((0, import_type_guards72.isNotNil)(thumbnailUrl)) {
|
|
17917
|
+
} else if ((0, import_type_guards73.isNotNil)(thumbnailUrl)) {
|
|
17895
17918
|
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17896
17919
|
ThumbnailImage,
|
|
17897
17920
|
{
|
|
@@ -17916,7 +17939,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17916
17939
|
onMouseOut: handleMouseOut,
|
|
17917
17940
|
role: "presentation",
|
|
17918
17941
|
children: [
|
|
17919
|
-
(0,
|
|
17942
|
+
(0, import_type_guards73.isNotNil)(children) ? children : null,
|
|
17920
17943
|
thumbnailContent
|
|
17921
17944
|
]
|
|
17922
17945
|
}
|
|
@@ -17928,7 +17951,7 @@ Thumbnail.displayName = "Thumbnail_UI";
|
|
|
17928
17951
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
17929
17952
|
var import_react101 = __toESM(require("react"));
|
|
17930
17953
|
var import_styled_components127 = __toESM(require("styled-components"));
|
|
17931
|
-
var
|
|
17954
|
+
var import_type_guards74 = require("@wistia/type-guards");
|
|
17932
17955
|
var import_jsx_runtime325 = (
|
|
17933
17956
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
17934
17957
|
require("react/jsx-runtime")
|
|
@@ -18008,7 +18031,7 @@ var ThumbnailCollage = ({
|
|
|
18008
18031
|
}) => {
|
|
18009
18032
|
const thumbnailArray = import_react101.default.Children.toArray(children);
|
|
18010
18033
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
18011
|
-
const thumbnails = (0,
|
|
18034
|
+
const thumbnails = (0, import_type_guards74.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
18012
18035
|
return import_react101.default.cloneElement(child, {
|
|
18013
18036
|
...child.props,
|
|
18014
18037
|
children: void 0
|
|
@@ -18036,7 +18059,7 @@ var ThumbnailCollage = ({
|
|
|
18036
18059
|
|
|
18037
18060
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
18038
18061
|
var import_styled_components128 = __toESM(require("styled-components"));
|
|
18039
|
-
var
|
|
18062
|
+
var import_type_guards75 = require("@wistia/type-guards");
|
|
18040
18063
|
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
18041
18064
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
18042
18065
|
if (iconOnly) {
|
|
@@ -18149,7 +18172,7 @@ var WistiaLogo = ({
|
|
|
18149
18172
|
...props,
|
|
18150
18173
|
children: [
|
|
18151
18174
|
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)("title", { children: title }),
|
|
18152
|
-
(0,
|
|
18175
|
+
(0, import_type_guards75.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("desc", { children: description }) : null,
|
|
18153
18176
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
18154
18177
|
renderLogotype(logotypeColor, iconOnly)
|
|
18155
18178
|
]
|
|
@@ -18161,7 +18184,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
|
|
|
18161
18184
|
|
|
18162
18185
|
// src/components/SplitButton/SplitButton.tsx
|
|
18163
18186
|
var import_styled_components129 = __toESM(require("styled-components"));
|
|
18164
|
-
var
|
|
18187
|
+
var import_type_guards76 = require("@wistia/type-guards");
|
|
18165
18188
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
18166
18189
|
var StyledSplitButton = import_styled_components129.default.span`
|
|
18167
18190
|
white-space: nowrap;
|
|
@@ -18204,7 +18227,7 @@ var SplitButton = ({
|
|
|
18204
18227
|
children
|
|
18205
18228
|
}
|
|
18206
18229
|
),
|
|
18207
|
-
(0,
|
|
18230
|
+
(0, import_type_guards76.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18208
18231
|
Menu,
|
|
18209
18232
|
{
|
|
18210
18233
|
...menuProps,
|
|
@@ -18224,7 +18247,7 @@ var SplitButton = ({
|
|
|
18224
18247
|
children: menuItems
|
|
18225
18248
|
}
|
|
18226
18249
|
),
|
|
18227
|
-
(0,
|
|
18250
|
+
(0, import_type_guards76.isNotNil)(secondaryAction) && secondaryAction
|
|
18228
18251
|
] });
|
|
18229
18252
|
};
|
|
18230
18253
|
SplitButton.displayName = "SplitButton_UI";
|