-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into update-tokens
- Loading branch information
Showing
145 changed files
with
4,297 additions
and
1,585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-icons': minor | ||
--- | ||
|
||
Added icon number 2633. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-styles': minor | ||
--- | ||
|
||
Internalized bootstrap position utilities into the design system. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-components': minor | ||
--- | ||
|
||
Ιmplemented the back-to-top button component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-styles': minor | ||
--- | ||
|
||
Created the `search-input` component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-components': minor | ||
--- | ||
|
||
Added the capability to use a slotted img as a logo inside ´accordion-items´. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
--- | ||
|
||
Updated documentation to display the currently selected theme and channel SCSS file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
--- | ||
|
||
Added a ´post-accordion´ example showing logo usage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Updated the ´post-accordion´ styles to match the new Post design. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-styles': minor | ||
--- | ||
|
||
Added list mixins `list-bullet`, `list-revert` and `list-unstyled`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-icons': patch | ||
--- | ||
|
||
Removed `fill` and `stroke` attributes on the icons output files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
--- | ||
|
||
Added tokens package icon to the home page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-components': patch | ||
--- | ||
|
||
Made `post-icon` component use base tag href to define location of icons folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Reverted `ol` lists to use standard display (not grid). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Updated fieldset-legend styles with Design Tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
--- | ||
|
||
Added ´btn-link´ class to remove inline padding. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
--- | ||
|
||
Added classes to fix banner sizing in controls. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@swisspost/design-system-components-angular", | ||
"version": "9.0.0-next.6", | ||
"version": "9.0.0-next.7", | ||
"description": "Swiss Post Design System - Angular Wrapper Components", | ||
"author": "Swiss Post <[email protected]>", | ||
"license": "Apache-2.0", | ||
|
@@ -19,7 +19,7 @@ | |
}, | ||
"dependencies": { | ||
"tslib": "2.6.3", | ||
"@swisspost/design-system-components": "workspace:9.0.0-next.6" | ||
"@swisspost/design-system-components": "workspace:9.0.0-next.7" | ||
}, | ||
"peerDependencies": { | ||
"@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@swisspost/design-system-components-react", | ||
"version": "9.0.0-next.6", | ||
"version": "9.0.0-next.7", | ||
"description": "Design System React Components for easy integration with the React ecosystem", | ||
"author": "Swiss Post <[email protected]>", | ||
"license": "Apache-2.0", | ||
|
@@ -29,7 +29,7 @@ | |
"lint": "eslint src/**/*.ts" | ||
}, | ||
"dependencies": { | ||
"@swisspost/design-system-components": "workspace:9.0.0-next.6" | ||
"@swisspost/design-system-components": "workspace:9.0.0-next.7" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "20.14.14", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const BACK_TO_TOP_ID = '1a1b4cab-d0a8-4b01-bd85-b70e18668cb5'; | ||
|
||
describe('Back-to-top', () => { | ||
describe('default', () => { | ||
beforeEach(() => { | ||
cy.getComponent('post-back-to-top', BACK_TO_TOP_ID); | ||
}); | ||
|
||
it('should render the post-back-to-top component', () => { | ||
cy.get('post-back-to-top').should('exist'); | ||
}); | ||
|
||
it('should throw an error if the label is missing', () => { | ||
cy.on('uncaught:exception', err => { | ||
expect(err.message).to.include( | ||
'The label property of the Back to Top component is required for accessibility purposes. Please ensure it is set.', | ||
); | ||
return false; | ||
}); | ||
cy.document().then(doc => { | ||
const element = doc.createElement('post-back-to-top'); | ||
doc.body.appendChild(element); | ||
}); | ||
}); | ||
|
||
it('should hide the label visually', () => { | ||
cy.get('post-back-to-top').shadow().find('.visually-hidden'); | ||
}); | ||
|
||
it('should scroll to top when clicked', () => { | ||
cy.window().then(win => { | ||
win.scrollTo(0, 3000); // Scroll down to simulate a user interaction | ||
cy.get('post-back-to-top').shadow().find('.back-to-top').click(); | ||
cy.wait(500); | ||
cy.window().its('scrollY').should('equal', 0); | ||
}); | ||
}); | ||
|
||
it('should toggle visibility based on scroll position', () => { | ||
cy.window().then(win => { | ||
win.scrollTo(0, 0); | ||
cy.get('post-back-to-top') | ||
.shadow() | ||
.find('.back-to-top') | ||
.should('have.attr', 'aria-hidden', 'true'); | ||
|
||
win.scrollTo(0, win.innerHeight + 2000); | ||
cy.get('post-back-to-top') | ||
.shadow() | ||
.find('.back-to-top') | ||
.should('have.attr', 'aria-hidden', 'false'); | ||
}); | ||
}); | ||
}); | ||
describe('Accessibility', () => { | ||
it('Has no detectable a11y violations on load for all variants', () => { | ||
cy.getSnapshots('post-back-to-top'); | ||
cy.checkA11y('#root-inner'); | ||
}); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
packages/components/cypress/fixtures/post-back-to-top.test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Document</title> | ||
<script src="../../dist/post-components/post-components.esm.js" type="module"></script> | ||
</head> | ||
<body> | ||
<post-back-to-top label="back to top label"></post-back-to-top> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.