// Type definitions for Angular Material 0.8.3+ (angular.material module) // Project: https://github.com/angular/material // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// declare namespace angular.material { interface MDBottomSheetOptions { templateUrl?: string; template?: string; controller?: any; locals?: {[index: string]: any}; targetEvent?: any; resolve?: {[index: string]: angular.IPromise} controllerAs?: string; parent?: Element; disableParentScroll?: boolean; } interface MDBottomSheetService { show(options: MDBottomSheetOptions): angular.IPromise; hide(response?: any): void; cancel(response?: any): void; } interface MDPresetDialog { title(title: string): T; content(content: string): T; ok(content: string): T; theme(theme: string): T; } interface MDAlertDialog extends MDPresetDialog { } interface MDConfirmDialog extends MDPresetDialog { cancel(reason?: string): MDConfirmDialog; } interface MDDialogOptions { templateUrl?: string; template?: string; domClickEvent?: any; disableParentScroll?: boolean; clickOutsideToClose?: boolean; hasBackdrop?: boolean; escapeToClose?: boolean; controller?: any; locals?: {[index: string]: any}; bindToController?: boolean; resolve?: {[index: string]: angular.IPromise} controllerAs?: string; parent?: Element; onComplete?: Function; } interface MDDialogService { show(dialog: MDDialogOptions|MDPresetDialog): angular.IPromise; confirm(): MDConfirmDialog; alert(): MDAlertDialog; hide(response?: any): angular.IPromise; cancel(response?: any): void; } interface MDIcon { (path: string): angular.IPromise; } interface MDIconProvider { icon(id: string, url: string, iconSize?: string): MDIconProvider; iconSet(id: string, url: string, iconSize?: string): MDIconProvider; defaultIconSet(url: string, iconSize?: string): MDIconProvider; defaultIconSize(iconSize: string): MDIconProvider; } interface MDMedia { (media: string): boolean; } interface MDSidenavObject { toggle(): void; open(): void; close(): void; isOpen(): boolean; isLockedOpen(): boolean; } interface MDSidenavService { (component: string): MDSidenavObject; } interface MDToastPreset { content(content: string): T; action(action: string): T; highlightAction(highlightAction: boolean): T; capsule(capsule: boolean): T; theme(theme: string): T; hideDelay(delay: number): T; } interface MDSimpleToastPreset extends MDToastPreset { } interface MDToastOptions { templateUrl?: string; template?: string; hideDelay?: number; position?: string; controller?: any; locals?: {[index: string]: any}; bindToController?: boolean; resolve?: {[index: string]: angular.IPromise} controllerAs?: string; parent?: Element; } interface MDToastService { show(optionsOrPreset: MDToastOptions|MDToastPreset): angular.IPromise; showSimple(): angular.IPromise; simple(): MDSimpleToastPreset; build(): MDToastPreset; updateContent(): void; hide(response?: any): void; cancel(response?: any): void; } interface MDPalette { 0?: string; 50?: string; 100?: string; 200?: string; 300?: string; 400?: string; 500?: string; 600?: string; 700?: string; 800?: string; 900?: string; A100?: string; A200?: string; A400?: string; A700?: string; contrastDefaultColor?: string; contrastDarkColors?: string; contrastStrongLightColors?: string; } interface MDThemeHues { default?: string; 'hue-1'?: string; 'hue-2'?: string; 'hue-3'?: string; } interface MDThemePalette { name: string; hues: MDThemeHues; } interface MDThemeColors { accent: MDThemePalette; background: MDThemePalette; primary: MDThemePalette; warn: MDThemePalette; } interface MDThemeGrayScalePalette { 1: string; 2: string; 3: string; 4: string; name: string; } interface MDTheme { name: string; colors: MDThemeColors; foregroundPalette: MDThemeGrayScalePalette; foregroundShadow: string; accentPalette(name: string, hues?: MDThemeHues): MDTheme; primaryPalette(name: string, hues?: MDThemeHues): MDTheme; warnPalette(name: string, hues?: MDThemeHues): MDTheme; backgroundPalette(name: string, hues?: MDThemeHues): MDTheme; dark(isDark?: boolean): MDTheme; } interface MDThemingProvider { theme(name: string, inheritFrom?: string): MDTheme; definePalette(name: string, palette: MDPalette): MDThemingProvider; extendPalette(name: string, palette: MDPalette): MDPalette; setDefaultTheme(theme: string): void; alwaysWatchTheme(alwaysWatch: boolean): void; } }