Skip to content

Commit bb454ff

Browse files
committed
feat(element-theme): align ghost button naming convention
`.btn-ghost` now represents the primary ghost button style, consistent with the naming convention established by `.btn-secondary-ghost` and `.btn-tertiary-ghost`. All internal usages of the old `.btn-ghost` (which had tertiary ghost styling) have been migrated to `.btn-tertiary-ghost`. The transitional `.btn-primary-ghost` class introduced in v49.5.0 has been removed. Resolves #1797 BREAKING CHANGE: `.btn-ghost` no longer applies tertiary ghost styling. When using `.btn-ghost` as a tertiary ghost button it must be renamed to `.btn-tertiary-ghost`. A schematic migration will be provided to automate this update.
1 parent efe1b65 commit bb454ff

49 files changed

Lines changed: 82 additions & 84 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/components/layout-navigation/modals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import { viewChild } from '@angular/core';
7979
<h4 class="modal-title">Modal</h4>
8080
<button
8181
type="button"
82-
class="btn btn-circle btn-ghost element-cancel"
82+
class="btn btn-circle btn-tertiary-ghost element-cancel"
8383
aria-label="Close modal"
8484
(click)="modalRef.hide('cancel')"
8585
></button>

playwright/e2e/element-examples/si-tabs-legacy.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test.describe('si-tabs', () => {
1111
await si.visitExample(example);
1212
await page.locator('si-tabset-legacy button').getByText('Reception').click();
1313
await si.runVisualAndA11yTests();
14-
await page.locator('si-tabset-legacy .btn-ghost.close').first().click();
14+
await page.locator('si-tabset-legacy .btn-tertiary-ghost.close').first().click();
1515
await expect(page.locator('#si-tabset button').getByText('Reception')).toHaveCount(0);
1616
await si.runVisualAndA11yTests('delete');
1717
});

projects/dashboards-demo/src/app/components/widget-catalog/custom-widget-catalog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<span class="modal-title">Custom Catalog</span>
33
<button
44
type="button"
5-
class="btn btn-circle btn-ghost element-cancel"
5+
class="btn btn-circle btn-tertiary-ghost element-cancel"
66
aria-label="Close"
77
(click)="onCancel()"
88
>

projects/element-ng/action-modal/si-alert-dialog/si-alert-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="modal-title" [id]="titleId()">{{ heading() | translate: translationParams() }}</span>
77
<button
88
type="button"
9-
class="btn btn-circle btn-ghost"
9+
class="btn btn-circle btn-tertiary-ghost"
1010
[attr.aria-label]="confirmBtnName() | translate"
1111
[disabled]="!!loading"
1212
(click)="modalRef.messageOrHide('confirm')"

projects/element-ng/action-modal/si-confirmation-dialog/si-confirmation-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="modal-title" [id]="titleId()">{{ heading() | translate: translationParams() }}</span>
77
<button
88
type="button"
9-
class="btn btn-circle btn-ghost element-cancel"
9+
class="btn btn-circle btn-tertiary-ghost element-cancel"
1010
[attr.aria-label]="declineBtnName() | translate"
1111
[disabled]="!!loading"
1212
(click)="modalRef.messageOrHide('decline')"

projects/element-ng/action-modal/si-delete-confirmation-dialog/si-delete-confirmation-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="modal-title" [id]="titleId()">{{ heading() | translate: translationParams() }}</span>
77
<button
88
type="button"
9-
class="btn btn-circle btn-ghost"
9+
class="btn btn-circle btn-tertiary-ghost"
1010
[attr.aria-label]="cancelBtnName() | translate"
1111
[disabled]="!!loading"
1212
(click)="modalRef.messageOrHide('cancel')"

projects/element-ng/action-modal/si-edit-discard-dialog/si-edit-discard-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="modal-title" [id]="titleId()">{{ heading() | translate: translationParams() }}</span>
77
<button
88
type="button"
9-
class="btn btn-circle btn-ghost"
9+
class="btn btn-circle btn-tertiary-ghost"
1010
[attr.aria-label]="cancelBtnName() | translate"
1111
[disabled]="!!loading"
1212
(click)="modalRef.messageOrHide('cancel')"

projects/element-ng/application-header/launchpad/si-launchpad-factory.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</span>
1616
<button
1717
type="button"
18-
class="btn btn-circle btn-ghost"
18+
class="btn btn-circle btn-tertiary-ghost"
1919
[attr.aria-label]="closeText() | translate"
2020
(click)="closeLaunchpad()"
2121
>

projects/element-ng/chat-messages/si-ai-message.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@for (action of actions(); track $index) {
1414
<button
1515
type="button"
16-
class="btn btn-ghost btn-icon"
16+
class="btn btn-tertiary-ghost btn-icon"
1717
[disabled]="action.disabled"
1818
[attr.aria-label]="action.label | translate"
1919
(click)="action.action(actionParam(), action)"
@@ -25,7 +25,7 @@
2525
@if (secondaryActions().length > 0) {
2626
<button
2727
type="button"
28-
class="btn btn-ghost btn-icon"
28+
class="btn btn-tertiary-ghost btn-icon"
2929
[cdkMenuTriggerFor]="secondaryActionsMenu"
3030
[attr.aria-label]="secondaryActionsLabel() | translate"
3131
[attr.title]="secondaryActionsLabel() | translate"

projects/element-ng/chat-messages/si-attachment-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
@if (removable()) {
4545
<button
4646
type="button"
47-
class="btn btn-ghost btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside"
47+
class="btn btn-tertiary-ghost btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside"
4848
[attr.aria-label]="(removeLabel() | translate) + ' ' + attachment.name"
4949
(click)="remove.emit(attachment); $event.stopPropagation()"
5050
>

0 commit comments

Comments
 (0)