@angular/material 18.0.2 → 18.0.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 (117) hide show
  1. package/_index.scss +1 -1
  2. package/autocomplete/index.d.ts +3 -0
  3. package/badge/index.d.ts +4 -1
  4. package/bottom-sheet/index.d.ts +0 -1
  5. package/button/index.d.ts +7 -1
  6. package/checkbox/index.d.ts +12 -2
  7. package/chips/index.d.ts +11 -3
  8. package/core/_core-theme.scss +8 -14
  9. package/core/_core.scss +18 -4
  10. package/core/m2/_typography.scss +1 -1
  11. package/core/theming/_palettes.scss +2 -0
  12. package/core/tokens/_density.scss +1 -0
  13. package/core/tokens/m2/mat/_app.scss +13 -1
  14. package/core/tokens/m2/mat/_menu.scss +3 -0
  15. package/core/tokens/m2/mat/_paginator.scss +1 -0
  16. package/core/tokens/m3/mat/_app.scss +9 -0
  17. package/core/tokens/m3/mat/_menu.scss +3 -0
  18. package/datepicker/index.d.ts +27 -3
  19. package/dialog/index.d.ts +0 -1
  20. package/dialog/testing/index.d.ts +1 -0
  21. package/esm2022/autocomplete/autocomplete-trigger.mjs +35 -7
  22. package/esm2022/badge/badge.mjs +5 -2
  23. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -7
  24. package/esm2022/button/button-base.mjs +1 -1
  25. package/esm2022/checkbox/checkbox-config.mjs +1 -1
  26. package/esm2022/checkbox/checkbox.mjs +3 -10
  27. package/esm2022/chips/chip-grid.mjs +11 -4
  28. package/esm2022/chips/chip-row.mjs +8 -13
  29. package/esm2022/chips/chip-set.mjs +7 -3
  30. package/esm2022/chips/chip.mjs +6 -6
  31. package/esm2022/core/option/optgroup.mjs +2 -2
  32. package/esm2022/core/option/option.mjs +3 -3
  33. package/esm2022/core/version.mjs +1 -1
  34. package/esm2022/datepicker/date-range-input-parts.mjs +14 -10
  35. package/esm2022/datepicker/date-range-input.mjs +17 -7
  36. package/esm2022/datepicker/datepicker-base.mjs +18 -17
  37. package/esm2022/datepicker/datepicker-input.mjs +16 -5
  38. package/esm2022/dialog/dialog-container.mjs +1 -6
  39. package/esm2022/dialog/testing/dialog-opener.mjs +4 -3
  40. package/esm2022/form-field/form-field.mjs +12 -6
  41. package/esm2022/icon/icon.mjs +8 -2
  42. package/esm2022/list/list-option.mjs +3 -3
  43. package/esm2022/list/selection-list.mjs +9 -2
  44. package/esm2022/menu/menu.mjs +13 -4
  45. package/esm2022/paginator/paginator.mjs +3 -3
  46. package/esm2022/radio/radio.mjs +4 -3
  47. package/esm2022/slide-toggle/slide-toggle.mjs +1 -1
  48. package/esm2022/slider/slider-interface.mjs +2 -2
  49. package/esm2022/stepper/step-header.mjs +1 -1
  50. package/esm2022/stepper/stepper.mjs +1 -1
  51. package/esm2022/tabs/tab-header.mjs +3 -3
  52. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -4
  53. package/esm2022/toolbar/toolbar.mjs +1 -1
  54. package/fesm2022/autocomplete.mjs +28 -0
  55. package/fesm2022/autocomplete.mjs.map +1 -1
  56. package/fesm2022/badge.mjs +4 -1
  57. package/fesm2022/badge.mjs.map +1 -1
  58. package/fesm2022/bottom-sheet.mjs +5 -6
  59. package/fesm2022/bottom-sheet.mjs.map +1 -1
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/checkbox.mjs.map +1 -1
  62. package/fesm2022/chips.mjs +19 -13
  63. package/fesm2022/chips.mjs.map +1 -1
  64. package/fesm2022/core.mjs +5 -5
  65. package/fesm2022/core.mjs.map +1 -1
  66. package/fesm2022/datepicker.mjs +42 -9
  67. package/fesm2022/datepicker.mjs.map +1 -1
  68. package/fesm2022/dialog/testing.mjs +3 -2
  69. package/fesm2022/dialog/testing.mjs.map +1 -1
  70. package/fesm2022/dialog.mjs +0 -5
  71. package/fesm2022/dialog.mjs.map +1 -1
  72. package/fesm2022/form-field.mjs +9 -3
  73. package/fesm2022/form-field.mjs.map +1 -1
  74. package/fesm2022/icon.mjs +7 -1
  75. package/fesm2022/icon.mjs.map +1 -1
  76. package/fesm2022/list.mjs +10 -3
  77. package/fesm2022/list.mjs.map +1 -1
  78. package/fesm2022/menu.mjs +12 -3
  79. package/fesm2022/menu.mjs.map +1 -1
  80. package/fesm2022/paginator.mjs +2 -2
  81. package/fesm2022/paginator.mjs.map +1 -1
  82. package/fesm2022/radio.mjs +3 -2
  83. package/fesm2022/radio.mjs.map +1 -1
  84. package/fesm2022/slide-toggle.mjs.map +1 -1
  85. package/fesm2022/slider.mjs +1 -1
  86. package/fesm2022/slider.mjs.map +1 -1
  87. package/fesm2022/stepper.mjs.map +1 -1
  88. package/fesm2022/tabs.mjs +11 -5
  89. package/fesm2022/tabs.mjs.map +1 -1
  90. package/fesm2022/toolbar.mjs.map +1 -1
  91. package/form-field/index.d.ts +12 -2
  92. package/icon/index.d.ts +14 -2
  93. package/list/_list-theme.scss +8 -5
  94. package/list/index.d.ts +8 -1
  95. package/package.json +2 -2
  96. package/paginator/index.d.ts +7 -1
  97. package/prebuilt-themes/azure-blue.css +1 -1
  98. package/prebuilt-themes/cyan-orange.css +1 -1
  99. package/prebuilt-themes/deeppurple-amber.css +1 -1
  100. package/prebuilt-themes/indigo-pink.css +1 -1
  101. package/prebuilt-themes/magenta-violet.css +1 -1
  102. package/prebuilt-themes/pink-bluegrey.css +1 -1
  103. package/prebuilt-themes/purple-green.css +1 -1
  104. package/prebuilt-themes/rose-red.css +1 -1
  105. package/radio/_radio-common.scss +238 -0
  106. package/radio/_radio-theme.scss +25 -32
  107. package/radio/index.d.ts +7 -1
  108. package/schematics/ng-add/index.js +1 -1
  109. package/schematics/ng-add/index.mjs +1 -1
  110. package/schematics/ng-generate/m3-theme/index_bundled.js +81 -2
  111. package/schematics/ng-generate/m3-theme/index_bundled.js.map +3 -3
  112. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  113. package/slide-toggle/index.d.ts +7 -1
  114. package/slider/index.d.ts +1 -1
  115. package/stepper/index.d.ts +21 -3
  116. package/tabs/index.d.ts +7 -1
  117. package/toolbar/index.d.ts +7 -1
package/_index.scss CHANGED
@@ -127,7 +127,7 @@
127
127
  @forward './slider/slider-theme' as slider-* show slider-theme, slider-color, slider-typography,
128
128
  slider-density, slider-base, slider-overrides;
129
129
  @forward './snack-bar/snack-bar-theme' as snack-bar-* show snack-bar-theme, snack-bar-color,
130
- snack-bar-typography, snack-bar-density, snack-bar-base, bar-overrides;
130
+ snack-bar-typography, snack-bar-density, snack-bar-base, snack-bar-overrides;
131
131
  @forward './sort/sort-theme' as sort-* show sort-theme, sort-color, sort-typography, sort-density,
132
132
  sort-base, sort-overrides;
133
133
  @forward './stepper/stepper-theme' as stepper-* show stepper-theme, stepper-color,
@@ -289,6 +289,9 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft
289
289
  private _closingActionsSubscription;
290
290
  /** Subscription to viewport size changes. */
291
291
  private _viewportSubscription;
292
+ /** Implements BreakpointObserver to be used to detect handset landscape */
293
+ private _breakpointObserver;
294
+ private _handsetLandscapeSubscription;
292
295
  /**
293
296
  * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,
294
297
  * closed autocomplete from being reopened if the user switches to another browser tab and then
package/badge/index.d.ts CHANGED
@@ -25,7 +25,10 @@ export declare class MatBadge implements OnInit, OnDestroy {
25
25
  private _ariaDescriber;
26
26
  private _renderer;
27
27
  private _animationMode?;
28
- /** The color of the badge. Can be `primary`, `accent`, or `warn`. */
28
+ /**
29
+ * The color of the badge. Can be `primary`, `accent`, or `warn`.
30
+ * Not recommended in M3, for more information see https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.
31
+ */
29
32
  get color(): ThemePalette;
30
33
  set color(value: ThemePalette);
31
34
  private _color;
@@ -148,7 +148,6 @@ export declare class MatBottomSheetContainer extends CdkDialogContainer implemen
148
148
  _onAnimationDone(event: AnimationEvent_2): void;
149
149
  _onAnimationStart(event: AnimationEvent_2): void;
150
150
  protected _captureInitialFocus(): void;
151
- private _toggleClass;
152
151
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetContainer, [null, null, { optional: true; }, null, null, null, null, null, null]>;
153
152
  static ɵcmp: i0.ɵɵComponentDeclaration<MatBottomSheetContainer, "mat-bottom-sheet-container", never, {}, {}, never, never, true, never>;
154
153
  }
package/button/index.d.ts CHANGED
@@ -114,7 +114,13 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
114
114
  */
115
115
  get ripple(): MatRipple;
116
116
  set ripple(v: MatRipple);
117
- /** Theme color palette of the button */
117
+ /**
118
+ * Theme color of the button. This API is supported in M2 themes only, it has
119
+ * no effect in M3 themes.
120
+ *
121
+ * For information on applying color variants in M3, see
122
+ * https://material.angular.io/guide/theming#using-component-color-variants.
123
+ */
118
124
  color?: string | null;
119
125
  /** Whether the ripple effect is disabled or not. */
120
126
  get disableRipple(): boolean;
@@ -109,7 +109,13 @@ export declare class MatCheckbox implements AfterViewInit, OnChanges, ControlVal
109
109
  _labelElement: ElementRef<HTMLInputElement>;
110
110
  /** Tabindex for the checkbox. */
111
111
  tabIndex: number;
112
- /** Palette color of the checkbox. */
112
+ /**
113
+ * Theme color of the checkbox. This API is supported in M2 themes only, it
114
+ * has no effect in M3 themes.
115
+ *
116
+ * For information on applying color variants in M3, see
117
+ * https://material.angular.io/guide/theming#using-component-color-variants.
118
+ */
113
119
  color: string | undefined;
114
120
  /**
115
121
  * Reference to the MatRipple instance of the checkbox.
@@ -211,7 +217,11 @@ export declare type MatCheckboxClickAction = 'noop' | 'check' | 'check-indetermi
211
217
 
212
218
  /** Default `mat-checkbox` options that can be overridden. */
213
219
  export declare interface MatCheckboxDefaultOptions {
214
- /** Default theme color palette to be used for checkboxes. */
220
+ /**
221
+ * Default theme color palette to be used for checkboxes. This API is supported in M2 themes
222
+ * only, it has no effect in M3 themes. For information on applying color variants in M3, see
223
+ * https://material.angular.io/guide/theming#using-component-color-variants
224
+ */
215
225
  color?: ThemePalette;
216
226
  /** Default checkbox click action for checkboxes. */
217
227
  clickAction?: MatCheckboxClickAction;
package/chips/index.d.ts CHANGED
@@ -13,6 +13,7 @@ import { FormGroupDirective } from '@angular/forms';
13
13
  import * as i0 from '@angular/core';
14
14
  import * as i1 from '@angular/material/core';
15
15
  import { InjectionToken } from '@angular/core';
16
+ import { Injector } from '@angular/core';
16
17
  import { MatFormField } from '@angular/material/form-field';
17
18
  import { MatFormFieldControl } from '@angular/material/form-field';
18
19
  import { MatRipple } from '@angular/material/core';
@@ -184,7 +185,13 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
184
185
  get value(): any;
185
186
  set value(value: any);
186
187
  protected _value: any;
187
- /** Theme color palette of the chip. */
188
+ /**
189
+ * Theme color of the chip. This API is supported in M2 themes only, it has no
190
+ * effect in M3 themes.
191
+ *
192
+ * For information on applying color variants in M3, see
193
+ * https://material.angular.io/guide/theming#using-component-color-variants.
194
+ */
188
195
  color?: string | null;
189
196
  /**
190
197
  * Determines whether or not the chip displays the remove styling and emits (removed) events.
@@ -226,7 +233,7 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
226
233
  * Used to improve initial load time of large applications.
227
234
  */
228
235
  _rippleLoader: MatRippleLoader;
229
- private _injector;
236
+ protected _injector: Injector;
230
237
  constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _focusMonitor: FocusMonitor, _document: any, animationMode?: string, _globalRippleOptions?: RippleGlobalOptions | undefined, tabIndex?: string);
231
238
  ngOnInit(): void;
232
239
  ngAfterViewInit(): void;
@@ -354,7 +361,7 @@ export declare interface MatChipEvent {
354
361
  * An extension of the MatChipSet component used with MatChipRow chips and
355
362
  * the matChipInputFor directive.
356
363
  */
357
- export declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterViewInit, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy {
364
+ export declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterViewInit, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy, OnInit {
358
365
  ngControl: NgControl;
359
366
  /**
360
367
  * Implemented as part of MatFormFieldControl.
@@ -447,6 +454,7 @@ export declare class MatChipGrid extends MatChipSet implements AfterContentInit,
447
454
  get errorState(): boolean;
448
455
  set errorState(value: boolean);
449
456
  constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, dir: Directionality, parentForm: NgForm, parentFormGroup: FormGroupDirective, defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl);
457
+ ngOnInit(): void;
450
458
  ngAfterContentInit(): void;
451
459
  ngAfterViewInit(): void;
452
460
  ngDoCheck(): void;
@@ -1,18 +1,17 @@
1
1
  @use './theming/theming';
2
2
  @use './theming/inspection';
3
3
  @use './theming/validation';
4
- @use './style/private';
5
4
  @use './ripple/ripple-theme';
6
5
  @use './option/option-theme';
7
6
  @use './option/optgroup-theme';
8
7
  @use './selection/pseudo-checkbox/pseudo-checkbox-theme';
9
- @use './style/elevation';
10
8
  @use './style/sass-utils';
11
9
  @use './typography/typography';
12
10
  @use './tokens/token-utils';
13
11
  @use './tokens/m2/mat/app' as tokens-mat-app;
14
12
  @use './tokens/m2/mat/ripple' as tokens-mat-ripple;
15
13
  @use './tokens/m2/mat/option' as tokens-mat-option;
14
+ @use './tokens/m2/mat/optgroup' as tokens-mat-optgroup;
16
15
  @use './tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
17
16
  @use './tokens/m2/mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;
18
17
 
@@ -41,6 +40,10 @@ $_has-inserted-loaded-marker: false;
41
40
  @include option-theme.base($theme);
42
41
  @include optgroup-theme.base($theme);
43
42
  @include pseudo-checkbox-theme.base($theme);
43
+ @include sass-utils.current-selector-or-root() {
44
+ @include token-utils.create-token-values(tokens-mat-app.$prefix,
45
+ tokens-mat-app.get-unthemable-tokens());
46
+ }
44
47
  }
45
48
 
46
49
  // The marker is a concrete style no matter which Material version we're targeting.
@@ -60,18 +63,6 @@ $_has-inserted-loaded-marker: false;
60
63
  @include token-utils.create-token-values(tokens-mat-app.$prefix,
61
64
  tokens-mat-app.get-color-tokens($theme));
62
65
  }
63
-
64
- // Provides external CSS classes for each elevation value. Each CSS class is formatted as
65
- // `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element is
66
- // elevated.
67
- @for $zValue from 0 through 24 {
68
- $selector: elevation.$prefix + $zValue;
69
- // We need the `mat-mdc-elevation-specific`, because some MDC mixins
70
- // come with elevation baked in and we don't have a way of removing it.
71
- .#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
72
- @include private.private-theme-elevation($zValue, $theme);
73
- }
74
- }
75
66
  }
76
67
  }
77
68
 
@@ -149,6 +140,8 @@ $_has-inserted-loaded-marker: false;
149
140
  $mat-app-tokens: token-utils.get-tokens-for($tokens, tokens-mat-app.$prefix, $options...);
150
141
  $mat-ripple-tokens: token-utils.get-tokens-for($tokens, tokens-mat-ripple.$prefix, $options...);
151
142
  $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
143
+ $mat-optgroup-tokens:
144
+ token-utils.get-tokens-for($tokens, tokens-mat-optgroup.$prefix, $options...);
152
145
  $mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,
153
146
  tokens-mat-full-pseudo-checkbox.$prefix, $options...);
154
147
  $mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,
@@ -157,6 +150,7 @@ $_has-inserted-loaded-marker: false;
157
150
  @include token-utils.create-token-values(tokens-mat-app.$prefix, $mat-app-tokens);
158
151
  @include token-utils.create-token-values(tokens-mat-ripple.$prefix, $mat-ripple-tokens);
159
152
  @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
153
+ @include token-utils.create-token-values(tokens-mat-optgroup.$prefix, $mat-optgroup-tokens);
160
154
  @include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,
161
155
  $mat-full-pseudo-checkbox-tokens);
162
156
  @include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,
package/core/_core.scss CHANGED
@@ -2,6 +2,7 @@
2
2
  @use './tokens/m2/mat/app' as tokens-mat-app;
3
3
  @use './tokens/token-utils';
4
4
  @use './ripple/ripple';
5
+ @use './style/elevation';
5
6
  @use './focus-indicators/private';
6
7
  @use './mdc-helpers/mdc-helpers';
7
8
 
@@ -18,13 +19,26 @@
18
19
  // Wrapper element that provides the theme background when the
19
20
  // user's content isn't inside of a `mat-sidenav-container`.
20
21
  @at-root {
21
- .mat-app-background {
22
- @include mdc-helpers.disable-mdc-fallback-declarations {
23
- @include token-utils.use-tokens(tokens-mat-app.$prefix, tokens-mat-app.get-token-slots()) {
24
- // Note: we need to emit fallback values here to avoid errors in internal builds.
22
+ // Note: we need to emit fallback values here to avoid errors in internal builds.
23
+ @include mdc-helpers.disable-mdc-fallback-declarations {
24
+ @include token-utils.use-tokens(tokens-mat-app.$prefix, tokens-mat-app.get-token-slots()) {
25
+ .mat-app-background {
25
26
  @include token-utils.create-token-slot(background-color, background-color, transparent);
26
27
  @include token-utils.create-token-slot(color, text-color, inherit);
27
28
  }
29
+
30
+ // Provides external CSS classes for each elevation value. Each CSS class is formatted as
31
+ // `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element
32
+ // is elevated.
33
+ @for $zValue from 0 through 24 {
34
+ $selector: elevation.$prefix + $zValue;
35
+ // We need the `mat-mdc-elevation-specific`, because some MDC mixins
36
+ // come with elevation baked in and we don't have a way of removing it.
37
+ .#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
38
+ @include token-utils.create-token-slot(box-shadow, 'elevation-shadow-level-#{$zValue}',
39
+ none);
40
+ }
41
+ }
28
42
  }
29
43
  }
30
44
  }
@@ -48,7 +48,7 @@
48
48
  /// @param {Map} $input Configuration for the "input" typographic level.
49
49
  /// @returns {Map} A typography config for the application.
50
50
  ///
51
- /// @deprecated Use `mat.m2-define-typography-config` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
51
+ /// @deprecated Use `mat.m2-define-typography-config` instead. See https://v17.material.angular.io/guide/mdc-migration for information about migrating.
52
52
  /// @breaking-change 17.0.0
53
53
  @function define-legacy-typography-config(
54
54
  $font-family: 'Roboto, "Helvetica Neue", sans-serif',
@@ -12,6 +12,8 @@
12
12
  /// The Material Design spec references some neutral hues that are not generated by
13
13
  /// https://m3.material.io/theme-builder. For now we use this function to estimate the missing hues
14
14
  /// by blending the nearest hues that are generated.
15
+ /// Note: when updating, the corresponding logic in the theme generation schematic should be
16
+ /// updated as well. See `src/material/schematics/ng-generate/m3-theme/index.ts#patchMissingHues`
15
17
  @function _patch-missing-hues($palette) {
16
18
  $neutral: map.get($palette, neutral);
17
19
  $palette: map.set($palette, neutral, 4, _estimate-hue($neutral, 4, 0, 10));
@@ -120,6 +120,7 @@ $_density-tokens: (
120
120
  container-size: (56px, 52px, 48px, 40px),
121
121
  form-field-container-height: (40px, 40px, 40px, 40px, 40px, 36px),
122
122
  form-field-container-vertical-padding: (8px, 8px, 8px, 8px, 8px, 6px),
123
+ touch-target-display: (block, block, none, none),
123
124
  ),
124
125
  (mat, radio): (
125
126
  touch-target-display: (block, block, none, none),
@@ -1,6 +1,9 @@
1
+ @use '@material/elevation/elevation-theme' as mdc-elevation;
2
+ @use 'sass:map';
1
3
  @use '../../token-utils';
2
4
  @use '../../../theming/inspection';
3
5
  @use '../../../style/sass-utils';
6
+ @use '../../../style/elevation';
4
7
 
5
8
  // The prefix used to generate the fully qualified name for tokens in this file.
6
9
  $prefix: (mat, app);
@@ -13,10 +16,19 @@ $prefix: (mat, app);
13
16
 
14
17
  // Tokens that can be configured through Angular Material's color theming API.
15
18
  @function get-color-tokens($theme) {
16
- @return (
19
+ $tokens: (
17
20
  background-color: inspection.get-theme-color($theme, background, background),
18
21
  text-color: inspection.get-theme-color($theme, foreground, text),
19
22
  );
23
+
24
+ @for $zValue from 0 through 24 {
25
+ $elevation-color: inspection.get-theme-color($theme, foreground, elevation);
26
+ $shadow: mdc-elevation.elevation-box-shadow($zValue,
27
+ if($elevation-color == null, elevation.$color, $elevation-color));
28
+ $tokens: map.set($tokens, 'elevation-shadow-level-#{$zValue}', $shadow);
29
+ }
30
+
31
+ @return $tokens;
20
32
  }
21
33
 
22
34
  // Tokens that can be configured through Angular Material's typography theming API.
@@ -18,6 +18,9 @@ $prefix: (mat, menu);
18
18
  item-trailing-spacing: 16px,
19
19
  item-with-icon-leading-spacing: 16px,
20
20
  item-with-icon-trailing-spacing: 16px,
21
+ // Note that this uses a value, rather than a computed box-shadow, because we use
22
+ // the value at runtime to determine which shadow to set based on the menu's depth.
23
+ base-elevation-level: 8,
21
24
  );
22
25
  }
23
26
 
@@ -69,6 +69,7 @@ $prefix: (mat, paginator);
69
69
  container-size: map.get($size-scale, $density-scale),
70
70
  form-field-container-height: $form-field-height,
71
71
  form-field-container-vertical-padding: $form-field-vertical-padding,
72
+ touch-target-display: if($density-scale < -2, none, block),
72
73
  );
73
74
  }
74
75
 
@@ -1,4 +1,5 @@
1
1
  @use 'sass:map';
2
+ @use '@material/elevation' as mdc-elevation;
2
3
  @use '../../token-utils';
3
4
 
4
5
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -10,10 +11,18 @@ $prefix: (mat, app);
10
11
  /// @param {Map} $token-slots Possible token slots
11
12
  /// @return {Map} A set of custom tokens for the app
12
13
  @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $shadow-color: map.get($systems, md-sys-color, shadow);
13
15
  $tokens: (
14
16
  background-color: map.get($systems, md-sys-color, background),
15
17
  text-color: map.get($systems, md-sys-color, on-background),
16
18
  );
17
19
 
20
+ @if ($shadow-color) {
21
+ @for $zValue from 0 through 24 {
22
+ $shadow: mdc-elevation.elevation-box-shadow($zValue, $shadow-color);
23
+ $tokens: map.set($tokens, 'elevation-shadow-level-#{$zValue}', $shadow);
24
+ }
25
+ }
26
+
18
27
  @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
19
28
  }
@@ -35,6 +35,9 @@ $prefix: (mat, menu);
35
35
  item-with-icon-leading-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
36
36
  item-with-icon-trailing-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
37
37
  container-color: map.get($systems, md-sys-color, surface-container),
38
+ // Note that this uses a value, rather than a computed box-shadow, because we use
39
+ // the value at runtime to determine which shadow to set based on the menu's depth.
40
+ base-elevation-level: token-utils.hardcode(2, $exclude-hardcoded),
38
41
  )
39
42
  );
40
43
 
@@ -40,6 +40,7 @@ import { OnInit } from '@angular/core';
40
40
  import { Overlay } from '@angular/cdk/overlay';
41
41
  import { Portal } from '@angular/cdk/portal';
42
42
  import { ScrollStrategy } from '@angular/cdk/overlay';
43
+ import { Signal } from '@angular/core';
43
44
  import { SimpleChanges } from '@angular/core';
44
45
  import { Subject } from 'rxjs';
45
46
  import { TemplatePortal } from '@angular/cdk/portal';
@@ -49,6 +50,7 @@ import { ValidationErrors } from '@angular/forms';
49
50
  import { Validator } from '@angular/forms';
50
51
  import { ValidatorFn } from '@angular/forms';
51
52
  import { ViewContainerRef } from '@angular/core';
53
+ import { WritableSignal } from '@angular/core';
52
54
 
53
55
  /** Function that can be used to filter out dates from a calendar. */
54
56
  export declare type DateFilterFn<D> = (date: D | null) => boolean;
@@ -696,7 +698,11 @@ declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D
696
698
  private _startAt;
697
699
  /** The view that the calendar should start in. */
698
700
  startView: 'month' | 'year' | 'multi-year';
699
- /** Color palette to use on the datepicker's calendar. */
701
+ /**
702
+ * Color palette to use on the datepicker's calendar. This API is supported in M2 themes only, it
703
+ * has no effect in M3 themes. For information on applying color variants in M3, see
704
+ * https://material.angular.io/guide/theming#using-component-color-variants
705
+ */
700
706
  get color(): ThemePalette;
701
707
  set color(value: ThemePalette);
702
708
  _color: ThemePalette;
@@ -769,6 +775,7 @@ declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D
769
775
  /** Emits when the datepicker's state changes. */
770
776
  readonly stateChanges: Subject<void>;
771
777
  private _injector;
778
+ private readonly _changeDetectorRef;
772
779
  constructor(_overlay: Overlay,
773
780
  /**
774
781
  * @deprecated parameter is unused and will be removed
@@ -854,7 +861,13 @@ export declare class MatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>
854
861
  private _model;
855
862
  /** Reference to the internal calendar component. */
856
863
  _calendar: MatCalendar<D>;
857
- /** Palette color of the internal calendar. */
864
+ /**
865
+ * Theme color of the internal calendar. This API is supported in M2 themes
866
+ * only, it has no effect in M3 themes.
867
+ *
868
+ * For information on applying color variants in M3, see
869
+ * https://material.angular.io/guide/theming#using-component-color-variants.
870
+ */
858
871
  color: ThemePalette;
859
872
  /** Reference to the datepicker that created the overlay. */
860
873
  datepicker: MatDatepickerBase<any, S, D>;
@@ -922,9 +935,12 @@ export declare interface MatDatepickerControl<D> {
922
935
  export declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D> implements MatDatepickerControl<D | null>, OnDestroy {
923
936
  private _formField?;
924
937
  private _closedSubscription;
938
+ private _openedSubscription;
925
939
  /** The datepicker that this input is associated with. */
926
940
  set matDatepicker(datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>);
927
941
  _datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>;
942
+ /** The id of the panel owned by this input. */
943
+ protected _ariaOwns: WritableSignal<string | null>;
928
944
  /** The minimum valid date. */
929
945
  get min(): D | null;
930
946
  set min(value: D | null);
@@ -1144,7 +1160,11 @@ export declare class MatDatepickerModule {
1144
1160
  export declare interface MatDatepickerPanel<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> {
1145
1161
  /** Stream that emits whenever the date picker is closed. */
1146
1162
  closedStream: EventEmitter<void>;
1147
- /** Color palette to use on the datepicker's calendar. */
1163
+ /**
1164
+ * Color palette to use on the datepicker's calendar. This API is supported in M2 themes only, it
1165
+ * has no effect in M3 themes. For information on applying color variants in M3, see
1166
+ * https://material.angular.io/guide/theming#using-component-color-variants
1167
+ */
1148
1168
  color: ThemePalette;
1149
1169
  /** The input element the datepicker is associated with. */
1150
1170
  datepickerInput: C;
@@ -1207,6 +1227,7 @@ export declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRan
1207
1227
  private _dateAdapter;
1208
1228
  private _formField?;
1209
1229
  private _closedSubscription;
1230
+ private _openedSubscription;
1210
1231
  /** Current value of the range input. */
1211
1232
  get value(): DateRange<D> | null;
1212
1233
  /** Unique ID for the group. */
@@ -1227,6 +1248,8 @@ export declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRan
1227
1248
  get rangePicker(): MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>;
1228
1249
  set rangePicker(rangePicker: MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>);
1229
1250
  private _rangePicker;
1251
+ /** The id of the panel owned by this input. */
1252
+ _ariaOwns: WritableSignal<string | null>;
1230
1253
  /** Whether the input is required. */
1231
1254
  get required(): boolean;
1232
1255
  set required(value: boolean);
@@ -1336,6 +1359,7 @@ declare interface MatDateRangeInputParent<D> {
1336
1359
  opened: boolean;
1337
1360
  id: string;
1338
1361
  };
1362
+ _ariaOwns?: Signal<string | null>;
1339
1363
  _startInput: MatDateRangeInputPartBase<D>;
1340
1364
  _endInput: MatDateRangeInputPartBase<D>;
1341
1365
  _groupDisabled: boolean;
package/dialog/index.d.ts CHANGED
@@ -350,7 +350,6 @@ export declare class MatDialogContainer extends CdkDialogContainer<MatDialogConf
350
350
  private _exitAnimationDuration;
351
351
  /** Current timer for dialog animations. */
352
352
  private _animationTimer;
353
- private _isDestroyed;
354
353
  constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, _document: any, dialogConfig: MatDialogConfig, interactivityChecker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, _animationMode?: string | undefined, focusMonitor?: FocusMonitor);
355
354
  protected _contentAttached(): void;
356
355
  /** Starts the dialog open animation if enabled. */
@@ -73,6 +73,7 @@ export declare class MatTestDialogOpener<T = unknown, R = unknown> implements On
73
73
  /** Data passed to the `MatDialog` close method. */
74
74
  closedResult: R | undefined;
75
75
  private readonly _afterClosedSubscription;
76
+ private readonly _ngZone;
76
77
  /** Static method that prepares this class to open the provided component. */
77
78
  static withComponent<T = unknown, R = unknown>(component: ComponentType<T>, config?: MatDialogConfig): ComponentType<MatTestDialogOpener<T, R>>;
78
79
  constructor(dialog: MatDialog);