UNPKG

@blox/material

Version:

Material Components for Angular

63 lines (62 loc) 2.48 kB
import { AfterContentInit, ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core'; import { NgControl } from '@angular/forms'; import { AbstractMdcInput } from '../abstract/abstract.mdc.input'; import { MdcEventRegistry } from '../../utils/mdc.event.registry'; import { AbstractMdcRipple } from '../ripple/abstract.mdc.ripple'; /** * Directive for the input element of an <code>MdcCheckboxDirective</code>. */ export declare class MdcCheckboxInputDirective extends AbstractMdcInput implements OnInit, OnDestroy { _elm: ElementRef; _cntr: NgControl; private onDestroy$; private _id; private _disabled; private _checked; private _indeterminate; constructor(_elm: ElementRef, _cntr: NgControl); ngOnInit(): void; ngOnDestroy(): void; /** @docs-private */ get id(): string | null; set id(value: string | null); /** @docs-private */ get disabled(): boolean; set disabled(value: boolean); static ngAcceptInputType_disabled: boolean | ''; /** @docs-private */ get checked(): boolean; set checked(value: boolean); static ngAcceptInputType_checked: boolean | ''; private updateValue; /** @docs-private */ get indeterminate(): boolean; set indeterminate(value: boolean); static ngAcceptInputType_indeterminate: boolean | ''; _onChange(): void; } /** * Directive for creating a Material Design checkbox. The checkbox is driven by an * underlying native checkbox input, which must use the <code>MdcCheckboxInputDirective</code> * directive. * The current implementation will add all other required DOM elements (such as the * background and ripple). * Future implementations will also support supplying (customized) background * elements. * * This directive can be used together with an <code>mdcFormField</code> to * easily position checkboxes and their labels, see * <a href="/components/form-field">mdcFormField</a>. */ export declare class MdcCheckboxDirective extends AbstractMdcRipple implements AfterContentInit, OnDestroy { private root; private onDestroy$; private onInputChange$; private mdcAdapter; constructor(renderer: Renderer2, root: ElementRef, registry: MdcEventRegistry, doc: any); ngAfterContentInit(): void; ngOnDestroy(): void; private subscribeInputChanges; private static addBackground; } export declare const CHECKBOX_DIRECTIVES: (typeof MdcCheckboxInputDirective | typeof MdcCheckboxDirective)[];