Skip to content

Commit 8cad8cf

Browse files
committed
fix(multiple): remove legacy components
1 parent 981c2e3 commit 8cad8cf

File tree

509 files changed

+9
-72037
lines changed

Some content is hidden

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

509 files changed

+9
-72037
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,6 @@
1616
/src/material/grid-list/** @andrewseguin
1717
/src/material/icon/** @andrewseguin
1818
/src/material/input/** @devversion @mmalerba
19-
/src/material/legacy-autocomplete/** @crisbeto
20-
/src/material/legacy-button/** @andrewseguin
21-
/src/material/legacy-card/** @andrewseguin
22-
/src/material/legacy-checkbox/** @andrewseguin @devversion
23-
/src/material/legacy-chips/** @andrewseguin
24-
/src/material/legacy-dialog/** @andrewseguin @crisbeto
25-
/src/material/legacy-form-field/** @mmalerba
26-
/src/material/legacy-input/** @mmalerba
27-
/src/material/legacy-list/** @andrewseguin @crisbeto @devversion
28-
/src/material/legacy-menu/** @crisbeto
29-
/src/material/legacy-paginator/** @andrewseguin
30-
/src/material/legacy-prebuilt-themes/** @andrewseguin
31-
/src/material/legacy-progress-bar/** @andrewseguin @crisbeto
32-
/src/material/legacy-progress-spinner/** @andrewseguin @crisbeto
33-
/src/material/legacy-radio/** @andrewseguin @devversion
34-
/src/material/legacy-select/** @crisbeto
35-
/src/material/legacy-slide-toggle/** @devversion
36-
/src/material/legacy-slider/** @mmalerba
37-
/src/material/legacy-snack-bar/** @andrewseguin @crisbeto
38-
/src/material/legacy-table/** @andrewseguin
39-
/src/material/legacy-tabs/** @andrewseguin
40-
/src/material/legacy-tooltip/** @andrewseguin
4119
/src/material/list/** @mmalerba @devversion
4220
/src/material/menu/** @crisbeto
4321
/src/material/paginator/** @crisbeto
@@ -86,13 +64,6 @@
8664
/src/material/core/tokens/** @mmalerba
8765
/src/material/core/typography/** @crisbeto
8866
/src/material/core/util/** @andrewseguin
89-
/src/material/legacy-core/* @andrewseguin
90-
/src/material/legacy-core/color/** @andrewseguin @devversion
91-
/src/material/legacy-core/density/** @devversion
92-
/src/material/legacy-core/option/** @crisbeto
93-
/src/material/legacy-core/testing/** @crisbeto
94-
/src/material/legacy-core/theming/** @andrewseguin @jelbourn
95-
/src/material/legacy-core/typography/** @crisbeto
9667

9768
# Miscellaneous components
9869
/src/google-maps/** @crisbeto
@@ -188,7 +159,6 @@
188159
/src/dev-app/layout/** @andrewseguin
189160
/src/dev-app/list/** @andrewseguin @crisbeto @devversion
190161
/src/dev-app/live-announcer/** @jelbourn
191-
/src/dev-app/legacy-autocomplete/** @crisbeto
192162
/src/dev-app/button/** @andrewseguin
193163
/src/dev-app/snack-bar/** @andrewseguin
194164
/src/dev-app/tabs/** @crisbeto
@@ -279,21 +249,6 @@
279249
/tools/public_api_guard/material/form-field** @mmalerba
280250
/tools/public_api_guard/material/grid-list** @andrewseguin
281251
/tools/public_api_guard/material/icon** @andrewseguin
282-
/tools/public_api_guard/material/legacy-button** @andrewseguin
283-
/tools/public_api_guard/material/legacy-card** @andrewseguin
284-
/tools/public_api_guard/material/legacy-checkbox** @andrewseguin @devversion
285-
/tools/public_api_guard/material/legacy-dialog** @andrewseguin @crisbeto
286-
/tools/public_api_guard/material/legacy-input** @mmalerba
287-
/tools/public_api_guard/material/legacy-paginator** @andrewseguin
288-
/tools/public_api_guard/material/legacy-progress-bar** @andrewseguin @crisbeto
289-
/tools/public_api_guard/material/legacy-progress-spinner** @andrewseguin @crisbeto
290-
/tools/public_api_guard/material/legacy-radio** @andrewseguin @devversion
291-
/tools/public_api_guard/material/legacy-select** @crisbeto
292-
/tools/public_api_guard/material/legacy-slide-toggle** @devversion
293-
/tools/public_api_guard/material/legacy-snack-bar** @andrewseguin @crisbeto
294-
/tools/public_api_guard/material/legacy-table** @andrewseguin
295-
/tools/public_api_guard/material/legacy-tabs** @andrewseguin
296-
/tools/public_api_guard/material/legacy-tooltip** @andrewseguin
297252
/tools/public_api_guard/material/list** @andrewseguin @crisbeto @devversion
298253
/tools/public_api_guard/material/material** @andrewseguin
299254
/tools/public_api_guard/material/menu** @crisbeto

.ng-dev/commit-message.mts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,54 +59,30 @@ export const commitMessage: CommitMessageConfig = {
5959
'material/table',
6060
'material/tabs',
6161
'material/autocomplete',
62-
'material/legacy-autocomplete',
6362
'material/badge',
6463
'material/bottom-sheet',
65-
'material/legacy-button',
6664
'material/button-toggle',
67-
'material/legacy-card',
68-
'material/legacy-checkbox',
69-
'material/legacy-checkbox',
7065
'material/chips',
71-
'material/legacy-chips',
7266
'material/core',
73-
'material/legacy-core',
7467
'material/datepicker',
75-
'material/legacy-dialog',
7668
'material/divider',
7769
'material/expansion',
7870
'material/form-field',
79-
'material/legacy-form-field',
8071
'material/grid-list',
8172
'material/icon',
82-
'material/legacy-input',
8373
'material/list',
84-
'material/legacy-list',
8574
'material/menu',
86-
'material/legacy-menu',
87-
'material/legacy-paginator',
8875
'material/prebuilt-themes',
89-
'material/legacy-prebuilt-themes',
90-
'material/legacy-progress-bar',
91-
'material/legacy-progress-spinner',
9276
'material/radio',
93-
'material/legacy-radio',
9477
'material/schematics',
9578
'material/select',
96-
'material/legacy-select',
9779
'material/sidenav',
98-
'material/legacy-slide-toggle',
9980
'material/slider',
100-
'material/legacy-slider',
101-
'material/legacy-snack-bar',
10281
'material/sort',
10382
'material/stepper',
104-
'material/legacy-table',
105-
'material/legacy-tabs',
10683
'material/testing',
10784
'material/theming',
10885
'material/toolbar',
109-
'material/legacy-tooltip',
11086
'material/tooltip',
11187
'material/tree',
11288
'material-moment-adapter',

.ng-dev/google-sync-config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"src/material/index.ts",
3030
"src/material/module.ts",
3131
"src/material/core/index.ts",
32-
"src/material/legacy-core/index.ts",
3332
"src/material/core/theming/tests/**/*",
3433
"src/material/core/tokens/tests/**",
3534
"src/material/expansion/index.ts",

src/material/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ts_library(
1616

1717
filegroup(
1818
name = "overviews",
19-
srcs = ["//src/material/%s:overview" % name for name in MATERIAL_ENTRYPOINTS if not "legacy-" in name],
19+
srcs = ["//src/material/%s:overview" % name for name in MATERIAL_ENTRYPOINTS],
2020
)
2121

2222
sass_library(

src/material/card/README.md

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1 @@
1-
This is a prototype of an alternate version of `MatCard` built on top of
2-
[MDC Web](https://github.com/material-components/material-components-web). This component is
3-
experimental and should not be used in production.
4-
5-
## How to use
6-
Assuming your application is already up and running using Angular Material, you can add this
7-
component by following these steps:
8-
9-
1. Install `@angular/material-experimental` and MDC Web:
10-
11-
```bash
12-
npm i material-components-web @angular/material-experimental
13-
```
14-
15-
2. In your `angular.json`, make sure `node_modules/` is listed as a Sass include path. This is
16-
needed for the Sass compiler to be able to find the MDC Web Sass files.
17-
18-
```json
19-
...
20-
"styles": [
21-
"src/styles.scss"
22-
],
23-
"stylePreprocessorOptions": {
24-
"includePaths": [
25-
"node_modules/"
26-
]
27-
},
28-
...
29-
```
30-
31-
3. Import the experimental `MatCardModule` and add it to the module that declares your component:
32-
33-
```ts
34-
import {MatCardModule} from '@angular/material/card';
35-
36-
@NgModule({
37-
declarations: [MyComponent],
38-
imports: [MatCardModule],
39-
})
40-
export class MyModule {}
41-
```
42-
43-
4. Use the card in your component's template:
44-
45-
```html
46-
<mat-card>
47-
<mat-card-title> My Card Title </mat-card-title>
48-
<mat-card-content>
49-
Card content!
50-
</mat-card-content>
51-
<mat-card-actions>
52-
<button> Like </button>
53-
<button> Share </button>
54-
</mat-card-actions>
55-
</mat-card>
56-
```
57-
58-
5. Add the theme and typography mixins to your Sass:
59-
60-
```scss
61-
@use '@angular/material' as mat;
62-
@use '@angular/material-experimental' as mat-experimental;
63-
64-
$candy-app-primary: mat.define-palette(mat.$indigo-palette);
65-
$candy-app-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
66-
$candy-app-theme: mat.define-light-theme((
67-
color: (
68-
primary: $candy-app-primary,
69-
accent: $candy-app-accent,
70-
)
71-
));
72-
73-
74-
@include mat-experimental.mdc-card-theme($candy-app-theme);
75-
```
76-
77-
## API differences
78-
79-
The API of the card matches the one from `@angular/material/legacy-card`. Simply replace imports to
80-
`@angular/material/legacy-card` with imports to `@angular/material/card`.
1+
Please see the official documentation at https://material.angular.io/components/component/card

src/material/checkbox/README.md

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1 @@
1-
This is prototype of an alternate version of `<mat-checkbox>` built on top of
2-
[MDC Web](https://github.com/material-components/material-components-web). It demonstrates how
3-
Angular Material could use MDC Web under the hood while still exposing the same API Angular users as
4-
the existing `<mat-checkbox>`. This component is experimental and should not be used in production.
5-
6-
## How to use
7-
Assuming your application is already up and running using Angular Material, you can add this
8-
component by following these steps:
9-
10-
1. Install Angular Material Experimental & MDC WEB:
11-
12-
```bash
13-
npm i material-components-web @angular/material-experimental
14-
```
15-
16-
2. In your `angular.json`, make sure `node_modules/` is listed as a Sass include path. This is
17-
needed for the Sass compiler to be able to find the MDC Web Sass files.
18-
19-
```json
20-
...
21-
"styles": [
22-
"src/styles.scss"
23-
],
24-
"stylePreprocessorOptions": {
25-
"includePaths": [
26-
"node_modules/"
27-
]
28-
},
29-
...
30-
```
31-
32-
3. Import the experimental `MatCheckboxModule` and add it to the module that declares your
33-
component:
34-
35-
```ts
36-
import {MatCheckboxModule} from '@angular/material/checkbox';
37-
38-
@NgModule({
39-
declarations: [MyComponent],
40-
imports: [MatCheckboxModule],
41-
})
42-
export class MyModule {}
43-
```
44-
45-
4. Add use `<mat-checkbox>` in your component's template, just like you would the normal
46-
`<mat-checkbox>`:
47-
48-
```html
49-
<mat-checkbox [checked]="isChecked">Check me</mat-checkbox>
50-
```
51-
52-
5. Add the theme and typography mixins to your Sass. (There is currently no pre-built CSS option for
53-
the experimental `<mat-checkbox>`):
54-
55-
```scss
56-
@use '@angular/material' as mat;
57-
@use '@angular/material-experimental' as mat-experimental;
58-
59-
$my-primary: mat.define-palette(mat.$indigo-palette);
60-
$my-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
61-
$my-theme: mat.define-light-theme((
62-
color: (
63-
primary: $my-primary,
64-
accent: $my-accent
65-
)
66-
));
67-
68-
@include mat-experimental.mdc-checkbox-theme($my-theme);
69-
@include mat-experimental.mdc-checkbox-typography($my-theme);
70-
```
71-
72-
## API differences
73-
The experimental checkbox API closely matches the
74-
[API of the standard checkbox](https://material.angular.io/components/checkbox/api).
75-
`@angular/material/checkbox` exports symbols with the same name and public interface
76-
as all of the symbols found under `@angular/material/legacy-checkbox`, except for the following
77-
differences:
78-
79-
* The experimental `MatCheckbox` does not have a public `ripple` property.
80-
81-
## Replacing the standard checkbox in an existing app
82-
Because the experimental API mirrors the API for the standard checkbox, it can easily be swapped in
83-
by just changing the import paths. There is currently no schematic for this, but you can run the
84-
following string replace across your TypeScript files:
85-
86-
```bash
87-
grep -lr --include="*.ts" --exclude-dir="node_modules" \
88-
--exclude="*.d.ts" "['\"]@angular/material/legacy-checkbox['\"]" | xargs sed -i \
89-
"s/['\"]@angular\/material\/checkbox['\"]/'@angular\/material-experimental\/mdc-checkbox'/g"
90-
```
91-
92-
CSS styles and tests that depend on implementation details of mat-checkbox (such as getting elements
93-
from the template by class name) will need to be manually updated.
94-
95-
There are some small visual differences between this checkbox and the standard mat-checkbox. This
96-
checkbox has more built-in padding around it and is slightly larger.
1+
Please see the official documentation at https://material.angular.io/components/component/checkbox

0 commit comments

Comments
 (0)