import { FocusOrigin } from '@angular/cdk/a11y'; import { Direction } from '@angular/cdk/bidi'; import { EventEmitter, InjectionToken, QueryList, TemplateRef } from '@angular/core'; import { KbqDropdownContent } from './dropdown-content.directive'; import { KbqDropdownItem } from './dropdown-item.component'; /** Position of the dropdown panel along the x-axis. */ export type KbqDropdownPositionX = 'before' | 'after' | 'center'; /** * @deprecated Use `KbqDropdownPositionX` instead. * @docs-private */ export type DropdownPositionX = KbqDropdownPositionX; /** Position of the dropdown panel along the y-axis. */ export type KbqDropdownPositionY = 'above' | 'below'; /** * @deprecated Use `KbqDropdownPositionY` instead. * @docs-private */ export type DropdownPositionY = KbqDropdownPositionY; /** Reason why the menu was closed. */ export type DropdownCloseReason = void | 'click' | 'keydown' | 'tab'; /** * Interface for a custom dropdown panel that can be used with `kbqDropdownTriggerFor`. * @docs-private */ export interface KbqDropdownPanel { xPosition: KbqDropdownPositionX; yPosition: KbqDropdownPositionY; overlapTriggerX: boolean; overlapTriggerY: boolean; templateRef: TemplateRef; closed: EventEmitter; parent?: KbqDropdownPanel | undefined; triggerWidth?: string; direction?: Direction; lazyContent?: KbqDropdownContent; backdropClass?: string; hasBackdrop?: boolean; items: QueryList; focusFirstItem(origin?: FocusOrigin): void; resetActiveItem(): void; setPositionClasses?(x: KbqDropdownPositionX, y: KbqDropdownPositionY): void; } /** Default `kbq-dropdown` options that can be overridden. */ export interface KbqDropdownDefaultOptions { /** The x-axis position of the dropdown. */ xPosition: KbqDropdownPositionX; /** The y-axis position of the dropdown. */ yPosition: KbqDropdownPositionY; /** Whether the dropdown should overlap the dropdown trigger horizontally. */ overlapTriggerX: boolean; /** Whether the dropdown should overlap the dropdown trigger vertically. */ overlapTriggerY: boolean; /** Class to be applied to the dropdown's backdrop. */ backdropClass: string; /** Whether the dropdown has a backdrop. */ hasBackdrop: boolean; } /** * Injection token used to provide the parent dropdown to dropdown-specific components. * @docs-private */ export declare const KBQ_DROPDOWN_PANEL: InjectionToken; /** Injection token to be used to override the default options for `kbq-dropdown`. */ export declare const KBQ_DROPDOWN_DEFAULT_OPTIONS: InjectionToken; /** @docs-private */ export declare function KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY(): KbqDropdownDefaultOptions;