@angular/material 19.2.0-next.2 → 19.2.0-next.4

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 (81) hide show
  1. package/bottom-sheet/index.d.ts +1 -2
  2. package/button/_button-base.scss +1 -1
  3. package/checkbox/_checkbox-common.scss +29 -16
  4. package/chips/index.d.ts +0 -2
  5. package/core/tokens/m3/definitions/_md-sys-color.scss +5 -5
  6. package/datepicker/index.d.ts +2 -3
  7. package/dialog/index.d.ts +5 -2
  8. package/dialog/testing/index.d.ts +1 -1
  9. package/expansion/index.d.ts +7 -4
  10. package/fesm2022/badge.mjs +3 -2
  11. package/fesm2022/badge.mjs.map +1 -1
  12. package/fesm2022/bottom-sheet.mjs +72 -13
  13. package/fesm2022/bottom-sheet.mjs.map +1 -1
  14. package/fesm2022/button-toggle.mjs +3 -3
  15. package/fesm2022/button-toggle.mjs.map +1 -1
  16. package/fesm2022/button.mjs +16 -16
  17. package/fesm2022/checkbox.mjs +2 -2
  18. package/fesm2022/checkbox.mjs.map +1 -1
  19. package/fesm2022/chips.mjs +15 -15
  20. package/fesm2022/chips.mjs.map +1 -1
  21. package/fesm2022/core.mjs +4 -3
  22. package/fesm2022/core.mjs.map +1 -1
  23. package/fesm2022/datepicker.mjs +102 -21
  24. package/fesm2022/datepicker.mjs.map +1 -1
  25. package/fesm2022/dialog/testing.mjs +1 -1
  26. package/fesm2022/dialog/testing.mjs.map +1 -1
  27. package/fesm2022/dialog.mjs +92 -16
  28. package/fesm2022/dialog.mjs.map +1 -1
  29. package/fesm2022/expansion.mjs +72 -16
  30. package/fesm2022/expansion.mjs.map +1 -1
  31. package/fesm2022/form-field.mjs +34 -9
  32. package/fesm2022/form-field.mjs.map +1 -1
  33. package/fesm2022/list.mjs +2 -2
  34. package/fesm2022/list.mjs.map +1 -1
  35. package/fesm2022/menu.mjs +84 -21
  36. package/fesm2022/menu.mjs.map +1 -1
  37. package/fesm2022/select.mjs +110 -38
  38. package/fesm2022/select.mjs.map +1 -1
  39. package/fesm2022/sidenav.mjs +72 -22
  40. package/fesm2022/sidenav.mjs.map +1 -1
  41. package/fesm2022/snack-bar.mjs +60 -15
  42. package/fesm2022/snack-bar.mjs.map +1 -1
  43. package/fesm2022/sort.mjs +286 -43
  44. package/fesm2022/sort.mjs.map +1 -1
  45. package/fesm2022/stepper.mjs +141 -31
  46. package/fesm2022/stepper.mjs.map +1 -1
  47. package/fesm2022/tabs.mjs +128 -30
  48. package/fesm2022/tabs.mjs.map +1 -1
  49. package/fesm2022/timepicker.mjs +11 -2
  50. package/fesm2022/timepicker.mjs.map +1 -1
  51. package/fesm2022/tooltip.mjs +49 -22
  52. package/fesm2022/tooltip.mjs.map +1 -1
  53. package/form-field/index.d.ts +1 -2
  54. package/menu/index.d.ts +4 -5
  55. package/package.json +2 -3
  56. package/prebuilt-themes/azure-blue.css +1 -1
  57. package/prebuilt-themes/cyan-orange.css +1 -1
  58. package/prebuilt-themes/magenta-violet.css +1 -1
  59. package/prebuilt-themes/rose-red.css +1 -1
  60. package/schematics/ng-add/index.js +2 -3
  61. package/schematics/ng-add/index.mjs +2 -3
  62. package/schematics/ng-add/schema.d.ts +0 -2
  63. package/schematics/ng-add/schema.js +1 -1
  64. package/schematics/ng-add/schema.json +0 -14
  65. package/schematics/ng-add/schema.mjs +1 -1
  66. package/schematics/ng-add/setup-project.d.ts +0 -1
  67. package/schematics/ng-add/setup-project.js +1 -23
  68. package/schematics/ng-add/setup-project.mjs +1 -23
  69. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +2 -2
  70. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +2 -2
  71. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +2 -2
  72. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +2 -2
  73. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +2 -2
  74. package/select/index.d.ts +4 -4
  75. package/sidenav/index.d.ts +1 -2
  76. package/snack-bar/index.d.ts +1 -2
  77. package/sort/index.d.ts +6 -7
  78. package/stepper/index.d.ts +2 -3
  79. package/tabs/index.d.ts +1 -2
  80. package/timepicker/index.d.ts +6 -0
  81. package/tooltip/index.d.ts +1 -8
@@ -1,4 +1,3 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
1
  import { CdkDialogContainer } from '@angular/cdk/dialog';
3
2
  import { ComponentRef } from '@angular/core';
4
3
  import { ComponentType } from '@angular/cdk/portal';
@@ -74,7 +73,7 @@ export declare class MatBottomSheet implements OnDestroy {
74
73
  * @breaking-change 21.0.0
75
74
  */
76
75
  export declare const matBottomSheetAnimations: {
77
- readonly bottomSheetState: AnimationTriggerMetadata;
76
+ readonly bottomSheetState: any;
78
77
  };
79
78
 
80
79
  /**
@@ -71,7 +71,7 @@
71
71
  @include token-utils.create-token-slot(background-color, disabled-state-layer-color);
72
72
  }
73
73
 
74
- &:hover .mat-mdc-button-persistent-ripple::before {
74
+ &:hover > .mat-mdc-button-persistent-ripple::before {
75
75
  @include token-utils.create-token-slot(opacity, hover-state-layer-opacity);
76
76
  }
77
77
 
@@ -119,15 +119,17 @@ $_fallback-size: 40px;
119
119
  border-color: transparent;
120
120
  }
121
121
 
122
- .mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked) ~ .mdc-checkbox__background,
122
+ // stylelint-disable selector-combinator-space-before
123
+ .mdc-checkbox:hover > .mdc-checkbox__native-control:not(:checked) ~ .mdc-checkbox__background,
123
124
  .mdc-checkbox:hover
124
- .mdc-checkbox__native-control:not(:indeterminate) ~ .mdc-checkbox__background {
125
+ > .mdc-checkbox__native-control:not(:indeterminate) ~ .mdc-checkbox__background {
125
126
  @include token-utils.create-token-slot(border-color, unselected-hover-icon-color);
126
127
  background-color: transparent;
127
128
  }
129
+ // stylelint-enable selector-combinator-space-before
128
130
 
129
- .mdc-checkbox:hover .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background,
130
- .mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
131
+ .mdc-checkbox:hover > .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background,
132
+ .mdc-checkbox:hover > .mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
131
133
  @include token-utils.create-token-slot(border-color, selected-hover-icon-color);
132
134
  @include token-utils.create-token-slot(background-color, selected-hover-icon-color);
133
135
  }
@@ -147,7 +149,7 @@ $_fallback-size: 40px;
147
149
 
148
150
  // Needs extra specificity to override the focus, hover, active states.
149
151
  .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive {
150
- .mdc-checkbox:hover .mdc-checkbox__native-control ~ .mdc-checkbox__background,
152
+ .mdc-checkbox:hover > .mdc-checkbox__native-control ~ .mdc-checkbox__background,
151
153
  .mdc-checkbox .mdc-checkbox__native-control:focus ~ .mdc-checkbox__background,
152
154
  .mdc-checkbox__background {
153
155
  @include token-utils.create-token-slot(border-color, disabled-unselected-icon-color);
@@ -306,31 +308,31 @@ $_fallback-size: 40px;
306
308
  transition: border-color $_transition-duration $_enter-curve,
307
309
  background-color $_transition-duration $_enter-curve;
308
310
 
309
- .mdc-checkbox__checkmark-path {
311
+ > .mdc-checkbox__checkmark > .mdc-checkbox__checkmark-path {
310
312
  stroke-dashoffset: 0;
311
313
  }
312
314
  }
313
315
 
314
316
  .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background {
315
- .mdc-checkbox__checkmark {
317
+ > .mdc-checkbox__checkmark {
316
318
  transition: opacity $_transition-duration * 2 $_enter-curve,
317
319
  transform $_transition-duration * 2 $_enter-curve;
318
320
  opacity: 1;
319
321
  }
320
322
 
321
- .mdc-checkbox__mixedmark {
323
+ > .mdc-checkbox__mixedmark {
322
324
  transform: scaleX(1) rotate(-45deg);
323
325
  }
324
326
  }
325
327
  .mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
326
- .mdc-checkbox__checkmark {
328
+ > .mdc-checkbox__checkmark {
327
329
  transform: rotate(45deg);
328
330
  opacity: 0;
329
331
  transition: opacity $_transition-duration $_exit-curve,
330
332
  transform $_transition-duration $_exit-curve;
331
333
  }
332
334
 
333
- .mdc-checkbox__mixedmark {
335
+ > .mdc-checkbox__mixedmark {
334
336
  transform: scaleX(1) rotate(0deg);
335
337
  opacity: 1;
336
338
  }
@@ -445,11 +447,22 @@ $_fallback-size: 40px;
445
447
 
446
448
  // Conditionally disables the animations of the checkbox.
447
449
  @mixin checkbox-noop-animations() {
448
- &._mat-animation-noopable .mdc-checkbox {
449
- *, *::before {
450
- transition: none !important;
451
- animation: none !important;
452
- }
450
+ &._mat-animation-noopable > .mat-internal-form-field > .mdc-checkbox {
451
+ @include checkbox-noop-animations-internal;
452
+ }
453
+ }
454
+
455
+ @mixin checkbox-noop-animations-internal() {
456
+ > .mat-mdc-checkbox-touch-target,
457
+ > .mdc-checkbox__native-control,
458
+ > .mdc-checkbox__ripple,
459
+ > .mat-mdc-checkbox-ripple::before,
460
+ > .mdc-checkbox__background,
461
+ > .mdc-checkbox__background > .mdc-checkbox__checkmark,
462
+ > .mdc-checkbox__background > .mdc-checkbox__checkmark > .mdc-checkbox__checkmark-path,
463
+ > .mdc-checkbox__background > .mdc-checkbox__mixedmark {
464
+ transition: none !important;
465
+ animation: none !important;
453
466
  }
454
467
  }
455
468
 
@@ -465,7 +478,7 @@ $_fallback-size: 40px;
465
478
  );
466
479
  }
467
480
 
468
- > .mat-mdc-checkbox-ripple .mat-ripple-element {
481
+ > .mat-mdc-checkbox-ripple > .mat-ripple-element {
469
482
  @include token-utils.create-token-slot(
470
483
  background-color,
471
484
  unselected-hover-state-layer-color
package/chips/index.d.ts CHANGED
@@ -600,8 +600,6 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
600
600
  */
601
601
  _onChange: (value: any) => void;
602
602
  protected _defaultRole: string;
603
- /** Value that was assigned before the listbox was initialized. */
604
- private _pendingInitialValue;
605
603
  /** Default chip options. */
606
604
  private _defaultOptions;
607
605
  /** Whether the user should be allowed to select multiple chips. */
@@ -53,7 +53,7 @@ $_default-dark: (
53
53
  'surface-bright': map.get($deps, 'md-ref-palette', 'neutral24'),
54
54
  'surface-container': map.get($deps, 'md-ref-palette', 'neutral12'),
55
55
  'surface-container-high': map.get($deps, 'md-ref-palette', 'neutral17'),
56
- 'surface-container-highest': map.get($deps, 'md-ref-palette', 'neutral24'),
56
+ 'surface-container-highest': map.get($deps, 'md-ref-palette', 'neutral22'),
57
57
  'surface-container-low': map.get($deps, 'md-ref-palette', 'neutral10'),
58
58
  'surface-container-lowest': map.get($deps, 'md-ref-palette', 'neutral4'),
59
59
  'surface-dim': map.get($deps, 'md-ref-palette', 'neutral6'),
@@ -80,20 +80,20 @@ $_default-light: (
80
80
  'inverse-surface': map.get($deps, 'md-ref-palette', 'neutral20'),
81
81
  'on-background': map.get($deps, 'md-ref-palette', 'neutral10'),
82
82
  'on-error': map.get($deps, 'md-ref-palette', 'error100'),
83
- 'on-error-container': map.get($deps, 'md-ref-palette', 'error10'),
83
+ 'on-error-container': map.get($deps, 'md-ref-palette', 'error30'),
84
84
  'on-primary': map.get($deps, 'md-ref-palette', 'primary100'),
85
- 'on-primary-container': map.get($deps, 'md-ref-palette', 'primary10'),
85
+ 'on-primary-container': map.get($deps, 'md-ref-palette', 'primary30'),
86
86
  'on-primary-fixed': map.get($deps, 'md-ref-palette', 'primary10'),
87
87
  'on-primary-fixed-variant': map.get($deps, 'md-ref-palette', 'primary30'),
88
88
  'on-secondary': map.get($deps, 'md-ref-palette', 'secondary100'),
89
- 'on-secondary-container': map.get($deps, 'md-ref-palette', 'secondary10'),
89
+ 'on-secondary-container': map.get($deps, 'md-ref-palette', 'secondary30'),
90
90
  'on-secondary-fixed': map.get($deps, 'md-ref-palette', 'secondary10'),
91
91
  'on-secondary-fixed-variant':
92
92
  map.get($deps, 'md-ref-palette', 'secondary30'),
93
93
  'on-surface': map.get($deps, 'md-ref-palette', 'neutral10'),
94
94
  'on-surface-variant': map.get($deps, 'md-ref-palette', 'neutral-variant30'),
95
95
  'on-tertiary': map.get($deps, 'md-ref-palette', 'tertiary100'),
96
- 'on-tertiary-container': map.get($deps, 'md-ref-palette', 'tertiary10'),
96
+ 'on-tertiary-container': map.get($deps, 'md-ref-palette', 'tertiary30'),
97
97
  'on-tertiary-fixed': map.get($deps, 'md-ref-palette', 'tertiary10'),
98
98
  'on-tertiary-fixed-variant': map.get($deps, 'md-ref-palette', 'tertiary30'),
99
99
  'outline': map.get($deps, 'md-ref-palette', 'neutral-variant50'),
@@ -2,7 +2,6 @@ import { AbstractControl } from '@angular/forms';
2
2
  import { AfterContentInit } from '@angular/core';
3
3
  import { AfterViewChecked } from '@angular/core';
4
4
  import { AfterViewInit } from '@angular/core';
5
- import { AnimationTriggerMetadata } from '@angular/animations';
6
5
  import { ChangeDetectorRef } from '@angular/core';
7
6
  import { ComponentType } from '@angular/cdk/portal';
8
7
  import { ControlValueAccessor } from '@angular/forms';
@@ -664,8 +663,8 @@ export declare class MatDatepickerActions implements AfterViewInit, OnDestroy {
664
663
  * @breaking-change 21.0.0
665
664
  */
666
665
  export declare const matDatepickerAnimations: {
667
- readonly transformPanel: AnimationTriggerMetadata;
668
- readonly fadeInCalendar: AnimationTriggerMetadata;
666
+ readonly transformPanel: any;
667
+ readonly fadeInCalendar: any;
669
668
  };
670
669
 
671
670
  /** Button that will close the datepicker and assign the current selection to the data model. */
package/dialog/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
1
  import { CdkDialogContainer } from '@angular/cdk/dialog';
3
2
  import { ComponentPortal } from '@angular/cdk/portal';
4
3
  import { ComponentRef } from '@angular/core';
@@ -43,6 +42,8 @@ export declare function _closeDialogVia<R>(ref: MatDialogRef<R>, interactionType
43
42
  /**
44
43
  * Default parameters for the animation for backwards compatibility.
45
44
  * @docs-private
45
+ * @deprecated Will stop being exported.
46
+ * @breaking-change 21.0.0
46
47
  */
47
48
  export declare const _defaultParams: {
48
49
  params: {
@@ -193,9 +194,11 @@ export declare class MatDialogActions extends MatDialogLayoutSection {
193
194
  /**
194
195
  * Animations used by MatDialog.
195
196
  * @docs-private
197
+ * @deprecated No longer used, will be removed.
198
+ * @breaking-change 21.0.0
196
199
  */
197
200
  export declare const matDialogAnimations: {
198
- readonly dialogContainer: AnimationTriggerMetadata;
201
+ readonly dialogContainer: any;
199
202
  };
200
203
 
201
204
  /**
@@ -44,7 +44,7 @@ export declare class MatDialogHarness extends ContentContainerComponentHarness<M
44
44
  * Note: this method does nothing if `disableClose` has been set to `true` for the dialog.
45
45
  */
46
46
  close(): Promise<void>;
47
- /** Gets te dialog's text. */
47
+ /** Gets the dialog's text. */
48
48
  getText(): Promise<string>;
49
49
  /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */
50
50
  getTitleText(): Promise<string>;
@@ -1,6 +1,5 @@
1
1
  import { AfterContentInit } from '@angular/core';
2
2
  import { AfterViewInit } from '@angular/core';
3
- import { AnimationTriggerMetadata } from '@angular/animations';
4
3
  import { CdkAccordion } from '@angular/cdk/accordion';
5
4
  import { CdkAccordionItem } from '@angular/cdk/accordion';
6
5
  import { ElementRef } from '@angular/core';
@@ -20,7 +19,11 @@ import { Subject } from 'rxjs';
20
19
  import { TemplatePortal } from '@angular/cdk/portal';
21
20
  import { TemplateRef } from '@angular/core';
22
21
 
23
- /** Time and timing curve for expansion panel animations. */
22
+ /**
23
+ * Time and timing curve for expansion panel animations.
24
+ * @deprecated No longer used. Will be removed.
25
+ * @breaking-change 21.0.0
26
+ */
24
27
  export declare const EXPANSION_PANEL_ANIMATION_TIMING = "225ms cubic-bezier(0.4,0.0,0.2,1)";
25
28
 
26
29
  declare namespace i4 {
@@ -151,8 +154,8 @@ export declare type MatAccordionTogglePosition = 'before' | 'after';
151
154
  * @breaking-change 21.0.0
152
155
  */
153
156
  export declare const matExpansionAnimations: {
154
- readonly indicatorRotate: AnimationTriggerMetadata;
155
- readonly bodyExpansion: AnimationTriggerMetadata;
157
+ readonly indicatorRotate: any;
158
+ readonly bodyExpansion: any;
156
159
  };
157
160
 
158
161
  export declare class MatExpansionModule {
@@ -80,8 +80,9 @@ class MatBadge {
80
80
  _interactivityChecker = inject(InteractivityChecker);
81
81
  _document = inject(DOCUMENT);
82
82
  constructor() {
83
- inject(_CdkPrivateStyleLoader).load(_MatBadgeStyleLoader);
84
- inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);
83
+ const styleLoader = inject(_CdkPrivateStyleLoader);
84
+ styleLoader.load(_MatBadgeStyleLoader);
85
+ styleLoader.load(_VisuallyHiddenLoader);
85
86
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
86
87
  const nativeElement = this._elementRef.nativeElement;
87
88
  if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {
@@ -1 +1 @@
1
- {"version":3,"file":"badge.mjs","sources":["../../../../../../src/material/badge/badge.ts","../../../../../../src/material/badge/badge-module.ts","../../../../../../src/material/badge/badge_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y';\nimport {DOCUMENT} from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n ANIMATION_MODULE_TYPE,\n} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Allowed position options for matBadgePosition */\nexport type MatBadgePosition =\n | 'above after'\n | 'above before'\n | 'below before'\n | 'below after'\n | 'before'\n | 'after'\n | 'above'\n | 'below';\n\n/** Allowed size options for matBadgeSize */\nexport type MatBadgeSize = 'small' | 'medium' | 'large';\n\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\n@Component({\n styleUrl: 'badge.css',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _MatBadgeStyleLoader {}\n\n/** Directive to display a text badge. */\n@Directive({\n selector: '[matBadge]',\n host: {\n 'class': 'mat-badge',\n '[class.mat-badge-overlap]': 'overlap',\n '[class.mat-badge-above]': 'isAbove()',\n '[class.mat-badge-below]': '!isAbove()',\n '[class.mat-badge-before]': '!isAfter()',\n '[class.mat-badge-after]': 'isAfter()',\n '[class.mat-badge-small]': 'size === \"small\"',\n '[class.mat-badge-medium]': 'size === \"medium\"',\n '[class.mat-badge-large]': 'size === \"large\"',\n '[class.mat-badge-hidden]': 'hidden || !content',\n '[class.mat-badge-disabled]': 'disabled',\n },\n})\nexport class MatBadge implements OnInit, OnDestroy {\n private _ngZone = inject(NgZone);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber);\n private _renderer = inject(Renderer2);\n private _animationMode = inject(ANIMATION_MODULE_TYPE, {optional: true});\n private _idGenerator = inject(_IdGenerator);\n\n /**\n * Theme color of the badge. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/badge/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input('matBadgeColor')\n get color(): ThemePalette {\n return this._color;\n }\n set color(value: ThemePalette) {\n this._setColor(value);\n this._color = value;\n }\n private _color: ThemePalette = 'primary';\n\n /** Whether the badge should overlap its contents or not */\n @Input({alias: 'matBadgeOverlap', transform: booleanAttribute}) overlap: boolean = true;\n\n /** Whether the badge is disabled. */\n @Input({alias: 'matBadgeDisabled', transform: booleanAttribute}) disabled: boolean;\n\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n @Input('matBadgePosition') position: MatBadgePosition = 'above after';\n\n /** The content for the badge */\n @Input('matBadge')\n get content(): string | number | undefined | null {\n return this._content;\n }\n set content(newContent: string | number | undefined | null) {\n this._updateRenderedContent(newContent);\n }\n private _content: string | number | undefined | null;\n\n /** Message used to describe the decorated element via aria-describedby */\n @Input('matBadgeDescription')\n get description(): string {\n return this._description;\n }\n set description(newDescription: string) {\n this._updateDescription(newDescription);\n }\n private _description: string;\n\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n @Input('matBadgeSize') size: MatBadgeSize = 'medium';\n\n /** Whether the badge is hidden. */\n @Input({alias: 'matBadgeHidden', transform: booleanAttribute}) hidden: boolean;\n\n /** Visible badge element. */\n private _badgeElement: HTMLElement | undefined;\n\n /** Inline badge description. Used when the badge is applied to non-interactive host elements. */\n private _inlineBadgeDescription: HTMLElement | undefined;\n\n /** Whether the OnInit lifecycle hook has run yet */\n private _isInitialized = false;\n\n /** InteractivityChecker to determine if the badge host is focusable. */\n private _interactivityChecker = inject(InteractivityChecker);\n\n private _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_MatBadgeStyleLoader);\n inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n\n // Heads-up for developers to avoid putting matBadge on <mat-icon>\n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.io/components/badge/overview#accessibility\n if (\n nativeElement.tagName.toLowerCase() === 'mat-icon' &&\n nativeElement.getAttribute('aria-hidden') === 'true'\n ) {\n console.warn(\n `Detected a matBadge on an \"aria-hidden\" \"<mat-icon>\". ` +\n `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` +\n `\\n${nativeElement.outerHTML}`,\n );\n }\n }\n }\n\n /** Whether the badge is above the host or not */\n isAbove(): boolean {\n return this.position.indexOf('below') === -1;\n }\n\n /** Whether the badge is after the host or not */\n isAfter(): boolean {\n return this.position.indexOf('before') === -1;\n }\n\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement(): HTMLElement | undefined {\n return this._badgeElement;\n }\n\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n\n /** Gets whether the badge's host element is interactive. */\n private _isHostInteractive(): boolean {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true,\n });\n }\n\n /** Creates the badge element */\n private _createBadgeElement(): HTMLElement {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n\n badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));\n\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n\n if (this._animationMode === 'NoopAnimations') {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n\n this._elementRef.nativeElement.appendChild(badgeElement);\n\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && this._animationMode !== 'NoopAnimations') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n\n return badgeElement;\n }\n\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n private _updateRenderedContent(newContent: string | number | undefined | null): void {\n const newContentNormalized: string = `${newContent ?? ''}`.trim();\n\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n\n this._content = newContentNormalized;\n }\n\n /** Updates the host element's aria description via AriaDescriber. */\n private _updateDescription(newDescription: string): void {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n\n this._description = newDescription;\n\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n\n private _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n\n private _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n\n /** Adds css theme class given the color to the component host */\n private _setColor(colorPalette: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n\n /** Clears any existing badges that might be left over from server-side rendering. */\n private _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(\n `:scope > .${BADGE_CONTENT_CLASS}`,\n );\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {MatBadge, _MatBadgeStyleLoader} from './badge';\n\n@NgModule({\n // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,\n // but it seems to be necessary for tests.\n imports: [A11yModule, MatCommonModule, MatBadge, _MatBadgeStyleLoader],\n exports: [MatBadge, MatCommonModule],\n})\nexport class MatBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA0CA,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD;;;AAGG;MAOU,oBAAoB,CAAA;uGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,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material/badge/badge-module.ts","../../../../../../src/material/badge/badge_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y';\nimport {DOCUMENT} from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n ANIMATION_MODULE_TYPE,\n} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Allowed position options for matBadgePosition */\nexport type MatBadgePosition =\n | 'above after'\n | 'above before'\n | 'below before'\n | 'below after'\n | 'before'\n | 'after'\n | 'above'\n | 'below';\n\n/** Allowed size options for matBadgeSize */\nexport type MatBadgeSize = 'small' | 'medium' | 'large';\n\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\n@Component({\n styleUrl: 'badge.css',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _MatBadgeStyleLoader {}\n\n/** Directive to display a text badge. */\n@Directive({\n selector: '[matBadge]',\n host: {\n 'class': 'mat-badge',\n '[class.mat-badge-overlap]': 'overlap',\n '[class.mat-badge-above]': 'isAbove()',\n '[class.mat-badge-below]': '!isAbove()',\n '[class.mat-badge-before]': '!isAfter()',\n '[class.mat-badge-after]': 'isAfter()',\n '[class.mat-badge-small]': 'size === \"small\"',\n '[class.mat-badge-medium]': 'size === \"medium\"',\n '[class.mat-badge-large]': 'size === \"large\"',\n '[class.mat-badge-hidden]': 'hidden || !content',\n '[class.mat-badge-disabled]': 'disabled',\n },\n})\nexport class MatBadge implements OnInit, OnDestroy {\n private _ngZone = inject(NgZone);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber);\n private _renderer = inject(Renderer2);\n private _animationMode = inject(ANIMATION_MODULE_TYPE, {optional: true});\n private _idGenerator = inject(_IdGenerator);\n\n /**\n * Theme color of the badge. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/badge/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input('matBadgeColor')\n get color(): ThemePalette {\n return this._color;\n }\n set color(value: ThemePalette) {\n this._setColor(value);\n this._color = value;\n }\n private _color: ThemePalette = 'primary';\n\n /** Whether the badge should overlap its contents or not */\n @Input({alias: 'matBadgeOverlap', transform: booleanAttribute}) overlap: boolean = true;\n\n /** Whether the badge is disabled. */\n @Input({alias: 'matBadgeDisabled', transform: booleanAttribute}) disabled: boolean;\n\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n @Input('matBadgePosition') position: MatBadgePosition = 'above after';\n\n /** The content for the badge */\n @Input('matBadge')\n get content(): string | number | undefined | null {\n return this._content;\n }\n set content(newContent: string | number | undefined | null) {\n this._updateRenderedContent(newContent);\n }\n private _content: string | number | undefined | null;\n\n /** Message used to describe the decorated element via aria-describedby */\n @Input('matBadgeDescription')\n get description(): string {\n return this._description;\n }\n set description(newDescription: string) {\n this._updateDescription(newDescription);\n }\n private _description: string;\n\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n @Input('matBadgeSize') size: MatBadgeSize = 'medium';\n\n /** Whether the badge is hidden. */\n @Input({alias: 'matBadgeHidden', transform: booleanAttribute}) hidden: boolean;\n\n /** Visible badge element. */\n private _badgeElement: HTMLElement | undefined;\n\n /** Inline badge description. Used when the badge is applied to non-interactive host elements. */\n private _inlineBadgeDescription: HTMLElement | undefined;\n\n /** Whether the OnInit lifecycle hook has run yet */\n private _isInitialized = false;\n\n /** InteractivityChecker to determine if the badge host is focusable. */\n private _interactivityChecker = inject(InteractivityChecker);\n\n private _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_MatBadgeStyleLoader);\n styleLoader.load(_VisuallyHiddenLoader);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n\n // Heads-up for developers to avoid putting matBadge on <mat-icon>\n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.io/components/badge/overview#accessibility\n if (\n nativeElement.tagName.toLowerCase() === 'mat-icon' &&\n nativeElement.getAttribute('aria-hidden') === 'true'\n ) {\n console.warn(\n `Detected a matBadge on an \"aria-hidden\" \"<mat-icon>\". ` +\n `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` +\n `\\n${nativeElement.outerHTML}`,\n );\n }\n }\n }\n\n /** Whether the badge is above the host or not */\n isAbove(): boolean {\n return this.position.indexOf('below') === -1;\n }\n\n /** Whether the badge is after the host or not */\n isAfter(): boolean {\n return this.position.indexOf('before') === -1;\n }\n\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement(): HTMLElement | undefined {\n return this._badgeElement;\n }\n\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n\n /** Gets whether the badge's host element is interactive. */\n private _isHostInteractive(): boolean {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true,\n });\n }\n\n /** Creates the badge element */\n private _createBadgeElement(): HTMLElement {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n\n badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));\n\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n\n if (this._animationMode === 'NoopAnimations') {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n\n this._elementRef.nativeElement.appendChild(badgeElement);\n\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && this._animationMode !== 'NoopAnimations') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n\n return badgeElement;\n }\n\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n private _updateRenderedContent(newContent: string | number | undefined | null): void {\n const newContentNormalized: string = `${newContent ?? ''}`.trim();\n\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n\n this._content = newContentNormalized;\n }\n\n /** Updates the host element's aria description via AriaDescriber. */\n private _updateDescription(newDescription: string): void {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n\n this._description = newDescription;\n\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n\n private _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n\n private _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n\n /** Adds css theme class given the color to the component host */\n private _setColor(colorPalette: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n\n /** Clears any existing badges that might be left over from server-side rendering. */\n private _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(\n `:scope > .${BADGE_CONTENT_CLASS}`,\n );\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {MatBadge, _MatBadgeStyleLoader} from './badge';\n\n@NgModule({\n // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,\n // but it seems to be necessary for tests.\n imports: [A11yModule, MatCommonModule, MatBadge, _MatBadgeStyleLoader],\n exports: [MatBadge, MatCommonModule],\n})\nexport class MatBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA0CA,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD;;;AAGG;MAOU,oBAAoB,CAAA;uGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,wEAHrB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,gyGAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAGD,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AAEO,YAAA,IAAA,EAAA,CAAA,EAAA,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAC3B,EAAE,EACK,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,gyGAAA,CAAA,EAAA,CAAA;;AAIjD;MAiBa,QAAQ,CAAA;AACX,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;AAC1D,IAAA,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AACvC,IAAA,SAAS,GA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,CAC3D,QAAQ,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;AAExB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHf,OAAA,EAAA,CAAA,UAAU,EAAE,eAAe,EACjB,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAExB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;;;oBAGR,OAAO,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,oBAAoB,CAAC;AACtE,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;AACrC,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
@@ -8,7 +8,6 @@ import { Overlay } from '@angular/cdk/overlay';
8
8
  import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
9
9
  import { Subject, merge } from 'rxjs';
10
10
  import { filter, take } from 'rxjs/operators';
11
- import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
12
11
 
13
12
  const ENTER_ANIMATION = '_mat-bottom-sheet-enter';
14
13
  const EXIT_ANIMATION = '_mat-bottom-sheet-exit';
@@ -377,19 +376,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
377
376
  * @breaking-change 21.0.0
378
377
  */
379
378
  const matBottomSheetAnimations = {
379
+ // Represents the output of:
380
+ // trigger('state', [
381
+ // state('void, hidden', style({transform: 'translateY(100%)'})),
382
+ // state('visible', style({transform: 'translateY(0%)'})),
383
+ // transition(
384
+ // 'visible => void, visible => hidden',
385
+ // group([
386
+ // animate('375ms cubic-bezier(0.4, 0, 1, 1)'),
387
+ // query('@*', animateChild(), {optional: true}),
388
+ // ]),
389
+ // ),
390
+ // transition(
391
+ // 'void => visible',
392
+ // group([
393
+ // animate('195ms cubic-bezier(0, 0, 0.2, 1)'),
394
+ // query('@*', animateChild(), {optional: true}),
395
+ // ]),
396
+ // ),
397
+ // ])
380
398
  /** Animation that shows and hides a bottom sheet. */
381
- bottomSheetState: trigger('state', [
382
- state('void, hidden', style({ transform: 'translateY(100%)' })),
383
- state('visible', style({ transform: 'translateY(0%)' })),
384
- transition('visible => void, visible => hidden', group([
385
- animate('375ms cubic-bezier(0.4, 0, 1, 1)'),
386
- query('@*', animateChild(), { optional: true }),
387
- ])),
388
- transition('void => visible', group([
389
- animate('195ms cubic-bezier(0, 0, 0.2, 1)'),
390
- query('@*', animateChild(), { optional: true }),
391
- ])),
392
- ]),
399
+ bottomSheetState: {
400
+ type: 7,
401
+ name: 'state',
402
+ definitions: [
403
+ {
404
+ type: 0,
405
+ name: 'void, hidden',
406
+ styles: { type: 6, styles: { transform: 'translateY(100%)' }, offset: null },
407
+ },
408
+ {
409
+ type: 0,
410
+ name: 'visible',
411
+ styles: { type: 6, styles: { transform: 'translateY(0%)' }, offset: null },
412
+ },
413
+ {
414
+ type: 1,
415
+ expr: 'visible => void, visible => hidden',
416
+ animation: {
417
+ type: 3,
418
+ steps: [
419
+ { type: 4, styles: null, timings: '375ms cubic-bezier(0.4, 0, 1, 1)' },
420
+ {
421
+ type: 11,
422
+ selector: '@*',
423
+ animation: { type: 9, options: null },
424
+ options: { optional: true },
425
+ },
426
+ ],
427
+ options: null,
428
+ },
429
+ options: null,
430
+ },
431
+ {
432
+ type: 1,
433
+ expr: 'void => visible',
434
+ animation: {
435
+ type: 3,
436
+ steps: [
437
+ { type: 4, styles: null, timings: '195ms cubic-bezier(0, 0, 0.2, 1)' },
438
+ {
439
+ type: 11,
440
+ selector: '@*',
441
+ animation: { type: 9, options: null },
442
+ options: { optional: true },
443
+ },
444
+ ],
445
+ options: null,
446
+ },
447
+ options: null,
448
+ },
449
+ ],
450
+ options: {},
451
+ },
393
452
  };
394
453
 
395
454
  /**