@swisspost/design-system-styles 6.6.0 → 6.6.2
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/_svg-icon-map.scss +8 -0
- package/basics.css +1 -1
- package/components/card.scss +6 -3
- package/components/floating-label.scss +76 -27
- package/components/form-check.scss +29 -0
- package/components/form-select.scss +58 -31
- package/components/form-validation.scss +39 -18
- package/components/forms.scss +9 -16
- package/components/spinner.scss +134 -29
- package/components/timepicker.scss +1 -1
- package/functions/_contrast.scss +1 -1
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_forms.scss +15 -1
- package/mixins/_icons.scss +2 -0
- package/mixins/_notification.scss +1 -2
- package/package.json +9 -10
- package/variables/_heading.scss +1 -2
- package/variables/_type.scss +1 -0
- package/variables/components/_button.scss +1 -1
- package/variables/components/_form-select.scss +2 -3
- package/variables/components/_form-validation.scss +2 -0
- package/variables/components/_forms.scss +22 -26
- package/variables/components/_spinners.scss +21 -4
package/mixins/_forms.scss
CHANGED
|
@@ -27,12 +27,26 @@
|
|
|
27
27
|
background-position: calc(100% - #{form-validation.$form-feedback-icon-offset}) center;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
@mixin form-
|
|
30
|
+
@mixin form-rg {
|
|
31
31
|
padding: forms.$input-padding-y-rg forms.$input-padding-x-rg;
|
|
32
32
|
font-size: type.$font-size-regular;
|
|
33
33
|
line-height: forms.$input-line-height-rg;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
@mixin form-sm {
|
|
37
|
+
font-size: type.$font-size-14;
|
|
38
|
+
line-height: forms.$input-line-height-sm;
|
|
39
|
+
min-height: forms.$input-height-sm;
|
|
40
|
+
padding-block: forms.$input-padding-y-sm;
|
|
41
|
+
padding-inline: forms.$input-padding-x-sm;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin form-lg {
|
|
45
|
+
font-size: type.$font-size-16;
|
|
46
|
+
line-height: forms.$input-line-height-lg;
|
|
47
|
+
min-height: forms.$input-height-lg;
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
@mixin focus-outline {
|
|
37
51
|
outline: none;
|
|
38
52
|
outline-offset: forms.$input-focus-outline-thickness;
|
package/mixins/_icons.scss
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
-webkit-mask-image: url('#{icon-fn.get-svg-url($name)}');
|
|
12
12
|
mask-image: url('#{icon-fn.get-svg-url($name)}');
|
|
13
13
|
background-color: currentColor;
|
|
14
|
+
color: currentColor; // Required in this case with usage of forced-color-adjust: preserve-parent-color
|
|
15
|
+
forced-color-adjust: preserve-parent-color;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
@mixin remove-icon() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-styles",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.2",
|
|
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,26 +33,25 @@
|
|
|
33
33
|
"bootstrap": "5.3.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@swisspost/design-system-icons": "1.
|
|
37
|
-
"@types/node": "18.19.
|
|
38
|
-
"autoprefixer": "10.4.
|
|
36
|
+
"@swisspost/design-system-icons": "1.3.0",
|
|
37
|
+
"@types/node": "18.19.14",
|
|
38
|
+
"autoprefixer": "10.4.17",
|
|
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": "
|
|
43
|
+
"gulp-postcss": "10.0.0",
|
|
44
44
|
"gulp-sass": "5.1.0",
|
|
45
45
|
"jest": "29.7.0",
|
|
46
|
-
"npm-run-all": "4.1.5",
|
|
47
46
|
"postcss": "8.4.33",
|
|
48
47
|
"postcss-scss": "4.0.9",
|
|
49
|
-
"prettier": "3.2.
|
|
48
|
+
"prettier": "3.2.5",
|
|
50
49
|
"rimraf": "5.0.5",
|
|
51
|
-
"sass": "1.
|
|
52
|
-
"stylelint": "16.1
|
|
50
|
+
"sass": "1.70.0",
|
|
51
|
+
"stylelint": "16.2.1",
|
|
53
52
|
"stylelint-config-sass-guidelines": "11.0.0",
|
|
54
53
|
"stylelint-prettier": "5.0.0",
|
|
55
|
-
"stylelint-scss": "6.
|
|
54
|
+
"stylelint-scss": "6.1.0",
|
|
56
55
|
"typescript": "4.9.5"
|
|
57
56
|
},
|
|
58
57
|
"sass": {
|
package/variables/_heading.scss
CHANGED
package/variables/_type.scss
CHANGED
|
@@ -19,7 +19,7 @@ $input-btn-padding-x: spacing.$size-small-large - $input-btn-border-width-rem !d
|
|
|
19
19
|
$input-btn-line-height: type.$line-height-copy !default;
|
|
20
20
|
|
|
21
21
|
$input-btn-padding-y-sm: spacing.$size-mini - $input-btn-border-width-rem !default;
|
|
22
|
-
$input-btn-padding-x-sm: spacing.$size-regular
|
|
22
|
+
$input-btn-padding-x-sm: spacing.$size-small-regular !default;
|
|
23
23
|
$input-btn-line-height-sm: type.$line-height-copy !default;
|
|
24
24
|
|
|
25
25
|
$input-btn-padding-y-rg: spacing.$size-small-regular - $input-btn-border-width-rem !default;
|
|
@@ -7,8 +7,6 @@ $form-select-disabled-color: forms.$input-disabled-color;
|
|
|
7
7
|
$form-select-disabled-bg: forms.$input-disabled-bg;
|
|
8
8
|
$form-select-disabled-border-color: forms.$input-disabled-border-color;
|
|
9
9
|
$form-select-indicator-color: color.$black;
|
|
10
|
-
$form-select-bg-size: 32px 32px !default;
|
|
11
|
-
$form-select-bg-size-sm: 24px 24px !default;
|
|
12
10
|
$_form-select-indicator-icon: icons.get-colored-svg-url('2113', $form-select-indicator-color);
|
|
13
11
|
$form-select-indicator: url($_form-select-indicator-icon) !default;
|
|
14
12
|
$form-select-indicator-disabled: url(icons.get-colored-svg-url(
|
|
@@ -20,4 +18,5 @@ $form-select-indicator-success: url(icons.get-colored-svg-url(
|
|
|
20
18
|
color.$success-green
|
|
21
19
|
)) !default;
|
|
22
20
|
$form-select-indicator-error: url(icons.get-colored-svg-url('2104', color.$error-red)) !default;
|
|
23
|
-
$form-select-indicator-hcm: url(icons.get-colored-svg-url('2113', color.$white)) !default;
|
|
21
|
+
$form-select-indicator-hcm-dark: url(icons.get-colored-svg-url('2113', color.$white)) !default;
|
|
22
|
+
$form-select-indicator-hcm-light: url(icons.get-colored-svg-url('2113', color.$black)) !default;
|
|
@@ -25,5 +25,7 @@ $form-feedback-custom-color: color.$success !default;
|
|
|
25
25
|
$form-feedback-custom-bg: color.$success !default;
|
|
26
26
|
$form-feedback-invalid-box-shadow: 0 0 0 forms.$input-focus-width
|
|
27
27
|
rgba($form-feedback-invalid-color, 0.25) !default;
|
|
28
|
+
$form-feedback-valid-box-shadow: 0 0 0 forms.$input-focus-width
|
|
29
|
+
rgba($form-feedback-valid-color, 0.25) !default;
|
|
28
30
|
$form-feedback-custom-text: color.$white !default;
|
|
29
31
|
$form-feedback-custom-box-shadow: 0 0 0 0.2rem rgba($form-feedback-custom-color, 0.25) !default;
|
|
@@ -24,13 +24,13 @@ $input-line-height: type.$line-height-copy !default;
|
|
|
24
24
|
|
|
25
25
|
$input-padding-y-sm: button.$input-btn-padding-y-sm !default;
|
|
26
26
|
$input-padding-x-sm: button.$input-btn-padding-x-sm !default;
|
|
27
|
-
$input-line-height-sm: type.$line-height-
|
|
27
|
+
$input-line-height-sm: type.$line-height-sm !default;
|
|
28
28
|
|
|
29
29
|
$input-padding-y-rg: button.$input-btn-padding-y-rg !default;
|
|
30
30
|
$input-padding-x-rg: button.$input-btn-padding-x-rg !default;
|
|
31
31
|
$input-line-height-rg: type.$line-height-copy !default;
|
|
32
32
|
|
|
33
|
-
$input-padding-y-lg:
|
|
33
|
+
$input-padding-y-lg: sizing.px-to-rem(11) !default;
|
|
34
34
|
$input-padding-x-lg: button.$input-btn-padding-x-lg !default;
|
|
35
35
|
$input-line-height-lg: type.$line-height-copy !default;
|
|
36
36
|
|
|
@@ -63,26 +63,25 @@ $input-height-border: $input-border-width * 2 !default;
|
|
|
63
63
|
|
|
64
64
|
$input-height-content: type.$font-size-base * $input-line-height !default;
|
|
65
65
|
$input-height-inner: $input-height-content + ($input-padding-y * 2) !default;
|
|
66
|
-
$input-height:
|
|
66
|
+
$input-height: $input-height-inner + sizing.px-to-rem($input-height-border) !default;
|
|
67
67
|
|
|
68
|
-
$input-height-content-sm: type.$font-size-
|
|
69
|
-
$input-height-inner-sm: $input-height-content-sm + ($input-padding-y-sm * 2) !default;
|
|
70
|
-
$input-height-sm:
|
|
68
|
+
$input-height-content-sm: type.$font-size-14 * 1 !default;
|
|
69
|
+
$input-height-inner-sm: $input-height-content-sm + ($input-padding-y-sm * 2) + sizing.px-to-rem(2) !default; // + 2px approximation from Figma mockup
|
|
70
|
+
$input-height-sm: $input-height-inner-sm + sizing.px-to-rem($input-height-border) !default;
|
|
71
71
|
|
|
72
|
-
$form-floating-input-height-content-sm: type.$font-size-
|
|
72
|
+
$form-floating-input-height-content-sm: type.$font-size-14 * 1 !default;
|
|
73
73
|
$form-floating-input-height-inner-sm: $form-floating-input-height-content-sm +
|
|
74
|
-
(
|
|
75
|
-
$form-floating-input-height-sm:
|
|
76
|
-
|
|
77
|
-
) !default;
|
|
74
|
+
(spacing.$size-regular * 2) - sizing.px-to-rem(2) !default; // - 2px approximation from Figma mockup
|
|
75
|
+
$form-floating-input-height-sm: $form-floating-input-height-inner-sm +
|
|
76
|
+
sizing.px-to-rem($input-height-border) !default;
|
|
78
77
|
|
|
79
78
|
$input-height-content-rg: type.$font-size-regular * $input-line-height-rg !default;
|
|
80
79
|
$input-height-inner-rg: $input-height-content-rg + ($input-padding-y-rg * 2) !default;
|
|
81
80
|
$input-height-rg: calc(#{$input-height-inner-rg} + #{$input-height-border}) !default;
|
|
82
81
|
|
|
83
|
-
$input-height-content-lg: type.$font-size-
|
|
84
|
-
$input-height-inner-lg: $input-height-content-lg + ($input-padding-y-lg * 2) !default;
|
|
85
|
-
$input-height-lg:
|
|
82
|
+
$input-height-content-lg: (type.$font-size-16 * $input-line-height-lg) - sizing.px-to-rem(2) !default; // - 2px and remove approximation in Figma
|
|
83
|
+
$input-height-inner-lg: $input-height-content-lg + ($input-padding-y-lg * 2) !default;
|
|
84
|
+
$input-height-lg: $input-height-inner-lg + sizing.px-to-rem($input-height-border) !default;
|
|
86
85
|
|
|
87
86
|
$input-transition:
|
|
88
87
|
border-color 0.15s ease-in-out,
|
|
@@ -119,14 +118,14 @@ $form-range-input-height-ie: 6rem !default;
|
|
|
119
118
|
|
|
120
119
|
$form-file-button-hover-bg: $input-bg;
|
|
121
120
|
|
|
122
|
-
$form-floating-height: $input-height-lg;
|
|
121
|
+
$form-floating-height: $input-height-lg * $input-line-height-lg;
|
|
123
122
|
$form-floating-padding-x: $input-padding-x-lg;
|
|
124
123
|
$form-floating-padding-y: $input-padding-y-lg;
|
|
125
124
|
$form-floating-line-height: type.$line-height-copy;
|
|
126
125
|
$form-floating-input-padding-t: spacing.$size-large;
|
|
127
126
|
$form-floating-input-padding-b: 0;
|
|
128
127
|
$form-floating-label-opacity: 1;
|
|
129
|
-
$form-floating-label-height: $
|
|
128
|
+
$form-floating-label-height: $form-floating-height;
|
|
130
129
|
$form-floating-label-color: $input-placeholder-color;
|
|
131
130
|
$form-floating-label-font-size: type.$font-size-bigger-regular;
|
|
132
131
|
$form-floating-label-font-size-small: type.$font-size-tiny;
|
|
@@ -135,10 +134,8 @@ $form-floating-label-scale: math.div(
|
|
|
135
134
|
$form-floating-label-font-size
|
|
136
135
|
);
|
|
137
136
|
$form-floating-label-upscale: math.div(1, $form-floating-label-scale);
|
|
138
|
-
$form-floating-label-padding-t:
|
|
139
|
-
|
|
140
|
-
type.$line-height-copy * 0.5}
|
|
141
|
-
);
|
|
137
|
+
$form-floating-label-padding-t: $form-floating-label-height * 0.5 - $form-floating-label-font-size *
|
|
138
|
+
type.$line-height-copy * 0.5;
|
|
142
139
|
$form-floating-label-translate-x: $form-floating-padding-x * (1 - $form-floating-label-scale);
|
|
143
140
|
$form-floating-label-transform: scale($form-floating-label-scale);
|
|
144
141
|
$form-floating-transition: animation.$transition-base;
|
|
@@ -151,10 +148,9 @@ $form-floating-transition-out:
|
|
|
151
148
|
$form-floating-select-bg-size: 32px 32px;
|
|
152
149
|
|
|
153
150
|
$form-floating-label-font-size-sm: type.$font-size-12;
|
|
154
|
-
$form-floating-label-font-size-placeholder-sm: type.$font-size-14;
|
|
155
|
-
$form-floating-padding-x-sm:
|
|
151
|
+
$form-floating-label-font-size-placeholder-sm: type.$font-size-14;
|
|
152
|
+
$form-floating-padding-x-sm: spacing.$size-regular;
|
|
156
153
|
$form-floating-padding-y-sm: $input-padding-y-sm;
|
|
157
|
-
$form-floating-label-height-sm: $form-floating-input-height-
|
|
158
|
-
$form-floating-label-padding-t-sm:
|
|
159
|
-
|
|
160
|
-
);
|
|
154
|
+
$form-floating-label-height-sm: $form-floating-input-height-sm;
|
|
155
|
+
$form-floating-label-padding-t-sm: $form-floating-label-height-sm * 0.5 -
|
|
156
|
+
$form-floating-label-font-size-sm;
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
@use './../color';
|
|
2
3
|
@use './../spacing';
|
|
4
|
+
@use './../type';
|
|
5
|
+
@use './../../functions/sizing';
|
|
3
6
|
|
|
4
7
|
// Spinners
|
|
5
8
|
|
|
6
9
|
$spinner-color-primary: color.$yellow !default;
|
|
7
|
-
$spinner-color-secondary: color.$gray-
|
|
10
|
+
$spinner-color-secondary: color.$gray-60 !default;
|
|
8
11
|
|
|
9
|
-
$spinner-size:
|
|
12
|
+
$spinner-size: type.$font-size-56 !default;
|
|
10
13
|
$spinner-border-width: 6px !default;
|
|
11
14
|
|
|
12
|
-
$spinner-
|
|
15
|
+
$spinner-duration: 3.125s !default;
|
|
16
|
+
$spinner-speed-reduced-motion: math.div(1, 8) !default;
|
|
17
|
+
|
|
18
|
+
$spinner-size-map: (
|
|
19
|
+
16: type.$font-size-16,
|
|
20
|
+
24: type.$font-size-24,
|
|
21
|
+
32: type.$font-size-32,
|
|
22
|
+
40: type.$font-size-40,
|
|
23
|
+
48: type.$font-size-48,
|
|
24
|
+
// 56 is already defined as default
|
|
25
|
+
80: sizing.px-to-rem(80px),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
// DEPRECATED
|
|
29
|
+
$spinner-size-sm: type.$font-size-40 !default;
|
|
13
30
|
$spinner-border-width-sm: spacing.$size-micro !default;
|
|
14
31
|
|
|
15
|
-
$spinner-size-xs:
|
|
32
|
+
$spinner-size-xs: type.$font-size-16 !default;
|
|
16
33
|
$spinner-border-width-xs: spacing.$size-line !default;
|