import { FocusOrigin } from '@angular/cdk/a11y'; import { AfterContentChecked, AfterContentInit, AfterViewInit, ElementRef, InjectionToken, OnDestroy, Provider, QueryList } from '@angular/core'; import { NgControl } from '@angular/forms'; import { KbqColorDirective } from '@koobiq/components/core'; import { KbqCleaner } from './cleaner'; import { KbqFormFieldControl } from './form-field-control'; import { KbqHint } from './hint'; import { KbqPasswordHint } from './password-hint'; import { KbqPasswordToggle } from './password-toggle'; import { KbqPrefix } from './prefix'; import { KbqStepper } from './stepper'; import { KbqSuffix } from './suffix'; import * as i0 from "@angular/core"; /** @docs-private */ export declare function getKbqFormFieldMissingControlError(): Error; /** @docs-private */ export declare function getKbqFormFieldYouCanNotUseCleanerInNumberInputError(): Error; /** * Default options for the kbq-form-field that can be configured using the `KBQ_FORM_FIELD_DEFAULT_OPTIONS` * injection token. */ export type KbqFormFieldDefaultOptions = Partial<{ /** Disables form field borders and shadows. */ noBorders: boolean; /** Use when KbqFormField is in an overlay container. */ inOverlay: boolean; /** Whether the form field is displayed horizontally. */ horizontal: boolean; /** Additional CSS classes applied to the label element. */ labelClass: string | string[] | Set; /** Additional CSS classes applied to the content wrapper element. */ contentClass: string | string[] | Set; }>; /** * Injection token that can be used to configure the default options for all kbq-form-field's. */ export declare const KBQ_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken; /** Additional CSS classes applied to the content wrapper element. */ contentClass: string | string[] | Set; }>>; /** Utility provider for `KBQ_FORM_FIELD_DEFAULT_OPTIONS`. */ export declare const kbqFormFieldDefaultOptionsProvider: (options: KbqFormFieldDefaultOptions) => Provider; /** Container for form controls that applies styling and behavior. */ export declare class KbqFormField extends KbqColorDirective implements AfterContentInit, AfterViewInit, OnDestroy, AfterContentChecked { private readonly destroyRef; private readonly changeDetectorRef; private readonly focusMonitor; private readonly defaultOptions; /** * @docs-private */ readonly elementRef: ElementRef; /** Disables form field borders and shadows. */ readonly noBorders: import("@angular/core").InputSignalWithTransform; /** Use when KbqFormField is in an overlay container. */ readonly inOverlay: import("@angular/core").ModelSignal; /** Whether the form field is displayed horizontally. */ readonly horizontal: import("@angular/core").InputSignalWithTransform; /** Additional CSS classes applied to the label element. */ readonly labelClass: import("@angular/core").InputSignal | undefined>; /** Additional CSS classes applied to the content wrapper element. */ readonly contentClass: import("@angular/core").InputSignal | undefined>; /** * The form field control. * * @docs-private */ control: KbqFormFieldControl; /** * @docs-private */ readonly stepper: KbqStepper; /** * @docs-private * * @TODO Should be readonly (#DS-3883) */ cleaner: KbqCleaner | null; /** * @docs-private */ passwordToggle: KbqPasswordToggle | null; /** * @docs-private */ hint: QueryList; /** * @docs-private */ passwordHints: QueryList; /** * @docs-private */ suffix: QueryList; /** * @docs-private */ prefix: QueryList; /** * @docs-private */ connectionContainerRef: ElementRef; private readonly reactivePasswordHint; private readonly error; private readonly label; /** * @docs-private */ hovered: boolean; /** * @docs-private */ canCleanerClearByEsc: boolean; /** Whether the form field is invalid. */ get invalid(): boolean; /** * Whether the form field control has an reactive password hint. * * @docs-private */ protected get hasReactivePasswordHint(): boolean; /** * Whether the form-field contains kbq-error. * * @docs-private */ protected get hasError(): boolean; /** * Whether the form-field contains kbq-label. * * @docs-private */ protected get hasLabel(): boolean; /** * Whether the form-field contains kbq-password-hint. * * @docs-private */ get hasPasswordHint(): boolean; /** * Current focus origin state. * * @docs-private */ get focusOrigin(): FocusOrigin; private _focusOrigin; /** * @docs-private */ get hasFocus(): boolean; /** * Whether the form-field contains kbq-hint. * * @docs-private */ get hasHint(): boolean; /** * Whether the form-field contains kbqSuffix. * * @docs-private */ get hasSuffix(): boolean; /** * Whether the form-field contains kbqPrefix. * * @docs-private */ get hasPrefix(): boolean; /** * Whether the form-field contains kbq-cleaner. * * @docs-private */ get hasCleaner(): boolean; /** * Whether the form-field contains kbq-stepper. * * @docs-private */ get hasStepper(): boolean; /** * Whether the form-field contains kbq-password-toggle. * * @docs-private */ get hasPasswordToggle(): boolean; /** * @docs-private */ get canShowCleaner(): boolean; /** Whether the form field is disabled. */ get disabled(): boolean; /** * @deprecated stepper should be always visible when provided, so this parameter is redundant, * use `hasStepper` instead * * @docs-private */ canShowStepper: boolean; ngAfterContentInit(): void; ngAfterContentChecked(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** Focuses the control. */ focus(options?: FocusOptions): void; /** * @deprecated Use `focus` instead. * * @docs-private */ focusViaKeyboard(options?: FocusOptions): void; /** * @docs-private */ clearValue(event: Event): void; /** * Handles a click on the control's container. * * @docs-private */ onContainerClick(event: MouseEvent): void; /** * Handles keydown events. * * @docs-private */ onKeyDown(event: KeyboardEvent): void; /** * @docs-private */ onHoverChanged(isHovered: boolean): void; /** * Gets an ElementRef for the element that a overlay attached to the form-field should be positioned relative to. */ getConnectedOverlayOrigin(): ElementRef; /** * Determines whether a class from the NgControl should be forwarded to the host element. * * @docs-private */ shouldForward(prop: keyof NgControl): boolean; /** * Runs the focus monitor for the form field. * * @docs-private */ runFocusMonitor: () => void; /** * Stops the focus monitor for the form field. * * @docs-private */ stopFocusMonitor(): void; /** * Throws an error if the form-field control is missing. * * @docs-private */ protected validateControlChild(): void; /** Initializes the form field control. */ private initializeControl; /** Initializes the kbqPrefix and kbqSuffix containers. */ private initializePrefixAndSuffix; /** Initializes the KbqHint, KbqPasswordHint, KbqReactivePasswordHint and KbqError containers. */ private initializeHint; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @docs-private * * @deprecated Will be removed in next major release, use `noBorders` input instead. */ export declare class KbqFormFieldWithoutBorders { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @docs-private */ export declare class KbqTrim { private readonly noTrim; private ngControl; private original; constructor(noTrim: boolean, ngControl: NgControl); trim(value: any): any; private registerOnChange; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }