Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 6c316b7

Browse files
authored
feat: switch to MDC components (#1174)
Switches the docs site to use the MDC components and fixes some visual issues that came up as a result.
1 parent ac0acae commit 6c316b7

File tree

90 files changed

+1064
-1188
lines changed

Some content is hidden

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

90 files changed

+1064
-1188
lines changed

angular.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"projects": {
66
"material-angular-io": {
77
"root": "",
8+
"sourceRoot": "./src",
89
"projectType": "application",
910
"schematics": {
1011
"@schematics/angular:component": {
@@ -282,7 +283,10 @@
282283
"karmaConfig": "scenes/karma.conf.js",
283284
"assets": ["scenes/src/favicon.ico", "scenes/src/assets"],
284285
"styles": ["scenes/src/styles.scss"],
285-
"scripts": []
286+
"scripts": [],
287+
"stylePreprocessorOptions": {
288+
"includePaths": ["node_modules"]
289+
}
286290
}
287291
},
288292
"lint": {

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,37 @@
3434
},
3535
"private": true,
3636
"dependencies": {
37-
"@angular/animations": "^15.0.0-next.4",
38-
"@angular/cdk": "^15.0.0-next.3",
39-
"@angular/cdk-experimental": "^15.0.0-next.3",
40-
"@angular/common": "^15.0.0-next.4",
41-
"@angular/compiler": "^15.0.0-next.4",
42-
"@angular/components-examples": "https://github.com/angular/material2-docs-content.git#aef795ccdeb37f1399c2fa5b03425f426c913dd5",
43-
"@angular/core": "^15.0.0-next.4",
44-
"@angular/forms": "^15.0.0-next.4",
45-
"@angular/google-maps": "^15.0.0-next.3",
46-
"@angular/localize": "^15.0.0-next.4",
47-
"@angular/material": "^15.0.0-next.3",
48-
"@angular/material-experimental": "^15.0.0-next.3",
49-
"@angular/material-moment-adapter": "^15.0.0-next.3",
50-
"@angular/platform-browser": "^15.0.0-next.4",
51-
"@angular/platform-browser-dynamic": "^15.0.0-next.4",
52-
"@angular/router": "^15.0.0-next.4",
53-
"@angular/youtube-player": "^15.0.0-next.3",
37+
"@angular/animations": "^15.0.0-next.5",
38+
"@angular/cdk": "^15.0.0-next.4",
39+
"@angular/cdk-experimental": "^15.0.0-next.4",
40+
"@angular/common": "^15.0.0-next.5",
41+
"@angular/compiler": "^15.0.0-next.5",
42+
"@angular/components-examples": "https://github.com/angular/material2-docs-content.git#fba753a1fbf2d13ccbd0b5f223febbd9ebb1216c",
43+
"@angular/core": "^15.0.0-next.5",
44+
"@angular/forms": "^15.0.0-next.5",
45+
"@angular/google-maps": "^15.0.0-next.4",
46+
"@angular/localize": "^15.0.0-next.5",
47+
"@angular/material": "^15.0.0-next.4",
48+
"@angular/material-experimental": "^15.0.0-next.4",
49+
"@angular/material-moment-adapter": "^15.0.0-next.4",
50+
"@angular/platform-browser": "^15.0.0-next.5",
51+
"@angular/platform-browser-dynamic": "^15.0.0-next.5",
52+
"@angular/router": "^15.0.0-next.5",
53+
"@angular/youtube-player": "^15.0.0-next.4",
5454
"@stackblitz/sdk": "^1.5.2",
5555
"moment": "^2.29.1",
5656
"rxjs": "^6.6.7",
5757
"tslib": "^2.3.0",
5858
"zone.js": "~0.11.5"
5959
},
6060
"devDependencies": {
61-
"@angular-devkit/build-angular": "^15.0.0-next.3",
61+
"@angular-devkit/build-angular": "^15.0.0-next.4",
6262
"@angular-eslint/builder": "^14.0.0",
6363
"@angular-eslint/eslint-plugin": "^14.0.0",
6464
"@angular-eslint/eslint-plugin-template": "^14.0.0",
6565
"@angular-eslint/template-parser": "^14.0.0",
66-
"@angular/cli": "^15.0.0-next.3",
67-
"@angular/compiler-cli": "^15.0.0-next.4",
66+
"@angular/cli": "^15.0.0-next.4",
67+
"@angular/compiler-cli": "^15.0.0-next.5",
6868
"@types/imagemin": "^7.0.0",
6969
"@types/jasmine": "^3.7.7",
7070
"@types/node": "^14.14.22",

scenes/src/app/app.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import {NgModule} from '@angular/core';
55
import {AppRoutingModule} from './app-routing.module';
66
import {AppComponent} from './app.component';
77
import {MatNativeDateModule} from '@angular/material/core';
8-
import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog';
8+
import {MatDialogModule} from '@angular/material/dialog';
99
import {MatDatepickerModule} from '@angular/material/datepicker';
1010
import {ScrollingModule} from '@angular/cdk/scrolling';
1111
import {OverlayContainer} from '@angular/cdk/overlay';
1212
import {SceneOverlayContainer} from './scene-overlay-container';
1313
import {DOCUMENT} from '@angular/common';
14-
import {MatLegacyMenuModule as MatMenuModule} from '@angular/material/legacy-menu';
15-
import {MatLegacyPaginatorModule as MatPaginatorModule} from '@angular/material/legacy-paginator';
14+
import {MatMenuModule} from '@angular/material/menu';
15+
import {MatPaginatorModule} from '@angular/material/paginator';
1616
import {BottomSheetSceneModule} from './scenes/bottom-sheet/bottom-sheet-scene';
1717
import {GridListSceneModule} from './scenes/grid-list/grid-list-scene';
1818
import {SnackBarSceneModule} from './scenes/snack-bar/snack-bar-scene';
1919
import {SelectSceneModule} from './scenes/select/select-scene';
20-
import {MatLegacyAutocompleteModule as MatAutocompleteModule} from '@angular/material/legacy-autocomplete';
20+
import {MatAutocompleteModule} from '@angular/material/autocomplete';
2121
import {AutocompleteSceneModule} from './scenes/autocomplete/autocomplete-scene';
2222
import {DialogSceneModule} from './scenes/dialog/dialog-scene';
2323
import {FormFieldSceneModule} from './scenes/form-field/form-field-scene';

scenes/src/app/scenes/autocomplete/autocomplete-scene.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
ViewEncapsulation
77
} from '@angular/core';
88
import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms';
9-
import {MatLegacyFormFieldModule as MatFormFieldModule} from '@angular/material/legacy-form-field';
10-
import {MatLegacyInput as MatInput, MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input';
11-
import {MatLegacyAutocompleteModule as MatAutocompleteModule} from '@angular/material/legacy-autocomplete';
9+
import {MatFormFieldModule} from '@angular/material/form-field';
10+
import {MatInput, MatInputModule} from '@angular/material/input';
11+
import {MatAutocompleteModule} from '@angular/material/autocomplete';
1212
import {CommonModule, } from '@angular/common';
1313
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
1414

scenes/src/app/scenes/bottom-sheet/bottom-sheet-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {AfterViewInit, Component, NgModule, ViewEncapsulation} from '@angular/core';
22
import {MatBottomSheet, MatBottomSheetModule} from '@angular/material/bottom-sheet';
33
import {MatIconModule} from '@angular/material/icon';
4-
import {MatLegacyListModule as MatListModule} from '@angular/material/legacy-list';
4+
import {MatListModule} from '@angular/material/list';
55

66

77
@Component({

scenes/src/app/scenes/button/button-scene.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ div.scene-buttons button {
88
margin: 16px;
99
}
1010

11-
div.scene-buttons .mat-icon-button {
11+
div.scene-buttons .mat-mdc-icon-button {
1212
margin: 0 25px;
1313
}

scenes/src/app/scenes/button/button-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, NgModule, ViewEncapsulation} from '@angular/core';
2-
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
2+
import {MatButtonModule} from '@angular/material/button';
33
import {MatIconModule} from '@angular/material/icon';
44

55
@Component({

scenes/src/app/scenes/card/card-scene.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="scene-card">
2-
<mat-card>
2+
<mat-card appearance="outlined">
33
<mat-card-title class="docs-scene-card-title">
44
</mat-card-title>
55

scenes/src/app/scenes/card/card-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, NgModule} from '@angular/core';
2-
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
2+
import {MatCardModule} from '@angular/material/card';
33
import {InputSceneModule} from '../placeholder/placeholder-scene';
44

55
@Component({

scenes/src/app/scenes/checkbox/checkbox-scene.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
margin-left: -20px;
77
}
88

9+
/* TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version. */
910
.mat-checkbox-layout {
1011
padding: 5px 0;
1112
}
1213

14+
/* TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version. */
1315
.mat-checkbox-label {
1416
font-size: 20px;
1517
}

0 commit comments

Comments
 (0)