-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stepper): Support additional properties for step (#6509)
* Additional properties for step * Unit tests * Code changes based on review + test name changes * Refactor code for shared functionality between vertical and horizontal stepper * Refactor md-step-header and md-step-content + optional step change * Simplify code based on review * Changes to step-header based on review * Minor changes
- Loading branch information
1 parent
9c439e1
commit 4b39e01
Showing
15 changed files
with
483 additions
and
168 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div [class.mat-step-icon]="icon != 'number' || selected" | ||
[class.mat-step-icon-not-touched]="icon == 'number' && !selected"> | ||
<span *ngIf="icon == 'number'">{{index + 1}}</span> | ||
<md-icon *ngIf="icon == 'edit'">create</md-icon> | ||
<md-icon *ngIf="icon == 'done'">done</md-icon> | ||
</div> | ||
<div [class.mat-step-label-active]="active" | ||
[class.mat-step-label-inactive]="!active"> | ||
<!-- If there is a label template, use it. --> | ||
<ng-container *ngIf="_templateLabel" [ngTemplateOutlet]="label.template"> | ||
</ng-container> | ||
<!-- It there is no label template, fall back to the text label. --> | ||
<div class="mat-step-text-label" *ngIf="_stringLabel">{{label}}</div> | ||
|
||
<div class="mat-step-optional" *ngIf="optional">Optional</div> | ||
</div> | ||
|
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
$mat-stepper-label-header-height: 24px !default; | ||
$mat-stepper-label-min-width: 50px !default; | ||
$mat-stepper-side-gap: 24px !default; | ||
$mat-vertical-stepper-content-margin: 36px !default; | ||
$mat-stepper-line-gap: 8px !default; | ||
$mat-step-optional-font-size: 12px; | ||
$mat-step-header-icon-size: 16px !default; | ||
|
||
:host { | ||
display: flex; | ||
} | ||
|
||
.mat-step-optional { | ||
font-size: $mat-step-optional-font-size; | ||
} | ||
|
||
.mat-step-icon, | ||
.mat-step-icon-not-touched { | ||
border-radius: 50%; | ||
height: $mat-stepper-label-header-height; | ||
width: $mat-stepper-label-header-height; | ||
align-items: center; | ||
justify-content: center; | ||
display: flex; | ||
} | ||
|
||
.mat-step-icon .mat-icon { | ||
font-size: $mat-step-header-icon-size; | ||
height: $mat-step-header-icon-size; | ||
width: $mat-step-header-icon-size; | ||
} | ||
|
||
.mat-step-label-active, | ||
.mat-step-label-inactive { | ||
display: inline-block; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
min-width: $mat-stepper-label-min-width; | ||
vertical-align: middle; | ||
} | ||
|
||
.mat-step-text-label { | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
} |
Oops, something went wrong.