UNPKG

@angular-mdc/web

Version:
70 lines (69 loc) 2.52 kB
import { ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, OnDestroy } from '@angular/core'; import { MdcRipple, MDCRippleCapableSurface } from '@angular-mdc/web/ripple'; /** Change event that is fired whenever the selected state of an option changes. */ export declare class MdcListSelectionChange { source: MdcListItem; constructor(source: MdcListItem); } /** * Describes a parent MdcList component. * Contains properties that MdcListItem can inherit. */ export interface MdcListParentComponent { disableRipple: boolean; } /** * Injection token used to provide the parent MdcList component to MdcListItem. */ export declare const MDC_LIST_PARENT_COMPONENT: InjectionToken<MdcListParentComponent>; export declare class MdcListItemGraphic { elementRef: ElementRef<HTMLElement>; constructor(elementRef: ElementRef<HTMLElement>); } export declare class MdcListItemMeta { elementRef: ElementRef<HTMLElement>; constructor(elementRef: ElementRef<HTMLElement>); } export declare class MdcListItemText { elementRef: ElementRef<HTMLElement>; secondaryText?: string; constructor(elementRef: ElementRef<HTMLElement>); } export declare class MdcListItemSecondary { elementRef: ElementRef<HTMLElement>; constructor(elementRef: ElementRef<HTMLElement>); } export declare class MdcListItem implements OnDestroy, MDCRippleCapableSurface { ripple: MdcRipple; private _changeDetectorRef; elementRef: ElementRef; private _parent; private _id; _root: Element; /** The unique ID of the list item. */ get id(): string; value: any; tabIndex: number; /** Whether the list item is selected. */ get selected(): boolean; set selected(value: boolean); private _selected; /** Whether the list item is activated. */ get activated(): boolean; set activated(value: boolean); private _activated; /** Whether the list item is disabled. */ get disabled(): boolean; set disabled(value: boolean); private _disabled; readonly selectionChange: EventEmitter<MdcListSelectionChange>; constructor(ripple: MdcRipple, _changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, _parent: MdcListParentComponent); ngOnDestroy(): void; private _createRipple; focus(): void; setRole(role: string): void; getListItemElement(): HTMLElement; _onKeydown(evt: KeyboardEvent): void; /** Emits a change event if the selected state of an option changed. */ _emitChangeEvent(): void; }