import * as _angular_core from '@angular/core'; import { AfterContentInit, AfterContentChecked, AfterViewInit, ElementRef, ChangeDetectorRef } from '@angular/core'; import * as i3 from '@daffodil/design'; import { DaffPrefixDirective, DaffSuffixDirective, DaffFormLabelDirective } from '@daffodil/design'; import * as i2 from '@daffodil/design/form'; import { DaffFormFieldLabelDirective, DaffHintComponent, DaffErrorMessageComponent } from '@daffodil/design/form'; import { NgControl } from '@angular/forms'; import { BehaviorSubject, Observable } from 'rxjs'; /** * DaffFormFieldActionDirective marks an element, typically a button, as an action attached to a form control inside `DaffFormFieldComponent`. */ declare class DaffFormFieldActionDirective { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } interface DaffFormFieldState { focused: boolean; filled: boolean; disabled: boolean; error: boolean; valid: boolean; } /** * Form controls must extend this class to be used inside `DaffFormFieldComponent`. * * > **Note** * > The control is defined as an abstract class instead of an interface to support Angular's dependency injection. Interfaces are erased during TypeScript compilation and cannot be used as DI tokens. * > * > By using an abstract class, the Angular DI container can match the class token for injection. */ declare abstract class DaffFormFieldControl { ngControl: NgControl | null; /** * The type of the control (e.g., 'input', 'select', 'textarea'). * Used to apply control-specific styling or behavior. */ abstract readonly controlType?: any; /** * Whether the control supports automatic label behavior. * When `true`, the form field will associate the label with the control using `for` and `id` attributes. * * Defaults to `true`. */ readonly supportsAutoLabelling?: boolean; /** * Whether the control currently has focus. */ abstract readonly focused: boolean; /** * Whether the control is required for form validation. */ abstract readonly required: boolean; /** * Whether the control is disabled. */ abstract readonly disabled: boolean; /** * The unique identifier for the control element. */ readonly id?: string; /** * Whether the label should be in the raised position. * By default, matches the focused state. */ get raised(): boolean; /** * Sets focus on the control. * * @param event - Optional event that triggers the focus. */ abstract focus(event?: Event): void; /** * The current value of the control. */ abstract readonly value: T; constructor(ngControl: NgControl | null); /** * Computes the current state of the form field control. * Combines control properties and form validation state. */ get state(): DaffFormFieldState; _stateChanges: BehaviorSubject<{ focused: boolean; filled: boolean; disabled: boolean; error: boolean; valid: boolean; }>; /** * Observable stream of state changes for the form field control. */ stateChanges: Observable; /** * Emits the current state. */ emitState(deferred?: boolean): void; } type DaffFormFieldAppearance = 'fluid' | 'fixed'; declare enum DaffFormFieldAppearanceEnum { Fluid = "fluid", Fixed = "fixed" } /** * DaffFormFieldComponent is a wrapping component that provides consistent styling and behavior for form control elements. */ declare class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit { private cd; elementRef: ElementRef; /** @docs-private */ isNativeSelect: _angular_core.Signal; constructor(cd: ChangeDetectorRef, elementRef: ElementRef); /** @docs-private */ _prefix: _angular_core.Signal; /** @docs-private */ _suffix: _angular_core.Signal; /** * @docs-private * * The child form control that the form field manages. */ _control: _angular_core.Signal>; /** * @docs-private * * @deprecated Deprecated in version 0.86.0. Will be removed in version 1.0.0. */ _formLabelDirective: _angular_core.Signal; /** * @docs-private */ _formFieldLabelDirective: _angular_core.Signal; /** * @docs-private */ _action: _angular_core.Signal; /** * @docs-private */ private _hint; /** * @docs-private */ private _error; /** * @docs-private * * Tracking property to keep a record of whether or not the * form field should be marked as error. */ isError: _angular_core.WritableSignal; /** * @docs-private * * Tracking property to keep a record of whether or not the * form field contains any user input. */ isFilled: _angular_core.WritableSignal; /** * @docs-private * * Tracking property to keep a record of whether or not the * form field should be marked as disabled. */ isDisabled: _angular_core.WritableSignal; /** * @docs-private * * Tracking property to keep a record of whether or not the * form field should be marked as valid. */ isValid: _angular_core.WritableSignal; /** * @docs-private * * Determines whether or not the form field should display its focused state. */ get isFocused(): boolean; /** * @docs-private */ get isRaised(): boolean; /** * The appearance of the form field. Defaults to `fluid`. */ appearance: _angular_core.InputSignalWithTransform; /** * @docs-private */ isFixed: _angular_core.Signal; /** * The unique id of the form field. Defaults to an autogenerated value. When using this, * it's your responsibility to ensure that the id for each form field is unique. * * It gets assigned to the `for` attribute on the `