@wistia/ui 0.8.8-beta.7f28ea45.4e964fe → 0.8.8-beta.d03cc08d.a27bacb

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.8.8-beta.7f28ea45.4e964fe
3
+ * @license @wistia/ui v0.8.8-beta.d03cc08d.a27bacb
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -140,6 +140,7 @@ __export(index_exports, {
140
140
  module.exports = __toCommonJS(index_exports);
141
141
 
142
142
  // src/providers/UIProvider/UIProvider.tsx
143
+ var import_react3 = require("react");
143
144
  var import_react_tooltip = require("@radix-ui/react-tooltip");
144
145
 
145
146
  // src/css/GlobalStyle.tsx
@@ -1599,12 +1600,21 @@ var ToastProvider = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_so
1599
1600
 
1600
1601
  // src/providers/UIProvider/UIProvider.tsx
1601
1602
  var import_jsx_runtime3 = require("react/jsx-runtime");
1603
+ var UIProviderContext = (0, import_react3.createContext)(false);
1602
1604
  var UIProvider = ({ children }) => {
1603
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AriaLiveProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_tooltip.Provider, { children: [
1605
+ const hasUIProviderParent = (0, import_react3.useContext)(UIProviderContext);
1606
+ (0, import_react3.useEffect)(() => {
1607
+ if (hasUIProviderParent) {
1608
+ throw new Error(
1609
+ "UIProvider cannot be nested inside another UIProvider. This can lead to unexpected behavior."
1610
+ );
1611
+ }
1612
+ }, [hasUIProviderParent]);
1613
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UIProviderContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AriaLiveProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_tooltip.Provider, { children: [
1604
1614
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(GlobalStyle, {}),
1605
1615
  children,
1606
1616
  process.env["NODE_ENV"] !== "test" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastProvider, {})
1607
- ] }) });
1617
+ ] }) }) });
1608
1618
  };
1609
1619
 
1610
1620
  // src/helpers/copyToClipboard/copyToClipboard.ts
@@ -2072,10 +2082,10 @@ var mq = {
2072
2082
  };
2073
2083
 
2074
2084
  // src/hooks/useAriaLive/useAriaLive.tsx
2075
- var import_react3 = require("react");
2085
+ var import_react4 = require("react");
2076
2086
  var import_type_guards6 = require("@wistia/type-guards");
2077
2087
  var useAriaLive = () => {
2078
- const context = (0, import_react3.useContext)(AriaLiveContext);
2088
+ const context = (0, import_react4.useContext)(AriaLiveContext);
2079
2089
  if ((0, import_type_guards6.isNil)(context)) {
2080
2090
  throw new Error("useAriaLive must be used within an AriaLiveProvider");
2081
2091
  }
@@ -2083,12 +2093,12 @@ var useAriaLive = () => {
2083
2093
  };
2084
2094
 
2085
2095
  // src/hooks/useBoolean/useBoolean.ts
2086
- var import_react4 = require("react");
2096
+ var import_react5 = require("react");
2087
2097
  var useBoolean = (initialValue = false) => {
2088
- const [value, setValue] = (0, import_react4.useState)(initialValue);
2089
- const toggle = (0, import_react4.useCallback)(() => setValue((val) => !val), []);
2090
- const setTrue = (0, import_react4.useCallback)(() => setValue(true), []);
2091
- const setFalse = (0, import_react4.useCallback)(() => setValue(false), []);
2098
+ const [value, setValue] = (0, import_react5.useState)(initialValue);
2099
+ const toggle = (0, import_react5.useCallback)(() => setValue((val) => !val), []);
2100
+ const setTrue = (0, import_react5.useCallback)(() => setValue(true), []);
2101
+ const setFalse = (0, import_react5.useCallback)(() => setValue(false), []);
2092
2102
  return [value, toggle, setTrue, setFalse, setValue];
2093
2103
  };
2094
2104
 
@@ -2097,10 +2107,10 @@ var import_use_file_picker = require("use-file-picker");
2097
2107
  var import_validators = require("use-file-picker/validators");
2098
2108
 
2099
2109
  // src/hooks/useKey/useKey.ts
2100
- var import_react6 = require("react");
2110
+ var import_react7 = require("react");
2101
2111
 
2102
2112
  // src/private/hooks/useEvent/useEvent.ts
2103
- var import_react5 = require("react");
2113
+ var import_react6 = require("react");
2104
2114
 
2105
2115
  // src/private/helpers/isValidRef/isValidRef.ts
2106
2116
  var import_type_guards7 = require("@wistia/type-guards");
@@ -2119,15 +2129,15 @@ var isEventTargetSupported = (eventTarget) => (
2119
2129
  !!(typeof eventTarget === "object" && eventTarget?.addEventListener)
2120
2130
  );
2121
2131
  var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
2122
- const savedEventHandler = (0, import_react5.useRef)();
2123
- const savedEventOptions = (0, import_react5.useRef)();
2124
- (0, import_react5.useEffect)(() => {
2132
+ const savedEventHandler = (0, import_react6.useRef)();
2133
+ const savedEventOptions = (0, import_react6.useRef)();
2134
+ (0, import_react6.useEffect)(() => {
2125
2135
  savedEventHandler.current = eventHandler;
2126
2136
  }, [eventHandler]);
2127
- (0, import_react5.useEffect)(() => {
2137
+ (0, import_react6.useEffect)(() => {
2128
2138
  savedEventOptions.current = eventOptions;
2129
2139
  }, [eventOptions]);
2130
- (0, import_react5.useEffect)(() => {
2140
+ (0, import_react6.useEffect)(() => {
2131
2141
  const target = isValidRef(eventTarget) ? eventTarget.current : eventTarget;
2132
2142
  if (!eventName || !isEventTargetSupported(target)) {
2133
2143
  return;
@@ -2147,7 +2157,7 @@ var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}
2147
2157
 
2148
2158
  // src/hooks/useKey/useKey.ts
2149
2159
  var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOptions } = {}) => {
2150
- const memoizedEventHandler = (0, import_react6.useCallback)(
2160
+ const memoizedEventHandler = (0, import_react7.useCallback)(
2151
2161
  (handlerEvent) => {
2152
2162
  if (["INPUT", "TEXTAREA", "SELECT"].includes(document.activeElement?.nodeName ?? "") || document.activeElement?.isContentEditable) {
2153
2163
  return;
@@ -2172,9 +2182,9 @@ var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOpti
2172
2182
  };
2173
2183
 
2174
2184
  // src/hooks/useLocalStorage/useLocalStorage.ts
2175
- var import_react7 = require("react");
2185
+ var import_react8 = require("react");
2176
2186
  var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
2177
- const [storedValue, setStoredValue] = (0, import_react7.useState)(() => {
2187
+ const [storedValue, setStoredValue] = (0, import_react8.useState)(() => {
2178
2188
  try {
2179
2189
  const item = storage.getItem(key);
2180
2190
  return item !== null && !!item ? JSON.parse(item) : initialValue;
@@ -2200,9 +2210,9 @@ var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
2200
2210
  };
2201
2211
 
2202
2212
  // src/hooks/useLockBodyScroll/useLockBodyScroll.ts
2203
- var import_react8 = require("react");
2213
+ var import_react9 = require("react");
2204
2214
  var useLockBodyScroll = (locked) => {
2205
- (0, import_react8.useLayoutEffect)(() => {
2215
+ (0, import_react9.useLayoutEffect)(() => {
2206
2216
  if (locked) {
2207
2217
  const originalStyle = window.getComputedStyle(document.body).overflow;
2208
2218
  document.body.style.overflow = "hidden";
@@ -2215,9 +2225,9 @@ var useLockBodyScroll = (locked) => {
2215
2225
  };
2216
2226
 
2217
2227
  // src/hooks/useOnClickOutside/useOnClickOutside.ts
2218
- var import_react9 = require("react");
2228
+ var import_react10 = require("react");
2219
2229
  var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) => {
2220
- (0, import_react9.useEffect)(() => {
2230
+ (0, import_react10.useEffect)(() => {
2221
2231
  const listener = (event) => {
2222
2232
  if (!ref.current || ref.current.contains(event.target)) {
2223
2233
  return;
@@ -2247,7 +2257,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
2247
2257
  var import_type_guards8 = require("@wistia/type-guards");
2248
2258
 
2249
2259
  // src/hooks/useWindowSize/useWindowSize.ts
2250
- var import_react10 = require("react");
2260
+ var import_react11 = require("react");
2251
2261
  var import_throttle_debounce = require("throttle-debounce");
2252
2262
 
2253
2263
  // src/private/helpers/isClient/isClient.ts
@@ -2255,11 +2265,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
2255
2265
 
2256
2266
  // src/hooks/useWindowSize/useWindowSize.ts
2257
2267
  var useWindowSize = (interval = 0) => {
2258
- const [dimensions, setDimensions] = (0, import_react10.useState)({
2268
+ const [dimensions, setDimensions] = (0, import_react11.useState)({
2259
2269
  width: isClient() ? window.innerWidth : 0,
2260
2270
  height: isClient() ? window.innerHeight : 0
2261
2271
  });
2262
- (0, import_react10.useLayoutEffect)(() => {
2272
+ (0, import_react11.useLayoutEffect)(() => {
2263
2273
  const handleResize = (0, import_throttle_debounce.debounce)(
2264
2274
  interval,
2265
2275
  () => setDimensions({
@@ -2311,11 +2321,11 @@ var useActiveMq = () => {
2311
2321
  };
2312
2322
 
2313
2323
  // src/hooks/useToast/useToast.tsx
2314
- var import_react12 = require("react");
2324
+ var import_react13 = require("react");
2315
2325
  var import_sonner2 = require("sonner");
2316
2326
 
2317
2327
  // src/private/components/Toast/Toast.tsx
2318
- var import_react11 = require("react");
2328
+ var import_react12 = require("react");
2319
2329
  var import_styled_components16 = __toESM(require("styled-components"));
2320
2330
  var import_type_guards10 = require("@wistia/type-guards");
2321
2331
 
@@ -2553,8 +2563,8 @@ var StyledToast = import_styled_components16.default.div`
2553
2563
  }
2554
2564
  `;
2555
2565
  var Action = ({ actionButton }) => {
2556
- if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react11.isValidElement)(actionButton)) {
2557
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react11.cloneElement)(actionButton, {
2566
+ if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react12.isValidElement)(actionButton)) {
2567
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react12.cloneElement)(actionButton, {
2558
2568
  variant: "soft",
2559
2569
  // force Button variant
2560
2570
  size: "sm"
@@ -2590,7 +2600,7 @@ Toast.displayName = "Toast";
2590
2600
  // src/hooks/useToast/useToast.tsx
2591
2601
  var import_jsx_runtime6 = require("react/jsx-runtime");
2592
2602
  var useToast = () => {
2593
- return (0, import_react12.useCallback)(
2603
+ return (0, import_react13.useCallback)(
2594
2604
  ({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
2595
2605
  import_sonner2.toast.custom(
2596
2606
  () => {
@@ -2612,7 +2622,7 @@ var useToast = () => {
2612
2622
  };
2613
2623
 
2614
2624
  // src/hooks/useFocusTrap/useFocusTrap.ts
2615
- var import_react13 = require("react");
2625
+ var import_react14 = require("react");
2616
2626
  var import_type_guards11 = require("@wistia/type-guards");
2617
2627
 
2618
2628
  // src/hooks/useFocusTrap/helpers.ts
@@ -2762,9 +2772,9 @@ var isRef = (val) => {
2762
2772
  return val !== null && typeof val === "object" && "current" in val;
2763
2773
  };
2764
2774
  var useFocusTrap = (active = true, options = {}) => {
2765
- const ref = (0, import_react13.useRef)(null);
2766
- const restoreAriaRef = (0, import_react13.useRef)(null);
2767
- const setRef = (0, import_react13.useCallback)(
2775
+ const ref = (0, import_react14.useRef)(null);
2776
+ const restoreAriaRef = (0, import_react14.useRef)(null);
2777
+ const setRef = (0, import_react14.useCallback)(
2768
2778
  (node) => {
2769
2779
  if (restoreAriaRef.current !== null) {
2770
2780
  restoreAriaRef.current();
@@ -2826,7 +2836,7 @@ var useFocusTrap = (active = true, options = {}) => {
2826
2836
  },
2827
2837
  [active, options.focusSelector, options.disableAriaHider]
2828
2838
  );
2829
- (0, import_react13.useEffect)(() => {
2839
+ (0, import_react14.useEffect)(() => {
2830
2840
  if (!active) {
2831
2841
  return void 0;
2832
2842
  }
@@ -2844,11 +2854,11 @@ var useFocusTrap = (active = true, options = {}) => {
2844
2854
  };
2845
2855
 
2846
2856
  // src/components/ActionButton/ActionButton.tsx
2847
- var import_react17 = require("react");
2857
+ var import_react18 = require("react");
2848
2858
  var import_styled_components22 = __toESM(require("styled-components"));
2849
2859
 
2850
2860
  // src/components/Button/Button.tsx
2851
- var import_react16 = require("react");
2861
+ var import_react17 = require("react");
2852
2862
  var import_styled_components21 = __toESM(require("styled-components"));
2853
2863
  var import_type_guards15 = require("@wistia/type-guards");
2854
2864
 
@@ -6910,13 +6920,13 @@ var iconMap = {
6910
6920
 
6911
6921
  // src/private/hooks/useResponsiveProp/useResponsiveProp.ts
6912
6922
  var import_type_guards12 = require("@wistia/type-guards");
6913
- var import_react14 = require("react");
6923
+ var import_react15 = require("react");
6914
6924
  var isResponsiveObject = (values) => {
6915
6925
  return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
6916
6926
  };
6917
6927
  var useResponsiveProp = (values) => {
6918
6928
  const activeMediaQueries = useActiveMq();
6919
- return (0, import_react14.useMemo)(() => {
6929
+ return (0, import_react15.useMemo)(() => {
6920
6930
  if ((0, import_type_guards12.isRecord)(values) && isResponsiveObject(values)) {
6921
6931
  const mq2 = activeMediaQueries.find((key) => key in values);
6922
6932
  return (0, import_type_guards12.isNotUndefined)(mq2) && (0, import_type_guards12.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
@@ -6983,7 +6993,7 @@ var Icon = ({
6983
6993
  Icon.displayName = "Icon";
6984
6994
 
6985
6995
  // src/components/Link/Link.tsx
6986
- var import_react15 = require("react");
6996
+ var import_react16 = require("react");
6987
6997
  var import_type_guards14 = require("@wistia/type-guards");
6988
6998
  var import_styled_components20 = __toESM(require("styled-components"));
6989
6999
  var import_react_router_dom = require("react-router-dom");
@@ -7023,7 +7033,7 @@ var StyledLink = import_styled_components20.default.a`
7023
7033
  }
7024
7034
  }
7025
7035
  `;
7026
- var Link = (0, import_react15.forwardRef)(
7036
+ var Link = (0, import_react16.forwardRef)(
7027
7037
  ({
7028
7038
  beforeAction,
7029
7039
  children,
@@ -7169,7 +7179,7 @@ var ButtonContent = ({
7169
7179
  )
7170
7180
  ] });
7171
7181
  };
7172
- var Button = (0, import_react16.forwardRef)(
7182
+ var Button = (0, import_react17.forwardRef)(
7173
7183
  ({
7174
7184
  children,
7175
7185
  forceState,
@@ -7348,7 +7358,7 @@ var StyledLabel = import_styled_components22.default.span`
7348
7358
  grid-row: 2;
7349
7359
  text-align: left;
7350
7360
  `;
7351
- var ActionButton = (0, import_react17.forwardRef)(
7361
+ var ActionButton = (0, import_react18.forwardRef)(
7352
7362
  ({
7353
7363
  icon,
7354
7364
  colorScheme = "default",
@@ -7392,7 +7402,7 @@ var ActionButton = (0, import_react17.forwardRef)(
7392
7402
  ActionButton.displayName = "ActionButton";
7393
7403
 
7394
7404
  // src/components/Avatar/Avatar.tsx
7395
- var import_react18 = require("react");
7405
+ var import_react19 = require("react");
7396
7406
  var import_type_guards18 = require("@wistia/type-guards");
7397
7407
  var import_styled_components25 = __toESM(require("styled-components"));
7398
7408
 
@@ -7600,8 +7610,8 @@ var Avatar = ({
7600
7610
  onImageLoad,
7601
7611
  ...props
7602
7612
  }) => {
7603
- const [imageLoadState, setImageLoadState] = (0, import_react18.useState)("loading");
7604
- (0, import_react18.useEffect)(() => {
7613
+ const [imageLoadState, setImageLoadState] = (0, import_react19.useState)("loading");
7614
+ (0, import_react19.useEffect)(() => {
7605
7615
  setImageLoadState("loading");
7606
7616
  }, [imageUrl]);
7607
7617
  const handleImageLoad = () => {
@@ -7613,7 +7623,7 @@ var Avatar = ({
7613
7623
  onImageLoad?.({ state: "error", type: "initials" });
7614
7624
  };
7615
7625
  const avatarSize = heightAndWidth ?? avatarSizeMap[size];
7616
- const avatarColor = (0, import_react18.useMemo)(() => chooseColorScheme(name), [name]);
7626
+ const avatarColor = (0, import_react19.useMemo)(() => chooseColorScheme(name), [name]);
7617
7627
  return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
7618
7628
  AvatarWrapper,
7619
7629
  {
@@ -7640,7 +7650,7 @@ var Avatar = ({
7640
7650
  Avatar.displayName = "Avatar";
7641
7651
 
7642
7652
  // src/components/Badge/Badge.tsx
7643
- var import_react19 = require("react");
7653
+ var import_react20 = require("react");
7644
7654
  var import_styled_components26 = __toESM(require("styled-components"));
7645
7655
  var import_type_guards19 = require("@wistia/type-guards");
7646
7656
  var import_jsx_runtime198 = require("react/jsx-runtime");
@@ -7664,7 +7674,7 @@ var StyledBadge = import_styled_components26.default.div`
7664
7674
  width: 12px;
7665
7675
  }
7666
7676
  `;
7667
- var Badge = (0, import_react19.forwardRef)(
7677
+ var Badge = (0, import_react20.forwardRef)(
7668
7678
  ({ colorScheme = "inherit", label, icon, ...props }, ref) => {
7669
7679
  const hasIcon = (0, import_type_guards19.isNotNil)(icon);
7670
7680
  return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
@@ -7685,7 +7695,7 @@ var Badge = (0, import_react19.forwardRef)(
7685
7695
  Badge.displayName = "Badge";
7686
7696
 
7687
7697
  // src/components/Box/Box.tsx
7688
- var import_react20 = require("react");
7698
+ var import_react21 = require("react");
7689
7699
  var import_styled_components27 = __toESM(require("styled-components"));
7690
7700
  var import_type_guards20 = require("@wistia/type-guards");
7691
7701
 
@@ -7794,13 +7804,13 @@ var StyledBoxComponent = import_styled_components27.default.div`
7794
7804
  var wrapChildren = (children) => {
7795
7805
  if ((0, import_type_guards20.isNotNil)(children)) {
7796
7806
  if (typeof children === "object" && isDev) {
7797
- return import_react20.Children.map(children, (child) => {
7807
+ return import_react21.Children.map(children, (child) => {
7798
7808
  if ((0, import_type_guards20.isNil)(child)) return null;
7799
7809
  const elementParams = {};
7800
7810
  if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
7801
7811
  elementParams.hasBoxParent = true;
7802
7812
  }
7803
- return (0, import_react20.cloneElement)(child, elementParams);
7813
+ return (0, import_react21.cloneElement)(child, elementParams);
7804
7814
  });
7805
7815
  }
7806
7816
  return children;
@@ -7808,7 +7818,7 @@ var wrapChildren = (children) => {
7808
7818
  return null;
7809
7819
  };
7810
7820
  var DEFAULT_ELEMENT = "div";
7811
- var BoxComponent = (0, import_react20.forwardRef)(
7821
+ var BoxComponent = (0, import_react21.forwardRef)(
7812
7822
  ({
7813
7823
  alignContent = "stretch",
7814
7824
  alignItems = "flex-start",
@@ -7885,7 +7895,7 @@ BoxComponent.displayName = "Box";
7885
7895
  var Box = makePolymorphic(BoxComponent);
7886
7896
 
7887
7897
  // src/components/Breadcrumbs/Breadcrumbs.tsx
7888
- var import_react21 = require("react");
7898
+ var import_react22 = require("react");
7889
7899
  var import_styled_components28 = __toESM(require("styled-components"));
7890
7900
  var import_jsx_runtime200 = require("react/jsx-runtime");
7891
7901
  var StyledBreadcrumbs = import_styled_components28.default.nav`
@@ -7901,7 +7911,7 @@ var StyledBreadcrumbs = import_styled_components28.default.nav`
7901
7911
  var BUFFER_WIDTH = 10;
7902
7912
  var Breadcrumbs = ({ children, ...props }) => {
7903
7913
  const { isXsAndDown } = useMq();
7904
- let crumbs = import_react21.Children.toArray(children);
7914
+ let crumbs = import_react22.Children.toArray(children);
7905
7915
  if (isXsAndDown) {
7906
7916
  crumbs = crumbs.slice(-1);
7907
7917
  }
@@ -8088,7 +8098,7 @@ var Card = ({
8088
8098
  Card.displayName = "Card";
8089
8099
 
8090
8100
  // src/components/Center/Center.tsx
8091
- var import_react22 = require("react");
8101
+ var import_react23 = require("react");
8092
8102
  var import_styled_components32 = __toESM(require("styled-components"));
8093
8103
  var import_jsx_runtime204 = require("react/jsx-runtime");
8094
8104
  var StyledCenter = import_styled_components32.default.div`
@@ -8103,7 +8113,7 @@ var StyledCenter = import_styled_components32.default.div`
8103
8113
  align-items: center;
8104
8114
  `}
8105
8115
  `;
8106
- var Center = (0, import_react22.forwardRef)(
8116
+ var Center = (0, import_react23.forwardRef)(
8107
8117
  ({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
8108
8118
  StyledCenter,
8109
8119
  {
@@ -8119,7 +8129,7 @@ var Center = (0, import_react22.forwardRef)(
8119
8129
  Center.displayName = "Center";
8120
8130
 
8121
8131
  // src/components/Checkbox/Checkbox.tsx
8122
- var import_react23 = require("react");
8132
+ var import_react24 = require("react");
8123
8133
  var import_styled_components36 = __toESM(require("styled-components"));
8124
8134
  var import_type_guards25 = require("@wistia/type-guards");
8125
8135
 
@@ -8339,7 +8349,7 @@ var StyledHiddenCheckboxInput = import_styled_components36.default.input`
8339
8349
  display: block;
8340
8350
  }
8341
8351
  `;
8342
- var Checkbox = (0, import_react23.forwardRef)(
8352
+ var Checkbox = (0, import_react24.forwardRef)(
8343
8353
  ({
8344
8354
  checked,
8345
8355
  disabled = false,
@@ -8354,7 +8364,7 @@ var Checkbox = (0, import_react23.forwardRef)(
8354
8364
  hideLabel = false,
8355
8365
  ...props
8356
8366
  }, ref) => {
8357
- const generatedId = (0, import_react23.useId)();
8367
+ const generatedId = (0, import_react24.useId)();
8358
8368
  const computedId = (0, import_type_guards25.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
8359
8369
  return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledCheckboxWrapper, { disabled, children: [
8360
8370
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
@@ -8397,9 +8407,9 @@ var Checkbox = (0, import_react23.forwardRef)(
8397
8407
  Checkbox.displayName = "Checkbox";
8398
8408
 
8399
8409
  // src/components/ClickRegion/ClickRegion.tsx
8400
- var import_react24 = require("react");
8410
+ var import_react25 = require("react");
8401
8411
  var ClickRegion = ({ children, targetRef }) => {
8402
- (0, import_react24.useEffect)(() => {
8412
+ (0, import_react25.useEffect)(() => {
8403
8413
  if (targetRef.current && targetRef.current.tagName === "A") {
8404
8414
  targetRef.current.setAttribute("data-click-region-target-link", "");
8405
8415
  } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
@@ -8407,7 +8417,7 @@ var ClickRegion = ({ children, targetRef }) => {
8407
8417
  } else {
8408
8418
  }
8409
8419
  }, [targetRef]);
8410
- const handleClick = (0, import_react24.useCallback)(
8420
+ const handleClick = (0, import_react25.useCallback)(
8411
8421
  (event) => {
8412
8422
  const node = targetRef.current;
8413
8423
  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")) {
@@ -8424,7 +8434,7 @@ var ClickRegion = ({ children, targetRef }) => {
8424
8434
  },
8425
8435
  [targetRef]
8426
8436
  );
8427
- return (0, import_react24.cloneElement)(import_react24.Children.only(children), {
8437
+ return (0, import_react25.cloneElement)(import_react25.Children.only(children), {
8428
8438
  "data-click-region": true,
8429
8439
  onClick: handleClick
8430
8440
  });
@@ -8457,11 +8467,11 @@ var Collapsible = ({
8457
8467
  Collapsible.displayName = "Collapsible";
8458
8468
 
8459
8469
  // src/components/Collapsible/CollapsibleTrigger.tsx
8460
- var import_react25 = require("react");
8470
+ var import_react26 = require("react");
8461
8471
  var import_react_collapsible2 = require("@radix-ui/react-collapsible");
8462
8472
  var import_jsx_runtime210 = require("react/jsx-runtime");
8463
8473
  var CollapsibleTrigger = ({ children }) => {
8464
- import_react25.Children.only(children);
8474
+ import_react26.Children.only(children);
8465
8475
  return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
8466
8476
  };
8467
8477
 
@@ -8488,7 +8498,7 @@ var import_styled_components40 = __toESM(require("styled-components"));
8488
8498
  var import_type_guards29 = require("@wistia/type-guards");
8489
8499
 
8490
8500
  // src/components/Heading/Heading.tsx
8491
- var import_react26 = require("react");
8501
+ var import_react27 = require("react");
8492
8502
  var import_styled_components39 = __toESM(require("styled-components"));
8493
8503
  var import_type_guards28 = require("@wistia/type-guards");
8494
8504
  var import_jsx_runtime212 = require("react/jsx-runtime");
@@ -8584,7 +8594,7 @@ var variantElementMap = {
8584
8594
  heading5: "h5",
8585
8595
  heading6: "h6"
8586
8596
  };
8587
- var HeadingComponent = (0, import_react26.forwardRef)(
8597
+ var HeadingComponent = (0, import_react27.forwardRef)(
8588
8598
  ({
8589
8599
  align = "left",
8590
8600
  colorScheme = "inherit",
@@ -8748,7 +8758,7 @@ DataCards.displayName = "DataCards";
8748
8758
  var import_styled_components43 = __toESM(require("styled-components"));
8749
8759
 
8750
8760
  // src/components/Text/Text.tsx
8751
- var import_react27 = require("react");
8761
+ var import_react28 = require("react");
8752
8762
  var import_styled_components42 = __toESM(require("styled-components"));
8753
8763
  var import_type_guards30 = require("@wistia/type-guards");
8754
8764
  var import_jsx_runtime215 = require("react/jsx-runtime");
@@ -8923,7 +8933,7 @@ var StyledText = import_styled_components42.default.div`
8923
8933
  }
8924
8934
  `}
8925
8935
  `;
8926
- var TextComponent = (0, import_react27.forwardRef)(
8936
+ var TextComponent = (0, import_react28.forwardRef)(
8927
8937
  ({
8928
8938
  align = "left",
8929
8939
  colorScheme = "inherit",
@@ -9036,7 +9046,7 @@ Divider.displayName = "Divider";
9036
9046
 
9037
9047
  // src/components/EditableHeading/EditableHeading.tsx
9038
9048
  var import_styled_components48 = __toESM(require("styled-components"));
9039
- var import_react29 = require("react");
9049
+ var import_react30 = require("react");
9040
9050
 
9041
9051
  // src/components/Tooltip/Tooltip.tsx
9042
9052
  var import_react_tooltip2 = require("@radix-ui/react-tooltip");
@@ -9134,7 +9144,7 @@ var Tooltip = ({
9134
9144
  Tooltip.displayName = "Tooltip";
9135
9145
 
9136
9146
  // src/components/Input/Input.tsx
9137
- var import_react28 = require("react");
9147
+ var import_react29 = require("react");
9138
9148
  var import_styled_components47 = __toESM(require("styled-components"));
9139
9149
  var import_type_guards31 = require("@wistia/type-guards");
9140
9150
 
@@ -9269,7 +9279,7 @@ var StyledInputContainer = import_styled_components47.default.div`
9269
9279
  padding-right: 32px;
9270
9280
  }
9271
9281
  `;
9272
- var Input = (0, import_react28.forwardRef)(
9282
+ var Input = (0, import_react29.forwardRef)(
9273
9283
  ({
9274
9284
  fullWidth = true,
9275
9285
  monospace = false,
@@ -9279,7 +9289,7 @@ var Input = (0, import_react28.forwardRef)(
9279
9289
  rightIcon,
9280
9290
  ...props
9281
9291
  }, externalRef) => {
9282
- const internalRef = (0, import_react28.useRef)();
9292
+ const internalRef = (0, import_react29.useRef)();
9283
9293
  const ref = (
9284
9294
  // eslint-disable-next-line react-compiler/react-compiler
9285
9295
  (0, import_type_guards31.isNotNil)(externalRef) && (0, import_type_guards31.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
@@ -9289,14 +9299,14 @@ var Input = (0, import_react28.forwardRef)(
9289
9299
  leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Icon, { type: "search" });
9290
9300
  }
9291
9301
  if ((0, import_type_guards31.isNotNil)(leftIconToDisplay)) {
9292
- leftIconToDisplay = (0, import_react28.cloneElement)(leftIconToDisplay, {
9302
+ leftIconToDisplay = (0, import_react29.cloneElement)(leftIconToDisplay, {
9293
9303
  size: "md",
9294
9304
  className: "wui-input-left-icon"
9295
9305
  });
9296
9306
  }
9297
9307
  let rightIconToDisplay = rightIcon;
9298
9308
  if ((0, import_type_guards31.isNotNil)(rightIconToDisplay)) {
9299
- rightIconToDisplay = (0, import_react28.cloneElement)(rightIconToDisplay, {
9309
+ rightIconToDisplay = (0, import_react29.cloneElement)(rightIconToDisplay, {
9300
9310
  size: "md",
9301
9311
  className: "wui-input-right-icon"
9302
9312
  });
@@ -9388,11 +9398,11 @@ var EditableHeading = ({
9388
9398
  __forceEditing = false,
9389
9399
  editingDisabled = false
9390
9400
  }) => {
9391
- const [isEditing, setIsEditing] = (0, import_react29.useState)(false);
9392
- const [value, setValue] = (0, import_react29.useState)(children);
9393
- const [previousValue, setPreviousValue] = (0, import_react29.useState)(children);
9394
- const [headingHeight, setHeadingHeight] = (0, import_react29.useState)("60");
9395
- const headingRef = (0, import_react29.useRef)(null);
9401
+ const [isEditing, setIsEditing] = (0, import_react30.useState)(false);
9402
+ const [value, setValue] = (0, import_react30.useState)(children);
9403
+ const [previousValue, setPreviousValue] = (0, import_react30.useState)(children);
9404
+ const [headingHeight, setHeadingHeight] = (0, import_react30.useState)("60");
9405
+ const headingRef = (0, import_react30.useRef)(null);
9396
9406
  const handleSetEditing = (editing) => {
9397
9407
  if (editingDisabled) return;
9398
9408
  if (editing && headingRef.current) {
@@ -9471,12 +9481,12 @@ var EditableHeading = ({
9471
9481
  };
9472
9482
 
9473
9483
  // src/components/Form/Form.tsx
9474
- var import_react31 = require("react");
9484
+ var import_react32 = require("react");
9475
9485
  var import_styled_components50 = __toESM(require("styled-components"));
9476
9486
  var import_type_guards32 = require("@wistia/type-guards");
9477
9487
 
9478
9488
  // src/components/Stack/Stack.tsx
9479
- var import_react30 = require("react");
9489
+ var import_react31 = require("react");
9480
9490
  var import_styled_components49 = __toESM(require("styled-components"));
9481
9491
  var import_jsx_runtime221 = require("react/jsx-runtime");
9482
9492
  var DEFAULT_ELEMENT4 = "div";
@@ -9486,7 +9496,7 @@ var StyledStack = import_styled_components49.default.div`
9486
9496
  gap: ${({ $gap }) => `var(--wui-${$gap})`};
9487
9497
  align-items: ${({ $alignItems }) => $alignItems};
9488
9498
  `;
9489
- var StackComponent = (0, import_react30.forwardRef)(
9499
+ var StackComponent = (0, import_react31.forwardRef)(
9490
9500
  ({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
9491
9501
  const responsiveGap = useResponsiveProp(gap);
9492
9502
  const responsiveDirection = useResponsiveProp(direction);
@@ -9515,7 +9525,7 @@ var StyledForm = import_styled_components50.default.form`
9515
9525
  max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
9516
9526
  align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
9517
9527
  `;
9518
- var FormContext = (0, import_react31.createContext)({
9528
+ var FormContext = (0, import_react32.createContext)({
9519
9529
  values: {},
9520
9530
  errors: {},
9521
9531
  hasSubmitted: false,
@@ -9531,11 +9541,11 @@ var FormComponent = ({
9531
9541
  fullWidth = false,
9532
9542
  ...props
9533
9543
  }, forwardedRef) => {
9534
- const [errors, setErrors] = (0, import_react31.useState)({});
9535
- const [hasSubmitted, setHasSubmitted] = (0, import_react31.useState)(false);
9536
- const innerRef = (0, import_react31.useRef)();
9544
+ const [errors, setErrors] = (0, import_react32.useState)({});
9545
+ const [hasSubmitted, setHasSubmitted] = (0, import_react32.useState)(false);
9546
+ const innerRef = (0, import_react32.useRef)();
9537
9547
  const ref = forwardedRef ?? innerRef;
9538
- const autoId = (0, import_react31.useId)();
9548
+ const autoId = (0, import_react32.useId)();
9539
9549
  const id = props.id ?? autoId;
9540
9550
  const handleValidate = (nextFormData) => {
9541
9551
  const nextData = Object.fromEntries(nextFormData.entries());
@@ -9577,7 +9587,7 @@ var FormComponent = ({
9577
9587
  void action(null);
9578
9588
  }
9579
9589
  };
9580
- const context = (0, import_react31.useMemo)(() => {
9590
+ const context = (0, import_react32.useMemo)(() => {
9581
9591
  return {
9582
9592
  values,
9583
9593
  errors,
@@ -9606,15 +9616,15 @@ var FormComponent = ({
9606
9616
  );
9607
9617
  };
9608
9618
  FormComponent.displayName = "Form";
9609
- var Form = (0, import_react31.forwardRef)(FormComponent);
9619
+ var Form = (0, import_react32.forwardRef)(FormComponent);
9610
9620
 
9611
9621
  // src/components/Form/useFormState.tsx
9612
- var import_react32 = require("react");
9622
+ var import_react33 = require("react");
9613
9623
  var useFormState = (action, initialData = {}) => {
9614
- const [data, setData] = (0, import_react32.useState)(initialData);
9615
- const [isPending, setIsPending] = (0, import_react32.useState)(false);
9616
- const [error, setError] = (0, import_react32.useState)(null);
9617
- const formAction = (0, import_react32.useCallback)(
9624
+ const [data, setData] = (0, import_react33.useState)(initialData);
9625
+ const [isPending, setIsPending] = (0, import_react33.useState)(false);
9626
+ const [error, setError] = (0, import_react33.useState)(null);
9627
+ const formAction = (0, import_react33.useCallback)(
9618
9628
  async (nextFormData) => {
9619
9629
  if (nextFormData === null) {
9620
9630
  setData(initialData);
@@ -9627,7 +9637,7 @@ var useFormState = (action, initialData = {}) => {
9627
9637
  const result = await action(data, nextData);
9628
9638
  setData(result);
9629
9639
  } catch (err) {
9630
- setError(err instanceof Error ? err : new Error(String(err)));
9640
+ setError(err);
9631
9641
  } finally {
9632
9642
  setIsPending(false);
9633
9643
  }
@@ -9645,15 +9655,15 @@ var useFormState = (action, initialData = {}) => {
9645
9655
  };
9646
9656
 
9647
9657
  // src/components/Form/FormErrorSummary.tsx
9648
- var import_react33 = require("react");
9658
+ var import_react34 = require("react");
9649
9659
  var import_type_guards33 = require("@wistia/type-guards");
9650
9660
  var import_jsx_runtime223 = require("react/jsx-runtime");
9651
9661
  var ErrorItem = ({ name, error, formId }) => {
9652
9662
  return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9653
9663
  };
9654
9664
  var FormErrorSummary = ({ description }) => {
9655
- const ref = (0, import_react33.useRef)(null);
9656
- const { formId, errors, hasSubmitted } = (0, import_react33.useContext)(FormContext);
9665
+ const ref = (0, import_react34.useRef)(null);
9666
+ const { formId, errors, hasSubmitted } = (0, import_react34.useContext)(FormContext);
9657
9667
  const isValid = Object.keys(errors).length === 0;
9658
9668
  if (isValid || !hasSubmitted) {
9659
9669
  return null;
@@ -9683,7 +9693,7 @@ var FormErrorSummary = ({ description }) => {
9683
9693
  };
9684
9694
 
9685
9695
  // src/components/FormField/FormField.tsx
9686
- var import_react36 = require("react");
9696
+ var import_react37 = require("react");
9687
9697
  var import_styled_components53 = __toESM(require("styled-components"));
9688
9698
  var import_type_guards34 = require("@wistia/type-guards");
9689
9699
 
@@ -9748,11 +9758,11 @@ var Label = ({
9748
9758
  Label.displayName = "Label";
9749
9759
 
9750
9760
  // src/components/FormGroup/CheckboxGroup.tsx
9751
- var import_react35 = require("react");
9761
+ var import_react36 = require("react");
9752
9762
 
9753
9763
  // src/components/FormGroup/FormGroup.tsx
9754
9764
  var import_styled_components52 = __toESM(require("styled-components"));
9755
- var import_react34 = require("react");
9765
+ var import_react35 = require("react");
9756
9766
  var import_jsx_runtime225 = require("react/jsx-runtime");
9757
9767
  var StyledFieldset = import_styled_components52.default.fieldset`
9758
9768
  border: 0;
@@ -9761,7 +9771,7 @@ var StyledLegend = import_styled_components52.default.legend`
9761
9771
  margin-bottom: var(--space-01);
9762
9772
  `;
9763
9773
  var FormGroup = ({ children, label, ...props }) => {
9764
- const ref = (0, import_react34.useRef)();
9774
+ const ref = (0, import_react35.useRef)();
9765
9775
  return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
9766
9776
  Stack,
9767
9777
  {
@@ -9786,7 +9796,7 @@ FormGroup.displayName = "FormGroup";
9786
9796
 
9787
9797
  // src/components/FormGroup/CheckboxGroup.tsx
9788
9798
  var import_jsx_runtime226 = require("react/jsx-runtime");
9789
- var CheckboxGroupContext = (0, import_react35.createContext)(null);
9799
+ var CheckboxGroupContext = (0, import_react36.createContext)(null);
9790
9800
  var CheckboxGroup = ({
9791
9801
  children,
9792
9802
  name,
@@ -9794,7 +9804,7 @@ var CheckboxGroup = ({
9794
9804
  value,
9795
9805
  ...props
9796
9806
  }) => {
9797
- const context = (0, import_react35.useMemo)(() => {
9807
+ const context = (0, import_react36.useMemo)(() => {
9798
9808
  return {
9799
9809
  name,
9800
9810
  onChange
@@ -9879,8 +9889,8 @@ var FormField = ({
9879
9889
  value,
9880
9890
  ...props
9881
9891
  }) => {
9882
- const formState = (0, import_react36.useContext)(FormContext);
9883
- const checkboxGroup = (0, import_react36.useContext)(CheckboxGroupContext);
9892
+ const formState = (0, import_react37.useContext)(FormContext);
9893
+ const checkboxGroup = (0, import_react37.useContext)(CheckboxGroupContext);
9884
9894
  const defaultValue = formState.values[name];
9885
9895
  const isIntegratedLabel = children.type === Checkbox;
9886
9896
  const computedId = id ?? `${formState.formId}-${name}`;
@@ -9918,7 +9928,7 @@ var FormField = ({
9918
9928
  "aria-invalid": (0, import_type_guards34.isNotNil)(error)
9919
9929
  };
9920
9930
  }
9921
- import_react36.Children.only(children);
9931
+ import_react37.Children.only(children);
9922
9932
  return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
9923
9933
  StyledFormField,
9924
9934
  {
@@ -9927,7 +9937,7 @@ var FormField = ({
9927
9937
  children: [
9928
9938
  !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Label, { htmlFor: computedId, children: label }),
9929
9939
  (0, import_type_guards34.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
9930
- (0, import_react36.cloneElement)(children, childProps),
9940
+ (0, import_react37.cloneElement)(children, childProps),
9931
9941
  (0, import_type_guards34.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
9932
9942
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", {}),
9933
9943
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
@@ -9945,9 +9955,9 @@ var FormField = ({
9945
9955
  FormField.displayName = "FormField";
9946
9956
 
9947
9957
  // src/components/FormGroup/RadioGroup.tsx
9948
- var import_react37 = require("react");
9958
+ var import_react38 = require("react");
9949
9959
  var import_jsx_runtime228 = require("react/jsx-runtime");
9950
- var RadioGroupContext = (0, import_react37.createContext)(null);
9960
+ var RadioGroupContext = (0, import_react38.createContext)(null);
9951
9961
  var RadioGroup = ({
9952
9962
  children,
9953
9963
  name,
@@ -9955,7 +9965,7 @@ var RadioGroup = ({
9955
9965
  value,
9956
9966
  ...props
9957
9967
  }) => {
9958
- const context = (0, import_react37.useMemo)(() => {
9968
+ const context = (0, import_react38.useMemo)(() => {
9959
9969
  return {
9960
9970
  name,
9961
9971
  onChange
@@ -9966,7 +9976,7 @@ var RadioGroup = ({
9966
9976
  RadioGroup.displayName = "RadioGroup";
9967
9977
 
9968
9978
  // src/components/IconButton/IconButton.tsx
9969
- var import_react38 = require("react");
9979
+ var import_react39 = require("react");
9970
9980
  var import_styled_components54 = __toESM(require("styled-components"));
9971
9981
  var import_jsx_runtime229 = require("react/jsx-runtime");
9972
9982
  var StyledButton2 = (0, import_styled_components54.default)(Button)`
@@ -9983,7 +9993,7 @@ var StyledButton2 = (0, import_styled_components54.default)(Button)`
9983
9993
  align-items: center;
9984
9994
  line-height: 1;
9985
9995
  `;
9986
- var IconButton = (0, import_react38.forwardRef)(
9996
+ var IconButton = (0, import_react39.forwardRef)(
9987
9997
  ({ children, label, size = "md", ...props }, ref) => {
9988
9998
  const responsiveSize = useResponsiveProp(size);
9989
9999
  return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
@@ -9994,7 +10004,7 @@ var IconButton = (0, import_react38.forwardRef)(
9994
10004
  "aria-label": label,
9995
10005
  "data-wistia-ui-icon-button": true,
9996
10006
  size: responsiveSize,
9997
- children: (0, import_react38.cloneElement)(import_react38.Children.only(children), {
10007
+ children: (0, import_react39.cloneElement)(import_react39.Children.only(children), {
9998
10008
  size: responsiveSize
9999
10009
  })
10000
10010
  }
@@ -10007,12 +10017,12 @@ IconButton.displayName = "IconButton";
10007
10017
  var import_styled_components55 = __toESM(require("styled-components"));
10008
10018
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
10009
10019
  var import_type_guards35 = require("@wistia/type-guards");
10010
- var import_react40 = require("react");
10020
+ var import_react41 = require("react");
10011
10021
 
10012
10022
  // src/components/Menu/MenuContext.tsx
10013
- var import_react39 = require("react");
10014
- var MenuContext = (0, import_react39.createContext)({ compact: false });
10015
- var useMenuContext = () => (0, import_react39.useContext)(MenuContext);
10023
+ var import_react40 = require("react");
10024
+ var MenuContext = (0, import_react40.createContext)({ compact: false });
10025
+ var useMenuContext = () => (0, import_react40.useContext)(MenuContext);
10016
10026
 
10017
10027
  // src/components/Menu/Menu.tsx
10018
10028
  var import_jsx_runtime230 = require("react/jsx-runtime");
@@ -10116,7 +10126,7 @@ var Menu = ({
10116
10126
  onInteractOutside,
10117
10127
  ...props
10118
10128
  }) => {
10119
- const contextValue = (0, import_react40.useMemo)(() => ({ compact }), [compact]);
10129
+ const contextValue = (0, import_react41.useMemo)(() => ({ compact }), [compact]);
10120
10130
  let controlProps = {
10121
10131
  ...(0, import_type_guards35.isNotNil)(onOpenChange) && (0, import_type_guards35.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
10122
10132
  };
@@ -10190,13 +10200,13 @@ var MenuLabel = ({ children, ...props }) => {
10190
10200
  MenuLabel.displayName = "MenuLabel";
10191
10201
 
10192
10202
  // src/components/Menu/SubMenu.tsx
10193
- var import_react42 = require("react");
10203
+ var import_react43 = require("react");
10194
10204
  var import_styled_components59 = __toESM(require("styled-components"));
10195
10205
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
10196
10206
  var import_type_guards37 = require("@wistia/type-guards");
10197
10207
 
10198
10208
  // src/components/Menu/MenuItemButton.tsx
10199
- var import_react41 = require("react");
10209
+ var import_react42 = require("react");
10200
10210
  var import_styled_components57 = __toESM(require("styled-components"));
10201
10211
  var import_type_guards36 = require("@wistia/type-guards");
10202
10212
  var import_jsx_runtime232 = require("react/jsx-runtime");
@@ -10273,7 +10283,7 @@ var StyledBadgeContainer = import_styled_components57.default.div`
10273
10283
  font-size: var(--wui-typography-label-4-size);
10274
10284
  color: var(--wui-color-text-secondary);
10275
10285
  `;
10276
- var MenuItemButton = (0, import_react41.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
10286
+ var MenuItemButton = (0, import_react42.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
10277
10287
  let { colorScheme, badge } = props;
10278
10288
  if (appearance === "dangerous") {
10279
10289
  if ((0, import_type_guards36.isNotUndefined)(colorScheme)) {
@@ -10369,7 +10379,7 @@ var SubMenu = ({
10369
10379
  ...props
10370
10380
  }) => {
10371
10381
  const { isSmAndUp } = useMq();
10372
- const [isExpanded, setIsExpanded] = (0, import_react42.useState)(false);
10382
+ const [isExpanded, setIsExpanded] = (0, import_react43.useState)(false);
10373
10383
  const { compact } = useMenuContext();
10374
10384
  return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
10375
10385
  /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(SubMenuTrigger, { ...props, children: [
@@ -10398,10 +10408,10 @@ var SubMenu = ({
10398
10408
  SubMenu.displayName = "SubMenu";
10399
10409
 
10400
10410
  // src/components/Menu/MenuItem.tsx
10401
- var import_react43 = require("react");
10411
+ var import_react44 = require("react");
10402
10412
  var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
10403
10413
  var import_jsx_runtime235 = require("react/jsx-runtime");
10404
- var MenuItem = (0, import_react43.forwardRef)(
10414
+ var MenuItem = (0, import_react44.forwardRef)(
10405
10415
  ({ onSelect = () => null, ...props }, ref) => {
10406
10416
  return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
10407
10417
  import_react_dropdown_menu4.DropdownMenuItem,
@@ -10553,7 +10563,7 @@ var CheckboxMenuItem = ({
10553
10563
  CheckboxMenuItem.displayName = "CheckboxMenuItem";
10554
10564
 
10555
10565
  // src/components/Modal/Modal.tsx
10556
- var import_react47 = require("react");
10566
+ var import_react48 = require("react");
10557
10567
  var import_styled_components64 = __toESM(require("styled-components"));
10558
10568
  var import_react_dialog4 = require("@radix-ui/react-dialog");
10559
10569
  var import_type_guards40 = require("@wistia/type-guards");
@@ -10613,19 +10623,19 @@ var ModalHeader = ({
10613
10623
  };
10614
10624
 
10615
10625
  // src/components/Modal/ModalContent.tsx
10616
- var import_react45 = require("react");
10626
+ var import_react46 = require("react");
10617
10627
  var import_styled_components62 = __toESM(require("styled-components"));
10618
10628
  var import_react_dialog3 = require("@radix-ui/react-dialog");
10619
10629
 
10620
10630
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
10621
- var import_react44 = require("react");
10631
+ var import_react45 = require("react");
10622
10632
  var import_type_guards39 = require("@wistia/type-guards");
10623
10633
  var useFocusRestore = () => {
10624
- const previouslyFocusedRef = (0, import_react44.useRef)(null);
10625
- (0, import_react44.useEffect)(() => {
10634
+ const previouslyFocusedRef = (0, import_react45.useRef)(null);
10635
+ (0, import_react45.useEffect)(() => {
10626
10636
  previouslyFocusedRef.current = document.activeElement;
10627
10637
  }, []);
10628
- (0, import_react44.useEffect)(() => {
10638
+ (0, import_react45.useEffect)(() => {
10629
10639
  return () => {
10630
10640
  if ((0, import_type_guards39.isNotNil)(previouslyFocusedRef.current)) {
10631
10641
  setTimeout(() => {
@@ -10679,7 +10689,7 @@ var StyledModalContent = (0, import_styled_components62.default)(import_react_di
10679
10689
  }
10680
10690
  }
10681
10691
  `;
10682
- var ModalContent = (0, import_react45.forwardRef)(
10692
+ var ModalContent = (0, import_react46.forwardRef)(
10683
10693
  ({ fullHeight, width, children, ...props }, ref) => {
10684
10694
  useFocusRestore();
10685
10695
  return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
@@ -10697,7 +10707,7 @@ var ModalContent = (0, import_react45.forwardRef)(
10697
10707
  );
10698
10708
 
10699
10709
  // src/private/components/Backdrop/Backdrop.tsx
10700
- var import_react46 = require("react");
10710
+ var import_react47 = require("react");
10701
10711
  var import_styled_components63 = __toESM(require("styled-components"));
10702
10712
  var import_jsx_runtime242 = require("react/jsx-runtime");
10703
10713
  var backdropAnimationDuration = 150;
@@ -10735,7 +10745,7 @@ var BackdropComponent = import_styled_components63.default.div`
10735
10745
  }
10736
10746
  }
10737
10747
  `;
10738
- var Backdrop = (0, import_react46.forwardRef)(
10748
+ var Backdrop = (0, import_react47.forwardRef)(
10739
10749
  ({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
10740
10750
  BackdropComponent,
10741
10751
  {
@@ -10757,7 +10767,7 @@ var ModalBody = import_styled_components64.default.div`
10757
10767
  display: flex;
10758
10768
  order: 2;
10759
10769
  `;
10760
- var Modal = (0, import_react47.forwardRef)(
10770
+ var Modal = (0, import_react48.forwardRef)(
10761
10771
  ({
10762
10772
  children,
10763
10773
  fullHeight = false,
@@ -10971,7 +10981,7 @@ var ProgressBar = ({
10971
10981
  ProgressBar.displayName = "ProgressBar";
10972
10982
 
10973
10983
  // src/components/Radio/Radio.tsx
10974
- var import_react48 = require("react");
10984
+ var import_react49 = require("react");
10975
10985
  var import_styled_components67 = __toESM(require("styled-components"));
10976
10986
  var import_type_guards43 = require("@wistia/type-guards");
10977
10987
  var import_jsx_runtime246 = require("react/jsx-runtime");
@@ -11074,7 +11084,7 @@ var StyledHiddenRadioInput = import_styled_components67.default.input`
11074
11084
  display: block;
11075
11085
  }
11076
11086
  `;
11077
- var Radio = (0, import_react48.forwardRef)(
11087
+ var Radio = (0, import_react49.forwardRef)(
11078
11088
  ({
11079
11089
  checked,
11080
11090
  disabled = false,
@@ -11089,7 +11099,7 @@ var Radio = (0, import_react48.forwardRef)(
11089
11099
  hideLabel = false,
11090
11100
  ...props
11091
11101
  }, ref) => {
11092
- const generatedId = (0, import_react48.useId)();
11102
+ const generatedId = (0, import_react49.useId)();
11093
11103
  const computedId = (0, import_type_guards43.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
11094
11104
  return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
11095
11105
  StyledRadioWrapper,
@@ -11139,20 +11149,20 @@ var Radio = (0, import_react48.forwardRef)(
11139
11149
  Radio.displayName = "Radio";
11140
11150
 
11141
11151
  // src/components/SegmentedControl/SegmentedControl.tsx
11142
- var import_react51 = require("react");
11152
+ var import_react52 = require("react");
11143
11153
  var import_styled_components69 = __toESM(require("styled-components"));
11144
11154
  var import_react_toggle_group = require("@radix-ui/react-toggle-group");
11145
11155
  var import_type_guards44 = require("@wistia/type-guards");
11146
11156
 
11147
11157
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
11148
- var import_react49 = require("react");
11158
+ var import_react50 = require("react");
11149
11159
  var import_jsx_runtime247 = require("react/jsx-runtime");
11150
- var SelectedItemStyleContext = (0, import_react49.createContext)(null);
11160
+ var SelectedItemStyleContext = (0, import_react50.createContext)(null);
11151
11161
  var SelectedItemStyleProvider = ({
11152
11162
  children
11153
11163
  }) => {
11154
- const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react49.useState)(null);
11155
- const selectedItemIndicatorStyle = (0, import_react49.useMemo)(
11164
+ const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react50.useState)(null);
11165
+ const selectedItemIndicatorStyle = (0, import_react50.useMemo)(
11156
11166
  () => selectedItemMeasurements != null ? {
11157
11167
  height: `${selectedItemMeasurements.offsetHeight}px`,
11158
11168
  transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
@@ -11162,7 +11172,7 @@ var SelectedItemStyleProvider = ({
11162
11172
  },
11163
11173
  [selectedItemMeasurements]
11164
11174
  );
11165
- const contextValue = (0, import_react49.useMemo)(
11175
+ const contextValue = (0, import_react50.useMemo)(
11166
11176
  () => ({
11167
11177
  setSelectedItemMeasurements,
11168
11178
  selectedItemIndicatorStyle
@@ -11172,7 +11182,7 @@ var SelectedItemStyleProvider = ({
11172
11182
  return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
11173
11183
  };
11174
11184
  var useSelectedItemStyle = () => {
11175
- const context = (0, import_react49.useContext)(SelectedItemStyleContext);
11185
+ const context = (0, import_react50.useContext)(SelectedItemStyleContext);
11176
11186
  if (context === null) {
11177
11187
  throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
11178
11188
  }
@@ -11183,11 +11193,11 @@ var useSelectedItemStyle = () => {
11183
11193
  var import_styled_components68 = __toESM(require("styled-components"));
11184
11194
 
11185
11195
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
11186
- var import_react50 = require("react");
11187
- var SegmentedControlValueContext = (0, import_react50.createContext)(null);
11196
+ var import_react51 = require("react");
11197
+ var SegmentedControlValueContext = (0, import_react51.createContext)(null);
11188
11198
  var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
11189
11199
  var useSegmentedControlValue = () => {
11190
- const context = (0, import_react50.useContext)(SegmentedControlValueContext);
11200
+ const context = (0, import_react51.useContext)(SegmentedControlValueContext);
11191
11201
  if (context === null) {
11192
11202
  throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
11193
11203
  }
@@ -11233,7 +11243,7 @@ var segmentedControlStyles = import_styled_components69.css`
11233
11243
  var StyledSegmentedControl = (0, import_styled_components69.default)(import_react_toggle_group.Root)`
11234
11244
  ${segmentedControlStyles}
11235
11245
  `;
11236
- var SegmentedControl = (0, import_react51.forwardRef)(
11246
+ var SegmentedControl = (0, import_react52.forwardRef)(
11237
11247
  ({
11238
11248
  children,
11239
11249
  disabled = false,
@@ -11268,7 +11278,7 @@ var SegmentedControl = (0, import_react51.forwardRef)(
11268
11278
  SegmentedControl.displayName = "SegmentedControl";
11269
11279
 
11270
11280
  // src/components/SegmentedControl/SegmentedControlItem.tsx
11271
- var import_react52 = require("react");
11281
+ var import_react53 = require("react");
11272
11282
  var import_styled_components70 = __toESM(require("styled-components"));
11273
11283
  var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
11274
11284
  var import_type_guards45 = require("@wistia/type-guards");
@@ -11336,11 +11346,11 @@ var segmentedControlItemStyles = import_styled_components70.css`
11336
11346
  var StyledSegmentedControlItem = (0, import_styled_components70.default)(import_react_toggle_group2.Item)`
11337
11347
  ${segmentedControlItemStyles}
11338
11348
  `;
11339
- var SegmentedControlItem = (0, import_react52.forwardRef)(
11349
+ var SegmentedControlItem = (0, import_react53.forwardRef)(
11340
11350
  ({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11341
11351
  const selectedValue = useSegmentedControlValue();
11342
11352
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11343
- const buttonRef = (0, import_react52.useRef)(null);
11353
+ const buttonRef = (0, import_react53.useRef)(null);
11344
11354
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11345
11355
  const handleClick = (event) => {
11346
11356
  const target = event.target;
@@ -11349,7 +11359,7 @@ var SegmentedControlItem = (0, import_react52.forwardRef)(
11349
11359
  event.preventDefault();
11350
11360
  }
11351
11361
  };
11352
- (0, import_react52.useEffect)(() => {
11362
+ (0, import_react53.useEffect)(() => {
11353
11363
  const buttonElem = buttonRef.current;
11354
11364
  if (!buttonElem) {
11355
11365
  return void 0;
@@ -11395,7 +11405,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
11395
11405
 
11396
11406
  // src/components/Select/Select.tsx
11397
11407
  var import_react_select = require("@radix-ui/react-select");
11398
- var import_react53 = require("react");
11408
+ var import_react54 = require("react");
11399
11409
  var import_styled_components71 = __toESM(require("styled-components"));
11400
11410
  var import_jsx_runtime251 = require("react/jsx-runtime");
11401
11411
  var StyledTrigger = (0, import_styled_components71.default)(import_react_select.Trigger)`
@@ -11460,7 +11470,7 @@ var StyledContent3 = (0, import_styled_components71.default)(import_react_select
11460
11470
  max-height: var(--radix-select-content-available-height);
11461
11471
  z-index: var(--wui-zindex-select);
11462
11472
  `;
11463
- var Select = (0, import_react53.forwardRef)(
11473
+ var Select = (0, import_react54.forwardRef)(
11464
11474
  ({
11465
11475
  colorScheme = "inherit",
11466
11476
  children,
@@ -11509,7 +11519,7 @@ Select.displayName = "Select";
11509
11519
 
11510
11520
  // src/components/Select/SelectOption.tsx
11511
11521
  var import_react_select2 = require("@radix-ui/react-select");
11512
- var import_react54 = require("react");
11522
+ var import_react55 = require("react");
11513
11523
  var import_styled_components72 = __toESM(require("styled-components"));
11514
11524
  var import_type_guards46 = require("@wistia/type-guards");
11515
11525
  var import_jsx_runtime252 = require("react/jsx-runtime");
@@ -11540,7 +11550,7 @@ var StyledItem = (0, import_styled_components72.default)(import_react_select2.It
11540
11550
  var StyledIconContainer = import_styled_components72.default.span`
11541
11551
  width: 12px;
11542
11552
  `;
11543
- var SelectOption = (0, import_react54.forwardRef)(
11553
+ var SelectOption = (0, import_react55.forwardRef)(
11544
11554
  ({ children, selectedDisplayValue, ...props }, forwardedRef) => {
11545
11555
  return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
11546
11556
  StyledItem,
@@ -11588,7 +11598,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
11588
11598
  };
11589
11599
 
11590
11600
  // src/components/Switch/Switch.tsx
11591
- var import_react55 = require("react");
11601
+ var import_react56 = require("react");
11592
11602
  var import_styled_components74 = __toESM(require("styled-components"));
11593
11603
  var import_type_guards47 = require("@wistia/type-guards");
11594
11604
  var import_jsx_runtime254 = require("react/jsx-runtime");
@@ -11693,7 +11703,7 @@ var StyledHiddenSwitchInput = import_styled_components74.default.input`
11693
11703
  }
11694
11704
  }
11695
11705
  `;
11696
- var Switch = (0, import_react55.forwardRef)(
11706
+ var Switch = (0, import_react56.forwardRef)(
11697
11707
  ({
11698
11708
  checked,
11699
11709
  disabled = false,
@@ -11708,7 +11718,7 @@ var Switch = (0, import_react55.forwardRef)(
11708
11718
  hideLabel = false,
11709
11719
  ...props
11710
11720
  }, ref) => {
11711
- const generatedId = (0, import_react55.useId)();
11721
+ const generatedId = (0, import_react56.useId)();
11712
11722
  const computedId = (0, import_type_guards47.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11713
11723
  return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
11714
11724
  /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
@@ -11790,8 +11800,8 @@ var Table = ({
11790
11800
  var import_styled_components76 = __toESM(require("styled-components"));
11791
11801
 
11792
11802
  // src/components/Table/TableSectionContext.ts
11793
- var import_react56 = require("react");
11794
- var TableSectionContext = (0, import_react56.createContext)(null);
11803
+ var import_react57 = require("react");
11804
+ var TableSectionContext = (0, import_react57.createContext)(null);
11795
11805
 
11796
11806
  // src/components/Table/TableBody.tsx
11797
11807
  var import_jsx_runtime256 = require("react/jsx-runtime");
@@ -11801,7 +11811,7 @@ var TableBody = ({ children, ...props }) => {
11801
11811
  };
11802
11812
 
11803
11813
  // src/components/Table/TableCell.tsx
11804
- var import_react57 = require("react");
11814
+ var import_react58 = require("react");
11805
11815
  var import_styled_components77 = __toESM(require("styled-components"));
11806
11816
  var import_jsx_runtime257 = require("react/jsx-runtime");
11807
11817
  var sharedStyles = import_styled_components77.css`
@@ -11822,7 +11832,7 @@ var StyledTd = import_styled_components77.default.td`
11822
11832
  line-height: var(--wui-typography-body-2-line-height);
11823
11833
  `;
11824
11834
  var TableCell = ({ children, ...props }) => {
11825
- const section = (0, import_react57.useContext)(TableSectionContext);
11835
+ const section = (0, import_react58.useContext)(TableSectionContext);
11826
11836
  if (section === "head") {
11827
11837
  return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTh, { ...props, children });
11828
11838
  }
@@ -11854,7 +11864,7 @@ var TableRow = ({ children, ...props }) => {
11854
11864
  };
11855
11865
 
11856
11866
  // src/components/Tabs/Tabs.tsx
11857
- var import_react61 = require("react");
11867
+ var import_react62 = require("react");
11858
11868
  var import_react_tabs4 = require("@radix-ui/react-tabs");
11859
11869
  var import_type_guards49 = require("@wistia/type-guards");
11860
11870
  var import_styled_components85 = __toESM(require("styled-components"));
@@ -11909,17 +11919,17 @@ var TabList = ({
11909
11919
  TabList.displayName = "TabList";
11910
11920
 
11911
11921
  // src/components/Tabs/TabItem.tsx
11912
- var import_react59 = require("react");
11922
+ var import_react60 = require("react");
11913
11923
  var import_styled_components83 = __toESM(require("styled-components"));
11914
11924
  var import_react_tabs3 = require("@radix-ui/react-tabs");
11915
11925
  var import_type_guards48 = require("@wistia/type-guards");
11916
11926
 
11917
11927
  // src/components/Tabs/useTabsValue.tsx
11918
- var import_react58 = require("react");
11919
- var TabsValueContext = (0, import_react58.createContext)(null);
11928
+ var import_react59 = require("react");
11929
+ var TabsValueContext = (0, import_react59.createContext)(null);
11920
11930
  var TabsValueProvider = TabsValueContext.Provider;
11921
11931
  var useTabsValue = () => {
11922
- const context = (0, import_react58.useContext)(TabsValueContext);
11932
+ const context = (0, import_react59.useContext)(TabsValueContext);
11923
11933
  if (context === null) {
11924
11934
  throw new Error("useTabsValue must be used within a TabsValueProvider");
11925
11935
  }
@@ -11935,13 +11945,13 @@ var StyledTabItem = (0, import_styled_components83.default)(import_react_tabs3.T
11935
11945
  outline: none;
11936
11946
  }
11937
11947
  `;
11938
- var TabItem = (0, import_react59.forwardRef)(
11948
+ var TabItem = (0, import_react60.forwardRef)(
11939
11949
  ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11940
11950
  const selectedValue = useTabsValue();
11941
11951
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11942
- const buttonRef = (0, import_react59.useRef)(null);
11952
+ const buttonRef = (0, import_react60.useRef)(null);
11943
11953
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11944
- (0, import_react59.useEffect)(() => {
11954
+ (0, import_react60.useEffect)(() => {
11945
11955
  const buttonElem = buttonRef.current;
11946
11956
  if (!buttonElem) {
11947
11957
  return void 0;
@@ -11985,16 +11995,16 @@ var TabItem = (0, import_react59.forwardRef)(
11985
11995
  TabItem.displayName = "TabItem";
11986
11996
 
11987
11997
  // src/components/Tabs/extractTabItems.ts
11988
- var import_react60 = require("react");
11998
+ var import_react61 = require("react");
11989
11999
  var extractTabItems = (children) => {
11990
12000
  const tabItems = [];
11991
- import_react60.Children.forEach(children, (child) => {
11992
- if (!(0, import_react60.isValidElement)(child)) {
12001
+ import_react61.Children.forEach(children, (child) => {
12002
+ if (!(0, import_react61.isValidElement)(child)) {
11993
12003
  return;
11994
12004
  }
11995
12005
  if (typeof child.type !== "string" && child.type.displayName === "Tab") {
11996
12006
  tabItems.push(child);
11997
- } else if (child.type === import_react60.Fragment) {
12007
+ } else if (child.type === import_react61.Fragment) {
11998
12008
  const fragmentElement = child;
11999
12009
  tabItems.push(...extractTabItems(fragmentElement.props.children));
12000
12010
  } else if ((child.props.children ?? null) != null) {
@@ -12041,7 +12051,7 @@ var StyledTabsRoot = (0, import_styled_components85.default)(import_react_tabs4.
12041
12051
  flex-direction: column;
12042
12052
  height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
12043
12053
  `;
12044
- var Tabs = (0, import_react61.forwardRef)(
12054
+ var Tabs = (0, import_react62.forwardRef)(
12045
12055
  ({
12046
12056
  children,
12047
12057
  fullWidth = true,
@@ -12053,7 +12063,7 @@ var Tabs = (0, import_react61.forwardRef)(
12053
12063
  ...props
12054
12064
  }, ref) => {
12055
12065
  const tabItems = extractTabItems(children);
12056
- const [internalSelectedValue, setInternalSelectedValue] = (0, import_react61.useState)(defaultSelectedValue);
12066
+ const [internalSelectedValue, setInternalSelectedValue] = (0, import_react62.useState)(defaultSelectedValue);
12057
12067
  const modeProps = defaultSelectedValue !== void 0 ? {
12058
12068
  defaultValue: defaultSelectedValue,
12059
12069
  onValueChange: setInternalSelectedValue
@@ -12139,15 +12149,15 @@ var Tabs = (0, import_react61.forwardRef)(
12139
12149
  Tabs.displayName = "Tabs";
12140
12150
 
12141
12151
  // src/components/Tabs/Tab.tsx
12142
- var import_react62 = require("react");
12152
+ var import_react63 = require("react");
12143
12153
  var import_jsx_runtime266 = require("react/jsx-runtime");
12144
- var Tab = (0, import_react62.forwardRef)(({ children }, ref) => {
12154
+ var Tab = (0, import_react63.forwardRef)(({ children }, ref) => {
12145
12155
  return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", { ref, children });
12146
12156
  });
12147
12157
  Tab.displayName = "Tab";
12148
12158
 
12149
12159
  // src/components/Tag/Tag.tsx
12150
- var import_react63 = require("react");
12160
+ var import_react64 = require("react");
12151
12161
  var import_styled_components86 = __toESM(require("styled-components"));
12152
12162
  var import_type_guards50 = require("@wistia/type-guards");
12153
12163
  var import_jsx_runtime267 = require("react/jsx-runtime");
@@ -12264,7 +12274,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12264
12274
  )
12265
12275
  ] });
12266
12276
  };
12267
- var Tag = (0, import_react63.forwardRef)(
12277
+ var Tag = (0, import_react64.forwardRef)(
12268
12278
  ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
12269
12279
  const hasIcon = (0, import_type_guards50.isNotNil)(icon);
12270
12280
  const labelProps = (0, import_type_guards50.isNotNil)(href) && (0, import_type_guards50.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
@@ -12463,7 +12473,7 @@ var ThumbnailBadge = ({ icon, label, ...props }) => {
12463
12473
  ThumbnailBadge.displayName = "ThumbnailBadge";
12464
12474
 
12465
12475
  // src/components/Thumbnail/Thumbnail.tsx
12466
- var import_react64 = require("react");
12476
+ var import_react65 = require("react");
12467
12477
  var import_styled_components90 = __toESM(require("styled-components"));
12468
12478
  var import_type_guards54 = require("@wistia/type-guards");
12469
12479
 
@@ -12648,7 +12658,7 @@ var StyledThumbnail = import_styled_components90.default.div`
12648
12658
  border-radius: calc(8% * (9 / 16)) / 8%;
12649
12659
  }
12650
12660
  `;
12651
- var Thumbnail = (0, import_react64.forwardRef)(
12661
+ var Thumbnail = (0, import_react65.forwardRef)(
12652
12662
  ({
12653
12663
  gradientBackground = "defaultMidOne",
12654
12664
  thumbnailImageType = "square",
@@ -12684,7 +12694,7 @@ Thumbnail.displayName = "Thumbnail";
12684
12694
 
12685
12695
  // src/components/InputClickToCopy/InputClickToCopy.tsx
12686
12696
  var import_styled_components91 = __toESM(require("styled-components"));
12687
- var import_react65 = require("react");
12697
+ var import_react66 = require("react");
12688
12698
  var import_type_guards55 = require("@wistia/type-guards");
12689
12699
  var import_jsx_runtime271 = require("react/jsx-runtime");
12690
12700
  var StyledInput2 = (0, import_styled_components91.default)(Input)`
@@ -12697,10 +12707,10 @@ var StyledInput2 = (0, import_styled_components91.default)(Input)`
12697
12707
  }
12698
12708
  `;
12699
12709
  var COPY_SUCCESS_DURATION = 2e3;
12700
- var InputClickToCopy = (0, import_react65.forwardRef)(
12710
+ var InputClickToCopy = (0, import_react66.forwardRef)(
12701
12711
  ({ value, onCopy, ...props }, ref) => {
12702
- const [isCopied, setIsCopied] = (0, import_react65.useState)(false);
12703
- (0, import_react65.useEffect)(() => {
12712
+ const [isCopied, setIsCopied] = (0, import_react66.useState)(false);
12713
+ (0, import_react66.useEffect)(() => {
12704
12714
  if (isCopied) {
12705
12715
  const timeout = setTimeout(() => {
12706
12716
  setIsCopied(false);