@swisspost/design-system-styles 6.2.4 → 6.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,10 +20,13 @@
20
20
 
21
21
  @mixin button-size($size: md) {
22
22
  min-height: map.get(button.$btn-height-map, $size);
23
- padding: 0 map.get(button.$btn-padding-x-map, $size);
24
23
  font-size: map.get(button.$btn-font-size-map, $size);
25
24
  gap: map.get(button.$btn-padding-x-map, $size) * 0.5;
26
25
 
26
+ &:where(:not(.btn-link, .btn-tertiary)) {
27
+ padding: 0 map.get(button.$btn-padding-x-map, $size);
28
+ }
29
+
27
30
  > .pi {
28
31
  width: map.get(button.$btn-icon-size-map, $size);
29
32
  height: map.get(button.$btn-icon-size-map, $size);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-styles",
3
- "version": "6.2.4",
3
+ "version": "6.2.6",
4
4
  "description": "Design System Styles for the Swiss Post web platform.",
5
5
  "author": "Swiss Post <oss@post.ch>",
6
6
  "license": "Apache-2.0",
@@ -21,31 +21,31 @@
21
21
  "@angular-devkit/schematics": "=15.0.4",
22
22
  "@angular/core": "=15.0.4",
23
23
  "@popperjs/core": "2.11.8",
24
- "bootstrap": "5.3.0",
24
+ "bootstrap": "5.3.1",
25
25
  "cheerio": "1.0.0-rc.12",
26
26
  "prettier": "2.8.8"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@angular/compiler": "=15.0.4",
30
- "@percy/cli": "1.26.1",
30
+ "@percy/cli": "1.26.2",
31
31
  "@percy/cypress": "3.1.2",
32
- "@swisspost/design-system-icons": "1.0.7",
33
- "@types/node": "18.16.18",
32
+ "@swisspost/design-system-icons": "1.0.9",
33
+ "@types/node": "18.17.1",
34
34
  "autoprefixer": "10.4.14",
35
35
  "copyfiles": "2.4.1",
36
- "cypress": "12.15.0",
36
+ "cypress": "12.17.2",
37
37
  "cypress-storybook": "0.5.1",
38
- "glob": "10.3.0",
38
+ "glob": "10.3.3",
39
39
  "gulp": "4.0.2",
40
40
  "gulp-postcss": "9.0.1",
41
41
  "gulp-sass": "5.1.0",
42
- "jest": "29.5.0",
42
+ "jest": "29.6.2",
43
43
  "npm-run-all": "4.1.5",
44
- "postcss": "8.4.24",
44
+ "postcss": "8.4.27",
45
45
  "postcss-scss": "4.0.6",
46
46
  "rimraf": "5.0.1",
47
- "sass": "1.63.6",
48
- "stylelint": "15.9.0",
47
+ "sass": "1.64.1",
48
+ "stylelint": "15.10.2",
49
49
  "stylelint-config-prettier": "9.0.5",
50
50
  "stylelint-config-sass-guidelines": "9.0.1",
51
51
  "stylelint-prettier": "2.0.0",
@@ -69,7 +69,7 @@
69
69
  "prebuild": "pnpm clean",
70
70
  "build": "npm-run-all --parallel styles:build schematics:build",
71
71
  "styles:build": "gulp build",
72
- "test": "jest --onlyChanged",
72
+ "test": "gulp sass:tests",
73
73
  "clean": "rimraf out-tsc dist",
74
74
  "format": "prettier src/**/*.scss --write",
75
75
  "lint": "stylelint src/**/*.scss",
@@ -3,23 +3,35 @@
3
3
  @use './../variables/components/button';
4
4
 
5
5
  %btn-default {
6
- border: button.$btn-border-width solid rgba(var(--post-contrast-color-rgb), 0.2);
6
+ border: button.$btn-border-width solid var(--post-gray-60);
7
7
 
8
8
  @include utilities.not-disabled-focus-hover() {
9
9
  border-color: var(--post-contrast-color);
10
- color: var(--post-contrast-color); // Override <a> color
11
10
  }
12
11
 
13
12
  @include color-mx.on-dark-background() {
14
13
  border-color: var(--post-contrast-color);
15
14
 
16
15
  @include utilities.not-disabled-focus-hover() {
17
- border-color: rgba(var(--post-contrast-color-rgb), 0.4);
16
+ border-color: var(--post-gray-40);
18
17
  }
19
18
  }
20
19
 
21
20
  &:disabled {
22
- border-color: rgba(var(--post-contrast-color-rgb), 0.4);
23
- color: rgba(var(--post-contrast-color-rgb), 0.6);
21
+ border-color: var(--post-gray-40);
22
+ color: var(--post-gray-60);
23
+ }
24
+ }
25
+
26
+ %btn-transparent-background {
27
+ @include utilities.not-disabled-focus-hover() {
28
+ color: var(--post-contrast-color);
29
+ }
30
+
31
+ // Invert icon on dark backgrounds
32
+ @include color-mx.on-dark-background() {
33
+ .pi {
34
+ filter: invert(1);
35
+ }
24
36
  }
25
37
  }
@@ -29,6 +29,7 @@ $font-size-small-huge: sizing.px-to-rem(48px);
29
29
  $font-size-huge: sizing.px-to-rem(56px);
30
30
 
31
31
  // New
32
+ $font-size-12: sizing.px-to-rem(12px);
32
33
  $font-size-14: sizing.px-to-rem(14px);
33
34
  $font-size-16: sizing.px-to-rem(16px);
34
35
  $font-size-18: sizing.px-to-rem(18px);
@@ -43,7 +43,7 @@ $btn-padding-x-sm: spacing.$size-regular !default;
43
43
  $btn-animation-distance-sm: spacing.$size-mini !default;
44
44
  // Design System only
45
45
  $btn-height-sm: 2rem;
46
- $btn-font-size-sm: type.$font-size-tiny !default;
46
+ $btn-font-size-sm: type.$font-size-12 !default;
47
47
  $btn-icon-size-sm: spacing.$size-regular !default;
48
48
 
49
49
  // rg
@@ -52,7 +52,7 @@ $btn-padding-x-rg: spacing.$size-large !default;
52
52
  $btn-animation-distance-rg: 0.625rem !default;
53
53
  // Design System only
54
54
  $btn-height-rg: 2.5rem;
55
- $btn-font-size-rg: type.$font-size-regular !default;
55
+ $btn-font-size-rg: type.$font-size-14 !default;
56
56
  $btn-icon-size-rg: 1.125rem !default;
57
57
 
58
58
  // md
@@ -61,7 +61,7 @@ $btn-padding-x-md: spacing.$size-big !default;
61
61
  $btn-animation-distance-md: spacing.$size-small-regular !default;
62
62
  // Design System only
63
63
  $btn-height-md: 3rem;
64
- $btn-font-size-md: type.$font-size-regular !default;
64
+ $btn-font-size-md: type.$font-size-16 !default;
65
65
  $btn-icon-size-md: spacing.$size-small-large !default;
66
66
 
67
67
  // lg
@@ -70,7 +70,7 @@ $btn-padding-x-lg: spacing.$size-bigger-big !default;
70
70
  $btn-animation-distance-lg: spacing.$size-regular !default;
71
71
  // Design System only
72
72
  $btn-height-lg: 3.5rem;
73
- $btn-font-size-lg: type.$font-size-bigger-regular !default;
73
+ $btn-font-size-lg: type.$font-size-18 !default;
74
74
  $btn-icon-size-lg: spacing.$size-large !default;
75
75
 
76
76
  // Available button sizes except the default, which is md