index.d.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. import * as i3$1 from '@angular/cdk/stepper';
  2. import { CdkStepLabel, StepState, CdkStepHeader, CdkStep, CdkStepper, CdkStepperNext, CdkStepperPrevious } from '@angular/cdk/stepper';
  3. export { StepState, StepperOrientation } from '@angular/cdk/stepper';
  4. import * as i0 from '@angular/core';
  5. import { Optional, TemplateRef, AfterViewInit, OnDestroy, AfterContentInit, QueryList, ElementRef, EventEmitter } from '@angular/core';
  6. import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
  7. import * as i3 from '@angular/cdk/portal';
  8. import { TemplatePortal } from '@angular/cdk/portal';
  9. import { M as MatIconModule } from '../icon-module.d-COXCrhrh.js';
  10. import { M as MatRippleModule } from '../index.d-DG9eDM2-.js';
  11. import { AbstractControl, FormGroupDirective, NgForm } from '@angular/forms';
  12. import { T as ThemePalette } from '../palette.d-BSSFKjO6.js';
  13. import { E as ErrorStateMatcher } from '../error-options.d-CGdTZUYk.js';
  14. import { FocusOrigin } from '@angular/cdk/a11y';
  15. import { Subject } from 'rxjs';
  16. import '@angular/cdk/bidi';
  17. import '../ripple.d-BxTUZJt7.js';
  18. import '@angular/cdk/platform';
  19. declare class MatStepLabel extends CdkStepLabel {
  20. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepLabel, never>;
  21. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepLabel, "[matStepLabel]", never, {}, {}, never, never, true, never>;
  22. }
  23. /** Stepper data that is required for internationalization. */
  24. declare class MatStepperIntl {
  25. /**
  26. * Stream that emits whenever the labels here are changed. Use this to notify
  27. * components if the labels have changed after initialization.
  28. */
  29. readonly changes: Subject<void>;
  30. /** Label that is rendered below optional steps. */
  31. optionalLabel: string;
  32. /** Label that is used to indicate step as completed to screen readers. */
  33. completedLabel: string;
  34. /** Label that is used to indicate step as editable to screen readers. */
  35. editableLabel: string;
  36. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperIntl, never>;
  37. static ɵprov: i0.ɵɵInjectableDeclaration<MatStepperIntl>;
  38. }
  39. /**
  40. * @docs-private
  41. * @deprecated No longer used, will be removed.
  42. * @breaking-change 21.0.0
  43. */
  44. declare function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl): MatStepperIntl;
  45. /**
  46. * @docs-private
  47. * @deprecated No longer used, will be removed.
  48. * @breaking-change 21.0.0
  49. */
  50. declare const MAT_STEPPER_INTL_PROVIDER: {
  51. provide: typeof MatStepperIntl;
  52. deps: Optional[][];
  53. useFactory: typeof MAT_STEPPER_INTL_PROVIDER_FACTORY;
  54. };
  55. /** Template context available to an attached `matStepperIcon`. */
  56. interface MatStepperIconContext {
  57. /** Index of the step. */
  58. index: number;
  59. /** Whether the step is currently active. */
  60. active: boolean;
  61. /** Whether the step is optional. */
  62. optional: boolean;
  63. }
  64. /**
  65. * Template to be used to override the icons inside the step header.
  66. */
  67. declare class MatStepperIcon {
  68. templateRef: TemplateRef<MatStepperIconContext>;
  69. /** Name of the icon to be overridden. */
  70. name: StepState;
  71. constructor(...args: unknown[]);
  72. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperIcon, never>;
  73. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepperIcon, "ng-template[matStepperIcon]", never, { "name": { "alias": "matStepperIcon"; "required": false; }; }, {}, never, never, true, never>;
  74. }
  75. declare class MatStepHeader extends CdkStepHeader implements AfterViewInit, OnDestroy {
  76. _intl: MatStepperIntl;
  77. private _focusMonitor;
  78. private _intlSubscription;
  79. /** State of the given step. */
  80. state: StepState;
  81. /** Label of the given step. */
  82. label: MatStepLabel | string;
  83. /** Error message to display when there's an error. */
  84. errorMessage: string;
  85. /** Overrides for the header icons, passed in via the stepper. */
  86. iconOverrides: {
  87. [key: string]: TemplateRef<MatStepperIconContext>;
  88. };
  89. /** Index of the given step. */
  90. index: number;
  91. /** Whether the given step is selected. */
  92. selected: boolean;
  93. /** Whether the given step label is active. */
  94. active: boolean;
  95. /** Whether the given step is optional. */
  96. optional: boolean;
  97. /** Whether the ripple should be disabled. */
  98. disableRipple: boolean;
  99. /**
  100. * Theme color of the step header. This API is supported in M2 themes only, it
  101. * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/stepper/styling.
  102. *
  103. * For information on applying color variants in M3, see
  104. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  105. */
  106. color: ThemePalette;
  107. constructor(...args: unknown[]);
  108. ngAfterViewInit(): void;
  109. ngOnDestroy(): void;
  110. /** Focuses the step header. */
  111. focus(origin?: FocusOrigin, options?: FocusOptions): void;
  112. /** Returns string label of given step if it is a text label. */
  113. _stringLabel(): string | null;
  114. /** Returns MatStepLabel if the label of given step is a template label. */
  115. _templateLabel(): MatStepLabel | null;
  116. /** Returns the host HTML element. */
  117. _getHostElement(): HTMLElement;
  118. /** Template context variables that are exposed to the `matStepperIcon` instances. */
  119. _getIconContext(): MatStepperIconContext;
  120. _getDefaultTextForState(state: StepState): string;
  121. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepHeader, never>;
  122. static ɵcmp: i0.ɵɵComponentDeclaration<MatStepHeader, "mat-step-header", never, { "state": { "alias": "state"; "required": false; }; "label": { "alias": "label"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "iconOverrides": { "alias": "iconOverrides"; "required": false; }; "index": { "alias": "index"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "active": { "alias": "active"; "required": false; }; "optional": { "alias": "optional"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
  123. }
  124. /**
  125. * Content for a `mat-step` that will be rendered lazily.
  126. */
  127. declare class MatStepContent {
  128. _template: TemplateRef<any>;
  129. constructor(...args: unknown[]);
  130. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepContent, never>;
  131. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepContent, "ng-template[matStepContent]", never, {}, {}, never, never, true, never>;
  132. }
  133. declare class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentInit, OnDestroy {
  134. private _errorStateMatcher;
  135. private _viewContainerRef;
  136. private _isSelected;
  137. /** Content for step label given by `<ng-template matStepLabel>`. */
  138. stepLabel: MatStepLabel;
  139. /**
  140. * Theme color for the particular step. This API is supported in M2 themes
  141. * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/stepper/styling.
  142. *
  143. * For information on applying color variants in M3, see
  144. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  145. */
  146. color: ThemePalette;
  147. /** Content that will be rendered lazily. */
  148. _lazyContent: MatStepContent;
  149. /** Currently-attached portal containing the lazy content. */
  150. _portal: TemplatePortal;
  151. ngAfterContentInit(): void;
  152. ngOnDestroy(): void;
  153. /** Custom error state matcher that additionally checks for validity of interacted form. */
  154. isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean;
  155. static ɵfac: i0.ɵɵFactoryDeclaration<MatStep, never>;
  156. static ɵcmp: i0.ɵɵComponentDeclaration<MatStep, "mat-step", ["matStep"], { "color": { "alias": "color"; "required": false; }; }, {}, ["stepLabel", "_lazyContent"], ["*"], true, never>;
  157. }
  158. declare class MatStepper extends CdkStepper implements AfterViewInit, AfterContentInit, OnDestroy {
  159. private _ngZone;
  160. private _renderer;
  161. private _animationsModule;
  162. private _cleanupTransition;
  163. protected _isAnimating: i0.WritableSignal<boolean>;
  164. /** The list of step headers of the steps in the stepper. */
  165. _stepHeader: QueryList<MatStepHeader>;
  166. /** Elements hosting the step animations. */
  167. _animatedContainers: QueryList<ElementRef>;
  168. /** Full list of steps inside the stepper, including inside nested steppers. */
  169. _steps: QueryList<MatStep>;
  170. /** Steps that belong to the current stepper, excluding ones from nested steppers. */
  171. readonly steps: QueryList<MatStep>;
  172. /** Custom icon overrides passed in by the consumer. */
  173. _icons: QueryList<MatStepperIcon>;
  174. /** Event emitted when the current step is done transitioning in. */
  175. readonly animationDone: EventEmitter<void>;
  176. /** Whether ripples should be disabled for the step headers. */
  177. disableRipple: boolean;
  178. /**
  179. * Theme color for all of the steps in stepper. This API is supported in M2
  180. * themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/stepper/styling.
  181. *
  182. * For information on applying color variants in M3, see
  183. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  184. */
  185. color: ThemePalette;
  186. /**
  187. * Whether the label should display in bottom or end position.
  188. * Only applies in the `horizontal` orientation.
  189. */
  190. labelPosition: 'bottom' | 'end';
  191. /**
  192. * Position of the stepper's header.
  193. * Only applies in the `horizontal` orientation.
  194. */
  195. headerPosition: 'top' | 'bottom';
  196. /** Consumer-specified template-refs to be used to override the header icons. */
  197. _iconOverrides: Record<string, TemplateRef<MatStepperIconContext>>;
  198. /** Duration for the animation. Will be normalized to milliseconds if no units are set. */
  199. get animationDuration(): string;
  200. set animationDuration(value: string);
  201. private _animationDuration;
  202. /** Whether the stepper is rendering on the server. */
  203. protected _isServer: boolean;
  204. constructor(...args: unknown[]);
  205. ngAfterContentInit(): void;
  206. ngAfterViewInit(): void;
  207. ngOnDestroy(): void;
  208. _stepIsNavigable(index: number, step: MatStep): boolean;
  209. _getAnimationDuration(): string;
  210. private _handleTransitionend;
  211. private _onAnimationDone;
  212. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepper, never>;
  213. static ɵcmp: i0.ɵɵComponentDeclaration<MatStepper, "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", ["matStepper", "matVerticalStepper", "matHorizontalStepper"], { "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; }, { "animationDone": "animationDone"; }, ["_steps", "_icons"], ["*"], true, never>;
  214. }
  215. /** Button that moves to the next step in a stepper workflow. */
  216. declare class MatStepperNext extends CdkStepperNext {
  217. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperNext, never>;
  218. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepperNext, "button[matStepperNext]", never, {}, {}, never, never, true, never>;
  219. }
  220. /** Button that moves to the previous step in a stepper workflow. */
  221. declare class MatStepperPrevious extends CdkStepperPrevious {
  222. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperPrevious, never>;
  223. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepperPrevious, "button[matStepperPrevious]", never, {}, {}, never, never, true, never>;
  224. }
  225. declare class MatStepperModule {
  226. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperModule, never>;
  227. static ɵmod: i0.ɵɵNgModuleDeclaration<MatStepperModule, never, [typeof MatCommonModule, typeof i3.PortalModule, typeof i3$1.CdkStepperModule, typeof MatIconModule, typeof MatRippleModule, typeof MatStep, typeof MatStepLabel, typeof MatStepper, typeof MatStepperNext, typeof MatStepperPrevious, typeof MatStepHeader, typeof MatStepperIcon, typeof MatStepContent], [typeof MatCommonModule, typeof MatStep, typeof MatStepLabel, typeof MatStepper, typeof MatStepperNext, typeof MatStepperPrevious, typeof MatStepHeader, typeof MatStepperIcon, typeof MatStepContent]>;
  228. static ɵinj: i0.ɵɵInjectorDeclaration<MatStepperModule>;
  229. }
  230. /**
  231. * Animations used by the Material steppers.
  232. * @docs-private
  233. * @deprecated No longer used, will be removed.
  234. * @breaking-change 21.0.0
  235. */
  236. declare const matStepperAnimations: {
  237. readonly horizontalStepTransition: any;
  238. readonly verticalStepTransition: any;
  239. };
  240. export { MAT_STEPPER_INTL_PROVIDER, MAT_STEPPER_INTL_PROVIDER_FACTORY, MatStep, MatStepContent, MatStepHeader, MatStepLabel, MatStepper, MatStepperIcon, MatStepperIntl, MatStepperModule, MatStepperNext, MatStepperPrevious, matStepperAnimations };
  241. export type { MatStepperIconContext };