Skip to content

feat(material-experimental/mdc-select): implement MDC-based mat-select #20502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
/src/dev-app/mdc-progress-bar/** @crisbeto
/src/dev-app/mdc-progress-spinner/** @annieyw @mmalerba
/src/dev-app/mdc-radio/** @mmalerba
/src/dev-app/mdc-select/** @crisbeto
/src/dev-app/mdc-snack-bar/** @andrewseguin
/src/dev-app/mdc-sidenav/** @crisbeto
/src/dev-app/mdc-snack-bar/** @andrewseguin
Expand Down
1 change: 1 addition & 0 deletions src/dev-app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ng_module(
"//src/dev-app/mdc-progress-bar",
"//src/dev-app/mdc-progress-spinner",
"//src/dev-app/mdc-radio",
"//src/dev-app/mdc-select",
"//src/dev-app/mdc-sidenav",
"//src/dev-app/mdc-slide-toggle",
"//src/dev-app/mdc-slider",
Expand Down
1 change: 1 addition & 0 deletions src/dev-app/dev-app/dev-app-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class DevAppLayout {
{name: 'MDC Progress Bar', route: '/mdc-progress-bar'},
{name: 'MDC Progress Spinner', route: '/mdc-progress-spinner'},
{name: 'MDC Tabs', route: '/mdc-tabs'},
{name: 'MDC Select', route: '/mdc-select'},
{name: 'MDC Sidenav', route: '/mdc-sidenav'},
{name: 'MDC Slide Toggle', route: '/mdc-slide-toggle'},
{name: 'MDC Slider', route: '/mdc-slider'},
Expand Down
1 change: 1 addition & 0 deletions src/dev-app/dev-app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const DEV_APP_ROUTES: Routes = [
'mdc-progress-spinner/mdc-progress-spinner-demo-module#MdcProgressSpinnerDemoModule'
},
{path: 'mdc-radio', loadChildren: 'mdc-radio/mdc-radio-demo-module#MdcRadioDemoModule'},
{path: 'mdc-select', loadChildren: 'mdc-select/mdc-select-demo-module#MdcSelectDemoModule'},
{path: 'mdc-sidenav', loadChildren: 'mdc-sidenav/mdc-sidenav-demo-module#MdcSidenavDemoModule'},
{
path: 'mdc-snack-bar',
Expand Down
28 changes: 28 additions & 0 deletions src/dev-app/mdc-select/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")

package(default_visibility = ["//visibility:public"])

ng_module(
name = "mdc-select",
srcs = glob(["**/*.ts"]),
assets = [
"mdc-select-demo.html",
":mdc_select_demo_scss",
],
deps = [
"//src/material-experimental/mdc-button",
"//src/material-experimental/mdc-card",
"//src/material-experimental/mdc-form-field",
"//src/material-experimental/mdc-input",
"//src/material-experimental/mdc-select",
"//src/material/icon",
"@npm//@angular/forms",
"@npm//@angular/router",
],
)

sass_binary(
name = "mdc_select_demo_scss",
src = "mdc-select-demo.scss",
)
37 changes: 37 additions & 0 deletions src/dev-app/mdc-select/mdc-select-demo-module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {NgModule} from '@angular/core';
import {MatFormFieldModule} from '@angular/material-experimental/mdc-form-field';
import {MatSelectModule} from '@angular/material-experimental/mdc-select';
import {RouterModule} from '@angular/router';
import {CommonModule} from '@angular/common';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MatCardModule} from '@angular/material-experimental/mdc-card';
import {MatIconModule} from '@angular/material/icon';
import {MatButtonModule} from '@angular/material-experimental/mdc-button';
import {MatInputModule} from '@angular/material-experimental/mdc-input';
import {MdcSelectDemo} from './mdc-select-demo';

@NgModule({
imports: [
CommonModule,
FormsModule,
MatButtonModule,
MatCardModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatSelectModule,
ReactiveFormsModule,
RouterModule.forChild([{path: '', component: MdcSelectDemo}]),
],
declarations: [MdcSelectDemo],
})
export class MdcSelectDemoModule {
}
Loading