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, keyframes, } from '@angular/animations';
|
---|
9 | /**
|
---|
10 | * Animations used by the Material datepicker.
|
---|
11 | * @docs-private
|
---|
12 | */
|
---|
13 | export const matDatepickerAnimations = {
|
---|
14 | /** Transforms the height of the datepicker's calendar. */
|
---|
15 | transformPanel: trigger('transformPanel', [
|
---|
16 | transition('void => enter-dropdown', animate('120ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
---|
17 | style({ opacity: 0, transform: 'scale(1, 0.8)' }),
|
---|
18 | style({ opacity: 1, transform: 'scale(1, 1)' })
|
---|
19 | ]))),
|
---|
20 | transition('void => enter-dialog', animate('150ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
---|
21 | style({ opacity: 0, transform: 'scale(0.7)' }),
|
---|
22 | style({ transform: 'none', opacity: 1 })
|
---|
23 | ]))),
|
---|
24 | transition('* => void', animate('100ms linear', style({ opacity: 0 })))
|
---|
25 | ]),
|
---|
26 | /** Fades in the content of the calendar. */
|
---|
27 | fadeInCalendar: trigger('fadeInCalendar', [
|
---|
28 | state('void', style({ opacity: 0 })),
|
---|
29 | state('enter', style({ opacity: 1 })),
|
---|
30 | // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we
|
---|
31 | // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.
|
---|
32 | transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))
|
---|
33 | ])
|
---|
34 | };
|
---|
35 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci1hbmltYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4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