UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

35 lines (34 loc) 1.69 kB
import * as React from "react"; import { AnyString } from "@yamada-ui/utils"; //#region src/utils/dom.d.ts type KeyboardNavigationKey = "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp"; type KeyboardControlKey = "Alt" | "Backspace" | "CapsLock" | "Control" | "Delete" | "Enter" | "Escape" | "Insert" | "Meta" | "NumLock" | "Pause" | "PrintScreen" | "ScrollLock" | "Shift" | "Space" | "Tab"; type KeyboardFunctionKey = "Fn" | "FnLock" | `F${number}`; type KeyboardKey = AnyString | KeyboardControlKey | KeyboardFunctionKey | KeyboardNavigationKey; declare function runKeyAction<Y>(ev: React.KeyboardEvent<Y>, actions: { [key in KeyboardKey]?: React.KeyboardEventHandler<Y> }, { preventDefault }?: { preventDefault?: boolean; }): void; declare function isComposing(ev: React.ChangeEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): boolean; declare function useAttributeObserver(ref: React.RefObject<HTMLElement | null>, attributeFilter: string[], enabled: boolean, func: () => void): void; declare function getEventRelatedTarget(ev: React.FocusEvent | React.MouseEvent): HTMLElement | null; declare const visuallyHiddenAttributes: { style: { border: string; clipPath: "rect(0px 0px 0px 0px)"; height: string; margin: string; overflow: "hidden"; padding: string; position: "absolute"; whiteSpace: "nowrap"; width: string; }; "aria-hidden": true; tabIndex: number; }; declare function useIds(): Generator<string, void, unknown>; //#endregion export { getEventRelatedTarget, isComposing, runKeyAction, useAttributeObserver, useIds, visuallyHiddenAttributes }; //# sourceMappingURL=dom.d.ts.map