UNPKG

1.26 kBTypeScriptView Raw
1import { ChangeDetectorRef } from '@angular/core';
2import { ControlValueAccessor } from '@angular/forms';
3import { NgbButtonLabel } from './label';
4/**
5 * Allows to easily create Bootstrap-style checkbox buttons.
6 *
7 * Integrates with forms, so the value of a checked button is bound to the underlying form control
8 * either in a reactive or template-driven way.
9 */
10export declare class NgbCheckBox implements ControlValueAccessor {
11 private _label;
12 private _cd;
13 static ngAcceptInputType_disabled: boolean | '';
14 checked: any;
15 /**
16 * If `true`, the checkbox button will be disabled
17 */
18 disabled: boolean;
19 /**
20 * The form control value when the checkbox is checked.
21 */
22 valueChecked: boolean;
23 /**
24 * The form control value when the checkbox is unchecked.
25 */
26 valueUnChecked: boolean;
27 onChange: (_: any) => void;
28 onTouched: () => void;
29 set focused(isFocused: boolean);
30 constructor(_label: NgbButtonLabel, _cd: ChangeDetectorRef);
31 onInputChange($event: any): void;
32 registerOnChange(fn: (value: any) => any): void;
33 registerOnTouched(fn: () => any): void;
34 setDisabledState(isDisabled: boolean): void;
35 writeValue(value: any): void;
36}