@ng-matero/extensions 19.2.1 → 19.3.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.
Files changed (59) hide show
  1. package/README.md +8 -0
  2. package/checkbox-group/checkbox-group.d.ts +3 -3
  3. package/colorpicker/colorpicker-animations.d.ts +3 -2
  4. package/colorpicker/colorpicker-content.scss +31 -0
  5. package/colorpicker/colorpicker.d.ts +21 -4
  6. package/core/tokens/m2/mtx/_select.scss +1 -0
  7. package/core/tokens/m3/mtx/_select.scss +4 -0
  8. package/datetimepicker/calendar.d.ts +0 -3
  9. package/datetimepicker/datetimepicker-animations.d.ts +5 -4
  10. package/datetimepicker/datetimepicker-content.scss +48 -1
  11. package/datetimepicker/datetimepicker.d.ts +22 -6
  12. package/datetimepicker/month-view.d.ts +0 -3
  13. package/datetimepicker/time-view.d.ts +4 -2
  14. package/drawer/drawer-animations.d.ts +6 -3
  15. package/drawer/drawer-container.d.ts +7 -4
  16. package/drawer/drawer-container.scss +55 -8
  17. package/fesm2022/mtxAlert.mjs +7 -7
  18. package/fesm2022/mtxButton.mjs +7 -7
  19. package/fesm2022/mtxCheckboxGroup.mjs +9 -7
  20. package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
  21. package/fesm2022/mtxColorpicker.mjs +137 -48
  22. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  23. package/fesm2022/mtxColumnResize.mjs +40 -40
  24. package/fesm2022/mtxCore.mjs +21 -21
  25. package/fesm2022/mtxDatetimepicker.mjs +313 -159
  26. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  27. package/fesm2022/mtxDialog.mjs +10 -10
  28. package/fesm2022/mtxDrawer.mjs +118 -46
  29. package/fesm2022/mtxDrawer.mjs.map +1 -1
  30. package/fesm2022/mtxGrid.mjs +87 -86
  31. package/fesm2022/mtxGrid.mjs.map +1 -1
  32. package/fesm2022/mtxLoader.mjs +7 -7
  33. package/fesm2022/mtxPhotoviewer.mjs +7 -7
  34. package/fesm2022/mtxPopover.mjs +220 -143
  35. package/fesm2022/mtxPopover.mjs.map +1 -1
  36. package/fesm2022/mtxProgress.mjs +7 -7
  37. package/fesm2022/mtxSelect.mjs +53 -53
  38. package/fesm2022/mtxSelect.mjs.map +1 -1
  39. package/fesm2022/mtxSplit.mjs +10 -10
  40. package/fesm2022/mtxTooltip.mjs +103 -54
  41. package/fesm2022/mtxTooltip.mjs.map +1 -1
  42. package/grid/column-menu.d.ts +3 -1
  43. package/grid/grid.d.ts +6 -1
  44. package/grid/grid.scss +18 -4
  45. package/grid/interfaces.d.ts +2 -0
  46. package/package.json +10 -11
  47. package/popover/popover-animations.d.ts +9 -12
  48. package/popover/popover-trigger.d.ts +11 -2
  49. package/popover/popover.d.ts +14 -9
  50. package/popover/popover.scss +40 -0
  51. package/prebuilt-themes/deeppurple-amber.css +1 -1
  52. package/prebuilt-themes/indigo-pink.css +1 -1
  53. package/prebuilt-themes/pink-bluegrey.css +1 -1
  54. package/prebuilt-themes/purple-green.css +1 -1
  55. package/select/select.scss +22 -33
  56. package/split/split.d.ts +3 -3
  57. package/tooltip/tooltip-animations.d.ts +3 -2
  58. package/tooltip/tooltip.d.ts +19 -11
  59. package/tooltip/tooltip.scss +1 -1
package/README.md CHANGED
@@ -63,6 +63,7 @@ $theme: mat.define-light-theme(...);
63
63
 
64
64
  $config: (...);
65
65
 
66
+ // <19.0
66
67
  $theme: mat.private-deep-merge-all(
67
68
  mat.define-theme($config),
68
69
  mtx.define-theme($config)
@@ -72,6 +73,13 @@ html {
72
73
  @include mat.all-component-themes($theme);
73
74
  @include mtx.all-component-themes($theme);
74
75
  }
76
+
77
+ // >=19.0
78
+ html {
79
+ color-scheme: light;
80
+
81
+ @include mat.theme($config);
82
+ }
75
83
  ```
76
84
 
77
85
  The @use-based Sass API is only available in the version `12.0.0` and above.
@@ -4,9 +4,9 @@ import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
4
4
  import { MtxCheckboxGroupOption } from './interfaces';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class MtxCheckboxBase {
7
- label?: any;
8
- value?: any;
9
- constructor(label?: any, value?: any);
7
+ label?: any | undefined;
8
+ value?: any | undefined;
9
+ constructor(label?: any | undefined, value?: any | undefined);
10
10
  }
11
11
  export declare class MtxCheckboxGroup implements AfterViewInit, OnDestroy, ControlValueAccessor {
12
12
  private _changeDetectorRef;
@@ -1,8 +1,9 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
1
  /**
3
2
  * Animations used by the colorpicker.
4
3
  * @docs-private
4
+ * @deprecated No longer used, will be removed.
5
+ * @breaking-change 21.0.0
5
6
  */
6
7
  export declare const mtxColorpickerAnimations: {
7
- readonly transformPanel: AnimationTriggerMetadata;
8
+ readonly transformPanel: any;
8
9
  };
@@ -1,4 +1,35 @@
1
+ /* stylelint-disable keyframes-name-pattern */
2
+ @keyframes _mtx-colorpicker-content-dropdown-enter {
3
+ from {
4
+ opacity: 0;
5
+ transform: scaleY(0.8);
6
+ }
7
+
8
+ to {
9
+ opacity: 1;
10
+ transform: none;
11
+ }
12
+ }
13
+
14
+ @keyframes _mtx-colorpicker-content-exit {
15
+ from {
16
+ opacity: 1;
17
+ }
18
+
19
+ to {
20
+ opacity: 0;
21
+ }
22
+ }
23
+
1
24
  .mtx-colorpicker-content {
2
25
  display: block;
3
26
  border-radius: 4px;
27
+
28
+ &.mtx-colorpicker-content-animations-enabled {
29
+ animation: _mtx-colorpicker-content-dropdown-enter 120ms cubic-bezier(0, 0, 0.2, 1);
30
+ }
31
+ }
32
+
33
+ .mtx-colorpicker-content-exit.mtx-colorpicker-content-animations-enabled {
34
+ animation: _mtx-colorpicker-content-exit 100ms linear;
4
35
  }
@@ -1,5 +1,5 @@
1
1
  import { Overlay, ScrollStrategy } from '@angular/cdk/overlay';
2
- import { EventEmitter, InjectionToken, OnChanges, OnDestroy, TemplateRef } from '@angular/core';
2
+ import { ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, TemplateRef } from '@angular/core';
3
3
  import { ThemePalette } from '@angular/material/core';
4
4
  import { Subject } from 'rxjs';
5
5
  import { ColorEvent } from 'ngx-color';
@@ -7,26 +7,43 @@ import { ColorFormat, MtxColorpickerInput } from './colorpicker-input';
7
7
  import * as i0 from "@angular/core";
8
8
  /** Injection token that determines the scroll handling while the panel is open. */
9
9
  export declare const MTX_COLORPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
10
+ /**
11
+ * @docs-private
12
+ * @deprecated No longer used, will be removed.
13
+ * @breaking-change 21.0.0
14
+ */
10
15
  export declare function MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
11
16
  /** Possible positions for the colorpicker dropdown along the X axis. */
12
17
  export type ColorpickerDropdownPositionX = 'start' | 'end';
13
18
  /** Possible positions for the colorpicker dropdown along the Y axis. */
14
19
  export type ColorpickerDropdownPositionY = 'above' | 'below';
20
+ /**
21
+ * @docs-private
22
+ * @deprecated No longer used, will be removed.
23
+ * @breaking-change 21.0.0
24
+ */
15
25
  export declare const MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
16
26
  provide: InjectionToken<() => ScrollStrategy>;
17
27
  deps: (typeof Overlay)[];
18
28
  useFactory: typeof MTX_COLORPICKER_SCROLL_STRATEGY_FACTORY;
19
29
  };
20
30
  export declare class MtxColorpickerContent implements OnDestroy {
31
+ protected _elementRef: ElementRef<HTMLElement>;
32
+ protected _animationsDisabled: boolean;
21
33
  private _changeDetectorRef;
34
+ private _ngZone;
35
+ private _eventCleanups;
36
+ private _animationFallback;
22
37
  color: ThemePalette;
23
38
  picker: MtxColorpicker;
24
- /** Current state of the animation. */
25
- _animationState: 'enter-dropdown' | 'void';
26
39
  /** Emits when an animation has finished. */
27
40
  readonly _animationDone: Subject<void>;
28
- _startExitAnimation(): void;
41
+ /** Whether there is an in-progress animation. */
42
+ _isAnimating: boolean;
43
+ constructor();
29
44
  ngOnDestroy(): void;
45
+ _startExitAnimation(): void;
46
+ private _handleAnimationEvent;
30
47
  getColorString(e: ColorEvent): string;
31
48
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpickerContent, never>;
32
49
  static ɵcmp: i0.ɵɵComponentDeclaration<MtxColorpickerContent, "mtx-colorpicker-content", ["mtxColorpickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
@@ -40,6 +40,7 @@ $prefix: (mtx, select);
40
40
 
41
41
  multiple-value-background-color: mat.get-theme-color($theme, background, unselected-chip),
42
42
  multiple-value-outline-color: $divider-color,
43
+ multiple-value-disabled-outline-color: mat.private-safe-color-change($divider-color, $alpha: 0.06),
43
44
  multiple-value-icon-hover-background-color: $divider-color,
44
45
 
45
46
  clear-icon-color: $secondary-text-color,
@@ -28,6 +28,10 @@ $prefix: (mtx, select);
28
28
 
29
29
  multiple-value-background-color: token-definition.hardcode(transparent, $exclude-hardcoded),
30
30
  multiple-value-outline-color: map.get($systems, md-sys-color, outline),
31
+ multiple-value-disabled-outline-color: mat.private-safe-color-change(
32
+ map.get($systems, md-sys-color, outline),
33
+ $alpha: 0.38
34
+ ),
31
35
  multiple-value-icon-hover-background-color: map.get($systems, md-sys-color, outline-variant),
32
36
 
33
37
  clear-icon-color: map.get($systems, md-sys-color, on-surface),
@@ -51,7 +51,6 @@ export declare class MtxCalendar<D> implements AfterViewChecked, AfterContentIni
51
51
  timeView: MtxTimeView<D>;
52
52
  _AMPM: MtxAMPM;
53
53
  _clockView: MtxClockView;
54
- _calendarState: string;
55
54
  /** A portal containing the header component. */
56
55
  _calendarHeaderPortal: Portal<any>;
57
56
  private _intlChanges;
@@ -140,10 +139,8 @@ export declare class MtxCalendar<D> implements AfterViewChecked, AfterContentIni
140
139
  _previousEnabled(): boolean;
141
140
  /** Whether the next period button is enabled. */
142
141
  _nextEnabled(): boolean;
143
- _calendarStateDone(): void;
144
142
  /** Whether the two dates represent the same view in the current view mode (month or year). */
145
143
  private _isSameView;
146
- private calendarState;
147
144
  private _2digit;
148
145
  /** Returns the component instance that corresponds to the current calendar view. */
149
146
  private _getCurrentViewComponent;
@@ -1,10 +1,11 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
1
  /**
3
2
  * Animations used by the Material datetimepicker.
4
3
  * @docs-private
4
+ * @deprecated No longer used, will be removed.
5
+ * @breaking-change 21.0.0
5
6
  */
6
7
  export declare const mtxDatetimepickerAnimations: {
7
- readonly transformPanel: AnimationTriggerMetadata;
8
- readonly fadeInCalendar: AnimationTriggerMetadata;
9
- readonly slideCalendar: AnimationTriggerMetadata;
8
+ readonly transformPanel: any;
9
+ readonly fadeInCalendar: any;
10
+ readonly slideCalendar: any;
10
11
  };
@@ -1,3 +1,4 @@
1
+ /* stylelint-disable keyframes-name-pattern */
1
2
  @use '@angular/material' as mat;
2
3
  @use '../core/tokens/token-utils';
3
4
  @use '../core/tokens/m2/mtx/datetimepicker' as tokens-mtx-datetimepicker;
@@ -32,6 +33,40 @@ $touch-min-height: 300px;
32
33
  $touch-max-width: 750px;
33
34
  $touch-max-height: 850px;
34
35
 
36
+ @keyframes _mtx-datetimepicker-content-dropdown-enter {
37
+ from {
38
+ opacity: 0;
39
+ transform: scaleY(0.8);
40
+ }
41
+
42
+ to {
43
+ opacity: 1;
44
+ transform: none;
45
+ }
46
+ }
47
+
48
+ @keyframes _mtx-datetimepicker-content-dialog-enter {
49
+ from {
50
+ opacity: 0;
51
+ transform: scale(0.8);
52
+ }
53
+
54
+ to {
55
+ opacity: 1;
56
+ transform: none;
57
+ }
58
+ }
59
+
60
+ @keyframes _mtx-datetimepicker-content-exit {
61
+ from {
62
+ opacity: 1;
63
+ }
64
+
65
+ to {
66
+ opacity: 0;
67
+ }
68
+ }
69
+
35
70
  @mixin landscape-calendar-size {
36
71
  .mtx-calendar {
37
72
  width: $non-touch-calendar-landscape-width;
@@ -58,6 +93,10 @@ $touch-max-height: 850px;
58
93
  @include token-utils.create-token-slot(color, container-text-color);
59
94
  }
60
95
 
96
+ &.mtx-datetimepicker-content-animations-enabled {
97
+ animation: _mtx-datetimepicker-content-dropdown-enter 120ms cubic-bezier(0, 0, 0.2, 1);
98
+ }
99
+
61
100
  .mtx-calendar {
62
101
  width: $non-touch-calendar-portrait-width;
63
102
  height: $non-touch-calendar-portrait-height;
@@ -81,7 +120,7 @@ $touch-max-height: 850px;
81
120
 
82
121
  // Hide the button while the overlay is animating, because it's rendered
83
122
  // outside of it and it seems to cause scrollbars in some cases (see #21493).
84
- .ng-animating & {
123
+ .mtx-datetimepicker-content-animating & {
85
124
  display: none;
86
125
  }
87
126
  }
@@ -121,6 +160,10 @@ $touch-max-height: 850px;
121
160
  // Prevents the content from jumping around on Windows while the animation is running.
122
161
  overflow: visible;
123
162
 
163
+ &.mtx-datetimepicker-content-animations-enabled {
164
+ animation: _mtx-datetimepicker-content-dialog-enter 150ms cubic-bezier(0, 0, 0.2, 1);
165
+ }
166
+
124
167
  .mtx-datetimepicker-content-container {
125
168
  min-height: $touch-min-height;
126
169
  max-height: $touch-max-height;
@@ -140,6 +183,10 @@ $touch-max-height: 850px;
140
183
  }
141
184
  }
142
185
 
186
+ .mtx-datetimepicker-content-exit.mtx-datetimepicker-content-animations-enabled {
187
+ animation: _mtx-datetimepicker-content-exit 100ms linear;
188
+ }
189
+
143
190
  @media all and (orientation: landscape) {
144
191
  .mtx-datetimepicker-content-touch {
145
192
  .mtx-datetimepicker-content-container[mode='auto'],
@@ -1,6 +1,6 @@
1
1
  import { Overlay, ScrollStrategy } from '@angular/cdk/overlay';
2
2
  import { ComponentType, TemplatePortal } from '@angular/cdk/portal';
3
- import { AfterViewInit, EventEmitter, InjectionToken, OnDestroy, OnInit } from '@angular/core';
3
+ import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnDestroy } from '@angular/core';
4
4
  import { ThemePalette } from '@angular/material/core';
5
5
  import { Subject } from 'rxjs';
6
6
  import { MtxCalendar } from './calendar';
@@ -16,7 +16,17 @@ export type DatetimepickerDropdownPositionX = 'start' | 'end';
16
16
  export type DatetimepickerDropdownPositionY = 'above' | 'below';
17
17
  /** Injection token that determines the scroll handling while the calendar is open. */
18
18
  export declare const MTX_DATETIMEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
19
+ /**
20
+ * @docs-private
21
+ * @deprecated No longer used, will be removed.
22
+ * @breaking-change 21.0.0
23
+ */
19
24
  export declare function MTX_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
25
+ /**
26
+ * @docs-private
27
+ * @deprecated No longer used, will be removed.
28
+ * @breaking-change 21.0.0
29
+ */
20
30
  export declare const MTX_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
21
31
  provide: InjectionToken<() => ScrollStrategy>;
22
32
  deps: (typeof Overlay)[];
@@ -46,17 +56,23 @@ export declare const MTX_DATETIMEPICKER_DEFAULT_OPTIONS: InjectionToken<MtxDatet
46
56
  * future. (e.g. confirmation buttons).
47
57
  * @docs-private
48
58
  */
49
- export declare class MtxDatetimepickerContent<D> implements OnInit, AfterViewInit, OnDestroy {
59
+ export declare class MtxDatetimepickerContent<D> implements AfterViewInit, OnDestroy {
60
+ protected _elementRef: ElementRef<HTMLElement>;
61
+ protected _animationsDisabled: boolean;
50
62
  private _changeDetectorRef;
63
+ private _ngZone;
64
+ private _stateChanges;
65
+ private _eventCleanups;
66
+ private _animationFallback;
51
67
  _calendar: MtxCalendar<D>;
52
68
  color: ThemePalette;
53
69
  datetimepicker: MtxDatetimepicker<D>;
54
70
  /** Whether the datetimepicker is above or below the input. */
55
71
  _isAbove: boolean;
56
- /** Current state of the animation. */
57
- _animationState: 'enter-dropdown' | 'enter-dialog' | 'void';
58
72
  /** Emits when an animation has finished. */
59
73
  readonly _animationDone: Subject<void>;
74
+ /** Whether there is an in-progress animation. */
75
+ _isAnimating: boolean;
60
76
  /** Id of the label for the `role="dialog"` element. */
61
77
  _dialogLabelId: string | null;
62
78
  /** Portal with projected action buttons. */
@@ -69,13 +85,13 @@ export declare class MtxDatetimepickerContent<D> implements OnInit, AfterViewIni
69
85
  _closeButtonText: string;
70
86
  /** Whether the close button currently has focus. */
71
87
  _closeButtonFocused: boolean;
88
+ _viewChanged(view: MtxCalendarView): void;
72
89
  /** Inserted by Angular inject() migration for backwards compatibility */
73
90
  constructor(...args: unknown[]);
74
- _viewChanged(view: MtxCalendarView): void;
75
- ngOnInit(): void;
76
91
  ngAfterViewInit(): void;
77
92
  ngOnDestroy(): void;
78
93
  _startExitAnimation(): void;
94
+ private _handleAnimationEvent;
79
95
  _handleUserSelection(): void;
80
96
  /**
81
97
  * Assigns a new portal containing the datetimepicker actions.
@@ -42,7 +42,6 @@ export declare class MtxMonthView<D> implements AfterContentInit {
42
42
  narrow: string;
43
43
  id: number;
44
44
  }[];
45
- _calendarState: string;
46
45
  /** Inserted by Angular inject() migration for backwards compatibility */
47
46
  constructor(...args: unknown[]);
48
47
  private _activeDate;
@@ -58,7 +57,6 @@ export declare class MtxMonthView<D> implements AfterContentInit {
58
57
  ngAfterContentInit(): void;
59
58
  /** Handles when a new date is selected. */
60
59
  _dateSelected(date: number): void;
61
- _calendarStateDone(): void;
62
60
  /** Initializes this month view. */
63
61
  private _init;
64
62
  /** Initializes the weekdays. */
@@ -70,7 +68,6 @@ export declare class MtxMonthView<D> implements AfterContentInit {
70
68
  * Returns null if the given Date is in another month.
71
69
  */
72
70
  private _getDateInCurrentMonth;
73
- private calendarState;
74
71
  /** Handles keydown events on the calendar body when calendar is in month view. */
75
72
  _handleCalendarBodyKeydown(event: KeyboardEvent): void;
76
73
  /** Focuses the active cell after the microtask queue is empty. */
@@ -83,9 +83,11 @@ export declare class MtxTimeView<D> implements OnChanges, OnDestroy {
83
83
  /** Whether the time input should be auto-focused after view init. */
84
84
  autoFocus: boolean;
85
85
  protected hourInputElement: ElementRef<HTMLInputElement> | undefined;
86
- protected hourInputDirective: MtxTimeInput | undefined;
86
+ protected _hourInputDirective: MtxTimeInput | undefined;
87
+ set hourInputDirective(input: MtxTimeInput);
87
88
  protected minuteInputElement: ElementRef<HTMLInputElement> | undefined;
88
- protected minuteInputDirective: MtxTimeInput | undefined;
89
+ protected _minuteInputDirective: MtxTimeInput | undefined;
90
+ set minuteInputDirective(input: MtxTimeInput);
89
91
  datetimepickerIntlChangesSubscription: SubscriptionLike;
90
92
  /** Whether the clock uses 12 hour format. */
91
93
  twelvehour: boolean;
@@ -1,5 +1,8 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
- /** Animations used by the drawer. */
1
+ /**
2
+ * Animations used by the drawer.
3
+ * @deprecated No longer used. Will be removed.
4
+ * @breaking-change 21.0.0
5
+ */
3
6
  export declare const mtxDrawerAnimations: {
4
- readonly drawerState: AnimationTriggerMetadata;
7
+ readonly drawerState: any;
5
8
  };
@@ -1,4 +1,3 @@
1
- import { AnimationEvent } from '@angular/animations';
2
1
  import { CdkDialogContainer } from '@angular/cdk/dialog';
3
2
  import { CdkPortalOutlet } from '@angular/cdk/portal';
4
3
  import { EventEmitter, OnDestroy } from '@angular/core';
@@ -11,10 +10,14 @@ import * as i0 from "@angular/core";
11
10
  export declare class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConfig> implements OnDestroy {
12
11
  /** The portal outlet inside of this container into which the content will be loaded. */
13
12
  _portalOutlet: CdkPortalOutlet;
13
+ protected _animationsDisabled: boolean;
14
14
  /** The state of the drawer animations. */
15
15
  _animationState: 'void' | 'visible' | 'hidden';
16
16
  /** Emits whenever the state of the animation changes. */
17
- _animationStateChanged: EventEmitter<AnimationEvent>;
17
+ _animationStateChanged: EventEmitter<{
18
+ toState: "visible" | "hidden";
19
+ phase: "start" | "done";
20
+ }>;
18
21
  /** Whether the component has been destroyed. */
19
22
  private _destroyed;
20
23
  get _drawerPosition(): string;
@@ -24,8 +27,8 @@ export declare class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConf
24
27
  /** Begin animation of the bottom sheet exiting from view. */
25
28
  exit(): void;
26
29
  ngOnDestroy(): void;
27
- _onAnimationDone(event: AnimationEvent): void;
28
- _onAnimationStart(event: AnimationEvent): void;
30
+ private _simulateAnimation;
31
+ protected _handleAnimationEvent(isStart: boolean, animationName: string): void;
29
32
  protected _captureInitialFocus(): void;
30
33
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerContainer, never>;
31
34
  static ɵcmp: i0.ɵɵComponentDeclaration<MtxDrawerContainer, "mtx-drawer-container", never, {}, {}, never, never, true, never>;
@@ -1,3 +1,4 @@
1
+ /* stylelint-disable keyframes-name-pattern */
1
2
  @use '@angular/cdk' as cdk;
2
3
  @use '@angular/material' as mat;
3
4
  @use '../core/tokens/token-utils';
@@ -5,6 +6,30 @@
5
6
 
6
7
  $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
7
8
 
9
+ @keyframes _mtx-drawer-enter {
10
+ from {
11
+ box-shadow: none;
12
+ visibility: hidden;
13
+ }
14
+
15
+ to {
16
+ transform: none;
17
+ visibility: visible;
18
+ }
19
+ }
20
+
21
+ @keyframes _mtx-drawer-exit {
22
+ from {
23
+ transform: none;
24
+ visibility: visible;
25
+ }
26
+
27
+ to {
28
+ box-shadow: none;
29
+ visibility: hidden;
30
+ }
31
+ }
32
+
8
33
  .mtx-drawer-container {
9
34
  display: block;
10
35
  width: 100%;
@@ -13,6 +38,10 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
13
38
  outline: 0;
14
39
  box-sizing: border-box;
15
40
 
41
+ // We don't use this, but it's useful for consumers to position
42
+ // elements (e.g. close buttons) inside the bottom sheet.
43
+ position: relative;
44
+
16
45
  @include token-utils.use-tokens($_tokens...) {
17
46
  @include token-utils.create-token-slot(background-color, container-background-color);
18
47
  @include token-utils.create-token-slot(color, container-text-color);
@@ -24,9 +53,33 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
24
53
  }
25
54
  }
26
55
 
27
- .mtx-drawer-right {
28
- transform: translateX(100%);
56
+ .mtx-drawer-container-animations-enabled {
57
+ &.mtx-drawer-container-enter {
58
+ animation: _mtx-drawer-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards;
59
+ }
60
+
61
+ &.mtx-drawer-container-exit {
62
+ animation: _mtx-drawer-exit 400ms cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
63
+ }
64
+
65
+ &.mtx-drawer-right {
66
+ transform: translateX(100%);
67
+ }
68
+
69
+ &.mtx-drawer-left {
70
+ transform: translateX(-100%);
71
+ }
72
+
73
+ &.mtx-drawer-bottom {
74
+ transform: translateY(100%);
75
+ }
29
76
 
77
+ &.mtx-drawer-top {
78
+ transform: translateY(-100%);
79
+ }
80
+ }
81
+
82
+ .mtx-drawer-right {
30
83
  @include token-utils.use-tokens($_tokens...) {
31
84
  @include token-utils.create-token-slot(border-top-left-radius, container-shape);
32
85
  @include token-utils.create-token-slot(border-bottom-left-radius, container-shape);
@@ -34,8 +87,6 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
34
87
  }
35
88
 
36
89
  .mtx-drawer-left {
37
- transform: translateX(-100%);
38
-
39
90
  @include token-utils.use-tokens($_tokens...) {
40
91
  @include token-utils.create-token-slot(border-top-right-radius, container-shape);
41
92
  @include token-utils.create-token-slot(border-bottom-right-radius, container-shape);
@@ -43,8 +94,6 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
43
94
  }
44
95
 
45
96
  .mtx-drawer-bottom {
46
- transform: translateY(100%);
47
-
48
97
  @include token-utils.use-tokens($_tokens...) {
49
98
  @include token-utils.create-token-slot(border-top-left-radius, container-shape);
50
99
  @include token-utils.create-token-slot(border-top-right-radius, container-shape);
@@ -52,8 +101,6 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
52
101
  }
53
102
 
54
103
  .mtx-drawer-top {
55
- transform: translateY(-100%);
56
-
57
104
  @include token-utils.use-tokens($_tokens...) {
58
105
  @include token-utils.create-token-slot(border-bottom-left-radius, container-shape);
59
106
  @include token-utils.create-token-slot(border-bottom-right-radius, container-shape);
@@ -22,10 +22,10 @@ class MtxAlert {
22
22
  this._changeDetectorRef.markForCheck();
23
23
  this.closed.emit(this);
24
24
  }
25
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
26
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: MtxAlert, isStandalone: true, selector: "mtx-alert", inputs: { type: "type", dismissible: ["dismissible", "dismissible", booleanAttribute], elevation: "elevation" }, outputs: { closed: "closed" }, host: { attributes: { "role": "alert" }, properties: { "class.mtx-alert-dismissible": "dismissible", "class": "this._hostClassList" }, classAttribute: "mtx-alert" }, exportAs: ["mtxAlert"], ngImport: i0, template: "<ng-content></ng-content>\n@if (dismissible) {\n <div class=\"mtx-alert-close\">\n <button mat-icon-button type=\"button\" aria-label=\"Close\" (click)=\"_onClosed()\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path\n d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\"\n />\n </svg>\n </button>\n </div>\n}\n", styles: [".mtx-alert{position:relative;display:block;padding:.75rem 1rem;margin-bottom:1rem;line-height:1.5;border:1px solid var(--mtx-alert-outline-color, var(--mat-sys-outline-variant));border-radius:var(--mtx-alert-container-shape, var(--mat-sys-corner-small));background-color:var(--mtx-alert-background-color, var(--mat-sys-surface-container));color:var(--mtx-alert-text-color, var(--mat-sys-on-surface))}.mtx-alert.mtx-alert-info{border-color:var(--mtx-alert-info-outline-color, light-dark(#abc7ff, #005cbb));background-color:var(--mtx-alert-info-background-color, light-dark(#d7e3ff, #002f65));color:var(--mtx-alert-info-text-color, light-dark(#002f65, #d7e3ff))}.mtx-alert.mtx-alert-success{border-color:var(--mtx-alert-success-outline-color, light-dark(#02e600, #026e00));background-color:var(--mtx-alert-success-background-color, light-dark(#cbffb8, #013a00));color:var(--mtx-alert-success-text-color, light-dark(#013a00, #cbffb8))}.mtx-alert.mtx-alert-warning{border-color:var(--mtx-alert-warning-outline-color, light-dark(#cdcd00, #626200));background-color:var(--mtx-alert-warning-background-color, light-dark(#fffeac, #323200));color:var(--mtx-alert-warning-text-color, light-dark(#323200, #fffeac))}.mtx-alert.mtx-alert-danger{border-color:var(--mtx-alert-danger-outline-color, light-dark(#ffb4a8, #c00100));background-color:var(--mtx-alert-danger-background-color, light-dark(#ffdad4, #690100));color:var(--mtx-alert-danger-text-color, light-dark(#690100, #ffdad4))}.mtx-alert-close{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem}[dir=rtl] .mtx-alert-close{right:auto;left:0}.mtx-alert-dismissible{padding-right:3rem}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
25
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
26
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: MtxAlert, isStandalone: true, selector: "mtx-alert", inputs: { type: "type", dismissible: ["dismissible", "dismissible", booleanAttribute], elevation: "elevation" }, outputs: { closed: "closed" }, host: { attributes: { "role": "alert" }, properties: { "class.mtx-alert-dismissible": "dismissible", "class": "this._hostClassList" }, classAttribute: "mtx-alert" }, exportAs: ["mtxAlert"], ngImport: i0, template: "<ng-content></ng-content>\n@if (dismissible) {\n <div class=\"mtx-alert-close\">\n <button mat-icon-button type=\"button\" aria-label=\"Close\" (click)=\"_onClosed()\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path\n d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\"\n />\n </svg>\n </button>\n </div>\n}\n", styles: [".mtx-alert{position:relative;display:block;padding:.75rem 1rem;margin-bottom:1rem;line-height:1.5;border:1px solid var(--mtx-alert-outline-color, var(--mat-sys-outline-variant));border-radius:var(--mtx-alert-container-shape, var(--mat-sys-corner-small));background-color:var(--mtx-alert-background-color, var(--mat-sys-surface-container));color:var(--mtx-alert-text-color, var(--mat-sys-on-surface))}.mtx-alert.mtx-alert-info{border-color:var(--mtx-alert-info-outline-color, light-dark(#abc7ff, #005cbb));background-color:var(--mtx-alert-info-background-color, light-dark(#d7e3ff, #002f65));color:var(--mtx-alert-info-text-color, light-dark(#002f65, #d7e3ff))}.mtx-alert.mtx-alert-success{border-color:var(--mtx-alert-success-outline-color, light-dark(#02e600, #026e00));background-color:var(--mtx-alert-success-background-color, light-dark(#cbffb8, #013a00));color:var(--mtx-alert-success-text-color, light-dark(#013a00, #cbffb8))}.mtx-alert.mtx-alert-warning{border-color:var(--mtx-alert-warning-outline-color, light-dark(#cdcd00, #626200));background-color:var(--mtx-alert-warning-background-color, light-dark(#fffeac, #323200));color:var(--mtx-alert-warning-text-color, light-dark(#323200, #fffeac))}.mtx-alert.mtx-alert-danger{border-color:var(--mtx-alert-danger-outline-color, light-dark(#ffb4a8, #c00100));background-color:var(--mtx-alert-danger-background-color, light-dark(#ffdad4, #690100));color:var(--mtx-alert-danger-text-color, light-dark(#690100, #ffdad4))}.mtx-alert-close{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem}[dir=rtl] .mtx-alert-close{right:auto;left:0}.mtx-alert-dismissible{padding-right:3rem}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxAlert, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxAlert, decorators: [{
29
29
  type: Component,
30
30
  args: [{ selector: 'mtx-alert', exportAs: 'mtxAlert', host: {
31
31
  'class': 'mtx-alert',
@@ -47,11 +47,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
47
47
  }] } });
48
48
 
49
49
  class MtxAlertModule {
50
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
51
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: MtxAlertModule, imports: [CommonModule, MtxAlert], exports: [MtxAlert] }); }
52
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxAlertModule, imports: [CommonModule, MtxAlert] }); }
50
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
51
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: MtxAlertModule, imports: [CommonModule, MtxAlert], exports: [MtxAlert] }); }
52
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxAlertModule, imports: [CommonModule, MtxAlert] }); }
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxAlertModule, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxAlertModule, decorators: [{
55
55
  type: NgModule,
56
56
  args: [{
57
57
  imports: [CommonModule, MtxAlert],
@@ -42,10 +42,10 @@ class MatButtonLoading {
42
42
  this.spinner = null;
43
43
  }
44
44
  }
45
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MatButtonLoading, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
46
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.6", type: MatButtonLoading, isStandalone: true, selector: "[mat-button][loading],\n [mat-raised-button][loading],\n [mat-stroked-button][loading],\n [mat-flat-button][loading],\n [mat-icon-button][loading],\n [mat-fab][loading],\n [mat-mini-fab][loading]", inputs: { loading: ["loading", "loading", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], color: "color" }, usesOnChanges: true, ngImport: i0 }); }
45
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MatButtonLoading, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
46
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.2", type: MatButtonLoading, isStandalone: true, selector: "[mat-button][loading],\n [mat-raised-button][loading],\n [mat-stroked-button][loading],\n [mat-flat-button][loading],\n [mat-icon-button][loading],\n [mat-fab][loading],\n [mat-mini-fab][loading]", inputs: { loading: ["loading", "loading", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], color: "color" }, usesOnChanges: true, ngImport: i0 }); }
47
47
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MatButtonLoading, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MatButtonLoading, decorators: [{
49
49
  type: Directive,
50
50
  args: [{
51
51
  selector: `[mat-button][loading],
@@ -67,11 +67,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
67
67
  }] } });
68
68
 
69
69
  class MtxButtonModule {
70
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: MtxButtonModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatButtonLoading], exports: [MatButtonLoading] }); }
72
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxButtonModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule] }); }
70
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: MtxButtonModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatButtonLoading], exports: [MatButtonLoading] }); }
72
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxButtonModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule] }); }
73
73
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MtxButtonModule, decorators: [{
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxButtonModule, decorators: [{
75
75
  type: NgModule,
76
76
  args: [{
77
77
  imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatButtonLoading],