@wistia/ui 0.14.41 → 0.15.0-beta.0f9ac4fd.ea0a755
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 +350 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +36 -5
- package/dist/index.d.ts +36 -5
- package/dist/index.mjs +236 -177
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.
|
|
3
|
+
* @license @wistia/ui v0.15.0-beta.0f9ac4fd.ea0a755
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -125,6 +125,8 @@ __export(index_exports, {
|
|
|
125
125
|
MenuLabel: () => MenuLabel,
|
|
126
126
|
MenuRadioGroup: () => MenuRadioGroup,
|
|
127
127
|
Modal: () => Modal,
|
|
128
|
+
ModalCallout: () => ModalCallout,
|
|
129
|
+
ModalCallouts: () => ModalCallouts,
|
|
128
130
|
PersistentFileAmountLimitValidator: () => import_validators.PersistentFileAmountLimitValidator,
|
|
129
131
|
Popover: () => Popover,
|
|
130
132
|
ProgressBar: () => ProgressBar,
|
|
@@ -7706,7 +7708,7 @@ Icon.displayName = "Icon_UI";
|
|
|
7706
7708
|
// src/components/Link/Link.tsx
|
|
7707
7709
|
var import_react22 = require("react");
|
|
7708
7710
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
7709
|
-
var
|
|
7711
|
+
var import_react_router = require("react-router");
|
|
7710
7712
|
var import_type_guards14 = require("@wistia/type-guards");
|
|
7711
7713
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7712
7714
|
var generateHref = (href, type, disabled) => {
|
|
@@ -7761,7 +7763,7 @@ var Link = (0, import_react22.forwardRef)(
|
|
|
7761
7763
|
role,
|
|
7762
7764
|
...props
|
|
7763
7765
|
}, ref) => {
|
|
7764
|
-
const inRouterContext = (0,
|
|
7766
|
+
const inRouterContext = (0, import_react_router.useInRouterContext)();
|
|
7765
7767
|
const to = generateHref(props.href, type, disabled);
|
|
7766
7768
|
const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
|
|
7767
7769
|
const handleClick = async (event) => {
|
|
@@ -7813,7 +7815,7 @@ var Link = (0, import_react22.forwardRef)(
|
|
|
7813
7815
|
const routerSpecificProps = shouldUseReactRouterLink ? {
|
|
7814
7816
|
// TODO: Using 'any' here due to styled-components typing limitations with RouterLink
|
|
7815
7817
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
|
7816
|
-
as:
|
|
7818
|
+
as: import_react_router.Link,
|
|
7817
7819
|
to: to ?? ""
|
|
7818
7820
|
} : {
|
|
7819
7821
|
as: "a",
|
|
@@ -12489,6 +12491,7 @@ var Ariakit = __toESM(require("@ariakit/react"));
|
|
|
12489
12491
|
var import_react54 = require("react");
|
|
12490
12492
|
var import_match_sorter = require("match-sorter");
|
|
12491
12493
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
12494
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
12492
12495
|
|
|
12493
12496
|
// src/components/Tag/Tag.tsx
|
|
12494
12497
|
var import_react53 = require("react");
|
|
@@ -12808,10 +12811,10 @@ var extractOptions = (children) => {
|
|
|
12808
12811
|
return options;
|
|
12809
12812
|
};
|
|
12810
12813
|
var defaultDisplayValues = (values, onRemove) => {
|
|
12811
|
-
|
|
12814
|
+
const valueArray = Array.isArray(values) ? values : [values];
|
|
12815
|
+
return valueArray.map((selectedValue) => /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
12812
12816
|
Tag,
|
|
12813
12817
|
{
|
|
12814
|
-
href: "https://example.com",
|
|
12815
12818
|
label: selectedValue,
|
|
12816
12819
|
onClickRemove: () => onRemove(selectedValue),
|
|
12817
12820
|
onClickRemoveLabel: `Remove ${selectedValue}`
|
|
@@ -12849,7 +12852,11 @@ var Combobox2 = ({
|
|
|
12849
12852
|
return () => null;
|
|
12850
12853
|
}, []);
|
|
12851
12854
|
const handleRemoveValue = (valueToRemove) => {
|
|
12852
|
-
|
|
12855
|
+
if ((0, import_type_guards37.isString)(value)) {
|
|
12856
|
+
onChange("");
|
|
12857
|
+
return;
|
|
12858
|
+
}
|
|
12859
|
+
onChange(typeof value === "string" ? "" : value.filter((val) => val !== valueToRemove));
|
|
12853
12860
|
};
|
|
12854
12861
|
const matches = (0, import_react54.useMemo)(() => {
|
|
12855
12862
|
return (0, import_match_sorter.matchSorter)(Object.keys(options), searchValue);
|
|
@@ -12923,12 +12930,12 @@ var Combobox2 = ({
|
|
|
12923
12930
|
};
|
|
12924
12931
|
|
|
12925
12932
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
12926
|
-
var
|
|
12933
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
12927
12934
|
var import_react61 = require("react");
|
|
12928
12935
|
|
|
12929
12936
|
// src/components/Menu/Menu.tsx
|
|
12930
12937
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
12931
|
-
var
|
|
12938
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
12932
12939
|
var import_react56 = require("react");
|
|
12933
12940
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
12934
12941
|
|
|
@@ -13043,7 +13050,7 @@ var Menu = (0, import_react56.forwardRef)(
|
|
|
13043
13050
|
}, ref) => {
|
|
13044
13051
|
const contextValue = (0, import_react56.useMemo)(() => ({ compact }), [compact]);
|
|
13045
13052
|
let controlProps = {
|
|
13046
|
-
...(0,
|
|
13053
|
+
...(0, import_type_guards38.isNotNil)(onOpenChange) && (0, import_type_guards38.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
13047
13054
|
};
|
|
13048
13055
|
if (disabled) {
|
|
13049
13056
|
controlProps = {
|
|
@@ -13057,7 +13064,7 @@ var Menu = (0, import_react56.forwardRef)(
|
|
|
13057
13064
|
modal: false,
|
|
13058
13065
|
...controlProps,
|
|
13059
13066
|
children: [
|
|
13060
|
-
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0,
|
|
13067
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards38.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
13061
13068
|
Button,
|
|
13062
13069
|
{
|
|
13063
13070
|
ref,
|
|
@@ -13123,12 +13130,12 @@ MenuLabel.displayName = "MenuLabel_UI";
|
|
|
13123
13130
|
var import_react58 = require("react");
|
|
13124
13131
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
13125
13132
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
13126
|
-
var
|
|
13133
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
13127
13134
|
|
|
13128
13135
|
// src/components/Menu/MenuItemButton.tsx
|
|
13129
13136
|
var import_react57 = require("react");
|
|
13130
13137
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
13131
|
-
var
|
|
13138
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
13132
13139
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
13133
13140
|
var StyledButton3 = (0, import_styled_components72.default)(Button)`
|
|
13134
13141
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
@@ -13208,7 +13215,7 @@ var StyledBadgeContainer = import_styled_components72.default.div`
|
|
|
13208
13215
|
var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
13209
13216
|
let { colorScheme, badge } = props;
|
|
13210
13217
|
if (appearance === "dangerous") {
|
|
13211
|
-
if ((0,
|
|
13218
|
+
if ((0, import_type_guards39.isNotUndefined)(colorScheme)) {
|
|
13212
13219
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
13213
13220
|
}
|
|
13214
13221
|
colorScheme = "error";
|
|
@@ -13236,10 +13243,10 @@ var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, com
|
|
|
13236
13243
|
fullWidth: true,
|
|
13237
13244
|
unstyled: true,
|
|
13238
13245
|
children: [
|
|
13239
|
-
(0,
|
|
13246
|
+
(0, import_type_guards39.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
13240
13247
|
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
13241
|
-
(0,
|
|
13242
|
-
(0,
|
|
13248
|
+
(0, import_type_guards39.isNotNil)(badge) || (0, import_type_guards39.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
13249
|
+
(0, import_type_guards39.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
13243
13250
|
]
|
|
13244
13251
|
}
|
|
13245
13252
|
);
|
|
@@ -13310,7 +13317,7 @@ var SubMenu = ({
|
|
|
13310
13317
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
13311
13318
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
13312
13319
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(MenuItemLabel, { children: label }),
|
|
13313
|
-
(0,
|
|
13320
|
+
(0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(MenuItemDescription, { children: description }) : null
|
|
13314
13321
|
] }),
|
|
13315
13322
|
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
13316
13323
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
@@ -13402,7 +13409,7 @@ RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
|
13402
13409
|
|
|
13403
13410
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
13404
13411
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
13405
|
-
var
|
|
13412
|
+
var import_type_guards41 = require("@wistia/type-guards");
|
|
13406
13413
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
13407
13414
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
13408
13415
|
return checked ? /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
@@ -13476,8 +13483,8 @@ var CheckboxMenuItem = ({
|
|
|
13476
13483
|
MenuItemButton,
|
|
13477
13484
|
{
|
|
13478
13485
|
...props,
|
|
13479
|
-
leftIcon: (0,
|
|
13480
|
-
rightIcon: (0,
|
|
13486
|
+
leftIcon: (0, import_type_guards41.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(CheckboxIndicator, { checked }),
|
|
13487
|
+
rightIcon: (0, import_type_guards41.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Icon, { type: "checkmark" }) }) : void 0
|
|
13481
13488
|
}
|
|
13482
13489
|
)
|
|
13483
13490
|
}
|
|
@@ -13599,7 +13606,7 @@ var ContextMenu = ({
|
|
|
13599
13606
|
const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
|
|
13600
13607
|
const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
|
|
13601
13608
|
(0, import_react61.useEffect)(() => {
|
|
13602
|
-
if ((0,
|
|
13609
|
+
if ((0, import_type_guards42.isNil)(position)) {
|
|
13603
13610
|
const onContextMenu = (event) => {
|
|
13604
13611
|
event.preventDefault();
|
|
13605
13612
|
setMenuPosition({ x: event.clientX, y: event.clientY });
|
|
@@ -13613,7 +13620,7 @@ var ContextMenu = ({
|
|
|
13613
13620
|
}
|
|
13614
13621
|
return () => null;
|
|
13615
13622
|
}, [position, triggerRef]);
|
|
13616
|
-
const isOpen = (0,
|
|
13623
|
+
const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
|
|
13617
13624
|
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13618
13625
|
Menu,
|
|
13619
13626
|
{
|
|
@@ -13648,7 +13655,7 @@ var ContextMenu = ({
|
|
|
13648
13655
|
// src/components/DataCards/DataCard.tsx
|
|
13649
13656
|
var import_react62 = require("react");
|
|
13650
13657
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
13651
|
-
var
|
|
13658
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
13652
13659
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
13653
13660
|
var StyledDataCard = import_styled_components75.default.div`
|
|
13654
13661
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
@@ -13802,8 +13809,8 @@ var DataCardInner = ({
|
|
|
13802
13809
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledLoadingValue, {}) : value
|
|
13803
13810
|
}
|
|
13804
13811
|
),
|
|
13805
|
-
(0,
|
|
13806
|
-
(0,
|
|
13812
|
+
(0, import_type_guards43.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
13813
|
+
(0, import_type_guards43.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13807
13814
|
StyledSubtitle,
|
|
13808
13815
|
{
|
|
13809
13816
|
"data-wui-data-card-subtitle": true,
|
|
@@ -13811,13 +13818,13 @@ var DataCardInner = ({
|
|
|
13811
13818
|
children: subtitle
|
|
13812
13819
|
}
|
|
13813
13820
|
),
|
|
13814
|
-
(0,
|
|
13821
|
+
(0, import_type_guards43.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
13815
13822
|
]
|
|
13816
13823
|
}
|
|
13817
13824
|
);
|
|
13818
13825
|
var DataCard = (props) => {
|
|
13819
13826
|
const ref = (0, import_react62.useRef)(null);
|
|
13820
|
-
if ((0,
|
|
13827
|
+
if ((0, import_type_guards43.isNotNil)(props.href) || (0, import_type_guards43.isNotNil)(props.onClick)) {
|
|
13821
13828
|
const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
|
|
13822
13829
|
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13823
13830
|
DataCardInner,
|
|
@@ -13828,8 +13835,8 @@ var DataCard = (props) => {
|
|
|
13828
13835
|
Button,
|
|
13829
13836
|
{
|
|
13830
13837
|
ref,
|
|
13831
|
-
...(0,
|
|
13832
|
-
...(0,
|
|
13838
|
+
...(0, import_type_guards43.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
|
|
13839
|
+
...(0, import_type_guards43.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
|
|
13833
13840
|
"aria-pressed": ariaPressed,
|
|
13834
13841
|
disabled: props.disabled ?? false,
|
|
13835
13842
|
href: props.href,
|
|
@@ -14197,11 +14204,11 @@ var EditableHeading = ({
|
|
|
14197
14204
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
14198
14205
|
var import_react65 = require("react");
|
|
14199
14206
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
14200
|
-
var
|
|
14207
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
14201
14208
|
|
|
14202
14209
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
14203
14210
|
var import_react64 = require("react");
|
|
14204
|
-
var
|
|
14211
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
14205
14212
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
14206
14213
|
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
14207
14214
|
var StyledEditableTextRoot = import_styled_components82.default.div`
|
|
@@ -14236,7 +14243,7 @@ var EditableTextRoot = ({
|
|
|
14236
14243
|
const [isEditing, setIsEditing] = (0, import_react64.useState)(false);
|
|
14237
14244
|
const value = isControlled ? controlledValue : internalValue;
|
|
14238
14245
|
const generatedId = (0, import_react64.useId)();
|
|
14239
|
-
const computedId = (0,
|
|
14246
|
+
const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
14240
14247
|
const handleSetIsEditing = (0, import_react64.useCallback)(
|
|
14241
14248
|
(editing) => {
|
|
14242
14249
|
if (editing && !isEditing) {
|
|
@@ -14323,7 +14330,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
|
|
|
14323
14330
|
margin: 0;
|
|
14324
14331
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
14325
14332
|
${({ $maxLines }) => {
|
|
14326
|
-
if ((0,
|
|
14333
|
+
if ((0, import_type_guards45.isNotNil)($maxLines)) {
|
|
14327
14334
|
return import_styled_components83.css`
|
|
14328
14335
|
${ellipsisStyle};
|
|
14329
14336
|
${lineClampCss($maxLines)};
|
|
@@ -14331,7 +14338,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
|
|
|
14331
14338
|
}
|
|
14332
14339
|
return void 0;
|
|
14333
14340
|
}}
|
|
14334
|
-
${({ $minLines }) => (0,
|
|
14341
|
+
${({ $minLines }) => (0, import_type_guards45.isNotNil)($minLines) && import_styled_components83.css`
|
|
14335
14342
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14336
14343
|
`}
|
|
14337
14344
|
word-break: break-word;
|
|
@@ -14418,12 +14425,12 @@ var EditableTextDisplay = makePolymorphic(
|
|
|
14418
14425
|
// src/components/EditableText/EditableTextInput.tsx
|
|
14419
14426
|
var import_react66 = require("react");
|
|
14420
14427
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
14421
|
-
var
|
|
14428
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
14422
14429
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
14423
14430
|
var StyledInput2 = (0, import_styled_components84.default)(Input)`
|
|
14424
14431
|
&& {
|
|
14425
|
-
${({ $minLines }) => (0,
|
|
14426
|
-
${({ $maxLines }) => (0,
|
|
14432
|
+
${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
|
|
14433
|
+
${({ $maxLines }) => (0, import_type_guards46.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
|
|
14427
14434
|
${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
|
|
14428
14435
|
background-color: var(--wui-color-bg-surface);
|
|
14429
14436
|
border-radius: var(--wui-editable-text-border-radius);
|
|
@@ -14680,7 +14687,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
14680
14687
|
|
|
14681
14688
|
// src/components/Form/FormErrorSummary.tsx
|
|
14682
14689
|
var import_react72 = require("react");
|
|
14683
|
-
var
|
|
14690
|
+
var import_type_guards47 = require("@wistia/type-guards");
|
|
14684
14691
|
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
14685
14692
|
var ErrorItem = ({ name, error, formId }) => {
|
|
14686
14693
|
return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
@@ -14694,8 +14701,8 @@ var FormErrorSummary = ({ description }) => {
|
|
|
14694
14701
|
}
|
|
14695
14702
|
return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)("div", { ref, children: [
|
|
14696
14703
|
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("p", { children: description }),
|
|
14697
|
-
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0,
|
|
14698
|
-
([name, error]) => (0,
|
|
14704
|
+
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards47.isNotUndefined)(error)).map(
|
|
14705
|
+
([name, error]) => (0, import_type_guards47.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
|
|
14699
14706
|
ErrorItem,
|
|
14700
14707
|
{
|
|
14701
14708
|
error: err,
|
|
@@ -14719,7 +14726,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
14719
14726
|
// src/components/FormField/FormField.tsx
|
|
14720
14727
|
var import_react73 = require("react");
|
|
14721
14728
|
var import_styled_components85 = __toESM(require("styled-components"));
|
|
14722
|
-
var
|
|
14729
|
+
var import_type_guards48 = require("@wistia/type-guards");
|
|
14723
14730
|
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
14724
14731
|
var StyledFormField = import_styled_components85.default.div`
|
|
14725
14732
|
--form-field-spacing: var(--wui-space-01);
|
|
@@ -14760,7 +14767,7 @@ var StyledErrorList = import_styled_components85.default.ul`
|
|
|
14760
14767
|
gap: var(--wui-space-01);
|
|
14761
14768
|
`;
|
|
14762
14769
|
var ErrorMessages = ({ errors, id }) => {
|
|
14763
|
-
const isErrorArray = (0,
|
|
14770
|
+
const isErrorArray = (0, import_type_guards48.isArray)(errors);
|
|
14764
14771
|
const isMultipleErrors = isErrorArray && errors.length > 1;
|
|
14765
14772
|
if (!isErrorArray) {
|
|
14766
14773
|
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
@@ -14828,19 +14835,19 @@ var FormField = ({
|
|
|
14828
14835
|
"aria-describedby": ariaDescribedby,
|
|
14829
14836
|
...props
|
|
14830
14837
|
};
|
|
14831
|
-
if ((0,
|
|
14838
|
+
if ((0, import_type_guards48.isUndefined)(value) && (0, import_type_guards48.isNotUndefined)(defaultValue)) {
|
|
14832
14839
|
childProps = {
|
|
14833
14840
|
...childProps,
|
|
14834
14841
|
defaultValue
|
|
14835
14842
|
};
|
|
14836
14843
|
}
|
|
14837
|
-
if ((0,
|
|
14838
|
-
const computedName = (0,
|
|
14844
|
+
if ((0, import_type_guards48.isNotNil)(checkboxGroup)) {
|
|
14845
|
+
const computedName = (0, import_type_guards48.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
14839
14846
|
const handleChange = (event) => {
|
|
14840
|
-
if ((0,
|
|
14847
|
+
if ((0, import_type_guards48.isNotUndefined)(props.onChange)) {
|
|
14841
14848
|
props.onChange(event);
|
|
14842
14849
|
}
|
|
14843
|
-
if ((0,
|
|
14850
|
+
if ((0, import_type_guards48.isNotUndefined)(checkboxGroup.onChange)) {
|
|
14844
14851
|
checkboxGroup.onChange(event);
|
|
14845
14852
|
}
|
|
14846
14853
|
};
|
|
@@ -14848,7 +14855,7 @@ var FormField = ({
|
|
|
14848
14855
|
...childProps,
|
|
14849
14856
|
name: computedName,
|
|
14850
14857
|
onChange: handleChange,
|
|
14851
|
-
"aria-invalid": (0,
|
|
14858
|
+
"aria-invalid": (0, import_type_guards48.isNotNil)(error)
|
|
14852
14859
|
};
|
|
14853
14860
|
}
|
|
14854
14861
|
import_react73.Children.only(children);
|
|
@@ -14859,9 +14866,9 @@ var FormField = ({
|
|
|
14859
14866
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
14860
14867
|
children: [
|
|
14861
14868
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
14862
|
-
(0,
|
|
14869
|
+
(0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
14863
14870
|
(0, import_react73.cloneElement)(children, childProps),
|
|
14864
|
-
(0,
|
|
14871
|
+
(0, import_type_guards48.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_jsx_runtime281.Fragment, { children: [
|
|
14865
14872
|
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", {}),
|
|
14866
14873
|
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14867
14874
|
ErrorMessages,
|
|
@@ -14907,7 +14914,7 @@ RadioGroup.displayName = "RadioGroup_UI";
|
|
|
14907
14914
|
// src/components/Grid/Grid.tsx
|
|
14908
14915
|
var import_react75 = require("react");
|
|
14909
14916
|
var import_styled_components86 = __toESM(require("styled-components"));
|
|
14910
|
-
var
|
|
14917
|
+
var import_type_guards49 = require("@wistia/type-guards");
|
|
14911
14918
|
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
14912
14919
|
var DEFAULT_ELEMENT5 = "div";
|
|
14913
14920
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
@@ -14957,7 +14964,7 @@ var GridComponent = (0, import_react75.forwardRef)(
|
|
|
14957
14964
|
...props
|
|
14958
14965
|
}, ref) => {
|
|
14959
14966
|
const responsiveGap = useResponsiveProp(gap);
|
|
14960
|
-
const { column, row } = (0,
|
|
14967
|
+
const { column, row } = (0, import_type_guards49.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
|
|
14961
14968
|
const responsiveColumns = useResponsiveProp(columns);
|
|
14962
14969
|
const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
|
|
14963
14970
|
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
@@ -14982,7 +14989,7 @@ var Grid = makePolymorphic(GridComponent);
|
|
|
14982
14989
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
14983
14990
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
14984
14991
|
var import_react76 = require("react");
|
|
14985
|
-
var
|
|
14992
|
+
var import_type_guards50 = require("@wistia/type-guards");
|
|
14986
14993
|
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
14987
14994
|
var StyledIconButton = (0, import_styled_components87.default)(IconButton)`
|
|
14988
14995
|
/* override size for icon button since prop gets changed by Input */
|
|
@@ -15012,12 +15019,12 @@ var InputClickToCopy = (0, import_react76.forwardRef)(
|
|
|
15012
15019
|
if (disabled) {
|
|
15013
15020
|
return;
|
|
15014
15021
|
}
|
|
15015
|
-
if ((0,
|
|
15022
|
+
if ((0, import_type_guards50.isFunction)(props.onClick)) {
|
|
15016
15023
|
props.onClick(event);
|
|
15017
15024
|
}
|
|
15018
15025
|
void copyToClipboard(value).then(() => {
|
|
15019
15026
|
setIsCopied(true);
|
|
15020
|
-
if ((0,
|
|
15027
|
+
if ((0, import_type_guards50.isFunction)(onCopy)) {
|
|
15021
15028
|
onCopy(value);
|
|
15022
15029
|
}
|
|
15023
15030
|
return value;
|
|
@@ -15052,7 +15059,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
|
15052
15059
|
// src/components/InputPassword/InputPassword.tsx
|
|
15053
15060
|
var import_styled_components88 = __toESM(require("styled-components"));
|
|
15054
15061
|
var import_react77 = require("react");
|
|
15055
|
-
var
|
|
15062
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
15056
15063
|
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
15057
15064
|
var StyledIconButton2 = (0, import_styled_components88.default)(IconButton)`
|
|
15058
15065
|
/* override size for icon button since prop gets changed by Input */
|
|
@@ -15068,7 +15075,7 @@ var InputPassword = (0, import_react77.forwardRef)(
|
|
|
15068
15075
|
const handleClick = () => {
|
|
15069
15076
|
const newVisibility = !isVisible;
|
|
15070
15077
|
setIsVisible(newVisibility);
|
|
15071
|
-
if ((0,
|
|
15078
|
+
if ((0, import_type_guards51.isFunction)(onVisibilityToggle)) {
|
|
15072
15079
|
onVisibilityToggle(newVisibility);
|
|
15073
15080
|
}
|
|
15074
15081
|
};
|
|
@@ -15098,7 +15105,7 @@ InputPassword.displayName = "InputPassword_UI";
|
|
|
15098
15105
|
|
|
15099
15106
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
15100
15107
|
var import_styled_components89 = __toESM(require("styled-components"));
|
|
15101
|
-
var
|
|
15108
|
+
var import_type_guards52 = require("@wistia/type-guards");
|
|
15102
15109
|
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
15103
15110
|
var StyledKeyboardShortcut = import_styled_components89.default.div`
|
|
15104
15111
|
align-items: center;
|
|
@@ -15192,7 +15199,7 @@ var KeyboardShortcut = ({
|
|
|
15192
15199
|
$fullWidth: fullWidth,
|
|
15193
15200
|
...otherProps,
|
|
15194
15201
|
children: [
|
|
15195
|
-
(0,
|
|
15202
|
+
(0, import_type_guards52.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(Label2, { children: label }),
|
|
15196
15203
|
/* @__PURE__ */ (0, import_jsx_runtime286.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
|
|
15197
15204
|
StyledKey,
|
|
15198
15205
|
{
|
|
@@ -15206,18 +15213,18 @@ var KeyboardShortcut = ({
|
|
|
15206
15213
|
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
15207
15214
|
|
|
15208
15215
|
// src/components/List/List.tsx
|
|
15209
|
-
var
|
|
15216
|
+
var import_type_guards54 = require("@wistia/type-guards");
|
|
15210
15217
|
var import_styled_components91 = __toESM(require("styled-components"));
|
|
15211
15218
|
|
|
15212
15219
|
// src/components/List/ListItem.tsx
|
|
15213
15220
|
var import_styled_components90 = __toESM(require("styled-components"));
|
|
15214
|
-
var
|
|
15221
|
+
var import_type_guards53 = require("@wistia/type-guards");
|
|
15215
15222
|
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
15216
15223
|
var ListItemComponent = import_styled_components90.default.li`
|
|
15217
15224
|
margin-bottom: var(--wui-space-02);
|
|
15218
15225
|
`;
|
|
15219
15226
|
var ListItem = ({ children }) => {
|
|
15220
|
-
if ((0,
|
|
15227
|
+
if ((0, import_type_guards53.isNil)(children)) {
|
|
15221
15228
|
return null;
|
|
15222
15229
|
}
|
|
15223
15230
|
return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(ListItemComponent, { children });
|
|
@@ -15347,13 +15354,13 @@ var List = ({
|
|
|
15347
15354
|
...otherProps
|
|
15348
15355
|
}) => {
|
|
15349
15356
|
const listVariant = variant ?? "bullets";
|
|
15350
|
-
if ((0,
|
|
15357
|
+
if ((0, import_type_guards54.isNotNil)(children)) {
|
|
15351
15358
|
if (Array.isArray(children) && !children.length) {
|
|
15352
15359
|
return null;
|
|
15353
15360
|
}
|
|
15354
15361
|
return renderListComponent(children, listVariant, otherProps);
|
|
15355
15362
|
}
|
|
15356
|
-
if ((0,
|
|
15363
|
+
if ((0, import_type_guards54.isNotNil)(items)) {
|
|
15357
15364
|
if (!items.length) {
|
|
15358
15365
|
return null;
|
|
15359
15366
|
}
|
|
@@ -15388,7 +15395,7 @@ Mark.displayName = "Mark_UI";
|
|
|
15388
15395
|
var import_react80 = require("react");
|
|
15389
15396
|
var import_styled_components97 = __toESM(require("styled-components"));
|
|
15390
15397
|
var import_react_dialog5 = require("@radix-ui/react-dialog");
|
|
15391
|
-
var
|
|
15398
|
+
var import_type_guards56 = require("@wistia/type-guards");
|
|
15392
15399
|
|
|
15393
15400
|
// src/components/Modal/ModalHeader.tsx
|
|
15394
15401
|
var import_styled_components94 = __toESM(require("styled-components"));
|
|
@@ -15418,12 +15425,14 @@ var import_jsx_runtime291 = require("react/jsx-runtime");
|
|
|
15418
15425
|
var Header = import_styled_components94.default.header`
|
|
15419
15426
|
display: flex;
|
|
15420
15427
|
order: 1;
|
|
15428
|
+
padding: 0 var(--wui-space-05);
|
|
15429
|
+
padding-bottom: 0;
|
|
15421
15430
|
gap: var(--wui-space-01);
|
|
15422
15431
|
justify-content: ${({ $hideTitle }) => $hideTitle ? "flex-end" : "space-between"}; /* ensure ModalCloseButton is right-aligned */
|
|
15423
15432
|
|
|
15424
15433
|
/* DialogTitle creates an h2 element which inherits some margin */
|
|
15425
15434
|
h2 {
|
|
15426
|
-
margin: 0
|
|
15435
|
+
margin: 0;
|
|
15427
15436
|
padding-right: ${({ $hideCloseButon }) => $hideCloseButon ? "0" : "var(--wui-space-03)"};
|
|
15428
15437
|
}
|
|
15429
15438
|
|
|
@@ -15465,7 +15474,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
|
15465
15474
|
|
|
15466
15475
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
15467
15476
|
var import_react78 = require("react");
|
|
15468
|
-
var
|
|
15477
|
+
var import_type_guards55 = require("@wistia/type-guards");
|
|
15469
15478
|
var useFocusRestore = () => {
|
|
15470
15479
|
const previouslyFocusedRef = (0, import_react78.useRef)(null);
|
|
15471
15480
|
(0, import_react78.useEffect)(() => {
|
|
@@ -15473,7 +15482,7 @@ var useFocusRestore = () => {
|
|
|
15473
15482
|
}, []);
|
|
15474
15483
|
(0, import_react78.useEffect)(() => {
|
|
15475
15484
|
return () => {
|
|
15476
|
-
if ((0,
|
|
15485
|
+
if ((0, import_type_guards55.isNotNil)(previouslyFocusedRef.current)) {
|
|
15477
15486
|
setTimeout(() => {
|
|
15478
15487
|
previouslyFocusedRef.current?.focus();
|
|
15479
15488
|
}, 0);
|
|
@@ -15585,15 +15594,15 @@ var StyledModalContent = (0, import_styled_components95.default)(import_react_di
|
|
|
15585
15594
|
position: fixed;
|
|
15586
15595
|
display: flex;
|
|
15587
15596
|
flex-direction: column;
|
|
15597
|
+
gap: var(--wui-space-03);
|
|
15588
15598
|
top: 0;
|
|
15589
15599
|
left: 0;
|
|
15590
15600
|
width: 100vw;
|
|
15591
15601
|
height: 100vh;
|
|
15592
15602
|
z-index: var(--wui-zindex-modal);
|
|
15593
15603
|
box-sizing: border-box;
|
|
15594
|
-
padding: var(--wui-space-05);
|
|
15604
|
+
padding: var(--wui-space-05) 0;
|
|
15595
15605
|
background-color: var(--wui-color-bg-app);
|
|
15596
|
-
overflow: auto;
|
|
15597
15606
|
|
|
15598
15607
|
${mq.smAndUp} {
|
|
15599
15608
|
position: fixed;
|
|
@@ -15666,11 +15675,21 @@ var ModalBody = import_styled_components97.default.div`
|
|
|
15666
15675
|
flex-direction: column;
|
|
15667
15676
|
display: flex;
|
|
15668
15677
|
flex: 1 0 0;
|
|
15678
|
+
padding: 0 var(--wui-space-05);
|
|
15679
|
+
`;
|
|
15680
|
+
var ModalScrollArea = import_styled_components97.default.div`
|
|
15669
15681
|
order: 2;
|
|
15682
|
+
max-height: 90vh;
|
|
15683
|
+
overflow-y: auto;
|
|
15684
|
+
`;
|
|
15685
|
+
var ModalFooter = import_styled_components97.default.footer`
|
|
15686
|
+
padding: 0 var(--wui-space-05);
|
|
15687
|
+
order: 3;
|
|
15670
15688
|
`;
|
|
15671
15689
|
var Modal = (0, import_react80.forwardRef)(
|
|
15672
15690
|
({
|
|
15673
15691
|
children,
|
|
15692
|
+
footer,
|
|
15674
15693
|
hideCloseButton = false,
|
|
15675
15694
|
hideTitle = false,
|
|
15676
15695
|
initialFocusRef,
|
|
@@ -15685,7 +15704,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15685
15704
|
import_react_dialog5.Root,
|
|
15686
15705
|
{
|
|
15687
15706
|
onOpenChange: (open2) => {
|
|
15688
|
-
if (!open2 && (0,
|
|
15707
|
+
if (!open2 && (0, import_type_guards56.isNotNil)(onRequestClose)) {
|
|
15689
15708
|
onRequestClose();
|
|
15690
15709
|
}
|
|
15691
15710
|
},
|
|
@@ -15697,7 +15716,7 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15697
15716
|
{
|
|
15698
15717
|
ref,
|
|
15699
15718
|
onOpenAutoFocus: (event) => {
|
|
15700
|
-
if ((0,
|
|
15719
|
+
if ((0, import_type_guards56.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
15701
15720
|
event.preventDefault();
|
|
15702
15721
|
requestAnimationFrame(() => {
|
|
15703
15722
|
initialFocusRef.current?.focus();
|
|
@@ -15708,7 +15727,8 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15708
15727
|
width,
|
|
15709
15728
|
...props,
|
|
15710
15729
|
children: [
|
|
15711
|
-
/* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ModalBody, { children }),
|
|
15730
|
+
/* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ModalScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ModalBody, { children }) }),
|
|
15731
|
+
(0, import_type_guards56.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ModalFooter, { children: footer }) : null,
|
|
15712
15732
|
hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
15713
15733
|
ModalHeader,
|
|
15714
15734
|
{
|
|
@@ -15727,20 +15747,42 @@ var Modal = (0, import_react80.forwardRef)(
|
|
|
15727
15747
|
);
|
|
15728
15748
|
Modal.displayName = "Modal_UI";
|
|
15729
15749
|
|
|
15750
|
+
// src/components/Modal/ModalCallouts.tsx
|
|
15751
|
+
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
15752
|
+
var ModalCallouts = ({ children }) => {
|
|
15753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
15754
|
+
Stack,
|
|
15755
|
+
{
|
|
15756
|
+
direction: "horizontal",
|
|
15757
|
+
gap: "space-08",
|
|
15758
|
+
children
|
|
15759
|
+
}
|
|
15760
|
+
);
|
|
15761
|
+
};
|
|
15762
|
+
ModalCallouts.displayName = "ModalCallouts_UI";
|
|
15763
|
+
var ModalCallout = ({ title, image, children }) => {
|
|
15764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Stack, { direction: "vertical", children: [
|
|
15765
|
+
image,
|
|
15766
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Heading, { variant: "heading4", children: title }),
|
|
15767
|
+
children
|
|
15768
|
+
] });
|
|
15769
|
+
};
|
|
15770
|
+
ModalCallout.displayName = "ModalCallout_UI";
|
|
15771
|
+
|
|
15730
15772
|
// src/components/Popover/Popover.tsx
|
|
15731
15773
|
var import_react_popover5 = require("@radix-ui/react-popover");
|
|
15732
15774
|
var import_styled_components99 = __toESM(require("styled-components"));
|
|
15733
15775
|
|
|
15734
15776
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
15735
|
-
var
|
|
15777
|
+
var import_type_guards57 = require("@wistia/type-guards");
|
|
15736
15778
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
15737
|
-
return (0,
|
|
15779
|
+
return (0, import_type_guards57.isNotNil)(onOpenChange) && (0, import_type_guards57.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
15738
15780
|
};
|
|
15739
15781
|
|
|
15740
15782
|
// src/components/Popover/PopoverArrow.tsx
|
|
15741
15783
|
var import_react_popover4 = require("@radix-ui/react-popover");
|
|
15742
15784
|
var import_styled_components98 = __toESM(require("styled-components"));
|
|
15743
|
-
var
|
|
15785
|
+
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
15744
15786
|
var StyledPath = import_styled_components98.default.path`
|
|
15745
15787
|
fill: var(--wui-color-border-secondary);
|
|
15746
15788
|
`;
|
|
@@ -15779,7 +15821,7 @@ var StyledCircle = import_styled_components98.default.circle`
|
|
|
15779
15821
|
}
|
|
15780
15822
|
`;
|
|
15781
15823
|
var PopoverArrow = ({ isAnimated }) => {
|
|
15782
|
-
return /* @__PURE__ */ (0,
|
|
15824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_react_popover4.PopoverArrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
15783
15825
|
"svg",
|
|
15784
15826
|
{
|
|
15785
15827
|
fill: "none",
|
|
@@ -15788,8 +15830,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
15788
15830
|
width: "48",
|
|
15789
15831
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15790
15832
|
children: [
|
|
15791
|
-
/* @__PURE__ */ (0,
|
|
15792
|
-
/* @__PURE__ */ (0,
|
|
15833
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.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" }),
|
|
15834
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
15793
15835
|
StyledCircle,
|
|
15794
15836
|
{
|
|
15795
15837
|
$isAnimated: isAnimated,
|
|
@@ -15800,7 +15842,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
15800
15842
|
strokeWidth: "4"
|
|
15801
15843
|
}
|
|
15802
15844
|
),
|
|
15803
|
-
/* @__PURE__ */ (0,
|
|
15845
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
15804
15846
|
StyledCircle,
|
|
15805
15847
|
{
|
|
15806
15848
|
$isAnimated: isAnimated,
|
|
@@ -15818,7 +15860,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
15818
15860
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
15819
15861
|
|
|
15820
15862
|
// src/components/Popover/Popover.tsx
|
|
15821
|
-
var
|
|
15863
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
15822
15864
|
var StyledContent2 = (0, import_styled_components99.default)(import_react_popover5.Content)`
|
|
15823
15865
|
z-index: var(--wui-zindex-popover);
|
|
15824
15866
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -15858,9 +15900,9 @@ var Popover = ({
|
|
|
15858
15900
|
"--wui-popover-max-width": maxWidth,
|
|
15859
15901
|
"--wui-popover-max-height": maxHeight
|
|
15860
15902
|
};
|
|
15861
|
-
return /* @__PURE__ */ (0,
|
|
15862
|
-
/* @__PURE__ */ (0,
|
|
15863
|
-
/* @__PURE__ */ (0,
|
|
15903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(import_react_popover5.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
15904
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(import_react_popover5.Trigger, { asChild: true, children: trigger }),
|
|
15905
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(import_react_popover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(
|
|
15864
15906
|
StyledContent2,
|
|
15865
15907
|
{
|
|
15866
15908
|
$colorScheme: colorScheme,
|
|
@@ -15869,17 +15911,17 @@ var Popover = ({
|
|
|
15869
15911
|
$unstyled: unstyled,
|
|
15870
15912
|
style,
|
|
15871
15913
|
children: [
|
|
15872
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
15914
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(import_react_popover5.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
15873
15915
|
IconButton,
|
|
15874
15916
|
{
|
|
15875
15917
|
"data-wui-popover-close": true,
|
|
15876
15918
|
label: "Close",
|
|
15877
15919
|
variant: "ghost",
|
|
15878
|
-
children: /* @__PURE__ */ (0,
|
|
15920
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Icon, { type: "close" })
|
|
15879
15921
|
}
|
|
15880
15922
|
) }),
|
|
15881
|
-
withArrow ? /* @__PURE__ */ (0,
|
|
15882
|
-
/* @__PURE__ */ (0,
|
|
15923
|
+
withArrow ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(PopoverArrow, { isAnimated }) : null,
|
|
15924
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { children })
|
|
15883
15925
|
]
|
|
15884
15926
|
}
|
|
15885
15927
|
) })
|
|
@@ -15890,8 +15932,8 @@ Popover.displayName = "Popover_UI";
|
|
|
15890
15932
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
15891
15933
|
var import_styled_components100 = __toESM(require("styled-components"));
|
|
15892
15934
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
15893
|
-
var
|
|
15894
|
-
var
|
|
15935
|
+
var import_type_guards58 = require("@wistia/type-guards");
|
|
15936
|
+
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
15895
15937
|
var ProgressBarWrapper = import_styled_components100.default.div`
|
|
15896
15938
|
--progress-bar-height: 8px;
|
|
15897
15939
|
|
|
@@ -15945,16 +15987,16 @@ var ProgressBar = ({
|
|
|
15945
15987
|
colorScheme = "inherit",
|
|
15946
15988
|
...props
|
|
15947
15989
|
}) => {
|
|
15948
|
-
return /* @__PURE__ */ (0,
|
|
15949
|
-
(0,
|
|
15950
|
-
/* @__PURE__ */ (0,
|
|
15990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(ProgressBarWrapper, { children: [
|
|
15991
|
+
(0, import_type_guards58.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
15992
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
15951
15993
|
StyledProgressBar,
|
|
15952
15994
|
{
|
|
15953
15995
|
$colorScheme: colorScheme,
|
|
15954
15996
|
max,
|
|
15955
15997
|
value: progress,
|
|
15956
15998
|
...props,
|
|
15957
|
-
children: /* @__PURE__ */ (0,
|
|
15999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
15958
16000
|
StyledProgressIndicator,
|
|
15959
16001
|
{
|
|
15960
16002
|
$colorScheme: colorScheme,
|
|
@@ -15964,16 +16006,16 @@ var ProgressBar = ({
|
|
|
15964
16006
|
)
|
|
15965
16007
|
}
|
|
15966
16008
|
),
|
|
15967
|
-
(0,
|
|
16009
|
+
(0, import_type_guards58.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
15968
16010
|
] });
|
|
15969
16011
|
};
|
|
15970
16012
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
15971
16013
|
|
|
15972
16014
|
// src/components/Radio/Radio.tsx
|
|
15973
|
-
var
|
|
16015
|
+
var import_type_guards59 = require("@wistia/type-guards");
|
|
15974
16016
|
var import_react81 = require("react");
|
|
15975
16017
|
var import_styled_components101 = __toESM(require("styled-components"));
|
|
15976
|
-
var
|
|
16018
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
15977
16019
|
var sizeSmall2 = import_styled_components101.css`
|
|
15978
16020
|
--wui-radio-size: 14px;
|
|
15979
16021
|
--wui-radio-icon-size: 7px;
|
|
@@ -16070,22 +16112,22 @@ var Radio = (0, import_react81.forwardRef)(
|
|
|
16070
16112
|
...props
|
|
16071
16113
|
}, ref) => {
|
|
16072
16114
|
const generatedId = (0, import_react81.useId)();
|
|
16073
|
-
const computedId = (0,
|
|
16115
|
+
const computedId = (0, import_type_guards59.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16074
16116
|
const radioGroupContext = useRadioGroup();
|
|
16075
16117
|
const contextName = radioGroupContext?.name;
|
|
16076
16118
|
const contextOnChange = radioGroupContext?.onChange;
|
|
16077
16119
|
const contextValue = radioGroupContext?.value;
|
|
16078
16120
|
const radioName = name ?? contextName;
|
|
16079
16121
|
const handleOnChange = onChange ?? contextOnChange;
|
|
16080
|
-
const isChecked = (0,
|
|
16081
|
-
return /* @__PURE__ */ (0,
|
|
16122
|
+
const isChecked = (0, import_type_guards59.isNotUndefined)(value) && (0, import_type_guards59.isNotUndefined)(contextValue) ? contextValue === value : checked;
|
|
16123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(
|
|
16082
16124
|
StyledRadioWrapper,
|
|
16083
16125
|
{
|
|
16084
16126
|
$disabled: disabled,
|
|
16085
16127
|
$hideLabel: hideLabel,
|
|
16086
16128
|
"aria-invalid": props["aria-invalid"],
|
|
16087
16129
|
children: [
|
|
16088
|
-
/* @__PURE__ */ (0,
|
|
16130
|
+
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
16089
16131
|
StyledHiddenRadioInput,
|
|
16090
16132
|
{
|
|
16091
16133
|
...props,
|
|
@@ -16100,10 +16142,10 @@ var Radio = (0, import_react81.forwardRef)(
|
|
|
16100
16142
|
value
|
|
16101
16143
|
}
|
|
16102
16144
|
),
|
|
16103
|
-
/* @__PURE__ */ (0,
|
|
16145
|
+
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
16104
16146
|
FormControlLabel,
|
|
16105
16147
|
{
|
|
16106
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
16148
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(StyledRadioInput, { $size: size }),
|
|
16107
16149
|
description,
|
|
16108
16150
|
disabled,
|
|
16109
16151
|
hideLabel,
|
|
@@ -16124,8 +16166,8 @@ var import_react83 = require("react");
|
|
|
16124
16166
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
16125
16167
|
var import_react82 = require("react");
|
|
16126
16168
|
var import_styled_components102 = __toESM(require("styled-components"));
|
|
16127
|
-
var
|
|
16128
|
-
var
|
|
16169
|
+
var import_type_guards60 = require("@wistia/type-guards");
|
|
16170
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
16129
16171
|
var checkedStyles = import_styled_components102.css`
|
|
16130
16172
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
16131
16173
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
@@ -16246,22 +16288,22 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
|
|
|
16246
16288
|
...props
|
|
16247
16289
|
}, ref) => {
|
|
16248
16290
|
const generatedId = (0, import_react82.useId)();
|
|
16249
|
-
const computedId = (0,
|
|
16291
|
+
const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
16250
16292
|
const radioGroupContext = useRadioGroup();
|
|
16251
16293
|
const contextName = radioGroupContext?.name;
|
|
16252
16294
|
const contextOnChange = radioGroupContext?.onChange;
|
|
16253
16295
|
const contextValue = radioGroupContext?.value;
|
|
16254
16296
|
const radioName = name ?? contextName;
|
|
16255
16297
|
const handleOnChange = onChange ?? contextOnChange;
|
|
16256
|
-
const isChecked = (0,
|
|
16257
|
-
return /* @__PURE__ */ (0,
|
|
16298
|
+
const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
|
|
16299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
16258
16300
|
StyledCard2,
|
|
16259
16301
|
{
|
|
16260
16302
|
$aspectRatio: aspectRatio,
|
|
16261
16303
|
$padding: padding,
|
|
16262
16304
|
htmlFor: computedId,
|
|
16263
16305
|
children: [
|
|
16264
|
-
/* @__PURE__ */ (0,
|
|
16306
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
16265
16307
|
StyledHiddenInput,
|
|
16266
16308
|
{
|
|
16267
16309
|
...props,
|
|
@@ -16285,7 +16327,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
|
16285
16327
|
|
|
16286
16328
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16287
16329
|
var import_styled_components104 = __toESM(require("styled-components"));
|
|
16288
|
-
var
|
|
16330
|
+
var import_type_guards61 = require("@wistia/type-guards");
|
|
16289
16331
|
|
|
16290
16332
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
16291
16333
|
var import_styled_components103 = __toESM(require("styled-components"));
|
|
@@ -16338,7 +16380,7 @@ var RadioCardIndicator = import_styled_components103.default.div`
|
|
|
16338
16380
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
16339
16381
|
|
|
16340
16382
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16341
|
-
var
|
|
16383
|
+
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
16342
16384
|
var StyledCardContent = import_styled_components104.default.div`
|
|
16343
16385
|
display: grid;
|
|
16344
16386
|
grid-auto-flow: column;
|
|
@@ -16358,18 +16400,18 @@ var RadioCardDefaultLayout = ({
|
|
|
16358
16400
|
description,
|
|
16359
16401
|
showIndicator = true
|
|
16360
16402
|
}) => {
|
|
16361
|
-
return /* @__PURE__ */ (0,
|
|
16362
|
-
showIndicator ? /* @__PURE__ */ (0,
|
|
16363
|
-
/* @__PURE__ */ (0,
|
|
16364
|
-
(0,
|
|
16365
|
-
/* @__PURE__ */ (0,
|
|
16403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(StyledCardContent, { children: [
|
|
16404
|
+
showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(StyledIndicatorContainer, { $hasIcon: (0, import_type_guards61.isNotNil)(icon), children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
16405
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(Stack, { gap: "space-02", children: [
|
|
16406
|
+
(0, import_type_guards61.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
16407
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
|
|
16366
16408
|
Stack,
|
|
16367
16409
|
{
|
|
16368
16410
|
gap: "space-01",
|
|
16369
|
-
style: (0,
|
|
16411
|
+
style: (0, import_type_guards61.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
|
|
16370
16412
|
children: [
|
|
16371
|
-
(0,
|
|
16372
|
-
(0,
|
|
16413
|
+
(0, import_type_guards61.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(Text, { variant: "label3", children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("strong", { children: label }) }),
|
|
16414
|
+
(0, import_type_guards61.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
16373
16415
|
Text,
|
|
16374
16416
|
{
|
|
16375
16417
|
prominence: "secondary",
|
|
@@ -16392,16 +16434,16 @@ var RadioCardChildrenContainer = import_styled_components105.default.div`
|
|
|
16392
16434
|
`;
|
|
16393
16435
|
|
|
16394
16436
|
// src/components/RadioCard/RadioCard.tsx
|
|
16395
|
-
var
|
|
16437
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
16396
16438
|
var RadioCard = (0, import_react83.forwardRef)(
|
|
16397
16439
|
({ icon, label, description, showIndicator, children, ...rootProps }, ref) => {
|
|
16398
|
-
return /* @__PURE__ */ (0,
|
|
16440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
16399
16441
|
RadioCardRoot,
|
|
16400
16442
|
{
|
|
16401
16443
|
ref,
|
|
16402
16444
|
padding: children != null ? "space-00" : "space-04",
|
|
16403
16445
|
...rootProps,
|
|
16404
|
-
children: children != null ? /* @__PURE__ */ (0,
|
|
16446
|
+
children: children != null ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(RadioCardChildrenContainer, { "data-wui-radio-card-image": "cover", children }) : /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
16405
16447
|
RadioCardDefaultLayout,
|
|
16406
16448
|
{
|
|
16407
16449
|
description,
|
|
@@ -16418,17 +16460,17 @@ RadioCard.displayName = "RadioCard_UI";
|
|
|
16418
16460
|
|
|
16419
16461
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
16420
16462
|
var import_react84 = require("react");
|
|
16421
|
-
var
|
|
16463
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
16422
16464
|
var RadioCardImage = (0, import_react84.forwardRef)(
|
|
16423
16465
|
({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
|
|
16424
|
-
return /* @__PURE__ */ (0,
|
|
16466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
16425
16467
|
RadioCardRoot,
|
|
16426
16468
|
{
|
|
16427
16469
|
ref,
|
|
16428
16470
|
...rootProps,
|
|
16429
16471
|
aspectRatio,
|
|
16430
16472
|
padding,
|
|
16431
|
-
children: /* @__PURE__ */ (0,
|
|
16473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
16432
16474
|
Image,
|
|
16433
16475
|
{
|
|
16434
16476
|
alt: label,
|
|
@@ -16448,7 +16490,7 @@ RadioCardImage.displayName = "RadioCardImage_UI";
|
|
|
16448
16490
|
var import_react85 = require("react");
|
|
16449
16491
|
var import_styled_components106 = __toESM(require("styled-components"));
|
|
16450
16492
|
var import_throttle_debounce2 = require("throttle-debounce");
|
|
16451
|
-
var
|
|
16493
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
16452
16494
|
var SHADOW_SIZE_PX = 8;
|
|
16453
16495
|
var Container10 = import_styled_components106.default.div`
|
|
16454
16496
|
overflow: hidden;
|
|
@@ -16528,12 +16570,12 @@ var ScrollArea = (0, import_react85.forwardRef)(
|
|
|
16528
16570
|
(0, import_react85.useEffect)(() => {
|
|
16529
16571
|
updateShadows();
|
|
16530
16572
|
}, [updateShadows]);
|
|
16531
|
-
return /* @__PURE__ */ (0,
|
|
16532
|
-
/* @__PURE__ */ (0,
|
|
16533
|
-
/* @__PURE__ */ (0,
|
|
16534
|
-
/* @__PURE__ */ (0,
|
|
16535
|
-
/* @__PURE__ */ (0,
|
|
16536
|
-
/* @__PURE__ */ (0,
|
|
16573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(Container10, { style, children: [
|
|
16574
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
16575
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
16576
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
16577
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
16578
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
16537
16579
|
ScrollContainer,
|
|
16538
16580
|
{
|
|
16539
16581
|
ref: scrollContainerRef,
|
|
@@ -16551,11 +16593,11 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
16551
16593
|
var import_react88 = require("react");
|
|
16552
16594
|
var import_styled_components108 = __toESM(require("styled-components"));
|
|
16553
16595
|
var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
|
|
16554
|
-
var
|
|
16596
|
+
var import_type_guards63 = require("@wistia/type-guards");
|
|
16555
16597
|
|
|
16556
16598
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
16557
16599
|
var import_react86 = require("react");
|
|
16558
|
-
var
|
|
16600
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
16559
16601
|
var SelectedItemStyleContext = (0, import_react86.createContext)(null);
|
|
16560
16602
|
var SelectedItemStyleProvider = ({
|
|
16561
16603
|
children
|
|
@@ -16576,7 +16618,7 @@ var SelectedItemStyleProvider = ({
|
|
|
16576
16618
|
}),
|
|
16577
16619
|
[selectedItemIndicatorStyle]
|
|
16578
16620
|
);
|
|
16579
|
-
return /* @__PURE__ */ (0,
|
|
16621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
16580
16622
|
};
|
|
16581
16623
|
var useSelectedItemStyle = () => {
|
|
16582
16624
|
const context = (0, import_react86.useContext)(SelectedItemStyleContext);
|
|
@@ -16588,7 +16630,7 @@ var useSelectedItemStyle = () => {
|
|
|
16588
16630
|
|
|
16589
16631
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16590
16632
|
var import_styled_components107 = __toESM(require("styled-components"));
|
|
16591
|
-
var
|
|
16633
|
+
var import_type_guards62 = require("@wistia/type-guards");
|
|
16592
16634
|
|
|
16593
16635
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
16594
16636
|
var import_react87 = require("react");
|
|
@@ -16603,7 +16645,7 @@ var useSegmentedControlValue = () => {
|
|
|
16603
16645
|
};
|
|
16604
16646
|
|
|
16605
16647
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16606
|
-
var
|
|
16648
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
16607
16649
|
var selectedItemIndicatorStyles = import_styled_components107.css`
|
|
16608
16650
|
background-color: var(--wui-color-bg-fill-white);
|
|
16609
16651
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -16622,10 +16664,10 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
|
|
|
16622
16664
|
var SelectedItemIndicator = () => {
|
|
16623
16665
|
const selectedValue = useSegmentedControlValue();
|
|
16624
16666
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
16625
|
-
if (!selectedValue || (0,
|
|
16667
|
+
if (!selectedValue || (0, import_type_guards62.isUndefined)(selectedItemIndicatorStyle)) {
|
|
16626
16668
|
return null;
|
|
16627
16669
|
}
|
|
16628
|
-
return /* @__PURE__ */ (0,
|
|
16670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
16629
16671
|
SelectedItemIndicatorDiv,
|
|
16630
16672
|
{
|
|
16631
16673
|
"data-wui-selected-item-indicator": true,
|
|
@@ -16635,7 +16677,7 @@ var SelectedItemIndicator = () => {
|
|
|
16635
16677
|
};
|
|
16636
16678
|
|
|
16637
16679
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
16638
|
-
var
|
|
16680
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
16639
16681
|
var segmentedControlStyles = import_styled_components108.css`
|
|
16640
16682
|
display: inline-flex;
|
|
16641
16683
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -16659,10 +16701,10 @@ var SegmentedControl = (0, import_react88.forwardRef)(
|
|
|
16659
16701
|
onSelectedValueChange,
|
|
16660
16702
|
...props
|
|
16661
16703
|
}, ref) => {
|
|
16662
|
-
if ((0,
|
|
16704
|
+
if ((0, import_type_guards63.isNil)(children)) {
|
|
16663
16705
|
return null;
|
|
16664
16706
|
}
|
|
16665
|
-
return /* @__PURE__ */ (0,
|
|
16707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
16666
16708
|
StyledSegmentedControl,
|
|
16667
16709
|
{
|
|
16668
16710
|
ref,
|
|
@@ -16674,9 +16716,9 @@ var SegmentedControl = (0, import_react88.forwardRef)(
|
|
|
16674
16716
|
type: "single",
|
|
16675
16717
|
value: selectedValue,
|
|
16676
16718
|
...props,
|
|
16677
|
-
children: /* @__PURE__ */ (0,
|
|
16719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(SelectedItemStyleProvider, { children: [
|
|
16678
16720
|
children,
|
|
16679
|
-
/* @__PURE__ */ (0,
|
|
16721
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(SelectedItemIndicator, {})
|
|
16680
16722
|
] }) })
|
|
16681
16723
|
}
|
|
16682
16724
|
);
|
|
@@ -16688,8 +16730,8 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
16688
16730
|
var import_react89 = require("react");
|
|
16689
16731
|
var import_styled_components109 = __toESM(require("styled-components"));
|
|
16690
16732
|
var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
|
|
16691
|
-
var
|
|
16692
|
-
var
|
|
16733
|
+
var import_type_guards64 = require("@wistia/type-guards");
|
|
16734
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
16693
16735
|
var segmentedControlItemStyles = import_styled_components109.css`
|
|
16694
16736
|
all: unset; /* ToggleGroupItem is a button element */
|
|
16695
16737
|
align-items: center;
|
|
@@ -16799,13 +16841,13 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
|
|
|
16799
16841
|
resizeObserver.disconnect();
|
|
16800
16842
|
};
|
|
16801
16843
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
16802
|
-
return /* @__PURE__ */ (0,
|
|
16844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
|
|
16803
16845
|
StyledSegmentedControlItem,
|
|
16804
16846
|
{
|
|
16805
16847
|
ref: combinedRef,
|
|
16806
16848
|
...otherProps,
|
|
16807
|
-
$hasLabel: (0,
|
|
16808
|
-
"aria-label": (0,
|
|
16849
|
+
$hasLabel: (0, import_type_guards64.isNotNil)(label),
|
|
16850
|
+
"aria-label": (0, import_type_guards64.isNotNil)(label) ? void 0 : ariaLabel,
|
|
16809
16851
|
disabled,
|
|
16810
16852
|
onClick: handleClick,
|
|
16811
16853
|
value,
|
|
@@ -16823,7 +16865,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem_UI";
|
|
|
16823
16865
|
var import_react_select = require("@radix-ui/react-select");
|
|
16824
16866
|
var import_react90 = require("react");
|
|
16825
16867
|
var import_styled_components110 = __toESM(require("styled-components"));
|
|
16826
|
-
var
|
|
16868
|
+
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
16827
16869
|
var StyledTrigger2 = (0, import_styled_components110.default)(import_react_select.Trigger)`
|
|
16828
16870
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16829
16871
|
${inputCss};
|
|
@@ -16912,8 +16954,8 @@ var Select = (0, import_react90.forwardRef)(
|
|
|
16912
16954
|
if (forceOpen) {
|
|
16913
16955
|
rootProps["open"] = true;
|
|
16914
16956
|
}
|
|
16915
|
-
return /* @__PURE__ */ (0,
|
|
16916
|
-
/* @__PURE__ */ (0,
|
|
16957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(import_react_select.Root, { ...rootProps, children: [
|
|
16958
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(
|
|
16917
16959
|
StyledTrigger2,
|
|
16918
16960
|
{
|
|
16919
16961
|
ref: forwardedRef,
|
|
@@ -16921,8 +16963,8 @@ var Select = (0, import_react90.forwardRef)(
|
|
|
16921
16963
|
$fullWidth: responsiveFullWidth,
|
|
16922
16964
|
...props,
|
|
16923
16965
|
children: [
|
|
16924
|
-
/* @__PURE__ */ (0,
|
|
16925
|
-
/* @__PURE__ */ (0,
|
|
16966
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select.Value, { placeholder }),
|
|
16967
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
16926
16968
|
Icon,
|
|
16927
16969
|
{
|
|
16928
16970
|
size: "md",
|
|
@@ -16932,10 +16974,10 @@ var Select = (0, import_react90.forwardRef)(
|
|
|
16932
16974
|
]
|
|
16933
16975
|
}
|
|
16934
16976
|
),
|
|
16935
|
-
/* @__PURE__ */ (0,
|
|
16936
|
-
/* @__PURE__ */ (0,
|
|
16937
|
-
/* @__PURE__ */ (0,
|
|
16938
|
-
/* @__PURE__ */ (0,
|
|
16977
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(StyledContent3, { position: "popper", children: [
|
|
16978
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Icon, { type: "caret-up" }) }),
|
|
16979
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select.Viewport, { children }),
|
|
16980
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Icon, { type: "caret-down" }) })
|
|
16939
16981
|
] }) })
|
|
16940
16982
|
] });
|
|
16941
16983
|
}
|
|
@@ -16946,8 +16988,8 @@ Select.displayName = "Select_UI";
|
|
|
16946
16988
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
16947
16989
|
var import_react91 = require("react");
|
|
16948
16990
|
var import_styled_components111 = __toESM(require("styled-components"));
|
|
16949
|
-
var
|
|
16950
|
-
var
|
|
16991
|
+
var import_type_guards65 = require("@wistia/type-guards");
|
|
16992
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
16951
16993
|
var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
|
|
16952
16994
|
${getTypographicStyles("label3")}
|
|
16953
16995
|
display: flex;
|
|
@@ -16974,17 +17016,17 @@ var StyledItem = (0, import_styled_components111.default)(import_react_select2.I
|
|
|
16974
17016
|
`;
|
|
16975
17017
|
var SelectOption = (0, import_react91.forwardRef)(
|
|
16976
17018
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
16977
|
-
return /* @__PURE__ */ (0,
|
|
17019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
16978
17020
|
StyledItem,
|
|
16979
17021
|
{
|
|
16980
17022
|
...props,
|
|
16981
17023
|
ref: forwardedRef,
|
|
16982
17024
|
children: [
|
|
16983
|
-
(0,
|
|
17025
|
+
(0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("div", { children: [
|
|
16984
17026
|
children,
|
|
16985
|
-
/* @__PURE__ */ (0,
|
|
16986
|
-
] }) : /* @__PURE__ */ (0,
|
|
16987
|
-
/* @__PURE__ */ (0,
|
|
17027
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
17028
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_react_select2.ItemText, { children }),
|
|
17029
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
16988
17030
|
Icon,
|
|
16989
17031
|
{
|
|
16990
17032
|
size: "md",
|
|
@@ -17001,13 +17043,13 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
17001
17043
|
// src/components/Select/SelectOptionGroup.tsx
|
|
17002
17044
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
17003
17045
|
var import_styled_components112 = __toESM(require("styled-components"));
|
|
17004
|
-
var
|
|
17046
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
17005
17047
|
var StyledLabel4 = (0, import_styled_components112.default)(import_react_select3.Label)`
|
|
17006
17048
|
padding: var(--wui-select-option-padding);
|
|
17007
17049
|
`;
|
|
17008
17050
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
17009
|
-
return /* @__PURE__ */ (0,
|
|
17010
|
-
/* @__PURE__ */ (0,
|
|
17051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
17052
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
17011
17053
|
Heading,
|
|
17012
17054
|
{
|
|
17013
17055
|
renderAs: "span",
|
|
@@ -17022,8 +17064,8 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
17022
17064
|
// src/components/Slider/Slider.tsx
|
|
17023
17065
|
var import_react_slider2 = require("@radix-ui/react-slider");
|
|
17024
17066
|
var import_styled_components113 = __toESM(require("styled-components"));
|
|
17025
|
-
var
|
|
17026
|
-
var
|
|
17067
|
+
var import_type_guards66 = require("@wistia/type-guards");
|
|
17068
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
17027
17069
|
var SliderContainer = import_styled_components113.default.div`
|
|
17028
17070
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
17029
17071
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
@@ -17101,7 +17143,7 @@ var Slider = ({
|
|
|
17101
17143
|
"data-testid": dataTestId = "ui-slider",
|
|
17102
17144
|
...otherProps
|
|
17103
17145
|
}) => {
|
|
17104
|
-
if (!((0,
|
|
17146
|
+
if (!((0, import_type_guards66.isNonEmptyString)(ariaLabel) || (0, import_type_guards66.isNonEmptyString)(ariaLabelledby))) {
|
|
17105
17147
|
throw new Error(
|
|
17106
17148
|
"UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
|
|
17107
17149
|
);
|
|
@@ -17112,12 +17154,12 @@ var Slider = ({
|
|
|
17112
17154
|
onChange(newValue);
|
|
17113
17155
|
}
|
|
17114
17156
|
};
|
|
17115
|
-
return /* @__PURE__ */ (0,
|
|
17157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
17116
17158
|
SliderContainer,
|
|
17117
17159
|
{
|
|
17118
17160
|
...otherProps,
|
|
17119
17161
|
"data-testid": dataTestId,
|
|
17120
|
-
children: /* @__PURE__ */ (0,
|
|
17162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
17121
17163
|
StyledSliderRoot,
|
|
17122
17164
|
{
|
|
17123
17165
|
"aria-label": ariaLabel,
|
|
@@ -17130,8 +17172,8 @@ var Slider = ({
|
|
|
17130
17172
|
step,
|
|
17131
17173
|
...value ? { value } : {},
|
|
17132
17174
|
children: [
|
|
17133
|
-
/* @__PURE__ */ (0,
|
|
17134
|
-
values.map((_, index) => /* @__PURE__ */ (0,
|
|
17175
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
17176
|
+
values.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
17135
17177
|
StyledSliderThumb,
|
|
17136
17178
|
{
|
|
17137
17179
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -17148,7 +17190,7 @@ Slider.displayName = "Slider_UI";
|
|
|
17148
17190
|
|
|
17149
17191
|
// src/components/Table/Table.tsx
|
|
17150
17192
|
var import_styled_components114 = __toESM(require("styled-components"));
|
|
17151
|
-
var
|
|
17193
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
17152
17194
|
var StyledTable = import_styled_components114.default.table`
|
|
17153
17195
|
width: 100%;
|
|
17154
17196
|
border-collapse: collapse;
|
|
@@ -17178,7 +17220,7 @@ var Table = ({
|
|
|
17178
17220
|
visuallyHiddenHeader = false,
|
|
17179
17221
|
...props
|
|
17180
17222
|
}) => {
|
|
17181
|
-
return /* @__PURE__ */ (0,
|
|
17223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
17182
17224
|
StyledTable,
|
|
17183
17225
|
{
|
|
17184
17226
|
$divided: divided,
|
|
@@ -17199,16 +17241,16 @@ var import_react92 = require("react");
|
|
|
17199
17241
|
var TableSectionContext = (0, import_react92.createContext)(null);
|
|
17200
17242
|
|
|
17201
17243
|
// src/components/Table/TableBody.tsx
|
|
17202
|
-
var
|
|
17244
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
17203
17245
|
var StyledTableBody = import_styled_components115.default.tbody``;
|
|
17204
17246
|
var TableBody = ({ children, ...props }) => {
|
|
17205
|
-
return /* @__PURE__ */ (0,
|
|
17247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(StyledTableBody, { ...props, children }) });
|
|
17206
17248
|
};
|
|
17207
17249
|
|
|
17208
17250
|
// src/components/Table/TableCell.tsx
|
|
17209
17251
|
var import_react94 = require("react");
|
|
17210
17252
|
var import_styled_components116 = __toESM(require("styled-components"));
|
|
17211
|
-
var
|
|
17253
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
17212
17254
|
var sharedStyles = import_styled_components116.css`
|
|
17213
17255
|
color: var(--wui-color-text);
|
|
17214
17256
|
padding: var(--wui-space-02);
|
|
@@ -17229,41 +17271,41 @@ var StyledTd = import_styled_components116.default.td`
|
|
|
17229
17271
|
var TableCell = ({ children, ...props }) => {
|
|
17230
17272
|
const section = (0, import_react94.useContext)(TableSectionContext);
|
|
17231
17273
|
if (section === "head") {
|
|
17232
|
-
return /* @__PURE__ */ (0,
|
|
17274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(StyledTh, { ...props, children });
|
|
17233
17275
|
}
|
|
17234
|
-
return /* @__PURE__ */ (0,
|
|
17276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(StyledTd, { ...props, children });
|
|
17235
17277
|
};
|
|
17236
17278
|
|
|
17237
17279
|
// src/components/Table/TableFoot.tsx
|
|
17238
17280
|
var import_react95 = require("react");
|
|
17239
17281
|
var import_styled_components117 = __toESM(require("styled-components"));
|
|
17240
|
-
var
|
|
17282
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
17241
17283
|
var StyledTableFoot = import_styled_components117.default.tfoot``;
|
|
17242
17284
|
var TableFoot = ({ children, ...props }) => {
|
|
17243
|
-
return /* @__PURE__ */ (0,
|
|
17285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(StyledTableFoot, { ...props, children }) });
|
|
17244
17286
|
};
|
|
17245
17287
|
|
|
17246
17288
|
// src/components/Table/TableHead.tsx
|
|
17247
17289
|
var import_react96 = require("react");
|
|
17248
17290
|
var import_styled_components118 = __toESM(require("styled-components"));
|
|
17249
|
-
var
|
|
17291
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
17250
17292
|
var StyledThead = import_styled_components118.default.thead``;
|
|
17251
17293
|
var TableHead = ({ children, ...props }) => {
|
|
17252
|
-
return /* @__PURE__ */ (0,
|
|
17294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(StyledThead, { ...props, children }) });
|
|
17253
17295
|
};
|
|
17254
17296
|
|
|
17255
17297
|
// src/components/Table/TableRow.tsx
|
|
17256
17298
|
var import_styled_components119 = __toESM(require("styled-components"));
|
|
17257
|
-
var
|
|
17299
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
17258
17300
|
var StyledTableRow = import_styled_components119.default.tr``;
|
|
17259
17301
|
var TableRow = ({ children, ...props }) => {
|
|
17260
|
-
return /* @__PURE__ */ (0,
|
|
17302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(StyledTableRow, { ...props, children });
|
|
17261
17303
|
};
|
|
17262
17304
|
|
|
17263
17305
|
// src/components/Tabs/Tabs.tsx
|
|
17264
17306
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
17265
17307
|
var import_react98 = require("react");
|
|
17266
|
-
var
|
|
17308
|
+
var import_type_guards67 = require("@wistia/type-guards");
|
|
17267
17309
|
|
|
17268
17310
|
// src/components/Tabs/useTabsValue.tsx
|
|
17269
17311
|
var import_react97 = require("react");
|
|
@@ -17278,7 +17320,7 @@ var useTabsValue = () => {
|
|
|
17278
17320
|
};
|
|
17279
17321
|
|
|
17280
17322
|
// src/components/Tabs/Tabs.tsx
|
|
17281
|
-
var
|
|
17323
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
17282
17324
|
var Tabs = ({
|
|
17283
17325
|
children,
|
|
17284
17326
|
value: valueProp,
|
|
@@ -17300,21 +17342,21 @@ var Tabs = ({
|
|
|
17300
17342
|
...props,
|
|
17301
17343
|
onValueChange
|
|
17302
17344
|
};
|
|
17303
|
-
if ((0,
|
|
17345
|
+
if ((0, import_type_guards67.isNotNil)(value)) {
|
|
17304
17346
|
rootProps.value = value;
|
|
17305
17347
|
}
|
|
17306
|
-
if ((0,
|
|
17348
|
+
if ((0, import_type_guards67.isNotNil)(defaultValue)) {
|
|
17307
17349
|
rootProps.defaultValue = defaultValue;
|
|
17308
17350
|
}
|
|
17309
|
-
return /* @__PURE__ */ (0,
|
|
17351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(SelectedItemStyleProvider, { children }) }) });
|
|
17310
17352
|
};
|
|
17311
17353
|
Tabs.displayName = "Tabs_UI";
|
|
17312
17354
|
|
|
17313
17355
|
// src/components/Tabs/TabsContent.tsx
|
|
17314
17356
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
17315
|
-
var
|
|
17357
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
17316
17358
|
var TabsContent = ({ children, value }) => {
|
|
17317
|
-
return /* @__PURE__ */ (0,
|
|
17359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_react_tabs2.Content, { value, children });
|
|
17318
17360
|
};
|
|
17319
17361
|
TabsContent.displayName = "TabsContent_UI";
|
|
17320
17362
|
|
|
@@ -17323,7 +17365,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
|
17323
17365
|
var import_styled_components121 = __toESM(require("styled-components"));
|
|
17324
17366
|
|
|
17325
17367
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17326
|
-
var
|
|
17368
|
+
var import_type_guards68 = require("@wistia/type-guards");
|
|
17327
17369
|
|
|
17328
17370
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
17329
17371
|
var import_styled_components120 = __toESM(require("styled-components"));
|
|
@@ -17334,14 +17376,14 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components120.default)(Sele
|
|
|
17334
17376
|
`;
|
|
17335
17377
|
|
|
17336
17378
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17337
|
-
var
|
|
17379
|
+
var import_jsx_runtime320 = require("react/jsx-runtime");
|
|
17338
17380
|
var SelectedTabIndicator = () => {
|
|
17339
17381
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
17340
17382
|
const selectedValue = useTabsValue();
|
|
17341
|
-
if (selectedValue == null || (0,
|
|
17383
|
+
if (selectedValue == null || (0, import_type_guards68.isUndefined)(selectedItemIndicatorStyle)) {
|
|
17342
17384
|
return null;
|
|
17343
17385
|
}
|
|
17344
|
-
return /* @__PURE__ */ (0,
|
|
17386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
17345
17387
|
TabsSelectedItemIndicatorDiv,
|
|
17346
17388
|
{
|
|
17347
17389
|
"data-wui-selected-item-indicator": true,
|
|
@@ -17351,19 +17393,19 @@ var SelectedTabIndicator = () => {
|
|
|
17351
17393
|
};
|
|
17352
17394
|
|
|
17353
17395
|
// src/components/Tabs/TabsList.tsx
|
|
17354
|
-
var
|
|
17396
|
+
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
17355
17397
|
var StyledRadixTabsList = (0, import_styled_components121.default)(import_react_tabs3.List)`
|
|
17356
17398
|
${segmentedControlStyles}
|
|
17357
17399
|
`;
|
|
17358
17400
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
17359
|
-
return /* @__PURE__ */ (0,
|
|
17401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
|
|
17360
17402
|
StyledRadixTabsList,
|
|
17361
17403
|
{
|
|
17362
17404
|
$fullWidth: fullWidth,
|
|
17363
17405
|
"aria-label": props["aria-label"],
|
|
17364
17406
|
children: [
|
|
17365
17407
|
children,
|
|
17366
|
-
/* @__PURE__ */ (0,
|
|
17408
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)(SelectedTabIndicator, {})
|
|
17367
17409
|
]
|
|
17368
17410
|
}
|
|
17369
17411
|
);
|
|
@@ -17372,7 +17414,7 @@ TabsList.displayName = "TabsList_UI";
|
|
|
17372
17414
|
|
|
17373
17415
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17374
17416
|
var import_react99 = require("react");
|
|
17375
|
-
var
|
|
17417
|
+
var import_type_guards69 = require("@wistia/type-guards");
|
|
17376
17418
|
|
|
17377
17419
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
17378
17420
|
var import_styled_components122 = __toESM(require("styled-components"));
|
|
@@ -17386,7 +17428,7 @@ var StyledRadixTabsTrigger = (0, import_styled_components122.default)(import_rea
|
|
|
17386
17428
|
`;
|
|
17387
17429
|
|
|
17388
17430
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17389
|
-
var
|
|
17431
|
+
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
17390
17432
|
var TabsTrigger = (0, import_react99.forwardRef)(
|
|
17391
17433
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
17392
17434
|
const selectedValue = useTabsValue();
|
|
@@ -17418,13 +17460,13 @@ var TabsTrigger = (0, import_react99.forwardRef)(
|
|
|
17418
17460
|
resizeObserver.disconnect();
|
|
17419
17461
|
};
|
|
17420
17462
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
17421
|
-
return /* @__PURE__ */ (0,
|
|
17463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
|
|
17422
17464
|
StyledRadixTabsTrigger,
|
|
17423
17465
|
{
|
|
17424
17466
|
...otherProps,
|
|
17425
17467
|
ref: combinedRef,
|
|
17426
|
-
$hasLabel: (0,
|
|
17427
|
-
"aria-label": (0,
|
|
17468
|
+
$hasLabel: (0, import_type_guards69.isNotNil)(label),
|
|
17469
|
+
"aria-label": (0, import_type_guards69.isNotNil)(label) ? void 0 : ariaLabel,
|
|
17428
17470
|
disabled,
|
|
17429
17471
|
value,
|
|
17430
17472
|
children: [
|
|
@@ -17439,8 +17481,8 @@ TabsTrigger.displayName = "TabsTrigger_UI";
|
|
|
17439
17481
|
|
|
17440
17482
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
17441
17483
|
var import_styled_components123 = __toESM(require("styled-components"));
|
|
17442
|
-
var
|
|
17443
|
-
var
|
|
17484
|
+
var import_type_guards70 = require("@wistia/type-guards");
|
|
17485
|
+
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
17444
17486
|
var StyledThumbnailBadge = import_styled_components123.default.div`
|
|
17445
17487
|
align-items: center;
|
|
17446
17488
|
background-color: rgb(0 0 0 / 50%);
|
|
@@ -17467,9 +17509,9 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
|
|
|
17467
17509
|
}
|
|
17468
17510
|
`;
|
|
17469
17511
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
17470
|
-
return /* @__PURE__ */ (0,
|
|
17471
|
-
(0,
|
|
17472
|
-
/* @__PURE__ */ (0,
|
|
17512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(StyledThumbnailBadge, { ...props, children: [
|
|
17513
|
+
(0, import_type_guards70.isNotNil)(icon) && icon,
|
|
17514
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("span", { children: label })
|
|
17473
17515
|
] });
|
|
17474
17516
|
};
|
|
17475
17517
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
@@ -17477,10 +17519,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
|
17477
17519
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17478
17520
|
var import_react100 = require("react");
|
|
17479
17521
|
var import_styled_components126 = __toESM(require("styled-components"));
|
|
17480
|
-
var
|
|
17522
|
+
var import_type_guards73 = require("@wistia/type-guards");
|
|
17481
17523
|
|
|
17482
17524
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17483
|
-
var
|
|
17525
|
+
var import_type_guards71 = require("@wistia/type-guards");
|
|
17484
17526
|
var import_styled_components124 = require("styled-components");
|
|
17485
17527
|
var gradients = {
|
|
17486
17528
|
defaultDarkOne: import_styled_components124.css`
|
|
@@ -17608,13 +17650,13 @@ var gradients = {
|
|
|
17608
17650
|
};
|
|
17609
17651
|
var gradientMap = Object.keys(gradients);
|
|
17610
17652
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
17611
|
-
return (0,
|
|
17653
|
+
return (0, import_type_guards71.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
17612
17654
|
};
|
|
17613
17655
|
|
|
17614
17656
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
17615
17657
|
var import_styled_components125 = __toESM(require("styled-components"));
|
|
17616
|
-
var
|
|
17617
|
-
var
|
|
17658
|
+
var import_type_guards72 = require("@wistia/type-guards");
|
|
17659
|
+
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
17618
17660
|
var ScrubLine = import_styled_components125.default.div`
|
|
17619
17661
|
position: absolute;
|
|
17620
17662
|
top: 0;
|
|
@@ -17707,8 +17749,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17707
17749
|
);
|
|
17708
17750
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
17709
17751
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
17710
|
-
const showScrubLine = (0,
|
|
17711
|
-
const scrubLinePosition = (0,
|
|
17752
|
+
const showScrubLine = (0, import_type_guards72.isNotNil)(cursorPosition);
|
|
17753
|
+
const scrubLinePosition = (0, import_type_guards72.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
17712
17754
|
const viewerStyles = {
|
|
17713
17755
|
position: "relative",
|
|
17714
17756
|
overflow: "hidden",
|
|
@@ -17726,14 +17768,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17726
17768
|
backgroundPosition,
|
|
17727
17769
|
backgroundSize
|
|
17728
17770
|
};
|
|
17729
|
-
return /* @__PURE__ */ (0,
|
|
17771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
|
|
17730
17772
|
"div",
|
|
17731
17773
|
{
|
|
17732
17774
|
...props,
|
|
17733
17775
|
style: viewerStyles,
|
|
17734
17776
|
children: [
|
|
17735
|
-
/* @__PURE__ */ (0,
|
|
17736
|
-
showScrubLine ? /* @__PURE__ */ (0,
|
|
17777
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { style: storyboardStyles }),
|
|
17778
|
+
showScrubLine ? /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17737
17779
|
ScrubLine,
|
|
17738
17780
|
{
|
|
17739
17781
|
style: {
|
|
@@ -17747,7 +17789,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17747
17789
|
};
|
|
17748
17790
|
|
|
17749
17791
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17750
|
-
var
|
|
17792
|
+
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
17751
17793
|
var WideThumbnailImage = import_styled_components126.default.img`
|
|
17752
17794
|
height: 100%;
|
|
17753
17795
|
object-fit: cover;
|
|
@@ -17760,7 +17802,7 @@ var SquareThumbnailImage = import_styled_components126.default.img`
|
|
|
17760
17802
|
`;
|
|
17761
17803
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
17762
17804
|
if (thumbnailImageType === "wide") {
|
|
17763
|
-
return /* @__PURE__ */ (0,
|
|
17805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17764
17806
|
WideThumbnailImage,
|
|
17765
17807
|
{
|
|
17766
17808
|
alt: "",
|
|
@@ -17769,7 +17811,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17769
17811
|
}
|
|
17770
17812
|
);
|
|
17771
17813
|
}
|
|
17772
|
-
return /* @__PURE__ */ (0,
|
|
17814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17773
17815
|
SquareThumbnailImage,
|
|
17774
17816
|
{
|
|
17775
17817
|
alt: "",
|
|
@@ -17779,10 +17821,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17779
17821
|
);
|
|
17780
17822
|
};
|
|
17781
17823
|
var StyledThumbnail = import_styled_components126.default.div`
|
|
17782
|
-
background-image: ${({ $backgroundUrl }) => (0,
|
|
17824
|
+
background-image: ${({ $backgroundUrl }) => (0, import_type_guards73.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17783
17825
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17784
17826
|
// if we don't have $backgroundUrl show a gradient
|
|
17785
|
-
(0,
|
|
17827
|
+
(0, import_type_guards73.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
17786
17828
|
)};
|
|
17787
17829
|
background-position: center center;
|
|
17788
17830
|
background-size: cover;
|
|
@@ -17798,6 +17840,40 @@ var StyledThumbnail = import_styled_components126.default.div`
|
|
|
17798
17840
|
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
17799
17841
|
}
|
|
17800
17842
|
`;
|
|
17843
|
+
var StoryboardRenderer = ({
|
|
17844
|
+
storyboard,
|
|
17845
|
+
width,
|
|
17846
|
+
percent,
|
|
17847
|
+
cursorPosition,
|
|
17848
|
+
isStoryboardReady
|
|
17849
|
+
}) => {
|
|
17850
|
+
const {
|
|
17851
|
+
url,
|
|
17852
|
+
width: sbWidth,
|
|
17853
|
+
height: sbHeight,
|
|
17854
|
+
frameHeight,
|
|
17855
|
+
frameWidth,
|
|
17856
|
+
frameCount,
|
|
17857
|
+
aspectRatio
|
|
17858
|
+
} = storyboard;
|
|
17859
|
+
const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
17860
|
+
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17862
|
+
ThumbnailStoryboardViewer,
|
|
17863
|
+
{
|
|
17864
|
+
cursorPosition: effectiveCursorPosition,
|
|
17865
|
+
frameCount,
|
|
17866
|
+
frameHeight,
|
|
17867
|
+
frameWidth,
|
|
17868
|
+
percent,
|
|
17869
|
+
storyboardHeight: sbHeight,
|
|
17870
|
+
storyboardUrl: url,
|
|
17871
|
+
storyboardWidth: sbWidth,
|
|
17872
|
+
targetAspectRatio: aspectRatio,
|
|
17873
|
+
targetWidth
|
|
17874
|
+
}
|
|
17875
|
+
);
|
|
17876
|
+
};
|
|
17801
17877
|
var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
17802
17878
|
const rect = elem.getBoundingClientRect();
|
|
17803
17879
|
const relativeLeft = mouseEvent.clientX - rect.left;
|
|
@@ -17824,10 +17900,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17824
17900
|
const storyboardElementRef = (0, import_react100.useRef)(null);
|
|
17825
17901
|
const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
|
|
17826
17902
|
const backgroundUrl = (0, import_react100.useMemo)(
|
|
17827
|
-
() => thumbnailImageType === "square" && (0,
|
|
17903
|
+
() => thumbnailImageType === "square" && (0, import_type_guards73.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
17828
17904
|
[thumbnailImageType, thumbnailUrl]
|
|
17829
17905
|
);
|
|
17830
|
-
const isScrubbable = (0,
|
|
17906
|
+
const isScrubbable = (0, import_type_guards73.isNotNil)(storyboard);
|
|
17831
17907
|
const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
|
|
17832
17908
|
if (storyboardElementRef.current || !storyboard) {
|
|
17833
17909
|
return storyboardElementRef.current;
|
|
@@ -17857,42 +17933,25 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17857
17933
|
setCursorPosition(null);
|
|
17858
17934
|
}, [isScrubbable]);
|
|
17859
17935
|
const shouldRenderStoryboard = (0, import_react100.useMemo)(() => {
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17863
|
-
|
|
17864
|
-
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
frameWidth,
|
|
17870
|
-
frameCount,
|
|
17871
|
-
aspectRatio
|
|
17872
|
-
} = storyboard;
|
|
17873
|
-
const targetWidth = (0, import_type_guards72.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
17874
|
-
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17875
|
-
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17876
|
-
ThumbnailStoryboardViewer,
|
|
17936
|
+
if ((0, import_type_guards73.isNil)(storyboard) || (0, import_type_guards73.isUndefined)(height) || (0, import_type_guards73.isEmptyString)(height)) {
|
|
17937
|
+
return false;
|
|
17938
|
+
}
|
|
17939
|
+
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
17940
|
+
}, [isScrubbable, isMouseOver, isStoryboardReady, storyboard, height]);
|
|
17941
|
+
let thumbnailContent = null;
|
|
17942
|
+
if (storyboard && shouldRenderStoryboard) {
|
|
17943
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17944
|
+
StoryboardRenderer,
|
|
17877
17945
|
{
|
|
17878
|
-
cursorPosition
|
|
17879
|
-
|
|
17880
|
-
frameHeight,
|
|
17881
|
-
frameWidth,
|
|
17946
|
+
cursorPosition,
|
|
17947
|
+
isStoryboardReady,
|
|
17882
17948
|
percent,
|
|
17883
|
-
|
|
17884
|
-
|
|
17885
|
-
storyboardWidth: sbWidth,
|
|
17886
|
-
targetAspectRatio: aspectRatio,
|
|
17887
|
-
targetWidth
|
|
17949
|
+
storyboard,
|
|
17950
|
+
width
|
|
17888
17951
|
}
|
|
17889
17952
|
);
|
|
17890
|
-
}
|
|
17891
|
-
|
|
17892
|
-
if (shouldRenderStoryboard) {
|
|
17893
|
-
thumbnailContent = renderStoryboard();
|
|
17894
|
-
} else if ((0, import_type_guards72.isNotNil)(thumbnailUrl)) {
|
|
17895
|
-
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
17953
|
+
} else if ((0, import_type_guards73.isNotNil)(thumbnailUrl)) {
|
|
17954
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
17896
17955
|
ThumbnailImage,
|
|
17897
17956
|
{
|
|
17898
17957
|
thumbnailImageType,
|
|
@@ -17902,7 +17961,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17902
17961
|
} else {
|
|
17903
17962
|
thumbnailContent = null;
|
|
17904
17963
|
}
|
|
17905
|
-
return /* @__PURE__ */ (0,
|
|
17964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
|
|
17906
17965
|
StyledThumbnail,
|
|
17907
17966
|
{
|
|
17908
17967
|
ref,
|
|
@@ -17916,7 +17975,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
17916
17975
|
onMouseOut: handleMouseOut,
|
|
17917
17976
|
role: "presentation",
|
|
17918
17977
|
children: [
|
|
17919
|
-
(0,
|
|
17978
|
+
(0, import_type_guards73.isNotNil)(children) ? children : null,
|
|
17920
17979
|
thumbnailContent
|
|
17921
17980
|
]
|
|
17922
17981
|
}
|
|
@@ -17928,8 +17987,8 @@ Thumbnail.displayName = "Thumbnail_UI";
|
|
|
17928
17987
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
17929
17988
|
var import_react101 = __toESM(require("react"));
|
|
17930
17989
|
var import_styled_components127 = __toESM(require("styled-components"));
|
|
17931
|
-
var
|
|
17932
|
-
var
|
|
17990
|
+
var import_type_guards74 = require("@wistia/type-guards");
|
|
17991
|
+
var import_jsx_runtime326 = (
|
|
17933
17992
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
17934
17993
|
require("react/jsx-runtime")
|
|
17935
17994
|
);
|
|
@@ -18008,13 +18067,13 @@ var ThumbnailCollage = ({
|
|
|
18008
18067
|
}) => {
|
|
18009
18068
|
const thumbnailArray = import_react101.default.Children.toArray(children);
|
|
18010
18069
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
18011
|
-
const thumbnails = (0,
|
|
18070
|
+
const thumbnails = (0, import_type_guards74.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
18012
18071
|
return import_react101.default.cloneElement(child, {
|
|
18013
18072
|
...child.props,
|
|
18014
18073
|
children: void 0
|
|
18015
18074
|
});
|
|
18016
18075
|
}) : [
|
|
18017
|
-
/* @__PURE__ */ (0,
|
|
18076
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
18018
18077
|
Thumbnail,
|
|
18019
18078
|
{
|
|
18020
18079
|
gradientBackground,
|
|
@@ -18023,7 +18082,7 @@ var ThumbnailCollage = ({
|
|
|
18023
18082
|
"fallback"
|
|
18024
18083
|
)
|
|
18025
18084
|
];
|
|
18026
|
-
return /* @__PURE__ */ (0,
|
|
18085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
18027
18086
|
StyledThumbnailCollage,
|
|
18028
18087
|
{
|
|
18029
18088
|
$gradientBackground: gradientBackground,
|
|
@@ -18036,25 +18095,25 @@ var ThumbnailCollage = ({
|
|
|
18036
18095
|
|
|
18037
18096
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
18038
18097
|
var import_styled_components128 = __toESM(require("styled-components"));
|
|
18039
|
-
var
|
|
18040
|
-
var
|
|
18098
|
+
var import_type_guards75 = require("@wistia/type-guards");
|
|
18099
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
18041
18100
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
18042
18101
|
if (iconOnly) {
|
|
18043
|
-
return /* @__PURE__ */ (0,
|
|
18102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18044
18103
|
"g",
|
|
18045
18104
|
{
|
|
18046
18105
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
18047
18106
|
fill: brandmarkColor,
|
|
18048
|
-
children: /* @__PURE__ */ (0,
|
|
18107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime327.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" })
|
|
18049
18108
|
}
|
|
18050
18109
|
);
|
|
18051
18110
|
}
|
|
18052
|
-
return /* @__PURE__ */ (0,
|
|
18111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18053
18112
|
"g",
|
|
18054
18113
|
{
|
|
18055
18114
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
18056
18115
|
fill: brandmarkColor,
|
|
18057
|
-
children: /* @__PURE__ */ (0,
|
|
18116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime327.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" })
|
|
18058
18117
|
}
|
|
18059
18118
|
);
|
|
18060
18119
|
};
|
|
@@ -18062,12 +18121,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
18062
18121
|
if (iconOnly) {
|
|
18063
18122
|
return null;
|
|
18064
18123
|
}
|
|
18065
|
-
return /* @__PURE__ */ (0,
|
|
18124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18066
18125
|
"g",
|
|
18067
18126
|
{
|
|
18068
18127
|
"data-testid": "ui-wistia-logo-logotype",
|
|
18069
18128
|
fill: logotypeColor,
|
|
18070
|
-
children: /* @__PURE__ */ (0,
|
|
18129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime327.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" })
|
|
18071
18130
|
}
|
|
18072
18131
|
);
|
|
18073
18132
|
};
|
|
@@ -18135,7 +18194,7 @@ var WistiaLogo = ({
|
|
|
18135
18194
|
};
|
|
18136
18195
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
18137
18196
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
18138
|
-
const Logo = /* @__PURE__ */ (0,
|
|
18197
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
|
|
18139
18198
|
WistiaLogoComponent,
|
|
18140
18199
|
{
|
|
18141
18200
|
$hoverColor: hoverColor,
|
|
@@ -18148,21 +18207,21 @@ var WistiaLogo = ({
|
|
|
18148
18207
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18149
18208
|
...props,
|
|
18150
18209
|
children: [
|
|
18151
|
-
/* @__PURE__ */ (0,
|
|
18152
|
-
(0,
|
|
18210
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("title", { children: title }),
|
|
18211
|
+
(0, import_type_guards75.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("desc", { children: description }) : null,
|
|
18153
18212
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
18154
18213
|
renderLogotype(logotypeColor, iconOnly)
|
|
18155
18214
|
]
|
|
18156
18215
|
}
|
|
18157
18216
|
);
|
|
18158
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
18217
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("a", { href, children: Logo }) : Logo;
|
|
18159
18218
|
};
|
|
18160
18219
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
18161
18220
|
|
|
18162
18221
|
// src/components/SplitButton/SplitButton.tsx
|
|
18163
18222
|
var import_styled_components129 = __toESM(require("styled-components"));
|
|
18164
|
-
var
|
|
18165
|
-
var
|
|
18223
|
+
var import_type_guards76 = require("@wistia/type-guards");
|
|
18224
|
+
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
18166
18225
|
var StyledSplitButton = import_styled_components129.default.span`
|
|
18167
18226
|
white-space: nowrap;
|
|
18168
18227
|
|
|
@@ -18180,7 +18239,7 @@ var StyledSplitButton = import_styled_components129.default.span`
|
|
|
18180
18239
|
var SplitButton = ({
|
|
18181
18240
|
children,
|
|
18182
18241
|
menuLabel = "Select an option",
|
|
18183
|
-
menuIcon = /* @__PURE__ */ (0,
|
|
18242
|
+
menuIcon = /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(Icon, { type: "caret-down" }),
|
|
18184
18243
|
menuItems,
|
|
18185
18244
|
disabled = false,
|
|
18186
18245
|
colorScheme = "default",
|
|
@@ -18191,8 +18250,8 @@ var SplitButton = ({
|
|
|
18191
18250
|
menuProps = {},
|
|
18192
18251
|
...props
|
|
18193
18252
|
}) => {
|
|
18194
|
-
return /* @__PURE__ */ (0,
|
|
18195
|
-
/* @__PURE__ */ (0,
|
|
18253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(StyledSplitButton, { children: [
|
|
18254
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18196
18255
|
Button,
|
|
18197
18256
|
{
|
|
18198
18257
|
colorScheme,
|
|
@@ -18204,12 +18263,12 @@ var SplitButton = ({
|
|
|
18204
18263
|
children
|
|
18205
18264
|
}
|
|
18206
18265
|
),
|
|
18207
|
-
(0,
|
|
18266
|
+
(0, import_type_guards76.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18208
18267
|
Menu,
|
|
18209
18268
|
{
|
|
18210
18269
|
...menuProps,
|
|
18211
18270
|
disabled,
|
|
18212
|
-
trigger: /* @__PURE__ */ (0,
|
|
18271
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18213
18272
|
IconButton,
|
|
18214
18273
|
{
|
|
18215
18274
|
colorScheme,
|
|
@@ -18224,7 +18283,7 @@ var SplitButton = ({
|
|
|
18224
18283
|
children: menuItems
|
|
18225
18284
|
}
|
|
18226
18285
|
),
|
|
18227
|
-
(0,
|
|
18286
|
+
(0, import_type_guards76.isNotNil)(secondaryAction) && secondaryAction
|
|
18228
18287
|
] });
|
|
18229
18288
|
};
|
|
18230
18289
|
SplitButton.displayName = "SplitButton_UI";
|
|
@@ -18316,6 +18375,8 @@ SplitButton.displayName = "SplitButton_UI";
|
|
|
18316
18375
|
MenuLabel,
|
|
18317
18376
|
MenuRadioGroup,
|
|
18318
18377
|
Modal,
|
|
18378
|
+
ModalCallout,
|
|
18379
|
+
ModalCallouts,
|
|
18319
18380
|
PersistentFileAmountLimitValidator,
|
|
18320
18381
|
Popover,
|
|
18321
18382
|
ProgressBar,
|