import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i0 from '@angular/core'; import { OnDestroy, OnInit, AfterViewInit, AfterContentInit, DoCheck, QueryList, EventEmitter, ChangeDetectorRef, ElementRef, Injector } from '@angular/core'; import { ControlValueAccessor, Validator, NgControl, NgForm, FormGroupDirective, AbstractControl, ValidationErrors } 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'; declare class NxCheckboxChangeEvent { /** The checked value of the checkbox. */ readonly checked: boolean; /** The value of the checkbox. */ readonly value: string; /** The component instance of the checkbox which emitted the change event. */ readonly checkbox: NxCheckboxComponent; constructor( /** The checked value of the checkbox. */ checked: boolean, /** The value of the checkbox. */ value: string, /** The component instance of the checkbox which emitted the change event. */ checkbox: NxCheckboxComponent); } declare class NxCheckboxGroupChangeEvent { /** The value of the checkbox group. An array containing all checked checkbox values. */ readonly value: string[]; /** The component instance of the checkbox group. */ readonly checkboxGroup: NxCheckboxGroupComponent; constructor( /** The value of the checkbox group. An array containing all checked checkbox values. */ value: string[], /** The component instance of the checkbox group. */ checkboxGroup: NxCheckboxGroupComponent); } /** Size of the label. */ type NxCheckboxLabelSize = 'small' | 'large'; declare class NxCheckboxGroupComponent implements ControlValueAccessor, AfterContentInit, OnDestroy, DoCheck, NxAbstractControl { private readonly _cdr; private readonly _errorStateMatcher; private readonly _parentForm; private readonly _parentFormGroup; readonly ngControl: NgControl | null; _checkboxes: QueryList; _label: NxLabelComponent; error: NxErrorComponent; errorState: boolean; readonly _stateChanges: Subject; readonly selectionChange: EventEmitter; /** Sets the Id of the checkbox group. */ set id(value: string); get id(): string; private _id; /** Sets the name of the checkboxes inside the nx-checkbox-group. */ set name(value: string); get name(): string; private _name; /** Disables all checkboxes inside the nx-checkbox-group. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** Sets all checkboxes in the group to readonly. */ set readonly(value: boolean); get readonly(): boolean; private _readonly; /** Set the negative styles for all the checkboxes inside the nx-checkbox-group */ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** Sets the label size of the checkboxes inside the group */ set labelSize(value: NxCheckboxLabelSize); get labelSize(): NxCheckboxLabelSize; private _labelSize?; /** Whether the nx-checkbox-group are required. */ set required(value: BooleanInput); get required(): boolean; private _required?; private _value?; private readonly _destroyed; constructor(_cdr: ChangeDetectorRef, _errorStateMatcher: ErrorStateMatcher, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null, ngControl: NgControl | null); setReadonly(value: boolean): void; ngAfterContentInit(): void; ngDoCheck(): void; ngOnDestroy(): void; writeValue(value: any): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: any): void; setDisabledState?(isDisabled: boolean): void; private _onChange; private _onTouched; private _updateSelectedCheckboxFromValue; /** @docs-private */ change(value: unknown): void; /** Checkbox instances in the checkbox group. */ get checkboxes(): NxCheckboxComponent[]; /** @docs-private */ updateErrorState(): void; getLabelledby(): string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_readonly: unknown; } declare class NxCheckboxComponent implements ControlValueAccessor, OnDestroy, OnInit, AfterViewInit, Validator, NxAbstractControl { private readonly _cdr; private readonly _errorStateMatcher; readonly checkboxGroup: NxCheckboxGroupComponent | null; private readonly _focusMonitor; private injector; /** @docs-private */ _checkboxLabelWrapper: ElementRef; _nativeInput: ElementRef; error: NxErrorComponent | undefined; ariaLabel: string | null; ariaLabelledBy: string | null; /** * Id of the checkbox. * * If not set, the checkbox gets an incremented value by default. */ set id(value: string); get id(): string; private _id; /** Name of the checkbox. */ set name(name: string); get name(): string; private _name; /** Whether the checkbox is disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** Whether the checkbox should be readonly. */ set readonly(value: boolean); get readonly(): boolean; private _readonly; /** * Sets the label size of the checkbox. * * Default: `'small'`. */ set labelSize(value: NxCheckboxLabelSize); get labelSize(): NxCheckboxLabelSize; private _labelSize; /** * Whether the checkbox has negative styling. */ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** Whether the checkbox is checked. */ set checked(value: BooleanInput); get checked(): boolean; private _checked; private _indeterminate; /** Whether the checkbox is indeterminated. */ set indeterminate(value: BooleanInput); get indeterminate(): boolean; /** Whether the checkbox is required. */ set required(value: BooleanInput); get required(): boolean; private _required?; /** Sets the value of the checkbox. Default value is the checked status. */ set value(value: string); get value(): string; private _value; /** An event emitted when the indeterminate value has changed */ readonly indeterminateChange: EventEmitter; /** * An event emitted when the checked value has changed. * * Emits the boolean checked value of the changed checkbox. */ readonly checkedChange: EventEmitter; /** * An event emitted when the checked value has changed. * * Emits a NxCheckboxChangeEvent. */ readonly checkboxChange: EventEmitter; /** @docs-private */ get labelHasContent(): boolean; private readonly _destroyed; /** * Callback for when the content of the label has changed. * @docs-private */ labelContentChanged(): void; ngControl: NgControl | null; _parentForm: NgForm | null; _parentFormGroup: FormGroupDirective | null; constructor(_cdr: ChangeDetectorRef, _errorStateMatcher: ErrorStateMatcher, checkboxGroup: NxCheckboxGroupComponent | null, _focusMonitor: FocusMonitor, injector: Injector); setReadonly(value: boolean): void; validate(control: AbstractControl): ValidationErrors | null; /** @docs-private */ _controlInvalid(): boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; private _setIndeterminate; private _setChecked; /** Toggles the checked state of the checkbox. */ toggle(): void; writeValue(value: any): void; private onChangeCallback; registerOnChange(onChange: any): void; private onTouchedCallback; registerOnTouched(onTouched: any): void; setDisabledState?(isDisabled: boolean): void; /** Focuses the checkbox element. */ focus(focusOrigin?: FocusOrigin): void; /** Forward focus from host to hidden input field */ _forwardFocusToInput(): void; /** @docs-private */ touch(): void; /** @docs-private */ _onInputClick(event: Event): void; /** @docs-private */ private _createChangeEvent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_readonly: unknown; } declare class NxCheckboxModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NxCheckboxChangeEvent, NxCheckboxComponent, NxCheckboxGroupChangeEvent, NxCheckboxGroupComponent, NxCheckboxModule }; export type { NxCheckboxLabelSize };