Skip to content

Commit 00f4abe

Browse files
authored
feat(material/button): Switch button implementation to use MDC (angular#25381)
Switches the implementation of mat-button, mat-fab, and mat-icon-button to use MDC by default. BREAKING CHANGE: DOM and CSS classes for mat-button, mat-fab, and mat-icon-button have changed. Typescript API is largely the same but may have minor differences.
1 parent 4d723d7 commit 00f4abe

File tree

270 files changed

+2415
-2151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+2415
-2151
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/src/material/badge/** @jelbourn
55
/src/material/bottom-sheet/** @jelbourn @crisbeto
66
/src/material/button-toggle/** @andrewseguin
7-
/src/material/button/** @andrewseguin
7+
/src/material/legacy-button/** @andrewseguin
88
/src/material/legacy-card/** @andrewseguin
99
/src/material/legacy-checkbox/** @andrewseguin @devversion
1010
/src/material/legacy-chips/** @andrewseguin
@@ -111,7 +111,7 @@
111111
/src/material-experimental/* @andrewseguin
112112
/src/material-experimental/column-resize/** @andrewseguin
113113
/src/material/autocomplete/** @crisbeto
114-
/src/material-experimental/mdc-button/** @andrewseguin
114+
/src/material/button/** @andrewseguin
115115
/src/material/card/** @mmalerba
116116
/src/material/checkbox/** @mmalerba
117117
/src/material/chips/** @mmalerba @crisbeto
@@ -319,7 +319,7 @@
319319
/tools/public_api_guard/material/badge** @andrewseguin
320320
/tools/public_api_guard/material/bottom-sheet** @andrewseguin @crisbeto
321321
/tools/public_api_guard/material/button-toggle** @andrewseguin
322-
/tools/public_api_guard/material/button** @andrewseguin
322+
/tools/public_api_guard/material/legacy-button** @andrewseguin
323323
/tools/public_api_guard/material/legacy-card** @andrewseguin
324324
/tools/public_api_guard/material/legacy-checkbox** @andrewseguin @devversion
325325
/tools/public_api_guard/material/chips** @andrewseguin

.ng-dev/commit-message.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const commitMessage: CommitMessageConfig = {
4040
'cdk/tree',
4141
'google-maps',
4242
'material-experimental/column-resize',
43-
'material-experimental/mdc-button',
43+
'material/button',
4444
'material/card',
4545
'material/checkbox',
4646
'material-experimental/mdc-core',
@@ -65,7 +65,7 @@ export const commitMessage: CommitMessageConfig = {
6565
'material/legacy-autocomplete',
6666
'material/badge',
6767
'material/bottom-sheet',
68-
'material/button',
68+
'material/legacy-button',
6969
'material/button-toggle',
7070
'material/legacy-card',
7171
'material/legacy-checkbox',

integration/yarn-pnp-compat/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {NgModule} from '@angular/core';
22
import {BrowserModule} from '@angular/platform-browser';
3-
import {MatButtonModule} from '@angular/material/button';
3+
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
44

55
import {AppComponent} from './app.component';
66
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
77

88
@NgModule({
99
declarations: [AppComponent],
10-
imports: [BrowserModule, BrowserAnimationsModule, MatButtonModule],
10+
imports: [BrowserModule, BrowserAnimationsModule, MatLegacyButtonModule],
1111
providers: [],
1212
bootstrap: [AppComponent],
1313
})

src/components-examples/cdk/text-field/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ng_module(
1111
]),
1212
deps = [
1313
"//src/cdk/text-field",
14-
"//src/material/button",
14+
"//src/material/legacy-button",
1515
"//src/material/legacy-input",
1616
"//src/material/legacy-select",
1717
],

src/components-examples/cdk/text-field/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {TextFieldModule} from '@angular/cdk/text-field';
22
import {CommonModule} from '@angular/common';
33
import {NgModule} from '@angular/core';
4-
import {MatButtonModule} from '@angular/material/button';
4+
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
55
import {MatLegacyInputModule} from '@angular/material/legacy-input';
66
import {MatLegacySelectModule} from '@angular/material/legacy-select';
77
import {TextFieldAutofillDirectiveExample} from './text-field-autofill-directive/text-field-autofill-directive-example';
@@ -24,7 +24,7 @@ const EXAMPLES = [
2424
imports: [
2525
CommonModule,
2626
TextFieldModule,
27-
MatButtonModule,
27+
MatLegacyButtonModule,
2828
MatLegacyInputModule,
2929
MatLegacySelectModule,
3030
],

src/components-examples/cdk/tree/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ng_module(
1111
]),
1212
deps = [
1313
"//src/cdk/tree",
14-
"//src/material/button",
1514
"//src/material/icon",
15+
"//src/material/legacy-button",
1616
],
1717
)
1818

src/components-examples/cdk/tree/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {CdkTreeModule} from '@angular/cdk/tree';
22
import {NgModule} from '@angular/core';
3-
import {MatButtonModule} from '@angular/material/button';
3+
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
44
import {MatIconModule} from '@angular/material/icon';
55
import {CdkTreeFlatExample} from './cdk-tree-flat/cdk-tree-flat-example';
66
import {CdkTreeNestedExample} from './cdk-tree-nested/cdk-tree-nested-example';
@@ -10,7 +10,7 @@ export {CdkTreeFlatExample, CdkTreeNestedExample};
1010
const EXAMPLES = [CdkTreeFlatExample, CdkTreeNestedExample];
1111

1212
@NgModule({
13-
imports: [CdkTreeModule, MatButtonModule, MatIconModule],
13+
imports: [CdkTreeModule, MatLegacyButtonModule, MatIconModule],
1414
declarations: EXAMPLES,
1515
exports: EXAMPLES,
1616
})

src/components-examples/material-experimental/mdc-card/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ng_module(
1010
"**/*.css",
1111
]),
1212
deps = [
13-
"//src/material-experimental/mdc-button",
13+
"//src/material/button",
1414
"//src/material/card",
1515
],
1616
)

src/components-examples/material-experimental/mdc-card/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {NgModule} from '@angular/core';
2-
import {MatButtonModule} from '@angular/material-experimental/mdc-button';
2+
import {MatButtonModule} from '@angular/material/button';
33
import {MatCardModule} from '@angular/material/card';
44
import {MdcCardFancyExample} from './mdc-card-fancy/mdc-card-fancy-example';
55

src/components-examples/material-experimental/mdc-table/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ ng_module(
1818
"//src/cdk/testing",
1919
"//src/cdk/testing/testbed",
2020
"//src/material-experimental/mdc-table",
21-
"//src/material/button",
2221
"//src/material/button-toggle",
2322
"//src/material/core",
2423
"//src/material/icon",
24+
"//src/material/legacy-button",
2525
"//src/material/legacy-checkbox",
2626
"//src/material/legacy-input",
2727
"//src/material/paginator",

0 commit comments

Comments
 (0)