Skip to content

Commit d082d4d

Browse files
authored
docs: switch remaining docs examples to MDC (#25653)
Switches the remaining usages of legacy components in other components' examples to use the non-legacy versions.
1 parent b8af554 commit d082d4d

File tree

68 files changed

+157
-176
lines changed

Some content is hidden

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

68 files changed

+157
-176
lines changed

src/components-examples/cdk-experimental/selection/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ng_module(
1313
"//src/cdk-experimental/selection",
1414
"//src/cdk/collections",
1515
"//src/cdk/table",
16-
"//src/material/legacy-checkbox",
16+
"//src/material/checkbox",
1717
"@npm//@angular/forms",
1818
],
1919
)

src/components-examples/cdk-experimental/selection/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {CdkTableModule} from '@angular/cdk/table';
33
import {CommonModule} from '@angular/common';
44
import {NgModule} from '@angular/core';
55
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
6-
import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox';
6+
import {MatCheckboxModule} from '@angular/material/checkbox';
77

88
import {CdkSelectionColumnExample} from './cdk-selection-column/cdk-selection-column-example';
99
import {CdkSelectionListExample} from './cdk-selection-list/cdk-selection-list-example';
@@ -19,7 +19,7 @@ const EXAMPLES = [CdkSelectionListExample, CdkSelectionColumnExample];
1919
CommonModule,
2020
FormsModule,
2121
ReactiveFormsModule,
22-
MatLegacyCheckboxModule,
22+
MatCheckboxModule,
2323
],
2424
declarations: EXAMPLES,
2525
exports: EXAMPLES,

src/components-examples/cdk/a11y/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/a11y",
14-
"//src/material/legacy-select",
14+
"//src/material/select",
1515
],
1616
)
1717

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {A11yModule} from '@angular/cdk/a11y';
22
import {NgModule} from '@angular/core';
3-
import {MatLegacySelectModule} from '@angular/material/legacy-select';
3+
import {MatSelectModule} from '@angular/material/select';
44
import {FocusMonitorDirectivesExample} from './focus-monitor-directives/focus-monitor-directives-example';
55
import {FocusMonitorFocusViaExample} from './focus-monitor-focus-via/focus-monitor-focus-via-example';
66
import {FocusMonitorOverviewExample} from './focus-monitor-overview/focus-monitor-overview-example';
@@ -14,7 +14,7 @@ const EXAMPLES = [
1414
];
1515

1616
@NgModule({
17-
imports: [A11yModule, MatLegacySelectModule],
17+
imports: [A11yModule, MatSelectModule],
1818
declarations: EXAMPLES,
1919
exports: EXAMPLES,
2020
})

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ng_module(
1111
]),
1212
deps = [
1313
"//src/cdk/text-field",
14-
"//src/material/legacy-button",
15-
"//src/material/legacy-input",
16-
"//src/material/legacy-select",
14+
"//src/material/button",
15+
"//src/material/input",
16+
"//src/material/select",
1717
],
1818
)
1919

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {TextFieldModule} from '@angular/cdk/text-field';
22
import {CommonModule} from '@angular/common';
33
import {NgModule} from '@angular/core';
4-
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
5-
import {MatLegacyInputModule} from '@angular/material/legacy-input';
6-
import {MatLegacySelectModule} from '@angular/material/legacy-select';
4+
import {MatButtonModule} from '@angular/material/button';
5+
import {MatInputModule} from '@angular/material/input';
6+
import {MatSelectModule} from '@angular/material/select';
77
import {TextFieldAutofillDirectiveExample} from './text-field-autofill-directive/text-field-autofill-directive-example';
88
import {TextFieldAutofillMonitorExample} from './text-field-autofill-monitor/text-field-autofill-monitor-example';
99
import {TextFieldAutosizeTextareaExample} from './text-field-autosize-textarea/text-field-autosize-textarea-example';
@@ -21,13 +21,7 @@ const EXAMPLES = [
2121
];
2222

2323
@NgModule({
24-
imports: [
25-
CommonModule,
26-
TextFieldModule,
27-
MatLegacyButtonModule,
28-
MatLegacyInputModule,
29-
MatLegacySelectModule,
30-
],
24+
imports: [CommonModule, TextFieldModule, MatButtonModule, MatInputModule, MatSelectModule],
3125
declarations: EXAMPLES,
3226
exports: EXAMPLES,
3327
})

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",
1415
"//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 {MatLegacyButtonModule} from '@angular/material/legacy-button';
3+
import {MatButtonModule} from '@angular/material/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, MatLegacyButtonModule, MatIconModule],
13+
imports: [CdkTreeModule, MatButtonModule, MatIconModule],
1414
declarations: EXAMPLES,
1515
exports: EXAMPLES,
1616
})

src/components-examples/material-experimental/column-resize/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/material-experimental/column-resize",
14-
"//src/material/legacy-table",
14+
"//src/material/table",
1515
],
1616
)
1717

src/components-examples/material-experimental/column-resize/default-enabled-column-resize-flex/default-enabled-column-resize-flex-example-module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
*/
88

99
import {NgModule} from '@angular/core';
10-
import {MatLegacyTableModule} from '@angular/material/legacy-table';
10+
import {MatTableModule} from '@angular/material/table';
1111
import {MatDefaultEnabledColumnResizeModule} from '@angular/material-experimental/column-resize';
1212

1313
import {DefaultEnabledColumnResizeFlexExample} from './default-enabled-column-resize-flex-example';
1414

1515
@NgModule({
16-
imports: [MatDefaultEnabledColumnResizeModule, MatLegacyTableModule],
16+
imports: [MatDefaultEnabledColumnResizeModule, MatTableModule],
1717
declarations: [DefaultEnabledColumnResizeFlexExample],
1818
exports: [DefaultEnabledColumnResizeFlexExample],
1919
})

0 commit comments

Comments
 (0)