@wistia/ui 0.6.36 → 0.6.37-beta.55f0c7b2.34f1d67
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 +320 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.mjs +117 -88
- 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.37-beta.55f0c7b2.34f1d67
|
|
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,
|
|
@@ -130,6 +131,7 @@ __export(index_exports, {
|
|
|
130
131
|
useLocalStorage: () => useLocalStorage,
|
|
131
132
|
useLockBodyScroll: () => useLockBodyScroll,
|
|
132
133
|
useMq: () => useMq,
|
|
134
|
+
useOnClickOutside: () => useOnClickOutside,
|
|
133
135
|
useToast: () => useToast,
|
|
134
136
|
useWindowSize: () => useWindowSize
|
|
135
137
|
});
|
|
@@ -2006,6 +2008,20 @@ var dateTime = {
|
|
|
2006
2008
|
timeOnlyString
|
|
2007
2009
|
};
|
|
2008
2010
|
|
|
2011
|
+
// src/helpers/mergeRefs/mergeRefs.ts
|
|
2012
|
+
var import_type_guards5 = require("@wistia/type-guards");
|
|
2013
|
+
var mergeRefs = (refs) => (value) => {
|
|
2014
|
+
refs.forEach((ref) => {
|
|
2015
|
+
if ((0, import_type_guards5.isFunction)(ref)) {
|
|
2016
|
+
ref(value);
|
|
2017
|
+
return;
|
|
2018
|
+
}
|
|
2019
|
+
if ((0, import_type_guards5.isNotNil)(ref)) {
|
|
2020
|
+
ref.current = value;
|
|
2021
|
+
}
|
|
2022
|
+
});
|
|
2023
|
+
};
|
|
2024
|
+
|
|
2009
2025
|
// src/helpers/mq/mq.ts
|
|
2010
2026
|
var import_polished = require("polished");
|
|
2011
2027
|
|
|
@@ -2054,10 +2070,10 @@ var mq = {
|
|
|
2054
2070
|
|
|
2055
2071
|
// src/hooks/useAriaLive/useAriaLive.tsx
|
|
2056
2072
|
var import_react3 = require("react");
|
|
2057
|
-
var
|
|
2073
|
+
var import_type_guards6 = require("@wistia/type-guards");
|
|
2058
2074
|
var useAriaLive = () => {
|
|
2059
2075
|
const context = (0, import_react3.useContext)(AriaLiveContext);
|
|
2060
|
-
if ((0,
|
|
2076
|
+
if ((0, import_type_guards6.isNil)(context)) {
|
|
2061
2077
|
throw new Error("useAriaLive must be used within an AriaLiveProvider");
|
|
2062
2078
|
}
|
|
2063
2079
|
return context;
|
|
@@ -2084,9 +2100,9 @@ var import_react6 = require("react");
|
|
|
2084
2100
|
var import_react5 = require("react");
|
|
2085
2101
|
|
|
2086
2102
|
// src/private/helpers/isValidRef/isValidRef.ts
|
|
2087
|
-
var
|
|
2103
|
+
var import_type_guards7 = require("@wistia/type-guards");
|
|
2088
2104
|
var isValidRef = (value) => {
|
|
2089
|
-
return (0,
|
|
2105
|
+
return (0, import_type_guards7.isNotNil)(value) && (0, import_type_guards7.isRecord)(value) && "current" in value;
|
|
2090
2106
|
};
|
|
2091
2107
|
|
|
2092
2108
|
// src/private/hooks/useEvent/useEvent.ts
|
|
@@ -2193,11 +2209,40 @@ var useLockBodyScroll = (locked) => {
|
|
|
2193
2209
|
}, [locked]);
|
|
2194
2210
|
};
|
|
2195
2211
|
|
|
2212
|
+
// src/hooks/useOnClickOutside/useOnClickOutside.ts
|
|
2213
|
+
var import_react9 = require("react");
|
|
2214
|
+
var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) => {
|
|
2215
|
+
(0, import_react9.useEffect)(() => {
|
|
2216
|
+
const listener = (event) => {
|
|
2217
|
+
if (!ref.current || ref.current.contains(event.target)) {
|
|
2218
|
+
return;
|
|
2219
|
+
}
|
|
2220
|
+
handler(event);
|
|
2221
|
+
};
|
|
2222
|
+
if (Array.isArray(eventTypes)) {
|
|
2223
|
+
eventTypes.forEach((eventType) => {
|
|
2224
|
+
document.addEventListener(eventType, listener);
|
|
2225
|
+
});
|
|
2226
|
+
} else {
|
|
2227
|
+
document.addEventListener(eventTypes, listener);
|
|
2228
|
+
}
|
|
2229
|
+
return () => {
|
|
2230
|
+
if (Array.isArray(eventTypes)) {
|
|
2231
|
+
eventTypes.forEach((eventType) => {
|
|
2232
|
+
document.removeEventListener(eventType, listener);
|
|
2233
|
+
});
|
|
2234
|
+
} else {
|
|
2235
|
+
document.removeEventListener(eventTypes, listener);
|
|
2236
|
+
}
|
|
2237
|
+
};
|
|
2238
|
+
}, [ref, handler, eventTypes]);
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2196
2241
|
// src/hooks/useMq/useMq.ts
|
|
2197
|
-
var
|
|
2242
|
+
var import_type_guards8 = require("@wistia/type-guards");
|
|
2198
2243
|
|
|
2199
2244
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2200
|
-
var
|
|
2245
|
+
var import_react10 = require("react");
|
|
2201
2246
|
var import_throttle_debounce = require("throttle-debounce");
|
|
2202
2247
|
|
|
2203
2248
|
// src/private/helpers/isClient/isClient.ts
|
|
@@ -2205,11 +2250,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
|
|
|
2205
2250
|
|
|
2206
2251
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2207
2252
|
var useWindowSize = (interval = 0) => {
|
|
2208
|
-
const [dimensions, setDimensions] = (0,
|
|
2253
|
+
const [dimensions, setDimensions] = (0, import_react10.useState)({
|
|
2209
2254
|
width: isClient() ? window.innerWidth : 0,
|
|
2210
2255
|
height: isClient() ? window.innerHeight : 0
|
|
2211
2256
|
});
|
|
2212
|
-
(0,
|
|
2257
|
+
(0, import_react10.useLayoutEffect)(() => {
|
|
2213
2258
|
const handleResize = (0, import_throttle_debounce.debounce)(
|
|
2214
2259
|
interval,
|
|
2215
2260
|
() => setDimensions({
|
|
@@ -2256,21 +2301,21 @@ var useActiveMq = () => {
|
|
|
2256
2301
|
const keys = Object.keys(mq2);
|
|
2257
2302
|
return keys.filter((key) => {
|
|
2258
2303
|
const value = mq2[key];
|
|
2259
|
-
return (0,
|
|
2304
|
+
return (0, import_type_guards8.isBoolean)(value) && value;
|
|
2260
2305
|
});
|
|
2261
2306
|
};
|
|
2262
2307
|
|
|
2263
2308
|
// src/hooks/useToast/useToast.tsx
|
|
2264
|
-
var
|
|
2309
|
+
var import_react12 = require("react");
|
|
2265
2310
|
var import_sonner2 = require("sonner");
|
|
2266
2311
|
|
|
2267
2312
|
// src/private/components/Toast/Toast.tsx
|
|
2268
|
-
var
|
|
2313
|
+
var import_react11 = require("react");
|
|
2269
2314
|
var import_styled_components15 = __toESM(require("styled-components"));
|
|
2270
|
-
var
|
|
2315
|
+
var import_type_guards10 = require("@wistia/type-guards");
|
|
2271
2316
|
|
|
2272
2317
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
2273
|
-
var
|
|
2318
|
+
var import_type_guards9 = require("@wistia/type-guards");
|
|
2274
2319
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
2275
2320
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2276
2321
|
var ellipsisStyle = import_styled_components13.css`
|
|
@@ -2303,7 +2348,7 @@ var ellipsisFlexParentStyle = import_styled_components13.css`
|
|
|
2303
2348
|
var EllipsisComponent = import_styled_components13.default.span`
|
|
2304
2349
|
${ellipsisStyle};
|
|
2305
2350
|
${({ $lines }) => {
|
|
2306
|
-
if ((0,
|
|
2351
|
+
if ((0, import_type_guards9.isNotNil)($lines)) {
|
|
2307
2352
|
return import_styled_components13.css`
|
|
2308
2353
|
-webkit-box-orient: vertical;
|
|
2309
2354
|
-webkit-line-clamp: ${$lines};
|
|
@@ -2495,8 +2540,8 @@ var StyledToast = import_styled_components15.default.div`
|
|
|
2495
2540
|
}
|
|
2496
2541
|
`;
|
|
2497
2542
|
var Action = ({ actionButton }) => {
|
|
2498
|
-
if ((0,
|
|
2499
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0,
|
|
2543
|
+
if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react11.isValidElement)(actionButton)) {
|
|
2544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react11.cloneElement)(actionButton, {
|
|
2500
2545
|
variant: "soft",
|
|
2501
2546
|
// force Button variant
|
|
2502
2547
|
size: "sm"
|
|
@@ -2519,7 +2564,7 @@ var Toast = ({
|
|
|
2519
2564
|
$colorScheme: colorScheme,
|
|
2520
2565
|
children: [
|
|
2521
2566
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(MessageWrapper, { children: [
|
|
2522
|
-
(0,
|
|
2567
|
+
(0, import_type_guards10.isNotNil)(icon) ? icon : null,
|
|
2523
2568
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Message, { lines: 3, children: message })
|
|
2524
2569
|
] }),
|
|
2525
2570
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Action, { actionButton: action })
|
|
@@ -2532,7 +2577,7 @@ Toast.displayName = "Toast";
|
|
|
2532
2577
|
// src/hooks/useToast/useToast.tsx
|
|
2533
2578
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2534
2579
|
var useToast = () => {
|
|
2535
|
-
return (0,
|
|
2580
|
+
return (0, import_react12.useCallback)(
|
|
2536
2581
|
({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
|
|
2537
2582
|
import_sonner2.toast.custom(
|
|
2538
2583
|
() => {
|
|
@@ -2554,13 +2599,13 @@ var useToast = () => {
|
|
|
2554
2599
|
};
|
|
2555
2600
|
|
|
2556
2601
|
// src/components/ActionButton/ActionButton.tsx
|
|
2557
|
-
var
|
|
2602
|
+
var import_react16 = require("react");
|
|
2558
2603
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2559
2604
|
|
|
2560
2605
|
// src/components/Button/Button.tsx
|
|
2561
|
-
var
|
|
2606
|
+
var import_react15 = require("react");
|
|
2562
2607
|
var import_styled_components20 = __toESM(require("styled-components"));
|
|
2563
|
-
var
|
|
2608
|
+
var import_type_guards14 = require("@wistia/type-guards");
|
|
2564
2609
|
|
|
2565
2610
|
// src/css/buttonResetCss.tsx
|
|
2566
2611
|
var import_styled_components16 = require("styled-components");
|
|
@@ -2764,7 +2809,7 @@ var buttonSizeStyles = {
|
|
|
2764
2809
|
};
|
|
2765
2810
|
|
|
2766
2811
|
// src/components/Icon/Icon.tsx
|
|
2767
|
-
var
|
|
2812
|
+
var import_type_guards12 = require("@wistia/type-guards");
|
|
2768
2813
|
var import_styled_components18 = __toESM(require("styled-components"));
|
|
2769
2814
|
|
|
2770
2815
|
// src/components/Icon/icons/AbTestIcon.tsx
|
|
@@ -6619,17 +6664,17 @@ var iconMap = {
|
|
|
6619
6664
|
};
|
|
6620
6665
|
|
|
6621
6666
|
// src/private/hooks/useResponsiveProp/useResponsiveProp.ts
|
|
6622
|
-
var
|
|
6623
|
-
var
|
|
6667
|
+
var import_type_guards11 = require("@wistia/type-guards");
|
|
6668
|
+
var import_react13 = require("react");
|
|
6624
6669
|
var isResponsiveObject = (values) => {
|
|
6625
6670
|
return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
|
|
6626
6671
|
};
|
|
6627
6672
|
var useResponsiveProp = (values) => {
|
|
6628
6673
|
const activeMediaQueries = useActiveMq();
|
|
6629
|
-
return (0,
|
|
6630
|
-
if ((0,
|
|
6674
|
+
return (0, import_react13.useMemo)(() => {
|
|
6675
|
+
if ((0, import_type_guards11.isRecord)(values) && isResponsiveObject(values)) {
|
|
6631
6676
|
const mq2 = activeMediaQueries.find((key) => key in values);
|
|
6632
|
-
return (0,
|
|
6677
|
+
return (0, import_type_guards11.isNotUndefined)(mq2) && (0, import_type_guards11.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
|
|
6633
6678
|
}
|
|
6634
6679
|
return values;
|
|
6635
6680
|
}, [activeMediaQueries, values]);
|
|
@@ -6656,13 +6701,13 @@ var Icon = ({
|
|
|
6656
6701
|
...otherProps
|
|
6657
6702
|
}) => {
|
|
6658
6703
|
const responsiveSize = useResponsiveProp(size);
|
|
6659
|
-
if ((0,
|
|
6704
|
+
if ((0, import_type_guards12.isNil)(type)) {
|
|
6660
6705
|
throw new Error("An Icon component requires a `type` prop to be provided");
|
|
6661
6706
|
}
|
|
6662
|
-
if ((0,
|
|
6707
|
+
if ((0, import_type_guards12.isNil)(iconMap[type])) {
|
|
6663
6708
|
throw new Error(`Type "${type}" does not exist, please update type prop in Icon component.`);
|
|
6664
6709
|
}
|
|
6665
|
-
if ((0,
|
|
6710
|
+
if ((0, import_type_guards12.isNil)(iconSizeMap[responsiveSize])) {
|
|
6666
6711
|
throw new Error(
|
|
6667
6712
|
`Size "${responsiveSize}" does not exist, please update size prop in Icon component.`
|
|
6668
6713
|
);
|
|
@@ -6693,13 +6738,13 @@ var Icon = ({
|
|
|
6693
6738
|
Icon.displayName = "Icon";
|
|
6694
6739
|
|
|
6695
6740
|
// src/components/Link/Link.tsx
|
|
6696
|
-
var
|
|
6697
|
-
var
|
|
6741
|
+
var import_react14 = require("react");
|
|
6742
|
+
var import_type_guards13 = require("@wistia/type-guards");
|
|
6698
6743
|
var import_styled_components19 = __toESM(require("styled-components"));
|
|
6699
6744
|
var import_react_router_dom = require("react-router-dom");
|
|
6700
6745
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
6701
6746
|
var generateHref = (href, type, disabled) => {
|
|
6702
|
-
if (disabled || (0,
|
|
6747
|
+
if (disabled || (0, import_type_guards13.isNil)(href)) {
|
|
6703
6748
|
return void 0;
|
|
6704
6749
|
}
|
|
6705
6750
|
let to = href;
|
|
@@ -6711,12 +6756,12 @@ var generateHref = (href, type, disabled) => {
|
|
|
6711
6756
|
}
|
|
6712
6757
|
return to;
|
|
6713
6758
|
};
|
|
6714
|
-
var isButton = (props) => (0,
|
|
6715
|
-
var isLink = (props) => (0,
|
|
6759
|
+
var isButton = (props) => (0, import_type_guards13.isUndefined)(props.href);
|
|
6760
|
+
var isLink = (props) => (0, import_type_guards13.isNotUndefined)(props.href);
|
|
6716
6761
|
var StyledLink = import_styled_components19.default.a`
|
|
6717
6762
|
--link-icon-size: 14px;
|
|
6718
6763
|
|
|
6719
|
-
${({ href }) => (0,
|
|
6764
|
+
${({ href }) => (0, import_type_guards13.isNil)(href) && buttonResetCss};
|
|
6720
6765
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
6721
6766
|
cursor: pointer;
|
|
6722
6767
|
font-family: var(--wui-typography-family-default);
|
|
@@ -6733,7 +6778,7 @@ var StyledLink = import_styled_components19.default.a`
|
|
|
6733
6778
|
}
|
|
6734
6779
|
}
|
|
6735
6780
|
`;
|
|
6736
|
-
var Link = (0,
|
|
6781
|
+
var Link = (0, import_react14.forwardRef)(
|
|
6737
6782
|
({
|
|
6738
6783
|
beforeAction,
|
|
6739
6784
|
children,
|
|
@@ -6757,16 +6802,16 @@ var Link = (0, import_react13.forwardRef)(
|
|
|
6757
6802
|
} catch (error) {
|
|
6758
6803
|
console.error(error);
|
|
6759
6804
|
} finally {
|
|
6760
|
-
if ((0,
|
|
6805
|
+
if ((0, import_type_guards13.isFunction)(props.onClick)) {
|
|
6761
6806
|
props.onClick(event);
|
|
6762
6807
|
} else if (routingCallback !== null) {
|
|
6763
6808
|
routingCallback();
|
|
6764
|
-
} else if ((0,
|
|
6809
|
+
} else if ((0, import_type_guards13.isNotNil)(to)) {
|
|
6765
6810
|
window.location.assign(to);
|
|
6766
6811
|
} else {
|
|
6767
6812
|
}
|
|
6768
6813
|
}
|
|
6769
|
-
} else if ((0,
|
|
6814
|
+
} else if ((0, import_type_guards13.isFunction)(props.onClick)) {
|
|
6770
6815
|
props.onClick(event);
|
|
6771
6816
|
} else {
|
|
6772
6817
|
}
|
|
@@ -6827,7 +6872,7 @@ Link.displayName = "Link";
|
|
|
6827
6872
|
|
|
6828
6873
|
// src/components/Button/Button.tsx
|
|
6829
6874
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
6830
|
-
var isLink2 = (props) => (0,
|
|
6875
|
+
var isLink2 = (props) => (0, import_type_guards14.isNotUndefined)(props.href);
|
|
6831
6876
|
var StyledButton = import_styled_components20.default.button`
|
|
6832
6877
|
${buttonResetCss}
|
|
6833
6878
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
@@ -6867,8 +6912,8 @@ var ButtonContent = ({
|
|
|
6867
6912
|
/* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
|
|
6868
6913
|
StyledButtonContent,
|
|
6869
6914
|
{
|
|
6870
|
-
$hasLeftIcon: (0,
|
|
6871
|
-
$hasRightIcon: (0,
|
|
6915
|
+
$hasLeftIcon: (0, import_type_guards14.isNotNil)(leftIcon),
|
|
6916
|
+
$hasRightIcon: (0, import_type_guards14.isNotNil)(rightIcon),
|
|
6872
6917
|
$isLoading: isLoading,
|
|
6873
6918
|
children: [
|
|
6874
6919
|
leftIcon ?? null,
|
|
@@ -6879,7 +6924,7 @@ var ButtonContent = ({
|
|
|
6879
6924
|
)
|
|
6880
6925
|
] });
|
|
6881
6926
|
};
|
|
6882
|
-
var Button = (0,
|
|
6927
|
+
var Button = (0, import_react15.forwardRef)(
|
|
6883
6928
|
({
|
|
6884
6929
|
children,
|
|
6885
6930
|
forceState,
|
|
@@ -6936,7 +6981,7 @@ var Button = (0, import_react14.forwardRef)(
|
|
|
6936
6981
|
event.preventDefault();
|
|
6937
6982
|
return;
|
|
6938
6983
|
}
|
|
6939
|
-
if ((0,
|
|
6984
|
+
if ((0, import_type_guards14.isNotNil)(onClick)) {
|
|
6940
6985
|
onClick(event);
|
|
6941
6986
|
}
|
|
6942
6987
|
};
|
|
@@ -7058,7 +7103,7 @@ var StyledLabel = import_styled_components21.default.span`
|
|
|
7058
7103
|
grid-row: 2;
|
|
7059
7104
|
text-align: left;
|
|
7060
7105
|
`;
|
|
7061
|
-
var ActionButton = (0,
|
|
7106
|
+
var ActionButton = (0, import_react16.forwardRef)(
|
|
7062
7107
|
({
|
|
7063
7108
|
icon,
|
|
7064
7109
|
colorScheme = "default",
|
|
@@ -7102,8 +7147,8 @@ var ActionButton = (0, import_react15.forwardRef)(
|
|
|
7102
7147
|
ActionButton.displayName = "ActionButton";
|
|
7103
7148
|
|
|
7104
7149
|
// src/components/Avatar/Avatar.tsx
|
|
7105
|
-
var
|
|
7106
|
-
var
|
|
7150
|
+
var import_react17 = require("react");
|
|
7151
|
+
var import_type_guards16 = require("@wistia/type-guards");
|
|
7107
7152
|
var import_styled_components23 = __toESM(require("styled-components"));
|
|
7108
7153
|
|
|
7109
7154
|
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
@@ -7146,13 +7191,13 @@ var ColorSchemeWrapper = ({
|
|
|
7146
7191
|
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
7147
7192
|
|
|
7148
7193
|
// src/components/Avatar/formatNameForDisplay.tsx
|
|
7149
|
-
var
|
|
7194
|
+
var import_type_guards15 = require("@wistia/type-guards");
|
|
7150
7195
|
var containsEmojiCharacter = (char) => {
|
|
7151
7196
|
const emojiRegex = /<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu;
|
|
7152
7197
|
return emojiRegex.test(char);
|
|
7153
7198
|
};
|
|
7154
7199
|
var formatNameForDisplay = (name) => {
|
|
7155
|
-
if ((0,
|
|
7200
|
+
if ((0, import_type_guards15.isNil)(name) || !(0, import_type_guards15.isString)(name) || (0, import_type_guards15.isEmptyString)(name) || containsEmojiCharacter(name)) {
|
|
7156
7201
|
return "U";
|
|
7157
7202
|
}
|
|
7158
7203
|
const firstChar = name.trim().substring(0, 1);
|
|
@@ -7215,7 +7260,7 @@ var AvatarWrapper = import_styled_components23.default.div`
|
|
|
7215
7260
|
max-height: ${({ $maxHeight }) => $maxHeight}px;
|
|
7216
7261
|
`;
|
|
7217
7262
|
var chooseColorScheme = (name) => {
|
|
7218
|
-
if ((0,
|
|
7263
|
+
if ((0, import_type_guards16.isNil)(name) || name === "Anonymous") {
|
|
7219
7264
|
return "default";
|
|
7220
7265
|
}
|
|
7221
7266
|
const filteredColors = colorSchemeOptions.filter(
|
|
@@ -7234,8 +7279,8 @@ var Avatar = ({
|
|
|
7234
7279
|
onImageLoad,
|
|
7235
7280
|
...otherProps
|
|
7236
7281
|
}) => {
|
|
7237
|
-
const [imageLoadState, setImageLoadState] = (0,
|
|
7238
|
-
(0,
|
|
7282
|
+
const [imageLoadState, setImageLoadState] = (0, import_react17.useState)("loading");
|
|
7283
|
+
(0, import_react17.useEffect)(() => {
|
|
7239
7284
|
setImageLoadState("loading");
|
|
7240
7285
|
}, [imageUrl]);
|
|
7241
7286
|
const handleImageLoad = () => {
|
|
@@ -7247,8 +7292,8 @@ var Avatar = ({
|
|
|
7247
7292
|
onImageLoad?.({ state: "error", type: "initials" });
|
|
7248
7293
|
};
|
|
7249
7294
|
const avatarSize = heightAndWidth ?? avatarSizeMap[size];
|
|
7250
|
-
const avatarColor = (0,
|
|
7251
|
-
const showInitials = (0,
|
|
7295
|
+
const avatarColor = (0, import_react17.useMemo)(() => chooseColorScheme(name), [name]);
|
|
7296
|
+
const showInitials = (0, import_type_guards16.isNil)(imageUrl) || imageLoadState === "error";
|
|
7252
7297
|
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7253
7298
|
AvatarWrapper,
|
|
7254
7299
|
{
|
|
@@ -7277,9 +7322,9 @@ var Avatar = ({
|
|
|
7277
7322
|
Avatar.displayName = "Avatar";
|
|
7278
7323
|
|
|
7279
7324
|
// src/components/Badge/Badge.tsx
|
|
7280
|
-
var
|
|
7325
|
+
var import_react18 = require("react");
|
|
7281
7326
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
7282
|
-
var
|
|
7327
|
+
var import_type_guards17 = require("@wistia/type-guards");
|
|
7283
7328
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7284
7329
|
var StyledBadge = import_styled_components24.default.div`
|
|
7285
7330
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -7301,9 +7346,9 @@ var StyledBadge = import_styled_components24.default.div`
|
|
|
7301
7346
|
width: 12px;
|
|
7302
7347
|
}
|
|
7303
7348
|
`;
|
|
7304
|
-
var Badge = (0,
|
|
7349
|
+
var Badge = (0, import_react18.forwardRef)(
|
|
7305
7350
|
({ colorScheme = "inherit", label, icon, ...otherProps }, ref) => {
|
|
7306
|
-
const hasIcon = (0,
|
|
7351
|
+
const hasIcon = (0, import_type_guards17.isNotNil)(icon);
|
|
7307
7352
|
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7308
7353
|
StyledBadge,
|
|
7309
7354
|
{
|
|
@@ -7322,9 +7367,9 @@ var Badge = (0, import_react17.forwardRef)(
|
|
|
7322
7367
|
Badge.displayName = "Badge";
|
|
7323
7368
|
|
|
7324
7369
|
// src/components/Box/Box.tsx
|
|
7325
|
-
var
|
|
7370
|
+
var import_react19 = require("react");
|
|
7326
7371
|
var import_styled_components25 = __toESM(require("styled-components"));
|
|
7327
|
-
var
|
|
7372
|
+
var import_type_guards18 = require("@wistia/type-guards");
|
|
7328
7373
|
|
|
7329
7374
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
7330
7375
|
var makePolymorphic = (component) => {
|
|
@@ -7335,8 +7380,8 @@ var makePolymorphic = (component) => {
|
|
|
7335
7380
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7336
7381
|
var isDev = process.env["NODE_ENV"] === "development" || process.env["NODE_ENV"] === "test";
|
|
7337
7382
|
var getGapStyle = (gap) => {
|
|
7338
|
-
if ((0,
|
|
7339
|
-
if ((0,
|
|
7383
|
+
if ((0, import_type_guards18.isNotNil)(gap)) {
|
|
7384
|
+
if ((0, import_type_guards18.isRecord)(gap)) {
|
|
7340
7385
|
return Object.entries(gap).map(([key, value]) => {
|
|
7341
7386
|
return `${key}-gap: var(--wui-${value})};`;
|
|
7342
7387
|
}).join("");
|
|
@@ -7411,8 +7456,8 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7411
7456
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7412
7457
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
7413
7458
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
7414
|
-
display: ${({ $inline }) => (0,
|
|
7415
|
-
flex-basis: ${({ $basis }) => (0,
|
|
7459
|
+
display: ${({ $inline }) => (0, import_type_guards18.isNotNil)($inline) && $inline ? "inline-flex" : "flex"};
|
|
7460
|
+
flex-basis: ${({ $basis }) => (0, import_type_guards18.isNotNil)($basis) ? $basis : null};
|
|
7416
7461
|
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
7417
7462
|
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
7418
7463
|
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
@@ -7422,22 +7467,22 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7422
7467
|
width: ${({ $width }) => $width ?? null};
|
|
7423
7468
|
|
|
7424
7469
|
/* Box children styles */
|
|
7425
|
-
flex-grow: ${({ $grow }) => (0,
|
|
7426
|
-
flex-shrink: ${({ $shrink }) => (0,
|
|
7470
|
+
flex-grow: ${({ $grow }) => (0, import_type_guards18.isNotNil)($grow) ? $grow : null};
|
|
7471
|
+
flex-shrink: ${({ $shrink }) => (0, import_type_guards18.isNotNil)($shrink) ? $shrink : null};
|
|
7427
7472
|
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
7428
7473
|
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
7429
|
-
order: ${({ $order }) => (0,
|
|
7474
|
+
order: ${({ $order }) => (0, import_type_guards18.isNotNil)($order) ? $order : null};
|
|
7430
7475
|
`;
|
|
7431
7476
|
var wrapChildren = (children) => {
|
|
7432
|
-
if ((0,
|
|
7477
|
+
if ((0, import_type_guards18.isNotNil)(children)) {
|
|
7433
7478
|
if (typeof children === "object" && isDev) {
|
|
7434
|
-
return
|
|
7435
|
-
if ((0,
|
|
7479
|
+
return import_react19.Children.map(children, (child) => {
|
|
7480
|
+
if ((0, import_type_guards18.isNil)(child)) return null;
|
|
7436
7481
|
const elementParams = {};
|
|
7437
7482
|
if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
|
|
7438
7483
|
elementParams.hasBoxParent = true;
|
|
7439
7484
|
}
|
|
7440
|
-
return (0,
|
|
7485
|
+
return (0, import_react19.cloneElement)(child, elementParams);
|
|
7441
7486
|
});
|
|
7442
7487
|
}
|
|
7443
7488
|
return children;
|
|
@@ -7445,7 +7490,7 @@ var wrapChildren = (children) => {
|
|
|
7445
7490
|
return null;
|
|
7446
7491
|
};
|
|
7447
7492
|
var DEFAULT_ELEMENT = "div";
|
|
7448
|
-
var BoxComponent = (0,
|
|
7493
|
+
var BoxComponent = (0, import_react19.forwardRef)(
|
|
7449
7494
|
({
|
|
7450
7495
|
alignContent = "stretch",
|
|
7451
7496
|
alignItems = "flex-start",
|
|
@@ -7470,7 +7515,7 @@ var BoxComponent = (0, import_react18.forwardRef)(
|
|
|
7470
7515
|
flexMode,
|
|
7471
7516
|
...otherProps
|
|
7472
7517
|
}, ref) => {
|
|
7473
|
-
if ((0,
|
|
7518
|
+
if ((0, import_type_guards18.isNotUndefined)(height)) {
|
|
7474
7519
|
if (fill === true || fill === "vertical") {
|
|
7475
7520
|
throw new Error('Cannot use height prop with fill="vertical" or fill={true}');
|
|
7476
7521
|
}
|
|
@@ -7480,7 +7525,7 @@ var BoxComponent = (0, import_react18.forwardRef)(
|
|
|
7480
7525
|
);
|
|
7481
7526
|
}
|
|
7482
7527
|
}
|
|
7483
|
-
if ((0,
|
|
7528
|
+
if ((0, import_type_guards18.isNotUndefined)(width)) {
|
|
7484
7529
|
if (fill === true || fill === "horizontal") {
|
|
7485
7530
|
throw new Error('Cannot use width prop with fill="horizontal" or fill={true}');
|
|
7486
7531
|
}
|
|
@@ -7522,7 +7567,7 @@ BoxComponent.displayName = "Box";
|
|
|
7522
7567
|
var Box = makePolymorphic(BoxComponent);
|
|
7523
7568
|
|
|
7524
7569
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
7525
|
-
var
|
|
7570
|
+
var import_react20 = require("react");
|
|
7526
7571
|
var import_styled_components26 = __toESM(require("styled-components"));
|
|
7527
7572
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7528
7573
|
var StyledBreadcrumbs = import_styled_components26.default.nav`
|
|
@@ -7538,7 +7583,7 @@ var StyledBreadcrumbs = import_styled_components26.default.nav`
|
|
|
7538
7583
|
var BUFFER_WIDTH = 10;
|
|
7539
7584
|
var Breadcrumbs = ({ children, ...props }) => {
|
|
7540
7585
|
const { isXsAndDown } = useMq();
|
|
7541
|
-
let crumbs =
|
|
7586
|
+
let crumbs = import_react20.Children.toArray(children);
|
|
7542
7587
|
if (isXsAndDown) {
|
|
7543
7588
|
crumbs = crumbs.slice(-1);
|
|
7544
7589
|
}
|
|
@@ -7605,7 +7650,7 @@ var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
|
7605
7650
|
|
|
7606
7651
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
7607
7652
|
var import_styled_components28 = __toESM(require("styled-components"));
|
|
7608
|
-
var
|
|
7653
|
+
var import_type_guards19 = require("@wistia/type-guards");
|
|
7609
7654
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7610
7655
|
var getAlignment = (align) => {
|
|
7611
7656
|
if (align === "center") {
|
|
@@ -7651,7 +7696,7 @@ var ButtonGroup = ({
|
|
|
7651
7696
|
collapseOnSmallScreens = true,
|
|
7652
7697
|
...otherProps
|
|
7653
7698
|
}) => {
|
|
7654
|
-
if ((0,
|
|
7699
|
+
if ((0, import_type_guards19.isNil)(children)) {
|
|
7655
7700
|
return null;
|
|
7656
7701
|
}
|
|
7657
7702
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
@@ -7725,7 +7770,7 @@ var Card = ({
|
|
|
7725
7770
|
Card.displayName = "Card";
|
|
7726
7771
|
|
|
7727
7772
|
// src/components/Center/Center.tsx
|
|
7728
|
-
var
|
|
7773
|
+
var import_react21 = require("react");
|
|
7729
7774
|
var import_styled_components30 = __toESM(require("styled-components"));
|
|
7730
7775
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7731
7776
|
var StyledCenter = import_styled_components30.default.div`
|
|
@@ -7740,7 +7785,7 @@ var StyledCenter = import_styled_components30.default.div`
|
|
|
7740
7785
|
align-items: center;
|
|
7741
7786
|
`}
|
|
7742
7787
|
`;
|
|
7743
|
-
var Center = (0,
|
|
7788
|
+
var Center = (0, import_react21.forwardRef)(
|
|
7744
7789
|
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
7745
7790
|
StyledCenter,
|
|
7746
7791
|
{
|
|
@@ -7756,17 +7801,17 @@ var Center = (0, import_react20.forwardRef)(
|
|
|
7756
7801
|
Center.displayName = "Center";
|
|
7757
7802
|
|
|
7758
7803
|
// src/components/Checkbox/Checkbox.tsx
|
|
7759
|
-
var
|
|
7804
|
+
var import_react22 = require("react");
|
|
7760
7805
|
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7761
|
-
var
|
|
7806
|
+
var import_type_guards23 = require("@wistia/type-guards");
|
|
7762
7807
|
|
|
7763
7808
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7764
7809
|
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7765
|
-
var
|
|
7810
|
+
var import_type_guards22 = require("@wistia/type-guards");
|
|
7766
7811
|
|
|
7767
7812
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
7768
7813
|
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7769
|
-
var
|
|
7814
|
+
var import_type_guards20 = require("@wistia/type-guards");
|
|
7770
7815
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7771
7816
|
var disabledStyle = import_styled_components31.css`
|
|
7772
7817
|
color: var(--wui-color-text-disabled);
|
|
@@ -7786,7 +7831,7 @@ var FormControlLabelDescription = ({
|
|
|
7786
7831
|
disabled = false,
|
|
7787
7832
|
...props
|
|
7788
7833
|
}) => {
|
|
7789
|
-
if ((0,
|
|
7834
|
+
if ((0, import_type_guards20.isNil)(children)) {
|
|
7790
7835
|
return null;
|
|
7791
7836
|
}
|
|
7792
7837
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
@@ -7802,7 +7847,7 @@ FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
|
7802
7847
|
|
|
7803
7848
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7804
7849
|
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7805
|
-
var
|
|
7850
|
+
var import_type_guards21 = require("@wistia/type-guards");
|
|
7806
7851
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7807
7852
|
var VisuallyHidden = import_styled_components32.default.div({ ...visuallyHiddenStyle });
|
|
7808
7853
|
var VisuallyHiddenButFocusable = import_styled_components32.default.div({
|
|
@@ -7814,7 +7859,7 @@ var ScreenReaderOnly = ({
|
|
|
7814
7859
|
focusable = false,
|
|
7815
7860
|
...otherProps
|
|
7816
7861
|
}) => {
|
|
7817
|
-
const accessibleText = (0,
|
|
7862
|
+
const accessibleText = (0, import_type_guards21.isNotNil)(text) ? text : children;
|
|
7818
7863
|
if (focusable) {
|
|
7819
7864
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7820
7865
|
}
|
|
@@ -7854,7 +7899,7 @@ var FormControlLabel = ({
|
|
|
7854
7899
|
hideLabel = false,
|
|
7855
7900
|
...props
|
|
7856
7901
|
}) => {
|
|
7857
|
-
if ((0,
|
|
7902
|
+
if ((0, import_type_guards22.isNil)(label)) {
|
|
7858
7903
|
return null;
|
|
7859
7904
|
}
|
|
7860
7905
|
const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(StyledLabelWrapper, { children: [
|
|
@@ -7868,7 +7913,7 @@ var FormControlLabel = ({
|
|
|
7868
7913
|
htmlFor,
|
|
7869
7914
|
...props,
|
|
7870
7915
|
children: [
|
|
7871
|
-
(0,
|
|
7916
|
+
(0, import_type_guards22.isNotNil)(controlSlot) ? controlSlot : null,
|
|
7872
7917
|
labelContent
|
|
7873
7918
|
]
|
|
7874
7919
|
}
|
|
@@ -7976,7 +8021,7 @@ var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
|
7976
8021
|
display: block;
|
|
7977
8022
|
}
|
|
7978
8023
|
`;
|
|
7979
|
-
var Checkbox = (0,
|
|
8024
|
+
var Checkbox = (0, import_react22.forwardRef)(
|
|
7980
8025
|
({
|
|
7981
8026
|
checked,
|
|
7982
8027
|
disabled = false,
|
|
@@ -7991,8 +8036,8 @@ var Checkbox = (0, import_react21.forwardRef)(
|
|
|
7991
8036
|
hideLabel = false,
|
|
7992
8037
|
...props
|
|
7993
8038
|
}, ref) => {
|
|
7994
|
-
const generatedId = (0,
|
|
7995
|
-
const computedId = (0,
|
|
8039
|
+
const generatedId = (0, import_react22.useId)();
|
|
8040
|
+
const computedId = (0, import_type_guards23.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7996
8041
|
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
7997
8042
|
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7998
8043
|
StyledHiddenCheckboxInput,
|
|
@@ -8034,9 +8079,9 @@ var Checkbox = (0, import_react21.forwardRef)(
|
|
|
8034
8079
|
Checkbox.displayName = "Checkbox";
|
|
8035
8080
|
|
|
8036
8081
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
8037
|
-
var
|
|
8082
|
+
var import_react23 = require("react");
|
|
8038
8083
|
var ClickRegion = ({ children, targetRef }) => {
|
|
8039
|
-
(0,
|
|
8084
|
+
(0, import_react23.useEffect)(() => {
|
|
8040
8085
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
8041
8086
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
8042
8087
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -8044,7 +8089,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8044
8089
|
} else {
|
|
8045
8090
|
}
|
|
8046
8091
|
}, [targetRef]);
|
|
8047
|
-
const handleClick = (0,
|
|
8092
|
+
const handleClick = (0, import_react23.useCallback)(
|
|
8048
8093
|
(event) => {
|
|
8049
8094
|
const node = targetRef.current;
|
|
8050
8095
|
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")) {
|
|
@@ -8061,7 +8106,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8061
8106
|
},
|
|
8062
8107
|
[targetRef]
|
|
8063
8108
|
);
|
|
8064
|
-
return (0,
|
|
8109
|
+
return (0, import_react23.cloneElement)(import_react23.Children.only(children), {
|
|
8065
8110
|
"data-click-region": true,
|
|
8066
8111
|
onClick: handleClick
|
|
8067
8112
|
});
|
|
@@ -8070,7 +8115,7 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
8070
8115
|
|
|
8071
8116
|
// src/components/Collapsible/Collapsible.tsx
|
|
8072
8117
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
8073
|
-
var
|
|
8118
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
8074
8119
|
var import_styled_components35 = __toESM(require("styled-components"));
|
|
8075
8120
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8076
8121
|
var StyledRoot = (0, import_styled_components35.default)(import_react_collapsible.Root)`
|
|
@@ -8087,31 +8132,31 @@ var Collapsible = ({
|
|
|
8087
8132
|
onOpenChange
|
|
8088
8133
|
}) => {
|
|
8089
8134
|
const controlProps = {
|
|
8090
|
-
...(0,
|
|
8135
|
+
...(0, import_type_guards24.isNotNil)(onOpenChange) && (0, import_type_guards24.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8091
8136
|
};
|
|
8092
8137
|
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(StyledRoot, { ...controlProps, children });
|
|
8093
8138
|
};
|
|
8094
8139
|
Collapsible.displayName = "Collapsible";
|
|
8095
8140
|
|
|
8096
8141
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8097
|
-
var
|
|
8142
|
+
var import_react24 = require("react");
|
|
8098
8143
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
8099
8144
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8100
8145
|
var CollapsibleTrigger = ({ children }) => {
|
|
8101
|
-
|
|
8146
|
+
import_react24.Children.only(children);
|
|
8102
8147
|
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
8103
8148
|
};
|
|
8104
8149
|
|
|
8105
8150
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
8106
8151
|
var import_styled_components36 = __toESM(require("styled-components"));
|
|
8107
8152
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
8108
|
-
var
|
|
8153
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
8109
8154
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8110
8155
|
var ClampedContent = import_styled_components36.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
8111
8156
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8112
8157
|
`;
|
|
8113
8158
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
8114
|
-
if ((0,
|
|
8159
|
+
if ((0, import_type_guards25.isNotUndefined)(clamp)) {
|
|
8115
8160
|
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
8116
8161
|
}
|
|
8117
8162
|
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_jsx_runtime210.Fragment, { children: [
|
|
@@ -8122,10 +8167,10 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
8122
8167
|
|
|
8123
8168
|
// src/components/DataCards/DataCard.tsx
|
|
8124
8169
|
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8125
|
-
var
|
|
8170
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
8126
8171
|
|
|
8127
8172
|
// src/components/Heading/Heading.tsx
|
|
8128
|
-
var
|
|
8173
|
+
var import_react25 = require("react");
|
|
8129
8174
|
var import_styled_components37 = __toESM(require("styled-components"));
|
|
8130
8175
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8131
8176
|
var heroStyle = import_styled_components37.css`
|
|
@@ -8212,7 +8257,7 @@ var variantElementMap = {
|
|
|
8212
8257
|
heading5: "h5",
|
|
8213
8258
|
heading6: "h6"
|
|
8214
8259
|
};
|
|
8215
|
-
var HeadingComponent = (0,
|
|
8260
|
+
var HeadingComponent = (0, import_react25.forwardRef)(
|
|
8216
8261
|
({
|
|
8217
8262
|
align = "left",
|
|
8218
8263
|
colorScheme = "inherit",
|
|
@@ -8331,8 +8376,8 @@ var DataCard = ({
|
|
|
8331
8376
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLoadingValue, {}) : value
|
|
8332
8377
|
}
|
|
8333
8378
|
),
|
|
8334
|
-
(0,
|
|
8335
|
-
(0,
|
|
8379
|
+
(0, import_type_guards26.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
8380
|
+
(0, import_type_guards26.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8336
8381
|
]
|
|
8337
8382
|
}
|
|
8338
8383
|
);
|
|
@@ -8376,7 +8421,7 @@ DataCards.displayName = "DataCards";
|
|
|
8376
8421
|
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8377
8422
|
|
|
8378
8423
|
// src/components/Text/Text.tsx
|
|
8379
|
-
var
|
|
8424
|
+
var import_react26 = require("react");
|
|
8380
8425
|
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8381
8426
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8382
8427
|
var bodyBoldStyles = import_styled_components40.css`
|
|
@@ -8542,7 +8587,7 @@ var StyledText = import_styled_components40.default.div`
|
|
|
8542
8587
|
}
|
|
8543
8588
|
`}
|
|
8544
8589
|
`;
|
|
8545
|
-
var TextComponent = (0,
|
|
8590
|
+
var TextComponent = (0, import_react26.forwardRef)(
|
|
8546
8591
|
({
|
|
8547
8592
|
align = "left",
|
|
8548
8593
|
colorScheme = "inherit",
|
|
@@ -8658,7 +8703,7 @@ Divider.displayName = "Divider";
|
|
|
8658
8703
|
|
|
8659
8704
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8660
8705
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8661
|
-
var
|
|
8706
|
+
var import_react28 = require("react");
|
|
8662
8707
|
|
|
8663
8708
|
// src/components/Tooltip/Tooltip.tsx
|
|
8664
8709
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
@@ -8767,9 +8812,9 @@ var Tooltip = ({
|
|
|
8767
8812
|
Tooltip.displayName = "Tooltip";
|
|
8768
8813
|
|
|
8769
8814
|
// src/components/Input/Input.tsx
|
|
8770
|
-
var
|
|
8815
|
+
var import_react27 = require("react");
|
|
8771
8816
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8772
|
-
var
|
|
8817
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
8773
8818
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
8774
8819
|
var inputStyles = import_styled_components44.css`
|
|
8775
8820
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
@@ -8856,7 +8901,7 @@ var StyledInputContainer = import_styled_components44.default.div`
|
|
|
8856
8901
|
padding-right: 32px;
|
|
8857
8902
|
}
|
|
8858
8903
|
`;
|
|
8859
|
-
var Input = (0,
|
|
8904
|
+
var Input = (0, import_react27.forwardRef)(
|
|
8860
8905
|
({
|
|
8861
8906
|
fullWidth = true,
|
|
8862
8907
|
monospace = false,
|
|
@@ -8866,30 +8911,30 @@ var Input = (0, import_react26.forwardRef)(
|
|
|
8866
8911
|
rightIcon,
|
|
8867
8912
|
...props
|
|
8868
8913
|
}, externalRef) => {
|
|
8869
|
-
const internalRef = (0,
|
|
8914
|
+
const internalRef = (0, import_react27.useRef)();
|
|
8870
8915
|
const ref = (
|
|
8871
8916
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
8872
|
-
(0,
|
|
8917
|
+
(0, import_type_guards27.isNotNil)(externalRef) && (0, import_type_guards27.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
8873
8918
|
);
|
|
8874
8919
|
let leftIconToDisplay = leftIcon;
|
|
8875
|
-
if ((0,
|
|
8920
|
+
if ((0, import_type_guards27.isNil)(leftIcon) && type === "search") {
|
|
8876
8921
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Icon, { type: "search" });
|
|
8877
8922
|
}
|
|
8878
|
-
if ((0,
|
|
8879
|
-
leftIconToDisplay = (0,
|
|
8923
|
+
if ((0, import_type_guards27.isNotNil)(leftIconToDisplay)) {
|
|
8924
|
+
leftIconToDisplay = (0, import_react27.cloneElement)(leftIconToDisplay, {
|
|
8880
8925
|
size: "md",
|
|
8881
8926
|
className: "wui-input-left-icon"
|
|
8882
8927
|
});
|
|
8883
8928
|
}
|
|
8884
8929
|
let rightIconToDisplay = rightIcon;
|
|
8885
|
-
if ((0,
|
|
8886
|
-
rightIconToDisplay = (0,
|
|
8930
|
+
if ((0, import_type_guards27.isNotNil)(rightIconToDisplay)) {
|
|
8931
|
+
rightIconToDisplay = (0, import_react27.cloneElement)(rightIconToDisplay, {
|
|
8887
8932
|
size: "md",
|
|
8888
8933
|
className: "wui-input-right-icon"
|
|
8889
8934
|
});
|
|
8890
8935
|
}
|
|
8891
8936
|
const handleFocus = (event) => {
|
|
8892
|
-
if ((0,
|
|
8937
|
+
if ((0, import_type_guards27.isNotNil)(props.onFocus)) {
|
|
8893
8938
|
props.onFocus(event);
|
|
8894
8939
|
}
|
|
8895
8940
|
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
@@ -8978,11 +9023,11 @@ var EditableHeading = ({
|
|
|
8978
9023
|
forceEditing = false,
|
|
8979
9024
|
editingDisabled = false
|
|
8980
9025
|
}) => {
|
|
8981
|
-
const [isEditing, setIsEditing] = (0,
|
|
8982
|
-
const [value, setValue] = (0,
|
|
8983
|
-
const [previousValue, setPreviousValue] = (0,
|
|
8984
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
8985
|
-
const headingRef = (0,
|
|
9026
|
+
const [isEditing, setIsEditing] = (0, import_react28.useState)(false);
|
|
9027
|
+
const [value, setValue] = (0, import_react28.useState)(children);
|
|
9028
|
+
const [previousValue, setPreviousValue] = (0, import_react28.useState)(children);
|
|
9029
|
+
const [headingHeight, setHeadingHeight] = (0, import_react28.useState)("60");
|
|
9030
|
+
const headingRef = (0, import_react28.useRef)(null);
|
|
8986
9031
|
const handleSetEditing = (editing) => {
|
|
8987
9032
|
if (editingDisabled) return;
|
|
8988
9033
|
if (editing && headingRef.current) {
|
|
@@ -9068,12 +9113,12 @@ var EditableHeading = ({
|
|
|
9068
9113
|
};
|
|
9069
9114
|
|
|
9070
9115
|
// src/components/Form/Form.tsx
|
|
9071
|
-
var
|
|
9116
|
+
var import_react30 = require("react");
|
|
9072
9117
|
var import_styled_components47 = __toESM(require("styled-components"));
|
|
9073
|
-
var
|
|
9118
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
9074
9119
|
|
|
9075
9120
|
// src/components/Stack/Stack.tsx
|
|
9076
|
-
var
|
|
9121
|
+
var import_react29 = require("react");
|
|
9077
9122
|
var import_styled_components46 = __toESM(require("styled-components"));
|
|
9078
9123
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9079
9124
|
var DEFAULT_ELEMENT4 = "div";
|
|
@@ -9083,7 +9128,7 @@ var StyledStack = import_styled_components46.default.div`
|
|
|
9083
9128
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
9084
9129
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
9085
9130
|
`;
|
|
9086
|
-
var StackComponent = (0,
|
|
9131
|
+
var StackComponent = (0, import_react29.forwardRef)(
|
|
9087
9132
|
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
9088
9133
|
const responsiveGap = useResponsiveProp(gap);
|
|
9089
9134
|
const responsiveDirection = useResponsiveProp(direction);
|
|
@@ -9112,7 +9157,7 @@ var StyledForm = import_styled_components47.default.form`
|
|
|
9112
9157
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
9113
9158
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
9114
9159
|
`;
|
|
9115
|
-
var FormContext = (0,
|
|
9160
|
+
var FormContext = (0, import_react30.createContext)({
|
|
9116
9161
|
values: {},
|
|
9117
9162
|
errors: {},
|
|
9118
9163
|
hasSubmitted: false,
|
|
@@ -9128,15 +9173,15 @@ var FormComponent = ({
|
|
|
9128
9173
|
fullWidth = false,
|
|
9129
9174
|
...props
|
|
9130
9175
|
}, forwardedRef) => {
|
|
9131
|
-
const [errors, setErrors] = (0,
|
|
9132
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
9133
|
-
const innerRef = (0,
|
|
9176
|
+
const [errors, setErrors] = (0, import_react30.useState)({});
|
|
9177
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react30.useState)(false);
|
|
9178
|
+
const innerRef = (0, import_react30.useRef)();
|
|
9134
9179
|
const ref = forwardedRef ?? innerRef;
|
|
9135
|
-
const autoId = (0,
|
|
9180
|
+
const autoId = (0, import_react30.useId)();
|
|
9136
9181
|
const id = props.id ?? autoId;
|
|
9137
9182
|
const handleValidate = (nextFormData) => {
|
|
9138
9183
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
9139
|
-
if ((0,
|
|
9184
|
+
if ((0, import_type_guards28.isUndefined)(validate)) {
|
|
9140
9185
|
return {};
|
|
9141
9186
|
}
|
|
9142
9187
|
return validate(nextData);
|
|
@@ -9146,7 +9191,7 @@ var FormComponent = ({
|
|
|
9146
9191
|
props.onBlur(event);
|
|
9147
9192
|
}
|
|
9148
9193
|
const formData = new FormData(event.currentTarget);
|
|
9149
|
-
if ((0,
|
|
9194
|
+
if ((0, import_type_guards28.isNotUndefined)(validate)) {
|
|
9150
9195
|
handleValidate(formData);
|
|
9151
9196
|
}
|
|
9152
9197
|
};
|
|
@@ -9174,7 +9219,7 @@ var FormComponent = ({
|
|
|
9174
9219
|
void action(null);
|
|
9175
9220
|
}
|
|
9176
9221
|
};
|
|
9177
|
-
const context = (0,
|
|
9222
|
+
const context = (0, import_react30.useMemo)(() => {
|
|
9178
9223
|
return {
|
|
9179
9224
|
values,
|
|
9180
9225
|
errors,
|
|
@@ -9203,15 +9248,15 @@ var FormComponent = ({
|
|
|
9203
9248
|
);
|
|
9204
9249
|
};
|
|
9205
9250
|
FormComponent.displayName = "Form";
|
|
9206
|
-
var Form = (0,
|
|
9251
|
+
var Form = (0, import_react30.forwardRef)(FormComponent);
|
|
9207
9252
|
|
|
9208
9253
|
// src/components/Form/useFormState.tsx
|
|
9209
|
-
var
|
|
9254
|
+
var import_react31 = require("react");
|
|
9210
9255
|
var useFormState = (action, initialData = {}) => {
|
|
9211
|
-
const [data, setData] = (0,
|
|
9212
|
-
const [isPending, setIsPending] = (0,
|
|
9213
|
-
const [error, setError] = (0,
|
|
9214
|
-
const formAction = (0,
|
|
9256
|
+
const [data, setData] = (0, import_react31.useState)(initialData);
|
|
9257
|
+
const [isPending, setIsPending] = (0, import_react31.useState)(false);
|
|
9258
|
+
const [error, setError] = (0, import_react31.useState)(null);
|
|
9259
|
+
const formAction = (0, import_react31.useCallback)(
|
|
9215
9260
|
async (nextFormData) => {
|
|
9216
9261
|
if (nextFormData === null) {
|
|
9217
9262
|
setData(initialData);
|
|
@@ -9242,23 +9287,23 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9242
9287
|
};
|
|
9243
9288
|
|
|
9244
9289
|
// src/components/Form/FormErrorSummary.tsx
|
|
9245
|
-
var
|
|
9246
|
-
var
|
|
9290
|
+
var import_react32 = require("react");
|
|
9291
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
9247
9292
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9248
9293
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9249
9294
|
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9250
9295
|
};
|
|
9251
9296
|
var FormErrorSummary = ({ description }) => {
|
|
9252
|
-
const ref = (0,
|
|
9253
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
9297
|
+
const ref = (0, import_react32.useRef)(null);
|
|
9298
|
+
const { formId, errors, hasSubmitted } = (0, import_react32.useContext)(FormContext);
|
|
9254
9299
|
const isValid = Object.keys(errors).length === 0;
|
|
9255
9300
|
if (isValid || !hasSubmitted) {
|
|
9256
9301
|
return null;
|
|
9257
9302
|
}
|
|
9258
9303
|
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { ref, children: [
|
|
9259
9304
|
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("p", { children: description }),
|
|
9260
|
-
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0,
|
|
9261
|
-
([name, error]) => (0,
|
|
9305
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards29.isNotUndefined)(error)).map(
|
|
9306
|
+
([name, error]) => (0, import_type_guards29.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9262
9307
|
ErrorItem,
|
|
9263
9308
|
{
|
|
9264
9309
|
error: err,
|
|
@@ -9280,9 +9325,9 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9280
9325
|
};
|
|
9281
9326
|
|
|
9282
9327
|
// src/components/FormField/FormField.tsx
|
|
9283
|
-
var
|
|
9328
|
+
var import_react35 = require("react");
|
|
9284
9329
|
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9285
|
-
var
|
|
9330
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
9286
9331
|
|
|
9287
9332
|
// src/components/Label/Label.tsx
|
|
9288
9333
|
var import_styled_components48 = __toESM(require("styled-components"));
|
|
@@ -9345,11 +9390,11 @@ var Label = ({
|
|
|
9345
9390
|
Label.displayName = "Label";
|
|
9346
9391
|
|
|
9347
9392
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9348
|
-
var
|
|
9393
|
+
var import_react34 = require("react");
|
|
9349
9394
|
|
|
9350
9395
|
// src/components/FormGroup/FormGroup.tsx
|
|
9351
9396
|
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9352
|
-
var
|
|
9397
|
+
var import_react33 = require("react");
|
|
9353
9398
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9354
9399
|
var StyledFieldset = import_styled_components49.default.fieldset`
|
|
9355
9400
|
border: 0;
|
|
@@ -9358,7 +9403,7 @@ var StyledLegend = import_styled_components49.default.legend`
|
|
|
9358
9403
|
margin-bottom: var(--space-01);
|
|
9359
9404
|
`;
|
|
9360
9405
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9361
|
-
const ref = (0,
|
|
9406
|
+
const ref = (0, import_react33.useRef)();
|
|
9362
9407
|
return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
|
|
9363
9408
|
Stack,
|
|
9364
9409
|
{
|
|
@@ -9383,7 +9428,7 @@ FormGroup.displayName = "FormGroup";
|
|
|
9383
9428
|
|
|
9384
9429
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9385
9430
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9386
|
-
var CheckboxGroupContext = (0,
|
|
9431
|
+
var CheckboxGroupContext = (0, import_react34.createContext)(null);
|
|
9387
9432
|
var CheckboxGroup = ({
|
|
9388
9433
|
children,
|
|
9389
9434
|
name,
|
|
@@ -9391,7 +9436,7 @@ var CheckboxGroup = ({
|
|
|
9391
9436
|
value,
|
|
9392
9437
|
...props
|
|
9393
9438
|
}) => {
|
|
9394
|
-
const context = (0,
|
|
9439
|
+
const context = (0, import_react34.useMemo)(() => {
|
|
9395
9440
|
return {
|
|
9396
9441
|
name,
|
|
9397
9442
|
onChange
|
|
@@ -9442,7 +9487,7 @@ var StyledErrorList = import_styled_components50.default.ul`
|
|
|
9442
9487
|
gap: var(--wui-space-01);
|
|
9443
9488
|
`;
|
|
9444
9489
|
var ErrorMessages = ({ errors, id }) => {
|
|
9445
|
-
const isMultipleErrors = (0,
|
|
9490
|
+
const isMultipleErrors = (0, import_type_guards30.isArray)(errors);
|
|
9446
9491
|
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9447
9492
|
Text,
|
|
9448
9493
|
{
|
|
@@ -9476,8 +9521,8 @@ var FormField = ({
|
|
|
9476
9521
|
value,
|
|
9477
9522
|
...props
|
|
9478
9523
|
}) => {
|
|
9479
|
-
const formState = (0,
|
|
9480
|
-
const checkboxGroup = (0,
|
|
9524
|
+
const formState = (0, import_react35.useContext)(FormContext);
|
|
9525
|
+
const checkboxGroup = (0, import_react35.useContext)(CheckboxGroupContext);
|
|
9481
9526
|
const defaultValue = formState.values[name];
|
|
9482
9527
|
const isIntegratedLabel = children.type === Checkbox;
|
|
9483
9528
|
const computedId = id ?? `${formState.formId}-${name}`;
|
|
@@ -9492,19 +9537,19 @@ var FormField = ({
|
|
|
9492
9537
|
"aria-describedby": ariaDescribedby,
|
|
9493
9538
|
...props
|
|
9494
9539
|
};
|
|
9495
|
-
if ((0,
|
|
9540
|
+
if ((0, import_type_guards30.isUndefined)(value) && (0, import_type_guards30.isNotUndefined)(defaultValue)) {
|
|
9496
9541
|
childProps = {
|
|
9497
9542
|
...childProps,
|
|
9498
9543
|
defaultValue
|
|
9499
9544
|
};
|
|
9500
9545
|
}
|
|
9501
|
-
if ((0,
|
|
9502
|
-
const computedName = (0,
|
|
9546
|
+
if ((0, import_type_guards30.isNotNil)(checkboxGroup)) {
|
|
9547
|
+
const computedName = (0, import_type_guards30.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
9503
9548
|
const handleChange = (event) => {
|
|
9504
|
-
if ((0,
|
|
9549
|
+
if ((0, import_type_guards30.isNotUndefined)(props.onChange)) {
|
|
9505
9550
|
props.onChange(event);
|
|
9506
9551
|
}
|
|
9507
|
-
if ((0,
|
|
9552
|
+
if ((0, import_type_guards30.isNotUndefined)(checkboxGroup.onChange)) {
|
|
9508
9553
|
checkboxGroup.onChange(event);
|
|
9509
9554
|
}
|
|
9510
9555
|
};
|
|
@@ -9512,10 +9557,10 @@ var FormField = ({
|
|
|
9512
9557
|
...childProps,
|
|
9513
9558
|
name: computedName,
|
|
9514
9559
|
onChange: handleChange,
|
|
9515
|
-
"aria-invalid": (0,
|
|
9560
|
+
"aria-invalid": (0, import_type_guards30.isNotNil)(error)
|
|
9516
9561
|
};
|
|
9517
9562
|
}
|
|
9518
|
-
|
|
9563
|
+
import_react35.Children.only(children);
|
|
9519
9564
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
|
|
9520
9565
|
StyledFormField,
|
|
9521
9566
|
{
|
|
@@ -9523,9 +9568,9 @@ var FormField = ({
|
|
|
9523
9568
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9524
9569
|
children: [
|
|
9525
9570
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9526
|
-
(0,
|
|
9527
|
-
(0,
|
|
9528
|
-
(0,
|
|
9571
|
+
(0, import_type_guards30.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9572
|
+
(0, import_react35.cloneElement)(children, childProps),
|
|
9573
|
+
(0, import_type_guards30.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, { children: [
|
|
9529
9574
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", {}),
|
|
9530
9575
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9531
9576
|
ErrorMessages,
|
|
@@ -9542,9 +9587,9 @@ var FormField = ({
|
|
|
9542
9587
|
FormField.displayName = "FormField";
|
|
9543
9588
|
|
|
9544
9589
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9545
|
-
var
|
|
9590
|
+
var import_react36 = require("react");
|
|
9546
9591
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9547
|
-
var RadioGroupContext = (0,
|
|
9592
|
+
var RadioGroupContext = (0, import_react36.createContext)(null);
|
|
9548
9593
|
var RadioGroup = ({
|
|
9549
9594
|
children,
|
|
9550
9595
|
name,
|
|
@@ -9552,7 +9597,7 @@ var RadioGroup = ({
|
|
|
9552
9597
|
value,
|
|
9553
9598
|
...props
|
|
9554
9599
|
}) => {
|
|
9555
|
-
const context = (0,
|
|
9600
|
+
const context = (0, import_react36.useMemo)(() => {
|
|
9556
9601
|
return {
|
|
9557
9602
|
name,
|
|
9558
9603
|
onChange
|
|
@@ -9563,7 +9608,7 @@ var RadioGroup = ({
|
|
|
9563
9608
|
RadioGroup.displayName = "RadioGroup";
|
|
9564
9609
|
|
|
9565
9610
|
// src/components/IconButton/IconButton.tsx
|
|
9566
|
-
var
|
|
9611
|
+
var import_react37 = require("react");
|
|
9567
9612
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9568
9613
|
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9569
9614
|
var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
@@ -9580,7 +9625,7 @@ var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
|
9580
9625
|
align-items: center;
|
|
9581
9626
|
line-height: 1;
|
|
9582
9627
|
`;
|
|
9583
|
-
var IconButton = (0,
|
|
9628
|
+
var IconButton = (0, import_react37.forwardRef)(
|
|
9584
9629
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9585
9630
|
const responsiveSize = useResponsiveProp(size);
|
|
9586
9631
|
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
@@ -9591,7 +9636,7 @@ var IconButton = (0, import_react36.forwardRef)(
|
|
|
9591
9636
|
"aria-label": label,
|
|
9592
9637
|
"data-wistia-ui-icon-button": true,
|
|
9593
9638
|
size: responsiveSize,
|
|
9594
|
-
children: (0,
|
|
9639
|
+
children: (0, import_react37.cloneElement)(import_react37.Children.only(children), {
|
|
9595
9640
|
size: responsiveSize
|
|
9596
9641
|
})
|
|
9597
9642
|
}
|
|
@@ -9602,7 +9647,7 @@ IconButton.displayName = "IconButton";
|
|
|
9602
9647
|
|
|
9603
9648
|
// src/components/Image/Image.tsx
|
|
9604
9649
|
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9605
|
-
var
|
|
9650
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
9606
9651
|
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9607
9652
|
var getFillStyle2 = (fillContainer) => {
|
|
9608
9653
|
if (fillContainer === "horizontal") {
|
|
@@ -9620,7 +9665,7 @@ var getFillStyle2 = (fillContainer) => {
|
|
|
9620
9665
|
return void 0;
|
|
9621
9666
|
};
|
|
9622
9667
|
var StyledImage = import_styled_components52.default.img`
|
|
9623
|
-
border-radius: ${({ $borderRadius }) => (0,
|
|
9668
|
+
border-radius: ${({ $borderRadius }) => (0, import_type_guards31.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9624
9669
|
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9625
9670
|
object-fit: ${({ $objFit }) => $objFit};
|
|
9626
9671
|
object-position: ${({ $objPosition }) => $objPosition};
|
|
@@ -9652,13 +9697,13 @@ Image.displayName = "Image";
|
|
|
9652
9697
|
// src/components/Menu/Menu.tsx
|
|
9653
9698
|
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9654
9699
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9655
|
-
var
|
|
9656
|
-
var
|
|
9700
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9701
|
+
var import_react39 = require("react");
|
|
9657
9702
|
|
|
9658
9703
|
// src/components/Menu/MenuContext.tsx
|
|
9659
|
-
var
|
|
9660
|
-
var MenuContext = (0,
|
|
9661
|
-
var useMenuContext = () => (0,
|
|
9704
|
+
var import_react38 = require("react");
|
|
9705
|
+
var MenuContext = (0, import_react38.createContext)({ compact: false });
|
|
9706
|
+
var useMenuContext = () => (0, import_react38.useContext)(MenuContext);
|
|
9662
9707
|
|
|
9663
9708
|
// src/components/Menu/Menu.tsx
|
|
9664
9709
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
@@ -9762,9 +9807,9 @@ var Menu = ({
|
|
|
9762
9807
|
onInteractOutside,
|
|
9763
9808
|
...props
|
|
9764
9809
|
}) => {
|
|
9765
|
-
const contextValue = (0,
|
|
9810
|
+
const contextValue = (0, import_react39.useMemo)(() => ({ compact }), [compact]);
|
|
9766
9811
|
let controlProps = {
|
|
9767
|
-
...(0,
|
|
9812
|
+
...(0, import_type_guards32.isNotNil)(onOpenChange) && (0, import_type_guards32.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9768
9813
|
};
|
|
9769
9814
|
if (disabled) {
|
|
9770
9815
|
controlProps = {
|
|
@@ -9778,7 +9823,7 @@ var Menu = ({
|
|
|
9778
9823
|
modal: false,
|
|
9779
9824
|
...controlProps,
|
|
9780
9825
|
children: [
|
|
9781
|
-
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0,
|
|
9826
|
+
/* @__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)(
|
|
9782
9827
|
Button,
|
|
9783
9828
|
{
|
|
9784
9829
|
"aria-expanded": isOpen,
|
|
@@ -9836,15 +9881,15 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
9836
9881
|
MenuLabel.displayName = "MenuLabel";
|
|
9837
9882
|
|
|
9838
9883
|
// src/components/Menu/SubMenu.tsx
|
|
9839
|
-
var
|
|
9884
|
+
var import_react41 = require("react");
|
|
9840
9885
|
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9841
9886
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9842
|
-
var
|
|
9887
|
+
var import_type_guards34 = require("@wistia/type-guards");
|
|
9843
9888
|
|
|
9844
9889
|
// src/components/Menu/MenuItemButton.tsx
|
|
9845
|
-
var
|
|
9890
|
+
var import_react40 = require("react");
|
|
9846
9891
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9847
|
-
var
|
|
9892
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
9848
9893
|
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9849
9894
|
var StyledButton3 = (0, import_styled_components55.default)(Button)`
|
|
9850
9895
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
@@ -9919,10 +9964,10 @@ var StyledBadgeContainer = import_styled_components55.default.div`
|
|
|
9919
9964
|
font-size: var(--wui-typography-label-4-size);
|
|
9920
9965
|
color: var(--wui-color-text-secondary);
|
|
9921
9966
|
`;
|
|
9922
|
-
var MenuItemButton = (0,
|
|
9967
|
+
var MenuItemButton = (0, import_react40.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9923
9968
|
let { colorScheme, badge } = props;
|
|
9924
9969
|
if (appearance === "dangerous") {
|
|
9925
|
-
if ((0,
|
|
9970
|
+
if ((0, import_type_guards33.isNotUndefined)(colorScheme)) {
|
|
9926
9971
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
9927
9972
|
}
|
|
9928
9973
|
colorScheme = "error";
|
|
@@ -9952,7 +9997,7 @@ var MenuItemButton = (0, import_react39.forwardRef)(({ children, appearance, com
|
|
|
9952
9997
|
children: [
|
|
9953
9998
|
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9954
9999
|
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
9955
|
-
(0,
|
|
10000
|
+
(0, import_type_guards33.isNotNil)(badge) || (0, import_type_guards33.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9956
10001
|
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9957
10002
|
]
|
|
9958
10003
|
}
|
|
@@ -10015,12 +10060,12 @@ var SubMenu = ({
|
|
|
10015
10060
|
...props
|
|
10016
10061
|
}) => {
|
|
10017
10062
|
const { isSmAndUp } = useMq();
|
|
10018
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
10063
|
+
const [isExpanded, setIsExpanded] = (0, import_react41.useState)(false);
|
|
10019
10064
|
const { compact } = useMenuContext();
|
|
10020
10065
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
10021
10066
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
10022
10067
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemLabel, { children: label }),
|
|
10023
|
-
(0,
|
|
10068
|
+
(0, import_type_guards34.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemDescription, { children: description }) : null
|
|
10024
10069
|
] }),
|
|
10025
10070
|
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
10026
10071
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
@@ -10044,10 +10089,10 @@ var SubMenu = ({
|
|
|
10044
10089
|
SubMenu.displayName = "SubMenu";
|
|
10045
10090
|
|
|
10046
10091
|
// src/components/Menu/MenuItem.tsx
|
|
10047
|
-
var
|
|
10092
|
+
var import_react42 = require("react");
|
|
10048
10093
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
10049
10094
|
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
10050
|
-
var MenuItem = (0,
|
|
10095
|
+
var MenuItem = (0, import_react42.forwardRef)(
|
|
10051
10096
|
({ onSelect = () => null, ...props }, ref) => {
|
|
10052
10097
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
10053
10098
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
@@ -10197,10 +10242,10 @@ var CheckboxMenuItem = ({
|
|
|
10197
10242
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
10198
10243
|
|
|
10199
10244
|
// src/components/Modal/Modal.tsx
|
|
10200
|
-
var
|
|
10245
|
+
var import_react46 = require("react");
|
|
10201
10246
|
var import_styled_components62 = __toESM(require("styled-components"));
|
|
10202
10247
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
10203
|
-
var
|
|
10248
|
+
var import_type_guards36 = require("@wistia/type-guards");
|
|
10204
10249
|
|
|
10205
10250
|
// src/components/Modal/ModalHeader.tsx
|
|
10206
10251
|
var import_styled_components59 = __toESM(require("styled-components"));
|
|
@@ -10257,21 +10302,21 @@ var ModalHeader = ({
|
|
|
10257
10302
|
};
|
|
10258
10303
|
|
|
10259
10304
|
// src/components/Modal/ModalContent.tsx
|
|
10260
|
-
var
|
|
10305
|
+
var import_react44 = require("react");
|
|
10261
10306
|
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10262
10307
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
10263
10308
|
|
|
10264
10309
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10265
|
-
var
|
|
10266
|
-
var
|
|
10310
|
+
var import_react43 = require("react");
|
|
10311
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
10267
10312
|
var useFocusRestore = () => {
|
|
10268
|
-
const previouslyFocusedRef = (0,
|
|
10269
|
-
(0,
|
|
10313
|
+
const previouslyFocusedRef = (0, import_react43.useRef)(null);
|
|
10314
|
+
(0, import_react43.useEffect)(() => {
|
|
10270
10315
|
previouslyFocusedRef.current = document.activeElement;
|
|
10271
10316
|
}, []);
|
|
10272
|
-
(0,
|
|
10317
|
+
(0, import_react43.useEffect)(() => {
|
|
10273
10318
|
return () => {
|
|
10274
|
-
if ((0,
|
|
10319
|
+
if ((0, import_type_guards35.isNotNil)(previouslyFocusedRef.current)) {
|
|
10275
10320
|
setTimeout(() => {
|
|
10276
10321
|
previouslyFocusedRef.current?.focus();
|
|
10277
10322
|
}, 0);
|
|
@@ -10323,7 +10368,7 @@ var StyledModalContent = (0, import_styled_components60.default)(import_react_di
|
|
|
10323
10368
|
}
|
|
10324
10369
|
}
|
|
10325
10370
|
`;
|
|
10326
|
-
var ModalContent = (0,
|
|
10371
|
+
var ModalContent = (0, import_react44.forwardRef)(
|
|
10327
10372
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
10328
10373
|
useFocusRestore();
|
|
10329
10374
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
@@ -10341,7 +10386,7 @@ var ModalContent = (0, import_react43.forwardRef)(
|
|
|
10341
10386
|
);
|
|
10342
10387
|
|
|
10343
10388
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10344
|
-
var
|
|
10389
|
+
var import_react45 = require("react");
|
|
10345
10390
|
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10346
10391
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10347
10392
|
var backdropAnimationDuration = 150;
|
|
@@ -10379,7 +10424,7 @@ var BackdropComponent = import_styled_components61.default.div`
|
|
|
10379
10424
|
}
|
|
10380
10425
|
}
|
|
10381
10426
|
`;
|
|
10382
|
-
var Backdrop = (0,
|
|
10427
|
+
var Backdrop = (0, import_react45.forwardRef)(
|
|
10383
10428
|
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
10384
10429
|
BackdropComponent,
|
|
10385
10430
|
{
|
|
@@ -10401,7 +10446,7 @@ var ModalBody = import_styled_components62.default.div`
|
|
|
10401
10446
|
display: flex;
|
|
10402
10447
|
order: 2;
|
|
10403
10448
|
`;
|
|
10404
|
-
var Modal = (0,
|
|
10449
|
+
var Modal = (0, import_react46.forwardRef)(
|
|
10405
10450
|
({
|
|
10406
10451
|
children,
|
|
10407
10452
|
fullHeight = false,
|
|
@@ -10418,7 +10463,7 @@ var Modal = (0, import_react45.forwardRef)(
|
|
|
10418
10463
|
import_react_dialog4.Root,
|
|
10419
10464
|
{
|
|
10420
10465
|
onOpenChange: (open2) => {
|
|
10421
|
-
if (!open2 && (0,
|
|
10466
|
+
if (!open2 && (0, import_type_guards36.isNotNil)(onRequestClose)) {
|
|
10422
10467
|
onRequestClose();
|
|
10423
10468
|
}
|
|
10424
10469
|
},
|
|
@@ -10431,7 +10476,7 @@ var Modal = (0, import_react45.forwardRef)(
|
|
|
10431
10476
|
ref,
|
|
10432
10477
|
fullHeight,
|
|
10433
10478
|
onOpenAutoFocus: (event) => {
|
|
10434
|
-
if ((0,
|
|
10479
|
+
if ((0, import_type_guards36.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
10435
10480
|
event.preventDefault();
|
|
10436
10481
|
requestAnimationFrame(() => {
|
|
10437
10482
|
initialFocusRef.current?.focus();
|
|
@@ -10465,9 +10510,9 @@ var import_react_popover = require("@radix-ui/react-popover");
|
|
|
10465
10510
|
var import_styled_components63 = __toESM(require("styled-components"));
|
|
10466
10511
|
|
|
10467
10512
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10468
|
-
var
|
|
10513
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
10469
10514
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
10470
|
-
return (0,
|
|
10515
|
+
return (0, import_type_guards37.isNotNil)(onOpenChange) && (0, import_type_guards37.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
10471
10516
|
};
|
|
10472
10517
|
|
|
10473
10518
|
// src/components/Popover/Popover.tsx
|
|
@@ -10526,7 +10571,7 @@ Popover.displayName = "Popover";
|
|
|
10526
10571
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10527
10572
|
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10528
10573
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
10529
|
-
var
|
|
10574
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
10530
10575
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10531
10576
|
var ProgressBarWrapper = import_styled_components64.default.div`
|
|
10532
10577
|
--progress-bar-height: 8px;
|
|
@@ -10581,7 +10626,7 @@ var ProgressBar = ({
|
|
|
10581
10626
|
...props
|
|
10582
10627
|
}) => {
|
|
10583
10628
|
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(ProgressBarWrapper, { children: [
|
|
10584
|
-
(0,
|
|
10629
|
+
(0, import_type_guards38.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10585
10630
|
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10586
10631
|
StyledProgressBar,
|
|
10587
10632
|
{
|
|
@@ -10597,15 +10642,15 @@ var ProgressBar = ({
|
|
|
10597
10642
|
)
|
|
10598
10643
|
}
|
|
10599
10644
|
),
|
|
10600
|
-
(0,
|
|
10645
|
+
(0, import_type_guards38.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
10601
10646
|
] });
|
|
10602
10647
|
};
|
|
10603
10648
|
ProgressBar.displayName = "ProgressBar";
|
|
10604
10649
|
|
|
10605
10650
|
// src/components/Radio/Radio.tsx
|
|
10606
|
-
var
|
|
10651
|
+
var import_react47 = require("react");
|
|
10607
10652
|
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10608
|
-
var
|
|
10653
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
10609
10654
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10610
10655
|
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10611
10656
|
"svg",
|
|
@@ -10706,7 +10751,7 @@ var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
|
10706
10751
|
display: block;
|
|
10707
10752
|
}
|
|
10708
10753
|
`;
|
|
10709
|
-
var Radio = (0,
|
|
10754
|
+
var Radio = (0, import_react47.forwardRef)(
|
|
10710
10755
|
({
|
|
10711
10756
|
checked,
|
|
10712
10757
|
disabled = false,
|
|
@@ -10721,8 +10766,8 @@ var Radio = (0, import_react46.forwardRef)(
|
|
|
10721
10766
|
hideLabel = false,
|
|
10722
10767
|
...props
|
|
10723
10768
|
}, ref) => {
|
|
10724
|
-
const generatedId = (0,
|
|
10725
|
-
const computedId = (0,
|
|
10769
|
+
const generatedId = (0, import_react47.useId)();
|
|
10770
|
+
const computedId = (0, import_type_guards39.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
10726
10771
|
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
10727
10772
|
StyledRadioWrapper,
|
|
10728
10773
|
{
|
|
@@ -10771,22 +10816,22 @@ var Radio = (0, import_react46.forwardRef)(
|
|
|
10771
10816
|
Radio.displayName = "Radio";
|
|
10772
10817
|
|
|
10773
10818
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10774
|
-
var
|
|
10819
|
+
var import_react51 = require("react");
|
|
10775
10820
|
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10776
10821
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10777
|
-
var
|
|
10822
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10778
10823
|
|
|
10779
10824
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10780
|
-
var
|
|
10825
|
+
var import_react48 = require("react");
|
|
10781
10826
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10782
|
-
var SelectedItemMeasurementsContext = (0,
|
|
10827
|
+
var SelectedItemMeasurementsContext = (0, import_react48.createContext)(
|
|
10783
10828
|
null
|
|
10784
10829
|
);
|
|
10785
10830
|
var SelectedItemMeasurementsProvider = ({
|
|
10786
10831
|
children
|
|
10787
10832
|
}) => {
|
|
10788
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
10789
|
-
const contextValue = (0,
|
|
10833
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react48.useState)(null);
|
|
10834
|
+
const contextValue = (0, import_react48.useMemo)(
|
|
10790
10835
|
() => ({
|
|
10791
10836
|
setSelectedItemMeasurements,
|
|
10792
10837
|
selectedItemMeasurements
|
|
@@ -10796,7 +10841,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10796
10841
|
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10797
10842
|
};
|
|
10798
10843
|
var useSelectedItemMeasurements = () => {
|
|
10799
|
-
const context = (0,
|
|
10844
|
+
const context = (0, import_react48.useContext)(SelectedItemMeasurementsContext);
|
|
10800
10845
|
if (context === null) {
|
|
10801
10846
|
throw new Error(
|
|
10802
10847
|
"useSelectedItemMeasurements must be used within a SelectedItemMeasurementsProvider"
|
|
@@ -10806,15 +10851,15 @@ var useSelectedItemMeasurements = () => {
|
|
|
10806
10851
|
};
|
|
10807
10852
|
|
|
10808
10853
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10809
|
-
var
|
|
10854
|
+
var import_react50 = require("react");
|
|
10810
10855
|
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10811
10856
|
|
|
10812
10857
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10813
|
-
var
|
|
10814
|
-
var SegmentedControlValueContext = (0,
|
|
10858
|
+
var import_react49 = require("react");
|
|
10859
|
+
var SegmentedControlValueContext = (0, import_react49.createContext)(null);
|
|
10815
10860
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
10816
10861
|
var useSegmentedControlValue = () => {
|
|
10817
|
-
const context = (0,
|
|
10862
|
+
const context = (0, import_react49.useContext)(SegmentedControlValueContext);
|
|
10818
10863
|
if (context === null) {
|
|
10819
10864
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
10820
10865
|
}
|
|
@@ -10838,7 +10883,7 @@ var SelectedItemIndicatorDiv = import_styled_components66.default.div`
|
|
|
10838
10883
|
var SelectedItemIndicator = () => {
|
|
10839
10884
|
const selectedValue = useSegmentedControlValue();
|
|
10840
10885
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10841
|
-
const selectedItemIndicatorStyle = (0,
|
|
10886
|
+
const selectedItemIndicatorStyle = (0, import_react50.useMemo)(
|
|
10842
10887
|
() => selectedItemMeasurements != null ? {
|
|
10843
10888
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10844
10889
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10876,7 +10921,7 @@ var segmentedControlStyles = import_styled_components67.css`
|
|
|
10876
10921
|
var StyledSegmentedControl = (0, import_styled_components67.default)(import_react_toggle_group.Root)`
|
|
10877
10922
|
${segmentedControlStyles}
|
|
10878
10923
|
`;
|
|
10879
|
-
var SegmentedControl = (0,
|
|
10924
|
+
var SegmentedControl = (0, import_react51.forwardRef)(
|
|
10880
10925
|
({
|
|
10881
10926
|
children,
|
|
10882
10927
|
disabled = false,
|
|
@@ -10885,7 +10930,7 @@ var SegmentedControl = (0, import_react50.forwardRef)(
|
|
|
10885
10930
|
onSelectedValueChange,
|
|
10886
10931
|
...props
|
|
10887
10932
|
}, ref) => {
|
|
10888
|
-
if ((0,
|
|
10933
|
+
if ((0, import_type_guards40.isNil)(children)) {
|
|
10889
10934
|
return null;
|
|
10890
10935
|
}
|
|
10891
10936
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
@@ -10911,26 +10956,10 @@ var SegmentedControl = (0, import_react50.forwardRef)(
|
|
|
10911
10956
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10912
10957
|
|
|
10913
10958
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10914
|
-
var
|
|
10959
|
+
var import_react52 = require("react");
|
|
10915
10960
|
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10916
10961
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10917
10962
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
10918
|
-
|
|
10919
|
-
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10920
|
-
var import_type_guards40 = require("@wistia/type-guards");
|
|
10921
|
-
var mergeRefs = (refs) => (value) => {
|
|
10922
|
-
refs.forEach((ref) => {
|
|
10923
|
-
if ((0, import_type_guards40.isFunction)(ref)) {
|
|
10924
|
-
ref(value);
|
|
10925
|
-
return;
|
|
10926
|
-
}
|
|
10927
|
-
if ((0, import_type_guards40.isNotNil)(ref)) {
|
|
10928
|
-
ref.current = value;
|
|
10929
|
-
}
|
|
10930
|
-
});
|
|
10931
|
-
};
|
|
10932
|
-
|
|
10933
|
-
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10934
10963
|
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
10935
10964
|
var segmentedControlItemStyles = import_styled_components68.css`
|
|
10936
10965
|
all: unset; /* ToggleGroupItem is a button element */
|
|
@@ -10994,11 +11023,11 @@ var segmentedControlItemStyles = import_styled_components68.css`
|
|
|
10994
11023
|
var StyledSegmentedControlItem = (0, import_styled_components68.default)(import_react_toggle_group2.Item)`
|
|
10995
11024
|
${segmentedControlItemStyles}
|
|
10996
11025
|
`;
|
|
10997
|
-
var SegmentedControlItem = (0,
|
|
11026
|
+
var SegmentedControlItem = (0, import_react52.forwardRef)(
|
|
10998
11027
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10999
11028
|
const selectedValue = useSegmentedControlValue();
|
|
11000
11029
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11001
|
-
const buttonRef = (0,
|
|
11030
|
+
const buttonRef = (0, import_react52.useRef)(null);
|
|
11002
11031
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11003
11032
|
const handleClick = (event) => {
|
|
11004
11033
|
const target = event.target;
|
|
@@ -11007,7 +11036,7 @@ var SegmentedControlItem = (0, import_react51.forwardRef)(
|
|
|
11007
11036
|
event.preventDefault();
|
|
11008
11037
|
}
|
|
11009
11038
|
};
|
|
11010
|
-
(0,
|
|
11039
|
+
(0, import_react52.useEffect)(() => {
|
|
11011
11040
|
const buttonElem = buttonRef.current;
|
|
11012
11041
|
if (!buttonElem) {
|
|
11013
11042
|
return void 0;
|
|
@@ -11053,7 +11082,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
11053
11082
|
|
|
11054
11083
|
// src/components/Select/Select.tsx
|
|
11055
11084
|
var import_react_select = require("@radix-ui/react-select");
|
|
11056
|
-
var
|
|
11085
|
+
var import_react53 = require("react");
|
|
11057
11086
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
11058
11087
|
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11059
11088
|
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
@@ -11122,7 +11151,7 @@ var StyledContent3 = (0, import_styled_components69.default)(import_react_select
|
|
|
11122
11151
|
max-height: var(--radix-select-content-available-height);
|
|
11123
11152
|
z-index: var(--wui-zindex-select);
|
|
11124
11153
|
`;
|
|
11125
|
-
var Select = (0,
|
|
11154
|
+
var Select = (0, import_react53.forwardRef)(
|
|
11126
11155
|
({
|
|
11127
11156
|
colorScheme = "inherit",
|
|
11128
11157
|
children,
|
|
@@ -11171,7 +11200,7 @@ Select.displayName = "Select";
|
|
|
11171
11200
|
|
|
11172
11201
|
// src/components/Select/SelectOption.tsx
|
|
11173
11202
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11174
|
-
var
|
|
11203
|
+
var import_react54 = require("react");
|
|
11175
11204
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11176
11205
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11177
11206
|
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
@@ -11200,7 +11229,7 @@ var StyledItem = (0, import_styled_components70.default)(import_react_select2.It
|
|
|
11200
11229
|
var StyledIconContainer = import_styled_components70.default.span`
|
|
11201
11230
|
width: 12px;
|
|
11202
11231
|
`;
|
|
11203
|
-
var SelectOption = (0,
|
|
11232
|
+
var SelectOption = (0, import_react54.forwardRef)(
|
|
11204
11233
|
({ children, ...props }, forwardedRef) => {
|
|
11205
11234
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11206
11235
|
StyledItem,
|
|
@@ -11245,7 +11274,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11245
11274
|
};
|
|
11246
11275
|
|
|
11247
11276
|
// src/components/Switch/Switch.tsx
|
|
11248
|
-
var
|
|
11277
|
+
var import_react55 = require("react");
|
|
11249
11278
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11250
11279
|
var import_type_guards42 = require("@wistia/type-guards");
|
|
11251
11280
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
@@ -11350,7 +11379,7 @@ var StyledHiddenSwitchInput = import_styled_components72.default.input`
|
|
|
11350
11379
|
}
|
|
11351
11380
|
}
|
|
11352
11381
|
`;
|
|
11353
|
-
var Switch = (0,
|
|
11382
|
+
var Switch = (0, import_react55.forwardRef)(
|
|
11354
11383
|
({
|
|
11355
11384
|
checked,
|
|
11356
11385
|
disabled = false,
|
|
@@ -11365,7 +11394,7 @@ var Switch = (0, import_react54.forwardRef)(
|
|
|
11365
11394
|
hideLabel = false,
|
|
11366
11395
|
...props
|
|
11367
11396
|
}, ref) => {
|
|
11368
|
-
const generatedId = (0,
|
|
11397
|
+
const generatedId = (0, import_react55.useId)();
|
|
11369
11398
|
const computedId = (0, import_type_guards42.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11370
11399
|
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11371
11400
|
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
@@ -11447,8 +11476,8 @@ var Table = ({
|
|
|
11447
11476
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11448
11477
|
|
|
11449
11478
|
// src/components/Table/TableSectionContext.ts
|
|
11450
|
-
var
|
|
11451
|
-
var TableSectionContext = (0,
|
|
11479
|
+
var import_react56 = require("react");
|
|
11480
|
+
var TableSectionContext = (0, import_react56.createContext)(null);
|
|
11452
11481
|
|
|
11453
11482
|
// src/components/Table/TableBody.tsx
|
|
11454
11483
|
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
@@ -11458,7 +11487,7 @@ var TableBody = ({ children, ...props }) => {
|
|
|
11458
11487
|
};
|
|
11459
11488
|
|
|
11460
11489
|
// src/components/Table/TableCell.tsx
|
|
11461
|
-
var
|
|
11490
|
+
var import_react57 = require("react");
|
|
11462
11491
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11463
11492
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11464
11493
|
var sharedStyles = import_styled_components75.css`
|
|
@@ -11479,7 +11508,7 @@ var StyledTd = import_styled_components75.default.td`
|
|
|
11479
11508
|
line-height: var(--wui-typography-body-2-line-height);
|
|
11480
11509
|
`;
|
|
11481
11510
|
var TableCell = ({ children, ...props }) => {
|
|
11482
|
-
const section = (0,
|
|
11511
|
+
const section = (0, import_react57.useContext)(TableSectionContext);
|
|
11483
11512
|
if (section === "head") {
|
|
11484
11513
|
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTh, { ...props, children });
|
|
11485
11514
|
}
|
|
@@ -11511,7 +11540,7 @@ var TableRow = ({ children, ...props }) => {
|
|
|
11511
11540
|
};
|
|
11512
11541
|
|
|
11513
11542
|
// src/components/Tabs/Tabs.tsx
|
|
11514
|
-
var
|
|
11543
|
+
var import_react62 = require("react");
|
|
11515
11544
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11516
11545
|
var import_type_guards44 = require("@wistia/type-guards");
|
|
11517
11546
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
@@ -11566,17 +11595,17 @@ var TabList = ({
|
|
|
11566
11595
|
TabList.displayName = "TabList";
|
|
11567
11596
|
|
|
11568
11597
|
// src/components/Tabs/TabItem.tsx
|
|
11569
|
-
var
|
|
11598
|
+
var import_react59 = require("react");
|
|
11570
11599
|
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11571
11600
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11572
11601
|
var import_type_guards43 = require("@wistia/type-guards");
|
|
11573
11602
|
|
|
11574
11603
|
// src/components/Tabs/useTabsValue.tsx
|
|
11575
|
-
var
|
|
11576
|
-
var TabsValueContext = (0,
|
|
11604
|
+
var import_react58 = require("react");
|
|
11605
|
+
var TabsValueContext = (0, import_react58.createContext)(null);
|
|
11577
11606
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
11578
11607
|
var useTabsValue = () => {
|
|
11579
|
-
const context = (0,
|
|
11608
|
+
const context = (0, import_react58.useContext)(TabsValueContext);
|
|
11580
11609
|
if (context === null) {
|
|
11581
11610
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
11582
11611
|
}
|
|
@@ -11592,13 +11621,13 @@ var StyledTabItem = (0, import_styled_components81.default)(import_react_tabs3.T
|
|
|
11592
11621
|
outline: none;
|
|
11593
11622
|
}
|
|
11594
11623
|
`;
|
|
11595
|
-
var TabItem = (0,
|
|
11624
|
+
var TabItem = (0, import_react59.forwardRef)(
|
|
11596
11625
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11597
11626
|
const selectedValue = useTabsValue();
|
|
11598
11627
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11599
|
-
const buttonRef = (0,
|
|
11628
|
+
const buttonRef = (0, import_react59.useRef)(null);
|
|
11600
11629
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11601
|
-
(0,
|
|
11630
|
+
(0, import_react59.useEffect)(() => {
|
|
11602
11631
|
const buttonElem = buttonRef.current;
|
|
11603
11632
|
if (!buttonElem) {
|
|
11604
11633
|
return void 0;
|
|
@@ -11642,16 +11671,16 @@ var TabItem = (0, import_react58.forwardRef)(
|
|
|
11642
11671
|
TabItem.displayName = "TabItem";
|
|
11643
11672
|
|
|
11644
11673
|
// src/components/Tabs/extractTabItems.ts
|
|
11645
|
-
var
|
|
11674
|
+
var import_react60 = require("react");
|
|
11646
11675
|
var extractTabItems = (children) => {
|
|
11647
11676
|
const tabItems = [];
|
|
11648
|
-
|
|
11649
|
-
if (!(0,
|
|
11677
|
+
import_react60.Children.forEach(children, (child) => {
|
|
11678
|
+
if (!(0, import_react60.isValidElement)(child)) {
|
|
11650
11679
|
return;
|
|
11651
11680
|
}
|
|
11652
11681
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
11653
11682
|
tabItems.push(child);
|
|
11654
|
-
} else if (child.type ===
|
|
11683
|
+
} else if (child.type === import_react60.Fragment) {
|
|
11655
11684
|
const fragmentElement = child;
|
|
11656
11685
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
11657
11686
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -11664,7 +11693,7 @@ var extractTabItems = (children) => {
|
|
|
11664
11693
|
};
|
|
11665
11694
|
|
|
11666
11695
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11667
|
-
var
|
|
11696
|
+
var import_react61 = require("react");
|
|
11668
11697
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11669
11698
|
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
11670
11699
|
var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(SelectedItemIndicatorDiv)`
|
|
@@ -11675,7 +11704,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(Selec
|
|
|
11675
11704
|
var SelectedItemIndicator2 = () => {
|
|
11676
11705
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11677
11706
|
const selectedValue = useTabsValue();
|
|
11678
|
-
const selectedItemIndicatorStyle = (0,
|
|
11707
|
+
const selectedItemIndicatorStyle = (0, import_react61.useMemo)(
|
|
11679
11708
|
() => selectedItemMeasurements != null ? {
|
|
11680
11709
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11681
11710
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -11716,7 +11745,7 @@ var StyledTabsRoot = (0, import_styled_components83.default)(import_react_tabs4.
|
|
|
11716
11745
|
flex-direction: column;
|
|
11717
11746
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11718
11747
|
`;
|
|
11719
|
-
var Tabs = (0,
|
|
11748
|
+
var Tabs = (0, import_react62.forwardRef)(
|
|
11720
11749
|
({
|
|
11721
11750
|
children,
|
|
11722
11751
|
fullWidth = true,
|
|
@@ -11728,7 +11757,7 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
11728
11757
|
...otherProps
|
|
11729
11758
|
}, ref) => {
|
|
11730
11759
|
const tabItems = extractTabItems(children);
|
|
11731
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
11760
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react62.useState)(defaultSelectedValue);
|
|
11732
11761
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
11733
11762
|
defaultValue: defaultSelectedValue,
|
|
11734
11763
|
onValueChange: setInternalSelectedValue
|
|
@@ -11814,15 +11843,15 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
11814
11843
|
Tabs.displayName = "Tabs";
|
|
11815
11844
|
|
|
11816
11845
|
// src/components/Tabs/Tab.tsx
|
|
11817
|
-
var
|
|
11846
|
+
var import_react63 = require("react");
|
|
11818
11847
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
11819
|
-
var Tab = (0,
|
|
11848
|
+
var Tab = (0, import_react63.forwardRef)(({ children }, ref) => {
|
|
11820
11849
|
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", { ref, children });
|
|
11821
11850
|
});
|
|
11822
11851
|
Tab.displayName = "Tab";
|
|
11823
11852
|
|
|
11824
11853
|
// src/components/Tag/Tag.tsx
|
|
11825
|
-
var
|
|
11854
|
+
var import_react64 = require("react");
|
|
11826
11855
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11827
11856
|
var import_type_guards45 = require("@wistia/type-guards");
|
|
11828
11857
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
@@ -11939,7 +11968,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11939
11968
|
)
|
|
11940
11969
|
] });
|
|
11941
11970
|
};
|
|
11942
|
-
var Tag = (0,
|
|
11971
|
+
var Tag = (0, import_react64.forwardRef)(
|
|
11943
11972
|
({
|
|
11944
11973
|
onClickRemove,
|
|
11945
11974
|
colorScheme = "inherit",
|
|
@@ -12190,6 +12219,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12190
12219
|
ellipsisFlexParentStyle,
|
|
12191
12220
|
ellipsisStyle,
|
|
12192
12221
|
iconSizeMap,
|
|
12222
|
+
mergeRefs,
|
|
12193
12223
|
mq,
|
|
12194
12224
|
useActiveMq,
|
|
12195
12225
|
useAriaLive,
|
|
@@ -12201,6 +12231,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12201
12231
|
useLocalStorage,
|
|
12202
12232
|
useLockBodyScroll,
|
|
12203
12233
|
useMq,
|
|
12234
|
+
useOnClickOutside,
|
|
12204
12235
|
useToast,
|
|
12205
12236
|
useWindowSize
|
|
12206
12237
|
});
|