@wistia/ui 0.26.6 → 0.26.7-beta.69d63a03.b35f26f

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.26.6
3
+ * @license @wistia/ui v0.26.7-beta.69d63a03.b35f26f
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8,9 +8,9 @@
8
8
  */
9
9
 
10
10
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
11
- import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useTransition } from "react";
11
+ import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useTransition } from "react";
12
12
  import { createGlobalStyle, css, keyframes, styled } from "styled-components";
13
- import { isArray, isBoolean, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isRecord, isString, isUndefined } from "@wistia/type-guards";
13
+ import { isArray, isBoolean, isDate, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isRecord, isString, isUndefined } from "@wistia/type-guards";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
15
  import { Toaster, toast } from "sonner";
16
16
  import { isValid } from "date-fns/isValid";
@@ -431,9 +431,8 @@ const AriaLiveProvider = ({ children, debug = false }) => {
431
431
  setTimeout(() => setMessage(null), 1e3);
432
432
  }
433
433
  }, []);
434
- const value = useMemo(() => ({ announce }), [announce]);
435
- return /* @__PURE__ */ jsx(AriaLiveContext.Provider, {
436
- value,
434
+ return /* @__PURE__ */ jsx(AriaLiveContext, {
435
+ value: useMemo(() => ({ announce }), [announce]),
437
436
  children
438
437
  });
439
438
  };
@@ -451,7 +450,7 @@ const ToastProvider = () => /* @__PURE__ */ jsx(Toaster, { ...toastConfig });
451
450
  const UIProviderNestingContext = createContext(false);
452
451
  const UIProvider = ({ children }) => {
453
452
  if (useContext(UIProviderNestingContext)) return /* @__PURE__ */ jsx(Fragment, { children });
454
- return /* @__PURE__ */ jsx(UIProviderNestingContext.Provider, {
453
+ return /* @__PURE__ */ jsx(UIProviderNestingContext, {
455
454
  value: true,
456
455
  children: /* @__PURE__ */ jsx(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(Tooltip$1.Provider, { children: [
457
456
  /* @__PURE__ */ jsx(GlobalStyle, {}),
@@ -497,16 +496,10 @@ const millisecondsInDay = 1440 * 60 * milisecondsInSecond;
497
496
  //#endregion
498
497
  //#region src/helpers/dateTime/buildTimeDuration.ts
499
498
  /**
500
- * @typedef {Object} Duration
501
- * @property {number} seconds - number of seconds
502
- * @property {number} minutes - number of minutes
503
- * @property {number} hours - number of hours
504
- */
505
- /**
506
499
  * Returns an object representing the duration in seconds, minutes and hours.
507
500
  *
508
501
  * @param {number} numberOfMilliseconds - number of milliseconds
509
- * @returns {Duration} -
502
+ * @returns {TimeDuration} -
510
503
  */
511
504
  const buildTimeDuration = (numberOfMilliseconds) => {
512
505
  const numberOfSeconds = Math.floor(numberOfMilliseconds / milisecondsInSecond);
@@ -519,13 +512,6 @@ const buildTimeDuration = (numberOfMilliseconds) => {
519
512
  };
520
513
  };
521
514
  //#endregion
522
- //#region src/helpers/dateTime/isDate.ts
523
- /**
524
- * @param {*} date - possible date value - unknown type
525
- * @returns {boolean} - whether it is a date object
526
- */
527
- const isDate = (date) => date instanceof Date;
528
- //#endregion
529
515
  //#region src/helpers/dateTime/isInvalidDate.ts
530
516
  /**
531
517
  * @param {*} date - a Date object - could be unknown though
@@ -5596,7 +5582,7 @@ const StyledLink = styled.a`
5596
5582
  * This means in addition to its own props, `Link` can use props from `react-router`'s `Link` component. View their documentation [here](https://reactrouter.com/en/main/components/link).
5597
5583
  * The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
5598
5584
  */
5599
- const Link = forwardRef(({ beforeAction, children, type, disabled = false, colorScheme = "inherit", underline = "none", inheritColor = false, leftIcon, rightIcon, "aria-disabled": ariaDisabled, role, ...props }, ref) => {
5585
+ const Link = ({ beforeAction, children, type, disabled = false, colorScheme = "inherit", underline = "none", inheritColor = false, leftIcon, rightIcon, "aria-disabled": ariaDisabled, role, ref, ...props }) => {
5600
5586
  const inRouterContext = useInRouterContext();
5601
5587
  const to = generateHref(props.href, type, disabled);
5602
5588
  const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
@@ -5659,8 +5645,7 @@ const Link = forwardRef(({ beforeAction, children, type, disabled = false, color
5659
5645
  });
5660
5646
  }
5661
5647
  return null;
5662
- });
5663
- Link.displayName = "Link_UI";
5648
+ };
5664
5649
  //#endregion
5665
5650
  //#region src/components/Button/Button.tsx
5666
5651
  const isLink = (props) => isNotUndefined(props.href);
@@ -5713,7 +5698,7 @@ const ButtonContent = ({ isLoading = false, leftIcon, rightIcon, children, fullW
5713
5698
  * action, or performing a delete operation. It replaces the HTML `<button>` element,
5714
5699
  * unless an `href` attribute is passed, in which it will render an `<a>` element.
5715
5700
  */
5716
- const Button = forwardRef(({ children, forceState, className, leftIcon, rightIcon, colorScheme = "inherit", disabled = false, isLoading = false, unstyled = false, onClick, fullWidth = false, size = "md", variant = "solid", ...props }, ref) => {
5701
+ const Button = ({ children, forceState, className, leftIcon, rightIcon, colorScheme = "inherit", disabled = false, isLoading = false, unstyled = false, onClick, fullWidth = false, size = "md", variant = "solid", ref, ...props }) => {
5717
5702
  const responsiveFullWidth = useResponsiveProp(fullWidth);
5718
5703
  const responsiveSize = useResponsiveProp(size);
5719
5704
  const isAriaDisabled = () => isLoading || disabled;
@@ -5763,8 +5748,7 @@ const Button = forwardRef(({ children, forceState, className, leftIcon, rightIco
5763
5748
  children
5764
5749
  })
5765
5750
  });
5766
- });
5767
- Button.displayName = "Button_UI";
5751
+ };
5768
5752
  //#endregion
5769
5753
  //#region src/components/ActionButton/ActionButton.tsx
5770
5754
  const StyledActionButton = styled(Button)`
@@ -5876,7 +5860,7 @@ const StyledLabel$3 = styled.span`
5876
5860
  /**
5877
5861
  * Action Button component is used as one of a group of main actions on the page. It composes [Button](/components/Button).
5878
5862
  */
5879
- const ActionButton = forwardRef(({ icon, colorScheme = "standard", disabled = false, forceState, hoverColorScheme, variant = "default", children, ...props }, ref) => {
5863
+ const ActionButton = ({ icon, colorScheme = "standard", disabled = false, forceState, hoverColorScheme, variant = "default", children, ref, ...props }) => {
5880
5864
  const resolvedHoverColorScheme = hoverColorScheme ?? (variant === "gated" ? "purple" : "inherit");
5881
5865
  const secondaryIconMap = {
5882
5866
  default: "arrow-right",
@@ -5907,8 +5891,7 @@ const ActionButton = forwardRef(({ icon, colorScheme = "standard", disabled = fa
5907
5891
  })
5908
5892
  ]
5909
5893
  });
5910
- });
5911
- ActionButton.displayName = "ActionButton_UI";
5894
+ };
5912
5895
  //#endregion
5913
5896
  //#region src/components/Avatar/formatNameForDisplay.tsx
5914
5897
  const containsEmojiCharacter = (char) => {
@@ -6139,7 +6122,7 @@ const StyledBadge = styled.div`
6139
6122
  /**
6140
6123
  * A `Badge` is a compact label, with optional icon, to convey status or context.
6141
6124
  */
6142
- const Badge = forwardRef(({ colorScheme = "inherit", label, icon, variant = "default", ...props }, ref) => {
6125
+ const Badge = ({ colorScheme = "inherit", label, icon, variant = "default", ref, ...props }) => {
6143
6126
  const hasIcon = isNotNil(icon);
6144
6127
  return /* @__PURE__ */ jsxs(StyledBadge, {
6145
6128
  ref,
@@ -6149,12 +6132,11 @@ const Badge = forwardRef(({ colorScheme = "inherit", label, icon, variant = "def
6149
6132
  $variant: variant,
6150
6133
  children: [hasIcon ? icon : null, isNotNil(label) ? /* @__PURE__ */ jsx("span", { children: label }) : null]
6151
6134
  });
6152
- });
6153
- Badge.displayName = "Badge_UI";
6135
+ };
6154
6136
  //#endregion
6155
6137
  //#region src/private/helpers/makePolymorphic/makePolymorphic.tsx
6156
6138
  /**
6157
- * makePolymorphic takes a component (typically a forwardRef component) and returns a new version
6139
+ * makePolymorphic takes a component and returns a new version
6158
6140
  * that supports polymorphism via a `renderAs` prop. The returned component's types automatically
6159
6141
  * merge the intrinsic props of the rendered element with the custom props of the original
6160
6142
  * component, while including support for children and refs.
@@ -6236,7 +6218,7 @@ const StyledBoxComponent = styled.div`
6236
6218
  order: ${({ $order }) => isNotNil($order) ? $order : null};
6237
6219
  `;
6238
6220
  const DEFAULT_ELEMENT$4 = "div";
6239
- const BoxComponent = forwardRef(({ alignContent = "stretch", alignItems = "flex-start", alignSelf, basis, children, direction = "row", fill = false, fillViewport = false, gap, grow, height, inline = false, justifyContent = "flex-start", order, renderAs, shrink, width, wrapItems = false, flexMode, ...props }, ref) => {
6221
+ const BoxComponent = ({ ref, alignContent = "stretch", alignItems = "flex-start", alignSelf, basis, children, direction = "row", fill = false, fillViewport = false, gap, grow, height, inline = false, justifyContent = "flex-start", order, renderAs, shrink, width, wrapItems = false, flexMode, ...props }) => {
6240
6222
  const responsiveAlignContent = useResponsiveProp(alignContent);
6241
6223
  const responsiveAlignItems = useResponsiveProp(alignItems);
6242
6224
  const responsiveAlignSelf = useResponsiveProp(alignSelf);
@@ -6283,8 +6265,7 @@ const BoxComponent = forwardRef(({ alignContent = "stretch", alignItems = "flex-
6283
6265
  ...props,
6284
6266
  children
6285
6267
  });
6286
- });
6287
- BoxComponent.displayName = "Box_UI";
6268
+ };
6288
6269
  /**
6289
6270
  * Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
6290
6271
  */
@@ -6403,7 +6384,7 @@ const variantElementMap$1 = {
6403
6384
  heading5: "h5",
6404
6385
  heading6: "h6"
6405
6386
  };
6406
- const HeadingComponent = forwardRef(({ align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, variant = "heading1", renderAs, ...props }, ref) => {
6387
+ const HeadingComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, variant = "heading1", renderAs, ...props }) => {
6407
6388
  const processedChildren = applyMaxCharsToChildren(children, maxChars);
6408
6389
  return /* @__PURE__ */ jsx(StyledHeading$1, {
6409
6390
  ref,
@@ -6419,8 +6400,7 @@ const HeadingComponent = forwardRef(({ align = "left", children, colorScheme = "
6419
6400
  ...props,
6420
6401
  children: processedChildren
6421
6402
  });
6422
- });
6423
- HeadingComponent.displayName = "Heading_UI";
6403
+ };
6424
6404
  /**
6425
6405
  * Displaying heading text, both visually and semantically
6426
6406
  */
@@ -6594,7 +6574,7 @@ const StyledText = styled.div`
6594
6574
  }
6595
6575
  `}
6596
6576
  `;
6597
- const TextComponent = forwardRef(({ align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, variant = "body2", renderAs, ...props }, ref) => {
6577
+ const TextComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, variant = "body2", renderAs, ...props }) => {
6598
6578
  const processedChildren = applyMaxCharsToChildren(children, maxChars);
6599
6579
  return /* @__PURE__ */ jsx(StyledText, {
6600
6580
  ref,
@@ -6610,8 +6590,7 @@ const TextComponent = forwardRef(({ align = "left", children, colorScheme = "inh
6610
6590
  ...props,
6611
6591
  children: processedChildren
6612
6592
  });
6613
- });
6614
- TextComponent.displayName = "Text_UI";
6593
+ };
6615
6594
  /**
6616
6595
  * Used for rending paragraphs and inline text.
6617
6596
  */
@@ -6696,7 +6675,7 @@ const StyledButton$1 = styled(Button)`
6696
6675
  * IconButton behaves like a [Button](/components/Button),
6697
6676
  * but only accepts an [Icon](/components/Icon) as a child.
6698
6677
  */
6699
- const IconButton = forwardRef(({ children, label, size = "md", ...props }, ref) => {
6678
+ const IconButton = ({ children, label, size = "md", ref, ...props }) => {
6700
6679
  const responsiveSize = useResponsiveProp(size);
6701
6680
  return /* @__PURE__ */ jsx(StyledButton$1, {
6702
6681
  ...props,
@@ -6706,8 +6685,7 @@ const IconButton = forwardRef(({ children, label, size = "md", ...props }, ref)
6706
6685
  size: responsiveSize,
6707
6686
  children: cloneElement(Children.only(children), { size: responsiveSize })
6708
6687
  });
6709
- });
6710
- IconButton.displayName = "IconButton_UI";
6688
+ };
6711
6689
  //#endregion
6712
6690
  //#region src/components/Banner/Banner.tsx
6713
6691
  const StyledBanner = styled.div`
@@ -6933,15 +6911,14 @@ const StyledCenter = styled.div`
6933
6911
  * Center component provides various ways to center content horizontally within a container.
6934
6912
  * It supports max-width constraints, text alignment, gutters, and intrinsic content centering.
6935
6913
  */
6936
- const Center = forwardRef(({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ jsx(StyledCenter, {
6914
+ const Center = ({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ref, ...props }) => /* @__PURE__ */ jsx(StyledCenter, {
6937
6915
  ref,
6938
6916
  $gutterWidth: gutterWidth,
6939
6917
  $intrinsic: intrinsic,
6940
6918
  $maxWidth: maxWidth,
6941
6919
  ...props,
6942
6920
  children
6943
- }));
6944
- Center.displayName = "Center_UI";
6921
+ });
6945
6922
  //#endregion
6946
6923
  //#region src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
6947
6924
  const VisuallyHidden = styled.div({ ...visuallyHiddenStyle });
@@ -7038,7 +7015,7 @@ const StyledStack = styled.div`
7038
7015
  ${({ $paddingX }) => $paddingX && `padding-left: var(--wui-${$paddingX}); padding-right: var(--wui-${$paddingX});`}
7039
7016
  ${({ $paddingY }) => $paddingY && `padding-top: var(--wui-${$paddingY}); padding-bottom: var(--wui-${$paddingY});`}
7040
7017
  `;
7041
- const StackComponent = forwardRef(({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", padding, ...props }, ref) => {
7018
+ const StackComponent = ({ ref, renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", padding, ...props }) => {
7042
7019
  const responsiveGap = useResponsiveProp(gap);
7043
7020
  const responsiveDirection = useResponsiveProp(direction);
7044
7021
  return /* @__PURE__ */ jsx(StyledStack, {
@@ -7051,8 +7028,7 @@ const StackComponent = forwardRef(({ renderAs, direction = "vertical", gap = "sp
7051
7028
  as: renderAs ?? DEFAULT_ELEMENT$1,
7052
7029
  ...props
7053
7030
  });
7054
- });
7055
- StackComponent.displayName = "Stack_UI";
7031
+ };
7056
7032
  /**
7057
7033
  * Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
7058
7034
  * This allows for layouting children in a consistent way without needing to manually add margins or padding.
@@ -7128,7 +7104,7 @@ const FormContext = createContext({
7128
7104
  * For creating forms. It provides a context for the form fields to access the form state and validation.
7129
7105
  * It also provides a way to handle form submission and validation. It is built around [React 19's form APIs](https://react.dev/reference/react-dom/components/form).
7130
7106
  */
7131
- const Form = forwardRef(({ children, action, values = {}, labelPosition = "block", validate, fullWidth = false, ...props }, forwardedRef) => {
7107
+ const Form = ({ children, action, values = {}, labelPosition = "block", validate, fullWidth = false, ref: forwardedRef, ...props }) => {
7132
7108
  const [errors, setErrors] = useState({});
7133
7109
  const [hasSubmitted, setHasSubmitted] = useState(false);
7134
7110
  const innerRef = useRef(null);
@@ -7161,23 +7137,22 @@ const Form = forwardRef(({ children, action, values = {}, labelPosition = "block
7161
7137
  if (props.onReset) props.onReset(event);
7162
7138
  if (action) action(null);
7163
7139
  };
7164
- const context = useMemo(() => {
7165
- return {
7140
+ return /* @__PURE__ */ jsx(FormContext, {
7141
+ value: useMemo(() => {
7142
+ return {
7143
+ values,
7144
+ errors,
7145
+ hasSubmitted,
7146
+ formId: id,
7147
+ labelPosition
7148
+ };
7149
+ }, [
7150
+ labelPosition,
7166
7151
  values,
7167
7152
  errors,
7168
- hasSubmitted,
7169
- formId: id,
7170
- labelPosition
7171
- };
7172
- }, [
7173
- labelPosition,
7174
- values,
7175
- errors,
7176
- id,
7177
- hasSubmitted
7178
- ]);
7179
- return /* @__PURE__ */ jsx(FormContext.Provider, {
7180
- value: context,
7153
+ id,
7154
+ hasSubmitted
7155
+ ]),
7181
7156
  children: /* @__PURE__ */ jsx(Stack, {
7182
7157
  ...props,
7183
7158
  ref,
@@ -7192,7 +7167,7 @@ const Form = forwardRef(({ children, action, values = {}, labelPosition = "block
7192
7167
  children
7193
7168
  })
7194
7169
  });
7195
- });
7170
+ };
7196
7171
  //#endregion
7197
7172
  //#region src/components/FormGroup/CheckboxGroup.tsx
7198
7173
  const CheckboxGroupContext = createContext(null);
@@ -7208,19 +7183,18 @@ const useCheckboxGroup = () => {
7208
7183
  const CheckboxGroup = ({ children, name, onChange, value, ...props }) => {
7209
7184
  const formState = useContext(FormContext);
7210
7185
  const derivedValue = isArray(formState.values[name]) ? formState.values[name] : value;
7211
- const context = useMemo(() => {
7212
- return {
7213
- name: `${name}[]`,
7214
- onChange,
7215
- value: derivedValue
7216
- };
7217
- }, [
7218
- name,
7219
- derivedValue,
7220
- onChange
7221
- ]);
7222
- return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, {
7223
- value: context,
7186
+ return /* @__PURE__ */ jsx(CheckboxGroupContext, {
7187
+ value: useMemo(() => {
7188
+ return {
7189
+ name: `${name}[]`,
7190
+ onChange,
7191
+ value: derivedValue
7192
+ };
7193
+ }, [
7194
+ name,
7195
+ derivedValue,
7196
+ onChange
7197
+ ]),
7224
7198
  children: /* @__PURE__ */ jsx(FormGroup, {
7225
7199
  ...props,
7226
7200
  children
@@ -7326,7 +7300,7 @@ const StyledHiddenCheckboxInput = styled.input`
7326
7300
  ${visuallyHiddenStyle}
7327
7301
  position: relative;
7328
7302
  `;
7329
- const Checkbox = forwardRef(({ checked, disabled = false, id, label, description, name, onChange, size = "md", value, required = false, hideLabel = false, ...props }, ref) => {
7303
+ const Checkbox = ({ checked, disabled = false, id, label, description, name, onChange, size = "md", value, required = false, hideLabel = false, ref, ...props }) => {
7330
7304
  const generatedId = useId();
7331
7305
  const computedId = isNonEmptyString(id) ? id : `wistia-ui-checkbox-${generatedId}`;
7332
7306
  const checkboxGroupContext = useCheckboxGroup();
@@ -7364,8 +7338,7 @@ const Checkbox = forwardRef(({ checked, disabled = false, id, label, description
7364
7338
  label
7365
7339
  })]
7366
7340
  });
7367
- });
7368
- Checkbox.displayName = "Checkbox_UI";
7341
+ };
7369
7342
  //#endregion
7370
7343
  //#region src/components/ClickRegion/ClickRegion.tsx
7371
7344
  const isClickableElement = (element) => {
@@ -7866,41 +7839,40 @@ const ColorPickerProvider = ({ children, colorForComparison, minimumContrastRati
7866
7839
  valueAsHsvConvertedToHex,
7867
7840
  whatValueAsHexShouldBe
7868
7841
  ]);
7869
- const contextValue = useMemo(() => ({
7870
- colorForComparison,
7871
- currentContrastRatio,
7872
- getAccessibleDerivativeColor,
7873
- hasAccessibleDerivatives: hasAccessibleDerivativesValue,
7874
- isDragging,
7875
- isTransitioning,
7876
- minimumContrastRatio,
7877
- nonDerivedValueAsHex: formatHex(nonDerivedValueAsHsv),
7878
- nonDerivedValueAsHsv,
7879
- onChangeNonDerivedValueAsHsv,
7880
- opacityForContrastCalculation,
7881
- setIsDragging,
7882
- setShouldEnforceMinContrast: setShouldEnforceMinContrastWrapped,
7883
- shouldEnforceMinContrast,
7884
- valueAsHex,
7885
- valueAsHsv
7886
- }), [
7887
- colorForComparison,
7888
- currentContrastRatio,
7889
- getAccessibleDerivativeColor,
7890
- hasAccessibleDerivativesValue,
7891
- isDragging,
7892
- isTransitioning,
7893
- minimumContrastRatio,
7894
- nonDerivedValueAsHsv,
7895
- onChangeNonDerivedValueAsHsv,
7896
- opacityForContrastCalculation,
7897
- setShouldEnforceMinContrastWrapped,
7898
- shouldEnforceMinContrast,
7899
- valueAsHex,
7900
- valueAsHsv
7901
- ]);
7902
- return /* @__PURE__ */ jsx(ColorPickerContext.Provider, {
7903
- value: contextValue,
7842
+ return /* @__PURE__ */ jsx(ColorPickerContext, {
7843
+ value: useMemo(() => ({
7844
+ colorForComparison,
7845
+ currentContrastRatio,
7846
+ getAccessibleDerivativeColor,
7847
+ hasAccessibleDerivatives: hasAccessibleDerivativesValue,
7848
+ isDragging,
7849
+ isTransitioning,
7850
+ minimumContrastRatio,
7851
+ nonDerivedValueAsHex: formatHex(nonDerivedValueAsHsv),
7852
+ nonDerivedValueAsHsv,
7853
+ onChangeNonDerivedValueAsHsv,
7854
+ opacityForContrastCalculation,
7855
+ setIsDragging,
7856
+ setShouldEnforceMinContrast: setShouldEnforceMinContrastWrapped,
7857
+ shouldEnforceMinContrast,
7858
+ valueAsHex,
7859
+ valueAsHsv
7860
+ }), [
7861
+ colorForComparison,
7862
+ currentContrastRatio,
7863
+ getAccessibleDerivativeColor,
7864
+ hasAccessibleDerivativesValue,
7865
+ isDragging,
7866
+ isTransitioning,
7867
+ minimumContrastRatio,
7868
+ nonDerivedValueAsHsv,
7869
+ onChangeNonDerivedValueAsHsv,
7870
+ opacityForContrastCalculation,
7871
+ setShouldEnforceMinContrastWrapped,
7872
+ shouldEnforceMinContrast,
7873
+ valueAsHex,
7874
+ valueAsHsv
7875
+ ]),
7904
7876
  children
7905
7877
  });
7906
7878
  };
@@ -8507,14 +8479,13 @@ const DefaultTriggerContent = () => {
8507
8479
  * it renders a swatch and hex label for the current color; pass custom children
8508
8480
  * to replace that content.
8509
8481
  */
8510
- const ColorPickerTrigger = forwardRef(({ children, ...props }, forwardedRef) => {
8482
+ const ColorPickerTrigger = ({ children, ref, ...props }) => {
8511
8483
  return /* @__PURE__ */ jsx(StyledPopoverTrigger, {
8512
- ref: forwardedRef,
8484
+ ref,
8513
8485
  ...props,
8514
8486
  children: children ?? /* @__PURE__ */ jsx(DefaultTriggerContent, {})
8515
8487
  });
8516
- });
8517
- ColorPickerTrigger.displayName = "ColorPickerTrigger_UI";
8488
+ };
8518
8489
  //#endregion
8519
8490
  //#region src/components/ColorPicker/ContrastIndicator.tsx
8520
8491
  const Container$3 = styled.div`
@@ -8630,7 +8601,7 @@ const StyledSwitchThumb = styled.div`
8630
8601
  const StyledHiddenSwitchInput = styled.input`
8631
8602
  ${visuallyHiddenStyle}
8632
8603
  `;
8633
- const Switch = forwardRef(({ align = "left", checked, disabled = false, id, label, description, name, onChange, size = "md", value, required = false, hideLabel = false, ...props }, ref) => {
8604
+ const Switch = ({ align = "left", checked, disabled = false, id, label, description, name, onChange, size = "md", value, required = false, hideLabel = false, ref, ...props }) => {
8634
8605
  const generatedId = useId();
8635
8606
  const computedId = isNonEmptyString(id) ? id : `wistia-ui-switch-${generatedId}`;
8636
8607
  return /* @__PURE__ */ jsxs(StyledSwitchWrapper, {
@@ -8662,8 +8633,7 @@ const Switch = forwardRef(({ align = "left", checked, disabled = false, id, labe
8662
8633
  label
8663
8634
  })]
8664
8635
  });
8665
- });
8666
- Switch.displayName = "Switch_UI";
8636
+ };
8667
8637
  //#endregion
8668
8638
  //#region src/components/ColorPicker/ContrastEnforcerSwitch.tsx
8669
8639
  /**
@@ -8909,7 +8879,7 @@ const StyledInputContainer = styled.div`
8909
8879
  /**
8910
8880
  * Capture user input with a text field. Should be used within a [Form](/components/Form) and [FormField](/components/FormField).
8911
8881
  */
8912
- const Input = forwardRef(({ fullWidth = true, fullHeight = false, monospace = false, type = "text", autoSelect = false, leftIcon, rightIcon, ...props }, externalRef) => {
8882
+ const Input = ({ fullWidth = true, fullHeight = false, monospace = false, type = "text", autoSelect = false, leftIcon, rightIcon, ref: externalRef, ...props }) => {
8913
8883
  const internalRef = useRef(null);
8914
8884
  const ref = isNotNil(externalRef) && isRecord(externalRef) && "current" in externalRef ? externalRef : internalRef;
8915
8885
  let leftIconToDisplay = leftIcon;
@@ -8950,8 +8920,7 @@ const Input = forwardRef(({ fullWidth = true, fullHeight = false, monospace = fa
8950
8920
  rightIconToDisplay ?? null
8951
8921
  ]
8952
8922
  });
8953
- });
8954
- Input.displayName = "Input_UI";
8923
+ };
8955
8924
  //#endregion
8956
8925
  //#region src/components/ColorPicker/HexColorInput.tsx
8957
8926
  const SIX_DIGIT_HEX_CODE_LENGTH = 7;
@@ -9598,7 +9567,7 @@ const RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
9598
9567
  /**
9599
9568
  * A `Tag` is an optionally linked label, with an optional action button, to categorize content.
9600
9569
  */
9601
- const Tag = forwardRef(({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
9570
+ const Tag = ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ref, ...props }) => {
9602
9571
  const hasIcon = isNotNil(icon);
9603
9572
  const labelProps = isNotNil(href) && isNonEmptyString(href) ? {
9604
9573
  href,
@@ -9618,8 +9587,7 @@ const Tag = forwardRef(({ onClickRemove, colorScheme = "inherit", href, icon, la
9618
9587
  onClickRemoveLabel
9619
9588
  })]
9620
9589
  });
9621
- });
9622
- Tag.displayName = "Tag_UI";
9590
+ };
9623
9591
  //#endregion
9624
9592
  //#region src/private/helpers/getTypographicStyles/getTypographicStyles.ts
9625
9593
  const typographicVariantStyleMap = {
@@ -9955,7 +9923,7 @@ const MenuPopup = styled(Menu$1.Popup)`
9955
9923
  /**
9956
9924
  * Displays a menu to the users with a set of actions.
9957
9925
  */
9958
- const Menu = forwardRef(({ align = "start", children, disabled = false, compact = false, trigger, label, isOpen, side = "bottom", triggerProps = {}, onOpenChange, ...props }, ref) => {
9926
+ const Menu = ({ align = "start", children, disabled = false, compact = false, trigger, label, isOpen, side = "bottom", triggerProps = {}, onOpenChange, ref, ...props }) => {
9959
9927
  const contextValue = useMemo(() => ({ compact }), [compact]);
9960
9928
  const handleOpenChange = useCallback((nextOpen, eventDetails) => {
9961
9929
  if (nextOpen !== isOpen) {
@@ -9971,7 +9939,7 @@ const Menu = forwardRef(({ align = "start", children, disabled = false, compact
9971
9939
  open: false,
9972
9940
  onOpenChange: () => null
9973
9941
  };
9974
- return /* @__PURE__ */ jsx(MenuContext.Provider, {
9942
+ return /* @__PURE__ */ jsx(MenuContext, {
9975
9943
  value: contextValue,
9976
9944
  children: /* @__PURE__ */ jsxs(Menu$1.Root, {
9977
9945
  modal: false,
@@ -9997,8 +9965,7 @@ const Menu = forwardRef(({ align = "start", children, disabled = false, compact
9997
9965
  }) })]
9998
9966
  })
9999
9967
  });
10000
- });
10001
- Menu.displayName = "Menu_UI";
9968
+ };
10002
9969
  //#endregion
10003
9970
  //#region src/components/ContextMenu/ContextMenu.tsx
10004
9971
  const ContextMenuPopup = styled(Menu$1.Popup)`
@@ -10051,7 +10018,7 @@ const ContextMenu = ({ position, triggerRef, children, side = "bottom", onReques
10051
10018
  setIsRightClicked(next);
10052
10019
  if (!next) onRequestClose();
10053
10020
  };
10054
- const menu = /* @__PURE__ */ jsx(MenuContext.Provider, {
10021
+ const menu = /* @__PURE__ */ jsx(MenuContext, {
10055
10022
  value: contextValue,
10056
10023
  children: /* @__PURE__ */ jsx(ContextMenu$1.Root, {
10057
10024
  onOpenChange: handleOpenChange,
@@ -10685,7 +10652,7 @@ const EditableTextRoot = ({ children, defaultValue = "", value: controlledValue,
10685
10652
  "data-wui-editable-text-root": true,
10686
10653
  "data-wui-editable-text-state": getState(),
10687
10654
  ...props,
10688
- children: /* @__PURE__ */ jsx(EditableTextContext.Provider, {
10655
+ children: /* @__PURE__ */ jsx(EditableTextContext, {
10689
10656
  value: context,
10690
10657
  children
10691
10658
  })
@@ -10725,7 +10692,7 @@ const StyledEditableTextDisplay = styled.div`
10725
10692
  }
10726
10693
  }
10727
10694
  `;
10728
- const EditableTextDisplayComponent = forwardRef(({ asTrigger, renderAs, ...props }, ref) => {
10695
+ const EditableTextDisplayComponent = ({ ref, asTrigger, renderAs, ...props }) => {
10729
10696
  const context = useContext(EditableTextContext);
10730
10697
  if (!context) throw new Error("EditableTextDisplay must be used within an EditableTextRoot context");
10731
10698
  const { value, typographicVariant, setIsEditing, placeholder, maxLines, isEditing, minLines } = context;
@@ -10767,8 +10734,7 @@ const EditableTextDisplayComponent = forwardRef(({ asTrigger, renderAs, ...props
10767
10734
  ...props,
10768
10735
  children: displayText
10769
10736
  });
10770
- });
10771
- EditableTextDisplayComponent.displayName = "EditableTextDisplay_UI";
10737
+ };
10772
10738
  const EditableTextDisplay = makePolymorphic(EditableTextDisplayComponent);
10773
10739
  //#endregion
10774
10740
  //#region src/components/EditableText/EditableTextInput.tsx
@@ -11402,19 +11368,18 @@ const useRadioGroup = () => {
11402
11368
  const RadioGroup = ({ children, name, onChange, value, ...props }) => {
11403
11369
  const formState = useContext(FormContext);
11404
11370
  const derivedValue = typeof formState.values[name] === "string" ? formState.values[name] : value;
11405
- const context = useMemo(() => {
11406
- return {
11371
+ return /* @__PURE__ */ jsx(RadioGroupContext, {
11372
+ value: useMemo(() => {
11373
+ return {
11374
+ name,
11375
+ onChange,
11376
+ value: derivedValue
11377
+ };
11378
+ }, [
11407
11379
  name,
11408
- onChange,
11409
- value: derivedValue
11410
- };
11411
- }, [
11412
- name,
11413
- derivedValue,
11414
- onChange
11415
- ]);
11416
- return /* @__PURE__ */ jsx(RadioGroupContext.Provider, {
11417
- value: context,
11380
+ derivedValue,
11381
+ onChange
11382
+ ]),
11418
11383
  children: /* @__PURE__ */ jsx(FormGroup, {
11419
11384
  ...props,
11420
11385
  children
@@ -11464,7 +11429,7 @@ const StyledGrid = styled.div`
11464
11429
  * A flexible grid component that can either create a fixed number of columns
11465
11430
  * or an auto-filling grid based on the minimum child width.
11466
11431
  */
11467
- const GridComponent = forwardRef(({ children, columns = "auto", minChildWidth = "auto", gap = "space-02", expandItems = false, renderAs, ...props }, ref) => {
11432
+ const GridComponent = ({ ref, children, columns = "auto", minChildWidth = "auto", gap = "space-02", expandItems = false, renderAs, ...props }) => {
11468
11433
  const responsiveGap = useResponsiveProp(gap);
11469
11434
  const { column, row } = isRecord(responsiveGap) ? responsiveGap : {
11470
11435
  column: responsiveGap,
@@ -11481,8 +11446,7 @@ const GridComponent = forwardRef(({ children, columns = "auto", minChildWidth =
11481
11446
  ...props,
11482
11447
  children
11483
11448
  });
11484
- });
11485
- GridComponent.displayName = "Grid_UI";
11449
+ };
11486
11450
  const Grid = makePolymorphic(GridComponent);
11487
11451
  //#endregion
11488
11452
  //#region src/components/PreviewCard/PreviewCard.tsx
@@ -11582,7 +11546,7 @@ const COPY_SUCCESS_DURATION = 2e3;
11582
11546
  /**
11583
11547
  * Provides a readonly input that copies the text to the clipboard when clicked.
11584
11548
  */
11585
- const InputClickToCopy = forwardRef(({ value, onCopy, disabled = false, ...props }, ref) => {
11549
+ const InputClickToCopy = ({ value, onCopy, disabled = false, ref, ...props }) => {
11586
11550
  const [isCopied, setIsCopied] = useState(false);
11587
11551
  useEffect(() => {
11588
11552
  if (isCopied) {
@@ -11621,8 +11585,7 @@ const InputClickToCopy = forwardRef(({ value, onCopy, disabled = false, ...props
11621
11585
  }),
11622
11586
  value
11623
11587
  });
11624
- });
11625
- InputClickToCopy.displayName = "InputClickToCopy_UI";
11588
+ };
11626
11589
  //#endregion
11627
11590
  //#region src/components/InputDuration/constants.ts
11628
11591
  const SECONDS_PER_MINUTE = 60;
@@ -12291,7 +12254,7 @@ const getInputWidth = (inputValue) => {
12291
12254
  /**
12292
12255
  * InputDuration lets users edit a duration value using a keyboard-friendly time input.
12293
12256
  */
12294
- const InputDuration = forwardRef(({ decimalUnitLength = 2, disabled = false, fullWidth = false, maxSeconds = MAX_TIME, minSeconds = 0, onChangeValueInSeconds, valueInSeconds, onFocus, style, ...props }, externalRef) => {
12257
+ const InputDuration = ({ decimalUnitLength = 2, disabled = false, fullWidth = false, maxSeconds = MAX_TIME, minSeconds = 0, onChangeValueInSeconds, valueInSeconds, onFocus, style, ref: externalRef, ...props }) => {
12295
12258
  const { inputRef, inputValue, onFocus: onInputFocus, onInputSelect, onKeyDown, onKeyUp } = useInputDuration({
12296
12259
  decimalUnitLength,
12297
12260
  maxSeconds,
@@ -12326,8 +12289,7 @@ const InputDuration = forwardRef(({ decimalUnitLength = 2, disabled = false, ful
12326
12289
  type: "text",
12327
12290
  value: inputValue
12328
12291
  });
12329
- });
12330
- InputDuration.displayName = "InputDuration_UI";
12292
+ };
12331
12293
  //#endregion
12332
12294
  //#region src/components/InputPassword/InputPassword.tsx
12333
12295
  const StyledIconButton = styled(IconButton)`
@@ -12341,7 +12303,7 @@ const StyledIconButton = styled(IconButton)`
12341
12303
  /**
12342
12304
  * A password input component with a toggle button to show or hide the password text.
12343
12305
  */
12344
- const InputPassword = forwardRef(({ onVisibilityToggle, disabled = false, ...props }, ref) => {
12306
+ const InputPassword = ({ onVisibilityToggle, disabled = false, ref, ...props }) => {
12345
12307
  const [isVisible, setIsVisible] = useState(false);
12346
12308
  const handleClick = () => {
12347
12309
  const newVisibility = !isVisible;
@@ -12362,8 +12324,7 @@ const InputPassword = forwardRef(({ onVisibilityToggle, disabled = false, ...pro
12362
12324
  }),
12363
12325
  type: isVisible ? "text" : "password"
12364
12326
  });
12365
- });
12366
- InputPassword.displayName = "InputPassword_UI";
12327
+ };
12367
12328
  //#endregion
12368
12329
  //#region src/components/KeyboardShortcut/isKeyboardKey.ts
12369
12330
  const KEYBOARD_KEY_MAP = {
@@ -12875,7 +12836,7 @@ const StyledBadgeContainer = styled.div`
12875
12836
  font-size: var(--wui-typography-label-4-size);
12876
12837
  color: var(--wui-color-text-secondary);
12877
12838
  `;
12878
- const MenuItemButton = forwardRef(({ children, appearance, command, icon, ...props }, ref) => {
12839
+ const MenuItemButton = ({ children, appearance, command, icon, ref, ...props }) => {
12879
12840
  let { colorScheme, badge } = props;
12880
12841
  if (appearance === "dangerous") {
12881
12842
  if (isNotUndefined(colorScheme)) console.warn("colorScheme prop is ignored when appearance is dangerous");
@@ -12903,8 +12864,7 @@ const MenuItemButton = forwardRef(({ children, appearance, command, icon, ...pro
12903
12864
  isNotNil(props.rightIcon) ? /* @__PURE__ */ jsx(StyledRightIconContainer, { children: props.rightIcon }) : null
12904
12865
  ]
12905
12866
  });
12906
- });
12907
- MenuItemButton.displayName = "MenuItemButton_UI";
12867
+ };
12908
12868
  //#endregion
12909
12869
  //#region src/components/Menu/MenuItemLabel.tsx
12910
12870
  const StyledMenuItemLabel = styled.span`
@@ -12983,7 +12943,7 @@ const SubMenu = ({ label, description, children, onOpenChange = () => null, ...p
12983
12943
  SubMenu.displayName = "SubMenu_UI";
12984
12944
  //#endregion
12985
12945
  //#region src/components/Menu/MenuItem.tsx
12986
- const MenuItem = forwardRef(({ onSelect = () => null, closeOnClick = true, ...props }, ref) => {
12946
+ const MenuItem = ({ onSelect = () => null, closeOnClick = true, ref, ...props }) => {
12987
12947
  return /* @__PURE__ */ jsx(Menu$1.Item, {
12988
12948
  closeOnClick,
12989
12949
  nativeButton: isNil(props.href),
@@ -12994,8 +12954,7 @@ const MenuItem = forwardRef(({ onSelect = () => null, closeOnClick = true, ...pr
12994
12954
  leftIcon: props.icon
12995
12955
  })
12996
12956
  });
12997
- });
12998
- MenuItem.displayName = "MenuItem_UI";
12957
+ };
12999
12958
  //#endregion
13000
12959
  //#region src/components/Menu/MenuRadioGroup.tsx
13001
12960
  const MenuRadioGroup = ({ children, ...props }) => {
@@ -13075,7 +13034,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem_UI";
13075
13034
  //#endregion
13076
13035
  //#region src/components/Menu/FilterMenu.tsx
13077
13036
  const FilterMenuItem = CheckboxMenuItem;
13078
- const FilterMenu = forwardRef(({ value, onChange, searchValue, onSearchValueChange, children, ...props }, ref) => {
13037
+ const FilterMenu = ({ value, onChange, searchValue, onSearchValueChange, children, ref, ...props }) => {
13079
13038
  return /* @__PURE__ */ jsxs(Menu, {
13080
13039
  ...props,
13081
13040
  ref,
@@ -13146,8 +13105,7 @@ const FilterMenu = forwardRef(({ value, onChange, searchValue, onSearchValueChan
13146
13105
  })
13147
13106
  ]
13148
13107
  });
13149
- });
13150
- FilterMenu.displayName = "FilterMenu_UI";
13108
+ };
13151
13109
  //#endregion
13152
13110
  //#region src/components/Meter/Meter.tsx
13153
13111
  const MeterWrapper = styled.div`
@@ -13250,11 +13208,12 @@ const Meter = ({ segments, label, labelMeta, description, hideKey = false, max =
13250
13208
  const segmentsWithOffsets = segments.reduce((acc, segment) => {
13251
13209
  const offset = acc.reduce((sum, prev) => sum + prev.widthPercent, 0);
13252
13210
  const widthPercent = segment.value / max * 100;
13253
- return [...acc, {
13211
+ acc.push({
13254
13212
  ...segment,
13255
13213
  offset,
13256
13214
  widthPercent
13257
- }];
13215
+ });
13216
+ return acc;
13258
13217
  }, []);
13259
13218
  const keySegments = segmentsWithOffsets.filter((segment) => isNotNil(segment.label));
13260
13219
  const totalValue = segments.reduce((sum, segment) => sum + segment.value, 0);
@@ -13477,7 +13436,7 @@ const StyledModalContent = styled(Dialog.Popup)`
13477
13436
  ${({ $positionVariant }) => positionStyleMap[$positionVariant]}
13478
13437
  }
13479
13438
  `;
13480
- const ModalContent = forwardRef(({ width, positionVariant, initialFocusRef, children, ...props }, ref) => {
13439
+ const ModalContent = ({ width, positionVariant, initialFocusRef, children, ref, ...props }) => {
13481
13440
  return /* @__PURE__ */ jsx(StyledModalContent, {
13482
13441
  ref,
13483
13442
  $positionVariant: positionVariant,
@@ -13486,8 +13445,7 @@ const ModalContent = forwardRef(({ width, positionVariant, initialFocusRef, chil
13486
13445
  ...props,
13487
13446
  children
13488
13447
  });
13489
- });
13490
- ModalContent.displayName = "ModalContent_UI";
13448
+ };
13491
13449
  //#endregion
13492
13450
  //#region src/components/Modal/ModalOverlay.tsx
13493
13451
  const backdropShow = keyframes`
@@ -13542,7 +13500,7 @@ const ModalFooter = styled.footer`
13542
13500
  * A Modal is a focused UI element that appears atop the main interface, requiring
13543
13501
  * user interaction or dismissal before returning to the underlying content.
13544
13502
  */
13545
- const Modal = forwardRef(({ children, footer, hideCloseButton = false, hideTitle = false, initialFocusRef, isOpen, onRequestClose, positionVariant = "centered", title, width = DEFAULT_MODAL_WIDTH, ...props }, ref) => {
13503
+ const Modal = ({ children, footer, hideCloseButton = false, hideTitle = false, initialFocusRef, isOpen, onRequestClose, positionVariant = "centered", title, width = DEFAULT_MODAL_WIDTH, ref, ...props }) => {
13546
13504
  return /* @__PURE__ */ jsx(Dialog.Root, {
13547
13505
  onOpenChange: (open) => {
13548
13506
  if (!open && isNotNil(onRequestClose)) onRequestClose();
@@ -13566,8 +13524,7 @@ const Modal = forwardRef(({ children, footer, hideCloseButton = false, hideTitle
13566
13524
  ]
13567
13525
  })] })
13568
13526
  });
13569
- });
13570
- Modal.displayName = "Modal_UI";
13527
+ };
13571
13528
  //#endregion
13572
13529
  //#region src/components/Modal/ModalCallouts.tsx
13573
13530
  const ModalCallouts = ({ children }) => {
@@ -13775,7 +13732,7 @@ Popover.displayName = "Popover_UI";
13775
13732
  //#endregion
13776
13733
  //#region src/components/Popover/PopoverAnchorContext.tsx
13777
13734
  const PopoverAnchorContext = createContext(null);
13778
- const PopoverAnchorProvider = PopoverAnchorContext.Provider;
13735
+ const PopoverAnchorProvider = PopoverAnchorContext;
13779
13736
  const usePopoverAnchor = () => useContext(PopoverAnchorContext);
13780
13737
  const useCreatePopoverAnchorRef = () => useRef(null);
13781
13738
  //#endregion
@@ -13804,11 +13761,10 @@ PopoverAnchor.displayName = "PopoverAnchor_UI";
13804
13761
  * pass `render` to merge the close behavior onto a single child element. For
13805
13762
  * a pre-styled icon close button, use `PopoverCloseButton`.
13806
13763
  */
13807
- const PopoverClose = forwardRef((props, forwardedRef) => /* @__PURE__ */ jsx(Popover$1.Close, {
13808
- ref: forwardedRef,
13764
+ const PopoverClose = ({ ref, ...props }) => /* @__PURE__ */ jsx(Popover$1.Close, {
13765
+ ref,
13809
13766
  ...props
13810
- }));
13811
- PopoverClose.displayName = "PopoverClose_UI";
13767
+ });
13812
13768
  //#endregion
13813
13769
  //#region src/components/Popover/PopoverCloseButton.tsx
13814
13770
  /**
@@ -13850,7 +13806,7 @@ const DEFAULT_MAX_HEIGHT = "auto";
13850
13806
  * The styled popover surface. Place inside a `PopoverRoot` (typically wrapped
13851
13807
  * in a `PopoverPortal`). Wraps a `Positioner` and `Popup` internally.
13852
13808
  */
13853
- const PopoverContent = forwardRef(({ colorScheme = "inherit", unstyled = false, maxWidth = DEFAULT_MAX_WIDTH, maxHeight = DEFAULT_MAX_HEIGHT, sideOffset = DEFAULT_SIDE_OFFSET, side, align, style, role = "dialog", children, ...props }, forwardedRef) => {
13809
+ const PopoverContent = ({ colorScheme = "inherit", unstyled = false, maxWidth = DEFAULT_MAX_WIDTH, maxHeight = DEFAULT_MAX_HEIGHT, sideOffset = DEFAULT_SIDE_OFFSET, side, align, style, role = "dialog", children, ref, ...props }) => {
13854
13810
  const sharedAnchorRef = usePopoverAnchor();
13855
13811
  const hasAnchor = sharedAnchorRef?.current != null;
13856
13812
  const mergedStyle = {
@@ -13870,7 +13826,7 @@ const PopoverContent = forwardRef(({ colorScheme = "inherit", unstyled = false,
13870
13826
  style: { zIndex: "var(--wui-zindex-popover)" },
13871
13827
  ...hasAnchor ? { anchor: sharedAnchorRef } : {},
13872
13828
  children: /* @__PURE__ */ jsx(StyledPopup$1, {
13873
- ref: forwardedRef,
13829
+ ref,
13874
13830
  $colorScheme: colorScheme,
13875
13831
  $unstyled: unstyled,
13876
13832
  role,
@@ -13879,8 +13835,7 @@ const PopoverContent = forwardRef(({ colorScheme = "inherit", unstyled = false,
13879
13835
  children
13880
13836
  })
13881
13837
  });
13882
- });
13883
- PopoverContent.displayName = "PopoverContent_UI";
13838
+ };
13884
13839
  //#endregion
13885
13840
  //#region src/components/Popover/PopoverPortal.tsx
13886
13841
  /**
@@ -13915,12 +13870,11 @@ PopoverRoot.displayName = "PopoverRoot_UI";
13915
13870
  * `<button>` wrapping its children; pass `render` to merge the trigger
13916
13871
  * behavior onto a single child element (e.g. a `Button` or `IconButton`).
13917
13872
  */
13918
- const PopoverTrigger = forwardRef(({ nativeButton = true, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Popover$1.Trigger, {
13919
- ref: forwardedRef,
13873
+ const PopoverTrigger = ({ nativeButton = true, ref, ...props }) => /* @__PURE__ */ jsx(Popover$1.Trigger, {
13874
+ ref,
13920
13875
  nativeButton,
13921
13876
  ...props
13922
- }));
13923
- PopoverTrigger.displayName = "PopoverTrigger_UI";
13877
+ });
13924
13878
  //#endregion
13925
13879
  //#region src/components/ProgressBar/ProgressBar.tsx
13926
13880
  const ProgressBarWrapper = styled.div`
@@ -14062,7 +14016,7 @@ const StyledRadioInput = styled.div`
14062
14016
  const StyledHiddenRadioInput = styled.input`
14063
14017
  ${visuallyHiddenStyle}
14064
14018
  `;
14065
- const Radio = forwardRef(({ checked, disabled = false, id, label, description, name, onChange, size = "md", value = "false", required = false, hideLabel = false, ...props }, ref) => {
14019
+ const Radio = ({ checked, disabled = false, id, label, description, name, onChange, size = "md", value = "false", required = false, hideLabel = false, ref, ...props }) => {
14066
14020
  const generatedId = useId();
14067
14021
  const computedId = isNonEmptyString(id) ? id : `wistia-ui-radio-${generatedId}`;
14068
14022
  const radioGroupContext = useRadioGroup();
@@ -14096,8 +14050,7 @@ const Radio = forwardRef(({ checked, disabled = false, id, label, description, n
14096
14050
  label
14097
14051
  })]
14098
14052
  });
14099
- });
14100
- Radio.displayName = "Radio_UI";
14053
+ };
14101
14054
  //#endregion
14102
14055
  //#region src/components/RadioCard/RadioCardRoot.tsx
14103
14056
  const checkedStyles = css`
@@ -14206,7 +14159,7 @@ const StyledCard = styled.label`
14206
14159
  const StyledHiddenInput = styled.input`
14207
14160
  ${visuallyHiddenStyle}
14208
14161
  `;
14209
- const RadioCardRoot = forwardRef(({ children, disabled = false, id, isGated = false, name, onChange, value, aspectRatio = "initial", padding = "space-04", checked, ...props }, ref) => {
14162
+ const RadioCardRoot = ({ children, disabled = false, id, isGated = false, name, onChange, value, aspectRatio = "initial", padding = "space-04", checked, ref, ...props }) => {
14210
14163
  const generatedId = useId();
14211
14164
  const computedId = isNonEmptyString(id) ? id : `wistia-ui-radio-${generatedId}`;
14212
14165
  const radioGroupContext = useRadioGroup();
@@ -14233,8 +14186,7 @@ const RadioCardRoot = forwardRef(({ children, disabled = false, id, isGated = fa
14233
14186
  value
14234
14187
  }), children]
14235
14188
  });
14236
- });
14237
- RadioCardRoot.displayName = "RadioCardRoot_UI";
14189
+ };
14238
14190
  //#endregion
14239
14191
  //#region src/components/RadioCard/RadioCardIndicator.tsx
14240
14192
  const RadioCardIndicator = styled.div`
@@ -14347,7 +14299,7 @@ const RadioCardChildrenContainer = styled.div`
14347
14299
  `;
14348
14300
  //#endregion
14349
14301
  //#region src/components/RadioCard/RadioCard.tsx
14350
- const RadioCard = forwardRef(({ icon, label, description, showIndicator, isGated, children, ...rootProps }, ref) => {
14302
+ const RadioCard = ({ icon, label, description, showIndicator, isGated, children, ref, ...rootProps }) => {
14351
14303
  return /* @__PURE__ */ jsx(RadioCardRoot, {
14352
14304
  ref,
14353
14305
  isGated,
@@ -14364,11 +14316,10 @@ const RadioCard = forwardRef(({ icon, label, description, showIndicator, isGated
14364
14316
  showIndicator
14365
14317
  })
14366
14318
  });
14367
- });
14368
- RadioCard.displayName = "RadioCard_UI";
14319
+ };
14369
14320
  //#endregion
14370
14321
  //#region src/components/RadioCard/RadioCardImage.tsx
14371
- const RadioCardImage = forwardRef(({ label, imageSrc, aspectRatio, padding = "space-04", ...rootProps }, ref) => {
14322
+ const RadioCardImage = ({ label, imageSrc, aspectRatio, padding = "space-04", ref, ...rootProps }) => {
14372
14323
  return /* @__PURE__ */ jsx(RadioCardRoot, {
14373
14324
  ref,
14374
14325
  ...rootProps,
@@ -14382,8 +14333,7 @@ const RadioCardImage = forwardRef(({ label, imageSrc, aspectRatio, padding = "sp
14382
14333
  src: imageSrc
14383
14334
  })
14384
14335
  });
14385
- });
14386
- RadioCardImage.displayName = "RadioCardImage_UI";
14336
+ };
14387
14337
  //#endregion
14388
14338
  //#region src/components/ScrollArea/ScrollArea.tsx
14389
14339
  const SHADOW_SIZE_PX = 8;
@@ -14436,7 +14386,7 @@ const ShadowAtRight = styled(Shadow)`
14436
14386
  * ScrollArea is a simple scrollable container with shadow effects to indicate
14437
14387
  * scrollability.
14438
14388
  */
14439
- const ScrollArea = forwardRef(({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
14389
+ const ScrollArea = ({ children, onScroll, style, locked = false, ref: forwardedRef, ...props }) => {
14440
14390
  const scrollContainerRefInternal = useRef(null);
14441
14391
  const [shadowState, setShadowState] = useState({
14442
14392
  canScrollUp: false,
@@ -14479,8 +14429,7 @@ const ScrollArea = forwardRef(({ children, onScroll, style, locked = false, ...p
14479
14429
  })
14480
14430
  ]
14481
14431
  });
14482
- });
14483
- ScrollArea.displayName = "ScrollArea_UI";
14432
+ };
14484
14433
  //#endregion
14485
14434
  //#region src/components/SegmentedControl/useSelectedItemStyle.tsx
14486
14435
  const SelectedItemStyleContext = createContext(null);
@@ -14491,12 +14440,11 @@ const SelectedItemStyleProvider = ({ children }) => {
14491
14440
  transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
14492
14441
  width: `${selectedItemMeasurements.offsetWidth}px`
14493
14442
  } : void 0, [selectedItemMeasurements]);
14494
- const contextValue = useMemo(() => ({
14495
- setSelectedItemMeasurements,
14496
- selectedItemIndicatorStyle
14497
- }), [selectedItemIndicatorStyle]);
14498
- return /* @__PURE__ */ jsx(SelectedItemStyleContext.Provider, {
14499
- value: contextValue,
14443
+ return /* @__PURE__ */ jsx(SelectedItemStyleContext, {
14444
+ value: useMemo(() => ({
14445
+ setSelectedItemMeasurements,
14446
+ selectedItemIndicatorStyle
14447
+ }), [selectedItemIndicatorStyle]),
14500
14448
  children
14501
14449
  });
14502
14450
  };
@@ -14508,7 +14456,7 @@ const useSelectedItemStyle = () => {
14508
14456
  //#endregion
14509
14457
  //#region src/components/SegmentedControl/useSegmentedControlValue.tsx
14510
14458
  const SegmentedControlValueContext = createContext(null);
14511
- const SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
14459
+ const SegmentedControlValueProvider = SegmentedControlValueContext;
14512
14460
  const useSegmentedControlValue = () => {
14513
14461
  const context = useContext(SegmentedControlValueContext);
14514
14462
  if (context === null) throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
@@ -14562,7 +14510,7 @@ const StyledSegmentedControl = styled(ToggleGroup)`
14562
14510
  /**
14563
14511
  * Provides a horizontal set of segments for switching between different values
14564
14512
  */
14565
- const SegmentedControl = forwardRef(({ children, colorScheme = "inherit", disabled = false, fullWidth = false, selectedValue, onSelectedValueChange, ...props }, ref) => {
14513
+ const SegmentedControl = ({ children, colorScheme = "inherit", disabled = false, fullWidth = false, selectedValue, onSelectedValueChange, ref, ...props }) => {
14566
14514
  if (isNil(children)) return null;
14567
14515
  return /* @__PURE__ */ jsx(StyledSegmentedControl, {
14568
14516
  ref,
@@ -14580,8 +14528,7 @@ const SegmentedControl = forwardRef(({ children, colorScheme = "inherit", disabl
14580
14528
  children: /* @__PURE__ */ jsxs(SelectedItemStyleProvider, { children: [children, /* @__PURE__ */ jsx(SelectedItemIndicator, {})] })
14581
14529
  })
14582
14530
  });
14583
- });
14584
- SegmentedControl.displayName = "SegmentedControl_UI";
14531
+ };
14585
14532
  //#endregion
14586
14533
  //#region src/components/SegmentedControl/SegmentedControlItem.tsx
14587
14534
  const segmentedControlItemStyles = css`
@@ -14656,7 +14603,7 @@ const segmentedControlItemStyles = css`
14656
14603
  const StyledSegmentedControlItem = styled(Toggle)`
14657
14604
  ${segmentedControlItemStyles}
14658
14605
  `;
14659
- const SegmentedControlItem = forwardRef(({ disabled, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
14606
+ const SegmentedControlItem = ({ disabled, icon, label, "aria-label": ariaLabel, value, ref: forwardedRef, ...otherProps }) => {
14660
14607
  const selectedValue = useSegmentedControlValue();
14661
14608
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
14662
14609
  const buttonRef = useRef(null);
@@ -14699,8 +14646,7 @@ const SegmentedControlItem = forwardRef(({ disabled, icon, label, "aria-label":
14699
14646
  value,
14700
14647
  children: [icon, label]
14701
14648
  });
14702
- });
14703
- SegmentedControlItem.displayName = "SegmentedControlItem_UI";
14649
+ };
14704
14650
  //#endregion
14705
14651
  //#region src/components/Select/Select.tsx
14706
14652
  const StyledTrigger = styled(Select$1.Trigger)`
@@ -14841,7 +14787,7 @@ const collectItemLabels = (children) => Children.toArray(children).flatMap((chil
14841
14787
  /**
14842
14788
  * Display a list of options and choose one of them. Replacement for the native Select HTML element.
14843
14789
  */
14844
- const Select = forwardRef(({ colorScheme = "inherit", children, onOpenChange = () => null, onChange = () => null, placeholder = "Select...", fullWidth = false, forceOpen = false, showScrollArrows = false, disabled, name, value, "aria-invalid": ariaInvalid, ...props }, forwardedRef) => {
14790
+ const Select = ({ colorScheme = "inherit", children, onOpenChange = () => null, onChange = () => null, placeholder = "Select...", fullWidth = false, forceOpen = false, showScrollArrows = false, disabled, name, value, "aria-invalid": ariaInvalid, ref: forwardedRef, ...props }) => {
14845
14791
  const responsiveFullWidth = useResponsiveProp(fullWidth);
14846
14792
  const rootProps = {
14847
14793
  disabled,
@@ -14882,8 +14828,7 @@ const Select = forwardRef(({ colorScheme = "inherit", children, onOpenChange = (
14882
14828
  ] })
14883
14829
  }) })]
14884
14830
  });
14885
- });
14886
- Select.displayName = "Select_UI";
14831
+ };
14887
14832
  //#endregion
14888
14833
  //#region src/components/Select/SelectOption.tsx
14889
14834
  const StyledItem = styled(Select$1.Item)`
@@ -14912,7 +14857,7 @@ const StyledItem = styled(Select$1.Item)`
14912
14857
  background-color: transparent;
14913
14858
  }
14914
14859
  `;
14915
- const SelectOption = forwardRef(({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", textValue, ...props }, forwardedRef) => {
14860
+ const SelectOption = ({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", textValue, ref: forwardedRef, ...props }) => {
14916
14861
  const label = typeof children === "string" ? children : textValue;
14917
14862
  return /* @__PURE__ */ jsxs(StyledItem, {
14918
14863
  ...props,
@@ -14927,8 +14872,7 @@ const SelectOption = forwardRef(({ children, selectedDisplayValue, checkmarkVert
14927
14872
  type: "checkmark"
14928
14873
  }) })]
14929
14874
  });
14930
- });
14931
- SelectOption.displayName = "SelectOption_UI";
14875
+ };
14932
14876
  //#endregion
14933
14877
  //#region src/components/Select/SelectOptionGroup.tsx
14934
14878
  const StyledLabel = styled(Select$1.GroupLabel)`
@@ -14974,14 +14918,13 @@ const StyledSidebar = styled.nav`
14974
14918
  overflow: hidden;
14975
14919
  border-right: 1px solid var(--wui-color-border);
14976
14920
  `;
14977
- const Sidebar = forwardRef(({ children, ...props }, ref) => {
14921
+ const Sidebar = ({ children, ref, ...props }) => {
14978
14922
  return /* @__PURE__ */ jsx(StyledSidebar, {
14979
14923
  ref,
14980
14924
  ...props,
14981
14925
  children
14982
14926
  });
14983
- });
14984
- Sidebar.displayName = "Sidebar_UI";
14927
+ };
14985
14928
  //#endregion
14986
14929
  //#region src/components/Sidebar/SidebarHeader.tsx
14987
14930
  const StyledSidebarHeader = styled.div`
@@ -15121,7 +15064,7 @@ const StyledSidebarButton = styled(Button)`
15121
15064
  ${pressedButtonVariant};
15122
15065
  }
15123
15066
  `;
15124
- const SidebarButton = forwardRef(({ selected = false, ...props }, ref) => {
15067
+ const SidebarButton = ({ selected = false, ref, ...props }) => {
15125
15068
  return /* @__PURE__ */ jsx(StyledSidebarButton, {
15126
15069
  ref,
15127
15070
  "aria-current": selected ? "page" : void 0,
@@ -15129,14 +15072,13 @@ const SidebarButton = forwardRef(({ selected = false, ...props }, ref) => {
15129
15072
  "data-wui-sidebar-button": true,
15130
15073
  ...props
15131
15074
  });
15132
- });
15133
- SidebarButton.displayName = "SidebarButton_UI";
15075
+ };
15134
15076
  //#endregion
15135
15077
  //#region src/components/Sidebar/SidebarSearchInput.tsx
15136
15078
  const StyledSidebarSearchInputContainer = styled.div`
15137
15079
  padding-inline: var(--wui-space-01);
15138
15080
  `;
15139
- const SidebarSearchInput = forwardRef(({ id, label = "Search navigation", ...props }, ref) => {
15081
+ const SidebarSearchInput = ({ id, label = "Search navigation", ref, ...props }) => {
15140
15082
  const generatedId = useId();
15141
15083
  const inputId = id ?? generatedId;
15142
15084
  return /* @__PURE__ */ jsxs(StyledSidebarSearchInputContainer, { children: [/* @__PURE__ */ jsx(Label, {
@@ -15149,8 +15091,7 @@ const SidebarSearchInput = forwardRef(({ id, label = "Search navigation", ...pro
15149
15091
  type: "search",
15150
15092
  ...props
15151
15093
  })] });
15152
- });
15153
- SidebarSearchInput.displayName = "SidebarSearchInput_UI";
15094
+ };
15154
15095
  //#endregion
15155
15096
  //#region src/components/Slider/Slider.tsx
15156
15097
  const SliderContainer = styled.div`
@@ -15357,7 +15298,7 @@ const StyledTableBody = styled.tbody`
15357
15298
  width: 100%;
15358
15299
  `;
15359
15300
  const TableBody = ({ children, ...props }) => {
15360
- return /* @__PURE__ */ jsx(TableSectionContext.Provider, {
15301
+ return /* @__PURE__ */ jsx(TableSectionContext, {
15361
15302
  value: "body",
15362
15303
  children: /* @__PURE__ */ jsx(StyledTableBody, {
15363
15304
  ...props,
@@ -15400,7 +15341,7 @@ const StyledTableFoot = styled.tfoot`
15400
15341
  width: 100%;
15401
15342
  `;
15402
15343
  const TableFoot = ({ children, ...props }) => {
15403
- return /* @__PURE__ */ jsx(TableSectionContext.Provider, {
15344
+ return /* @__PURE__ */ jsx(TableSectionContext, {
15404
15345
  value: "footer",
15405
15346
  children: /* @__PURE__ */ jsx(StyledTableFoot, {
15406
15347
  ...props,
@@ -15414,7 +15355,7 @@ const StyledThead = styled.thead`
15414
15355
  width: 100%;
15415
15356
  `;
15416
15357
  const TableHead = ({ children, ...props }) => {
15417
- return /* @__PURE__ */ jsx(TableSectionContext.Provider, {
15358
+ return /* @__PURE__ */ jsx(TableSectionContext, {
15418
15359
  value: "head",
15419
15360
  children: /* @__PURE__ */ jsx(StyledThead, {
15420
15361
  ...props,
@@ -15436,7 +15377,7 @@ const TableRow = ({ children, ...props }) => {
15436
15377
  //#endregion
15437
15378
  //#region src/components/Tabs/useTabsValue.tsx
15438
15379
  const TabsValueContext = createContext(null);
15439
- const TabsValueProvider = TabsValueContext.Provider;
15380
+ const TabsValueProvider = TabsValueContext;
15440
15381
  const useTabsValue = () => {
15441
15382
  const context = useContext(TabsValueContext);
15442
15383
  if (context === null) throw new Error("useTabsValue must be used within a TabsValueProvider");
@@ -15519,11 +15460,11 @@ const StyledTabsTrigger = styled(Tabs$1.Tab)`
15519
15460
  `;
15520
15461
  //#endregion
15521
15462
  //#region src/components/Tabs/TabsTrigger.tsx
15522
- const TabsTrigger = forwardRef(({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
15463
+ const TabsTrigger = ({ disabled = false, icon, label, "aria-label": ariaLabel, value, ref, ...otherProps }) => {
15523
15464
  const selectedValue = useTabsValue();
15524
15465
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
15525
15466
  const buttonRef = useRef(null);
15526
- const combinedRef = mergeRefs([buttonRef, forwardedRef]);
15467
+ const combinedRef = mergeRefs([buttonRef, ref]);
15527
15468
  useEffect(() => {
15528
15469
  const buttonElem = buttonRef.current;
15529
15470
  if (!buttonElem) return;
@@ -15558,8 +15499,7 @@ const TabsTrigger = forwardRef(({ disabled = false, icon, label, "aria-label": a
15558
15499
  value,
15559
15500
  children: [icon, label]
15560
15501
  });
15561
- });
15562
- TabsTrigger.displayName = "TabsTrigger_UI";
15502
+ };
15563
15503
  //#endregion
15564
15504
  //#region src/components/Thumbnail/ThumbnailBadge.tsx
15565
15505
  const StyledThumbnailBadge = styled.div`
@@ -15758,7 +15698,7 @@ const hasValidThumbnailUrl = (thumbnailUrl) => {
15758
15698
  /**
15759
15699
  * A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
15760
15700
  */
15761
- const Thumbnail = forwardRef(({ gradientBackground = "defaultMidOne", thumbnailImageType = "wide", thumbnailUrl, width = "100%", children, storyboard, height, aspectRatio = "wide", ...props }, ref) => {
15701
+ const Thumbnail = ({ gradientBackground = "defaultMidOne", thumbnailImageType = "wide", thumbnailUrl, width = "100%", children, storyboard, height, aspectRatio = "wide", ref, ...props }) => {
15762
15702
  const [percent, setPercent] = useState(0);
15763
15703
  const [isMouseOver, setIsMouseOver] = useState(false);
15764
15704
  const [isStoryboardReady, setIsStoryboardReady] = useState(false);
@@ -15831,8 +15771,7 @@ const Thumbnail = forwardRef(({ gradientBackground = "defaultMidOne", thumbnailI
15831
15771
  children: [isNotNil(children) ? children : null, thumbnailContent]
15832
15772
  })
15833
15773
  });
15834
- });
15835
- Thumbnail.displayName = "Thumbnail_UI";
15774
+ };
15836
15775
  //#endregion
15837
15776
  //#region src/components/ThumbnailCollage/ThumbnailCollage.tsx
15838
15777
  const ThumbnailCollageContainer = styled.div`