vuestic-ui
Version:
Vue 3 UI Framework
14 lines (13 loc) • 659 B
TypeScript
import { Ref, DefineComponent, Component } from 'vue';
/**
* `true` if `el` or any of his children are in focus
*
* if set to `true` set `el` focused, but if any of `el` children was focused before, set child focused instead
*
* @notice this will not trigger native `focus` event and you need to trigger it manually and handle infinite loop
*/
export declare const useFocusDeep: (el?: Ref<HTMLElement | DefineComponent | undefined | Component>) => import("vue").WritableComputedRef<boolean | undefined> & {
/** Focus `el` if focus is not set to any other element */
focusIfNothingIfFocused: () => void;
focusPreviousElement: () => void;
};