@swisspost/design-system-styles 6.6.1 → 6.6.3
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 +2 -0
- package/basics.css +1 -1
- package/components/floating-label.scss +6 -0
- package/components/form-check.scss +29 -0
- package/components/form-select.scss +6 -1
- package/components/spinner.scss +134 -29
- package/components/type.scss +2 -0
- package/functions/_contrast.scss +1 -1
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/layouts/portal/_type.scss +5 -0
- package/mixins/_badge.scss +9 -0
- package/mixins/_icons.scss +2 -0
- package/mixins/_notification.scss +1 -2
- package/package.json +3 -4
- package/placeholders/_close.scss +4 -0
- package/variables/_breakpoints.scss +1 -1
- package/variables/_heading.scss +1 -2
- package/variables/components/_form-select.scss +2 -1
- package/variables/components/_form-validation.scss +3 -3
- package/variables/components/_forms.scss +1 -1
- package/variables/components/_notification.scss +1 -1
- package/variables/components/_spinners.scss +21 -4
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@use '../variables/animation';
|
|
7
7
|
@use '../variables/components/form-check';
|
|
8
8
|
@use '../mixins/icons' as icons-mx;
|
|
9
|
+
@use '../mixins/utilities' as utility-mx;
|
|
9
10
|
|
|
10
11
|
.form-check {
|
|
11
12
|
display: flex;
|
|
@@ -153,6 +154,24 @@
|
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
|
|
157
|
+
@include utility-mx.high-contrast-mode {
|
|
158
|
+
transition: none;
|
|
159
|
+
border: form-check.$form-check-input-border-width solid CanvasText;
|
|
160
|
+
|
|
161
|
+
&:checked {
|
|
162
|
+
background-color: SelectedItem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&::after,
|
|
166
|
+
&:checked::after {
|
|
167
|
+
max-width: calc(
|
|
168
|
+
#{form-check.$form-switch-height} - #{2 * form-check.$form-check-input-border-width}
|
|
169
|
+
);
|
|
170
|
+
border-color: Canvas;
|
|
171
|
+
background-color: CanvasText;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
156
175
|
&[disabled] {
|
|
157
176
|
background: form-check.$form-switch-disabled-bg;
|
|
158
177
|
|
|
@@ -164,6 +183,16 @@
|
|
|
164
183
|
|
|
165
184
|
&:hover > .form-check-input:not([disabled]) {
|
|
166
185
|
background-color: rgba(var(--post-contrast-color-rgb), 0.1);
|
|
186
|
+
|
|
187
|
+
@include utility-mx.high-contrast-mode {
|
|
188
|
+
border-color: Highlight;
|
|
189
|
+
|
|
190
|
+
&:checked,
|
|
191
|
+
&::after,
|
|
192
|
+
&:checked::after {
|
|
193
|
+
background-color: Highlight;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
167
196
|
}
|
|
168
197
|
|
|
169
198
|
.form-check-label {
|
|
@@ -64,7 +64,12 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
@include utilities.high-contrast-mode() {
|
|
67
|
-
background-image: b.escape-svg(form-select.$form-select-indicator-hcm);
|
|
67
|
+
background-image: b.escape-svg(form-select.$form-select-indicator-hcm-dark);
|
|
68
|
+
|
|
69
|
+
@media (prefers-color-scheme: light) {
|
|
70
|
+
background-image: b.escape-svg(form-select.$form-select-indicator-hcm-light);
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
background-color: Field;
|
|
69
74
|
border-color: FieldText;
|
|
70
75
|
color: FieldText;
|
package/components/spinner.scss
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
@forward './../variables/options';
|
|
3
|
+
@use './../variables/type';
|
|
2
4
|
|
|
3
5
|
@use './../lic/bootstrap-license';
|
|
4
6
|
@use './../themes/bootstrap/core' as *;
|
|
@@ -8,16 +10,6 @@
|
|
|
8
10
|
@use './../variables/commons';
|
|
9
11
|
@use './../variables/components/spinners';
|
|
10
12
|
|
|
11
|
-
@keyframes spin {
|
|
12
|
-
0% {
|
|
13
|
-
transform: rotate(0deg);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
100% {
|
|
17
|
-
transform: rotate(360deg);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
13
|
.spinner-bg {
|
|
22
14
|
position: absolute;
|
|
23
15
|
z-index: commons.$zindex-spinner;
|
|
@@ -38,34 +30,147 @@
|
|
|
38
30
|
}
|
|
39
31
|
|
|
40
32
|
.loader {
|
|
41
|
-
width:
|
|
42
|
-
height:
|
|
43
|
-
animation: spin
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
border-right-color: transparent;
|
|
47
|
-
border-bottom-color: spinners.$spinner-color-secondary;
|
|
33
|
+
width: 1em;
|
|
34
|
+
height: 1em;
|
|
35
|
+
animation: spin spinners.$spinner-duration linear infinite;
|
|
36
|
+
position: relative;
|
|
37
|
+
font-size: spinners.$spinner-size;
|
|
48
38
|
|
|
39
|
+
// Sizes
|
|
40
|
+
@each $key, $font-size in spinners.$spinner-size-map {
|
|
41
|
+
&.loader-#{$key} {
|
|
42
|
+
font-size: $font-size;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Deprecated sizes
|
|
49
47
|
&.loader-sm {
|
|
50
|
-
|
|
51
|
-
height: spinners.$spinner-size-sm;
|
|
52
|
-
border-width: spinners.$spinner-border-width-sm;
|
|
48
|
+
font-size: spinners.$spinner-size-sm;
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
&.loader-xs {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
font-size: spinners.$spinner-size-xs;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&::before,
|
|
56
|
+
&::after {
|
|
57
|
+
content: '';
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset: 0;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
border: max(2px, 0.12em) solid spinners.$spinner-color-secondary; // Size is proportional, but 1px is too thin on browser compared to design
|
|
63
|
+
transform: rotate(130deg);
|
|
64
|
+
animation-timing-function: linear;
|
|
65
|
+
animation-direction: alternate;
|
|
66
|
+
animation-duration: math.div(spinners.$spinner-duration, 2);
|
|
67
|
+
animation-iteration-count: infinite;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Background bar
|
|
71
|
+
&::before {
|
|
72
|
+
animation-name: progressLoaderInverted; // Mask part of the bar where the progress bar is active against antialiasing issue
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Progress bar
|
|
76
|
+
&::after {
|
|
77
|
+
border-color: spinners.$spinner-color-primary;
|
|
78
|
+
animation-name: progressLoader;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (prefers-reduced-motion: reduce) {
|
|
82
|
+
animation-duration: math.div(
|
|
83
|
+
spinners.$spinner-duration,
|
|
84
|
+
spinners.$spinner-speed-reduced-motion
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
&::before,
|
|
88
|
+
&::after {
|
|
89
|
+
animation-duration: math.div(
|
|
90
|
+
spinners.$spinner-duration,
|
|
91
|
+
2 * spinners.$spinner-speed-reduced-motion
|
|
92
|
+
);
|
|
93
|
+
}
|
|
59
94
|
}
|
|
60
95
|
|
|
61
96
|
@include utilities.high-contrast-mode() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
97
|
+
&::before {
|
|
98
|
+
border-color: CanvasText;
|
|
99
|
+
}
|
|
65
100
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
border-right-color: transparent;
|
|
101
|
+
&::after {
|
|
102
|
+
border-color: Highlight;
|
|
69
103
|
}
|
|
70
104
|
}
|
|
71
105
|
}
|
|
106
|
+
|
|
107
|
+
@keyframes spin {
|
|
108
|
+
0% {
|
|
109
|
+
transform: rotate(0deg);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
50% {
|
|
113
|
+
transform: rotate(180deg);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
100% {
|
|
117
|
+
transform: rotate(720deg);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
$progress-step-1-inner:
|
|
122
|
+
50% 50%,
|
|
123
|
+
0 0,
|
|
124
|
+
42% 0,
|
|
125
|
+
42% 0,
|
|
126
|
+
42% 0,
|
|
127
|
+
42% 0;
|
|
128
|
+
$progress-step-2-inner:
|
|
129
|
+
50% 50%,
|
|
130
|
+
0 0,
|
|
131
|
+
100% 0,
|
|
132
|
+
100% 0,
|
|
133
|
+
100% 0,
|
|
134
|
+
100% 0;
|
|
135
|
+
$progress-step-3-inner:
|
|
136
|
+
50% 50%,
|
|
137
|
+
0 0,
|
|
138
|
+
100% 0,
|
|
139
|
+
100% 100%,
|
|
140
|
+
100% 100%,
|
|
141
|
+
100% 100%;
|
|
142
|
+
|
|
143
|
+
@keyframes progressLoader {
|
|
144
|
+
0% {
|
|
145
|
+
-webkit-clip-path: polygon($progress-step-1-inner);
|
|
146
|
+
clip-path: polygon($progress-step-1-inner);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
50% {
|
|
150
|
+
-webkit-clip-path: polygon($progress-step-2-inner);
|
|
151
|
+
clip-path: polygon($progress-step-2-inner);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
100% {
|
|
155
|
+
-webkit-clip-path: polygon($progress-step-3-inner);
|
|
156
|
+
clip-path: polygon($progress-step-3-inner);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* This animation works as kind of inverted mask based on the progressLoader animation */
|
|
161
|
+
@keyframes progressLoaderInverted {
|
|
162
|
+
0% {
|
|
163
|
+
-webkit-clip-path: polygon(0 0, 0 100%, 100% 100%, $progress-step-1-inner, 50% 50%, 100% 100%, 100% 0);
|
|
164
|
+
clip-path: polygon(0 0, 0 100%, 100% 100%, $progress-step-1-inner, 50% 50%, 100% 100%, 100% 0);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
50% {
|
|
168
|
+
-webkit-clip-path: polygon(0 0, 0 100%, 100% 100%, $progress-step-2-inner, 50% 50%, 100% 100%, 100% 0);
|
|
169
|
+
clip-path: polygon(0 0, 0 100%, 100% 100%, $progress-step-2-inner, 50% 50%, 100% 100%, 100% 0);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
100% {
|
|
173
|
+
-webkit-clip-path: polygon(0 0, 0 100%, 100% 100%, $progress-step-3-inner, 50% 50%, 100% 100%, 100% 0);
|
|
174
|
+
clip-path: polygon(0 0, 0 100%, 100% 100%, $progress-step-3-inner, 50% 50%, 100% 100%, 100% 0);
|
|
175
|
+
}
|
|
176
|
+
}
|
package/components/type.scss
CHANGED