UNPKG

@engie-group/fluid-design-system-angular

Version:

Fluid Design System Angular

128 lines (127 loc) 4.15 kB
import { ChangeDetectorRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { CheckboxSize } from './checkbox.model'; import * as i0 from "@angular/core"; export declare class CheckboxComponent implements ControlValueAccessor { private cdr; private readonly checkboxClassName; private _checked; /** * Input id */ inputId: string; /** * Input name */ name: string; /** * Whether input is required or not */ isRequired?: boolean; /** * Whether the checkbox is checked or not */ set isChecked(value: boolean); get isChecked(): boolean; /** * Checkbox size */ size?: CheckboxSize; /** * Input value */ value?: string; /** * Whether the checkbox is disabled or not */ isDisabled?: boolean; /** * Whether the checkbox is in error state */ hasError?: boolean; /** * Whether the checkbox is in success state */ hasSuccess?: boolean; /** * Message to display as hint below checkbox */ subscriptMessage?: string; /** * @Deprecated * Message to display if checkbox is in error state */ errorMessage?: string; /** * Aria label, for accessibility reasons */ ariaLabel?: string; /** * Aria labelled by, for accessibility reasons */ ariaLabelledby?: string; /** * Whether checkbox is only presentational and state handled by a parent, can be useful for lists of checkboxes. * When set to `true`, the checkbox won't have any interaction. */ isPresentational?: boolean; /** * Whether the checkbox is in indeterminate state or not. */ indeterminate: boolean; /** * Output that emits checked value on change only */ valueChange: EventEmitter<boolean>; private _inputElement; constructor(cdr: ChangeDetectorRef); /** * @ignore */ private _onChange; /** * @ignore */ private _onTouched; /** * @ignore */ _onChangeEvent(event: Event): void; /** * @ignore */ _onInputClick(event: Event): void; /** * Implemented as part of ControlValueAccessor. * @ignore */ writeValue(value: any): void; /** * Implemented as part of ControlValueAccessor. * @ignore */ registerOnChange(fn: any): void; /** * Implemented as part of ControlValueAccessor. * @ignore */ registerOnTouched(fn: any): void; /** * Implemented as part of ControlValueAccessor. * @ignore */ setDisabledState(isDisabled: boolean): void; /** * @ignore */ getSubscriptId(): string; private get checkboxSizeClass(); protected get checkboxClasses(): { [x: string]: boolean; 'nj-checkbox--error': boolean; 'nj-checkbox--success': boolean; }; static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "nj-checkbox", never, { "inputId": { "alias": "inputId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "isChecked": { "alias": "isChecked"; "required": false; }; "size": { "alias": "size"; "required": false; }; "value": { "alias": "value"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "hasSuccess": { "alias": "hasSuccess"; "required": false; }; "subscriptMessage": { "alias": "subscriptMessage"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "isPresentational": { "alias": "isPresentational"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>; static ngAcceptInputType_indeterminate: unknown; }