index.d.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { AfterViewInit } from '@angular/core';
  3. import { BooleanInput } from '@angular/cdk/coercion';
  4. import { CanColor } from '@angular/material/core';
  5. import { CanDisable } from '@angular/material/core';
  6. import { CanDisableRipple } from '@angular/material/core';
  7. import { _Constructor } from '@angular/material/core';
  8. import { ElementRef } from '@angular/core';
  9. import { FocusOrigin } from '@angular/cdk/a11y';
  10. import * as i0 from '@angular/core';
  11. import * as i4 from '@angular/material/core';
  12. import { InjectionToken } from '@angular/core';
  13. import { MatRipple } from '@angular/material/core';
  14. import { NgZone } from '@angular/core';
  15. import { OnChanges } from '@angular/core';
  16. import { OnDestroy } from '@angular/core';
  17. import { OnInit } from '@angular/core';
  18. import { Platform } from '@angular/cdk/platform';
  19. import { ThemePalette } from '@angular/material/core';
  20. declare namespace i1 {
  21. export {
  22. MatButton,
  23. MatAnchor
  24. }
  25. }
  26. declare namespace i2 {
  27. export {
  28. MatIconButton,
  29. MatIconAnchor
  30. }
  31. }
  32. declare namespace i3 {
  33. export {
  34. MAT_FAB_DEFAULT_OPTIONS_FACTORY,
  35. MatFabDefaultOptions,
  36. MAT_FAB_DEFAULT_OPTIONS,
  37. MatFabButton,
  38. MatMiniFabButton,
  39. MatFabAnchor,
  40. MatMiniFabAnchor
  41. }
  42. }
  43. /** Injection token to be used to override the default options for FAB. */
  44. export declare const MAT_FAB_DEFAULT_OPTIONS: InjectionToken<MatFabDefaultOptions>;
  45. /** @docs-private */
  46. export declare function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions;
  47. /**
  48. * Material Design button component for anchor elements. Anchor elements are used to provide
  49. * links for the user to navigate across different routes or pages.
  50. * See https://material.io/components/buttons
  51. *
  52. * The `MatAnchor` class applies to native anchor elements and captures the appearances for
  53. * "text button", "outlined button", and "contained button" per the Material Design
  54. * specification. `MatAnchor` additionally captures an additional "flat" appearance, which matches
  55. * "contained" but without elevation.
  56. */
  57. export declare class MatAnchor extends MatAnchorBase {
  58. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
  59. static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchor, [null, null, null, { optional: true; }]>;
  60. static ɵcmp: i0.ɵɵComponentDeclaration<MatAnchor, "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", ["matButton", "matAnchor"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  61. }
  62. /**
  63. * Anchor button base.
  64. */
  65. declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
  66. tabIndex: number;
  67. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
  68. ngOnInit(): void;
  69. ngOnDestroy(): void;
  70. _haltDisabledEvents: (event: Event) => void;
  71. static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchorBase, never>;
  72. static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, {}, {}, never, never, false, never>;
  73. }
  74. /**
  75. * Material Design button component. Users interact with a button to perform an action.
  76. * See https://material.io/components/buttons
  77. *
  78. * The `MatButton` class applies to native button elements and captures the appearances for
  79. * "text button", "outlined button", and "contained button" per the Material Design
  80. * specification. `MatButton` additionally captures an additional "flat" appearance, which matches
  81. * "contained" but without elevation.
  82. */
  83. export declare class MatButton extends MatButtonBase {
  84. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
  85. static ɵfac: i0.ɵɵFactoryDeclaration<MatButton, [null, null, null, { optional: true; }]>;
  86. static ɵcmp: i0.ɵɵComponentDeclaration<MatButton, " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", ["matButton"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  87. }
  88. /** Base class for all buttons. */
  89. declare class MatButtonBase extends _MatButtonMixin implements CanDisable, CanColor, CanDisableRipple, AfterViewInit, OnChanges, OnDestroy {
  90. _platform: Platform;
  91. _ngZone: NgZone;
  92. _animationMode?: string | undefined;
  93. private readonly _focusMonitor;
  94. /**
  95. * Handles the lazy creation of the MatButton ripple.
  96. * Used to improve initial load time of large applications.
  97. */
  98. _rippleLoader: MatButtonLazyLoader;
  99. /** Whether this button is a FAB. Used to apply the correct class on the ripple. */
  100. _isFab: boolean;
  101. /**
  102. * Reference to the MatRipple instance of the button.
  103. * @deprecated Considered an implementation detail. To be removed.
  104. * @breaking-change 17.0.0
  105. */
  106. get ripple(): MatRipple;
  107. set ripple(v: MatRipple);
  108. /** @docs-private Reference to the MatRipple instance of the button. */
  109. protected _ripple?: MatRipple;
  110. constructor(elementRef: ElementRef, _platform: Platform, _ngZone: NgZone, _animationMode?: string | undefined);
  111. ngAfterViewInit(): void;
  112. ngOnChanges(): void;
  113. ngOnDestroy(): void;
  114. /** Focuses the button. */
  115. focus(_origin?: FocusOrigin, options?: FocusOptions): void;
  116. /** Gets whether the button has one of the given attributes. */
  117. private _hasHostAttributes;
  118. static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonBase, never>;
  119. static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, {}, {}, never, never, false, never>;
  120. }
  121. /**
  122. * Handles attaching the MatButton's ripple on demand.
  123. *
  124. * This service allows us to avoid eagerly creating & attaching the MatButton's ripple.
  125. * It works by creating & attaching the ripple only when a MatButton is first interacted with.
  126. */
  127. declare class MatButtonLazyLoader implements OnDestroy {
  128. private _document;
  129. private _animationMode;
  130. private _globalRippleOptions;
  131. private _platform;
  132. private _ngZone;
  133. constructor();
  134. ngOnDestroy(): void;
  135. /** Handles creating and attaching button internals when a button is initially interacted with. */
  136. private _onInteraction;
  137. /** Creates a MatButtonRipple and appends it to the given button element. */
  138. private _appendRipple;
  139. _createMatRipple(button: HTMLElement): MatRipple | undefined;
  140. static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonLazyLoader, never>;
  141. static ɵprov: i0.ɵɵInjectableDeclaration<MatButtonLazyLoader>;
  142. }
  143. /** @docs-private */
  144. declare const _MatButtonMixin: _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & {
  145. new (_elementRef: ElementRef): {
  146. _elementRef: ElementRef;
  147. };
  148. };
  149. export declare class MatButtonModule {
  150. static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonModule, never>;
  151. static ɵmod: i0.ɵɵNgModuleDeclaration<MatButtonModule, [typeof i1.MatAnchor, typeof i1.MatButton, typeof i2.MatIconAnchor, typeof i3.MatMiniFabAnchor, typeof i3.MatMiniFabButton, typeof i2.MatIconButton, typeof i3.MatFabAnchor, typeof i3.MatFabButton], [typeof i4.MatCommonModule, typeof i4.MatRippleModule], [typeof i1.MatAnchor, typeof i1.MatButton, typeof i2.MatIconAnchor, typeof i2.MatIconButton, typeof i3.MatMiniFabAnchor, typeof i3.MatMiniFabButton, typeof i3.MatFabAnchor, typeof i3.MatFabButton, typeof i4.MatCommonModule]>;
  152. static ɵinj: i0.ɵɵInjectorDeclaration<MatButtonModule>;
  153. }
  154. /**
  155. * Material Design floating action button (FAB) component for anchor elements. Anchor elements
  156. * are used to provide links for the user to navigate across different routes or pages.
  157. * See https://material.io/components/buttons-floating-action-button/
  158. *
  159. * The `MatFabAnchor` class has two appearances: normal and extended.
  160. */
  161. export declare class MatFabAnchor extends MatAnchor {
  162. private _options?;
  163. _isFab: boolean;
  164. get extended(): boolean;
  165. set extended(value: BooleanInput);
  166. private _extended;
  167. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
  168. static ɵfac: i0.ɵɵFactoryDeclaration<MatFabAnchor, [null, null, null, { optional: true; }, { optional: true; }]>;
  169. static ɵcmp: i0.ɵɵComponentDeclaration<MatFabAnchor, "a[mat-fab]", ["matButton", "matAnchor"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "extended": { "alias": "extended"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  170. }
  171. /**
  172. * Material Design floating action button (FAB) component. These buttons represent the primary
  173. * or most common action for users to interact with.
  174. * See https://material.io/components/buttons-floating-action-button/
  175. *
  176. * The `MatFabButton` class has two appearances: normal and extended.
  177. */
  178. export declare class MatFabButton extends MatButtonBase {
  179. private _options?;
  180. _isFab: boolean;
  181. get extended(): boolean;
  182. set extended(value: BooleanInput);
  183. private _extended;
  184. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
  185. static ɵfac: i0.ɵɵFactoryDeclaration<MatFabButton, [null, null, null, { optional: true; }, { optional: true; }]>;
  186. static ɵcmp: i0.ɵɵComponentDeclaration<MatFabButton, "button[mat-fab]", ["matButton"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "extended": { "alias": "extended"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  187. }
  188. /** Default FAB options that can be overridden. */
  189. export declare interface MatFabDefaultOptions {
  190. color?: ThemePalette;
  191. }
  192. /**
  193. * Material Design icon button component for anchor elements. This button displays a single
  194. * interaction icon that allows users to navigate across different routes or pages.
  195. * See https://material.io/develop/web/components/buttons/icon-buttons/
  196. */
  197. export declare class MatIconAnchor extends MatAnchorBase {
  198. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
  199. static ɵfac: i0.ɵɵFactoryDeclaration<MatIconAnchor, [null, null, null, { optional: true; }]>;
  200. static ɵcmp: i0.ɵɵComponentDeclaration<MatIconAnchor, "a[mat-icon-button]", ["matButton", "matAnchor"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  201. }
  202. /**
  203. * Material Design icon button component. This type of button displays a single interactive icon for
  204. * users to perform an action.
  205. * See https://material.io/develop/web/components/buttons/icon-buttons/
  206. */
  207. export declare class MatIconButton extends MatButtonBase {
  208. /**
  209. * Reference to the MatRipple instance of the button.
  210. * @deprecated Considered an implementation detail. To be removed.
  211. * @breaking-change 17.0.0
  212. */
  213. get ripple(): MatRipple;
  214. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
  215. static ɵfac: i0.ɵɵFactoryDeclaration<MatIconButton, [null, null, null, { optional: true; }]>;
  216. static ɵcmp: i0.ɵɵComponentDeclaration<MatIconButton, "button[mat-icon-button]", ["matButton"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, ["*"], false, never>;
  217. }
  218. /**
  219. * Material Design mini floating action button (FAB) component for anchor elements. Anchor elements
  220. * are used to provide links for the user to navigate across different routes or pages.
  221. * See https://material.io/components/buttons-floating-action-button/
  222. */
  223. export declare class MatMiniFabAnchor extends MatAnchor {
  224. private _options?;
  225. _isFab: boolean;
  226. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
  227. static ɵfac: i0.ɵɵFactoryDeclaration<MatMiniFabAnchor, [null, null, null, { optional: true; }, { optional: true; }]>;
  228. static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabAnchor, "a[mat-mini-fab]", ["matButton", "matAnchor"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  229. }
  230. /**
  231. * Material Design mini floating action button (FAB) component. These buttons represent the primary
  232. * or most common action for users to interact with.
  233. * See https://material.io/components/buttons-floating-action-button/
  234. */
  235. export declare class MatMiniFabButton extends MatButtonBase {
  236. private _options?;
  237. _isFab: boolean;
  238. constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
  239. static ɵfac: i0.ɵɵFactoryDeclaration<MatMiniFabButton, [null, null, null, { optional: true; }, { optional: true; }]>;
  240. static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabButton, "button[mat-mini-fab]", ["matButton"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
  241. }
  242. export { }