@wistia/ui 0.14.18 → 0.14.19-beta.9fc714e3.4e17182

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.14.18
3
+ * @license @wistia/ui v0.14.19-beta.9fc714e3.4e17182
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2153,7 +2153,7 @@ var import_react7 = require("react");
2153
2153
  var import_react6 = require("react");
2154
2154
  var useTimedToggle = (initialValue) => {
2155
2155
  const [value, setValue] = (0, import_react6.useState)(false);
2156
- const timeoutRef = (0, import_react6.useRef)();
2156
+ const timeoutRef = (0, import_react6.useRef)(void 0);
2157
2157
  const initialValueRef = (0, import_react6.useRef)(initialValue);
2158
2158
  const toggleValue = (timeout) => {
2159
2159
  clearTimeout(timeoutRef.current);
@@ -2519,8 +2519,8 @@ var isEventTargetSupported = (eventTarget) => (
2519
2519
  Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
2520
2520
  );
2521
2521
  var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
2522
- const savedEventHandler = (0, import_react12.useRef)();
2523
- const savedEventOptions = (0, import_react12.useRef)();
2522
+ const savedEventHandler = (0, import_react12.useRef)(void 0);
2523
+ const savedEventOptions = (0, import_react12.useRef)(void 0);
2524
2524
  (0, import_react12.useEffect)(() => {
2525
2525
  savedEventHandler.current = eventHandler;
2526
2526
  }, [eventHandler]);
@@ -2713,7 +2713,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
2713
2713
  // src/hooks/usePreviousValue/usePreviousValue.ts
2714
2714
  var import_react18 = require("react");
2715
2715
  var usePreviousValue = (value) => {
2716
- const ref = (0, import_react18.useRef)();
2716
+ const ref = (0, import_react18.useRef)(void 0);
2717
2717
  (0, import_react18.useEffect)(() => {
2718
2718
  ref.current = value;
2719
2719
  });
@@ -11300,7 +11300,7 @@ var Input = (0, import_react47.forwardRef)(
11300
11300
  rightIcon,
11301
11301
  ...props
11302
11302
  }, externalRef) => {
11303
- const internalRef = (0, import_react47.useRef)();
11303
+ const internalRef = (0, import_react47.useRef)(null);
11304
11304
  const ref = (0, import_type_guards35.isNotNil)(externalRef) && (0, import_type_guards35.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef;
11305
11305
  let leftIconToDisplay = leftIcon;
11306
11306
  if ((0, import_type_guards35.isNil)(leftIcon) && type === "search") {
@@ -11323,7 +11323,7 @@ var Input = (0, import_react47.forwardRef)(
11323
11323
  if ((0, import_type_guards35.isNotNil)(props.onFocus)) {
11324
11324
  props.onFocus(event);
11325
11325
  }
11326
- if (autoSelect && isValidRef(ref) && "current" in ref) {
11326
+ if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) {
11327
11327
  requestAnimationFrame(() => {
11328
11328
  ref.current?.select();
11329
11329
  });