-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stepper): separate header panel from accordion, update icons and…
… number positions (#1583) ## PR Checklist Please check if your PR fulfills the following requirements: - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) - [ ] If applicable, have a visual design approval ## PR Type What kind of change does this PR introduce? - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## What is the current behavior? Success and error icons are replacing the step number upon event. Issue Number: CDE-1211 ## What is the new behavior? Success and error icons have reserved space before step number and are not replacing it. ## Does this PR introduce a breaking change? - [ ] Yes - [x] No ## Other information --------- Co-authored-by: GitHub <[email protected]>
- Loading branch information
1 parent
2d3c8de
commit e684541
Showing
23 changed files
with
149 additions
and
122 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,63 @@ | ||
<ng-container *ngIf="panel | async; let panel"> | ||
<div [ngClass]="getPanelStateClasses(panel)"> | ||
<div class="clr-accordion-header clr-stepper-header"> | ||
<button | ||
type="button" | ||
class="clr-accordion-header-button" | ||
(click)="togglePanel()" | ||
[id]="getAccordionHeaderId(panel.templateId)" | ||
[attr.aria-disabled]="panel.disabled" | ||
[attr.aria-controls]="getAccordionContentId(panel.templateId)" | ||
[attr.aria-expanded]="panel.open" | ||
[class.clr-accordion-header-has-description]="(accordionDescription.changes | async)?.length || accordionDescription.length" | ||
#headerButton | ||
> | ||
<span class="clr-step-status"> | ||
<cds-icon shape="angle" direction="right" class="clr-accordion-angle clr-step-angle"></cds-icon> | ||
<cds-icon | ||
status="danger" | ||
*ngIf="panel.status === AccordionStatus.Error" | ||
shape="exclamation-circle" | ||
class="clr-step-error-icon" | ||
></cds-icon> | ||
<cds-icon | ||
status="success" | ||
*ngIf="panel.status === AccordionStatus.Complete" | ||
shape="check-circle" | ||
class="clr-step-complete-icon" | ||
></cds-icon> | ||
</span> | ||
<span class="clr-step-title-wrapper"> | ||
<span class="clr-step-number">{{panelNumber}}.</span> | ||
<ng-content select="clr-step-title"></ng-content> | ||
</span> | ||
<ng-content select="clr-step-description"></ng-content> | ||
</button> | ||
<div class="clr-sr-only" role="status"> | ||
<ng-container *ngIf="panel.status === AccordionStatus.Error"> {{ stepErrorText(panelNumber)}} </ng-container> | ||
<ng-container *ngIf="panel.status === AccordionStatus.Complete"> | ||
{{ stepCompleteText(panelNumber)}} | ||
</ng-container> | ||
</div> | ||
</div> | ||
<div | ||
@skipInitialRender | ||
role="region" | ||
class="clr-accordion-content-region" | ||
[id]="getAccordionContentId(panel.templateId)" | ||
[attr.aria-hidden]="!panel.open" | ||
[attr.aria-labelledby]="getAccordionHeaderId(panel.templateId)" | ||
> | ||
<div | ||
*ngIf="panel.open" | ||
@toggle | ||
(@toggle.done)="collapsePanelOnAnimationDone(panel)" | ||
class="clr-accordion-content" | ||
> | ||
<div class="clr-accordion-inner-content"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</ng-container> |
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
Binary file modified
BIN
+11 Bytes
(100%)
tests/snapshots/chromium/stepper/stepper--stepper-alignment-test-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12 Bytes
(100%)
tests/snapshots/chromium/stepper/stepper--stepper-alignment-test-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7 Bytes
(100%)
tests/snapshots/chromium/stepper/stepper--stepper-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
tests/snapshots/chromium/stepper/stepper--stepper-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+141 Bytes
(100%)
...apshots/chromium/stepper/stepper--stepper-panel-status-indicators-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+104 Bytes
(100%)
...pshots/chromium/stepper/stepper--stepper-panel-status-indicators-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+12 Bytes
(100%)
.../snapshots/chromium/stepper/stepper--stepper-with-previous-button-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-6 Bytes
(100%)
...snapshots/chromium/stepper/stepper--stepper-with-previous-button-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+17 Bytes
(100%)
tests/snapshots/firefox/stepper/stepper--stepper-alignment-test-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12 Bytes
(100%)
tests/snapshots/firefox/stepper/stepper--stepper-alignment-test-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+22 Bytes
(100%)
tests/snapshots/firefox/stepper/stepper--stepper-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+35 Bytes
(100%)
tests/snapshots/firefox/stepper/stepper--stepper-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+254 Bytes
(100%)
...napshots/firefox/stepper/stepper--stepper-panel-status-indicators-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+306 Bytes
(100%)
...apshots/firefox/stepper/stepper--stepper-panel-status-indicators-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5 Bytes
(100%)
...s/snapshots/firefox/stepper/stepper--stepper-with-previous-button-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+16 Bytes
(100%)
.../snapshots/firefox/stepper/stepper--stepper-with-previous-button-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.