@angular/material 17.0.0 → 17.1.0-next.0

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 (182) hide show
  1. package/autocomplete/index.d.ts +0 -2
  2. package/button/_button-theme.scss +4 -0
  3. package/button/_icon-button-theme.scss +5 -1
  4. package/card/testing/index.d.ts +1 -1
  5. package/checkbox/index.d.ts +1 -1
  6. package/chips/index.d.ts +71 -67
  7. package/core/index.d.ts +1 -1
  8. package/core/ripple/_ripple-theme.scss +51 -19
  9. package/core/tokens/m2/_index.scss +29 -8
  10. package/datepicker/index.d.ts +21 -23
  11. package/datepicker/testing/index.d.ts +1 -1
  12. package/dialog/index.d.ts +1 -1
  13. package/dialog/testing/index.d.ts +1 -1
  14. package/esm2022/autocomplete/autocomplete-trigger.mjs +7 -7
  15. package/esm2022/button/icon-button.mjs +4 -4
  16. package/esm2022/card/testing/card-harness.mjs +9 -1
  17. package/esm2022/checkbox/checkbox.mjs +29 -14
  18. package/esm2022/chips/chip-action.mjs +14 -13
  19. package/esm2022/chips/chip-grid.mjs +29 -16
  20. package/esm2022/chips/chip-input.mjs +14 -17
  21. package/esm2022/chips/chip-listbox.mjs +19 -22
  22. package/esm2022/chips/chip-option.mjs +11 -10
  23. package/esm2022/chips/chip-row.mjs +4 -4
  24. package/esm2022/chips/chip-set.mjs +19 -18
  25. package/esm2022/chips/chip.mjs +49 -42
  26. package/esm2022/core/ripple/ripple-ref.mjs +10 -2
  27. package/esm2022/core/ripple/ripple-renderer.mjs +11 -11
  28. package/esm2022/core/version.mjs +1 -1
  29. package/esm2022/datepicker/calendar-body.mjs +2 -2
  30. package/esm2022/datepicker/date-range-input.mjs +10 -10
  31. package/esm2022/datepicker/datepicker-base.mjs +41 -49
  32. package/esm2022/datepicker/datepicker-input-base.mjs +6 -6
  33. package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
  34. package/esm2022/datepicker/testing/calendar-harness.mjs +11 -4
  35. package/esm2022/dialog/dialog-ref.mjs +10 -4
  36. package/esm2022/dialog/testing/dialog-harness.mjs +11 -4
  37. package/esm2022/dialog/testing/public-api.mjs +2 -2
  38. package/esm2022/expansion/accordion.mjs +7 -13
  39. package/esm2022/expansion/expansion-panel-header.mjs +13 -13
  40. package/esm2022/expansion/expansion-panel.mjs +6 -6
  41. package/esm2022/expansion/testing/expansion-harness.mjs +14 -6
  42. package/esm2022/grid-list/testing/grid-tile-harness.mjs +9 -3
  43. package/esm2022/icon/icon.mjs +24 -28
  44. package/esm2022/icon/testing/icon-harness-filters.mjs +7 -2
  45. package/esm2022/icon/testing/icon-harness.mjs +4 -3
  46. package/esm2022/list/list-base.mjs +6 -6
  47. package/esm2022/list/testing/list-item-harness-base.mjs +18 -6
  48. package/esm2022/list/testing/public-api.mjs +2 -2
  49. package/esm2022/paginator/paginator.mjs +32 -35
  50. package/esm2022/progress-bar/progress-bar.mjs +25 -20
  51. package/esm2022/progress-spinner/progress-spinner.mjs +34 -33
  52. package/esm2022/radio/radio.mjs +40 -34
  53. package/esm2022/select/select.mjs +45 -37
  54. package/esm2022/slider/slider-input.mjs +23 -22
  55. package/esm2022/slider/slider-interface.mjs +16 -1
  56. package/esm2022/slider/slider-thumb.mjs +6 -6
  57. package/esm2022/slider/slider.mjs +73 -72
  58. package/esm2022/slider/testing/slider-harness-filters.mjs +7 -2
  59. package/esm2022/slider/testing/slider-harness.mjs +4 -3
  60. package/esm2022/slider/testing/slider-thumb-harness.mjs +3 -2
  61. package/esm2022/sort/sort-header.mjs +16 -24
  62. package/esm2022/sort/sort.mjs +12 -19
  63. package/esm2022/stepper/step-header.mjs +7 -12
  64. package/esm2022/stepper/stepper.mjs +1 -1
  65. package/esm2022/stepper/testing/step-harness-filters.mjs +7 -2
  66. package/esm2022/stepper/testing/stepper-harness.mjs +4 -3
  67. package/esm2022/tabs/paginated-tab-header.mjs +12 -18
  68. package/esm2022/tabs/tab-group.mjs +54 -70
  69. package/esm2022/tabs/tab-header.mjs +7 -13
  70. package/esm2022/tabs/tab-label-wrapper.mjs +12 -8
  71. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +43 -37
  72. package/esm2022/tabs/tab.mjs +12 -12
  73. package/esm2022/toolbar/testing/toolbar-harness.mjs +7 -2
  74. package/esm2022/toolbar/toolbar.mjs +11 -16
  75. package/esm2022/tree/node.mjs +20 -20
  76. package/esm2022/tree/padding.mjs +11 -4
  77. package/expansion/index.d.ts +11 -19
  78. package/expansion/testing/index.d.ts +1 -1
  79. package/fesm2022/autocomplete.mjs +6 -6
  80. package/fesm2022/autocomplete.mjs.map +1 -1
  81. package/fesm2022/button.mjs +4 -4
  82. package/fesm2022/button.mjs.map +1 -1
  83. package/fesm2022/card/testing.mjs +9 -1
  84. package/fesm2022/card/testing.mjs.map +1 -1
  85. package/fesm2022/checkbox.mjs +29 -14
  86. package/fesm2022/checkbox.mjs.map +1 -1
  87. package/fesm2022/chips.mjs +144 -119
  88. package/fesm2022/chips.mjs.map +1 -1
  89. package/fesm2022/core.mjs +20 -12
  90. package/fesm2022/core.mjs.map +1 -1
  91. package/fesm2022/datepicker/testing.mjs +11 -4
  92. package/fesm2022/datepicker/testing.mjs.map +1 -1
  93. package/fesm2022/datepicker.mjs +57 -62
  94. package/fesm2022/datepicker.mjs.map +1 -1
  95. package/fesm2022/dialog/testing.mjs +11 -4
  96. package/fesm2022/dialog/testing.mjs.map +1 -1
  97. package/fesm2022/dialog.mjs +10 -4
  98. package/fesm2022/dialog.mjs.map +1 -1
  99. package/fesm2022/expansion/testing.mjs +14 -6
  100. package/fesm2022/expansion/testing.mjs.map +1 -1
  101. package/fesm2022/expansion.mjs +22 -26
  102. package/fesm2022/expansion.mjs.map +1 -1
  103. package/fesm2022/grid-list/testing.mjs +9 -3
  104. package/fesm2022/grid-list/testing.mjs.map +1 -1
  105. package/fesm2022/icon/testing.mjs +10 -3
  106. package/fesm2022/icon/testing.mjs.map +1 -1
  107. package/fesm2022/icon.mjs +24 -27
  108. package/fesm2022/icon.mjs.map +1 -1
  109. package/fesm2022/list/testing.mjs +18 -6
  110. package/fesm2022/list/testing.mjs.map +1 -1
  111. package/fesm2022/list.mjs +5 -5
  112. package/fesm2022/list.mjs.map +1 -1
  113. package/fesm2022/paginator.mjs +31 -34
  114. package/fesm2022/paginator.mjs.map +1 -1
  115. package/fesm2022/progress-bar.mjs +25 -19
  116. package/fesm2022/progress-bar.mjs.map +1 -1
  117. package/fesm2022/progress-spinner.mjs +34 -32
  118. package/fesm2022/progress-spinner.mjs.map +1 -1
  119. package/fesm2022/radio.mjs +41 -34
  120. package/fesm2022/radio.mjs.map +1 -1
  121. package/fesm2022/select.mjs +44 -36
  122. package/fesm2022/select.mjs.map +1 -1
  123. package/fesm2022/slider/testing.mjs +11 -4
  124. package/fesm2022/slider/testing.mjs.map +1 -1
  125. package/fesm2022/slider.mjs +109 -91
  126. package/fesm2022/slider.mjs.map +1 -1
  127. package/fesm2022/sort.mjs +25 -38
  128. package/fesm2022/sort.mjs.map +1 -1
  129. package/fesm2022/stepper/testing.mjs +10 -3
  130. package/fesm2022/stepper/testing.mjs.map +1 -1
  131. package/fesm2022/stepper.mjs +8 -12
  132. package/fesm2022/stepper.mjs.map +1 -1
  133. package/fesm2022/tabs.mjs +130 -141
  134. package/fesm2022/tabs.mjs.map +1 -1
  135. package/fesm2022/toolbar/testing.mjs +7 -2
  136. package/fesm2022/toolbar/testing.mjs.map +1 -1
  137. package/fesm2022/toolbar.mjs +11 -15
  138. package/fesm2022/toolbar.mjs.map +1 -1
  139. package/fesm2022/tree.mjs +22 -21
  140. package/fesm2022/tree.mjs.map +1 -1
  141. package/form-field/_form-field-theme.scss +85 -49
  142. package/grid-list/_grid-list-theme.scss +47 -14
  143. package/grid-list/testing/index.d.ts +1 -1
  144. package/icon/index.d.ts +10 -16
  145. package/icon/testing/index.d.ts +1 -1
  146. package/input/_input-theme.scss +39 -12
  147. package/list/_list-theme.scss +115 -83
  148. package/list/testing/index.d.ts +2 -2
  149. package/package.json +7 -7
  150. package/paginator/index.d.ts +16 -17
  151. package/prebuilt-themes/deeppurple-amber.css +1 -1
  152. package/prebuilt-themes/indigo-pink.css +1 -1
  153. package/prebuilt-themes/pink-bluegrey.css +1 -1
  154. package/prebuilt-themes/purple-green.css +1 -1
  155. package/progress-bar/index.d.ts +12 -15
  156. package/progress-spinner/index.d.ts +14 -15
  157. package/radio/index.d.ts +20 -22
  158. package/schematics/ng-add/index.js +2 -2
  159. package/schematics/ng-add/index.mjs +2 -2
  160. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +28 -29
  161. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +21 -19
  162. package/schematics/ng-generate/mdc-migration/index_bundled.js +55 -48
  163. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +3 -3
  164. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +9 -8
  165. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +1 -2
  166. package/schematics/ng-update/index_bundled.js +31 -31
  167. package/select/index.d.ts +22 -17
  168. package/slide-toggle/_slide-toggle-theme.scss +78 -44
  169. package/slider/index.d.ts +30 -30
  170. package/slider/testing/index.d.ts +1 -1
  171. package/sort/_sort-theme.scss +51 -20
  172. package/sort/index.d.ts +15 -20
  173. package/stepper/_stepper-theme.scss +58 -25
  174. package/stepper/index.d.ts +5 -15
  175. package/stepper/testing/index.d.ts +1 -1
  176. package/table/_table-theme.scss +53 -20
  177. package/tabs/_tabs-theme.scss +87 -51
  178. package/tabs/index.d.ts +61 -64
  179. package/toolbar/index.d.ts +5 -12
  180. package/toolbar/testing/index.d.ts +1 -1
  181. package/tree/_tree-theme.scss +53 -21
  182. package/tree/index.d.ts +13 -15
@@ -1,3 +1,4 @@
1
+ @use 'sass:map';
1
2
  @use '../core/theming/theming';
2
3
  @use '../core/theming/inspection';
3
4
  @use '../core/typography/typography';
@@ -5,31 +6,63 @@
5
6
  @use '../core/style/sass-utils';
6
7
  @use '../core/tokens/token-utils';
7
8
 
8
- @mixin base($theme) {}
9
+ @mixin base($theme) {
10
+ @if inspection.get-theme-version($theme) == 1 {
11
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
+ }
13
+ @else {}
14
+ }
9
15
 
10
16
  // Include this empty mixin for consistency with the other components.
11
- @mixin color($theme) {}
17
+ @mixin color($theme) {
18
+ @if inspection.get-theme-version($theme) == 1 {
19
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
20
+ }
21
+ @else {}
22
+ }
12
23
 
13
24
  @mixin typography($theme) {
14
- @include sass-utils.current-selector-or-root() {
15
- @include token-utils.create-token-values(tokens-mat-grid-list.$prefix,
16
- tokens-mat-grid-list.get-typography-tokens($theme));
25
+ @if inspection.get-theme-version($theme) == 1 {
26
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
27
+ }
28
+ @else {
29
+ @include sass-utils.current-selector-or-root() {
30
+ @include token-utils.create-token-values(tokens-mat-grid-list.$prefix,
31
+ tokens-mat-grid-list.get-typography-tokens($theme));
32
+ }
17
33
  }
18
34
  }
19
35
 
20
- @mixin density($theme) {}
36
+ @mixin density($theme) {
37
+ @if inspection.get-theme-version($theme) == 1 {
38
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
39
+ }
40
+ @else {}
41
+ }
21
42
 
22
43
  @mixin theme($theme) {
23
44
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-grid-list') {
24
- @include base($theme);
25
- @if inspection.theme-has($theme, color) {
26
- @include color($theme);
27
- }
28
- @if inspection.theme-has($theme, density) {
29
- @include density($theme);
45
+ @if inspection.get-theme-version($theme) == 1 {
46
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
30
47
  }
31
- @if inspection.theme-has($theme, typography) {
32
- @include typography($theme);
48
+ @else {
49
+ @include base($theme);
50
+ @if inspection.theme-has($theme, color) {
51
+ @include color($theme);
52
+ }
53
+ @if inspection.theme-has($theme, density) {
54
+ @include density($theme);
55
+ }
56
+ @if inspection.theme-has($theme, typography) {
57
+ @include typography($theme);
58
+ }
33
59
  }
34
60
  }
35
61
  }
62
+
63
+ @mixin _theme-from-tokens($tokens) {
64
+ @if ($tokens != ()) {
65
+ @include token-utils.create-token-values(
66
+ tokens-mat-grid-list.$prefix, map.get($tokens, tokens-mat-grid-list.$prefix));
67
+ }
68
+ }
@@ -78,7 +78,7 @@ export declare class MatGridTileHarness extends ContentContainerComponentHarness
78
78
  }
79
79
 
80
80
  /** Selectors for the various `mat-grid-tile` sections that may contain user content. */
81
- export declare const enum MatGridTileSection {
81
+ export declare enum MatGridTileSection {
82
82
  HEADER = ".mat-grid-tile-header",
83
83
  FOOTER = ".mat-grid-tile-footer"
84
84
  }
package/icon/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- import { _AbstractConstructor } from '@angular/material/core';
2
1
  import { AfterViewChecked } from '@angular/core';
3
- import { BooleanInput } from '@angular/cdk/coercion';
4
- import { CanColor } from '@angular/material/core';
5
- import { _Constructor } from '@angular/material/core';
6
2
  import { DomSanitizer } from '@angular/platform-browser';
7
3
  import { ElementRef } from '@angular/core';
8
4
  import { ErrorHandler } from '@angular/core';
@@ -126,17 +122,21 @@ export declare function MAT_ICON_LOCATION_FACTORY(): MatIconLocation;
126
122
  * Example:
127
123
  * `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
128
124
  */
129
- export declare class MatIcon extends _MatIconBase implements OnInit, AfterViewChecked, CanColor, OnDestroy {
125
+ export declare class MatIcon implements OnInit, AfterViewChecked, OnDestroy {
126
+ readonly _elementRef: ElementRef<HTMLElement>;
130
127
  private _iconRegistry;
131
128
  private _location;
132
129
  private readonly _errorHandler;
130
+ private _defaultColor;
131
+ /** Theme palette color of the icon. */
132
+ get color(): string | null | undefined;
133
+ set color(value: string | null | undefined);
134
+ private _color;
133
135
  /**
134
136
  * Whether the icon should be inlined, automatically sizing the icon to match the font size of
135
137
  * the element the icon is contained in.
136
138
  */
137
- get inline(): boolean;
138
- set inline(inline: BooleanInput);
139
- private _inline;
139
+ inline: boolean;
140
140
  /** Name of the icon in the SVG icon set. */
141
141
  get svgIcon(): string;
142
142
  set svgIcon(value: string);
@@ -159,7 +159,7 @@ export declare class MatIcon extends _MatIconBase implements OnInit, AfterViewCh
159
159
  private _elementsWithExternalReferences?;
160
160
  /** Subscription to the current in-progress SVG icon request. */
161
161
  private _currentIconFetch;
162
- constructor(elementRef: ElementRef<HTMLElement>, _iconRegistry: MatIconRegistry, ariaHidden: string, _location: MatIconLocation, _errorHandler: ErrorHandler, defaults?: MatIconDefaultOptions);
162
+ constructor(_elementRef: ElementRef<HTMLElement>, _iconRegistry: MatIconRegistry, ariaHidden: string, _location: MatIconLocation, _errorHandler: ErrorHandler, defaults?: MatIconDefaultOptions);
163
163
  /**
164
164
  * Splits an svgIcon binding value into its icon set and icon name components.
165
165
  * Returns a 2-element array of [(icon set), (icon name)].
@@ -202,15 +202,9 @@ export declare class MatIcon extends _MatIconBase implements OnInit, AfterViewCh
202
202
  private _updateSvgIcon;
203
203
  static ɵfac: i0.ɵɵFactoryDeclaration<MatIcon, [null, null, { attribute: "aria-hidden"; }, null, null, { optional: true; }]>;
204
204
  static ɵcmp: i0.ɵɵComponentDeclaration<MatIcon, "mat-icon", ["matIcon"], { "color": { "alias": "color"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "fontSet": { "alias": "fontSet"; "required": false; }; "fontIcon": { "alias": "fontIcon"; "required": false; }; }, {}, never, ["*"], false, never>;
205
+ static ngAcceptInputType_inline: unknown;
205
206
  }
206
207
 
207
- /** @docs-private */
208
- declare const _MatIconBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & {
209
- new (_elementRef: ElementRef): {
210
- _elementRef: ElementRef;
211
- };
212
- };
213
-
214
208
  /** Default options for `mat-icon`. */
215
209
  export declare interface MatIconDefaultOptions {
216
210
  /** Default color of the icon. */
@@ -43,7 +43,7 @@ export declare interface IconHarnessFilters extends BaseHarnessFilters {
43
43
  }
44
44
 
45
45
  /** Possible types of icons. */
46
- export declare const enum IconType {
46
+ export declare enum IconType {
47
47
  SVG = 0,
48
48
  FONT = 1
49
49
  }
@@ -2,25 +2,52 @@
2
2
  @use '../core/theming/inspection';
3
3
  @use '../core/typography/typography';
4
4
 
5
- @mixin base($theme) {}
5
+ @mixin base($theme) {
6
+ @if inspection.get-theme-version($theme) == 1 {
7
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
8
+ }
9
+ @else {}
10
+ }
6
11
 
7
- @mixin color($theme) {}
12
+ @mixin color($theme) {
13
+ @if inspection.get-theme-version($theme) == 1 {
14
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
15
+ }
16
+ @else {}
17
+ }
8
18
 
9
- @mixin typography($theme) {}
19
+ @mixin typography($theme) {
20
+ @if inspection.get-theme-version($theme) == 1 {
21
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
22
+ }
23
+ @else {}
24
+ }
10
25
 
11
- @mixin density($theme) {}
26
+ @mixin density($theme) {
27
+ @if inspection.get-theme-version($theme) == 1 {
28
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
29
+ }
30
+ @else {}
31
+ }
12
32
 
13
33
  @mixin theme($theme) {
14
34
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-input') {
15
- @include base($theme);
16
- @if inspection.theme-has($theme, color) {
17
- @include color($theme);
35
+ @if inspection.get-theme-version($theme) == 1 {
36
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
18
37
  }
19
- @if inspection.theme-has($theme, density) {
20
- @include density($theme);
21
- }
22
- @if inspection.theme-has($theme, typography) {
23
- @include typography($theme);
38
+ @else {
39
+ @include base($theme);
40
+ @if inspection.theme-has($theme, color) {
41
+ @include color($theme);
42
+ }
43
+ @if inspection.theme-has($theme, density) {
44
+ @include density($theme);
45
+ }
46
+ @if inspection.theme-has($theme, typography) {
47
+ @include typography($theme);
48
+ }
24
49
  }
25
50
  }
26
51
  }
52
+
53
+ @mixin _theme-from-tokens($tokens) {}
@@ -14,139 +14,171 @@
14
14
 
15
15
  @mixin base($theme) {
16
16
  // Add default values for tokens not related to color, typography, or density.
17
- @include sass-utils.current-selector-or-root() {
18
- @include mdc-list-theme.theme(tokens-mdc-list.get-unthemable-tokens());
17
+ @if inspection.get-theme-version($theme) == 1 {
18
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
19
+ }
20
+ @else {
21
+ @include sass-utils.current-selector-or-root() {
22
+ @include mdc-list-theme.theme(tokens-mdc-list.get-unthemable-tokens());
23
+ }
19
24
  }
20
25
  }
21
26
 
22
27
  @mixin color($theme) {
23
- $mdc-list-color-tokens: tokens-mdc-list.get-color-tokens($theme);
24
-
25
- // Add values for MDC list tokens.
26
- @include sass-utils.current-selector-or-root() {
27
- @include mdc-list-theme.theme($mdc-list-color-tokens);
28
+ @if inspection.get-theme-version($theme) == 1 {
29
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
28
30
  }
31
+ @else {
32
+ $mdc-list-color-tokens: tokens-mdc-list.get-color-tokens($theme);
29
33
 
30
- .mdc-list-item__start,
31
- .mdc-list-item__end {
32
- @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, primary));
33
- }
34
+ // Add values for MDC list tokens.
35
+ @include sass-utils.current-selector-or-root() {
36
+ @include mdc-list-theme.theme($mdc-list-color-tokens);
37
+ }
34
38
 
35
- .mat-accent {
36
39
  .mdc-list-item__start,
37
40
  .mdc-list-item__end {
38
- @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, accent));
41
+ @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, primary));
39
42
  }
40
- }
41
43
 
42
- .mat-warn {
43
- .mdc-list-item__start,
44
- .mdc-list-item__end {
45
- @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, warn));
44
+ .mat-accent {
45
+ .mdc-list-item__start,
46
+ .mdc-list-item__end {
47
+ @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, accent));
48
+ }
46
49
  }
47
- }
48
50
 
49
- .mat-mdc-list-option {
50
- @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary));
51
- }
52
- .mat-mdc-list-option.mat-accent {
53
- @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, accent));
54
- }
55
- .mat-mdc-list-option.mat-warn {
56
- @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));
57
- }
51
+ .mat-warn {
52
+ .mdc-list-item__start,
53
+ .mdc-list-item__end {
54
+ @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, warn));
55
+ }
56
+ }
58
57
 
59
- // There is no token for activated color on nav list.
60
- // TODO(mmalerba): Add a token to MDC or make a custom one.
61
- .mat-mdc-list-base.mat-mdc-list-base {
62
- @include evolution-mixins.list-selected-ink-color(inspection.get-theme-color($theme, primary));
63
- }
58
+ .mat-mdc-list-option {
59
+ @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary));
60
+ }
61
+ .mat-mdc-list-option.mat-accent {
62
+ @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, accent));
63
+ }
64
+ .mat-mdc-list-option.mat-warn {
65
+ @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));
66
+ }
64
67
 
65
- // TODO(mmalerba): Leaking styles from the old MDC list mixins used in other components can cause
66
- // opacity issues, so we need this override for now. We can remove it when all Angular Material
67
- // components stop using the old MDC mixins.
68
- .mat-mdc-list-base .mdc-list-item--disabled {
69
- .mdc-list-item__start,
70
- .mdc-list-item__content,
71
- .mdc-list-item__end {
72
- opacity: 1;
68
+ // There is no token for activated color on nav list.
69
+ // TODO(mmalerba): Add a token to MDC or make a custom one.
70
+ .mat-mdc-list-base.mat-mdc-list-base {
71
+ @include evolution-mixins.list-selected-ink-color(
72
+ inspection.get-theme-color($theme, primary));
73
+ }
74
+
75
+ // TODO(mmalerba): Leaking styles from the old MDC list mixins used in other components can
76
+ // cause opacity issues, so we need this override for now. We can remove it when all
77
+ // Angular Material components stop using the old MDC mixins.
78
+ .mat-mdc-list-base .mdc-list-item--disabled {
79
+ .mdc-list-item__start,
80
+ .mdc-list-item__content,
81
+ .mdc-list-item__end {
82
+ opacity: 1;
83
+ }
73
84
  }
74
85
  }
75
86
  }
76
87
 
77
88
  @mixin density($theme) {
78
- $density-scale: inspection.get-theme-density($theme);
79
- $mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($theme);
80
-
81
- // Add values for MDC list tokens.
82
- @include sass-utils.current-selector-or-root() {
83
- @include mdc-list-theme.theme($mdc-list-density-tokens);
89
+ @if inspection.get-theme-version($theme) == 1 {
90
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
84
91
  }
92
+ @else {
93
+ $density-scale: inspection.get-theme-density($theme);
94
+ $mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($theme);
85
95
 
86
- .mdc-list-item__start,
87
- .mdc-list-item__end {
88
- @include mdc-radio-theme.theme(tokens-mdc-radio.get-density-tokens($theme));
89
- }
96
+ // Add values for MDC list tokens.
97
+ @include sass-utils.current-selector-or-root() {
98
+ @include mdc-list-theme.theme($mdc-list-density-tokens);
99
+ }
90
100
 
91
- // TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based API,
92
- // to avoid screenshot diffs. We should remove it in favor of following MDC's current style, or
93
- // add custom tokens for it.
94
- .mat-mdc-list-item {
95
- &.mdc-list-item--with-leading-avatar,
96
- &.mdc-list-item--with-leading-checkbox,
97
- &.mdc-list-item--with-leading-icon {
98
- &.mdc-list-item--with-one-line {
99
- height: map.get((
101
+ .mdc-list-item__start,
102
+ .mdc-list-item__end {
103
+ @include mdc-radio-theme.theme(tokens-mdc-radio.get-density-tokens($theme));
104
+ }
105
+
106
+ // TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based
107
+ // API, to avoid screenshot diffs. We should remove it in favor of following MDC's current
108
+ // style, or add custom tokens for it.
109
+ .mat-mdc-list-item {
110
+ &.mdc-list-item--with-leading-avatar,
111
+ &.mdc-list-item--with-leading-checkbox,
112
+ &.mdc-list-item--with-leading-icon {
113
+ &.mdc-list-item--with-one-line {
114
+ height: map.get((
100
115
  0: 56px,
101
116
  -1: 52px,
102
117
  -2: 48px,
103
118
  -3: 44px,
104
119
  -4: 40px,
105
120
  -5: 40px,
106
- ), $density-scale);
107
- }
121
+ ), $density-scale);
122
+ }
108
123
 
109
- &.mdc-list-item--with-two-lines {
110
- height: map.get((
124
+ &.mdc-list-item--with-two-lines {
125
+ height: map.get((
111
126
  0: 72px,
112
127
  -1: 68px,
113
128
  -2: 64px,
114
129
  -3: 60px,
115
130
  -4: 56px,
116
131
  -5: 56px,
117
- ), $density-scale);
132
+ ), $density-scale);
133
+ }
118
134
  }
119
135
  }
120
136
  }
121
137
  }
122
138
 
123
139
  @mixin typography($theme) {
124
- $mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($theme);
125
-
126
- // Add values for MDC list tokens.
127
- @include sass-utils.current-selector-or-root() {
128
- @include mdc-list-theme.theme($mdc-list-typography-tokens);
140
+ @if inspection.get-theme-version($theme) == 1 {
141
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
129
142
  }
143
+ @else {
144
+ $mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($theme);
130
145
 
131
- // MDC does not have tokens for the subheader.
132
- // TODO(mmalerba): Discuss with MDC about adding them, or create custom tokens.
133
- .mdc-list-group__subheader {
134
- font: inspection.get-theme-typography($theme, subtitle-1, font);
135
- letter-spacing: inspection.get-theme-typography($theme, subtitle-1, letter-spacing);
146
+ // Add values for MDC list tokens.
147
+ @include sass-utils.current-selector-or-root() {
148
+ @include mdc-list-theme.theme($mdc-list-typography-tokens);
149
+ }
150
+
151
+ // MDC does not have tokens for the subheader.
152
+ // TODO(mmalerba): Discuss with MDC about adding them, or create custom tokens.
153
+ .mdc-list-group__subheader {
154
+ font: inspection.get-theme-typography($theme, subtitle-1, font);
155
+ letter-spacing: inspection.get-theme-typography($theme, subtitle-1, letter-spacing);
156
+ }
136
157
  }
137
158
  }
138
159
 
139
160
  @mixin theme($theme) {
140
161
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-list') {
141
- @include base($theme);
142
- @if inspection.theme-has($theme, color) {
143
- @include color($theme);
162
+ @if inspection.get-theme-version($theme) == 1 {
163
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
144
164
  }
145
- @if inspection.theme-has($theme, density) {
146
- @include density($theme);
147
- }
148
- @if inspection.theme-has($theme, typography) {
149
- @include typography($theme);
165
+ @else {
166
+ @include base($theme);
167
+ @if inspection.theme-has($theme, color) {
168
+ @include color($theme);
169
+ }
170
+ @if inspection.theme-has($theme, density) {
171
+ @include density($theme);
172
+ }
173
+ @if inspection.theme-has($theme, typography) {
174
+ @include typography($theme);
175
+ }
150
176
  }
151
177
  }
152
178
  }
179
+
180
+ @mixin _theme-from-tokens($tokens) {
181
+ @if ($tokens != ()) {
182
+ @include mdc-list-theme.theme(map.get($tokens, tokens-mdc-list.$prefix));
183
+ }
184
+ }
@@ -232,12 +232,12 @@ declare abstract class MatListItemHarnessBase extends ContentContainerComponentH
232
232
  }
233
233
 
234
234
  /** Selectors for the various list item sections that may contain user content. */
235
- export declare const enum MatListItemSection {
235
+ export declare enum MatListItemSection {
236
236
  CONTENT = ".mdc-list-item__content"
237
237
  }
238
238
 
239
239
  /** Enum describing the possible variants of a list item. */
240
- export declare const enum MatListItemType {
240
+ export declare enum MatListItemType {
241
241
  ONE_LINE_ITEM = 0,
242
242
  TWO_LINE_ITEM = 1,
243
243
  THREE_LINE_ITEM = 2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material",
3
- "version": "17.0.0",
3
+ "version": "17.1.0-next.0",
4
4
  "description": "Angular Material",
5
5
  "repository": {
6
6
  "type": "git",
@@ -477,12 +477,12 @@
477
477
  }
478
478
  },
479
479
  "peerDependencies": {
480
- "@angular/animations": "^17.0.0 || ^18.0.0",
481
- "@angular/cdk": "17.0.0",
482
- "@angular/core": "^17.0.0 || ^18.0.0",
483
- "@angular/common": "^17.0.0 || ^18.0.0",
484
- "@angular/forms": "^17.0.0 || ^18.0.0",
485
- "@angular/platform-browser": "^17.0.0 || ^18.0.0",
480
+ "@angular/animations": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
481
+ "@angular/cdk": "17.1.0-next.0",
482
+ "@angular/core": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
483
+ "@angular/common": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
484
+ "@angular/forms": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
485
+ "@angular/platform-browser": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
486
486
  "rxjs": "^6.5.3 || ^7.4.0"
487
487
  },
488
488
  "dependencies": {
@@ -1,8 +1,4 @@
1
- import { _AbstractConstructor } from '@angular/material/core';
2
- import { BooleanInput } from '@angular/cdk/coercion';
3
- import { CanDisable } from '@angular/material/core';
4
1
  import { ChangeDetectorRef } from '@angular/core';
5
- import { _Constructor } from '@angular/material/core';
6
2
  import { EventEmitter } from '@angular/core';
7
3
  import { HasInitialized } from '@angular/material/core';
8
4
  import * as i0 from '@angular/core';
@@ -11,7 +7,6 @@ import * as i3 from '@angular/material/select';
11
7
  import * as i4 from '@angular/material/tooltip';
12
8
  import { InjectionToken } from '@angular/core';
13
9
  import { MatFormFieldAppearance } from '@angular/material/form-field';
14
- import { NumberInput } from '@angular/cdk/coercion';
15
10
  import { OnDestroy } from '@angular/core';
16
11
  import { OnInit } from '@angular/core';
17
12
  import { Optional } from '@angular/core';
@@ -46,7 +41,7 @@ export declare function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPagin
46
41
  * page, user-selectable options to change that size, what items are being shown, and
47
42
  * navigational button to go to the previous or next page.
48
43
  */
49
- export declare class MatPaginator extends _MatPaginatorMixinBase implements OnInit, OnDestroy, CanDisable, HasInitialized {
44
+ export declare class MatPaginator extends _MatPaginatorMixinBase implements OnInit, OnDestroy, HasInitialized {
50
45
  _intl: MatPaginatorIntl;
51
46
  private _changeDetectorRef;
52
47
  /** If set, styles the "page size" form field with the designated style. */
@@ -59,30 +54,28 @@ export declare class MatPaginator extends _MatPaginatorMixinBase implements OnIn
59
54
  color: ThemePalette;
60
55
  /** The zero-based page index of the displayed list of items. Defaulted to 0. */
61
56
  get pageIndex(): number;
62
- set pageIndex(value: NumberInput);
57
+ set pageIndex(value: number);
63
58
  private _pageIndex;
64
59
  /** The length of the total number of items that are being paginated. Defaulted to 0. */
65
60
  get length(): number;
66
- set length(value: NumberInput);
61
+ set length(value: number);
67
62
  private _length;
68
63
  /** Number of items to display on a page. By default set to 50. */
69
64
  get pageSize(): number;
70
- set pageSize(value: NumberInput);
65
+ set pageSize(value: number);
71
66
  private _pageSize;
72
67
  /** The set of provided page size options to display to the user. */
73
68
  get pageSizeOptions(): number[];
74
69
  set pageSizeOptions(value: number[] | readonly number[]);
75
70
  private _pageSizeOptions;
76
71
  /** Whether to hide the page size selection UI from the user. */
77
- get hidePageSize(): boolean;
78
- set hidePageSize(value: BooleanInput);
79
- private _hidePageSize;
72
+ hidePageSize: boolean;
80
73
  /** Whether to show the first/last buttons UI to the user. */
81
- get showFirstLastButtons(): boolean;
82
- set showFirstLastButtons(value: BooleanInput);
83
- private _showFirstLastButtons;
74
+ showFirstLastButtons: boolean;
84
75
  /** Used to configure the underlying `MatSelect` inside the paginator. */
85
76
  selectConfig: MatPaginatorSelectConfig;
77
+ /** Whether the paginator is disabled. */
78
+ disabled: boolean;
86
79
  /** Event emitted when the paginator changes the page size or page index. */
87
80
  readonly page: EventEmitter<PageEvent>;
88
81
  /** Displayed set of page size options. Will be sorted and include current page size. */
@@ -125,7 +118,13 @@ export declare class MatPaginator extends _MatPaginatorMixinBase implements OnIn
125
118
  /** Emits an event notifying that a change of the paginator's properties has been triggered. */
126
119
  private _emitPageEvent;
127
120
  static ɵfac: i0.ɵɵFactoryDeclaration<MatPaginator, [null, null, { optional: true; }]>;
128
- static ɵcmp: i0.ɵɵComponentDeclaration<MatPaginator, "mat-paginator", ["matPaginator"], { "disabled": { "alias": "disabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "length": { "alias": "length"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; }; "selectConfig": { "alias": "selectConfig"; "required": false; }; }, { "page": "page"; }, never, never, false, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatPaginator, "mat-paginator", ["matPaginator"], { "color": { "alias": "color"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "length": { "alias": "length"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; }; "selectConfig": { "alias": "selectConfig"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "page": "page"; }, never, never, false, never>;
122
+ static ngAcceptInputType_pageIndex: unknown;
123
+ static ngAcceptInputType_length: unknown;
124
+ static ngAcceptInputType_pageSize: unknown;
125
+ static ngAcceptInputType_hidePageSize: unknown;
126
+ static ngAcceptInputType_showFirstLastButtons: unknown;
127
+ static ngAcceptInputType_disabled: unknown;
129
128
  }
130
129
 
131
130
  /** Object that can be used to configure the default options for the paginator module. */
@@ -169,7 +168,7 @@ export declare class MatPaginatorIntl {
169
168
  }
170
169
 
171
170
  /** @docs-private */
172
- declare const _MatPaginatorMixinBase: _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & (new (...args: any[]) => HasInitialized) & {
171
+ declare const _MatPaginatorMixinBase: (new (...args: any[]) => HasInitialized) & {
173
172
  new (): {};
174
173
  };
175
174