-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(sbb-teaser-hero, sbb-teaser-paid): move to `@sbb-esta/lyne-e…
…lements-experimental` (#2782) We are moving the `sbb-teaser-hero` and `sbb-teaser-paid` components to the experimental package, as we have new requirements that will result in breaking changes. BREAKING CHANGE: `sbb-teaser-hero` and `sbb-teaser-paid` are now part of the `@sbb-esta/lyne-elements-experimental` package.
- Loading branch information
1 parent
175606d
commit 1032e76
Showing
21 changed files
with
104 additions
and
125 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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,49 @@ | ||
The `sbb-teaser-hero` is a component with a background image and an action call within a panel; | ||
it should be an eye-catcher and should have an emotional effect on the user with its large image component. | ||
|
||
## Slots | ||
|
||
It is possible to provide the panel label via an unnamed slot, | ||
while the link text can be provided using the `link-content` slot or the `linkContent` property; | ||
similarly, the background image can be provided using the `image` slot or the `imageSrc` property. | ||
|
||
```html | ||
<sbb-teaser-hero | ||
href="https://www.sbb.ch" | ||
link-content="Find out more" | ||
image-src="https://path-to-source" | ||
image-alt="SBB CFF FFS Employee" | ||
> | ||
Break out and explore castles and palaces. | ||
</sbb-teaser-hero> | ||
|
||
<sbb-teaser-hero href="https://www.sbb.ch"> | ||
Break out and explore castles and palaces. | ||
<sbb-image slot="image" image-src="https://path-to-source" alt="SBB CFF FFS Employee"></sbb-image> | ||
<span slot="link-content">Find out more</span> | ||
</sbb-teaser-hero> | ||
``` | ||
|
||
## Accessibility | ||
|
||
The description text is wrapped into an `p` element to guarantee the semantic meaning. | ||
|
||
Avoid slotting block elements (e.g. `div`) as this violates semantic rules and can have negative effects on screen readers. | ||
|
||
<!-- Auto Generated Below --> | ||
|
||
## Properties | ||
|
||
| Name | Attribute | Privacy | Type | Default | Description | | ||
| ------------- | -------------- | ------- | --------------------- | ------- | --------------------------------------------- | | ||
| `imageAlt` | `image-alt` | public | `string \| undefined` | | Image alt text will be passed to `sbb-image`. | | ||
| `imageSrc` | `image-src` | public | `string \| undefined` | | Image src will be passed to `sbb-image`. | | ||
| `linkContent` | `link-content` | public | `string \| undefined` | | Panel link text. | | ||
|
||
## Slots | ||
|
||
| Name | Description | | ||
| -------------- | ----------------------------------------------------- | | ||
| | Use the unnamed slot to add text content to the panel | | ||
| `image` | The background image that can be a `sbb-image` | | ||
| `link-content` | Link content of the panel | |
2 changes: 1 addition & 1 deletion
2
src/elements/teaser-hero/teaser-hero.scss → ...experimental/teaser-hero/teaser-hero.scss
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
9 changes: 4 additions & 5 deletions
9
.../teaser-hero/teaser-hero.snapshot.spec.ts → .../teaser-hero/teaser-hero.snapshot.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
7 changes: 3 additions & 4 deletions
7
src/elements/teaser-hero/teaser-hero.spec.ts → ...erimental/teaser-hero/teaser-hero.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
5 changes: 2 additions & 3 deletions
5
...ments/teaser-hero/teaser-hero.ssr.spec.ts → ...ental/teaser-hero/teaser-hero.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
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
7 changes: 3 additions & 4 deletions
7
src/elements/teaser-hero/teaser-hero.ts → ...s-experimental/teaser-hero/teaser-hero.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
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
The `sbb-teaser-paid` is a component with a background image and a chip with a text. | ||
|
||
```html | ||
<sbb-teaser-paid> | ||
<sbb-chip slot="chip">Label</sbb-chip> | ||
<sbb-image slot="image" image-src="https://path-to-source" alt="SBB CFF FFS Employee"></sbb-image> | ||
</sbb-teaser-paid> | ||
``` | ||
|
||
## Slots | ||
|
||
The `sbb-teaser-paid` component has two slots: the `image` slot, used to slot an `sbb-image` and the `chip` slot, used to slot an `sbb-chip`. | ||
|
||
<!-- Auto Generated Below --> | ||
|
||
## Slots | ||
|
||
| Name | Description | | ||
| ------- | ---------------------------------------------- | | ||
| `chip` | Link content of the panel | | ||
| `image` | The background image that can be a `sbb-image` | |
2 changes: 1 addition & 1 deletion
2
src/elements/teaser-paid/teaser-paid.scss → ...experimental/teaser-paid/teaser-paid.scss
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
3 changes: 1 addition & 2 deletions
3
.../teaser-paid/teaser-paid.snapshot.spec.ts → .../teaser-paid/teaser-paid.snapshot.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
11 changes: 5 additions & 6 deletions
11
src/elements/teaser-paid/teaser-paid.spec.ts → ...erimental/teaser-paid/teaser-paid.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
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
3 changes: 1 addition & 2 deletions
3
src/elements/teaser-paid/teaser-paid.ts → ...s-experimental/teaser-paid/teaser-paid.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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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