Skip to content

Commit f273b6a

Browse files
authored
Merge branch '5317-htmlcss-target-group' into remove-unused-btn-placeholder
2 parents c70ed28 + cb2c49b commit f273b6a

File tree

66 files changed

+1157
-654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1157
-654
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@swisspost/design-system-icons': minor
3+
---
4+
5+
Added icons:
6+
`2690` and `2691`

.changeset/big-guests-kiss.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@swisspost/design-system-components': major
3+
---
4+
5+
Prefixed all CSS custom variables with `post`:
6+
7+
- `--global-header-top` is now `--post-global-header-top`
8+
- `--local-header-top` is now `--post-local-header-top`
9+
- `--logo-height` is now `--post-logo-height`
10+
- `--global-controls-top` is now `--post-global-controls-top`
11+
- `--header-navigation-current-inset` is now `--post-header-navigation-current-inset`
12+
- `--header-scroll-parent-height` is now `--post-header-scroll-parent-height`
13+
- All CSS variables starting with `--safe-space-*` in the `post-popovercontainer` component are now starting with `--post-safe-space-*`

.changeset/cuddly-bulldogs-cheer.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@swisspost/design-system-documentation': major
3+
'@swisspost/design-system-styles': major
4+
---
5+
6+
Fixed the disappearing validation icons on text input fields when browser autocomplete is applied.

.changeset/flat-wasps-tie.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@swisspost/design-system-tokens': patch
3+
---
4+
5+
Added a function to transform font sizes from px to rem.

.changeset/heavy-spiders-join.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@swisspost/design-system-documentation': patch
3+
---
4+
5+
Trap keyboard focus within the icon details popover on the find icon page to ensure accessible and consistent keyboard navigation.

.changeset/honest-crews-walk.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@swisspost/design-system-styles': major
3+
---
4+
5+
Prefixed the following CSS custom variables with `post`:
6+
7+
- `--section-width` is now `--post-section-width`
8+
- `--section-container-width` is now `--post-section-container-width`
9+
- `--section-container-content-offset` is now `--post-section-container-content-offset`
10+
- `--section-container-padding` is now `--post-section-container-padding`

.changeset/wild-nails-report.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@swisspost/internet-header': patch
3+
'@swisspost/design-system-documentation': patch
4+
'@swisspost/design-system-components': patch
5+
---
6+
7+
Added cypress eslint plugin to enable linting for all cypress folders and files.

.github/actions/artifact-download/action.yaml

+39-4
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,59 @@ outputs:
3131
runs:
3232
using: composite
3333
steps:
34+
- name: Create temporary directory
35+
shell: bash
36+
run: mkdir -p ${{ runner.temp }}/artifact_download
37+
3438
- name: Download artifact
3539
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295
3640
with:
3741
name: ${{ inputs.name }}
3842
run_id: ${{ github.event.workflow_run.id }}
3943
workflow_conclusion: success
44+
path: ${{ runner.temp }}/artifact_download
4045

46+
- name: Ensure target directory exists
47+
shell: bash
48+
run: mkdir -p ${{ inputs.folder }}
49+
4150
- name: Unzip artifacts
4251
shell: bash
43-
run: unzip artifacts.zip -d ${{ inputs.folder }}
52+
run: unzip ${{ runner.temp }}/artifact_download/artifacts.zip -d ${{ inputs.folder }}
53+
54+
- name: Validate artifact contents
55+
shell: bash
56+
run: |
57+
if [[ ! -f "${{ inputs.folder }}/GHA-EVENT-ID" ]]; then
58+
echo "Error: Event ID file missing"
59+
exit 1
60+
fi
61+
62+
if [[ ! -f "${{ inputs.folder }}/GHA-EVENT-ACTION" ]]; then
63+
echo "Error: Event Action file missing"
64+
exit 1
65+
fi
66+
67+
# Validate ID is numeric
68+
EVENT_ID=$(cat ${{ inputs.folder }}/GHA-EVENT-ID)
69+
if ! [[ "$EVENT_ID" =~ ^[0-9]*$ ]]; then
70+
echo "Error: Invalid Event ID format"
71+
exit 1
72+
fi
4473
4574
- name: Clean up
4675
shell: bash
47-
run: rm -r artifacts.zip
76+
run: rm -rf ${{ runner.temp }}/artifact_download
4877

4978
- name: Create outputs
5079
id: build
5180
shell: bash
5281
run: |
53-
echo "id=$(cat ${{ inputs.folder }}/GHA-EVENT-ID)" >> $GITHUB_OUTPUT
54-
echo "action=$(cat ${{ inputs.folder }}/GHA-EVENT-ACTION)" >> $GITHUB_OUTPUT
82+
EVENT_ID=$(cat ${{ inputs.folder }}/GHA-EVENT-ID)
83+
EVENT_ACTION=$(cat ${{ inputs.folder }}/GHA-EVENT-ACTION)
84+
85+
SANITIZED_ID=$(echo "$EVENT_ID" | tr -cd '[:digit:]')
86+
SANITIZED_ACTION=$(echo "$EVENT_ACTION" | tr -cd '[:alnum:]-_')
87+
88+
echo "id=$SANITIZED_ID" >> $GITHUB_OUTPUT
89+
echo "action=$SANITIZED_ACTION" >> $GITHUB_OUTPUT

.github/actions/artifact-upload/action.yaml

+18-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,27 @@ inputs:
2020
runs:
2121
using: composite
2222
steps:
23+
- name: Validate folder exists
24+
shell: bash
25+
run: |
26+
if [[ ! -d "${{ inputs.folder }}" ]]; then
27+
echo "Error: Folder ${{ inputs.folder }} does not exist"
28+
exit 1
29+
fi
30+
2331
- name: Save Event Infos into the artifact folder
2432
shell: bash
2533
run: |
26-
echo ${{ github.event.number }} > ${{ inputs.folder }}/GHA-EVENT-ID
27-
echo ${{ github.event.action }} > ${{ inputs.folder }}/GHA-EVENT-ACTION
34+
if ! [[ "${{ github.event.number }}" =~ ^[0-9]*$ ]]; then
35+
echo "Warning: Invalid event number format, using default"
36+
echo "0" > ${{ inputs.folder }}/GHA-EVENT-ID
37+
else
38+
echo "${{ github.event.number }}" > ${{ inputs.folder }}/GHA-EVENT-ID
39+
fi
40+
41+
ACTION="${{ github.event.action }}"
42+
SANITIZED_ACTION=$(echo "$ACTION" | tr -cd '[:alnum:]-_')
43+
echo "$SANITIZED_ACTION" > ${{ inputs.folder }}/GHA-EVENT-ACTION
2844
2945
- name: Zip artifact folder
3046
shell: bash

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ styles/stylelint-report.txt
2929

3030
# Local Netlify folder
3131
.netlify
32+
33+
# Turborepo
34+
.turbo

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"styles": "pnpm styles:start",
3434
"styles:play": "pnpm --filter design-system-styles play",
3535
"styles:start": "pnpm --filter design-system-styles start",
36-
"styles:build": "pnpm --filter design-system-styles build",
36+
"styles:build": "pnpm turbo run build --filter=@swisspost/design-system-styles",
3737
"styles:unit": "pnpm --filter design-system-styles unit",
3838
"styles:lint": "pnpm --filter design-system-styles lint",
3939
"styles:lint:fix": "pnpm --filter design-system-styles lint:fix",
@@ -90,6 +90,7 @@
9090
"nextjs:build:serve": "pnpm --filter design-system-nextjs-integration build:serve",
9191
"nextjs:lint": "pnpm --filter design-system-nextjs-integration lint",
9292
"nextjs:lint:fix": "pnpm --filter design-system-nextjs-integration lint:fix",
93+
"nextjs:typecheck": "pnpm --filter design-system-nextjs-integration typecheck",
9394
"primeng": "pnpm primeng:start",
9495
"primeng:start": "pnpm --filter design-system-styles-primeng-workspace start",
9596
"primeng:start:lib": "pnpm --filter design-system-styles-primeng-workspace start:lib",
@@ -107,7 +108,8 @@
107108
},
108109
"devDependencies": {
109110
"@changesets/cli": "2.29.2",
110-
"start-server-and-test": "2.0.9"
111+
"start-server-and-test": "2.0.9",
112+
"turbo": "2.5.0"
111113
},
112114
"optionalDependencies": {
113115
"@web-types/lit": "2.0.0-3"

packages/changelog-github/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
"dependencies": {
2727
"@changesets/get-github-info": "0.6.0",
2828
"@changesets/types": "6.0.0",
29-
"dotenv": "16.4.5"
29+
"dotenv": "16.5.0"
3030
},
3131
"devDependencies": {
3232
"@changesets/parse": "*",
3333
"@eslint/js": "9.18.0",
3434
"eslint": "9.18.0",
3535
"globals": "16.0.0",
36-
"typescript": "5.8.2",
36+
"typescript": "5.8.3",
3737
"typescript-eslint": "8.20.0",
3838
"rimraf": "6.0.1"
3939
},

packages/components-angular/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"karma-jasmine-html-reporter": "2.1.0",
5555
"ng-packagr": "19.2.0",
5656
"rimraf": "6.0.1",
57-
"typescript": "5.8.2",
57+
"typescript": "5.8.3",
5858
"typescript-eslint": "8.16.0"
5959
},
6060
"keywords": [

packages/components-react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"react": "18.3.1",
4444
"react-dom": "18.3.1",
4545
"rimraf": "6.0.1",
46-
"typescript": "5.8.2",
46+
"typescript": "5.8.3",
4747
"typescript-eslint": "8.20.0"
4848
},
4949
"peerDependencies": {

packages/components/cypress/e2e/accordion.cy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('accordion', () => {
4040
.last()
4141
.click()
4242
.then(() => {
43-
expect(EventHandlerMock).to.be.calledTwice;
43+
cy.wrap(EventHandlerMock).should('have.been.calledTwice');
4444
});
4545
});
4646
});
@@ -86,7 +86,7 @@ describe('accordion', () => {
8686
.eq(3)
8787
.click()
8888
.then(() => {
89-
expect(EventHandlerMock).to.be.called;
89+
cy.wrap(EventHandlerMock).should('have.been.called');
9090
});
9191
});
9292
});

packages/components/cypress/e2e/collapsible.cy.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('collapsible', () => {
1616
});
1717

1818
it('should show the collapsible', () => {
19-
cy.get('@collapsible').should(`be.visible`);
19+
cy.get('@collapsible').should('be.visible');
2020
});
2121

2222
it('should set the correct ARIA attribute on the trigger', () => {
@@ -30,7 +30,7 @@ describe('collapsible', () => {
3030

3131
it('should hide the collapsible after clicking on the trigger once', () => {
3232
cy.get('@trigger').click();
33-
cy.get('@collapsible').should(`be.hidden`);
33+
cy.get('@collapsible').should('be.hidden');
3434
});
3535

3636
it('should update the "aria-expanded" attribute after hiding the collapsible', () => {
@@ -40,7 +40,7 @@ describe('collapsible', () => {
4040

4141
it('should show the collapsible after clicking on the trigger twice', () => {
4242
cy.get('@trigger').dblclick();
43-
cy.get('@collapsible').should(`be.visible`);
43+
cy.get('@collapsible').should('be.visible');
4444
});
4545

4646
it('should update the "aria-expanded" attribute after showing the collapsible', () => {
@@ -61,17 +61,17 @@ describe('collapsible', () => {
6161
});
6262

6363
it('should hide the collapsible', () => {
64-
cy.get('@collapsible').should(`be.hidden`);
64+
cy.get('@collapsible').should('be.hidden');
6565
});
6666

6767
it('should show the collapsible after clicking on the trigger once', () => {
6868
cy.get('@trigger').click();
69-
cy.get('@collapsible').should(`be.visible`);
69+
cy.get('@collapsible').should('be.visible');
7070
});
7171

7272
it('should hide the collapsible after clicking on the trigger twice', () => {
7373
cy.get('@trigger').dblclick();
74-
cy.get('@collapsible').should(`be.hidden`);
74+
cy.get('@collapsible').should('be.hidden');
7575
});
7676
});
7777
});

packages/components/cypress/e2e/megadropdown.cy.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@ describe('megadropdown', () => {
2020
cy.get('@megadropdown').should('exist');
2121
cy.get('@megadropdown-trigger').should('exist');
2222
cy.get('@megadropdown-container').should('exist');
23-
cy.get('@megadropdown-container').should(`be.hidden`);
23+
cy.get('@megadropdown-container').should('be.hidden');
2424
});
2525

2626
it('should open on trigger click', () => {
2727
cy.get('@megadropdown-trigger').should('exist');
2828
cy.get('@megadropdown-trigger').click();
29-
cy.get('@megadropdown-container').should(`be.visible`);
29+
cy.get('@megadropdown-container').should('be.visible');
3030
});
3131

3232
it('should show close button', () => {
3333
cy.get('@megadropdown-trigger').click();
34-
cy.get('@close-btn').should(`be.visible`);
34+
cy.get('@close-btn').should('be.visible');
3535
});
3636

3737
it('should not show back button', () => {
3838
cy.get('@megadropdown-trigger').click();
39-
cy.get('@back-btn').should(`be.hidden`);
39+
cy.get('@back-btn').should('be.hidden');
4040
});
4141

4242
it('should close on close button click', () => {
4343
cy.get('@megadropdown-trigger').click();
4444
cy.get('@close-btn').click();
45-
cy.get('@megadropdown-container').should(`be.hidden`);
45+
cy.get('@megadropdown-container').should('be.hidden');
4646
});
4747
});
4848

@@ -61,17 +61,17 @@ describe('megadropdown', () => {
6161

6262
it('should open on trigger click', () => {
6363
cy.get('@megadropdown-trigger').click();
64-
cy.get('@megadropdown').should(`be.visible`);
64+
cy.get('@megadropdown').should('be.visible');
6565
});
6666

6767
it('should show back button', () => {
6868
cy.get('@megadropdown-trigger').click();
69-
cy.get('@back-btn').should(`be.visible`);
69+
cy.get('@back-btn').should('be.visible');
7070
});
7171

7272
it('should not show close button', () => {
7373
cy.get('@megadropdown-trigger').click();
74-
cy.get('@close-btn').should(`be.hidden`);
74+
cy.get('@close-btn').should('be.hidden');
7575
});
7676
});
7777
});

0 commit comments

Comments
 (0)