button.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. import { FocusMonitor, FocusableOption, FocusOrigin } from '@angular/cdk/a11y';
  9. import { ElementRef, OnDestroy } from '@angular/core';
  10. import { CanColor, CanDisable, CanDisableRipple, CanColorCtor, CanDisableCtor, CanDisableRippleCtor, MatRipple } from '@angular/material/core';
  11. /** @docs-private */
  12. declare class MatButtonBase {
  13. _elementRef: ElementRef;
  14. constructor(_elementRef: ElementRef);
  15. }
  16. declare const _MatButtonMixinBase: CanDisableRippleCtor & CanDisableCtor & CanColorCtor & typeof MatButtonBase;
  17. /**
  18. * Material design button.
  19. */
  20. export declare class MatButton extends _MatButtonMixinBase implements OnDestroy, CanDisable, CanColor, CanDisableRipple, FocusableOption {
  21. private _focusMonitor;
  22. _animationMode: string;
  23. /** Whether the button is round. */
  24. readonly isRoundButton: boolean;
  25. /** Whether the button is icon button. */
  26. readonly isIconButton: boolean;
  27. /** Reference to the MatRipple instance of the button. */
  28. ripple: MatRipple;
  29. constructor(elementRef: ElementRef, _focusMonitor: FocusMonitor, _animationMode: string);
  30. ngOnDestroy(): void;
  31. /** Focuses the button. */
  32. focus(_origin?: FocusOrigin, options?: FocusOptions): void;
  33. _getHostElement(): any;
  34. _isRippleDisabled(): boolean;
  35. /** Gets whether the button has one of the given attributes. */
  36. _hasHostAttributes(...attributes: string[]): boolean;
  37. }
  38. /**
  39. * Material design anchor button.
  40. */
  41. export declare class MatAnchor extends MatButton {
  42. /** Tabindex of the button. */
  43. tabIndex: number;
  44. constructor(focusMonitor: FocusMonitor, elementRef: ElementRef, animationMode: string);
  45. _haltDisabledEvents(event: Event): void;
  46. }
  47. export {};