import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { UniqueSelectionDispatcher } from '@angular/cdk/collections'; import * as i0 from '@angular/core'; import { OnInit, AfterViewInit, OnDestroy, AfterContentInit, DoCheck, QueryList, EventEmitter, ChangeDetectorRef, ElementRef } from '@angular/core'; import { ControlValueAccessor, NgControl, NgForm, FormGroupDirective } from '@angular/forms'; import * as i5 from '@aposin/ng-aquila/base'; import { NxLabelComponent, NxErrorComponent } from '@aposin/ng-aquila/base'; import { NxAbstractControl } from '@aposin/ng-aquila/shared'; import { ErrorStateMatcher } from '@aposin/ng-aquila/utils'; import { Subject } from 'rxjs'; import * as i1 from '@angular/common'; import * as i2 from '@aposin/ng-aquila/icon'; import * as i3 from '@angular/cdk/observers'; /** The change event object emitted by the radio group and radio button. */ declare class NxRadioChange { readonly source: NxRadioComponent; readonly value: any; /** The NxRadioComponent that emits the change event. NxRadioChange object can be instantiated with source radio component and a value. */ constructor(source: NxRadioComponent, value: any); } /** Label Size Types */ type LabelSize = 'small' | 'big'; declare class NxRadioGroupComponent implements ControlValueAccessor, AfterContentInit, OnDestroy, DoCheck, NxAbstractControl { private readonly _cdr; readonly ngControl: NgControl | null; readonly _parentForm: NgForm | null; readonly _parentFormGroup: FormGroupDirective | null; readonly _errorStateMatcher: ErrorStateMatcher; _label: NxLabelComponent; errorChildren: QueryList; _radios: QueryList; /** @docs-private */ errorState: boolean; /** Sets all radios in the group to readonly. */ set readonly(value: boolean); get readonly(): boolean; private _readonly; readonly _stateChanges: Subject; /** Sets the Id of the radio group. */ set id(value: string); get id(): string; private _id; /** Whether every radio button in this group should be disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** Whether the radio group should have negative styling. */ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** Sets if at least an option should be selected. */ set required(value: BooleanInput); get required(): boolean; private _required; /** An event is dispatched on each group value change. */ readonly groupValueChange: EventEmitter; private _selected; /** Sets the name of this radio group, which is mandatory in conjunction with ngModel (Default: null). */ set name(value: string); get name(): string; private _name; /** Sets the value of the selected radion button in this group (Default: null). */ set value(newValue: any); get value(): any; private _value; private _onChange; private _onTouched; constructor(_cdr: ChangeDetectorRef, ngControl: NgControl | null, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null, _errorStateMatcher: ErrorStateMatcher); ngAfterContentInit(): void; ngDoCheck(): void; ngOnDestroy(): void; writeValue(value: any): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: () => void): void; /** @docs-private this is meant to be called by the radio buttons in this group */ change(value: any): void; /** @docs-private this is meant to be called by the radio buttons in this group. */ touch(): void; setDisabledState(isDisabled: boolean): void; setReadonly(value: boolean): void; private _updateSelectedRadioFromValue; private _checkSelectedRadioButton; /** @docs-private */ updateErrorState(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_readonly: unknown; } declare class NxRadioComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy, NxAbstractControl { readonly radioGroup: NxRadioGroupComponent | null; private readonly _cdr; private readonly _focusMonitor; private readonly _checkedDispatcher; /** @docs-private */ _radioLabelWrapper: ElementRef; _nativeInput: ElementRef; ariaLabel: string | null; ariaLabelledBy: string | null; ariaDescribedBy: string | null; /** Sets radio to readonly. */ set readonly(value: boolean); get readonly(): boolean; private _readonly; setReadonly(value: boolean): void; /** Sets the id of the radio component. */ set id(value: string); get id(): string; private _id; /** @docs-private */ get inputId(): string; /** @docs-private */ get labelId(): string; /** Sets the name of this radio component, which is mandatory in conjunction with ngModel (Default: null). */ set name(value: string); get name(): string; private _name; /** * Sets the label size of the radio button. * The default value is `big`. */ set labelSize(value: LabelSize); get labelSize(): LabelSize; private _labelSize; /** * Whether the negative set of styles should be used. * * If the radio button is placed in a radio group, the negative value * is overwritten by the group's negative value. */ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** An event is dispatched on each value change. */ readonly valueChange: EventEmitter; /** @docs-private */ get labelHasContent(): boolean; /** Sets the value of the form control element (Default: null). */ set value(value: any); get value(): any; private _value; /** Whether the radio component is selected. */ set checked(value: boolean); /** @docs-private */ get checked(): boolean; private _checked; /** Whether the radio button should be disabled or not. */ set disabled(value: BooleanInput); /** @docs-private */ get disabled(): boolean; private _disabled; /** Sets if at least a radio button should be selected. */ set required(value: boolean); /** @docs-private */ get required(): boolean; private _required; private readonly _destroyed; _removeUniqueSelectionListener: () => void; constructor(radioGroup: NxRadioGroupComponent | null, _cdr: ChangeDetectorRef, _focusMonitor: FocusMonitor, _checkedDispatcher: UniqueSelectionDispatcher); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** @docs-private */ attachListenerForName(): void; /** * Callback for when the content of the label has changed. * @docs-private */ labelContentChanged(): void; writeValue(value: any): void; private onChangeCallback; registerOnChange(onChange: (value: any) => void): void; private onTouchedCallback; registerOnTouched(onTouched: () => void): void; /** Focuses the radio button element. */ focus(focusOrigin?: FocusOrigin): void; /** Forward focus from host to hidden input field */ _forwardFocusToInput(): void; /** @docs-private */ touch(event: FocusEvent): void; _onInputChange(event: Event): void; _onInputClick(event: Event): void; /** @docs-private */ _controlInvalid(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_readonly: unknown; } declare class NxRadioModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NxRadioChange, NxRadioComponent, NxRadioGroupComponent, NxRadioModule }; export type { LabelSize };