@angular/material 19.0.0-rc.0 → 19.0.0-rc.2

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 (110) hide show
  1. package/badge/index.d.ts +1 -2
  2. package/bottom-sheet/index.d.ts +6 -0
  3. package/button-toggle/index.d.ts +2 -1
  4. package/core/m2/_theming.scss +2 -1
  5. package/core/theming/_inspection.scss +28 -17
  6. package/core/theming/_m2-inspection.scss +4 -4
  7. package/core/theming/_theming.scss +2 -1
  8. package/core/tokens/_m3-tokens.scss +3 -3
  9. package/core/tokens/_token-definition.scss +4 -3
  10. package/core/tokens/m2/mat/_badge.scss +1 -1
  11. package/core/tokens/m2/mat/_datepicker.scss +1 -1
  12. package/core/tokens/m2/mat/_menu.scss +5 -3
  13. package/core/tokens/m2/mat/_sort.scss +1 -1
  14. package/core/tokens/m3/mat/_menu.scss +6 -3
  15. package/core/tokens/m3/mdc/_filled-text-field.scss +9 -11
  16. package/datepicker/index.d.ts +4 -4
  17. package/dialog/index.d.ts +1 -0
  18. package/fesm2022/autocomplete.mjs +15 -20
  19. package/fesm2022/autocomplete.mjs.map +1 -1
  20. package/fesm2022/badge.mjs +13 -15
  21. package/fesm2022/badge.mjs.map +1 -1
  22. package/fesm2022/bottom-sheet.mjs +16 -10
  23. package/fesm2022/bottom-sheet.mjs.map +1 -1
  24. package/fesm2022/button-toggle.mjs +14 -15
  25. package/fesm2022/button-toggle.mjs.map +1 -1
  26. package/fesm2022/button.mjs +34 -34
  27. package/fesm2022/button.mjs.map +1 -1
  28. package/fesm2022/card.mjs +46 -46
  29. package/fesm2022/card.mjs.map +1 -1
  30. package/fesm2022/checkbox.mjs +16 -17
  31. package/fesm2022/checkbox.mjs.map +1 -1
  32. package/fesm2022/chips.mjs +43 -46
  33. package/fesm2022/chips.mjs.map +1 -1
  34. package/fesm2022/core.mjs +68 -75
  35. package/fesm2022/core.mjs.map +1 -1
  36. package/fesm2022/datepicker.mjs +95 -97
  37. package/fesm2022/datepicker.mjs.map +1 -1
  38. package/fesm2022/dialog.mjs +29 -31
  39. package/fesm2022/dialog.mjs.map +1 -1
  40. package/fesm2022/divider.mjs +7 -7
  41. package/fesm2022/divider.mjs.map +1 -1
  42. package/fesm2022/expansion.mjs +27 -29
  43. package/fesm2022/expansion.mjs.map +1 -1
  44. package/fesm2022/form-field.mjs +42 -43
  45. package/fesm2022/form-field.mjs.map +1 -1
  46. package/fesm2022/grid-list.mjs +22 -22
  47. package/fesm2022/grid-list.mjs.map +1 -1
  48. package/fesm2022/icon/testing.mjs +7 -7
  49. package/fesm2022/icon/testing.mjs.map +1 -1
  50. package/fesm2022/icon.mjs +10 -10
  51. package/fesm2022/icon.mjs.map +1 -1
  52. package/fesm2022/input.mjs +9 -9
  53. package/fesm2022/input.mjs.map +1 -1
  54. package/fesm2022/list.mjs +49 -49
  55. package/fesm2022/list.mjs.map +1 -1
  56. package/fesm2022/menu.mjs +22 -65
  57. package/fesm2022/menu.mjs.map +1 -1
  58. package/fesm2022/paginator.mjs +13 -13
  59. package/fesm2022/paginator.mjs.map +1 -1
  60. package/fesm2022/progress-bar.mjs +7 -7
  61. package/fesm2022/progress-bar.mjs.map +1 -1
  62. package/fesm2022/progress-spinner.mjs +7 -7
  63. package/fesm2022/progress-spinner.mjs.map +1 -1
  64. package/fesm2022/radio.mjs +13 -15
  65. package/fesm2022/radio.mjs.map +1 -1
  66. package/fesm2022/select.mjs +14 -14
  67. package/fesm2022/select.mjs.map +1 -1
  68. package/fesm2022/sidenav.mjs +42 -28
  69. package/fesm2022/sidenav.mjs.map +1 -1
  70. package/fesm2022/slide-toggle.mjs +16 -18
  71. package/fesm2022/slide-toggle.mjs.map +1 -1
  72. package/fesm2022/slider.mjs +16 -16
  73. package/fesm2022/slider.mjs.map +1 -1
  74. package/fesm2022/snack-bar.mjs +25 -26
  75. package/fesm2022/snack-bar.mjs.map +1 -1
  76. package/fesm2022/sort.mjs +13 -13
  77. package/fesm2022/sort.mjs.map +1 -1
  78. package/fesm2022/stepper.mjs +31 -31
  79. package/fesm2022/stepper.mjs.map +1 -1
  80. package/fesm2022/table.mjs +55 -55
  81. package/fesm2022/table.mjs.map +1 -1
  82. package/fesm2022/tabs.mjs +49 -53
  83. package/fesm2022/tabs.mjs.map +1 -1
  84. package/fesm2022/timepicker.mjs +16 -18
  85. package/fesm2022/timepicker.mjs.map +1 -1
  86. package/fesm2022/toolbar.mjs +10 -10
  87. package/fesm2022/toolbar.mjs.map +1 -1
  88. package/fesm2022/tooltip.mjs +10 -10
  89. package/fesm2022/tooltip.mjs.map +1 -1
  90. package/fesm2022/tree.mjs +25 -25
  91. package/fesm2022/tree.mjs.map +1 -1
  92. package/form-field/index.d.ts +1 -0
  93. package/menu/index.d.ts +7 -8
  94. package/package.json +2 -2
  95. package/prebuilt-themes/azure-blue.css +1 -1
  96. package/prebuilt-themes/cyan-orange.css +1 -1
  97. package/prebuilt-themes/deeppurple-amber.css +1 -1
  98. package/prebuilt-themes/indigo-pink.css +1 -1
  99. package/prebuilt-themes/magenta-violet.css +1 -1
  100. package/prebuilt-themes/pink-bluegrey.css +1 -1
  101. package/prebuilt-themes/purple-green.css +1 -1
  102. package/prebuilt-themes/rose-red.css +1 -1
  103. package/schematics/ng-add/index.js +1 -1
  104. package/schematics/ng-add/index.mjs +1 -1
  105. package/schematics/ng-add/theming/create-custom-theme.js +12 -28
  106. package/schematics/ng-add/theming/create-custom-theme.mjs +12 -28
  107. package/schematics/ng-update/index_bundled.js +93 -1
  108. package/schematics/ng-update/index_bundled.js.map +4 -4
  109. package/select/index.d.ts +1 -0
  110. package/sidenav/index.d.ts +3 -0
package/badge/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare class MatBadge implements OnInit, OnDestroy {
21
21
  private _ariaDescriber;
22
22
  private _renderer;
23
23
  private _animationMode;
24
+ private _idGenerator;
24
25
  /**
25
26
  * Theme color of the badge. This API is supported in M2 themes only, it
26
27
  * has no effect in M3 themes.
@@ -52,8 +53,6 @@ export declare class MatBadge implements OnInit, OnDestroy {
52
53
  size: MatBadgeSize;
53
54
  /** Whether the badge is hidden. */
54
55
  hidden: boolean;
55
- /** Unique id for the badge */
56
- _id: number;
57
56
  /** Visible badge element. */
58
57
  private _badgeElement;
59
58
  /** Inline badge description. Used when the badge is applied to non-interactive host elements. */
@@ -115,6 +115,12 @@ export declare class MatBottomSheetConfig<D = any> {
115
115
  restoreFocus?: boolean;
116
116
  /** Scroll strategy to be used for the bottom sheet. */
117
117
  scrollStrategy?: ScrollStrategy;
118
+ /** Height for the bottom sheet. */
119
+ height?: string;
120
+ /** Minimum height for the bottom sheet. If a number is provided, assumes pixel units. */
121
+ minHeight?: number | string;
122
+ /** Maximum height for the bottom sheet. If a number is provided, assumes pixel units. */
123
+ maxHeight?: number | string;
118
124
  }
119
125
 
120
126
  /**
@@ -53,6 +53,7 @@ export declare class MatButtonToggle implements OnInit, AfterViewInit, OnDestroy
53
53
  private _changeDetectorRef;
54
54
  private _elementRef;
55
55
  private _focusMonitor;
56
+ private _idGenerator;
56
57
  private _checked;
57
58
  /**
58
59
  * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
@@ -150,7 +151,7 @@ export declare interface MatButtonToggleDefaultOptions {
150
151
  * setting an appearance on a button toggle or group.
151
152
  */
152
153
  appearance?: MatButtonToggleAppearance;
153
- /** Whetehr icon indicators should be hidden for single-selection button toggle groups. */
154
+ /** Whether icon indicators should be hidden for single-selection button toggle groups. */
154
155
  hideSingleSelectionIndicator?: boolean;
155
156
  /** Whether icon indicators should be hidden for multiple-selection button toggle groups. */
156
157
  hideMultipleSelectionIndicator?: boolean;
@@ -1,6 +1,7 @@
1
1
  @use 'sass:list';
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
+ @use 'sass:color';
4
5
  @use '../theming/theming';
5
6
  @use './palette';
6
7
 
@@ -82,7 +83,7 @@
82
83
  @return $color;
83
84
  }
84
85
 
85
- @return rgba($color, if($opacity == null, opacity($color), $opacity));
86
+ @return rgba($color, if($opacity == null, color.opacity($color), $opacity));
86
87
  }
87
88
 
88
89
  // Validates the specified theme by ensuring that the optional color config defines
@@ -62,10 +62,17 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
62
62
  }
63
63
  }
64
64
 
65
- /// Gets a color from a theme object. This function can take 2 or 3 arguments. If 2 arguments are
66
- /// passed, the second argument is treated as the name of a color role. If 3 arguments are passed,
67
- /// the second argument is treated as the name of a color palette (primary, secondary, etc.) and the
68
- /// third is treated as the palette hue (10, 50, etc.)
65
+ /// Gets a color from a theme object. This function take a different amount of arguments depending
66
+ /// on if it's working with an M2 or M3 theme:
67
+ /// - With an M3 theme it accepts either 2 or 3 arguments. If 2 arguments are passed, the second
68
+ /// argument is treated as the name of a color role. If 3 arguments are passed, the second argument
69
+ /// is treated as the name of a color palette (primary, secondary, etc.) and the third is treated
70
+ /// as the palette hue (10, 50, etc.).
71
+ /// - With an M2 theme theme it accepts between 2 and 4 arguments, or the equivalent of calling
72
+ /// the `m2-get-theme-color` function. The first argument is the theme, the second one is the
73
+ /// palette from which to extract the color, the third one is the hue within the palette and the
74
+ /// fourth is the opacity of the returned color.
75
+ /// the second one is the
69
76
  /// @param {Map} $theme The theme
70
77
  /// @param {String} $color-role-or-palette-name The name of the color role to get, or the name of a
71
78
  /// color palette.
@@ -74,25 +81,29 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
74
81
  /// @return {Color} The requested theme color.
75
82
  @function get-theme-color($theme, $args...) {
76
83
  $version: get-theme-version($theme);
77
- $args-count: list.length($args);
78
- @if $args-count != 1 and $args-count != 2 and $args-count != 3 {
79
- @error #{'Expected between 2 and 4 arguments. Got:'} $args-count + 1;
80
- }
84
+ $args-count: list.length($args) + 1;
81
85
 
86
+ // M2 theme
82
87
  @if $version == 0 {
88
+ @if $args-count < 2 or $args-count > 4 {
89
+ @error 'Expected between 2 and 4 arguments when working with an M2 theme. ' +
90
+ 'Got: #{$args-count}';
91
+ }
83
92
  @return m2-inspection.get-theme-color($theme, $args...);
84
93
  }
85
- @else if $version == 1 {
86
- @if $args-count == 1 {
87
- @return _get-theme-role-color($theme, $args...);
88
- }
89
- @else if $args-count == 2 {
90
- @return _get-theme-palette-color($theme, $args...);
94
+
95
+ // M3 theme
96
+ @if $version == 1 {
97
+ @if $args-count < 2 or $args-count > 3 {
98
+ @error 'Expected either 2 or 3 arguments when working with an M3 theme. Got: #{$args-count}';
91
99
  }
100
+ @return if($args-count == 2,
101
+ _get-theme-role-color($theme, $args...),
102
+ _get-theme-palette-color($theme, $args...)
103
+ );
92
104
  }
93
- @else {
94
- @error #{'Unrecognized theme version:'} $version;
95
- }
105
+
106
+ @error 'Unrecognized theme version: #{$version}';
96
107
  }
97
108
 
98
109
  /// Gets a role color from a theme object.
@@ -102,14 +102,14 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
102
102
  @return if(map.get($colors, is-dark), dark, light);
103
103
  }
104
104
 
105
- /// Gets a color from a theme object. This function can take 2 or 3 arguments. If 2 arguments are
106
- /// passed, the second argument is treated as the name of a color role. If 3 arguments are passed,
107
- /// the second argument is treated as the name of a color palette (primary, secondary, etc.) and the
108
- /// third is treated as the palette hue (10, 50, etc.)
105
+ /// Gets a color from a theme object. This function can take between 2 and 4 arguments. The first
106
+ /// argument is the theme, the second one is the palette from which to extract the color, the third
107
+ /// one is the hue within the palette and the fourth is the opacity of the returned color.
109
108
  /// @param {Map} $theme The theme
110
109
  /// @param {String} $palette-name The name of a color palette.
111
110
  /// @param {Number} $hue The palette hue to get (passing this argument means the second argument is
112
111
  /// interpreted as a palette name).
112
+ /// @param {Number} $opacity The alpha channel value for the color.
113
113
  /// @return {Color} The requested theme color.
114
114
  @function get-theme-color($theme, $palette-name, $args...) {
115
115
  $theme: _get-m2-config($theme);
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
  @use 'sass:math';
4
4
  @use 'sass:meta';
5
+ @use 'sass:color';
5
6
 
6
7
  // Whether to enable compatibility with legacy methods for accessing theme information.
7
8
  $theme-legacy-inspection-api-compatibility: true !default;
@@ -332,7 +333,7 @@ $private-internal-name: _mat-theming-internals-do-not-access;
332
333
  // We convert the rgba color into a solid one by taking the opacity from the rgba
333
334
  // value and using it to determine the percentage of the background to put
334
335
  // into foreground when mixing the colors together.
335
- @return mix($background-color, rgba($color, 1), (1 - opacity($color)) * 100%);
336
+ @return color.mix($background-color, rgba($color, 1), (1 - color.opacity($color)) * 100%);
336
337
  }
337
338
 
338
339
  // Clamps the density scale to a number between the given min and max.
@@ -130,7 +130,7 @@ $_cached-token-slots: null;
130
130
  @function create-map($keys, $prefix) {
131
131
  $result: ();
132
132
  @each $key in $keys {
133
- $result: map-merge($result, ($key: var(--#{$prefix}-#{$key})));
133
+ $result: map.merge($result, ($key: var(--#{$prefix}-#{$key})));
134
134
  }
135
135
  @return $result;
136
136
  }
@@ -191,8 +191,8 @@ $_cached-token-slots: null;
191
191
  'tertiary-fixed',
192
192
  'tertiary-fixed-dim'
193
193
  );
194
- @return map-merge(create-map($keys, $prefix), (
195
- shadow: map.get($mdc-sys-color, shadow)
194
+ @return map.merge(create-map($keys, $prefix), (
195
+ shadow: map.get($mdc-sys-color, shadow)
196
196
  ));
197
197
  }
198
198
 
@@ -124,11 +124,12 @@ $_system-fallbacks: null;
124
124
  /// Maps the values in a map to new values using the given mapping function
125
125
  /// @param {Map} $map The maps whose values will be mapped to new values.
126
126
  /// @param {Function} $fn The value mapping function.
127
- /// @param {Map} A new map with its values updated using the mapping function.
128
- @function map-values($map, $fn) {
127
+ /// @param {ArgList} $args Additional arguments to pass to the mapping function.
128
+ /// @return {Map} A new map with its values updated using the mapping function.
129
+ @function map-values($map, $fn, $args...) {
129
130
  $result: ();
130
131
  @each $key, $value in $map {
131
- $result: map.set($result, $key, meta.call($fn, $value));
132
+ $result: map.set($result, $key, meta.call($fn, $value, $args...));
132
133
  }
133
134
  @return $result;
134
135
  }
@@ -56,7 +56,7 @@ $prefix: (mat, badge);
56
56
  // the value to determine the percentage of the background to put into foreground when
57
57
  // mixing the colors together.
58
58
  @if (meta.type-of($disabled-background) == color and meta.type-of($app-background) == color) {
59
- $badge-opacity: opacity($disabled-background);
59
+ $badge-opacity: color.opacity($disabled-background);
60
60
  $disabled-background: color.mix($app-background,
61
61
  rgba($disabled-background, 1), (1 - $badge-opacity) * 100%);
62
62
  }
@@ -60,7 +60,7 @@ $private-default-overlap-color: #a8dab5;
60
60
  // for a solid border, but because we're using a dashed border for the
61
61
  // preview range, we need to bump its opacity to ensure that it's visible.
62
62
  @if meta.type-of($preview-outline-color) == color {
63
- $preview-outline-opacity: math.min(opacity($preview-outline-color) * 2, 1);
63
+ $preview-outline-opacity: math.min(color.opacity($preview-outline-color) * 2, 1);
64
64
  $preview-outline-color: rgba($preview-outline-color, $preview-outline-opacity);
65
65
  }
66
66
 
@@ -1,6 +1,7 @@
1
1
  @use '../../token-definition';
2
2
  @use '../../../theming/inspection';
3
3
  @use '../../../style/sass-utils';
4
+ @use '../../../style/elevation';
4
5
 
5
6
  // The prefix used to generate the fully qualified name for tokens in this file.
6
7
  $prefix: (mat, menu);
@@ -18,9 +19,10 @@ $prefix: (mat, menu);
18
19
  item-trailing-spacing: 16px,
19
20
  item-with-icon-leading-spacing: 16px,
20
21
  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,
22
+ container-elevation-shadow: elevation.get-box-shadow(8),
23
+
24
+ // Unused
25
+ base-elevation-level: null,
24
26
  );
25
27
  }
26
28
 
@@ -26,7 +26,7 @@ $prefix: (mat, sort);
26
26
  // when mixing the colors together. Otherwise, if it resolves to something different
27
27
  // (e.g. it resolves to a CSS variable), we use the color directly.
28
28
  @if (meta.type-of($table-background) == color and meta.type-of($text-color) == color) {
29
- $text-opacity: opacity($text-color);
29
+ $text-opacity: color.opacity($text-color);
30
30
  $arrow-color: color.mix($table-background, rgba($text-color, 1), (1 - $text-opacity) * 100%);
31
31
  }
32
32
  @else {
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../../../style/sass-utils';
3
3
  @use '../../token-definition';
4
+ @use '../../../style/elevation';
4
5
 
5
6
  // The prefix used to generate the fully qualified name for tokens in this file.
6
7
  $prefix: (mat, menu);
@@ -35,9 +36,11 @@ $prefix: (mat, menu);
35
36
  item-with-icon-leading-spacing: token-definition.hardcode(12px, $exclude-hardcoded),
36
37
  item-with-icon-trailing-spacing: token-definition.hardcode(12px, $exclude-hardcoded),
37
38
  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-definition.hardcode(2, $exclude-hardcoded),
39
+ container-elevation-shadow: token-definition.hardcode(
40
+ elevation.get-box-shadow(2), $exclude-hardcoded),
41
+
42
+ // Unused
43
+ base-elevation-level: null,
41
44
  )
42
45
  );
43
46
 
@@ -1,6 +1,5 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:meta';
3
- @use 'sass:list';
4
3
  @use '../../token-definition';
5
4
 
6
5
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -34,8 +33,8 @@ $prefix: (mdc, filled-text-field);
34
33
  );
35
34
 
36
35
  @return token-definition.namespace-tokens($prefix, (
37
- _fix-tokens($mdc-tokens),
38
- token-definition.map-values($variant-tokens, meta.get-function(_fix-tokens))
36
+ _fix-tokens($mdc-tokens, $systems),
37
+ token-definition.map-values($variant-tokens, meta.get-function(_fix-tokens), $systems)
39
38
  ), $token-slots);
40
39
  }
41
40
 
@@ -43,8 +42,9 @@ $prefix: (mdc, filled-text-field);
43
42
  /// Fixes inconsistent values in the filled text field tokens so that they can produce valid
44
43
  /// styles.
45
44
  /// @param {Map} $initial-tokens Map of filled text field tokens currently being generated.
45
+ /// @param {Map} $systems The MDC system tokens
46
46
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
47
- @function _fix-tokens($initial-tokens) {
47
+ @function _fix-tokens($initial-tokens, $systems) {
48
48
  // Need to get the hardcoded values, because they include opacities that are used for the disabled
49
49
  // state.
50
50
  $hardcoded-tokens: token-definition.get-mdc-tokens('filled-text-field', (), false);
@@ -80,13 +80,11 @@ $prefix: (mdc, filled-text-field);
80
80
  )
81
81
  ));
82
82
 
83
- $container-shape: map.get($tokens, container-shape);
84
-
85
- // The M2 token slots define a single `container-shape` slot while the M3 tokens provide a list
86
- // of shapes (e.g. top/bottom/left/right). Extract the first value so it matches the expected
87
- // token slot in M2.
88
- @if meta.type-of($container-shape) == 'list' {
89
- $tokens: map.set($tokens, container-shape, list.nth($container-shape, 1));
83
+ // The system tokens have this set as `corner-extra-small-top` which assumes that the value will
84
+ // be set as a `border-radius`, however we set it as `border-top-left-radius` and
85
+ // `border-top-right-radius`. Changing it at this point will be breaking so instead we remap it.
86
+ @if (map.get($tokens, container-shape)) {
87
+ $tokens: map.set($tokens, container-shape, map.get($systems, md-sys-shape, corner-extra-small));
90
88
  }
91
89
 
92
90
  @return $tokens;
@@ -454,6 +454,10 @@ export declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, A
454
454
  _cellPadding: string;
455
455
  /** Width of an individual cell. */
456
456
  _cellWidth: string;
457
+ /** ID for the start date label. */
458
+ _startDateLabelId: string;
459
+ /** ID for the end date label. */
460
+ _endDateLabelId: string;
457
461
  private _didDragSinceMouseDown;
458
462
  private _injector;
459
463
  /**
@@ -554,9 +558,6 @@ export declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, A
554
558
  private _touchendHandler;
555
559
  /** Finds the MatCalendarCell that corresponds to a DOM node. */
556
560
  private _getCellFromElement;
557
- private _id;
558
- _startDateLabelId: string;
559
- _endDateLabelId: string;
560
561
  static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendarBody<any>, never>;
561
562
  static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarBody<any>, "[mat-calendar-body]", ["matCalendarBody"], { "label": { "alias": "label"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "startValue": { "alias": "startValue"; "required": false; }; "endValue": { "alias": "endValue"; "required": false; }; "labelMinRequiredCells": { "alias": "labelMinRequiredCells"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "activeCell": { "alias": "activeCell"; "required": false; }; "isRange": { "alias": "isRange"; "required": false; }; "cellAspectRatio": { "alias": "cellAspectRatio"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "previewStart": { "alias": "previewStart"; "required": false; }; "previewEnd": { "alias": "previewEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedValueChange": "selectedValueChange"; "previewChange": "previewChange"; "activeDateChange": "activeDateChange"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; }, never, never, true, never>;
562
563
  }
@@ -620,7 +621,6 @@ export declare class MatCalendarHeader<D> {
620
621
  * for the minimum year, and the second string is the formatted label for the maximum year.
621
622
  */
622
623
  private _formatMinAndMaxYearLabels;
623
- private _id;
624
624
  _periodButtonLabelId: string;
625
625
  static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendarHeader<any>, never>;
626
626
  static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarHeader<any>, "mat-calendar-header", ["matCalendarHeader"], {}, {}, never, ["*"], true, never>;
package/dialog/index.d.ts CHANGED
@@ -125,6 +125,7 @@ export declare class MatDialog implements OnDestroy {
125
125
  private _defaultOptions;
126
126
  private _scrollStrategy;
127
127
  private _parentDialog;
128
+ private _idGenerator;
128
129
  protected _dialog: Dialog;
129
130
  private readonly _openDialogsAtThisLevel;
130
131
  private readonly _afterAllClosedAtThisLevel;
@@ -4,7 +4,7 @@ import { MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectio
4
4
  export { MatOptgroup, MatOption } from '@angular/material/core';
5
5
  import { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';
6
6
  import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
7
- import { ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
7
+ import { _IdGenerator, ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
8
8
  import { Platform, _getEventTarget } from '@angular/cdk/platform';
9
9
  import { trigger, state, style, transition, group, animate } from '@angular/animations';
10
10
  import { Subscription, Subject, merge, of, defer, fromEvent, Observable } from 'rxjs';
@@ -33,11 +33,6 @@ const panelAnimation = trigger('panelAnimation', [
33
33
  transition(':leave, visible => hidden', [animate('0.075s linear', style({ opacity: 0 }))]),
34
34
  ]);
35
35
 
36
- /**
37
- * Autocomplete IDs need to be unique across components, so this counter exists outside of
38
- * the component definition.
39
- */
40
- let _uniqueAutocompleteIdCounter = 0;
41
36
  /** Event object that is emitted when an autocomplete option is selected. */
42
37
  class MatAutocompleteSelectedEvent {
43
38
  source;
@@ -164,7 +159,7 @@ class MatAutocomplete {
164
159
  }
165
160
  }
166
161
  /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
167
- id = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;
162
+ id = inject(_IdGenerator).getId('mat-autocomplete-');
168
163
  /**
169
164
  * Tells any descendant `mat-optgroup` to use the inert a11y pattern.
170
165
  * @docs-private
@@ -247,10 +242,10 @@ class MatAutocomplete {
247
242
  _skipPredicate() {
248
243
  return false;
249
244
  }
250
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
251
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-next.10", type: MatAutocomplete, isStandalone: true, selector: "mat-autocomplete", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], displayWith: "displayWith", autoActiveFirstOption: ["autoActiveFirstOption", "autoActiveFirstOption", booleanAttribute], autoSelectActiveOption: ["autoSelectActiveOption", "autoSelectActiveOption", booleanAttribute], requireSelection: ["requireSelection", "requireSelection", booleanAttribute], panelWidth: "panelWidth", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], classList: ["class", "classList"], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute] }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed", optionActivated: "optionActivated" }, host: { classAttribute: "mat-mdc-autocomplete" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: "options", predicate: MatOption, descendants: true }, { propertyName: "optionGroups", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], exportAs: ["matAutocomplete"], ngImport: i0, template: "<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [class]=\"_classList\"\n [class.mat-mdc-autocomplete-visible]=\"showPanel\"\n [class.mat-mdc-autocomplete-hidden]=\"!showPanel\"\n [class.mat-primary]=\"_color === 'primary'\"\n [class.mat-accent]=\"_color === 'accent'\"\n [class.mat-warn]=\"_color === 'warn'\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: ["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
245
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
246
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-rc.0", type: MatAutocomplete, isStandalone: true, selector: "mat-autocomplete", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], displayWith: "displayWith", autoActiveFirstOption: ["autoActiveFirstOption", "autoActiveFirstOption", booleanAttribute], autoSelectActiveOption: ["autoSelectActiveOption", "autoSelectActiveOption", booleanAttribute], requireSelection: ["requireSelection", "requireSelection", booleanAttribute], panelWidth: "panelWidth", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], classList: ["class", "classList"], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute] }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed", optionActivated: "optionActivated" }, host: { classAttribute: "mat-mdc-autocomplete" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: "options", predicate: MatOption, descendants: true }, { propertyName: "optionGroups", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], exportAs: ["matAutocomplete"], ngImport: i0, template: "<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [class]=\"_classList\"\n [class.mat-mdc-autocomplete-visible]=\"showPanel\"\n [class.mat-mdc-autocomplete-hidden]=\"!showPanel\"\n [class.mat-primary]=\"_color === 'primary'\"\n [class.mat-accent]=\"_color === 'accent'\"\n [class.mat-warn]=\"_color === 'warn'\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: ["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
252
247
  }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocomplete, decorators: [{
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocomplete, decorators: [{
254
249
  type: Component,
255
250
  args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', host: {
256
251
  'class': 'mat-mdc-autocomplete',
@@ -312,10 +307,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
312
307
  class MatAutocompleteOrigin {
313
308
  elementRef = inject(ElementRef);
314
309
  constructor() { }
315
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive });
316
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatAutocompleteOrigin, isStandalone: true, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 });
310
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive });
311
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatAutocompleteOrigin, isStandalone: true, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 });
317
312
  }
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
319
314
  type: Directive,
320
315
  args: [{
321
316
  selector: '[matAutocompleteOrigin]',
@@ -1162,10 +1157,10 @@ class MatAutocompleteTrigger {
1162
1157
  this._trackedModal = null;
1163
1158
  }
1164
1159
  }
1165
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1166
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-next.10", type: MatAutocompleteTrigger, isStandalone: true, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled", booleanAttribute] }, host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-controls": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesOnChanges: true, ngImport: i0 });
1160
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1161
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-rc.0", type: MatAutocompleteTrigger, isStandalone: true, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled", booleanAttribute] }, host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-controls": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesOnChanges: true, ngImport: i0 });
1167
1162
  }
1168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
1163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
1169
1164
  type: Directive,
1170
1165
  args: [{
1171
1166
  selector: `input[matAutocomplete], textarea[matAutocomplete]`,
@@ -1207,8 +1202,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
1207
1202
  }] } });
1208
1203
 
1209
1204
  class MatAutocompleteModule {
1210
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1211
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, imports: [OverlayModule,
1205
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1206
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, imports: [OverlayModule,
1212
1207
  MatOptionModule,
1213
1208
  MatCommonModule,
1214
1209
  MatAutocomplete,
@@ -1219,13 +1214,13 @@ class MatAutocompleteModule {
1219
1214
  MatCommonModule,
1220
1215
  MatAutocompleteTrigger,
1221
1216
  MatAutocompleteOrigin] });
1222
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,
1217
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,
1223
1218
  MatOptionModule,
1224
1219
  MatCommonModule, CdkScrollableModule,
1225
1220
  MatOptionModule,
1226
1221
  MatCommonModule] });
1227
1222
  }
1228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, decorators: [{
1223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, decorators: [{
1229
1224
  type: NgModule,
1230
1225
  args: [{
1231
1226
  imports: [