UNPKG

@doku-dev/doku-fragment

Version:

A new Angular UI library that moving away from Bootstrap and built from scratch.

54 lines (53 loc) 1.97 kB
import { NgClass } from '@angular/common'; import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class DokuCheckbox implements ControlValueAccessor, OnDestroy, OnInit { private cdr; private ngControl; /** * Unique id of the checkbox. By default, it's auto-generated. * @default `d-checkbox-[uniqueId]` */ id: string; /** * Whether the checkbox is disabled. * * If using reactive forms, the value will be replaced. * Use form control's method to disable the Checkbox. * * @default false */ disabled: boolean; /** * Whether the checkbox is checked. * * If using reactive forms or template-drive forms, the value will be replaced. * * @default false */ checked: boolean; /** * The size of the checkbox. * @default 'medium' */ size: 'small' | 'medium'; /** * An event emitted when checked is changed. */ checkedChange: EventEmitter<boolean>; private destroy$; constructor(cdr: ChangeDetectorRef, ngControl: NgControl); protected get classes(): NgClass['ngClass']; ngOnInit(): void; ngOnDestroy(): void; onChange?: (_: any) => void; onTouched?: () => void; writeValue(value: boolean): void; registerOnTouched(fn: () => void): void; registerOnChange(fn: (_: any) => unknown): void; setDisabledState?(isDisabled: boolean): void; protected onCheckboxChange(): void; static ɵfac: i0.ɵɵFactoryDeclaration<DokuCheckbox, [null, { optional: true; self: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<DokuCheckbox, "doku-checkbox", ["dokuCheckbox"], { "id": "id"; "disabled": "disabled"; "checked": "checked"; "size": "size"; }, { "checkedChange": "checkedChange"; }, never, ["*", "doku-checkbox-sub-label"], true>; }