mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 15:10:03 +00:00
35 lines
805 B
TypeScript
35 lines
805 B
TypeScript
|
type FocusableElement = HTMLElement | SVGElement;
|
||
|
|
||
|
export type CheckOptions = {
|
||
|
displayCheck?: 'full' | 'legacy-full' | 'non-zero-area' | 'none';
|
||
|
getShadowRoot?: boolean | ((node: FocusableElement) => ShadowRoot | boolean | undefined);
|
||
|
};
|
||
|
|
||
|
export type TabbableOptions = {
|
||
|
includeContainer?: boolean;
|
||
|
};
|
||
|
|
||
|
export declare function tabbable(
|
||
|
container: Element,
|
||
|
options?: TabbableOptions & CheckOptions
|
||
|
): FocusableElement[];
|
||
|
|
||
|
export declare function focusable(
|
||
|
container: Element,
|
||
|
options?: TabbableOptions & CheckOptions
|
||
|
): FocusableElement[];
|
||
|
|
||
|
export declare function isTabbable(
|
||
|
node: Element,
|
||
|
options?: CheckOptions
|
||
|
): boolean;
|
||
|
|
||
|
export declare function isFocusable(
|
||
|
node: Element,
|
||
|
options?: CheckOptions
|
||
|
): boolean;
|
||
|
|
||
|
export declare function getTabIndex(
|
||
|
node: Element,
|
||
|
): number;
|