@swisspost/design-system-styles 6.6.4 → 7.1.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/_svg-icon-map.scss +927 -907
- package/basics.css +1 -1
- package/components/_index.scss +4 -1
- package/components/alert.scss +6 -1
- package/components/badge.scss +25 -78
- package/components/button-group.scss +2 -4
- package/components/button.scss +82 -31
- package/components/card-control.scss +322 -0
- package/components/carousel.scss +1 -1
- package/components/chip.scss +159 -0
- package/components/datepicker.scss +24 -12
- package/components/error-container.scss +9 -0
- package/components/floating-label.scss +0 -1
- package/components/form-check.scss +118 -31
- package/components/form-range.scss +94 -19
- package/components/form-select.scss +64 -15
- package/components/form-validation.scss +32 -13
- package/components/forms.scss +51 -13
- package/components/intranet-header/_sidebar.scss +24 -5
- package/components/sizing.scss +2 -2
- package/components/spinner.scss +6 -12
- package/components/stepper.scss +283 -138
- package/components/subnavigation.scss +2 -5
- package/components/tables.scss +1 -1
- package/components/tabs/_tabs-wrapper.scss +1 -1
- package/components/tag.scss +82 -0
- package/components/topic-teaser.scss +1 -2
- package/components/utilities.scss +0 -2
- package/functions/_color.scss +12 -0
- package/functions/_forms.scss +22 -0
- package/functions/_list.scss +2 -1
- package/functions/_sizing.scss +2 -2
- package/functions/_utilities.scss +3 -3
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_accordion.scss +2 -2
- package/mixins/_button.scss +1 -2
- package/mixins/_chip.scss +36 -0
- package/mixins/_forms.scss +1 -0
- package/mixins/_icons.scss +1 -3
- package/mixins/_index.scss +1 -1
- package/mixins/_utilities.scss +85 -0
- package/package.json +15 -15
- package/placeholders/_badge.scss +4 -56
- package/placeholders/_button.scss +2 -0
- package/placeholders/_close.scss +8 -1
- package/placeholders/_color.scss +10 -0
- package/themes/bootstrap/_overrides-color.scss +4 -14
- package/themes/bootstrap/_overrides-variables.scss +1 -0
- package/variables/_color.scss +104 -44
- package/variables/_commons.scss +2 -0
- package/variables/_features.scss +1 -3
- package/variables/_icons.scss +4 -1
- package/variables/_type.scss +9 -1
- package/variables/components/_badge.scss +14 -38
- package/variables/components/_card.scss +1 -1
- package/variables/components/_chip.scss +50 -0
- package/variables/components/_datatable.scss +1 -1
- package/variables/components/_dropdowns.scss +1 -1
- package/variables/components/_form-check.scss +75 -1
- package/variables/components/_form-select.scss +20 -5
- package/variables/components/_form-validation.scss +14 -6
- package/variables/components/_index.scss +2 -0
- package/variables/components/_list-group.scss +1 -1
- package/variables/components/_notification.scss +5 -4
- package/variables/components/_pagination.scss +2 -2
- package/variables/components/_stepper.scss +25 -14
- package/variables/components/_subnavigation.scss +1 -1
- package/variables/components/_tag.scss +27 -0
- package/components/choice-control-card.scss +0 -148
- package/mixins/_badge.scss +0 -31
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Source: https://kovart.github.io/dashed-border-generator/ + added stroke-vector-effect
|
|
2
|
+
@function get-background-svg-stroke(
|
|
3
|
+
$type,
|
|
4
|
+
$color,
|
|
5
|
+
$stroke-dasharray,
|
|
6
|
+
$stroke-pathlength,
|
|
7
|
+
$stroke-width
|
|
8
|
+
) {
|
|
9
|
+
$svg-additional-attributes: '';
|
|
10
|
+
$stroke-pathlength-attribute: '';
|
|
11
|
+
|
|
12
|
+
@if ($type == 'circle') {
|
|
13
|
+
$svg-additional-attributes: "rx='100' ry='100'";
|
|
14
|
+
}
|
|
15
|
+
@if ($stroke-pathlength != 'initial') {
|
|
16
|
+
$stroke-pathlength-attribute: " pathLength='" + $stroke-pathlength + "'";
|
|
17
|
+
}
|
|
18
|
+
@return "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' " +
|
|
19
|
+
$svg-additional-attributes + " fill='none' stroke='" + $color + "' stroke-width='" +
|
|
20
|
+
$stroke-width "' stroke-dasharray='" + $stroke-dasharray + "'" + $stroke-pathlength-attribute +
|
|
21
|
+
' /%3e%3c/svg%3e';
|
|
22
|
+
}
|
package/functions/_list.scss
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
2
|
@use 'sass:math';
|
|
3
|
+
@use 'sass:meta';
|
|
3
4
|
@use 'sass:string';
|
|
4
5
|
|
|
5
6
|
@function remove-nth($list, $index) {
|
|
6
7
|
$result: null;
|
|
7
8
|
|
|
8
|
-
@if type-of($index) != number {
|
|
9
|
+
@if meta.type-of($index) != number {
|
|
9
10
|
@warn '$index: #{string.quote($index)} is not a number for `remove-nth`.';
|
|
10
11
|
} @else if $index == 0 {
|
|
11
12
|
@warn 'List index 0 must be a non-zero integer for `remove-nth`.';
|
package/functions/_sizing.scss
CHANGED
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
$box-shadow: list-fn.remove-nth($box-shadow, 1);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
@if (utilities.starts-with-any(nth($box-shadow, -1), 'hsl', 'rgb', '#')) {
|
|
76
|
+
@if (utilities.starts-with-any(list.nth($box-shadow, -1), 'hsl', 'rgb', '#')) {
|
|
77
77
|
$box-shadow: list-fn.remove-nth($box-shadow, -1);
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
$box-shadow-size: $box-shadow-size + list.nth($box-shadow, 4);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
@if (unit($box-shadow-size) == 'px') {
|
|
100
|
+
@if (math.unit($box-shadow-size) == 'px') {
|
|
101
101
|
$box-shadow-size: math.ceil($box-shadow-size);
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
$found-index: -2;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@if (map
|
|
20
|
+
@if (map.has-key($map, $key1)) {
|
|
21
21
|
$found-index: list.index(map.keys($map), $key1);
|
|
22
22
|
|
|
23
23
|
@if ($key2) {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
$sum-of-arguments: $sum-of-arguments + $value;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@return math.div($sum-of-arguments, length($argList));
|
|
39
|
+
@return math.div($sum-of-arguments, list.length($argList));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@function starts-with-any($value, $comparable...) {
|
|
43
43
|
@each $c in $comparable {
|
|
44
|
-
@if (
|
|
44
|
+
@if (string.index('#{$value}', $c) == 1) {
|
|
45
45
|
@return true;
|
|
46
46
|
}
|
|
47
47
|
}
|