-
Notifications
You must be signed in to change notification settings - Fork 3
feat(accordion): add accordion tedi-ready component #262 #326
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
Merged
ly-tempel-bitweb
merged 12 commits into
rc
from
feat/262-accordion-tedi-ready-component
Mar 18, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e558640
feat(accordion): add accordion tedi-ready component #262
ly-tempel-bitweb 02e4512
feat(accordion): update accordion tedi-ready component #262
ly-tempel-bitweb be65177
feat(accordion): update package-lock.json #262
ly-tempel-bitweb 18aef90
feat(accordion): add design review fixes #262
ly-tempel-bitweb 8ae862c
feat(accordion): add design review fixes #262
ly-tempel-bitweb f4a3c4c
feat(accordion): fix WCAG issues #262
ly-tempel-bitweb a40708e
feat(accordion): add transitions #262
ly-tempel-bitweb d311924
Merge branch 'rc' into feat/262-accordion-tedi-ready-component
ly-tempel-bitweb 8f7e07e
feat(accordion): replace StatusBadge component #262
ly-tempel-bitweb 6fdcbbf
feat(accordion): change icon rotation; fix exports, imports #262
ly-tempel-bitweb 7c82121
feat(accordion): change icon transition #262
ly-tempel-bitweb 91d960f
feat(accordion): fix SR problems #262
ly-tempel-bitweb 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 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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
144 changes: 144 additions & 0 deletions
144
tedi/components/cards/accordion/accordion-item/accordion-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,144 @@ | ||
| <div | ||
| class="tedi-accordion__item" | ||
| [class.tedi-accordion__item--selected]="selected()" | ||
| [class.tedi-accordion__item--expanded]="expanded()" | ||
| > | ||
| @if (showIconCard()) { | ||
| <ng-content select="[tedi-accordion-icon-card]"></ng-content> | ||
| } | ||
|
|
||
| <div class="tedi-accordion__header-row"> | ||
| @if (headerClickable()) { | ||
| <button | ||
| [id]="headerId" | ||
| type="button" | ||
| [ngClass]="headerClasses()" | ||
| (click)="toggle()" | ||
| [attr.aria-expanded]="expanded()" | ||
| [attr.aria-controls]="bodyId" | ||
| > | ||
| <ng-container *ngTemplateOutlet="headerContent"></ng-container> | ||
| </button> | ||
| } @else { | ||
| <div [id]="headerId" [ngClass]="headerClasses()"> | ||
| <ng-container *ngTemplateOutlet="headerContent"></ng-container> | ||
| </div> | ||
| } | ||
| </div> | ||
|
|
||
| <div | ||
| [ngClass]="bodyClasses()" | ||
| [id]="bodyId" | ||
| [attr.role]="expanded() ? 'region' : null" | ||
| [attr.aria-labelledby]="headerId" | ||
| [attr.aria-hidden]="!expanded()" | ||
| [attr.inert]="!expanded() ? '' : null" | ||
| > | ||
| <div class="tedi-accordion__body--inner"> | ||
| <ng-content></ng-content> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <ng-template #headerContent> | ||
| <div class="tedi-accordion__start"> | ||
| <ng-content select="[tedi-accordion-start-action]"></ng-content> | ||
|
|
||
| <ng-content select="[tedi-accordion-start-before-title]"></ng-content> | ||
|
|
||
| <span | ||
| class="tedi-accordion__title" | ||
| [class.tedi-accordion__title--with-description]="description()" | ||
| [class.tedi-accordion__title--grow]="titleLayout() === 'fill'" | ||
| > | ||
| <span class="tedi-accordion__title--main"> | ||
| @if (showStartExpandAction()) { | ||
| <ng-container *ngTemplateOutlet="collapseButton"></ng-container> | ||
| } | ||
|
|
||
| @if (showSeparateTitle()) { | ||
| <span | ||
| tedi-text | ||
| color="secondary" | ||
| modifiers="normal" | ||
| [id]="headerId + '-title'" | ||
| [attr.aria-hidden]="hideTitleFromSR() ? 'true' : null" | ||
| > | ||
| {{ title() | tediTranslate }} | ||
| </span> | ||
| } | ||
| </span> | ||
|
|
||
| @if (descriptionPosition() !== "end") { | ||
| <ng-content select="[tedi-accordion-start-description]"></ng-content> | ||
|
|
||
| @if (description(); as desc) { | ||
| <span tedi-text color="tertiary" modifiers="normal"> | ||
| {{ desc | tediTranslate }} | ||
| </span> | ||
| } | ||
| } | ||
| </span> | ||
|
|
||
| <ng-content select="[tedi-accordion-start-after-title]"></ng-content> | ||
| </div> | ||
|
|
||
| @if (descriptionPosition() !== "start") { | ||
| <ng-content select="[tedi-accordion-end-description]"></ng-content> | ||
|
|
||
| @if (description(); as desc) { | ||
| <span tedi-text color="tertiary" modifiers="small"> | ||
| {{ desc | tediTranslate }} | ||
| </span> | ||
| } | ||
| } | ||
|
|
||
| @if (showEndExpandAction()) { | ||
| <ng-container *ngTemplateOutlet="collapseButton"></ng-container> | ||
| } | ||
|
|
||
| <ng-content select="[tedi-accordion-end-action]"></ng-content> | ||
| </ng-template> | ||
|
|
||
| <ng-template #collapseButton> | ||
| @if (headerClickable()) { | ||
| <div | ||
| tedi-text | ||
| modifiers="normal" | ||
| class="tedi-accordion__expand-indicator" | ||
| [class.tedi-accordion__expand-indicator--with-label]="showExpandLabel()" | ||
| > | ||
| {{ (showExpandLabel() ? expandLabel() : "") | tediTranslate }} | ||
ly-tempel-bitweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <ng-container *ngTemplateOutlet="expandIcon"></ng-container> | ||
| </div> | ||
| } @else { | ||
| <button | ||
| type="button" | ||
| class="tedi-accordion__toggle-button" | ||
| tedi-link | ||
| [underline]="false" | ||
| (click)="toggle()" | ||
| [attr.aria-expanded]="expanded()" | ||
| [attr.aria-controls]="bodyId" | ||
| [attr.aria-label]=" | ||
| !showExpandLabel() ? (expandLabel() | tediTranslate) : null | ||
| " | ||
ly-tempel-bitweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [attr.aria-labelledby]="headerId + '-title'" | ||
| > | ||
| @if (showExpandLabel()) { | ||
| {{ (showSeparateTitle() ? expandLabel() : title()) | tediTranslate }} | ||
| } | ||
| <ng-container *ngTemplateOutlet="expandIcon"></ng-container> | ||
| </button> | ||
| } | ||
| </ng-template> | ||
|
|
||
| <ng-template #expandIcon> | ||
| <tedi-icon | ||
| aria-hidden="true" | ||
| name="expand_more" | ||
| class="tedi-accordion__icon" | ||
| [class.tedi-accordion__icon--expanded]="expanded()" | ||
| [class.tedi-accordion__icon--no-label]="!showExpandLabel()" | ||
| /> | ||
| </ng-template> | ||
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.
Uh oh!
There was an error while loading. Please reload this page.