@swisspost/design-system-styles 6.4.0 → 6.4.1

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 (47) hide show
  1. package/_svg-icon-map.scss +1 -1
  2. package/basics.css +1 -3
  3. package/components/_index.scss +1 -1
  4. package/components/alert.scss +3 -7
  5. package/components/card.scss +3 -18
  6. package/components/datatable.scss +6 -9
  7. package/components/datepicker.scss +14 -4
  8. package/components/dropdown.scss +18 -65
  9. package/components/floating-label.scss +6 -5
  10. package/components/form-check.scss +94 -177
  11. package/components/form-select.scss +1 -1
  12. package/components/form-validation.scss +116 -0
  13. package/components/forms.scss +4 -2
  14. package/components/intranet-header/_logo.scss +1 -4
  15. package/components/intranet-header/_nav-overflow.scss +9 -4
  16. package/components/pagination.scss +22 -19
  17. package/components/product-card.scss +6 -1
  18. package/components/stepper.scss +73 -42
  19. package/components/subnavigation.scss +3 -4
  20. package/components/timepicker.scss +1 -5
  21. package/components/toast.scss +6 -2
  22. package/components/topic-teaser.scss +24 -14
  23. package/index.css +4 -10
  24. package/intranet.css +4 -10
  25. package/mixins/_animation.scss +1 -0
  26. package/mixins/_button.scss +2 -1
  27. package/mixins/_color.scss +7 -2
  28. package/mixins/_forms.scss +4 -70
  29. package/mixins/_notification.scss +48 -19
  30. package/package.json +13 -13
  31. package/placeholders/_dropdown.scss +0 -3
  32. package/placeholders/_index.scss +0 -1
  33. package/placeholders/_text.scss +4 -4
  34. package/themes/bootstrap/_core.scss +2 -0
  35. package/themes/bootstrap/_overrides-mixins.scss +33 -0
  36. package/themes/bootstrap/_overrides-variables.scss +1 -2
  37. package/variables/components/_datatable.scss +6 -10
  38. package/variables/components/_form-check.scss +48 -11
  39. package/variables/components/{_form-feedback.scss → _form-validation.scss} +15 -11
  40. package/variables/components/_forms.scss +2 -2
  41. package/variables/components/_index.scss +1 -2
  42. package/variables/components/_notification.scss +4 -1
  43. package/variables/components/_stepper.scss +8 -7
  44. package/variables/components/_topic-teaser.scss +5 -0
  45. package/components/form-feedback.scss +0 -44
  46. package/placeholders/_notification.scss +0 -13
  47. package/variables/components/_form-switch.scss +0 -38
@@ -31,6 +31,7 @@
31
31
  }
32
32
  }
33
33
 
34
+ // DEPRECATED
34
35
  @mixin hover-animation-svg-icon($color, $icon-name, $stroke-width: null) {
35
36
  &:not(:disabled):not(.disabled) > span {
36
37
  &::after {
@@ -27,7 +27,8 @@
27
27
  padding: 0 map.get(button.$btn-padding-x-map, $size);
28
28
  }
29
29
 
30
- > .pi {
30
+ > .pi,
31
+ > post-icon {
31
32
  width: map.get(button.$btn-icon-size-map, $size);
32
33
  height: map.get(button.$btn-icon-size-map, $size);
33
34
  }
@@ -5,9 +5,14 @@
5
5
  @use './../variables/color';
6
6
 
7
7
  // mixin to correctly set CSS variables for any colored background
8
- @mixin colored-background($color) {
8
+ @mixin colored-background($color, $allow-alpha: true) {
9
9
  --post-bg-rgb: #{color-fn.rgb-values($color)};
10
- @extend %color-background-rgba;
10
+
11
+ @if ($allow-alpha) {
12
+ @extend %color-background-rgba;
13
+ } @else {
14
+ @extend %color-background-rgb;
15
+ }
11
16
 
12
17
  @if (contrast-fn.light-or-dark($color) == 'dark') {
13
18
  @extend %color-background-dark-variables;
@@ -1,6 +1,6 @@
1
1
  @use './../variables/color';
2
2
  @use './../variables/type';
3
- @use './../variables/components/form-feedback';
3
+ @use './../variables/components/form-validation';
4
4
  @use './../variables/components/forms';
5
5
  @use './../variables/components/tooltips';
6
6
  @use './../mixins/utilities';
@@ -20,77 +20,11 @@
20
20
  /* stylelint-enable */
21
21
  }
22
22
 
23
- // override
24
- /// The entire mixin had to be overriden to adjust the feedback on custom controls.
25
- /// For the most part, it is exactly like the mixin.
26
- @mixin form-validation-state($state, $color, $icon) {
27
- .#{$state}-feedback {
28
- display: none;
29
- width: 100%;
30
- margin-top: form-feedback.$form-feedback-margin-top;
31
- color: $color;
32
- font-size: form-feedback.$form-feedback-font-size;
33
- }
34
-
35
- // Deprecated
36
- .#{$state}-tooltip {
37
- display: none;
38
- position: absolute;
39
- z-index: 5;
40
- top: 100%;
41
- max-width: 100%; // Contain to parent when possible
42
- margin-top: 0.1rem;
43
- padding: tooltips.$tooltip-padding-y tooltips.$tooltip-padding-x;
44
- border-radius: tooltips.$tooltip-border-radius;
45
- color: color-contrast($color);
46
- font-size: tooltips.$tooltip-font-size;
47
- line-height: type.$line-height-copy;
48
-
49
- /* Keeping borders gray while maintaining a green background on tooltips */
50
- @if ($state == 'valid') {
51
- background-color: rgba(form-feedback.$form-feedback-valid-bg, tooltips.$tooltip-opacity);
52
- } @else {
53
- background-color: rgba($color, tooltips.$tooltip-opacity);
54
- }
55
- }
56
-
57
- .form-control,
58
- .form-select {
59
- .was-validated &:#{$state},
60
- &.is-#{$state} {
61
- border-color: $color;
62
-
63
- &:focus {
64
- border-color: $color;
65
- box-shadow: 0 0 0 forms.$input-focus-width rgba($color, 0.25);
66
- }
67
-
68
- ~ .#{$state}-feedback,
69
- ~ .#{$state}-tooltip {
70
- display: block;
71
- }
72
- }
73
- }
74
-
75
- .form-check-input {
76
- .was-validated &:#{$state},
77
- &.is-#{$state} {
78
- ~ .form-check-label {
79
- color: $color;
80
- }
81
-
82
- ~ .#{$state}-feedback,
83
- ~ .#{$state}-tooltip {
84
- display: block;
85
- }
86
- }
87
- }
88
- }
89
-
90
23
  @mixin icon-placement {
91
- padding-right: form-feedback.$form-feedback-icon-offset + form-feedback.$form-feedback-icon-size;
24
+ padding-right: form-validation.$form-feedback-icon-offset +
25
+ form-validation.$form-feedback-icon-size;
92
26
  background-repeat: no-repeat;
93
- background-position: calc(100% - #{form-feedback.$form-feedback-icon-offset}) center;
27
+ background-position: calc(100% - #{form-validation.$form-feedback-icon-offset}) center;
94
28
  }
95
29
 
96
30
  @mixin form-control-rg {
@@ -14,9 +14,9 @@
14
14
  $font-size: map.get(notification.$notification-font-size-map, $size);
15
15
  $padding-x: map.get(notification.$notification-padding-x-map, $size);
16
16
  $padding-y: map.get(notification.$notification-padding-y-map, $size);
17
- $hr-margin-block: map.get(notification.$notification-hr-margin-block-map, $size);
18
17
 
19
18
  position: relative;
19
+ box-sizing: border-box;
20
20
  min-height: 2 * $padding-y + $icon-size;
21
21
  box-shadow: notification.$notification-box-shadow;
22
22
  border-radius: notification.$notification-border-radius;
@@ -26,16 +26,6 @@
26
26
  font-size: $font-size;
27
27
  font-weight: notification.$notification-font-weight;
28
28
 
29
- &::before {
30
- content: '';
31
- display: block;
32
- position: absolute;
33
- height: $icon-size;
34
- width: $icon-size;
35
- left: $padding-x;
36
- top: $padding-y;
37
- }
38
-
39
29
  &.no-icon {
40
30
  min-height: 2 * $padding-y + close.$close-size;
41
31
  padding-inline-start: $padding-x;
@@ -53,14 +43,47 @@
53
43
  }
54
44
  }
55
45
 
56
- // for notifications with mask-image icons
46
+ // for notifications with mask-image icons and post-icon override
47
+ &::before {
48
+ content: '';
49
+ display: block;
50
+ }
51
+
52
+ &::before,
53
+ > post-icon {
54
+ position: absolute;
55
+ height: $icon-size;
56
+ width: $icon-size;
57
+ left: $padding-x;
58
+ top: $padding-y;
59
+ }
60
+
57
61
  &.no-icon,
58
62
  &[class^='pi-'],
59
63
  &[class*=' pi-'] {
60
64
  &::before {
61
65
  content: unset;
62
66
  }
67
+
68
+ > post-icon {
69
+ display: none;
70
+ }
71
+ }
72
+
73
+ @include utilities-mx.high-contrast-mode {
74
+ filter: none !important;
75
+ background-color: transparent !important;
76
+ border: 2px solid WindowText;
63
77
  }
78
+ }
79
+
80
+ @mixin notification-body($size) {
81
+ $hr-margin-block: map.get(notification.$notification-hr-margin-block-map, $size);
82
+
83
+ display: flex;
84
+ flex-direction: column;
85
+ justify-content: center;
86
+ gap: notification.$notification-body-gap;
64
87
 
65
88
  a {
66
89
  font-weight: notification.$notification-link-font-weight;
@@ -70,28 +93,34 @@
70
93
  margin-block: $hr-margin-block !important;
71
94
  }
72
95
 
73
- > *:only-child {
96
+ > :only-child,
97
+ > post-icon:first-child + :last-child {
74
98
  @include notification-heading($size);
75
99
  }
76
100
 
77
- @include utilities-mx.high-contrast-mode {
78
- filter: none !important;
79
- background-color: transparent !important;
80
- border: 2px solid WindowText;
101
+ > * {
102
+ margin: 0;
81
103
  }
82
104
  }
83
105
 
84
106
  @mixin notification-variant($color, $icon) {
85
- @include color-mx.colored-background($color);
107
+ @include color-mx.colored-background($color, $allow-alpha: false);
86
108
 
109
+ // default icon (mask-image)
87
110
  &:not(.no-icon, [class^='pi-'], [class*=' pi-'])::before {
88
111
  @include icons-mx.icon($icon);
89
112
  }
113
+
114
+ // icon override (post-icon)
115
+ > post-icon {
116
+ background-color: $color;
117
+ }
90
118
  }
91
119
 
92
120
  @mixin notification-dismissible($size, $close: 'btn-close') {
93
121
  $padding-x: map.get(notification.$notification-padding-x-map, $size);
94
122
 
123
+ pointer-events: auto;
95
124
  position: relative;
96
125
  padding-inline-end: $padding-x + notification.$notification-gap + close.$close-size;
97
126
 
@@ -101,7 +130,7 @@
101
130
  inset-inline-end: $padding-x;
102
131
  }
103
132
 
104
- > .#{$close}:first-child + *:last-child {
133
+ > .#{$close}:first-child + :last-child {
105
134
  @include notification-heading($size);
106
135
  }
107
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-styles",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
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",
@@ -21,36 +21,36 @@
21
21
  "@angular-devkit/schematics": "=15.0.4",
22
22
  "@angular/core": "=15.0.4",
23
23
  "@popperjs/core": "2.11.8",
24
- "bootstrap": "5.3.1",
24
+ "bootstrap": "5.3.2",
25
25
  "cheerio": "1.0.0-rc.12",
26
26
  "prettier": "2.8.8"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@angular/compiler": "=15.0.4",
30
- "@percy/cli": "1.26.3",
30
+ "@percy/cli": "1.27.2",
31
31
  "@percy/cypress": "3.1.2",
32
- "@swisspost/design-system-icons": "1.0.11",
33
- "@types/node": "18.17.12",
34
- "autoprefixer": "10.4.15",
32
+ "@swisspost/design-system-icons": "1.0.12",
33
+ "@types/node": "18.18.0",
34
+ "autoprefixer": "10.4.16",
35
35
  "copyfiles": "2.4.1",
36
- "cypress": "12.17.4",
36
+ "cypress": "13.2.0",
37
37
  "cypress-storybook": "0.5.1",
38
- "glob": "10.3.3",
38
+ "glob": "10.3.7",
39
39
  "gulp": "4.0.2",
40
40
  "gulp-newer": "^1.4.0",
41
41
  "gulp-postcss": "9.0.1",
42
42
  "gulp-sass": "5.1.0",
43
- "jest": "29.6.4",
43
+ "jest": "29.7.0",
44
44
  "npm-run-all": "4.1.5",
45
- "postcss": "8.4.28",
46
- "postcss-scss": "4.0.7",
45
+ "postcss": "8.4.30",
46
+ "postcss-scss": "4.0.8",
47
47
  "rimraf": "5.0.1",
48
- "sass": "1.66.1",
48
+ "sass": "1.68.0",
49
49
  "stylelint": "15.10.3",
50
50
  "stylelint-config-prettier": "9.0.5",
51
51
  "stylelint-config-sass-guidelines": "9.0.1",
52
52
  "stylelint-prettier": "2.0.0",
53
- "stylelint-scss": "5.1.0",
53
+ "stylelint-scss": "5.2.1",
54
54
  "typescript": "4.9.5"
55
55
  },
56
56
  "sass": {
@@ -5,7 +5,4 @@
5
5
  height: 1em;
6
6
  margin-left: 0.5rem;
7
7
  border: 0;
8
- background-repeat: no-repeat;
9
- background-size: 1em;
10
- vertical-align: top;
11
8
  }
@@ -1,3 +1,2 @@
1
1
  @use './dropdown';
2
- @use './notification';
3
2
  @use './text';
@@ -3,7 +3,7 @@
3
3
  @use './../variables/spacing';
4
4
  @use './../variables/type';
5
5
  @use './../variables/color';
6
- @use './../mixins';
6
+ @use './../mixins/size' as size-mx;
7
7
  @use './../mixins/type' as type-mx;
8
8
  @use './../variables/components/paragraph';
9
9
 
@@ -145,14 +145,14 @@
145
145
  .h-highlighted {
146
146
  @extend %font-curve-regular;
147
147
  @extend %text-bottom-spacer;
148
- @include mixins.bezel-regular;
148
+ @include size-mx.bezel-regular;
149
149
  background-color: rgba(map.get(color.$background-colors, 'nightblue-bright'), 0.1);
150
150
 
151
151
  @include media-breakpoint-up(lg) {
152
- @include mixins.bezel-medium;
152
+ @include size-mx.bezel-medium;
153
153
  }
154
154
  @include media-breakpoint-up(xxl) {
155
- @include mixins.bezel-large;
155
+ @include size-mx.bezel-large;
156
156
  }
157
157
  }
158
158
  }
@@ -10,3 +10,5 @@
10
10
 
11
11
  @import 'bootstrap/scss/maps';
12
12
  @import 'bootstrap/scss/mixins';
13
+
14
+ @import './overrides-mixins';
@@ -0,0 +1,33 @@
1
+ @use './../../variables/components/tooltips';
2
+
3
+ // Keep this mixin override: it is necessary to clear Bootstrap styles for .is-(in)valid and .(in)valid-feedback
4
+ @mixin form-validation-state(
5
+ $state,
6
+ $color,
7
+ $icon,
8
+ $tooltip-color: color-contrast($color),
9
+ $tooltip-bg-color: $color,
10
+ $focus-box-shadow,
11
+ $border-color
12
+ ) {
13
+ // DEPRECATED
14
+ .#{$state}-tooltip {
15
+ position: absolute;
16
+ top: 100%;
17
+ z-index: 5;
18
+ display: none;
19
+ max-width: 100%; // Contain to parent when possible
20
+ padding: tooltips.$tooltip-padding-y tooltips.$tooltip-padding-x;
21
+ margin-top: 0.1rem;
22
+ @include font-size(tooltips.$tooltip-font-size);
23
+ color: $tooltip-color;
24
+ background-color: $tooltip-bg-color;
25
+ @include border-radius(tooltips.$tooltip-border-radius);
26
+ }
27
+
28
+ @include form-validation-state-selector($state) {
29
+ ~ .#{$state}-tooltip {
30
+ display: block;
31
+ }
32
+ }
33
+ }
@@ -20,9 +20,8 @@
20
20
  @forward './../../variables/components/dropdowns';
21
21
  @forward './../../variables/components/figures';
22
22
  @forward './../../variables/components/form-check';
23
- @forward './../../variables/components/form-feedback';
23
+ @forward './../../variables/components/form-validation';
24
24
  @forward './../../variables/components/form-select';
25
- @forward './../../variables/components/form-switch';
26
25
  @forward './../../variables/components/forms';
27
26
  @forward './../../variables/components/list-group';
28
27
  @forward './../../variables/components/modal';
@@ -11,13 +11,6 @@
11
11
  $datatable-header-font-weight: type.$font-weight-bold;
12
12
  $datatable-header-unsorted-color: color.$gray-60;
13
13
 
14
- $_chevron-up: icons.get-colored-svg-url('2112', color.$gray-80);
15
- $_chevron-down: icons.get-colored-svg-url('2113', color.$gray-80);
16
- $_chevron-double: icons.get-colored-svg-url('2127', color.$gray-80);
17
- $datatable-sort-asc-icon: url($_chevron-up);
18
- $datatable-sort-desc-icon: url($_chevron-down);
19
- $datatable-sort-unset-icon: url($_chevron-double);
20
-
21
14
  $datatable-cell-bg: color.$gray-background-light;
22
15
  $datatable-cell-padding-x: spacing.$size-regular;
23
16
  $datatable-cell-padding-y: spacing.$size-mini;
@@ -45,9 +38,12 @@ $datatable-button-width: calc(100% - 2 * #{$datatable-button-margin});
45
38
  $datatable-button-height: $datatable-button-width;
46
39
  $datatable-button-focus-shadow: button.$btn-focus-box-shadow;
47
40
 
48
- $_pencil: icons.get-colored-svg-url('3193', color.$gray-80);
49
- $datatable-editable-icon: url($_pencil);
50
-
51
41
  $datatable-progressbar-height: spacing.$size-micro;
52
42
  $datatable-progressbar-backgroundcolor: color.$gray-10;
53
43
  $datatable-progressbar-activecolor: color.$yellow;
44
+
45
+ // DEPRECATED
46
+ $datatable-sort-asc-icon: url('#{icons.get-colored-svg-url('2112', color.$gray-80)}');
47
+ $datatable-sort-desc-icon: url('#{icons.get-colored-svg-url('2113', color.$gray-80)}');
48
+ $datatable-sort-unset-icon: url('#{icons.get-colored-svg-url('2127', color.$gray-80)}');
49
+ $datatable-editable-icon: url('#{icons.get-colored-svg-url('3193', color.$gray-80)}');
@@ -2,17 +2,41 @@
2
2
  @use './../color';
3
3
  @use './../spacing';
4
4
  @use './../type';
5
+ @use './../animation';
5
6
  @use './../../functions/icons';
6
7
  @use './../../functions/sizing';
7
8
 
9
+ $form-check-row-gap: spacing.$size-small-regular !default;
10
+ $form-check-column-gap: spacing.$size-mini !default;
11
+ $form-check-margin-bottom: spacing.$size-regular !default;
12
+ $form-check-inline-margin-left: spacing.$size-large !default;
13
+ $form-check-input-size: spacing.$size-large !default;
14
+ $form-check-input-border-width: forms.$input-border-width !default;
15
+ $form-check-input-focus-box-shadow: forms.$input-focus-box-shadow !default;
16
+
17
+ $form-switch-column-gap: spacing.$size-regular !default;
18
+ $form-switch-height: spacing.$size-big !default;
19
+ $form-switch-width: 2 * spacing.$size-big !default;
20
+ $form-switch-bg: rgba(var(--post-contrast-color-rgb), 0.3) !default;
21
+ $form-switch-checked-bg: var(--post-success) !default;
22
+ $form-switch-disabled-bg: color.$gray-20 !default;
23
+ $form-switch-background-image: linear-gradient(
24
+ to right,
25
+ #{$form-switch-bg} 50%,
26
+ #{$form-switch-checked-bg} 50%
27
+ ) !default;
28
+ $form-switch-color: color.$white !default;
29
+ $form-switch-border-color: color.$gray-60 !default;
30
+ $form-switch-checked-border-color: color.$black !default;
31
+ $form-switch-disabled-border-color: color.$gray-40 !default;
32
+ $form-switch-label-padding-top: ($form-switch-height - type.$line-height-copy) * 0.5 !default;
33
+
34
+ // DEPRECATED
8
35
  $form-check-input-width: spacing.$size-large !default;
9
36
  $form-check-min-height: $form-check-input-width !default;
10
37
  $form-check-padding-start: 0 !default;
11
- $form-check-margin-bottom: spacing.$size-regular !default;
12
-
13
38
  $form-check-input-color: forms.$input-border-color !default;
14
39
  $form-check-input-bg: transparent !default;
15
- $form-check-input-border-width: forms.$input-border-width !default;
16
40
  $form-check-input-border: $form-check-input-border-width solid $form-check-input-color !default;
17
41
  $form-check-input-border-radius: forms.$input-border-radius !default;
18
42
  $form-check-radio-border-radius: 50% !default;
@@ -21,34 +45,47 @@ $form-check-input-focus-width: forms.$input-focus-width !default;
21
45
  $form-check-input-focus-box-shadow: 0 0 0 $form-check-input-focus-width
22
46
  rgba($form-check-input-focus-border, 0.25) !default;
23
47
  $form-check-input-active-filter: none;
24
-
25
48
  $form-check-input-hover-color: forms.$input-focus-border-color !default;
26
-
27
49
  $form-check-input-checked-color: forms.$input-focus-border-color !default;
28
50
  $form-check-input-checked-bg-color: transparent !default;
29
51
  $form-check-input-checked-border-color: $form-check-input-checked-color !default;
30
52
  $form-check-input-checked-bg-icon: 3035 !default;
31
53
  $form-check-input-checked-bg-image: url('#{icons.get-colored-svg-url($form-check-input-checked-bg-icon, $form-check-input-checked-color)}') !default;
32
54
  $form-check-radio-checked-bg-icon: "data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='-3 -3 6 6'%3E%3Ccircle r='2'%3E%3C/circle%3E%3C/svg%3E" !default;
33
-
34
55
  $form-check-radio-checked-bg-image: url('#{icons.add-fill-color($form-check-radio-checked-bg-icon, $form-check-input-checked-color)}') !default;
35
-
36
56
  $form-check-input-indeterminate-color: $form-check-input-checked-color !default;
37
57
  $form-check-input-indeterminate-bg-color: transparent !default;
38
58
  $form-check-input-indeterminate-border-color: $form-check-input-indeterminate-color !default;
39
59
  $form-check-input-indeterminate-bg-icon: 2039 !default;
40
60
  $form-check-input-indeterminate-bg-image: url('#{icons.get-colored-svg-url($form-check-input-indeterminate-bg-icon, $form-check-input-indeterminate-color)}') !default;
41
-
42
61
  $form-check-inline-margin-end: spacing.$size-large !default;
43
-
44
62
  $form-check-label-cursor: pointer !default;
45
63
  $form-check-label-color: forms.$form-label-color !default;
64
+ $form-check-label-padding-x: spacing.$size-mini !default;
46
65
  $form-check-label-padding-top: (
47
66
  $form-check-input-width + sizing.px-to-rem($form-check-input-border-width) -
48
67
  type.$line-height-copy
49
68
  ) * 0.5 !default;
50
- $form-check-label-padding-x: spacing.$size-mini !default;
51
69
  $form-check-label-padding-start: $form-check-label-padding-top 0 0 $form-check-label-padding-x !default;
52
70
  $form-check-label-padding-end: $form-check-label-padding-top $form-check-label-padding-x 0 0 !default;
53
-
54
71
  $form-check-feedback-margin-top: spacing.$size-small-regular !default;
72
+ $form-switch-padding-start: 0 !default;
73
+ $form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-16 -16 32 32'><circle r='15' stroke='#{$form-switch-border-color}' stroke-width='2' fill='#{$form-switch-color}'/></svg>") !default;
74
+ $form-switch-border-radius: $form-switch-width !default;
75
+ $form-switch-transition: background-position animation.$transition-base-timing,
76
+ background-color animation.$transition-time-default !default;
77
+ $form-switch-checked-color: color.$white !default;
78
+ $form-switch-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-16 -16 32 32'><circle r='15' stroke='#{$form-switch-checked-border-color}' stroke-width='2' fill='#{$form-switch-checked-color}'/></svg>") !default;
79
+ $form-switch-focus-bg-image: $form-switch-checked-bg-image;
80
+ $form-switch-checked-bg-image-size: $form-switch-height;
81
+ $form-switch-hover-bg: rgba(var(--post-contrast-color-rgb), 0.1) !default;
82
+ $form-switch-linear-gradient: linear-gradient(
83
+ to right,
84
+ #{$form-switch-bg} 50%,
85
+ #{$form-switch-checked-bg} 50%
86
+ );
87
+ $form-switch-linear-gradient-size: (2 * $form-switch-width - $form-switch-height)
88
+ $form-switch-height;
89
+ $form-switch-label-padding-x: spacing.$size-regular !default;
90
+ $form-switch-label-padding-start: $form-switch-label-padding-top 0 0 $form-switch-label-padding-x !default;
91
+ $form-switch-label-padding-end: $form-switch-label-padding-top $form-switch-label-padding-x 0 0 !default;
@@ -1,25 +1,29 @@
1
- @use 'sass:map';
2
-
3
1
  @use './../color';
4
2
  @use './../spacing';
5
3
  @use './../type';
4
+ @use './../components/button';
5
+ @use './../components/forms';
6
6
 
7
7
  // Bootstrap variables
8
8
  $form-feedback-margin-top: 0 !default;
9
9
  $form-feedback-font-size: type.$font-size-regular !default;
10
10
  $form-feedback-valid-color: color.$gray-60 !default;
11
- $form-feedback-invalid-color: map.get(color.$background-colors, 'danger') !default;
12
- $form-feedback-icon-valid: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24pt' height='24pt' viewBox='0 0 24 24' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(0%25,50.588235%25,22.745098%25);fill-opacity:1;' d='M 9.5 18.398438 L 3.800781 12.699219 L 5.199219 11.300781 L 9.5 15.597656 L 18.800781 6.300781 L 20.199219 7.699219 Z M 9.5 18.398438 '/%3E%3C/g%3E%3C/svg%3E%0A");
13
- $form-feedback-icon-invalid: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24pt' height='24pt' viewBox='0 0 24 24' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(64.705882%25,9.019608%25,15.686275%25);fill-opacity:1;' d='M 11 3 L 13 3 L 13 17 L 11 17 Z M 11 3 '/%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(64.705882%25,9.019608%25,15.686275%25);fill-opacity:1;' d='M 11 19 L 13 19 L 13 21 L 11 21 Z M 11 19 '/%3E%3C/g%3E%3C/svg%3E%0A");
11
+ $form-feedback-invalid-color: color.$error !default;
12
+ $form-feedback-icon-valid: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24pt' height='24pt' viewBox='0 0 24 24' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(0%25,50.588235%25,22.745098%25);fill-opacity:1;' d='M 9.5 18.398438 L 3.800781 12.699219 L 5.199219 11.300781 L 9.5 15.597656 L 18.800781 6.300781 L 20.199219 7.699219 Z M 9.5 18.398438 '/%3E%3C/g%3E%3C/svg%3E%0A") !default;
13
+ $form-feedback-icon-invalid: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24pt' height='24pt' viewBox='0 0 24 24' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(64.705882%25,9.019608%25,15.686275%25);fill-opacity:1;' d='M 11 3 L 13 3 L 13 17 L 11 17 Z M 11 3 '/%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(64.705882%25,9.019608%25,15.686275%25);fill-opacity:1;' d='M 11 19 L 13 19 L 13 21 L 11 21 Z M 11 19 '/%3E%3C/g%3E%3C/svg%3E%0A") !default;
14
14
 
15
15
  // Design System custom variables
16
- $form-feedback-icon-size: 2rem; // Equals 24pt [svg-size]
17
- $form-feedback-icon-offset: map.get(spacing.$post-sizes, 'mini');
18
- $form-feedback-valid-bg: map.get(color.$background-colors, 'success') !default;
16
+ $form-feedback-padding-x: button.$input-btn-padding-x !default;
17
+ $form-feedback-padding-y: 0.5 * button.$input-btn-padding-x !default;
18
+ $form-feedback-icon-size: 2rem !default; // Equals 24pt [svg-size]
19
+ $form-feedback-icon-offset: spacing.$size-mini !default;
20
+ $form-feedback-valid-bg: color.$success !default;
19
21
  $form-feedback-valid-text: color.$white !default;
20
- $form-feedback-invalid-bg: map.get(color.$background-colors, 'danger') !default;
22
+ $form-feedback-invalid-bg: color.$error !default;
21
23
  $form-feedback-invalid-text: color.$white !default;
22
- $form-feedback-custom-color: map.get(color.$background-colors, 'success') !default;
23
- $form-feedback-custom-bg: map.get(color.$background-colors, 'success') !default;
24
+ $form-feedback-custom-color: color.$success !default;
25
+ $form-feedback-custom-bg: color.$success !default;
26
+ $form-feedback-invalid-box-shadow: 0 0 0 forms.$input-focus-width
27
+ rgba($form-feedback-invalid-color, 0.25) !default;
24
28
  $form-feedback-custom-text: color.$white !default;
25
29
  $form-feedback-custom-box-shadow: 0 0 0 0.2rem rgba($form-feedback-custom-color, 0.25) !default;
@@ -47,10 +47,10 @@ $input-border-radius-rg: 0 !default;
47
47
  $input-border-radius-sm: 0 !default;
48
48
 
49
49
  $input-focus-bg: $input-bg !default;
50
- $input-focus-border-color: color.$black !default;
50
+ $input-focus-border-color: var(--post-contrast-color-rgb) !default;
51
51
  $input-focus-color: $input-color !default;
52
52
  $input-focus-width: button.$input-btn-focus-width !default;
53
- $input-focus-box-shadow: button.$input-btn-focus-box-shadow !default;
53
+ $input-focus-box-shadow: 0 0 0 $input-focus-width rgba($input-focus-border-color, 0.25) !default;
54
54
  $input-focus-outline-thickness: spacing.$size-line;
55
55
 
56
56
  $input-placeholder-color: color.$gray-60 !default;
@@ -9,9 +9,8 @@
9
9
  @forward 'dropdowns';
10
10
  @forward 'figures';
11
11
  @forward 'form-check';
12
- @forward 'form-feedback';
12
+ @forward 'form-validation';
13
13
  @forward 'form-select';
14
- @forward 'form-switch';
15
14
  @forward 'forms';
16
15
  @forward 'list-group';
17
16
  @forward 'modal';
@@ -11,7 +11,7 @@ $notification-body-gap: spacing.$size-micro !default;
11
11
  $notification-font-weight: type.$font-weight-light !default;
12
12
  $notification-link-font-weight: type.$font-weight-normal !default;
13
13
  $notification-heading-font-weight: type.$headings-font-weight !default;
14
- $notification-buttons-margin-start: spacing.$size-mini !default;
14
+ $notification-buttons-gap: spacing.$size-mini !default;
15
15
 
16
16
  $notification-padding-x-map: () !default;
17
17
  $notification-padding-x-map: map-merge(
@@ -82,3 +82,6 @@ $notification-variants: join(
82
82
  'error' color.$error 2104
83
83
  )
84
84
  );
85
+
86
+ // deprecated
87
+ $notification-buttons-margin-start: $notification-buttons-gap !default;
@@ -14,17 +14,11 @@ $stepper-indicator-font-size: type.$font-size-regular;
14
14
  $stepper-indicator-font-weight: type.$font-weight-base;
15
15
  $stepper-indicator-bg: color.$yellow;
16
16
  $stepper-indicator-color: color.$black;
17
- $_stepper-indicator-check-icon: icon-fn.get-colored-svg-url('2105', $stepper-indicator-color);
18
- $stepper-indicator-check-icon: url($_stepper-indicator-check-icon);
17
+ $stepper-indicator-check-icon-size: spacing.$size-large;
19
18
  $stepper-indicator-hover-color: color.$white;
20
19
  $stepper-indicator-hover-bg: color.$black;
21
20
  $stepper-indicator-hover-outline: forms.$input-focus-outline-thickness solid
22
21
  var(--post-contrast-color);
23
- $_stepper-indicator-hover-check-icon: icon-fn.get-colored-svg-url(
24
- '2105',
25
- $stepper-indicator-hover-color
26
- );
27
- $stepper-indicator-hover-check-icon: url($_stepper-indicator-hover-check-icon);
28
22
  $stepper-indicator-future-bg: color.$gray-60;
29
23
  $stepper-indicator-future-color: color.$white;
30
24
 
@@ -34,3 +28,10 @@ $stepper-link-hover-color: color.$black;
34
28
  $stepper-link-current-color: color.$black;
35
29
  $stepper-link-current-font-size: type.$font-size-regular;
36
30
  $stepper-link-current-font-weight: type.$font-weight-bold;
31
+
32
+ // DEPRECATED
33
+ $stepper-indicator-check-icon: url('#{icon-fn.get-colored-svg-url('2105', $stepper-indicator-color)}');
34
+ $stepper-indicator-hover-check-icon: url('#{icon-fn.get-colored-svg-url(
35
+ '2105',
36
+ $stepper-indicator-hover-color
37
+ )}');
@@ -9,6 +9,11 @@ $content-cols: (
9
9
  xl: 7,
10
10
  );
11
11
 
12
+ $content-gap: (
13
+ rg: 32px,
14
+ xl: 40px,
15
+ );
16
+
12
17
  $image-cols: (
13
18
  xs: 10,
14
19
  rg: 8,