@swisspost/design-system-styles 6.5.0 → 6.6.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.
- package/README.md +1 -1
- package/_svg-icon-map.scss +796 -784
- package/basics.css +1 -1
- package/components/accordion.scss +2 -17
- package/components/datatable.scss +2 -0
- package/components/elevation.scss +2 -1
- package/components/floating-label.scss +1 -0
- package/components/form-select.scss +2 -3
- package/components/form-validation.scss +30 -11
- package/components/grid.scss +7 -1
- package/components/intranet-header/_layout.scss +8 -0
- package/components/intranet-header/index.scss +1 -0
- package/components/sizing.scss +15 -0
- package/components/tabs/_tab-title.scss +1 -1
- package/components/tabs/_tabs-wrapper.scss +1 -2
- package/functions/_contrast.scss +9 -0
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/layouts/portal/_grid.scss +5 -0
- package/mixins/_accordion.scss +16 -0
- package/mixins/_elevation.scss +6 -0
- package/package.json +22 -12
- package/placeholders/_close.scss +6 -0
- package/variables/_color.scss +1 -1
- package/variables/components/_badge.scss +4 -1
- package/variables/components/_breadcrumbs.scss +2 -1
- package/variables/components/_form-check.scss +2 -1
- package/variables/components/_forms.scss +3 -0
- package/variables/components/_nav.scss +8 -3
- package/variables/components/_notification.scss +9 -7
- package/variables/components/_tables.scss +2 -1
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
//deprecated
|
|
19
20
|
// px-gutters class is used to manipulate border collapse in product-cards
|
|
20
21
|
.row.px-gutters {
|
|
21
22
|
margin-right: -(commons.$border-width);
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
//deprecated
|
|
51
53
|
.vertical-gutters {
|
|
52
54
|
margin-bottom: -(portal-variables.$grid-gutter-width-rg);
|
|
53
55
|
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
63
|
+
//deprecated
|
|
61
64
|
@each $breakpoint in grid.$grid-breakpoints-list {
|
|
62
65
|
.container-fluid-#{$breakpoint} {
|
|
63
66
|
@include media-breakpoint-only($breakpoint) {
|
|
@@ -67,12 +70,14 @@
|
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
//deprecated
|
|
70
74
|
.container-reset-right-rg-up {
|
|
71
75
|
@include media-breakpoint-up(rg) {
|
|
72
76
|
margin-left: 0;
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
|
|
80
|
+
//deprecated
|
|
76
81
|
.container-reset-left-rg-up {
|
|
77
82
|
@include media-breakpoint-up(rg) {
|
|
78
83
|
margin-right: 0;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use './../mixins/color' as color-mx;
|
|
2
|
+
@use './../functions/contrast';
|
|
3
|
+
@use './../variables/color';
|
|
4
|
+
|
|
5
|
+
@mixin background-color() {
|
|
6
|
+
// make light gray the default accordion color
|
|
7
|
+
@include color-mx.colored-background(color.$gray-background);
|
|
8
|
+
|
|
9
|
+
// make the accordion white on any background other than white
|
|
10
|
+
@each $name, $color in color.$background-colors {
|
|
11
|
+
.bg-#{$name} & {
|
|
12
|
+
$accordion-bg: if($color == color.$white, color.$gray-background, color.$white);
|
|
13
|
+
@include color-mx.colored-background($accordion-bg);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-styles",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
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",
|
|
@@ -33,27 +33,26 @@
|
|
|
33
33
|
"bootstrap": "5.3.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@swisspost/design-system-icons": "1.0
|
|
37
|
-
"@types/node": "18.19.
|
|
36
|
+
"@swisspost/design-system-icons": "1.1.0",
|
|
37
|
+
"@types/node": "18.19.7",
|
|
38
38
|
"autoprefixer": "10.4.16",
|
|
39
39
|
"copyfiles": "2.4.1",
|
|
40
40
|
"glob": "10.3.10",
|
|
41
41
|
"gulp": "4.0.2",
|
|
42
42
|
"gulp-newer": "^1.4.0",
|
|
43
|
-
"gulp-postcss": "9.0
|
|
43
|
+
"gulp-postcss": "9.1.0",
|
|
44
44
|
"gulp-sass": "5.1.0",
|
|
45
45
|
"jest": "29.7.0",
|
|
46
46
|
"npm-run-all": "4.1.5",
|
|
47
|
-
"postcss": "8.4.
|
|
47
|
+
"postcss": "8.4.33",
|
|
48
48
|
"postcss-scss": "4.0.9",
|
|
49
|
-
"prettier": "3.
|
|
49
|
+
"prettier": "3.2.2",
|
|
50
50
|
"rimraf": "5.0.5",
|
|
51
|
-
"sass": "1.69.
|
|
52
|
-
"stylelint": "
|
|
53
|
-
"stylelint-config-
|
|
54
|
-
"stylelint-
|
|
55
|
-
"stylelint-
|
|
56
|
-
"stylelint-scss": "5.3.1",
|
|
51
|
+
"sass": "1.69.7",
|
|
52
|
+
"stylelint": "16.1.0",
|
|
53
|
+
"stylelint-config-sass-guidelines": "11.0.0",
|
|
54
|
+
"stylelint-prettier": "5.0.0",
|
|
55
|
+
"stylelint-scss": "6.0.0",
|
|
57
56
|
"typescript": "4.9.5"
|
|
58
57
|
},
|
|
59
58
|
"sass": {
|
|
@@ -62,6 +61,17 @@
|
|
|
62
61
|
],
|
|
63
62
|
"outputDir": "./dist"
|
|
64
63
|
},
|
|
64
|
+
"keywords": [
|
|
65
|
+
"scss",
|
|
66
|
+
"components",
|
|
67
|
+
"web-components",
|
|
68
|
+
"collections",
|
|
69
|
+
"patterns",
|
|
70
|
+
"library",
|
|
71
|
+
"design-system",
|
|
72
|
+
"ui",
|
|
73
|
+
"frontend"
|
|
74
|
+
],
|
|
65
75
|
"scripts": {
|
|
66
76
|
"start": "gulp watch",
|
|
67
77
|
"build": "pnpm clean && gulp build",
|
package/placeholders/_close.scss
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
border-radius: close.$close-border-radius;
|
|
15
15
|
color: close.$close-color;
|
|
16
16
|
transition: close.$close-transition;
|
|
17
|
+
cursor: pointer;
|
|
17
18
|
|
|
18
19
|
&::before {
|
|
19
20
|
@include icons-mx.icon(2043);
|
|
@@ -30,4 +31,9 @@
|
|
|
30
31
|
&:disabled {
|
|
31
32
|
color: close.$close-disabled-color;
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
@include utilities-mx.high-contrast-mode() {
|
|
36
|
+
color: CanvasText;
|
|
37
|
+
forced-color-adjust: none;
|
|
38
|
+
}
|
|
33
39
|
}
|
package/variables/_color.scss
CHANGED
|
@@ -47,7 +47,7 @@ $warning: #f49e00;
|
|
|
47
47
|
$info: #cce4ee;
|
|
48
48
|
|
|
49
49
|
// Signal Colors
|
|
50
|
-
$success-green: #2c871d;
|
|
50
|
+
$success-green: #2c871d; /* When value is changed, please changed as well the copied value in ../functions/_contrast.scss, @function light-or-dark()*/
|
|
51
51
|
$error-red: #a51728;
|
|
52
52
|
$warning-orange: #f49e00;
|
|
53
53
|
$success-background: #c0debb;
|
|
@@ -14,7 +14,10 @@ $badge-height: button.$btn-height-rg;
|
|
|
14
14
|
$badge-gap: spacing.$size-mini;
|
|
15
15
|
$badge-border-color: var(--post-gray-60);
|
|
16
16
|
$badge-border-width: commons.$border-thick;
|
|
17
|
-
$badge-transition:
|
|
17
|
+
$badge-transition:
|
|
18
|
+
color 250ms,
|
|
19
|
+
background-color 250ms,
|
|
20
|
+
border-color 250ms;
|
|
18
21
|
$badge-hover-color: color.$black;
|
|
19
22
|
$badge-hover-bg-color: color.$gray-10;
|
|
20
23
|
$badge-active-color: color.$black;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:string';
|
|
1
2
|
@use './../color';
|
|
2
3
|
@use './../commons';
|
|
3
4
|
|
|
@@ -16,6 +17,6 @@ $breadcrumb-divider-color: color.$gray-60 !default;
|
|
|
16
17
|
$breadcrumb-link-color: color.$gray-60 !default;
|
|
17
18
|
$breadcrumb-hover-color: color.$black !default;
|
|
18
19
|
$breadcrumb-active-color: color.$gray-60 !default;
|
|
19
|
-
$breadcrumb-divider: quote('/') !default;
|
|
20
|
+
$breadcrumb-divider: string.quote('/') !default;
|
|
20
21
|
|
|
21
22
|
$breadcrumb-border-radius: commons.$border-radius !default;
|
|
@@ -74,7 +74,8 @@ $form-check-feedback-margin-top: spacing.$size-small-regular !default;
|
|
|
74
74
|
$form-switch-padding-start: 0 !default;
|
|
75
75
|
$form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-16 -16 32 32'><circle r='15' stroke='#{$form-switch-border-color}' stroke-width='2' fill='#{$form-switch-color}'/></svg>") !default;
|
|
76
76
|
$form-switch-border-radius: $form-switch-width !default;
|
|
77
|
-
$form-switch-transition:
|
|
77
|
+
$form-switch-transition:
|
|
78
|
+
background-position animation.$transition-base-timing,
|
|
78
79
|
background-color animation.$transition-time-default !default;
|
|
79
80
|
$form-switch-checked-color: color.$white !default;
|
|
80
81
|
$form-switch-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-16 -16 32 32'><circle r='15' stroke='#{$form-switch-checked-border-color}' stroke-width='2' fill='#{$form-switch-checked-color}'/></svg>") !default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:color' as sass-color;
|
|
1
2
|
@use './../color';
|
|
2
3
|
@use './../commons';
|
|
3
4
|
@use './../type';
|
|
@@ -10,7 +11,9 @@ $nav-link-font-size: null !default;
|
|
|
10
11
|
$nav-link-font-weight: null !default;
|
|
11
12
|
$nav-link-color: color.$gray-60 !default;
|
|
12
13
|
$nav-link-hover-color: color.$black !default;
|
|
13
|
-
$nav-link-transition:
|
|
14
|
+
$nav-link-transition:
|
|
15
|
+
color 0.15s ease-in-out,
|
|
16
|
+
background-color 0.15s ease-in-out,
|
|
14
17
|
border-color 0.15s ease-in-out !default;
|
|
15
18
|
$nav-link-disabled-color: color.$gray-20 !default;
|
|
16
19
|
|
|
@@ -29,11 +32,13 @@ $nav-pills-link-active-bg: color.$gray-80 !default;
|
|
|
29
32
|
// Design System custom variables
|
|
30
33
|
$nav-link-padding: spacing.$spacer !default;
|
|
31
34
|
|
|
32
|
-
$nav-tabs-link-hover-bg:
|
|
35
|
+
$nav-tabs-link-hover-bg: sass-color.adjust(color.$gray-10, $lightness: 5%) !default;
|
|
33
36
|
$nav-tabs-link-text-color: color.$gray-60 !default;
|
|
34
37
|
$nav-tabs-link-active-font-weight: bold !default;
|
|
35
38
|
|
|
36
|
-
$nav-tabs-focus-box-shadow:
|
|
39
|
+
$nav-tabs-focus-box-shadow:
|
|
40
|
+
0 0 0 1px color.$white,
|
|
41
|
+
0 0 0 2px color.$gray-80 !default;
|
|
37
42
|
$nav-tabs-focus-box-shadow-width: 2px !default;
|
|
38
43
|
|
|
39
44
|
$nav-tabs-i-border-color: rgba(var(--post-contrast-color-inverted-rgb), 0.4) !default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:list';
|
|
1
3
|
@use './../color';
|
|
2
4
|
@use './../commons';
|
|
3
5
|
@use './../spacing';
|
|
@@ -14,7 +16,7 @@ $notification-heading-font-weight: type.$headings-font-weight !default;
|
|
|
14
16
|
$notification-buttons-gap: spacing.$size-mini !default;
|
|
15
17
|
|
|
16
18
|
$notification-padding-x-map: () !default;
|
|
17
|
-
$notification-padding-x-map: map
|
|
19
|
+
$notification-padding-x-map: map.merge(
|
|
18
20
|
$notification-padding-x-map,
|
|
19
21
|
(
|
|
20
22
|
'alert': spacing.$size-small-large,
|
|
@@ -23,7 +25,7 @@ $notification-padding-x-map: map-merge(
|
|
|
23
25
|
);
|
|
24
26
|
|
|
25
27
|
$notification-padding-y-map: () !default;
|
|
26
|
-
$notification-padding-y-map: map
|
|
28
|
+
$notification-padding-y-map: map.merge(
|
|
27
29
|
$notification-padding-y-map,
|
|
28
30
|
(
|
|
29
31
|
'alert': spacing.$size-regular,
|
|
@@ -32,7 +34,7 @@ $notification-padding-y-map: map-merge(
|
|
|
32
34
|
);
|
|
33
35
|
|
|
34
36
|
$notification-font-size-map: () !default;
|
|
35
|
-
$notification-font-size-map: map
|
|
37
|
+
$notification-font-size-map: map.merge(
|
|
36
38
|
$notification-font-size-map,
|
|
37
39
|
(
|
|
38
40
|
'alert': type.$font-size-base,
|
|
@@ -41,7 +43,7 @@ $notification-font-size-map: map-merge(
|
|
|
41
43
|
);
|
|
42
44
|
|
|
43
45
|
$notification-heading-font-size-map: () !default;
|
|
44
|
-
$notification-heading-font-size-map: map
|
|
46
|
+
$notification-heading-font-size-map: map.merge(
|
|
45
47
|
$notification-heading-font-size-map,
|
|
46
48
|
(
|
|
47
49
|
'alert': type.$font-size-bigger-regular,
|
|
@@ -50,7 +52,7 @@ $notification-heading-font-size-map: map-merge(
|
|
|
50
52
|
);
|
|
51
53
|
|
|
52
54
|
$notification-hr-margin-block-map: () !default;
|
|
53
|
-
$notification-hr-margin-block-map: map
|
|
55
|
+
$notification-hr-margin-block-map: map.merge(
|
|
54
56
|
$notification-hr-margin-block-map,
|
|
55
57
|
(
|
|
56
58
|
'alert': spacing.$size-mini spacing.$size-small-regular,
|
|
@@ -59,7 +61,7 @@ $notification-hr-margin-block-map: map-merge(
|
|
|
59
61
|
);
|
|
60
62
|
|
|
61
63
|
$notification-icon-size-map: () !default;
|
|
62
|
-
$notification-icon-size-map: map
|
|
64
|
+
$notification-icon-size-map: map.merge(
|
|
63
65
|
$notification-icon-size-map,
|
|
64
66
|
(
|
|
65
67
|
'alert': spacing.$size-small-huge,
|
|
@@ -68,7 +70,7 @@ $notification-icon-size-map: map-merge(
|
|
|
68
70
|
);
|
|
69
71
|
|
|
70
72
|
$notification-variants: () !default;
|
|
71
|
-
$notification-variants: join(
|
|
73
|
+
$notification-variants: list.join(
|
|
72
74
|
$notification-variants,
|
|
73
75
|
(
|
|
74
76
|
'primary' color.$gray-80 3134,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:color' as sass-color;
|
|
1
2
|
@use './../color';
|
|
2
3
|
@use './../commons';
|
|
3
4
|
@use './../spacing';
|
|
@@ -29,7 +30,7 @@ $table-head-color: color.$gray-40 !default;
|
|
|
29
30
|
$table-dark-bg: color.$gray-80 !default;
|
|
30
31
|
$table-dark-accent-bg: rgba(color.$white, 0.05) !default;
|
|
31
32
|
$table-dark-hover-bg: rgba(color.$white, 0.075) !default;
|
|
32
|
-
$table-dark-border-color:
|
|
33
|
+
$table-dark-border-color: sass-color.adjust(color.$gray-80, $lightness: 7.5%) !default;
|
|
33
34
|
$table-dark-color: color.$black !default;
|
|
34
35
|
|
|
35
36
|
$table-striped-order: odd !default;
|