UNPKG

1.61 kBTypeScriptView Raw
1/**
2 * Converts a whole set of KeySequences into one keytip ID, which will be the ID for the last keytip sequence specified
3 * keySequences should not include the initial keytip 'start' sequence.
4 *
5 * @param keySequences - Full path of IKeySequences for one keytip.
6 * @returns String to use for the keytip ID.
7 */
8export declare function sequencesToID(keySequences: string[]): string;
9/**
10 * Merges an overflow sequence with a key sequence.
11 *
12 * @param keySequences - Full sequence for one keytip.
13 * @param overflowKeySequences - Full overflow keytip sequence.
14 * @returns Sequence that will be used by the keytip when in the overflow.
15 */
16export declare function mergeOverflows(keySequences: string[], overflowKeySequences: string[]): string[];
17/**
18 * Constructs the data-ktp-target attribute selector from a full key sequence.
19 *
20 * @param keySequences - Full string[] for a Keytip.
21 * @returns String selector to use to query for the keytip target.
22 */
23export declare function ktpTargetFromSequences(keySequences: string[]): string;
24/**
25 * Constructs the data-ktp-execute-target attribute selector from a keytip ID.
26 *
27 * @param keytipId - ID of the Keytip.
28 * @returns String selector to use to query for the keytip execute target.
29 */
30export declare function ktpTargetFromId(keytipId: string): string;
31/**
32 * Gets the aria-describedby value to put on the component with this keytip.
33 *
34 * @param keySequences - KeySequences of the keytip.
35 * @returns The aria-describedby value to set on the component with this keytip.
36 */
37export declare function getAriaDescribedBy(keySequences: string[]): string;