forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples): all examples should use mat-form-field's fill appeara…
…nce by default - stop using the soon to be deprecated legacy appearance by default - fix issues where labels were specified in the `placeholder` attribute - instead of a `mat-label` Relates to angular#14792
- Loading branch information
Showing
67 changed files
with
302 additions
and
164 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
...s-examples/material/datepicker/datepicker-custom-icon/datepicker-custom-icon-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...nts-examples/material/datepicker/datepicker-date-class/datepicker-date-class-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field class="example-full-width"> | ||
<input matInput [matDatepicker]="picker" placeholder="Choose a date"> | ||
<mat-label>Choose a date</mat-label> | ||
<input matInput [matDatepicker]="picker"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker [dateClass]="dateClass" #picker></mat-datepicker> | ||
</mat-form-field> |
9 changes: 6 additions & 3 deletions
9
...ponents-examples/material/datepicker/datepicker-disabled/datepicker-disabled-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/datepicker/datepicker-events/datepicker-events-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/datepicker/datepicker-filter/datepicker-filter-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field class="example-full-width"> | ||
<input matInput [matDatepickerFilter]="myFilter" [matDatepicker]="picker" placeholder="Choose a date"> | ||
<mat-label>Choose a date</mat-label> | ||
<input matInput [matDatepickerFilter]="myFilter" [matDatepicker]="picker"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker #picker></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
...omponents-examples/material/datepicker/datepicker-formats/datepicker-formats-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field> | ||
<input matInput [matDatepicker]="dp" placeholder="Verbose datepicker" [formControl]="date"> | ||
<mat-label>Verbose datepicker</mat-label> | ||
<input matInput [matDatepicker]="dp" [formControl]="date"> | ||
<mat-datepicker-toggle matSuffix [for]="dp"></mat-datepicker-toggle> | ||
<mat-datepicker #dp></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/datepicker/datepicker-locale/datepicker-locale-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...omponents-examples/material/datepicker/datepicker-min-max/datepicker-min-max-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field class="example-full-width"> | ||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="picker" placeholder="Choose a date"> | ||
<mat-label>Choose a date</mat-label> | ||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="picker"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker #picker></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/datepicker/datepicker-moment/datepicker-moment-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field> | ||
<input matInput [matDatepicker]="dp" placeholder="Moment.js datepicker" [formControl]="date"> | ||
<mat-label>Moment.js datepicker</mat-label> | ||
<input matInput [matDatepicker]="dp" [formControl]="date"> | ||
<mat-datepicker-toggle matSuffix [for]="dp"></mat-datepicker-toggle> | ||
<mat-datepicker #dp></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
...ponents-examples/material/datepicker/datepicker-overview/datepicker-overview-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field> | ||
<input matInput [matDatepicker]="picker" placeholder="Choose a date"> | ||
<mat-label>Choose a date</mat-label> | ||
<input matInput [matDatepicker]="picker"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker #picker></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
...nts-examples/material/datepicker/datepicker-start-view/datepicker-start-view-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field> | ||
<input matInput [matDatepicker]="picker" placeholder="Choose a date"> | ||
<mat-label>Choose a date</mat-label> | ||
<input matInput [matDatepicker]="picker"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker #picker startView="year" [startAt]="startDate"></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/datepicker/datepicker-touch/datepicker-touch-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<mat-form-field class="example-full-width"> | ||
<input matInput [matDatepicker]="picker" placeholder="Choose a date"> | ||
<mat-label>Choose a date</mat-label> | ||
<input matInput [matDatepicker]="picker"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker touchUi #picker></mat-datepicker> | ||
</mat-form-field> |
9 changes: 6 additions & 3 deletions
9
src/components-examples/material/datepicker/datepicker-value/datepicker-value-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
<mat-form-field> | ||
<input matInput [matDatepicker]="picker1" placeholder="Angular forms" [formControl]="date"> | ||
<mat-label>Angular forms</mat-label> | ||
<input matInput [matDatepicker]="picker1" [formControl]="date"> | ||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle> | ||
<mat-datepicker #picker1></mat-datepicker> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<input matInput [matDatepicker]="picker2" placeholder="Angular forms (w/ deserialization)" | ||
<mat-label>Angular forms (w/ deserialization)</mat-label> | ||
<input matInput [matDatepicker]="picker2" | ||
[formControl]="serializedDate"> | ||
<mat-datepicker-toggle matSuffix [for]="picker2"></mat-datepicker-toggle> | ||
<mat-datepicker #picker2></mat-datepicker> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<input matInput [matDatepicker]="picker3" placeholder="Value binding" [value]="date.value"> | ||
<mat-label>Value binding</mat-label> | ||
<input matInput [matDatepicker]="picker3" [value]="date.value"> | ||
<mat-datepicker-toggle matSuffix [for]="picker3"></mat-datepicker-toggle> | ||
<mat-datepicker #picker3></mat-datepicker> | ||
</mat-form-field> |
3 changes: 2 additions & 1 deletion
3
...es/material/datepicker/datepicker-views-selection/datepicker-views-selection-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/dialog/dialog-overview/dialog-overview-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/components-examples/material/expansion/expansion-overview/expansion-overview-example.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/** No CSS for this example */ | ||
.mat-form-field + .mat-form-field { | ||
margin-left: 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/input/input-clearable/input-clearable-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...-examples/material/input/input-error-state-matcher/input-error-state-matcher-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<form class="example-form"> | ||
<mat-form-field class="example-full-width"> | ||
<input matInput placeholder="Email" [formControl]="emailFormControl" | ||
[errorStateMatcher]="matcher"> | ||
<mat-label>Email</mat-label> | ||
<input matInput [formControl]="emailFormControl" [errorStateMatcher]="matcher" | ||
placeholder="Ex. [email protected]"> | ||
<mat-hint>Errors appear instantly!</mat-hint> | ||
<mat-error *ngIf="emailFormControl.hasError('email') && !emailFormControl.hasError('required')"> | ||
Please enter a valid email address | ||
|
3 changes: 2 additions & 1 deletion
3
src/components-examples/material/input/input-errors/input-errors-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<form class="example-form"> | ||
<mat-form-field class="example-full-width"> | ||
<input matInput placeholder="Email" [formControl]="emailFormControl"> | ||
<mat-label>Email</mat-label> | ||
<input matInput [formControl]="emailFormControl" placeholder="Ex. [email protected]"> | ||
<mat-error *ngIf="emailFormControl.hasError('email') && !emailFormControl.hasError('required')"> | ||
Please enter a valid email address | ||
</mat-error> | ||
|
24 changes: 16 additions & 8 deletions
24
src/components-examples/material/input/input-form/input-form-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/components-examples/material/input/input-hint/input-hint-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<form class="example-form"> | ||
|
||
<mat-form-field class="example-full-width"> | ||
<input matInput #message maxlength="256" placeholder="Message"> | ||
<mat-label>Message</mat-label> | ||
<input matInput #message maxlength="256" placeholder="Ex. I need help with..."> | ||
<mat-hint align="start"><strong>Don't disclose personal info</strong> </mat-hint> | ||
<mat-hint align="end">{{message.value.length}} / 256</mat-hint> | ||
</mat-form-field> | ||
|
||
</form> |
6 changes: 4 additions & 2 deletions
6
src/components-examples/material/input/input-overview/input-overview-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<form class="example-form"> | ||
<mat-form-field class="example-full-width"> | ||
<input matInput placeholder="Favorite food" value="Sushi"> | ||
<mat-label>Favorite food</mat-label> | ||
<input matInput placeholder="Ex. Pizza" value="Sushi"> | ||
</mat-form-field> | ||
|
||
<mat-form-field class="example-full-width"> | ||
<textarea matInput placeholder="Leave a comment"></textarea> | ||
<mat-label>Leave a comment</mat-label> | ||
<textarea matInput placeholder="Ex. It makes me feel..."></textarea> | ||
</mat-form-field> | ||
</form> |
5 changes: 2 additions & 3 deletions
5
src/components-examples/material/input/input-prefix-suffix/input-prefix-suffix-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<form class="example-form"> | ||
|
||
<mat-form-field class="example-full-width"> | ||
<mat-label>Telephone</mat-label> | ||
<span matPrefix>+1 </span> | ||
<input type="tel" matInput placeholder="Telephone"> | ||
<input type="tel" matInput placeholder="555-555-1234"> | ||
<mat-icon matSuffix>mode_edit</mat-icon> | ||
</mat-form-field> | ||
|
||
</form> |
Oops, something went wrong.