UIS9057
- Profile
+ Profile
View
diff --git a/src/components/menu/menu/menu.ts b/src/components/menu/menu/menu.ts
index 12576cc659..1199439870 100644
--- a/src/components/menu/menu/menu.ts
+++ b/src/components/menu/menu/menu.ts
@@ -39,7 +39,9 @@ const INTERACTIVE_ELEMENTS = [
'SBB-BUTTON',
'SBB-BUTTON-LINK',
'SBB-LINK',
+ 'SBB-BLOCK-LINK',
'SBB-LINK-BUTTON',
+ 'SBB-BLOCK-LINK-BUTTON',
];
let nextId = 0;
diff --git a/src/components/notification/notification.e2e.ts b/src/components/notification/notification.e2e.ts
index a54466c87c..0aea31f757 100644
--- a/src/components/notification/notification.e2e.ts
+++ b/src/components/notification/notification.e2e.ts
@@ -15,7 +15,7 @@ describe('sbb-notification', () => {
element = await fixture(html`
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
- Link one
+ Link one
`);
});
diff --git a/src/components/notification/notification.stories.ts b/src/components/notification/notification.stories.ts
index 00f43b922c..ef3beb0f23 100644
--- a/src/components/notification/notification.stories.ts
+++ b/src/components/notification/notification.stories.ts
@@ -108,7 +108,7 @@ const pageContent = (): TemplateResult => html`
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis
- link
+ link
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
`;
@@ -127,9 +127,9 @@ const DefaultTemplate = (args: Args): TemplateResult => html`
)}
>
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
- dog. Link one
- Link two
- Link three
+ dog. Link one
+ Link two
+ Link three
`;
@@ -147,9 +147,9 @@ const MultipleNotificationsTemplate = (args: Args): TemplateResult => html`
)}
>
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
- dog. Link one
- Link two
- Link three
+ dog. Link one
+ Link two
+ Link three
${simpleNotification(args['disable-animation'], 'success', 'Success')}
@@ -172,9 +172,9 @@ const SlottedTitleTemplate = (args: Args): TemplateResult => html`
>
Slotted title
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
- Link one
- Link two
- Link three
+ Link one
+ Link two
+ Link three
`;
diff --git a/src/components/popover/popover-trigger/popover-trigger.e2e.ts b/src/components/popover/popover-trigger/popover-trigger.e2e.ts
index ad3404fce3..d00e78e5d6 100644
--- a/src/components/popover/popover-trigger/popover-trigger.e2e.ts
+++ b/src/components/popover/popover-trigger/popover-trigger.e2e.ts
@@ -15,7 +15,7 @@ describe('sbb-popover-trigger', () => {
Popover content.
- Link
+ Link
`);
element = document.querySelector('sbb-popover-trigger')!;
diff --git a/src/components/popover/popover-trigger/popover-trigger.stories.ts b/src/components/popover/popover-trigger/popover-trigger.stories.ts
index 78e7a68391..5518389ce7 100644
--- a/src/components/popover/popover-trigger/popover-trigger.stories.ts
+++ b/src/components/popover/popover-trigger/popover-trigger.stories.ts
@@ -77,15 +77,14 @@ const popover = (): TemplateResult => html`
Some content.
-
Learn More
-
+
`;
diff --git a/src/components/popover/popover/popover.e2e.ts b/src/components/popover/popover/popover.e2e.ts
index abf234a18e..1edc6e31b1 100644
--- a/src/components/popover/popover/popover.e2e.ts
+++ b/src/components/popover/popover/popover.e2e.ts
@@ -18,10 +18,10 @@ describe('sbb-popover', () => {
Popover trigger
Popover content.
- Link
+ Link
- Other interactive elementOther interactive element
`);
@@ -389,8 +389,8 @@ describe('sbb-popover', () => {
Popover content.
- Other interactive elementOther interactive element
`);
@@ -445,8 +445,8 @@ describe('sbb-popover', () => {
it('should close an open popover when another one is opened', async () => {
await fixture(html`
- Other interactive elementOther interactive element
Popover triggerAnother popover trigger
diff --git a/src/components/popover/popover/popover.stories.ts b/src/components/popover/popover/popover.stories.ts
index b1612126e6..ebc53e1b59 100644
--- a/src/components/popover/popover/popover.stories.ts
+++ b/src/components/popover/popover/popover.stories.ts
@@ -112,15 +112,14 @@ const popover = (args: Args): TemplateResult => html`
Title.
-
Jobs & careers
-
-
+
Rail traffic information
-
-
+
SBB News
-
-
+
SBB Community
-
-
+
Company
-
+
@@ -338,36 +338,36 @@ export const footer = (args: Args): TemplateResult => html`
>
-
Refunds
-
-
+
Lost property office
-
-
+
Complaints
-
-
+
Praise
-
-
+
Report property damage
-
+
`;
diff --git a/src/storybook/styles/layout/layout.stories.ts b/src/storybook/styles/layout/layout.stories.ts
index 2f64558d7a..086122f6fd 100644
--- a/src/storybook/styles/layout/layout.stories.ts
+++ b/src/storybook/styles/layout/layout.stories.ts
@@ -26,10 +26,7 @@ const Warning = (): TemplateResult => html`
This example only intends to visualize the grid and is not meant to be used as is.
-
+
See docs on css grid .
From 10041d102400aeaebaae2262088d70ee699e925c Mon Sep 17 00:00:00 2001
From: Tommmaso Menga
Date: Wed, 21 Feb 2024 09:26:37 +0100
Subject: [PATCH 05/39] refactor(link): fix inline color
---
src/components/link/common/inline-link.scss | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/link/common/inline-link.scss b/src/components/link/common/inline-link.scss
index c0092d8daf..d6e3cfdba1 100644
--- a/src/components/link/common/inline-link.scss
+++ b/src/components/link/common/inline-link.scss
@@ -7,6 +7,7 @@
}
:host([negative]) {
+ @include sbb.link-variables--inline; // Needed because of specifity
@include sbb.link-variables--inline-negative;
}
From 2c5925576b144728395a268e54f06b5f949734c7 Mon Sep 17 00:00:00 2001
From: Tommmaso Menga
Date: Wed, 21 Feb 2024 10:27:07 +0100
Subject: [PATCH 06/39] refactor(link): update docs
---
.../action-group/action-group.e2e.ts | 8 ---
.../action-group/action-group.spec.ts | 16 -----
src/components/action-group/action-group.ts | 8 +--
src/components/action-group/readme.md | 40 ++++++-------
src/components/footer/footer.ts | 2 +-
src/components/footer/readme.md | 56 +++++++++---------
src/components/link-list/link-list.ts | 8 +--
src/components/link-list/readme.md | 58 ++++++++++---------
src/components/menu/menu/readme.md | 2 +-
src/components/notification/readme.md | 8 +--
.../popover/popover-trigger/readme.md | 4 +-
src/components/popover/popover/readme.md | 6 +-
src/components/skiplink-list/readme.md | 12 ++--
src/components/skiplink-list/skiplink-list.ts | 4 +-
src/components/toast/readme.md | 2 +-
15 files changed, 106 insertions(+), 128 deletions(-)
diff --git a/src/components/action-group/action-group.e2e.ts b/src/components/action-group/action-group.e2e.ts
index edf934508b..135caf5937 100644
--- a/src/components/action-group/action-group.e2e.ts
+++ b/src/components/action-group/action-group.e2e.ts
@@ -54,13 +54,5 @@ describe('sbb-action-group', () => {
) as SbbBlockLinkElement[];
expect(links.every((l) => l.size === 's')).to.be.ok;
});
-
- // it('should apply variant block to sbb-link', async () => {
- // await waitForLitRender(element);
- // const links = Array.from(
- // document.querySelectorAll('sbb-action-group sbb-link'),
- // ) as SbbLinkElement[];
- // expect(links.every((l) => l.variant === 'block')).to.be.ok;
- // });
});
});
diff --git a/src/components/action-group/action-group.spec.ts b/src/components/action-group/action-group.spec.ts
index cdb84346bd..f89135c231 100644
--- a/src/components/action-group/action-group.spec.ts
+++ b/src/components/action-group/action-group.spec.ts
@@ -76,22 +76,6 @@ describe('sbb-action-group', () => {
expect(assertButtons(root, (b) => b.size === 'm')).to.be.ok;
});
- // it('should apply block variant to sbb-link', async () => {
- // const root = (await fixture(html`
- //
- // Button
- //
- // Link
- //
- //
- // `)) as SbbActionGroupElement;
- // expect(Array.from(root.querySelectorAll('sbb-block-link')).every((l) => l.variant === 'block')).to
- // .be.ok;
- // });
-
it('should sync link-size property with sbb-link', async () => {
const root = (await fixture(html`
diff --git a/src/components/action-group/action-group.ts b/src/components/action-group/action-group.ts
index 7340fa3638..94c745d8d5 100644
--- a/src/components/action-group/action-group.ts
+++ b/src/components/action-group/action-group.ts
@@ -14,9 +14,9 @@ import type {
import style from './action-group.scss?lit&inline';
/**
- * It can be used as a container for one or more action element, like `sbb-button` or `sbb-link`.
+ * It can be used as a container for one or more action element, like `sbb-button` or `sbb-block-link`.
*
- * @slot - Use the unnamed slot to add `sbb-link` or `sbb-button` elements to the `sbb-action-group`.
+ * @slot - Use the unnamed slot to add `sbb-block-link` or `sbb-button` elements to the `sbb-action-group`.
*/
@customElement('sbb-action-group')
export class SbbActionGroupElement extends LitElement {
@@ -48,8 +48,8 @@ export class SbbActionGroupElement extends LitElement {
public buttonSize: SbbButtonSize = 'l';
/**
- * Size of the nested sbb-link instances. This will overwrite the size attribute of nested
- * sbb-link instances.
+ * Size of the nested sbb-block-link instances. This will overwrite the size attribute of nested
+ * sbb-block-link instances.
*/
@property({ attribute: 'link-size', reflect: true })
public linkSize: SbbLinkSize = 'm';
diff --git a/src/components/action-group/readme.md b/src/components/action-group/readme.md
index 9c4c6314e4..08b9ff2508 100644
--- a/src/components/action-group/readme.md
+++ b/src/components/action-group/readme.md
@@ -16,30 +16,30 @@ indicate the minimum breakpoint from which the orientation changes to `horizonta
Action 1Action 2
-
Action 3
-
+
```
### Button-size and link-size
-The two props `button-size` and `link-size` can be used to override, respectively, the size of the inner `sbb-button` and `sbb-link`.
-Default values are `l` for `sbb-button` and `m` for `sbb-link`.
+The two props `button-size` and `link-size` can be used to override, respectively, the size of the inner `sbb-button` and `sbb-block-link`.
+Default values are `l` for `sbb-button` and `m` for `sbb-block-link`.
```html
Action 1
-
Action 3
-
+
```
@@ -51,8 +51,8 @@ possible values are `start`, `center`, `stretch` and `end`.
It is also possible to set the `align-self` attribute on action items in order to move them in the
opposite direction to the group; possible values are `start`, `center` or `end`.
-**NOTE**: The `sbb-action-group` will automatically set variant `block` and will sync the `linkSize`
-property with nested `sbb-link` and the `buttonSize` property with the nested `sbb-button`
+**NOTE**: The `sbb-action-group` will only accept `block-link` and will sync the `linkSize`
+property with nested `sbb-block-link` and the `buttonSize` property with the nested `sbb-button`
instances.
```html
@@ -74,12 +74,12 @@ and we consider a template like the following one (possibly removing the link fo
Button 1Button 2
-
Link
-
+
```
@@ -120,16 +120,16 @@ The values for `align-group` and `align-self` for the various allocations are as
## Properties
-| Name | Attribute | Privacy | Type | Default | Description |
-| ---------------- | ----------------- | ------- | ------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------- |
-| `alignGroup` | `align-group` | public | `'start' \| 'center' \| 'stretch' \| 'end'` | `'start'` | Set the slotted `` children's alignment. |
-| `horizontalFrom` | `horizontal-from` | public | `SbbHorizontalFrom` | `'medium'` | Overrides the behaviour of `orientation` property. |
-| `orientation` | `orientation` | public | `SbbOrientation` | `'horizontal'` | Indicates the orientation of the components inside the ``. |
-| `buttonSize` | `button-size` | public | `SbbButtonSize` | `'l'` | Size of the nested sbb-button instances. This will overwrite the size attribute of nested sbb-button instances. |
-| `linkSize` | `link-size` | public | `SbbLinkSize` | `'m'` | Size of the nested sbb-link instances. This will overwrite the size attribute of nested sbb-link instances. |
+| Name | Attribute | Privacy | Type | Default | Description |
+| ---------------- | ----------------- | ------- | ------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------- |
+| `alignGroup` | `align-group` | public | `'start' \| 'center' \| 'stretch' \| 'end'` | `'start'` | Set the slotted `` children's alignment. |
+| `horizontalFrom` | `horizontal-from` | public | `SbbHorizontalFrom` | `'medium'` | Overrides the behaviour of `orientation` property. |
+| `orientation` | `orientation` | public | `SbbOrientation` | `'horizontal'` | Indicates the orientation of the components inside the ``. |
+| `buttonSize` | `button-size` | public | `SbbButtonSize` | `'l'` | Size of the nested sbb-button instances. This will overwrite the size attribute of nested sbb-button instances. |
+| `linkSize` | `link-size` | public | `SbbLinkSize` | `'m'` | Size of the nested sbb-block-link instances. This will overwrite the size attribute of nested sbb-block-link instances. |
## Slots
-| Name | Description |
-| ---- | ------------------------------------------------------------------------------------------ |
-| | Use the unnamed slot to add `sbb-link` or `sbb-button` elements to the `sbb-action-group`. |
+| Name | Description |
+| ---- | ------------------------------------------------------------------------------------------------ |
+| | Use the unnamed slot to add `sbb-block-link` or `sbb-button` elements to the `sbb-action-group`. |
diff --git a/src/components/footer/footer.ts b/src/components/footer/footer.ts
index 3ab5eb5093..5770afe5bb 100644
--- a/src/components/footer/footer.ts
+++ b/src/components/footer/footer.ts
@@ -11,7 +11,7 @@ import style from './footer.scss?lit&inline';
/**
* It displays a footer section for the page.
*
- * @slot - Use the unnamed slot to add elements like `sbb-link`, `sbb-link-list`, `sbb-divider` and so on.
+ * @slot - Use the unnamed slot to add elements like `sbb-block-link`, `sbb-link-list`, `sbb-divider` and so on.
*/
@customElement('sbb-footer')
export class SbbFooterElement extends SbbNegativeMixin(LitElement) {
diff --git a/src/components/footer/readme.md b/src/components/footer/readme.md
index ae1b0258f3..88de80227c 100644
--- a/src/components/footer/readme.md
+++ b/src/components/footer/readme.md
@@ -15,11 +15,11 @@ class (`class="sbb-link-list-button-group"`) to be displayed correctly.
- Link 1
- Link 2
- Link 3
- Link 4
- Link 5
+ Link 1
+ Link 2
+ Link 3
+ Link 4
+ Link 5
@@ -27,29 +27,29 @@ class (`class="sbb-link-list-button-group"`) to be displayed correctly.
- Refunds
- Lost property office
- Complaints
- Praise
- Report property damage
+ Refunds
+ Lost property office
+ Complaints
+ Praise
+ Report property damageAll help topics
- Jobs & careers
- Rail traffic information
- SBB News
- SBB Community
- Company
+ Jobs & careers
+ Rail traffic information
+ SBB News
+ SBB Community
+ Company
...
- Refunds
- Lost property office
- Complaints
- Praise
- Report property damage
+ Refunds
+ Lost property office
+ Complaints
+ Praise
+ Report property damage
```
@@ -62,11 +62,11 @@ to the content where needed (e.g. `sbb-link-list`, `sbb-link` and `sbb-divider`)
```html
- Refunds
- Lost property office
- Complaints
- Praise
- Report property damage
+ Refunds
+ Lost property office
+ Complaints
+ Praise
+ Report property damage
```
@@ -85,6 +85,6 @@ to the content where needed (e.g. `sbb-link-list`, `sbb-link` and `sbb-divider`)
## Slots
-| Name | Description |
-| ---- | ----------------------------------------------------------------------------------------------- |
-| | Use the unnamed slot to add elements like `sbb-link`, `sbb-link-list`, `sbb-divider` and so on. |
+| Name | Description |
+| ---- | ----------------------------------------------------------------------------------------------------- |
+| | Use the unnamed slot to add elements like `sbb-block-link`, `sbb-link-list`, `sbb-divider` and so on. |
diff --git a/src/components/link-list/link-list.ts b/src/components/link-list/link-list.ts
index c60720b1bd..2eb83f31a3 100644
--- a/src/components/link-list/link-list.ts
+++ b/src/components/link-list/link-list.ts
@@ -22,9 +22,9 @@ import style from './link-list.scss?lit&inline';
import '../title';
/**
- * It displays a list of `sbb-link`.
+ * It displays a list of `sbb-block-link`.
*
- * @slot - Use the unnamed slot to add one or more `sbb-link`.
+ * @slot - Use the unnamed slot to add one or more `sbb-block-link`.
* @slot title - Use this slot to provide a title.
*/
@customElement('sbb-link-list')
@@ -48,8 +48,8 @@ export class SbbLinkListElement extends SbbNegativeMixin(
@property({ attribute: 'title-level' }) public titleLevel: SbbTitleLevel = '2';
/**
- * Text size of the nested sbb-link instances. This will overwrite the size attribute of
- * nested sbb-link instances.
+ * Text size of the nested sbb-block-link instances. This will overwrite the size attribute of
+ * nested sbb-block-link instances.
*/
@property({ reflect: true }) public size: SbbLinkSize = 's';
diff --git a/src/components/link-list/readme.md b/src/components/link-list/readme.md
index 3a3075f609..fcc67349c8 100644
--- a/src/components/link-list/readme.md
+++ b/src/components/link-list/readme.md
@@ -1,12 +1,14 @@
-The `sbb-link-list` is a component that can be used to collect and display more [sbb-link](/docs/components-sbb-link--docs)s.
+The `sbb-link-list` is a component that can be used to collect and display more [sbb-block-link](/docs/components-sbb-block.link--docs)s.
```html
- RefundsRefunds
- Loss ReportLoss Report
...
@@ -26,16 +28,18 @@ The title can be set using the `titleContent` property or, alternatively, can be
## Style
-The component will automatically set variant `block` on nested `sbb-link` instances,
+The component will accept only `sbb-block-link` or `sbb-block-link-button` instances,
and it will sync its `size` and `negative` property with the inner links.
```html
- RefundsRefunds
- Loss ReportLoss Report
...
@@ -50,11 +54,13 @@ The title will not be displayed in the horizontal orientation.
```html
- RefundsRefunds
- Loss ReportLoss Report
...
@@ -64,18 +70,18 @@ The title will not be displayed in the horizontal orientation.
## Properties
-| Name | Attribute | Privacy | Type | Default | Description |
-| ---------------- | ----------------- | ------- | -------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------- |
-| `titleContent` | `title-content` | public | `string \| undefined` | | The title text we want to show before the list. |
-| `titleLevel` | `title-level` | public | `SbbTitleLevel` | `'2'` | The semantic level of the title, e.g. 2 = h2. |
-| `size` | `size` | public | `SbbLinkSize` | `'s'` | Text size of the nested sbb-link instances. This will overwrite the size attribute of nested sbb-link instances. |
-| `horizontalFrom` | `horizontal-from` | public | `SbbHorizontalFrom \| undefined` | | Selected breakpoint from which the list is rendered horizontally. |
-| `orientation` | `orientation` | public | `SbbOrientation` | `'vertical'` | The orientation in which the list will be shown vertical or horizontal. |
-| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
+| Name | Attribute | Privacy | Type | Default | Description |
+| ---------------- | ----------------- | ------- | -------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
+| `titleContent` | `title-content` | public | `string \| undefined` | | The title text we want to show before the list. |
+| `titleLevel` | `title-level` | public | `TitleLevel \| undefined` | `'2'` | The semantic level of the title, e.g. 2 = h2. |
+| `size` | `size` | public | `SbbLinkSize` | `'s'` | Text size of the nested sbb-block-link instances. This will overwrite the size attribute of nested sbb-block-link instances. |
+| `horizontalFrom` | `horizontal-from` | public | `SbbHorizontalFrom \| undefined` | | Selected breakpoint from which the list is rendered horizontally. |
+| `orientation` | `orientation` | public | `SbbOrientation` | `'vertical'` | The orientation in which the list will be shown vertical or horizontal. |
+| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
## Slots
-| Name | Description |
-| ------- | --------------------------------------------------- |
-| | Use the unnamed slot to add one or more `sbb-link`. |
-| `title` | Use this slot to provide a title. |
+| Name | Description |
+| ------- | --------------------------------------------------------- |
+| | Use the unnamed slot to add one or more `sbb-block-link`. |
+| `title` | Use this slot to provide a title. |
diff --git a/src/components/menu/menu/readme.md b/src/components/menu/menu/readme.md
index e0739914ce..75efc3c6dd 100644
--- a/src/components/menu/menu/readme.md
+++ b/src/components/menu/menu/readme.md
@@ -36,7 +36,7 @@ You can also provide custom content inside the `sbb-menu`:
Christina Müller
UIS9057
- Profile
+ ProfileViewEdit
diff --git a/src/components/notification/readme.md b/src/components/notification/readme.md
index 44c5105174..86c399ef6a 100644
--- a/src/components/notification/readme.md
+++ b/src/components/notification/readme.md
@@ -15,13 +15,13 @@ The `sbb-notification` is structured in the following way:
```html
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
- Link one
- Link two
- Link three
+ Link one
+ Link two
+ Link three
```
-Note that the notification only supports inline links, therefore any slotted link will be forced to be a `variant="inline"` link.
+Note that the notification only supports inline links.
## Variants
diff --git a/src/components/popover/popover-trigger/readme.md b/src/components/popover/popover-trigger/readme.md
index 8bad8b3bc5..f0b18b321f 100644
--- a/src/components/popover/popover-trigger/readme.md
+++ b/src/components/popover/popover-trigger/readme.md
@@ -63,9 +63,7 @@ associate the popover trigger with the popover via `aria-describedby` and an `id
Popover title.
-
- Popover content. Link
-
+
Popover content. Link
```
diff --git a/src/components/popover/popover/readme.md b/src/components/popover/popover/readme.md
index 725f4f256d..2e4f3a87e8 100644
--- a/src/components/popover/popover/readme.md
+++ b/src/components/popover/popover/readme.md
@@ -35,7 +35,7 @@ it's also possible to hide the default close button using the `hideCloseButton`
Popover Title.
- Popover content. Link
+ Popover content. Link
```
@@ -59,9 +59,7 @@ if neither the trigger element nor the popover are on hover or if another action
close-delay="750"
>
Popover Title.
-
`;
From e776ba964b64f959ddd53672c73734dd6a95838a Mon Sep 17 00:00:00 2001
From: Tommmaso Menga
Date: Tue, 27 Feb 2024 11:11:48 +0100
Subject: [PATCH 17/39] refactor(link): pr feedbacks
---
src/components/link/common/block-link.scss | 2 +-
src/components/link/common/inline-link-common.ts | 1 -
src/components/link/common/inline-link.scss | 2 +-
src/components/link/common/link.scss | 2 +-
src/components/link/link-button/link-button.ts | 1 -
src/components/link/link-static/link-static.ts | 1 -
src/components/link/link/__snapshots__/link.spec.snap.js | 6 +++---
src/components/link/link/link.spec.ts | 2 +-
src/components/link/link/link.ts | 1 -
9 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/components/link/common/block-link.scss b/src/components/link/common/block-link.scss
index 8d31d4263f..cfd19b4701 100644
--- a/src/components/link/common/block-link.scss
+++ b/src/components/link/common/block-link.scss
@@ -4,7 +4,7 @@
display: block;
}
-:is(.sbb-action-base) {
+.sbb-action-base {
:host([size='xs']) & {
@include sbb.text-xs--regular;
}
diff --git a/src/components/link/common/inline-link-common.ts b/src/components/link/common/inline-link-common.ts
index 67f8427a74..65e684c6f4 100644
--- a/src/components/link/common/inline-link-common.ts
+++ b/src/components/link/common/inline-link-common.ts
@@ -2,7 +2,6 @@ import { type CSSResultGroup } from 'lit';
import { type SbbActionBaseElement, type AbstractConstructor } from '../../core/common-behaviors';
-import '../../icon';
import inlineStyle from './inline-link.scss?lit&inline';
import { SbbLinkCommonElementMixin, type SbbLinkCommonElementMixinType } from './link-common';
import style from './link.scss?lit&inline';
diff --git a/src/components/link/common/inline-link.scss b/src/components/link/common/inline-link.scss
index 5718aa5b93..789a8b8859 100644
--- a/src/components/link/common/inline-link.scss
+++ b/src/components/link/common/inline-link.scss
@@ -11,6 +11,6 @@
@include sbb.link-variables--inline-negative;
}
-:is(.sbb-action-base) {
+.sbb-action-base {
@include sbb.link-inline-base;
}
diff --git a/src/components/link/common/link.scss b/src/components/link/common/link.scss
index f57ec05780..0a3a3afc25 100644
--- a/src/components/link/common/link.scss
+++ b/src/components/link/common/link.scss
@@ -27,7 +27,7 @@
@include sbb.link-variables--button;
}
-:is(.sbb-action-base) {
+.sbb-action-base {
@include sbb.link-base;
display: flex;
diff --git a/src/components/link/link-button/link-button.ts b/src/components/link/link-button/link-button.ts
index e644e6b842..0e46ee31b9 100644
--- a/src/components/link/link-button/link-button.ts
+++ b/src/components/link/link-button/link-button.ts
@@ -7,7 +7,6 @@ import { SbbInlineLinkCommonElementMixin } from '../common';
* It displays a link enhanced with the SBB Design, which will behave as a button.
*
* @slot - Use the unnamed slot to add content to the `sbb-link-button`.
- * @slot icon - Slot used to display the icon, if one is set.
*/
@customElement('sbb-link-button')
export class SbbLinkButtonElement extends SbbInlineLinkCommonElementMixin(
diff --git a/src/components/link/link-static/link-static.ts b/src/components/link/link-static/link-static.ts
index 25ceaf3635..1776933050 100644
--- a/src/components/link/link-static/link-static.ts
+++ b/src/components/link/link-static/link-static.ts
@@ -7,7 +7,6 @@ import { SbbInlineLinkCommonElementMixin } from '../common';
* It displays a static link enhanced with the SBB Design.
*
* @slot - Use the unnamed slot to add content to the `sbb-link-static`.
- * @slot icon - Slot used to display the icon, if one is set.
*/
@customElement('sbb-link-static')
export class SbbLinkStaticElement extends SbbInlineLinkCommonElementMixin(
diff --git a/src/components/link/link/__snapshots__/link.spec.snap.js b/src/components/link/link/__snapshots__/link.spec.snap.js
index 613a9fe135..a4e21af04c 100644
--- a/src/components/link/link/__snapshots__/link.spec.snap.js
+++ b/src/components/link/link/__snapshots__/link.spec.snap.js
@@ -5,7 +5,7 @@ snapshots["sbb-link renders - DOM"] =
` {
beforeEach(async () => {
element = await fixture(
- html`
+ html`
Travelcards & tickets.
`,
);
diff --git a/src/components/link/link/link.ts b/src/components/link/link/link.ts
index 7ef76c8434..7daadfe65d 100644
--- a/src/components/link/link/link.ts
+++ b/src/components/link/link/link.ts
@@ -7,7 +7,6 @@ import { SbbInlineLinkCommonElementMixin } from '../common';
* It displays a link enhanced with the SBB Design.
*
* @slot - Use the unnamed slot to add content to the `sbb-link`.
- * @slot icon - Slot used to display the icon, if one is set.
*/
@customElement('sbb-link')
export class SbbLinkElement extends SbbInlineLinkCommonElementMixin(
From d937a813762940e6bf9fe8d77332076c8c111315 Mon Sep 17 00:00:00 2001
From: Tommmaso Menga
Date: Tue, 27 Feb 2024 11:53:33 +0100
Subject: [PATCH 18/39] refactor(link): pr feedbacks
---
src/components/link/link-button/readme.md | 7 +++----
src/components/link/link-static/readme.md | 7 +++----
src/components/link/link/readme.md | 7 +++----
src/components/skiplink-list/readme.md | 6 +++---
src/components/skiplink-list/skiplink-list.ts | 11 +++--------
5 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/src/components/link/link-button/readme.md b/src/components/link/link-button/readme.md
index 44e2385db3..fe41eeffa5 100644
--- a/src/components/link/link-button/readme.md
+++ b/src/components/link/link-button/readme.md
@@ -64,7 +64,6 @@ and it has also three sizes (`xs`, `s`, which is the default, and `m`) that are
## Slots
-| Name | Description |
-| ------ | ------------------------------------------------------------- |
-| | Use the unnamed slot to add content to the `sbb-link-button`. |
-| `icon` | Slot used to display the icon, if one is set. |
+| Name | Description |
+| ---- | ------------------------------------------------------------- |
+| | Use the unnamed slot to add content to the `sbb-link-button`. |
diff --git a/src/components/link/link-static/readme.md b/src/components/link/link-static/readme.md
index 2c6de1402a..366bace3d9 100644
--- a/src/components/link/link-static/readme.md
+++ b/src/components/link/link-static/readme.md
@@ -53,7 +53,6 @@ and it has also three sizes (`xs`, `s`, which is the default, and `m`) that are
## Slots
-| Name | Description |
-| ------ | ------------------------------------------------------------- |
-| | Use the unnamed slot to add content to the `sbb-link-static`. |
-| `icon` | Slot used to display the icon, if one is set. |
+| Name | Description |
+| ---- | ------------------------------------------------------------- |
+| | Use the unnamed slot to add content to the `sbb-link-static`. |
diff --git a/src/components/link/link/readme.md b/src/components/link/link/readme.md
index d28d3e69a5..cbf3a40857 100644
--- a/src/components/link/link/readme.md
+++ b/src/components/link/link/readme.md
@@ -63,7 +63,6 @@ and it has also three sizes (`xs`, `s`, which is the default, and `m`) that are
## Slots
-| Name | Description |
-| ------ | ------------------------------------------------------ |
-| | Use the unnamed slot to add content to the `sbb-link`. |
-| `icon` | Slot used to display the icon, if one is set. |
+| Name | Description |
+| ---- | ------------------------------------------------------ |
+| | Use the unnamed slot to add content to the `sbb-link`. |
diff --git a/src/components/skiplink-list/readme.md b/src/components/skiplink-list/readme.md
index 4aa4af6416..87fa7196ff 100644
--- a/src/components/skiplink-list/readme.md
+++ b/src/components/skiplink-list/readme.md
@@ -30,6 +30,6 @@ to specify a custom stack order, the `z-index` can be changed by defining the CS
## Slots
-| Name | Description |
-| ---- | -------------------------------------------------------------------------------------------------------------------------------------- |
-| | Use the unnamed slot to add `sbb-link`/`sbb-link-button`/`sbb-block-link`/`sbb-block-link-button` elements to the `sbb-skiplink-list`. |
+| Name | Description |
+| ---- | --------------------------------------------------------------------------------------------------------- |
+| | Use the unnamed slot to add `sbb-block-link`/`sbb-block-link-button` elements to the `sbb-skiplink-list`. |
diff --git a/src/components/skiplink-list/skiplink-list.ts b/src/components/skiplink-list/skiplink-list.ts
index 0695e96839..f7d81e9b91 100644
--- a/src/components/skiplink-list/skiplink-list.ts
+++ b/src/components/skiplink-list/skiplink-list.ts
@@ -26,9 +26,9 @@ import style from './skiplink-list.scss?lit&inline';
import '../title';
/**
- * It displays a list of `sbb-link`/`sbb-link-button`/`sbb-block-link`/`sbb-block-link-button` which are visible only when focused.
+ * It displays a list of `sbb-block-link`/`sbb-block-link-button` which are visible only when focused.
*
- * @slot - Use the unnamed slot to add `sbb-link`/`sbb-link-button`/`sbb-block-link`/`sbb-block-link-button` elements to the `sbb-skiplink-list`.
+ * @slot - Use the unnamed slot to add `sbb-block-link`/`sbb-block-link-button` elements to the `sbb-skiplink-list`.
*/
@customElement('sbb-skiplink-list')
export class SbbSkiplinkListElement extends SbbNamedSlotListElementMixin<
@@ -36,12 +36,7 @@ export class SbbSkiplinkListElement extends SbbNamedSlotListElementMixin<
typeof LitElement
>(LitElement) {
public static override styles: CSSResultGroup = style;
- protected override readonly listChildTagNames = [
- 'SBB-LINK',
- 'SBB-LINK-BUTTON',
- 'SBB-BLOCK-LINK',
- 'SBB-BLOCK-LINK-BUTTON',
- ];
+ protected override readonly listChildTagNames = ['SBB-BLOCK-LINK', 'SBB-BLOCK-LINK-BUTTON'];
/** The title text we want to place before the list. */
@property({ attribute: 'title-content', reflect: true }) public titleContent?: string;
From c1a5661d43c74f053d724a70414315eddde25b86 Mon Sep 17 00:00:00 2001
From: Tommmaso Menga
Date: Tue, 27 Feb 2024 14:16:28 +0100
Subject: [PATCH 19/39] refactor(link): update readmes
---
.../link/block-link-button/readme.md | 32 ++++++---------
.../link/block-link-static/readme.md | 30 ++++++--------
src/components/link/block-link/readme.md | 40 +++++++++----------
src/components/link/link-button/readme.md | 26 +-----------
src/components/link/link-static/readme.md | 26 +-----------
src/components/link/link/readme.md | 26 +-----------
6 files changed, 48 insertions(+), 132 deletions(-)
diff --git a/src/components/link/block-link-button/readme.md b/src/components/link/block-link-button/readme.md
index fdcc179f00..ad0dc87ce8 100644
--- a/src/components/link/block-link-button/readme.md
+++ b/src/components/link/block-link-button/readme.md
@@ -1,4 +1,4 @@
-The `sbb-link-button` component provides the same functionality as a native `
`;
-const LinkInlineTemplate = (): TemplateResult => html`
+const LinkTemplate = (): TemplateResult => html`
- A text with a link inside the text. It should adapt to
- the text but have an underline and hover colors.
+ A text with a link inside the text. It should adapt to the text
+ but have an underline and hover colors.
- A text with a negative link inside the text. It
- should adapt to the text but have an underline and hover colors.
+ A text with a negative link inside the text. It should
+ adapt to the text but have an underline and hover colors.