File: index.d.ts

package info (click to toggle)
cockpit 355-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,568 kB
  • sloc: javascript: 774,787; python: 40,655; ansic: 35,157; cpp: 11,141; sh: 3,512; makefile: 580; xml: 261
file content (40 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
type FocusableElement = HTMLElement | SVGElement;

export type CheckOptions = {
  displayCheck?:
    | 'full'
    | 'full-native'
    | 'legacy-full'
    | 'non-zero-area'
    | 'none';
  getShadowRoot?:
    | boolean
    // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- there is no overlap here; the function can return true/false/undefined
    | ((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;