-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sbb-tertiary-button): rename tertiary to accent button
BREAKING CHANGE: `sbb-tertiary-button` was renamed to `sbb-accent-button`
- Loading branch information
1 parent
0e2a847
commit f79f4f3
Showing
40 changed files
with
518 additions
and
524 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
export * from './button/button.js'; | ||
export * from './button/secondary-button.js'; | ||
export * from './button/tertiary-button.js'; | ||
export * from './button/accent-button.js'; | ||
export * from './button/transparent-button.js'; | ||
export * from './button/mini-button.js'; | ||
export * from './button/mini-button-group.js'; | ||
export * from './button/button-link.js'; | ||
export * from './button/secondary-button-link.js'; | ||
export * from './button/tertiary-button-link.js'; | ||
export * from './button/accent-button-link.js'; | ||
export * from './button/transparent-button-link.js'; | ||
export * from './button/button-static.js'; | ||
export * from './button/secondary-button-static.js'; | ||
export * from './button/tertiary-button-static.js'; | ||
export * from './button/accent-button-static.js'; | ||
export * from './button/transparent-button-static.js'; | ||
export * from './button/common.js'; |
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 @@ | ||
export * from './accent-button-link/accent-button-link.js'; |
114 changes: 114 additions & 0 deletions
114
...elements/button/accent-button-link/__snapshots__/accent-button-link.snapshot.spec.snap.js
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,114 @@ | ||
/* @web/test-runner snapshot v1 */ | ||
export const snapshots = {}; | ||
|
||
snapshots["sbb-accent-button-link renders a sbb-accent-button-link without icon DOM"] = | ||
`<sbb-accent-button-link | ||
data-action="" | ||
data-link="" | ||
data-sbb-button="" | ||
data-slot-names="unnamed" | ||
download="" | ||
href="https://www.sbb.ch" | ||
rel="noopener" | ||
size="m" | ||
target="_blank" | ||
> | ||
Label Text | ||
</sbb-accent-button-link> | ||
`; | ||
/* end snapshot sbb-accent-button-link renders a sbb-accent-button-link without icon DOM */ | ||
|
||
snapshots["sbb-accent-button-link renders a sbb-accent-button-link without icon Shadow DOM"] = | ||
`<a | ||
class="sbb-action-base sbb-accent-button-link" | ||
download="" | ||
href="https://www.sbb.ch" | ||
rel="noopener" | ||
target="_blank" | ||
> | ||
<slot name="icon"> | ||
</slot> | ||
<span class="sbb-button__label"> | ||
<slot> | ||
</slot> | ||
</span> | ||
<sbb-screen-reader-only> | ||
. Link target opens in a new window. | ||
</sbb-screen-reader-only> | ||
</a> | ||
`; | ||
/* end snapshot sbb-accent-button-link renders a sbb-accent-button-link without icon Shadow DOM */ | ||
|
||
snapshots["sbb-accent-button-link renders a disabled sbb-accent-button-link with slotted icon DOM"] = | ||
`<sbb-accent-button-link | ||
data-action="" | ||
data-link="" | ||
data-sbb-button="" | ||
data-slot-names="icon unnamed" | ||
disabled="" | ||
href="https://www.sbb.ch" | ||
size="l" | ||
> | ||
<sbb-icon | ||
aria-hidden="true" | ||
data-namespace="default" | ||
name="chevron-small-left-small" | ||
role="img" | ||
slot="icon" | ||
> | ||
</sbb-icon> | ||
Label Text | ||
</sbb-accent-button-link> | ||
`; | ||
/* end snapshot sbb-accent-button-link renders a disabled sbb-accent-button-link with slotted icon DOM */ | ||
|
||
snapshots["sbb-accent-button-link renders a disabled sbb-accent-button-link with slotted icon Shadow DOM"] = | ||
`<a | ||
aria-disabled="true" | ||
class="sbb-action-base sbb-accent-button-link" | ||
href="https://www.sbb.ch" | ||
tabindex="-1" | ||
> | ||
<slot name="icon"> | ||
</slot> | ||
<span class="sbb-button__label"> | ||
<slot> | ||
</slot> | ||
</span> | ||
</a> | ||
`; | ||
/* end snapshot sbb-accent-button-link renders a disabled sbb-accent-button-link with slotted icon Shadow DOM */ | ||
|
||
snapshots["sbb-accent-button-link renders a sbb-accent-button-link without icon A11y tree Chrome"] = | ||
`<p> | ||
{ | ||
"role": "WebArea", | ||
"name": "", | ||
"children": [ | ||
{ | ||
"role": "link", | ||
"name": "Label Text . Link target opens in a new window." | ||
} | ||
] | ||
} | ||
</p> | ||
`; | ||
/* end snapshot sbb-accent-button-link renders a sbb-accent-button-link without icon A11y tree Chrome */ | ||
|
||
snapshots["sbb-accent-button-link renders a sbb-accent-button-link without icon A11y tree Firefox"] = | ||
`<p> | ||
{ | ||
"role": "document", | ||
"name": "", | ||
"children": [ | ||
{ | ||
"role": "link", | ||
"name": "Label Text . Link target opens in a new window.", | ||
"value": "https://www.sbb.ch/" | ||
} | ||
] | ||
} | ||
</p> | ||
`; | ||
/* end snapshot sbb-accent-button-link renders a sbb-accent-button-link without icon A11y tree Firefox */ | ||
|
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
20 changes: 20 additions & 0 deletions
20
src/elements/button/accent-button-link/accent-button-link.ssr.spec.ts
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,20 @@ | ||
import { assert } from '@open-wc/testing'; | ||
import { html } from 'lit'; | ||
|
||
import { ssrHydratedFixture } from '../../core/testing/private.js'; | ||
|
||
import { SbbAccentButtonLinkElement } from './accent-button-link.js'; | ||
|
||
describe(`sbb-accent-button-link ssr`, () => { | ||
let root: SbbAccentButtonLinkElement; | ||
|
||
beforeEach(async () => { | ||
root = await ssrHydratedFixture(html`<sbb-accent-button-link>Button</sbb-accent-button-link>`, { | ||
modules: ['./accent-button-link.js'], | ||
}); | ||
}); | ||
|
||
it('renders', () => { | ||
assert.instanceOf(root, SbbAccentButtonLinkElement); | ||
}); | ||
}); |
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 @@ | ||
export * from './accent-button-static/accent-button-static.js'; |
Oops, something went wrong.