Skip to content

Commit

Permalink
Merge branch 'main' into fix-header-mobile-to-desktop-transition
Browse files Browse the repository at this point in the history
  • Loading branch information
alizedebray authored Dec 13, 2024
2 parents cd396dd + 4887a78 commit 28bd326
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-lizards-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': minor
---

Removed outdated portal-specific styles, including subnavigation-related rules.
16 changes: 0 additions & 16 deletions packages/components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@ export namespace Components {
* The ISO 639 language code, formatted according to [RFC 5646 (also known as BCP 47)](https://datatracker.ietf.org/doc/html/rfc5646). For example, "de".
*/
"code": string;
/**
* Used on parent component (post-language-switch) to detect elements that are manually added
*/
"generated": boolean;
/**
* The full name of the language. For example, "Deutsch".
*/
Expand All @@ -252,10 +248,6 @@ export namespace Components {
* A descriptive text for the list of language options
*/
"description": string;
/**
* The name of the language switch, which will be used on the dropdown as an ID
*/
"name": string;
/**
* Variant that determines the rendering of the language switch either as a list (used on mobile in the header) or a dropdown (used on desktop in the header)
*/
Expand Down Expand Up @@ -1050,10 +1042,6 @@ declare namespace LocalJSX {
* The ISO 639 language code, formatted according to [RFC 5646 (also known as BCP 47)](https://datatracker.ietf.org/doc/html/rfc5646). For example, "de".
*/
"code": string;
/**
* Used on parent component (post-language-switch) to detect elements that are manually added
*/
"generated"?: boolean;
/**
* The full name of the language. For example, "Deutsch".
*/
Expand All @@ -1080,10 +1068,6 @@ declare namespace LocalJSX {
* A descriptive text for the list of language options
*/
"description"?: string;
/**
* The name of the language switch, which will be used on the dropdown as an ID
*/
"name"?: string;
/**
* Variant that determines the rendering of the language switch either as a list (used on mobile in the header) or a dropdown (used on desktop in the header)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@

## Properties

| Property | Attribute | Description | Type | Default |
| ------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- |
| `active` | `active` | If set to `true`, the language option is considered the current language for the page. | `boolean` | `undefined` |
| `code` _(required)_ | `code` | The ISO 639 language code, formatted according to [RFC 5646 (also known as BCP 47)](https://datatracker.ietf.org/doc/html/rfc5646). For example, "de". | `string` | `undefined` |
| `generated` | `generated` | Used on parent component (post-language-switch) to detect elements that are manually added | `boolean` | `undefined` |
| `name` | `name` | The full name of the language. For example, "Deutsch". | `string` | `undefined` |
| `url` | `url` | The URL used for the href attribute of the internal anchor. This field is optional; if not provided, a button will be used internally instead of an anchor. | `string` | `undefined` |
| `variant` | `variant` | The variant of the post-language-switch parent (dynamically set by the parent) | `"dropdown" \| "list"` | `undefined` |
| Property | Attribute | Description | Type | Default |
| ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- |
| `active` | `active` | If set to `true`, the language option is considered the current language for the page. | `boolean` | `undefined` |
| `code` _(required)_ | `code` | The ISO 639 language code, formatted according to [RFC 5646 (also known as BCP 47)](https://datatracker.ietf.org/doc/html/rfc5646). For example, "de". | `string` | `undefined` |
| `name` | `name` | The full name of the language. For example, "Deutsch". | `string` | `undefined` |
| `url` | `url` | The URL used for the href attribute of the internal anchor. This field is optional; if not provided, a button will be used internally instead of an anchor. | `string` | `undefined` |
| `variant` | `variant` | The variant of the post-language-switch parent (dynamically set by the parent) | `"dropdown" \| "list"` | `undefined` |


## Events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
| ------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- |
| `caption` | `caption` | A title for the list of language options | `string` | `undefined` |
| `description` | `description` | A descriptive text for the list of language options | `string` | `undefined` |
| `name` | `name` | The name of the language switch, which will be used on the dropdown as an ID | `string` | `undefined` |
| `variant` | `variant` | Variant that determines the rendering of the language switch either as a list (used on mobile in the header) or a dropdown (used on desktop in the header) | `"dropdown" \| "list"` | `'list'` |


Expand Down
3 changes: 0 additions & 3 deletions packages/styles/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
@use './utilities';
@use './elements';
@use './components';

// Portal specific styles
@use './layouts/portal';
1 change: 0 additions & 1 deletion packages/styles/src/layouts/portal/_index.scss

This file was deleted.

5 changes: 0 additions & 5 deletions packages/styles/src/layouts/portal/_subnavigation.scss

This file was deleted.

1 change: 0 additions & 1 deletion packages/styles/tests/layouts/portal/index.test.scss

This file was deleted.

0 comments on commit 28bd326

Please sign in to comment.