@wistia/ui 0.14.41-beta.877dad2b.ea24cff → 0.14.41-beta.adfca4a2.a003a17
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 +307 -323
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +4 -35
- package/dist/index.d.ts +4 -35
- package/dist/index.mjs +197 -211
- 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.41-beta.
|
|
3
|
+
* @license @wistia/ui v0.14.41-beta.adfca4a2.a003a17
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -125,8 +125,6 @@ __export(index_exports, {
|
|
|
125
125
|
MenuLabel: () => MenuLabel,
|
|
126
126
|
MenuRadioGroup: () => MenuRadioGroup,
|
|
127
127
|
Modal: () => Modal,
|
|
128
|
-
ModalValueProp: () => ModalValueProp,
|
|
129
|
-
ModalValueProps: () => ModalValueProps,
|
|
130
128
|
PersistentFileAmountLimitValidator: () => import_validators.PersistentFileAmountLimitValidator,
|
|
131
129
|
Popover: () => Popover,
|
|
132
130
|
ProgressBar: () => ProgressBar,
|
|
@@ -12491,6 +12489,7 @@ var Ariakit = __toESM(require("@ariakit/react"));
|
|
|
12491
12489
|
var import_react54 = require("react");
|
|
12492
12490
|
var import_match_sorter = require("match-sorter");
|
|
12493
12491
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
12492
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
12494
12493
|
|
|
12495
12494
|
// src/components/Tag/Tag.tsx
|
|
12496
12495
|
var import_react53 = require("react");
|
|
@@ -12810,7 +12809,8 @@ var extractOptions = (children) => {
|
|
|
12810
12809
|
return options;
|
|
12811
12810
|
};
|
|
12812
12811
|
var defaultDisplayValues = (values, onRemove) => {
|
|
12813
|
-
|
|
12812
|
+
const valueArray = Array.isArray(values) ? values : [values];
|
|
12813
|
+
return valueArray.map((selectedValue) => /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
12814
12814
|
Tag,
|
|
12815
12815
|
{
|
|
12816
12816
|
href: "https://example.com",
|
|
@@ -12851,7 +12851,11 @@ var Combobox2 = ({
|
|
|
12851
12851
|
return () => null;
|
|
12852
12852
|
}, []);
|
|
12853
12853
|
const handleRemoveValue = (valueToRemove) => {
|
|
12854
|
-
|
|
12854
|
+
if ((0, import_type_guards37.isString)(value)) {
|
|
12855
|
+
onChange("");
|
|
12856
|
+
return;
|
|
12857
|
+
}
|
|
12858
|
+
onChange(typeof value === "string" ? "" : value.filter((val) => val !== valueToRemove));
|
|
12855
12859
|
};
|
|
12856
12860
|
const matches = (0, import_react54.useMemo)(() => {
|
|
12857
12861
|
return (0, import_match_sorter.matchSorter)(Object.keys(options), searchValue);
|
|
@@ -12925,12 +12929,12 @@ var Combobox2 = ({
|
|
|
12925
12929
|
};
|
|
12926
12930
|
|
|
12927
12931
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
12928
|
-
var
|
|
12932
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
12929
12933
|
var import_react61 = require("react");
|
|
12930
12934
|
|
|
12931
12935
|
// src/components/Menu/Menu.tsx
|
|
12932
12936
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
12933
|
-
var
|
|
12937
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
12934
12938
|
var import_react56 = require("react");
|
|
12935
12939
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
12936
12940
|
|
|
@@ -13045,7 +13049,7 @@ var Menu = (0, import_react56.forwardRef)(
|
|
|
13045
13049
|
}, ref) => {
|
|
13046
13050
|
const contextValue = (0, import_react56.useMemo)(() => ({ compact }), [compact]);
|
|
13047
13051
|
let controlProps = {
|
|
13048
|
-
...(0,
|
|
13052
|
+
...(0, import_type_guards38.isNotNil)(onOpenChange) && (0, import_type_guards38.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
13049
13053
|
};
|
|
13050
13054
|
if (disabled) {
|
|
13051
13055
|
controlProps = {
|
|
@@ -13059,7 +13063,7 @@ var Menu = (0, import_react56.forwardRef)(
|
|
|
13059
13063
|
modal: false,
|
|
13060
13064
|
...controlProps,
|
|
13061
13065
|
children: [
|
|
13062
|
-
/* @__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)(
|
|
13063
13067
|
Button,
|
|
13064
13068
|
{
|
|
13065
13069
|
ref,
|
|
@@ -13125,12 +13129,12 @@ MenuLabel.displayName = "MenuLabel_UI";
|
|
|
13125
13129
|
var import_react58 = require("react");
|
|
13126
13130
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
13127
13131
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
13128
|
-
var
|
|
13132
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
13129
13133
|
|
|
13130
13134
|
// src/components/Menu/MenuItemButton.tsx
|
|
13131
13135
|
var import_react57 = require("react");
|
|
13132
13136
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
13133
|
-
var
|
|
13137
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
13134
13138
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
13135
13139
|
var StyledButton3 = (0, import_styled_components72.default)(Button)`
|
|
13136
13140
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
@@ -13210,7 +13214,7 @@ var StyledBadgeContainer = import_styled_components72.default.div`
|
|
|
13210
13214
|
var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
13211
13215
|
let { colorScheme, badge } = props;
|
|
13212
13216
|
if (appearance === "dangerous") {
|
|
13213
|
-
if ((0,
|
|
13217
|
+
if ((0, import_type_guards39.isNotUndefined)(colorScheme)) {
|
|
13214
13218
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
13215
13219
|
}
|
|
13216
13220
|
colorScheme = "error";
|
|
@@ -13238,10 +13242,10 @@ var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, com
|
|
|
13238
13242
|
fullWidth: true,
|
|
13239
13243
|
unstyled: true,
|
|
13240
13244
|
children: [
|
|
13241
|
-
(0,
|
|
13245
|
+
(0, import_type_guards39.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
13242
13246
|
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
13243
|
-
(0,
|
|
13244
|
-
(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
|
|
13245
13249
|
]
|
|
13246
13250
|
}
|
|
13247
13251
|
);
|
|
@@ -13312,7 +13316,7 @@ var SubMenu = ({
|
|
|
13312
13316
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
13313
13317
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
13314
13318
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(MenuItemLabel, { children: label }),
|
|
13315
|
-
(0,
|
|
13319
|
+
(0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(MenuItemDescription, { children: description }) : null
|
|
13316
13320
|
] }),
|
|
13317
13321
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
13318
13322
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
@@ -13404,7 +13408,7 @@ RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
|
13404
13408
|
|
|
13405
13409
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
13406
13410
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
13407
|
-
var
|
|
13411
|
+
var import_type_guards41 = require("@wistia/type-guards");
|
|
13408
13412
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
13409
13413
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
13410
13414
|
return checked ? /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
@@ -13478,8 +13482,8 @@ var CheckboxMenuItem = ({
|
|
|
13478
13482
|
MenuItemButton,
|
|
13479
13483
|
{
|
|
13480
13484
|
...props,
|
|
13481
|
-
leftIcon: (0,
|
|
13482
|
-
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
|
|
13483
13487
|
}
|
|
13484
13488
|
)
|
|
13485
13489
|
}
|
|
@@ -13601,7 +13605,7 @@ var ContextMenu = ({
|
|
|
13601
13605
|
const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
|
|
13602
13606
|
const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
|
|
13603
13607
|
(0, import_react61.useEffect)(() => {
|
|
13604
|
-
if ((0,
|
|
13608
|
+
if ((0, import_type_guards42.isNil)(position)) {
|
|
13605
13609
|
const onContextMenu = (event) => {
|
|
13606
13610
|
event.preventDefault();
|
|
13607
13611
|
setMenuPosition({ x: event.clientX, y: event.clientY });
|
|
@@ -13615,7 +13619,7 @@ var ContextMenu = ({
|
|
|
13615
13619
|
}
|
|
13616
13620
|
return () => null;
|
|
13617
13621
|
}, [position, triggerRef]);
|
|
13618
|
-
const isOpen = (0,
|
|
13622
|
+
const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
|
|
13619
13623
|
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13620
13624
|
Menu,
|
|
13621
13625
|
{
|
|
@@ -13650,7 +13654,7 @@ var ContextMenu = ({
|
|
|
13650
13654
|
// src/components/DataCards/DataCard.tsx
|
|
13651
13655
|
var import_react62 = require("react");
|
|
13652
13656
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
13653
|
-
var
|
|
13657
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
13654
13658
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
13655
13659
|
var StyledDataCard = import_styled_components75.default.div`
|
|
13656
13660
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
@@ -13804,8 +13808,8 @@ var DataCardInner = ({
|
|
|
13804
13808
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledLoadingValue, {}) : value
|
|
13805
13809
|
}
|
|
13806
13810
|
),
|
|
13807
|
-
(0,
|
|
13808
|
-
(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)(
|
|
13809
13813
|
StyledSubtitle,
|
|
13810
13814
|
{
|
|
13811
13815
|
"data-wui-data-card-subtitle": true,
|
|
@@ -13813,13 +13817,13 @@ var DataCardInner = ({
|
|
|
13813
13817
|
children: subtitle
|
|
13814
13818
|
}
|
|
13815
13819
|
),
|
|
13816
|
-
(0,
|
|
13820
|
+
(0, import_type_guards43.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
13817
13821
|
]
|
|
13818
13822
|
}
|
|
13819
13823
|
);
|
|
13820
13824
|
var DataCard = (props) => {
|
|
13821
13825
|
const ref = (0, import_react62.useRef)(null);
|
|
13822
|
-
if ((0,
|
|
13826
|
+
if ((0, import_type_guards43.isNotNil)(props.href) || (0, import_type_guards43.isNotNil)(props.onClick)) {
|
|
13823
13827
|
const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
|
|
13824
13828
|
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13825
13829
|
DataCardInner,
|
|
@@ -13830,8 +13834,8 @@ var DataCard = (props) => {
|
|
|
13830
13834
|
Button,
|
|
13831
13835
|
{
|
|
13832
13836
|
ref,
|
|
13833
|
-
...(0,
|
|
13834
|
-
...(0,
|
|
13837
|
+
...(0, import_type_guards43.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
|
|
13838
|
+
...(0, import_type_guards43.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
|
|
13835
13839
|
"aria-pressed": ariaPressed,
|
|
13836
13840
|
disabled: props.disabled ?? false,
|
|
13837
13841
|
href: props.href,
|
|
@@ -14199,11 +14203,11 @@ var EditableHeading = ({
|
|
|
14199
14203
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
14200
14204
|
var import_react65 = require("react");
|
|
14201
14205
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
14202
|
-
var
|
|
14206
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
14203
14207
|
|
|
14204
14208
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
14205
14209
|
var import_react64 = require("react");
|
|
14206
|
-
var
|
|
14210
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
14207
14211
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
14208
14212
|
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
14209
14213
|
var StyledEditableTextRoot = import_styled_components82.default.div`
|
|
@@ -14238,7 +14242,7 @@ var EditableTextRoot = ({
|
|
|
14238
14242
|
const [isEditing, setIsEditing] = (0, import_react64.useState)(false);
|
|
14239
14243
|
const value = isControlled ? controlledValue : internalValue;
|
|
14240
14244
|
const generatedId = (0, import_react64.useId)();
|
|
14241
|
-
const computedId = (0,
|
|
14245
|
+
const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
14242
14246
|
const handleSetIsEditing = (0, import_react64.useCallback)(
|
|
14243
14247
|
(editing) => {
|
|
14244
14248
|
if (editing && !isEditing) {
|
|
@@ -14325,7 +14329,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
|
|
|
14325
14329
|
margin: 0;
|
|
14326
14330
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
14327
14331
|
${({ $maxLines }) => {
|
|
14328
|
-
if ((0,
|
|
14332
|
+
if ((0, import_type_guards45.isNotNil)($maxLines)) {
|
|
14329
14333
|
return import_styled_components83.css`
|
|
14330
14334
|
${ellipsisStyle};
|
|
14331
14335
|
${lineClampCss($maxLines)};
|
|
@@ -14333,7 +14337,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
|
|
|
14333
14337
|
}
|
|
14334
14338
|
return void 0;
|
|
14335
14339
|
}}
|
|
14336
|
-
${({ $minLines }) => (0,
|
|
14340
|
+
${({ $minLines }) => (0, import_type_guards45.isNotNil)($minLines) && import_styled_components83.css`
|
|
14337
14341
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14338
14342
|
`}
|
|
14339
14343
|
word-break: break-word;
|
|
@@ -14420,12 +14424,12 @@ var EditableTextDisplay = makePolymorphic(
|
|
|
14420
14424
|
// src/components/EditableText/EditableTextInput.tsx
|
|
14421
14425
|
var import_react66 = require("react");
|
|
14422
14426
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
14423
|
-
var
|
|
14427
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
14424
14428
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
14425
14429
|
var StyledInput2 = (0, import_styled_components84.default)(Input)`
|
|
14426
14430
|
&& {
|
|
14427
|
-
${({ $minLines }) => (0,
|
|
14428
|
-
${({ $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));`}
|
|
14429
14433
|
${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
|
|
14430
14434
|
background-color: var(--wui-color-bg-surface);
|
|
14431
14435
|
border-radius: var(--wui-editable-text-border-radius);
|
|
@@ -14682,7 +14686,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
14682
14686
|
|
|
14683
14687
|
// src/components/Form/FormErrorSummary.tsx
|
|
14684
14688
|
var import_react72 = require("react");
|
|
14685
|
-
var
|
|
14689
|
+
var import_type_guards47 = require("@wistia/type-guards");
|
|
14686
14690
|
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
14687
14691
|
var ErrorItem = ({ name, error, formId }) => {
|
|
14688
14692
|
return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
@@ -14696,8 +14700,8 @@ var FormErrorSummary = ({ description }) => {
|
|
|
14696
14700
|
}
|
|
14697
14701
|
return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)("div", { ref, children: [
|
|
14698
14702
|
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("p", { children: description }),
|
|
14699
|
-
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0,
|
|
14700
|
-
([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)(
|
|
14701
14705
|
ErrorItem,
|
|
14702
14706
|
{
|
|
14703
14707
|
error: err,
|
|
@@ -14721,7 +14725,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
14721
14725
|
// src/components/FormField/FormField.tsx
|
|
14722
14726
|
var import_react73 = require("react");
|
|
14723
14727
|
var import_styled_components85 = __toESM(require("styled-components"));
|
|
14724
|
-
var
|
|
14728
|
+
var import_type_guards48 = require("@wistia/type-guards");
|
|
14725
14729
|
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
14726
14730
|
var StyledFormField = import_styled_components85.default.div`
|
|
14727
14731
|
--form-field-spacing: var(--wui-space-01);
|
|
@@ -14762,7 +14766,7 @@ var StyledErrorList = import_styled_components85.default.ul`
|
|
|
14762
14766
|
gap: var(--wui-space-01);
|
|
14763
14767
|
`;
|
|
14764
14768
|
var ErrorMessages = ({ errors, id }) => {
|
|
14765
|
-
const isErrorArray = (0,
|
|
14769
|
+
const isErrorArray = (0, import_type_guards48.isArray)(errors);
|
|
14766
14770
|
const isMultipleErrors = isErrorArray && errors.length > 1;
|
|
14767
14771
|
if (!isErrorArray) {
|
|
14768
14772
|
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
@@ -14830,19 +14834,19 @@ var FormField = ({
|
|
|
14830
14834
|
"aria-describedby": ariaDescribedby,
|
|
14831
14835
|
...props
|
|
14832
14836
|
};
|
|
14833
|
-
if ((0,
|
|
14837
|
+
if ((0, import_type_guards48.isUndefined)(value) && (0, import_type_guards48.isNotUndefined)(defaultValue)) {
|
|
14834
14838
|
childProps = {
|
|
14835
14839
|
...childProps,
|
|
14836
14840
|
defaultValue
|
|
14837
14841
|
};
|
|
14838
14842
|
}
|
|
14839
|
-
if ((0,
|
|
14840
|
-
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;
|
|
14841
14845
|
const handleChange = (event) => {
|
|
14842
|
-
if ((0,
|
|
14846
|
+
if ((0, import_type_guards48.isNotUndefined)(props.onChange)) {
|
|
14843
14847
|
props.onChange(event);
|
|
14844
14848
|
}
|
|
14845
|
-
if ((0,
|
|
14849
|
+
if ((0, import_type_guards48.isNotUndefined)(checkboxGroup.onChange)) {
|
|
14846
14850
|
checkboxGroup.onChange(event);
|
|
14847
14851
|
}
|
|
14848
14852
|
};
|
|
@@ -14850,7 +14854,7 @@ var FormField = ({
|
|
|
14850
14854
|
...childProps,
|
|
14851
14855
|
name: computedName,
|
|
14852
14856
|
onChange: handleChange,
|
|
14853
|
-
"aria-invalid": (0,
|
|
14857
|
+
"aria-invalid": (0, import_type_guards48.isNotNil)(error)
|
|
14854
14858
|
};
|
|
14855
14859
|
}
|
|
14856
14860
|
import_react73.Children.only(children);
|
|
@@ -14861,9 +14865,9 @@ var FormField = ({
|
|
|
14861
14865
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
14862
14866
|
children: [
|
|
14863
14867
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
14864
|
-
(0,
|
|
14868
|
+
(0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
14865
14869
|
(0, import_react73.cloneElement)(children, childProps),
|
|
14866
|
-
(0,
|
|
14870
|
+
(0, import_type_guards48.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_jsx_runtime281.Fragment, { children: [
|
|
14867
14871
|
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", {}),
|
|
14868
14872
|
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14869
14873
|
ErrorMessages,
|
|
@@ -14909,7 +14913,7 @@ RadioGroup.displayName = "RadioGroup_UI";
|
|
|
14909
14913
|
// src/components/Grid/Grid.tsx
|
|
14910
14914
|
var import_react75 = require("react");
|
|
14911
14915
|
var import_styled_components86 = __toESM(require("styled-components"));
|
|
14912
|
-
var
|
|
14916
|
+
var import_type_guards49 = require("@wistia/type-guards");
|
|
14913
14917
|
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
14914
14918
|
var DEFAULT_ELEMENT5 = "div";
|
|
14915
14919
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
@@ -14959,7 +14963,7 @@ var GridComponent = (0, import_react75.forwardRef)(
|
|
|
14959
14963
|
...props
|
|
14960
14964
|
}, ref) => {
|
|
14961
14965
|
const responsiveGap = useResponsiveProp(gap);
|
|
14962
|
-
const { column, row } = (0,
|
|
14966
|
+
const { column, row } = (0, import_type_guards49.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
|
|
14963
14967
|
const responsiveColumns = useResponsiveProp(columns);
|
|
14964
14968
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
14965
14969
|
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
@@ -14984,7 +14988,7 @@ var Grid = makePolymorphic(GridComponent);
|
|
|
14984
14988
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
14985
14989
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
14986
14990
|
var import_react76 = require("react");
|
|
14987
|
-
var
|
|
14991
|
+
var import_type_guards50 = require("@wistia/type-guards");
|
|
14988
14992
|
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
14989
14993
|
var StyledIconButton = (0, import_styled_components87.default)(IconButton)`
|
|
14990
14994
|
/* override size for icon button since prop gets changed by Input */
|
|
@@ -15014,12 +15018,12 @@ var InputClickToCopy = (0, import_react76.forwardRef)(
|
|
|
15014
15018
|
if (disabled) {
|
|
15015
15019
|
return;
|
|
15016
15020
|
}
|
|
15017
|
-
if ((0,
|
|
15021
|
+
if ((0, import_type_guards50.isFunction)(props.onClick)) {
|
|
15018
15022
|
props.onClick(event);
|
|
15019
15023
|
}
|
|
15020
15024
|
void copyToClipboard(value).then(() => {
|
|
15021
15025
|
setIsCopied(true);
|
|
15022
|
-
if ((0,
|
|
15026
|
+
if ((0, import_type_guards50.isFunction)(onCopy)) {
|
|
15023
15027
|
onCopy(value);
|
|
15024
15028
|
}
|
|
15025
15029
|
return value;
|
|
@@ -15054,7 +15058,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
|
15054
15058
|
// src/components/InputPassword/InputPassword.tsx
|
|
15055
15059
|
var import_styled_components88 = __toESM(require("styled-components"));
|
|
15056
15060
|
var import_react77 = require("react");
|
|
15057
|
-
var
|
|
15061
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
15058
15062
|
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
15059
15063
|
var StyledIconButton2 = (0, import_styled_components88.default)(IconButton)`
|
|
15060
15064
|
/* override size for icon button since prop gets changed by Input */
|
|
@@ -15070,7 +15074,7 @@ var InputPassword = (0, import_react77.forwardRef)(
|
|
|
15070
15074
|
const handleClick = () => {
|
|
15071
15075
|
const newVisibility = !isVisible;
|
|
15072
15076
|
setIsVisible(newVisibility);
|
|
15073
|
-
if ((0,
|
|
15077
|
+
if ((0, import_type_guards51.isFunction)(onVisibilityToggle)) {
|
|
15074
15078
|
onVisibilityToggle(newVisibility);
|
|
15075
15079
|
}
|
|
15076
15080
|
};
|
|
@@ -15100,7 +15104,7 @@ InputPassword.displayName = "InputPassword_UI";
|
|
|
15100
15104
|
|
|
15101
15105
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
15102
15106
|
var import_styled_components89 = __toESM(require("styled-components"));
|
|
15103
|
-
var
|
|
15107
|
+
var import_type_guards52 = require("@wistia/type-guards");
|
|
15104
15108
|
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
15105
15109
|
var StyledKeyboardShortcut = import_styled_components89.default.div`
|
|
15106
15110
|
align-items: center;
|
|
@@ -15194,7 +15198,7 @@ var KeyboardShortcut = ({
|
|
|
15194
15198
|
$fullWidth: fullWidth,
|
|
15195
15199
|
...otherProps,
|
|
15196
15200
|
children: [
|
|
15197
|
-
(0,
|
|
15201
|
+
(0, import_type_guards52.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(Label2, { children: label }),
|
|
15198
15202
|
/* @__PURE__ */ (0, import_jsx_runtime286.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
|
|
15199
15203
|
StyledKey,
|
|
15200
15204
|
{
|
|
@@ -15208,18 +15212,18 @@ var KeyboardShortcut = ({
|
|
|
15208
15212
|
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
15209
15213
|
|
|
15210
15214
|
// src/components/List/List.tsx
|
|
15211
|
-
var
|
|
15215
|
+
var import_type_guards54 = require("@wistia/type-guards");
|
|
15212
15216
|
var import_styled_components91 = __toESM(require("styled-components"));
|
|
15213
15217
|
|
|
15214
15218
|
// src/components/List/ListItem.tsx
|
|
15215
15219
|
var import_styled_components90 = __toESM(require("styled-components"));
|
|
15216
|
-
var
|
|
15220
|
+
var import_type_guards53 = require("@wistia/type-guards");
|
|
15217
15221
|
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
15218
15222
|
var ListItemComponent = import_styled_components90.default.li`
|
|
15219
15223
|
margin-bottom: var(--wui-space-02);
|
|
15220
15224
|
`;
|
|
15221
15225
|
var ListItem = ({ children }) => {
|
|
15222
|
-
if ((0,
|
|
15226
|
+
if ((0, import_type_guards53.isNil)(children)) {
|
|
15223
15227
|
return null;
|
|
15224
15228
|
}
|
|
15225
15229
|
return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(ListItemComponent, { children });
|
|
@@ -15349,13 +15353,13 @@ var List = ({
|
|
|
15349
15353
|
...otherProps
|
|
15350
15354
|
}) => {
|
|
15351
15355
|
const listVariant = variant ?? "bullets";
|
|
15352
|
-
if ((0,
|
|
15356
|
+
if ((0, import_type_guards54.isNotNil)(children)) {
|
|
15353
15357
|
if (Array.isArray(children) && !children.length) {
|
|
15354
15358
|
return null;
|
|
15355
15359
|
}
|
|
15356
15360
|
return renderListComponent(children, listVariant, otherProps);
|
|
15357
15361
|
}
|
|
15358
|
-
if ((0,
|
|
15362
|
+
if ((0, import_type_guards54.isNotNil)(items)) {
|
|
15359
15363
|
if (!items.length) {
|
|
15360
15364
|
return null;
|
|
15361
15365
|
}
|
|
@@ -15390,7 +15394,7 @@ Mark.displayName = "Mark_UI";
|
|
|
15390
15394
|
var import_react80 = require("react");
|
|
15391
15395
|
var import_styled_components97 = __toESM(require("styled-components"));
|
|
15392
15396
|
var import_react_dialog5 = require("@radix-ui/react-dialog");
|
|
15393
|
-
var
|
|
15397
|
+
var import_type_guards56 = require("@wistia/type-guards");
|
|
15394
15398
|
|
|
15395
15399
|
// src/components/Modal/ModalHeader.tsx
|
|
15396
15400
|
var import_styled_components94 = __toESM(require("styled-components"));
|
|
@@ -15420,14 +15424,12 @@ var import_jsx_runtime291 = require("react/jsx-runtime");
|
|
|
15420
15424
|
var Header = import_styled_components94.default.header`
|
|
15421
15425
|
display: flex;
|
|
15422
15426
|
order: 1;
|
|
15423
|
-
padding: 0 var(--wui-space-05);
|
|
15424
|
-
padding-bottom: 0;
|
|
15425
15427
|
gap: var(--wui-space-01);
|
|
15426
15428
|
justify-content: ${({ $hideTitle }) => $hideTitle ? "flex-end" : "space-between"}; /* ensure ModalCloseButton is right-aligned */
|
|
15427
15429
|
|
|
15428
15430
|
/* DialogTitle creates an h2 element which inherits some margin */
|
|
15429
15431
|
h2 {
|
|
15430
|
-
margin: 0;
|
|
15432
|
+
margin: 0 0 var(--wui-space-03);
|
|
15431
15433
|
padding-right: ${({ $hideCloseButon }) => $hideCloseButon ? "0" : "var(--wui-space-03)"};
|
|
15432
15434
|
}
|
|
15433
15435
|
|
|
@@ -15469,7 +15471,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
|
15469
15471
|
|
|
15470
15472
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
15471
15473
|
var import_react78 = require("react");
|
|
15472
|
-
var
|
|
15474
|
+
var import_type_guards55 = require("@wistia/type-guards");
|
|
15473
15475
|
var useFocusRestore = () => {
|
|
15474
15476
|
const previouslyFocusedRef = (0, import_react78.useRef)(null);
|
|
15475
15477
|
(0, import_react78.useEffect)(() => {
|
|
@@ -15477,7 +15479,7 @@ var useFocusRestore = () => {
|
|
|
15477
15479
|
}, []);
|
|
15478
15480
|
(0, import_react78.useEffect)(() => {
|
|
15479
15481
|
return () => {
|
|
15480
|
-
if ((0,
|
|
15482
|
+
if ((0, import_type_guards55.isNotNil)(previouslyFocusedRef.current)) {
|
|
15481
15483
|
setTimeout(() => {
|
|
15482
15484
|
previouslyFocusedRef.current?.focus();
|
|
15483
15485
|
}, 0);
|
|
@@ -15589,15 +15591,15 @@ var StyledModalContent = (0, import_styled_components95.default)(import_react_di
|
|
|
15589
15591
|
position: fixed;
|
|
15590
15592
|
display: flex;
|
|
15591
15593
|
flex-direction: column;
|
|
15592
|
-
gap: var(--wui-space-03);
|
|
15593
15594
|
top: 0;
|
|
15594
15595
|
left: 0;
|
|
15595
15596
|
width: 100vw;
|
|
15596
15597
|
height: 100vh;
|
|
15597
15598
|
z-index: var(--wui-zindex-modal);
|
|
15598
15599
|
box-sizing: border-box;
|
|
15599
|
-
padding: var(--wui-space-05)
|
|
15600
|
+
padding: var(--wui-space-05);
|
|
15600
15601
|
background-color: var(--wui-color-bg-app);
|
|
15602
|
+
overflow: auto;
|
|
15601
15603
|
|
|
15602
15604
|
${mq.smAndUp} {
|
|
15603
15605
|
position: fixed;
|
|
@@ -15670,21 +15672,11 @@ var ModalBody = import_styled_components97.default.div`
|
|
|
15670
15672
|
flex-direction: column;
|
|
15671
15673
|
display: flex;
|
|
15672
15674
|
flex: 1 0 0;
|
|
15673
|
-
padding: 0 var(--wui-space-05);
|
|
15674
|
-
`;
|
|
15675
|
-
var ModalScrollArea = import_styled_components97.default.div`
|
|
15676
15675
|
order: 2;
|
|
15677
|
-
max-height: 90vh;
|
|
15678
|
-
overflow-y: auto;
|
|
15679
|
-
`;
|
|
15680
|
-
var ModalFooter = import_styled_components97.default.footer`
|
|
15681
|
-
padding: 0 var(--wui-space-05);
|
|
15682
|
-
order: 3;
|
|
15683
15676
|
`;
|
|
15684
15677
|
var Modal = (0, import_react80.forwardRef)(
|
|
15685
15678
|
({
|
|
15686
15679
|
children,
|
|
15687
|
-
footer,
|
|
15688
15680
|
hideCloseButton = false,
|
|
15689
15681
|
hideTitle = false,
|
|
15690
15682
|
initialFocusRef,
|
|
@@ -15699,7 +15691,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15699
15691
|
import_react_dialog5.Root,
|
|
15700
15692
|
{
|
|
15701
15693
|
onOpenChange: (open2) => {
|
|
15702
|
-
if (!open2 && (0,
|
|
15694
|
+
if (!open2 && (0, import_type_guards56.isNotNil)(onRequestClose)) {
|
|
15703
15695
|
onRequestClose();
|
|
15704
15696
|
}
|
|
15705
15697
|
},
|
|
@@ -15711,7 +15703,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15711
15703
|
{
|
|
15712
15704
|
ref,
|
|
15713
15705
|
onOpenAutoFocus: (event) => {
|
|
15714
|
-
if ((0,
|
|
15706
|
+
if ((0, import_type_guards56.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
15715
15707
|
event.preventDefault();
|
|
15716
15708
|
requestAnimationFrame(() => {
|
|
15717
15709
|
initialFocusRef.current?.focus();
|
|
@@ -15722,7 +15714,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15722
15714
|
width,
|
|
15723
15715
|
...props,
|
|
15724
15716
|
children: [
|
|
15725
|
-
/* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
15717
|
+
/* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ModalBody, { children }),
|
|
15726
15718
|
hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
15727
15719
|
ModalHeader,
|
|
15728
15720
|
{
|
|
@@ -15730,8 +15722,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15730
15722
|
hideTitle,
|
|
15731
15723
|
title
|
|
15732
15724
|
}
|
|
15733
|
-
)
|
|
15734
|
-
(0, import_type_guards55.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ModalFooter, { children: footer }) : null
|
|
15725
|
+
)
|
|
15735
15726
|
]
|
|
15736
15727
|
}
|
|
15737
15728
|
)
|
|
@@ -15742,42 +15733,20 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15742
15733
|
);
|
|
15743
15734
|
Modal.displayName = "Modal_UI";
|
|
15744
15735
|
|
|
15745
|
-
// src/components/Modal/ModalValueProps.tsx
|
|
15746
|
-
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
15747
|
-
var ModalValueProps = ({ children }) => {
|
|
15748
|
-
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
15749
|
-
Stack,
|
|
15750
|
-
{
|
|
15751
|
-
direction: "horizontal",
|
|
15752
|
-
gap: "space-08",
|
|
15753
|
-
children
|
|
15754
|
-
}
|
|
15755
|
-
);
|
|
15756
|
-
};
|
|
15757
|
-
ModalValueProps.displayName = "ModalValueProps_UI";
|
|
15758
|
-
var ModalValueProp = ({ title, image, children }) => {
|
|
15759
|
-
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Stack, { direction: "vertical", children: [
|
|
15760
|
-
image,
|
|
15761
|
-
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Heading, { variant: "heading4", children: title }),
|
|
15762
|
-
children
|
|
15763
|
-
] });
|
|
15764
|
-
};
|
|
15765
|
-
ModalValueProp.displayName = "ModalValueProp_UI";
|
|
15766
|
-
|
|
15767
15736
|
// src/components/Popover/Popover.tsx
|
|
15768
15737
|
var import_react_popover5 = require("@radix-ui/react-popover");
|
|
15769
15738
|
var import_styled_components99 = __toESM(require("styled-components"));
|
|
15770
15739
|
|
|
15771
15740
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
15772
|
-
var
|
|
15741
|
+
var import_type_guards57 = require("@wistia/type-guards");
|
|
15773
15742
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
15774
|
-
return (0,
|
|
15743
|
+
return (0, import_type_guards57.isNotNil)(onOpenChange) && (0, import_type_guards57.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
15775
15744
|
};
|
|
15776
15745
|
|
|
15777
15746
|
// src/components/Popover/PopoverArrow.tsx
|
|
15778
15747
|
var import_react_popover4 = require("@radix-ui/react-popover");
|
|
15779
15748
|
var import_styled_components98 = __toESM(require("styled-components"));
|
|
15780
|
-
var
|
|
15749
|
+
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
15781
15750
|
var StyledPath = import_styled_components98.default.path`
|
|
15782
15751
|
fill: var(--wui-color-border-secondary);
|
|
15783
15752
|
`;
|
|
@@ -15816,7 +15785,7 @@ var StyledCircle = import_styled_components98.default.circle`
|
|
|
15816
15785
|
}
|
|
15817
15786
|
`;
|
|
15818
15787
|
var PopoverArrow = ({ isAnimated }) => {
|
|
15819
|
-
return /* @__PURE__ */ (0,
|
|
15788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_react_popover4.PopoverArrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(
|
|
15820
15789
|
"svg",
|
|
15821
15790
|
{
|
|
15822
15791
|
fill: "none",
|
|
@@ -15825,8 +15794,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
15825
15794
|
width: "48",
|
|
15826
15795
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15827
15796
|
children: [
|
|
15828
|
-
/* @__PURE__ */ (0,
|
|
15829
|
-
/* @__PURE__ */ (0,
|
|
15797
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(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" }),
|
|
15798
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
15830
15799
|
StyledCircle,
|
|
15831
15800
|
{
|
|
15832
15801
|
$isAnimated: isAnimated,
|
|
@@ -15837,7 +15806,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
15837
15806
|
strokeWidth: "4"
|
|
15838
15807
|
}
|
|
15839
15808
|
),
|
|
15840
|
-
/* @__PURE__ */ (0,
|
|
15809
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
15841
15810
|
StyledCircle,
|
|
15842
15811
|
{
|
|
15843
15812
|
$isAnimated: isAnimated,
|
|
@@ -15855,7 +15824,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
15855
15824
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
15856
15825
|
|
|
15857
15826
|
// src/components/Popover/Popover.tsx
|
|
15858
|
-
var
|
|
15827
|
+
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
15859
15828
|
var StyledContent2 = (0, import_styled_components99.default)(import_react_popover5.Content)`
|
|
15860
15829
|
z-index: var(--wui-zindex-popover);
|
|
15861
15830
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -15895,9 +15864,9 @@ var Popover = ({
|
|
|
15895
15864
|
"--wui-popover-max-width": maxWidth,
|
|
15896
15865
|
"--wui-popover-max-height": maxHeight
|
|
15897
15866
|
};
|
|
15898
|
-
return /* @__PURE__ */ (0,
|
|
15899
|
-
/* @__PURE__ */ (0,
|
|
15900
|
-
/* @__PURE__ */ (0,
|
|
15867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(import_react_popover5.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
15868
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_react_popover5.Trigger, { asChild: true, children: trigger }),
|
|
15869
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_react_popover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
15901
15870
|
StyledContent2,
|
|
15902
15871
|
{
|
|
15903
15872
|
$colorScheme: colorScheme,
|
|
@@ -15906,17 +15875,17 @@ var Popover = ({
|
|
|
15906
15875
|
$unstyled: unstyled,
|
|
15907
15876
|
style,
|
|
15908
15877
|
children: [
|
|
15909
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
15878
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_react_popover5.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
15910
15879
|
IconButton,
|
|
15911
15880
|
{
|
|
15912
15881
|
"data-wui-popover-close": true,
|
|
15913
15882
|
label: "Close",
|
|
15914
15883
|
variant: "ghost",
|
|
15915
|
-
children: /* @__PURE__ */ (0,
|
|
15884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Icon, { type: "close" })
|
|
15916
15885
|
}
|
|
15917
15886
|
) }),
|
|
15918
|
-
withArrow ? /* @__PURE__ */ (0,
|
|
15919
|
-
/* @__PURE__ */ (0,
|
|
15887
|
+
withArrow ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(PopoverArrow, { isAnimated }) : null,
|
|
15888
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { children })
|
|
15920
15889
|
]
|
|
15921
15890
|
}
|
|
15922
15891
|
) })
|
|
@@ -15927,8 +15896,8 @@ Popover.displayName = "Popover_UI";
|
|
|
15927
15896
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
15928
15897
|
var import_styled_components100 = __toESM(require("styled-components"));
|
|
15929
15898
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
15930
|
-
var
|
|
15931
|
-
var
|
|
15899
|
+
var import_type_guards58 = require("@wistia/type-guards");
|
|
15900
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
15932
15901
|
var ProgressBarWrapper = import_styled_components100.default.div`
|
|
15933
15902
|
--progress-bar-height: 8px;
|
|
15934
15903
|
|
|
@@ -15982,16 +15951,16 @@ var ProgressBar = ({
|
|
|
15982
15951
|
colorScheme = "inherit",
|
|
15983
15952
|
...props
|
|
15984
15953
|
}) => {
|
|
15985
|
-
return /* @__PURE__ */ (0,
|
|
15986
|
-
(0,
|
|
15987
|
-
/* @__PURE__ */ (0,
|
|
15954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(ProgressBarWrapper, { children: [
|
|
15955
|
+
(0, import_type_guards58.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
15956
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
15988
15957
|
StyledProgressBar,
|
|
15989
15958
|
{
|
|
15990
15959
|
$colorScheme: colorScheme,
|
|
15991
15960
|
max,
|
|
15992
15961
|
value: progress,
|
|
15993
15962
|
...props,
|
|
15994
|
-
children: /* @__PURE__ */ (0,
|
|
15963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
15995
15964
|
StyledProgressIndicator,
|
|
15996
15965
|
{
|
|
15997
15966
|
$colorScheme: colorScheme,
|
|
@@ -16001,16 +15970,16 @@ var ProgressBar = ({
|
|
|
16001
15970
|
)
|
|
16002
15971
|
}
|
|
16003
15972
|
),
|
|
16004
|
-
(0,
|
|
15973
|
+
(0, import_type_guards58.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
16005
15974
|
] });
|
|
16006
15975
|
};
|
|
16007
15976
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
16008
15977
|
|
|
16009
15978
|
// src/components/Radio/Radio.tsx
|
|
16010
|
-
var
|
|
15979
|
+
var import_type_guards59 = require("@wistia/type-guards");
|
|
16011
15980
|
var import_react81 = require("react");
|
|
16012
15981
|
var import_styled_components101 = __toESM(require("styled-components"));
|
|
16013
|
-
var
|
|
15982
|
+
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
16014
15983
|
var sizeSmall2 = import_styled_components101.css`
|
|
16015
15984
|
--wui-radio-size: 14px;
|
|
16016
15985
|
--wui-radio-icon-size: 7px;
|
|
@@ -16107,22 +16076,22 @@ var Radio = (0, import_react81.forwardRef)(
|
|
|
16107
16076
|
...props
|
|
16108
16077
|
}, ref) => {
|
|
16109
16078
|
const generatedId = (0, import_react81.useId)();
|
|
16110
|
-
const computedId = (0,
|
|
16079
|
+
const computedId = (0, import_type_guards59.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16111
16080
|
const radioGroupContext = useRadioGroup();
|
|
16112
16081
|
const contextName = radioGroupContext?.name;
|
|
16113
16082
|
const contextOnChange = radioGroupContext?.onChange;
|
|
16114
16083
|
const contextValue = radioGroupContext?.value;
|
|
16115
16084
|
const radioName = name ?? contextName;
|
|
16116
16085
|
const handleOnChange = onChange ?? contextOnChange;
|
|
16117
|
-
const isChecked = (0,
|
|
16118
|
-
return /* @__PURE__ */ (0,
|
|
16086
|
+
const isChecked = (0, import_type_guards59.isNotUndefined)(value) && (0, import_type_guards59.isNotUndefined)(contextValue) ? contextValue === value : checked;
|
|
16087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
16119
16088
|
StyledRadioWrapper,
|
|
16120
16089
|
{
|
|
16121
16090
|
$disabled: disabled,
|
|
16122
16091
|
$hideLabel: hideLabel,
|
|
16123
16092
|
"aria-invalid": props["aria-invalid"],
|
|
16124
16093
|
children: [
|
|
16125
|
-
/* @__PURE__ */ (0,
|
|
16094
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
16126
16095
|
StyledHiddenRadioInput,
|
|
16127
16096
|
{
|
|
16128
16097
|
...props,
|
|
@@ -16137,10 +16106,10 @@ var Radio = (0, import_react81.forwardRef)(
|
|
|
16137
16106
|
value
|
|
16138
16107
|
}
|
|
16139
16108
|
),
|
|
16140
|
-
/* @__PURE__ */ (0,
|
|
16109
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
16141
16110
|
FormControlLabel,
|
|
16142
16111
|
{
|
|
16143
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
16112
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(StyledRadioInput, { $size: size }),
|
|
16144
16113
|
description,
|
|
16145
16114
|
disabled,
|
|
16146
16115
|
hideLabel,
|
|
@@ -16161,8 +16130,8 @@ var import_react83 = require("react");
|
|
|
16161
16130
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
16162
16131
|
var import_react82 = require("react");
|
|
16163
16132
|
var import_styled_components102 = __toESM(require("styled-components"));
|
|
16164
|
-
var
|
|
16165
|
-
var
|
|
16133
|
+
var import_type_guards60 = require("@wistia/type-guards");
|
|
16134
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
16166
16135
|
var checkedStyles = import_styled_components102.css`
|
|
16167
16136
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
16168
16137
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
@@ -16283,22 +16252,22 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
|
|
|
16283
16252
|
...props
|
|
16284
16253
|
}, ref) => {
|
|
16285
16254
|
const generatedId = (0, import_react82.useId)();
|
|
16286
|
-
const computedId = (0,
|
|
16255
|
+
const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16287
16256
|
const radioGroupContext = useRadioGroup();
|
|
16288
16257
|
const contextName = radioGroupContext?.name;
|
|
16289
16258
|
const contextOnChange = radioGroupContext?.onChange;
|
|
16290
16259
|
const contextValue = radioGroupContext?.value;
|
|
16291
16260
|
const radioName = name ?? contextName;
|
|
16292
16261
|
const handleOnChange = onChange ?? contextOnChange;
|
|
16293
|
-
const isChecked = (0,
|
|
16294
|
-
return /* @__PURE__ */ (0,
|
|
16262
|
+
const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
|
|
16263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(
|
|
16295
16264
|
StyledCard2,
|
|
16296
16265
|
{
|
|
16297
16266
|
$aspectRatio: aspectRatio,
|
|
16298
16267
|
$padding: padding,
|
|
16299
16268
|
htmlFor: computedId,
|
|
16300
16269
|
children: [
|
|
16301
|
-
/* @__PURE__ */ (0,
|
|
16270
|
+
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
16302
16271
|
StyledHiddenInput,
|
|
16303
16272
|
{
|
|
16304
16273
|
...props,
|
|
@@ -16322,7 +16291,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
|
16322
16291
|
|
|
16323
16292
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16324
16293
|
var import_styled_components104 = __toESM(require("styled-components"));
|
|
16325
|
-
var
|
|
16294
|
+
var import_type_guards61 = require("@wistia/type-guards");
|
|
16326
16295
|
|
|
16327
16296
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
16328
16297
|
var import_styled_components103 = __toESM(require("styled-components"));
|
|
@@ -16375,7 +16344,7 @@ var RadioCardIndicator = import_styled_components103.default.div`
|
|
|
16375
16344
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
16376
16345
|
|
|
16377
16346
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16378
|
-
var
|
|
16347
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
16379
16348
|
var StyledCardContent = import_styled_components104.default.div`
|
|
16380
16349
|
display: grid;
|
|
16381
16350
|
grid-auto-flow: column;
|
|
@@ -16395,18 +16364,18 @@ var RadioCardDefaultLayout = ({
|
|
|
16395
16364
|
description,
|
|
16396
16365
|
showIndicator = true
|
|
16397
16366
|
}) => {
|
|
16398
|
-
return /* @__PURE__ */ (0,
|
|
16399
|
-
showIndicator ? /* @__PURE__ */ (0,
|
|
16400
|
-
/* @__PURE__ */ (0,
|
|
16401
|
-
(0,
|
|
16402
|
-
/* @__PURE__ */ (0,
|
|
16367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(StyledCardContent, { children: [
|
|
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,
|
|
16369
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(Stack, { gap: "space-02", children: [
|
|
16370
|
+
(0, import_type_guards61.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
16371
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
16403
16372
|
Stack,
|
|
16404
16373
|
{
|
|
16405
16374
|
gap: "space-01",
|
|
16406
|
-
style: (0,
|
|
16375
|
+
style: (0, import_type_guards61.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
|
|
16407
16376
|
children: [
|
|
16408
|
-
(0,
|
|
16409
|
-
(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)(
|
|
16410
16379
|
Text,
|
|
16411
16380
|
{
|
|
16412
16381
|
prominence: "secondary",
|
|
@@ -16429,16 +16398,16 @@ var RadioCardChildrenContainer = import_styled_components105.default.div`
|
|
|
16429
16398
|
`;
|
|
16430
16399
|
|
|
16431
16400
|
// src/components/RadioCard/RadioCard.tsx
|
|
16432
|
-
var
|
|
16401
|
+
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
16433
16402
|
var RadioCard = (0, import_react83.forwardRef)(
|
|
16434
16403
|
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
16435
|
-
return /* @__PURE__ */ (0,
|
|
16404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
16436
16405
|
RadioCardRoot,
|
|
16437
16406
|
{
|
|
16438
16407
|
ref,
|
|
16439
16408
|
padding: children != null ? "space-00" : "space-04",
|
|
16440
16409
|
...rootProps,
|
|
16441
|
-
children: children != null ? /* @__PURE__ */ (0,
|
|
16410
|
+
children: children != null ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
16442
16411
|
RadioCardDefaultLayout,
|
|
16443
16412
|
{
|
|
16444
16413
|
description,
|
|
@@ -16455,17 +16424,17 @@ RadioCard.displayName = "RadioCard_UI";
|
|
|
16455
16424
|
|
|
16456
16425
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
16457
16426
|
var import_react84 = require("react");
|
|
16458
|
-
var
|
|
16427
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
16459
16428
|
var RadioCardImage = (0, import_react84.forwardRef)(
|
|
16460
16429
|
({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
|
|
16461
|
-
return /* @__PURE__ */ (0,
|
|
16430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
16462
16431
|
RadioCardRoot,
|
|
16463
16432
|
{
|
|
16464
16433
|
ref,
|
|
16465
16434
|
...rootProps,
|
|
16466
16435
|
aspectRatio,
|
|
16467
16436
|
padding,
|
|
16468
|
-
children: /* @__PURE__ */ (0,
|
|
16437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
16469
16438
|
Image,
|
|
16470
16439
|
{
|
|
16471
16440
|
alt: label,
|
|
@@ -16485,7 +16454,7 @@ RadioCardImage.displayName = "RadioCardImage_UI";
|
|
|
16485
16454
|
var import_react85 = require("react");
|
|
16486
16455
|
var import_styled_components106 = __toESM(require("styled-components"));
|
|
16487
16456
|
var import_throttle_debounce2 = require("throttle-debounce");
|
|
16488
|
-
var
|
|
16457
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
16489
16458
|
var SHADOW_SIZE_PX = 8;
|
|
16490
16459
|
var Container10 = import_styled_components106.default.div`
|
|
16491
16460
|
overflow: hidden;
|
|
@@ -16565,12 +16534,12 @@ var ScrollArea = (0, import_react85.forwardRef)(
|
|
|
16565
16534
|
(0, import_react85.useEffect)(() => {
|
|
16566
16535
|
updateShadows();
|
|
16567
16536
|
}, [updateShadows]);
|
|
16568
|
-
return /* @__PURE__ */ (0,
|
|
16569
|
-
/* @__PURE__ */ (0,
|
|
16570
|
-
/* @__PURE__ */ (0,
|
|
16571
|
-
/* @__PURE__ */ (0,
|
|
16572
|
-
/* @__PURE__ */ (0,
|
|
16573
|
-
/* @__PURE__ */ (0,
|
|
16537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(Container10, { style, children: [
|
|
16538
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
16539
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
16540
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
16541
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
16542
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
16574
16543
|
ScrollContainer,
|
|
16575
16544
|
{
|
|
16576
16545
|
ref: scrollContainerRef,
|
|
@@ -16588,11 +16557,11 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
16588
16557
|
var import_react88 = require("react");
|
|
16589
16558
|
var import_styled_components108 = __toESM(require("styled-components"));
|
|
16590
16559
|
var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
|
|
16591
|
-
var
|
|
16560
|
+
var import_type_guards63 = require("@wistia/type-guards");
|
|
16592
16561
|
|
|
16593
16562
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
16594
16563
|
var import_react86 = require("react");
|
|
16595
|
-
var
|
|
16564
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
16596
16565
|
var SelectedItemStyleContext = (0, import_react86.createContext)(null);
|
|
16597
16566
|
var SelectedItemStyleProvider = ({
|
|
16598
16567
|
children
|
|
@@ -16613,7 +16582,7 @@ var SelectedItemStyleProvider = ({
|
|
|
16613
16582
|
}),
|
|
16614
16583
|
[selectedItemIndicatorStyle]
|
|
16615
16584
|
);
|
|
16616
|
-
return /* @__PURE__ */ (0,
|
|
16585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
16617
16586
|
};
|
|
16618
16587
|
var useSelectedItemStyle = () => {
|
|
16619
16588
|
const context = (0, import_react86.useContext)(SelectedItemStyleContext);
|
|
@@ -16625,7 +16594,7 @@ var useSelectedItemStyle = () => {
|
|
|
16625
16594
|
|
|
16626
16595
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16627
16596
|
var import_styled_components107 = __toESM(require("styled-components"));
|
|
16628
|
-
var
|
|
16597
|
+
var import_type_guards62 = require("@wistia/type-guards");
|
|
16629
16598
|
|
|
16630
16599
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
16631
16600
|
var import_react87 = require("react");
|
|
@@ -16640,7 +16609,7 @@ var useSegmentedControlValue = () => {
|
|
|
16640
16609
|
};
|
|
16641
16610
|
|
|
16642
16611
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16643
|
-
var
|
|
16612
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
16644
16613
|
var selectedItemIndicatorStyles = import_styled_components107.css`
|
|
16645
16614
|
background-color: var(--wui-color-bg-fill-white);
|
|
16646
16615
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -16659,10 +16628,10 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
|
|
|
16659
16628
|
var SelectedItemIndicator = () => {
|
|
16660
16629
|
const selectedValue = useSegmentedControlValue();
|
|
16661
16630
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
16662
|
-
if (!selectedValue || (0,
|
|
16631
|
+
if (!selectedValue || (0, import_type_guards62.isUndefined)(selectedItemIndicatorStyle)) {
|
|
16663
16632
|
return null;
|
|
16664
16633
|
}
|
|
16665
|
-
return /* @__PURE__ */ (0,
|
|
16634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
16666
16635
|
SelectedItemIndicatorDiv,
|
|
16667
16636
|
{
|
|
16668
16637
|
"data-wui-selected-item-indicator": true,
|
|
@@ -16672,7 +16641,7 @@ var SelectedItemIndicator = () => {
|
|
|
16672
16641
|
};
|
|
16673
16642
|
|
|
16674
16643
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
16675
|
-
var
|
|
16644
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
16676
16645
|
var segmentedControlStyles = import_styled_components108.css`
|
|
16677
16646
|
display: inline-flex;
|
|
16678
16647
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -16696,10 +16665,10 @@ var SegmentedControl = (0, import_react88.forwardRef)(
|
|
|
16696
16665
|
onSelectedValueChange,
|
|
16697
16666
|
...props
|
|
16698
16667
|
}, ref) => {
|
|
16699
|
-
if ((0,
|
|
16668
|
+
if ((0, import_type_guards63.isNil)(children)) {
|
|
16700
16669
|
return null;
|
|
16701
16670
|
}
|
|
16702
|
-
return /* @__PURE__ */ (0,
|
|
16671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
16703
16672
|
StyledSegmentedControl,
|
|
16704
16673
|
{
|
|
16705
16674
|
ref,
|
|
@@ -16711,9 +16680,9 @@ var SegmentedControl = (0, import_react88.forwardRef)(
|
|
|
16711
16680
|
type: "single",
|
|
16712
16681
|
value: selectedValue,
|
|
16713
16682
|
...props,
|
|
16714
|
-
children: /* @__PURE__ */ (0,
|
|
16683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(SelectedItemStyleProvider, { children: [
|
|
16715
16684
|
children,
|
|
16716
|
-
/* @__PURE__ */ (0,
|
|
16685
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(SelectedItemIndicator, {})
|
|
16717
16686
|
] }) })
|
|
16718
16687
|
}
|
|
16719
16688
|
);
|
|
@@ -16725,8 +16694,8 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
16725
16694
|
var import_react89 = require("react");
|
|
16726
16695
|
var import_styled_components109 = __toESM(require("styled-components"));
|
|
16727
16696
|
var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
|
|
16728
|
-
var
|
|
16729
|
-
var
|
|
16697
|
+
var import_type_guards64 = require("@wistia/type-guards");
|
|
16698
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
16730
16699
|
var segmentedControlItemStyles = import_styled_components109.css`
|
|
16731
16700
|
all: unset; /* ToggleGroupItem is a button element */
|
|
16732
16701
|
align-items: center;
|
|
@@ -16836,13 +16805,13 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
|
|
|
16836
16805
|
resizeObserver.disconnect();
|
|
16837
16806
|
};
|
|
16838
16807
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
16839
|
-
return /* @__PURE__ */ (0,
|
|
16808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
16840
16809
|
StyledSegmentedControlItem,
|
|
16841
16810
|
{
|
|
16842
16811
|
ref: combinedRef,
|
|
16843
16812
|
...otherProps,
|
|
16844
|
-
$hasLabel: (0,
|
|
16845
|
-
"aria-label": (0,
|
|
16813
|
+
$hasLabel: (0, import_type_guards64.isNotNil)(label),
|
|
16814
|
+
"aria-label": (0, import_type_guards64.isNotNil)(label) ? void 0 : ariaLabel,
|
|
16846
16815
|
disabled,
|
|
16847
16816
|
onClick: handleClick,
|
|
16848
16817
|
value,
|
|
@@ -16860,7 +16829,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem_UI";
|
|
|
16860
16829
|
var import_react_select = require("@radix-ui/react-select");
|
|
16861
16830
|
var import_react90 = require("react");
|
|
16862
16831
|
var import_styled_components110 = __toESM(require("styled-components"));
|
|
16863
|
-
var
|
|
16832
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
16864
16833
|
var StyledTrigger2 = (0, import_styled_components110.default)(import_react_select.Trigger)`
|
|
16865
16834
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16866
16835
|
${inputCss};
|
|
@@ -16949,8 +16918,8 @@ var Select = (0, import_react90.forwardRef)(
|
|
|
16949
16918
|
if (forceOpen) {
|
|
16950
16919
|
rootProps["open"] = true;
|
|
16951
16920
|
}
|
|
16952
|
-
return /* @__PURE__ */ (0,
|
|
16953
|
-
/* @__PURE__ */ (0,
|
|
16921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_react_select.Root, { ...rootProps, children: [
|
|
16922
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
|
|
16954
16923
|
StyledTrigger2,
|
|
16955
16924
|
{
|
|
16956
16925
|
ref: forwardedRef,
|
|
@@ -16958,8 +16927,8 @@ var Select = (0, import_react90.forwardRef)(
|
|
|
16958
16927
|
$fullWidth: responsiveFullWidth,
|
|
16959
16928
|
...props,
|
|
16960
16929
|
children: [
|
|
16961
|
-
/* @__PURE__ */ (0,
|
|
16962
|
-
/* @__PURE__ */ (0,
|
|
16930
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_react_select.Value, { placeholder }),
|
|
16931
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
16963
16932
|
Icon,
|
|
16964
16933
|
{
|
|
16965
16934
|
size: "md",
|
|
@@ -16969,10 +16938,10 @@ var Select = (0, import_react90.forwardRef)(
|
|
|
16969
16938
|
]
|
|
16970
16939
|
}
|
|
16971
16940
|
),
|
|
16972
|
-
/* @__PURE__ */ (0,
|
|
16973
|
-
/* @__PURE__ */ (0,
|
|
16974
|
-
/* @__PURE__ */ (0,
|
|
16975
|
-
/* @__PURE__ */ (0,
|
|
16941
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(StyledContent3, { position: "popper", children: [
|
|
16942
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(Icon, { type: "caret-up" }) }),
|
|
16943
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_react_select.Viewport, { children }),
|
|
16944
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(Icon, { type: "caret-down" }) })
|
|
16976
16945
|
] }) })
|
|
16977
16946
|
] });
|
|
16978
16947
|
}
|
|
@@ -16983,8 +16952,8 @@ Select.displayName = "Select_UI";
|
|
|
16983
16952
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
16984
16953
|
var import_react91 = require("react");
|
|
16985
16954
|
var import_styled_components111 = __toESM(require("styled-components"));
|
|
16986
|
-
var
|
|
16987
|
-
var
|
|
16955
|
+
var import_type_guards65 = require("@wistia/type-guards");
|
|
16956
|
+
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
16988
16957
|
var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
|
|
16989
16958
|
${getTypographicStyles("label3")}
|
|
16990
16959
|
display: flex;
|
|
@@ -17011,17 +16980,17 @@ var StyledItem = (0, import_styled_components111.default)(import_react_select2.I
|
|
|
17011
16980
|
`;
|
|
17012
16981
|
var SelectOption = (0, import_react91.forwardRef)(
|
|
17013
16982
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
17014
|
-
return /* @__PURE__ */ (0,
|
|
16983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(
|
|
17015
16984
|
StyledItem,
|
|
17016
16985
|
{
|
|
17017
16986
|
...props,
|
|
17018
16987
|
ref: forwardedRef,
|
|
17019
16988
|
children: [
|
|
17020
|
-
(0,
|
|
16989
|
+
(0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("div", { children: [
|
|
17021
16990
|
children,
|
|
17022
|
-
/* @__PURE__ */ (0,
|
|
17023
|
-
] }) : /* @__PURE__ */ (0,
|
|
17024
|
-
/* @__PURE__ */ (0,
|
|
16991
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
16992
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select2.ItemText, { children }),
|
|
16993
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
17025
16994
|
Icon,
|
|
17026
16995
|
{
|
|
17027
16996
|
size: "md",
|
|
@@ -17038,13 +17007,13 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
17038
17007
|
// src/components/Select/SelectOptionGroup.tsx
|
|
17039
17008
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
17040
17009
|
var import_styled_components112 = __toESM(require("styled-components"));
|
|
17041
|
-
var
|
|
17010
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
17042
17011
|
var StyledLabel4 = (0, import_styled_components112.default)(import_react_select3.Label)`
|
|
17043
17012
|
padding: var(--wui-select-option-padding);
|
|
17044
17013
|
`;
|
|
17045
17014
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
17046
|
-
return /* @__PURE__ */ (0,
|
|
17047
|
-
/* @__PURE__ */ (0,
|
|
17015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
17016
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
17048
17017
|
Heading,
|
|
17049
17018
|
{
|
|
17050
17019
|
renderAs: "span",
|
|
@@ -17059,8 +17028,8 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
17059
17028
|
// src/components/Slider/Slider.tsx
|
|
17060
17029
|
var import_react_slider2 = require("@radix-ui/react-slider");
|
|
17061
17030
|
var import_styled_components113 = __toESM(require("styled-components"));
|
|
17062
|
-
var
|
|
17063
|
-
var
|
|
17031
|
+
var import_type_guards66 = require("@wistia/type-guards");
|
|
17032
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
17064
17033
|
var SliderContainer = import_styled_components113.default.div`
|
|
17065
17034
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
17066
17035
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
@@ -17138,7 +17107,7 @@ var Slider = ({
|
|
|
17138
17107
|
"data-testid": dataTestId = "ui-slider",
|
|
17139
17108
|
...otherProps
|
|
17140
17109
|
}) => {
|
|
17141
|
-
if (!((0,
|
|
17110
|
+
if (!((0, import_type_guards66.isNonEmptyString)(ariaLabel) || (0, import_type_guards66.isNonEmptyString)(ariaLabelledby))) {
|
|
17142
17111
|
throw new Error(
|
|
17143
17112
|
"UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
|
|
17144
17113
|
);
|
|
@@ -17149,12 +17118,12 @@ var Slider = ({
|
|
|
17149
17118
|
onChange(newValue);
|
|
17150
17119
|
}
|
|
17151
17120
|
};
|
|
17152
|
-
return /* @__PURE__ */ (0,
|
|
17121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
17153
17122
|
SliderContainer,
|
|
17154
17123
|
{
|
|
17155
17124
|
...otherProps,
|
|
17156
17125
|
"data-testid": dataTestId,
|
|
17157
|
-
children: /* @__PURE__ */ (0,
|
|
17126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
|
|
17158
17127
|
StyledSliderRoot,
|
|
17159
17128
|
{
|
|
17160
17129
|
"aria-label": ariaLabel,
|
|
@@ -17167,8 +17136,8 @@ var Slider = ({
|
|
|
17167
17136
|
step,
|
|
17168
17137
|
...value ? { value } : {},
|
|
17169
17138
|
children: [
|
|
17170
|
-
/* @__PURE__ */ (0,
|
|
17171
|
-
values.map((_, index) => /* @__PURE__ */ (0,
|
|
17139
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
17140
|
+
values.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
17172
17141
|
StyledSliderThumb,
|
|
17173
17142
|
{
|
|
17174
17143
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -17185,7 +17154,7 @@ Slider.displayName = "Slider_UI";
|
|
|
17185
17154
|
|
|
17186
17155
|
// src/components/Table/Table.tsx
|
|
17187
17156
|
var import_styled_components114 = __toESM(require("styled-components"));
|
|
17188
|
-
var
|
|
17157
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
17189
17158
|
var StyledTable = import_styled_components114.default.table`
|
|
17190
17159
|
width: 100%;
|
|
17191
17160
|
border-collapse: collapse;
|
|
@@ -17215,7 +17184,7 @@ var Table = ({
|
|
|
17215
17184
|
visuallyHiddenHeader = false,
|
|
17216
17185
|
...props
|
|
17217
17186
|
}) => {
|
|
17218
|
-
return /* @__PURE__ */ (0,
|
|
17187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
17219
17188
|
StyledTable,
|
|
17220
17189
|
{
|
|
17221
17190
|
$divided: divided,
|
|
@@ -17236,16 +17205,16 @@ var import_react92 = require("react");
|
|
|
17236
17205
|
var TableSectionContext = (0, import_react92.createContext)(null);
|
|
17237
17206
|
|
|
17238
17207
|
// src/components/Table/TableBody.tsx
|
|
17239
|
-
var
|
|
17208
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
17240
17209
|
var StyledTableBody = import_styled_components115.default.tbody``;
|
|
17241
17210
|
var TableBody = ({ children, ...props }) => {
|
|
17242
|
-
return /* @__PURE__ */ (0,
|
|
17211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(StyledTableBody, { ...props, children }) });
|
|
17243
17212
|
};
|
|
17244
17213
|
|
|
17245
17214
|
// src/components/Table/TableCell.tsx
|
|
17246
17215
|
var import_react94 = require("react");
|
|
17247
17216
|
var import_styled_components116 = __toESM(require("styled-components"));
|
|
17248
|
-
var
|
|
17217
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
17249
17218
|
var sharedStyles = import_styled_components116.css`
|
|
17250
17219
|
color: var(--wui-color-text);
|
|
17251
17220
|
padding: var(--wui-space-02);
|
|
@@ -17266,41 +17235,41 @@ var StyledTd = import_styled_components116.default.td`
|
|
|
17266
17235
|
var TableCell = ({ children, ...props }) => {
|
|
17267
17236
|
const section = (0, import_react94.useContext)(TableSectionContext);
|
|
17268
17237
|
if (section === "head") {
|
|
17269
|
-
return /* @__PURE__ */ (0,
|
|
17238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(StyledTh, { ...props, children });
|
|
17270
17239
|
}
|
|
17271
|
-
return /* @__PURE__ */ (0,
|
|
17240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(StyledTd, { ...props, children });
|
|
17272
17241
|
};
|
|
17273
17242
|
|
|
17274
17243
|
// src/components/Table/TableFoot.tsx
|
|
17275
17244
|
var import_react95 = require("react");
|
|
17276
17245
|
var import_styled_components117 = __toESM(require("styled-components"));
|
|
17277
|
-
var
|
|
17246
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
17278
17247
|
var StyledTableFoot = import_styled_components117.default.tfoot``;
|
|
17279
17248
|
var TableFoot = ({ children, ...props }) => {
|
|
17280
|
-
return /* @__PURE__ */ (0,
|
|
17249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(StyledTableFoot, { ...props, children }) });
|
|
17281
17250
|
};
|
|
17282
17251
|
|
|
17283
17252
|
// src/components/Table/TableHead.tsx
|
|
17284
17253
|
var import_react96 = require("react");
|
|
17285
17254
|
var import_styled_components118 = __toESM(require("styled-components"));
|
|
17286
|
-
var
|
|
17255
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
17287
17256
|
var StyledThead = import_styled_components118.default.thead``;
|
|
17288
17257
|
var TableHead = ({ children, ...props }) => {
|
|
17289
|
-
return /* @__PURE__ */ (0,
|
|
17258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(StyledThead, { ...props, children }) });
|
|
17290
17259
|
};
|
|
17291
17260
|
|
|
17292
17261
|
// src/components/Table/TableRow.tsx
|
|
17293
17262
|
var import_styled_components119 = __toESM(require("styled-components"));
|
|
17294
|
-
var
|
|
17263
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
17295
17264
|
var StyledTableRow = import_styled_components119.default.tr``;
|
|
17296
17265
|
var TableRow = ({ children, ...props }) => {
|
|
17297
|
-
return /* @__PURE__ */ (0,
|
|
17266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(StyledTableRow, { ...props, children });
|
|
17298
17267
|
};
|
|
17299
17268
|
|
|
17300
17269
|
// src/components/Tabs/Tabs.tsx
|
|
17301
17270
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
17302
17271
|
var import_react98 = require("react");
|
|
17303
|
-
var
|
|
17272
|
+
var import_type_guards67 = require("@wistia/type-guards");
|
|
17304
17273
|
|
|
17305
17274
|
// src/components/Tabs/useTabsValue.tsx
|
|
17306
17275
|
var import_react97 = require("react");
|
|
@@ -17315,7 +17284,7 @@ var useTabsValue = () => {
|
|
|
17315
17284
|
};
|
|
17316
17285
|
|
|
17317
17286
|
// src/components/Tabs/Tabs.tsx
|
|
17318
|
-
var
|
|
17287
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
17319
17288
|
var Tabs = ({
|
|
17320
17289
|
children,
|
|
17321
17290
|
value: valueProp,
|
|
@@ -17337,21 +17306,21 @@ var Tabs = ({
|
|
|
17337
17306
|
...props,
|
|
17338
17307
|
onValueChange
|
|
17339
17308
|
};
|
|
17340
|
-
if ((0,
|
|
17309
|
+
if ((0, import_type_guards67.isNotNil)(value)) {
|
|
17341
17310
|
rootProps.value = value;
|
|
17342
17311
|
}
|
|
17343
|
-
if ((0,
|
|
17312
|
+
if ((0, import_type_guards67.isNotNil)(defaultValue)) {
|
|
17344
17313
|
rootProps.defaultValue = defaultValue;
|
|
17345
17314
|
}
|
|
17346
|
-
return /* @__PURE__ */ (0,
|
|
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 }) }) });
|
|
17347
17316
|
};
|
|
17348
17317
|
Tabs.displayName = "Tabs_UI";
|
|
17349
17318
|
|
|
17350
17319
|
// src/components/Tabs/TabsContent.tsx
|
|
17351
17320
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
17352
|
-
var
|
|
17321
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
17353
17322
|
var TabsContent = ({ children, value }) => {
|
|
17354
|
-
return /* @__PURE__ */ (0,
|
|
17323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(import_react_tabs2.Content, { value, children });
|
|
17355
17324
|
};
|
|
17356
17325
|
TabsContent.displayName = "TabsContent_UI";
|
|
17357
17326
|
|
|
@@ -17360,7 +17329,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
|
17360
17329
|
var import_styled_components121 = __toESM(require("styled-components"));
|
|
17361
17330
|
|
|
17362
17331
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17363
|
-
var
|
|
17332
|
+
var import_type_guards68 = require("@wistia/type-guards");
|
|
17364
17333
|
|
|
17365
17334
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
17366
17335
|
var import_styled_components120 = __toESM(require("styled-components"));
|
|
@@ -17371,14 +17340,14 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components120.default)(Sele
|
|
|
17371
17340
|
`;
|
|
17372
17341
|
|
|
17373
17342
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17374
|
-
var
|
|
17343
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
17375
17344
|
var SelectedTabIndicator = () => {
|
|
17376
17345
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
17377
17346
|
const selectedValue = useTabsValue();
|
|
17378
|
-
if (selectedValue == null || (0,
|
|
17347
|
+
if (selectedValue == null || (0, import_type_guards68.isUndefined)(selectedItemIndicatorStyle)) {
|
|
17379
17348
|
return null;
|
|
17380
17349
|
}
|
|
17381
|
-
return /* @__PURE__ */ (0,
|
|
17350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
17382
17351
|
TabsSelectedItemIndicatorDiv,
|
|
17383
17352
|
{
|
|
17384
17353
|
"data-wui-selected-item-indicator": true,
|
|
@@ -17388,19 +17357,19 @@ var SelectedTabIndicator = () => {
|
|
|
17388
17357
|
};
|
|
17389
17358
|
|
|
17390
17359
|
// src/components/Tabs/TabsList.tsx
|
|
17391
|
-
var
|
|
17360
|
+
var import_jsx_runtime320 = require("react/jsx-runtime");
|
|
17392
17361
|
var StyledRadixTabsList = (0, import_styled_components121.default)(import_react_tabs3.List)`
|
|
17393
17362
|
${segmentedControlStyles}
|
|
17394
17363
|
`;
|
|
17395
17364
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
17396
|
-
return /* @__PURE__ */ (0,
|
|
17365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)(
|
|
17397
17366
|
StyledRadixTabsList,
|
|
17398
17367
|
{
|
|
17399
17368
|
$fullWidth: fullWidth,
|
|
17400
17369
|
"aria-label": props["aria-label"],
|
|
17401
17370
|
children: [
|
|
17402
17371
|
children,
|
|
17403
|
-
/* @__PURE__ */ (0,
|
|
17372
|
+
/* @__PURE__ */ (0, import_jsx_runtime320.jsx)(SelectedTabIndicator, {})
|
|
17404
17373
|
]
|
|
17405
17374
|
}
|
|
17406
17375
|
);
|
|
@@ -17409,7 +17378,7 @@ TabsList.displayName = "TabsList_UI";
|
|
|
17409
17378
|
|
|
17410
17379
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17411
17380
|
var import_react99 = require("react");
|
|
17412
|
-
var
|
|
17381
|
+
var import_type_guards69 = require("@wistia/type-guards");
|
|
17413
17382
|
|
|
17414
17383
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
17415
17384
|
var import_styled_components122 = __toESM(require("styled-components"));
|
|
@@ -17423,7 +17392,7 @@ var StyledRadixTabsTrigger = (0, import_styled_components122.default)(import_rea
|
|
|
17423
17392
|
`;
|
|
17424
17393
|
|
|
17425
17394
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17426
|
-
var
|
|
17395
|
+
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
17427
17396
|
var TabsTrigger = (0, import_react99.forwardRef)(
|
|
17428
17397
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
17429
17398
|
const selectedValue = useTabsValue();
|
|
@@ -17455,13 +17424,13 @@ var TabsTrigger = (0, import_react99.forwardRef)(
|
|
|
17455
17424
|
resizeObserver.disconnect();
|
|
17456
17425
|
};
|
|
17457
17426
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
17458
|
-
return /* @__PURE__ */ (0,
|
|
17427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
|
|
17459
17428
|
StyledRadixTabsTrigger,
|
|
17460
17429
|
{
|
|
17461
17430
|
...otherProps,
|
|
17462
17431
|
ref: combinedRef,
|
|
17463
|
-
$hasLabel: (0,
|
|
17464
|
-
"aria-label": (0,
|
|
17432
|
+
$hasLabel: (0, import_type_guards69.isNotNil)(label),
|
|
17433
|
+
"aria-label": (0, import_type_guards69.isNotNil)(label) ? void 0 : ariaLabel,
|
|
17465
17434
|
disabled,
|
|
17466
17435
|
value,
|
|
17467
17436
|
children: [
|
|
@@ -17476,8 +17445,8 @@ TabsTrigger.displayName = "TabsTrigger_UI";
|
|
|
17476
17445
|
|
|
17477
17446
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
17478
17447
|
var import_styled_components123 = __toESM(require("styled-components"));
|
|
17479
|
-
var
|
|
17480
|
-
var
|
|
17448
|
+
var import_type_guards70 = require("@wistia/type-guards");
|
|
17449
|
+
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
17481
17450
|
var StyledThumbnailBadge = import_styled_components123.default.div`
|
|
17482
17451
|
align-items: center;
|
|
17483
17452
|
background-color: rgb(0 0 0 / 50%);
|
|
@@ -17504,9 +17473,9 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
|
|
|
17504
17473
|
}
|
|
17505
17474
|
`;
|
|
17506
17475
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
17507
|
-
return /* @__PURE__ */ (0,
|
|
17508
|
-
(0,
|
|
17509
|
-
/* @__PURE__ */ (0,
|
|
17476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(StyledThumbnailBadge, { ...props, children: [
|
|
17477
|
+
(0, import_type_guards70.isNotNil)(icon) && icon,
|
|
17478
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { children: label })
|
|
17510
17479
|
] });
|
|
17511
17480
|
};
|
|
17512
17481
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
@@ -17514,10 +17483,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
|
17514
17483
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17515
17484
|
var import_react100 = require("react");
|
|
17516
17485
|
var import_styled_components126 = __toESM(require("styled-components"));
|
|
17517
|
-
var
|
|
17486
|
+
var import_type_guards73 = require("@wistia/type-guards");
|
|
17518
17487
|
|
|
17519
17488
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17520
|
-
var
|
|
17489
|
+
var import_type_guards71 = require("@wistia/type-guards");
|
|
17521
17490
|
var import_styled_components124 = require("styled-components");
|
|
17522
17491
|
var gradients = {
|
|
17523
17492
|
defaultDarkOne: import_styled_components124.css`
|
|
@@ -17645,13 +17614,13 @@ var gradients = {
|
|
|
17645
17614
|
};
|
|
17646
17615
|
var gradientMap = Object.keys(gradients);
|
|
17647
17616
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
17648
|
-
return (0,
|
|
17617
|
+
return (0, import_type_guards71.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
17649
17618
|
};
|
|
17650
17619
|
|
|
17651
17620
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
17652
17621
|
var import_styled_components125 = __toESM(require("styled-components"));
|
|
17653
|
-
var
|
|
17654
|
-
var
|
|
17622
|
+
var import_type_guards72 = require("@wistia/type-guards");
|
|
17623
|
+
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
17655
17624
|
var ScrubLine = import_styled_components125.default.div`
|
|
17656
17625
|
position: absolute;
|
|
17657
17626
|
top: 0;
|
|
@@ -17744,8 +17713,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17744
17713
|
);
|
|
17745
17714
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
17746
17715
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
17747
|
-
const showScrubLine = (0,
|
|
17748
|
-
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";
|
|
17749
17718
|
const viewerStyles = {
|
|
17750
17719
|
position: "relative",
|
|
17751
17720
|
overflow: "hidden",
|
|
@@ -17763,14 +17732,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17763
17732
|
backgroundPosition,
|
|
17764
17733
|
backgroundSize
|
|
17765
17734
|
};
|
|
17766
|
-
return /* @__PURE__ */ (0,
|
|
17735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
17767
17736
|
"div",
|
|
17768
17737
|
{
|
|
17769
17738
|
...props,
|
|
17770
17739
|
style: viewerStyles,
|
|
17771
17740
|
children: [
|
|
17772
|
-
/* @__PURE__ */ (0,
|
|
17773
|
-
showScrubLine ? /* @__PURE__ */ (0,
|
|
17741
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { style: storyboardStyles }),
|
|
17742
|
+
showScrubLine ? /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
17774
17743
|
ScrubLine,
|
|
17775
17744
|
{
|
|
17776
17745
|
style: {
|
|
@@ -17784,7 +17753,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17784
17753
|
};
|
|
17785
17754
|
|
|
17786
17755
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17787
|
-
var
|
|
17756
|
+
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
17788
17757
|
var WideThumbnailImage = import_styled_components126.default.img`
|
|
17789
17758
|
height: 100%;
|
|
17790
17759
|
object-fit: cover;
|
|
@@ -17797,7 +17766,7 @@ var SquareThumbnailImage = import_styled_components126.default.img`
|
|
|
17797
17766
|
`;
|
|
17798
17767
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
17799
17768
|
if (thumbnailImageType === "wide") {
|
|
17800
|
-
return /* @__PURE__ */ (0,
|
|
17769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17801
17770
|
WideThumbnailImage,
|
|
17802
17771
|
{
|
|
17803
17772
|
alt: "",
|
|
@@ -17806,7 +17775,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17806
17775
|
}
|
|
17807
17776
|
);
|
|
17808
17777
|
}
|
|
17809
|
-
return /* @__PURE__ */ (0,
|
|
17778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17810
17779
|
SquareThumbnailImage,
|
|
17811
17780
|
{
|
|
17812
17781
|
alt: "",
|
|
@@ -17816,10 +17785,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17816
17785
|
);
|
|
17817
17786
|
};
|
|
17818
17787
|
var StyledThumbnail = import_styled_components126.default.div`
|
|
17819
|
-
background-image: ${({ $backgroundUrl }) => (0,
|
|
17788
|
+
background-image: ${({ $backgroundUrl }) => (0, import_type_guards73.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17820
17789
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17821
17790
|
// if we don't have $backgroundUrl show a gradient
|
|
17822
|
-
(0,
|
|
17791
|
+
(0, import_type_guards73.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
17823
17792
|
)};
|
|
17824
17793
|
background-position: center center;
|
|
17825
17794
|
background-size: cover;
|
|
@@ -17835,6 +17804,42 @@ var StyledThumbnail = import_styled_components126.default.div`
|
|
|
17835
17804
|
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
17836
17805
|
}
|
|
17837
17806
|
`;
|
|
17807
|
+
var StoryboardRenderer = ({
|
|
17808
|
+
storyboard,
|
|
17809
|
+
height,
|
|
17810
|
+
width,
|
|
17811
|
+
percent,
|
|
17812
|
+
cursorPosition,
|
|
17813
|
+
isStoryboardReady
|
|
17814
|
+
}) => {
|
|
17815
|
+
if (!storyboard || (0, import_type_guards73.isUndefined)(height) || (0, import_type_guards73.isEmptyString)(height)) return null;
|
|
17816
|
+
const {
|
|
17817
|
+
url,
|
|
17818
|
+
width: sbWidth,
|
|
17819
|
+
height: sbHeight,
|
|
17820
|
+
frameHeight,
|
|
17821
|
+
frameWidth,
|
|
17822
|
+
frameCount,
|
|
17823
|
+
aspectRatio
|
|
17824
|
+
} = storyboard;
|
|
17825
|
+
const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
17826
|
+
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17828
|
+
ThumbnailStoryboardViewer,
|
|
17829
|
+
{
|
|
17830
|
+
cursorPosition: effectiveCursorPosition,
|
|
17831
|
+
frameCount,
|
|
17832
|
+
frameHeight,
|
|
17833
|
+
frameWidth,
|
|
17834
|
+
percent,
|
|
17835
|
+
storyboardHeight: sbHeight,
|
|
17836
|
+
storyboardUrl: url,
|
|
17837
|
+
storyboardWidth: sbWidth,
|
|
17838
|
+
targetAspectRatio: aspectRatio,
|
|
17839
|
+
targetWidth
|
|
17840
|
+
}
|
|
17841
|
+
);
|
|
17842
|
+
};
|
|
17838
17843
|
var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
17839
17844
|
const rect = elem.getBoundingClientRect();
|
|
17840
17845
|
const relativeLeft = mouseEvent.clientX - rect.left;
|
|
@@ -17861,10 +17866,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17861
17866
|
const storyboardElementRef = (0, import_react100.useRef)(null);
|
|
17862
17867
|
const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
|
|
17863
17868
|
const backgroundUrl = (0, import_react100.useMemo)(
|
|
17864
|
-
() => thumbnailImageType === "square" && (0,
|
|
17869
|
+
() => thumbnailImageType === "square" && (0, import_type_guards73.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
17865
17870
|
[thumbnailImageType, thumbnailUrl]
|
|
17866
17871
|
);
|
|
17867
|
-
const isScrubbable = (0,
|
|
17872
|
+
const isScrubbable = (0, import_type_guards73.isNotNil)(storyboard);
|
|
17868
17873
|
const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
|
|
17869
17874
|
if (storyboardElementRef.current || !storyboard) {
|
|
17870
17875
|
return storyboardElementRef.current;
|
|
@@ -17896,40 +17901,21 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17896
17901
|
const shouldRenderStoryboard = (0, import_react100.useMemo)(() => {
|
|
17897
17902
|
return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
|
|
17898
17903
|
}, [isScrubbable, isMouseOver, isStoryboardReady]);
|
|
17899
|
-
|
|
17900
|
-
|
|
17901
|
-
|
|
17902
|
-
|
|
17903
|
-
width: sbWidth,
|
|
17904
|
-
height: sbHeight,
|
|
17905
|
-
frameHeight,
|
|
17906
|
-
frameWidth,
|
|
17907
|
-
frameCount,
|
|
17908
|
-
aspectRatio
|
|
17909
|
-
} = storyboard;
|
|
17910
|
-
const targetWidth = (0, import_type_guards72.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
17911
|
-
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17912
|
-
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17913
|
-
ThumbnailStoryboardViewer,
|
|
17904
|
+
let thumbnailContent = null;
|
|
17905
|
+
if (shouldRenderStoryboard) {
|
|
17906
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17907
|
+
StoryboardRenderer,
|
|
17914
17908
|
{
|
|
17915
|
-
cursorPosition
|
|
17916
|
-
|
|
17917
|
-
|
|
17918
|
-
frameWidth,
|
|
17909
|
+
cursorPosition,
|
|
17910
|
+
height,
|
|
17911
|
+
isStoryboardReady,
|
|
17919
17912
|
percent,
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
storyboardWidth: sbWidth,
|
|
17923
|
-
targetAspectRatio: aspectRatio,
|
|
17924
|
-
targetWidth
|
|
17913
|
+
storyboard,
|
|
17914
|
+
width
|
|
17925
17915
|
}
|
|
17926
17916
|
);
|
|
17927
|
-
}
|
|
17928
|
-
|
|
17929
|
-
if (shouldRenderStoryboard) {
|
|
17930
|
-
thumbnailContent = renderStoryboard();
|
|
17931
|
-
} else if ((0, import_type_guards72.isNotNil)(thumbnailUrl)) {
|
|
17932
|
-
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17917
|
+
} else if ((0, import_type_guards73.isNotNil)(thumbnailUrl)) {
|
|
17918
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17933
17919
|
ThumbnailImage,
|
|
17934
17920
|
{
|
|
17935
17921
|
thumbnailImageType,
|
|
@@ -17939,7 +17925,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17939
17925
|
} else {
|
|
17940
17926
|
thumbnailContent = null;
|
|
17941
17927
|
}
|
|
17942
|
-
return /* @__PURE__ */ (0,
|
|
17928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
|
|
17943
17929
|
StyledThumbnail,
|
|
17944
17930
|
{
|
|
17945
17931
|
ref,
|
|
@@ -17953,7 +17939,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17953
17939
|
onMouseOut: handleMouseOut,
|
|
17954
17940
|
role: "presentation",
|
|
17955
17941
|
children: [
|
|
17956
|
-
(0,
|
|
17942
|
+
(0, import_type_guards73.isNotNil)(children) ? children : null,
|
|
17957
17943
|
thumbnailContent
|
|
17958
17944
|
]
|
|
17959
17945
|
}
|
|
@@ -17965,8 +17951,8 @@ Thumbnail.displayName = "Thumbnail_UI";
|
|
|
17965
17951
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
17966
17952
|
var import_react101 = __toESM(require("react"));
|
|
17967
17953
|
var import_styled_components127 = __toESM(require("styled-components"));
|
|
17968
|
-
var
|
|
17969
|
-
var
|
|
17954
|
+
var import_type_guards74 = require("@wistia/type-guards");
|
|
17955
|
+
var import_jsx_runtime325 = (
|
|
17970
17956
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
17971
17957
|
require("react/jsx-runtime")
|
|
17972
17958
|
);
|
|
@@ -18045,13 +18031,13 @@ var ThumbnailCollage = ({
|
|
|
18045
18031
|
}) => {
|
|
18046
18032
|
const thumbnailArray = import_react101.default.Children.toArray(children);
|
|
18047
18033
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
18048
|
-
const thumbnails = (0,
|
|
18034
|
+
const thumbnails = (0, import_type_guards74.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
18049
18035
|
return import_react101.default.cloneElement(child, {
|
|
18050
18036
|
...child.props,
|
|
18051
18037
|
children: void 0
|
|
18052
18038
|
});
|
|
18053
18039
|
}) : [
|
|
18054
|
-
/* @__PURE__ */ (0,
|
|
18040
|
+
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
18055
18041
|
Thumbnail,
|
|
18056
18042
|
{
|
|
18057
18043
|
gradientBackground,
|
|
@@ -18060,7 +18046,7 @@ var ThumbnailCollage = ({
|
|
|
18060
18046
|
"fallback"
|
|
18061
18047
|
)
|
|
18062
18048
|
];
|
|
18063
|
-
return /* @__PURE__ */ (0,
|
|
18049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
18064
18050
|
StyledThumbnailCollage,
|
|
18065
18051
|
{
|
|
18066
18052
|
$gradientBackground: gradientBackground,
|
|
@@ -18073,25 +18059,25 @@ var ThumbnailCollage = ({
|
|
|
18073
18059
|
|
|
18074
18060
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
18075
18061
|
var import_styled_components128 = __toESM(require("styled-components"));
|
|
18076
|
-
var
|
|
18077
|
-
var
|
|
18062
|
+
var import_type_guards75 = require("@wistia/type-guards");
|
|
18063
|
+
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
18078
18064
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
18079
18065
|
if (iconOnly) {
|
|
18080
|
-
return /* @__PURE__ */ (0,
|
|
18066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
18081
18067
|
"g",
|
|
18082
18068
|
{
|
|
18083
18069
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
18084
18070
|
fill: brandmarkColor,
|
|
18085
|
-
children: /* @__PURE__ */ (0,
|
|
18071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("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" })
|
|
18086
18072
|
}
|
|
18087
18073
|
);
|
|
18088
18074
|
}
|
|
18089
|
-
return /* @__PURE__ */ (0,
|
|
18075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
18090
18076
|
"g",
|
|
18091
18077
|
{
|
|
18092
18078
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
18093
18079
|
fill: brandmarkColor,
|
|
18094
|
-
children: /* @__PURE__ */ (0,
|
|
18080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("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" })
|
|
18095
18081
|
}
|
|
18096
18082
|
);
|
|
18097
18083
|
};
|
|
@@ -18099,12 +18085,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
18099
18085
|
if (iconOnly) {
|
|
18100
18086
|
return null;
|
|
18101
18087
|
}
|
|
18102
|
-
return /* @__PURE__ */ (0,
|
|
18088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
18103
18089
|
"g",
|
|
18104
18090
|
{
|
|
18105
18091
|
"data-testid": "ui-wistia-logo-logotype",
|
|
18106
18092
|
fill: logotypeColor,
|
|
18107
|
-
children: /* @__PURE__ */ (0,
|
|
18093
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("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" })
|
|
18108
18094
|
}
|
|
18109
18095
|
);
|
|
18110
18096
|
};
|
|
@@ -18172,7 +18158,7 @@ var WistiaLogo = ({
|
|
|
18172
18158
|
};
|
|
18173
18159
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
18174
18160
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
18175
|
-
const Logo = /* @__PURE__ */ (0,
|
|
18161
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
|
|
18176
18162
|
WistiaLogoComponent,
|
|
18177
18163
|
{
|
|
18178
18164
|
$hoverColor: hoverColor,
|
|
@@ -18185,21 +18171,21 @@ var WistiaLogo = ({
|
|
|
18185
18171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18186
18172
|
...props,
|
|
18187
18173
|
children: [
|
|
18188
|
-
/* @__PURE__ */ (0,
|
|
18189
|
-
(0,
|
|
18174
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)("title", { children: title }),
|
|
18175
|
+
(0, import_type_guards75.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("desc", { children: description }) : null,
|
|
18190
18176
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
18191
18177
|
renderLogotype(logotypeColor, iconOnly)
|
|
18192
18178
|
]
|
|
18193
18179
|
}
|
|
18194
18180
|
);
|
|
18195
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
18181
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("a", { href, children: Logo }) : Logo;
|
|
18196
18182
|
};
|
|
18197
18183
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
18198
18184
|
|
|
18199
18185
|
// src/components/SplitButton/SplitButton.tsx
|
|
18200
18186
|
var import_styled_components129 = __toESM(require("styled-components"));
|
|
18201
|
-
var
|
|
18202
|
-
var
|
|
18187
|
+
var import_type_guards76 = require("@wistia/type-guards");
|
|
18188
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
18203
18189
|
var StyledSplitButton = import_styled_components129.default.span`
|
|
18204
18190
|
white-space: nowrap;
|
|
18205
18191
|
|
|
@@ -18217,7 +18203,7 @@ var StyledSplitButton = import_styled_components129.default.span`
|
|
|
18217
18203
|
var SplitButton = ({
|
|
18218
18204
|
children,
|
|
18219
18205
|
menuLabel = "Select an option",
|
|
18220
|
-
menuIcon = /* @__PURE__ */ (0,
|
|
18206
|
+
menuIcon = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(Icon, { type: "caret-down" }),
|
|
18221
18207
|
menuItems,
|
|
18222
18208
|
disabled = false,
|
|
18223
18209
|
colorScheme = "default",
|
|
@@ -18228,8 +18214,8 @@ var SplitButton = ({
|
|
|
18228
18214
|
menuProps = {},
|
|
18229
18215
|
...props
|
|
18230
18216
|
}) => {
|
|
18231
|
-
return /* @__PURE__ */ (0,
|
|
18232
|
-
/* @__PURE__ */ (0,
|
|
18217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(StyledSplitButton, { children: [
|
|
18218
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18233
18219
|
Button,
|
|
18234
18220
|
{
|
|
18235
18221
|
colorScheme,
|
|
@@ -18241,12 +18227,12 @@ var SplitButton = ({
|
|
|
18241
18227
|
children
|
|
18242
18228
|
}
|
|
18243
18229
|
),
|
|
18244
|
-
(0,
|
|
18230
|
+
(0, import_type_guards76.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18245
18231
|
Menu,
|
|
18246
18232
|
{
|
|
18247
18233
|
...menuProps,
|
|
18248
18234
|
disabled,
|
|
18249
|
-
trigger: /* @__PURE__ */ (0,
|
|
18235
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18250
18236
|
IconButton,
|
|
18251
18237
|
{
|
|
18252
18238
|
colorScheme,
|
|
@@ -18261,7 +18247,7 @@ var SplitButton = ({
|
|
|
18261
18247
|
children: menuItems
|
|
18262
18248
|
}
|
|
18263
18249
|
),
|
|
18264
|
-
(0,
|
|
18250
|
+
(0, import_type_guards76.isNotNil)(secondaryAction) && secondaryAction
|
|
18265
18251
|
] });
|
|
18266
18252
|
};
|
|
18267
18253
|
SplitButton.displayName = "SplitButton_UI";
|
|
@@ -18353,8 +18339,6 @@ SplitButton.displayName = "SplitButton_UI";
|
|
|
18353
18339
|
MenuLabel,
|
|
18354
18340
|
MenuRadioGroup,
|
|
18355
18341
|
Modal,
|
|
18356
|
-
ModalValueProp,
|
|
18357
|
-
ModalValueProps,
|
|
18358
18342
|
PersistentFileAmountLimitValidator,
|
|
18359
18343
|
Popover,
|
|
18360
18344
|
ProgressBar,
|