@wistia/ui 0.6.35 → 0.6.36-beta.1511ebd6.856ba13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +307 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.mjs +95 -79
- 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.6.
|
|
3
|
+
* @license @wistia/ui v0.6.36-beta.1511ebd6.856ba13
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -119,6 +119,7 @@ __export(index_exports, {
|
|
|
119
119
|
ellipsisFlexParentStyle: () => ellipsisFlexParentStyle,
|
|
120
120
|
ellipsisStyle: () => ellipsisStyle,
|
|
121
121
|
iconSizeMap: () => iconSizeMap,
|
|
122
|
+
mergeRefs: () => mergeRefs,
|
|
122
123
|
mq: () => mq,
|
|
123
124
|
useActiveMq: () => useActiveMq,
|
|
124
125
|
useAriaLive: () => useAriaLive,
|
|
@@ -128,6 +129,7 @@ __export(index_exports, {
|
|
|
128
129
|
useImperativeFilePicker: () => import_use_file_picker.useImperativeFilePicker,
|
|
129
130
|
useKey: () => useKey,
|
|
130
131
|
useLocalStorage: () => useLocalStorage,
|
|
132
|
+
useLockBodyScroll: () => useLockBodyScroll,
|
|
131
133
|
useMq: () => useMq,
|
|
132
134
|
useToast: () => useToast,
|
|
133
135
|
useWindowSize: () => useWindowSize
|
|
@@ -2005,6 +2007,20 @@ var dateTime = {
|
|
|
2005
2007
|
timeOnlyString
|
|
2006
2008
|
};
|
|
2007
2009
|
|
|
2010
|
+
// src/helpers/mergeRefs/mergeRefs.ts
|
|
2011
|
+
var import_type_guards5 = require("@wistia/type-guards");
|
|
2012
|
+
var mergeRefs = (refs) => (value) => {
|
|
2013
|
+
refs.forEach((ref) => {
|
|
2014
|
+
if ((0, import_type_guards5.isFunction)(ref)) {
|
|
2015
|
+
ref(value);
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
if ((0, import_type_guards5.isNotNil)(ref)) {
|
|
2019
|
+
ref.current = value;
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
};
|
|
2023
|
+
|
|
2008
2024
|
// src/helpers/mq/mq.ts
|
|
2009
2025
|
var import_polished = require("polished");
|
|
2010
2026
|
|
|
@@ -2053,10 +2069,10 @@ var mq = {
|
|
|
2053
2069
|
|
|
2054
2070
|
// src/hooks/useAriaLive/useAriaLive.tsx
|
|
2055
2071
|
var import_react3 = require("react");
|
|
2056
|
-
var
|
|
2072
|
+
var import_type_guards6 = require("@wistia/type-guards");
|
|
2057
2073
|
var useAriaLive = () => {
|
|
2058
2074
|
const context = (0, import_react3.useContext)(AriaLiveContext);
|
|
2059
|
-
if ((0,
|
|
2075
|
+
if ((0, import_type_guards6.isNil)(context)) {
|
|
2060
2076
|
throw new Error("useAriaLive must be used within an AriaLiveProvider");
|
|
2061
2077
|
}
|
|
2062
2078
|
return context;
|
|
@@ -2083,9 +2099,9 @@ var import_react6 = require("react");
|
|
|
2083
2099
|
var import_react5 = require("react");
|
|
2084
2100
|
|
|
2085
2101
|
// src/private/helpers/isValidRef/isValidRef.ts
|
|
2086
|
-
var
|
|
2102
|
+
var import_type_guards7 = require("@wistia/type-guards");
|
|
2087
2103
|
var isValidRef = (value) => {
|
|
2088
|
-
return (0,
|
|
2104
|
+
return (0, import_type_guards7.isNotNil)(value) && (0, import_type_guards7.isRecord)(value) && "current" in value;
|
|
2089
2105
|
};
|
|
2090
2106
|
|
|
2091
2107
|
// src/private/hooks/useEvent/useEvent.ts
|
|
@@ -2176,11 +2192,27 @@ var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
|
|
|
2176
2192
|
return [storedValue, setValue, removeValue];
|
|
2177
2193
|
};
|
|
2178
2194
|
|
|
2195
|
+
// src/hooks/useLockBodyScroll/useLockBodyScroll.ts
|
|
2196
|
+
var import_react8 = require("react");
|
|
2197
|
+
var useLockBodyScroll = (locked) => {
|
|
2198
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
2199
|
+
if (locked) {
|
|
2200
|
+
const originalStyle = window.getComputedStyle(document.body).overflow;
|
|
2201
|
+
document.body.style.overflow = "hidden";
|
|
2202
|
+
return () => {
|
|
2203
|
+
document.body.style.overflow = originalStyle;
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
2206
|
+
return () => {
|
|
2207
|
+
};
|
|
2208
|
+
}, [locked]);
|
|
2209
|
+
};
|
|
2210
|
+
|
|
2179
2211
|
// src/hooks/useMq/useMq.ts
|
|
2180
|
-
var
|
|
2212
|
+
var import_type_guards8 = require("@wistia/type-guards");
|
|
2181
2213
|
|
|
2182
2214
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2183
|
-
var
|
|
2215
|
+
var import_react9 = require("react");
|
|
2184
2216
|
var import_throttle_debounce = require("throttle-debounce");
|
|
2185
2217
|
|
|
2186
2218
|
// src/private/helpers/isClient/isClient.ts
|
|
@@ -2188,11 +2220,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
|
|
|
2188
2220
|
|
|
2189
2221
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2190
2222
|
var useWindowSize = (interval = 0) => {
|
|
2191
|
-
const [dimensions, setDimensions] = (0,
|
|
2223
|
+
const [dimensions, setDimensions] = (0, import_react9.useState)({
|
|
2192
2224
|
width: isClient() ? window.innerWidth : 0,
|
|
2193
2225
|
height: isClient() ? window.innerHeight : 0
|
|
2194
2226
|
});
|
|
2195
|
-
(0,
|
|
2227
|
+
(0, import_react9.useLayoutEffect)(() => {
|
|
2196
2228
|
const handleResize = (0, import_throttle_debounce.debounce)(
|
|
2197
2229
|
interval,
|
|
2198
2230
|
() => setDimensions({
|
|
@@ -2239,21 +2271,21 @@ var useActiveMq = () => {
|
|
|
2239
2271
|
const keys = Object.keys(mq2);
|
|
2240
2272
|
return keys.filter((key) => {
|
|
2241
2273
|
const value = mq2[key];
|
|
2242
|
-
return (0,
|
|
2274
|
+
return (0, import_type_guards8.isBoolean)(value) && value;
|
|
2243
2275
|
});
|
|
2244
2276
|
};
|
|
2245
2277
|
|
|
2246
2278
|
// src/hooks/useToast/useToast.tsx
|
|
2247
|
-
var
|
|
2279
|
+
var import_react11 = require("react");
|
|
2248
2280
|
var import_sonner2 = require("sonner");
|
|
2249
2281
|
|
|
2250
2282
|
// src/private/components/Toast/Toast.tsx
|
|
2251
|
-
var
|
|
2283
|
+
var import_react10 = require("react");
|
|
2252
2284
|
var import_styled_components15 = __toESM(require("styled-components"));
|
|
2253
|
-
var
|
|
2285
|
+
var import_type_guards10 = require("@wistia/type-guards");
|
|
2254
2286
|
|
|
2255
2287
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
2256
|
-
var
|
|
2288
|
+
var import_type_guards9 = require("@wistia/type-guards");
|
|
2257
2289
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
2258
2290
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2259
2291
|
var ellipsisStyle = import_styled_components13.css`
|
|
@@ -2286,7 +2318,7 @@ var ellipsisFlexParentStyle = import_styled_components13.css`
|
|
|
2286
2318
|
var EllipsisComponent = import_styled_components13.default.span`
|
|
2287
2319
|
${ellipsisStyle};
|
|
2288
2320
|
${({ $lines }) => {
|
|
2289
|
-
if ((0,
|
|
2321
|
+
if ((0, import_type_guards9.isNotNil)($lines)) {
|
|
2290
2322
|
return import_styled_components13.css`
|
|
2291
2323
|
-webkit-box-orient: vertical;
|
|
2292
2324
|
-webkit-line-clamp: ${$lines};
|
|
@@ -2478,8 +2510,8 @@ var StyledToast = import_styled_components15.default.div`
|
|
|
2478
2510
|
}
|
|
2479
2511
|
`;
|
|
2480
2512
|
var Action = ({ actionButton }) => {
|
|
2481
|
-
if ((0,
|
|
2482
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0,
|
|
2513
|
+
if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react10.isValidElement)(actionButton)) {
|
|
2514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react10.cloneElement)(actionButton, {
|
|
2483
2515
|
variant: "soft",
|
|
2484
2516
|
// force Button variant
|
|
2485
2517
|
size: "sm"
|
|
@@ -2502,7 +2534,7 @@ var Toast = ({
|
|
|
2502
2534
|
$colorScheme: colorScheme,
|
|
2503
2535
|
children: [
|
|
2504
2536
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(MessageWrapper, { children: [
|
|
2505
|
-
(0,
|
|
2537
|
+
(0, import_type_guards10.isNotNil)(icon) ? icon : null,
|
|
2506
2538
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Message, { lines: 3, children: message })
|
|
2507
2539
|
] }),
|
|
2508
2540
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Action, { actionButton: action })
|
|
@@ -2515,7 +2547,7 @@ Toast.displayName = "Toast";
|
|
|
2515
2547
|
// src/hooks/useToast/useToast.tsx
|
|
2516
2548
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2517
2549
|
var useToast = () => {
|
|
2518
|
-
return (0,
|
|
2550
|
+
return (0, import_react11.useCallback)(
|
|
2519
2551
|
({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
|
|
2520
2552
|
import_sonner2.toast.custom(
|
|
2521
2553
|
() => {
|
|
@@ -2537,13 +2569,13 @@ var useToast = () => {
|
|
|
2537
2569
|
};
|
|
2538
2570
|
|
|
2539
2571
|
// src/components/ActionButton/ActionButton.tsx
|
|
2540
|
-
var
|
|
2572
|
+
var import_react15 = require("react");
|
|
2541
2573
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2542
2574
|
|
|
2543
2575
|
// src/components/Button/Button.tsx
|
|
2544
|
-
var
|
|
2576
|
+
var import_react14 = require("react");
|
|
2545
2577
|
var import_styled_components20 = __toESM(require("styled-components"));
|
|
2546
|
-
var
|
|
2578
|
+
var import_type_guards14 = require("@wistia/type-guards");
|
|
2547
2579
|
|
|
2548
2580
|
// src/css/buttonResetCss.tsx
|
|
2549
2581
|
var import_styled_components16 = require("styled-components");
|
|
@@ -2747,7 +2779,7 @@ var buttonSizeStyles = {
|
|
|
2747
2779
|
};
|
|
2748
2780
|
|
|
2749
2781
|
// src/components/Icon/Icon.tsx
|
|
2750
|
-
var
|
|
2782
|
+
var import_type_guards12 = require("@wistia/type-guards");
|
|
2751
2783
|
var import_styled_components18 = __toESM(require("styled-components"));
|
|
2752
2784
|
|
|
2753
2785
|
// src/components/Icon/icons/AbTestIcon.tsx
|
|
@@ -6602,17 +6634,17 @@ var iconMap = {
|
|
|
6602
6634
|
};
|
|
6603
6635
|
|
|
6604
6636
|
// src/private/hooks/useResponsiveProp/useResponsiveProp.ts
|
|
6605
|
-
var
|
|
6606
|
-
var
|
|
6637
|
+
var import_type_guards11 = require("@wistia/type-guards");
|
|
6638
|
+
var import_react12 = require("react");
|
|
6607
6639
|
var isResponsiveObject = (values) => {
|
|
6608
6640
|
return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
|
|
6609
6641
|
};
|
|
6610
6642
|
var useResponsiveProp = (values) => {
|
|
6611
6643
|
const activeMediaQueries = useActiveMq();
|
|
6612
|
-
return (0,
|
|
6613
|
-
if ((0,
|
|
6644
|
+
return (0, import_react12.useMemo)(() => {
|
|
6645
|
+
if ((0, import_type_guards11.isRecord)(values) && isResponsiveObject(values)) {
|
|
6614
6646
|
const mq2 = activeMediaQueries.find((key) => key in values);
|
|
6615
|
-
return (0,
|
|
6647
|
+
return (0, import_type_guards11.isNotUndefined)(mq2) && (0, import_type_guards11.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
|
|
6616
6648
|
}
|
|
6617
6649
|
return values;
|
|
6618
6650
|
}, [activeMediaQueries, values]);
|
|
@@ -6639,13 +6671,13 @@ var Icon = ({
|
|
|
6639
6671
|
...otherProps
|
|
6640
6672
|
}) => {
|
|
6641
6673
|
const responsiveSize = useResponsiveProp(size);
|
|
6642
|
-
if ((0,
|
|
6674
|
+
if ((0, import_type_guards12.isNil)(type)) {
|
|
6643
6675
|
throw new Error("An Icon component requires a `type` prop to be provided");
|
|
6644
6676
|
}
|
|
6645
|
-
if ((0,
|
|
6677
|
+
if ((0, import_type_guards12.isNil)(iconMap[type])) {
|
|
6646
6678
|
throw new Error(`Type "${type}" does not exist, please update type prop in Icon component.`);
|
|
6647
6679
|
}
|
|
6648
|
-
if ((0,
|
|
6680
|
+
if ((0, import_type_guards12.isNil)(iconSizeMap[responsiveSize])) {
|
|
6649
6681
|
throw new Error(
|
|
6650
6682
|
`Size "${responsiveSize}" does not exist, please update size prop in Icon component.`
|
|
6651
6683
|
);
|
|
@@ -6676,13 +6708,13 @@ var Icon = ({
|
|
|
6676
6708
|
Icon.displayName = "Icon";
|
|
6677
6709
|
|
|
6678
6710
|
// src/components/Link/Link.tsx
|
|
6679
|
-
var
|
|
6680
|
-
var
|
|
6711
|
+
var import_react13 = require("react");
|
|
6712
|
+
var import_type_guards13 = require("@wistia/type-guards");
|
|
6681
6713
|
var import_styled_components19 = __toESM(require("styled-components"));
|
|
6682
6714
|
var import_react_router_dom = require("react-router-dom");
|
|
6683
6715
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
6684
6716
|
var generateHref = (href, type, disabled) => {
|
|
6685
|
-
if (disabled || (0,
|
|
6717
|
+
if (disabled || (0, import_type_guards13.isNil)(href)) {
|
|
6686
6718
|
return void 0;
|
|
6687
6719
|
}
|
|
6688
6720
|
let to = href;
|
|
@@ -6694,12 +6726,12 @@ var generateHref = (href, type, disabled) => {
|
|
|
6694
6726
|
}
|
|
6695
6727
|
return to;
|
|
6696
6728
|
};
|
|
6697
|
-
var isButton = (props) => (0,
|
|
6698
|
-
var isLink = (props) => (0,
|
|
6729
|
+
var isButton = (props) => (0, import_type_guards13.isUndefined)(props.href);
|
|
6730
|
+
var isLink = (props) => (0, import_type_guards13.isNotUndefined)(props.href);
|
|
6699
6731
|
var StyledLink = import_styled_components19.default.a`
|
|
6700
6732
|
--link-icon-size: 14px;
|
|
6701
6733
|
|
|
6702
|
-
${({ href }) => (0,
|
|
6734
|
+
${({ href }) => (0, import_type_guards13.isNil)(href) && buttonResetCss};
|
|
6703
6735
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
6704
6736
|
cursor: pointer;
|
|
6705
6737
|
font-family: var(--wui-typography-family-default);
|
|
@@ -6716,7 +6748,7 @@ var StyledLink = import_styled_components19.default.a`
|
|
|
6716
6748
|
}
|
|
6717
6749
|
}
|
|
6718
6750
|
`;
|
|
6719
|
-
var Link = (0,
|
|
6751
|
+
var Link = (0, import_react13.forwardRef)(
|
|
6720
6752
|
({
|
|
6721
6753
|
beforeAction,
|
|
6722
6754
|
children,
|
|
@@ -6740,16 +6772,16 @@ var Link = (0, import_react12.forwardRef)(
|
|
|
6740
6772
|
} catch (error) {
|
|
6741
6773
|
console.error(error);
|
|
6742
6774
|
} finally {
|
|
6743
|
-
if ((0,
|
|
6775
|
+
if ((0, import_type_guards13.isFunction)(props.onClick)) {
|
|
6744
6776
|
props.onClick(event);
|
|
6745
6777
|
} else if (routingCallback !== null) {
|
|
6746
6778
|
routingCallback();
|
|
6747
|
-
} else if ((0,
|
|
6779
|
+
} else if ((0, import_type_guards13.isNotNil)(to)) {
|
|
6748
6780
|
window.location.assign(to);
|
|
6749
6781
|
} else {
|
|
6750
6782
|
}
|
|
6751
6783
|
}
|
|
6752
|
-
} else if ((0,
|
|
6784
|
+
} else if ((0, import_type_guards13.isFunction)(props.onClick)) {
|
|
6753
6785
|
props.onClick(event);
|
|
6754
6786
|
} else {
|
|
6755
6787
|
}
|
|
@@ -6810,7 +6842,7 @@ Link.displayName = "Link";
|
|
|
6810
6842
|
|
|
6811
6843
|
// src/components/Button/Button.tsx
|
|
6812
6844
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
6813
|
-
var isLink2 = (props) => (0,
|
|
6845
|
+
var isLink2 = (props) => (0, import_type_guards14.isNotUndefined)(props.href);
|
|
6814
6846
|
var StyledButton = import_styled_components20.default.button`
|
|
6815
6847
|
${buttonResetCss}
|
|
6816
6848
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
@@ -6850,8 +6882,8 @@ var ButtonContent = ({
|
|
|
6850
6882
|
/* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
|
|
6851
6883
|
StyledButtonContent,
|
|
6852
6884
|
{
|
|
6853
|
-
$hasLeftIcon: (0,
|
|
6854
|
-
$hasRightIcon: (0,
|
|
6885
|
+
$hasLeftIcon: (0, import_type_guards14.isNotNil)(leftIcon),
|
|
6886
|
+
$hasRightIcon: (0, import_type_guards14.isNotNil)(rightIcon),
|
|
6855
6887
|
$isLoading: isLoading,
|
|
6856
6888
|
children: [
|
|
6857
6889
|
leftIcon ?? null,
|
|
@@ -6862,7 +6894,7 @@ var ButtonContent = ({
|
|
|
6862
6894
|
)
|
|
6863
6895
|
] });
|
|
6864
6896
|
};
|
|
6865
|
-
var Button = (0,
|
|
6897
|
+
var Button = (0, import_react14.forwardRef)(
|
|
6866
6898
|
({
|
|
6867
6899
|
children,
|
|
6868
6900
|
forceState,
|
|
@@ -6919,7 +6951,7 @@ var Button = (0, import_react13.forwardRef)(
|
|
|
6919
6951
|
event.preventDefault();
|
|
6920
6952
|
return;
|
|
6921
6953
|
}
|
|
6922
|
-
if ((0,
|
|
6954
|
+
if ((0, import_type_guards14.isNotNil)(onClick)) {
|
|
6923
6955
|
onClick(event);
|
|
6924
6956
|
}
|
|
6925
6957
|
};
|
|
@@ -7041,7 +7073,7 @@ var StyledLabel = import_styled_components21.default.span`
|
|
|
7041
7073
|
grid-row: 2;
|
|
7042
7074
|
text-align: left;
|
|
7043
7075
|
`;
|
|
7044
|
-
var ActionButton = (0,
|
|
7076
|
+
var ActionButton = (0, import_react15.forwardRef)(
|
|
7045
7077
|
({
|
|
7046
7078
|
icon,
|
|
7047
7079
|
colorScheme = "default",
|
|
@@ -7085,8 +7117,8 @@ var ActionButton = (0, import_react14.forwardRef)(
|
|
|
7085
7117
|
ActionButton.displayName = "ActionButton";
|
|
7086
7118
|
|
|
7087
7119
|
// src/components/Avatar/Avatar.tsx
|
|
7088
|
-
var
|
|
7089
|
-
var
|
|
7120
|
+
var import_react16 = require("react");
|
|
7121
|
+
var import_type_guards16 = require("@wistia/type-guards");
|
|
7090
7122
|
var import_styled_components23 = __toESM(require("styled-components"));
|
|
7091
7123
|
|
|
7092
7124
|
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
@@ -7129,13 +7161,13 @@ var ColorSchemeWrapper = ({
|
|
|
7129
7161
|
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
7130
7162
|
|
|
7131
7163
|
// src/components/Avatar/formatNameForDisplay.tsx
|
|
7132
|
-
var
|
|
7164
|
+
var import_type_guards15 = require("@wistia/type-guards");
|
|
7133
7165
|
var containsEmojiCharacter = (char) => {
|
|
7134
7166
|
const emojiRegex = /<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu;
|
|
7135
7167
|
return emojiRegex.test(char);
|
|
7136
7168
|
};
|
|
7137
7169
|
var formatNameForDisplay = (name) => {
|
|
7138
|
-
if ((0,
|
|
7170
|
+
if ((0, import_type_guards15.isNil)(name) || !(0, import_type_guards15.isString)(name) || (0, import_type_guards15.isEmptyString)(name) || containsEmojiCharacter(name)) {
|
|
7139
7171
|
return "U";
|
|
7140
7172
|
}
|
|
7141
7173
|
const firstChar = name.trim().substring(0, 1);
|
|
@@ -7198,7 +7230,7 @@ var AvatarWrapper = import_styled_components23.default.div`
|
|
|
7198
7230
|
max-height: ${({ $maxHeight }) => $maxHeight}px;
|
|
7199
7231
|
`;
|
|
7200
7232
|
var chooseColorScheme = (name) => {
|
|
7201
|
-
if ((0,
|
|
7233
|
+
if ((0, import_type_guards16.isNil)(name) || name === "Anonymous") {
|
|
7202
7234
|
return "default";
|
|
7203
7235
|
}
|
|
7204
7236
|
const filteredColors = colorSchemeOptions.filter(
|
|
@@ -7217,8 +7249,8 @@ var Avatar = ({
|
|
|
7217
7249
|
onImageLoad,
|
|
7218
7250
|
...otherProps
|
|
7219
7251
|
}) => {
|
|
7220
|
-
const [imageLoadState, setImageLoadState] = (0,
|
|
7221
|
-
(0,
|
|
7252
|
+
const [imageLoadState, setImageLoadState] = (0, import_react16.useState)("loading");
|
|
7253
|
+
(0, import_react16.useEffect)(() => {
|
|
7222
7254
|
setImageLoadState("loading");
|
|
7223
7255
|
}, [imageUrl]);
|
|
7224
7256
|
const handleImageLoad = () => {
|
|
@@ -7230,8 +7262,8 @@ var Avatar = ({
|
|
|
7230
7262
|
onImageLoad?.({ state: "error", type: "initials" });
|
|
7231
7263
|
};
|
|
7232
7264
|
const avatarSize = heightAndWidth ?? avatarSizeMap[size];
|
|
7233
|
-
const avatarColor = (0,
|
|
7234
|
-
const showInitials = (0,
|
|
7265
|
+
const avatarColor = (0, import_react16.useMemo)(() => chooseColorScheme(name), [name]);
|
|
7266
|
+
const showInitials = (0, import_type_guards16.isNil)(imageUrl) || imageLoadState === "error";
|
|
7235
7267
|
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7236
7268
|
AvatarWrapper,
|
|
7237
7269
|
{
|
|
@@ -7260,9 +7292,9 @@ var Avatar = ({
|
|
|
7260
7292
|
Avatar.displayName = "Avatar";
|
|
7261
7293
|
|
|
7262
7294
|
// src/components/Badge/Badge.tsx
|
|
7263
|
-
var
|
|
7295
|
+
var import_react17 = require("react");
|
|
7264
7296
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
7265
|
-
var
|
|
7297
|
+
var import_type_guards17 = require("@wistia/type-guards");
|
|
7266
7298
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7267
7299
|
var StyledBadge = import_styled_components24.default.div`
|
|
7268
7300
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -7284,9 +7316,9 @@ var StyledBadge = import_styled_components24.default.div`
|
|
|
7284
7316
|
width: 12px;
|
|
7285
7317
|
}
|
|
7286
7318
|
`;
|
|
7287
|
-
var Badge = (0,
|
|
7319
|
+
var Badge = (0, import_react17.forwardRef)(
|
|
7288
7320
|
({ colorScheme = "inherit", label, icon, ...otherProps }, ref) => {
|
|
7289
|
-
const hasIcon = (0,
|
|
7321
|
+
const hasIcon = (0, import_type_guards17.isNotNil)(icon);
|
|
7290
7322
|
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7291
7323
|
StyledBadge,
|
|
7292
7324
|
{
|
|
@@ -7305,9 +7337,9 @@ var Badge = (0, import_react16.forwardRef)(
|
|
|
7305
7337
|
Badge.displayName = "Badge";
|
|
7306
7338
|
|
|
7307
7339
|
// src/components/Box/Box.tsx
|
|
7308
|
-
var
|
|
7340
|
+
var import_react18 = require("react");
|
|
7309
7341
|
var import_styled_components25 = __toESM(require("styled-components"));
|
|
7310
|
-
var
|
|
7342
|
+
var import_type_guards18 = require("@wistia/type-guards");
|
|
7311
7343
|
|
|
7312
7344
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
7313
7345
|
var makePolymorphic = (component) => {
|
|
@@ -7318,8 +7350,8 @@ var makePolymorphic = (component) => {
|
|
|
7318
7350
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7319
7351
|
var isDev = process.env["NODE_ENV"] === "development" || process.env["NODE_ENV"] === "test";
|
|
7320
7352
|
var getGapStyle = (gap) => {
|
|
7321
|
-
if ((0,
|
|
7322
|
-
if ((0,
|
|
7353
|
+
if ((0, import_type_guards18.isNotNil)(gap)) {
|
|
7354
|
+
if ((0, import_type_guards18.isRecord)(gap)) {
|
|
7323
7355
|
return Object.entries(gap).map(([key, value]) => {
|
|
7324
7356
|
return `${key}-gap: var(--wui-${value})};`;
|
|
7325
7357
|
}).join("");
|
|
@@ -7394,8 +7426,8 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7394
7426
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7395
7427
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
7396
7428
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
7397
|
-
display: ${({ $inline }) => (0,
|
|
7398
|
-
flex-basis: ${({ $basis }) => (0,
|
|
7429
|
+
display: ${({ $inline }) => (0, import_type_guards18.isNotNil)($inline) && $inline ? "inline-flex" : "flex"};
|
|
7430
|
+
flex-basis: ${({ $basis }) => (0, import_type_guards18.isNotNil)($basis) ? $basis : null};
|
|
7399
7431
|
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
7400
7432
|
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
7401
7433
|
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
@@ -7405,22 +7437,22 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7405
7437
|
width: ${({ $width }) => $width ?? null};
|
|
7406
7438
|
|
|
7407
7439
|
/* Box children styles */
|
|
7408
|
-
flex-grow: ${({ $grow }) => (0,
|
|
7409
|
-
flex-shrink: ${({ $shrink }) => (0,
|
|
7440
|
+
flex-grow: ${({ $grow }) => (0, import_type_guards18.isNotNil)($grow) ? $grow : null};
|
|
7441
|
+
flex-shrink: ${({ $shrink }) => (0, import_type_guards18.isNotNil)($shrink) ? $shrink : null};
|
|
7410
7442
|
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
7411
7443
|
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
7412
|
-
order: ${({ $order }) => (0,
|
|
7444
|
+
order: ${({ $order }) => (0, import_type_guards18.isNotNil)($order) ? $order : null};
|
|
7413
7445
|
`;
|
|
7414
7446
|
var wrapChildren = (children) => {
|
|
7415
|
-
if ((0,
|
|
7447
|
+
if ((0, import_type_guards18.isNotNil)(children)) {
|
|
7416
7448
|
if (typeof children === "object" && isDev) {
|
|
7417
|
-
return
|
|
7418
|
-
if ((0,
|
|
7449
|
+
return import_react18.Children.map(children, (child) => {
|
|
7450
|
+
if ((0, import_type_guards18.isNil)(child)) return null;
|
|
7419
7451
|
const elementParams = {};
|
|
7420
7452
|
if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
|
|
7421
7453
|
elementParams.hasBoxParent = true;
|
|
7422
7454
|
}
|
|
7423
|
-
return (0,
|
|
7455
|
+
return (0, import_react18.cloneElement)(child, elementParams);
|
|
7424
7456
|
});
|
|
7425
7457
|
}
|
|
7426
7458
|
return children;
|
|
@@ -7428,7 +7460,7 @@ var wrapChildren = (children) => {
|
|
|
7428
7460
|
return null;
|
|
7429
7461
|
};
|
|
7430
7462
|
var DEFAULT_ELEMENT = "div";
|
|
7431
|
-
var BoxComponent = (0,
|
|
7463
|
+
var BoxComponent = (0, import_react18.forwardRef)(
|
|
7432
7464
|
({
|
|
7433
7465
|
alignContent = "stretch",
|
|
7434
7466
|
alignItems = "flex-start",
|
|
@@ -7453,7 +7485,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
|
|
|
7453
7485
|
flexMode,
|
|
7454
7486
|
...otherProps
|
|
7455
7487
|
}, ref) => {
|
|
7456
|
-
if ((0,
|
|
7488
|
+
if ((0, import_type_guards18.isNotUndefined)(height)) {
|
|
7457
7489
|
if (fill === true || fill === "vertical") {
|
|
7458
7490
|
throw new Error('Cannot use height prop with fill="vertical" or fill={true}');
|
|
7459
7491
|
}
|
|
@@ -7463,7 +7495,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
|
|
|
7463
7495
|
);
|
|
7464
7496
|
}
|
|
7465
7497
|
}
|
|
7466
|
-
if ((0,
|
|
7498
|
+
if ((0, import_type_guards18.isNotUndefined)(width)) {
|
|
7467
7499
|
if (fill === true || fill === "horizontal") {
|
|
7468
7500
|
throw new Error('Cannot use width prop with fill="horizontal" or fill={true}');
|
|
7469
7501
|
}
|
|
@@ -7505,7 +7537,7 @@ BoxComponent.displayName = "Box";
|
|
|
7505
7537
|
var Box = makePolymorphic(BoxComponent);
|
|
7506
7538
|
|
|
7507
7539
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
7508
|
-
var
|
|
7540
|
+
var import_react19 = require("react");
|
|
7509
7541
|
var import_styled_components26 = __toESM(require("styled-components"));
|
|
7510
7542
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7511
7543
|
var StyledBreadcrumbs = import_styled_components26.default.nav`
|
|
@@ -7521,7 +7553,7 @@ var StyledBreadcrumbs = import_styled_components26.default.nav`
|
|
|
7521
7553
|
var BUFFER_WIDTH = 10;
|
|
7522
7554
|
var Breadcrumbs = ({ children, ...props }) => {
|
|
7523
7555
|
const { isXsAndDown } = useMq();
|
|
7524
|
-
let crumbs =
|
|
7556
|
+
let crumbs = import_react19.Children.toArray(children);
|
|
7525
7557
|
if (isXsAndDown) {
|
|
7526
7558
|
crumbs = crumbs.slice(-1);
|
|
7527
7559
|
}
|
|
@@ -7588,7 +7620,7 @@ var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
|
7588
7620
|
|
|
7589
7621
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
7590
7622
|
var import_styled_components28 = __toESM(require("styled-components"));
|
|
7591
|
-
var
|
|
7623
|
+
var import_type_guards19 = require("@wistia/type-guards");
|
|
7592
7624
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7593
7625
|
var getAlignment = (align) => {
|
|
7594
7626
|
if (align === "center") {
|
|
@@ -7634,7 +7666,7 @@ var ButtonGroup = ({
|
|
|
7634
7666
|
collapseOnSmallScreens = true,
|
|
7635
7667
|
...otherProps
|
|
7636
7668
|
}) => {
|
|
7637
|
-
if ((0,
|
|
7669
|
+
if ((0, import_type_guards19.isNil)(children)) {
|
|
7638
7670
|
return null;
|
|
7639
7671
|
}
|
|
7640
7672
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
@@ -7708,7 +7740,7 @@ var Card = ({
|
|
|
7708
7740
|
Card.displayName = "Card";
|
|
7709
7741
|
|
|
7710
7742
|
// src/components/Center/Center.tsx
|
|
7711
|
-
var
|
|
7743
|
+
var import_react20 = require("react");
|
|
7712
7744
|
var import_styled_components30 = __toESM(require("styled-components"));
|
|
7713
7745
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7714
7746
|
var StyledCenter = import_styled_components30.default.div`
|
|
@@ -7723,7 +7755,7 @@ var StyledCenter = import_styled_components30.default.div`
|
|
|
7723
7755
|
align-items: center;
|
|
7724
7756
|
`}
|
|
7725
7757
|
`;
|
|
7726
|
-
var Center = (0,
|
|
7758
|
+
var Center = (0, import_react20.forwardRef)(
|
|
7727
7759
|
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
7728
7760
|
StyledCenter,
|
|
7729
7761
|
{
|
|
@@ -7739,17 +7771,17 @@ var Center = (0, import_react19.forwardRef)(
|
|
|
7739
7771
|
Center.displayName = "Center";
|
|
7740
7772
|
|
|
7741
7773
|
// src/components/Checkbox/Checkbox.tsx
|
|
7742
|
-
var
|
|
7774
|
+
var import_react21 = require("react");
|
|
7743
7775
|
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7744
|
-
var
|
|
7776
|
+
var import_type_guards23 = require("@wistia/type-guards");
|
|
7745
7777
|
|
|
7746
7778
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7747
7779
|
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7748
|
-
var
|
|
7780
|
+
var import_type_guards22 = require("@wistia/type-guards");
|
|
7749
7781
|
|
|
7750
7782
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
7751
7783
|
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7752
|
-
var
|
|
7784
|
+
var import_type_guards20 = require("@wistia/type-guards");
|
|
7753
7785
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7754
7786
|
var disabledStyle = import_styled_components31.css`
|
|
7755
7787
|
color: var(--wui-color-text-disabled);
|
|
@@ -7769,7 +7801,7 @@ var FormControlLabelDescription = ({
|
|
|
7769
7801
|
disabled = false,
|
|
7770
7802
|
...props
|
|
7771
7803
|
}) => {
|
|
7772
|
-
if ((0,
|
|
7804
|
+
if ((0, import_type_guards20.isNil)(children)) {
|
|
7773
7805
|
return null;
|
|
7774
7806
|
}
|
|
7775
7807
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
@@ -7785,7 +7817,7 @@ FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
|
7785
7817
|
|
|
7786
7818
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7787
7819
|
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7788
|
-
var
|
|
7820
|
+
var import_type_guards21 = require("@wistia/type-guards");
|
|
7789
7821
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7790
7822
|
var VisuallyHidden = import_styled_components32.default.div({ ...visuallyHiddenStyle });
|
|
7791
7823
|
var VisuallyHiddenButFocusable = import_styled_components32.default.div({
|
|
@@ -7797,7 +7829,7 @@ var ScreenReaderOnly = ({
|
|
|
7797
7829
|
focusable = false,
|
|
7798
7830
|
...otherProps
|
|
7799
7831
|
}) => {
|
|
7800
|
-
const accessibleText = (0,
|
|
7832
|
+
const accessibleText = (0, import_type_guards21.isNotNil)(text) ? text : children;
|
|
7801
7833
|
if (focusable) {
|
|
7802
7834
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7803
7835
|
}
|
|
@@ -7837,7 +7869,7 @@ var FormControlLabel = ({
|
|
|
7837
7869
|
hideLabel = false,
|
|
7838
7870
|
...props
|
|
7839
7871
|
}) => {
|
|
7840
|
-
if ((0,
|
|
7872
|
+
if ((0, import_type_guards22.isNil)(label)) {
|
|
7841
7873
|
return null;
|
|
7842
7874
|
}
|
|
7843
7875
|
const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(StyledLabelWrapper, { children: [
|
|
@@ -7851,7 +7883,7 @@ var FormControlLabel = ({
|
|
|
7851
7883
|
htmlFor,
|
|
7852
7884
|
...props,
|
|
7853
7885
|
children: [
|
|
7854
|
-
(0,
|
|
7886
|
+
(0, import_type_guards22.isNotNil)(controlSlot) ? controlSlot : null,
|
|
7855
7887
|
labelContent
|
|
7856
7888
|
]
|
|
7857
7889
|
}
|
|
@@ -7959,7 +7991,7 @@ var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
|
7959
7991
|
display: block;
|
|
7960
7992
|
}
|
|
7961
7993
|
`;
|
|
7962
|
-
var Checkbox = (0,
|
|
7994
|
+
var Checkbox = (0, import_react21.forwardRef)(
|
|
7963
7995
|
({
|
|
7964
7996
|
checked,
|
|
7965
7997
|
disabled = false,
|
|
@@ -7974,8 +8006,8 @@ var Checkbox = (0, import_react20.forwardRef)(
|
|
|
7974
8006
|
hideLabel = false,
|
|
7975
8007
|
...props
|
|
7976
8008
|
}, ref) => {
|
|
7977
|
-
const generatedId = (0,
|
|
7978
|
-
const computedId = (0,
|
|
8009
|
+
const generatedId = (0, import_react21.useId)();
|
|
8010
|
+
const computedId = (0, import_type_guards23.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7979
8011
|
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
7980
8012
|
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7981
8013
|
StyledHiddenCheckboxInput,
|
|
@@ -8017,9 +8049,9 @@ var Checkbox = (0, import_react20.forwardRef)(
|
|
|
8017
8049
|
Checkbox.displayName = "Checkbox";
|
|
8018
8050
|
|
|
8019
8051
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
8020
|
-
var
|
|
8052
|
+
var import_react22 = require("react");
|
|
8021
8053
|
var ClickRegion = ({ children, targetRef }) => {
|
|
8022
|
-
(0,
|
|
8054
|
+
(0, import_react22.useEffect)(() => {
|
|
8023
8055
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
8024
8056
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
8025
8057
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -8027,7 +8059,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8027
8059
|
} else {
|
|
8028
8060
|
}
|
|
8029
8061
|
}, [targetRef]);
|
|
8030
|
-
const handleClick = (0,
|
|
8062
|
+
const handleClick = (0, import_react22.useCallback)(
|
|
8031
8063
|
(event) => {
|
|
8032
8064
|
const node = targetRef.current;
|
|
8033
8065
|
if (event.target instanceof HTMLAnchorElement && !event.target.hasAttribute("data-click-region-target-link") || event.target instanceof HTMLButtonElement && !event.target.hasAttribute("data-click-region-target-button")) {
|
|
@@ -8044,7 +8076,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8044
8076
|
},
|
|
8045
8077
|
[targetRef]
|
|
8046
8078
|
);
|
|
8047
|
-
return (0,
|
|
8079
|
+
return (0, import_react22.cloneElement)(import_react22.Children.only(children), {
|
|
8048
8080
|
"data-click-region": true,
|
|
8049
8081
|
onClick: handleClick
|
|
8050
8082
|
});
|
|
@@ -8053,7 +8085,7 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
8053
8085
|
|
|
8054
8086
|
// src/components/Collapsible/Collapsible.tsx
|
|
8055
8087
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
8056
|
-
var
|
|
8088
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
8057
8089
|
var import_styled_components35 = __toESM(require("styled-components"));
|
|
8058
8090
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8059
8091
|
var StyledRoot = (0, import_styled_components35.default)(import_react_collapsible.Root)`
|
|
@@ -8070,31 +8102,31 @@ var Collapsible = ({
|
|
|
8070
8102
|
onOpenChange
|
|
8071
8103
|
}) => {
|
|
8072
8104
|
const controlProps = {
|
|
8073
|
-
...(0,
|
|
8105
|
+
...(0, import_type_guards24.isNotNil)(onOpenChange) && (0, import_type_guards24.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8074
8106
|
};
|
|
8075
8107
|
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(StyledRoot, { ...controlProps, children });
|
|
8076
8108
|
};
|
|
8077
8109
|
Collapsible.displayName = "Collapsible";
|
|
8078
8110
|
|
|
8079
8111
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8080
|
-
var
|
|
8112
|
+
var import_react23 = require("react");
|
|
8081
8113
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
8082
8114
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8083
8115
|
var CollapsibleTrigger = ({ children }) => {
|
|
8084
|
-
|
|
8116
|
+
import_react23.Children.only(children);
|
|
8085
8117
|
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
8086
8118
|
};
|
|
8087
8119
|
|
|
8088
8120
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
8089
8121
|
var import_styled_components36 = __toESM(require("styled-components"));
|
|
8090
8122
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
8091
|
-
var
|
|
8123
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
8092
8124
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8093
8125
|
var ClampedContent = import_styled_components36.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
8094
8126
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8095
8127
|
`;
|
|
8096
8128
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
8097
|
-
if ((0,
|
|
8129
|
+
if ((0, import_type_guards25.isNotUndefined)(clamp)) {
|
|
8098
8130
|
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
8099
8131
|
}
|
|
8100
8132
|
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_jsx_runtime210.Fragment, { children: [
|
|
@@ -8105,10 +8137,10 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
8105
8137
|
|
|
8106
8138
|
// src/components/DataCards/DataCard.tsx
|
|
8107
8139
|
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8108
|
-
var
|
|
8140
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
8109
8141
|
|
|
8110
8142
|
// src/components/Heading/Heading.tsx
|
|
8111
|
-
var
|
|
8143
|
+
var import_react24 = require("react");
|
|
8112
8144
|
var import_styled_components37 = __toESM(require("styled-components"));
|
|
8113
8145
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8114
8146
|
var heroStyle = import_styled_components37.css`
|
|
@@ -8195,7 +8227,7 @@ var variantElementMap = {
|
|
|
8195
8227
|
heading5: "h5",
|
|
8196
8228
|
heading6: "h6"
|
|
8197
8229
|
};
|
|
8198
|
-
var HeadingComponent = (0,
|
|
8230
|
+
var HeadingComponent = (0, import_react24.forwardRef)(
|
|
8199
8231
|
({
|
|
8200
8232
|
align = "left",
|
|
8201
8233
|
colorScheme = "inherit",
|
|
@@ -8314,8 +8346,8 @@ var DataCard = ({
|
|
|
8314
8346
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLoadingValue, {}) : value
|
|
8315
8347
|
}
|
|
8316
8348
|
),
|
|
8317
|
-
(0,
|
|
8318
|
-
(0,
|
|
8349
|
+
(0, import_type_guards26.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
8350
|
+
(0, import_type_guards26.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8319
8351
|
]
|
|
8320
8352
|
}
|
|
8321
8353
|
);
|
|
@@ -8359,7 +8391,7 @@ DataCards.displayName = "DataCards";
|
|
|
8359
8391
|
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8360
8392
|
|
|
8361
8393
|
// src/components/Text/Text.tsx
|
|
8362
|
-
var
|
|
8394
|
+
var import_react25 = require("react");
|
|
8363
8395
|
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8364
8396
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8365
8397
|
var bodyBoldStyles = import_styled_components40.css`
|
|
@@ -8525,7 +8557,7 @@ var StyledText = import_styled_components40.default.div`
|
|
|
8525
8557
|
}
|
|
8526
8558
|
`}
|
|
8527
8559
|
`;
|
|
8528
|
-
var TextComponent = (0,
|
|
8560
|
+
var TextComponent = (0, import_react25.forwardRef)(
|
|
8529
8561
|
({
|
|
8530
8562
|
align = "left",
|
|
8531
8563
|
colorScheme = "inherit",
|
|
@@ -8641,7 +8673,7 @@ Divider.displayName = "Divider";
|
|
|
8641
8673
|
|
|
8642
8674
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8643
8675
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8644
|
-
var
|
|
8676
|
+
var import_react27 = require("react");
|
|
8645
8677
|
|
|
8646
8678
|
// src/components/Tooltip/Tooltip.tsx
|
|
8647
8679
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
@@ -8750,9 +8782,9 @@ var Tooltip = ({
|
|
|
8750
8782
|
Tooltip.displayName = "Tooltip";
|
|
8751
8783
|
|
|
8752
8784
|
// src/components/Input/Input.tsx
|
|
8753
|
-
var
|
|
8785
|
+
var import_react26 = require("react");
|
|
8754
8786
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8755
|
-
var
|
|
8787
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
8756
8788
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
8757
8789
|
var inputStyles = import_styled_components44.css`
|
|
8758
8790
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
@@ -8839,7 +8871,7 @@ var StyledInputContainer = import_styled_components44.default.div`
|
|
|
8839
8871
|
padding-right: 32px;
|
|
8840
8872
|
}
|
|
8841
8873
|
`;
|
|
8842
|
-
var Input = (0,
|
|
8874
|
+
var Input = (0, import_react26.forwardRef)(
|
|
8843
8875
|
({
|
|
8844
8876
|
fullWidth = true,
|
|
8845
8877
|
monospace = false,
|
|
@@ -8849,30 +8881,30 @@ var Input = (0, import_react25.forwardRef)(
|
|
|
8849
8881
|
rightIcon,
|
|
8850
8882
|
...props
|
|
8851
8883
|
}, externalRef) => {
|
|
8852
|
-
const internalRef = (0,
|
|
8884
|
+
const internalRef = (0, import_react26.useRef)();
|
|
8853
8885
|
const ref = (
|
|
8854
8886
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
8855
|
-
(0,
|
|
8887
|
+
(0, import_type_guards27.isNotNil)(externalRef) && (0, import_type_guards27.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
8856
8888
|
);
|
|
8857
8889
|
let leftIconToDisplay = leftIcon;
|
|
8858
|
-
if ((0,
|
|
8890
|
+
if ((0, import_type_guards27.isNil)(leftIcon) && type === "search") {
|
|
8859
8891
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Icon, { type: "search" });
|
|
8860
8892
|
}
|
|
8861
|
-
if ((0,
|
|
8862
|
-
leftIconToDisplay = (0,
|
|
8893
|
+
if ((0, import_type_guards27.isNotNil)(leftIconToDisplay)) {
|
|
8894
|
+
leftIconToDisplay = (0, import_react26.cloneElement)(leftIconToDisplay, {
|
|
8863
8895
|
size: "md",
|
|
8864
8896
|
className: "wui-input-left-icon"
|
|
8865
8897
|
});
|
|
8866
8898
|
}
|
|
8867
8899
|
let rightIconToDisplay = rightIcon;
|
|
8868
|
-
if ((0,
|
|
8869
|
-
rightIconToDisplay = (0,
|
|
8900
|
+
if ((0, import_type_guards27.isNotNil)(rightIconToDisplay)) {
|
|
8901
|
+
rightIconToDisplay = (0, import_react26.cloneElement)(rightIconToDisplay, {
|
|
8870
8902
|
size: "md",
|
|
8871
8903
|
className: "wui-input-right-icon"
|
|
8872
8904
|
});
|
|
8873
8905
|
}
|
|
8874
8906
|
const handleFocus = (event) => {
|
|
8875
|
-
if ((0,
|
|
8907
|
+
if ((0, import_type_guards27.isNotNil)(props.onFocus)) {
|
|
8876
8908
|
props.onFocus(event);
|
|
8877
8909
|
}
|
|
8878
8910
|
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
@@ -8961,11 +8993,11 @@ var EditableHeading = ({
|
|
|
8961
8993
|
forceEditing = false,
|
|
8962
8994
|
editingDisabled = false
|
|
8963
8995
|
}) => {
|
|
8964
|
-
const [isEditing, setIsEditing] = (0,
|
|
8965
|
-
const [value, setValue] = (0,
|
|
8966
|
-
const [previousValue, setPreviousValue] = (0,
|
|
8967
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
8968
|
-
const headingRef = (0,
|
|
8996
|
+
const [isEditing, setIsEditing] = (0, import_react27.useState)(false);
|
|
8997
|
+
const [value, setValue] = (0, import_react27.useState)(children);
|
|
8998
|
+
const [previousValue, setPreviousValue] = (0, import_react27.useState)(children);
|
|
8999
|
+
const [headingHeight, setHeadingHeight] = (0, import_react27.useState)("60");
|
|
9000
|
+
const headingRef = (0, import_react27.useRef)(null);
|
|
8969
9001
|
const handleSetEditing = (editing) => {
|
|
8970
9002
|
if (editingDisabled) return;
|
|
8971
9003
|
if (editing && headingRef.current) {
|
|
@@ -9051,12 +9083,12 @@ var EditableHeading = ({
|
|
|
9051
9083
|
};
|
|
9052
9084
|
|
|
9053
9085
|
// src/components/Form/Form.tsx
|
|
9054
|
-
var
|
|
9086
|
+
var import_react29 = require("react");
|
|
9055
9087
|
var import_styled_components47 = __toESM(require("styled-components"));
|
|
9056
|
-
var
|
|
9088
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
9057
9089
|
|
|
9058
9090
|
// src/components/Stack/Stack.tsx
|
|
9059
|
-
var
|
|
9091
|
+
var import_react28 = require("react");
|
|
9060
9092
|
var import_styled_components46 = __toESM(require("styled-components"));
|
|
9061
9093
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9062
9094
|
var DEFAULT_ELEMENT4 = "div";
|
|
@@ -9066,7 +9098,7 @@ var StyledStack = import_styled_components46.default.div`
|
|
|
9066
9098
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
9067
9099
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
9068
9100
|
`;
|
|
9069
|
-
var StackComponent = (0,
|
|
9101
|
+
var StackComponent = (0, import_react28.forwardRef)(
|
|
9070
9102
|
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
9071
9103
|
const responsiveGap = useResponsiveProp(gap);
|
|
9072
9104
|
const responsiveDirection = useResponsiveProp(direction);
|
|
@@ -9095,7 +9127,7 @@ var StyledForm = import_styled_components47.default.form`
|
|
|
9095
9127
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
9096
9128
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
9097
9129
|
`;
|
|
9098
|
-
var FormContext = (0,
|
|
9130
|
+
var FormContext = (0, import_react29.createContext)({
|
|
9099
9131
|
values: {},
|
|
9100
9132
|
errors: {},
|
|
9101
9133
|
hasSubmitted: false,
|
|
@@ -9111,15 +9143,15 @@ var FormComponent = ({
|
|
|
9111
9143
|
fullWidth = false,
|
|
9112
9144
|
...props
|
|
9113
9145
|
}, forwardedRef) => {
|
|
9114
|
-
const [errors, setErrors] = (0,
|
|
9115
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
9116
|
-
const innerRef = (0,
|
|
9146
|
+
const [errors, setErrors] = (0, import_react29.useState)({});
|
|
9147
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react29.useState)(false);
|
|
9148
|
+
const innerRef = (0, import_react29.useRef)();
|
|
9117
9149
|
const ref = forwardedRef ?? innerRef;
|
|
9118
|
-
const autoId = (0,
|
|
9150
|
+
const autoId = (0, import_react29.useId)();
|
|
9119
9151
|
const id = props.id ?? autoId;
|
|
9120
9152
|
const handleValidate = (nextFormData) => {
|
|
9121
9153
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
9122
|
-
if ((0,
|
|
9154
|
+
if ((0, import_type_guards28.isUndefined)(validate)) {
|
|
9123
9155
|
return {};
|
|
9124
9156
|
}
|
|
9125
9157
|
return validate(nextData);
|
|
@@ -9129,7 +9161,7 @@ var FormComponent = ({
|
|
|
9129
9161
|
props.onBlur(event);
|
|
9130
9162
|
}
|
|
9131
9163
|
const formData = new FormData(event.currentTarget);
|
|
9132
|
-
if ((0,
|
|
9164
|
+
if ((0, import_type_guards28.isNotUndefined)(validate)) {
|
|
9133
9165
|
handleValidate(formData);
|
|
9134
9166
|
}
|
|
9135
9167
|
};
|
|
@@ -9157,7 +9189,7 @@ var FormComponent = ({
|
|
|
9157
9189
|
void action(null);
|
|
9158
9190
|
}
|
|
9159
9191
|
};
|
|
9160
|
-
const context = (0,
|
|
9192
|
+
const context = (0, import_react29.useMemo)(() => {
|
|
9161
9193
|
return {
|
|
9162
9194
|
values,
|
|
9163
9195
|
errors,
|
|
@@ -9186,15 +9218,15 @@ var FormComponent = ({
|
|
|
9186
9218
|
);
|
|
9187
9219
|
};
|
|
9188
9220
|
FormComponent.displayName = "Form";
|
|
9189
|
-
var Form = (0,
|
|
9221
|
+
var Form = (0, import_react29.forwardRef)(FormComponent);
|
|
9190
9222
|
|
|
9191
9223
|
// src/components/Form/useFormState.tsx
|
|
9192
|
-
var
|
|
9224
|
+
var import_react30 = require("react");
|
|
9193
9225
|
var useFormState = (action, initialData = {}) => {
|
|
9194
|
-
const [data, setData] = (0,
|
|
9195
|
-
const [isPending, setIsPending] = (0,
|
|
9196
|
-
const [error, setError] = (0,
|
|
9197
|
-
const formAction = (0,
|
|
9226
|
+
const [data, setData] = (0, import_react30.useState)(initialData);
|
|
9227
|
+
const [isPending, setIsPending] = (0, import_react30.useState)(false);
|
|
9228
|
+
const [error, setError] = (0, import_react30.useState)(null);
|
|
9229
|
+
const formAction = (0, import_react30.useCallback)(
|
|
9198
9230
|
async (nextFormData) => {
|
|
9199
9231
|
if (nextFormData === null) {
|
|
9200
9232
|
setData(initialData);
|
|
@@ -9225,23 +9257,23 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9225
9257
|
};
|
|
9226
9258
|
|
|
9227
9259
|
// src/components/Form/FormErrorSummary.tsx
|
|
9228
|
-
var
|
|
9229
|
-
var
|
|
9260
|
+
var import_react31 = require("react");
|
|
9261
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
9230
9262
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9231
9263
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9232
9264
|
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9233
9265
|
};
|
|
9234
9266
|
var FormErrorSummary = ({ description }) => {
|
|
9235
|
-
const ref = (0,
|
|
9236
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
9267
|
+
const ref = (0, import_react31.useRef)(null);
|
|
9268
|
+
const { formId, errors, hasSubmitted } = (0, import_react31.useContext)(FormContext);
|
|
9237
9269
|
const isValid = Object.keys(errors).length === 0;
|
|
9238
9270
|
if (isValid || !hasSubmitted) {
|
|
9239
9271
|
return null;
|
|
9240
9272
|
}
|
|
9241
9273
|
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { ref, children: [
|
|
9242
9274
|
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("p", { children: description }),
|
|
9243
|
-
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0,
|
|
9244
|
-
([name, error]) => (0,
|
|
9275
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards29.isNotUndefined)(error)).map(
|
|
9276
|
+
([name, error]) => (0, import_type_guards29.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9245
9277
|
ErrorItem,
|
|
9246
9278
|
{
|
|
9247
9279
|
error: err,
|
|
@@ -9263,9 +9295,9 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9263
9295
|
};
|
|
9264
9296
|
|
|
9265
9297
|
// src/components/FormField/FormField.tsx
|
|
9266
|
-
var
|
|
9298
|
+
var import_react34 = require("react");
|
|
9267
9299
|
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9268
|
-
var
|
|
9300
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
9269
9301
|
|
|
9270
9302
|
// src/components/Label/Label.tsx
|
|
9271
9303
|
var import_styled_components48 = __toESM(require("styled-components"));
|
|
@@ -9328,11 +9360,11 @@ var Label = ({
|
|
|
9328
9360
|
Label.displayName = "Label";
|
|
9329
9361
|
|
|
9330
9362
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9331
|
-
var
|
|
9363
|
+
var import_react33 = require("react");
|
|
9332
9364
|
|
|
9333
9365
|
// src/components/FormGroup/FormGroup.tsx
|
|
9334
9366
|
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9335
|
-
var
|
|
9367
|
+
var import_react32 = require("react");
|
|
9336
9368
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9337
9369
|
var StyledFieldset = import_styled_components49.default.fieldset`
|
|
9338
9370
|
border: 0;
|
|
@@ -9341,7 +9373,7 @@ var StyledLegend = import_styled_components49.default.legend`
|
|
|
9341
9373
|
margin-bottom: var(--space-01);
|
|
9342
9374
|
`;
|
|
9343
9375
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9344
|
-
const ref = (0,
|
|
9376
|
+
const ref = (0, import_react32.useRef)();
|
|
9345
9377
|
return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
|
|
9346
9378
|
Stack,
|
|
9347
9379
|
{
|
|
@@ -9366,7 +9398,7 @@ FormGroup.displayName = "FormGroup";
|
|
|
9366
9398
|
|
|
9367
9399
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9368
9400
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9369
|
-
var CheckboxGroupContext = (0,
|
|
9401
|
+
var CheckboxGroupContext = (0, import_react33.createContext)(null);
|
|
9370
9402
|
var CheckboxGroup = ({
|
|
9371
9403
|
children,
|
|
9372
9404
|
name,
|
|
@@ -9374,7 +9406,7 @@ var CheckboxGroup = ({
|
|
|
9374
9406
|
value,
|
|
9375
9407
|
...props
|
|
9376
9408
|
}) => {
|
|
9377
|
-
const context = (0,
|
|
9409
|
+
const context = (0, import_react33.useMemo)(() => {
|
|
9378
9410
|
return {
|
|
9379
9411
|
name,
|
|
9380
9412
|
onChange
|
|
@@ -9425,7 +9457,7 @@ var StyledErrorList = import_styled_components50.default.ul`
|
|
|
9425
9457
|
gap: var(--wui-space-01);
|
|
9426
9458
|
`;
|
|
9427
9459
|
var ErrorMessages = ({ errors, id }) => {
|
|
9428
|
-
const isMultipleErrors = (0,
|
|
9460
|
+
const isMultipleErrors = (0, import_type_guards30.isArray)(errors);
|
|
9429
9461
|
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9430
9462
|
Text,
|
|
9431
9463
|
{
|
|
@@ -9459,8 +9491,8 @@ var FormField = ({
|
|
|
9459
9491
|
value,
|
|
9460
9492
|
...props
|
|
9461
9493
|
}) => {
|
|
9462
|
-
const formState = (0,
|
|
9463
|
-
const checkboxGroup = (0,
|
|
9494
|
+
const formState = (0, import_react34.useContext)(FormContext);
|
|
9495
|
+
const checkboxGroup = (0, import_react34.useContext)(CheckboxGroupContext);
|
|
9464
9496
|
const defaultValue = formState.values[name];
|
|
9465
9497
|
const isIntegratedLabel = children.type === Checkbox;
|
|
9466
9498
|
const computedId = id ?? `${formState.formId}-${name}`;
|
|
@@ -9475,19 +9507,19 @@ var FormField = ({
|
|
|
9475
9507
|
"aria-describedby": ariaDescribedby,
|
|
9476
9508
|
...props
|
|
9477
9509
|
};
|
|
9478
|
-
if ((0,
|
|
9510
|
+
if ((0, import_type_guards30.isUndefined)(value) && (0, import_type_guards30.isNotUndefined)(defaultValue)) {
|
|
9479
9511
|
childProps = {
|
|
9480
9512
|
...childProps,
|
|
9481
9513
|
defaultValue
|
|
9482
9514
|
};
|
|
9483
9515
|
}
|
|
9484
|
-
if ((0,
|
|
9485
|
-
const computedName = (0,
|
|
9516
|
+
if ((0, import_type_guards30.isNotNil)(checkboxGroup)) {
|
|
9517
|
+
const computedName = (0, import_type_guards30.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
9486
9518
|
const handleChange = (event) => {
|
|
9487
|
-
if ((0,
|
|
9519
|
+
if ((0, import_type_guards30.isNotUndefined)(props.onChange)) {
|
|
9488
9520
|
props.onChange(event);
|
|
9489
9521
|
}
|
|
9490
|
-
if ((0,
|
|
9522
|
+
if ((0, import_type_guards30.isNotUndefined)(checkboxGroup.onChange)) {
|
|
9491
9523
|
checkboxGroup.onChange(event);
|
|
9492
9524
|
}
|
|
9493
9525
|
};
|
|
@@ -9495,10 +9527,10 @@ var FormField = ({
|
|
|
9495
9527
|
...childProps,
|
|
9496
9528
|
name: computedName,
|
|
9497
9529
|
onChange: handleChange,
|
|
9498
|
-
"aria-invalid": (0,
|
|
9530
|
+
"aria-invalid": (0, import_type_guards30.isNotNil)(error)
|
|
9499
9531
|
};
|
|
9500
9532
|
}
|
|
9501
|
-
|
|
9533
|
+
import_react34.Children.only(children);
|
|
9502
9534
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
|
|
9503
9535
|
StyledFormField,
|
|
9504
9536
|
{
|
|
@@ -9506,9 +9538,9 @@ var FormField = ({
|
|
|
9506
9538
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9507
9539
|
children: [
|
|
9508
9540
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9509
|
-
(0,
|
|
9510
|
-
(0,
|
|
9511
|
-
(0,
|
|
9541
|
+
(0, import_type_guards30.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9542
|
+
(0, import_react34.cloneElement)(children, childProps),
|
|
9543
|
+
(0, import_type_guards30.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, { children: [
|
|
9512
9544
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", {}),
|
|
9513
9545
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9514
9546
|
ErrorMessages,
|
|
@@ -9525,9 +9557,9 @@ var FormField = ({
|
|
|
9525
9557
|
FormField.displayName = "FormField";
|
|
9526
9558
|
|
|
9527
9559
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9528
|
-
var
|
|
9560
|
+
var import_react35 = require("react");
|
|
9529
9561
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9530
|
-
var RadioGroupContext = (0,
|
|
9562
|
+
var RadioGroupContext = (0, import_react35.createContext)(null);
|
|
9531
9563
|
var RadioGroup = ({
|
|
9532
9564
|
children,
|
|
9533
9565
|
name,
|
|
@@ -9535,7 +9567,7 @@ var RadioGroup = ({
|
|
|
9535
9567
|
value,
|
|
9536
9568
|
...props
|
|
9537
9569
|
}) => {
|
|
9538
|
-
const context = (0,
|
|
9570
|
+
const context = (0, import_react35.useMemo)(() => {
|
|
9539
9571
|
return {
|
|
9540
9572
|
name,
|
|
9541
9573
|
onChange
|
|
@@ -9546,7 +9578,7 @@ var RadioGroup = ({
|
|
|
9546
9578
|
RadioGroup.displayName = "RadioGroup";
|
|
9547
9579
|
|
|
9548
9580
|
// src/components/IconButton/IconButton.tsx
|
|
9549
|
-
var
|
|
9581
|
+
var import_react36 = require("react");
|
|
9550
9582
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9551
9583
|
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9552
9584
|
var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
@@ -9563,7 +9595,7 @@ var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
|
9563
9595
|
align-items: center;
|
|
9564
9596
|
line-height: 1;
|
|
9565
9597
|
`;
|
|
9566
|
-
var IconButton = (0,
|
|
9598
|
+
var IconButton = (0, import_react36.forwardRef)(
|
|
9567
9599
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9568
9600
|
const responsiveSize = useResponsiveProp(size);
|
|
9569
9601
|
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
@@ -9574,7 +9606,7 @@ var IconButton = (0, import_react35.forwardRef)(
|
|
|
9574
9606
|
"aria-label": label,
|
|
9575
9607
|
"data-wistia-ui-icon-button": true,
|
|
9576
9608
|
size: responsiveSize,
|
|
9577
|
-
children: (0,
|
|
9609
|
+
children: (0, import_react36.cloneElement)(import_react36.Children.only(children), {
|
|
9578
9610
|
size: responsiveSize
|
|
9579
9611
|
})
|
|
9580
9612
|
}
|
|
@@ -9585,7 +9617,7 @@ IconButton.displayName = "IconButton";
|
|
|
9585
9617
|
|
|
9586
9618
|
// src/components/Image/Image.tsx
|
|
9587
9619
|
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9588
|
-
var
|
|
9620
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
9589
9621
|
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9590
9622
|
var getFillStyle2 = (fillContainer) => {
|
|
9591
9623
|
if (fillContainer === "horizontal") {
|
|
@@ -9603,7 +9635,7 @@ var getFillStyle2 = (fillContainer) => {
|
|
|
9603
9635
|
return void 0;
|
|
9604
9636
|
};
|
|
9605
9637
|
var StyledImage = import_styled_components52.default.img`
|
|
9606
|
-
border-radius: ${({ $borderRadius }) => (0,
|
|
9638
|
+
border-radius: ${({ $borderRadius }) => (0, import_type_guards31.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9607
9639
|
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9608
9640
|
object-fit: ${({ $objFit }) => $objFit};
|
|
9609
9641
|
object-position: ${({ $objPosition }) => $objPosition};
|
|
@@ -9635,13 +9667,13 @@ Image.displayName = "Image";
|
|
|
9635
9667
|
// src/components/Menu/Menu.tsx
|
|
9636
9668
|
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9637
9669
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9638
|
-
var
|
|
9639
|
-
var
|
|
9670
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9671
|
+
var import_react38 = require("react");
|
|
9640
9672
|
|
|
9641
9673
|
// src/components/Menu/MenuContext.tsx
|
|
9642
|
-
var
|
|
9643
|
-
var MenuContext = (0,
|
|
9644
|
-
var useMenuContext = () => (0,
|
|
9674
|
+
var import_react37 = require("react");
|
|
9675
|
+
var MenuContext = (0, import_react37.createContext)({ compact: false });
|
|
9676
|
+
var useMenuContext = () => (0, import_react37.useContext)(MenuContext);
|
|
9645
9677
|
|
|
9646
9678
|
// src/components/Menu/Menu.tsx
|
|
9647
9679
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
@@ -9745,9 +9777,9 @@ var Menu = ({
|
|
|
9745
9777
|
onInteractOutside,
|
|
9746
9778
|
...props
|
|
9747
9779
|
}) => {
|
|
9748
|
-
const contextValue = (0,
|
|
9780
|
+
const contextValue = (0, import_react38.useMemo)(() => ({ compact }), [compact]);
|
|
9749
9781
|
let controlProps = {
|
|
9750
|
-
...(0,
|
|
9782
|
+
...(0, import_type_guards32.isNotNil)(onOpenChange) && (0, import_type_guards32.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9751
9783
|
};
|
|
9752
9784
|
if (disabled) {
|
|
9753
9785
|
controlProps = {
|
|
@@ -9761,7 +9793,7 @@ var Menu = ({
|
|
|
9761
9793
|
modal: false,
|
|
9762
9794
|
...controlProps,
|
|
9763
9795
|
children: [
|
|
9764
|
-
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0,
|
|
9796
|
+
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards32.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9765
9797
|
Button,
|
|
9766
9798
|
{
|
|
9767
9799
|
"aria-expanded": isOpen,
|
|
@@ -9819,15 +9851,15 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
9819
9851
|
MenuLabel.displayName = "MenuLabel";
|
|
9820
9852
|
|
|
9821
9853
|
// src/components/Menu/SubMenu.tsx
|
|
9822
|
-
var
|
|
9854
|
+
var import_react40 = require("react");
|
|
9823
9855
|
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9824
9856
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9825
|
-
var
|
|
9857
|
+
var import_type_guards34 = require("@wistia/type-guards");
|
|
9826
9858
|
|
|
9827
9859
|
// src/components/Menu/MenuItemButton.tsx
|
|
9828
|
-
var
|
|
9860
|
+
var import_react39 = require("react");
|
|
9829
9861
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9830
|
-
var
|
|
9862
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
9831
9863
|
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9832
9864
|
var StyledButton3 = (0, import_styled_components55.default)(Button)`
|
|
9833
9865
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
@@ -9902,10 +9934,10 @@ var StyledBadgeContainer = import_styled_components55.default.div`
|
|
|
9902
9934
|
font-size: var(--wui-typography-label-4-size);
|
|
9903
9935
|
color: var(--wui-color-text-secondary);
|
|
9904
9936
|
`;
|
|
9905
|
-
var MenuItemButton = (0,
|
|
9937
|
+
var MenuItemButton = (0, import_react39.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9906
9938
|
let { colorScheme, badge } = props;
|
|
9907
9939
|
if (appearance === "dangerous") {
|
|
9908
|
-
if ((0,
|
|
9940
|
+
if ((0, import_type_guards33.isNotUndefined)(colorScheme)) {
|
|
9909
9941
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
9910
9942
|
}
|
|
9911
9943
|
colorScheme = "error";
|
|
@@ -9935,7 +9967,7 @@ var MenuItemButton = (0, import_react38.forwardRef)(({ children, appearance, com
|
|
|
9935
9967
|
children: [
|
|
9936
9968
|
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9937
9969
|
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
9938
|
-
(0,
|
|
9970
|
+
(0, import_type_guards33.isNotNil)(badge) || (0, import_type_guards33.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9939
9971
|
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9940
9972
|
]
|
|
9941
9973
|
}
|
|
@@ -9998,12 +10030,12 @@ var SubMenu = ({
|
|
|
9998
10030
|
...props
|
|
9999
10031
|
}) => {
|
|
10000
10032
|
const { isSmAndUp } = useMq();
|
|
10001
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
10033
|
+
const [isExpanded, setIsExpanded] = (0, import_react40.useState)(false);
|
|
10002
10034
|
const { compact } = useMenuContext();
|
|
10003
10035
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
10004
10036
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
10005
10037
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemLabel, { children: label }),
|
|
10006
|
-
(0,
|
|
10038
|
+
(0, import_type_guards34.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemDescription, { children: description }) : null
|
|
10007
10039
|
] }),
|
|
10008
10040
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
10009
10041
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
@@ -10027,10 +10059,10 @@ var SubMenu = ({
|
|
|
10027
10059
|
SubMenu.displayName = "SubMenu";
|
|
10028
10060
|
|
|
10029
10061
|
// src/components/Menu/MenuItem.tsx
|
|
10030
|
-
var
|
|
10062
|
+
var import_react41 = require("react");
|
|
10031
10063
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
10032
10064
|
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
10033
|
-
var MenuItem = (0,
|
|
10065
|
+
var MenuItem = (0, import_react41.forwardRef)(
|
|
10034
10066
|
({ onSelect = () => null, ...props }, ref) => {
|
|
10035
10067
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
10036
10068
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
@@ -10180,10 +10212,10 @@ var CheckboxMenuItem = ({
|
|
|
10180
10212
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
10181
10213
|
|
|
10182
10214
|
// src/components/Modal/Modal.tsx
|
|
10183
|
-
var
|
|
10215
|
+
var import_react45 = require("react");
|
|
10184
10216
|
var import_styled_components62 = __toESM(require("styled-components"));
|
|
10185
10217
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
10186
|
-
var
|
|
10218
|
+
var import_type_guards36 = require("@wistia/type-guards");
|
|
10187
10219
|
|
|
10188
10220
|
// src/components/Modal/ModalHeader.tsx
|
|
10189
10221
|
var import_styled_components59 = __toESM(require("styled-components"));
|
|
@@ -10240,21 +10272,21 @@ var ModalHeader = ({
|
|
|
10240
10272
|
};
|
|
10241
10273
|
|
|
10242
10274
|
// src/components/Modal/ModalContent.tsx
|
|
10243
|
-
var
|
|
10275
|
+
var import_react43 = require("react");
|
|
10244
10276
|
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10245
10277
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
10246
10278
|
|
|
10247
10279
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10248
|
-
var
|
|
10249
|
-
var
|
|
10280
|
+
var import_react42 = require("react");
|
|
10281
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
10250
10282
|
var useFocusRestore = () => {
|
|
10251
|
-
const previouslyFocusedRef = (0,
|
|
10252
|
-
(0,
|
|
10283
|
+
const previouslyFocusedRef = (0, import_react42.useRef)(null);
|
|
10284
|
+
(0, import_react42.useEffect)(() => {
|
|
10253
10285
|
previouslyFocusedRef.current = document.activeElement;
|
|
10254
10286
|
}, []);
|
|
10255
|
-
(0,
|
|
10287
|
+
(0, import_react42.useEffect)(() => {
|
|
10256
10288
|
return () => {
|
|
10257
|
-
if ((0,
|
|
10289
|
+
if ((0, import_type_guards35.isNotNil)(previouslyFocusedRef.current)) {
|
|
10258
10290
|
setTimeout(() => {
|
|
10259
10291
|
previouslyFocusedRef.current?.focus();
|
|
10260
10292
|
}, 0);
|
|
@@ -10306,7 +10338,7 @@ var StyledModalContent = (0, import_styled_components60.default)(import_react_di
|
|
|
10306
10338
|
}
|
|
10307
10339
|
}
|
|
10308
10340
|
`;
|
|
10309
|
-
var ModalContent = (0,
|
|
10341
|
+
var ModalContent = (0, import_react43.forwardRef)(
|
|
10310
10342
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
10311
10343
|
useFocusRestore();
|
|
10312
10344
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
@@ -10324,7 +10356,7 @@ var ModalContent = (0, import_react42.forwardRef)(
|
|
|
10324
10356
|
);
|
|
10325
10357
|
|
|
10326
10358
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10327
|
-
var
|
|
10359
|
+
var import_react44 = require("react");
|
|
10328
10360
|
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10329
10361
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10330
10362
|
var backdropAnimationDuration = 150;
|
|
@@ -10362,7 +10394,7 @@ var BackdropComponent = import_styled_components61.default.div`
|
|
|
10362
10394
|
}
|
|
10363
10395
|
}
|
|
10364
10396
|
`;
|
|
10365
|
-
var Backdrop = (0,
|
|
10397
|
+
var Backdrop = (0, import_react44.forwardRef)(
|
|
10366
10398
|
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
10367
10399
|
BackdropComponent,
|
|
10368
10400
|
{
|
|
@@ -10384,7 +10416,7 @@ var ModalBody = import_styled_components62.default.div`
|
|
|
10384
10416
|
display: flex;
|
|
10385
10417
|
order: 2;
|
|
10386
10418
|
`;
|
|
10387
|
-
var Modal = (0,
|
|
10419
|
+
var Modal = (0, import_react45.forwardRef)(
|
|
10388
10420
|
({
|
|
10389
10421
|
children,
|
|
10390
10422
|
fullHeight = false,
|
|
@@ -10401,7 +10433,7 @@ var Modal = (0, import_react44.forwardRef)(
|
|
|
10401
10433
|
import_react_dialog4.Root,
|
|
10402
10434
|
{
|
|
10403
10435
|
onOpenChange: (open2) => {
|
|
10404
|
-
if (!open2 && (0,
|
|
10436
|
+
if (!open2 && (0, import_type_guards36.isNotNil)(onRequestClose)) {
|
|
10405
10437
|
onRequestClose();
|
|
10406
10438
|
}
|
|
10407
10439
|
},
|
|
@@ -10414,7 +10446,7 @@ var Modal = (0, import_react44.forwardRef)(
|
|
|
10414
10446
|
ref,
|
|
10415
10447
|
fullHeight,
|
|
10416
10448
|
onOpenAutoFocus: (event) => {
|
|
10417
|
-
if ((0,
|
|
10449
|
+
if ((0, import_type_guards36.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
10418
10450
|
event.preventDefault();
|
|
10419
10451
|
requestAnimationFrame(() => {
|
|
10420
10452
|
initialFocusRef.current?.focus();
|
|
@@ -10448,9 +10480,9 @@ var import_react_popover = require("@radix-ui/react-popover");
|
|
|
10448
10480
|
var import_styled_components63 = __toESM(require("styled-components"));
|
|
10449
10481
|
|
|
10450
10482
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10451
|
-
var
|
|
10483
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
10452
10484
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
10453
|
-
return (0,
|
|
10485
|
+
return (0, import_type_guards37.isNotNil)(onOpenChange) && (0, import_type_guards37.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
10454
10486
|
};
|
|
10455
10487
|
|
|
10456
10488
|
// src/components/Popover/Popover.tsx
|
|
@@ -10509,7 +10541,7 @@ Popover.displayName = "Popover";
|
|
|
10509
10541
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10510
10542
|
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10511
10543
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
10512
|
-
var
|
|
10544
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
10513
10545
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10514
10546
|
var ProgressBarWrapper = import_styled_components64.default.div`
|
|
10515
10547
|
--progress-bar-height: 8px;
|
|
@@ -10564,7 +10596,7 @@ var ProgressBar = ({
|
|
|
10564
10596
|
...props
|
|
10565
10597
|
}) => {
|
|
10566
10598
|
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(ProgressBarWrapper, { children: [
|
|
10567
|
-
(0,
|
|
10599
|
+
(0, import_type_guards38.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10568
10600
|
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10569
10601
|
StyledProgressBar,
|
|
10570
10602
|
{
|
|
@@ -10580,15 +10612,15 @@ var ProgressBar = ({
|
|
|
10580
10612
|
)
|
|
10581
10613
|
}
|
|
10582
10614
|
),
|
|
10583
|
-
(0,
|
|
10615
|
+
(0, import_type_guards38.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
10584
10616
|
] });
|
|
10585
10617
|
};
|
|
10586
10618
|
ProgressBar.displayName = "ProgressBar";
|
|
10587
10619
|
|
|
10588
10620
|
// src/components/Radio/Radio.tsx
|
|
10589
|
-
var
|
|
10621
|
+
var import_react46 = require("react");
|
|
10590
10622
|
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10591
|
-
var
|
|
10623
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
10592
10624
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10593
10625
|
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10594
10626
|
"svg",
|
|
@@ -10689,7 +10721,7 @@ var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
|
10689
10721
|
display: block;
|
|
10690
10722
|
}
|
|
10691
10723
|
`;
|
|
10692
|
-
var Radio = (0,
|
|
10724
|
+
var Radio = (0, import_react46.forwardRef)(
|
|
10693
10725
|
({
|
|
10694
10726
|
checked,
|
|
10695
10727
|
disabled = false,
|
|
@@ -10704,8 +10736,8 @@ var Radio = (0, import_react45.forwardRef)(
|
|
|
10704
10736
|
hideLabel = false,
|
|
10705
10737
|
...props
|
|
10706
10738
|
}, ref) => {
|
|
10707
|
-
const generatedId = (0,
|
|
10708
|
-
const computedId = (0,
|
|
10739
|
+
const generatedId = (0, import_react46.useId)();
|
|
10740
|
+
const computedId = (0, import_type_guards39.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
10709
10741
|
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
10710
10742
|
StyledRadioWrapper,
|
|
10711
10743
|
{
|
|
@@ -10754,22 +10786,22 @@ var Radio = (0, import_react45.forwardRef)(
|
|
|
10754
10786
|
Radio.displayName = "Radio";
|
|
10755
10787
|
|
|
10756
10788
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10757
|
-
var
|
|
10789
|
+
var import_react50 = require("react");
|
|
10758
10790
|
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10759
10791
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10760
|
-
var
|
|
10792
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10761
10793
|
|
|
10762
10794
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10763
|
-
var
|
|
10795
|
+
var import_react47 = require("react");
|
|
10764
10796
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10765
|
-
var SelectedItemMeasurementsContext = (0,
|
|
10797
|
+
var SelectedItemMeasurementsContext = (0, import_react47.createContext)(
|
|
10766
10798
|
null
|
|
10767
10799
|
);
|
|
10768
10800
|
var SelectedItemMeasurementsProvider = ({
|
|
10769
10801
|
children
|
|
10770
10802
|
}) => {
|
|
10771
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
10772
|
-
const contextValue = (0,
|
|
10803
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react47.useState)(null);
|
|
10804
|
+
const contextValue = (0, import_react47.useMemo)(
|
|
10773
10805
|
() => ({
|
|
10774
10806
|
setSelectedItemMeasurements,
|
|
10775
10807
|
selectedItemMeasurements
|
|
@@ -10779,7 +10811,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10779
10811
|
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10780
10812
|
};
|
|
10781
10813
|
var useSelectedItemMeasurements = () => {
|
|
10782
|
-
const context = (0,
|
|
10814
|
+
const context = (0, import_react47.useContext)(SelectedItemMeasurementsContext);
|
|
10783
10815
|
if (context === null) {
|
|
10784
10816
|
throw new Error(
|
|
10785
10817
|
"useSelectedItemMeasurements must be used within a SelectedItemMeasurementsProvider"
|
|
@@ -10789,15 +10821,15 @@ var useSelectedItemMeasurements = () => {
|
|
|
10789
10821
|
};
|
|
10790
10822
|
|
|
10791
10823
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10792
|
-
var
|
|
10824
|
+
var import_react49 = require("react");
|
|
10793
10825
|
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10794
10826
|
|
|
10795
10827
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10796
|
-
var
|
|
10797
|
-
var SegmentedControlValueContext = (0,
|
|
10828
|
+
var import_react48 = require("react");
|
|
10829
|
+
var SegmentedControlValueContext = (0, import_react48.createContext)(null);
|
|
10798
10830
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
10799
10831
|
var useSegmentedControlValue = () => {
|
|
10800
|
-
const context = (0,
|
|
10832
|
+
const context = (0, import_react48.useContext)(SegmentedControlValueContext);
|
|
10801
10833
|
if (context === null) {
|
|
10802
10834
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
10803
10835
|
}
|
|
@@ -10821,7 +10853,7 @@ var SelectedItemIndicatorDiv = import_styled_components66.default.div`
|
|
|
10821
10853
|
var SelectedItemIndicator = () => {
|
|
10822
10854
|
const selectedValue = useSegmentedControlValue();
|
|
10823
10855
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10824
|
-
const selectedItemIndicatorStyle = (0,
|
|
10856
|
+
const selectedItemIndicatorStyle = (0, import_react49.useMemo)(
|
|
10825
10857
|
() => selectedItemMeasurements != null ? {
|
|
10826
10858
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10827
10859
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10859,7 +10891,7 @@ var segmentedControlStyles = import_styled_components67.css`
|
|
|
10859
10891
|
var StyledSegmentedControl = (0, import_styled_components67.default)(import_react_toggle_group.Root)`
|
|
10860
10892
|
${segmentedControlStyles}
|
|
10861
10893
|
`;
|
|
10862
|
-
var SegmentedControl = (0,
|
|
10894
|
+
var SegmentedControl = (0, import_react50.forwardRef)(
|
|
10863
10895
|
({
|
|
10864
10896
|
children,
|
|
10865
10897
|
disabled = false,
|
|
@@ -10868,7 +10900,7 @@ var SegmentedControl = (0, import_react49.forwardRef)(
|
|
|
10868
10900
|
onSelectedValueChange,
|
|
10869
10901
|
...props
|
|
10870
10902
|
}, ref) => {
|
|
10871
|
-
if ((0,
|
|
10903
|
+
if ((0, import_type_guards40.isNil)(children)) {
|
|
10872
10904
|
return null;
|
|
10873
10905
|
}
|
|
10874
10906
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
@@ -10894,26 +10926,10 @@ var SegmentedControl = (0, import_react49.forwardRef)(
|
|
|
10894
10926
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10895
10927
|
|
|
10896
10928
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10897
|
-
var
|
|
10929
|
+
var import_react51 = require("react");
|
|
10898
10930
|
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10899
10931
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10900
10932
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
10901
|
-
|
|
10902
|
-
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10903
|
-
var import_type_guards40 = require("@wistia/type-guards");
|
|
10904
|
-
var mergeRefs = (refs) => (value) => {
|
|
10905
|
-
refs.forEach((ref) => {
|
|
10906
|
-
if ((0, import_type_guards40.isFunction)(ref)) {
|
|
10907
|
-
ref(value);
|
|
10908
|
-
return;
|
|
10909
|
-
}
|
|
10910
|
-
if ((0, import_type_guards40.isNotNil)(ref)) {
|
|
10911
|
-
ref.current = value;
|
|
10912
|
-
}
|
|
10913
|
-
});
|
|
10914
|
-
};
|
|
10915
|
-
|
|
10916
|
-
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10917
10933
|
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
10918
10934
|
var segmentedControlItemStyles = import_styled_components68.css`
|
|
10919
10935
|
all: unset; /* ToggleGroupItem is a button element */
|
|
@@ -10977,11 +10993,11 @@ var segmentedControlItemStyles = import_styled_components68.css`
|
|
|
10977
10993
|
var StyledSegmentedControlItem = (0, import_styled_components68.default)(import_react_toggle_group2.Item)`
|
|
10978
10994
|
${segmentedControlItemStyles}
|
|
10979
10995
|
`;
|
|
10980
|
-
var SegmentedControlItem = (0,
|
|
10996
|
+
var SegmentedControlItem = (0, import_react51.forwardRef)(
|
|
10981
10997
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10982
10998
|
const selectedValue = useSegmentedControlValue();
|
|
10983
10999
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10984
|
-
const buttonRef = (0,
|
|
11000
|
+
const buttonRef = (0, import_react51.useRef)(null);
|
|
10985
11001
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10986
11002
|
const handleClick = (event) => {
|
|
10987
11003
|
const target = event.target;
|
|
@@ -10990,7 +11006,7 @@ var SegmentedControlItem = (0, import_react50.forwardRef)(
|
|
|
10990
11006
|
event.preventDefault();
|
|
10991
11007
|
}
|
|
10992
11008
|
};
|
|
10993
|
-
(0,
|
|
11009
|
+
(0, import_react51.useEffect)(() => {
|
|
10994
11010
|
const buttonElem = buttonRef.current;
|
|
10995
11011
|
if (!buttonElem) {
|
|
10996
11012
|
return void 0;
|
|
@@ -11036,7 +11052,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
11036
11052
|
|
|
11037
11053
|
// src/components/Select/Select.tsx
|
|
11038
11054
|
var import_react_select = require("@radix-ui/react-select");
|
|
11039
|
-
var
|
|
11055
|
+
var import_react52 = require("react");
|
|
11040
11056
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
11041
11057
|
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11042
11058
|
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
@@ -11105,7 +11121,7 @@ var StyledContent3 = (0, import_styled_components69.default)(import_react_select
|
|
|
11105
11121
|
max-height: var(--radix-select-content-available-height);
|
|
11106
11122
|
z-index: var(--wui-zindex-select);
|
|
11107
11123
|
`;
|
|
11108
|
-
var Select = (0,
|
|
11124
|
+
var Select = (0, import_react52.forwardRef)(
|
|
11109
11125
|
({
|
|
11110
11126
|
colorScheme = "inherit",
|
|
11111
11127
|
children,
|
|
@@ -11154,7 +11170,7 @@ Select.displayName = "Select";
|
|
|
11154
11170
|
|
|
11155
11171
|
// src/components/Select/SelectOption.tsx
|
|
11156
11172
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11157
|
-
var
|
|
11173
|
+
var import_react53 = require("react");
|
|
11158
11174
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11159
11175
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11160
11176
|
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
@@ -11183,7 +11199,7 @@ var StyledItem = (0, import_styled_components70.default)(import_react_select2.It
|
|
|
11183
11199
|
var StyledIconContainer = import_styled_components70.default.span`
|
|
11184
11200
|
width: 12px;
|
|
11185
11201
|
`;
|
|
11186
|
-
var SelectOption = (0,
|
|
11202
|
+
var SelectOption = (0, import_react53.forwardRef)(
|
|
11187
11203
|
({ children, ...props }, forwardedRef) => {
|
|
11188
11204
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11189
11205
|
StyledItem,
|
|
@@ -11228,7 +11244,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11228
11244
|
};
|
|
11229
11245
|
|
|
11230
11246
|
// src/components/Switch/Switch.tsx
|
|
11231
|
-
var
|
|
11247
|
+
var import_react54 = require("react");
|
|
11232
11248
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11233
11249
|
var import_type_guards42 = require("@wistia/type-guards");
|
|
11234
11250
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
@@ -11333,7 +11349,7 @@ var StyledHiddenSwitchInput = import_styled_components72.default.input`
|
|
|
11333
11349
|
}
|
|
11334
11350
|
}
|
|
11335
11351
|
`;
|
|
11336
|
-
var Switch = (0,
|
|
11352
|
+
var Switch = (0, import_react54.forwardRef)(
|
|
11337
11353
|
({
|
|
11338
11354
|
checked,
|
|
11339
11355
|
disabled = false,
|
|
@@ -11348,7 +11364,7 @@ var Switch = (0, import_react53.forwardRef)(
|
|
|
11348
11364
|
hideLabel = false,
|
|
11349
11365
|
...props
|
|
11350
11366
|
}, ref) => {
|
|
11351
|
-
const generatedId = (0,
|
|
11367
|
+
const generatedId = (0, import_react54.useId)();
|
|
11352
11368
|
const computedId = (0, import_type_guards42.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11353
11369
|
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11354
11370
|
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
@@ -11430,8 +11446,8 @@ var Table = ({
|
|
|
11430
11446
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11431
11447
|
|
|
11432
11448
|
// src/components/Table/TableSectionContext.ts
|
|
11433
|
-
var
|
|
11434
|
-
var TableSectionContext = (0,
|
|
11449
|
+
var import_react55 = require("react");
|
|
11450
|
+
var TableSectionContext = (0, import_react55.createContext)(null);
|
|
11435
11451
|
|
|
11436
11452
|
// src/components/Table/TableBody.tsx
|
|
11437
11453
|
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
@@ -11441,7 +11457,7 @@ var TableBody = ({ children, ...props }) => {
|
|
|
11441
11457
|
};
|
|
11442
11458
|
|
|
11443
11459
|
// src/components/Table/TableCell.tsx
|
|
11444
|
-
var
|
|
11460
|
+
var import_react56 = require("react");
|
|
11445
11461
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11446
11462
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11447
11463
|
var sharedStyles = import_styled_components75.css`
|
|
@@ -11462,7 +11478,7 @@ var StyledTd = import_styled_components75.default.td`
|
|
|
11462
11478
|
line-height: var(--wui-typography-body-2-line-height);
|
|
11463
11479
|
`;
|
|
11464
11480
|
var TableCell = ({ children, ...props }) => {
|
|
11465
|
-
const section = (0,
|
|
11481
|
+
const section = (0, import_react56.useContext)(TableSectionContext);
|
|
11466
11482
|
if (section === "head") {
|
|
11467
11483
|
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTh, { ...props, children });
|
|
11468
11484
|
}
|
|
@@ -11494,7 +11510,7 @@ var TableRow = ({ children, ...props }) => {
|
|
|
11494
11510
|
};
|
|
11495
11511
|
|
|
11496
11512
|
// src/components/Tabs/Tabs.tsx
|
|
11497
|
-
var
|
|
11513
|
+
var import_react61 = require("react");
|
|
11498
11514
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11499
11515
|
var import_type_guards44 = require("@wistia/type-guards");
|
|
11500
11516
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
@@ -11549,17 +11565,17 @@ var TabList = ({
|
|
|
11549
11565
|
TabList.displayName = "TabList";
|
|
11550
11566
|
|
|
11551
11567
|
// src/components/Tabs/TabItem.tsx
|
|
11552
|
-
var
|
|
11568
|
+
var import_react58 = require("react");
|
|
11553
11569
|
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11554
11570
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11555
11571
|
var import_type_guards43 = require("@wistia/type-guards");
|
|
11556
11572
|
|
|
11557
11573
|
// src/components/Tabs/useTabsValue.tsx
|
|
11558
|
-
var
|
|
11559
|
-
var TabsValueContext = (0,
|
|
11574
|
+
var import_react57 = require("react");
|
|
11575
|
+
var TabsValueContext = (0, import_react57.createContext)(null);
|
|
11560
11576
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
11561
11577
|
var useTabsValue = () => {
|
|
11562
|
-
const context = (0,
|
|
11578
|
+
const context = (0, import_react57.useContext)(TabsValueContext);
|
|
11563
11579
|
if (context === null) {
|
|
11564
11580
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
11565
11581
|
}
|
|
@@ -11575,13 +11591,13 @@ var StyledTabItem = (0, import_styled_components81.default)(import_react_tabs3.T
|
|
|
11575
11591
|
outline: none;
|
|
11576
11592
|
}
|
|
11577
11593
|
`;
|
|
11578
|
-
var TabItem = (0,
|
|
11594
|
+
var TabItem = (0, import_react58.forwardRef)(
|
|
11579
11595
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11580
11596
|
const selectedValue = useTabsValue();
|
|
11581
11597
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11582
|
-
const buttonRef = (0,
|
|
11598
|
+
const buttonRef = (0, import_react58.useRef)(null);
|
|
11583
11599
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11584
|
-
(0,
|
|
11600
|
+
(0, import_react58.useEffect)(() => {
|
|
11585
11601
|
const buttonElem = buttonRef.current;
|
|
11586
11602
|
if (!buttonElem) {
|
|
11587
11603
|
return void 0;
|
|
@@ -11625,16 +11641,16 @@ var TabItem = (0, import_react57.forwardRef)(
|
|
|
11625
11641
|
TabItem.displayName = "TabItem";
|
|
11626
11642
|
|
|
11627
11643
|
// src/components/Tabs/extractTabItems.ts
|
|
11628
|
-
var
|
|
11644
|
+
var import_react59 = require("react");
|
|
11629
11645
|
var extractTabItems = (children) => {
|
|
11630
11646
|
const tabItems = [];
|
|
11631
|
-
|
|
11632
|
-
if (!(0,
|
|
11647
|
+
import_react59.Children.forEach(children, (child) => {
|
|
11648
|
+
if (!(0, import_react59.isValidElement)(child)) {
|
|
11633
11649
|
return;
|
|
11634
11650
|
}
|
|
11635
11651
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
11636
11652
|
tabItems.push(child);
|
|
11637
|
-
} else if (child.type ===
|
|
11653
|
+
} else if (child.type === import_react59.Fragment) {
|
|
11638
11654
|
const fragmentElement = child;
|
|
11639
11655
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
11640
11656
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -11647,7 +11663,7 @@ var extractTabItems = (children) => {
|
|
|
11647
11663
|
};
|
|
11648
11664
|
|
|
11649
11665
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11650
|
-
var
|
|
11666
|
+
var import_react60 = require("react");
|
|
11651
11667
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11652
11668
|
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
11653
11669
|
var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(SelectedItemIndicatorDiv)`
|
|
@@ -11658,7 +11674,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(Selec
|
|
|
11658
11674
|
var SelectedItemIndicator2 = () => {
|
|
11659
11675
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11660
11676
|
const selectedValue = useTabsValue();
|
|
11661
|
-
const selectedItemIndicatorStyle = (0,
|
|
11677
|
+
const selectedItemIndicatorStyle = (0, import_react60.useMemo)(
|
|
11662
11678
|
() => selectedItemMeasurements != null ? {
|
|
11663
11679
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11664
11680
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -11699,7 +11715,7 @@ var StyledTabsRoot = (0, import_styled_components83.default)(import_react_tabs4.
|
|
|
11699
11715
|
flex-direction: column;
|
|
11700
11716
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11701
11717
|
`;
|
|
11702
|
-
var Tabs = (0,
|
|
11718
|
+
var Tabs = (0, import_react61.forwardRef)(
|
|
11703
11719
|
({
|
|
11704
11720
|
children,
|
|
11705
11721
|
fullWidth = true,
|
|
@@ -11711,7 +11727,7 @@ var Tabs = (0, import_react60.forwardRef)(
|
|
|
11711
11727
|
...otherProps
|
|
11712
11728
|
}, ref) => {
|
|
11713
11729
|
const tabItems = extractTabItems(children);
|
|
11714
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
11730
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react61.useState)(defaultSelectedValue);
|
|
11715
11731
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
11716
11732
|
defaultValue: defaultSelectedValue,
|
|
11717
11733
|
onValueChange: setInternalSelectedValue
|
|
@@ -11797,15 +11813,15 @@ var Tabs = (0, import_react60.forwardRef)(
|
|
|
11797
11813
|
Tabs.displayName = "Tabs";
|
|
11798
11814
|
|
|
11799
11815
|
// src/components/Tabs/Tab.tsx
|
|
11800
|
-
var
|
|
11816
|
+
var import_react62 = require("react");
|
|
11801
11817
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
11802
|
-
var Tab = (0,
|
|
11818
|
+
var Tab = (0, import_react62.forwardRef)(({ children }, ref) => {
|
|
11803
11819
|
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", { ref, children });
|
|
11804
11820
|
});
|
|
11805
11821
|
Tab.displayName = "Tab";
|
|
11806
11822
|
|
|
11807
11823
|
// src/components/Tag/Tag.tsx
|
|
11808
|
-
var
|
|
11824
|
+
var import_react63 = require("react");
|
|
11809
11825
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11810
11826
|
var import_type_guards45 = require("@wistia/type-guards");
|
|
11811
11827
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
@@ -11922,7 +11938,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11922
11938
|
)
|
|
11923
11939
|
] });
|
|
11924
11940
|
};
|
|
11925
|
-
var Tag = (0,
|
|
11941
|
+
var Tag = (0, import_react63.forwardRef)(
|
|
11926
11942
|
({
|
|
11927
11943
|
onClickRemove,
|
|
11928
11944
|
colorScheme = "inherit",
|
|
@@ -12173,6 +12189,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12173
12189
|
ellipsisFlexParentStyle,
|
|
12174
12190
|
ellipsisStyle,
|
|
12175
12191
|
iconSizeMap,
|
|
12192
|
+
mergeRefs,
|
|
12176
12193
|
mq,
|
|
12177
12194
|
useActiveMq,
|
|
12178
12195
|
useAriaLive,
|
|
@@ -12182,6 +12199,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12182
12199
|
useImperativeFilePicker,
|
|
12183
12200
|
useKey,
|
|
12184
12201
|
useLocalStorage,
|
|
12202
|
+
useLockBodyScroll,
|
|
12185
12203
|
useMq,
|
|
12186
12204
|
useToast,
|
|
12187
12205
|
useWindowSize
|