-
Notifications
You must be signed in to change notification settings - Fork 4
feat(horizontal-stepper): new TEDI-ready component #405 #437
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
Open
mart-sessman
wants to merge
6
commits into
rc
Choose a base branch
from
feat/405-horizontal-stepper-tedi-ready
base: rc
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ce9abdc
feat(horizontal-stepper): new TEDI-ready component #405
mart-sessman c174ded
feat(horizontal-stepper): fixes from review #405
mart-sessman 1bafb71
feat(horizontal-stepper): changes from design review #405
mart-sessman be38336
feat(horizontal-stepper): updated stories, breakpoint improvement, mo…
mart-sessman 88cd486
feat(horizontal-stepper): code review fixes #405
mart-sessman 44eaf53
chore: updated modal and horizontal-stepper docs #405
mart-sessman 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
33 changes: 33 additions & 0 deletions
33
...igation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.html
This file contains hidden or 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,33 @@ | ||
| <button | ||
| class="tedi-horizontal-stepper-item__step" | ||
| type="button" | ||
| [disabled]="disabled()" | ||
| [attr.aria-current]="selected() ? 'step' : null" | ||
| (click)="onClick()" | ||
| > | ||
| <span class="tedi-horizontal-stepper-item__indicator"> | ||
| @if (completed() && !error()) { | ||
| <tedi-icon | ||
| name="check" | ||
| color="white" | ||
| [size]="18" | ||
| [label]="'stepper.completed' | tediTranslate" | ||
| /> | ||
| } @else if (error()) { | ||
| <tedi-icon | ||
| name="exclamation" | ||
| color="white" | ||
| [size]="18" | ||
| [label]="'stepper.error' | tediTranslate" | ||
| /> | ||
| } @else { | ||
| <span class="tedi-horizontal-stepper-item__number">{{ _stepNumber() }}</span> | ||
| } | ||
| </span> | ||
| <span class="tedi-horizontal-stepper-item__content"> | ||
| <span class="tedi-horizontal-stepper-item__label">{{ label() }}</span> | ||
| @if (description()) { | ||
| <span class="tedi-horizontal-stepper-item__description">{{ description() }}</span> | ||
| } | ||
| </span> | ||
| </button> |
226 changes: 226 additions & 0 deletions
226
...igation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.scss
This file contains hidden or 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,226 @@ | ||
| .tedi-horizontal-stepper-item { | ||
| $host: &; | ||
|
|
||
| position: relative; | ||
| display: flex; | ||
|
|
||
| &__step { | ||
| position: relative; | ||
| display: flex; | ||
| gap: var(--stepper-item-horizontal-inner-spacing); | ||
| align-items: flex-start; | ||
| width: auto; | ||
| min-height: 40px; | ||
| padding: var(--stepper-item-horizontal-padding-y) var(--stepper-item-horizontal-padding-x); | ||
| font-family: var(--family-default); | ||
| text-align: left; | ||
| cursor: pointer; | ||
| background: none; | ||
| border: none; | ||
| border-radius: 0; | ||
|
|
||
| &:focus-visible { | ||
| z-index: 2; | ||
| outline: 2px solid var(--general-focus-outline); | ||
| outline-offset: -2px; | ||
| } | ||
|
|
||
| &:disabled { | ||
| cursor: default; | ||
| } | ||
| } | ||
|
|
||
| &__indicator { | ||
| display: flex; | ||
| flex-shrink: 0; | ||
| align-items: center; | ||
| justify-content: center; | ||
| width: var(--stepper-item-vertical-step-size-lg); | ||
| height: var(--stepper-item-vertical-step-size-lg); | ||
| background-color: var(--stepper-step-default-bg); | ||
| border: 1px solid var(--stepper-step-default-border); | ||
| border-radius: 100%; | ||
| } | ||
|
|
||
| &__number { | ||
| font-size: var(--body-small-bold-size); | ||
| font-weight: var(--body-bold-weight); | ||
| line-height: var(--body-small-bold-line-height); | ||
| color: var(--general-text-secondary); | ||
| } | ||
|
|
||
| &__content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| &__label { | ||
| font-size: var(--body-regular-size); | ||
| font-weight: var(--body-regular-weight); | ||
| line-height: var(--body-regular-line-height); | ||
| color: var(--stepper-item-horizontal-text-default); | ||
| } | ||
|
|
||
| &__description { | ||
| font-size: var(--body-small-regular-size); | ||
| font-weight: var(--body-small-regular-weight); | ||
| line-height: var(--body-small-regular-line-height); | ||
| color: var(--general-text-tertiary); | ||
| } | ||
|
|
||
| &:not(#{$host}--selected):not(#{$host}--completed):not(#{$host}--error) { | ||
| #{$host}__step:hover:not(:disabled) { | ||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-default-bg-hover); | ||
| border-color: var(--stepper-step-default-border-hover); | ||
| } | ||
|
|
||
| #{$host}__number { | ||
| color: var(--general-text-white); | ||
| } | ||
|
|
||
| #{$host}__label { | ||
| color: var(--stepper-item-horizontal-text-hover); | ||
| } | ||
| } | ||
|
|
||
| #{$host}__step:active:not(:disabled) { | ||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-default-bg-active); | ||
| border-color: var(--stepper-step-default-border-active); | ||
| } | ||
|
|
||
| #{$host}__number { | ||
| color: var(--general-text-white); | ||
| } | ||
|
|
||
| #{$host}__label { | ||
| color: var(--stepper-item-horizontal-text-hover); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // ------------------------------------------------------- | ||
| // Selected | ||
| // ------------------------------------------------------- | ||
| &--selected { | ||
| --_step-arrow-width: 1rem; | ||
|
|
||
| z-index: 1; | ||
|
|
||
| #{$host}__step { | ||
| padding-right: calc(var(--stepper-item-horizontal-padding-x) + var(--_step-arrow-width)); | ||
| cursor: default; | ||
| background-color: var(--stepper-item-horizontal-type-selected-bg-default); | ||
| clip-path: polygon(0 0, calc(100% - var(--_step-arrow-width)) 0, 100% 50%, calc(100% - var(--_step-arrow-width)) 100%, 0 100%); | ||
| } | ||
|
|
||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-default-bg); | ||
| border-color: transparent; | ||
| } | ||
|
|
||
| #{$host}__number { | ||
| font-weight: var(--body-bold-weight); | ||
| color: var(--general-text-brand); | ||
| } | ||
|
|
||
| #{$host}__label { | ||
| font-weight: var(--body-bold-weight); | ||
| line-height: var(--body-bold-line-height); | ||
| color: var(--stepper-item-horizontal-text-selected); | ||
| } | ||
|
|
||
| #{$host}__description { | ||
| color: var(--general-text-white); | ||
| } | ||
| } | ||
|
|
||
| &--completed { | ||
| #{$host}__step { | ||
| background-color: var(--stepper-item-horizontal-type-completed-bg-default); | ||
| } | ||
|
|
||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-completed-bg); | ||
| border-color: transparent; | ||
| } | ||
|
|
||
| #{$host}__label { | ||
| color: var(--stepper-item-horizontal-text-completed-default); | ||
| } | ||
|
|
||
| #{$host}__description { | ||
| color: var(--stepper-item-horizontal-text-completed-default); | ||
| } | ||
|
|
||
| #{$host}__step:hover:not(:disabled) { | ||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-completed-bg-hover); | ||
| } | ||
|
|
||
| #{$host}__label, | ||
| #{$host}__description { | ||
| color: var(--stepper-item-horizontal-text-completed-hover); | ||
| } | ||
| } | ||
|
|
||
| #{$host}__step:active:not(:disabled) { | ||
| background-color: var(--stepper-item-horizontal-type-completed-bg-active); | ||
|
|
||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-completed-bg-hover); | ||
| } | ||
|
|
||
| #{$host}__label, | ||
| #{$host}__description { | ||
| color: var(--stepper-item-horizontal-text-completed-hover); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| &--error { | ||
| #{$host}__step { | ||
| background-color: var(--stepper-item-horizontal-type-danger-bg-default); | ||
| } | ||
|
|
||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-danger-bg); | ||
| border-color: transparent; | ||
| } | ||
|
|
||
| #{$host}__label { | ||
| color: var(--stepper-item-horizontal-text-danger-default); | ||
| } | ||
|
|
||
| #{$host}__description { | ||
| color: var(--stepper-item-horizontal-text-danger-default); | ||
| } | ||
|
|
||
| #{$host}__step:hover:not(:disabled) { | ||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-danger-bg-hover); | ||
| } | ||
|
|
||
| #{$host}__label, | ||
| #{$host}__description { | ||
| color: var(--stepper-item-horizontal-text-danger-hover); | ||
| } | ||
| } | ||
|
|
||
| #{$host}__step:active:not(:disabled) { | ||
| background-color: var(--stepper-item-horizontal-type-danger-bg-active); | ||
|
|
||
| #{$host}__indicator { | ||
| background-color: var(--stepper-step-danger-bg-hover); | ||
| } | ||
|
|
||
| #{$host}__label, | ||
| #{$host}__description { | ||
| color: var(--stepper-item-horizontal-text-danger-hover); | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
maybe use the variable here?
min-height: var(--stepper-item-horizontal-min-height);