@transfermarkt/global-styles 1.9.0 → 1.11.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.
|
@@ -17,10 +17,12 @@ module.exports = {
|
|
|
17
17
|
}
|
|
18
18
|
],
|
|
19
19
|
"at-rule-disallowed-list": [
|
|
20
|
-
["media","import"],
|
|
21
|
-
{
|
|
20
|
+
["media", "import"],
|
|
21
|
+
{
|
|
22
|
+
severity: (atRule) => {
|
|
22
23
|
return atRule.includes("import") ? "error" : "warning"
|
|
23
|
-
}
|
|
24
|
+
}
|
|
25
|
+
}],
|
|
24
26
|
'unit-disallowed-list': ['px',
|
|
25
27
|
{
|
|
26
28
|
'ignoreProperties': {
|
|
@@ -44,7 +46,21 @@ module.exports = {
|
|
|
44
46
|
],
|
|
45
47
|
'selector-pseudo-class-no-unknown': [
|
|
46
48
|
true,
|
|
47
|
-
{
|
|
49
|
+
{ignorePseudoClasses: 'global'},
|
|
48
50
|
],
|
|
51
|
+
"selector-class-pattern": [
|
|
52
|
+
"^[a-z]([a-z0-9]*)(-[a-z0-9]+)*(__[a-z0-9]+(-[a-z0-9]+)*)?(--[a-z0-9]+(-[a-z0-9]+)*)?$",
|
|
53
|
+
{
|
|
54
|
+
"severity": "warning",
|
|
55
|
+
"message": "Unexpected class selector format. Class selectors must be written in kebab-case or BEM format, e.g., my-class-name or my__class--name."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
'selector-id-pattern': [
|
|
59
|
+
'^[a-z]([a-z0-9]+(-[a-z0-9]+)*)?$',
|
|
60
|
+
{
|
|
61
|
+
severity: 'warning',
|
|
62
|
+
message: 'Unexpected ID selector format. ID selectors must be written in kebab-case, e.g., my-id-name.'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
49
65
|
},
|
|
50
66
|
};
|
package/package.json
CHANGED
package/scss/mixins/_icon.scss
CHANGED
|
@@ -1,23 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* stylelint-disable */
|
|
2
|
+
$icon-color-filters: (
|
|
3
|
+
white: invert(100%) sepia(100%) saturate(1%) hue-rotate(207deg) brightness(102%) contrast(102%),
|
|
4
|
+
admiral: invert(9%) sepia(84%) saturate(2624%) hue-rotate(209deg) brightness(16%) contrast(87%),
|
|
5
|
+
lightblue-light: invert(47%) sepia(87%) saturate(1532%) hue-rotate(184deg) brightness(103%)
|
|
6
|
+
contrast(101%),
|
|
7
|
+
darkblue-400: invert(78%) sepia(6%) saturate(7%) hue-rotate(196deg) brightness(92%) contrast(87%),
|
|
8
|
+
warning-dark: invert(15%) sepia(98%) saturate(6752%) hue-rotate(350deg) brightness(90%)
|
|
9
|
+
contrast(105%),
|
|
10
|
+
warning: invert(22%) sepia(93%) saturate(6517%) hue-rotate(353deg) brightness(101%) contrast(102%),
|
|
11
|
+
success-dark: invert(29%) sepia(58%) saturate(433%) hue-rotate(121deg) brightness(92%)
|
|
12
|
+
contrast(87%),
|
|
13
|
+
success: invert(40%) sepia(44%) saturate(643%) hue-rotate(135deg) brightness(93%) contrast(95%)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
@function icon-filter-base($state) {
|
|
17
|
+
@if $state == 'disabled' {
|
|
18
|
+
@return invert(80%) sepia(10%) saturate(0%) brightness(90%) contrast(80%);
|
|
19
|
+
} @else if $state == 'warning' {
|
|
20
|
+
@return invert(77%) sepia(38%) saturate(5784%) hue-rotate(359deg) brightness(101%)
|
|
21
|
+
contrast(105%);
|
|
22
|
+
} @else if $state == 'success' {
|
|
23
|
+
@return invert(58%) sepia(79%) saturate(415%) hue-rotate(93deg) brightness(95%) contrast(91%);
|
|
24
|
+
} @else {
|
|
25
|
+
@return invert(100%) sepia(100%) saturate(1%) hue-rotate(207deg) brightness(102%) contrast(102%);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@function icon-filter-hover($state) {
|
|
30
|
+
@if $state == 'warning' {
|
|
31
|
+
@return invert(65%) sepia(60%) saturate(4500%) hue-rotate(359deg) brightness(105%)
|
|
32
|
+
contrast(110%);
|
|
33
|
+
} @else if $state == 'success' {
|
|
34
|
+
@return invert(58%) sepia(90%) saturate(500%) hue-rotate(93deg) brightness(100%) contrast(95%);
|
|
35
|
+
} @else {
|
|
36
|
+
@return invert(90%) sepia(90%) saturate(10%) hue-rotate(207deg) brightness(110%) contrast(110%);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin tm-icon($name, $position, $state: 'default', $color-name: null, $size: 20px) {
|
|
41
|
+
$base-url: 'https://tmsi.akamaized.net/tm-svg-icons';
|
|
42
|
+
$image-url: '#{$base-url}/#{$name}.svg';
|
|
43
|
+
$use-custom: map-has-key($icon-color-filters, $color-name);
|
|
44
|
+
$custom-filter: if($use-custom, map-get($icon-color-filters, $color-name), null);
|
|
45
|
+
|
|
46
|
+
@if $position == 'left' or $position == 'both' {
|
|
47
|
+
&::before {
|
|
48
|
+
content: '';
|
|
49
|
+
display: inline-block;
|
|
50
|
+
width: $size;
|
|
51
|
+
height: $size;
|
|
52
|
+
background: url('#{$image-url}') no-repeat center / contain;
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
margin-right: 8px;
|
|
55
|
+
transform: rotate(180deg);
|
|
56
|
+
@if $use-custom {
|
|
57
|
+
filter: $custom-filter;
|
|
58
|
+
} @else {
|
|
59
|
+
filter: icon-filter-base($state);
|
|
60
|
+
@if $state != 'disabled' {
|
|
61
|
+
&:hover {
|
|
62
|
+
filter: icon-filter-hover($state);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if $position == 'right' or $position == 'both' {
|
|
3
70
|
&::after {
|
|
4
|
-
background: url('https://tmsi.akamaized.net/tm-svg-icons/arrow/right.svg');
|
|
5
|
-
bottom: 0;
|
|
6
|
-
color: white;
|
|
7
71
|
content: '';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
72
|
+
display: inline-block;
|
|
73
|
+
width: $size;
|
|
74
|
+
height: $size;
|
|
75
|
+
background: url('#{$image-url}') no-repeat center / contain;
|
|
76
|
+
vertical-align: middle;
|
|
77
|
+
margin-left: 8px;
|
|
78
|
+
|
|
79
|
+
@if $use-custom {
|
|
80
|
+
filter: $custom-filter;
|
|
81
|
+
} @else {
|
|
82
|
+
filter: icon-filter-base($state);
|
|
83
|
+
@if $state != 'disabled' {
|
|
84
|
+
&:hover {
|
|
85
|
+
filter: icon-filter-hover($state);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
21
89
|
}
|
|
22
90
|
}
|
|
23
91
|
}
|
|
92
|
+
/* stylelint-enable */
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
@use '../../../functions/rem-calc' as *;
|
|
2
2
|
@use '../../../functions/tm-color' as *;
|
|
3
3
|
@use '../../../functions/tm-font' as *;
|
|
4
|
+
@use '../../../mixins/breakpoint' as *;
|
|
4
5
|
@use '../../../mixins/icon' as *;
|
|
5
6
|
|
|
6
7
|
.tm-btn {
|
|
7
|
-
|
|
8
|
+
$position: 'right';
|
|
9
|
+
|
|
10
|
+
align-items: center;
|
|
8
11
|
border: none;
|
|
9
12
|
border-radius: 8px;
|
|
10
13
|
color: tm-color('white');
|
|
@@ -14,36 +17,185 @@
|
|
|
14
17
|
font-size: rem-calc(16);
|
|
15
18
|
font-variation-settings: 'wght' 600;
|
|
16
19
|
font-weight: normal;
|
|
17
|
-
|
|
20
|
+
height: rem-calc(40);
|
|
21
|
+
justify-content: center;
|
|
22
|
+
line-height: rem-calc(20);
|
|
18
23
|
margin: rem-calc(10);
|
|
19
|
-
|
|
24
|
+
padding: rem-calc(8) rem-calc(20);
|
|
20
25
|
position: relative;
|
|
21
26
|
text-decoration: none;
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
&__icon--left {
|
|
29
|
+
padding-right: rem-calc(24) !important;
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
@include tm-icon('chevron', 'left', 'default', 'white');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__icon--right {
|
|
35
|
+
padding-left: rem-calc(24) !important;
|
|
36
|
+
|
|
37
|
+
@include tm-icon('chevron', 'right', 'default', 'white');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__icon--both {
|
|
41
|
+
@include tm-icon('chevron', 'both', 'default', 'white');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--admiral {
|
|
45
|
+
&__icon--left {
|
|
46
|
+
@include tm-icon('chevron', 'left', 'default', 'admiral');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__icon--right {
|
|
50
|
+
@include tm-icon('chevron', 'right', 'default', 'admiral');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__icon--both {
|
|
54
|
+
@include tm-icon('chevron', 'both', 'default', 'admiral');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--lightblue-light {
|
|
59
|
+
&__icon--left {
|
|
60
|
+
@include tm-icon('chevron', 'left', 'default', 'lightblue-light');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__icon--right {
|
|
64
|
+
@include tm-icon('chevron', 'right', 'default', 'lightblue-light');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__icon--both {
|
|
68
|
+
@include tm-icon('chevron', 'both', 'default', 'lightblue-light');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&--darkblue-400 {
|
|
73
|
+
&__icon--left {
|
|
74
|
+
@include tm-icon('chevron', 'left', 'default', 'darkblue-400');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__icon--right {
|
|
78
|
+
@include tm-icon('chevron', 'right', 'default', 'darkblue-400');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__icon--both {
|
|
82
|
+
@include tm-icon('chevron', 'both', 'default', 'darkblue-400');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&--warning-dark {
|
|
87
|
+
&__icon--left {
|
|
88
|
+
@include tm-icon('chevron', 'left', 'default', 'warning-dark');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__icon--right {
|
|
92
|
+
@include tm-icon('chevron', 'right', 'default', 'warning-dark');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&__icon--both {
|
|
96
|
+
@include tm-icon('chevron', 'both', 'default', 'warning-dark');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--warning {
|
|
101
|
+
&__icon--left {
|
|
102
|
+
@include tm-icon('chevron', 'left', 'default', 'warning');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&__icon--right {
|
|
106
|
+
@include tm-icon('chevron', 'right', 'default', 'warning');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&__icon--both {
|
|
110
|
+
@include tm-icon('chevron', 'both', 'default', 'warning');
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--success-dark {
|
|
115
|
+
&__icon--left {
|
|
116
|
+
@include tm-icon('chevron', 'left', 'default', 'success-dark');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__icon--right {
|
|
120
|
+
@include tm-icon('chevron', 'right', 'default', 'success-dark');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__icon--both {
|
|
124
|
+
@include tm-icon('chevron', 'both', 'default', 'success-dark');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&--success {
|
|
129
|
+
&__icon--left {
|
|
130
|
+
@include tm-icon('chevron', 'left', 'default', 'success');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&__icon--right {
|
|
134
|
+
@include tm-icon('chevron', 'right', 'default', 'success');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__icon--both {
|
|
138
|
+
@include tm-icon('chevron', 'both', 'default', 'success');
|
|
28
139
|
}
|
|
29
140
|
}
|
|
30
141
|
|
|
31
142
|
&__primary {
|
|
143
|
+
background-color: tm-color('dark-blue-new');
|
|
144
|
+
|
|
32
145
|
&--large {
|
|
33
|
-
|
|
34
|
-
|
|
146
|
+
display: flex;
|
|
147
|
+
|
|
148
|
+
@include breakpoint(desktop) {
|
|
149
|
+
padding: rem-calc(8) rem-calc(20);
|
|
150
|
+
text-transform: uppercase;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&__icon--left {
|
|
154
|
+
@include tm-icon('chevron', 'left', 'default', 'white', rem-calc(20));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__icon--right {
|
|
158
|
+
@include tm-icon('chevron', 'right', 'default', 'white', rem-calc(20));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&__icon--both {
|
|
162
|
+
@include tm-icon('chevron', 'right', 'default', 'white', rem-calc(20));
|
|
163
|
+
}
|
|
35
164
|
}
|
|
36
165
|
|
|
37
166
|
&--medium {
|
|
38
167
|
font-size: rem-calc(14);
|
|
39
168
|
line-height: rem-calc(20);
|
|
40
169
|
padding: rem-calc(8) rem-calc(16);
|
|
170
|
+
|
|
171
|
+
&__icon--left {
|
|
172
|
+
@include tm-icon('chevron', 'left', 'default', 'white', rem-calc(16));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__icon--right {
|
|
176
|
+
@include tm-icon('chevron', 'right', 'default', 'white', rem-calc(16));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&__icon--both {
|
|
180
|
+
@include tm-icon('chevron', 'right', 'default', 'white', rem-calc(16));
|
|
181
|
+
}
|
|
41
182
|
}
|
|
42
183
|
|
|
43
184
|
&--small {
|
|
44
185
|
font-size: rem-calc(12);
|
|
45
|
-
line-height: rem-calc(14);
|
|
46
186
|
padding: rem-calc(8) rem-calc(12);
|
|
187
|
+
|
|
188
|
+
&__icon--left {
|
|
189
|
+
@include tm-icon('chevron', 'left', 'default', 'white', rem-calc(14));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&__icon--right {
|
|
193
|
+
@include tm-icon('chevron', 'right', 'default', 'white', rem-calc(14));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&__icon--both {
|
|
197
|
+
@include tm-icon('chevron', 'right', 'default', 'white', rem-calc(14));
|
|
198
|
+
}
|
|
47
199
|
}
|
|
48
200
|
|
|
49
201
|
&:hover {
|
|
@@ -76,4 +228,92 @@
|
|
|
76
228
|
}
|
|
77
229
|
}
|
|
78
230
|
}
|
|
231
|
+
|
|
232
|
+
&__secondary {
|
|
233
|
+
background-color: tm-color('white');
|
|
234
|
+
color: tm-color('admiral');
|
|
235
|
+
opacity: 1;
|
|
236
|
+
|
|
237
|
+
&--large {
|
|
238
|
+
text-transform: uppercase;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&--medium {
|
|
242
|
+
font-size: rem-calc(14);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&--small {
|
|
246
|
+
font-size: rem-calc(12);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:hover {
|
|
250
|
+
color: tm-color('light-blue-new');
|
|
251
|
+
text-decoration: none;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&--disabled {
|
|
255
|
+
background-color: tm-color('gainsboro-new');
|
|
256
|
+
color: tm-color('grey-new');
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&--warning {
|
|
260
|
+
color: tm-color('warning-new');
|
|
261
|
+
|
|
262
|
+
&:hover {
|
|
263
|
+
color: tm-color('warning-dark-new');
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&--success {
|
|
268
|
+
color: tm-color('success');
|
|
269
|
+
|
|
270
|
+
&:hover {
|
|
271
|
+
color: tm-color('success-light');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&__tertiary {
|
|
277
|
+
background-color: tm-color('white');
|
|
278
|
+
border: 1px solid #d9dde2;
|
|
279
|
+
color: tm-color('admiral');
|
|
280
|
+
|
|
281
|
+
&--large {
|
|
282
|
+
text-transform: uppercase;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&--medium {
|
|
286
|
+
font-size: rem-calc(14);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
&--small {
|
|
290
|
+
font-size: rem-calc(12);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&:hover {
|
|
294
|
+
color: tm-color('light-blue-new');
|
|
295
|
+
text-decoration: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
&--disabled {
|
|
299
|
+
background-color: tm-color('gainsboro-new');
|
|
300
|
+
color: tm-color('grey-new');
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&--warning {
|
|
304
|
+
color: tm-color('warning-new');
|
|
305
|
+
|
|
306
|
+
&:hover {
|
|
307
|
+
color: tm-color('warning-dark-new');
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&--success {
|
|
312
|
+
color: tm-color('success-new');
|
|
313
|
+
|
|
314
|
+
&:hover {
|
|
315
|
+
color: tm-color('success-light');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
79
319
|
}
|
|
@@ -10,6 +10,7 @@ $tm-colors: (
|
|
|
10
10
|
'cobalt': #00449e,
|
|
11
11
|
'cyan': #5ca6ff,
|
|
12
12
|
'dark-blue': #1a3151,
|
|
13
|
+
'dark-blue-150': #d9dde2,
|
|
13
14
|
'dark-blue-new': #0087ff,
|
|
14
15
|
'denim': #374457,
|
|
15
16
|
'foggy-sky': #d2e3ed,
|
|
@@ -42,8 +43,9 @@ $tm-colors: (
|
|
|
42
43
|
'forest-green': #35652f,
|
|
43
44
|
// old name -> $wahretabelleDark
|
|
44
45
|
'green': #749f18,
|
|
45
|
-
'success-
|
|
46
|
-
'success
|
|
46
|
+
'success-light': #dffcf1,
|
|
47
|
+
'success': #30996c,
|
|
48
|
+
'success-dark': #1d6e4f,
|
|
47
49
|
'lightest-green': #e3ecd1,
|
|
48
50
|
'limeade': #55a826,
|
|
49
51
|
'olivine': #a5c169,
|
|
@@ -99,6 +101,7 @@ $tm-colors: (
|
|
|
99
101
|
'raspberry-ripple': #c8102e,
|
|
100
102
|
'pure-red': #f00,
|
|
101
103
|
'warning-new': #c90c0c,
|
|
104
|
+
'warning-dark-new': #ef1717,
|
|
102
105
|
'warning-light-new': #ffedea,
|
|
103
106
|
'pale-chestnut': #e6a8ae,
|
|
104
107
|
// yellows
|