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 5, 2024
2 parents 0b5d90a + 1708596 commit c4fac48
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 83 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-numbers-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Fixed ´switch´ alignment for long labels.
2 changes: 1 addition & 1 deletion .github/actions/artifact-download/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
using: composite
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v7
with:
name: ${{ inputs.name }}
run_id: ${{ github.event.workflow_run.id }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/swisspost/design-system/issues"
},
"scripts": {
"bootstrap": "pnpm install && pnpm -r build",
"bootstrap": "pnpm install && pnpm -r --filter \"!*-integration\" build",
"start": "pnpm docs:start",
"start:clean": "pnpm bootstrap && pnpm start",
"test": "pnpm -r test",
Expand Down
2 changes: 1 addition & 1 deletion packages/intranet-header-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"ng-packagr": "18.1.0",
"npm-run-all2": "5.0.0",
"npm-run-all2": "7.0.1",
"rimraf": "6.0.1",
"typescript": "5.5.4",
"wait-on": "8.0.1"
Expand Down
8 changes: 4 additions & 4 deletions packages/styles/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ gulp.task('sass', () => {
.src('./src/**/*.scss')
.pipe(
gulpSass({
outputStyle: 'compressed',
includePaths: options.includePaths,
style: 'compressed',
loadPaths: options.loadPaths,
quietDeps: true,
}),
)
Expand All @@ -136,7 +136,7 @@ gulp.task('sass:dev', () => {
.pipe(sourcemaps.init())
.pipe(
gulpSass({
includePaths: options.includePaths,
loadPaths: options.loadPaths,
quietDeps: true,
}),
)
Expand All @@ -153,7 +153,7 @@ gulp.task(
gulp.series('temporarily-copy-token-files', () => {
return gulp.src('./tests/**/*.scss').pipe(
gulpSass.sync({
includePaths: options.includePaths,
loadPaths: [...options.loadPaths, './'],
quietDeps: true,
}),
);
Expand Down
4 changes: 2 additions & 2 deletions packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"gulp": "5.0.0",
"gulp-newer": "^1.4.0",
"gulp-postcss": "10.0.0",
"gulp-sass": "5.1.0",
"gulp-sass": "6.0.0",
"jest": "29.7.0",
"postcss": "8.4.40",
"postcss-scss": "4.0.9",
Expand All @@ -73,7 +73,7 @@
"vite": "5.4.8"
},
"sass": {
"includePaths": [
"loadPaths": [
"node_modules"
],
"outputDir": "./dist"
Expand Down
5 changes: 2 additions & 3 deletions packages/styles/src/components/_form-check.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}

&:hover ~ label {
color: tokens.get('switch-element-hover-bg', components.$post-switch);
color: tokens.get('switch-text-enabled-fg', components.$post-switch);

@include utility-mx.high-contrast-mode() {
color: Highlight;
Expand All @@ -103,8 +103,7 @@
}

&[disabled] ~ label {
color: tokens.get('switch-element-disabled-bg', components.$post-switch);

color: tokens.get('switch-text-disabled-fg', components.$post-switch);
@include utility-mx.high-contrast-mode() {
color: GrayText;
}
Expand Down
11 changes: 3 additions & 8 deletions packages/styles/src/components/switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ $switch-handle-icon: url("data:image/svg+xml,<svg viewBox='0 0 16 16' xmlns='htt
.form-switch {
display: flex;

@include utility-mx.focus-style() {
&:has(> input:only-child) {
border-radius: tokens.get('switch-border-radius-round');
}
}

.form-check-input {
appearance: none;
cursor: pointer;
Expand All @@ -31,6 +25,7 @@ $switch-handle-icon: url("data:image/svg+xml,<svg viewBox='0 0 16 16' xmlns='htt
align-items: center;
height: tokens.get('switch-element-height');
width: tokens.get('switch-element-width');
margin-block: tokens.get('switch-icon-padding-container');
border: tokens.get('switch-border-width') tokens.get('switch-border-style-default')
tokens.get('switch-element-enabled-stroke');
border-radius: tokens.get('switch-border-radius-round');
Expand Down Expand Up @@ -179,7 +174,7 @@ $switch-handle-icon: url("data:image/svg+xml,<svg viewBox='0 0 16 16' xmlns='htt
}
}

&:hover > .form-check-input:not([disabled]) {
&:has(input:not([disabled]):hover) input {
background-color: tokens.get('switch-element-hover-bg');
border-color: tokens.get('switch-element-hover-stroke');

Expand All @@ -189,7 +184,7 @@ $switch-handle-icon: url("data:image/svg+xml,<svg viewBox='0 0 16 16' xmlns='htt
}

&:checked::before {
background-color: tokens.get('switch-element-hover-bg');
background-color: tokens.get('switch-icon-hover');
}

@include utility-mx.high-contrast-mode {
Expand Down
83 changes: 20 additions & 63 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c4fac48

Please sign in to comment.