stepper.d.ts 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 { Directionality } from '@angular/cdk/bidi';
  9. import { CdkStep, CdkStepper, StepperOptions } from '@angular/cdk/stepper';
  10. import { AnimationEvent } from '@angular/animations';
  11. import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core';
  12. import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';
  13. import { ErrorStateMatcher } from '@angular/material/core';
  14. import { Subject } from 'rxjs';
  15. import { MatStepHeader } from './step-header';
  16. import { MatStepLabel } from './step-label';
  17. import { MatStepperIcon, MatStepperIconContext } from './stepper-icon';
  18. export declare class MatStep extends CdkStep implements ErrorStateMatcher {
  19. private _errorStateMatcher;
  20. /** Content for step label given by `<ng-template matStepLabel>`. */
  21. stepLabel: MatStepLabel;
  22. /** @breaking-change 8.0.0 remove the `?` after `stepperOptions` */
  23. constructor(stepper: MatStepper, _errorStateMatcher: ErrorStateMatcher, stepperOptions?: StepperOptions);
  24. /** Custom error state matcher that additionally checks for validity of interacted form. */
  25. isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean;
  26. }
  27. export declare class MatStepper extends CdkStepper implements AfterContentInit {
  28. /** The list of step headers of the steps in the stepper. */
  29. _stepHeader: QueryList<MatStepHeader>;
  30. /** Steps that the stepper holds. */
  31. _steps: QueryList<MatStep>;
  32. /** Custom icon overrides passed in by the consumer. */
  33. _icons: QueryList<MatStepperIcon>;
  34. /** Event emitted when the current step is done transitioning in. */
  35. readonly animationDone: EventEmitter<void>;
  36. /** Whether ripples should be disabled for the step headers. */
  37. disableRipple: boolean;
  38. /** Consumer-specified template-refs to be used to override the header icons. */
  39. _iconOverrides: {
  40. [key: string]: TemplateRef<MatStepperIconContext>;
  41. };
  42. /** Stream of animation `done` events when the body expands/collapses. */
  43. _animationDone: Subject<AnimationEvent>;
  44. ngAfterContentInit(): void;
  45. }
  46. export declare class MatHorizontalStepper extends MatStepper {
  47. /** Whether the label should display in bottom or end position. */
  48. labelPosition: 'bottom' | 'end';
  49. }
  50. export declare class MatVerticalStepper extends MatStepper {
  51. constructor(dir: Directionality, changeDetectorRef: ChangeDetectorRef, elementRef?: ElementRef<HTMLElement>, _document?: any);
  52. }