| 1 |
type FocusableElement = HTMLElement | SVGElement; |
| 2 |
|
| 3 |
export type CheckOptions = { |
| 4 |
displayCheck?: |
| 5 |
| 'full' |
| 6 |
| 'full-native' |
| 7 |
| 'legacy-full' |
| 8 |
| 'non-zero-area' |
| 9 |
| 'none'; |
| 10 |
getShadowRoot?: |
| 11 |
| boolean |
| 12 |
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- there is no overlap here; the function can return true/false/undefined |
| 13 |
| ((node: FocusableElement) => ShadowRoot | boolean | undefined); |
| 14 |
}; |
| 15 |
|
| 16 |
export type TabbableOptions = { |
| 17 |
includeContainer?: boolean; |
| 18 |
}; |
| 19 |
|
| 20 |
export declare function tabbable( |
| 21 |
container: Element, |
| 22 |
options?: TabbableOptions & CheckOptions |
| 23 |
): FocusableElement[]; |
| 24 |
|
| 25 |
export declare function focusable( |
| 26 |
container: Element, |
| 27 |
options?: TabbableOptions & CheckOptions |
| 28 |
): FocusableElement[]; |
| 29 |
|
| 30 |
export declare function isTabbable( |
| 31 |
node: Element, |
| 32 |
options?: CheckOptions |
| 33 |
): boolean; |
| 34 |
|
| 35 |
export declare function isFocusable( |
| 36 |
node: Element, |
| 37 |
options?: CheckOptions |
| 38 |
): boolean; |
| 39 |
|
| 40 |
export declare function getTabIndex(node: Element): number; |