import * as i0 from '@angular/core';
import { ElementRef, EventEmitter, OnInit, OnDestroy, AfterViewInit, TemplateRef, QueryList, Renderer2 } from '@angular/core';
import { Highlightable } from '@angular/cdk/a11y';
/**
* @description
* Represents an individual selectable item within an eui-dropdown menu.
* Implements keyboard navigation and focus management through the CDK Highlightable interface.
* Supports nested submenus and active/focused visual states for accessibility.
* Typically used as a child element within eui-dropdown to create menu options.
*
* @usageNotes
* ### Basic menu item
* ```html
*
*
* Edit
* Delete
*
* ```
*
* ### Accessibility
* - Implements menuitem role for proper screen reader announcement
* - Supports roving tabindex for keyboard navigation
* - Focus state is visually indicated and programmatically managed
*
* ### Notes
* - Use `isActive` to highlight the currently selected item
* - Nest `eui-dropdown` inside item via `subDropdown` for hierarchical menus
* - Focus management is handled automatically by parent dropdown
*/
declare class EuiDropdownItemComponent implements Highlightable {
elementRef: ElementRef;
/**
* Reference to a nested dropdown component that opens as a submenu from this item.
* When provided, displays a visual indicator and enables hierarchical menu navigation.
*/
subDropdown: EuiDropdownComponent;
role: string;
get tabIndex(): number;
get cssClasses(): string;
/**
* Marks the item as currently selected or active within the dropdown.
* Applies distinct styling to indicate the active state to users.
* @default undefined (falsy)
*/
isActive: boolean;
/**
* Indicates whether the item currently has keyboard focus during navigation.
* Controls tabindex and applies focus styling for accessibility compliance.
* Managed internally by the keyboard navigation system.
* @default undefined (falsy)
*/
isFocus: boolean;
setActiveStyles(): void;
setInactiveStyles(): void;
focus(options?: FocusOptions): void;
click(): void;
mouseenter(): void;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
static ngAcceptInputType_isActive: unknown;
static ngAcceptInputType_isFocus: unknown;
}
/**
* Service to manage the state of dropdowns in the application.
* This service provides an event emitter to notify when a dropdown is opened or closed.
*
* @deprecated This service is deprecated and will be removed in future versions. Use
* `EuiDropdownComponent` output events instead.
*/
declare class EuiDropdownService {
/**
* Event emitter that emits a boolean value indicating whether the dropdown is open or closed.
* @deprecated Use `EuiDropdownComponent` output events instead.
*/
isDropdownOpen: EventEmitter;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵprov: i0.ɵɵInjectableDeclaration;
}
/**
* @description
* A flexible dropdown menu component that displays contextual content in an overlay panel.
* Supports keyboard navigation, nested submenus, positioning strategies, and accessibility features.
* Composed of a trigger element that opens a panel containing menu items or custom content.
* Handles focus management, scroll behavior, and click-outside detection automatically.
*
* @usageNotes
* ### Basic dropdown with menu items
* ```html
*
*
* Action 1
* Action 2
*
* ```
*
* ### Accessibility
* - Implements ARIA menu pattern with proper roles and keyboard navigation
* - Arrow keys navigate between items, Enter/Space activates selection
* - Escape closes the dropdown and returns focus to trigger
* - Screen readers announce menu state changes via aria-expanded
*
* ### Notes
* - Use `position` to control dropdown placement (top, right, bottom, left)
* - Enable `isExpandOnHover` for submenu expansion without clicking
* - Set `hasClosedOnClickInside` to false for multi-select scenarios
* - Context menus can be triggered with right-click using `isRightClickEnabled`
*/
declare class EuiDropdownComponent implements OnInit, OnDestroy, AfterViewInit {
/**
* Sets the `data-e2e` attribute for dropodown panel. Default: `eui-dropdown`.
*
* @default 'eui-dropdown'
*/
e2eAttr: string;
/**
* Sets the `tabindex` attribute for a dropdown panel.
*
* @default -1
*/
tabIndex: number;
/**
* Sets the `width` attribute for the dropdown panel.
*
* @default 'auto'
*/
width: string;
/**
* Sets the `height` attribute for the dropdown panel.
*
* @default 'auto'
*/
height: string;
/**
* Sets the `position` attribute for the dropdown panel.
*
* @default 'bottom'
*/
position: 'top' | 'right' | 'bottom' | 'left';
/**
* Sets the `subDropdownPosition` attribute for a multi-level dropdown.
*
* @default 'right'
*/
subDropdownPosition: 'right' | 'left';
/**
* Sets the `isBlock` attribute in order for the dropdown to take the full width of the parent container.
*
* @default false
*/
isBlock: boolean;
/**
* Sets the `isDropDownRightAligned` attribute to align the menu panel on the right of the opening element.
*
* @default false
*/
isDropDownRightAligned: boolean;
/**
* Sets the `hasClosedOnClickInside` attribute which controls the auto-closing of the menu when clicking inside.
*
* @default true
*/
hasClosedOnClickInside: boolean;
/**
* Sets the `isLabelUpdatedFromSelectedItem` attribute which updates the label of the trigger with the selected item.
*
* @default false
*/
isLabelUpdatedFromSelectedItem: boolean;
/**
* Sets the `isExpandOnHover` attribute which opens the sub dropdown upon hover.
*
* @default false
*/
isExpandOnHover: boolean;
/**
* Sets the `hasTabNavigation` attribute to tab within the dropdown content when there is rich content.
*
* @default false
*/
hasTabNavigation: boolean;
/**
* Sets the `isRightClickEnabled` attribute to trigger the menu using the right mouse click.
*
* @default false
*/
isRightClickEnabled: boolean;
euiDisabled: boolean;
/**
* Event emitted when the menu expands.
*/
expand: EventEmitter;
isDropdownOpen: EventEmitter;
templatePortalContent: TemplateRef;
triggerRef: ElementRef;
euiDropdownItems: QueryList;
trapFocusAutoCapture: boolean;
parentDropdown: EuiDropdownComponent;
isOpened: i0.WritableSignal;
protected dropdownService: EuiDropdownService;
private mousePositionX;
private mousePositionY;
private initialScrollX;
private initialScrollY;
private originX;
private originY;
private overlayX;
private overlayY;
private templatePortal;
private overlayRef;
private destroy$;
private scrollDispatcherSubscription;
private keydownListenerSubscription;
private euiDropdownItemsEventSubscriptions;
private activeDescendantKeyManagerChangeSubscription;
private activeDescendantKeyManager;
private origin;
private positionStrategy;
private scrollSubscription;
private overlay;
private viewContainerRef;
private scrollDispatcher;
private cd;
protected _renderer: Renderer2;
protected platformId: Object;
private document;
/**
* @description
* Computes and returns the CSS classes for the component based on its current state.
*
* @returns {string} Space-separated string of CSS class names
*/
get cssClasses(): string;
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
/**
* Whether the eui-dropdown is open.
*
* @deprecated This property will be removed in the future. Use `isOpened` signal instead.
*
* @usageNotes
* ```html
*
*
*
* ```
* @returns A boolean with value `true` when open, otherwise `false`.
*/
get isOpen(): boolean;
/**
* Method fired upon clicking the dropdown trigger.
*
* @param e Event triggered when the dropdown trigger is clicked.
*/
onTriggerClicked(e: Event): void;
/**
* Method fired upon right clicking the dropdown trigger in case of context menu.
*
* @param e Event triggered when the dropdown trigger is right clicked.
*/
onTriggerRightClicked(e: Event): void;
/**
* Method fired upon clicking the dropdown content.
*
*/
onClick(): void;
/**
* Method fired when the dropdown is opened.
*
* @param origin Origin of the dropdown position
* @param position Position of the dropdown
* @param position.x X coordinate of the dropdown position
* @param position.y Y coordinate of the dropdown position
*/
openDropdown(origin: HTMLElement, position?: {
x: number;
y: number;
}): void;
/**
* Close a dropdown
*
* @param recursively If true, close the parent dropdown as well
*/
closeDropdown(recursively?: boolean): void;
/**
* Method fired when the dropdown content is changed.
*
*/
projectContentChanged(): void;
/**
* Handles the keyboard navigation on the menu items upon opening the dropdown.
*
*/
createKeyboardHandlerSubscription(): void;
/**
* Sets the parent dropdown for a sub-dropdown.
*
* @param parentDropdown Parent dropdown component
*/
setParentDropdown(parentDropdown: EuiDropdownComponent): void;
/**
* Checks the existence of focusable elements
* @param origin The element to check
*/
private isFocusableElement;
/**
* Method that returns the dropdown items.
*
* @type {boolean}
*/
private get hasDropdownItems();
/**
* Method that returns the strategy for the overlay position.
*
* @type {FlexibleConnectedPositionStrategy}
*/
private getPositionStrategy;
/**
* Method that returns the strategy for the contextual menu position.
*
* @type {GlobalPositionStrategy}
*/
private getContextualMenuPositionStrategy;
/**
* Method that checks if the dropdown is visible.
*
* @param origin Origin of the dropdown position
* @param scrollableParent Scrollable parent element
* @type {boolean}
*/
private isVisible;
/**
* Method that checks if the trigger is focusable upon closing the dropdown panel.
*
* @param origin Origin html element
* @type {boolean}
*/
private isTriggerFocusableOnClose;
/**
* Method that sets the position of the dropdown panel.
*
*/
private setPosition;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
static ngAcceptInputType_isBlock: unknown;
static ngAcceptInputType_isDropDownRightAligned: unknown;
static ngAcceptInputType_hasClosedOnClickInside: unknown;
static ngAcceptInputType_isLabelUpdatedFromSelectedItem: unknown;
static ngAcceptInputType_isExpandOnHover: unknown;
static ngAcceptInputType_hasTabNavigation: unknown;
static ngAcceptInputType_isRightClickEnabled: unknown;
static ngAcceptInputType_euiDisabled: unknown;
}
/**
* @description
* Structural directive that marks the content area of an `eui-dropdown` component.
* Applies semantic role and styling to the dropdown panel container.
* Must be used as a direct child of `eui-dropdown` to define the menu content that appears in the overlay.
* Automatically applies ARIA menu role for accessibility compliance.
*/
declare class EuiDropdownContentDirective {
role: string;
c: string;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵdir: i0.ɵɵDirectiveDeclaration;
}
declare const EUI_DROPDOWN: readonly [typeof EuiDropdownComponent, typeof EuiDropdownItemComponent, typeof EuiDropdownContentDirective];
export { EUI_DROPDOWN, EuiDropdownComponent, EuiDropdownContentDirective, EuiDropdownItemComponent, EuiDropdownService };
//# sourceMappingURL=eui-components-eui-dropdown.d.ts.map