Skip to content

Commit

Permalink
Merge branch 'main' into 3207-component_breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
alionazherdetska committed Nov 28, 2024
2 parents 73e3441 + 63fd1ce commit 5618f58
Show file tree
Hide file tree
Showing 125 changed files with 2,531 additions and 1,297 deletions.
6 changes: 6 additions & 0 deletions .changeset/big-hats-clap.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 a new `segmented-button` component, which allows users to toggle between two or more content sections within the same area on the screen.
6 changes: 6 additions & 0 deletions .changeset/blue-kings-beg.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 overflow utilities into the design system.
5 changes: 5 additions & 0 deletions .changeset/chatty-kiwis-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': minor
---

Simplified the markup structure for checkboxes by removing the need to use the classes `.form-check-input` and `.form-check-label` on the input field and the label respectively. You can safely remove these classes from your markup, they no longer have any effect.
5 changes: 5 additions & 0 deletions .changeset/dirty-squids-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': minor
---

Updated radio-button styles with Design Tokens.
6 changes: 6 additions & 0 deletions .changeset/khaki-cougars-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-styles': minor
'@swisspost/design-system-documentation': minor
---

Addes Cargo theme styles.
5 changes: 5 additions & 0 deletions .changeset/nasty-ads-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-tokens': minor
---

Export new SASS maps for Post and Cargo palettes, directly linking to the raw color values for both light and dark color schemes.
18 changes: 18 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@
"2024-11-10-update-icons",
"beige-jobs-do",
"big-frogs-admire",
"big-hats-clap",
"big-socks-dress",
"blue-kings-beg",
"brave-kings-dance",
"breezy-cups-add",
"brown-badgers-dream",
"chatty-kiwis-travel",
"clean-icons-complain",
"cold-baboons-appear",
"cold-panthers-vanish",
"cuddly-bears-check",
"cuddly-gifts-film",
"dirty-mayflies-taste",
"dirty-squids-hunt",
"dry-moons-walk",
"eight-turkeys-matter",
"eleven-keys-work",
Expand All @@ -55,14 +60,19 @@
"great-humans-talk",
"grumpy-parrots-wonder",
"heavy-rats-explode",
"khaki-cougars-itch",
"kind-buses-trade",
"kind-papayas-provide",
"lazy-gorillas-admire",
"lemon-clocks-clean",
"long-shrimps-roll",
"loud-dingos-remember",
"loud-peaches-hang",
"lovely-deers-itch",
"lovely-mirrors-travel",
"metal-pens-explode",
"metal-rivers-look",
"nasty-ads-greet",
"neat-suits-provide",
"nervous-rocks-shop",
"new-goats-impress",
Expand All @@ -89,14 +99,22 @@
"shiny-ears-care",
"shy-walls-exercise",
"silver-coins-invent",
"six-roses-flow",
"six-spiders-smoke",
"sixty-items-promise",
"slimy-rockets-pull",
"slow-fishes-reply",
"soft-moles-whisper",
"strange-bottles-impress",
"stupid-walls-tie",
"tame-terms-push",
"three-lies-do",
"tidy-dolls-walk",
"tidy-keys-push",
"tiny-socks-count",
"twenty-items-drum",
"weak-jars-rhyme",
"wild-bugs-work",
"wise-spies-shave",
"yellow-yaks-jog"
]
Expand Down
5 changes: 5 additions & 0 deletions .changeset/slow-fishes-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': minor
---

Updated checkbox styles with Design Tokens.
5 changes: 5 additions & 0 deletions .changeset/stupid-walls-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@swisspost/design-system-styles": minor
---

Updated switch styles with Design Tokens.
6 changes: 6 additions & 0 deletions .changeset/tidy-keys-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-documentation': major
'@swisspost/design-system-styles': major
---

Removed deprecated `topic-teaser`.
6 changes: 6 additions & 0 deletions .changeset/twenty-items-drum.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
---

Updated the blockquote styles to match the new Post design.
6 changes: 6 additions & 0 deletions .changeset/weak-jars-rhyme.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 color palettes to easily apply colors to a page section using predefined color sets.
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.6

### Patch Changes

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

## 1.1.10-next.5

### 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.5",
"version": "1.1.10-next.6",
"scripts": {
"start": "ng serve --port 9210",
"build": "ng build components",
Expand All @@ -18,8 +18,8 @@
"@angular/platform-browser": "18.2.10",
"@angular/platform-browser-dynamic": "18.2.10",
"@angular/router": "18.2.10",
"@swisspost/design-system-components": "workspace:9.0.0-next.5",
"@swisspost/design-system-styles": "workspace:9.0.0-next.5",
"@swisspost/design-system-components": "workspace:9.0.0-next.6",
"@swisspost/design-system-styles": "workspace:9.0.0-next.6",
"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.6

### Patch Changes

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

## 9.0.0-next.5

### Minor 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.5",
"version": "9.0.0-next.6",
"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.5"
"@swisspost/design-system-components": "workspace:9.0.0-next.6"
},
"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.6

### Patch Changes

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

## 9.0.0-next.5

### Minor 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.5",
"version": "9.0.0-next.6",
"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.5"
"@swisspost/design-system-components": "workspace:9.0.0-next.6"
},
"devDependencies": {
"@types/node": "20.14.14",
Expand Down
13 changes: 13 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @swisspost/design-system-components

## 9.0.0-next.6

### Major Changes

- Renamed the alert component to banner and updated the styles of banner and toast components. The class `.alert` is still supported for now but is deprecated and will be removed in v10. Changed web component `<post-alert>` to `<post-banner>`. Additionally, the classes `.{toast|alert}-primary`, `.{toast|alert}-gray` and `.toast-notification` have been deprecated. (by [@leagrdv](https://github.com/leagrdv) with [#3862](https://github.com/swisspost/design-system/pull/3862))

- Removed the `alert-fixed-bottom` variant of the alert. (by [@leagrdv](https://github.com/leagrdv) with [#3862](https://github.com/swisspost/design-system/pull/3862))

### Patch Changes

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

## 9.0.0-next.5

### Minor Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link
href="../../node_modules/@swisspost/design-system-styles/post-external.css"
rel="stylesheet"
/>
<script src="../../dist/post-components/post-components.esm.js" type="module"></script>
<script>
function formHandler(e) {
Expand Down
4 changes: 2 additions & 2 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.5",
"version": "9.0.0-next.6",
"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 Down Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"@floating-ui/dom": "1.6.8",
"@oddbird/popover-polyfill": "0.3.7",
"@swisspost/design-system-styles": "workspace:9.0.0-next.5",
"@swisspost/design-system-styles": "workspace:9.0.0-next.6",
"ally.js": "1.4.1",
"long-press-event": "2.5.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
@use 'sass:math';
@use '@swisspost/design-system-styles/core' as post;
@use '@swisspost/design-system-styles/components/form-check';
@use '@swisspost/design-system-styles/components/checkbox';
@use '@swisspost/design-system-styles/components/radio-button';

/*
* There are a whole bunch of !important statements in this file.
* They are necessary and should not be removed, because we need to override the .form-check styles here.
*/

:host {

// remove as soon as all browser support :host-context()
// https://caniuse.com/?search=%3Ahost-context()
--post-card-control-bg-context: #{post.$backgrounds};
Expand All @@ -36,6 +37,7 @@
flex-basis: 100%;
display: grid;
grid-template: 'input label icon' 'input content content' / min-content auto min-content;
align-items: center;
gap: 0 post.$size-mini;
margin: 0;
padding: post.$size-regular;
Expand All @@ -54,6 +56,14 @@
cursor: inherit;
transition: none;

@include post.focus-style-none();

&:hover:not([disabled]),
&:hover:not([disabled]) ~ label.form-check-label {
color: var(--post-contrast-color);
background-color: transparent;
}

&:focus,
&:focus-visible {
box-shadow: none;
Expand All @@ -70,7 +80,7 @@
.card-control--label {
grid-area: label;
margin: post.$size-micro 0;
padding: 0;
padding: 0 !important;
color: inherit !important;
pointer-events: none;
transition: none;
Expand Down Expand Up @@ -170,17 +180,11 @@
--post-card-control-input-bg: transparent;

border-style: dashed;
text-decoration: line-through;
cursor: default;

.card-control--input {
border: 0 none;
padding: post.$form-check-input-border-width;
background-image: url('#{post.$form-check-input-disabled-background-url-light-lg}');

&[type='radio'] {
background-image: url('#{post.$form-check-input-radio-disabled-background-url-light}');
}
border-style: dashed;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export class PostCardControl {
<input
ref={el => (this.control = el)}
id={this.controlId}
class="card-control--input form-check-input"
class="card-control--input"
type={this.type}
name={this.name}
value={this.value}
Expand All @@ -381,7 +381,7 @@ export class PostCardControl {
<label
id={`${this.controlId}_label`}
htmlFor={this.controlId}
class="card-control--label form-check-label"
class="card-control--label"
>
{this.label}
{this.description ? (
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/post-list/post-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class PostList {
*/
@Prop() readonly horizontal: boolean = false;

titleEl: HTMLElement;
private titleEl: HTMLElement;

componentWillLoad() {
/**
Expand All @@ -43,7 +43,7 @@ export class PostList {
}

private checkTitle() {
if (!this.titleEl.innerText) {
if (!this.titleEl.textContent.trim()) {
throw new Error(
'Please provide a title to the list component. Title is mandatory for accessibility purposes.',
);
Expand Down
Loading

0 comments on commit 5618f58

Please sign in to comment.