UNPKG

@angular/material

Version:
616 lines (599 loc) 36.1 kB
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/stepper'), require('rxjs'), require('@angular/cdk/a11y'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/common'), require('@angular/material/core'), require('rxjs/operators'), require('@angular/cdk/portal'), require('@angular/material/button'), require('@angular/material/icon')) : typeof define === 'function' && define.amd ? define('@angular/material/stepper', ['exports', '@angular/core', '@angular/cdk/stepper', 'rxjs', '@angular/cdk/a11y', '@angular/animations', '@angular/cdk/bidi', '@angular/common', '@angular/material/core', 'rxjs/operators', '@angular/cdk/portal', '@angular/material/button', '@angular/material/icon'], factory) : (factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.stepper = {}),global.ng.core,global.ng.cdk.stepper,global.rxjs,global.ng.cdk.a11y,global.ng.animations,global.ng.cdk.bidi,global.ng.common,global.ng.material.core,global.rxjs.operators,global.ng.cdk.portal,global.ng.material.button,global.ng.material.icon)); }(this, (function (exports,core,stepper,rxjs,a11y,animations,bidi,common,core$1,operators,portal,button,icon) { 'use strict'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var MatStepLabel = /** @class */ (function (_super) { __extends(MatStepLabel, _super); function MatStepLabel() { return _super !== null && _super.apply(this, arguments) || this; } MatStepLabel.decorators = [ { type: core.Directive, args: [{ selector: '[matStepLabel]', },] }, ]; return MatStepLabel; }(stepper.CdkStepLabel)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Stepper data that is required for internationalization. */ var MatStepperIntl = /** @class */ (function () { function MatStepperIntl() { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ this.changes = new rxjs.Subject(); /** * Label that is rendered below optional steps. */ this.optionalLabel = 'Optional'; } MatStepperIntl.decorators = [ { type: core.Injectable, args: [{ providedIn: 'root' },] }, ]; /** @nocollapse */ MatStepperIntl.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MatStepperIntl_Factory() { return new MatStepperIntl(); }, token: MatStepperIntl, providedIn: "root" }); return MatStepperIntl; }()); /** * \@docs-private * @param {?} parentIntl * @return {?} */ function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl) { return parentIntl || new MatStepperIntl(); } /** * \@docs-private * @type {?} */ var MAT_STEPPER_INTL_PROVIDER = { provide: MatStepperIntl, deps: [[new core.Optional(), new core.SkipSelf(), MatStepperIntl]], useFactory: MAT_STEPPER_INTL_PROVIDER_FACTORY }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var MatStepHeader = /** @class */ (function (_super) { __extends(MatStepHeader, _super); function MatStepHeader(_intl, _focusMonitor, _elementRef, changeDetectorRef) { var _this = _super.call(this, _elementRef) || this; _this._intl = _intl; _this._focusMonitor = _focusMonitor; _focusMonitor.monitor(_elementRef, true); _this._intlSubscription = _intl.changes.subscribe((/** * @return {?} */ function () { return changeDetectorRef.markForCheck(); })); return _this; } /** * @return {?} */ MatStepHeader.prototype.ngOnDestroy = /** * @return {?} */ function () { this._intlSubscription.unsubscribe(); this._focusMonitor.stopMonitoring(this._elementRef); }; /** Focuses the step header. */ /** * Focuses the step header. * @return {?} */ MatStepHeader.prototype.focus = /** * Focuses the step header. * @return {?} */ function () { this._focusMonitor.focusVia(this._elementRef, 'program'); }; /** Returns string label of given step if it is a text label. */ /** * Returns string label of given step if it is a text label. * @return {?} */ MatStepHeader.prototype._stringLabel = /** * Returns string label of given step if it is a text label. * @return {?} */ function () { return this.label instanceof MatStepLabel ? null : this.label; }; /** Returns MatStepLabel if the label of given step is a template label. */ /** * Returns MatStepLabel if the label of given step is a template label. * @return {?} */ MatStepHeader.prototype._templateLabel = /** * Returns MatStepLabel if the label of given step is a template label. * @return {?} */ function () { return this.label instanceof MatStepLabel ? this.label : null; }; /** Returns the host HTML element. */ /** * Returns the host HTML element. * @return {?} */ MatStepHeader.prototype._getHostElement = /** * Returns the host HTML element. * @return {?} */ function () { return this._elementRef.nativeElement; }; /** Template context variables that are exposed to the `matStepperIcon` instances. */ /** * Template context variables that are exposed to the `matStepperIcon` instances. * @return {?} */ MatStepHeader.prototype._getIconContext = /** * Template context variables that are exposed to the `matStepperIcon` instances. * @return {?} */ function () { return { index: this.index, active: this.active, optional: this.optional }; }; /** * @param {?} state * @return {?} */ MatStepHeader.prototype._getDefaultTextForState = /** * @param {?} state * @return {?} */ function (state$$1) { if (state$$1 == 'number') { return "" + (this.index + 1); } if (state$$1 == 'edit') { return 'create'; } if (state$$1 == 'error') { return 'warning'; } return state$$1; }; MatStepHeader.decorators = [ { type: core.Component, args: [{selector: 'mat-step-header', template: "<div class=\"mat-step-header-ripple\" matRipple [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disableRipple\"></div><div class=\"mat-step-icon-state-{{state}} mat-step-icon\" [class.mat-step-icon-selected]=\"selected\"><div class=\"mat-step-icon-content\" [ngSwitch]=\"!!(iconOverrides && iconOverrides[state])\"><ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides[state]\" [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container><ng-container *ngSwitchDefault [ngSwitch]=\"state\"><span *ngSwitchCase=\"'number'\">{{_getDefaultTextForState(state)}}</span><mat-icon *ngSwitchDefault>{{_getDefaultTextForState(state)}}</mat-icon></ng-container></div></div><div class=\"mat-step-label\" [class.mat-step-label-active]=\"active\" [class.mat-step-label-selected]=\"selected\" [class.mat-step-label-error]=\"state == 'error'\"><ng-container *ngIf=\"_templateLabel()\" [ngTemplateOutlet]=\"_templateLabel()!.template\"></ng-container><div class=\"mat-step-text-label\" *ngIf=\"_stringLabel()\">{{label}}</div><div class=\"mat-step-optional\" *ngIf=\"optional && state != 'error'\">{{_intl.optionalLabel}}</div><div class=\"mat-step-sub-label-error\" *ngIf=\"state == 'error'\">{{errorMessage}}</div></div>", styles: [".mat-step-header{overflow:hidden;outline:0;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:transparent}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon .mat-icon,.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"], host: { 'class': 'mat-step-header', 'role': 'tab', }, encapsulation: core.ViewEncapsulation.None, changeDetection: core.ChangeDetectionStrategy.OnPush, },] }, ]; /** @nocollapse */ MatStepHeader.ctorParameters = function () { return [ { type: MatStepperIntl }, { type: a11y.FocusMonitor }, { type: core.ElementRef }, { type: core.ChangeDetectorRef } ]; }; MatStepHeader.propDecorators = { state: [{ type: core.Input }], label: [{ type: core.Input }], errorMessage: [{ type: core.Input }], iconOverrides: [{ type: core.Input }], index: [{ type: core.Input }], selected: [{ type: core.Input }], active: [{ type: core.Input }], optional: [{ type: core.Input }], disableRipple: [{ type: core.Input }] }; return MatStepHeader; }(stepper.CdkStepHeader)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Animations used by the Material steppers. * \@docs-private * @type {?} */ var matStepperAnimations = { /** * Animation that transitions the step along the X axis in a horizontal stepper. */ horizontalStepTransition: animations.trigger('stepTransition', [ animations.state('previous', animations.style({ transform: 'translate3d(-100%, 0, 0)', visibility: 'hidden' })), animations.state('current', animations.style({ transform: 'none', visibility: 'visible' })), animations.state('next', animations.style({ transform: 'translate3d(100%, 0, 0)', visibility: 'hidden' })), animations.transition('* => *', animations.animate('500ms cubic-bezier(0.35, 0, 0.25, 1)')) ]), /** * Animation that transitions the step along the Y axis in a vertical stepper. */ verticalStepTransition: animations.trigger('stepTransition', [ animations.state('previous', animations.style({ height: '0px', visibility: 'hidden' })), animations.state('next', animations.style({ height: '0px', visibility: 'hidden' })), animations.state('current', animations.style({ height: '*', visibility: 'visible' })), animations.transition('* <=> current', animations.animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')) ]) }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Template to be used to override the icons inside the step header. */ var MatStepperIcon = /** @class */ (function () { function MatStepperIcon(templateRef) { this.templateRef = templateRef; } MatStepperIcon.decorators = [ { type: core.Directive, args: [{ selector: 'ng-template[matStepperIcon]', },] }, ]; /** @nocollapse */ MatStepperIcon.ctorParameters = function () { return [ { type: core.TemplateRef } ]; }; MatStepperIcon.propDecorators = { name: [{ type: core.Input, args: ['matStepperIcon',] }] }; return MatStepperIcon; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var MatStep = /** @class */ (function (_super) { __extends(MatStep, _super); /** @breaking-change 8.0.0 remove the `?` after `stepperOptions` */ function MatStep(stepper$$1, _errorStateMatcher, stepperOptions) { var _this = _super.call(this, stepper$$1, stepperOptions) || this; _this._errorStateMatcher = _errorStateMatcher; return _this; } /** Custom error state matcher that additionally checks for validity of interacted form. */ /** * Custom error state matcher that additionally checks for validity of interacted form. * @param {?} control * @param {?} form * @return {?} */ MatStep.prototype.isErrorState = /** * Custom error state matcher that additionally checks for validity of interacted form. * @param {?} control * @param {?} form * @return {?} */ function (control, form) { /** @type {?} */ var originalErrorState = this._errorStateMatcher.isErrorState(control, form); // Custom error state checks for the validity of form that is not submitted or touched // since user can trigger a form change by calling for another step without directly // interacting with the current form. /** @type {?} */ var customErrorState = !!(control && control.invalid && this.interacted); return originalErrorState || customErrorState; }; MatStep.decorators = [ { type: core.Component, args: [{selector: 'mat-step', template: "<ng-template><ng-content></ng-content></ng-template>", providers: [{ provide: core$1.ErrorStateMatcher, useExisting: MatStep }], encapsulation: core.ViewEncapsulation.None, exportAs: 'matStep', changeDetection: core.ChangeDetectionStrategy.OnPush, },] }, ]; /** @nocollapse */ MatStep.ctorParameters = function () { return [ { type: MatStepper, decorators: [{ type: core.Inject, args: [core.forwardRef((/** * @return {?} */ function () { return MatStepper; })),] }] }, { type: core$1.ErrorStateMatcher, decorators: [{ type: core.SkipSelf }] }, { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [stepper.STEPPER_GLOBAL_OPTIONS,] }] } ]; }; MatStep.propDecorators = { stepLabel: [{ type: core.ContentChild, args: [MatStepLabel, { static: false },] }] }; return MatStep; }(stepper.CdkStep)); var MatStepper = /** @class */ (function (_super) { __extends(MatStepper, _super); function MatStepper() { var _this = _super !== null && _super.apply(this, arguments) || this; /** * Event emitted when the current step is done transitioning in. */ _this.animationDone = new core.EventEmitter(); /** * Consumer-specified template-refs to be used to override the header icons. */ _this._iconOverrides = {}; /** * Stream of animation `done` events when the body expands/collapses. */ _this._animationDone = new rxjs.Subject(); return _this; } /** * @return {?} */ MatStepper.prototype.ngAfterContentInit = /** * @return {?} */ function () { var _this = this; this._icons.forEach((/** * @param {?} __0 * @return {?} */ function (_a) { var name = _a.name, templateRef = _a.templateRef; return _this._iconOverrides[name] = templateRef; })); // Mark the component for change detection whenever the content children query changes this._steps.changes.pipe(operators.takeUntil(this._destroyed)).subscribe((/** * @return {?} */ function () { return _this._stateChanged(); })); this._animationDone.pipe( // This needs a `distinctUntilChanged` in order to avoid emitting the same event twice due // to a bug in animations where the `.done` callback gets invoked twice on some browsers. // See https://github.com/angular/angular/issues/24084 operators.distinctUntilChanged((/** * @param {?} x * @param {?} y * @return {?} */ function (x, y) { return x.fromState === y.fromState && x.toState === y.toState; })), operators.takeUntil(this._destroyed)).subscribe((/** * @param {?} event * @return {?} */ function (event) { if (((/** @type {?} */ (event.toState))) === 'current') { _this.animationDone.emit(); } })); }; MatStepper.decorators = [ { type: core.Directive, args: [{ selector: '[matStepper]', providers: [{ provide: stepper.CdkStepper, useExisting: MatStepper }] },] }, ]; MatStepper.propDecorators = { _stepHeader: [{ type: core.ViewChildren, args: [MatStepHeader,] }], _steps: [{ type: core.ContentChildren, args: [MatStep,] }], _icons: [{ type: core.ContentChildren, args: [MatStepperIcon,] }], animationDone: [{ type: core.Output }], disableRipple: [{ type: core.Input }] }; return MatStepper; }(stepper.CdkStepper)); var MatHorizontalStepper = /** @class */ (function (_super) { __extends(MatHorizontalStepper, _super); function MatHorizontalStepper() { var _this = _super !== null && _super.apply(this, arguments) || this; /** * Whether the label should display in bottom or end position. */ _this.labelPosition = 'end'; return _this; } MatHorizontalStepper.decorators = [ { type: core.Component, args: [{selector: 'mat-horizontal-stepper', exportAs: 'matHorizontalStepper', template: "<div class=\"mat-horizontal-stepper-header-container\"><ng-container *ngFor=\"let step of steps; let i = index; let isLast = last\"><mat-step-header class=\"mat-horizontal-stepper-header\" (click)=\"step.select()\" (keydown)=\"_onKeydown($event)\" [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\" [id]=\"_getStepLabelId(i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"steps.length\" [attr.aria-controls]=\"_getStepContentId(i)\" [attr.aria-selected]=\"selectedIndex == i\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\" [index]=\"i\" [state]=\"_getIndicatorType(i, step.state)\" [label]=\"step.stepLabel || step.label\" [selected]=\"selectedIndex === i\" [active]=\"step.completed || selectedIndex === i || !linear\" [optional]=\"step.optional\" [errorMessage]=\"step.errorMessage\" [iconOverrides]=\"_iconOverrides\" [disableRipple]=\"disableRipple\"></mat-step-header><div *ngIf=\"!isLast\" class=\"mat-stepper-horizontal-line\"></div></ng-container></div><div class=\"mat-horizontal-content-container\"><div *ngFor=\"let step of steps; let i = index\" [attr.tabindex]=\"selectedIndex === i ? 0 : null\" class=\"mat-horizontal-stepper-content\" role=\"tabpanel\" [@stepTransition]=\"_getAnimationDirection(i)\" (@stepTransition.done)=\"_animationDone.next($event)\" [id]=\"_getStepContentId(i)\" [attr.aria-labelledby]=\"_getStepLabelId(i)\" [attr.aria-expanded]=\"selectedIndex === i\"><ng-container [ngTemplateOutlet]=\"step.content\"></ng-container></div></div>", styles: [".mat-stepper-horizontal,.mat-stepper-vertical{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:36px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{border-top-width:1px;border-top-style:solid;content:'';display:inline-block;height:0;position:absolute;top:36px;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto;padding:24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;padding:24px;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"], inputs: ['selectedIndex'], host: { 'class': 'mat-stepper-horizontal', '[class.mat-stepper-label-position-end]': 'labelPosition == "end"', '[class.mat-stepper-label-position-bottom]': 'labelPosition == "bottom"', 'aria-orientation': 'horizontal', 'role': 'tablist', }, animations: [matStepperAnimations.horizontalStepTransition], providers: [ { provide: MatStepper, useExisting: MatHorizontalStepper }, { provide: stepper.CdkStepper, useExisting: MatHorizontalStepper } ], encapsulation: core.ViewEncapsulation.None, changeDetection: core.ChangeDetectionStrategy.OnPush, },] }, ]; MatHorizontalStepper.propDecorators = { labelPosition: [{ type: core.Input }] }; return MatHorizontalStepper; }(MatStepper)); var MatVerticalStepper = /** @class */ (function (_super) { __extends(MatVerticalStepper, _super); function MatVerticalStepper(dir, changeDetectorRef, // @breaking-change 8.0.0 `elementRef` and `_document` parameters to become required. elementRef, _document) { var _this = _super.call(this, dir, changeDetectorRef, elementRef, _document) || this; _this._orientation = 'vertical'; return _this; } MatVerticalStepper.decorators = [ { type: core.Component, args: [{selector: 'mat-vertical-stepper', exportAs: 'matVerticalStepper', template: "<div class=\"mat-step\" *ngFor=\"let step of steps; let i = index; let isLast = last\"><mat-step-header class=\"mat-vertical-stepper-header\" (click)=\"step.select()\" (keydown)=\"_onKeydown($event)\" [tabIndex]=\"_getFocusIndex() == i ? 0 : -1\" [id]=\"_getStepLabelId(i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"steps.length\" [attr.aria-controls]=\"_getStepContentId(i)\" [attr.aria-selected]=\"selectedIndex === i\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\" [index]=\"i\" [state]=\"_getIndicatorType(i, step.state)\" [label]=\"step.stepLabel || step.label\" [selected]=\"selectedIndex === i\" [active]=\"step.completed || selectedIndex === i || !linear\" [optional]=\"step.optional\" [errorMessage]=\"step.errorMessage\" [iconOverrides]=\"_iconOverrides\" [disableRipple]=\"disableRipple\"></mat-step-header><div class=\"mat-vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\"><div class=\"mat-vertical-stepper-content\" role=\"tabpanel\" [attr.tabindex]=\"selectedIndex === i ? 0 : null\" [@stepTransition]=\"_getAnimationDirection(i)\" (@stepTransition.done)=\"_animationDone.next($event)\" [id]=\"_getStepContentId(i)\" [attr.aria-labelledby]=\"_getStepLabelId(i)\" [attr.aria-expanded]=\"selectedIndex === i\"><div class=\"mat-vertical-content\"><ng-container [ngTemplateOutlet]=\"step.content\"></ng-container></div></div></div></div>", styles: [".mat-stepper-horizontal,.mat-stepper-vertical{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:36px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{border-top-width:1px;border-top-style:solid;content:'';display:inline-block;height:0;position:absolute;top:36px;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto;padding:24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;padding:24px;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"], inputs: ['selectedIndex'], host: { 'class': 'mat-stepper-vertical', 'aria-orientation': 'vertical', 'role': 'tablist', }, animations: [matStepperAnimations.verticalStepTransition], providers: [ { provide: MatStepper, useExisting: MatVerticalStepper }, { provide: stepper.CdkStepper, useExisting: MatVerticalStepper } ], encapsulation: core.ViewEncapsulation.None, changeDetection: core.ChangeDetectionStrategy.OnPush, },] }, ]; /** @nocollapse */ MatVerticalStepper.ctorParameters = function () { return [ { type: bidi.Directionality, decorators: [{ type: core.Optional }] }, { type: core.ChangeDetectorRef }, { type: core.ElementRef }, { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] } ]; }; return MatVerticalStepper; }(MatStepper)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Button that moves to the next step in a stepper workflow. */ var MatStepperNext = /** @class */ (function (_super) { __extends(MatStepperNext, _super); function MatStepperNext() { return _super !== null && _super.apply(this, arguments) || this; } MatStepperNext.decorators = [ { type: core.Directive, args: [{ selector: 'button[matStepperNext]', host: { '[type]': 'type', }, inputs: ['type'] },] }, ]; return MatStepperNext; }(stepper.CdkStepperNext)); /** * Button that moves to the previous step in a stepper workflow. */ var MatStepperPrevious = /** @class */ (function (_super) { __extends(MatStepperPrevious, _super); function MatStepperPrevious() { return _super !== null && _super.apply(this, arguments) || this; } MatStepperPrevious.decorators = [ { type: core.Directive, args: [{ selector: 'button[matStepperPrevious]', host: { '[type]': 'type', }, inputs: ['type'] },] }, ]; return MatStepperPrevious; }(stepper.CdkStepperPrevious)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var MatStepperModule = /** @class */ (function () { function MatStepperModule() { } MatStepperModule.decorators = [ { type: core.NgModule, args: [{ imports: [ core$1.MatCommonModule, common.CommonModule, portal.PortalModule, button.MatButtonModule, stepper.CdkStepperModule, icon.MatIconModule, core$1.MatRippleModule, ], exports: [ core$1.MatCommonModule, MatHorizontalStepper, MatVerticalStepper, MatStep, MatStepLabel, MatStepper, MatStepperNext, MatStepperPrevious, MatStepHeader, MatStepperIcon, ], declarations: [ MatHorizontalStepper, MatVerticalStepper, MatStep, MatStepLabel, MatStepper, MatStepperNext, MatStepperPrevious, MatStepHeader, MatStepperIcon, ], providers: [MAT_STEPPER_INTL_PROVIDER, core$1.ErrorStateMatcher], },] }, ]; return MatStepperModule; }()); exports.MatStepperModule = MatStepperModule; exports.MatStepLabel = MatStepLabel; exports.MatStep = MatStep; exports.MatStepper = MatStepper; exports.MatHorizontalStepper = MatHorizontalStepper; exports.MatVerticalStepper = MatVerticalStepper; exports.MatStepperNext = MatStepperNext; exports.MatStepperPrevious = MatStepperPrevious; exports.MatStepHeader = MatStepHeader; exports.MAT_STEPPER_INTL_PROVIDER_FACTORY = MAT_STEPPER_INTL_PROVIDER_FACTORY; exports.MatStepperIntl = MatStepperIntl; exports.MAT_STEPPER_INTL_PROVIDER = MAT_STEPPER_INTL_PROVIDER; exports.matStepperAnimations = matStepperAnimations; exports.MatStepperIcon = MatStepperIcon; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=material-stepper.umd.js.map