source: trip-planner-front/node_modules/@angular/cdk/a11y/key-manager/focus-key-manager.d.ts@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ListKeyManager, ListKeyManagerOption } from './list-key-manager';
9import { FocusOrigin } from '../focus-monitor/focus-monitor';
10/**
11 * This is the interface for focusable items (used by the FocusKeyManager).
12 * Each item must know how to focus itself, whether or not it is currently disabled
13 * and be able to supply its label.
14 */
15export interface FocusableOption extends ListKeyManagerOption {
16 /** Focuses the `FocusableOption`. */
17 focus(origin?: FocusOrigin): void;
18}
19export declare class FocusKeyManager<T> extends ListKeyManager<FocusableOption & T> {
20 private _origin;
21 /**
22 * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.
23 * @param origin Focus origin to be used when focusing items.
24 */
25 setFocusOrigin(origin: FocusOrigin): this;
26 /**
27 * Sets the active item to the item at the specified
28 * index and focuses the newly active item.
29 * @param index Index of the item to be set as active.
30 */
31 setActiveItem(index: number): void;
32 /**
33 * Sets the active item to the item that is specified and focuses it.
34 * @param item Item to be set as active.
35 */
36 setActiveItem(item: T): void;
37}
Note: See TracBrowser for help on using the repository browser.