-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(stepper): Support additional properties for step #6509
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
af7d725
Additional properties for step
jwshinjwshin 1bd2486
Unit tests
jwshinjwshin 81eee36
Merge branch 'stepper' of github.com:angular/material2 into steps1
jwshinjwshin edd0a03
Code changes based on review + test name changes
jwshinjwshin b214f70
Refactor code for shared functionality between vertical and horizonta…
jwshinjwshin a1f1977
Refactor md-step-header and md-step-content + optional step change
jwshinjwshin ec3993a
Simplify code based on review
jwshinjwshin c8a71f4
Changes to step-header based on review
jwshinjwshin 1a5af09
Minor changes
jwshinjwshin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. $mat-step-header-icon-size: 16px !default;
.mat-step-icon {
display: flex;
align-items: center;
justify-content: center;
}
.mat-step-icon .mat-icon {
font-size: $mat-step-header-icon-size;
height: $mat-step-header-icon-size;
width: $mat-step-header-icon-size;
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I wonder if this is something we want to give the user control of by making it an
@Input()
?@jelbourn WDYT of something like this:
This way most users could use the default completeness behavior, but they could still override if they want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, though
_defaultCompleted
would be a function