import { ElementRef } from '@angular/core'; import { ControlValueAccessor, FormGroup } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { CdkListbox } from '@angular/cdk/listbox'; import { ConnectedOverlayPositionChange } from '@angular/cdk/overlay'; import * as i0 from "@angular/core"; /** Possible select dropdown style variants */ export type SelectVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'error' | 'warning' | null | undefined; /** Possible select dropdown size variants */ export type SelectSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined; /** Configuration object for select styling */ export type SelectProps = { variant?: SelectVariantProps; size?: SelectSizeProps; }; /** Animation states for the select overlay */ type AnimationState = 'closed' | 'opening' | 'open' | 'closing'; /** * A customizable select dropdown component with CDK overlay integration * * @remarks * Uses the same visual design as the combobox but simplified for single selection only. * No search functionality or multi-select support. Implements ControlValueAccessor * for Angular form compatibility. * * @example * ```html * * * ``` * * @example * ```html * * * ``` */ export declare class SelectComponent implements ControlValueAccessor { /** @internal Translation service instance */ translateService: TranslateService; /** * Select dropdown style variant * @defaultValue 'secondary' */ variant: import("@angular/core").InputSignal; /** * Select dropdown size variant * @defaultValue 'md' */ size: import("@angular/core").InputSignal; /** * Whether to show optional indicator * @defaultValue false */ showOptional: import("@angular/core").InputSignal; /** * Optional indicator text (translation key or literal) * @defaultValue 'sdk.formFields.optional' */ optionalText: import("@angular/core").InputSignal; /** * Whether to use ghost (transparent) styling * @defaultValue false */ ghost: import("@angular/core").InputSignal; /** * HTML name attribute for the select */ name: import("@angular/core").InputSignal; /** * Placeholder text when no option is selected */ placeholder: import("@angular/core").InputSignal; /** * Label text displayed above the select */ label: import("@angular/core").InputSignal; /** * Two-way bindable selected value */ value: import("@angular/core").ModelSignal; /** * Array of available options (primitives or objects) */ options: import("@angular/core").InputSignal; /** * The object property to use for display text when options are objects * Falls back to common property names if not specified */ displayKey: import("@angular/core").InputSignal; /** * The object property to use as the value when options are objects * Uses the entire object if not specified */ valueKey: import("@angular/core").InputSignal; /** * Whether to show a clear button next to the selected value * @default true */ allowClear: import("@angular/core").InputSignal; /** * Parent form group for reactive forms */ parentForm: import("@angular/core").InputSignal | null>; /** * Form control name for reactive forms */ formControlName: import("@angular/core").InputSignal; /** * Whether the select is disabled * @defaultValue false */ disabled: import("@angular/core").ModelSignal; /** * Event emitted when select loses focus */ blurred: import("@angular/core").OutputEmitterRef; /** * Event emitted when selection changes */ valueUpdated: import("@angular/core").OutputEmitterRef; /** * Stop event propagation for activation events * @defaultValue false */ stopPropagation: import("@angular/core").InputSignal; /** * Event emitted on click */ clicked: import("@angular/core").OutputEmitterRef; /** * Event emitted on Enter keydown */ keyDownEnter: import("@angular/core").OutputEmitterRef; /** * Event emitted on Space keydown */ keyDownSpace: import("@angular/core").OutputEmitterRef; /** * Event emitted on activation (click or keyboard) */ triggered: import("@angular/core").OutputEmitterRef; /** Dropdown chevron icon */ iconChevronDown: string; /** Check icon for selected options */ iconCheck: string; /** Close/clear icon */ iconClose: string; /** Current animation state of the overlay */ private readonly animationState; /** Trigger for blur events in form validation */ private readonly blurTrigger; /** Active option index for keyboard navigation */ private readonly activeOptionIndex; /** Reference to the trigger button element */ triggerRef: import("@angular/core").Signal | undefined>; /** Reference to the options list container */ optionsList: import("@angular/core").Signal | undefined>; /** Reference to the CDK listbox for keyboard navigation */ listbox: import("@angular/core").Signal | undefined>; /** Width of the trigger button for overlay positioning */ triggerWidth: import("@angular/core").WritableSignal; /** Tracks the overlay position to determine animation direction */ private readonly currentPosition; /** * Static class mappings for different animation directions * Maps animation directions to complete Tailwind class names * All class names are static and detectable by Tailwind at build time */ private readonly animationClassMap; /** * Computed animation direction based on overlay positioning * Detects actual position from CDK overlay and returns appropriate direction */ animationDirection: import("@angular/core").Signal<"bottom" | "top" | "left" | "right">; /** * Computed class string for animations * Applies the correct animation based on position using static class names */ animationClasses: import("@angular/core").Signal; /** Form control reference for reactive forms */ private readonly formControl; /** Observable stream of form control */ private readonly formControl$; /** Stream of form control status changes */ private readonly statusChanges$; /** Stream of form control value changes */ private readonly stateChanges$; /** Signal for form control status */ private readonly statusSignal; /** Signal for form control state */ private readonly stateSignal; /** Callback function for value changes */ private onChange; /** Callback function for touch events */ private onTouched; /** * Whether the overlay is currently open or in the process of opening/closing * @returns True if overlay is visible or animating */ isOpen: import("@angular/core").Signal; /** * Whether the overlay is currently animating to open state * @returns True if overlay is opening or open */ isAnimatingOpen: import("@angular/core").Signal; /** * Current animation state for template binding * @returns Current animation state */ dataState: import("@angular/core").Signal; /** * Display value for the selected option * @returns Formatted display string for the current selection */ displayValue: import("@angular/core").Signal; /** * Whether the clear button should be shown * @returns True if there's a valid selected value and clear is allowed */ showClearButton: import("@angular/core").Signal; /** * Translated placeholder text * @returns Translated placeholder or input value */ translatedPlaceholder: import("@angular/core").Signal; /** * @internal * Computed base select classes */ componentClass: import("@angular/core").Signal; /** * @internal * Computed error state classes */ errorClass: import("@angular/core").Signal; /** * @internal * Computed success state classes */ successClass: import("@angular/core").Signal; /** * Validation-aware CSS classes based on form control state * @internal */ validationClass: import("@angular/core").Signal; /** * CSS classes for the options menu * @internal */ menuClass: import("@angular/core").Signal; /** * Updates the trigger width for proper overlay positioning */ private readonly triggerWidthEffect; /** * Writes a new value to the component * @param value - The new value to set */ writeValue(value: any): void; /** * Registers a callback function to be called when the value changes * @param fn - The callback function */ registerOnChange(fn: (value: any) => void): void; /** * Registers a callback function to be called when the component is touched * @param fn - The callback function */ registerOnTouched(fn: () => void): void; /** * Sets the disabled state of the component * @param isDisabled - Whether the component should be disabled */ setDisabledState(isDisabled: boolean): void; /** * Toggles the overlay open/closed state * Handles focus management and animation state transitions */ toggleOverlay(): void; /** * @internal * Handle click activation on trigger */ handleClick(event: MouseEvent): void; /** * Handles animation end events to update state * @param event - The animation event */ onAnimationEnd(event: AnimationEvent): void; /** * Handles overlay detachment * Cleans up state and triggers blur */ handleDetach(): void; /** * Handles overlay position changes to determine animation direction * @param event - The position change event from CDK overlay */ onPositionChange(event: ConnectedOverlayPositionChange): void; /** * Handles clicks outside the component * @param event - The mouse event */ handleClickOutside(event: MouseEvent): void; /** * Handles option selection * @param option - The selected option */ handleOptionSelect(option: any): void; /** * Handles CDK listbox selection changes * @param event - The selection change event */ handleSelectionChange(event: any): void; /** * Handles keyboard events for option selection * @param event - The keyboard event */ handleListboxKeydown(event: KeyboardEvent): void; /** * Handles keyboard events on the trigger button * @param event - The keyboard event */ handleTriggerKeydown(event: KeyboardEvent): void; /** * Clears the current selection */ clearSelection(): void; /** * Handles clear selection button click * @param event - The click event */ handleClearSelection(event: Event): void; /** * Checks if an option is currently selected * @param option - The option to check * @returns True if the option is selected */ isOptionSelected(option: any): boolean; /** * Checks if an option is currently active for keyboard navigation * @param index - The option index * @returns True if the option is active */ isActiveOption(index: number): boolean; /** * Gets the display value for an option * @param option - The option to get display value for * @returns The display string for the option */ getDisplayValue(option: any): string; /** * Updates the trigger button width for overlay positioning */ private updateTriggerWidth; /** * Gets the value property from an option * @param option - The option to get value from * @returns The option value */ private getOptionValue; /** * Triggers blur event for form validation */ private triggerBlur; /** * Sets the active option for keyboard navigation * @param index - The index of the option to make active */ private setActiveOption; /** * Sets the first option as active by default */ private setDefaultActiveOption; /** * Updates the visual state of the active option */ private updateActiveOptionVisually; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};