@angular/material 20.0.0-next.1 → 20.0.0-next.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 (127) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -4
  2. package/autocomplete/index.d.ts +4 -0
  3. package/badge/_badge-theme.scss +5 -5
  4. package/bottom-sheet/_bottom-sheet-theme.scss +3 -3
  5. package/button/_button-theme.scss +84 -32
  6. package/button/_fab-theme.scss +13 -13
  7. package/button/_icon-button-theme.scss +5 -5
  8. package/button/index.d.ts +1 -1
  9. package/button/testing/index.d.ts +9 -2
  10. package/button-toggle/_button-toggle-theme.scss +8 -8
  11. package/card/_card-theme.scss +12 -12
  12. package/checkbox/_checkbox-theme.scss +10 -10
  13. package/chips/_chips-theme.scss +14 -14
  14. package/core/_core-theme.scss +2 -2
  15. package/core/option/_optgroup-theme.scss +2 -2
  16. package/core/option/_option-theme.scss +4 -4
  17. package/core/ripple/_ripple-theme.scss +3 -3
  18. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +4 -4
  19. package/core/theming/_color-api-backwards-compatibility.scss +19 -8
  20. package/core/tokens/_density.scss +3 -0
  21. package/core/tokens/_token-definition.scss +1 -2
  22. package/core/tokens/_token-utils.scss +20 -5
  23. package/core/tokens/m2/_index.scss +2 -0
  24. package/core/tokens/m2/mat/_tonal-button.scss +110 -0
  25. package/core/tokens/m3/_index.scss +2 -0
  26. package/core/tokens/m3/definitions/_index.scss +1 -1
  27. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
  28. package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
  29. package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
  30. package/core/tokens/m3/mat/_tonal-button.scss +101 -0
  31. package/datepicker/_datepicker-theme.scss +8 -7
  32. package/datepicker/index.d.ts +1 -1
  33. package/dialog/_dialog-theme.scss +6 -6
  34. package/divider/_divider-theme.scss +2 -2
  35. package/expansion/_expansion-theme.scss +4 -4
  36. package/fesm2022/autocomplete.mjs +3 -0
  37. package/fesm2022/autocomplete.mjs.map +1 -1
  38. package/fesm2022/button/testing.mjs +34 -15
  39. package/fesm2022/button/testing.mjs.map +1 -1
  40. package/fesm2022/button.mjs +2 -2
  41. package/fesm2022/core.mjs +1 -1
  42. package/fesm2022/core.mjs.map +1 -1
  43. package/fesm2022/{date-range-input-harness-ee47cdb0.mjs → date-range-input-harness-de70be6a.mjs} +2 -2
  44. package/fesm2022/{date-range-input-harness-ee47cdb0.mjs.map → date-range-input-harness-de70be6a.mjs.map} +1 -1
  45. package/fesm2022/datepicker/testing.mjs +3 -3
  46. package/fesm2022/datepicker.mjs +8 -8
  47. package/fesm2022/datepicker.mjs.map +1 -1
  48. package/fesm2022/dialog/testing.mjs.map +1 -1
  49. package/fesm2022/divider/testing.mjs +1 -1
  50. package/fesm2022/{divider-harness-3394f29a.mjs → divider-harness-8099453f.mjs} +1 -1
  51. package/fesm2022/divider-harness-8099453f.mjs.map +1 -0
  52. package/fesm2022/expansion/testing.mjs.map +1 -1
  53. package/fesm2022/form-field/testing/control.mjs +1 -1
  54. package/fesm2022/form-field/testing.mjs +4 -4
  55. package/fesm2022/form-field/testing.mjs.map +1 -1
  56. package/fesm2022/{form-field-control-harness-af6fd278.mjs → form-field-control-harness-efefd4cf.mjs} +1 -1
  57. package/fesm2022/form-field-control-harness-efefd4cf.mjs.map +1 -0
  58. package/fesm2022/grid-list/testing.mjs.map +1 -1
  59. package/fesm2022/icon-button-0850d958.mjs +211 -0
  60. package/fesm2022/icon-button-0850d958.mjs.map +1 -0
  61. package/fesm2022/input/testing.mjs +2 -2
  62. package/fesm2022/input/testing.mjs.map +1 -1
  63. package/fesm2022/{input-harness-ed59decc.mjs → input-harness-e68bb132.mjs} +2 -2
  64. package/fesm2022/input-harness-e68bb132.mjs.map +1 -0
  65. package/fesm2022/list/testing.mjs +1 -1
  66. package/fesm2022/list/testing.mjs.map +1 -1
  67. package/fesm2022/{module-3bf2775f.mjs → module-1c16a0a9.mjs} +3 -3
  68. package/fesm2022/{module-3bf2775f.mjs.map → module-1c16a0a9.mjs.map} +1 -1
  69. package/fesm2022/module-cf951a02.mjs +214 -0
  70. package/fesm2022/module-cf951a02.mjs.map +1 -0
  71. package/fesm2022/paginator/testing.mjs +2 -2
  72. package/fesm2022/paginator.mjs +5 -5
  73. package/fesm2022/paginator.mjs.map +1 -1
  74. package/fesm2022/select/testing.mjs +2 -2
  75. package/fesm2022/{select-harness-8c55824d.mjs → select-harness-69d47123.mjs} +2 -2
  76. package/fesm2022/{select-harness-8c55824d.mjs.map → select-harness-69d47123.mjs.map} +1 -1
  77. package/fesm2022/select.mjs +1 -1
  78. package/fesm2022/slider.mjs +5 -2
  79. package/fesm2022/slider.mjs.map +1 -1
  80. package/fesm2022/snack-bar.mjs +4 -4
  81. package/fesm2022/snack-bar.mjs.map +1 -1
  82. package/fesm2022/timepicker.mjs +8 -4
  83. package/fesm2022/timepicker.mjs.map +1 -1
  84. package/form-field/_form-field-theme.scss +16 -16
  85. package/grid-list/_grid-list-theme.scss +1 -1
  86. package/icon/_icon-theme.scss +2 -2
  87. package/list/_list-theme.scss +15 -15
  88. package/menu/_menu-theme.scss +3 -3
  89. package/{module.d-18a67f56.d.ts → module.d-792a497c.d.ts} +33 -26
  90. package/package.json +2 -2
  91. package/paginator/_paginator-theme.scss +3 -3
  92. package/paginator/index.d.ts +1 -1
  93. package/prebuilt-themes/deeppurple-amber.css +1 -1
  94. package/prebuilt-themes/indigo-pink.css +1 -1
  95. package/prebuilt-themes/pink-bluegrey.css +1 -1
  96. package/prebuilt-themes/purple-green.css +1 -1
  97. package/progress-bar/_progress-bar-theme.scss +2 -2
  98. package/progress-spinner/_progress-spinner-theme.scss +4 -4
  99. package/radio/_radio-theme.scss +12 -12
  100. package/schematics/ng-add/index.js +1 -1
  101. package/schematics/ng-add/index.mjs +1 -1
  102. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  103. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  104. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  105. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  106. package/select/_select-theme.scss +6 -6
  107. package/sidenav/_sidenav-theme.scss +2 -2
  108. package/slide-toggle/_slide-toggle-theme.scss +10 -10
  109. package/slider/_slider-theme.scss +10 -10
  110. package/snack-bar/_snack-bar-theme.scss +4 -4
  111. package/snack-bar/index.d.ts +1 -1
  112. package/sort/_sort-theme.scss +3 -3
  113. package/stepper/_stepper-theme.scss +5 -5
  114. package/table/_table-theme.scss +4 -4
  115. package/tabs/_tabs-theme.scss +16 -16
  116. package/timepicker/_timepicker-theme.scss +4 -4
  117. package/toolbar/_toolbar-theme.scss +4 -4
  118. package/tooltip/_tooltip-theme.scss +4 -4
  119. package/tree/_tree-theme.scss +3 -3
  120. package/fesm2022/divider-harness-3394f29a.mjs.map +0 -1
  121. package/fesm2022/form-field-control-harness-af6fd278.mjs.map +0 -1
  122. package/fesm2022/icon-button-47f1b5d9.mjs +0 -248
  123. package/fesm2022/icon-button-47f1b5d9.mjs.map +0 -1
  124. package/fesm2022/input-harness-ed59decc.mjs.map +0 -1
  125. package/fesm2022/module-df9f7af3.mjs +0 -152
  126. package/fesm2022/module-df9f7af3.mjs.map +0 -1
  127. /package/core/tokens/m3/definitions/{unused/_md-comp-filled-tonal-button.scss → _md-comp-filled-tonal-button.scss} +0 -0
@@ -6,20 +6,28 @@ import { FocusOrigin } from '@angular/cdk/a11y';
6
6
  import { T as ThemePalette } from './palette.d-ec4a617c.js';
7
7
  import { M as MatRippleLoader } from './ripple-loader.d-8aac2988.js';
8
8
 
9
+ /**
10
+ * Possible appearances for a `MatButton`.
11
+ * See https://m3.material.io/components/buttons/overview
12
+ */
13
+ type MatButtonAppearance = 'text' | 'filled' | 'elevated' | 'outlined' | 'tonal';
9
14
  /** Object that can be used to configure the default options for the button component. */
10
15
  interface MatButtonConfig {
11
16
  /** Whether disabled buttons should be interactive. */
12
17
  disabledInteractive?: boolean;
13
18
  /** Default palette color to apply to buttons. */
14
19
  color?: ThemePalette;
20
+ /** Default appearance for plain buttons (not icon buttons or FABs). */
21
+ defaultAppearance?: MatButtonAppearance;
15
22
  }
16
23
  /** Injection token that can be used to provide the default options the button component. */
17
24
  declare const MAT_BUTTON_CONFIG: InjectionToken<MatButtonConfig>;
18
- /** Base class for all buttons. */
25
+ /** Base class for all buttons. */
19
26
  declare class MatButtonBase implements AfterViewInit, OnDestroy {
20
- _elementRef: ElementRef<any>;
21
- _ngZone: NgZone;
22
- _animationMode: "NoopAnimations" | "BrowserAnimations" | null;
27
+ _elementRef: ElementRef<HTMLElement>;
28
+ protected _ngZone: NgZone;
29
+ protected _animationMode: "NoopAnimations" | "BrowserAnimations" | null;
30
+ protected readonly _config: MatButtonConfig | null;
23
31
  private readonly _focusMonitor;
24
32
  private _cleanupClick;
25
33
  private _renderer;
@@ -53,7 +61,9 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
53
61
  /**
54
62
  * Natively disabled buttons prevent focus and any pointer events from reaching the button.
55
63
  * In some scenarios this might not be desirable, because it can prevent users from finding out
56
- * why the button is disabled (e.g. via tooltip).
64
+ * why the button is disabled (e.g. via tooltip). This is also useful for buttons that may
65
+ * become disabled when activated, which would cause focus to be transferred to the document
66
+ * body instead of remaining on the button.
57
67
  *
58
68
  * Enabling this input will change the button so that it is styled to be disabled and will be
59
69
  * marked as `aria-disabled`, but it will allow the button to receive events and focus.
@@ -91,26 +101,23 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
91
101
 
92
102
  /**
93
103
  * Material Design button component. Users interact with a button to perform an action.
94
- * See https://material.io/components/buttons
95
- *
96
- * The `MatButton` class applies to native button elements and captures the appearances for
97
- * "text button", "outlined button", and "contained button" per the Material Design
98
- * specification. `MatButton` additionally captures an additional "flat" appearance, which matches
99
- * "contained" but without elevation.
104
+ * See https://m3.material.io/components/buttons/overview
100
105
  */
101
106
  declare class MatButton extends MatButtonBase {
107
+ /** Appearance of the button. */
108
+ get appearance(): MatButtonAppearance | null;
109
+ set appearance(value: MatButtonAppearance | '');
110
+ private _appearance;
111
+ constructor(...args: unknown[]);
112
+ /** Programmatically sets the appearance of the button. */
113
+ setAppearance(appearance: MatButtonAppearance): void;
102
114
  static ɵfac: i0.ɵɵFactoryDeclaration<MatButton, never>;
103
- static ɵcmp: i0.ɵɵComponentDeclaration<MatButton, " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", ["matButton", "matAnchor"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], true, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatButton, " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", ["matButton", "matAnchor"], { "appearance": { "alias": "matButton"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], true, never>;
104
116
  }
105
117
  /**
106
118
  * Material Design button component for anchor elements. Anchor elements are used to provide
107
119
  * links for the user to navigate across different routes or pages.
108
- * See https://material.io/components/buttons
109
- *
110
- * The `MatAnchor` class applies to native anchor elements and captures the appearances for
111
- * "text button", "outlined button", and "contained button" per the Material Design
112
- * specification. `MatAnchor` additionally captures an additional "flat" appearance, which matches
113
- * "contained" but without elevation.
120
+ * See https://m3.material.io/components/buttons/overview
114
121
  */
115
122
  declare const MatAnchor: typeof MatButton;
116
123
  type MatAnchor = MatButton;
@@ -137,7 +144,7 @@ declare function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions;
137
144
  /**
138
145
  * Material Design floating action button (FAB) component. These buttons represent the primary
139
146
  * or most common action for users to interact with.
140
- * See https://material.io/components/buttons-floating-action-button/
147
+ * See https://m3.material.io/components/floating-action-button/overview
141
148
  *
142
149
  * The `MatFabButton` class has two appearances: normal and extended.
143
150
  */
@@ -147,25 +154,25 @@ declare class MatFabButton extends MatButtonBase {
147
154
  extended: boolean;
148
155
  constructor(...args: unknown[]);
149
156
  static ɵfac: i0.ɵɵFactoryDeclaration<MatFabButton, never>;
150
- static ɵcmp: i0.ɵɵComponentDeclaration<MatFabButton, "button[mat-fab], a[mat-fab]", ["matButton", "matAnchor"], { "extended": { "alias": "extended"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], true, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatFabButton, "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", ["matButton", "matAnchor"], { "extended": { "alias": "extended"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], true, never>;
151
158
  static ngAcceptInputType_extended: unknown;
152
159
  }
153
160
  /**
154
161
  * Material Design mini floating action button (FAB) component. These buttons represent the primary
155
162
  * or most common action for users to interact with.
156
- * See https://material.io/components/buttons-floating-action-button/
163
+ * See https://m3.material.io/components/floating-action-button/overview
157
164
  */
158
165
  declare class MatMiniFabButton extends MatButtonBase {
159
166
  private _options;
160
167
  _isFab: boolean;
161
168
  constructor(...args: unknown[]);
162
169
  static ɵfac: i0.ɵɵFactoryDeclaration<MatMiniFabButton, never>;
163
- static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabButton, "button[mat-mini-fab], a[mat-mini-fab]", ["matButton", "matAnchor"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], true, never>;
170
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabButton, "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", ["matButton", "matAnchor"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], true, never>;
164
171
  }
165
172
  /**
166
173
  * Material Design floating action button (FAB) component for anchor elements. Anchor elements
167
174
  * are used to provide links for the user to navigate across different routes or pages.
168
- * See https://material.io/components/buttons-floating-action-button/
175
+ * See https://m3.material.io/components/floating-action-button/overview
169
176
  *
170
177
  * The `MatFabAnchor` class has two appearances: normal and extended.
171
178
  */
@@ -174,7 +181,7 @@ type MatFabAnchor = MatFabButton;
174
181
  /**
175
182
  * Material Design mini floating action button (FAB) component for anchor elements. Anchor elements
176
183
  * are used to provide links for the user to navigate across different routes or pages.
177
- * See https://material.io/components/buttons-floating-action-button/
184
+ * See https://m3.material.io/components/floating-action-button/overview
178
185
  */
179
186
  declare const MatMiniFabAnchor: typeof MatMiniFabButton;
180
187
  type MatMiniFabAnchor = MatMiniFabButton;
@@ -187,7 +194,7 @@ type MatMiniFabAnchor = MatMiniFabButton;
187
194
  declare class MatIconButton extends MatButtonBase {
188
195
  constructor(...args: unknown[]);
189
196
  static ɵfac: i0.ɵɵFactoryDeclaration<MatIconButton, never>;
190
- static ɵcmp: i0.ɵɵComponentDeclaration<MatIconButton, "button[mat-icon-button], a[mat-icon-button]", ["matButton", "matAnchor"], {}, {}, never, ["*"], true, never>;
197
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatIconButton, "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", ["matButton", "matAnchor"], {}, {}, never, ["*"], true, never>;
191
198
  }
192
199
  /**
193
200
  * Material Design icon button component for anchor elements. This button displays a single
@@ -203,4 +210,4 @@ declare class MatButtonModule {
203
210
  static ɵinj: i0.ɵɵInjectorDeclaration<MatButtonModule>;
204
211
  }
205
212
 
206
- export { MAT_BUTTON_CONFIG as M, type MatButtonConfig as a, MatButton as b, MatAnchor as c, type MatFabDefaultOptions as d, MAT_FAB_DEFAULT_OPTIONS as e, MAT_FAB_DEFAULT_OPTIONS_FACTORY as f, MatFabButton as g, MatMiniFabButton as h, MatFabAnchor as i, MatMiniFabAnchor as j, MatIconButton as k, MatIconAnchor as l, MatButtonModule as m };
213
+ export { MAT_BUTTON_CONFIG as M, type MatButtonAppearance as a, type MatButtonConfig as b, MatButton as c, MatAnchor as d, type MatFabDefaultOptions as e, MAT_FAB_DEFAULT_OPTIONS as f, MAT_FAB_DEFAULT_OPTIONS_FACTORY as g, MatFabButton as h, MatMiniFabButton as i, MatFabAnchor as j, MatMiniFabAnchor as k, MatIconButton as l, MatIconAnchor as m, MatButtonModule as n };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material",
3
- "version": "20.0.0-next.1",
3
+ "version": "20.0.0-next.2",
4
4
  "description": "Angular Material",
5
5
  "repository": {
6
6
  "type": "git",
@@ -353,7 +353,7 @@
353
353
  }
354
354
  },
355
355
  "peerDependencies": {
356
- "@angular/cdk": "20.0.0-next.1",
356
+ "@angular/cdk": "20.0.0-next.2",
357
357
  "@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
358
358
  "@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
359
359
  "@angular/forms": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
@@ -20,7 +20,7 @@
20
20
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
21
21
  } @else {
22
22
  @include sass-utils.current-selector-or-root() {
23
- @include token-utils.create-token-values(
23
+ @include token-utils.create-token-values-mixed(
24
24
  tokens-mat-paginator.$prefix,
25
25
  tokens-mat-paginator.get-color-tokens($theme)
26
26
  );
@@ -33,7 +33,7 @@
33
33
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
34
34
  } @else {
35
35
  @include sass-utils.current-selector-or-root() {
36
- @include token-utils.create-token-values(
36
+ @include token-utils.create-token-values-mixed(
37
37
  tokens-mat-paginator.$prefix,
38
38
  tokens-mat-paginator.get-typography-tokens($theme)
39
39
  );
@@ -54,7 +54,7 @@
54
54
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
55
55
  } @else {
56
56
  @include sass-utils.current-selector-or-root() {
57
- @include token-utils.create-token-values(
57
+ @include token-utils.create-token-values-mixed(
58
58
  tokens-mat-paginator.$prefix,
59
59
  tokens-mat-paginator.get-density-tokens($theme)
60
60
  );
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { m as MatButtonModule } from '../module.d-18a67f56.js';
2
+ import { n as MatButtonModule } from '../module.d-792a497c.js';
3
3
  import { M as MatSelectModule } from '../module.d-ba05faa6.js';
4
4
  import { M as MatTooltipModule } from '../module.d-74a721b9.js';
5
5
  import { M as MatPaginator } from '../paginator.d-40b1766e.js';