Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into update-tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
swisspost-bot committed Dec 9, 2024
2 parents 7b45f6e + 5cef591 commit daa9d98
Show file tree
Hide file tree
Showing 145 changed files with 4,297 additions and 1,585 deletions.
6 changes: 6 additions & 0 deletions .changeset/2024-11-17-update-icons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-icons': minor
---

Added icon number 2633.

6 changes: 6 additions & 0 deletions .changeset/chatty-spoons-unite.md
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.
6 changes: 6 additions & 0 deletions .changeset/dull-falcons-hope.md
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.
6 changes: 6 additions & 0 deletions .changeset/gold-dryers-drop.md
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.
5 changes: 5 additions & 0 deletions .changeset/grumpy-lobsters-agree.md
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´.
5 changes: 5 additions & 0 deletions .changeset/hip-gifts-give.md
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.
5 changes: 5 additions & 0 deletions .changeset/itchy-meals-drum.md
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.
5 changes: 5 additions & 0 deletions .changeset/large-hornets-complain.md
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.
6 changes: 6 additions & 0 deletions .changeset/new-pianos-mix.md
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`.
5 changes: 5 additions & 0 deletions .changeset/orange-maps-tan.md
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.
12 changes: 12 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
"breezy-cups-add",
"brown-badgers-dream",
"chatty-kiwis-travel",
"chilled-owls-walk",
"clean-icons-complain",
"clean-windows-think",
"cold-baboons-appear",
"cold-panthers-vanish",
"cuddly-bears-check",
Expand Down Expand Up @@ -76,46 +78,56 @@
"neat-suits-provide",
"nervous-rocks-shop",
"new-goats-impress",
"nice-ligers-attend",
"ninety-nails-float",
"pink-weeks-relate",
"plenty-apricots-raise",
"plenty-taxis-hear",
"popular-games-rush",
"popular-mirrors-cross",
"proud-actors-knock",
"proud-cheetahs-act",
"proud-moons-impress",
"purple-impalas-own",
"quick-buses-give",
"quick-eagles-watch",
"quick-mails-joke",
"quiet-apes-rhyme",
"rare-dryers-count",
"red-cobras-cry",
"red-lies-lick",
"red-moose-do",
"rich-timers-listen",
"selfish-bats-run",
"selfish-ways-know",
"shaggy-experts-give",
"sharp-baboons-smile",
"sharp-bobcats-grab",
"sharp-crews-watch",
"shiny-ears-care",
"shy-walls-exercise",
"silver-coins-invent",
"six-roses-flow",
"six-spiders-smoke",
"sixty-items-promise",
"slimy-plums-sniff",
"slimy-rockets-pull",
"slow-fishes-reply",
"soft-moles-whisper",
"strange-bottles-impress",
"strange-mice-bake",
"stupid-walls-tie",
"tame-terms-push",
"three-lies-do",
"tidy-dolls-walk",
"tidy-keys-push",
"tiny-socks-count",
"twenty-items-drum",
"warm-drinks-prove",
"weak-jars-rhyme",
"wild-bugs-work",
"wise-spies-shave",
"wise-tomatoes-brake",
"yellow-yaks-jog"
]
}
5 changes: 5 additions & 0 deletions .changeset/rotten-bats-look.md
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
5 changes: 5 additions & 0 deletions .changeset/sharp-bobcats-grab.md
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.
6 changes: 6 additions & 0 deletions .changeset/thirty-cats-juggle.md
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).
5 changes: 5 additions & 0 deletions .changeset/tidy-paws-type.md
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.
5 changes: 5 additions & 0 deletions .changeset/tricky-crews-agree.md
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.
5 changes: 5 additions & 0 deletions .changeset/weak-falcons-study.md
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.
8 changes: 8 additions & 0 deletions packages/components-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @swisspost/design-system-components-angular-workspace

## 1.1.10-next.7

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-components@9.0.0-next.7
- @swisspost/design-system-styles@9.0.0-next.7

## 1.1.10-next.6

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/components-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-components-angular-workspace",
"version": "1.1.10-next.6",
"version": "1.1.10-next.7",
"scripts": {
"start": "ng serve --port 9210",
"build": "ng build components",
Expand All @@ -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.6",
"@swisspost/design-system-styles": "workspace:9.0.0-next.6",
"@swisspost/design-system-components": "workspace:9.0.0-next.7",
"@swisspost/design-system-styles": "workspace:9.0.0-next.7",
"rxjs": "7.8.1",
"tslib": "2.6.3",
"zone.js": "0.14.8"
Expand Down
7 changes: 7 additions & 0 deletions packages/components-angular/projects/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @swisspost/design-system-components-angular

## 9.0.0-next.7

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-components@9.0.0-next.7

## 9.0.0-next.6

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components-angular/projects/components/package.json
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",
Expand All @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions packages/components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @swisspost/design-system-components-react

## 9.0.0-next.7

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-components@9.0.0-next.7

## 9.0.0-next.6

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components-react/package.json
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",
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 16 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @swisspost/design-system-components

## 9.0.0-next.7

### Minor Changes

- Added the `post-togglebutton` component. (by [@veyaromain](https://github.com/veyaromain) with [#3889](https://github.com/swisspost/design-system/pull/3889))

- Refactored `post-icon` component to use the `<use>` tag to load and show icons under the hood. This enables responsive icons, enables better caching and improves render performance slightly. There is no further action required. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#3969](https://github.com/swisspost/design-system/pull/3969))

### Patch Changes

- Fixed bug that showed delayed tooltip even after blur event. (by [@leagrdv](https://github.com/leagrdv) with [#4053](https://github.com/swisspost/design-system/pull/4053))

- Made `post-icon` component use base tag href to define location of icons folder. (by [@leagrdv](https://github.com/leagrdv) with [#4069](https://github.com/swisspost/design-system/pull/4069))
- Updated dependencies:
- @swisspost/design-system-styles@9.0.0-next.7

## 9.0.0-next.6

### Major Changes
Expand Down
61 changes: 61 additions & 0 deletions packages/components/cypress/e2e/back-to-top.cy.ts
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 packages/components/cypress/fixtures/post-back-to-top.test.html
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>
7 changes: 4 additions & 3 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-components",
"version": "9.0.0-next.6",
"version": "9.0.0-next.7",
"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",
Expand All @@ -26,7 +26,7 @@
"scripts": {
"dev": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
"start": "stencil build --dev --watch --docs --docs-readme",
"build": "rimraf dist && stencil build --docs-readme",
"build": "pnpm clean && stencil build --docs-readme",
"clean": "rimraf www dist loader loaders",
"test": "pnpm run unit",
"unit": "stencil test --spec",
Expand All @@ -40,7 +40,8 @@
"dependencies": {
"@floating-ui/dom": "1.6.8",
"@oddbird/popover-polyfill": "0.3.7",
"@swisspost/design-system-styles": "workspace:9.0.0-next.6",
"@swisspost/design-system-styles": "workspace:9.0.0-next.7",
"@swisspost/design-system-icons": "workspace:9.0.0-next.7",
"ally.js": "1.4.1",
"long-press-event": "2.5.0"
},
Expand Down
Loading

0 comments on commit daa9d98

Please sign in to comment.