@swisspost/design-system-styles 6.4.1 → 6.4.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 +1 -1
- package/basics.css +1 -1
- package/components/button-group.scss +3 -1
- package/components/button.scss +7 -3
- package/components/carousel.scss +4 -1
- package/components/choice-control-card.scss +3 -1
- package/components/floating-label.scss +26 -26
- package/components/fonts.scss +12 -6
- package/components/form-check.scss +26 -5
- package/components/form-validation.scss +12 -3
- package/components/forms.scss +1 -0
- package/components/grid.scss +79 -14
- package/components/intranet-header/_language-chooser.scss +2 -1
- package/components/intranet-header/_scaffolding.scss +1 -1
- package/components/tables.scss +48 -0
- package/components/tabs/_tab-title.scss +1 -1
- package/components/tabs/index.scss +2 -0
- package/components/topic-teaser.scss +2 -1
- package/components/type.scss +2 -2
- package/functions/_contrast.scss +8 -6
- package/functions/_list.scss +10 -6
- package/functions/_sizing.scss +13 -12
- package/functions/_utilities.scss +3 -2
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_button.scss +11 -8
- package/mixins/_form-checks.scss +0 -46
- package/mixins/_form-validation.scss +5 -0
- package/mixins/_icons.scss +6 -2
- package/package.json +14 -14
- package/placeholders/badge.scss +7 -5
- package/schematics/utils/dom-migration/get-dom-migration-rule.js +6 -5
- package/schematics/utils/dom-migration/get-dom-migration-rule.js.map +1 -1
- package/themes/bootstrap/_forms.scss +0 -2
- package/variables/_animation.scss +3 -1
- package/variables/_breakpoints.scss +2 -0
- package/variables/_elevation.scss +15 -5
- package/variables/_grid.scss +37 -9
- package/variables/_spacing.scss +4 -2
- package/variables/components/_form-check.scss +3 -1
- package/variables/components/_form-select.scss +3 -3
- package/variables/components/_form-validation.scss +1 -1
- package/variables/components/_forms.scss +1 -0
- package/themes/bootstrap/forms/_form-check.scss +0 -2
package/functions/_list.scss
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
|
|
1
5
|
@function remove-nth($list, $index) {
|
|
2
6
|
$result: null;
|
|
3
7
|
|
|
4
8
|
@if type-of($index) != number {
|
|
5
|
-
@warn '$index: #{quote($index)} is not a number for `remove-nth`.';
|
|
9
|
+
@warn '$index: #{string.quote($index)} is not a number for `remove-nth`.';
|
|
6
10
|
} @else if $index == 0 {
|
|
7
11
|
@warn 'List index 0 must be a non-zero integer for `remove-nth`.';
|
|
8
|
-
} @else if abs($index) > length($list) {
|
|
9
|
-
@warn 'List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.';
|
|
12
|
+
} @else if math.abs($index) > list.length($list) {
|
|
13
|
+
@warn 'List index is #{$index} but list is only #{list.length($list)} item long for `remove-nth`.';
|
|
10
14
|
} @else {
|
|
11
15
|
$result: ();
|
|
12
|
-
$index: if($index < 0, length($list) + $index + 1, $index);
|
|
16
|
+
$index: if($index < 0, list.length($list) + $index + 1, $index);
|
|
13
17
|
|
|
14
|
-
@for $i from 1 through length($list) {
|
|
18
|
+
@for $i from 1 through list.length($list) {
|
|
15
19
|
@if $i != $index {
|
|
16
|
-
$result: append($result, nth($list, $i));
|
|
20
|
+
$result: list.append($result, list.nth($list, $i));
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
}
|
package/functions/_sizing.scss
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
+
@use 'sass:list';
|
|
2
3
|
|
|
3
4
|
@use './utilities';
|
|
4
|
-
@use './list';
|
|
5
|
+
@use './list' as list-fn;
|
|
5
6
|
|
|
6
7
|
@function strip-unit($value) {
|
|
7
8
|
@return math.div($value, $value * 0 + 1);
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
@function calculate-single-box-shadow-size($box-shadow) {
|
|
62
|
-
$len: length($box-shadow);
|
|
63
|
+
$len: list.length($box-shadow);
|
|
63
64
|
$multiplier: 1;
|
|
64
65
|
$box-shadow-size: 0;
|
|
65
66
|
|
|
@@ -67,37 +68,37 @@
|
|
|
67
68
|
@error "The function 'calculate-single-box-shadow-size($box-shadow)' is not for calculating the combined size of multiple box-shadows. Failed value: '#{$box-shadow}'.";
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
@if (nth($box-shadow, 1) == 'inset') {
|
|
71
|
+
@if (list.nth($box-shadow, 1) == 'inset') {
|
|
71
72
|
$multiplier: -1;
|
|
72
|
-
$box-shadow: list.remove-nth($box-shadow, 1);
|
|
73
|
+
$box-shadow: list-fn.remove-nth($box-shadow, 1);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
@if (utilities.starts-with-any(nth($box-shadow, -1), 'hsl', 'rgb', '#')) {
|
|
76
|
-
$box-shadow: list.remove-nth($box-shadow, -1);
|
|
77
|
+
$box-shadow: list-fn.remove-nth($box-shadow, -1);
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
$len: length($box-shadow);
|
|
80
|
+
$len: list.length($box-shadow);
|
|
80
81
|
|
|
81
82
|
@if ($len > 4) {
|
|
82
83
|
@error "The function 'calculate-single-box-shadow-size($box-shadow)' is not for calculating the combined size of multiple box-shadows. Failed value: '#{$box-shadow}'.";
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
@if (abs(nth($box-shadow, 1)) >= abs(nth($box-shadow, 2))) {
|
|
86
|
-
$box-shadow-size: $box-shadow-size + abs(nth($box-shadow, 1));
|
|
86
|
+
@if (math.abs(list.nth($box-shadow, 1)) >= math.abs(list.nth($box-shadow, 2))) {
|
|
87
|
+
$box-shadow-size: $box-shadow-size + math.abs(list.nth($box-shadow, 1));
|
|
87
88
|
} @else {
|
|
88
|
-
$box-shadow-size: $box-shadow-size + abs(nth($box-shadow, 2));
|
|
89
|
+
$box-shadow-size: $box-shadow-size + math.abs(list.nth($box-shadow, 2));
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
@if ($len >= 3) {
|
|
92
|
-
$box-shadow-size: $box-shadow-size + (abs(nth($box-shadow, 3)) * 0.7);
|
|
93
|
+
$box-shadow-size: $box-shadow-size + (math.abs(list.nth($box-shadow, 3)) * 0.7);
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
@if ($len == 4) {
|
|
96
|
-
$box-shadow-size: $box-shadow-size + nth($box-shadow, 4);
|
|
97
|
+
$box-shadow-size: $box-shadow-size + list.nth($box-shadow, 4);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
@if (unit($box-shadow-size) == 'px') {
|
|
100
|
-
$box-shadow-size: ceil($box-shadow-size);
|
|
101
|
+
$box-shadow-size: math.ceil($box-shadow-size);
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
@return $box-shadow-size;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
+
@use 'sass:list';
|
|
2
3
|
|
|
3
4
|
@use 'sass:string';
|
|
4
5
|
@use 'sass:map';
|
|
@@ -17,11 +18,11 @@
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
@if (map-has-key($map, $key1)) {
|
|
20
|
-
$found-index: index(map.keys($map), $key1);
|
|
21
|
+
$found-index: list.index(map.keys($map), $key1);
|
|
21
22
|
|
|
22
23
|
@if ($key2) {
|
|
23
24
|
$map: map.get($map, $key1);
|
|
24
|
-
$found-index: index($map, $key2);
|
|
25
|
+
$found-index: list.index($map, $key2);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|