@angular/material 19.2.0-next.0 → 19.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/index.d.ts +2 -4
- package/datepicker/index.d.ts +10 -8
- package/fesm2022/autocomplete.mjs +7 -33
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/chips.mjs +5 -6
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +79 -51
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +36 -29
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/form-field/_form-field-subscript.scss +18 -0
- package/form-field/_mdc-text-field-structure.scss +6 -3
- package/form-field/index.d.ts +5 -4
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
- package/schematics/ng-update/index_bundled.js +31 -31
package/fesm2022/datepicker.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { _IdGenerator, CdkMonitorFocus, CdkTrapFocus, A11yModule } from '@angula
|
|
|
2
2
|
import { Overlay, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
3
3
|
import { ComponentPortal, CdkPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, inject, ElementRef, NgZone, EventEmitter, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, ChangeDetectorRef, ViewChild, ViewContainerRef, booleanAttribute, Directive, forwardRef, signal, HostAttributeToken, ContentChild, TemplateRef, NgModule } from '@angular/core';
|
|
5
|
+
import { Injectable, inject, ElementRef, NgZone, EventEmitter, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, ChangeDetectorRef, ViewChild, ANIMATION_MODULE_TYPE, Renderer2, ViewContainerRef, booleanAttribute, Directive, forwardRef, signal, HostAttributeToken, ContentChild, TemplateRef, NgModule } from '@angular/core';
|
|
6
6
|
import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
8
8
|
import * as i1 from '@angular/material/core';
|
|
@@ -15,10 +15,10 @@ import { NgClass, DOCUMENT } from '@angular/common';
|
|
|
15
15
|
import { _CdkPrivateStyleLoader, _VisuallyHiddenLoader } from '@angular/cdk/private';
|
|
16
16
|
import { startWith, take, filter } from 'rxjs/operators';
|
|
17
17
|
import { coerceStringArray } from '@angular/cdk/coercion';
|
|
18
|
-
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
19
18
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, ControlContainer, NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
20
19
|
import { MAT_FORM_FIELD, MatFormFieldControl } from '@angular/material/form-field';
|
|
21
20
|
import { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
|
|
21
|
+
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
22
22
|
|
|
23
23
|
/** @docs-private */
|
|
24
24
|
function createMissingDateImplError(provider) {
|
|
@@ -2450,33 +2450,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ng
|
|
|
2450
2450
|
args: [MatMultiYearView]
|
|
2451
2451
|
}] } });
|
|
2452
2452
|
|
|
2453
|
-
/**
|
|
2454
|
-
* Animations used by the Material datepicker.
|
|
2455
|
-
* @docs-private
|
|
2456
|
-
*/
|
|
2457
|
-
const matDatepickerAnimations = {
|
|
2458
|
-
/** Transforms the height of the datepicker's calendar. */
|
|
2459
|
-
transformPanel: trigger('transformPanel', [
|
|
2460
|
-
transition('void => enter-dropdown', animate('120ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
|
2461
|
-
style({ opacity: 0, transform: 'scale(1, 0.8)' }),
|
|
2462
|
-
style({ opacity: 1, transform: 'scale(1, 1)' }),
|
|
2463
|
-
]))),
|
|
2464
|
-
transition('void => enter-dialog', animate('150ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
|
2465
|
-
style({ opacity: 0, transform: 'scale(0.7)' }),
|
|
2466
|
-
style({ transform: 'none', opacity: 1 }),
|
|
2467
|
-
]))),
|
|
2468
|
-
transition('* => void', animate('100ms linear', style({ opacity: 0 }))),
|
|
2469
|
-
]),
|
|
2470
|
-
/** Fades in the content of the calendar. */
|
|
2471
|
-
fadeInCalendar: trigger('fadeInCalendar', [
|
|
2472
|
-
state('void', style({ opacity: 0 })),
|
|
2473
|
-
state('enter', style({ opacity: 1 })),
|
|
2474
|
-
// TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we
|
|
2475
|
-
// need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.
|
|
2476
|
-
transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')),
|
|
2477
|
-
]),
|
|
2478
|
-
};
|
|
2479
|
-
|
|
2480
2453
|
/** Injection token that determines the scroll handling while the calendar is open. */
|
|
2481
2454
|
const MAT_DATEPICKER_SCROLL_STRATEGY = new InjectionToken('mat-datepicker-scroll-strategy', {
|
|
2482
2455
|
providedIn: 'root',
|
|
@@ -2504,12 +2477,16 @@ const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
|
2504
2477
|
*/
|
|
2505
2478
|
class MatDatepickerContent {
|
|
2506
2479
|
_elementRef = inject(ElementRef);
|
|
2480
|
+
_animationsDisabled = inject(ANIMATION_MODULE_TYPE, { optional: true }) === 'NoopAnimations';
|
|
2507
2481
|
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
2508
2482
|
_globalModel = inject(MatDateSelectionModel);
|
|
2509
2483
|
_dateAdapter = inject(DateAdapter);
|
|
2484
|
+
_ngZone = inject(NgZone);
|
|
2510
2485
|
_rangeSelectionStrategy = inject(MAT_DATE_RANGE_SELECTION_STRATEGY, { optional: true });
|
|
2511
|
-
|
|
2486
|
+
_stateChanges;
|
|
2512
2487
|
_model;
|
|
2488
|
+
_eventCleanups;
|
|
2489
|
+
_animationFallback;
|
|
2513
2490
|
/** Reference to the internal calendar component. */
|
|
2514
2491
|
_calendar;
|
|
2515
2492
|
/**
|
|
@@ -2532,8 +2509,6 @@ class MatDatepickerContent {
|
|
|
2532
2509
|
endDateAccessibleName;
|
|
2533
2510
|
/** Whether the datepicker is above or below the input. */
|
|
2534
2511
|
_isAbove;
|
|
2535
|
-
/** Current state of the animation. */
|
|
2536
|
-
_animationState;
|
|
2537
2512
|
/** Emits when an animation has finished. */
|
|
2538
2513
|
_animationDone = new Subject();
|
|
2539
2514
|
/** Whether there is an in-progress animation. */
|
|
@@ -2548,20 +2523,27 @@ class MatDatepickerContent {
|
|
|
2548
2523
|
_dialogLabelId;
|
|
2549
2524
|
constructor() {
|
|
2550
2525
|
inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);
|
|
2551
|
-
|
|
2552
|
-
this.
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2526
|
+
this._closeButtonText = inject(MatDatepickerIntl).closeCalendarLabel;
|
|
2527
|
+
if (!this._animationsDisabled) {
|
|
2528
|
+
const element = this._elementRef.nativeElement;
|
|
2529
|
+
const renderer = inject(Renderer2);
|
|
2530
|
+
this._eventCleanups = this._ngZone.runOutsideAngular(() => [
|
|
2531
|
+
renderer.listen(element, 'animationstart', this._handleAnimationEvent),
|
|
2532
|
+
renderer.listen(element, 'animationend', this._handleAnimationEvent),
|
|
2533
|
+
renderer.listen(element, 'animationcancel', this._handleAnimationEvent),
|
|
2534
|
+
]);
|
|
2535
|
+
}
|
|
2556
2536
|
}
|
|
2557
2537
|
ngAfterViewInit() {
|
|
2558
|
-
this.
|
|
2538
|
+
this._stateChanges = this.datepicker.stateChanges.subscribe(() => {
|
|
2559
2539
|
this._changeDetectorRef.markForCheck();
|
|
2560
|
-
})
|
|
2540
|
+
});
|
|
2561
2541
|
this._calendar.focusActiveCell();
|
|
2562
2542
|
}
|
|
2563
2543
|
ngOnDestroy() {
|
|
2564
|
-
this.
|
|
2544
|
+
clearTimeout(this._animationFallback);
|
|
2545
|
+
this._eventCleanups?.forEach(cleanup => cleanup());
|
|
2546
|
+
this._stateChanges?.unsubscribe();
|
|
2565
2547
|
this._animationDone.complete();
|
|
2566
2548
|
}
|
|
2567
2549
|
_handleUserSelection(event) {
|
|
@@ -2590,15 +2572,34 @@ class MatDatepickerContent {
|
|
|
2590
2572
|
this._model.updateSelection(event.value, this);
|
|
2591
2573
|
}
|
|
2592
2574
|
_startExitAnimation() {
|
|
2593
|
-
this.
|
|
2594
|
-
this.
|
|
2575
|
+
this._elementRef.nativeElement.classList.add('mat-datepicker-content-exit');
|
|
2576
|
+
if (this._animationsDisabled) {
|
|
2577
|
+
this._animationDone.next();
|
|
2578
|
+
}
|
|
2579
|
+
else {
|
|
2580
|
+
// Some internal apps disable animations in tests using `* {animation: none !important}`.
|
|
2581
|
+
// If that happens, the animation events won't fire and we'll never clean up the overlay.
|
|
2582
|
+
// Add a fallback that will fire if the animation doesn't run in a certain amount of time.
|
|
2583
|
+
clearTimeout(this._animationFallback);
|
|
2584
|
+
this._animationFallback = setTimeout(() => {
|
|
2585
|
+
if (!this._isAnimating) {
|
|
2586
|
+
this._animationDone.next();
|
|
2587
|
+
}
|
|
2588
|
+
}, 200);
|
|
2589
|
+
}
|
|
2595
2590
|
}
|
|
2596
|
-
_handleAnimationEvent(event) {
|
|
2597
|
-
|
|
2591
|
+
_handleAnimationEvent = (event) => {
|
|
2592
|
+
const element = this._elementRef.nativeElement;
|
|
2593
|
+
if (event.target !== element || !event.animationName.startsWith('_mat-datepicker-content')) {
|
|
2594
|
+
return;
|
|
2595
|
+
}
|
|
2596
|
+
clearTimeout(this._animationFallback);
|
|
2597
|
+
this._isAnimating = event.type === 'animationstart';
|
|
2598
|
+
element.classList.toggle('mat-datepicker-content-animating', this._isAnimating);
|
|
2598
2599
|
if (!this._isAnimating) {
|
|
2599
2600
|
this._animationDone.next();
|
|
2600
2601
|
}
|
|
2601
|
-
}
|
|
2602
|
+
};
|
|
2602
2603
|
_getSelected() {
|
|
2603
2604
|
return this._model.selection;
|
|
2604
2605
|
}
|
|
@@ -2626,18 +2627,16 @@ class MatDatepickerContent {
|
|
|
2626
2627
|
}
|
|
2627
2628
|
}
|
|
2628
2629
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: MatDatepickerContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2629
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: MatDatepickerContent, isStandalone: true, selector: "mat-datepicker-content", inputs: { color: "color" }, host: {
|
|
2630
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: MatDatepickerContent, isStandalone: true, selector: "mat-datepicker-content", inputs: { color: "color" }, host: { properties: { "class": "color ? \"mat-\" + color : \"\"", "class.mat-datepicker-content-touch": "datepicker.touchUi", "class.mat-datepicker-content-animations-enabled": "!_animationsDisabled" }, classAttribute: "mat-datepicker-content" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: MatCalendar, descendants: true }], exportAs: ["matDatepickerContent"], ngImport: i0, template: "<div\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"_dialogLabelId ?? undefined\"\n class=\"mat-datepicker-content-container\"\n [class.mat-datepicker-content-container-with-custom-header]=\"datepicker.calendarHeaderComponent\"\n [class.mat-datepicker-content-container-with-actions]=\"_actionsPortal\">\n <mat-calendar\n [id]=\"datepicker.id\"\n [class]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [startDateAccessibleName]=\"startDateAccessibleName\"\n [endDateAccessibleName]=\"endDateAccessibleName\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"\n (_userDragDrop)=\"_handleUserDragDrop($event)\"></mat-calendar>\n\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\n", styles: ["@keyframes _mat-datepicker-content-dropdown-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-dialog-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-exit{from{opacity:1}to{opacity:0}}.mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-sys-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-sys-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-sys-corner-large))}.mat-datepicker-content.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dropdown-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.mat-datepicker-content-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-sys-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dialog-enter 150ms cubic-bezier(0, 0, 0.2, 1)}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}.mat-datepicker-content-exit.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-exit 100ms linear}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2630
2631
|
}
|
|
2631
2632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: MatDatepickerContent, decorators: [{
|
|
2632
2633
|
type: Component,
|
|
2633
2634
|
args: [{ selector: 'mat-datepicker-content', host: {
|
|
2634
2635
|
'class': 'mat-datepicker-content',
|
|
2635
2636
|
'[class]': 'color ? "mat-" + color : ""',
|
|
2636
|
-
'[@transformPanel]': '_animationState',
|
|
2637
|
-
'(@transformPanel.start)': '_handleAnimationEvent($event)',
|
|
2638
|
-
'(@transformPanel.done)': '_handleAnimationEvent($event)',
|
|
2639
2637
|
'[class.mat-datepicker-content-touch]': 'datepicker.touchUi',
|
|
2640
|
-
|
|
2638
|
+
'[class.mat-datepicker-content-animations-enabled]': '!_animationsDisabled',
|
|
2639
|
+
}, exportAs: 'matDatepickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkTrapFocus, MatCalendar, CdkPortalOutlet, MatButton], template: "<div\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"_dialogLabelId ?? undefined\"\n class=\"mat-datepicker-content-container\"\n [class.mat-datepicker-content-container-with-custom-header]=\"datepicker.calendarHeaderComponent\"\n [class.mat-datepicker-content-container-with-actions]=\"_actionsPortal\">\n <mat-calendar\n [id]=\"datepicker.id\"\n [class]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [startDateAccessibleName]=\"startDateAccessibleName\"\n [endDateAccessibleName]=\"endDateAccessibleName\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"\n (_userDragDrop)=\"_handleUserDragDrop($event)\"></mat-calendar>\n\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\n", styles: ["@keyframes _mat-datepicker-content-dropdown-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-dialog-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-exit{from{opacity:1}to{opacity:0}}.mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-sys-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-sys-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-sys-corner-large))}.mat-datepicker-content.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dropdown-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.mat-datepicker-content-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-sys-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dialog-enter 150ms cubic-bezier(0, 0, 0.2, 1)}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}.mat-datepicker-content-exit.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-exit 100ms linear}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"] }]
|
|
2641
2640
|
}], ctorParameters: () => [], propDecorators: { _calendar: [{
|
|
2642
2641
|
type: ViewChild,
|
|
2643
2642
|
args: [MatCalendar]
|
|
@@ -2893,7 +2892,6 @@ class MatDatepickerBase {
|
|
|
2893
2892
|
};
|
|
2894
2893
|
if (this._componentRef) {
|
|
2895
2894
|
const { instance, location } = this._componentRef;
|
|
2896
|
-
instance._startExitAnimation();
|
|
2897
2895
|
instance._animationDone.pipe(take(1)).subscribe(() => {
|
|
2898
2896
|
const activeElement = this._document.activeElement;
|
|
2899
2897
|
// Since we restore focus after the exit animation, we have to check that
|
|
@@ -2907,6 +2905,7 @@ class MatDatepickerBase {
|
|
|
2907
2905
|
this._focusedElementBeforeOpen = null;
|
|
2908
2906
|
this._destroyOverlay();
|
|
2909
2907
|
});
|
|
2908
|
+
instance._startExitAnimation();
|
|
2910
2909
|
}
|
|
2911
2910
|
if (canRestoreFocus) {
|
|
2912
2911
|
// Because IE moves focus asynchronously, we can't count on it being restored before we've
|
|
@@ -4732,6 +4731,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ng
|
|
|
4732
4731
|
}]
|
|
4733
4732
|
}] });
|
|
4734
4733
|
|
|
4734
|
+
/**
|
|
4735
|
+
* Animations used by the Material datepicker.
|
|
4736
|
+
* @docs-private
|
|
4737
|
+
* @deprecated No longer used, will be removed.
|
|
4738
|
+
* @breaking-change 21.0.0
|
|
4739
|
+
*/
|
|
4740
|
+
const matDatepickerAnimations = {
|
|
4741
|
+
/** Transforms the height of the datepicker's calendar. */
|
|
4742
|
+
transformPanel: trigger('transformPanel', [
|
|
4743
|
+
transition('void => enter-dropdown', animate('120ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
|
4744
|
+
style({ opacity: 0, transform: 'scale(1, 0.8)' }),
|
|
4745
|
+
style({ opacity: 1, transform: 'scale(1, 1)' }),
|
|
4746
|
+
]))),
|
|
4747
|
+
transition('void => enter-dialog', animate('150ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
|
4748
|
+
style({ opacity: 0, transform: 'scale(0.7)' }),
|
|
4749
|
+
style({ transform: 'none', opacity: 1 }),
|
|
4750
|
+
]))),
|
|
4751
|
+
transition('* => void', animate('100ms linear', style({ opacity: 0 }))),
|
|
4752
|
+
]),
|
|
4753
|
+
/** Fades in the content of the calendar. */
|
|
4754
|
+
fadeInCalendar: trigger('fadeInCalendar', [
|
|
4755
|
+
state('void', style({ opacity: 0 })),
|
|
4756
|
+
state('enter', style({ opacity: 1 })),
|
|
4757
|
+
// TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we
|
|
4758
|
+
// need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.
|
|
4759
|
+
transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')),
|
|
4760
|
+
]),
|
|
4761
|
+
};
|
|
4762
|
+
|
|
4735
4763
|
/**
|
|
4736
4764
|
* Generated bundle index. Do not edit.
|
|
4737
4765
|
*/
|