@wistia/ui 0.8.9-beta.c65c9abf.a0225aa → 0.8.10

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.9-beta.c65c9abf.a0225aa
3
+ * @license @wistia/ui v0.8.10
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -142,6 +142,7 @@ module.exports = __toCommonJS(index_exports);
142
142
 
143
143
  // src/providers/UIProvider/UIProvider.tsx
144
144
  var import_react_tooltip = require("@radix-ui/react-tooltip");
145
+ var import_react3 = require("react");
145
146
 
146
147
  // src/css/GlobalStyle.tsx
147
148
  var import_styled_components12 = require("styled-components");
@@ -1600,12 +1601,17 @@ var ToastProvider = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_so
1600
1601
 
1601
1602
  // src/providers/UIProvider/UIProvider.tsx
1602
1603
  var import_jsx_runtime3 = require("react/jsx-runtime");
1604
+ var UIProviderNestingContext = (0, import_react3.createContext)(false);
1603
1605
  var UIProvider = ({ children }) => {
1604
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AriaLiveProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_tooltip.Provider, { children: [
1606
+ const isNested = (0, import_react3.useContext)(UIProviderNestingContext);
1607
+ if (isNested) {
1608
+ console.warn("UIProvider is nested. Only one instance of UIProvider.");
1609
+ }
1610
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UIProviderNestingContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AriaLiveProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_tooltip.Provider, { children: [
1605
1611
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(GlobalStyle, {}),
1606
1612
  children,
1607
1613
  process.env["NODE_ENV"] !== "test" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastProvider, {})
1608
- ] }) });
1614
+ ] }) }) });
1609
1615
  };
1610
1616
 
1611
1617
  // src/helpers/copyToClipboard/copyToClipboard.ts
@@ -2073,10 +2079,10 @@ var mq = {
2073
2079
  };
2074
2080
 
2075
2081
  // src/hooks/useAriaLive/useAriaLive.tsx
2076
- var import_react3 = require("react");
2082
+ var import_react4 = require("react");
2077
2083
  var import_type_guards6 = require("@wistia/type-guards");
2078
2084
  var useAriaLive = () => {
2079
- const context = (0, import_react3.useContext)(AriaLiveContext);
2085
+ const context = (0, import_react4.useContext)(AriaLiveContext);
2080
2086
  if ((0, import_type_guards6.isNil)(context)) {
2081
2087
  throw new Error("useAriaLive must be used within an AriaLiveProvider");
2082
2088
  }
@@ -2084,12 +2090,12 @@ var useAriaLive = () => {
2084
2090
  };
2085
2091
 
2086
2092
  // src/hooks/useBoolean/useBoolean.ts
2087
- var import_react4 = require("react");
2093
+ var import_react5 = require("react");
2088
2094
  var useBoolean = (initialValue = false) => {
2089
- const [value, setValue] = (0, import_react4.useState)(initialValue);
2090
- const toggle = (0, import_react4.useCallback)(() => setValue((val) => !val), []);
2091
- const setTrue = (0, import_react4.useCallback)(() => setValue(true), []);
2092
- const setFalse = (0, import_react4.useCallback)(() => setValue(false), []);
2095
+ const [value, setValue] = (0, import_react5.useState)(initialValue);
2096
+ const toggle = (0, import_react5.useCallback)(() => setValue((val) => !val), []);
2097
+ const setTrue = (0, import_react5.useCallback)(() => setValue(true), []);
2098
+ const setFalse = (0, import_react5.useCallback)(() => setValue(false), []);
2093
2099
  return [value, toggle, setTrue, setFalse, setValue];
2094
2100
  };
2095
2101
 
@@ -2098,10 +2104,10 @@ var import_use_file_picker = require("use-file-picker");
2098
2104
  var import_validators = require("use-file-picker/validators");
2099
2105
 
2100
2106
  // src/hooks/useKey/useKey.ts
2101
- var import_react6 = require("react");
2107
+ var import_react7 = require("react");
2102
2108
 
2103
2109
  // src/private/hooks/useEvent/useEvent.ts
2104
- var import_react5 = require("react");
2110
+ var import_react6 = require("react");
2105
2111
 
2106
2112
  // src/private/helpers/isValidRef/isValidRef.ts
2107
2113
  var import_type_guards7 = require("@wistia/type-guards");
@@ -2120,15 +2126,15 @@ var isEventTargetSupported = (eventTarget) => (
2120
2126
  !!(typeof eventTarget === "object" && eventTarget?.addEventListener)
2121
2127
  );
2122
2128
  var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
2123
- const savedEventHandler = (0, import_react5.useRef)();
2124
- const savedEventOptions = (0, import_react5.useRef)();
2125
- (0, import_react5.useEffect)(() => {
2129
+ const savedEventHandler = (0, import_react6.useRef)();
2130
+ const savedEventOptions = (0, import_react6.useRef)();
2131
+ (0, import_react6.useEffect)(() => {
2126
2132
  savedEventHandler.current = eventHandler;
2127
2133
  }, [eventHandler]);
2128
- (0, import_react5.useEffect)(() => {
2134
+ (0, import_react6.useEffect)(() => {
2129
2135
  savedEventOptions.current = eventOptions;
2130
2136
  }, [eventOptions]);
2131
- (0, import_react5.useEffect)(() => {
2137
+ (0, import_react6.useEffect)(() => {
2132
2138
  const target = isValidRef(eventTarget) ? eventTarget.current : eventTarget;
2133
2139
  if (!eventName || !isEventTargetSupported(target)) {
2134
2140
  return;
@@ -2148,7 +2154,7 @@ var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}
2148
2154
 
2149
2155
  // src/hooks/useKey/useKey.ts
2150
2156
  var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOptions } = {}) => {
2151
- const memoizedEventHandler = (0, import_react6.useCallback)(
2157
+ const memoizedEventHandler = (0, import_react7.useCallback)(
2152
2158
  (handlerEvent) => {
2153
2159
  if (["INPUT", "TEXTAREA", "SELECT"].includes(document.activeElement?.nodeName ?? "") || document.activeElement?.isContentEditable) {
2154
2160
  return;
@@ -2173,9 +2179,9 @@ var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOpti
2173
2179
  };
2174
2180
 
2175
2181
  // src/hooks/useLocalStorage/useLocalStorage.ts
2176
- var import_react7 = require("react");
2182
+ var import_react8 = require("react");
2177
2183
  var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
2178
- const [storedValue, setStoredValue] = (0, import_react7.useState)(() => {
2184
+ const [storedValue, setStoredValue] = (0, import_react8.useState)(() => {
2179
2185
  try {
2180
2186
  const item = storage.getItem(key);
2181
2187
  return item !== null && !!item ? JSON.parse(item) : initialValue;
@@ -2201,9 +2207,9 @@ var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
2201
2207
  };
2202
2208
 
2203
2209
  // src/hooks/useLockBodyScroll/useLockBodyScroll.ts
2204
- var import_react8 = require("react");
2210
+ var import_react9 = require("react");
2205
2211
  var useLockBodyScroll = (locked) => {
2206
- (0, import_react8.useLayoutEffect)(() => {
2212
+ (0, import_react9.useLayoutEffect)(() => {
2207
2213
  if (locked) {
2208
2214
  const originalStyle = window.getComputedStyle(document.body).overflow;
2209
2215
  document.body.style.overflow = "hidden";
@@ -2216,9 +2222,9 @@ var useLockBodyScroll = (locked) => {
2216
2222
  };
2217
2223
 
2218
2224
  // src/hooks/useOnClickOutside/useOnClickOutside.ts
2219
- var import_react9 = require("react");
2225
+ var import_react10 = require("react");
2220
2226
  var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) => {
2221
- (0, import_react9.useEffect)(() => {
2227
+ (0, import_react10.useEffect)(() => {
2222
2228
  const listener = (event) => {
2223
2229
  if (!ref.current || ref.current.contains(event.target)) {
2224
2230
  return;
@@ -2248,7 +2254,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
2248
2254
  var import_type_guards8 = require("@wistia/type-guards");
2249
2255
 
2250
2256
  // src/hooks/useWindowSize/useWindowSize.ts
2251
- var import_react10 = require("react");
2257
+ var import_react11 = require("react");
2252
2258
  var import_throttle_debounce = require("throttle-debounce");
2253
2259
 
2254
2260
  // src/private/helpers/isClient/isClient.ts
@@ -2256,11 +2262,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
2256
2262
 
2257
2263
  // src/hooks/useWindowSize/useWindowSize.ts
2258
2264
  var useWindowSize = (interval = 0) => {
2259
- const [dimensions, setDimensions] = (0, import_react10.useState)({
2265
+ const [dimensions, setDimensions] = (0, import_react11.useState)({
2260
2266
  width: isClient() ? window.innerWidth : 0,
2261
2267
  height: isClient() ? window.innerHeight : 0
2262
2268
  });
2263
- (0, import_react10.useLayoutEffect)(() => {
2269
+ (0, import_react11.useLayoutEffect)(() => {
2264
2270
  const handleResize = (0, import_throttle_debounce.debounce)(
2265
2271
  interval,
2266
2272
  () => setDimensions({
@@ -2312,11 +2318,11 @@ var useActiveMq = () => {
2312
2318
  };
2313
2319
 
2314
2320
  // src/hooks/useToast/useToast.tsx
2315
- var import_react12 = require("react");
2321
+ var import_react13 = require("react");
2316
2322
  var import_sonner2 = require("sonner");
2317
2323
 
2318
2324
  // src/private/components/Toast/Toast.tsx
2319
- var import_react11 = require("react");
2325
+ var import_react12 = require("react");
2320
2326
  var import_styled_components16 = __toESM(require("styled-components"));
2321
2327
  var import_type_guards10 = require("@wistia/type-guards");
2322
2328
 
@@ -2554,8 +2560,8 @@ var StyledToast = import_styled_components16.default.div`
2554
2560
  }
2555
2561
  `;
2556
2562
  var Action = ({ actionButton }) => {
2557
- if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react11.isValidElement)(actionButton)) {
2558
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react11.cloneElement)(actionButton, {
2563
+ if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react12.isValidElement)(actionButton)) {
2564
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react12.cloneElement)(actionButton, {
2559
2565
  variant: "soft",
2560
2566
  // force Button variant
2561
2567
  size: "sm"
@@ -2591,7 +2597,7 @@ Toast.displayName = "Toast";
2591
2597
  // src/hooks/useToast/useToast.tsx
2592
2598
  var import_jsx_runtime6 = require("react/jsx-runtime");
2593
2599
  var useToast = () => {
2594
- return (0, import_react12.useCallback)(
2600
+ return (0, import_react13.useCallback)(
2595
2601
  ({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
2596
2602
  import_sonner2.toast.custom(
2597
2603
  () => {
@@ -2613,7 +2619,7 @@ var useToast = () => {
2613
2619
  };
2614
2620
 
2615
2621
  // src/hooks/useFocusTrap/useFocusTrap.ts
2616
- var import_react13 = require("react");
2622
+ var import_react14 = require("react");
2617
2623
  var import_type_guards11 = require("@wistia/type-guards");
2618
2624
 
2619
2625
  // src/hooks/useFocusTrap/helpers.ts
@@ -2763,9 +2769,9 @@ var isRef = (val) => {
2763
2769
  return val !== null && typeof val === "object" && "current" in val;
2764
2770
  };
2765
2771
  var useFocusTrap = (active = true, options = {}) => {
2766
- const ref = (0, import_react13.useRef)(null);
2767
- const restoreAriaRef = (0, import_react13.useRef)(null);
2768
- const setRef = (0, import_react13.useCallback)(
2772
+ const ref = (0, import_react14.useRef)(null);
2773
+ const restoreAriaRef = (0, import_react14.useRef)(null);
2774
+ const setRef = (0, import_react14.useCallback)(
2769
2775
  (node) => {
2770
2776
  if (restoreAriaRef.current !== null) {
2771
2777
  restoreAriaRef.current();
@@ -2827,7 +2833,7 @@ var useFocusTrap = (active = true, options = {}) => {
2827
2833
  },
2828
2834
  [active, options.focusSelector, options.disableAriaHider]
2829
2835
  );
2830
- (0, import_react13.useEffect)(() => {
2836
+ (0, import_react14.useEffect)(() => {
2831
2837
  if (!active) {
2832
2838
  return void 0;
2833
2839
  }
@@ -2845,11 +2851,11 @@ var useFocusTrap = (active = true, options = {}) => {
2845
2851
  };
2846
2852
 
2847
2853
  // src/components/ActionButton/ActionButton.tsx
2848
- var import_react17 = require("react");
2854
+ var import_react18 = require("react");
2849
2855
  var import_styled_components22 = __toESM(require("styled-components"));
2850
2856
 
2851
2857
  // src/components/Button/Button.tsx
2852
- var import_react16 = require("react");
2858
+ var import_react17 = require("react");
2853
2859
  var import_styled_components21 = __toESM(require("styled-components"));
2854
2860
  var import_type_guards15 = require("@wistia/type-guards");
2855
2861
 
@@ -6911,13 +6917,13 @@ var iconMap = {
6911
6917
 
6912
6918
  // src/private/hooks/useResponsiveProp/useResponsiveProp.ts
6913
6919
  var import_type_guards12 = require("@wistia/type-guards");
6914
- var import_react14 = require("react");
6920
+ var import_react15 = require("react");
6915
6921
  var isResponsiveObject = (values) => {
6916
6922
  return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
6917
6923
  };
6918
6924
  var useResponsiveProp = (values) => {
6919
6925
  const activeMediaQueries = useActiveMq();
6920
- return (0, import_react14.useMemo)(() => {
6926
+ return (0, import_react15.useMemo)(() => {
6921
6927
  if ((0, import_type_guards12.isRecord)(values) && isResponsiveObject(values)) {
6922
6928
  const mq2 = activeMediaQueries.find((key) => key in values);
6923
6929
  return (0, import_type_guards12.isNotUndefined)(mq2) && (0, import_type_guards12.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
@@ -6984,7 +6990,7 @@ var Icon = ({
6984
6990
  Icon.displayName = "Icon";
6985
6991
 
6986
6992
  // src/components/Link/Link.tsx
6987
- var import_react15 = require("react");
6993
+ var import_react16 = require("react");
6988
6994
  var import_styled_components20 = __toESM(require("styled-components"));
6989
6995
  var import_react_router_dom = require("react-router-dom");
6990
6996
  var import_type_guards14 = require("@wistia/type-guards");
@@ -7022,7 +7028,7 @@ var StyledLink = import_styled_components20.default.a`
7022
7028
  }
7023
7029
  }
7024
7030
  `;
7025
- var Link = (0, import_react15.forwardRef)(
7031
+ var Link = (0, import_react16.forwardRef)(
7026
7032
  ({
7027
7033
  beforeAction,
7028
7034
  children,
@@ -7163,7 +7169,7 @@ var ButtonContent = ({
7163
7169
  )
7164
7170
  ] });
7165
7171
  };
7166
- var Button = (0, import_react16.forwardRef)(
7172
+ var Button = (0, import_react17.forwardRef)(
7167
7173
  ({
7168
7174
  children,
7169
7175
  forceState,
@@ -7342,7 +7348,7 @@ var StyledLabel = import_styled_components22.default.span`
7342
7348
  grid-row: 2;
7343
7349
  text-align: left;
7344
7350
  `;
7345
- var ActionButton = (0, import_react17.forwardRef)(
7351
+ var ActionButton = (0, import_react18.forwardRef)(
7346
7352
  ({
7347
7353
  icon,
7348
7354
  colorScheme = "default",
@@ -7386,7 +7392,7 @@ var ActionButton = (0, import_react17.forwardRef)(
7386
7392
  ActionButton.displayName = "ActionButton";
7387
7393
 
7388
7394
  // src/components/Avatar/Avatar.tsx
7389
- var import_react18 = require("react");
7395
+ var import_react19 = require("react");
7390
7396
  var import_type_guards18 = require("@wistia/type-guards");
7391
7397
  var import_styled_components25 = __toESM(require("styled-components"));
7392
7398
 
@@ -7594,8 +7600,8 @@ var Avatar = ({
7594
7600
  onImageLoad,
7595
7601
  ...props
7596
7602
  }) => {
7597
- const [imageLoadState, setImageLoadState] = (0, import_react18.useState)("loading");
7598
- (0, import_react18.useEffect)(() => {
7603
+ const [imageLoadState, setImageLoadState] = (0, import_react19.useState)("loading");
7604
+ (0, import_react19.useEffect)(() => {
7599
7605
  setImageLoadState("loading");
7600
7606
  }, [imageUrl]);
7601
7607
  const handleImageLoad = () => {
@@ -7607,7 +7613,7 @@ var Avatar = ({
7607
7613
  onImageLoad?.({ state: "error", type: "initials" });
7608
7614
  };
7609
7615
  const avatarSize = heightAndWidth ?? avatarSizeMap[size];
7610
- const avatarColor = (0, import_react18.useMemo)(() => chooseColorScheme(name), [name]);
7616
+ const avatarColor = (0, import_react19.useMemo)(() => chooseColorScheme(name), [name]);
7611
7617
  return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
7612
7618
  AvatarWrapper,
7613
7619
  {
@@ -7634,7 +7640,7 @@ var Avatar = ({
7634
7640
  Avatar.displayName = "Avatar";
7635
7641
 
7636
7642
  // src/components/Badge/Badge.tsx
7637
- var import_react19 = require("react");
7643
+ var import_react20 = require("react");
7638
7644
  var import_styled_components26 = __toESM(require("styled-components"));
7639
7645
  var import_type_guards19 = require("@wistia/type-guards");
7640
7646
  var import_jsx_runtime198 = require("react/jsx-runtime");
@@ -7658,7 +7664,7 @@ var StyledBadge = import_styled_components26.default.div`
7658
7664
  width: 12px;
7659
7665
  }
7660
7666
  `;
7661
- var Badge = (0, import_react19.forwardRef)(
7667
+ var Badge = (0, import_react20.forwardRef)(
7662
7668
  ({ colorScheme = "inherit", label, icon, ...props }, ref) => {
7663
7669
  const hasIcon = (0, import_type_guards19.isNotNil)(icon);
7664
7670
  return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
@@ -7679,7 +7685,7 @@ var Badge = (0, import_react19.forwardRef)(
7679
7685
  Badge.displayName = "Badge";
7680
7686
 
7681
7687
  // src/components/Box/Box.tsx
7682
- var import_react20 = require("react");
7688
+ var import_react21 = require("react");
7683
7689
  var import_styled_components27 = __toESM(require("styled-components"));
7684
7690
  var import_type_guards20 = require("@wistia/type-guards");
7685
7691
 
@@ -7788,13 +7794,13 @@ var StyledBoxComponent = import_styled_components27.default.div`
7788
7794
  var wrapChildren = (children) => {
7789
7795
  if ((0, import_type_guards20.isNotNil)(children)) {
7790
7796
  if (typeof children === "object" && isDev) {
7791
- return import_react20.Children.map(children, (child) => {
7797
+ return import_react21.Children.map(children, (child) => {
7792
7798
  if ((0, import_type_guards20.isNil)(child)) return null;
7793
7799
  const elementParams = {};
7794
7800
  if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
7795
7801
  elementParams.hasBoxParent = true;
7796
7802
  }
7797
- return (0, import_react20.cloneElement)(child, elementParams);
7803
+ return (0, import_react21.cloneElement)(child, elementParams);
7798
7804
  });
7799
7805
  }
7800
7806
  return children;
@@ -7802,7 +7808,7 @@ var wrapChildren = (children) => {
7802
7808
  return null;
7803
7809
  };
7804
7810
  var DEFAULT_ELEMENT = "div";
7805
- var BoxComponent = (0, import_react20.forwardRef)(
7811
+ var BoxComponent = (0, import_react21.forwardRef)(
7806
7812
  ({
7807
7813
  alignContent = "stretch",
7808
7814
  alignItems = "flex-start",
@@ -7879,7 +7885,7 @@ BoxComponent.displayName = "Box";
7879
7885
  var Box = makePolymorphic(BoxComponent);
7880
7886
 
7881
7887
  // src/components/Breadcrumbs/Breadcrumbs.tsx
7882
- var import_react21 = require("react");
7888
+ var import_react22 = require("react");
7883
7889
  var import_styled_components28 = __toESM(require("styled-components"));
7884
7890
  var import_jsx_runtime200 = require("react/jsx-runtime");
7885
7891
  var StyledBreadcrumbs = import_styled_components28.default.nav`
@@ -7895,7 +7901,7 @@ var StyledBreadcrumbs = import_styled_components28.default.nav`
7895
7901
  var BUFFER_WIDTH = 10;
7896
7902
  var Breadcrumbs = ({ children, ...props }) => {
7897
7903
  const { isXsAndDown } = useMq();
7898
- let crumbs = import_react21.Children.toArray(children);
7904
+ let crumbs = import_react22.Children.toArray(children);
7899
7905
  if (isXsAndDown) {
7900
7906
  crumbs = crumbs.slice(-1);
7901
7907
  }
@@ -8082,7 +8088,7 @@ var Card = ({
8082
8088
  Card.displayName = "Card";
8083
8089
 
8084
8090
  // src/components/Center/Center.tsx
8085
- var import_react22 = require("react");
8091
+ var import_react23 = require("react");
8086
8092
  var import_styled_components32 = __toESM(require("styled-components"));
8087
8093
  var import_jsx_runtime204 = require("react/jsx-runtime");
8088
8094
  var StyledCenter = import_styled_components32.default.div`
@@ -8097,7 +8103,7 @@ var StyledCenter = import_styled_components32.default.div`
8097
8103
  align-items: center;
8098
8104
  `}
8099
8105
  `;
8100
- var Center = (0, import_react22.forwardRef)(
8106
+ var Center = (0, import_react23.forwardRef)(
8101
8107
  ({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
8102
8108
  StyledCenter,
8103
8109
  {
@@ -8113,7 +8119,7 @@ var Center = (0, import_react22.forwardRef)(
8113
8119
  Center.displayName = "Center";
8114
8120
 
8115
8121
  // src/components/Checkbox/Checkbox.tsx
8116
- var import_react23 = require("react");
8122
+ var import_react24 = require("react");
8117
8123
  var import_styled_components36 = __toESM(require("styled-components"));
8118
8124
  var import_type_guards25 = require("@wistia/type-guards");
8119
8125
 
@@ -8333,7 +8339,7 @@ var StyledHiddenCheckboxInput = import_styled_components36.default.input`
8333
8339
  display: block;
8334
8340
  }
8335
8341
  `;
8336
- var Checkbox = (0, import_react23.forwardRef)(
8342
+ var Checkbox = (0, import_react24.forwardRef)(
8337
8343
  ({
8338
8344
  checked,
8339
8345
  disabled = false,
@@ -8348,7 +8354,7 @@ var Checkbox = (0, import_react23.forwardRef)(
8348
8354
  hideLabel = false,
8349
8355
  ...props
8350
8356
  }, ref) => {
8351
- const generatedId = (0, import_react23.useId)();
8357
+ const generatedId = (0, import_react24.useId)();
8352
8358
  const computedId = (0, import_type_guards25.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
8353
8359
  return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledCheckboxWrapper, { disabled, children: [
8354
8360
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
@@ -8391,9 +8397,9 @@ var Checkbox = (0, import_react23.forwardRef)(
8391
8397
  Checkbox.displayName = "Checkbox";
8392
8398
 
8393
8399
  // src/components/ClickRegion/ClickRegion.tsx
8394
- var import_react24 = require("react");
8400
+ var import_react25 = require("react");
8395
8401
  var ClickRegion = ({ children, targetRef }) => {
8396
- (0, import_react24.useEffect)(() => {
8402
+ (0, import_react25.useEffect)(() => {
8397
8403
  if (targetRef.current && targetRef.current.tagName === "A") {
8398
8404
  targetRef.current.setAttribute("data-click-region-target-link", "");
8399
8405
  } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
@@ -8401,7 +8407,7 @@ var ClickRegion = ({ children, targetRef }) => {
8401
8407
  } else {
8402
8408
  }
8403
8409
  }, [targetRef]);
8404
- const handleClick = (0, import_react24.useCallback)(
8410
+ const handleClick = (0, import_react25.useCallback)(
8405
8411
  (event) => {
8406
8412
  const node = targetRef.current;
8407
8413
  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")) {
@@ -8418,7 +8424,7 @@ var ClickRegion = ({ children, targetRef }) => {
8418
8424
  },
8419
8425
  [targetRef]
8420
8426
  );
8421
- return (0, import_react24.cloneElement)(import_react24.Children.only(children), {
8427
+ return (0, import_react25.cloneElement)(import_react25.Children.only(children), {
8422
8428
  "data-click-region": true,
8423
8429
  onClick: handleClick
8424
8430
  });
@@ -8451,11 +8457,11 @@ var Collapsible = ({
8451
8457
  Collapsible.displayName = "Collapsible";
8452
8458
 
8453
8459
  // src/components/Collapsible/CollapsibleTrigger.tsx
8454
- var import_react25 = require("react");
8460
+ var import_react26 = require("react");
8455
8461
  var import_react_collapsible2 = require("@radix-ui/react-collapsible");
8456
8462
  var import_jsx_runtime210 = require("react/jsx-runtime");
8457
8463
  var CollapsibleTrigger = ({ children }) => {
8458
- import_react25.Children.only(children);
8464
+ import_react26.Children.only(children);
8459
8465
  return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
8460
8466
  };
8461
8467
 
@@ -8482,7 +8488,7 @@ var import_styled_components40 = __toESM(require("styled-components"));
8482
8488
  var import_type_guards29 = require("@wistia/type-guards");
8483
8489
 
8484
8490
  // src/components/Heading/Heading.tsx
8485
- var import_react26 = require("react");
8491
+ var import_react27 = require("react");
8486
8492
  var import_styled_components39 = __toESM(require("styled-components"));
8487
8493
  var import_type_guards28 = require("@wistia/type-guards");
8488
8494
  var import_jsx_runtime212 = require("react/jsx-runtime");
@@ -8578,7 +8584,7 @@ var variantElementMap = {
8578
8584
  heading5: "h5",
8579
8585
  heading6: "h6"
8580
8586
  };
8581
- var HeadingComponent = (0, import_react26.forwardRef)(
8587
+ var HeadingComponent = (0, import_react27.forwardRef)(
8582
8588
  ({
8583
8589
  align = "left",
8584
8590
  colorScheme = "inherit",
@@ -8742,7 +8748,7 @@ DataCards.displayName = "DataCards";
8742
8748
  var import_styled_components43 = __toESM(require("styled-components"));
8743
8749
 
8744
8750
  // src/components/Text/Text.tsx
8745
- var import_react27 = require("react");
8751
+ var import_react28 = require("react");
8746
8752
  var import_styled_components42 = __toESM(require("styled-components"));
8747
8753
  var import_type_guards30 = require("@wistia/type-guards");
8748
8754
  var import_jsx_runtime215 = require("react/jsx-runtime");
@@ -8917,7 +8923,7 @@ var StyledText = import_styled_components42.default.div`
8917
8923
  }
8918
8924
  `}
8919
8925
  `;
8920
- var TextComponent = (0, import_react27.forwardRef)(
8926
+ var TextComponent = (0, import_react28.forwardRef)(
8921
8927
  ({
8922
8928
  align = "left",
8923
8929
  colorScheme = "inherit",
@@ -9030,7 +9036,7 @@ Divider.displayName = "Divider";
9030
9036
 
9031
9037
  // src/components/EditableHeading/EditableHeading.tsx
9032
9038
  var import_styled_components48 = __toESM(require("styled-components"));
9033
- var import_react29 = require("react");
9039
+ var import_react30 = require("react");
9034
9040
 
9035
9041
  // src/components/Tooltip/Tooltip.tsx
9036
9042
  var import_react_tooltip2 = require("@radix-ui/react-tooltip");
@@ -9128,7 +9134,7 @@ var Tooltip = ({
9128
9134
  Tooltip.displayName = "Tooltip";
9129
9135
 
9130
9136
  // src/components/Input/Input.tsx
9131
- var import_react28 = require("react");
9137
+ var import_react29 = require("react");
9132
9138
  var import_styled_components47 = __toESM(require("styled-components"));
9133
9139
  var import_type_guards31 = require("@wistia/type-guards");
9134
9140
 
@@ -9263,7 +9269,7 @@ var StyledInputContainer = import_styled_components47.default.div`
9263
9269
  padding-right: 32px;
9264
9270
  }
9265
9271
  `;
9266
- var Input = (0, import_react28.forwardRef)(
9272
+ var Input = (0, import_react29.forwardRef)(
9267
9273
  ({
9268
9274
  fullWidth = true,
9269
9275
  monospace = false,
@@ -9273,7 +9279,7 @@ var Input = (0, import_react28.forwardRef)(
9273
9279
  rightIcon,
9274
9280
  ...props
9275
9281
  }, externalRef) => {
9276
- const internalRef = (0, import_react28.useRef)();
9282
+ const internalRef = (0, import_react29.useRef)();
9277
9283
  const ref = (
9278
9284
  // eslint-disable-next-line react-compiler/react-compiler
9279
9285
  (0, import_type_guards31.isNotNil)(externalRef) && (0, import_type_guards31.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
@@ -9283,14 +9289,14 @@ var Input = (0, import_react28.forwardRef)(
9283
9289
  leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Icon, { type: "search" });
9284
9290
  }
9285
9291
  if ((0, import_type_guards31.isNotNil)(leftIconToDisplay)) {
9286
- leftIconToDisplay = (0, import_react28.cloneElement)(leftIconToDisplay, {
9292
+ leftIconToDisplay = (0, import_react29.cloneElement)(leftIconToDisplay, {
9287
9293
  size: "md",
9288
9294
  className: "wui-input-left-icon"
9289
9295
  });
9290
9296
  }
9291
9297
  let rightIconToDisplay = rightIcon;
9292
9298
  if ((0, import_type_guards31.isNotNil)(rightIconToDisplay)) {
9293
- rightIconToDisplay = (0, import_react28.cloneElement)(rightIconToDisplay, {
9299
+ rightIconToDisplay = (0, import_react29.cloneElement)(rightIconToDisplay, {
9294
9300
  size: "md",
9295
9301
  className: "wui-input-right-icon"
9296
9302
  });
@@ -9382,11 +9388,11 @@ var EditableHeading = ({
9382
9388
  __forceEditing = false,
9383
9389
  editingDisabled = false
9384
9390
  }) => {
9385
- const [isEditing, setIsEditing] = (0, import_react29.useState)(false);
9386
- const [value, setValue] = (0, import_react29.useState)(children);
9387
- const [previousValue, setPreviousValue] = (0, import_react29.useState)(children);
9388
- const [headingHeight, setHeadingHeight] = (0, import_react29.useState)("60");
9389
- const headingRef = (0, import_react29.useRef)(null);
9391
+ const [isEditing, setIsEditing] = (0, import_react30.useState)(false);
9392
+ const [value, setValue] = (0, import_react30.useState)(children);
9393
+ const [previousValue, setPreviousValue] = (0, import_react30.useState)(children);
9394
+ const [headingHeight, setHeadingHeight] = (0, import_react30.useState)("60");
9395
+ const headingRef = (0, import_react30.useRef)(null);
9390
9396
  const handleSetEditing = (editing) => {
9391
9397
  if (editingDisabled) return;
9392
9398
  if (editing && headingRef.current) {
@@ -9465,12 +9471,12 @@ var EditableHeading = ({
9465
9471
  };
9466
9472
 
9467
9473
  // src/components/Form/Form.tsx
9468
- var import_react31 = require("react");
9474
+ var import_react32 = require("react");
9469
9475
  var import_styled_components50 = __toESM(require("styled-components"));
9470
9476
  var import_type_guards32 = require("@wistia/type-guards");
9471
9477
 
9472
9478
  // src/components/Stack/Stack.tsx
9473
- var import_react30 = require("react");
9479
+ var import_react31 = require("react");
9474
9480
  var import_styled_components49 = __toESM(require("styled-components"));
9475
9481
  var import_jsx_runtime221 = require("react/jsx-runtime");
9476
9482
  var DEFAULT_ELEMENT4 = "div";
@@ -9480,7 +9486,7 @@ var StyledStack = import_styled_components49.default.div`
9480
9486
  gap: ${({ $gap }) => `var(--wui-${$gap})`};
9481
9487
  align-items: ${({ $alignItems }) => $alignItems};
9482
9488
  `;
9483
- var StackComponent = (0, import_react30.forwardRef)(
9489
+ var StackComponent = (0, import_react31.forwardRef)(
9484
9490
  ({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
9485
9491
  const responsiveGap = useResponsiveProp(gap);
9486
9492
  const responsiveDirection = useResponsiveProp(direction);
@@ -9509,7 +9515,7 @@ var StyledForm = import_styled_components50.default.form`
9509
9515
  max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
9510
9516
  align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
9511
9517
  `;
9512
- var FormContext = (0, import_react31.createContext)({
9518
+ var FormContext = (0, import_react32.createContext)({
9513
9519
  values: {},
9514
9520
  errors: {},
9515
9521
  hasSubmitted: false,
@@ -9525,11 +9531,11 @@ var FormComponent = ({
9525
9531
  fullWidth = false,
9526
9532
  ...props
9527
9533
  }, forwardedRef) => {
9528
- const [errors, setErrors] = (0, import_react31.useState)({});
9529
- const [hasSubmitted, setHasSubmitted] = (0, import_react31.useState)(false);
9530
- const innerRef = (0, import_react31.useRef)();
9534
+ const [errors, setErrors] = (0, import_react32.useState)({});
9535
+ const [hasSubmitted, setHasSubmitted] = (0, import_react32.useState)(false);
9536
+ const innerRef = (0, import_react32.useRef)();
9531
9537
  const ref = forwardedRef ?? innerRef;
9532
- const autoId = (0, import_react31.useId)();
9538
+ const autoId = (0, import_react32.useId)();
9533
9539
  const id = props.id ?? autoId;
9534
9540
  const handleValidate = (nextFormData) => {
9535
9541
  const nextData = Object.fromEntries(nextFormData.entries());
@@ -9571,7 +9577,7 @@ var FormComponent = ({
9571
9577
  void action(null);
9572
9578
  }
9573
9579
  };
9574
- const context = (0, import_react31.useMemo)(() => {
9580
+ const context = (0, import_react32.useMemo)(() => {
9575
9581
  return {
9576
9582
  values,
9577
9583
  errors,
@@ -9600,15 +9606,15 @@ var FormComponent = ({
9600
9606
  );
9601
9607
  };
9602
9608
  FormComponent.displayName = "Form";
9603
- var Form = (0, import_react31.forwardRef)(FormComponent);
9609
+ var Form = (0, import_react32.forwardRef)(FormComponent);
9604
9610
 
9605
9611
  // src/components/Form/useFormState.tsx
9606
- var import_react32 = require("react");
9612
+ var import_react33 = require("react");
9607
9613
  var useFormState = (action, initialData = {}) => {
9608
- const [data, setData] = (0, import_react32.useState)(initialData);
9609
- const [isPending, setIsPending] = (0, import_react32.useState)(false);
9610
- const [error, setError] = (0, import_react32.useState)(null);
9611
- const formAction = (0, import_react32.useCallback)(
9614
+ const [data, setData] = (0, import_react33.useState)(initialData);
9615
+ const [isPending, setIsPending] = (0, import_react33.useState)(false);
9616
+ const [error, setError] = (0, import_react33.useState)(null);
9617
+ const formAction = (0, import_react33.useCallback)(
9612
9618
  async (nextFormData) => {
9613
9619
  if (nextFormData === null) {
9614
9620
  setData(initialData);
@@ -9639,15 +9645,15 @@ var useFormState = (action, initialData = {}) => {
9639
9645
  };
9640
9646
 
9641
9647
  // src/components/Form/FormErrorSummary.tsx
9642
- var import_react33 = require("react");
9648
+ var import_react34 = require("react");
9643
9649
  var import_type_guards33 = require("@wistia/type-guards");
9644
9650
  var import_jsx_runtime223 = require("react/jsx-runtime");
9645
9651
  var ErrorItem = ({ name, error, formId }) => {
9646
9652
  return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9647
9653
  };
9648
9654
  var FormErrorSummary = ({ description }) => {
9649
- const ref = (0, import_react33.useRef)(null);
9650
- const { formId, errors, hasSubmitted } = (0, import_react33.useContext)(FormContext);
9655
+ const ref = (0, import_react34.useRef)(null);
9656
+ const { formId, errors, hasSubmitted } = (0, import_react34.useContext)(FormContext);
9651
9657
  const isValid = Object.keys(errors).length === 0;
9652
9658
  if (isValid || !hasSubmitted) {
9653
9659
  return null;
@@ -9677,7 +9683,7 @@ var FormErrorSummary = ({ description }) => {
9677
9683
  };
9678
9684
 
9679
9685
  // src/components/FormField/FormField.tsx
9680
- var import_react36 = require("react");
9686
+ var import_react37 = require("react");
9681
9687
  var import_styled_components53 = __toESM(require("styled-components"));
9682
9688
  var import_type_guards34 = require("@wistia/type-guards");
9683
9689
 
@@ -9742,11 +9748,11 @@ var Label = ({
9742
9748
  Label.displayName = "Label";
9743
9749
 
9744
9750
  // src/components/FormGroup/CheckboxGroup.tsx
9745
- var import_react35 = require("react");
9751
+ var import_react36 = require("react");
9746
9752
 
9747
9753
  // src/components/FormGroup/FormGroup.tsx
9748
9754
  var import_styled_components52 = __toESM(require("styled-components"));
9749
- var import_react34 = require("react");
9755
+ var import_react35 = require("react");
9750
9756
  var import_jsx_runtime225 = require("react/jsx-runtime");
9751
9757
  var StyledFieldset = import_styled_components52.default.fieldset`
9752
9758
  border: 0;
@@ -9755,7 +9761,7 @@ var StyledLegend = import_styled_components52.default.legend`
9755
9761
  margin-bottom: var(--space-01);
9756
9762
  `;
9757
9763
  var FormGroup = ({ children, label, ...props }) => {
9758
- const ref = (0, import_react34.useRef)();
9764
+ const ref = (0, import_react35.useRef)();
9759
9765
  return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
9760
9766
  Stack,
9761
9767
  {
@@ -9780,7 +9786,7 @@ FormGroup.displayName = "FormGroup";
9780
9786
 
9781
9787
  // src/components/FormGroup/CheckboxGroup.tsx
9782
9788
  var import_jsx_runtime226 = require("react/jsx-runtime");
9783
- var CheckboxGroupContext = (0, import_react35.createContext)(null);
9789
+ var CheckboxGroupContext = (0, import_react36.createContext)(null);
9784
9790
  var CheckboxGroup = ({
9785
9791
  children,
9786
9792
  name,
@@ -9788,7 +9794,7 @@ var CheckboxGroup = ({
9788
9794
  value,
9789
9795
  ...props
9790
9796
  }) => {
9791
- const context = (0, import_react35.useMemo)(() => {
9797
+ const context = (0, import_react36.useMemo)(() => {
9792
9798
  return {
9793
9799
  name,
9794
9800
  onChange
@@ -9873,8 +9879,8 @@ var FormField = ({
9873
9879
  value,
9874
9880
  ...props
9875
9881
  }) => {
9876
- const formState = (0, import_react36.useContext)(FormContext);
9877
- const checkboxGroup = (0, import_react36.useContext)(CheckboxGroupContext);
9882
+ const formState = (0, import_react37.useContext)(FormContext);
9883
+ const checkboxGroup = (0, import_react37.useContext)(CheckboxGroupContext);
9878
9884
  const defaultValue = formState.values[name];
9879
9885
  const isIntegratedLabel = children.type === Checkbox;
9880
9886
  const computedId = id ?? `${formState.formId}-${name}`;
@@ -9912,7 +9918,7 @@ var FormField = ({
9912
9918
  "aria-invalid": (0, import_type_guards34.isNotNil)(error)
9913
9919
  };
9914
9920
  }
9915
- import_react36.Children.only(children);
9921
+ import_react37.Children.only(children);
9916
9922
  return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
9917
9923
  StyledFormField,
9918
9924
  {
@@ -9921,7 +9927,7 @@ var FormField = ({
9921
9927
  children: [
9922
9928
  !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Label, { htmlFor: computedId, children: label }),
9923
9929
  (0, import_type_guards34.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
9924
- (0, import_react36.cloneElement)(children, childProps),
9930
+ (0, import_react37.cloneElement)(children, childProps),
9925
9931
  (0, import_type_guards34.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
9926
9932
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", {}),
9927
9933
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
@@ -9939,9 +9945,9 @@ var FormField = ({
9939
9945
  FormField.displayName = "FormField";
9940
9946
 
9941
9947
  // src/components/FormGroup/RadioGroup.tsx
9942
- var import_react37 = require("react");
9948
+ var import_react38 = require("react");
9943
9949
  var import_jsx_runtime228 = require("react/jsx-runtime");
9944
- var RadioGroupContext = (0, import_react37.createContext)(null);
9950
+ var RadioGroupContext = (0, import_react38.createContext)(null);
9945
9951
  var RadioGroup = ({
9946
9952
  children,
9947
9953
  name,
@@ -9949,7 +9955,7 @@ var RadioGroup = ({
9949
9955
  value,
9950
9956
  ...props
9951
9957
  }) => {
9952
- const context = (0, import_react37.useMemo)(() => {
9958
+ const context = (0, import_react38.useMemo)(() => {
9953
9959
  return {
9954
9960
  name,
9955
9961
  onChange
@@ -9960,7 +9966,7 @@ var RadioGroup = ({
9960
9966
  RadioGroup.displayName = "RadioGroup";
9961
9967
 
9962
9968
  // src/components/IconButton/IconButton.tsx
9963
- var import_react38 = require("react");
9969
+ var import_react39 = require("react");
9964
9970
  var import_styled_components54 = __toESM(require("styled-components"));
9965
9971
  var import_jsx_runtime229 = require("react/jsx-runtime");
9966
9972
  var StyledButton2 = (0, import_styled_components54.default)(Button)`
@@ -9977,7 +9983,7 @@ var StyledButton2 = (0, import_styled_components54.default)(Button)`
9977
9983
  align-items: center;
9978
9984
  line-height: 1;
9979
9985
  `;
9980
- var IconButton = (0, import_react38.forwardRef)(
9986
+ var IconButton = (0, import_react39.forwardRef)(
9981
9987
  ({ children, label, size = "md", ...props }, ref) => {
9982
9988
  const responsiveSize = useResponsiveProp(size);
9983
9989
  return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
@@ -9988,7 +9994,7 @@ var IconButton = (0, import_react38.forwardRef)(
9988
9994
  "aria-label": label,
9989
9995
  "data-wistia-ui-icon-button": true,
9990
9996
  size: responsiveSize,
9991
- children: (0, import_react38.cloneElement)(import_react38.Children.only(children), {
9997
+ children: (0, import_react39.cloneElement)(import_react39.Children.only(children), {
9992
9998
  size: responsiveSize
9993
9999
  })
9994
10000
  }
@@ -9999,7 +10005,7 @@ IconButton.displayName = "IconButton";
9999
10005
 
10000
10006
  // src/components/InputClickToCopy/InputClickToCopy.tsx
10001
10007
  var import_styled_components55 = __toESM(require("styled-components"));
10002
- var import_react39 = require("react");
10008
+ var import_react40 = require("react");
10003
10009
  var import_type_guards35 = require("@wistia/type-guards");
10004
10010
  var import_jsx_runtime230 = require("react/jsx-runtime");
10005
10011
  var StyledInput2 = (0, import_styled_components55.default)(Input)`
@@ -10012,10 +10018,10 @@ var StyledInput2 = (0, import_styled_components55.default)(Input)`
10012
10018
  }
10013
10019
  `;
10014
10020
  var COPY_SUCCESS_DURATION = 2e3;
10015
- var InputClickToCopy = (0, import_react39.forwardRef)(
10021
+ var InputClickToCopy = (0, import_react40.forwardRef)(
10016
10022
  ({ value, onCopy, ...props }, ref) => {
10017
- const [isCopied, setIsCopied] = (0, import_react39.useState)(false);
10018
- (0, import_react39.useEffect)(() => {
10023
+ const [isCopied, setIsCopied] = (0, import_react40.useState)(false);
10024
+ (0, import_react40.useEffect)(() => {
10019
10025
  if (isCopied) {
10020
10026
  const timeout = setTimeout(() => {
10021
10027
  setIsCopied(false);
@@ -10065,12 +10071,12 @@ InputClickToCopy.displayName = "InputClickToCopy";
10065
10071
  var import_styled_components56 = __toESM(require("styled-components"));
10066
10072
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
10067
10073
  var import_type_guards36 = require("@wistia/type-guards");
10068
- var import_react41 = require("react");
10074
+ var import_react42 = require("react");
10069
10075
 
10070
10076
  // src/components/Menu/MenuContext.tsx
10071
- var import_react40 = require("react");
10072
- var MenuContext = (0, import_react40.createContext)({ compact: false });
10073
- var useMenuContext = () => (0, import_react40.useContext)(MenuContext);
10077
+ var import_react41 = require("react");
10078
+ var MenuContext = (0, import_react41.createContext)({ compact: false });
10079
+ var useMenuContext = () => (0, import_react41.useContext)(MenuContext);
10074
10080
 
10075
10081
  // src/components/Menu/Menu.tsx
10076
10082
  var import_jsx_runtime231 = require("react/jsx-runtime");
@@ -10174,7 +10180,7 @@ var Menu = ({
10174
10180
  onInteractOutside,
10175
10181
  ...props
10176
10182
  }) => {
10177
- const contextValue = (0, import_react41.useMemo)(() => ({ compact }), [compact]);
10183
+ const contextValue = (0, import_react42.useMemo)(() => ({ compact }), [compact]);
10178
10184
  let controlProps = {
10179
10185
  ...(0, import_type_guards36.isNotNil)(onOpenChange) && (0, import_type_guards36.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
10180
10186
  };
@@ -10248,13 +10254,13 @@ var MenuLabel = ({ children, ...props }) => {
10248
10254
  MenuLabel.displayName = "MenuLabel";
10249
10255
 
10250
10256
  // src/components/Menu/SubMenu.tsx
10251
- var import_react43 = require("react");
10257
+ var import_react44 = require("react");
10252
10258
  var import_styled_components60 = __toESM(require("styled-components"));
10253
10259
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
10254
10260
  var import_type_guards38 = require("@wistia/type-guards");
10255
10261
 
10256
10262
  // src/components/Menu/MenuItemButton.tsx
10257
- var import_react42 = require("react");
10263
+ var import_react43 = require("react");
10258
10264
  var import_styled_components58 = __toESM(require("styled-components"));
10259
10265
  var import_type_guards37 = require("@wistia/type-guards");
10260
10266
  var import_jsx_runtime233 = require("react/jsx-runtime");
@@ -10331,7 +10337,7 @@ var StyledBadgeContainer = import_styled_components58.default.div`
10331
10337
  font-size: var(--wui-typography-label-4-size);
10332
10338
  color: var(--wui-color-text-secondary);
10333
10339
  `;
10334
- var MenuItemButton = (0, import_react42.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
10340
+ var MenuItemButton = (0, import_react43.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
10335
10341
  let { colorScheme, badge } = props;
10336
10342
  if (appearance === "dangerous") {
10337
10343
  if ((0, import_type_guards37.isNotUndefined)(colorScheme)) {
@@ -10427,7 +10433,7 @@ var SubMenu = ({
10427
10433
  ...props
10428
10434
  }) => {
10429
10435
  const { isSmAndUp } = useMq();
10430
- const [isExpanded, setIsExpanded] = (0, import_react43.useState)(false);
10436
+ const [isExpanded, setIsExpanded] = (0, import_react44.useState)(false);
10431
10437
  const { compact } = useMenuContext();
10432
10438
  return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
10433
10439
  /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(SubMenuTrigger, { ...props, children: [
@@ -10456,10 +10462,10 @@ var SubMenu = ({
10456
10462
  SubMenu.displayName = "SubMenu";
10457
10463
 
10458
10464
  // src/components/Menu/MenuItem.tsx
10459
- var import_react44 = require("react");
10465
+ var import_react45 = require("react");
10460
10466
  var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
10461
10467
  var import_jsx_runtime236 = require("react/jsx-runtime");
10462
- var MenuItem = (0, import_react44.forwardRef)(
10468
+ var MenuItem = (0, import_react45.forwardRef)(
10463
10469
  ({ onSelect = () => null, ...props }, ref) => {
10464
10470
  return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
10465
10471
  import_react_dropdown_menu4.DropdownMenuItem,
@@ -10611,7 +10617,7 @@ var CheckboxMenuItem = ({
10611
10617
  CheckboxMenuItem.displayName = "CheckboxMenuItem";
10612
10618
 
10613
10619
  // src/components/Modal/Modal.tsx
10614
- var import_react48 = require("react");
10620
+ var import_react49 = require("react");
10615
10621
  var import_styled_components65 = __toESM(require("styled-components"));
10616
10622
  var import_react_dialog4 = require("@radix-ui/react-dialog");
10617
10623
  var import_type_guards41 = require("@wistia/type-guards");
@@ -10671,19 +10677,19 @@ var ModalHeader = ({
10671
10677
  };
10672
10678
 
10673
10679
  // src/components/Modal/ModalContent.tsx
10674
- var import_react46 = require("react");
10680
+ var import_react47 = require("react");
10675
10681
  var import_styled_components63 = __toESM(require("styled-components"));
10676
10682
  var import_react_dialog3 = require("@radix-ui/react-dialog");
10677
10683
 
10678
10684
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
10679
- var import_react45 = require("react");
10685
+ var import_react46 = require("react");
10680
10686
  var import_type_guards40 = require("@wistia/type-guards");
10681
10687
  var useFocusRestore = () => {
10682
- const previouslyFocusedRef = (0, import_react45.useRef)(null);
10683
- (0, import_react45.useEffect)(() => {
10688
+ const previouslyFocusedRef = (0, import_react46.useRef)(null);
10689
+ (0, import_react46.useEffect)(() => {
10684
10690
  previouslyFocusedRef.current = document.activeElement;
10685
10691
  }, []);
10686
- (0, import_react45.useEffect)(() => {
10692
+ (0, import_react46.useEffect)(() => {
10687
10693
  return () => {
10688
10694
  if ((0, import_type_guards40.isNotNil)(previouslyFocusedRef.current)) {
10689
10695
  setTimeout(() => {
@@ -10737,7 +10743,7 @@ var StyledModalContent = (0, import_styled_components63.default)(import_react_di
10737
10743
  }
10738
10744
  }
10739
10745
  `;
10740
- var ModalContent = (0, import_react46.forwardRef)(
10746
+ var ModalContent = (0, import_react47.forwardRef)(
10741
10747
  ({ fullHeight, width, children, ...props }, ref) => {
10742
10748
  useFocusRestore();
10743
10749
  return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
@@ -10755,7 +10761,7 @@ var ModalContent = (0, import_react46.forwardRef)(
10755
10761
  );
10756
10762
 
10757
10763
  // src/private/components/Backdrop/Backdrop.tsx
10758
- var import_react47 = require("react");
10764
+ var import_react48 = require("react");
10759
10765
  var import_styled_components64 = __toESM(require("styled-components"));
10760
10766
  var import_jsx_runtime243 = require("react/jsx-runtime");
10761
10767
  var backdropAnimationDuration = 150;
@@ -10793,7 +10799,7 @@ var BackdropComponent = import_styled_components64.default.div`
10793
10799
  }
10794
10800
  }
10795
10801
  `;
10796
- var Backdrop = (0, import_react47.forwardRef)(
10802
+ var Backdrop = (0, import_react48.forwardRef)(
10797
10803
  ({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
10798
10804
  BackdropComponent,
10799
10805
  {
@@ -10815,7 +10821,7 @@ var ModalBody = import_styled_components65.default.div`
10815
10821
  display: flex;
10816
10822
  order: 2;
10817
10823
  `;
10818
- var Modal = (0, import_react48.forwardRef)(
10824
+ var Modal = (0, import_react49.forwardRef)(
10819
10825
  ({
10820
10826
  children,
10821
10827
  fullHeight = false,
@@ -11029,7 +11035,7 @@ var ProgressBar = ({
11029
11035
  ProgressBar.displayName = "ProgressBar";
11030
11036
 
11031
11037
  // src/components/Radio/Radio.tsx
11032
- var import_react49 = require("react");
11038
+ var import_react50 = require("react");
11033
11039
  var import_styled_components68 = __toESM(require("styled-components"));
11034
11040
  var import_type_guards44 = require("@wistia/type-guards");
11035
11041
  var import_jsx_runtime247 = require("react/jsx-runtime");
@@ -11132,7 +11138,7 @@ var StyledHiddenRadioInput = import_styled_components68.default.input`
11132
11138
  display: block;
11133
11139
  }
11134
11140
  `;
11135
- var Radio = (0, import_react49.forwardRef)(
11141
+ var Radio = (0, import_react50.forwardRef)(
11136
11142
  ({
11137
11143
  checked,
11138
11144
  disabled = false,
@@ -11147,7 +11153,7 @@ var Radio = (0, import_react49.forwardRef)(
11147
11153
  hideLabel = false,
11148
11154
  ...props
11149
11155
  }, ref) => {
11150
- const generatedId = (0, import_react49.useId)();
11156
+ const generatedId = (0, import_react50.useId)();
11151
11157
  const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
11152
11158
  return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
11153
11159
  StyledRadioWrapper,
@@ -11197,20 +11203,20 @@ var Radio = (0, import_react49.forwardRef)(
11197
11203
  Radio.displayName = "Radio";
11198
11204
 
11199
11205
  // src/components/SegmentedControl/SegmentedControl.tsx
11200
- var import_react52 = require("react");
11206
+ var import_react53 = require("react");
11201
11207
  var import_styled_components70 = __toESM(require("styled-components"));
11202
11208
  var import_react_toggle_group = require("@radix-ui/react-toggle-group");
11203
11209
  var import_type_guards45 = require("@wistia/type-guards");
11204
11210
 
11205
11211
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
11206
- var import_react50 = require("react");
11212
+ var import_react51 = require("react");
11207
11213
  var import_jsx_runtime248 = require("react/jsx-runtime");
11208
- var SelectedItemStyleContext = (0, import_react50.createContext)(null);
11214
+ var SelectedItemStyleContext = (0, import_react51.createContext)(null);
11209
11215
  var SelectedItemStyleProvider = ({
11210
11216
  children
11211
11217
  }) => {
11212
- const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react50.useState)(null);
11213
- const selectedItemIndicatorStyle = (0, import_react50.useMemo)(
11218
+ const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react51.useState)(null);
11219
+ const selectedItemIndicatorStyle = (0, import_react51.useMemo)(
11214
11220
  () => selectedItemMeasurements != null ? {
11215
11221
  height: `${selectedItemMeasurements.offsetHeight}px`,
11216
11222
  transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
@@ -11220,7 +11226,7 @@ var SelectedItemStyleProvider = ({
11220
11226
  },
11221
11227
  [selectedItemMeasurements]
11222
11228
  );
11223
- const contextValue = (0, import_react50.useMemo)(
11229
+ const contextValue = (0, import_react51.useMemo)(
11224
11230
  () => ({
11225
11231
  setSelectedItemMeasurements,
11226
11232
  selectedItemIndicatorStyle
@@ -11230,7 +11236,7 @@ var SelectedItemStyleProvider = ({
11230
11236
  return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
11231
11237
  };
11232
11238
  var useSelectedItemStyle = () => {
11233
- const context = (0, import_react50.useContext)(SelectedItemStyleContext);
11239
+ const context = (0, import_react51.useContext)(SelectedItemStyleContext);
11234
11240
  if (context === null) {
11235
11241
  throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
11236
11242
  }
@@ -11241,11 +11247,11 @@ var useSelectedItemStyle = () => {
11241
11247
  var import_styled_components69 = __toESM(require("styled-components"));
11242
11248
 
11243
11249
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
11244
- var import_react51 = require("react");
11245
- var SegmentedControlValueContext = (0, import_react51.createContext)(null);
11250
+ var import_react52 = require("react");
11251
+ var SegmentedControlValueContext = (0, import_react52.createContext)(null);
11246
11252
  var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
11247
11253
  var useSegmentedControlValue = () => {
11248
- const context = (0, import_react51.useContext)(SegmentedControlValueContext);
11254
+ const context = (0, import_react52.useContext)(SegmentedControlValueContext);
11249
11255
  if (context === null) {
11250
11256
  throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
11251
11257
  }
@@ -11291,7 +11297,7 @@ var segmentedControlStyles = import_styled_components70.css`
11291
11297
  var StyledSegmentedControl = (0, import_styled_components70.default)(import_react_toggle_group.Root)`
11292
11298
  ${segmentedControlStyles}
11293
11299
  `;
11294
- var SegmentedControl = (0, import_react52.forwardRef)(
11300
+ var SegmentedControl = (0, import_react53.forwardRef)(
11295
11301
  ({
11296
11302
  children,
11297
11303
  disabled = false,
@@ -11326,7 +11332,7 @@ var SegmentedControl = (0, import_react52.forwardRef)(
11326
11332
  SegmentedControl.displayName = "SegmentedControl";
11327
11333
 
11328
11334
  // src/components/SegmentedControl/SegmentedControlItem.tsx
11329
- var import_react53 = require("react");
11335
+ var import_react54 = require("react");
11330
11336
  var import_styled_components71 = __toESM(require("styled-components"));
11331
11337
  var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
11332
11338
  var import_type_guards46 = require("@wistia/type-guards");
@@ -11394,11 +11400,11 @@ var segmentedControlItemStyles = import_styled_components71.css`
11394
11400
  var StyledSegmentedControlItem = (0, import_styled_components71.default)(import_react_toggle_group2.Item)`
11395
11401
  ${segmentedControlItemStyles}
11396
11402
  `;
11397
- var SegmentedControlItem = (0, import_react53.forwardRef)(
11403
+ var SegmentedControlItem = (0, import_react54.forwardRef)(
11398
11404
  ({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11399
11405
  const selectedValue = useSegmentedControlValue();
11400
11406
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11401
- const buttonRef = (0, import_react53.useRef)(null);
11407
+ const buttonRef = (0, import_react54.useRef)(null);
11402
11408
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11403
11409
  const handleClick = (event) => {
11404
11410
  const target = event.target;
@@ -11407,7 +11413,7 @@ var SegmentedControlItem = (0, import_react53.forwardRef)(
11407
11413
  event.preventDefault();
11408
11414
  }
11409
11415
  };
11410
- (0, import_react53.useEffect)(() => {
11416
+ (0, import_react54.useEffect)(() => {
11411
11417
  const buttonElem = buttonRef.current;
11412
11418
  if (!buttonElem) {
11413
11419
  return void 0;
@@ -11453,7 +11459,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
11453
11459
 
11454
11460
  // src/components/Select/Select.tsx
11455
11461
  var import_react_select = require("@radix-ui/react-select");
11456
- var import_react54 = require("react");
11462
+ var import_react55 = require("react");
11457
11463
  var import_styled_components72 = __toESM(require("styled-components"));
11458
11464
  var import_jsx_runtime252 = require("react/jsx-runtime");
11459
11465
  var StyledTrigger = (0, import_styled_components72.default)(import_react_select.Trigger)`
@@ -11518,7 +11524,7 @@ var StyledContent3 = (0, import_styled_components72.default)(import_react_select
11518
11524
  max-height: var(--radix-select-content-available-height);
11519
11525
  z-index: var(--wui-zindex-select);
11520
11526
  `;
11521
- var Select = (0, import_react54.forwardRef)(
11527
+ var Select = (0, import_react55.forwardRef)(
11522
11528
  ({
11523
11529
  colorScheme = "inherit",
11524
11530
  children,
@@ -11567,7 +11573,7 @@ Select.displayName = "Select";
11567
11573
 
11568
11574
  // src/components/Select/SelectOption.tsx
11569
11575
  var import_react_select2 = require("@radix-ui/react-select");
11570
- var import_react55 = require("react");
11576
+ var import_react56 = require("react");
11571
11577
  var import_styled_components73 = __toESM(require("styled-components"));
11572
11578
  var import_type_guards47 = require("@wistia/type-guards");
11573
11579
  var import_jsx_runtime253 = require("react/jsx-runtime");
@@ -11598,7 +11604,7 @@ var StyledItem = (0, import_styled_components73.default)(import_react_select2.It
11598
11604
  var StyledIconContainer = import_styled_components73.default.span`
11599
11605
  width: 12px;
11600
11606
  `;
11601
- var SelectOption = (0, import_react55.forwardRef)(
11607
+ var SelectOption = (0, import_react56.forwardRef)(
11602
11608
  ({ children, selectedDisplayValue, ...props }, forwardedRef) => {
11603
11609
  return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(
11604
11610
  StyledItem,
@@ -11646,7 +11652,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
11646
11652
  };
11647
11653
 
11648
11654
  // src/components/Switch/Switch.tsx
11649
- var import_react56 = require("react");
11655
+ var import_react57 = require("react");
11650
11656
  var import_styled_components75 = __toESM(require("styled-components"));
11651
11657
  var import_type_guards48 = require("@wistia/type-guards");
11652
11658
  var import_jsx_runtime255 = require("react/jsx-runtime");
@@ -11751,7 +11757,7 @@ var StyledHiddenSwitchInput = import_styled_components75.default.input`
11751
11757
  }
11752
11758
  }
11753
11759
  `;
11754
- var Switch = (0, import_react56.forwardRef)(
11760
+ var Switch = (0, import_react57.forwardRef)(
11755
11761
  ({
11756
11762
  checked,
11757
11763
  disabled = false,
@@ -11766,7 +11772,7 @@ var Switch = (0, import_react56.forwardRef)(
11766
11772
  hideLabel = false,
11767
11773
  ...props
11768
11774
  }, ref) => {
11769
- const generatedId = (0, import_react56.useId)();
11775
+ const generatedId = (0, import_react57.useId)();
11770
11776
  const computedId = (0, import_type_guards48.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11771
11777
  return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
11772
11778
  /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
@@ -11848,8 +11854,8 @@ var Table = ({
11848
11854
  var import_styled_components77 = __toESM(require("styled-components"));
11849
11855
 
11850
11856
  // src/components/Table/TableSectionContext.ts
11851
- var import_react57 = require("react");
11852
- var TableSectionContext = (0, import_react57.createContext)(null);
11857
+ var import_react58 = require("react");
11858
+ var TableSectionContext = (0, import_react58.createContext)(null);
11853
11859
 
11854
11860
  // src/components/Table/TableBody.tsx
11855
11861
  var import_jsx_runtime257 = require("react/jsx-runtime");
@@ -11859,7 +11865,7 @@ var TableBody = ({ children, ...props }) => {
11859
11865
  };
11860
11866
 
11861
11867
  // src/components/Table/TableCell.tsx
11862
- var import_react58 = require("react");
11868
+ var import_react59 = require("react");
11863
11869
  var import_styled_components78 = __toESM(require("styled-components"));
11864
11870
  var import_jsx_runtime258 = require("react/jsx-runtime");
11865
11871
  var sharedStyles = import_styled_components78.css`
@@ -11880,7 +11886,7 @@ var StyledTd = import_styled_components78.default.td`
11880
11886
  line-height: var(--wui-typography-body-2-line-height);
11881
11887
  `;
11882
11888
  var TableCell = ({ children, ...props }) => {
11883
- const section = (0, import_react58.useContext)(TableSectionContext);
11889
+ const section = (0, import_react59.useContext)(TableSectionContext);
11884
11890
  if (section === "head") {
11885
11891
  return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(StyledTh, { ...props, children });
11886
11892
  }
@@ -11912,7 +11918,7 @@ var TableRow = ({ children, ...props }) => {
11912
11918
  };
11913
11919
 
11914
11920
  // src/components/Tabs/Tabs.tsx
11915
- var import_react62 = require("react");
11921
+ var import_react63 = require("react");
11916
11922
  var import_react_tabs4 = require("@radix-ui/react-tabs");
11917
11923
  var import_type_guards50 = require("@wistia/type-guards");
11918
11924
  var import_styled_components86 = __toESM(require("styled-components"));
@@ -11967,17 +11973,17 @@ var TabList = ({
11967
11973
  TabList.displayName = "TabList";
11968
11974
 
11969
11975
  // src/components/Tabs/TabItem.tsx
11970
- var import_react60 = require("react");
11976
+ var import_react61 = require("react");
11971
11977
  var import_styled_components84 = __toESM(require("styled-components"));
11972
11978
  var import_react_tabs3 = require("@radix-ui/react-tabs");
11973
11979
  var import_type_guards49 = require("@wistia/type-guards");
11974
11980
 
11975
11981
  // src/components/Tabs/useTabsValue.tsx
11976
- var import_react59 = require("react");
11977
- var TabsValueContext = (0, import_react59.createContext)(null);
11982
+ var import_react60 = require("react");
11983
+ var TabsValueContext = (0, import_react60.createContext)(null);
11978
11984
  var TabsValueProvider = TabsValueContext.Provider;
11979
11985
  var useTabsValue = () => {
11980
- const context = (0, import_react59.useContext)(TabsValueContext);
11986
+ const context = (0, import_react60.useContext)(TabsValueContext);
11981
11987
  if (context === null) {
11982
11988
  throw new Error("useTabsValue must be used within a TabsValueProvider");
11983
11989
  }
@@ -11993,13 +11999,13 @@ var StyledTabItem = (0, import_styled_components84.default)(import_react_tabs3.T
11993
11999
  outline: none;
11994
12000
  }
11995
12001
  `;
11996
- var TabItem = (0, import_react60.forwardRef)(
12002
+ var TabItem = (0, import_react61.forwardRef)(
11997
12003
  ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11998
12004
  const selectedValue = useTabsValue();
11999
12005
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
12000
- const buttonRef = (0, import_react60.useRef)(null);
12006
+ const buttonRef = (0, import_react61.useRef)(null);
12001
12007
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
12002
- (0, import_react60.useEffect)(() => {
12008
+ (0, import_react61.useEffect)(() => {
12003
12009
  const buttonElem = buttonRef.current;
12004
12010
  if (!buttonElem) {
12005
12011
  return void 0;
@@ -12043,16 +12049,16 @@ var TabItem = (0, import_react60.forwardRef)(
12043
12049
  TabItem.displayName = "TabItem";
12044
12050
 
12045
12051
  // src/components/Tabs/extractTabItems.ts
12046
- var import_react61 = require("react");
12052
+ var import_react62 = require("react");
12047
12053
  var extractTabItems = (children) => {
12048
12054
  const tabItems = [];
12049
- import_react61.Children.forEach(children, (child) => {
12050
- if (!(0, import_react61.isValidElement)(child)) {
12055
+ import_react62.Children.forEach(children, (child) => {
12056
+ if (!(0, import_react62.isValidElement)(child)) {
12051
12057
  return;
12052
12058
  }
12053
12059
  if (typeof child.type !== "string" && child.type.displayName === "Tab") {
12054
12060
  tabItems.push(child);
12055
- } else if (child.type === import_react61.Fragment) {
12061
+ } else if (child.type === import_react62.Fragment) {
12056
12062
  const fragmentElement = child;
12057
12063
  tabItems.push(...extractTabItems(fragmentElement.props.children));
12058
12064
  } else if ((child.props.children ?? null) != null) {
@@ -12099,7 +12105,7 @@ var StyledTabsRoot = (0, import_styled_components86.default)(import_react_tabs4.
12099
12105
  flex-direction: column;
12100
12106
  height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
12101
12107
  `;
12102
- var Tabs = (0, import_react62.forwardRef)(
12108
+ var Tabs = (0, import_react63.forwardRef)(
12103
12109
  ({
12104
12110
  children,
12105
12111
  fullWidth = true,
@@ -12111,7 +12117,7 @@ var Tabs = (0, import_react62.forwardRef)(
12111
12117
  ...props
12112
12118
  }, ref) => {
12113
12119
  const tabItems = extractTabItems(children);
12114
- const [internalSelectedValue, setInternalSelectedValue] = (0, import_react62.useState)(defaultSelectedValue);
12120
+ const [internalSelectedValue, setInternalSelectedValue] = (0, import_react63.useState)(defaultSelectedValue);
12115
12121
  const modeProps = defaultSelectedValue !== void 0 ? {
12116
12122
  defaultValue: defaultSelectedValue,
12117
12123
  onValueChange: setInternalSelectedValue
@@ -12197,15 +12203,15 @@ var Tabs = (0, import_react62.forwardRef)(
12197
12203
  Tabs.displayName = "Tabs";
12198
12204
 
12199
12205
  // src/components/Tabs/Tab.tsx
12200
- var import_react63 = require("react");
12206
+ var import_react64 = require("react");
12201
12207
  var import_jsx_runtime267 = require("react/jsx-runtime");
12202
- var Tab = (0, import_react63.forwardRef)(({ children }, ref) => {
12208
+ var Tab = (0, import_react64.forwardRef)(({ children }, ref) => {
12203
12209
  return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)("div", { ref, children });
12204
12210
  });
12205
12211
  Tab.displayName = "Tab";
12206
12212
 
12207
12213
  // src/components/Tag/Tag.tsx
12208
- var import_react64 = require("react");
12214
+ var import_react65 = require("react");
12209
12215
  var import_styled_components87 = __toESM(require("styled-components"));
12210
12216
  var import_type_guards51 = require("@wistia/type-guards");
12211
12217
  var import_jsx_runtime268 = require("react/jsx-runtime");
@@ -12322,7 +12328,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12322
12328
  )
12323
12329
  ] });
12324
12330
  };
12325
- var Tag = (0, import_react64.forwardRef)(
12331
+ var Tag = (0, import_react65.forwardRef)(
12326
12332
  ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
12327
12333
  const hasIcon = (0, import_type_guards51.isNotNil)(icon);
12328
12334
  const labelProps = (0, import_type_guards51.isNotNil)(href) && (0, import_type_guards51.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
@@ -12396,7 +12402,7 @@ var ThumbnailBadge = ({ icon, label, ...props }) => {
12396
12402
  ThumbnailBadge.displayName = "ThumbnailBadge";
12397
12403
 
12398
12404
  // src/components/Thumbnail/Thumbnail.tsx
12399
- var import_react65 = require("react");
12405
+ var import_react66 = require("react");
12400
12406
  var import_styled_components90 = __toESM(require("styled-components"));
12401
12407
  var import_type_guards54 = require("@wistia/type-guards");
12402
12408
 
@@ -12583,7 +12589,7 @@ var StyledThumbnail = import_styled_components90.default.div`
12583
12589
  border-radius: calc(8% * (9 / 16)) / 8%;
12584
12590
  }
12585
12591
  `;
12586
- var Thumbnail = (0, import_react65.forwardRef)(
12592
+ var Thumbnail = (0, import_react66.forwardRef)(
12587
12593
  ({
12588
12594
  gradientBackground = "defaultMidOne",
12589
12595
  thumbnailImageType = "square",
@@ -12619,7 +12625,7 @@ var Thumbnail = (0, import_react65.forwardRef)(
12619
12625
  Thumbnail.displayName = "Thumbnail";
12620
12626
 
12621
12627
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
12622
- var import_react66 = __toESM(require("react"));
12628
+ var import_react67 = __toESM(require("react"));
12623
12629
  var import_styled_components91 = __toESM(require("styled-components"));
12624
12630
  var import_type_guards55 = require("@wistia/type-guards");
12625
12631
  var import_jsx_runtime271 = (
@@ -12699,10 +12705,10 @@ var ThumbnailCollage = ({
12699
12705
  gradientBackground = "defaultMidOne",
12700
12706
  ...props
12701
12707
  }) => {
12702
- const thumbnailArray = import_react66.default.Children.toArray(children);
12708
+ const thumbnailArray = import_react67.default.Children.toArray(children);
12703
12709
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
12704
12710
  const thumbnails = (0, import_type_guards55.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
12705
- return import_react66.default.cloneElement(child, {
12711
+ return import_react67.default.cloneElement(child, {
12706
12712
  ...child.props,
12707
12713
  children: void 0
12708
12714
  });