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 { animate, state, style, transition, trigger, } from '@angular/animations';
|
---|
9 | /**
|
---|
10 | * Animations used by the Material steppers.
|
---|
11 | * @docs-private
|
---|
12 | */
|
---|
13 | export const matStepperAnimations = {
|
---|
14 | /** Animation that transitions the step along the X axis in a horizontal stepper. */
|
---|
15 | horizontalStepTransition: trigger('horizontalStepTransition', [
|
---|
16 | state('previous', style({ transform: 'translate3d(-100%, 0, 0)', visibility: 'hidden' })),
|
---|
17 | // Transition to `inherit`, rather than `visible`,
|
---|
18 | // because visibility on a child element the one from the parent,
|
---|
19 | // making this element focusable inside of a `hidden` element.
|
---|
20 | state('current', style({ transform: 'none', visibility: 'inherit' })),
|
---|
21 | state('next', style({ transform: 'translate3d(100%, 0, 0)', visibility: 'hidden' })),
|
---|
22 | transition('* => *', animate('500ms cubic-bezier(0.35, 0, 0.25, 1)'))
|
---|
23 | ]),
|
---|
24 | /** Animation that transitions the step along the Y axis in a vertical stepper. */
|
---|
25 | verticalStepTransition: trigger('verticalStepTransition', [
|
---|
26 | state('previous', style({ height: '0px', visibility: 'hidden' })),
|
---|
27 | state('next', style({ height: '0px', visibility: 'hidden' })),
|
---|
28 | // Transition to `inherit`, rather than `visible`,
|
---|
29 | // because visibility on a child element the one from the parent,
|
---|
30 | // making this element focusable inside of a `hidden` element.
|
---|
31 | state('current', style({ height: '*', visibility: 'inherit' })),
|
---|
32 | transition('* <=> current', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
|
---|
33 | ])
|
---|
34 | };
|
---|
35 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RlcHBlci1hbmltYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vL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