@wistia/ui 0.9.3-beta.c5a74df6.2618334 → 0.9.3
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 +358 -264
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +64 -24
- package/dist/index.d.ts +64 -24
- package/dist/index.mjs +317 -221
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.9.3
|
|
3
|
+
* @license @wistia/ui v0.9.3
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -103,16 +103,14 @@ __export(index_exports, {
|
|
|
103
103
|
Stack: () => Stack,
|
|
104
104
|
SubMenu: () => SubMenu,
|
|
105
105
|
Switch: () => Switch,
|
|
106
|
-
|
|
106
|
+
Tab: () => Tab,
|
|
107
107
|
Table: () => Table,
|
|
108
108
|
TableBody: () => TableBody,
|
|
109
109
|
TableCell: () => TableCell,
|
|
110
110
|
TableFoot: () => TableFoot,
|
|
111
111
|
TableHead: () => TableHead,
|
|
112
112
|
TableRow: () => TableRow,
|
|
113
|
-
|
|
114
|
-
TabsList: () => TabsList,
|
|
115
|
-
TabsRoot: () => TabsRoot,
|
|
113
|
+
Tabs: () => Tabs,
|
|
116
114
|
Tag: () => Tag,
|
|
117
115
|
Text: () => Text,
|
|
118
116
|
Thumbnail: () => Thumbnail,
|
|
@@ -11844,7 +11842,7 @@ var segmentedControlItemStyles = import_styled_components73.css`
|
|
|
11844
11842
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11845
11843
|
}
|
|
11846
11844
|
|
|
11847
|
-
&:hover:not([data-state='on'], [data-state='active']
|
|
11845
|
+
&:hover:not([data-state='on'], [data-state='active']) {
|
|
11848
11846
|
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
11849
11847
|
}
|
|
11850
11848
|
|
|
@@ -12401,9 +12399,65 @@ var TableRow = ({ children, ...props }) => {
|
|
|
12401
12399
|
return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(StyledTableRow, { ...props, children });
|
|
12402
12400
|
};
|
|
12403
12401
|
|
|
12404
|
-
// src/components/Tabs/
|
|
12402
|
+
// src/components/Tabs/Tabs.tsx
|
|
12403
|
+
var import_react69 = require("react");
|
|
12404
|
+
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
12405
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
12406
|
+
var import_styled_components88 = __toESM(require("styled-components"));
|
|
12407
|
+
|
|
12408
|
+
// src/components/Tabs/TabPanel.tsx
|
|
12409
|
+
var import_styled_components84 = __toESM(require("styled-components"));
|
|
12405
12410
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
12411
|
+
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
12412
|
+
var StyledTabPanel = (0, import_styled_components84.default)(import_react_tabs.Content)`
|
|
12413
|
+
display: flex;
|
|
12414
|
+
flex-direction: column;
|
|
12415
|
+
`;
|
|
12416
|
+
var TabPanel = ({ children, value, ...props }) => {
|
|
12417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
12418
|
+
StyledTabPanel,
|
|
12419
|
+
{
|
|
12420
|
+
value,
|
|
12421
|
+
...props,
|
|
12422
|
+
children
|
|
12423
|
+
}
|
|
12424
|
+
);
|
|
12425
|
+
};
|
|
12426
|
+
TabPanel.displayName = "TabPanel";
|
|
12427
|
+
|
|
12428
|
+
// src/components/Tabs/TabList.tsx
|
|
12429
|
+
var import_styled_components85 = __toESM(require("styled-components"));
|
|
12430
|
+
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
12431
|
+
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
12432
|
+
var StyledTabList = (0, import_styled_components85.default)(import_react_tabs2.List)`
|
|
12433
|
+
${segmentedControlStyles}
|
|
12434
|
+
|
|
12435
|
+
margin-bottom: var(--wui-space-04);
|
|
12436
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
12437
|
+
align-self: ${({ $fullWidth }) => $fullWidth ? "auto" : "flex-start"};
|
|
12438
|
+
`;
|
|
12439
|
+
var TabList = ({
|
|
12440
|
+
children,
|
|
12441
|
+
fullWidth,
|
|
12442
|
+
ariaLabel,
|
|
12443
|
+
...props
|
|
12444
|
+
}) => {
|
|
12445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12446
|
+
StyledTabList,
|
|
12447
|
+
{
|
|
12448
|
+
$fullWidth: fullWidth,
|
|
12449
|
+
"aria-label": ariaLabel,
|
|
12450
|
+
...props,
|
|
12451
|
+
children
|
|
12452
|
+
}
|
|
12453
|
+
);
|
|
12454
|
+
};
|
|
12455
|
+
TabList.displayName = "TabList";
|
|
12456
|
+
|
|
12457
|
+
// src/components/Tabs/TabItem.tsx
|
|
12406
12458
|
var import_react67 = require("react");
|
|
12459
|
+
var import_styled_components86 = __toESM(require("styled-components"));
|
|
12460
|
+
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
12407
12461
|
var import_type_guards50 = require("@wistia/type-guards");
|
|
12408
12462
|
|
|
12409
12463
|
// src/components/Tabs/useTabsValue.tsx
|
|
@@ -12418,114 +12472,22 @@ var useTabsValue = () => {
|
|
|
12418
12472
|
return context;
|
|
12419
12473
|
};
|
|
12420
12474
|
|
|
12421
|
-
// src/components/Tabs/
|
|
12422
|
-
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
12423
|
-
var TabsRoot = ({
|
|
12424
|
-
children,
|
|
12425
|
-
value: valueProp,
|
|
12426
|
-
onValueChange: onValueChangeProp,
|
|
12427
|
-
defaultValue,
|
|
12428
|
-
...props
|
|
12429
|
-
}) => {
|
|
12430
|
-
const [value, setValue] = (0, import_react67.useState)(valueProp ?? defaultValue);
|
|
12431
|
-
const onValueChange = (0, import_react67.useCallback)(
|
|
12432
|
-
(newValue) => {
|
|
12433
|
-
setValue(newValue);
|
|
12434
|
-
if (onValueChangeProp) {
|
|
12435
|
-
onValueChangeProp(newValue);
|
|
12436
|
-
}
|
|
12437
|
-
},
|
|
12438
|
-
[onValueChangeProp]
|
|
12439
|
-
);
|
|
12440
|
-
const rootProps = {
|
|
12441
|
-
...props,
|
|
12442
|
-
onValueChange
|
|
12443
|
-
};
|
|
12444
|
-
if ((0, import_type_guards50.isNotNil)(value)) {
|
|
12445
|
-
rootProps.value = value;
|
|
12446
|
-
}
|
|
12447
|
-
if ((0, import_type_guards50.isNotNil)(defaultValue)) {
|
|
12448
|
-
rootProps.defaultValue = defaultValue;
|
|
12449
|
-
}
|
|
12450
|
-
return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(SelectedItemStyleProvider, { children }) }) });
|
|
12451
|
-
};
|
|
12452
|
-
TabsRoot.displayName = "TabsRoot";
|
|
12453
|
-
|
|
12454
|
-
// src/components/Tabs/TabsContent.tsx
|
|
12455
|
-
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
12456
|
-
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
12457
|
-
var TabsContent = ({ children, value }) => {
|
|
12458
|
-
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_react_tabs2.Content, { value, children });
|
|
12459
|
-
};
|
|
12460
|
-
TabsContent.displayName = "TabsContent";
|
|
12461
|
-
|
|
12462
|
-
// src/components/Tabs/TabsList.tsx
|
|
12463
|
-
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
12464
|
-
var import_styled_components85 = __toESM(require("styled-components"));
|
|
12465
|
-
|
|
12466
|
-
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
12467
|
-
var import_styled_components84 = __toESM(require("styled-components"));
|
|
12468
|
-
var TabsSelectedItemIndicatorDiv = (0, import_styled_components84.default)(SelectedItemIndicatorDiv)`
|
|
12469
|
-
&:has(~ button[role='tab']:focus-visible) {
|
|
12470
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
12471
|
-
}
|
|
12472
|
-
`;
|
|
12473
|
-
|
|
12474
|
-
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
12475
|
+
// src/components/Tabs/TabItem.tsx
|
|
12475
12476
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
12476
|
-
var
|
|
12477
|
-
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
12478
|
-
const selectedValue = useTabsValue();
|
|
12479
|
-
if (selectedValue == null) {
|
|
12480
|
-
return null;
|
|
12481
|
-
}
|
|
12482
|
-
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
12483
|
-
};
|
|
12484
|
-
|
|
12485
|
-
// src/components/Tabs/TabsList.tsx
|
|
12486
|
-
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
12487
|
-
var StyledRadixTabsList = (0, import_styled_components85.default)(import_react_tabs3.List)`
|
|
12488
|
-
${segmentedControlStyles}
|
|
12489
|
-
`;
|
|
12490
|
-
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
12491
|
-
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
12492
|
-
StyledRadixTabsList,
|
|
12493
|
-
{
|
|
12494
|
-
$fullWidth: fullWidth,
|
|
12495
|
-
"aria-label": props["aria-label"],
|
|
12496
|
-
children: [
|
|
12497
|
-
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(SelectedTabIndicator, {}),
|
|
12498
|
-
children
|
|
12499
|
-
]
|
|
12500
|
-
}
|
|
12501
|
-
);
|
|
12502
|
-
};
|
|
12503
|
-
TabsList.displayName = "TabsList";
|
|
12504
|
-
|
|
12505
|
-
// src/components/Tabs/TabTrigger.tsx
|
|
12506
|
-
var import_react68 = require("react");
|
|
12507
|
-
var import_type_guards51 = require("@wistia/type-guards");
|
|
12508
|
-
|
|
12509
|
-
// src/components/Tabs/StyledRadixTabTrigger.tsx
|
|
12510
|
-
var import_styled_components86 = __toESM(require("styled-components"));
|
|
12511
|
-
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
12512
|
-
var StyledRadixTabTrigger = (0, import_styled_components86.default)(import_react_tabs4.Trigger)`
|
|
12477
|
+
var StyledTabItem = (0, import_styled_components86.default)(import_react_tabs3.Trigger)`
|
|
12513
12478
|
${segmentedControlItemStyles}
|
|
12514
12479
|
|
|
12515
12480
|
&:focus-visible {
|
|
12516
12481
|
outline: none;
|
|
12517
12482
|
}
|
|
12518
12483
|
`;
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
12522
|
-
var TabTrigger = (0, import_react68.forwardRef)(
|
|
12523
|
-
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
12484
|
+
var TabItem = (0, import_react67.forwardRef)(
|
|
12485
|
+
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
12524
12486
|
const selectedValue = useTabsValue();
|
|
12525
12487
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
12526
|
-
const buttonRef = (0,
|
|
12488
|
+
const buttonRef = (0, import_react67.useRef)(null);
|
|
12527
12489
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
12528
|
-
(0,
|
|
12490
|
+
(0, import_react67.useEffect)(() => {
|
|
12529
12491
|
const buttonElem = buttonRef.current;
|
|
12530
12492
|
if (!buttonElem) {
|
|
12531
12493
|
return void 0;
|
|
@@ -12550,13 +12512,12 @@ var TabTrigger = (0, import_react68.forwardRef)(
|
|
|
12550
12512
|
resizeObserver.disconnect();
|
|
12551
12513
|
};
|
|
12552
12514
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
12553
|
-
return /* @__PURE__ */ (0,
|
|
12554
|
-
|
|
12515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(
|
|
12516
|
+
StyledTabItem,
|
|
12555
12517
|
{
|
|
12556
|
-
...otherProps,
|
|
12557
12518
|
ref: combinedRef,
|
|
12558
|
-
$hasLabel: (0,
|
|
12559
|
-
"aria-label": (0,
|
|
12519
|
+
$hasLabel: (0, import_type_guards50.isNotNil)(label),
|
|
12520
|
+
"aria-label": (0, import_type_guards50.isNotNil)(label) ? void 0 : ariaLabel,
|
|
12560
12521
|
disabled,
|
|
12561
12522
|
value,
|
|
12562
12523
|
children: [
|
|
@@ -12567,14 +12528,176 @@ var TabTrigger = (0, import_react68.forwardRef)(
|
|
|
12567
12528
|
);
|
|
12568
12529
|
}
|
|
12569
12530
|
);
|
|
12570
|
-
|
|
12531
|
+
TabItem.displayName = "TabItem";
|
|
12571
12532
|
|
|
12572
|
-
// src/components/
|
|
12573
|
-
var
|
|
12533
|
+
// src/components/Tabs/extractTabItems.ts
|
|
12534
|
+
var import_react68 = require("react");
|
|
12535
|
+
var extractTabItems = (children) => {
|
|
12536
|
+
const tabItems = [];
|
|
12537
|
+
import_react68.Children.forEach(children, (child) => {
|
|
12538
|
+
if (!(0, import_react68.isValidElement)(child)) {
|
|
12539
|
+
return;
|
|
12540
|
+
}
|
|
12541
|
+
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
12542
|
+
tabItems.push(child);
|
|
12543
|
+
} else if (child.type === import_react68.Fragment) {
|
|
12544
|
+
const fragmentElement = child;
|
|
12545
|
+
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
12546
|
+
} else if ((child.props.children ?? null) != null) {
|
|
12547
|
+
const childChildren = child.props.children;
|
|
12548
|
+
tabItems.push(...extractTabItems(childChildren));
|
|
12549
|
+
} else {
|
|
12550
|
+
}
|
|
12551
|
+
});
|
|
12552
|
+
return tabItems;
|
|
12553
|
+
};
|
|
12554
|
+
|
|
12555
|
+
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
12574
12556
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
12575
|
-
var
|
|
12557
|
+
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
12558
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components87.default)(SelectedItemIndicatorDiv)`
|
|
12559
|
+
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
12560
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
12561
|
+
}
|
|
12562
|
+
`;
|
|
12563
|
+
var SelectedItemIndicator2 = () => {
|
|
12564
|
+
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
12565
|
+
const selectedValue = useTabsValue();
|
|
12566
|
+
if (selectedValue == null) {
|
|
12567
|
+
return null;
|
|
12568
|
+
}
|
|
12569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
12570
|
+
};
|
|
12571
|
+
|
|
12572
|
+
// src/components/Tabs/Tabs.tsx
|
|
12573
|
+
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
12574
|
+
var TabsContainer = import_styled_components88.default.div`
|
|
12575
|
+
display: flex;
|
|
12576
|
+
flex-direction: column;
|
|
12577
|
+
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12578
|
+
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12579
|
+
`;
|
|
12580
|
+
var StickyTabContent = import_styled_components88.default.div`
|
|
12581
|
+
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
12582
|
+
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
12583
|
+
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12584
|
+
`;
|
|
12585
|
+
var StyledTabsRoot = (0, import_styled_components88.default)(import_react_tabs4.Root)`
|
|
12586
|
+
display: flex;
|
|
12587
|
+
flex-direction: column;
|
|
12588
|
+
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12589
|
+
`;
|
|
12590
|
+
var Tabs = (0, import_react69.forwardRef)(
|
|
12591
|
+
({
|
|
12592
|
+
children,
|
|
12593
|
+
fullWidth = true,
|
|
12594
|
+
"aria-label": ariaLabel,
|
|
12595
|
+
defaultSelectedValue,
|
|
12596
|
+
selectedValue,
|
|
12597
|
+
onSelectedValueChange,
|
|
12598
|
+
stickyHeaders = true,
|
|
12599
|
+
...props
|
|
12600
|
+
}, ref) => {
|
|
12601
|
+
const tabItems = extractTabItems(children);
|
|
12602
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react69.useState)(defaultSelectedValue);
|
|
12603
|
+
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
12604
|
+
defaultValue: defaultSelectedValue,
|
|
12605
|
+
onValueChange: setInternalSelectedValue
|
|
12606
|
+
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
12607
|
+
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
12608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12609
|
+
StyledTabsRoot,
|
|
12610
|
+
{
|
|
12611
|
+
ref,
|
|
12612
|
+
$stickyHeaders: stickyHeaders,
|
|
12613
|
+
activationMode: "automatic",
|
|
12614
|
+
...props,
|
|
12615
|
+
...modeProps,
|
|
12616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(SelectedItemStyleProvider, { children: [
|
|
12617
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12618
|
+
TabList,
|
|
12619
|
+
{
|
|
12620
|
+
ariaLabel,
|
|
12621
|
+
fullWidth,
|
|
12622
|
+
children: [
|
|
12623
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(SelectedItemIndicator2, {}),
|
|
12624
|
+
tabItems.map((tab) => {
|
|
12625
|
+
const {
|
|
12626
|
+
value,
|
|
12627
|
+
disabled = false,
|
|
12628
|
+
icon,
|
|
12629
|
+
label,
|
|
12630
|
+
"aria-label": ariaLabelForTab
|
|
12631
|
+
} = tab.props;
|
|
12632
|
+
if ((0, import_type_guards51.isNil)(icon)) {
|
|
12633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12634
|
+
TabItem,
|
|
12635
|
+
{
|
|
12636
|
+
disabled,
|
|
12637
|
+
label,
|
|
12638
|
+
value
|
|
12639
|
+
},
|
|
12640
|
+
value
|
|
12641
|
+
);
|
|
12642
|
+
}
|
|
12643
|
+
if ((0, import_type_guards51.isNotNil)(label)) {
|
|
12644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12645
|
+
TabItem,
|
|
12646
|
+
{
|
|
12647
|
+
disabled,
|
|
12648
|
+
icon,
|
|
12649
|
+
label,
|
|
12650
|
+
value
|
|
12651
|
+
},
|
|
12652
|
+
value
|
|
12653
|
+
);
|
|
12654
|
+
}
|
|
12655
|
+
if ((0, import_type_guards51.isNotNil)(ariaLabelForTab)) {
|
|
12656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12657
|
+
TabItem,
|
|
12658
|
+
{
|
|
12659
|
+
"aria-label": ariaLabelForTab,
|
|
12660
|
+
disabled,
|
|
12661
|
+
icon,
|
|
12662
|
+
value
|
|
12663
|
+
},
|
|
12664
|
+
value
|
|
12665
|
+
);
|
|
12666
|
+
}
|
|
12667
|
+
throw new Error("A `Tab` with an icon must have either label or aria-label");
|
|
12668
|
+
})
|
|
12669
|
+
]
|
|
12670
|
+
}
|
|
12671
|
+
),
|
|
12672
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12673
|
+
TabPanel,
|
|
12674
|
+
{
|
|
12675
|
+
value: tab.props.value,
|
|
12676
|
+
children: tab.props.children
|
|
12677
|
+
},
|
|
12678
|
+
tab.props.value
|
|
12679
|
+
)) })
|
|
12680
|
+
] }) })
|
|
12681
|
+
}
|
|
12682
|
+
) });
|
|
12683
|
+
}
|
|
12684
|
+
);
|
|
12685
|
+
Tabs.displayName = "Tabs";
|
|
12686
|
+
|
|
12687
|
+
// src/components/Tabs/Tab.tsx
|
|
12688
|
+
var import_react70 = require("react");
|
|
12576
12689
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
12577
|
-
var
|
|
12690
|
+
var Tab = (0, import_react70.forwardRef)(({ children }, ref) => {
|
|
12691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { ref, children });
|
|
12692
|
+
});
|
|
12693
|
+
Tab.displayName = "Tab";
|
|
12694
|
+
|
|
12695
|
+
// src/components/Tag/Tag.tsx
|
|
12696
|
+
var import_react71 = require("react");
|
|
12697
|
+
var import_styled_components89 = __toESM(require("styled-components"));
|
|
12698
|
+
var import_type_guards52 = require("@wistia/type-guards");
|
|
12699
|
+
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
12700
|
+
var TagLabel = import_styled_components89.default.a`
|
|
12578
12701
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12579
12702
|
font-size: var(--wui-typography-label-4-size);
|
|
12580
12703
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -12609,14 +12732,14 @@ var TagLabel = import_styled_components87.default.a`
|
|
|
12609
12732
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12610
12733
|
}
|
|
12611
12734
|
`;
|
|
12612
|
-
var TagDivider =
|
|
12735
|
+
var TagDivider = import_styled_components89.default.div`
|
|
12613
12736
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12614
12737
|
border-left: 1px solid var(--wui-color-border);
|
|
12615
12738
|
display: flex;
|
|
12616
12739
|
height: 14px;
|
|
12617
12740
|
width: 1px;
|
|
12618
12741
|
`;
|
|
12619
|
-
var StyledRemoveButton =
|
|
12742
|
+
var StyledRemoveButton = import_styled_components89.default.button`
|
|
12620
12743
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12621
12744
|
all: unset;
|
|
12622
12745
|
cursor: pointer;
|
|
@@ -12644,7 +12767,7 @@ var StyledRemoveButton = import_styled_components87.default.button`
|
|
|
12644
12767
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12645
12768
|
}
|
|
12646
12769
|
`;
|
|
12647
|
-
var StyledTag =
|
|
12770
|
+
var StyledTag = import_styled_components89.default.div`
|
|
12648
12771
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12649
12772
|
align-items: center;
|
|
12650
12773
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12665,40 +12788,40 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12665
12788
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
12666
12789
|
);
|
|
12667
12790
|
}
|
|
12668
|
-
return /* @__PURE__ */ (0,
|
|
12669
|
-
/* @__PURE__ */ (0,
|
|
12670
|
-
/* @__PURE__ */ (0,
|
|
12791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(import_jsx_runtime270.Fragment, { children: [
|
|
12792
|
+
/* @__PURE__ */ (0, import_jsx_runtime270.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
12793
|
+
/* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
|
|
12671
12794
|
StyledRemoveButton,
|
|
12672
12795
|
{
|
|
12673
12796
|
$colorScheme: colorScheme,
|
|
12674
12797
|
onClick: onClickRemove,
|
|
12675
12798
|
type: "button",
|
|
12676
12799
|
children: [
|
|
12677
|
-
/* @__PURE__ */ (0,
|
|
12800
|
+
/* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
12678
12801
|
Icon,
|
|
12679
12802
|
{
|
|
12680
12803
|
size: "sm",
|
|
12681
12804
|
type: "close"
|
|
12682
12805
|
}
|
|
12683
12806
|
),
|
|
12684
|
-
/* @__PURE__ */ (0,
|
|
12807
|
+
/* @__PURE__ */ (0, import_jsx_runtime270.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
12685
12808
|
]
|
|
12686
12809
|
}
|
|
12687
12810
|
)
|
|
12688
12811
|
] });
|
|
12689
12812
|
};
|
|
12690
|
-
var Tag = (0,
|
|
12813
|
+
var Tag = (0, import_react71.forwardRef)(
|
|
12691
12814
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12692
12815
|
const hasIcon = (0, import_type_guards52.isNotNil)(icon);
|
|
12693
12816
|
const labelProps = (0, import_type_guards52.isNotNil)(href) && (0, import_type_guards52.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
12694
|
-
return /* @__PURE__ */ (0,
|
|
12817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
|
|
12695
12818
|
StyledTag,
|
|
12696
12819
|
{
|
|
12697
12820
|
ref,
|
|
12698
12821
|
$colorScheme: colorScheme,
|
|
12699
12822
|
...props,
|
|
12700
12823
|
children: [
|
|
12701
|
-
/* @__PURE__ */ (0,
|
|
12824
|
+
/* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
|
|
12702
12825
|
TagLabel,
|
|
12703
12826
|
{
|
|
12704
12827
|
...labelProps,
|
|
@@ -12709,7 +12832,7 @@ var Tag = (0, import_react69.forwardRef)(
|
|
|
12709
12832
|
]
|
|
12710
12833
|
}
|
|
12711
12834
|
),
|
|
12712
|
-
/* @__PURE__ */ (0,
|
|
12835
|
+
/* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
12713
12836
|
RemoveButton,
|
|
12714
12837
|
{
|
|
12715
12838
|
colorScheme,
|
|
@@ -12725,10 +12848,10 @@ var Tag = (0, import_react69.forwardRef)(
|
|
|
12725
12848
|
Tag.displayName = "Tag";
|
|
12726
12849
|
|
|
12727
12850
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12728
|
-
var
|
|
12851
|
+
var import_styled_components90 = __toESM(require("styled-components"));
|
|
12729
12852
|
var import_type_guards53 = require("@wistia/type-guards");
|
|
12730
|
-
var
|
|
12731
|
-
var StyledThumbnailBadge =
|
|
12853
|
+
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
12854
|
+
var StyledThumbnailBadge = import_styled_components90.default.div`
|
|
12732
12855
|
align-items: center;
|
|
12733
12856
|
background-color: rgb(0 0 0 / 50%);
|
|
12734
12857
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -12753,23 +12876,23 @@ var StyledThumbnailBadge = import_styled_components88.default.div`
|
|
|
12753
12876
|
}
|
|
12754
12877
|
`;
|
|
12755
12878
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
12756
|
-
return /* @__PURE__ */ (0,
|
|
12879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(StyledThumbnailBadge, { ...props, children: [
|
|
12757
12880
|
(0, import_type_guards53.isNotNil)(icon) && icon,
|
|
12758
|
-
/* @__PURE__ */ (0,
|
|
12881
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)("span", { children: label })
|
|
12759
12882
|
] });
|
|
12760
12883
|
};
|
|
12761
12884
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
12762
12885
|
|
|
12763
12886
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12764
|
-
var
|
|
12765
|
-
var
|
|
12766
|
-
var
|
|
12887
|
+
var import_react72 = require("react");
|
|
12888
|
+
var import_styled_components92 = __toESM(require("styled-components"));
|
|
12889
|
+
var import_type_guards55 = require("@wistia/type-guards");
|
|
12767
12890
|
|
|
12768
12891
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12769
12892
|
var import_type_guards54 = require("@wistia/type-guards");
|
|
12770
|
-
var
|
|
12893
|
+
var import_styled_components91 = require("styled-components");
|
|
12771
12894
|
var gradients = {
|
|
12772
|
-
defaultDarkOne:
|
|
12895
|
+
defaultDarkOne: import_styled_components91.css`
|
|
12773
12896
|
background-color: #222d66;
|
|
12774
12897
|
background-image:
|
|
12775
12898
|
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
@@ -12777,7 +12900,7 @@ var gradients = {
|
|
|
12777
12900
|
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
12778
12901
|
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
12779
12902
|
`,
|
|
12780
|
-
defaultDarkTwo:
|
|
12903
|
+
defaultDarkTwo: import_styled_components91.css`
|
|
12781
12904
|
background-color: #222d66;
|
|
12782
12905
|
background-image:
|
|
12783
12906
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
@@ -12785,7 +12908,7 @@ var gradients = {
|
|
|
12785
12908
|
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12786
12909
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12787
12910
|
`,
|
|
12788
|
-
defaultLightOne:
|
|
12911
|
+
defaultLightOne: import_styled_components91.css`
|
|
12789
12912
|
background-color: #ccd5ff;
|
|
12790
12913
|
background-image:
|
|
12791
12914
|
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
@@ -12793,13 +12916,13 @@ var gradients = {
|
|
|
12793
12916
|
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
12794
12917
|
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
12795
12918
|
`,
|
|
12796
|
-
defaultLightTwo:
|
|
12919
|
+
defaultLightTwo: import_styled_components91.css`
|
|
12797
12920
|
background-color: #ccd5ff;
|
|
12798
12921
|
background-image:
|
|
12799
12922
|
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
12800
12923
|
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
12801
12924
|
`,
|
|
12802
|
-
defaultMidOne:
|
|
12925
|
+
defaultMidOne: import_styled_components91.css`
|
|
12803
12926
|
background-color: #6b84ff;
|
|
12804
12927
|
background-image:
|
|
12805
12928
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
@@ -12807,13 +12930,13 @@ var gradients = {
|
|
|
12807
12930
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
12808
12931
|
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
12809
12932
|
`,
|
|
12810
|
-
defaultMidTwo:
|
|
12933
|
+
defaultMidTwo: import_styled_components91.css`
|
|
12811
12934
|
background-color: #6b84ff;
|
|
12812
12935
|
background-image:
|
|
12813
12936
|
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
12814
12937
|
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
12815
12938
|
`,
|
|
12816
|
-
green:
|
|
12939
|
+
green: import_styled_components91.css`
|
|
12817
12940
|
background-color: #fafffa;
|
|
12818
12941
|
background-image:
|
|
12819
12942
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -12821,7 +12944,7 @@ var gradients = {
|
|
|
12821
12944
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12822
12945
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12823
12946
|
`,
|
|
12824
|
-
greenWithPop:
|
|
12947
|
+
greenWithPop: import_styled_components91.css`
|
|
12825
12948
|
background-color: #fafffa;
|
|
12826
12949
|
background-image:
|
|
12827
12950
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -12829,7 +12952,7 @@ var gradients = {
|
|
|
12829
12952
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12830
12953
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12831
12954
|
`,
|
|
12832
|
-
pink:
|
|
12955
|
+
pink: import_styled_components91.css`
|
|
12833
12956
|
background-color: #fffff0;
|
|
12834
12957
|
background-image:
|
|
12835
12958
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
@@ -12837,7 +12960,7 @@ var gradients = {
|
|
|
12837
12960
|
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12838
12961
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
12839
12962
|
`,
|
|
12840
|
-
pinkWithPop:
|
|
12963
|
+
pinkWithPop: import_styled_components91.css`
|
|
12841
12964
|
background-color: #fffff0;
|
|
12842
12965
|
background-image:
|
|
12843
12966
|
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
@@ -12845,7 +12968,7 @@ var gradients = {
|
|
|
12845
12968
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
12846
12969
|
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
12847
12970
|
`,
|
|
12848
|
-
playfulGradientOne:
|
|
12971
|
+
playfulGradientOne: import_styled_components91.css`
|
|
12849
12972
|
background-color: #f7f8ff;
|
|
12850
12973
|
background-image:
|
|
12851
12974
|
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
@@ -12853,7 +12976,7 @@ var gradients = {
|
|
|
12853
12976
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
12854
12977
|
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
12855
12978
|
`,
|
|
12856
|
-
playfulGradientTwo:
|
|
12979
|
+
playfulGradientTwo: import_styled_components91.css`
|
|
12857
12980
|
background-color: #f7f8ff;
|
|
12858
12981
|
background-image:
|
|
12859
12982
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
@@ -12861,13 +12984,13 @@ var gradients = {
|
|
|
12861
12984
|
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
12862
12985
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12863
12986
|
`,
|
|
12864
|
-
purple:
|
|
12987
|
+
purple: import_styled_components91.css`
|
|
12865
12988
|
background-color: #f2caff;
|
|
12866
12989
|
background-image:
|
|
12867
12990
|
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
12868
12991
|
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
12869
12992
|
`,
|
|
12870
|
-
purpleWithPop:
|
|
12993
|
+
purpleWithPop: import_styled_components91.css`
|
|
12871
12994
|
background-color: #f2caff;
|
|
12872
12995
|
background-image:
|
|
12873
12996
|
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
@@ -12875,7 +12998,7 @@ var gradients = {
|
|
|
12875
12998
|
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
12876
12999
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12877
13000
|
`,
|
|
12878
|
-
yellow:
|
|
13001
|
+
yellow: import_styled_components91.css`
|
|
12879
13002
|
background-color: #fffff0;
|
|
12880
13003
|
background-image:
|
|
12881
13004
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -12883,7 +13006,7 @@ var gradients = {
|
|
|
12883
13006
|
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12884
13007
|
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
12885
13008
|
`,
|
|
12886
|
-
yellowWithPop:
|
|
13009
|
+
yellowWithPop: import_styled_components91.css`
|
|
12887
13010
|
background-color: #fffff0;
|
|
12888
13011
|
background-image:
|
|
12889
13012
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -12898,17 +13021,7 @@ var getBackgroundGradient = (gradientName = void 0) => {
|
|
|
12898
13021
|
};
|
|
12899
13022
|
|
|
12900
13023
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
12901
|
-
var
|
|
12902
|
-
var import_type_guards55 = require("@wistia/type-guards");
|
|
12903
|
-
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
12904
|
-
var ScrubLine = import_styled_components90.default.div`
|
|
12905
|
-
position: absolute;
|
|
12906
|
-
top: 0;
|
|
12907
|
-
height: 100%;
|
|
12908
|
-
width: 2px;
|
|
12909
|
-
background-color: var(--wui-color-bg-fill);
|
|
12910
|
-
z-index: 1;
|
|
12911
|
-
`;
|
|
13024
|
+
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
12912
13025
|
var getScaledDimensions = (originalAspectRatio, targetAspectRatio, viewerWidth, viewerHeight) => {
|
|
12913
13026
|
let scaledHeight = viewerHeight;
|
|
12914
13027
|
let scaledWidth = viewerWidth;
|
|
@@ -12948,7 +13061,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
12948
13061
|
targetAspectRatio,
|
|
12949
13062
|
scaleFactor = 1,
|
|
12950
13063
|
framesPerRow = 10,
|
|
12951
|
-
|
|
13064
|
+
shouldLoadStoryboard = true,
|
|
12952
13065
|
...props
|
|
12953
13066
|
}) => {
|
|
12954
13067
|
const originalAspectRatio = frameWidth / frameHeight;
|
|
@@ -12984,9 +13097,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
12984
13097
|
storyboardHeight * scaleFactorFromAspectRatioFit * scaleFactor
|
|
12985
13098
|
);
|
|
12986
13099
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
12987
|
-
const backgroundImage = `url(${storyboardUrl})
|
|
12988
|
-
const showScrubLine = (0, import_type_guards55.isNotNil)(cursorPosition);
|
|
12989
|
-
const scrubLinePosition = (0, import_type_guards55.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
13100
|
+
const backgroundImage = shouldLoadStoryboard ? `url(${storyboardUrl})` : "";
|
|
12990
13101
|
const viewerStyles = {
|
|
12991
13102
|
position: "relative",
|
|
12992
13103
|
overflow: "hidden",
|
|
@@ -13003,41 +13114,31 @@ var ThumbnailStoryboardViewer = ({
|
|
|
13003
13114
|
backgroundPosition,
|
|
13004
13115
|
backgroundSize
|
|
13005
13116
|
};
|
|
13006
|
-
return /* @__PURE__ */ (0,
|
|
13117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
13007
13118
|
"div",
|
|
13008
13119
|
{
|
|
13009
13120
|
...props,
|
|
13010
13121
|
style: viewerStyles,
|
|
13011
|
-
children:
|
|
13012
|
-
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)("div", { style: storyboardStyles }),
|
|
13013
|
-
showScrubLine ? /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
13014
|
-
ScrubLine,
|
|
13015
|
-
{
|
|
13016
|
-
style: {
|
|
13017
|
-
left: scrubLinePosition
|
|
13018
|
-
}
|
|
13019
|
-
}
|
|
13020
|
-
) : null
|
|
13021
|
-
]
|
|
13122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { style: storyboardStyles })
|
|
13022
13123
|
}
|
|
13023
13124
|
);
|
|
13024
13125
|
};
|
|
13025
13126
|
|
|
13026
13127
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
13027
|
-
var
|
|
13028
|
-
var WideThumbnailImage =
|
|
13128
|
+
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
13129
|
+
var WideThumbnailImage = import_styled_components92.default.img`
|
|
13029
13130
|
height: 100%;
|
|
13030
13131
|
object-fit: cover;
|
|
13031
13132
|
width: 100%;
|
|
13032
13133
|
`;
|
|
13033
|
-
var SquareThumbnailImage =
|
|
13134
|
+
var SquareThumbnailImage = import_styled_components92.default.img`
|
|
13034
13135
|
backdrop-filter: blur(8px);
|
|
13035
13136
|
object-fit: contain;
|
|
13036
13137
|
width: 100%;
|
|
13037
13138
|
`;
|
|
13038
13139
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
13039
13140
|
if (thumbnailImageType === "wide") {
|
|
13040
|
-
return /* @__PURE__ */ (0,
|
|
13141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
13041
13142
|
WideThumbnailImage,
|
|
13042
13143
|
{
|
|
13043
13144
|
alt: "",
|
|
@@ -13046,7 +13147,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
13046
13147
|
}
|
|
13047
13148
|
);
|
|
13048
13149
|
}
|
|
13049
|
-
return /* @__PURE__ */ (0,
|
|
13150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
13050
13151
|
SquareThumbnailImage,
|
|
13051
13152
|
{
|
|
13052
13153
|
alt: "",
|
|
@@ -13055,11 +13156,11 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
13055
13156
|
}
|
|
13056
13157
|
);
|
|
13057
13158
|
};
|
|
13058
|
-
var StyledThumbnail =
|
|
13059
|
-
background-image: ${({ $backgroundUrl }) => (0,
|
|
13159
|
+
var StyledThumbnail = import_styled_components92.default.div`
|
|
13160
|
+
background-image: ${({ $backgroundUrl }) => (0, import_type_guards55.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
13060
13161
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
13061
13162
|
// if we don't have $backgroundUrl show a gradient
|
|
13062
|
-
(0,
|
|
13163
|
+
(0, import_type_guards55.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
13063
13164
|
)};
|
|
13064
13165
|
background-position: center center;
|
|
13065
13166
|
background-size: cover;
|
|
@@ -13068,7 +13169,7 @@ var StyledThumbnail = import_styled_components91.default.div`
|
|
|
13068
13169
|
overflow: hidden;
|
|
13069
13170
|
position: relative;
|
|
13070
13171
|
width: ${({ $width }) => $width};
|
|
13071
|
-
${({ $isScrubbable }) => $isScrubbable && "cursor:
|
|
13172
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: ew-resize;"}
|
|
13072
13173
|
|
|
13073
13174
|
&,
|
|
13074
13175
|
img {
|
|
@@ -13084,7 +13185,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
13084
13185
|
left: relativeLeft
|
|
13085
13186
|
};
|
|
13086
13187
|
};
|
|
13087
|
-
var Thumbnail = (0,
|
|
13188
|
+
var Thumbnail = (0, import_react72.forwardRef)(
|
|
13088
13189
|
({
|
|
13089
13190
|
gradientBackground = "defaultMidOne",
|
|
13090
13191
|
thumbnailImageType = "square",
|
|
@@ -13095,17 +13196,16 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13095
13196
|
height,
|
|
13096
13197
|
...props
|
|
13097
13198
|
}, ref) => {
|
|
13098
|
-
const [percent, setPercent] = (0,
|
|
13099
|
-
const [isMouseOver, setIsMouseOver] = (0,
|
|
13100
|
-
const [isStoryboardReady, setIsStoryboardReady] = (0,
|
|
13101
|
-
const storyboardElementRef = (0,
|
|
13102
|
-
const
|
|
13103
|
-
|
|
13104
|
-
() => thumbnailImageType === "square" && (0, import_type_guards56.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
13199
|
+
const [percent, setPercent] = (0, import_react72.useState)(0);
|
|
13200
|
+
const [isMouseOver, setIsMouseOver] = (0, import_react72.useState)(false);
|
|
13201
|
+
const [isStoryboardReady, setIsStoryboardReady] = (0, import_react72.useState)(false);
|
|
13202
|
+
const storyboardElementRef = (0, import_react72.useRef)(null);
|
|
13203
|
+
const backgroundUrl = (0, import_react72.useMemo)(
|
|
13204
|
+
() => thumbnailImageType === "square" && (0, import_type_guards55.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
13105
13205
|
[thumbnailImageType, thumbnailUrl]
|
|
13106
13206
|
);
|
|
13107
|
-
const isScrubbable = (0,
|
|
13108
|
-
const trackStoryboardLoadStatus = (0,
|
|
13207
|
+
const isScrubbable = (0, import_type_guards55.isNotNil)(storyboard);
|
|
13208
|
+
const trackStoryboardLoadStatus = (0, import_react72.useCallback)(() => {
|
|
13109
13209
|
if (storyboardElementRef.current || !storyboard) {
|
|
13110
13210
|
return storyboardElementRef.current;
|
|
13111
13211
|
}
|
|
@@ -13115,7 +13215,7 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13115
13215
|
storyboardElementRef.current = asset;
|
|
13116
13216
|
return storyboardElementRef.current;
|
|
13117
13217
|
}, [storyboard]);
|
|
13118
|
-
const handleMouseMove = (0,
|
|
13218
|
+
const handleMouseMove = (0, import_react72.useCallback)(
|
|
13119
13219
|
(mouseEvent) => {
|
|
13120
13220
|
if (!isScrubbable) return;
|
|
13121
13221
|
const elem = mouseEvent.currentTarget;
|
|
@@ -13123,21 +13223,19 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13123
13223
|
const newPercent = relMousePos.left / elem.clientWidth;
|
|
13124
13224
|
trackStoryboardLoadStatus();
|
|
13125
13225
|
setPercent(newPercent);
|
|
13126
|
-
setCursorPosition(relMousePos.left);
|
|
13127
13226
|
setIsMouseOver(true);
|
|
13128
13227
|
},
|
|
13129
13228
|
[isScrubbable, trackStoryboardLoadStatus]
|
|
13130
13229
|
);
|
|
13131
|
-
const handleMouseOut = (0,
|
|
13230
|
+
const handleMouseOut = (0, import_react72.useCallback)(() => {
|
|
13132
13231
|
if (!isScrubbable) return;
|
|
13133
13232
|
setIsMouseOver(false);
|
|
13134
|
-
setCursorPosition(null);
|
|
13135
13233
|
}, [isScrubbable]);
|
|
13136
|
-
const shouldRenderStoryboard = (0,
|
|
13234
|
+
const shouldRenderStoryboard = (0, import_react72.useMemo)(() => {
|
|
13137
13235
|
return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
|
|
13138
13236
|
}, [isScrubbable, isMouseOver, isStoryboardReady]);
|
|
13139
|
-
const renderStoryboard = (0,
|
|
13140
|
-
if (!storyboard || (0,
|
|
13237
|
+
const renderStoryboard = (0, import_react72.useCallback)(() => {
|
|
13238
|
+
if (!storyboard || (0, import_type_guards55.isUndefined)(height) || (0, import_type_guards55.isEmptyString)(height)) return null;
|
|
13141
13239
|
const {
|
|
13142
13240
|
url,
|
|
13143
13241
|
width: sbWidth,
|
|
@@ -13147,12 +13245,10 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13147
13245
|
frameCount,
|
|
13148
13246
|
aspectRatio
|
|
13149
13247
|
} = storyboard;
|
|
13150
|
-
const targetWidth = (0,
|
|
13151
|
-
|
|
13152
|
-
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
13248
|
+
const targetWidth = (0, import_type_guards55.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
13249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
13153
13250
|
ThumbnailStoryboardViewer,
|
|
13154
13251
|
{
|
|
13155
|
-
cursorPosition: effectiveCursorPosition,
|
|
13156
13252
|
frameCount,
|
|
13157
13253
|
frameHeight,
|
|
13158
13254
|
frameWidth,
|
|
@@ -13164,12 +13260,12 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13164
13260
|
targetWidth
|
|
13165
13261
|
}
|
|
13166
13262
|
);
|
|
13167
|
-
}, [storyboard, percent, width, height
|
|
13263
|
+
}, [storyboard, percent, width, height]);
|
|
13168
13264
|
let thumbnailContent = null;
|
|
13169
13265
|
if (shouldRenderStoryboard) {
|
|
13170
13266
|
thumbnailContent = renderStoryboard();
|
|
13171
|
-
} else if ((0,
|
|
13172
|
-
thumbnailContent = /* @__PURE__ */ (0,
|
|
13267
|
+
} else if ((0, import_type_guards55.isNotNil)(thumbnailUrl)) {
|
|
13268
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
13173
13269
|
ThumbnailImage,
|
|
13174
13270
|
{
|
|
13175
13271
|
thumbnailImageType,
|
|
@@ -13179,7 +13275,7 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13179
13275
|
} else {
|
|
13180
13276
|
thumbnailContent = null;
|
|
13181
13277
|
}
|
|
13182
|
-
return /* @__PURE__ */ (0,
|
|
13278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(
|
|
13183
13279
|
StyledThumbnail,
|
|
13184
13280
|
{
|
|
13185
13281
|
ref,
|
|
@@ -13193,7 +13289,7 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13193
13289
|
onMouseOut: handleMouseOut,
|
|
13194
13290
|
role: "presentation",
|
|
13195
13291
|
children: [
|
|
13196
|
-
(0,
|
|
13292
|
+
(0, import_type_guards55.isNotNil)(children) ? children : null,
|
|
13197
13293
|
thumbnailContent
|
|
13198
13294
|
]
|
|
13199
13295
|
}
|
|
@@ -13203,14 +13299,14 @@ var Thumbnail = (0, import_react70.forwardRef)(
|
|
|
13203
13299
|
Thumbnail.displayName = "Thumbnail";
|
|
13204
13300
|
|
|
13205
13301
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
13206
|
-
var
|
|
13207
|
-
var
|
|
13208
|
-
var
|
|
13209
|
-
var
|
|
13302
|
+
var import_react73 = __toESM(require("react"));
|
|
13303
|
+
var import_styled_components93 = __toESM(require("styled-components"));
|
|
13304
|
+
var import_type_guards56 = require("@wistia/type-guards");
|
|
13305
|
+
var import_jsx_runtime274 = (
|
|
13210
13306
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
13211
13307
|
require("react/jsx-runtime")
|
|
13212
13308
|
);
|
|
13213
|
-
var StyledThumbnailCollage =
|
|
13309
|
+
var StyledThumbnailCollage = import_styled_components93.default.div`
|
|
13214
13310
|
display: grid;
|
|
13215
13311
|
gap: var(--wui-space-01);
|
|
13216
13312
|
width: 100%;
|
|
@@ -13283,15 +13379,15 @@ var ThumbnailCollage = ({
|
|
|
13283
13379
|
gradientBackground = "defaultMidOne",
|
|
13284
13380
|
...props
|
|
13285
13381
|
}) => {
|
|
13286
|
-
const thumbnailArray =
|
|
13382
|
+
const thumbnailArray = import_react73.default.Children.toArray(children);
|
|
13287
13383
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
13288
|
-
const thumbnails = (0,
|
|
13289
|
-
return
|
|
13384
|
+
const thumbnails = (0, import_type_guards56.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
13385
|
+
return import_react73.default.cloneElement(child, {
|
|
13290
13386
|
...child.props,
|
|
13291
13387
|
children: void 0
|
|
13292
13388
|
});
|
|
13293
13389
|
}) : [
|
|
13294
|
-
/* @__PURE__ */ (0,
|
|
13390
|
+
/* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
13295
13391
|
Thumbnail,
|
|
13296
13392
|
{
|
|
13297
13393
|
gradientBackground,
|
|
@@ -13300,7 +13396,7 @@ var ThumbnailCollage = ({
|
|
|
13300
13396
|
"fallback"
|
|
13301
13397
|
)
|
|
13302
13398
|
];
|
|
13303
|
-
return /* @__PURE__ */ (0,
|
|
13399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
13304
13400
|
StyledThumbnailCollage,
|
|
13305
13401
|
{
|
|
13306
13402
|
$gradientBackground: gradientBackground,
|
|
@@ -13312,26 +13408,26 @@ var ThumbnailCollage = ({
|
|
|
13312
13408
|
};
|
|
13313
13409
|
|
|
13314
13410
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
13315
|
-
var
|
|
13316
|
-
var
|
|
13317
|
-
var
|
|
13411
|
+
var import_styled_components94 = __toESM(require("styled-components"));
|
|
13412
|
+
var import_type_guards57 = require("@wistia/type-guards");
|
|
13413
|
+
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
13318
13414
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
13319
13415
|
if (iconOnly) {
|
|
13320
|
-
return /* @__PURE__ */ (0,
|
|
13416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
13321
13417
|
"g",
|
|
13322
13418
|
{
|
|
13323
13419
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
13324
13420
|
fill: brandmarkColor,
|
|
13325
|
-
children: /* @__PURE__ */ (0,
|
|
13421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime275.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" })
|
|
13326
13422
|
}
|
|
13327
13423
|
);
|
|
13328
13424
|
}
|
|
13329
|
-
return /* @__PURE__ */ (0,
|
|
13425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
13330
13426
|
"g",
|
|
13331
13427
|
{
|
|
13332
13428
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
13333
13429
|
fill: brandmarkColor,
|
|
13334
|
-
children: /* @__PURE__ */ (0,
|
|
13430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime275.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" })
|
|
13335
13431
|
}
|
|
13336
13432
|
);
|
|
13337
13433
|
};
|
|
@@ -13339,12 +13435,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
13339
13435
|
if (iconOnly) {
|
|
13340
13436
|
return null;
|
|
13341
13437
|
}
|
|
13342
|
-
return /* @__PURE__ */ (0,
|
|
13438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
13343
13439
|
"g",
|
|
13344
13440
|
{
|
|
13345
13441
|
"data-testid": "ui-wistia-logo-logotype",
|
|
13346
13442
|
fill: logotypeColor,
|
|
13347
|
-
children: /* @__PURE__ */ (0,
|
|
13443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime275.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" })
|
|
13348
13444
|
}
|
|
13349
13445
|
);
|
|
13350
13446
|
};
|
|
@@ -13354,7 +13450,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
13354
13450
|
}
|
|
13355
13451
|
return "0 0 144 31.47";
|
|
13356
13452
|
};
|
|
13357
|
-
var WistiaLogoComponent =
|
|
13453
|
+
var WistiaLogoComponent = import_styled_components94.default.svg`
|
|
13358
13454
|
height: ${({ height }) => `${height}px`};
|
|
13359
13455
|
|
|
13360
13456
|
/* ensure it will always fit on mobile */
|
|
@@ -13370,12 +13466,12 @@ var WistiaLogoComponent = import_styled_components93.default.svg`
|
|
|
13370
13466
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
13371
13467
|
if ($opticallyCentered) {
|
|
13372
13468
|
if ($iconOnly) {
|
|
13373
|
-
return
|
|
13469
|
+
return import_styled_components94.css`
|
|
13374
13470
|
aspect-ratio: 1;
|
|
13375
13471
|
padding: 11.85% 3.12% 13.91%;
|
|
13376
13472
|
`;
|
|
13377
13473
|
}
|
|
13378
|
-
return
|
|
13474
|
+
return import_styled_components94.css`
|
|
13379
13475
|
aspect-ratio: 127 / 32;
|
|
13380
13476
|
`;
|
|
13381
13477
|
}
|
|
@@ -13412,7 +13508,7 @@ var WistiaLogo = ({
|
|
|
13412
13508
|
};
|
|
13413
13509
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
13414
13510
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
13415
|
-
const Logo = /* @__PURE__ */ (0,
|
|
13511
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(
|
|
13416
13512
|
WistiaLogoComponent,
|
|
13417
13513
|
{
|
|
13418
13514
|
$hoverColor: hoverColor,
|
|
@@ -13425,39 +13521,39 @@ var WistiaLogo = ({
|
|
|
13425
13521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13426
13522
|
...props,
|
|
13427
13523
|
children: [
|
|
13428
|
-
/* @__PURE__ */ (0,
|
|
13429
|
-
(0,
|
|
13524
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)("title", { children: title }),
|
|
13525
|
+
(0, import_type_guards57.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("desc", { children: description }) : null,
|
|
13430
13526
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
13431
13527
|
renderLogotype(logotypeColor, iconOnly)
|
|
13432
13528
|
]
|
|
13433
13529
|
}
|
|
13434
13530
|
);
|
|
13435
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
13531
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("a", { href, children: Logo }) : Logo;
|
|
13436
13532
|
};
|
|
13437
13533
|
WistiaLogo.displayName = "WistiaLogo";
|
|
13438
13534
|
|
|
13439
13535
|
// src/components/List/List.tsx
|
|
13440
|
-
var
|
|
13441
|
-
var
|
|
13536
|
+
var import_type_guards59 = require("@wistia/type-guards");
|
|
13537
|
+
var import_styled_components96 = __toESM(require("styled-components"));
|
|
13442
13538
|
|
|
13443
13539
|
// src/components/List/ListItem.tsx
|
|
13444
|
-
var
|
|
13445
|
-
var
|
|
13446
|
-
var
|
|
13447
|
-
var ListItemComponent =
|
|
13540
|
+
var import_styled_components95 = __toESM(require("styled-components"));
|
|
13541
|
+
var import_type_guards58 = require("@wistia/type-guards");
|
|
13542
|
+
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
13543
|
+
var ListItemComponent = import_styled_components95.default.li`
|
|
13448
13544
|
margin-bottom: var(--wui-space-02);
|
|
13449
13545
|
`;
|
|
13450
13546
|
var ListItem = ({ children }) => {
|
|
13451
|
-
if ((0,
|
|
13547
|
+
if ((0, import_type_guards58.isNil)(children)) {
|
|
13452
13548
|
return null;
|
|
13453
13549
|
}
|
|
13454
|
-
return /* @__PURE__ */ (0,
|
|
13550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(ListItemComponent, { children });
|
|
13455
13551
|
};
|
|
13456
13552
|
ListItem.displayName = "ListItem";
|
|
13457
13553
|
|
|
13458
13554
|
// src/components/List/List.tsx
|
|
13459
|
-
var
|
|
13460
|
-
var spacesStyle =
|
|
13555
|
+
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
13556
|
+
var spacesStyle = import_styled_components96.css`
|
|
13461
13557
|
overflow: hidden;
|
|
13462
13558
|
padding-left: 0;
|
|
13463
13559
|
vertical-align: bottom;
|
|
@@ -13479,7 +13575,7 @@ var spacesStyle = import_styled_components95.css`
|
|
|
13479
13575
|
}
|
|
13480
13576
|
}
|
|
13481
13577
|
`;
|
|
13482
|
-
var commasStyle =
|
|
13578
|
+
var commasStyle = import_styled_components96.css`
|
|
13483
13579
|
${spacesStyle};
|
|
13484
13580
|
|
|
13485
13581
|
li {
|
|
@@ -13489,7 +13585,7 @@ var commasStyle = import_styled_components95.css`
|
|
|
13489
13585
|
}
|
|
13490
13586
|
}
|
|
13491
13587
|
`;
|
|
13492
|
-
var slashesStyle =
|
|
13588
|
+
var slashesStyle = import_styled_components96.css`
|
|
13493
13589
|
${spacesStyle};
|
|
13494
13590
|
|
|
13495
13591
|
li {
|
|
@@ -13500,7 +13596,7 @@ var slashesStyle = import_styled_components95.css`
|
|
|
13500
13596
|
}
|
|
13501
13597
|
}
|
|
13502
13598
|
`;
|
|
13503
|
-
var breadcrumbsStyle =
|
|
13599
|
+
var breadcrumbsStyle = import_styled_components96.css`
|
|
13504
13600
|
${spacesStyle};
|
|
13505
13601
|
|
|
13506
13602
|
li {
|
|
@@ -13511,11 +13607,11 @@ var breadcrumbsStyle = import_styled_components95.css`
|
|
|
13511
13607
|
}
|
|
13512
13608
|
}
|
|
13513
13609
|
`;
|
|
13514
|
-
var unbulletedStyle =
|
|
13610
|
+
var unbulletedStyle = import_styled_components96.css`
|
|
13515
13611
|
list-style: none;
|
|
13516
13612
|
padding-left: 0;
|
|
13517
13613
|
`;
|
|
13518
|
-
var ListComponent =
|
|
13614
|
+
var ListComponent = import_styled_components96.default.ul`
|
|
13519
13615
|
list-style-position: outside;
|
|
13520
13616
|
margin: 0 0 var(--wui-space-01);
|
|
13521
13617
|
padding: 0 0 0 var(--wui-space-04);
|
|
@@ -13542,7 +13638,7 @@ var ListComponent = import_styled_components95.default.ul`
|
|
|
13542
13638
|
`;
|
|
13543
13639
|
var renderListComponent = (listItems, variant, { ...otherProps }) => {
|
|
13544
13640
|
const elementType = variant === "ordered" ? "ol" : "ul";
|
|
13545
|
-
return /* @__PURE__ */ (0,
|
|
13641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
|
|
13546
13642
|
ListComponent,
|
|
13547
13643
|
{
|
|
13548
13644
|
as: elementType,
|
|
@@ -13559,7 +13655,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
13559
13655
|
const nextItem = listItems[i + 1];
|
|
13560
13656
|
const key = `item-${itemCount += 1}`;
|
|
13561
13657
|
if (Array.isArray(nextItem)) {
|
|
13562
|
-
return /* @__PURE__ */ (0,
|
|
13658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(ListItem, { children: [
|
|
13563
13659
|
item,
|
|
13564
13660
|
renderListFromArray(nextItem, variant, otherProps)
|
|
13565
13661
|
] }, key);
|
|
@@ -13567,7 +13663,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
13567
13663
|
if (Array.isArray(item)) {
|
|
13568
13664
|
return null;
|
|
13569
13665
|
}
|
|
13570
|
-
return /* @__PURE__ */ (0,
|
|
13666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(ListItem, { children: item }, key);
|
|
13571
13667
|
});
|
|
13572
13668
|
return renderListComponent(items, variant, otherProps);
|
|
13573
13669
|
};
|
|
@@ -13578,13 +13674,13 @@ var List = ({
|
|
|
13578
13674
|
...otherProps
|
|
13579
13675
|
}) => {
|
|
13580
13676
|
const listVariant = variant ?? "bullets";
|
|
13581
|
-
if ((0,
|
|
13677
|
+
if ((0, import_type_guards59.isNotNil)(children)) {
|
|
13582
13678
|
if (Array.isArray(children) && !children.length) {
|
|
13583
13679
|
return null;
|
|
13584
13680
|
}
|
|
13585
13681
|
return renderListComponent(children, listVariant, otherProps);
|
|
13586
13682
|
}
|
|
13587
|
-
if ((0,
|
|
13683
|
+
if ((0, import_type_guards59.isNotNil)(items)) {
|
|
13588
13684
|
if (!items.length) {
|
|
13589
13685
|
return null;
|
|
13590
13686
|
}
|
|
@@ -13659,16 +13755,14 @@ List.displayName = "List";
|
|
|
13659
13755
|
Stack,
|
|
13660
13756
|
SubMenu,
|
|
13661
13757
|
Switch,
|
|
13662
|
-
|
|
13758
|
+
Tab,
|
|
13663
13759
|
Table,
|
|
13664
13760
|
TableBody,
|
|
13665
13761
|
TableCell,
|
|
13666
13762
|
TableFoot,
|
|
13667
13763
|
TableHead,
|
|
13668
13764
|
TableRow,
|
|
13669
|
-
|
|
13670
|
-
TabsList,
|
|
13671
|
-
TabsRoot,
|
|
13765
|
+
Tabs,
|
|
13672
13766
|
Tag,
|
|
13673
13767
|
Text,
|
|
13674
13768
|
Thumbnail,
|