From 7dbde91b011637c514ebf766f5305ca6ae922885 Mon Sep 17 00:00:00 2001 From: Myrta Sakellariou <66249294+myrta2302@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:50:30 +0200 Subject: [PATCH 01/21] feat(styles): component simple check list (#4171) --- .changeset/clever-cheetahs-draw.md | 6 ++ .../snapshots/components/list.snapshot.ts | 6 ++ .../foundations/typography/list/list.docs.mdx | 6 ++ .../typography/list/list.snapshot.stories.ts | 40 ++++++++++ .../typography/list/list.stories.ts | 10 +++ packages/styles/src/components/_index.scss | 1 + .../styles/src/components/list-check.scss | 79 +++++++++++++++++++ 7 files changed, 148 insertions(+) create mode 100644 .changeset/clever-cheetahs-draw.md create mode 100644 packages/styles/src/components/list-check.scss diff --git a/.changeset/clever-cheetahs-draw.md b/.changeset/clever-cheetahs-draw.md new file mode 100644 index 0000000000..ca46bec57b --- /dev/null +++ b/.changeset/clever-cheetahs-draw.md @@ -0,0 +1,6 @@ +--- +'@swisspost/design-system-documentation': minor +'@swisspost/design-system-styles': minor +--- + +Implemented simple check list component. diff --git a/packages/documentation/cypress/snapshots/components/list.snapshot.ts b/packages/documentation/cypress/snapshots/components/list.snapshot.ts index a49515ac7f..143e484d6e 100644 --- a/packages/documentation/cypress/snapshots/components/list.snapshot.ts +++ b/packages/documentation/cypress/snapshots/components/list.snapshot.ts @@ -4,4 +4,10 @@ describe('List', () => { cy.get('ol', { timeout: 30000 }).should('be.visible'); cy.percySnapshot('Lists', { widths: [1440] }); }); + + it('default', () => { + cy.visit('/iframe.html?id=snapshots--check-list'); + cy.get('ul', { timeout: 30000 }).should('be.visible'); + cy.percySnapshot('Lists', { widths: [1440] }); + }); }); diff --git a/packages/documentation/src/stories/foundations/typography/list/list.docs.mdx b/packages/documentation/src/stories/foundations/typography/list/list.docs.mdx index 63e12fa3c1..40cdd109a3 100644 --- a/packages/documentation/src/stories/foundations/typography/list/list.docs.mdx +++ b/packages/documentation/src/stories/foundations/typography/list/list.docs.mdx @@ -72,3 +72,9 @@ Align terms and descriptions horizontally by using our grid system’s predefine For longer terms, you can optionally add a `.text-truncate` class to truncate the text with an ellipsis. + +## Check List + +A non-interactive checklist is a list with a check icon prefix, not only for better visual identification of the list items but also to indicate a 'completed' status for each item. + + diff --git a/packages/documentation/src/stories/foundations/typography/list/list.snapshot.stories.ts b/packages/documentation/src/stories/foundations/typography/list/list.snapshot.stories.ts index 3114f36991..0e9510b88a 100644 --- a/packages/documentation/src/stories/foundations/typography/list/list.snapshot.stories.ts +++ b/packages/documentation/src/stories/foundations/typography/list/list.snapshot.stories.ts @@ -135,3 +135,43 @@ export const Lists: Story = { } }, }; + +export const CheckList: Story = { + render: () => { + return schemes( + () => html` +
+
    +
  • + A check list item +
  • +
  • + 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 nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur +
  • +
  • And one more
  • +
  • + Nested check list: +
      +
    • + 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 nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur +
    • +
    +
  • +
  • And another one
  • +
  • And one more
  • +
+ + +
+ `, + ); + }, +}; diff --git a/packages/documentation/src/stories/foundations/typography/list/list.stories.ts b/packages/documentation/src/stories/foundations/typography/list/list.stories.ts index 0d7ea8eb73..435276b13c 100644 --- a/packages/documentation/src/stories/foundations/typography/list/list.stories.ts +++ b/packages/documentation/src/stories/foundations/typography/list/list.stories.ts @@ -122,3 +122,13 @@ export const DescriptionListUsingGrid: Story = { `, }; + +export const CheckList: Story = { + render: () => html` + + `, +}; diff --git a/packages/styles/src/components/_index.scss b/packages/styles/src/components/_index.scss index 436321e941..2f9f104eca 100644 --- a/packages/styles/src/components/_index.scss +++ b/packages/styles/src/components/_index.scss @@ -31,6 +31,7 @@ @use 'icon-close-button'; @use 'lead'; @use 'list-group'; +@use 'list-check'; @use 'modal'; @use 'pagination'; @use 'popover'; diff --git a/packages/styles/src/components/list-check.scss b/packages/styles/src/components/list-check.scss new file mode 100644 index 0000000000..cc0c6efd9a --- /dev/null +++ b/packages/styles/src/components/list-check.scss @@ -0,0 +1,79 @@ +@use '../functions/tokens'; +@use '../mixins/icons' as icon-mixin; +@use '../tokens/components'; +@use '../mixins/media'; +@use '../mixins/utilities'; + +tokens.$default-map: components.$post-listcheck; + +ul.list-check { + @include utilities.reset-list; + display: flex; + flex-direction: column; + align-items: flex-start; + list-style: none; + padding-block: tokens.get('list-check-margin-block') tokens.get('list-check-margin-block'); + padding-inline-start: calc( + #{tokens.get('list-check-sizing-icon')} + 2 * #{tokens.get('list-check-padding-icon')} + #{tokens.get( + 'list-check-icon-gap-inline' + )} + 2 * #{tokens.get('list-check-icon-container-inline')} + ); + gap: tokens.get('list-check-item-gap-block-text'); + + > li { + position: relative; + color: tokens.get('list-check-color-text-fg'); + padding-block: tokens.get('list-check-text-padding'); + + &::before { + display: block; + position: absolute; + top: 0; + left: 0; + margin-inline-start: calc( + -1 * (#{tokens.get('list-check-sizing-icon')} + 2 * #{tokens.get('list-check-padding-icon')} + + #{tokens.get('list-check-icon-gap-inline')} + #{tokens.get( + 'list-check-icon-container-inline' + )}) + ); + margin-block: calc(-1 * tokens.get('list-check-text-padding')); + + background: tokens.get('list-check-color-icon-bg'); + width: calc( + #{tokens.get('list-check-sizing-icon')} + 2 * #{tokens.get('list-check-padding-icon')} + ); + height: calc( + #{tokens.get('list-check-sizing-icon')} + 2 * #{tokens.get('list-check-padding-icon')} + ); + content: ''; + border-radius: 50%; + @include media.max(sm) { + margin-block: tokens.get('list-check-icon-container-block'); + padding-inline: tokens.get('list-check-icon-container-inline'); + } + } + + &::after { + display: block; + position: absolute; + margin-inline-start: calc( + -1 * (#{tokens.get('list-check-sizing-icon')} + 2 * #{tokens.get('list-check-padding-icon')} + + #{tokens.get('list-check-icon-gap-inline')} + #{tokens.get( + 'list-check-icon-container-inline' + )}) + ); + margin-block: calc(-1 * tokens.get('list-check-text-padding')); + top: tokens.get('list-check-padding-icon'); + left: tokens.get('list-check-padding-icon'); + width: tokens.get('list-check-sizing-icon'); + height: tokens.get('list-check-sizing-icon'); + content: ''; + @include icon-mixin.icon('3035'); + color: tokens.get('list-check-color-icon-fg'); + @include media.max(sm) { + margin-block: tokens.get('list-check-icon-container-block'); + padding-inline: tokens.get('list-check-icon-container-inline'); + } + } + } +} From ebabcf861b0771680c80ad7dbc6c5a6a5fd9d0e9 Mon Sep 17 00:00:00 2001 From: Lea Date: Mon, 9 Dec 2024 11:06:08 +0100 Subject: [PATCH 02/21] chore(documentation,styles): add position utilities (#3988) --- .changeset/chatty-spoons-unite.md | 6 + .../snapshots/utilities/position.snapshot.ts | 7 + .../public/images/browser-bg-top.png | Bin 0 -> 28837 bytes .../utilities/position/position.docs.mdx | 47 ++++++ .../position/position.snapshot.stories.ts | 82 +++++++++ .../utilities/position/position.stories.ts | 156 ++++++++++++++++++ .../utilities/position/position.styles.scss | 135 +++++++++++++++ .../src/themes/bootstrap/_utilities.scss | 7 + packages/styles/src/utilities/_variables.scss | 37 +++++ 9 files changed, 477 insertions(+) create mode 100644 .changeset/chatty-spoons-unite.md create mode 100644 packages/documentation/cypress/snapshots/utilities/position.snapshot.ts create mode 100644 packages/documentation/public/images/browser-bg-top.png create mode 100644 packages/documentation/src/stories/utilities/position/position.docs.mdx create mode 100644 packages/documentation/src/stories/utilities/position/position.snapshot.stories.ts create mode 100644 packages/documentation/src/stories/utilities/position/position.stories.ts create mode 100644 packages/documentation/src/stories/utilities/position/position.styles.scss diff --git a/.changeset/chatty-spoons-unite.md b/.changeset/chatty-spoons-unite.md new file mode 100644 index 0000000000..ef42857970 --- /dev/null +++ b/.changeset/chatty-spoons-unite.md @@ -0,0 +1,6 @@ +--- +'@swisspost/design-system-documentation': minor +'@swisspost/design-system-styles': minor +--- + +Internalized bootstrap position utilities into the design system. diff --git a/packages/documentation/cypress/snapshots/utilities/position.snapshot.ts b/packages/documentation/cypress/snapshots/utilities/position.snapshot.ts new file mode 100644 index 0000000000..a898654c49 --- /dev/null +++ b/packages/documentation/cypress/snapshots/utilities/position.snapshot.ts @@ -0,0 +1,7 @@ +describe('Position', () => { + it('position', () => { + cy.visit('/iframe.html?id=snapshots--position'); + cy.get('.position-example', { timeout: 30000 }).should('be.visible'); + cy.percySnapshot('Position', { widths: [320, 1440] }); + }); +}); diff --git a/packages/documentation/public/images/browser-bg-top.png b/packages/documentation/public/images/browser-bg-top.png new file mode 100644 index 0000000000000000000000000000000000000000..ca629bfd45b2c1d670a30cd1e643f0272162dcfe GIT binary patch literal 28837 zcmYIubx<757cGPYf)hw^SR}Xw5`1w8!66VJxVyXTqQQbJ?oM!bcMtBexVtTjF7WdG zUcGvM%ydu9RCU$#>3hyS_l7AeN@HV?Vjv+QVat4z{Emc#`sUx9{VnRh``c;~)qexB z^LJ@+q>6F!!+#I2&BYYNkdUe&m&38(wN3%M!A`Vgfo4!iCX{aAf!9gA$F4k7=&CB++y?;7+?X5Nd=$Z%w!g6Kl{BoKhudJ)6BuBv=S zBlNk5L+sT;oM#4LWaUq&KF51!>^}@nJA~6R?$9Lo7<1Veyoe2mM3z%lPx?mlt7u&YQ zOams&G)jrGS*IB1t1BkveX8}kOQ24JnfquKC)n>s9pJnct7~tM^A(&#FB>5?kpN94 zKug}TkIY}Huo?I{haLFk11#p|-S^UBi))6#ob5LUvwEeW@ejFQp}Z9%qTqL}s)?6( z5AESY&dy5+-JlM_`iNAS2O_ zZY27H(StG2svG_WIZlNs(J`K)rQ7FSM8{ZOznwIJx_02Or5<}@!sGPs)QRBXn>yY) zt(#}B(aY8B7B$u+ZnCHj=BmR`(|~eqoN*L{%_1@{9#DIH=vY?RVtp&T z2Up=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T{ZAlF~|O`7Y-iSL8U zqU7(T^ougnR~wSn9anL@wV)-wJTGI%*gpEka43D|^MmjYw7w5M2><5l12z7s_8cw# z&B24pb1M#Q_d)1;*zvIEPxZ-*txq1}d}Ye6z0WAmggNyu7AIkLJN;7W%6wDc?CdO@ zo}PxyW)mmiiD2iPphQjM`UaR{Z8zP9R@V+~w+Z_%k5~K9E6iEO+TN&WN??1QnrC}@gPA?d`wm^(XR_#Usd`yAN$uauhr0I8Lr&6Nk;nNJ!{9D z<7f&GGLAWDiul0e>OqZD>`v)y;n@cdB+qSDWvm`P-ZvvGn{U=^wT}Jn_*K@(Z&LZO z?e$q(PHP{}hegS1(MA?i4Hid@yDiGALu>w8{k%4P^?t;^SfBmDa>?=<#gY z^5bWxuCLRW6Ymsn3y-1Izj26`r0A;hd?*~+?t{{ICGc~q^<#IedQ}(xmd5);pF5b9335Xlhc9)3l==A$WNxGaG8m`WaE%;4B%m( zcbiYz_K4%qxm>W|jfVUfxQ==4GQhu@&q{s3$MnOVzXydw=jB1=xitQAwD4RN-Yj`u z@W#Yt$3C*HW9~ZOW6AxxN?&U^e3)`GhEi_Ea(QT&tsNiq<>4A**MXL?+QPHouoycg jmi}1qX2x(X4&na?$Swrb?cVSK00000NkvXXu0mjfJVg$K literal 0 HcmV?d00001 diff --git a/packages/documentation/src/stories/utilities/position/position.docs.mdx b/packages/documentation/src/stories/utilities/position/position.docs.mdx new file mode 100644 index 0000000000..df7cfc1bd6 --- /dev/null +++ b/packages/documentation/src/stories/utilities/position/position.docs.mdx @@ -0,0 +1,47 @@ +import { Canvas, Controls, Meta, Source } from '@storybook/blocks'; +import * as PositionStories from './position.stories'; + + + +# Position + +
+ Define the positioning method of an element, as well as its position relative to top, bottom, + start and end easily with utility classes. +
+
+
Note that these utility classes are not responsive.
+ + +
+ +
+ +## Properties + +### Positioning method of elements + +Here are the different positioning methods available for elements. + +- `position-static` (default) positions the element according to the flow of the page. +- `position-relative` positions the element according to the flow of the page, but you can offset it relatively to itself by settings values for `top`, `bottom`, `start` and `end`. +- `position-absolute` removes the element from the flow of the page and positions it relatively to its closest positioned element. +- `position-fixed` removes the element from the flow of the page and positions it relatively to the viewport. +- `position-sticky` positions the element according to the flow of the page but "sticks" it in place in the case of a scrolling container. + +### Arrangement of elements + +Some utility classes are here to define the position from the edges of the container more easily. + +- `top-{0|50|100}` to set the position of the element from the top of the container by 0, 50% or 100%. +- `bottom-{0|50|100}` to set the position of the element from the bottom of the container by 0, 50% or 100%. +- `start-{0|50|100}` to set the position of the element from the start of the container (left in LTR) by 0, 50% or 100%. +- `end-{0|50|100}` to set the position of the element from the end of the container (right in LTR) by 0, 50% or 100%. + +### Translate-middle + +The class `.translate-middle` is there to center an element horizontally and vertically on their x and y position. You can also use `.translate-middle-x` to only center the element horizontally and `.translate-middle-y` to center it vertically. + + + +On the example above, the black dot is the center of the container. Both squares are positioned 50% from the top and 50% from the start. The blue square has the `translate-middle` class and the yellow one doesn't. diff --git a/packages/documentation/src/stories/utilities/position/position.snapshot.stories.ts b/packages/documentation/src/stories/utilities/position/position.snapshot.stories.ts new file mode 100644 index 0000000000..9b4d17e3d2 --- /dev/null +++ b/packages/documentation/src/stories/utilities/position/position.snapshot.stories.ts @@ -0,0 +1,82 @@ +import type { StoryObj } from '@storybook/web-components'; +import { html } from 'lit'; +import meta from './position.stories'; +import { bombArgs } from '@/utils'; +import './position.styles.scss'; +import { schemes } from '@/shared/snapshots/schemes'; + +const { id, ...metaWithoutId } = meta; + +export default { + ...metaWithoutId, + title: 'Snapshots', +}; + +type Story = StoryObj; + +export const Position: Story = { + render: () => { + return schemes( + () => html` +
+

Position

+

Position methods

+
+ ${(meta.argTypes?.position?.options ?? []).map((position: string) => { + return html` +

Position ${position}

+
+
+
+
I'm ${position}
+
+
+
+
+
+ `; + })} +

Position arrangement with position absolute

+ ${bombArgs({ + x: ['start-0', 'start-50', 'start-100', 'end-0', 'end-50', 'end-100'], + y: ['top-0', 'top-50', 'top-100', 'bottom-0', 'bottom-50', 'bottom-100'], + }).map(args => { + const xArgName = (args.x as string).split('-')[0]; + const xArgValue = (args.x as string).split('-')[1]; + const yArgName = (args.y as string).split('-')[0]; + const yArgValue = (args.y as string).split('-')[1]; + return html` +

${xArgName}: ${xArgValue}% / ${yArgName}: ${yArgValue}%

+
+
+
+ `; + })} +

Translate middle with position absolute

+

Start: 50% / Top: 50%

+ ${bombArgs({ + translateMiddle: ['', 'both', 'x', 'y'], + }).map(args => { + let translateMiddleValue = ''; + if (args.translateMiddle === 'both') { + translateMiddleValue = ' translate-middle'; + } else if (args.translateMiddle === 'x') { + translateMiddleValue = ' translate-middle-x'; + } else if (args.translateMiddle === 'y') { + translateMiddleValue = ' translate-middle-y'; + } + return html` +

+ Translate middle: ${args.translateMiddle ? args.translateMiddle : 'none'} +

+
+
+
+ `; + })} +
+
+ `, + ); + }, +}; diff --git a/packages/documentation/src/stories/utilities/position/position.stories.ts b/packages/documentation/src/stories/utilities/position/position.stories.ts new file mode 100644 index 0000000000..7c4532915a --- /dev/null +++ b/packages/documentation/src/stories/utilities/position/position.stories.ts @@ -0,0 +1,156 @@ +import type { Args, StoryObj } from '@storybook/web-components'; +import { html } from 'lit/static-html.js'; +import { MetaExtended } from '@root/types'; +import './position.styles.scss'; +import { bombArgs } from '@/utils'; + +const meta: MetaExtended = { + id: '803a58e8-c734-4ad7-80a8-62da1bb29d4b', + title: 'Utilities/Position', + args: { + position: 'absolute', + start: '50', + top: '0', + translateMiddle: 'both', + }, + argTypes: { + position: { + name: 'Position', + description: 'Sets the position. ', + control: { + type: 'select', + }, + options: ['relative', 'static', 'absolute', 'fixed', 'sticky'], + table: { + category: 'General', + }, + }, + top: { + name: 'Top', + description: 'Sets the distance from top. ', + control: { + type: 'select', + }, + options: ['', '0', '50', '100'], + table: { + category: 'General', + }, + if: { + arg: 'bottom', + truthy: false, + }, + }, + bottom: { + name: 'Bottom', + description: 'Sets the distance from bottom. ', + control: { + type: 'select', + }, + options: ['', '0', '50', '100'], + table: { + category: 'General', + }, + if: { + arg: 'top', + truthy: false, + }, + }, + start: { + name: 'Start', + description: 'Sets the distance from start (left in LTR). ', + control: { + type: 'select', + }, + options: ['', '0', '50', '100'], + table: { + category: 'General', + }, + if: { + arg: 'end', + truthy: false, + }, + }, + end: { + name: 'End', + description: 'Sets the distance from end (right in LTR). ', + control: { + type: 'select', + }, + options: ['', '0', '50', '100'], + table: { + category: 'General', + }, + if: { + arg: 'start', + truthy: false, + }, + }, + translateMiddle: { + name: 'Translate middle', + description: 'Set to true to center align an element based on its x and y position.', + control: { + type: 'select', + }, + options: ['', 'both', 'x', 'y'], + table: { + category: 'General', + }, + }, + }, + render: (args: Args) => { + let translateMiddleValue = ''; + if (args.translateMiddle === 'both') { + translateMiddleValue = ' translate-middle'; + } else if (args.translateMiddle === 'x') { + translateMiddleValue = ' translate-middle-x'; + } else if (args.translateMiddle === 'y') { + translateMiddleValue = ' translate-middle-y'; + } + return html` +
+ `; + }, +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + decorators: [ + (story, context) => + html` +
+ ${context.args.position === 'fixed' + ? html`` + : ''} +
+ ${story()} + ${bombArgs({ + start: ['0', '50', '100'], + top: ['0', '50', '100'], + }).map( + args => html`
`, + )} +
+
+ `, + ], +}; + +export const TranslateMiddle: Story = { + decorators: [ + story => + html`
${story()}
`, + ], + render: () => { + return html`
+
`; + }, +}; diff --git a/packages/documentation/src/stories/utilities/position/position.styles.scss b/packages/documentation/src/stories/utilities/position/position.styles.scss new file mode 100644 index 0000000000..3f4769a3e7 --- /dev/null +++ b/packages/documentation/src/stories/utilities/position/position.styles.scss @@ -0,0 +1,135 @@ +@use '@swisspost/design-system-styles/core' as post; + +@mixin square { + width: 2rem; + height: 2rem; + opacity: 0.8; + border-radius: post.$border-radius; +} + +@mixin centered-dot { + &::after { + content: ''; + background-color: post.$dark; + width: 0.5rem; + height: 0.5rem; + border-radius: 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } +} + +// Docs styling +.translate-middle-container { + height: 20rem; + flex: 0 0 50%; + @include centered-dot(); + + > * { + @include square; + } +} + +.position-outer-container { + margin: 2rem; + + img { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } + + .position-container { + height: 12rem; + background-color: post.$gray; + + .pos-element { + width: 0.5rem; + height: 0.5rem; + border-radius: 100%; + position: absolute; + transform: translate(-50%, -50%); + background-color: post.$dark; + } + + .bg-yellow { + width: 2rem; + height: 2rem; + border-radius: post.$border-radius; + } + } + + &-sticky { + overflow-y: scroll; + overflow-x: hidden; + height: 12rem; + + .position-container { + height: 40rem; + } + + .pos-element { + display: none; + } + } + + &-fixed { + .position-container { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); + overflow: hidden; + } + + .pos-element { + display: none; + } + + .position-fixed { + position: absolute !important; + } + } +} + +// Snapshots styling +.snapshot-outer-container { + position: relative; + max-height: 8rem; + overflow-y: scroll; +} + +.snapshot-container { + height: 16rem; + margin: 2rem; + + .bg-dark { + width: 2rem; + height: 2rem; + border-radius: post.$border-radius; + } + + .bg-yellow { + padding: 1rem; + display: inline-block; + border-radius: post.$border-radius; + } +} + +.snapshot-arrange-container, +.snapshot-translate-middle-container { + height: 5rem; + border-radius: post.$border-radius; + position: relative; + background-color: post.$gray; + margin: 2rem; + + > * { + @include square; + position: absolute; + } +} + +.snapshot-translate-middle-container { + @include centered-dot(); +} diff --git a/packages/styles/src/themes/bootstrap/_utilities.scss b/packages/styles/src/themes/bootstrap/_utilities.scss index faed868339..0696634c6c 100644 --- a/packages/styles/src/themes/bootstrap/_utilities.scss +++ b/packages/styles/src/themes/bootstrap/_utilities.scss @@ -45,6 +45,13 @@ $utilities: map.remove($utilities, 'float'); $utilities: map.remove($utilities, 'opacity'); +$utilities: map.remove($utilities, 'position'); +$utilities: map.remove($utilities, 'top'); +$utilities: map.remove($utilities, 'bottom'); +$utilities: map.remove($utilities, 'start'); +$utilities: map.remove($utilities, 'end'); +$utilities: map.remove($utilities, 'translate-middle'); + $utilities: map.remove($utilities, 'overflow'); $utilities: map.remove($utilities, 'overflow-x'); $utilities: map.remove($utilities, 'overflow-y'); diff --git a/packages/styles/src/utilities/_variables.scss b/packages/styles/src/utilities/_variables.scss index e1df53d7fa..d09cf091b1 100644 --- a/packages/styles/src/utilities/_variables.scss +++ b/packages/styles/src/utilities/_variables.scss @@ -21,6 +21,12 @@ Our API is based on bootstrap utility API, more information is available here: https://getbootstrap.com/docs/5.3/utilities/api/ */ +$position-values: ( + 0: 0, + 50: 50%, + 100: 100%, +); + $utilities: ( 'align': ( property: vertical-align, @@ -254,6 +260,37 @@ $utilities: ( values: inline inline-block block grid inline-grid table table-row table-cell flex inline-flex none, ), + 'position': ( + property: position, + values: static relative absolute fixed sticky, + ), + 'top': ( + property: top, + values: $position-values, + ), + 'bottom': ( + property: bottom, + values: $position-values, + ), + 'start': ( + property: left, + class: start, + values: $position-values, + ), + 'end': ( + property: right, + class: end, + values: $position-values, + ), + 'translate-middle': ( + property: transform, + class: translate-middle, + values: ( + null: translate(-50%, -50%), + x: translateX(-50%), + y: translateY(-50%), + ), + ), 'overflow': ( property: overflow, values: auto hidden visible scroll, From 5cef591c5b4a7895db8455ddc6ab892aa6a7813a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliz=C3=A9=20Debray?= <33580481+alizedebray@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:45:43 +0100 Subject: [PATCH 03/21] fix(components): update generated files (#4180) --- packages/components/src/components/post-icon/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/components/post-icon/readme.md b/packages/components/src/components/post-icon/readme.md index b59e3eab25..8b1c4de7d4 100644 --- a/packages/components/src/components/post-icon/readme.md +++ b/packages/components/src/components/post-icon/readme.md @@ -22,8 +22,8 @@ some content ### Used by - - [post-back-to-top](../post-back-to-top) - [post-accordion-item](../post-accordion-item) + - [post-back-to-top](../post-back-to-top) - [post-banner](../post-banner) - [post-breadcrumb-item](../post-breadcrumb-item) - [post-card-control](../post-card-control) @@ -34,8 +34,8 @@ some content ### Graph ```mermaid graph TD; - post-back-to-top --> post-icon post-accordion-item --> post-icon + post-back-to-top --> post-icon post-banner --> post-icon post-breadcrumb-item --> post-icon post-card-control --> post-icon From 82de51424b36c06f3a4c352ea083e3492c39bf75 Mon Sep 17 00:00:00 2001 From: Swiss Post Bot <103635272+swisspost-bot@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:50:17 +0100 Subject: [PATCH 04/21] =?UTF-8?q?chore(changesets):=20=F0=9F=A6=8B?= =?UTF-8?q?=F0=9F=93=A6=20publish=20packages=20(main)=20(next)=20(#4138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases ## @swisspost/design-system-styles@9.0.0-next.8 ### Major Changes - Removed size variants for textarea form control. The sizing classes `.form-control-sm`, `.form-control-rg` and `.form-control-lg` for textarea no longer have any effect and can be removed safely. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) ### Minor Changes - Internalized bootstrap position utilities into the design system. (by [@leagrdv](https://github.com/leagrdv) with [#3988](https://github.com/swisspost/design-system/pull/3988)) - Implemented simple check list component. (by [@myrta2302](https://github.com/myrta2302) with [#4171](https://github.com/swisspost/design-system/pull/4171)) - Created the `search-input` component. (by [@alionazherdetska](https://github.com/alionazherdetska) with [#4099](https://github.com/swisspost/design-system/pull/4099)) - Added list mixins `list-bullet`, `list-revert` and `list-unstyled`. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Updated `.form-control` textarea to new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) ### Patch Changes - Fixed ´switch´ alignment for long labels. (by [@schaertim](https://github.com/schaertim) with [#4140](https://github.com/swisspost/design-system/pull/4140)) - Updated the ´post-accordion´ styles to match the new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Reverted `ol` lists to use standard display (not grid). (by [@leagrdv](https://github.com/leagrdv) with [#4110](https://github.com/swisspost/design-system/pull/4110)) - Updated fieldset-legend styles with Design Tokens. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) ## @swisspost/design-system-components@9.0.0-next.8 ### Minor Changes - Ιmplemented the back-to-top button component. (by [@myrta2302](https://github.com/myrta2302) with [#3991](https://github.com/swisspost/design-system/pull/3991)) - Added the capability to use a slotted img as a logo inside ´accordion-items´. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) ### Patch Changes - Updated dependencies: - @swisspost/design-system-icons@9.0.0-next.8 - @swisspost/design-system-styles@9.0.0-next.8 ## @swisspost/design-system-icons@9.0.0-next.8 ### Minor Changes - Added icon number 2633. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) ### Patch Changes - Removed `fill` and `stroke` attributes on the icons output files. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) ## @swisspost/design-system-components-angular@9.0.0-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-components@9.0.0-next.8 ## @swisspost/design-system-components-react@9.0.0-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-components@9.0.0-next.8 ## @swisspost/design-system-intranet-header@9.0.0-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 ## @swisspost/design-system-styles-primeng@9.0.0-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 ## @swisspost/design-system-migrations@9.0.0-next.8 ## @swisspost/design-system-tokens@9.0.0-next.8 ## @swisspost/design-system-documentation@6.0.0-next.9 ### Major Changes - Removed size variants for textarea form control. The sizing classes `.form-control-sm`, `.form-control-rg` and `.form-control-lg` for textarea no longer have any effect and can be removed safely. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) ### Minor Changes - Internalized bootstrap position utilities into the design system. (by [@leagrdv](https://github.com/leagrdv) with [#3988](https://github.com/swisspost/design-system/pull/3988)) - Implemented simple check list component. (by [@myrta2302](https://github.com/myrta2302) with [#4171](https://github.com/swisspost/design-system/pull/4171)) - Ιmplemented the back-to-top button component. (by [@myrta2302](https://github.com/myrta2302) with [#3991](https://github.com/swisspost/design-system/pull/3991)) - Created the `search-input` component. (by [@alionazherdetska](https://github.com/alionazherdetska) with [#4099](https://github.com/swisspost/design-system/pull/4099)) - Updated documentation to display the currently selected theme and channel SCSS file. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Added a ´post-accordion´ example showing logo usage. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Added list mixins `list-bullet`, `list-revert` and `list-unstyled`. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Updated `.form-control` textarea to new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) - Added tokens package icon to the home page (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) ### Patch Changes - Reverted `ol` lists to use standard display (not grid). (by [@leagrdv](https://github.com/leagrdv) with [#4110](https://github.com/swisspost/design-system/pull/4110)) - Added ´btn-link´ class to remove inline padding. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Added classes to fix banner sizing in controls. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) - Updated dependencies: - @swisspost/design-system-icons@9.0.0-next.8 - @swisspost/design-system-styles@9.0.0-next.8 - @swisspost/design-system-components@9.0.0-next.8 - @swisspost/internet-header@2.0.0-next.8 - @swisspost/design-system-components-react@9.0.0-next.8 - @swisspost/design-system-tokens@9.0.0-next.8 ## @swisspost/design-system-components-angular-workspace@1.1.10-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 - @swisspost/design-system-components@9.0.0-next.8 ## @swisspost/internet-header@2.0.0-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 ## @swisspost/design-system-intranet-header-workspace@3.0.22-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 ## @swisspost/design-system-intranet-header-showcase@1.0.10-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-intranet-header@9.0.0-next.8 ## @swisspost/design-system-nextjs-integration@0.1.14-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 - @swisspost/internet-header@2.0.0-next.8 - @swisspost/design-system-components-react@9.0.0-next.8 ## @swisspost/design-system-styles-primeng-workspace@1.0.6-next.8 ### Patch Changes - Updated dependencies: - @swisspost/design-system-styles@9.0.0-next.8 --------- Co-authored-by: github-actions[bot] --- .changeset/pre.json | 19 ++++++ packages/components-angular/CHANGELOG.md | 8 +++ packages/components-angular/package.json | 6 +- .../projects/components/CHANGELOG.md | 7 +++ .../projects/components/package.json | 4 +- packages/components-react/CHANGELOG.md | 7 +++ packages/components-react/package.json | 4 +- packages/components/CHANGELOG.md | 14 +++++ packages/components/package.json | 6 +- packages/documentation/CHANGELOG.md | 41 ++++++++++++ packages/documentation/package.json | 18 +++--- packages/documentation/public/_redirects | 1 + .../documentation/public/assets/versions.json | 62 ++++++++++++++----- packages/icons/CHANGELOG.md | 10 +++ packages/icons/package.json | 2 +- packages/internet-header/CHANGELOG.md | 7 +++ packages/internet-header/package.json | 4 +- .../intranet-header-workspace/CHANGELOG.md | 7 +++ .../intranet-header-workspace/package.json | 4 +- .../intranet-header-showcase/CHANGELOG.md | 7 +++ .../intranet-header-showcase/package.json | 4 +- .../projects/intranet-header/CHANGELOG.md | 7 +++ .../projects/intranet-header/package.json | 6 +- packages/migrations/CHANGELOG.md | 2 + packages/migrations/package.json | 2 +- packages/nextjs-integration/CHANGELOG.md | 9 +++ packages/nextjs-integration/package.json | 8 +-- .../styles-primeng-workspace/CHANGELOG.md | 7 +++ .../styles-primeng-workspace/package.json | 4 +- .../projects/styles-primeng/CHANGELOG.md | 7 +++ .../projects/styles-primeng/package.json | 4 +- packages/styles/CHANGELOG.md | 28 +++++++++ packages/styles/package.json | 6 +- packages/tokens/CHANGELOG.md | 2 + packages/tokens/package.json | 2 +- pnpm-lock.yaml | 52 ++++++++-------- 36 files changed, 303 insertions(+), 85 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 80d49ff168..dd59e1d095 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -25,6 +25,7 @@ "2024-10-17-update-icons", "2024-10-27-update-icons", "2024-11-10-update-icons", + "2024-11-17-update-icons", "beige-jobs-do", "big-frogs-admire", "big-hats-clap", @@ -34,9 +35,11 @@ "breezy-cups-add", "brown-badgers-dream", "chatty-kiwis-travel", + "chatty-spoons-unite", "chilled-owls-walk", "clean-icons-complain", "clean-windows-think", + "clever-cheetahs-draw", "cold-baboons-appear", "cold-panthers-vanish", "cuddly-bears-check", @@ -44,6 +47,7 @@ "dirty-mayflies-taste", "dirty-squids-hunt", "dry-moons-walk", + "dull-falcons-hope", "eight-turkeys-matter", "eleven-keys-work", "empty-islands-kneel", @@ -53,18 +57,25 @@ "fifty-dodos-wait", "fifty-students-call", "five-hornets-sin", + "flat-bears-tap", "friendly-insects-breathe", "funny-shrimps-care", "giant-games-swim", "gold-chairs-grin", "gold-chefs-rule", + "gold-dryers-drop", "gorgeous-flowers-flow", "great-humans-talk", + "grumpy-lobsters-agree", "grumpy-parrots-wonder", "heavy-rats-explode", + "hip-gifts-give", + "honest-numbers-end", + "itchy-meals-drum", "khaki-cougars-itch", "kind-buses-trade", "kind-papayas-provide", + "large-hornets-complain", "lazy-gorillas-admire", "lemon-clocks-clean", "long-shrimps-roll", @@ -78,8 +89,10 @@ "neat-suits-provide", "nervous-rocks-shop", "new-goats-impress", + "new-pianos-mix", "nice-ligers-attend", "ninety-nails-float", + "orange-maps-tan", "pink-weeks-relate", "plenty-apricots-raise", "plenty-taxis-hear", @@ -89,6 +102,7 @@ "proud-cheetahs-act", "proud-moons-impress", "purple-impalas-own", + "purple-terms-march", "quick-buses-give", "quick-eagles-watch", "quick-mails-joke", @@ -98,6 +112,7 @@ "red-lies-lick", "red-moose-do", "rich-timers-listen", + "rotten-bats-look", "selfish-bats-run", "selfish-ways-know", "shaggy-experts-give", @@ -118,12 +133,16 @@ "strange-mice-bake", "stupid-walls-tie", "tame-terms-push", + "thirty-cats-juggle", "three-lies-do", "tidy-dolls-walk", "tidy-keys-push", + "tidy-paws-type", "tiny-socks-count", + "tricky-crews-agree", "twenty-items-drum", "warm-drinks-prove", + "weak-falcons-study", "weak-jars-rhyme", "wild-bugs-work", "wise-spies-shave", diff --git a/packages/components-angular/CHANGELOG.md b/packages/components-angular/CHANGELOG.md index 38224f9245..dac8ffd293 100644 --- a/packages/components-angular/CHANGELOG.md +++ b/packages/components-angular/CHANGELOG.md @@ -1,5 +1,13 @@ # @swisspost/design-system-components-angular-workspace +## 1.1.10-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + - @swisspost/design-system-components@9.0.0-next.8 + ## 1.1.10-next.7 ### Patch Changes diff --git a/packages/components-angular/package.json b/packages/components-angular/package.json index a8d4ab4901..77476b8813 100644 --- a/packages/components-angular/package.json +++ b/packages/components-angular/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-components-angular-workspace", - "version": "1.1.10-next.7", + "version": "1.1.10-next.8", "scripts": { "start": "ng serve --port 9210", "build": "ng build components", @@ -18,8 +18,8 @@ "@angular/platform-browser": "18.2.13", "@angular/platform-browser-dynamic": "18.2.13", "@angular/router": "18.2.13", - "@swisspost/design-system-components": "workspace:9.0.0-next.7", - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", + "@swisspost/design-system-components": "workspace:9.0.0-next.8", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "rxjs": "7.8.1", "tslib": "2.6.3", "zone.js": "0.14.8" diff --git a/packages/components-angular/projects/components/CHANGELOG.md b/packages/components-angular/projects/components/CHANGELOG.md index c7d9d5bc3e..9711a4ec09 100644 --- a/packages/components-angular/projects/components/CHANGELOG.md +++ b/packages/components-angular/projects/components/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-components-angular +## 9.0.0-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-components@9.0.0-next.8 + ## 9.0.0-next.7 ### Patch Changes diff --git a/packages/components-angular/projects/components/package.json b/packages/components-angular/projects/components/package.json index 744df7dfb4..845bdc6452 100644 --- a/packages/components-angular/projects/components/package.json +++ b/packages/components-angular/projects/components/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-components-angular", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Swiss Post Design System - Angular Wrapper Components", "author": "Swiss Post ", "license": "Apache-2.0", @@ -19,7 +19,7 @@ }, "dependencies": { "tslib": "2.6.3", - "@swisspost/design-system-components": "workspace:9.0.0-next.7" + "@swisspost/design-system-components": "workspace:9.0.0-next.8" }, "peerDependencies": { "@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0", diff --git a/packages/components-react/CHANGELOG.md b/packages/components-react/CHANGELOG.md index 6c731ee1cf..8c9419a1cd 100644 --- a/packages/components-react/CHANGELOG.md +++ b/packages/components-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-components-react +## 9.0.0-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-components@9.0.0-next.8 + ## 9.0.0-next.7 ### Patch Changes diff --git a/packages/components-react/package.json b/packages/components-react/package.json index 8d78c35624..6db0c2c351 100644 --- a/packages/components-react/package.json +++ b/packages/components-react/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-components-react", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Design System React Components for easy integration with the React ecosystem", "author": "Swiss Post ", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "lint": "eslint src/**/*.ts" }, "dependencies": { - "@swisspost/design-system-components": "workspace:9.0.0-next.7" + "@swisspost/design-system-components": "workspace:9.0.0-next.8" }, "devDependencies": { "@types/node": "20.14.14", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index b75c025c64..22e837531b 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,5 +1,19 @@ # @swisspost/design-system-components +## 9.0.0-next.8 + +### Minor Changes + +- Ιmplemented the back-to-top button component. (by [@myrta2302](https://github.com/myrta2302) with [#3991](https://github.com/swisspost/design-system/pull/3991)) + +- Added the capability to use a slotted img as a logo inside ´accordion-items´. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-icons@9.0.0-next.8 + - @swisspost/design-system-styles@9.0.0-next.8 + ## 9.0.0-next.7 ### Minor Changes diff --git a/packages/components/package.json b/packages/components/package.json index f8846c8438..db4866c06a 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-components", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "A collection of web components built with Stencil JS for the Swiss Post Design System.", "license": "Apache-2.0", "main": "dist/index.cjs.js", @@ -40,8 +40,8 @@ "dependencies": { "@floating-ui/dom": "1.6.8", "@oddbird/popover-polyfill": "0.3.7", - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", - "@swisspost/design-system-icons": "workspace:9.0.0-next.7", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", + "@swisspost/design-system-icons": "workspace:9.0.0-next.8", "ally.js": "1.4.1", "long-press-event": "2.5.0" }, diff --git a/packages/documentation/CHANGELOG.md b/packages/documentation/CHANGELOG.md index 8989dd9398..b7c127a363 100644 --- a/packages/documentation/CHANGELOG.md +++ b/packages/documentation/CHANGELOG.md @@ -1,5 +1,46 @@ # @swisspost/design-system-documentation +## 6.0.0-next.9 + +### Major Changes + +- Removed size variants for textarea form control. The sizing classes `.form-control-sm`, `.form-control-rg` and `.form-control-lg` for textarea no longer have any effect and can be removed safely. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) + +### Minor Changes + +- Internalized bootstrap position utilities into the design system. (by [@leagrdv](https://github.com/leagrdv) with [#3988](https://github.com/swisspost/design-system/pull/3988)) + +- Implemented simple check list component. (by [@myrta2302](https://github.com/myrta2302) with [#4171](https://github.com/swisspost/design-system/pull/4171)) + +- Ιmplemented the back-to-top button component. (by [@myrta2302](https://github.com/myrta2302) with [#3991](https://github.com/swisspost/design-system/pull/3991)) + +- Created the `search-input` component. (by [@alionazherdetska](https://github.com/alionazherdetska) with [#4099](https://github.com/swisspost/design-system/pull/4099)) + +- Updated documentation to display the currently selected theme and channel SCSS file. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +- Added a ´post-accordion´ example showing logo usage. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +- Added list mixins `list-bullet`, `list-revert` and `list-unstyled`. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +- Updated `.form-control` textarea to new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) + +- Added tokens package icon to the home page (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +### Patch Changes + +- Reverted `ol` lists to use standard display (not grid). (by [@leagrdv](https://github.com/leagrdv) with [#4110](https://github.com/swisspost/design-system/pull/4110)) + +- Added ´btn-link´ class to remove inline padding. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +- Added classes to fix banner sizing in controls. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) +- Updated dependencies: + - @swisspost/design-system-icons@9.0.0-next.8 + - @swisspost/design-system-styles@9.0.0-next.8 + - @swisspost/design-system-components@9.0.0-next.8 + - @swisspost/internet-header@2.0.0-next.8 + - @swisspost/design-system-components-react@9.0.0-next.8 + - @swisspost/design-system-tokens@9.0.0-next.8 + ## 6.0.0-next.8 ### Major Changes diff --git a/packages/documentation/package.json b/packages/documentation/package.json index 5cf18b11dd..6c16faee3d 100644 --- a/packages/documentation/package.json +++ b/packages/documentation/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-documentation", - "version": "6.0.0-next.8", + "version": "6.0.0-next.9", "description": "Swiss Post Design System Documentation.", "author": "Swiss Post ", "license": "Apache-2.0", @@ -28,12 +28,12 @@ "lint": "eslint **/*.{ts,tsx,mdx}" }, "dependencies": { - "@swisspost/design-system-components": "workspace:9.0.0-next.7", - "@swisspost/design-system-components-react": "workspace:9.0.0-next.7", - "@swisspost/design-system-icons": "workspace:9.0.0-next.7", - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", - "@swisspost/design-system-tokens": "workspace:9.0.0-next.7", - "@swisspost/internet-header": "workspace:2.0.0-next.7", + "@swisspost/design-system-components": "workspace:9.0.0-next.8", + "@swisspost/design-system-components-react": "workspace:9.0.0-next.8", + "@swisspost/design-system-icons": "workspace:9.0.0-next.8", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", + "@swisspost/design-system-tokens": "workspace:9.0.0-next.8", + "@swisspost/internet-header": "workspace:2.0.0-next.8", "bootstrap": "5.3.3" }, "devDependencies": { @@ -54,8 +54,8 @@ "@storybook/types": "8.3.6", "@storybook/web-components": "8.3.6", "@storybook/web-components-vite": "8.3.6", - "@swisspost/design-system-components-angular": "workspace:9.0.0-next.7", - "@swisspost/design-system-intranet-header": "workspace:9.0.0-next.7", + "@swisspost/design-system-components-angular": "workspace:9.0.0-next.8", + "@swisspost/design-system-intranet-header": "workspace:9.0.0-next.8", "@types/css-modules": "1.0.5", "@types/mdx": "2.0.13", "@types/react": "18.3.3", diff --git a/packages/documentation/public/_redirects b/packages/documentation/public/_redirects index 79a6c132ab..9537b51f5f 100644 --- a/packages/documentation/public/_redirects +++ b/packages/documentation/public/_redirects @@ -10,3 +10,4 @@ + diff --git a/packages/documentation/public/assets/versions.json b/packages/documentation/public/assets/versions.json index c24ab117ec..3aff9f35d1 100644 --- a/packages/documentation/public/assets/versions.json +++ b/packages/documentation/public/assets/versions.json @@ -1,7 +1,7 @@ [ { "title": "Version 9", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Pattern documentation, code snippets and implementation guidelines for the Design System Styles.", "url": "https://design-system.post.ch", "dependencies": { @@ -9,22 +9,50 @@ "@ng-bootstrap/ng-bootstrap": "^17.0.0", "bootstrap": "~5.3.0", "@swisspost/design-system-changelog-github": "1.0.2", - "@swisspost/design-system-components": "9.0.0-next.7", - "@swisspost/design-system-components-angular-workspace": "1.1.10-next.7", - "@swisspost/design-system-components-angular": "9.0.0-next.7", - "@swisspost/design-system-components-react": "9.0.0-next.7", - "@swisspost/design-system-documentation": "6.0.0-next.8", - "@swisspost/design-system-icons": "9.0.0-next.7", - "@swisspost/internet-header": "2.0.0-next.7", - "@swisspost/design-system-intranet-header-workspace": "3.0.22-next.7", - "@swisspost/design-system-intranet-header": "9.0.0-next.7", - "@swisspost/design-system-intranet-header-showcase": "1.0.10-next.7", - "@swisspost/design-system-migrations": "9.0.0-next.7", - "@swisspost/design-system-nextjs-integration": "0.1.14-next.7", - "@swisspost/design-system-styles": "9.0.0-next.7", - "@swisspost/design-system-styles-primeng-workspace": "1.0.6-next.7", - "@swisspost/design-system-styles-primeng": "9.0.0-next.7", - "@swisspost/design-system-tokens": "9.0.0-next.7" + "@swisspost/design-system-components": "9.0.0-next.8", + "@swisspost/design-system-components-angular-workspace": "1.1.10-next.8", + "@swisspost/design-system-components-angular": "9.0.0-next.8", + "@swisspost/design-system-components-react": "9.0.0-next.8", + "@swisspost/design-system-documentation": "6.0.0-next.9", + "@swisspost/design-system-icons": "9.0.0-next.8", + "@swisspost/internet-header": "2.0.0-next.8", + "@swisspost/design-system-intranet-header-workspace": "3.0.22-next.8", + "@swisspost/design-system-intranet-header": "9.0.0-next.8", + "@swisspost/design-system-intranet-header-showcase": "1.0.10-next.8", + "@swisspost/design-system-migrations": "9.0.0-next.8", + "@swisspost/design-system-nextjs-integration": "0.1.14-next.8", + "@swisspost/design-system-styles": "9.0.0-next.8", + "@swisspost/design-system-styles-primeng-workspace": "1.0.6-next.8", + "@swisspost/design-system-styles-primeng": "9.0.0-next.8", + "@swisspost/design-system-tokens": "9.0.0-next.8" + } + }, + { + "title": "Version 9", + "version": "9.0.0-next.7", + "description": "Pattern documentation, code snippets and implementation guidelines for the Design System Styles.", + "url": "https://swisspost-design-system-version-9.netlify.app", + "dependencies": { + "@angular/core": "^18.0.0", + "@ng-bootstrap/ng-bootstrap": "^17.0.0", + "bootstrap": "~5.3.0", + "@swisspost/design-system-changelog-github": "1.0.2", + "@swisspost/design-system-components": "9.0.0-next.2", + "@swisspost/design-system-components-angular-workspace": "1.1.10-next.2", + "@swisspost/design-system-components-angular": "9.0.0-next.2", + "@swisspost/design-system-components-react": "9.0.0-next.2", + "@swisspost/design-system-documentation": "6.0.0-next.2", + "@swisspost/design-system-icons": "9.0.0-next.2", + "@swisspost/internet-header": "1.14.6-next.2", + "@swisspost/design-system-intranet-header-workspace": "3.0.22-next.2", + "@swisspost/design-system-intranet-header": "9.0.0-next.2", + "@swisspost/design-system-intranet-header-showcase": "1.0.10-next.2", + "@swisspost/design-system-migrations": "9.0.0-next.2", + "@swisspost/design-system-nextjs-integration": "0.1.14-next.2", + "@swisspost/design-system-styles": "9.0.0-next.2", + "@swisspost/design-system-styles-primeng-workspace": "1.0.6-next.2", + "@swisspost/design-system-styles-primeng": "9.0.0-next.2", + "@swisspost/design-system-tokens": "9.0.0-next.2" } }, { diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index 2a4fbe2c35..a7bace80e0 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -1,5 +1,15 @@ # @swisspost/design-system-icons +## 9.0.0-next.8 + +### Minor Changes + +- Added icon number 2633. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +### Patch Changes + +- Removed `fill` and `stroke` attributes on the icons output files. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + ## 9.0.0-next.7 ### Minor Changes diff --git a/packages/icons/package.json b/packages/icons/package.json index 10f7a95fea..b03a924ce3 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-icons", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "A collection of Swiss Post icons intended for use with the Design System.", "author": "Swiss Post ", "license": "Apache-2.0", diff --git a/packages/internet-header/CHANGELOG.md b/packages/internet-header/CHANGELOG.md index dcccb3d5d6..2db462b044 100644 --- a/packages/internet-header/CHANGELOG.md +++ b/packages/internet-header/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/internet-header +## 2.0.0-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + ## 2.0.0-next.7 ### Patch Changes diff --git a/packages/internet-header/package.json b/packages/internet-header/package.json index 74c981a876..76ecec1354 100644 --- a/packages/internet-header/package.json +++ b/packages/internet-header/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/internet-header", - "version": "2.0.0-next.7", + "version": "2.0.0-next.8", "description": "The header for client facing applications.", "author": "Swiss Post ", "license": "Apache-2.0", @@ -43,7 +43,7 @@ "generate": "stencil generate" }, "dependencies": { - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "body-scroll-lock": "4.0.0-beta.0", "iframe-resizer": "4.4.5", "jquery": "3.7.1", diff --git a/packages/intranet-header-workspace/CHANGELOG.md b/packages/intranet-header-workspace/CHANGELOG.md index 429ea175b6..0f5df4ea7d 100644 --- a/packages/intranet-header-workspace/CHANGELOG.md +++ b/packages/intranet-header-workspace/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-intranet-header-workspace +## 3.0.22-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + ## 3.0.22-next.7 ### Patch Changes diff --git a/packages/intranet-header-workspace/package.json b/packages/intranet-header-workspace/package.json index f42dcc11e4..95956f194b 100644 --- a/packages/intranet-header-workspace/package.json +++ b/packages/intranet-header-workspace/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-intranet-header-workspace", - "version": "3.0.22-next.7", + "version": "3.0.22-next.8", "license": "Apache-2.0", "private": true, "scripts": { @@ -23,7 +23,7 @@ "@angular/router": "18.2.13", "@ng-bootstrap/ng-bootstrap": "17.0.0", "@popperjs/core": "2.11.8", - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "rxjs": "7.8.1", "tslib": "2.6.3", "watch": "1.0.2", diff --git a/packages/intranet-header-workspace/projects/intranet-header-showcase/CHANGELOG.md b/packages/intranet-header-workspace/projects/intranet-header-showcase/CHANGELOG.md index 7e83abd2c0..b21c4ce804 100644 --- a/packages/intranet-header-workspace/projects/intranet-header-showcase/CHANGELOG.md +++ b/packages/intranet-header-workspace/projects/intranet-header-showcase/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-intranet-header-showcase +## 1.0.10-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-intranet-header@9.0.0-next.8 + ## 1.0.10-next.7 ### Patch Changes diff --git a/packages/intranet-header-workspace/projects/intranet-header-showcase/package.json b/packages/intranet-header-workspace/projects/intranet-header-showcase/package.json index 3a9db6d2b7..c18ba6a52f 100644 --- a/packages/intranet-header-workspace/projects/intranet-header-showcase/package.json +++ b/packages/intranet-header-workspace/projects/intranet-header-showcase/package.json @@ -1,9 +1,9 @@ { "name": "@swisspost/design-system-intranet-header-showcase", - "version": "1.0.10-next.7", + "version": "1.0.10-next.8", "license": "Apache-2.0", "private": true, "dependencies": { - "@swisspost/design-system-intranet-header": "workspace:9.0.0-next.7" + "@swisspost/design-system-intranet-header": "workspace:9.0.0-next.8" } } diff --git a/packages/intranet-header-workspace/projects/intranet-header/CHANGELOG.md b/packages/intranet-header-workspace/projects/intranet-header/CHANGELOG.md index 10464b6274..7e2cc17e10 100644 --- a/packages/intranet-header-workspace/projects/intranet-header/CHANGELOG.md +++ b/packages/intranet-header-workspace/projects/intranet-header/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-intranet-header +## 9.0.0-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + ## 9.0.0-next.7 ### Patch Changes diff --git a/packages/intranet-header-workspace/projects/intranet-header/package.json b/packages/intranet-header-workspace/projects/intranet-header/package.json index 0cc2b40caa..cee0dd96ac 100644 --- a/packages/intranet-header-workspace/projects/intranet-header/package.json +++ b/packages/intranet-header-workspace/projects/intranet-header/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-intranet-header", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Intranet header for internal Swiss Post applications as an Angular component.", "author": "Swiss Post ", "license": "Apache-2.0", @@ -18,11 +18,11 @@ "linkDirectory": true }, "dependencies": { - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "tslib": "2.6.3" }, "devDependencies": { - "@swisspost/design-system-intranet-header-workspace": "workspace:3.0.22-next.7" + "@swisspost/design-system-intranet-header-workspace": "workspace:3.0.22-next.8" }, "peerDependencies": { "@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0", diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md index 6634e1544e..95272121a5 100644 --- a/packages/migrations/CHANGELOG.md +++ b/packages/migrations/CHANGELOG.md @@ -1,5 +1,7 @@ # @swisspost/design-system-migrations +## 9.0.0-next.8 + ## 9.0.0-next.7 ## 9.0.0-next.6 diff --git a/packages/migrations/package.json b/packages/migrations/package.json index daa2edc015..856c6ed0fa 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-migrations", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Scripts to migrate an Angular application from one Design System version to another.", "author": "Swiss Post ", "license": "Apache-2.0", diff --git a/packages/nextjs-integration/CHANGELOG.md b/packages/nextjs-integration/CHANGELOG.md index 402b387a50..26d7a15efb 100644 --- a/packages/nextjs-integration/CHANGELOG.md +++ b/packages/nextjs-integration/CHANGELOG.md @@ -1,5 +1,14 @@ # @swisspost/design-system-nextjs-integration +## 0.1.14-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + - @swisspost/internet-header@2.0.0-next.8 + - @swisspost/design-system-components-react@9.0.0-next.8 + ## 0.1.14-next.7 ### Patch Changes diff --git a/packages/nextjs-integration/package.json b/packages/nextjs-integration/package.json index 1a20a1d79b..a343f8f10b 100644 --- a/packages/nextjs-integration/package.json +++ b/packages/nextjs-integration/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-nextjs-integration", - "version": "0.1.14-next.7", + "version": "0.1.14-next.8", "private": true, "scripts": { "dev": "next dev", @@ -9,9 +9,9 @@ "lint": "next lint" }, "dependencies": { - "@swisspost/design-system-components-react": "workspace:9.0.0-next.7", - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", - "@swisspost/internet-header": "workspace:2.0.0-next.7", + "@swisspost/design-system-components-react": "workspace:9.0.0-next.8", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", + "@swisspost/internet-header": "workspace:2.0.0-next.8", "next": "15.0.1", "react": "^18", "react-dom": "^18" diff --git a/packages/styles-primeng-workspace/CHANGELOG.md b/packages/styles-primeng-workspace/CHANGELOG.md index 0041f70376..b4d766e1b4 100644 --- a/packages/styles-primeng-workspace/CHANGELOG.md +++ b/packages/styles-primeng-workspace/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-styles-primeng-workspace +## 1.0.6-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + ## 1.0.6-next.7 ### Patch Changes diff --git a/packages/styles-primeng-workspace/package.json b/packages/styles-primeng-workspace/package.json index 46757fc4e2..5a58e45f77 100644 --- a/packages/styles-primeng-workspace/package.json +++ b/packages/styles-primeng-workspace/package.json @@ -1,7 +1,7 @@ { "name": "@swisspost/design-system-styles-primeng-workspace", "description": "Showcase for a Post like custom prime-ng theme", - "version": "1.0.6-next.7", + "version": "1.0.6-next.8", "license": "Apache-2.0", "private": true, "scripts": { @@ -22,7 +22,7 @@ "@angular/platform-browser": "18.2.13", "@angular/platform-browser-dynamic": "18.2.13", "@angular/router": "18.2.13", - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "primeng": "17.18.7", "rxjs": "7.8.1", "tslib": "2.6.3", diff --git a/packages/styles-primeng-workspace/projects/styles-primeng/CHANGELOG.md b/packages/styles-primeng-workspace/projects/styles-primeng/CHANGELOG.md index 0f6b216972..e384aee8c3 100644 --- a/packages/styles-primeng-workspace/projects/styles-primeng/CHANGELOG.md +++ b/packages/styles-primeng-workspace/projects/styles-primeng/CHANGELOG.md @@ -1,5 +1,12 @@ # @swisspost/design-system-styles-primeng +## 9.0.0-next.8 + +### Patch Changes + +- Updated dependencies: + - @swisspost/design-system-styles@9.0.0-next.8 + ## 9.0.0-next.7 ### Patch Changes diff --git a/packages/styles-primeng-workspace/projects/styles-primeng/package.json b/packages/styles-primeng-workspace/projects/styles-primeng/package.json index 259b594a13..90f2fe1261 100644 --- a/packages/styles-primeng-workspace/projects/styles-primeng/package.json +++ b/packages/styles-primeng-workspace/projects/styles-primeng/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-styles-primeng", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Swiss Post styles for PrimeNg datatable.", "author": "Swiss Post ", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "primeng": "^17.18.0" }, "dependencies": { - "@swisspost/design-system-styles": "workspace:9.0.0-next.7", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "tslib": "2.6.3" }, "sideEffects": false, diff --git a/packages/styles/CHANGELOG.md b/packages/styles/CHANGELOG.md index 999141bf9d..3edf73590f 100644 --- a/packages/styles/CHANGELOG.md +++ b/packages/styles/CHANGELOG.md @@ -1,5 +1,33 @@ # @swisspost/design-system-styles +## 9.0.0-next.8 + +### Major Changes + +- Removed size variants for textarea form control. The sizing classes `.form-control-sm`, `.form-control-rg` and `.form-control-lg` for textarea no longer have any effect and can be removed safely. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) + +### Minor Changes + +- Internalized bootstrap position utilities into the design system. (by [@leagrdv](https://github.com/leagrdv) with [#3988](https://github.com/swisspost/design-system/pull/3988)) + +- Implemented simple check list component. (by [@myrta2302](https://github.com/myrta2302) with [#4171](https://github.com/swisspost/design-system/pull/4171)) + +- Created the `search-input` component. (by [@alionazherdetska](https://github.com/alionazherdetska) with [#4099](https://github.com/swisspost/design-system/pull/4099)) + +- Added list mixins `list-bullet`, `list-revert` and `list-unstyled`. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +- Updated `.form-control` textarea to new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#4062](https://github.com/swisspost/design-system/pull/4062)) + +### Patch Changes + +- Fixed ´switch´ alignment for long labels. (by [@schaertim](https://github.com/schaertim) with [#4140](https://github.com/swisspost/design-system/pull/4140)) + +- Updated the ´post-accordion´ styles to match the new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + +- Reverted `ol` lists to use standard display (not grid). (by [@leagrdv](https://github.com/leagrdv) with [#4110](https://github.com/swisspost/design-system/pull/4110)) + +- Updated fieldset-legend styles with Design Tokens. (by [@leagrdv](https://github.com/leagrdv) with [#4166](https://github.com/swisspost/design-system/pull/4166)) + ## 9.0.0-next.7 ### Major Changes diff --git a/packages/styles/package.json b/packages/styles/package.json index 10ee2bb47e..2c1fd2a663 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-styles", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Design System Styles for the Swiss Post web platform.", "author": "Swiss Post ", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "gulp-sourcemaps": "3.0.0" }, "devDependencies": { - "@swisspost/design-system-icons": "workspace:9.0.0-next.7", - "@swisspost/design-system-tokens": "workspace:9.0.0-next.7", + "@swisspost/design-system-icons": "workspace:9.0.0-next.8", + "@swisspost/design-system-tokens": "workspace:9.0.0-next.8", "@types/node": "20.14.14", "autoprefixer": "10.4.19", "copyfiles": "2.4.1", diff --git a/packages/tokens/CHANGELOG.md b/packages/tokens/CHANGELOG.md index bf2d92a020..ee303ee4eb 100644 --- a/packages/tokens/CHANGELOG.md +++ b/packages/tokens/CHANGELOG.md @@ -1,5 +1,7 @@ # @swisspost/design-system-tokens +## 9.0.0-next.8 + ## 9.0.0-next.7 ## 9.0.0-next.6 diff --git a/packages/tokens/package.json b/packages/tokens/package.json index 363280d4ba..ed53edebf7 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -1,6 +1,6 @@ { "name": "@swisspost/design-system-tokens", - "version": "9.0.0-next.7", + "version": "9.0.0-next.8", "description": "Design Tokens for the Swiss Post Design System.", "author": "Swiss Post ", "license": "Apache-2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4d7f41d09..fb076973e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,10 +47,10 @@ importers: specifier: 0.3.7 version: 0.3.7 '@swisspost/design-system-icons': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../icons '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist ally.js: specifier: 1.4.1 @@ -156,10 +156,10 @@ importers: specifier: 18.2.13 version: 18.2.13(@angular/common@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@18.2.13(@angular/animations@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) '@swisspost/design-system-components': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../components '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist rxjs: specifier: 7.8.1 @@ -238,7 +238,7 @@ importers: specifier: ^16.0.0 || ^17.0.0 || ^18.0.0 version: 18.1.1(rxjs@7.8.1)(zone.js@0.14.8) '@swisspost/design-system-components': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../../../components tslib: specifier: 2.6.3 @@ -248,7 +248,7 @@ importers: packages/components-react: dependencies: '@swisspost/design-system-components': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../components devDependencies: '@types/node': @@ -300,22 +300,22 @@ importers: packages/documentation: dependencies: '@swisspost/design-system-components': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../components '@swisspost/design-system-components-react': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../components-react '@swisspost/design-system-icons': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../icons '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist '@swisspost/design-system-tokens': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../tokens/dist '@swisspost/internet-header': - specifier: workspace:2.0.0-next.7 + specifier: workspace:2.0.0-next.8 version: link:../internet-header bootstrap: specifier: 5.3.3 @@ -373,10 +373,10 @@ importers: specifier: 8.3.6 version: 8.3.6(lit@3.1.4)(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(typescript@5.5.4)(vite@5.4.8(@types/node@22.7.9)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.78.0)(terser@5.31.6)) '@swisspost/design-system-components-angular': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../components-angular/dist/components '@swisspost/design-system-intranet-header': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../intranet-header-workspace/dist/intranet-header '@types/css-modules': specifier: 1.0.5 @@ -517,7 +517,7 @@ importers: packages/internet-header: dependencies: '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist body-scroll-lock: specifier: 4.0.0-beta.0 @@ -668,7 +668,7 @@ importers: specifier: 2.11.8 version: 2.11.8 '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist rxjs: specifier: 7.8.1 @@ -762,21 +762,21 @@ importers: specifier: ^16.0.0 || ^17.0.0 || ^18.0.0 version: 18.1.1(rxjs@7.8.1)(zone.js@0.14.8) '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../../../styles/dist tslib: specifier: 2.6.3 version: 2.6.3 devDependencies: '@swisspost/design-system-intranet-header-workspace': - specifier: workspace:3.0.22-next.7 + specifier: workspace:3.0.22-next.8 version: link:../.. publishDirectory: ../../dist/intranet-header packages/intranet-header-workspace/projects/intranet-header-showcase: dependencies: '@swisspost/design-system-intranet-header': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../../dist/intranet-header packages/migrations: @@ -822,13 +822,13 @@ importers: packages/nextjs-integration: dependencies: '@swisspost/design-system-components-react': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../components-react '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist '@swisspost/internet-header': - specifier: workspace:2.0.0-next.7 + specifier: workspace:2.0.0-next.8 version: link:../internet-header next: specifier: 15.0.1 @@ -890,10 +890,10 @@ importers: version: 3.0.0 devDependencies: '@swisspost/design-system-icons': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../icons '@swisspost/design-system-tokens': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../tokens/dist '@types/node': specifier: 20.14.14 @@ -984,7 +984,7 @@ importers: specifier: 18.2.13 version: 18.2.13(@angular/common@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@18.2.13(@angular/animations@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../styles/dist primeng: specifier: 17.18.7 @@ -1060,7 +1060,7 @@ importers: specifier: ^18.0.0 version: 18.1.1(rxjs@7.8.1)(zone.js@0.14.8) '@swisspost/design-system-styles': - specifier: workspace:9.0.0-next.7 + specifier: workspace:9.0.0-next.8 version: link:../../../styles/dist primeng: specifier: ^17.18.0 From 041d6fe4a0f5cae786c311ecd3bc6af71688cb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliz=C3=A9=20Debray?= <33580481+alizedebray@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:50:24 +0100 Subject: [PATCH 05/21] fix(components): update post-list component (#4137) - Reflected the `horizontal` property on the host to allow updating the orientation with `document.querySelector('post-list).horizontal = true;` - Reduced the selectors specificity to allow flexible styling - Gave a default value to all CSS custom properties --- .changeset/tough-cheetahs-clean.md | 5 +++++ .../src/components/post-list/post-list.scss | 16 ++++++++-------- .../src/components/post-list/post-list.tsx | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 .changeset/tough-cheetahs-clean.md diff --git a/.changeset/tough-cheetahs-clean.md b/.changeset/tough-cheetahs-clean.md new file mode 100644 index 0000000000..431ddce686 --- /dev/null +++ b/.changeset/tough-cheetahs-clean.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Fixed an issue with the post-list component where the `horizontal` property could not be set programmatically. Also, reduced the specificity of the component's styles to make customization easier. diff --git a/packages/components/src/components/post-list/post-list.scss b/packages/components/src/components/post-list/post-list.scss index d492599b77..015930ea35 100644 --- a/packages/components/src/components/post-list/post-list.scss +++ b/packages/components/src/components/post-list/post-list.scss @@ -2,20 +2,20 @@ post-list { display: flex; - gap: var(--post-list-title-gap); flex-direction: column; - align-items: flex-start; + gap: var(--post-list-title-gap, 0); - & > div[role='list'] { - flex-direction: column; + > [role='list'] { display: flex; - gap: var(--post-list-item-gap); + flex-direction: column; + gap: var(--post-list-item-gap, 0); } - &[horizontal]:not([horizontal='false']) { + &:where([horizontal]:not([horizontal='false'])) { flex-direction: row; - align-items: baseline; - & > div[role='list'] { + align-items: center; + + > [role='list'] { flex-direction: row; align-items: center; } diff --git a/packages/components/src/components/post-list/post-list.tsx b/packages/components/src/components/post-list/post-list.tsx index bdccc14ab8..47efe5a797 100644 --- a/packages/components/src/components/post-list/post-list.tsx +++ b/packages/components/src/components/post-list/post-list.tsx @@ -27,7 +27,7 @@ export class PostList { /** * The list can become horizontal by setting `horizontal="true"` or just `horizontal` */ - @Prop() readonly horizontal: boolean = false; + @Prop({ reflect: true }) readonly horizontal: boolean = false; private titleEl: HTMLElement; @@ -35,7 +35,7 @@ export class PostList { /** * Get the id set on the host element or use a random id by default */ - this.titleId = `list-${crypto.randomUUID()}`; + this.titleId = `title-${this.host.id || crypto.randomUUID()}`; } componentDidLoad() { From c24101c3bd2f8ceb7e3f33558db6d518f1b2524b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliz=C3=A9=20Debray?= <33580481+alizedebray@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:00:40 +0100 Subject: [PATCH 06/21] feat(component): add main navigation styles (#4148) This PR is only about styling the main navigation according to the design. The behavior will come with another PR. --------- Co-authored-by: Philipp Gfeller --- .../components/post-header/post-header.scss | 74 ++++++++---- .../components/post-header/post-header.tsx | 15 +-- .../post-mainnavigation.scss | 113 +++++++++++------- .../post-mainnavigation.tsx | 2 +- packages/components/src/index.html | 11 +- .../header/components/header.markup.ts | 9 +- 6 files changed, 142 insertions(+), 82 deletions(-) diff --git a/packages/components/src/components/post-header/post-header.scss b/packages/components/src/components/post-header/post-header.scss index 9703e1e3ea..5879d615d4 100644 --- a/packages/components/src/components/post-header/post-header.scss +++ b/packages/components/src/components/post-header/post-header.scss @@ -1,4 +1,5 @@ @use '@swisspost/design-system-styles/mixins/media'; +@use '@swisspost/design-system-styles/variables/animation'; *, ::before, @@ -24,6 +25,13 @@ justify-content: space-between; } +// ensures the global-header and title-header are above the main-navigation +.global-header, +.title-header { + position: relative; + z-index: 1; +} + .global-header { background-color: #ffcc00; display: flex; @@ -79,18 +87,12 @@ slot[name='post-logo'] { gap: 1rem; } -.title-header, -.main-navigation { +.title-header { display: flex; align-items: center; padding-inline: 12px; background: white; -} - -.title-header { height: var(--main-header-height); - display: flex; - align-items: center; @include media.max(lg) { border-bottom: 1px solid black; @@ -105,32 +107,54 @@ slot[name='post-logo'] { font-size: 28px !important; } -.main-navigation { - position: sticky; - top: 24px; - height: var(--main-header-height); - +.mobile-toggle { @include media.min(lg) { - border-bottom: 1px solid black; + display: none; } +} - @include media.max(lg) { - display: none; +.navigation { + background: var(--post-core-color-brand-white); + box-shadow: var(--post-core-elevation-3); +} + +// only for tablet and mobile +@include media.max(lg) { + .navigation { position: absolute; - top: var(--header-height); - bottom: 0; - width: 100%; - background-color: white; - height: auto; + inset-inline: 0; + inset-block-end: calc(100vh - var(--header-height)); + transition: transform animation.$transition-time-area-medium animation.$transition-easing-accelerate; &.extended { - display: block; + transform: translateY(100%); + transition-timing-function: animation.$transition-easing-decelerate; } } -} -.mobile-toggle { - @include media.min(lg) { - display: none; + ::slotted(post-mainnavigation), + .navigation-footer { + display: flex; + flex-direction: column; + padding-block: var(--post-core-dimension-16) var(--post-core-dimension-24); + padding-inline: var(--post-core-dimension-32); + opacity: 0; + transition-property: opacity; + transition-delay: animation.$transition-time-area-medium; + + .navigation.extended & { + opacity: 1; + transition-delay: 0s; + } + } + + ::slotted(post-mainnavigation) { + background-color: var(--post-core-color-sandgrey-002); + gap: var(--post-core-dimension-32); + } + + .navigation-footer { + background-color: var(--post-core-color-sandgrey-006); + gap: var(--post-core-dimension-24); } } diff --git a/packages/components/src/components/post-header/post-header.tsx b/packages/components/src/components/post-header/post-header.tsx index 7fa2a51450..0dc1a9a233 100644 --- a/packages/components/src/components/post-header/post-header.tsx +++ b/packages/components/src/components/post-header/post-header.tsx @@ -83,9 +83,9 @@ export class PostHeader { } render() { - const mainNavClasses = ['main-navigation']; + const navigationClasses = ['navigation']; if (this.mobileMenuExtended) { - mainNavClasses.push('extended'); + navigationClasses.push('extended'); } return ( @@ -114,13 +114,14 @@ export class PostHeader { -
+
+ {(this.device === 'mobile' || this.device === 'tablet') && ( - - )} - {(this.device === 'mobile' || this.device === 'tablet') && ( - + )}
diff --git a/packages/components/src/components/post-mainnavigation/post-mainnavigation.scss b/packages/components/src/components/post-mainnavigation/post-mainnavigation.scss index df9a46e239..7496c6c553 100644 --- a/packages/components/src/components/post-mainnavigation/post-mainnavigation.scss +++ b/packages/components/src/components/post-mainnavigation/post-mainnavigation.scss @@ -1,60 +1,87 @@ +@use '@swisspost/design-system-styles/mixins/button'; +@use '@swisspost/design-system-styles/mixins/icons'; @use '@swisspost/design-system-styles/mixins/media'; @use '@swisspost/design-system-styles/mixins/utilities'; +@use '@swisspost/design-system-styles/functions/tokens'; +@use '@swisspost/design-system-styles/tokens/elements'; +@use '@swisspost/design-system-styles/variables/animation'; -*, -::before, -::after { - box-sizing: border-box; -} +post-mainnavigation { + // reset links and buttons + post-list-item { + a { + text-decoration: none; + border-radius: 0; + } -slot[name='back-button'], -[slot='back-button'] { - @include media.min(lg) { - display: none; - } -} + button { + @include button.reset-button; + text-align: start; + } -h2 { - @include media.min(lg) { - @include utilities.visuallyhidden(); + a, + button { + &:hover { + color: tokens.get('post-link-hover-fg', elements.$post-link); + } + } } -} -post-mainnavigation { - height: 100%; -} + // desktop styles + @include media.min(lg) { + post-list > [role="list"] { + flex-direction: row; + } -:host { - height: 100%; - display: block; -} + post-list-item { + a, + button { + padding-inline: var(--post-core-dimension-12); + height: var(--post-core-dimension-56); + border-block: var(--post-core-dimension-4) solid transparent; + display: flex; + align-items: center; + gap: var(--post-core-dimension-4); + font-size: var(--post-core-font-size-16); + } -.main-navigation { - margin-block: 0; - list-style: none; - display: flex; - padding-left: 0; - gap: 1rem; + // styles specific to for the mega-dropdown buttons + button { + padding-inline-end: var(--post-core-dimension-12); + transition: border-block-end-color animation.$transition-base-timing; - @include media.max(lg) { - flex-direction: column; - } + &::after { + content: ''; + @include icons.icon(2113); + height: var(--post-core-dimension-24); + width: var(--post-core-dimension-24); + transition: transform animation.$transition-base-timing; + } - > post-list { - display: flex; - align-items: stretch; - gap: 1rem; - height: 100%; + &.selected { + border-block-end-color: currentColor; + font-weight: var(--post-core-font-weight-700); - @include media.max(lg) { - flex-direction: column; + &::after { + transform: rotate(180deg); + } + } + } } } - a, - post-megadropdown-toggle { - height: 100%; - display: flex; - align-items: center; + // tablet/mobile styles + @include media.max(lg) { + post-list-item { + a, + button { + display: block; + width: 100%; + padding-block: var(--post-core-dimension-12); + padding-inline-end: var(--post-core-dimension-12); + border-bottom: var(--post-core-dimension-1) solid currentColor; + font-weight: var(--post-core-font-weight-700); + } + } } } diff --git a/packages/components/src/components/post-mainnavigation/post-mainnavigation.tsx b/packages/components/src/components/post-mainnavigation/post-mainnavigation.tsx index c78965cd44..dc82772c1b 100644 --- a/packages/components/src/components/post-mainnavigation/post-mainnavigation.tsx +++ b/packages/components/src/components/post-mainnavigation/post-mainnavigation.tsx @@ -36,7 +36,7 @@ export class PostMainnavigation {
this.handleBackButtonClick()} class="back-button">
-
`; }, }; @@ -239,11 +239,11 @@ export const Select: Story = { + ${feedbackTemplate}

Hintus textus elare volare cantare hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.

- ${feedbackTemplate} `; }, }; @@ -301,11 +301,11 @@ export const TextArea: Story = { > + ${feedbackTemplate}

Hintus textus elare volare cantare hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.

- ${feedbackTemplate} `; }, }; diff --git a/packages/styles/src/components/form-hint.scss b/packages/styles/src/components/form-hint.scss index d3afda686f..0a52c325c3 100644 --- a/packages/styles/src/components/form-hint.scss +++ b/packages/styles/src/components/form-hint.scss @@ -6,9 +6,8 @@ tokens.$default-map: components.$post-assist; .form-hint { color: tokens.get('assist-enabled-fg'); padding-inline: tokens.get('assist-padding-inline'); - padding-block: tokens.get('assist-padding-block'); + margin-block: tokens.get('post-assist-padding-block') !important; font-size: tokens.get('assist-font-size'); - margin-block-start: 0; } .form-control:disabled .form-hint { diff --git a/packages/styles/src/components/validation.scss b/packages/styles/src/components/validation.scss index e0f6f9de9b..46385f00a0 100644 --- a/packages/styles/src/components/validation.scss +++ b/packages/styles/src/components/validation.scss @@ -12,11 +12,9 @@ Default feedback message classes .valid-feedback, .invalid-feedback { display: none; - align-items: center; + align-items: flex-start; width: 100%; margin: 0; - padding: tokens.get('post-validation-input-padding-block') - tokens.get('post-validation-input-padding-inline'); font-size: tokens.get('post-validation-font-size'); } @@ -56,24 +54,59 @@ Default feedback message classes } } +input[type='text'], +select, +textarea { + ~ .invalid-feedback, + ~ .valid-feedback { + margin-block: tokens.get('assist-padding-block', components.$post-assist) !important; + padding-inline: tokens.get('validation-input-padding-inline'); + } +} + /* Checkbox and Radio box specific classes */ input[type='checkbox'], input[type='radio'], -input[type='range'], :has(input[type='checkbox']), :has(input[type='radio']) { ~ .invalid-feedback, ~ .valid-feedback { + padding-inline-start: tokens.get('validation-group-padding-inline-start'); + &::before { - height: tokens.get('post-validation-group-icon-size'); - width: tokens.get('post-validation-group-icon-size'); - display: inline-block; - margin-inline-end: tokens.get('post-validation-group-gap-inline'); - background-color: currentColor; - color: currentColor; + height: tokens.get('validation-group-icon-size'); + width: tokens.get('validation-group-icon-size'); + margin-block-start: tokens.get('validation-group-icon-block-start'); + margin-block-end: tokens.get('validation-group-icon-block-end'); + margin-inline-end: tokens.get('validation-group-gap-inline'); content: ''; + flex-shrink: 0; + mask-size: contain; + mask-position: center; + mask-repeat: no-repeat; + } + } + + input[type='radio'], + :has(input[type='radio']) { + ~ .invalid-feedback, + ~ .valid-feedback { + margin-block-start: tokens.get('radio-button-gap-block-group', components.$post-radio-button); + margin-block-end: tokens.get( + 'radio-button-padding-block-group', + components.$post-radio-button + ); + } + } + + input[type='checkbox'], + :has(input[type='checkbox']) { + ~ .invalid-feedback, + ~ .valid-feedback { + margin-block-start: tokens.get('checkbox-gap-block-group', components.$post-checkbox); + margin-block-end: tokens.get('checkbox-padding-block-group', components.$post-checkbox); } } From 6c79d1c866b4a3e8a79cdf084a3dd3ec7417ad72 Mon Sep 17 00:00:00 2001 From: Lea Date: Wed, 11 Dec 2024 23:12:30 +0100 Subject: [PATCH 10/21] feat(components): post-language-switch web component (#4044) Co-authored-by: Philipp Gfeller <1659006+gfellerph@users.noreply.github.com> --- .changeset/yellow-gifts-sit.md | 6 + packages/components/package.json | 5 +- packages/components/src/components.d.ts | 63 ++++++++ .../components/post-header/post-header.tsx | 27 +++- .../src/components/post-icon/readme.md | 2 + .../post-language-option.scss | 39 +++++ .../post-language-option.tsx | 8 + .../components/post-language-option/readme.md | 14 +- .../post-language-switch.scss | 40 +++++ .../post-language-switch.tsx | 148 ++++++++++++++++++ .../components/post-language-switch/readme.md | 36 +++++ .../post-language-switch/switch-variants.ts | 3 + .../post-menu-trigger/post-menu-trigger.tsx | 16 +- .../components/post-menu-trigger/readme.md | 13 ++ .../src/components/post-menu/readme.md | 5 + packages/components/src/index.html | 45 +++--- packages/components/src/index.ts | 1 + .../components/language-switch.snapshot.ts | 7 + .../header/components/header.markup.ts | 24 ++- .../language-switch/language-switch.docs.mdx | 30 ++++ .../language-switch.snapshot.stories.ts | 37 +++++ .../language-switch.stories.ts | 85 ++++++++++ .../cypress/e2e/language-detection.cy.ts | 2 +- ...e-switch.cy.ts => language-switch-2.cy.ts} | 18 +-- .../cypress/e2e/main-slot.cy.ts | 2 +- packages/internet-header/src/components.d.ts | 32 ++-- .../post-internet-header.tsx | 12 +- .../components/post-internet-header/readme.md | 4 +- .../components/post-language-switch-list.tsx | 0 .../post-language-switch-2.scss} | 0 .../post-language-switch-2.tsx} | 8 +- .../readme.md | 8 +- packages/internet-header/src/index.ts | 2 +- pnpm-lock.yaml | 26 +-- 34 files changed, 662 insertions(+), 106 deletions(-) create mode 100644 .changeset/yellow-gifts-sit.md create mode 100644 packages/components/src/components/post-language-switch/post-language-switch.scss create mode 100644 packages/components/src/components/post-language-switch/post-language-switch.tsx create mode 100644 packages/components/src/components/post-language-switch/readme.md create mode 100644 packages/components/src/components/post-language-switch/switch-variants.ts create mode 100644 packages/documentation/cypress/snapshots/components/language-switch.snapshot.ts create mode 100644 packages/documentation/src/stories/components/header/language-switch/language-switch.docs.mdx create mode 100644 packages/documentation/src/stories/components/header/language-switch/language-switch.snapshot.stories.ts create mode 100644 packages/documentation/src/stories/components/header/language-switch/language-switch.stories.ts rename packages/internet-header/cypress/e2e/{language-switch.cy.ts => language-switch-2.cy.ts} (91%) rename packages/internet-header/src/components/{post-language-switch => post-language-switch-2}/components/post-language-switch-list.tsx (100%) rename packages/internet-header/src/components/{post-language-switch/post-language-switch.scss => post-language-switch-2/post-language-switch-2.scss} (100%) rename packages/internet-header/src/components/{post-language-switch/post-language-switch.tsx => post-language-switch-2/post-language-switch-2.tsx} (96%) rename packages/internet-header/src/components/{post-language-switch => post-language-switch-2}/readme.md (91%) diff --git a/.changeset/yellow-gifts-sit.md b/.changeset/yellow-gifts-sit.md new file mode 100644 index 0000000000..6ad9f49882 --- /dev/null +++ b/.changeset/yellow-gifts-sit.md @@ -0,0 +1,6 @@ +--- +'@swisspost/design-system-documentation': minor +'@swisspost/design-system-components': minor +--- + +Added the `post-language-switch` component that enables users to change the language of a page. diff --git a/packages/components/package.json b/packages/components/package.json index db4866c06a..2068ff5214 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -40,10 +40,11 @@ "dependencies": { "@floating-ui/dom": "1.6.8", "@oddbird/popover-polyfill": "0.3.7", - "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "@swisspost/design-system-icons": "workspace:9.0.0-next.8", + "@swisspost/design-system-styles": "workspace:9.0.0-next.8", "ally.js": "1.4.1", - "long-press-event": "2.5.0" + "long-press-event": "2.5.0", + "nanoid": "5.0.9" }, "devDependencies": { "@percy/cli": "1.29.1", diff --git a/packages/components/src/components.d.ts b/packages/components/src/components.d.ts index d1a32e53ee..9acbc7fda6 100644 --- a/packages/components/src/components.d.ts +++ b/packages/components/src/components.d.ts @@ -7,9 +7,11 @@ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; import { HeadingLevel } from "./types/index"; import { BannerType } from "./components/post-banner/banner-types"; +import { SwitchVariant } from "./components/post-language-switch/switch-variants"; import { Placement } from "@floating-ui/dom"; export { HeadingLevel } from "./types/index"; export { BannerType } from "./components/post-banner/banner-types"; +export { SwitchVariant } from "./components/post-language-switch/switch-variants"; export { Placement } from "@floating-ui/dom"; export namespace Components { interface PostAccordion { @@ -216,6 +218,10 @@ 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". */ @@ -228,6 +234,28 @@ export namespace Components { * 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. */ "url": string; + /** + * The variant of the post-language-switch parent (dynamically set by the parent) + */ + "variant"?: SwitchVariant | null; + } + interface PostLanguageSwitch { + /** + * A title for the list of language options + */ + "caption": string; + /** + * 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) + */ + "variant": SwitchVariant; } interface PostList { /** @@ -617,6 +645,12 @@ declare global { prototype: HTMLPostLanguageOptionElement; new (): HTMLPostLanguageOptionElement; }; + interface HTMLPostLanguageSwitchElement extends Components.PostLanguageSwitch, HTMLStencilElement { + } + var HTMLPostLanguageSwitchElement: { + prototype: HTMLPostLanguageSwitchElement; + new (): HTMLPostLanguageSwitchElement; + }; interface HTMLPostListElement extends Components.PostList, HTMLStencilElement { } var HTMLPostListElement: { @@ -806,6 +840,7 @@ declare global { "post-header": HTMLPostHeaderElement; "post-icon": HTMLPostIconElement; "post-language-option": HTMLPostLanguageOptionElement; + "post-language-switch": HTMLPostLanguageSwitchElement; "post-list": HTMLPostListElement; "post-list-item": HTMLPostListItemElement; "post-logo": HTMLPostLogoElement; @@ -1011,6 +1046,10 @@ 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". */ @@ -1023,6 +1062,28 @@ declare namespace LocalJSX { * 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. */ "url"?: string; + /** + * The variant of the post-language-switch parent (dynamically set by the parent) + */ + "variant"?: SwitchVariant | null; + } + interface PostLanguageSwitch { + /** + * A title for the list of language options + */ + "caption"?: string; + /** + * 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) + */ + "variant"?: SwitchVariant; } interface PostList { /** @@ -1202,6 +1263,7 @@ declare namespace LocalJSX { "post-header": PostHeader; "post-icon": PostIcon; "post-language-option": PostLanguageOption; + "post-language-switch": PostLanguageSwitch; "post-list": PostList; "post-list-item": PostListItem; "post-logo": PostLogo; @@ -1245,6 +1307,7 @@ declare module "@stencil/core" { */ "post-icon": LocalJSX.PostIcon & JSXBase.HTMLAttributes; "post-language-option": LocalJSX.PostLanguageOption & JSXBase.HTMLAttributes; + "post-language-switch": LocalJSX.PostLanguageSwitch & JSXBase.HTMLAttributes; "post-list": LocalJSX.PostList & JSXBase.HTMLAttributes; "post-list-item": LocalJSX.PostListItem & JSXBase.HTMLAttributes; "post-logo": LocalJSX.PostLogo & JSXBase.HTMLAttributes; diff --git a/packages/components/src/components/post-header/post-header.tsx b/packages/components/src/components/post-header/post-header.tsx index 0dc1a9a233..c8a62dfbce 100644 --- a/packages/components/src/components/post-header/post-header.tsx +++ b/packages/components/src/components/post-header/post-header.tsx @@ -1,6 +1,9 @@ import { Component, h, Host, State, Element, Listen } from '@stencil/core'; import { throttle } from 'throttle-debounce'; import { version } from '@root/package.json'; +import { SwitchVariant } from '@/components'; + +type DEVICE_SIZE = 'mobile' | 'tablet' | 'desktop' | null; @Component({ tag: 'post-header', @@ -9,7 +12,7 @@ import { version } from '@root/package.json'; }) export class PostHeader { @Element() host: HTMLPostHeaderElement; - @State() device: 'mobile' | 'tablet' | 'desktop' = null; + @State() device: DEVICE_SIZE = null; @State() mobileMenuExtended: boolean = false; private scrollParent = null; @@ -67,17 +70,33 @@ export class PostHeader { } private handleResize() { + const previousDevice = this.device; + let newDevice: DEVICE_SIZE; const width = window?.innerWidth; + if (width >= 1024) { - this.device = 'desktop'; + newDevice = 'desktop'; this.mobileMenuExtended = false; // Close any open mobile menu } else if (width >= 600) { - this.device = 'tablet'; + newDevice = 'tablet'; } else { - this.device = 'mobile'; + newDevice = 'mobile'; + } + + // Apply only on change for doing work only when necessary + if (newDevice !== previousDevice) { + this.device = newDevice; + window.requestAnimationFrame(() => { + this.switchLanguageSwitchMode(); + }); } } + private switchLanguageSwitchMode() { + const variant: SwitchVariant = this.device === 'desktop' ? 'dropdown' : 'list'; + this.host.querySelector('post-language-switch')?.setAttribute('variant', variant); + } + private handleMobileMenuToggle() { this.mobileMenuExtended = !this.mobileMenuExtended; } diff --git a/packages/components/src/components/post-icon/readme.md b/packages/components/src/components/post-icon/readme.md index 8b1c4de7d4..b5967432b0 100644 --- a/packages/components/src/components/post-icon/readme.md +++ b/packages/components/src/components/post-icon/readme.md @@ -28,6 +28,7 @@ some content - [post-breadcrumb-item](../post-breadcrumb-item) - [post-card-control](../post-card-control) - [post-closebutton](../post-closebutton) + - [post-language-switch](../post-language-switch) - [post-rating](../post-rating) - [post-tag](../post-tag) @@ -40,6 +41,7 @@ graph TD; post-breadcrumb-item --> post-icon post-card-control --> post-icon post-closebutton --> post-icon + post-language-switch --> post-icon post-rating --> post-icon post-tag --> post-icon style post-icon fill:#f9f,stroke:#333,stroke-width:4px diff --git a/packages/components/src/components/post-language-option/post-language-option.scss b/packages/components/src/components/post-language-option/post-language-option.scss index 6d81397276..314839d3d8 100644 --- a/packages/components/src/components/post-language-option/post-language-option.scss +++ b/packages/components/src/components/post-language-option/post-language-option.scss @@ -23,3 +23,42 @@ a { width: 100%; padding: var(--post-language-option-padding); } + +.post-language-option-list { + @include post.focus-style; + border-radius: 2px; + width: 40px; + height: 40px; + + &[aria-current='true'], + &[aria-current='page'] { + background-color: #050400; + color: #fff; + } +} + +.post-language-option-dropdown { + padding-block: 13px; + padding-inline: 24px; + box-sizing: border-box; + position: relative; + + &[aria-current='true'], + &[aria-current='page'] { + &::after { + content: ''; + left: -2px; + height: 3px; + background-color: #504f4b; + width: calc(100% + 4px); + display: block; + position: absolute; + bottom: 3px; + } + + &:focus::after { + width: calc(100% - 5px); + left: 2px; + } + } +} diff --git a/packages/components/src/components/post-language-option/post-language-option.tsx b/packages/components/src/components/post-language-option/post-language-option.tsx index d7233c6905..6e8bd502a1 100644 --- a/packages/components/src/components/post-language-option/post-language-option.tsx +++ b/packages/components/src/components/post-language-option/post-language-option.tsx @@ -11,6 +11,7 @@ import { } from '@stencil/core'; import { checkEmptyOrType, checkType } from '@/utils'; import { version } from '@root/package.json'; +import { SwitchVariant } from '../post-language-switch/switch-variants'; /** * @slot default - Slot for placing the content inside the anchor or button. @@ -51,6 +52,11 @@ export class PostLanguageOption { ); } + /** + * The variant of the post-language-switch parent (dynamically set by the parent) + */ + @Prop() variant?: SwitchVariant | null; + /** * The full name of the language. For example, "Deutsch". */ @@ -122,6 +128,7 @@ export class PostLanguageOption { {this.url ? ( ) : ( + + +
+ +
+
+
+ ); + } + + render() { + return this.variant === 'list' ? this.renderList() : this.renderDropdown(); + } +} diff --git a/packages/components/src/components/post-language-switch/readme.md b/packages/components/src/components/post-language-switch/readme.md new file mode 100644 index 0000000000..c2079be7d3 --- /dev/null +++ b/packages/components/src/components/post-language-switch/readme.md @@ -0,0 +1,36 @@ +# post-language-switch + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| ------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- | +| `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'` | + + +## Dependencies + +### Depends on + +- [post-menu-trigger](../post-menu-trigger) +- [post-icon](../post-icon) +- [post-menu](../post-menu) + +### Graph +```mermaid +graph TD; + post-language-switch --> post-menu-trigger + post-language-switch --> post-icon + post-language-switch --> post-menu + post-menu --> post-popovercontainer + style post-language-switch fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/packages/components/src/components/post-language-switch/switch-variants.ts b/packages/components/src/components/post-language-switch/switch-variants.ts new file mode 100644 index 0000000000..2473e44f8f --- /dev/null +++ b/packages/components/src/components/post-language-switch/switch-variants.ts @@ -0,0 +1,3 @@ +export const SWITCH_VARIANTS = ['list', 'dropdown'] as const; + +export type SwitchVariant = (typeof SWITCH_VARIANTS)[number]; diff --git a/packages/components/src/components/post-menu-trigger/post-menu-trigger.tsx b/packages/components/src/components/post-menu-trigger/post-menu-trigger.tsx index 1846eaf361..c13a921134 100644 --- a/packages/components/src/components/post-menu-trigger/post-menu-trigger.tsx +++ b/packages/components/src/components/post-menu-trigger/post-menu-trigger.tsx @@ -21,7 +21,7 @@ export class PostMenuTrigger { @State() ariaExpanded: boolean = false; /** - * Reference to the slotted button within the trigger, if present. + * Reference to the slotted button within the trigger, if present. * Used to manage click and key events for menu control. */ private slottedButton: HTMLButtonElement | null = null; @@ -62,8 +62,20 @@ export class PostMenuTrigger { componentDidLoad() { this.root = getRoot(this.host); this.validateControlFor(); - + this.slottedButton = this.host.querySelector('button'); + + // Check if the slottedButton is within a web component + if (!this.slottedButton) { + const webComponent = this.host.querySelector('.menu-trigger-webc'); + if (webComponent.shadowRoot) { + const slottedButton = webComponent.shadowRoot.querySelector('button'); + if (slottedButton) { + this.slottedButton = slottedButton; + } + } + } + if (this.slottedButton) { this.slottedButton.setAttribute('aria-haspopup', 'menu'); this.slottedButton.addEventListener('click', () => { diff --git a/packages/components/src/components/post-menu-trigger/readme.md b/packages/components/src/components/post-menu-trigger/readme.md index 5be3ab3109..5198f2ceaf 100644 --- a/packages/components/src/components/post-menu-trigger/readme.md +++ b/packages/components/src/components/post-menu-trigger/readme.md @@ -12,6 +12,19 @@ | `for` _(required)_ | `for` | ID of the menu element that this trigger is linked to. Used to open and close the specified menu. | `string` | `undefined` | +## Dependencies + +### Used by + + - [post-language-switch](../post-language-switch) + +### Graph +```mermaid +graph TD; + post-language-switch --> post-menu-trigger + style post-menu-trigger fill:#f9f,stroke:#333,stroke-width:4px +``` + ---------------------------------------------- *Built with [StencilJS](https://stenciljs.com/)* diff --git a/packages/components/src/components/post-menu/readme.md b/packages/components/src/components/post-menu/readme.md index f700878d4c..2372e47c18 100644 --- a/packages/components/src/components/post-menu/readme.md +++ b/packages/components/src/components/post-menu/readme.md @@ -66,6 +66,10 @@ Type: `Promise` ## Dependencies +### Used by + + - [post-language-switch](../post-language-switch) + ### Depends on - [post-popovercontainer](../post-popovercontainer) @@ -74,6 +78,7 @@ Type: `Promise` ```mermaid graph TD; post-menu --> post-popovercontainer + post-language-switch --> post-menu style post-menu fill:#f9f,stroke:#333,stroke-width:4px ``` diff --git a/packages/components/src/index.html b/packages/components/src/index.html index ca9c2ba3e2..172bd137c5 100644 --- a/packages/components/src/index.html +++ b/packages/components/src/index.html @@ -17,40 +17,41 @@ + Homepage - -