import * as i0 from '@angular/core'; import { AfterContentInit, OnDestroy, QueryList, EventEmitter } from '@angular/core'; import * as i1$1 from '@angular/cdk/a11y'; import { FocusableOption } from '@angular/cdk/a11y'; import * as i1 from '@odx/angular'; /** * Directive to make an element focusable as part of a list, integrating with Angular CDK's FocusKeyManager. * It listens to the disabled state controlled by `DisabledController` to manage focus correctly based on * the enabled state of the element. * * @example * In a component template, apply this directive to list items that should be focusable and managed by a FocusKeyManager: * ```html * @for(item of items; track item) { *
  • * {{ item }} *
  • * } * ``` */ declare class ListFocusManagerOptionDirective implements FocusableOption { private readonly disabledController; private readonly element; /** * Reflects the disabled state of the element, managed by `DisabledController`. * If disabled, the element is not focusable. * * @returns {boolean} True if the directive's host element is disabled. */ get disabled(): boolean; /** * Focuses the host element. If the element is disabled, it will not be focused. */ focus(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive that sets up keyboard navigation for a list or a group of focusable elements. * Utilizes `FocusKeyManager` from Angular CDK to manage focus among items. * It automatically skips disabled items and wraps around when navigating past the first or last item. * Handles keydown events to navigate through the focusable options. * * @example * In a component template, use this directive on a container element and `odxListFocusManagerOption` * on each focusable list item: * ```html * * ``` */ declare class ListFocusManagerDirective implements AfterContentInit, OnDestroy { private keyManager; protected options: QueryList; ngAfterContentInit(): void; ngOnDestroy(): void; protected onKeyDown(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive that makes an element interactive, responding to click, Enter key, and Space key events. * It automatically handles the disabled state through `DisabledController`, inhibiting interactions when disabled. * This directive can be useful for creating custom buttons or interactive elements that are not natively interactive, * such as divs or custom components. * * @Directive * @CSSComponent cdk-interactive - A CSS Component class that can be targeted for styling interactive elements. * @selector '[odxCdkInteractive]' - Applies this directive to any element with the 'odxCdkInteractive' attribute. * @hostDirectives {WithDisabledState, WithTabIndex} - Applies disabled state and tab index handling. * @host role='button' - Assigns a role of 'button' to the host element for accessibility. * * @example * Applying the directive to a div element to make it interactive: * ```html *
    * Click or press Enter/Space to interact *
    * ``` * * @example * Using the directive on a custom Angular component * ```html * * * ``` */ declare class InteractiveDirective { private readonly disabledController; readonly element: i0.ElementRef; /** * Emits an event when the element is interacted with via click, Enter key, or Space key. * * @emits {MouseEvent | KeyboardEvent} - The event that triggered the interaction. */ interact: EventEmitter; protected handleEvents(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class A11yModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { A11yModule, InteractiveDirective, ListFocusManagerDirective, ListFocusManagerOptionDirective };