message: chore: Refactor `useEventListenerOutside`
diff: @@ -7,7 +7,7 @@ export function useEventListenerOutside(
  containerRef: React.RefObject<HTMLElement>,
  disclosuresRef: React.RefObject<HTMLElement[]>,
  nestedDialogs: Array<React.RefObject<HTMLElement>>,
  - event: string,
  + eventType: string,
  listener?: (e: Event) => void,
  shouldListen?: boolean
  ) {
  @@ -16,12 +16,12 @@ export function useEventListenerOutside(
  React.useEffect(() => {
  if (!shouldListen) return undefined;
  - const handleEvent = (e: MouseEvent) => {
  + const handleEvent = (event: Event) => {
  if (!listenerRef.current) return;
  const container = containerRef.current;
  const disclosures = disclosuresRef.current || [];
  - const target = e.target as Element;
  + const target = event.target as Element;
  if (!container) {
  warning(
  @@ -54,19 +54,19 @@ export function useEventListenerOutside(
  return;
  }
  - listenerRef.current(e);
  + listenerRef.current(event);
  };
  - document.addEventListener(event, handleEvent, true);
  + document.addEventListener(eventType, handleEvent, true);
  return () => {
  - document.removeEventListener(event, handleEvent, true);
  + document.removeEventListener(eventType, handleEvent, true);
  };
  }, [
  containerRef,
  disclosuresRef,
  nestedDialogs,
  - event,
  + eventType,
  shouldListen,
  listenerRef
  ]);
  