@swisspost/design-system-styles 7.2.0 → 7.3.0

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.
Files changed (73) hide show
  1. package/_svg-icon-map.scss +8 -0
  2. package/basics.css +1 -1
  3. package/components/accordion.css +1 -0
  4. package/components/alert.css +29 -0
  5. package/components/badge.css +1 -0
  6. package/components/base.css +29 -0
  7. package/components/breadcrumb.css +29 -0
  8. package/components/button-group.css +29 -0
  9. package/components/button.css +1 -0
  10. package/components/button.scss +65 -31
  11. package/components/card-control.css +1 -0
  12. package/components/card.css +29 -0
  13. package/components/carousel.css +29 -0
  14. package/components/chip.css +29 -0
  15. package/components/close.css +1 -0
  16. package/components/datatable.css +17 -0
  17. package/components/datepicker.css +1 -0
  18. package/components/datepicker.scss +3 -1
  19. package/components/dropdown.css +29 -0
  20. package/components/elevation.css +1 -0
  21. package/components/error-container.css +1 -0
  22. package/components/floating-label.css +29 -0
  23. package/components/floating-label.scss +2 -2
  24. package/components/fonts.css +1 -0
  25. package/components/form-check.css +1 -0
  26. package/components/form-range.css +29 -0
  27. package/components/form-select.css +29 -0
  28. package/components/form-select.scss +3 -5
  29. package/components/form-textarea.css +1 -0
  30. package/components/form-validation.css +29 -0
  31. package/components/form-validation.scss +23 -3
  32. package/components/forms.css +29 -0
  33. package/components/forms.scss +3 -3
  34. package/components/grid.css +29 -0
  35. package/components/icons.css +1 -0
  36. package/components/intranet-header/_searchbox.scss +0 -1
  37. package/components/intranet-header/_top-navigation.scss +0 -1
  38. package/components/list-group.css +29 -0
  39. package/components/modal.css +31 -0
  40. package/components/offcanvas.css +29 -0
  41. package/components/pagination.css +29 -0
  42. package/components/popover.css +29 -0
  43. package/components/product-card.css +29 -0
  44. package/components/progress.css +29 -0
  45. package/components/reboot.css +29 -0
  46. package/components/root.css +1 -0
  47. package/components/sizing.css +1 -0
  48. package/components/spinner.css +29 -0
  49. package/components/stepper.css +1 -0
  50. package/components/subnavigation.css +29 -0
  51. package/components/tables.css +29 -0
  52. package/components/tag.css +1 -0
  53. package/components/timepicker.css +1 -0
  54. package/components/toast.css +29 -0
  55. package/components/tooltip.css +29 -0
  56. package/components/topic-teaser.css +1 -0
  57. package/components/transitions.css +29 -0
  58. package/components/type.css +29 -0
  59. package/components/utilities.css +29 -0
  60. package/index.css +3 -3
  61. package/intranet.css +3 -3
  62. package/layouts/portal/_type.scss +0 -1
  63. package/mixins/_color.scss +3 -3
  64. package/mixins/_utilities.scss +10 -4
  65. package/package.json +8 -8
  66. package/placeholders/_button.scss +0 -21
  67. package/placeholders/_text.scss +0 -3
  68. package/variables/_type.scss +1 -1
  69. package/variables/components/_accordion.scss +1 -1
  70. package/variables/components/_form-select.scss +2 -2
  71. package/variables/components/_forms.scss +2 -2
  72. package/variables/components/_notification.scss +1 -1
  73. package/variables/components/_tables.scss +28 -21
@@ -68,7 +68,6 @@
68
68
 
69
69
  p {
70
70
  margin-top: 0;
71
- font-weight: type.$font-weight-light;
72
71
  }
73
72
 
74
73
  h5,
@@ -24,12 +24,12 @@
24
24
  // Selector for styles to be applied on dark backgrounds
25
25
  @mixin on-dark-background($contains: false) {
26
26
  @if $contains == true {
27
- &:is(#{color.$dark-backgrounds}),
28
- :is(#{color.$dark-backgrounds}) & {
27
+ &:where(#{color.$dark-backgrounds}),
28
+ :where(#{color.$dark-backgrounds}) & {
29
29
  @content;
30
30
  }
31
31
  } @else {
32
- :is(#{color.$dark-backgrounds}) & {
32
+ :where(#{color.$dark-backgrounds}) & {
33
33
  @content;
34
34
  }
35
35
  }
@@ -83,6 +83,13 @@
83
83
  }
84
84
  }
85
85
 
86
+ @mixin not-disabled-hover {
87
+ &:not(:disabled):hover,
88
+ &.pretend-hover {
89
+ @content;
90
+ }
91
+ }
92
+
86
93
  @mixin focus-style-none {
87
94
  outline: none;
88
95
  }
@@ -149,18 +156,17 @@
149
156
  @mixin disabled-style($additional-selector: '') {
150
157
  &:disabled#{$additional-selector} {
151
158
  pointer-events: none;
152
- color: var(--post-gray-40);
159
+ color: var(--post-gray-60);
153
160
  border-color: var(--post-gray-40);
154
161
  border-style: dashed;
155
162
  background-clip: padding-box;
156
163
  text-decoration: line-through;
164
+ // In case rules need to be slightly adjusted
165
+ @content;
157
166
 
158
167
  @include high-contrast-mode() {
159
168
  color: GrayText;
160
169
  border-color: GrayText;
161
170
  }
162
-
163
- // In case rules need to be slightly adjusted
164
- @content;
165
171
  }
166
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-styles",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "Design System Styles for the Swiss Post web platform.",
5
5
  "author": "Swiss Post <design-system@post.ch>",
6
6
  "license": "Apache-2.0",
@@ -37,25 +37,25 @@
37
37
  "bootstrap": "5.3.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@swisspost/design-system-icons": "7.2.0",
41
- "@types/node": "20.14.0",
40
+ "@swisspost/design-system-icons": "7.3.0",
41
+ "@types/node": "20.14.9",
42
42
  "autoprefixer": "10.4.19",
43
43
  "copyfiles": "2.4.1",
44
- "glob": "10.4.1",
44
+ "glob": "11.0.0",
45
45
  "gulp": "5.0.0",
46
46
  "gulp-newer": "^1.4.0",
47
47
  "gulp-postcss": "10.0.0",
48
48
  "gulp-sass": "5.1.0",
49
49
  "jest": "29.7.0",
50
- "postcss": "8.4.38",
50
+ "postcss": "8.4.39",
51
51
  "postcss-scss": "4.0.9",
52
52
  "prettier": "3.3.2",
53
- "rimraf": "5.0.7",
54
- "sass": "1.77.5",
53
+ "rimraf": "6.0.1",
54
+ "sass": "1.77.6",
55
55
  "stylelint": "16.6.1",
56
56
  "stylelint-config-sass-guidelines": "11.1.0",
57
57
  "stylelint-prettier": "5.0.0",
58
- "stylelint-scss": "6.3.1",
58
+ "stylelint-scss": "6.3.2",
59
59
  "typescript": "5.3.3"
60
60
  },
61
61
  "sass": {
@@ -2,27 +2,6 @@
2
2
  @use './../mixins/color' as color-mx;
3
3
  @use './../variables/components/button';
4
4
 
5
- %btn-default {
6
- border: button.$btn-border-width solid var(--post-gray-60);
7
-
8
- @include utilities.not-disabled-focus-hover() {
9
- border-color: var(--post-contrast-color);
10
- }
11
-
12
- @include color-mx.on-dark-background() {
13
- border-color: var(--post-contrast-color);
14
-
15
- @include utilities.not-disabled-focus-hover() {
16
- border-color: var(--post-gray-40);
17
- }
18
- }
19
-
20
- &:disabled {
21
- border-color: var(--post-gray-40);
22
- color: var(--post-gray-60);
23
- }
24
- }
25
-
26
5
  %btn-transparent-background {
27
6
  @include utilities.not-disabled-focus-hover() {
28
7
  color: var(--post-contrast-color);
@@ -18,7 +18,6 @@
18
18
 
19
19
  li {
20
20
  margin-bottom: paragraph.$text-bottom-space * 0.5;
21
- font-weight: type.$font-weight-light;
22
21
 
23
22
  &::before {
24
23
  content: '\2013';
@@ -78,7 +77,6 @@
78
77
  li {
79
78
  @extend %font-curve-regular;
80
79
  @extend %text-bottom-spacer;
81
- font-weight: type.$font-weight-light;
82
80
 
83
81
  &::before {
84
82
  content: '\2013';
@@ -131,7 +129,6 @@
131
129
  counter-reset: li-counter;
132
130
 
133
131
  li {
134
- font-weight: type.$font-weight-light;
135
132
  counter-increment: li-counter;
136
133
 
137
134
  &::before {
@@ -232,7 +232,7 @@ $blockquote-footer-font-size: math.div(
232
232
  $lead-font-size * sizing.strip-unit($small-font-size),
233
233
  100
234
234
  ) !default;
235
- $blockquote-cite-font-weight: $font-weight-light !default;
235
+ $blockquote-cite-font-weight: $font-weight-normal !default;
236
236
 
237
237
  $hr-border-color: rgba(color.$black, 0.1) !default; // Design System
238
238
  $hr-border-color-light: rgba(color.$white, 0.4) !default; // Design System only
@@ -32,7 +32,7 @@ $accordion-icon-transition: transform animation.$transition-base-timing !default
32
32
  $accordion-icon-transform: rotate(-180deg) !default;
33
33
 
34
34
  $accordion-body-padding: $accordion-gap $accordion-padding $accordion-padding !default;
35
- $accordion-body-font-weight: type.$font-weight-light !default;
35
+ $accordion-body-font-weight: type.$font-weight-normal !default;
36
36
 
37
37
  // Deprecated
38
38
  $accordion-padding-x: spacing.$size-regular !default;
@@ -5,10 +5,10 @@
5
5
  $form-select-border-radius: forms.$input-border-radius;
6
6
  $form-select-disabled-color: forms.$input-disabled-color;
7
7
  $form-select-disabled-bg: forms.$input-disabled-bg;
8
- $form-select-disabled-border-color: forms.$input-disabled-border-color;
8
+ $form-select-disabled-border-color: color.$gray-40;
9
9
  $form-select-indicator-color: color.$black;
10
10
  $form-select-indicator: url('#{icons.get-colored-svg-url('2113', $form-select-indicator-color)}') !default;
11
- $form-select-indicator-disabled: url('#{icons.get-colored-svg-url('2113', $form-select-disabled-color)}') !default;
11
+ $form-select-indicator-disabled: url('#{icons.get-colored-svg-url('2113', $form-select-disabled-border-color)}') !default;
12
12
  $form-select-indicator-hcm-dark: url('#{icons.get-colored-svg-url('2113', color.$white)}') !default;
13
13
  $form-select-indicator-hcm-light: url('#{icons.get-colored-svg-url('2113', color.$black)}') !default;
14
14
 
@@ -37,8 +37,8 @@ $input-line-height-lg: type.$line-height-copy !default;
37
37
 
38
38
  $input-bg: color.$white !default;
39
39
  $input-disabled-bg: rgba(var(--post-contrast-color-inverted-rgb), 0.4) !default;
40
- $input-disabled-color: rgba(var(--post-contrast-color-rgb), 0.6); // Design System only
41
- $input-disabled-border-color: color.$gray-40; // Design System only
40
+ $input-disabled-color: var(--post-gray-60); // Design System only
41
+ $input-disabled-border-color: var(--post-gray-40); // Design System only
42
42
  $input-disabled-border-style: spacing.$size-line dashed;
43
43
 
44
44
  $input-color: color.$black !default;
@@ -10,7 +10,7 @@ $notification-box-shadow: 0 2px 4px 0 rgba(color.$black, 0.2) !default;
10
10
  $notification-border-radius: commons.$border-radius !default;
11
11
  $notification-gap: spacing.$size-small-large !default;
12
12
  $notification-body-gap: spacing.$size-micro !default;
13
- $notification-font-weight: type.$font-weight-light !default;
13
+ $notification-font-weight: type.$font-weight-normal !default;
14
14
  $notification-link-font-weight: type.$font-weight-normal !default;
15
15
  $notification-heading-font-weight: type.$headings-font-weight !default;
16
16
  $notification-buttons-gap: spacing.$size-mini !default;
@@ -4,35 +4,42 @@
4
4
  @use './../spacing';
5
5
  @use './../type';
6
6
 
7
+ // Bootstrap variables
7
8
  $table-cell-padding-y: spacing.$size-small-regular !default;
8
- $table-cell-padding-x: $table-cell-padding-y !default;
9
- $table-cell-padding: $table-cell-padding-y $table-cell-padding-x !default;
10
-
11
- $table-cell-padding-y-sm: spacing.$size-micro !default;
12
- $table-cell-padding-x-sm: $table-cell-padding-y-sm !default;
13
- $table-cell-padding-sm: $table-cell-padding-y-sm $table-cell-padding-x-sm !default;
14
-
15
- // Tables
16
- //
17
- // Customizes the `.table` component with basic values, each used across all table variations.
18
-
9
+ $table-cell-padding-x: spacing.$size-mini !default;
10
+ $table-cell-padding-y-sm: spacing.$size-mini !default;
11
+ $table-cell-padding-x-sm: spacing.$size-micro !default;
12
+ $table-cell-vertical-align: top !default;
13
+ $table-color: var(--post-contrast-color) !default;
19
14
  $table-bg: transparent !default;
20
15
  $table-accent-bg: transparent !default;
21
- $table-hover-bg: rgba(color.$black, 0.075) !default;
22
- $table-active-bg: $table-hover-bg !default;
23
-
16
+ $table-th-font-weight: type.$font-weight-bold !default;
17
+ $table-striped-color: $table-color !default;
18
+ $table-striped-bg-factor: 1 !default;
19
+ $table-striped-bg: color.$light !default;
20
+ $table-active-color: $table-color !default;
21
+ $table-active-bg-factor: 1 !default;
22
+ $table-active-bg: color.$yellow !default;
23
+ $table-hover-color: $table-color !default;
24
+ $table-hover-bg-factor: 1 !default;
25
+ $table-hover-bg: color.$gray-10 !default;
26
+ $table-border-factor: 1 !default;
24
27
  $table-border-width: commons.$border-width !default;
25
- $table-border-color: rgba(var(--post-contrast-color-rgb), 0.4) !default;
26
- $table-group-separator-color: rgba(var(--post-contrast-color-rgb), 0.4) !default;
28
+ $table-border-color: color.$gray-10 !default;
29
+ $table-striped-order: odd !default;
30
+ $table-striped-columns-order: even !default;
31
+ $table-group-separator-color: color.$gray-10 !default;
32
+ $table-caption-color: var(--post-gray-60) !default;
33
+ $table-bg-scale: -80% !default;
27
34
 
28
- $table-head-color: color.$gray-40 !default;
35
+ // Custom variables
36
+ $table-cell-padding: $table-cell-padding-y $table-cell-padding-x !default;
37
+ $table-cell-padding-sm: $table-cell-padding-y-sm $table-cell-padding-x-sm !default;
29
38
 
39
+ // DEPRECATED
40
+ $table-head-color: red !default;
30
41
  $table-dark-bg: color.$gray-80 !default;
31
42
  $table-dark-accent-bg: rgba(color.$white, 0.05) !default;
32
43
  $table-dark-hover-bg: rgba(color.$white, 0.075) !default;
33
44
  $table-dark-border-color: sass-color.adjust(color.$gray-80, $lightness: 7.5%) !default;
34
45
  $table-dark-color: color.$black !default;
35
-
36
- $table-striped-order: odd !default;
37
-
38
- $table-caption-color: type.$text-muted !default;