@transfermarkt/global-styles 1.35.0 → 1.36.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transfermarkt/global-styles",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "description": "Shared styles and Global configuration for stylelint rules of the Transfermarkt projects",
5
5
  "author": "Transfermarkt",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- @forward 'infos-cards';
1
+ @forward 'hints';
@@ -4,7 +4,7 @@
4
4
  @use '../../../mixins/breakpoint' as *;
5
5
  @use '../../../mixins/icon' as *;
6
6
 
7
- .info-card__info {
7
+ .tm-hint {
8
8
  border-radius: rem-calc(8);
9
9
  padding: rem-calc(12) rem-calc(16);
10
10
 
@@ -29,7 +29,6 @@
29
29
  content: '';
30
30
  flex: 0 0 rem-calc(20);
31
31
  height: rem-calc(20);
32
- margin-top: rem-calc(2);
33
32
  mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
34
33
  mask-size: contain;
35
34
  }
@@ -39,7 +38,7 @@
39
38
  background-color: tm-color('warning-light-new');
40
39
  color: tm-color('warning-new');
41
40
 
42
- .info-card__info-text::before {
41
+ .tm-hint-text::before {
43
42
  background-color: tm-color('warning-dark-new');
44
43
  mask: url('https://tmsi.akamaized.net/tm-svg-icons/attention.svg') no-repeat center;
45
44
  mask-size: contain;
@@ -50,50 +49,95 @@
50
49
  background-color: tm-color('alice-blue');
51
50
  color: tm-color('slate-blue');
52
51
 
53
- .info-card__info-text::before {
52
+ .tm-hint-text::before {
54
53
  background-color: tm-color('slate-blue');
55
54
  mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
56
55
  mask-size: contain;
57
56
  }
58
57
  }
59
58
 
60
- &--blue-new {
61
- background-color: tm-color('alice-blue');
62
- color: tm-color('admiral');
63
-
64
- .info-card__info-text::before {
65
- background-color: tm-color('light-blue-new');
66
- mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
67
- mask-size: contain;
68
- }
69
- }
70
-
71
59
  &--success {
72
60
  background-color: tm-color('success-light');
73
61
  color: tm-color('success-dark');
74
62
 
75
- .info-card__info-text::before {
63
+ .tm-hint-text::before {
76
64
  background-color: tm-color('success-dark');
77
65
  mask: url('https://tmsi.akamaized.net/tm-svg-icons/success-check.svg') no-repeat center;
78
66
  mask-size: contain;
79
67
  }
80
68
  }
69
+ }
81
70
 
82
- &--border {
83
- background-color: tm-color('white');
84
- border: rem-calc(1) solid tm-color('silver-mist');
85
- color: tm-color('admiral');
71
+ /* stylelint-disable no-duplicate-selectors, scss/at-extend-no-missing-placeholder */
72
+ .msgBox {
73
+ display: none;
74
+ margin-top: rem-calc(-4);
75
+ }
86
76
 
87
- .info-card__info-text::before {
88
- background-color: tm-color('ash-grey');
77
+ .msgBox:has(.alert-box),
78
+ .msgBox:has(.errorbox) {
79
+ display: block;
80
+ }
89
81
 
90
- /* stylelint-disable-next-line property-no-vendor-prefix */
91
- -webkit-mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
92
- mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
82
+ .msgBox .errorbox {
83
+ @extend .tm-hint;
84
+ @extend .tm-hint--alert;
85
+
86
+ align-items: flex-start;
87
+ border: none;
88
+ display: flex;
89
+ font-family: tm-font('septenary');
90
+ font-size: rem-calc(16);
91
+ font-variation-settings: 'wght' 400;
92
+ font-weight: inherit;
93
+ gap: rem-calc(8);
94
+ line-height: rem-calc(24);
95
+ margin: 0;
96
+
97
+ @include breakpoint(laptop) {
98
+ font-size: rem-calc(14);
99
+ line-height: rem-calc(22);
100
+ }
93
101
 
94
- /* stylelint-disable-next-line property-no-vendor-prefix */
95
- -webkit-mask-size: contain;
96
- mask-size: contain;
97
- }
102
+ &::before {
103
+ background-color: currentcolor;
104
+ content: '';
105
+ flex: 0 0 rem-calc(20);
106
+ height: rem-calc(20);
107
+ margin-top: rem-calc(2);
108
+ mask: url('https://tmsi.akamaized.net/tm-svg-icons/attention.svg') no-repeat center;
109
+ mask-size: contain;
110
+ }
111
+ }
112
+
113
+ .msgBox .alert-box.success {
114
+ @extend .tm-hint;
115
+ @extend .tm-hint--success;
116
+
117
+ align-items: flex-start;
118
+ border: none;
119
+ display: flex;
120
+ font-family: tm-font('septenary');
121
+ font-size: rem-calc(16);
122
+ font-variation-settings: 'wght' 400;
123
+ font-weight: inherit;
124
+ gap: rem-calc(8);
125
+ line-height: rem-calc(24);
126
+ margin: rem-calc(-4) 0 0;
127
+
128
+ @include breakpoint(laptop) {
129
+ font-size: rem-calc(14);
130
+ line-height: rem-calc(22);
131
+ }
132
+
133
+ &::before {
134
+ background-color: currentcolor;
135
+ content: '';
136
+ flex: 0 0 rem-calc(20);
137
+ height: rem-calc(20);
138
+ margin-top: rem-calc(2);
139
+ mask: url('https://tmsi.akamaized.net/tm-svg-icons/success-check.svg') no-repeat center;
140
+ mask-size: contain;
98
141
  }
99
142
  }
143
+ /* stylelint-enable no-duplicate-selectors, scss/at-extend-no-missing-placeholder */