@transfermarkt/global-styles 1.10.0 → 1.12.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
package/scss/mixins/_icon.scss
CHANGED
|
@@ -1,71 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
);
|
|
4
15
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
}
|
|
16
28
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
}
|
|
23
39
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
saturate(1%)
|
|
30
|
-
hue-rotate(207deg)
|
|
31
|
-
brightness(102%)
|
|
32
|
-
contrast(102%);
|
|
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);
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
+
}
|
|
41
65
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
sepia(38%)
|
|
45
|
-
saturate(5784%)
|
|
46
|
-
hue-rotate(359deg)
|
|
47
|
-
brightness(101%)
|
|
48
|
-
contrast(105%);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
49
68
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
filter: invert(58%) sepia(79%) saturate(415%) hue-rotate(93deg) brightness(95%) contrast(91%);
|
|
69
|
+
@if $position == 'right' or $position == 'both' {
|
|
70
|
+
&::after {
|
|
71
|
+
content: '';
|
|
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;
|
|
60
78
|
|
|
61
|
-
|
|
62
|
-
filter:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
}
|
|
68
88
|
}
|
|
69
89
|
}
|
|
70
90
|
}
|
|
71
91
|
}
|
|
92
|
+
/* stylelint-enable */
|
|
@@ -1,11 +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';
|
|
8
9
|
|
|
10
|
+
align-items: center;
|
|
9
11
|
border: none;
|
|
10
12
|
border-radius: 8px;
|
|
11
13
|
color: tm-color('white');
|
|
@@ -15,33 +17,125 @@
|
|
|
15
17
|
font-size: rem-calc(16);
|
|
16
18
|
font-variation-settings: 'wght' 600;
|
|
17
19
|
font-weight: normal;
|
|
18
|
-
|
|
20
|
+
height: rem-calc(40);
|
|
21
|
+
justify-content: center;
|
|
22
|
+
line-height: rem-calc(20);
|
|
19
23
|
margin: rem-calc(10);
|
|
20
|
-
|
|
24
|
+
padding: rem-calc(8) rem-calc(20);
|
|
21
25
|
position: relative;
|
|
22
26
|
text-decoration: none;
|
|
23
27
|
|
|
24
|
-
&__icon {
|
|
25
|
-
|
|
26
|
-
&.tm-btn__primary--large {
|
|
27
|
-
@include tm-icon('arrow', 'left', 'default');
|
|
28
|
-
}
|
|
28
|
+
&__icon--left {
|
|
29
|
+
padding-right: rem-calc(24) !important;
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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');
|
|
34
47
|
}
|
|
35
48
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
49
|
+
&__icon--right {
|
|
50
|
+
@include tm-icon('chevron', 'right', 'default', 'admiral');
|
|
51
|
+
}
|
|
40
52
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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');
|
|
45
139
|
}
|
|
46
140
|
}
|
|
47
141
|
|
|
@@ -49,20 +143,59 @@
|
|
|
49
143
|
background-color: tm-color('dark-blue-new');
|
|
50
144
|
|
|
51
145
|
&--large {
|
|
52
|
-
|
|
53
|
-
|
|
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
|
+
}
|
|
54
164
|
}
|
|
55
165
|
|
|
56
166
|
&--medium {
|
|
57
167
|
font-size: rem-calc(14);
|
|
58
168
|
line-height: rem-calc(20);
|
|
59
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
|
+
}
|
|
60
182
|
}
|
|
61
183
|
|
|
62
184
|
&--small {
|
|
63
185
|
font-size: rem-calc(12);
|
|
64
|
-
line-height: rem-calc(14);
|
|
65
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
|
+
}
|
|
66
199
|
}
|
|
67
200
|
|
|
68
201
|
&:hover {
|
|
@@ -86,12 +219,12 @@
|
|
|
86
219
|
}
|
|
87
220
|
|
|
88
221
|
&--success {
|
|
89
|
-
background-color: tm-color('success
|
|
90
|
-
color: tm-color('success-
|
|
222
|
+
background-color: tm-color('success');
|
|
223
|
+
color: tm-color('success-light');
|
|
91
224
|
|
|
92
225
|
&:hover {
|
|
93
|
-
background-color: tm-color('success-
|
|
94
|
-
color: tm-color('success
|
|
226
|
+
background-color: tm-color('success-light');
|
|
227
|
+
color: tm-color('success');
|
|
95
228
|
}
|
|
96
229
|
}
|
|
97
230
|
}
|
|
@@ -127,15 +260,15 @@
|
|
|
127
260
|
color: tm-color('warning-new');
|
|
128
261
|
|
|
129
262
|
&:hover {
|
|
130
|
-
color:
|
|
263
|
+
color: tm-color('warning-dark-new');
|
|
131
264
|
}
|
|
132
265
|
}
|
|
133
266
|
|
|
134
267
|
&--success {
|
|
135
|
-
color: tm-color('success
|
|
268
|
+
color: tm-color('success');
|
|
136
269
|
|
|
137
270
|
&:hover {
|
|
138
|
-
color:
|
|
271
|
+
color: tm-color('success-light');
|
|
139
272
|
}
|
|
140
273
|
}
|
|
141
274
|
}
|
|
@@ -171,15 +304,15 @@
|
|
|
171
304
|
color: tm-color('warning-new');
|
|
172
305
|
|
|
173
306
|
&:hover {
|
|
174
|
-
color:
|
|
307
|
+
color: tm-color('warning-dark-new');
|
|
175
308
|
}
|
|
176
309
|
}
|
|
177
310
|
|
|
178
311
|
&--success {
|
|
179
|
-
color: tm-color('success-
|
|
312
|
+
color: tm-color('success-light');
|
|
180
313
|
|
|
181
314
|
&:hover {
|
|
182
|
-
color:
|
|
315
|
+
color: tm-color('success-light');
|
|
183
316
|
}
|
|
184
317
|
}
|
|
185
318
|
}
|
|
@@ -43,8 +43,9 @@ $tm-colors: (
|
|
|
43
43
|
'forest-green': #35652f,
|
|
44
44
|
// old name -> $wahretabelleDark
|
|
45
45
|
'green': #749f18,
|
|
46
|
-
'success-
|
|
47
|
-
'success
|
|
46
|
+
'success-light': #dffcf1,
|
|
47
|
+
'success': #30996c,
|
|
48
|
+
'success-dark': #1d6e4f,
|
|
48
49
|
'lightest-green': #e3ecd1,
|
|
49
50
|
'limeade': #55a826,
|
|
50
51
|
'olivine': #a5c169,
|