-
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.
- Loading branch information
1 parent
78c9eb5
commit ef96e2e
Showing
7 changed files
with
103 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,35 @@ | ||
<div class="mat-stepper-container"> | ||
<div *ngFor="let step of _steps; let i = index; let isLast = last" | ||
class="mat-step" role="tablist"> | ||
<div #stepHeader class="mat-step-header" role="tab" | ||
[id]="_getStepLabelId(i)" | ||
[attr.aria-controls]="_getStepContentId(i)" | ||
[attr.aria-selected]="selectedIndex == i" | ||
[tabIndex]="_focusIndex == i ? 0 : -1" | ||
(click)="step.select()" | ||
(keydown)="_onKeydown($event)"> | ||
<div [ngClass]="{'active-step' : step.active, 'inactive-step' : !step.active}"> | ||
{{i + 1}} | ||
</div> | ||
|
||
<div class="mat-step-label"> | ||
<!-- If there is a label template, use it. --> | ||
<ng-container *ngIf="step.stepLabel"[ngTemplateOutlet]="step.stepLabel.template"> | ||
</ng-container> | ||
<!-- It there is no label template, fall back to the text label. --> | ||
<div *ngIf="!step.stepLabel">{{step.label}}</div> | ||
</div> | ||
<div *ngFor="let step of _steps; let i = index; let isLast = last"> | ||
<div #stepHeader class="mat-stepper-header" role="tab" | ||
[id]="_getStepLabelId(i)" | ||
[attr.aria-controls]="_getStepContentId(i)" | ||
[attr.aria-selected]="selectedIndex == i" | ||
[tabIndex]="_focusIndex == i ? 0 : -1" | ||
(click)="step.select()" | ||
(keydown)="_onKeydown($event)"> | ||
<div class="mat-stepper-index"> | ||
{{i + 1}} | ||
</div> | ||
|
||
</ng-template> | ||
<div *ngIf="!isLast" class="connector-line"></div> | ||
<div class="mat-stepper-label"> | ||
<!-- If there is a label template, use it. --> | ||
<ng-container *ngIf="step.stepLabel"[ngTemplateOutlet]="step.stepLabel.template"> | ||
</ng-container> | ||
<!-- It there is no label template, fall back to the text label. --> | ||
<div *ngIf="!step.stepLabel">{{step.label}}</div> | ||
</div> | ||
|
||
</ng-template> | ||
<div *ngIf="!isLast" class="connector-line"></div> | ||
</div> | ||
<div *ngFor="let step of _steps; let i = index" | ||
class="mat-stepper-horizontal" role="tabpanel" | ||
[id]="_getStepContentId(i)" | ||
[attr.aria-labelledby]="_getStepLabelId(i)" | ||
[attr.aria-expanded]="selectedIndex == i"> | ||
<ng-container [ngTemplateOutlet]="step.content"></ng-container> | ||
</div> | ||
<div> | ||
<button md-button (click)="previous()">Back</button> | ||
<button md-button (click)="next()">Next</button> | ||
</div> | ||
</div> | ||
<div *ngFor="let step of _steps; let i = index" | ||
class="mat-stepper-content" role="tabpanel" | ||
[id]="_getStepContentId(i)" | ||
[attr.aria-labelledby]="_getStepLabelId(i)" | ||
[attr.aria-expanded]="selectedIndex == i"> | ||
<ng-container [ngTemplateOutlet]="step.content"></ng-container> | ||
</div> | ||
<div> | ||
<button md-button (click)="previous()">Back</button> | ||
<button md-button (click)="next()">Next</button> | ||
</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
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,36 +1,33 @@ | ||
<div class="mat-stepper-container"> | ||
<div *ngFor="let step of _steps; let i = index; let isLast = last" | ||
class="mat-step" role="tablist"> | ||
<div #stepHeader class="mat-step-header" role="tab" | ||
[id]="_getStepLabelId(i)" | ||
[attr.aria-controls]="_getStepContentId(i)" | ||
[attr.aria-selected]="selectedIndex == i" | ||
[tabIndex]="_focusIndex == i ? 0 : -1" | ||
(click)="step.select()" | ||
(keydown)="_onKeydown($event)"> | ||
<div [ngClass]="{'active-step' : step.active, 'inactive-step' : !step.active}"> | ||
{{i + 1}} | ||
</div> | ||
|
||
<div class="mat-step-label"> | ||
<!-- If there is a label template, use it. --> | ||
<ng-container *ngIf="step.stepLabel"[ngTemplateOutlet]="step.stepLabel.template"> | ||
</ng-container> | ||
<!-- It there is no label template, fall back to the text label. --> | ||
<div *ngIf="!step.stepLabel">{{step.label}}</div> | ||
</div> | ||
<div *ngFor="let step of _steps; let i = index; let isLast = last"> | ||
<div #stepHeader class="mat-stepper-header" role="tab" | ||
[id]="_getStepLabelId(i)" | ||
[attr.aria-controls]="_getStepContentId(i)" | ||
[attr.aria-selected]="selectedIndex == i" | ||
[tabIndex]="_focusIndex == i ? 0 : -1" | ||
(click)="step.select()" | ||
(keydown)="_onKeydown($event)"> | ||
<div class="mat-stepper-index"> | ||
{{i + 1}} | ||
</div> | ||
|
||
<div class="mat-stepper-label"> | ||
<!-- If there is a label template, use it. --> | ||
<ng-container *ngIf="step.stepLabel"[ngTemplateOutlet]="step.stepLabel.template"> | ||
</ng-container> | ||
<!-- It there is no label template, fall back to the text label. --> | ||
<div *ngIf="!step.stepLabel">{{step.label}}</div> | ||
</div> | ||
<div *ngIf="!isLast" class="connector-line"></div> | ||
<div *ngIf="i == selectedIndex" role="tabpanel" | ||
[id]="_getStepContentId(i)" | ||
[attr.aria-labelledby]="_getStepLabelId(i)" | ||
[attr.aria-expanded]="selectedIndex == i"> | ||
<ng-container [ngTemplateOutlet]="step.content"></ng-container> | ||
<div> | ||
<button md-button (click)="previous()">Back</button> | ||
<button md-button (click)="next()">Next</button> | ||
</div> | ||
|
||
</div> | ||
<div *ngIf="!isLast" class="connector-line"></div> | ||
<div class="mat-stepper-content" role="tabpanel" | ||
[id]="_getStepContentId(i)" | ||
[attr.aria-labelledby]="_getStepLabelId(i)" | ||
[attr.aria-expanded]="selectedIndex == i"> | ||
<ng-container [ngTemplateOutlet]="step.content"></ng-container> | ||
<div> | ||
<button md-button (click)="previous()">Back</button> | ||
<button md-button (click)="next()">Next</button> | ||
</div> | ||
</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
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,11 +1,7 @@ | ||
.mat-stepper-horizontal[aria-expanded='false'] { | ||
.mat-stepper-content[aria-expanded='false'] { | ||
display:none; | ||
} | ||
|
||
.active-step, .inactive-step { | ||
display: inline-block; | ||
} | ||
|
||
.mat-step-label { | ||
.mat-stepper-index, .mat-stepper-label { | ||
display: inline-block; | ||
} |