UNPKG

@blox/material

Version:

Material Components for Angular

35 lines (34 loc) 1.51 kB
import { AfterContentInit, ElementRef, OnDestroy, Renderer2, OnInit } from '@angular/core'; import { MdcEventRegistry } from '../../utils/mdc.event.registry'; import { HasId } from '../abstract/mixin.mdc.hasid'; declare class MdcFloatingLabelDirectiveBase { } interface MdcFloatingLabelDirectiveBase extends HasId { } /** * Directive for the floating label of input fields. Floating labels are used by * <code>mdcTextField</code> and <code>mdcSelect</code> to display the type of input * the field requires. Floating labels are resting when the field is inactive, and * float when the field is active. * For an <code>mdcTextField</code> the label must be added just after the * <code>mdcTextFieldInput</code> as a direct child of an * <code>mdcTextField</code>. There is no need to assign the <code>for</code> * attribute, as the label will automatically get its <code>for</code> attribute assigned * to the id of the parent <code>mdcInput</code>. */ export declare class MdcFloatingLabelDirective extends MdcFloatingLabelDirectiveBase implements AfterContentInit, OnDestroy, OnInit { private _rndr; _elm: ElementRef; private registry; private _mdcAdapter; private _foundation; constructor(_rndr: Renderer2, _elm: ElementRef, registry: MdcEventRegistry); ngOnInit(): void; ngAfterContentInit(): void; ngOnDestroy(): void; shake(shouldShake: boolean): void; float(shouldFloat: boolean): void; getWidth(): number; isLabelElement(): boolean; } export {};