@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.
Files changed (71) hide show
  1. package/_svg-icon-map.scss +927 -907
  2. package/basics.css +1 -1
  3. package/components/_index.scss +4 -1
  4. package/components/alert.scss +6 -1
  5. package/components/badge.scss +25 -78
  6. package/components/button-group.scss +2 -4
  7. package/components/button.scss +82 -31
  8. package/components/card-control.scss +322 -0
  9. package/components/carousel.scss +1 -1
  10. package/components/chip.scss +159 -0
  11. package/components/datepicker.scss +24 -12
  12. package/components/error-container.scss +9 -0
  13. package/components/floating-label.scss +0 -1
  14. package/components/form-check.scss +118 -31
  15. package/components/form-range.scss +94 -19
  16. package/components/form-select.scss +64 -15
  17. package/components/form-validation.scss +32 -13
  18. package/components/forms.scss +51 -13
  19. package/components/intranet-header/_sidebar.scss +24 -5
  20. package/components/sizing.scss +2 -2
  21. package/components/spinner.scss +6 -12
  22. package/components/stepper.scss +283 -138
  23. package/components/subnavigation.scss +2 -5
  24. package/components/tables.scss +1 -1
  25. package/components/tabs/_tabs-wrapper.scss +1 -1
  26. package/components/tag.scss +82 -0
  27. package/components/topic-teaser.scss +1 -2
  28. package/components/utilities.scss +0 -2
  29. package/functions/_color.scss +12 -0
  30. package/functions/_forms.scss +22 -0
  31. package/functions/_list.scss +2 -1
  32. package/functions/_sizing.scss +2 -2
  33. package/functions/_utilities.scss +3 -3
  34. package/index.css +3 -3
  35. package/intranet.css +3 -3
  36. package/mixins/_accordion.scss +2 -2
  37. package/mixins/_button.scss +1 -2
  38. package/mixins/_chip.scss +36 -0
  39. package/mixins/_forms.scss +1 -0
  40. package/mixins/_icons.scss +1 -3
  41. package/mixins/_index.scss +1 -1
  42. package/mixins/_utilities.scss +85 -0
  43. package/package.json +15 -15
  44. package/placeholders/_badge.scss +4 -56
  45. package/placeholders/_button.scss +2 -0
  46. package/placeholders/_close.scss +8 -1
  47. package/placeholders/_color.scss +10 -0
  48. package/themes/bootstrap/_overrides-color.scss +4 -14
  49. package/themes/bootstrap/_overrides-variables.scss +1 -0
  50. package/variables/_color.scss +104 -44
  51. package/variables/_commons.scss +2 -0
  52. package/variables/_features.scss +1 -3
  53. package/variables/_icons.scss +4 -1
  54. package/variables/_type.scss +9 -1
  55. package/variables/components/_badge.scss +14 -38
  56. package/variables/components/_card.scss +1 -1
  57. package/variables/components/_chip.scss +50 -0
  58. package/variables/components/_datatable.scss +1 -1
  59. package/variables/components/_dropdowns.scss +1 -1
  60. package/variables/components/_form-check.scss +75 -1
  61. package/variables/components/_form-select.scss +20 -5
  62. package/variables/components/_form-validation.scss +14 -6
  63. package/variables/components/_index.scss +2 -0
  64. package/variables/components/_list-group.scss +1 -1
  65. package/variables/components/_notification.scss +5 -4
  66. package/variables/components/_pagination.scss +2 -2
  67. package/variables/components/_stepper.scss +25 -14
  68. package/variables/components/_subnavigation.scss +1 -1
  69. package/variables/components/_tag.scss +27 -0
  70. package/components/choice-control-card.scss +0 -148
  71. 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
+ }
@@ -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`.';
@@ -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-has-key($map, $key1)) {
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 (str-index('#{$value}', $c) == 1) {
44
+ @if (string.index('#{$value}', $c) == 1) {
45
45
  @return true;
46
46
  }
47
47
  }