/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/menu/menu-interface.ts
32 строки
1 KB
Andrew Seguin
refactor: use relative imports within module npm packages (#30588)
12 мар 2025, 00:40
Не верифицирован
12 мар 2025, 00:40
626a465
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {InjectionToken} from '@angular/core'; import {MenuStackItem} from './menu-stack'; import {FocusOrigin} from '../a11y'; /** Injection token used to return classes implementing the Menu interface */ export const CDK_MENU = new InjectionToken<Menu>('cdk-menu'); /** Interface which specifies Menu operations and used to break circular dependency issues */ export interface Menu extends MenuStackItem { /** The id of the menu's host element. */ id: string; /** The menu's native DOM host element. */ nativeElement: HTMLElement; /** The direction items in the menu flow. */ readonly orientation: 'horizontal' | 'vertical'; /** Place focus on the first MenuItem in the menu. */ focusFirstItem(focusOrigin: FocusOrigin): void; /** Place focus on the last MenuItem in the menu. */ focusLastItem(focusOrigin: FocusOrigin): void; }