@wistia/ui 0.8.17 → 0.8.18

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.d.mts CHANGED
@@ -141,6 +141,8 @@ declare const useActiveMq: () => MediaQueryLabels[];
141
141
  type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
142
142
  declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
143
143
 
144
+ declare const usePreviousValue: <T>(value: T) => T | undefined;
145
+
144
146
  declare const colorSchemeOptions: readonly ["default", "inherit", "error", "info", "success", "warning", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
145
147
  type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
146
148
  type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
@@ -1776,7 +1778,7 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElemen
1776
1778
  type?: 'email' | 'multiline' | 'number' | 'phone' | 'search' | 'text' | 'url';
1777
1779
  };
1778
1780
  /**
1779
- * For displaying photos and graphics
1781
+ * Capture user input with a text field. Should be used within a [Form]() and [FormField]().
1780
1782
  */
1781
1783
  declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, "type"> & {
1782
1784
  /**
@@ -3219,4 +3221,4 @@ declare const WistiaLogo: {
3219
3221
  displayName: string;
3220
3222
  };
3221
3223
 
3222
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useFocusTrap, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, useToast, useWindowSize };
3224
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useFocusTrap, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -141,6 +141,8 @@ declare const useActiveMq: () => MediaQueryLabels[];
141
141
  type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
142
142
  declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
143
143
 
144
+ declare const usePreviousValue: <T>(value: T) => T | undefined;
145
+
144
146
  declare const colorSchemeOptions: readonly ["default", "inherit", "error", "info", "success", "warning", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
145
147
  type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
146
148
  type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
@@ -1776,7 +1778,7 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElemen
1776
1778
  type?: 'email' | 'multiline' | 'number' | 'phone' | 'search' | 'text' | 'url';
1777
1779
  };
1778
1780
  /**
1779
- * For displaying photos and graphics
1781
+ * Capture user input with a text field. Should be used within a [Form]() and [FormField]().
1780
1782
  */
1781
1783
  declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, "type"> & {
1782
1784
  /**
@@ -3219,4 +3221,4 @@ declare const WistiaLogo: {
3219
3221
  displayName: string;
3220
3222
  };
3221
3223
 
3222
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useFocusTrap, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, useToast, useWindowSize };
3224
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useFocusTrap, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.8.17
3
+ * @license @wistia/ui v0.8.18
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2480,6 +2480,16 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
2480
2480
  }, [ref, handler, eventTypes]);
2481
2481
  };
2482
2482
 
2483
+ // src/hooks/usePreviousValue/usePreviousValue.ts
2484
+ import { useEffect as useEffect6, useRef as useRef5 } from "react";
2485
+ var usePreviousValue = (value) => {
2486
+ const ref = useRef5();
2487
+ useEffect6(() => {
2488
+ ref.current = value;
2489
+ });
2490
+ return ref.current;
2491
+ };
2492
+
2483
2493
  // src/hooks/useToast/useToast.tsx
2484
2494
  import { useCallback as useCallback6 } from "react";
2485
2495
  import { toast as sonnerToast } from "sonner";
@@ -7323,7 +7333,7 @@ var ActionButton = forwardRef3(
7323
7333
  ActionButton.displayName = "ActionButton";
7324
7334
 
7325
7335
  // src/components/Avatar/Avatar.tsx
7326
- import { useState as useState7, useMemo as useMemo3, useEffect as useEffect6 } from "react";
7336
+ import { useState as useState7, useMemo as useMemo3, useEffect as useEffect7 } from "react";
7327
7337
  import { isNil as isNil8, isNotNil as isNotNil8 } from "@wistia/type-guards";
7328
7338
  import styled9 from "styled-components";
7329
7339
 
@@ -7532,7 +7542,7 @@ var Avatar = ({
7532
7542
  ...props
7533
7543
  }) => {
7534
7544
  const [imageLoadState, setImageLoadState] = useState7("loading");
7535
- useEffect6(() => {
7545
+ useEffect7(() => {
7536
7546
  setImageLoadState("loading");
7537
7547
  }, [imageUrl]);
7538
7548
  const handleImageLoad = () => {
@@ -8336,9 +8346,9 @@ var Checkbox = forwardRef7(
8336
8346
  Checkbox.displayName = "Checkbox";
8337
8347
 
8338
8348
  // src/components/ClickRegion/ClickRegion.tsx
8339
- import { Children as Children3, cloneElement as cloneElement3, useCallback as useCallback7, useEffect as useEffect7 } from "react";
8349
+ import { Children as Children3, cloneElement as cloneElement3, useCallback as useCallback7, useEffect as useEffect8 } from "react";
8340
8350
  var ClickRegion = ({ children, targetRef }) => {
8341
- useEffect7(() => {
8351
+ useEffect8(() => {
8342
8352
  if (targetRef.current && targetRef.current.tagName === "A") {
8343
8353
  targetRef.current.setAttribute("data-click-region-target-link", "");
8344
8354
  } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
@@ -8975,7 +8985,7 @@ Divider.displayName = "Divider";
8975
8985
 
8976
8986
  // src/components/EditableHeading/EditableHeading.tsx
8977
8987
  import styled31, { css as css27 } from "styled-components";
8978
- import { useState as useState8, useRef as useRef6 } from "react";
8988
+ import { useState as useState8, useRef as useRef7 } from "react";
8979
8989
 
8980
8990
  // src/components/Tooltip/Tooltip.tsx
8981
8991
  import {
@@ -9079,7 +9089,7 @@ var Tooltip = ({
9079
9089
  Tooltip.displayName = "Tooltip";
9080
9090
 
9081
9091
  // src/components/Input/Input.tsx
9082
- import { forwardRef as forwardRef10, cloneElement as cloneElement4, useRef as useRef5 } from "react";
9092
+ import { forwardRef as forwardRef10, cloneElement as cloneElement4, useRef as useRef6 } from "react";
9083
9093
  import styled30, { css as css26 } from "styled-components";
9084
9094
  import { isNil as isNil13, isNotNil as isNotNil16, isRecord as isRecord4 } from "@wistia/type-guards";
9085
9095
 
@@ -9224,7 +9234,7 @@ var Input = forwardRef10(
9224
9234
  rightIcon,
9225
9235
  ...props
9226
9236
  }, externalRef) => {
9227
- const internalRef = useRef5();
9237
+ const internalRef = useRef6();
9228
9238
  const ref = (
9229
9239
  // eslint-disable-next-line react-compiler/react-compiler
9230
9240
  isNotNil16(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef
@@ -9337,7 +9347,7 @@ var EditableHeading = ({
9337
9347
  const [value, setValue] = useState8(children);
9338
9348
  const [previousValue, setPreviousValue] = useState8(children);
9339
9349
  const [headingHeight, setHeadingHeight] = useState8("60");
9340
- const headingRef = useRef6(null);
9350
+ const headingRef = useRef7(null);
9341
9351
  const handleSetEditing = (editing) => {
9342
9352
  if (editingDisabled) return;
9343
9353
  if (editing && headingRef.current) {
@@ -9416,7 +9426,7 @@ var EditableHeading = ({
9416
9426
  };
9417
9427
 
9418
9428
  // src/components/Form/Form.tsx
9419
- import { forwardRef as forwardRef12, useRef as useRef7, useMemo as useMemo4, createContext as createContext3, useState as useState9, useId as useId2 } from "react";
9429
+ import { forwardRef as forwardRef12, useRef as useRef8, useMemo as useMemo4, createContext as createContext3, useState as useState9, useId as useId2 } from "react";
9420
9430
  import styled33 from "styled-components";
9421
9431
  import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined3 } from "@wistia/type-guards";
9422
9432
 
@@ -9464,7 +9474,7 @@ var FormContext = createContext3({
9464
9474
  values: {},
9465
9475
  errors: {},
9466
9476
  hasSubmitted: false,
9467
- formId: "",
9477
+ formId: "NO_FORM",
9468
9478
  labelPosition: "block"
9469
9479
  });
9470
9480
  var FormComponent = ({
@@ -9478,7 +9488,7 @@ var FormComponent = ({
9478
9488
  }, forwardedRef) => {
9479
9489
  const [errors, setErrors] = useState9({});
9480
9490
  const [hasSubmitted, setHasSubmitted] = useState9(false);
9481
- const innerRef = useRef7();
9491
+ const innerRef = useRef8();
9482
9492
  const ref = forwardedRef ?? innerRef;
9483
9493
  const autoId = useId2();
9484
9494
  const id = props.id ?? autoId;
@@ -9590,14 +9600,14 @@ var useFormState = (action, initialData = {}) => {
9590
9600
  };
9591
9601
 
9592
9602
  // src/components/Form/FormErrorSummary.tsx
9593
- import { useContext as useContext3, useRef as useRef8 } from "react";
9603
+ import { useContext as useContext3, useRef as useRef9 } from "react";
9594
9604
  import { isArray, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
9595
9605
  import { jsx as jsx223, jsxs as jsxs22 } from "react/jsx-runtime";
9596
9606
  var ErrorItem = ({ name, error, formId }) => {
9597
9607
  return /* @__PURE__ */ jsx223("li", { children: /* @__PURE__ */ jsx223(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9598
9608
  };
9599
9609
  var FormErrorSummary = ({ description }) => {
9600
- const ref = useRef8(null);
9610
+ const ref = useRef9(null);
9601
9611
  const { formId, errors, hasSubmitted } = useContext3(FormContext);
9602
9612
  const isValid = Object.keys(errors).length === 0;
9603
9613
  if (isValid || !hasSubmitted) {
@@ -9697,7 +9707,7 @@ import { createContext as createContext4, useMemo as useMemo5 } from "react";
9697
9707
 
9698
9708
  // src/components/FormGroup/FormGroup.tsx
9699
9709
  import styled35 from "styled-components";
9700
- import { useRef as useRef9 } from "react";
9710
+ import { useRef as useRef10 } from "react";
9701
9711
  import { jsx as jsx225, jsxs as jsxs23 } from "react/jsx-runtime";
9702
9712
  var StyledFieldset = styled35.fieldset`
9703
9713
  border: 0;
@@ -9706,7 +9716,7 @@ var StyledLegend = styled35.legend`
9706
9716
  margin-bottom: var(--space-01);
9707
9717
  `;
9708
9718
  var FormGroup = ({ children, label, ...props }) => {
9709
- const ref = useRef9();
9719
+ const ref = useRef10();
9710
9720
  return /* @__PURE__ */ jsxs23(
9711
9721
  Stack,
9712
9722
  {
@@ -9950,7 +9960,7 @@ IconButton.displayName = "IconButton";
9950
9960
 
9951
9961
  // src/components/InputClickToCopy/InputClickToCopy.tsx
9952
9962
  import styled38 from "styled-components";
9953
- import { forwardRef as forwardRef14, useEffect as useEffect8, useState as useState11 } from "react";
9963
+ import { forwardRef as forwardRef14, useEffect as useEffect9, useState as useState11 } from "react";
9954
9964
  import { isFunction as isFunction3 } from "@wistia/type-guards";
9955
9965
  import { jsx as jsx230 } from "react/jsx-runtime";
9956
9966
  var StyledInput2 = styled38(Input)`
@@ -9966,7 +9976,7 @@ var COPY_SUCCESS_DURATION = 2e3;
9966
9976
  var InputClickToCopy = forwardRef14(
9967
9977
  ({ value, onCopy, ...props }, ref) => {
9968
9978
  const [isCopied, setIsCopied] = useState11(false);
9969
- useEffect8(() => {
9979
+ useEffect9(() => {
9970
9980
  if (isCopied) {
9971
9981
  const timeout = setTimeout(() => {
9972
9982
  setIsCopied(false);
@@ -10647,14 +10657,14 @@ import styled46 from "styled-components";
10647
10657
  import { Content as DialogContent } from "@radix-ui/react-dialog";
10648
10658
 
10649
10659
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
10650
- import { useRef as useRef10, useEffect as useEffect9 } from "react";
10660
+ import { useRef as useRef11, useEffect as useEffect10 } from "react";
10651
10661
  import { isNotNil as isNotNil22 } from "@wistia/type-guards";
10652
10662
  var useFocusRestore = () => {
10653
- const previouslyFocusedRef = useRef10(null);
10654
- useEffect9(() => {
10663
+ const previouslyFocusedRef = useRef11(null);
10664
+ useEffect10(() => {
10655
10665
  previouslyFocusedRef.current = document.activeElement;
10656
10666
  }, []);
10657
- useEffect9(() => {
10667
+ useEffect10(() => {
10658
10668
  return () => {
10659
10669
  if (isNotNil22(previouslyFocusedRef.current)) {
10660
10670
  setTimeout(() => {
@@ -11302,7 +11312,7 @@ var SegmentedControl = forwardRef21(
11302
11312
  SegmentedControl.displayName = "SegmentedControl";
11303
11313
 
11304
11314
  // src/components/SegmentedControl/SegmentedControlItem.tsx
11305
- import { forwardRef as forwardRef22, useEffect as useEffect10, useRef as useRef11 } from "react";
11315
+ import { forwardRef as forwardRef22, useEffect as useEffect11, useRef as useRef12 } from "react";
11306
11316
  import styled54, { css as css33 } from "styled-components";
11307
11317
  import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
11308
11318
  import { isNotNil as isNotNil26 } from "@wistia/type-guards";
@@ -11374,7 +11384,7 @@ var SegmentedControlItem = forwardRef22(
11374
11384
  ({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11375
11385
  const selectedValue = useSegmentedControlValue();
11376
11386
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11377
- const buttonRef = useRef11(null);
11387
+ const buttonRef = useRef12(null);
11378
11388
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11379
11389
  const handleClick = (event) => {
11380
11390
  const target = event.target;
@@ -11383,7 +11393,7 @@ var SegmentedControlItem = forwardRef22(
11383
11393
  event.preventDefault();
11384
11394
  }
11385
11395
  };
11386
- useEffect10(() => {
11396
+ useEffect11(() => {
11387
11397
  const buttonElem = buttonRef.current;
11388
11398
  if (!buttonElem) {
11389
11399
  return void 0;
@@ -11960,7 +11970,7 @@ var TabList = ({
11960
11970
  TabList.displayName = "TabList";
11961
11971
 
11962
11972
  // src/components/Tabs/TabItem.tsx
11963
- import { forwardRef as forwardRef26, useEffect as useEffect11, useRef as useRef12 } from "react";
11973
+ import { forwardRef as forwardRef26, useEffect as useEffect12, useRef as useRef13 } from "react";
11964
11974
  import styled67 from "styled-components";
11965
11975
  import { Trigger as RadixTab } from "@radix-ui/react-tabs";
11966
11976
  import { isNotNil as isNotNil28 } from "@wistia/type-guards";
@@ -11990,9 +12000,9 @@ var TabItem = forwardRef26(
11990
12000
  ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11991
12001
  const selectedValue = useTabsValue();
11992
12002
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11993
- const buttonRef = useRef12(null);
12003
+ const buttonRef = useRef13(null);
11994
12004
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11995
- useEffect11(() => {
12005
+ useEffect12(() => {
11996
12006
  const buttonElem = buttonRef.current;
11997
12007
  if (!buttonElem) {
11998
12008
  return void 0;
@@ -12941,6 +12951,7 @@ export {
12941
12951
  useLockBodyScroll,
12942
12952
  useMq,
12943
12953
  useOnClickOutside,
12954
+ usePreviousValue,
12944
12955
  useToast,
12945
12956
  useWindowSize
12946
12957
  };