@wistia/ui 0.8.12 → 0.8.13-beta.098b59ab.c299c8a

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.12
3
+ * @license @wistia/ui v0.8.13-beta.098b59ab.c299c8a
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -126,6 +126,7 @@ __export(index_exports, {
126
126
  useActiveMq: () => useActiveMq,
127
127
  useAriaLive: () => useAriaLive,
128
128
  useBoolean: () => useBoolean,
129
+ useClipboard: () => useClipboard,
129
130
  useFilePicker: () => import_use_file_picker.useFilePicker,
130
131
  useFocusTrap: () => useFocusTrap,
131
132
  useFormState: () => useFormState,
@@ -1274,6 +1275,7 @@ var colorAliasTokens = import_styled_components3.css`
1274
1275
  // src/css/designTokens/borderRadius.tsx
1275
1276
  var import_styled_components4 = require("styled-components");
1276
1277
  var borderRadiusTokens = import_styled_components4.css`
1278
+ --wui-border-radius-00: 0;
1277
1279
  --wui-border-radius-01: 4px;
1278
1280
  --wui-border-radius-02: 8px;
1279
1281
  --wui-border-radius-03: 16px;
@@ -2099,20 +2101,287 @@ var useBoolean = (initialValue = false) => {
2099
2101
  return [value, toggle, setTrue, setFalse, setValue];
2100
2102
  };
2101
2103
 
2104
+ // src/hooks/useClipboard/useClipboard.ts
2105
+ var import_react7 = require("react");
2106
+
2107
+ // src/private/hooks/useTimedToggle/useTimedToggle.ts
2108
+ var import_react6 = require("react");
2109
+ var useTimedToggle = (initialValue) => {
2110
+ const [value, setValue] = (0, import_react6.useState)(false);
2111
+ const timeoutRef = (0, import_react6.useRef)();
2112
+ const initialValueRef = (0, import_react6.useRef)(initialValue);
2113
+ const toggleValue = (timeout) => {
2114
+ clearTimeout(timeoutRef.current);
2115
+ setValue(!initialValueRef.current);
2116
+ timeoutRef.current = window.setTimeout(() => setValue(initialValueRef.current), timeout);
2117
+ };
2118
+ (0, import_react6.useEffect)(() => () => clearTimeout(timeoutRef.current), []);
2119
+ return [value, toggleValue];
2120
+ };
2121
+
2122
+ // src/hooks/useClipboard/useClipboard.ts
2123
+ var useClipboard = (textToCopy, timeout = 1500) => {
2124
+ const [hasCopied, toggleHasCopied] = useTimedToggle(false);
2125
+ const [failedToCopy, toggleFailedToCopy] = useTimedToggle(false);
2126
+ const onCopy = (0, import_react7.useCallback)(async () => {
2127
+ try {
2128
+ await copyToClipboard(textToCopy);
2129
+ if (timeout && timeout > 0) {
2130
+ toggleHasCopied(timeout);
2131
+ }
2132
+ } catch (error) {
2133
+ if (error instanceof Error) {
2134
+ toggleFailedToCopy(timeout);
2135
+ }
2136
+ }
2137
+ }, [textToCopy, timeout, toggleHasCopied, toggleFailedToCopy]);
2138
+ return [onCopy, hasCopied, failedToCopy];
2139
+ };
2140
+
2102
2141
  // src/hooks/useFilePicker/index.ts
2103
2142
  var import_use_file_picker = require("use-file-picker");
2104
2143
  var import_validators = require("use-file-picker/validators");
2105
2144
 
2145
+ // src/hooks/useFocusTrap/useFocusTrap.ts
2146
+ var import_react8 = require("react");
2147
+ var import_type_guards7 = require("@wistia/type-guards");
2148
+
2149
+ // src/hooks/useFocusTrap/helpers.ts
2150
+ var FOCUSABLE_ELEMENT_SELECTORS = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, [tabindex="0"], [contenteditable]';
2151
+ var coerceToString = (value) => value === null || value === void 0 ? "" : String(value);
2152
+ var isHiddenElement = (element) => {
2153
+ const { display, visibility } = window.getComputedStyle(element);
2154
+ const isHidden = display === "none" || element.style.display === "none" || visibility === "none" || element.style.visibility === "hidden";
2155
+ return element.offsetWidth <= 0 && element.offsetHeight <= 0 || isHidden;
2156
+ };
2157
+ var isVisibleElement = (element) => {
2158
+ let parentElement = element;
2159
+ while (parentElement) {
2160
+ if (parentElement === document.body) {
2161
+ break;
2162
+ }
2163
+ if (isHiddenElement(parentElement)) {
2164
+ return false;
2165
+ }
2166
+ parentElement = parentElement.parentNode;
2167
+ }
2168
+ return true;
2169
+ };
2170
+ var getElementTabIndex = (element) => {
2171
+ const tabIndex = element.getAttribute("tabindex");
2172
+ return Number.parseInt(tabIndex ?? void 0, 10);
2173
+ };
2174
+ var isTabIndexNaN = (element) => {
2175
+ const tabIndex = getElementTabIndex(element);
2176
+ return Number.isNaN(tabIndex);
2177
+ };
2178
+ var isFocusableElement = (element) => {
2179
+ const tabbableNodeRegEx = /input|select|textarea|button|object/;
2180
+ const nodeName = element.nodeName.toLowerCase();
2181
+ const isTabIndexNotNaN = !isTabIndexNaN(element);
2182
+ const isFocusable = (
2183
+ // @ts-expect-error - Disabled is specific to buttons and inputs, but we could be dealing with any number of types here. Disabled would be undefined for those, so ignoring.
2184
+ tabbableNodeRegEx.test(nodeName) && !element.disabled || (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN)
2185
+ );
2186
+ return Boolean(isFocusable) && isVisibleElement(element);
2187
+ };
2188
+ var isTabbableElement = (element) => {
2189
+ const tabIndex = getElementTabIndex(element);
2190
+ return (isTabIndexNaN(element) || tabIndex >= 0) && isFocusableElement(element);
2191
+ };
2192
+ var findTabbableDescendants = (element) => Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter(
2193
+ isTabbableElement
2194
+ );
2195
+ var focusLaterElements = [];
2196
+ var focusElement = null;
2197
+ var needToFocus = false;
2198
+ var handleBlur = () => {
2199
+ needToFocus = true;
2200
+ };
2201
+ var handleFocus = () => {
2202
+ if (needToFocus) {
2203
+ needToFocus = false;
2204
+ if (!focusElement) {
2205
+ return;
2206
+ }
2207
+ if (focusElement.contains(document.activeElement)) {
2208
+ return;
2209
+ }
2210
+ const element = findTabbableDescendants(focusElement)[0] ?? focusElement;
2211
+ element.focus();
2212
+ }
2213
+ };
2214
+ var markForFocusLater = () => {
2215
+ const element = document.activeElement;
2216
+ if (element !== null) {
2217
+ focusLaterElements.push(element);
2218
+ }
2219
+ };
2220
+ var returnFocus = () => {
2221
+ let toFocus = null;
2222
+ try {
2223
+ toFocus = focusLaterElements.pop();
2224
+ if (toFocus) {
2225
+ toFocus.focus();
2226
+ }
2227
+ } catch {
2228
+ console.warn(
2229
+ `You tried to return focus to ${coerceToString(toFocus)} but it is not in the DOM anymore`
2230
+ );
2231
+ }
2232
+ };
2233
+ var setupScopedFocus = (element) => {
2234
+ focusElement = element;
2235
+ document.addEventListener("focusout", handleBlur, false);
2236
+ document.addEventListener("focusin", handleFocus, true);
2237
+ };
2238
+ var teardownScopedFocus = () => {
2239
+ focusElement = null;
2240
+ document.removeEventListener("focusout", handleBlur);
2241
+ document.removeEventListener("focusin", handleFocus);
2242
+ };
2243
+ var scopeTab = (node, event) => {
2244
+ const tabbable = findTabbableDescendants(node);
2245
+ if (!tabbable.length) {
2246
+ event.preventDefault();
2247
+ return;
2248
+ }
2249
+ const finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];
2250
+ const leavingFinalTabbable = finalTabbable === document.activeElement || node === document.activeElement;
2251
+ if (!leavingFinalTabbable) {
2252
+ return;
2253
+ }
2254
+ event.preventDefault();
2255
+ const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];
2256
+ if (target) {
2257
+ target.focus();
2258
+ }
2259
+ };
2260
+ var createAriaHider = (containerNode, selector) => {
2261
+ selector ??= "body > :not(script)";
2262
+ const rootNodes = Array.from(document.querySelectorAll(selector)).map((node) => {
2263
+ if (node.contains(containerNode)) {
2264
+ return void 0;
2265
+ }
2266
+ const ariaHidden = node.getAttribute("aria-hidden");
2267
+ if (ariaHidden === null || ariaHidden === "false") {
2268
+ node.setAttribute("aria-hidden", "true");
2269
+ }
2270
+ return {
2271
+ node,
2272
+ ariaHidden
2273
+ };
2274
+ });
2275
+ return () => {
2276
+ rootNodes.forEach((item) => {
2277
+ if (!item) {
2278
+ return;
2279
+ }
2280
+ if (item.ariaHidden === null) {
2281
+ item.node.removeAttribute("aria-hidden");
2282
+ } else {
2283
+ item.node.setAttribute("aria-hidden", item.ariaHidden);
2284
+ }
2285
+ });
2286
+ };
2287
+ };
2288
+
2289
+ // src/hooks/useFocusTrap/useFocusTrap.ts
2290
+ var isRef = (val) => {
2291
+ return val !== null && typeof val === "object" && "current" in val;
2292
+ };
2293
+ var useFocusTrap = (active = true, options = {}) => {
2294
+ const ref = (0, import_react8.useRef)(null);
2295
+ const restoreAriaRef = (0, import_react8.useRef)(null);
2296
+ const setRef = (0, import_react8.useCallback)(
2297
+ (node) => {
2298
+ if (restoreAriaRef.current !== null) {
2299
+ restoreAriaRef.current();
2300
+ }
2301
+ if (ref.current) {
2302
+ returnFocus();
2303
+ teardownScopedFocus();
2304
+ }
2305
+ if (active && node !== null && node !== void 0) {
2306
+ setupScopedFocus(node);
2307
+ markForFocusLater();
2308
+ const processNode = (node2) => {
2309
+ restoreAriaRef.current = !(options.disableAriaHider ?? false) ? createAriaHider(node2) : null;
2310
+ let focusElement2 = null;
2311
+ if ((0, import_type_guards7.isNotUndefined)(options.focusSelector)) {
2312
+ if (isRef(options.focusSelector)) {
2313
+ focusElement2 = options.focusSelector.current;
2314
+ } else {
2315
+ focusElement2 = typeof options.focusSelector === "string" ? node2.querySelector(options.focusSelector) : options.focusSelector;
2316
+ }
2317
+ }
2318
+ if (!focusElement2) {
2319
+ const children = Array.from(
2320
+ node2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)
2321
+ );
2322
+ focusElement2 = // Prefer tabbable elements, But fallback to any focusable element
2323
+ children.find(isTabbableElement) ?? // But fallback to any focusable element
2324
+ children.find(isFocusableElement) ?? // Nothing found
2325
+ null;
2326
+ if (!focusElement2 && isFocusableElement(node2)) {
2327
+ focusElement2 = node2;
2328
+ }
2329
+ }
2330
+ if (focusElement2) {
2331
+ focusElement2.focus();
2332
+ }
2333
+ if (!focusElement2 && process.env["NODE_ENV"] === "development") {
2334
+ console.warn(
2335
+ '[useFocusTrap]: Failed to find a focusable element after activating the focus trap. Make sure to include at an element that can recieve focus. As a fallback, you can also set "tabIndex={-1}" on the focus trap node.',
2336
+ node2
2337
+ );
2338
+ }
2339
+ };
2340
+ setTimeout(() => {
2341
+ if (node.ownerDocument) {
2342
+ processNode(node);
2343
+ }
2344
+ if (!node.ownerDocument && process.env["NODE_ENV"] === "development") {
2345
+ console.warn(
2346
+ "[useFocusTrap]: The focus trap is not part of the DOM yet, so it is unable to correctly set focus. Make sure to render the ref node.",
2347
+ node
2348
+ );
2349
+ }
2350
+ });
2351
+ ref.current = node;
2352
+ } else {
2353
+ ref.current = null;
2354
+ }
2355
+ },
2356
+ [active, options.focusSelector, options.disableAriaHider]
2357
+ );
2358
+ (0, import_react8.useEffect)(() => {
2359
+ if (!active) {
2360
+ return void 0;
2361
+ }
2362
+ const handleKeyDown = (event) => {
2363
+ if (event.key === "Tab" && ref.current) {
2364
+ scopeTab(ref.current, event);
2365
+ }
2366
+ };
2367
+ document.addEventListener("keydown", handleKeyDown);
2368
+ return () => {
2369
+ document.removeEventListener("keydown", handleKeyDown);
2370
+ };
2371
+ }, [active]);
2372
+ return setRef;
2373
+ };
2374
+
2106
2375
  // src/hooks/useKey/useKey.ts
2107
- var import_react7 = require("react");
2376
+ var import_react10 = require("react");
2108
2377
 
2109
2378
  // src/private/hooks/useEvent/useEvent.ts
2110
- var import_react6 = require("react");
2379
+ var import_react9 = require("react");
2111
2380
 
2112
2381
  // src/private/helpers/isValidRef/isValidRef.ts
2113
- var import_type_guards7 = require("@wistia/type-guards");
2382
+ var import_type_guards8 = require("@wistia/type-guards");
2114
2383
  var isValidRef = (value) => {
2115
- return (0, import_type_guards7.isNotNil)(value) && (0, import_type_guards7.isRecord)(value) && "current" in value;
2384
+ return (0, import_type_guards8.isNotNil)(value) && (0, import_type_guards8.isRecord)(value) && "current" in value;
2116
2385
  };
2117
2386
 
2118
2387
  // src/private/helpers/noOpFn/noOpFn.ts
@@ -2126,15 +2395,15 @@ var isEventTargetSupported = (eventTarget) => (
2126
2395
  !!(typeof eventTarget === "object" && eventTarget?.addEventListener)
2127
2396
  );
2128
2397
  var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
2129
- const savedEventHandler = (0, import_react6.useRef)();
2130
- const savedEventOptions = (0, import_react6.useRef)();
2131
- (0, import_react6.useEffect)(() => {
2398
+ const savedEventHandler = (0, import_react9.useRef)();
2399
+ const savedEventOptions = (0, import_react9.useRef)();
2400
+ (0, import_react9.useEffect)(() => {
2132
2401
  savedEventHandler.current = eventHandler;
2133
2402
  }, [eventHandler]);
2134
- (0, import_react6.useEffect)(() => {
2403
+ (0, import_react9.useEffect)(() => {
2135
2404
  savedEventOptions.current = eventOptions;
2136
2405
  }, [eventOptions]);
2137
- (0, import_react6.useEffect)(() => {
2406
+ (0, import_react9.useEffect)(() => {
2138
2407
  const target = isValidRef(eventTarget) ? eventTarget.current : eventTarget;
2139
2408
  if (!eventName || !isEventTargetSupported(target)) {
2140
2409
  return;
@@ -2154,7 +2423,7 @@ var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}
2154
2423
 
2155
2424
  // src/hooks/useKey/useKey.ts
2156
2425
  var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOptions } = {}) => {
2157
- const memoizedEventHandler = (0, import_react7.useCallback)(
2426
+ const memoizedEventHandler = (0, import_react10.useCallback)(
2158
2427
  (handlerEvent) => {
2159
2428
  if (["INPUT", "TEXTAREA", "SELECT"].includes(document.activeElement?.nodeName ?? "") || document.activeElement?.isContentEditable) {
2160
2429
  return;
@@ -2179,9 +2448,9 @@ var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOpti
2179
2448
  };
2180
2449
 
2181
2450
  // src/hooks/useLocalStorage/useLocalStorage.ts
2182
- var import_react8 = require("react");
2451
+ var import_react11 = require("react");
2183
2452
  var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
2184
- const [storedValue, setStoredValue] = (0, import_react8.useState)(() => {
2453
+ const [storedValue, setStoredValue] = (0, import_react11.useState)(() => {
2185
2454
  try {
2186
2455
  const item = storage.getItem(key);
2187
2456
  return item !== null && !!item ? JSON.parse(item) : initialValue;
@@ -2207,9 +2476,9 @@ var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
2207
2476
  };
2208
2477
 
2209
2478
  // src/hooks/useLockBodyScroll/useLockBodyScroll.ts
2210
- var import_react9 = require("react");
2479
+ var import_react12 = require("react");
2211
2480
  var useLockBodyScroll = (locked) => {
2212
- (0, import_react9.useLayoutEffect)(() => {
2481
+ (0, import_react12.useLayoutEffect)(() => {
2213
2482
  if (locked) {
2214
2483
  const originalStyle = window.getComputedStyle(document.body).overflow;
2215
2484
  document.body.style.overflow = "hidden";
@@ -2221,40 +2490,11 @@ var useLockBodyScroll = (locked) => {
2221
2490
  }, [locked]);
2222
2491
  };
2223
2492
 
2224
- // src/hooks/useOnClickOutside/useOnClickOutside.ts
2225
- var import_react10 = require("react");
2226
- var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) => {
2227
- (0, import_react10.useEffect)(() => {
2228
- const listener = (event) => {
2229
- if (!ref.current || ref.current.contains(event.target)) {
2230
- return;
2231
- }
2232
- handler(event);
2233
- };
2234
- if (Array.isArray(eventTypes)) {
2235
- eventTypes.forEach((eventType) => {
2236
- document.addEventListener(eventType, listener);
2237
- });
2238
- } else {
2239
- document.addEventListener(eventTypes, listener);
2240
- }
2241
- return () => {
2242
- if (Array.isArray(eventTypes)) {
2243
- eventTypes.forEach((eventType) => {
2244
- document.removeEventListener(eventType, listener);
2245
- });
2246
- } else {
2247
- document.removeEventListener(eventTypes, listener);
2248
- }
2249
- };
2250
- }, [ref, handler, eventTypes]);
2251
- };
2252
-
2253
2493
  // src/hooks/useMq/useMq.ts
2254
- var import_type_guards8 = require("@wistia/type-guards");
2494
+ var import_type_guards9 = require("@wistia/type-guards");
2255
2495
 
2256
2496
  // src/hooks/useWindowSize/useWindowSize.ts
2257
- var import_react11 = require("react");
2497
+ var import_react13 = require("react");
2258
2498
  var import_throttle_debounce = require("throttle-debounce");
2259
2499
 
2260
2500
  // src/private/helpers/isClient/isClient.ts
@@ -2262,11 +2502,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
2262
2502
 
2263
2503
  // src/hooks/useWindowSize/useWindowSize.ts
2264
2504
  var useWindowSize = (interval = 0) => {
2265
- const [dimensions, setDimensions] = (0, import_react11.useState)({
2505
+ const [dimensions, setDimensions] = (0, import_react13.useState)({
2266
2506
  width: isClient() ? window.innerWidth : 0,
2267
2507
  height: isClient() ? window.innerHeight : 0
2268
2508
  });
2269
- (0, import_react11.useLayoutEffect)(() => {
2509
+ (0, import_react13.useLayoutEffect)(() => {
2270
2510
  const handleResize = (0, import_throttle_debounce.debounce)(
2271
2511
  interval,
2272
2512
  () => setDimensions({
@@ -2313,21 +2553,50 @@ var useActiveMq = () => {
2313
2553
  const keys = Object.keys(mq2);
2314
2554
  return keys.filter((key) => {
2315
2555
  const value = mq2[key];
2316
- return (0, import_type_guards8.isBoolean)(value) && value;
2556
+ return (0, import_type_guards9.isBoolean)(value) && value;
2317
2557
  });
2318
2558
  };
2319
2559
 
2560
+ // src/hooks/useOnClickOutside/useOnClickOutside.ts
2561
+ var import_react14 = require("react");
2562
+ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) => {
2563
+ (0, import_react14.useEffect)(() => {
2564
+ const listener = (event) => {
2565
+ if (!ref.current || ref.current.contains(event.target)) {
2566
+ return;
2567
+ }
2568
+ handler(event);
2569
+ };
2570
+ if (Array.isArray(eventTypes)) {
2571
+ eventTypes.forEach((eventType) => {
2572
+ document.addEventListener(eventType, listener);
2573
+ });
2574
+ } else {
2575
+ document.addEventListener(eventTypes, listener);
2576
+ }
2577
+ return () => {
2578
+ if (Array.isArray(eventTypes)) {
2579
+ eventTypes.forEach((eventType) => {
2580
+ document.removeEventListener(eventType, listener);
2581
+ });
2582
+ } else {
2583
+ document.removeEventListener(eventTypes, listener);
2584
+ }
2585
+ };
2586
+ }, [ref, handler, eventTypes]);
2587
+ };
2588
+
2320
2589
  // src/hooks/useToast/useToast.tsx
2321
- var import_react13 = require("react");
2590
+ var import_react16 = require("react");
2322
2591
  var import_sonner2 = require("sonner");
2323
2592
 
2324
2593
  // src/private/components/Toast/Toast.tsx
2325
- var import_react12 = require("react");
2594
+ var import_react15 = require("react");
2326
2595
  var import_styled_components16 = __toESM(require("styled-components"));
2327
- var import_type_guards10 = require("@wistia/type-guards");
2596
+ var import_type_guards11 = require("@wistia/type-guards");
2328
2597
 
2329
2598
  // src/components/Ellipsis/Ellipsis.tsx
2330
- var import_type_guards9 = require("@wistia/type-guards");
2599
+ var import_type_guards10 = require("@wistia/type-guards");
2331
2600
  var import_styled_components14 = __toESM(require("styled-components"));
2332
2601
 
2333
2602
  // src/css/lineClampCss.tsx
@@ -2371,7 +2640,7 @@ var ellipsisFlexParentStyle = import_styled_components14.css`
2371
2640
  var EllipsisComponent = import_styled_components14.default.span`
2372
2641
  ${ellipsisStyle};
2373
2642
  ${({ $lines }) => {
2374
- if ((0, import_type_guards9.isNotNil)($lines)) {
2643
+ if ((0, import_type_guards10.isNotNil)($lines)) {
2375
2644
  return lineClampCss($lines);
2376
2645
  }
2377
2646
  return void 0;
@@ -2560,302 +2829,70 @@ var StyledToast = import_styled_components16.default.div`
2560
2829
  }
2561
2830
  `;
2562
2831
  var Action = ({ 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, {
2832
+ if ((0, import_type_guards11.isNotNil)(actionButton) && (0, import_react15.isValidElement)(actionButton)) {
2833
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react15.cloneElement)(actionButton, {
2565
2834
  variant: "soft",
2566
2835
  // force Button variant
2567
2836
  size: "sm"
2568
2837
  // force Button size
2569
2838
  }) });
2570
2839
  }
2571
- return null;
2572
- };
2573
- var Toast = ({
2574
- action,
2575
- message,
2576
- colorScheme = "inherit",
2577
- icon,
2578
- ...props
2579
- }) => {
2580
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2581
- StyledToast,
2582
- {
2583
- ...props,
2584
- $colorScheme: colorScheme,
2585
- children: [
2586
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(MessageWrapper, { children: [
2587
- (0, import_type_guards10.isNotNil)(icon) ? icon : null,
2588
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Message, { lines: 3, children: message })
2589
- ] }),
2590
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Action, { actionButton: action })
2591
- ]
2592
- }
2593
- );
2594
- };
2595
- Toast.displayName = "Toast";
2596
-
2597
- // src/hooks/useToast/useToast.tsx
2598
- var import_jsx_runtime6 = require("react/jsx-runtime");
2599
- var useToast = () => {
2600
- return (0, import_react13.useCallback)(
2601
- ({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
2602
- import_sonner2.toast.custom(
2603
- () => {
2604
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2605
- Toast,
2606
- {
2607
- action,
2608
- colorScheme,
2609
- icon,
2610
- message
2611
- }
2612
- );
2613
- },
2614
- { position, duration }
2615
- );
2616
- },
2617
- []
2618
- );
2619
- };
2620
-
2621
- // src/hooks/useFocusTrap/useFocusTrap.ts
2622
- var import_react14 = require("react");
2623
- var import_type_guards11 = require("@wistia/type-guards");
2624
-
2625
- // src/hooks/useFocusTrap/helpers.ts
2626
- var FOCUSABLE_ELEMENT_SELECTORS = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, [tabindex="0"], [contenteditable]';
2627
- var coerceToString = (value) => value === null || value === void 0 ? "" : String(value);
2628
- var isHiddenElement = (element) => {
2629
- const { display, visibility } = window.getComputedStyle(element);
2630
- const isHidden = display === "none" || element.style.display === "none" || visibility === "none" || element.style.visibility === "hidden";
2631
- return element.offsetWidth <= 0 && element.offsetHeight <= 0 || isHidden;
2632
- };
2633
- var isVisibleElement = (element) => {
2634
- let parentElement = element;
2635
- while (parentElement) {
2636
- if (parentElement === document.body) {
2637
- break;
2638
- }
2639
- if (isHiddenElement(parentElement)) {
2640
- return false;
2641
- }
2642
- parentElement = parentElement.parentNode;
2643
- }
2644
- return true;
2645
- };
2646
- var getElementTabIndex = (element) => {
2647
- const tabIndex = element.getAttribute("tabindex");
2648
- return Number.parseInt(tabIndex ?? void 0, 10);
2649
- };
2650
- var isTabIndexNaN = (element) => {
2651
- const tabIndex = getElementTabIndex(element);
2652
- return Number.isNaN(tabIndex);
2653
- };
2654
- var isFocusableElement = (element) => {
2655
- const tabbableNodeRegEx = /input|select|textarea|button|object/;
2656
- const nodeName = element.nodeName.toLowerCase();
2657
- const isTabIndexNotNaN = !isTabIndexNaN(element);
2658
- const isFocusable = (
2659
- // @ts-expect-error - Disabled is specific to buttons and inputs, but we could be dealing with any number of types here. Disabled would be undefined for those, so ignoring.
2660
- tabbableNodeRegEx.test(nodeName) && !element.disabled || (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN)
2661
- );
2662
- return Boolean(isFocusable) && isVisibleElement(element);
2663
- };
2664
- var isTabbableElement = (element) => {
2665
- const tabIndex = getElementTabIndex(element);
2666
- return (isTabIndexNaN(element) || tabIndex >= 0) && isFocusableElement(element);
2667
- };
2668
- var findTabbableDescendants = (element) => Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter(
2669
- isTabbableElement
2670
- );
2671
- var focusLaterElements = [];
2672
- var focusElement = null;
2673
- var needToFocus = false;
2674
- var handleBlur = () => {
2675
- needToFocus = true;
2676
- };
2677
- var handleFocus = () => {
2678
- if (needToFocus) {
2679
- needToFocus = false;
2680
- if (!focusElement) {
2681
- return;
2682
- }
2683
- if (focusElement.contains(document.activeElement)) {
2684
- return;
2685
- }
2686
- const element = findTabbableDescendants(focusElement)[0] ?? focusElement;
2687
- element.focus();
2688
- }
2689
- };
2690
- var markForFocusLater = () => {
2691
- const element = document.activeElement;
2692
- if (element !== null) {
2693
- focusLaterElements.push(element);
2694
- }
2695
- };
2696
- var returnFocus = () => {
2697
- let toFocus = null;
2698
- try {
2699
- toFocus = focusLaterElements.pop();
2700
- if (toFocus) {
2701
- toFocus.focus();
2702
- }
2703
- } catch {
2704
- console.warn(
2705
- `You tried to return focus to ${coerceToString(toFocus)} but it is not in the DOM anymore`
2706
- );
2707
- }
2708
- };
2709
- var setupScopedFocus = (element) => {
2710
- focusElement = element;
2711
- document.addEventListener("focusout", handleBlur, false);
2712
- document.addEventListener("focusin", handleFocus, true);
2713
- };
2714
- var teardownScopedFocus = () => {
2715
- focusElement = null;
2716
- document.removeEventListener("focusout", handleBlur);
2717
- document.removeEventListener("focusin", handleFocus);
2718
- };
2719
- var scopeTab = (node, event) => {
2720
- const tabbable = findTabbableDescendants(node);
2721
- if (!tabbable.length) {
2722
- event.preventDefault();
2723
- return;
2724
- }
2725
- const finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];
2726
- const leavingFinalTabbable = finalTabbable === document.activeElement || node === document.activeElement;
2727
- if (!leavingFinalTabbable) {
2728
- return;
2729
- }
2730
- event.preventDefault();
2731
- const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];
2732
- if (target) {
2733
- target.focus();
2734
- }
2735
- };
2736
- var createAriaHider = (containerNode, selector) => {
2737
- if (selector === void 0) {
2738
- selector = "body > :not(script)";
2739
- }
2740
- const rootNodes = Array.from(document.querySelectorAll(selector)).map((node) => {
2741
- if (node.contains(containerNode)) {
2742
- return void 0;
2743
- }
2744
- const ariaHidden = node.getAttribute("aria-hidden");
2745
- if (ariaHidden === null || ariaHidden === "false") {
2746
- node.setAttribute("aria-hidden", "true");
2840
+ return null;
2841
+ };
2842
+ var Toast = ({
2843
+ action,
2844
+ message,
2845
+ colorScheme = "inherit",
2846
+ icon,
2847
+ ...props
2848
+ }) => {
2849
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2850
+ StyledToast,
2851
+ {
2852
+ ...props,
2853
+ $colorScheme: colorScheme,
2854
+ children: [
2855
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(MessageWrapper, { children: [
2856
+ (0, import_type_guards11.isNotNil)(icon) ? icon : null,
2857
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Message, { lines: 3, children: message })
2858
+ ] }),
2859
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Action, { actionButton: action })
2860
+ ]
2747
2861
  }
2748
- return {
2749
- node,
2750
- ariaHidden
2751
- };
2752
- });
2753
- return () => {
2754
- rootNodes.forEach((item) => {
2755
- if (!item) {
2756
- return;
2757
- }
2758
- if (item.ariaHidden === null) {
2759
- item.node.removeAttribute("aria-hidden");
2760
- } else {
2761
- item.node.setAttribute("aria-hidden", item.ariaHidden);
2762
- }
2763
- });
2764
- };
2862
+ );
2765
2863
  };
2864
+ Toast.displayName = "Toast";
2766
2865
 
2767
- // src/hooks/useFocusTrap/useFocusTrap.ts
2768
- var isRef = (val) => {
2769
- return val !== null && typeof val === "object" && "current" in val;
2770
- };
2771
- var useFocusTrap = (active = true, options = {}) => {
2772
- const ref = (0, import_react14.useRef)(null);
2773
- const restoreAriaRef = (0, import_react14.useRef)(null);
2774
- const setRef = (0, import_react14.useCallback)(
2775
- (node) => {
2776
- if (restoreAriaRef.current !== null) {
2777
- restoreAriaRef.current();
2778
- }
2779
- if (ref.current) {
2780
- returnFocus();
2781
- teardownScopedFocus();
2782
- }
2783
- if (active && node !== null && node !== void 0) {
2784
- setupScopedFocus(node);
2785
- markForFocusLater();
2786
- const processNode = (node2) => {
2787
- restoreAriaRef.current = !(options.disableAriaHider ?? false) ? createAriaHider(node2) : null;
2788
- let focusElement2 = null;
2789
- if ((0, import_type_guards11.isNotUndefined)(options.focusSelector)) {
2790
- if (isRef(options.focusSelector)) {
2791
- focusElement2 = options.focusSelector.current;
2792
- } else {
2793
- focusElement2 = typeof options.focusSelector === "string" ? node2.querySelector(options.focusSelector) : options.focusSelector;
2794
- }
2795
- }
2796
- if (!focusElement2) {
2797
- const children = Array.from(
2798
- node2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)
2799
- );
2800
- focusElement2 = // Prefer tabbable elements, But fallback to any focusable element
2801
- children.find(isTabbableElement) ?? // But fallback to any focusable element
2802
- children.find(isFocusableElement) ?? // Nothing found
2803
- null;
2804
- if (!focusElement2 && isFocusableElement(node2)) {
2805
- focusElement2 = node2;
2866
+ // src/hooks/useToast/useToast.tsx
2867
+ var import_jsx_runtime6 = require("react/jsx-runtime");
2868
+ var useToast = () => {
2869
+ return (0, import_react16.useCallback)(
2870
+ ({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
2871
+ import_sonner2.toast.custom(
2872
+ () => {
2873
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2874
+ Toast,
2875
+ {
2876
+ action,
2877
+ colorScheme,
2878
+ icon,
2879
+ message
2806
2880
  }
2807
- }
2808
- if (focusElement2) {
2809
- focusElement2.focus();
2810
- }
2811
- if (!focusElement2 && process.env["NODE_ENV"] === "development") {
2812
- console.warn(
2813
- '[useFocusTrap]: Failed to find a focusable element after activating the focus trap. Make sure to include at an element that can recieve focus. As a fallback, you can also set "tabIndex={-1}" on the focus trap node.',
2814
- node2
2815
- );
2816
- }
2817
- };
2818
- setTimeout(() => {
2819
- if (node.ownerDocument) {
2820
- processNode(node);
2821
- }
2822
- if (!node.ownerDocument && process.env["NODE_ENV"] === "development") {
2823
- console.warn(
2824
- "[useFocusTrap]: The focus trap is not part of the DOM yet, so it is unable to correctly set focus. Make sure to render the ref node.",
2825
- node
2826
- );
2827
- }
2828
- });
2829
- ref.current = node;
2830
- } else {
2831
- ref.current = null;
2832
- }
2881
+ );
2882
+ },
2883
+ { position, duration }
2884
+ );
2833
2885
  },
2834
- [active, options.focusSelector, options.disableAriaHider]
2886
+ []
2835
2887
  );
2836
- (0, import_react14.useEffect)(() => {
2837
- if (!active) {
2838
- return void 0;
2839
- }
2840
- const handleKeyDown = (event) => {
2841
- if (event.key === "Tab" && ref.current) {
2842
- scopeTab(ref.current, event);
2843
- }
2844
- };
2845
- document.addEventListener("keydown", handleKeyDown);
2846
- return () => {
2847
- document.removeEventListener("keydown", handleKeyDown);
2848
- };
2849
- }, [active]);
2850
- return setRef;
2851
2888
  };
2852
2889
 
2853
2890
  // src/components/ActionButton/ActionButton.tsx
2854
- var import_react18 = require("react");
2891
+ var import_react20 = require("react");
2855
2892
  var import_styled_components22 = __toESM(require("styled-components"));
2856
2893
 
2857
2894
  // src/components/Button/Button.tsx
2858
- var import_react17 = require("react");
2895
+ var import_react19 = require("react");
2859
2896
  var import_styled_components21 = __toESM(require("styled-components"));
2860
2897
  var import_type_guards15 = require("@wistia/type-guards");
2861
2898
 
@@ -6917,13 +6954,13 @@ var iconMap = {
6917
6954
 
6918
6955
  // src/private/hooks/useResponsiveProp/useResponsiveProp.ts
6919
6956
  var import_type_guards12 = require("@wistia/type-guards");
6920
- var import_react15 = require("react");
6957
+ var import_react17 = require("react");
6921
6958
  var isResponsiveObject = (values) => {
6922
6959
  return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
6923
6960
  };
6924
6961
  var useResponsiveProp = (values) => {
6925
6962
  const activeMediaQueries = useActiveMq();
6926
- return (0, import_react15.useMemo)(() => {
6963
+ return (0, import_react17.useMemo)(() => {
6927
6964
  if ((0, import_type_guards12.isRecord)(values) && isResponsiveObject(values)) {
6928
6965
  const mq2 = activeMediaQueries.find((key) => key in values);
6929
6966
  return (0, import_type_guards12.isNotUndefined)(mq2) && (0, import_type_guards12.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
@@ -6990,7 +7027,7 @@ var Icon = ({
6990
7027
  Icon.displayName = "Icon";
6991
7028
 
6992
7029
  // src/components/Link/Link.tsx
6993
- var import_react16 = require("react");
7030
+ var import_react18 = require("react");
6994
7031
  var import_styled_components20 = __toESM(require("styled-components"));
6995
7032
  var import_react_router_dom = require("react-router-dom");
6996
7033
  var import_type_guards14 = require("@wistia/type-guards");
@@ -7028,7 +7065,7 @@ var StyledLink = import_styled_components20.default.a`
7028
7065
  }
7029
7066
  }
7030
7067
  `;
7031
- var Link = (0, import_react16.forwardRef)(
7068
+ var Link = (0, import_react18.forwardRef)(
7032
7069
  ({
7033
7070
  beforeAction,
7034
7071
  children,
@@ -7169,7 +7206,7 @@ var ButtonContent = ({
7169
7206
  )
7170
7207
  ] });
7171
7208
  };
7172
- var Button = (0, import_react17.forwardRef)(
7209
+ var Button = (0, import_react19.forwardRef)(
7173
7210
  ({
7174
7211
  children,
7175
7212
  forceState,
@@ -7348,7 +7385,7 @@ var StyledLabel = import_styled_components22.default.span`
7348
7385
  grid-row: 2;
7349
7386
  text-align: left;
7350
7387
  `;
7351
- var ActionButton = (0, import_react18.forwardRef)(
7388
+ var ActionButton = (0, import_react20.forwardRef)(
7352
7389
  ({
7353
7390
  icon,
7354
7391
  colorScheme = "default",
@@ -7392,7 +7429,7 @@ var ActionButton = (0, import_react18.forwardRef)(
7392
7429
  ActionButton.displayName = "ActionButton";
7393
7430
 
7394
7431
  // src/components/Avatar/Avatar.tsx
7395
- var import_react19 = require("react");
7432
+ var import_react21 = require("react");
7396
7433
  var import_type_guards18 = require("@wistia/type-guards");
7397
7434
  var import_styled_components25 = __toESM(require("styled-components"));
7398
7435
 
@@ -7600,8 +7637,8 @@ var Avatar = ({
7600
7637
  onImageLoad,
7601
7638
  ...props
7602
7639
  }) => {
7603
- const [imageLoadState, setImageLoadState] = (0, import_react19.useState)("loading");
7604
- (0, import_react19.useEffect)(() => {
7640
+ const [imageLoadState, setImageLoadState] = (0, import_react21.useState)("loading");
7641
+ (0, import_react21.useEffect)(() => {
7605
7642
  setImageLoadState("loading");
7606
7643
  }, [imageUrl]);
7607
7644
  const handleImageLoad = () => {
@@ -7613,7 +7650,7 @@ var Avatar = ({
7613
7650
  onImageLoad?.({ state: "error", type: "initials" });
7614
7651
  };
7615
7652
  const avatarSize = heightAndWidth ?? avatarSizeMap[size];
7616
- const avatarColor = (0, import_react19.useMemo)(() => chooseColorScheme(name), [name]);
7653
+ const avatarColor = (0, import_react21.useMemo)(() => chooseColorScheme(name), [name]);
7617
7654
  return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
7618
7655
  AvatarWrapper,
7619
7656
  {
@@ -7640,7 +7677,7 @@ var Avatar = ({
7640
7677
  Avatar.displayName = "Avatar";
7641
7678
 
7642
7679
  // src/components/Badge/Badge.tsx
7643
- var import_react20 = require("react");
7680
+ var import_react22 = require("react");
7644
7681
  var import_styled_components26 = __toESM(require("styled-components"));
7645
7682
  var import_type_guards19 = require("@wistia/type-guards");
7646
7683
  var import_jsx_runtime198 = require("react/jsx-runtime");
@@ -7664,7 +7701,7 @@ var StyledBadge = import_styled_components26.default.div`
7664
7701
  width: 12px;
7665
7702
  }
7666
7703
  `;
7667
- var Badge = (0, import_react20.forwardRef)(
7704
+ var Badge = (0, import_react22.forwardRef)(
7668
7705
  ({ colorScheme = "inherit", label, icon, ...props }, ref) => {
7669
7706
  const hasIcon = (0, import_type_guards19.isNotNil)(icon);
7670
7707
  return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
@@ -7685,7 +7722,7 @@ var Badge = (0, import_react20.forwardRef)(
7685
7722
  Badge.displayName = "Badge";
7686
7723
 
7687
7724
  // src/components/Box/Box.tsx
7688
- var import_react21 = require("react");
7725
+ var import_react23 = require("react");
7689
7726
  var import_styled_components27 = __toESM(require("styled-components"));
7690
7727
  var import_type_guards20 = require("@wistia/type-guards");
7691
7728
 
@@ -7794,13 +7831,13 @@ var StyledBoxComponent = import_styled_components27.default.div`
7794
7831
  var wrapChildren = (children) => {
7795
7832
  if ((0, import_type_guards20.isNotNil)(children)) {
7796
7833
  if (typeof children === "object" && isDev) {
7797
- return import_react21.Children.map(children, (child) => {
7834
+ return import_react23.Children.map(children, (child) => {
7798
7835
  if ((0, import_type_guards20.isNil)(child)) return null;
7799
7836
  const elementParams = {};
7800
7837
  if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
7801
7838
  elementParams.hasBoxParent = true;
7802
7839
  }
7803
- return (0, import_react21.cloneElement)(child, elementParams);
7840
+ return (0, import_react23.cloneElement)(child, elementParams);
7804
7841
  });
7805
7842
  }
7806
7843
  return children;
@@ -7808,7 +7845,7 @@ var wrapChildren = (children) => {
7808
7845
  return null;
7809
7846
  };
7810
7847
  var DEFAULT_ELEMENT = "div";
7811
- var BoxComponent = (0, import_react21.forwardRef)(
7848
+ var BoxComponent = (0, import_react23.forwardRef)(
7812
7849
  ({
7813
7850
  alignContent = "stretch",
7814
7851
  alignItems = "flex-start",
@@ -7885,7 +7922,7 @@ BoxComponent.displayName = "Box";
7885
7922
  var Box = makePolymorphic(BoxComponent);
7886
7923
 
7887
7924
  // src/components/Breadcrumbs/Breadcrumbs.tsx
7888
- var import_react22 = require("react");
7925
+ var import_react24 = require("react");
7889
7926
  var import_styled_components28 = __toESM(require("styled-components"));
7890
7927
  var import_jsx_runtime200 = require("react/jsx-runtime");
7891
7928
  var StyledBreadcrumbs = import_styled_components28.default.nav`
@@ -7901,7 +7938,7 @@ var StyledBreadcrumbs = import_styled_components28.default.nav`
7901
7938
  var BUFFER_WIDTH = 10;
7902
7939
  var Breadcrumbs = ({ children, ...props }) => {
7903
7940
  const { isXsAndDown } = useMq();
7904
- let crumbs = import_react22.Children.toArray(children);
7941
+ let crumbs = import_react24.Children.toArray(children);
7905
7942
  if (isXsAndDown) {
7906
7943
  crumbs = crumbs.slice(-1);
7907
7944
  }
@@ -8040,7 +8077,7 @@ var StyledCard = (0, import_styled_components31.default)(Box)`
8040
8077
  background-color: ${({ $backgroundColor }) => $backgroundColor};
8041
8078
  outline: 2px solid ${({ $borderColor }) => $borderColor};
8042
8079
  outline-offset: -2px;
8043
- border-radius: var(--wui-border-radius-04);
8080
+ border-radius: ${({ $borderRadius }) => `var(--wui-${$borderRadius})`};
8044
8081
  display: flex;
8045
8082
  height: ${({ $height }) => $height};
8046
8083
  width: ${({ $width }) => $width};
@@ -8061,13 +8098,14 @@ var prominenceMap = {
8061
8098
  };
8062
8099
  var Card = ({
8063
8100
  children,
8064
- paddingSize = "space-04",
8065
- gap = "space-03",
8066
- direction = "column",
8067
- colorScheme = "inherit",
8068
- prominence = "secondary",
8069
8101
  border = false,
8102
+ borderRadius = "border-radius-04",
8103
+ colorScheme = "inherit",
8104
+ direction = "column",
8105
+ gap = "space-03",
8070
8106
  height,
8107
+ paddingSize = "space-04",
8108
+ prominence = "secondary",
8071
8109
  width,
8072
8110
  ...props
8073
8111
  }) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
@@ -8075,6 +8113,7 @@ var Card = ({
8075
8113
  {
8076
8114
  $backgroundColor: prominenceMap[prominence].backgroundColor,
8077
8115
  $borderColor: border ? prominenceMap[prominence].borderColor : "transparent",
8116
+ $borderRadius: borderRadius,
8078
8117
  $colorScheme: colorScheme,
8079
8118
  $height: height,
8080
8119
  $paddingSize: paddingSize,
@@ -8088,7 +8127,7 @@ var Card = ({
8088
8127
  Card.displayName = "Card";
8089
8128
 
8090
8129
  // src/components/Center/Center.tsx
8091
- var import_react23 = require("react");
8130
+ var import_react25 = require("react");
8092
8131
  var import_styled_components32 = __toESM(require("styled-components"));
8093
8132
  var import_jsx_runtime204 = require("react/jsx-runtime");
8094
8133
  var StyledCenter = import_styled_components32.default.div`
@@ -8103,7 +8142,7 @@ var StyledCenter = import_styled_components32.default.div`
8103
8142
  align-items: center;
8104
8143
  `}
8105
8144
  `;
8106
- var Center = (0, import_react23.forwardRef)(
8145
+ var Center = (0, import_react25.forwardRef)(
8107
8146
  ({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
8108
8147
  StyledCenter,
8109
8148
  {
@@ -8119,7 +8158,7 @@ var Center = (0, import_react23.forwardRef)(
8119
8158
  Center.displayName = "Center";
8120
8159
 
8121
8160
  // src/components/Checkbox/Checkbox.tsx
8122
- var import_react24 = require("react");
8161
+ var import_react26 = require("react");
8123
8162
  var import_styled_components36 = __toESM(require("styled-components"));
8124
8163
  var import_type_guards25 = require("@wistia/type-guards");
8125
8164
 
@@ -8339,7 +8378,7 @@ var StyledHiddenCheckboxInput = import_styled_components36.default.input`
8339
8378
  display: block;
8340
8379
  }
8341
8380
  `;
8342
- var Checkbox = (0, import_react24.forwardRef)(
8381
+ var Checkbox = (0, import_react26.forwardRef)(
8343
8382
  ({
8344
8383
  checked,
8345
8384
  disabled = false,
@@ -8354,7 +8393,7 @@ var Checkbox = (0, import_react24.forwardRef)(
8354
8393
  hideLabel = false,
8355
8394
  ...props
8356
8395
  }, ref) => {
8357
- const generatedId = (0, import_react24.useId)();
8396
+ const generatedId = (0, import_react26.useId)();
8358
8397
  const computedId = (0, import_type_guards25.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
8359
8398
  return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledCheckboxWrapper, { disabled, children: [
8360
8399
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
@@ -8397,9 +8436,9 @@ var Checkbox = (0, import_react24.forwardRef)(
8397
8436
  Checkbox.displayName = "Checkbox";
8398
8437
 
8399
8438
  // src/components/ClickRegion/ClickRegion.tsx
8400
- var import_react25 = require("react");
8439
+ var import_react27 = require("react");
8401
8440
  var ClickRegion = ({ children, targetRef }) => {
8402
- (0, import_react25.useEffect)(() => {
8441
+ (0, import_react27.useEffect)(() => {
8403
8442
  if (targetRef.current && targetRef.current.tagName === "A") {
8404
8443
  targetRef.current.setAttribute("data-click-region-target-link", "");
8405
8444
  } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
@@ -8407,7 +8446,7 @@ var ClickRegion = ({ children, targetRef }) => {
8407
8446
  } else {
8408
8447
  }
8409
8448
  }, [targetRef]);
8410
- const handleClick = (0, import_react25.useCallback)(
8449
+ const handleClick = (0, import_react27.useCallback)(
8411
8450
  (event) => {
8412
8451
  const node = targetRef.current;
8413
8452
  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 +8463,7 @@ var ClickRegion = ({ children, targetRef }) => {
8424
8463
  },
8425
8464
  [targetRef]
8426
8465
  );
8427
- return (0, import_react25.cloneElement)(import_react25.Children.only(children), {
8466
+ return (0, import_react27.cloneElement)(import_react27.Children.only(children), {
8428
8467
  "data-click-region": true,
8429
8468
  onClick: handleClick
8430
8469
  });
@@ -8457,11 +8496,11 @@ var Collapsible = ({
8457
8496
  Collapsible.displayName = "Collapsible";
8458
8497
 
8459
8498
  // src/components/Collapsible/CollapsibleTrigger.tsx
8460
- var import_react26 = require("react");
8499
+ var import_react28 = require("react");
8461
8500
  var import_react_collapsible2 = require("@radix-ui/react-collapsible");
8462
8501
  var import_jsx_runtime210 = require("react/jsx-runtime");
8463
8502
  var CollapsibleTrigger = ({ children }) => {
8464
- import_react26.Children.only(children);
8503
+ import_react28.Children.only(children);
8465
8504
  return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
8466
8505
  };
8467
8506
 
@@ -8488,7 +8527,7 @@ var import_styled_components40 = __toESM(require("styled-components"));
8488
8527
  var import_type_guards29 = require("@wistia/type-guards");
8489
8528
 
8490
8529
  // src/components/Heading/Heading.tsx
8491
- var import_react27 = require("react");
8530
+ var import_react29 = require("react");
8492
8531
  var import_styled_components39 = __toESM(require("styled-components"));
8493
8532
  var import_type_guards28 = require("@wistia/type-guards");
8494
8533
  var import_jsx_runtime212 = require("react/jsx-runtime");
@@ -8584,7 +8623,7 @@ var variantElementMap = {
8584
8623
  heading5: "h5",
8585
8624
  heading6: "h6"
8586
8625
  };
8587
- var HeadingComponent = (0, import_react27.forwardRef)(
8626
+ var HeadingComponent = (0, import_react29.forwardRef)(
8588
8627
  ({
8589
8628
  align = "left",
8590
8629
  colorScheme = "inherit",
@@ -8748,7 +8787,7 @@ DataCards.displayName = "DataCards";
8748
8787
  var import_styled_components43 = __toESM(require("styled-components"));
8749
8788
 
8750
8789
  // src/components/Text/Text.tsx
8751
- var import_react28 = require("react");
8790
+ var import_react30 = require("react");
8752
8791
  var import_styled_components42 = __toESM(require("styled-components"));
8753
8792
  var import_type_guards30 = require("@wistia/type-guards");
8754
8793
  var import_jsx_runtime215 = require("react/jsx-runtime");
@@ -8923,7 +8962,7 @@ var StyledText = import_styled_components42.default.div`
8923
8962
  }
8924
8963
  `}
8925
8964
  `;
8926
- var TextComponent = (0, import_react28.forwardRef)(
8965
+ var TextComponent = (0, import_react30.forwardRef)(
8927
8966
  ({
8928
8967
  align = "left",
8929
8968
  colorScheme = "inherit",
@@ -9036,7 +9075,7 @@ Divider.displayName = "Divider";
9036
9075
 
9037
9076
  // src/components/EditableHeading/EditableHeading.tsx
9038
9077
  var import_styled_components48 = __toESM(require("styled-components"));
9039
- var import_react30 = require("react");
9078
+ var import_react32 = require("react");
9040
9079
 
9041
9080
  // src/components/Tooltip/Tooltip.tsx
9042
9081
  var import_react_tooltip2 = require("@radix-ui/react-tooltip");
@@ -9134,7 +9173,7 @@ var Tooltip = ({
9134
9173
  Tooltip.displayName = "Tooltip";
9135
9174
 
9136
9175
  // src/components/Input/Input.tsx
9137
- var import_react29 = require("react");
9176
+ var import_react31 = require("react");
9138
9177
  var import_styled_components47 = __toESM(require("styled-components"));
9139
9178
  var import_type_guards31 = require("@wistia/type-guards");
9140
9179
 
@@ -9269,7 +9308,7 @@ var StyledInputContainer = import_styled_components47.default.div`
9269
9308
  padding-right: 32px;
9270
9309
  }
9271
9310
  `;
9272
- var Input = (0, import_react29.forwardRef)(
9311
+ var Input = (0, import_react31.forwardRef)(
9273
9312
  ({
9274
9313
  fullWidth = true,
9275
9314
  monospace = false,
@@ -9279,7 +9318,7 @@ var Input = (0, import_react29.forwardRef)(
9279
9318
  rightIcon,
9280
9319
  ...props
9281
9320
  }, externalRef) => {
9282
- const internalRef = (0, import_react29.useRef)();
9321
+ const internalRef = (0, import_react31.useRef)();
9283
9322
  const ref = (
9284
9323
  // eslint-disable-next-line react-compiler/react-compiler
9285
9324
  (0, import_type_guards31.isNotNil)(externalRef) && (0, import_type_guards31.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
@@ -9289,14 +9328,14 @@ var Input = (0, import_react29.forwardRef)(
9289
9328
  leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Icon, { type: "search" });
9290
9329
  }
9291
9330
  if ((0, import_type_guards31.isNotNil)(leftIconToDisplay)) {
9292
- leftIconToDisplay = (0, import_react29.cloneElement)(leftIconToDisplay, {
9331
+ leftIconToDisplay = (0, import_react31.cloneElement)(leftIconToDisplay, {
9293
9332
  size: "md",
9294
9333
  className: "wui-input-left-icon"
9295
9334
  });
9296
9335
  }
9297
9336
  let rightIconToDisplay = rightIcon;
9298
9337
  if ((0, import_type_guards31.isNotNil)(rightIconToDisplay)) {
9299
- rightIconToDisplay = (0, import_react29.cloneElement)(rightIconToDisplay, {
9338
+ rightIconToDisplay = (0, import_react31.cloneElement)(rightIconToDisplay, {
9300
9339
  size: "md",
9301
9340
  className: "wui-input-right-icon"
9302
9341
  });
@@ -9388,11 +9427,11 @@ var EditableHeading = ({
9388
9427
  __forceEditing = false,
9389
9428
  editingDisabled = false
9390
9429
  }) => {
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);
9430
+ const [isEditing, setIsEditing] = (0, import_react32.useState)(false);
9431
+ const [value, setValue] = (0, import_react32.useState)(children);
9432
+ const [previousValue, setPreviousValue] = (0, import_react32.useState)(children);
9433
+ const [headingHeight, setHeadingHeight] = (0, import_react32.useState)("60");
9434
+ const headingRef = (0, import_react32.useRef)(null);
9396
9435
  const handleSetEditing = (editing) => {
9397
9436
  if (editingDisabled) return;
9398
9437
  if (editing && headingRef.current) {
@@ -9471,12 +9510,12 @@ var EditableHeading = ({
9471
9510
  };
9472
9511
 
9473
9512
  // src/components/Form/Form.tsx
9474
- var import_react32 = require("react");
9513
+ var import_react34 = require("react");
9475
9514
  var import_styled_components50 = __toESM(require("styled-components"));
9476
9515
  var import_type_guards32 = require("@wistia/type-guards");
9477
9516
 
9478
9517
  // src/components/Stack/Stack.tsx
9479
- var import_react31 = require("react");
9518
+ var import_react33 = require("react");
9480
9519
  var import_styled_components49 = __toESM(require("styled-components"));
9481
9520
  var import_jsx_runtime221 = require("react/jsx-runtime");
9482
9521
  var DEFAULT_ELEMENT4 = "div";
@@ -9486,7 +9525,7 @@ var StyledStack = import_styled_components49.default.div`
9486
9525
  gap: ${({ $gap }) => `var(--wui-${$gap})`};
9487
9526
  align-items: ${({ $alignItems }) => $alignItems};
9488
9527
  `;
9489
- var StackComponent = (0, import_react31.forwardRef)(
9528
+ var StackComponent = (0, import_react33.forwardRef)(
9490
9529
  ({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
9491
9530
  const responsiveGap = useResponsiveProp(gap);
9492
9531
  const responsiveDirection = useResponsiveProp(direction);
@@ -9515,7 +9554,7 @@ var StyledForm = import_styled_components50.default.form`
9515
9554
  max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
9516
9555
  align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
9517
9556
  `;
9518
- var FormContext = (0, import_react32.createContext)({
9557
+ var FormContext = (0, import_react34.createContext)({
9519
9558
  values: {},
9520
9559
  errors: {},
9521
9560
  hasSubmitted: false,
@@ -9531,11 +9570,11 @@ var FormComponent = ({
9531
9570
  fullWidth = false,
9532
9571
  ...props
9533
9572
  }, forwardedRef) => {
9534
- const [errors, setErrors] = (0, import_react32.useState)({});
9535
- const [hasSubmitted, setHasSubmitted] = (0, import_react32.useState)(false);
9536
- const innerRef = (0, import_react32.useRef)();
9573
+ const [errors, setErrors] = (0, import_react34.useState)({});
9574
+ const [hasSubmitted, setHasSubmitted] = (0, import_react34.useState)(false);
9575
+ const innerRef = (0, import_react34.useRef)();
9537
9576
  const ref = forwardedRef ?? innerRef;
9538
- const autoId = (0, import_react32.useId)();
9577
+ const autoId = (0, import_react34.useId)();
9539
9578
  const id = props.id ?? autoId;
9540
9579
  const handleValidate = (nextFormData) => {
9541
9580
  const nextData = Object.fromEntries(nextFormData.entries());
@@ -9577,7 +9616,7 @@ var FormComponent = ({
9577
9616
  void action(null);
9578
9617
  }
9579
9618
  };
9580
- const context = (0, import_react32.useMemo)(() => {
9619
+ const context = (0, import_react34.useMemo)(() => {
9581
9620
  return {
9582
9621
  values,
9583
9622
  errors,
@@ -9606,15 +9645,15 @@ var FormComponent = ({
9606
9645
  );
9607
9646
  };
9608
9647
  FormComponent.displayName = "Form";
9609
- var Form = (0, import_react32.forwardRef)(FormComponent);
9648
+ var Form = (0, import_react34.forwardRef)(FormComponent);
9610
9649
 
9611
9650
  // src/components/Form/useFormState.tsx
9612
- var import_react33 = require("react");
9651
+ var import_react35 = require("react");
9613
9652
  var useFormState = (action, initialData = {}) => {
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)(
9653
+ const [data, setData] = (0, import_react35.useState)(initialData);
9654
+ const [isPending, setIsPending] = (0, import_react35.useState)(false);
9655
+ const [error, setError] = (0, import_react35.useState)(null);
9656
+ const formAction = (0, import_react35.useCallback)(
9618
9657
  async (nextFormData) => {
9619
9658
  if (nextFormData === null) {
9620
9659
  setData(initialData);
@@ -9645,15 +9684,15 @@ var useFormState = (action, initialData = {}) => {
9645
9684
  };
9646
9685
 
9647
9686
  // src/components/Form/FormErrorSummary.tsx
9648
- var import_react34 = require("react");
9687
+ var import_react36 = require("react");
9649
9688
  var import_type_guards33 = require("@wistia/type-guards");
9650
9689
  var import_jsx_runtime223 = require("react/jsx-runtime");
9651
9690
  var ErrorItem = ({ name, error, formId }) => {
9652
9691
  return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9653
9692
  };
9654
9693
  var FormErrorSummary = ({ description }) => {
9655
- const ref = (0, import_react34.useRef)(null);
9656
- const { formId, errors, hasSubmitted } = (0, import_react34.useContext)(FormContext);
9694
+ const ref = (0, import_react36.useRef)(null);
9695
+ const { formId, errors, hasSubmitted } = (0, import_react36.useContext)(FormContext);
9657
9696
  const isValid = Object.keys(errors).length === 0;
9658
9697
  if (isValid || !hasSubmitted) {
9659
9698
  return null;
@@ -9683,7 +9722,7 @@ var FormErrorSummary = ({ description }) => {
9683
9722
  };
9684
9723
 
9685
9724
  // src/components/FormField/FormField.tsx
9686
- var import_react37 = require("react");
9725
+ var import_react39 = require("react");
9687
9726
  var import_styled_components53 = __toESM(require("styled-components"));
9688
9727
  var import_type_guards34 = require("@wistia/type-guards");
9689
9728
 
@@ -9748,11 +9787,11 @@ var Label = ({
9748
9787
  Label.displayName = "Label";
9749
9788
 
9750
9789
  // src/components/FormGroup/CheckboxGroup.tsx
9751
- var import_react36 = require("react");
9790
+ var import_react38 = require("react");
9752
9791
 
9753
9792
  // src/components/FormGroup/FormGroup.tsx
9754
9793
  var import_styled_components52 = __toESM(require("styled-components"));
9755
- var import_react35 = require("react");
9794
+ var import_react37 = require("react");
9756
9795
  var import_jsx_runtime225 = require("react/jsx-runtime");
9757
9796
  var StyledFieldset = import_styled_components52.default.fieldset`
9758
9797
  border: 0;
@@ -9761,7 +9800,7 @@ var StyledLegend = import_styled_components52.default.legend`
9761
9800
  margin-bottom: var(--space-01);
9762
9801
  `;
9763
9802
  var FormGroup = ({ children, label, ...props }) => {
9764
- const ref = (0, import_react35.useRef)();
9803
+ const ref = (0, import_react37.useRef)();
9765
9804
  return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
9766
9805
  Stack,
9767
9806
  {
@@ -9786,7 +9825,7 @@ FormGroup.displayName = "FormGroup";
9786
9825
 
9787
9826
  // src/components/FormGroup/CheckboxGroup.tsx
9788
9827
  var import_jsx_runtime226 = require("react/jsx-runtime");
9789
- var CheckboxGroupContext = (0, import_react36.createContext)(null);
9828
+ var CheckboxGroupContext = (0, import_react38.createContext)(null);
9790
9829
  var CheckboxGroup = ({
9791
9830
  children,
9792
9831
  name,
@@ -9794,7 +9833,7 @@ var CheckboxGroup = ({
9794
9833
  value,
9795
9834
  ...props
9796
9835
  }) => {
9797
- const context = (0, import_react36.useMemo)(() => {
9836
+ const context = (0, import_react38.useMemo)(() => {
9798
9837
  return {
9799
9838
  name,
9800
9839
  onChange
@@ -9879,8 +9918,8 @@ var FormField = ({
9879
9918
  value,
9880
9919
  ...props
9881
9920
  }) => {
9882
- const formState = (0, import_react37.useContext)(FormContext);
9883
- const checkboxGroup = (0, import_react37.useContext)(CheckboxGroupContext);
9921
+ const formState = (0, import_react39.useContext)(FormContext);
9922
+ const checkboxGroup = (0, import_react39.useContext)(CheckboxGroupContext);
9884
9923
  const defaultValue = formState.values[name];
9885
9924
  const isIntegratedLabel = children.type === Checkbox;
9886
9925
  const computedId = id ?? `${formState.formId}-${name}`;
@@ -9918,7 +9957,7 @@ var FormField = ({
9918
9957
  "aria-invalid": (0, import_type_guards34.isNotNil)(error)
9919
9958
  };
9920
9959
  }
9921
- import_react37.Children.only(children);
9960
+ import_react39.Children.only(children);
9922
9961
  return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
9923
9962
  StyledFormField,
9924
9963
  {
@@ -9927,7 +9966,7 @@ var FormField = ({
9927
9966
  children: [
9928
9967
  !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Label, { htmlFor: computedId, children: label }),
9929
9968
  (0, import_type_guards34.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
9930
- (0, import_react37.cloneElement)(children, childProps),
9969
+ (0, import_react39.cloneElement)(children, childProps),
9931
9970
  (0, import_type_guards34.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
9932
9971
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", {}),
9933
9972
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
@@ -9945,9 +9984,9 @@ var FormField = ({
9945
9984
  FormField.displayName = "FormField";
9946
9985
 
9947
9986
  // src/components/FormGroup/RadioGroup.tsx
9948
- var import_react38 = require("react");
9987
+ var import_react40 = require("react");
9949
9988
  var import_jsx_runtime228 = require("react/jsx-runtime");
9950
- var RadioGroupContext = (0, import_react38.createContext)(null);
9989
+ var RadioGroupContext = (0, import_react40.createContext)(null);
9951
9990
  var RadioGroup = ({
9952
9991
  children,
9953
9992
  name,
@@ -9955,7 +9994,7 @@ var RadioGroup = ({
9955
9994
  value,
9956
9995
  ...props
9957
9996
  }) => {
9958
- const context = (0, import_react38.useMemo)(() => {
9997
+ const context = (0, import_react40.useMemo)(() => {
9959
9998
  return {
9960
9999
  name,
9961
10000
  onChange
@@ -9966,7 +10005,7 @@ var RadioGroup = ({
9966
10005
  RadioGroup.displayName = "RadioGroup";
9967
10006
 
9968
10007
  // src/components/IconButton/IconButton.tsx
9969
- var import_react39 = require("react");
10008
+ var import_react41 = require("react");
9970
10009
  var import_styled_components54 = __toESM(require("styled-components"));
9971
10010
  var import_jsx_runtime229 = require("react/jsx-runtime");
9972
10011
  var StyledButton2 = (0, import_styled_components54.default)(Button)`
@@ -9983,7 +10022,7 @@ var StyledButton2 = (0, import_styled_components54.default)(Button)`
9983
10022
  align-items: center;
9984
10023
  line-height: 1;
9985
10024
  `;
9986
- var IconButton = (0, import_react39.forwardRef)(
10025
+ var IconButton = (0, import_react41.forwardRef)(
9987
10026
  ({ children, label, size = "md", ...props }, ref) => {
9988
10027
  const responsiveSize = useResponsiveProp(size);
9989
10028
  return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
@@ -9994,7 +10033,7 @@ var IconButton = (0, import_react39.forwardRef)(
9994
10033
  "aria-label": label,
9995
10034
  "data-wistia-ui-icon-button": true,
9996
10035
  size: responsiveSize,
9997
- children: (0, import_react39.cloneElement)(import_react39.Children.only(children), {
10036
+ children: (0, import_react41.cloneElement)(import_react41.Children.only(children), {
9998
10037
  size: responsiveSize
9999
10038
  })
10000
10039
  }
@@ -10005,7 +10044,7 @@ IconButton.displayName = "IconButton";
10005
10044
 
10006
10045
  // src/components/InputClickToCopy/InputClickToCopy.tsx
10007
10046
  var import_styled_components55 = __toESM(require("styled-components"));
10008
- var import_react40 = require("react");
10047
+ var import_react42 = require("react");
10009
10048
  var import_type_guards35 = require("@wistia/type-guards");
10010
10049
  var import_jsx_runtime230 = require("react/jsx-runtime");
10011
10050
  var StyledInput2 = (0, import_styled_components55.default)(Input)`
@@ -10018,10 +10057,10 @@ var StyledInput2 = (0, import_styled_components55.default)(Input)`
10018
10057
  }
10019
10058
  `;
10020
10059
  var COPY_SUCCESS_DURATION = 2e3;
10021
- var InputClickToCopy = (0, import_react40.forwardRef)(
10060
+ var InputClickToCopy = (0, import_react42.forwardRef)(
10022
10061
  ({ value, onCopy, ...props }, ref) => {
10023
- const [isCopied, setIsCopied] = (0, import_react40.useState)(false);
10024
- (0, import_react40.useEffect)(() => {
10062
+ const [isCopied, setIsCopied] = (0, import_react42.useState)(false);
10063
+ (0, import_react42.useEffect)(() => {
10025
10064
  if (isCopied) {
10026
10065
  const timeout = setTimeout(() => {
10027
10066
  setIsCopied(false);
@@ -10071,12 +10110,12 @@ InputClickToCopy.displayName = "InputClickToCopy";
10071
10110
  var import_styled_components56 = __toESM(require("styled-components"));
10072
10111
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
10073
10112
  var import_type_guards36 = require("@wistia/type-guards");
10074
- var import_react42 = require("react");
10113
+ var import_react44 = require("react");
10075
10114
 
10076
10115
  // src/components/Menu/MenuContext.tsx
10077
- var import_react41 = require("react");
10078
- var MenuContext = (0, import_react41.createContext)({ compact: false });
10079
- var useMenuContext = () => (0, import_react41.useContext)(MenuContext);
10116
+ var import_react43 = require("react");
10117
+ var MenuContext = (0, import_react43.createContext)({ compact: false });
10118
+ var useMenuContext = () => (0, import_react43.useContext)(MenuContext);
10080
10119
 
10081
10120
  // src/components/Menu/Menu.tsx
10082
10121
  var import_jsx_runtime231 = require("react/jsx-runtime");
@@ -10180,7 +10219,7 @@ var Menu = ({
10180
10219
  onInteractOutside,
10181
10220
  ...props
10182
10221
  }) => {
10183
- const contextValue = (0, import_react42.useMemo)(() => ({ compact }), [compact]);
10222
+ const contextValue = (0, import_react44.useMemo)(() => ({ compact }), [compact]);
10184
10223
  let controlProps = {
10185
10224
  ...(0, import_type_guards36.isNotNil)(onOpenChange) && (0, import_type_guards36.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
10186
10225
  };
@@ -10254,13 +10293,13 @@ var MenuLabel = ({ children, ...props }) => {
10254
10293
  MenuLabel.displayName = "MenuLabel";
10255
10294
 
10256
10295
  // src/components/Menu/SubMenu.tsx
10257
- var import_react44 = require("react");
10296
+ var import_react46 = require("react");
10258
10297
  var import_styled_components60 = __toESM(require("styled-components"));
10259
10298
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
10260
10299
  var import_type_guards38 = require("@wistia/type-guards");
10261
10300
 
10262
10301
  // src/components/Menu/MenuItemButton.tsx
10263
- var import_react43 = require("react");
10302
+ var import_react45 = require("react");
10264
10303
  var import_styled_components58 = __toESM(require("styled-components"));
10265
10304
  var import_type_guards37 = require("@wistia/type-guards");
10266
10305
  var import_jsx_runtime233 = require("react/jsx-runtime");
@@ -10337,7 +10376,7 @@ var StyledBadgeContainer = import_styled_components58.default.div`
10337
10376
  font-size: var(--wui-typography-label-4-size);
10338
10377
  color: var(--wui-color-text-secondary);
10339
10378
  `;
10340
- var MenuItemButton = (0, import_react43.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
10379
+ var MenuItemButton = (0, import_react45.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
10341
10380
  let { colorScheme, badge } = props;
10342
10381
  if (appearance === "dangerous") {
10343
10382
  if ((0, import_type_guards37.isNotUndefined)(colorScheme)) {
@@ -10433,7 +10472,7 @@ var SubMenu = ({
10433
10472
  ...props
10434
10473
  }) => {
10435
10474
  const { isSmAndUp } = useMq();
10436
- const [isExpanded, setIsExpanded] = (0, import_react44.useState)(false);
10475
+ const [isExpanded, setIsExpanded] = (0, import_react46.useState)(false);
10437
10476
  const { compact } = useMenuContext();
10438
10477
  return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
10439
10478
  /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(SubMenuTrigger, { ...props, children: [
@@ -10462,10 +10501,10 @@ var SubMenu = ({
10462
10501
  SubMenu.displayName = "SubMenu";
10463
10502
 
10464
10503
  // src/components/Menu/MenuItem.tsx
10465
- var import_react45 = require("react");
10504
+ var import_react47 = require("react");
10466
10505
  var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
10467
10506
  var import_jsx_runtime236 = require("react/jsx-runtime");
10468
- var MenuItem = (0, import_react45.forwardRef)(
10507
+ var MenuItem = (0, import_react47.forwardRef)(
10469
10508
  ({ onSelect = () => null, ...props }, ref) => {
10470
10509
  return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
10471
10510
  import_react_dropdown_menu4.DropdownMenuItem,
@@ -10617,7 +10656,7 @@ var CheckboxMenuItem = ({
10617
10656
  CheckboxMenuItem.displayName = "CheckboxMenuItem";
10618
10657
 
10619
10658
  // src/components/Modal/Modal.tsx
10620
- var import_react49 = require("react");
10659
+ var import_react51 = require("react");
10621
10660
  var import_styled_components65 = __toESM(require("styled-components"));
10622
10661
  var import_react_dialog4 = require("@radix-ui/react-dialog");
10623
10662
  var import_type_guards41 = require("@wistia/type-guards");
@@ -10677,19 +10716,19 @@ var ModalHeader = ({
10677
10716
  };
10678
10717
 
10679
10718
  // src/components/Modal/ModalContent.tsx
10680
- var import_react47 = require("react");
10719
+ var import_react49 = require("react");
10681
10720
  var import_styled_components63 = __toESM(require("styled-components"));
10682
10721
  var import_react_dialog3 = require("@radix-ui/react-dialog");
10683
10722
 
10684
10723
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
10685
- var import_react46 = require("react");
10724
+ var import_react48 = require("react");
10686
10725
  var import_type_guards40 = require("@wistia/type-guards");
10687
10726
  var useFocusRestore = () => {
10688
- const previouslyFocusedRef = (0, import_react46.useRef)(null);
10689
- (0, import_react46.useEffect)(() => {
10727
+ const previouslyFocusedRef = (0, import_react48.useRef)(null);
10728
+ (0, import_react48.useEffect)(() => {
10690
10729
  previouslyFocusedRef.current = document.activeElement;
10691
10730
  }, []);
10692
- (0, import_react46.useEffect)(() => {
10731
+ (0, import_react48.useEffect)(() => {
10693
10732
  return () => {
10694
10733
  if ((0, import_type_guards40.isNotNil)(previouslyFocusedRef.current)) {
10695
10734
  setTimeout(() => {
@@ -10743,7 +10782,7 @@ var StyledModalContent = (0, import_styled_components63.default)(import_react_di
10743
10782
  }
10744
10783
  }
10745
10784
  `;
10746
- var ModalContent = (0, import_react47.forwardRef)(
10785
+ var ModalContent = (0, import_react49.forwardRef)(
10747
10786
  ({ fullHeight, width, children, ...props }, ref) => {
10748
10787
  useFocusRestore();
10749
10788
  return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
@@ -10761,7 +10800,7 @@ var ModalContent = (0, import_react47.forwardRef)(
10761
10800
  );
10762
10801
 
10763
10802
  // src/private/components/Backdrop/Backdrop.tsx
10764
- var import_react48 = require("react");
10803
+ var import_react50 = require("react");
10765
10804
  var import_styled_components64 = __toESM(require("styled-components"));
10766
10805
  var import_jsx_runtime243 = require("react/jsx-runtime");
10767
10806
  var backdropAnimationDuration = 150;
@@ -10799,7 +10838,7 @@ var BackdropComponent = import_styled_components64.default.div`
10799
10838
  }
10800
10839
  }
10801
10840
  `;
10802
- var Backdrop = (0, import_react48.forwardRef)(
10841
+ var Backdrop = (0, import_react50.forwardRef)(
10803
10842
  ({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
10804
10843
  BackdropComponent,
10805
10844
  {
@@ -10821,7 +10860,7 @@ var ModalBody = import_styled_components65.default.div`
10821
10860
  display: flex;
10822
10861
  order: 2;
10823
10862
  `;
10824
- var Modal = (0, import_react49.forwardRef)(
10863
+ var Modal = (0, import_react51.forwardRef)(
10825
10864
  ({
10826
10865
  children,
10827
10866
  fullHeight = false,
@@ -11035,7 +11074,7 @@ var ProgressBar = ({
11035
11074
  ProgressBar.displayName = "ProgressBar";
11036
11075
 
11037
11076
  // src/components/Radio/Radio.tsx
11038
- var import_react50 = require("react");
11077
+ var import_react52 = require("react");
11039
11078
  var import_styled_components68 = __toESM(require("styled-components"));
11040
11079
  var import_type_guards44 = require("@wistia/type-guards");
11041
11080
  var import_jsx_runtime247 = require("react/jsx-runtime");
@@ -11138,7 +11177,7 @@ var StyledHiddenRadioInput = import_styled_components68.default.input`
11138
11177
  display: block;
11139
11178
  }
11140
11179
  `;
11141
- var Radio = (0, import_react50.forwardRef)(
11180
+ var Radio = (0, import_react52.forwardRef)(
11142
11181
  ({
11143
11182
  checked,
11144
11183
  disabled = false,
@@ -11153,7 +11192,7 @@ var Radio = (0, import_react50.forwardRef)(
11153
11192
  hideLabel = false,
11154
11193
  ...props
11155
11194
  }, ref) => {
11156
- const generatedId = (0, import_react50.useId)();
11195
+ const generatedId = (0, import_react52.useId)();
11157
11196
  const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
11158
11197
  return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
11159
11198
  StyledRadioWrapper,
@@ -11203,20 +11242,20 @@ var Radio = (0, import_react50.forwardRef)(
11203
11242
  Radio.displayName = "Radio";
11204
11243
 
11205
11244
  // src/components/SegmentedControl/SegmentedControl.tsx
11206
- var import_react53 = require("react");
11245
+ var import_react55 = require("react");
11207
11246
  var import_styled_components70 = __toESM(require("styled-components"));
11208
11247
  var import_react_toggle_group = require("@radix-ui/react-toggle-group");
11209
11248
  var import_type_guards45 = require("@wistia/type-guards");
11210
11249
 
11211
11250
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
11212
- var import_react51 = require("react");
11251
+ var import_react53 = require("react");
11213
11252
  var import_jsx_runtime248 = require("react/jsx-runtime");
11214
- var SelectedItemStyleContext = (0, import_react51.createContext)(null);
11253
+ var SelectedItemStyleContext = (0, import_react53.createContext)(null);
11215
11254
  var SelectedItemStyleProvider = ({
11216
11255
  children
11217
11256
  }) => {
11218
- const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react51.useState)(null);
11219
- const selectedItemIndicatorStyle = (0, import_react51.useMemo)(
11257
+ const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react53.useState)(null);
11258
+ const selectedItemIndicatorStyle = (0, import_react53.useMemo)(
11220
11259
  () => selectedItemMeasurements != null ? {
11221
11260
  height: `${selectedItemMeasurements.offsetHeight}px`,
11222
11261
  transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
@@ -11226,7 +11265,7 @@ var SelectedItemStyleProvider = ({
11226
11265
  },
11227
11266
  [selectedItemMeasurements]
11228
11267
  );
11229
- const contextValue = (0, import_react51.useMemo)(
11268
+ const contextValue = (0, import_react53.useMemo)(
11230
11269
  () => ({
11231
11270
  setSelectedItemMeasurements,
11232
11271
  selectedItemIndicatorStyle
@@ -11236,7 +11275,7 @@ var SelectedItemStyleProvider = ({
11236
11275
  return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
11237
11276
  };
11238
11277
  var useSelectedItemStyle = () => {
11239
- const context = (0, import_react51.useContext)(SelectedItemStyleContext);
11278
+ const context = (0, import_react53.useContext)(SelectedItemStyleContext);
11240
11279
  if (context === null) {
11241
11280
  throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
11242
11281
  }
@@ -11247,11 +11286,11 @@ var useSelectedItemStyle = () => {
11247
11286
  var import_styled_components69 = __toESM(require("styled-components"));
11248
11287
 
11249
11288
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
11250
- var import_react52 = require("react");
11251
- var SegmentedControlValueContext = (0, import_react52.createContext)(null);
11289
+ var import_react54 = require("react");
11290
+ var SegmentedControlValueContext = (0, import_react54.createContext)(null);
11252
11291
  var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
11253
11292
  var useSegmentedControlValue = () => {
11254
- const context = (0, import_react52.useContext)(SegmentedControlValueContext);
11293
+ const context = (0, import_react54.useContext)(SegmentedControlValueContext);
11255
11294
  if (context === null) {
11256
11295
  throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
11257
11296
  }
@@ -11297,7 +11336,7 @@ var segmentedControlStyles = import_styled_components70.css`
11297
11336
  var StyledSegmentedControl = (0, import_styled_components70.default)(import_react_toggle_group.Root)`
11298
11337
  ${segmentedControlStyles}
11299
11338
  `;
11300
- var SegmentedControl = (0, import_react53.forwardRef)(
11339
+ var SegmentedControl = (0, import_react55.forwardRef)(
11301
11340
  ({
11302
11341
  children,
11303
11342
  disabled = false,
@@ -11332,7 +11371,7 @@ var SegmentedControl = (0, import_react53.forwardRef)(
11332
11371
  SegmentedControl.displayName = "SegmentedControl";
11333
11372
 
11334
11373
  // src/components/SegmentedControl/SegmentedControlItem.tsx
11335
- var import_react54 = require("react");
11374
+ var import_react56 = require("react");
11336
11375
  var import_styled_components71 = __toESM(require("styled-components"));
11337
11376
  var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
11338
11377
  var import_type_guards46 = require("@wistia/type-guards");
@@ -11400,11 +11439,11 @@ var segmentedControlItemStyles = import_styled_components71.css`
11400
11439
  var StyledSegmentedControlItem = (0, import_styled_components71.default)(import_react_toggle_group2.Item)`
11401
11440
  ${segmentedControlItemStyles}
11402
11441
  `;
11403
- var SegmentedControlItem = (0, import_react54.forwardRef)(
11442
+ var SegmentedControlItem = (0, import_react56.forwardRef)(
11404
11443
  ({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11405
11444
  const selectedValue = useSegmentedControlValue();
11406
11445
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11407
- const buttonRef = (0, import_react54.useRef)(null);
11446
+ const buttonRef = (0, import_react56.useRef)(null);
11408
11447
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11409
11448
  const handleClick = (event) => {
11410
11449
  const target = event.target;
@@ -11413,7 +11452,7 @@ var SegmentedControlItem = (0, import_react54.forwardRef)(
11413
11452
  event.preventDefault();
11414
11453
  }
11415
11454
  };
11416
- (0, import_react54.useEffect)(() => {
11455
+ (0, import_react56.useEffect)(() => {
11417
11456
  const buttonElem = buttonRef.current;
11418
11457
  if (!buttonElem) {
11419
11458
  return void 0;
@@ -11459,7 +11498,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
11459
11498
 
11460
11499
  // src/components/Select/Select.tsx
11461
11500
  var import_react_select = require("@radix-ui/react-select");
11462
- var import_react55 = require("react");
11501
+ var import_react57 = require("react");
11463
11502
  var import_styled_components72 = __toESM(require("styled-components"));
11464
11503
  var import_jsx_runtime252 = require("react/jsx-runtime");
11465
11504
  var StyledTrigger = (0, import_styled_components72.default)(import_react_select.Trigger)`
@@ -11524,7 +11563,7 @@ var StyledContent3 = (0, import_styled_components72.default)(import_react_select
11524
11563
  max-height: var(--radix-select-content-available-height);
11525
11564
  z-index: var(--wui-zindex-select);
11526
11565
  `;
11527
- var Select = (0, import_react55.forwardRef)(
11566
+ var Select = (0, import_react57.forwardRef)(
11528
11567
  ({
11529
11568
  colorScheme = "inherit",
11530
11569
  children,
@@ -11573,7 +11612,7 @@ Select.displayName = "Select";
11573
11612
 
11574
11613
  // src/components/Select/SelectOption.tsx
11575
11614
  var import_react_select2 = require("@radix-ui/react-select");
11576
- var import_react56 = require("react");
11615
+ var import_react58 = require("react");
11577
11616
  var import_styled_components73 = __toESM(require("styled-components"));
11578
11617
  var import_type_guards47 = require("@wistia/type-guards");
11579
11618
  var import_jsx_runtime253 = require("react/jsx-runtime");
@@ -11604,7 +11643,7 @@ var StyledItem = (0, import_styled_components73.default)(import_react_select2.It
11604
11643
  var StyledIconContainer = import_styled_components73.default.span`
11605
11644
  width: 12px;
11606
11645
  `;
11607
- var SelectOption = (0, import_react56.forwardRef)(
11646
+ var SelectOption = (0, import_react58.forwardRef)(
11608
11647
  ({ children, selectedDisplayValue, ...props }, forwardedRef) => {
11609
11648
  return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(
11610
11649
  StyledItem,
@@ -11652,7 +11691,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
11652
11691
  };
11653
11692
 
11654
11693
  // src/components/Switch/Switch.tsx
11655
- var import_react57 = require("react");
11694
+ var import_react59 = require("react");
11656
11695
  var import_styled_components75 = __toESM(require("styled-components"));
11657
11696
  var import_type_guards48 = require("@wistia/type-guards");
11658
11697
  var import_jsx_runtime255 = require("react/jsx-runtime");
@@ -11757,7 +11796,7 @@ var StyledHiddenSwitchInput = import_styled_components75.default.input`
11757
11796
  }
11758
11797
  }
11759
11798
  `;
11760
- var Switch = (0, import_react57.forwardRef)(
11799
+ var Switch = (0, import_react59.forwardRef)(
11761
11800
  ({
11762
11801
  checked,
11763
11802
  disabled = false,
@@ -11772,7 +11811,7 @@ var Switch = (0, import_react57.forwardRef)(
11772
11811
  hideLabel = false,
11773
11812
  ...props
11774
11813
  }, ref) => {
11775
- const generatedId = (0, import_react57.useId)();
11814
+ const generatedId = (0, import_react59.useId)();
11776
11815
  const computedId = (0, import_type_guards48.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11777
11816
  return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
11778
11817
  /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
@@ -11854,8 +11893,8 @@ var Table = ({
11854
11893
  var import_styled_components77 = __toESM(require("styled-components"));
11855
11894
 
11856
11895
  // src/components/Table/TableSectionContext.ts
11857
- var import_react58 = require("react");
11858
- var TableSectionContext = (0, import_react58.createContext)(null);
11896
+ var import_react60 = require("react");
11897
+ var TableSectionContext = (0, import_react60.createContext)(null);
11859
11898
 
11860
11899
  // src/components/Table/TableBody.tsx
11861
11900
  var import_jsx_runtime257 = require("react/jsx-runtime");
@@ -11865,7 +11904,7 @@ var TableBody = ({ children, ...props }) => {
11865
11904
  };
11866
11905
 
11867
11906
  // src/components/Table/TableCell.tsx
11868
- var import_react59 = require("react");
11907
+ var import_react61 = require("react");
11869
11908
  var import_styled_components78 = __toESM(require("styled-components"));
11870
11909
  var import_jsx_runtime258 = require("react/jsx-runtime");
11871
11910
  var sharedStyles = import_styled_components78.css`
@@ -11886,7 +11925,7 @@ var StyledTd = import_styled_components78.default.td`
11886
11925
  line-height: var(--wui-typography-body-2-line-height);
11887
11926
  `;
11888
11927
  var TableCell = ({ children, ...props }) => {
11889
- const section = (0, import_react59.useContext)(TableSectionContext);
11928
+ const section = (0, import_react61.useContext)(TableSectionContext);
11890
11929
  if (section === "head") {
11891
11930
  return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(StyledTh, { ...props, children });
11892
11931
  }
@@ -11918,7 +11957,7 @@ var TableRow = ({ children, ...props }) => {
11918
11957
  };
11919
11958
 
11920
11959
  // src/components/Tabs/Tabs.tsx
11921
- var import_react63 = require("react");
11960
+ var import_react65 = require("react");
11922
11961
  var import_react_tabs4 = require("@radix-ui/react-tabs");
11923
11962
  var import_type_guards50 = require("@wistia/type-guards");
11924
11963
  var import_styled_components86 = __toESM(require("styled-components"));
@@ -11973,17 +12012,17 @@ var TabList = ({
11973
12012
  TabList.displayName = "TabList";
11974
12013
 
11975
12014
  // src/components/Tabs/TabItem.tsx
11976
- var import_react61 = require("react");
12015
+ var import_react63 = require("react");
11977
12016
  var import_styled_components84 = __toESM(require("styled-components"));
11978
12017
  var import_react_tabs3 = require("@radix-ui/react-tabs");
11979
12018
  var import_type_guards49 = require("@wistia/type-guards");
11980
12019
 
11981
12020
  // src/components/Tabs/useTabsValue.tsx
11982
- var import_react60 = require("react");
11983
- var TabsValueContext = (0, import_react60.createContext)(null);
12021
+ var import_react62 = require("react");
12022
+ var TabsValueContext = (0, import_react62.createContext)(null);
11984
12023
  var TabsValueProvider = TabsValueContext.Provider;
11985
12024
  var useTabsValue = () => {
11986
- const context = (0, import_react60.useContext)(TabsValueContext);
12025
+ const context = (0, import_react62.useContext)(TabsValueContext);
11987
12026
  if (context === null) {
11988
12027
  throw new Error("useTabsValue must be used within a TabsValueProvider");
11989
12028
  }
@@ -11999,13 +12038,13 @@ var StyledTabItem = (0, import_styled_components84.default)(import_react_tabs3.T
11999
12038
  outline: none;
12000
12039
  }
12001
12040
  `;
12002
- var TabItem = (0, import_react61.forwardRef)(
12041
+ var TabItem = (0, import_react63.forwardRef)(
12003
12042
  ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
12004
12043
  const selectedValue = useTabsValue();
12005
12044
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
12006
- const buttonRef = (0, import_react61.useRef)(null);
12045
+ const buttonRef = (0, import_react63.useRef)(null);
12007
12046
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
12008
- (0, import_react61.useEffect)(() => {
12047
+ (0, import_react63.useEffect)(() => {
12009
12048
  const buttonElem = buttonRef.current;
12010
12049
  if (!buttonElem) {
12011
12050
  return void 0;
@@ -12049,16 +12088,16 @@ var TabItem = (0, import_react61.forwardRef)(
12049
12088
  TabItem.displayName = "TabItem";
12050
12089
 
12051
12090
  // src/components/Tabs/extractTabItems.ts
12052
- var import_react62 = require("react");
12091
+ var import_react64 = require("react");
12053
12092
  var extractTabItems = (children) => {
12054
12093
  const tabItems = [];
12055
- import_react62.Children.forEach(children, (child) => {
12056
- if (!(0, import_react62.isValidElement)(child)) {
12094
+ import_react64.Children.forEach(children, (child) => {
12095
+ if (!(0, import_react64.isValidElement)(child)) {
12057
12096
  return;
12058
12097
  }
12059
12098
  if (typeof child.type !== "string" && child.type.displayName === "Tab") {
12060
12099
  tabItems.push(child);
12061
- } else if (child.type === import_react62.Fragment) {
12100
+ } else if (child.type === import_react64.Fragment) {
12062
12101
  const fragmentElement = child;
12063
12102
  tabItems.push(...extractTabItems(fragmentElement.props.children));
12064
12103
  } else if ((child.props.children ?? null) != null) {
@@ -12105,7 +12144,7 @@ var StyledTabsRoot = (0, import_styled_components86.default)(import_react_tabs4.
12105
12144
  flex-direction: column;
12106
12145
  height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
12107
12146
  `;
12108
- var Tabs = (0, import_react63.forwardRef)(
12147
+ var Tabs = (0, import_react65.forwardRef)(
12109
12148
  ({
12110
12149
  children,
12111
12150
  fullWidth = true,
@@ -12117,7 +12156,7 @@ var Tabs = (0, import_react63.forwardRef)(
12117
12156
  ...props
12118
12157
  }, ref) => {
12119
12158
  const tabItems = extractTabItems(children);
12120
- const [internalSelectedValue, setInternalSelectedValue] = (0, import_react63.useState)(defaultSelectedValue);
12159
+ const [internalSelectedValue, setInternalSelectedValue] = (0, import_react65.useState)(defaultSelectedValue);
12121
12160
  const modeProps = defaultSelectedValue !== void 0 ? {
12122
12161
  defaultValue: defaultSelectedValue,
12123
12162
  onValueChange: setInternalSelectedValue
@@ -12203,15 +12242,15 @@ var Tabs = (0, import_react63.forwardRef)(
12203
12242
  Tabs.displayName = "Tabs";
12204
12243
 
12205
12244
  // src/components/Tabs/Tab.tsx
12206
- var import_react64 = require("react");
12245
+ var import_react66 = require("react");
12207
12246
  var import_jsx_runtime267 = require("react/jsx-runtime");
12208
- var Tab = (0, import_react64.forwardRef)(({ children }, ref) => {
12247
+ var Tab = (0, import_react66.forwardRef)(({ children }, ref) => {
12209
12248
  return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)("div", { ref, children });
12210
12249
  });
12211
12250
  Tab.displayName = "Tab";
12212
12251
 
12213
12252
  // src/components/Tag/Tag.tsx
12214
- var import_react65 = require("react");
12253
+ var import_react67 = require("react");
12215
12254
  var import_styled_components87 = __toESM(require("styled-components"));
12216
12255
  var import_type_guards51 = require("@wistia/type-guards");
12217
12256
  var import_jsx_runtime268 = require("react/jsx-runtime");
@@ -12328,7 +12367,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12328
12367
  )
12329
12368
  ] });
12330
12369
  };
12331
- var Tag = (0, import_react65.forwardRef)(
12370
+ var Tag = (0, import_react67.forwardRef)(
12332
12371
  ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
12333
12372
  const hasIcon = (0, import_type_guards51.isNotNil)(icon);
12334
12373
  const labelProps = (0, import_type_guards51.isNotNil)(href) && (0, import_type_guards51.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
@@ -12402,7 +12441,7 @@ var ThumbnailBadge = ({ icon, label, ...props }) => {
12402
12441
  ThumbnailBadge.displayName = "ThumbnailBadge";
12403
12442
 
12404
12443
  // src/components/Thumbnail/Thumbnail.tsx
12405
- var import_react66 = require("react");
12444
+ var import_react68 = require("react");
12406
12445
  var import_styled_components90 = __toESM(require("styled-components"));
12407
12446
  var import_type_guards54 = require("@wistia/type-guards");
12408
12447
 
@@ -12589,7 +12628,7 @@ var StyledThumbnail = import_styled_components90.default.div`
12589
12628
  border-radius: calc(8% * (9 / 16)) / 8%;
12590
12629
  }
12591
12630
  `;
12592
- var Thumbnail = (0, import_react66.forwardRef)(
12631
+ var Thumbnail = (0, import_react68.forwardRef)(
12593
12632
  ({
12594
12633
  gradientBackground = "defaultMidOne",
12595
12634
  thumbnailImageType = "square",
@@ -12625,7 +12664,7 @@ var Thumbnail = (0, import_react66.forwardRef)(
12625
12664
  Thumbnail.displayName = "Thumbnail";
12626
12665
 
12627
12666
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
12628
- var import_react67 = __toESM(require("react"));
12667
+ var import_react69 = __toESM(require("react"));
12629
12668
  var import_styled_components91 = __toESM(require("styled-components"));
12630
12669
  var import_type_guards55 = require("@wistia/type-guards");
12631
12670
  var import_jsx_runtime271 = (
@@ -12705,10 +12744,10 @@ var ThumbnailCollage = ({
12705
12744
  gradientBackground = "defaultMidOne",
12706
12745
  ...props
12707
12746
  }) => {
12708
- const thumbnailArray = import_react67.default.Children.toArray(children);
12747
+ const thumbnailArray = import_react69.default.Children.toArray(children);
12709
12748
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
12710
12749
  const thumbnails = (0, import_type_guards55.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
12711
- return import_react67.default.cloneElement(child, {
12750
+ return import_react69.default.cloneElement(child, {
12712
12751
  ...child.props,
12713
12752
  children: void 0
12714
12753
  });
@@ -12946,6 +12985,7 @@ WistiaLogo.displayName = "WistiaLogo";
12946
12985
  useActiveMq,
12947
12986
  useAriaLive,
12948
12987
  useBoolean,
12988
+ useClipboard,
12949
12989
  useFilePicker,
12950
12990
  useFocusTrap,
12951
12991
  useFormState,