UNPKG

@angular-mdc/web

Version:
53 lines (52 loc) 2.11 kB
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, Provider, QueryList } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { MDCComponent } from '@angular-mdc/web/base'; import { MdcRipple, MDCRippleCapableSurface } from '@angular-mdc/web/ripple'; import { MdcIcon } from '@angular-mdc/web/icon'; import { MDCIconButtonToggleFoundation } from '@material/icon-button'; export declare const MDC_ICON_BUTTON_CONTROL_VALUE_ACCESSOR: Provider; /** Change event object emitted by MdcIconButton. */ export declare class MdcIconButtonChange { source: MdcIconButton; value: any; constructor(source: MdcIconButton, value: any); } export declare class MdcIconOn { } export declare class MdcIconButton extends MDCComponent<MDCIconButtonToggleFoundation> implements AfterContentInit, ControlValueAccessor, OnDestroy, MDCRippleCapableSurface { private _changeDetectorRef; elementRef: ElementRef<HTMLElement>; ripple: MdcRipple; private _uniqueId; _root: Element; id: string; get inputId(): string; name: string | null; icon: string | null; get on(): boolean; set on(value: boolean); private _on; get disabled(): boolean; set disabled(value: boolean); private _disabled; readonly change: EventEmitter<MdcIconButtonChange>; icons: QueryList<MdcIcon>; /** Subscription to changes in icons. */ private _changeSubscription; _onChange: (value: any) => void; _onTouched: () => void; getDefaultFoundation(): MDCIconButtonToggleFoundation; constructor(_changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, ripple: MdcRipple); ngAfterContentInit(): void; ngOnDestroy(): void; writeValue(value: boolean): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: any): void; toggle(isOn?: boolean): void; setOn(on: boolean): void; /** Sets the button disabled state */ setDisabled(disabled: boolean): void; handleClick(): void; private _createRipple; private _getHostElement; }