UNPKG

navkit-vue

Version:

Vue navigation and utility composables

23 lines (22 loc) 950 B
import { NavigationType, PositionType } from "../types"; export declare function useNavigation({ rows, onColumnStart, onColumnEnd, onRowStart, onRowEnd, onEnter, onReturn, initialPosition, disabled, focusableSelector, autofocus, focusClass, cyclic, invertAxis, autoNextRow, holdColumnPerRow, }: NavigationType): { position: import("vue").Ref<{ row: number; col: number; }, PositionType | { row: number; col: number; }>; currentRow: number; currentElement: HTMLElement | null; isDisabled: import("vue").ComputedRef<boolean>; setRowPosition: (row: number, position: number) => number; toggleDisabled: (value?: boolean) => void; isValidPosition: (pos: PositionType) => boolean; focusElement: (element: HTMLElement | null) => void; getCurrentFocusedElement: () => HTMLElement | null; debug: { focusableElements: Element[]; isHookDisabled: boolean; }; };