import * as _angular_core from '@angular/core'; import { Signal } from '@angular/core'; import * as ng_primitives_a11y from 'ng-primitives/a11y'; import * as ng_primitives_state from 'ng-primitives/state'; interface NgpActiveDescendantManagerProps { /** * The disabled state of the active descendant group. * @default false */ disabled?: Signal; /** * The number of items in the active descendant group. */ count: Signal; /** * Get the id for the item at a given index. */ getItemId: (index: number) => string | undefined; /** * Whether the item at a given index is disabled. */ isItemDisabled: (index: number) => boolean; /** * Get the label of the item at a given index. When provided, enables typeahead * (letter-key) navigation through the `typeahead` method. */ getItemLabel?: (index: number) => string; /** * Scroll the active descendant item into view. */ scrollIntoView: (index: number) => void; /** * Whether active descendant should wrap around. * @default false */ wrap?: Signal; } interface NgpActiveDescendantManagerState { /** * The index of the active descendant item. */ index: Signal; /** * The id of the active descendant item. */ id: Signal; /** * Activate an item in the active descendant group. */ activateByIndex: (index: number, options?: ActivationOptions) => void; /** * Activate an item in the active descendant group by id. */ activateById: (id: string, options?: ActivationOptions) => void; /** * Activate the first enabled item in the active descendant group. */ first: (options?: ActivationOptions) => void; /** * Activate the last enabled item in the active descendant group. */ last: (options?: ActivationOptions) => void; /** * Activate the next enabled item in the active descendant group. */ next: (options?: ActivationOptions) => void; /** * Activate the previous enabled item in the active descendant group. */ previous: (options?: ActivationOptions) => void; /** * Ensure there is an active descendant, this is useful when the items in the group change. */ validate: () => void; /** * Reset the active descendant group, clearing the active index. */ reset: (options?: ActivationOptions) => void; /** * Activate the next enabled item whose label matches the typed characters. * No-op unless `getItemLabel` was provided. */ typeahead: (key: string, options?: ActivationOptions) => void; } declare function activeDescendantManager({ disabled: _disabled, wrap, count, getItemId, isItemDisabled, getItemLabel, scrollIntoView, }: NgpActiveDescendantManagerProps): { id: Signal; index: _angular_core.WritableSignal; activateByIndex: (index: number, { scroll, origin }?: ActivationOptions) => void; activateById: (id: string, options?: ActivationOptions) => void; first: (options?: ActivationOptions) => void; last: (options?: ActivationOptions) => void; next: (options?: ActivationOptions) => void; previous: (options?: ActivationOptions) => void; reset: ({ scroll, origin }?: ActivationOptions) => void; validate: () => void; typeahead: (key: string, options?: ActivationOptions) => void; }; interface ActivationOptions { /** Whether to scroll the activated item into view. */ scroll?: boolean; /** Define the source of activation. */ origin?: 'keyboard' | 'pointer'; } /** * Hide an element visually while keeping it present in the DOM. */ declare class NgpVisuallyHidden { protected readonly state: ng_primitives_a11y.NgpVisuallyHiddenState; /** * Set the element visibility. * @param visible */ setVisibility(visible: boolean): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The state interface for the VisuallyHidden pattern. */ interface NgpVisuallyHiddenState { /** * Whether the element is hidden. */ readonly hidden: Signal; /** * Set the element visibility. * @param visible */ setVisibility(visible: boolean): void; } /** * The props interface for the VisuallyHidden pattern. */ interface NgpVisuallyHiddenProps { /** * Whether the element is hidden. Default is true. */ readonly hidden?: Signal; } declare const NgpVisuallyHiddenStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal>; declare const ngpVisuallyHidden: ({ hidden: _hidden }: NgpVisuallyHiddenProps) => NgpVisuallyHiddenState; declare const injectVisuallyHiddenState: { (): Signal; (options: ng_primitives_state.StateInjectionOptions): Signal; (options?: ng_primitives_state.StateInjectionOptions): Signal | Signal; }; declare const provideVisuallyHiddenState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; export { NgpVisuallyHidden, NgpVisuallyHiddenStateToken, activeDescendantManager, injectVisuallyHiddenState, ngpVisuallyHidden, provideVisuallyHiddenState }; export type { ActivationOptions, NgpActiveDescendantManagerProps, NgpActiveDescendantManagerState, NgpVisuallyHiddenProps, NgpVisuallyHiddenState };