package.dist.index.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of interact-outside Show documentation
Show all versions of interact-outside Show documentation
Track interations or focus outside an element
The newest version!
interface InteractOutsideHandlers {
/**
* Function called when the pointer is pressed down outside the component
*/
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => void) | undefined;
/**
* Function called when the focus is moved outside the component
*/
onFocusOutside?: ((event: FocusOutsideEvent) => void) | undefined;
/**
* Function called when an interaction happens outside the component
*/
onInteractOutside?: ((event: InteractOutsideEvent) => void) | undefined;
}
interface InteractOutsideOptions extends InteractOutsideHandlers {
exclude?: ((target: HTMLElement) => boolean) | undefined;
defer?: boolean | undefined;
}
interface EventDetails {
originalEvent: T;
contextmenu: boolean;
focusable: boolean;
}
type PointerDownOutsideEvent = CustomEvent>;
type FocusOutsideEvent = CustomEvent>;
type InteractOutsideEvent = PointerDownOutsideEvent | FocusOutsideEvent;
type MaybeElement = HTMLElement | null | undefined;
type NodeOrFn = MaybeElement | (() => MaybeElement);
declare function trackInteractOutside(nodeOrFn: NodeOrFn, options: InteractOutsideOptions): () => void;
export { type EventDetails, type FocusOutsideEvent, type InteractOutsideEvent, type InteractOutsideHandlers, type InteractOutsideOptions, type MaybeElement, type NodeOrFn, type PointerDownOutsideEvent, trackInteractOutside };
© 2015 - 2025 Weber Informatics LLC | Privacy Policy