Skip to content

Commit 697c3a0

Browse files
devversionmmalerba
authored andcommitted
feat(material-experimental): initial prototype of mdc-form-fie… (#17903)
* feat(material-experimental): initial prototype of mdc-form-field Initial prototype of form-field based on MDC text-field. * fixup! feat(material-experimental): initial prototype of mdc-form-field Address feedback * Use MDC text-field variables as much as possible. * fixup! fixup! feat(material-experimental): initial prototype of mdc-form-field Address feedback 2 * fixup! feat(material-experimental): initial prototype of mdc-form-field Address feedback
1 parent 935bb39 commit 697c3a0

Some content is hidden

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

54 files changed

+4004
-11
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@
9696
/src/material-experimental/mdc-checkbox/** @mmalerba
9797
/src/material-experimental/mdc-chips/** @mmalerba
9898
/src/material-experimental/mdc-dialog/** @devversion
99+
/src/material-experimental/mdc-form-field/** @devversion @mmalerba
99100
/src/material-experimental/mdc-helpers/** @mmalerba
101+
/src/material-experimental/mdc-input/** @devversion @mmalerba
100102
/src/material-experimental/mdc-list/** @mmalerba
101103
/src/material-experimental/mdc-menu/** @crisbeto
102104
/src/material-experimental/mdc-select/** @crisbeto
@@ -160,6 +162,7 @@
160162
/src/dev-app/mdc-card/** @mmalerba
161163
/src/dev-app/mdc-checkbox/** @mmalerba
162164
/src/dev-app/mdc-chips/** @mmalerba
165+
/src/dev-app/mdc-input/** @devversion @mmalerba
163166
/src/dev-app/mdc-menu/** @crisbeto
164167
/src/dev-app/mdc-progress-bar/** @crisbeto
165168
/src/dev-app/mdc-radio/** @mmalerba

rollup-globals.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ROLLUP_GLOBALS = {
6565
"@material/tab-bar": "mdc.tabBar",
6666
"@material/tab-indicator": "mdc.tabIndicator",
6767
"@material/tab-scroller": "mdc.tabScroller",
68-
"@material/text-field": "mdc.textField",
68+
"@material/textfield": "mdc.textfield",
6969
"@material/top-app-bar": "mdc.topAppBar",
7070

7171
# Third-party libraries.

src/dev-app/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ ng_module(
5050
"//src/dev-app/mdc-card",
5151
"//src/dev-app/mdc-checkbox",
5252
"//src/dev-app/mdc-chips",
53+
"//src/dev-app/mdc-input",
5354
"//src/dev-app/mdc-menu",
5455
"//src/dev-app/mdc-progress-bar",
5556
"//src/dev-app/mdc-radio",

src/dev-app/dev-app/dev-app-layout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export class DevAppLayout {
7373
{name: 'MDC Card', route: '/mdc-card'},
7474
{name: 'MDC Checkbox', route: '/mdc-checkbox'},
7575
{name: 'MDC Chips', route: '/mdc-chips'},
76+
{name: 'MDC Input', route: '/mdc-input'},
7677
{name: 'MDC Menu', route: '/mdc-menu'},
7778
{name: 'MDC Radio', route: '/mdc-radio'},
7879
{name: 'MDC Progress Bar', route: '/mdc-progress-bar'},

src/dev-app/dev-app/routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const DEV_APP_ROUTES: Routes = [
6363
loadChildren: 'mdc-progress-bar/mdc-progress-bar-demo-module#MdcProgressBarDemoModule'
6464
},
6565
{path: 'mdc-chips', loadChildren: 'mdc-chips/mdc-chips-demo-module#MdcChipsDemoModule'},
66+
{path: 'mdc-input', loadChildren: 'mdc-input/mdc-input-demo-module#MdcInputDemoModule'},
6667
{path: 'mdc-menu', loadChildren: 'mdc-menu/mdc-menu-demo-module#MdcMenuDemoModule'},
6768
{path: 'mdc-radio', loadChildren: 'mdc-radio/mdc-radio-demo-module#MdcRadioDemoModule'},
6869
{

src/dev-app/mdc-input/BUILD.bazel

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
load("//tools:defaults.bzl", "ng_module", "sass_binary")
4+
5+
ng_module(
6+
name = "mdc-input",
7+
srcs = glob(["**/*.ts"]),
8+
assets = [
9+
":mdc_input_demo_scss",
10+
"mdc-input-demo.html",
11+
],
12+
deps = [
13+
"//src/material-experimental/mdc-form-field",
14+
"//src/material-experimental/mdc-input",
15+
"//src/material/autocomplete",
16+
"//src/material/button",
17+
"//src/material/button-toggle",
18+
"//src/material/card",
19+
"//src/material/checkbox",
20+
"//src/material/icon",
21+
"//src/material/tabs",
22+
"//src/material/toolbar",
23+
"@npm//@angular/forms",
24+
"@npm//@angular/router",
25+
],
26+
)
27+
28+
sass_binary(
29+
name = "mdc_input_demo_scss",
30+
src = "mdc-input-demo.scss",
31+
deps = [
32+
"//src/cdk/text-field:text_field_scss_lib",
33+
],
34+
)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {CommonModule} from '@angular/common';
10+
import {NgModule} from '@angular/core';
11+
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
12+
import {MatFormFieldModule} from '@angular/material-experimental/mdc-form-field';
13+
import {MatInputModule} from '@angular/material-experimental/mdc-input';
14+
import {MatAutocompleteModule} from '@angular/material/autocomplete';
15+
import {MatButtonModule} from '@angular/material/button';
16+
import {MatButtonToggleModule} from '@angular/material/button-toggle';
17+
import {MatCardModule} from '@angular/material/card';
18+
import {MatCheckboxModule} from '@angular/material/checkbox';
19+
import {MatIconModule} from '@angular/material/icon';
20+
import {MatTabsModule} from '@angular/material/tabs';
21+
import {MatToolbarModule} from '@angular/material/toolbar';
22+
import {RouterModule} from '@angular/router';
23+
import {MdcInputDemo} from './mdc-input-demo';
24+
25+
@NgModule({
26+
imports: [
27+
CommonModule,
28+
FormsModule,
29+
MatAutocompleteModule,
30+
MatButtonModule,
31+
MatButtonToggleModule,
32+
MatCardModule,
33+
MatCheckboxModule,
34+
MatFormFieldModule,
35+
MatIconModule,
36+
MatInputModule,
37+
MatTabsModule,
38+
MatToolbarModule,
39+
ReactiveFormsModule,
40+
RouterModule.forChild([{path: '', component: MdcInputDemo}]),
41+
],
42+
declarations: [MdcInputDemo],
43+
})
44+
export class MdcInputDemoModule {}

0 commit comments

Comments
 (0)