@transfermarkt/global-styles 1.12.0 → 1.14.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.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Shared styles and Global configuration for stylelint rules of the Transfermarkt projects",
5
5
  "author": "Transfermarkt",
6
6
  "license": "MIT",
@@ -5,22 +5,26 @@ $icon-color-filters: (
5
5
  lightblue-light: invert(47%) sepia(87%) saturate(1532%) hue-rotate(184deg) brightness(103%)
6
6
  contrast(101%),
7
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%)
8
+ warning-light: invert(77%) sepia(38%) saturate(5784%) hue-rotate(359deg) brightness(101%)
9
+ contrast(105%),
10
+ warning-dark: invert(15%) sepia(64%) saturate(5304%) hue-rotate(350deg) brightness(90%)
9
11
  contrast(105%),
10
12
  warning: invert(22%) sepia(93%) saturate(6517%) hue-rotate(353deg) brightness(101%) contrast(102%),
11
13
  success-dark: invert(29%) sepia(58%) saturate(433%) hue-rotate(121deg) brightness(92%)
12
14
  contrast(87%),
13
- success: invert(40%) sepia(44%) saturate(643%) hue-rotate(135deg) brightness(93%) contrast(95%)
15
+ success: invert(40%) sepia(44%) saturate(643%) hue-rotate(135deg) brightness(93%) contrast(95%),
16
+ success-light: invert(76%) sepia(61%) saturate(125%) hue-rotate(86deg) brightness(119%)
17
+ contrast(84%)
14
18
  );
15
19
 
16
20
  @function icon-filter-base($state) {
17
21
  @if $state == 'disabled' {
18
22
  @return invert(80%) sepia(10%) saturate(0%) brightness(90%) contrast(80%);
19
- } @else if $state == 'warning' {
23
+ } @else if $state == 'warning-dark' {
20
24
  @return invert(77%) sepia(38%) saturate(5784%) hue-rotate(359deg) brightness(101%)
21
25
  contrast(105%);
22
26
  } @else if $state == 'success' {
23
- @return invert(58%) sepia(79%) saturate(415%) hue-rotate(93deg) brightness(95%) contrast(91%);
27
+ @return invert(76%) sepia(61%) saturate(125%) hue-rotate(86deg) brightness(119%) contrast(84%);
24
28
  } @else {
25
29
  @return invert(100%) sepia(100%) saturate(1%) hue-rotate(207deg) brightness(102%) contrast(102%);
26
30
  }
@@ -37,56 +41,63 @@ $icon-color-filters: (
37
41
  }
38
42
  }
39
43
 
40
- @mixin tm-icon($name, $position, $state: 'default', $color-name: null, $size: 20px) {
44
+ @mixin tm-icon-generate($name, $position: left, $state: 'default') {
41
45
  $base-url: 'https://tmsi.akamaized.net/tm-svg-icons';
42
46
  $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);
47
+ $base-filter: icon-filter-base($state);
45
48
 
46
- @if $position == 'left' or $position == 'both' {
49
+ @if $position == left or $position == both {
47
50
  &::before {
48
51
  content: '';
49
52
  display: inline-block;
50
- width: $size;
51
- height: $size;
52
- background: url('#{$image-url}') no-repeat center / contain;
53
53
  vertical-align: middle;
54
54
  margin-right: 8px;
55
+ width: 20px;
56
+ height: 20px;
57
+ background: url('#{$image-url}') no-repeat center/contain;
58
+ filter: $base-filter;
55
59
  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
- }
60
+ @if $state != 'disabled' {
61
+ &:hover {
62
+ filter: icon-filter-hover($state);
64
63
  }
65
64
  }
66
65
  }
67
66
  }
68
67
 
69
- @if $position == 'right' or $position == 'both' {
68
+ @if $position == right or $position == both {
70
69
  &::after {
71
70
  content: '';
72
71
  display: inline-block;
73
- width: $size;
74
- height: $size;
75
- background: url('#{$image-url}') no-repeat center / contain;
76
72
  vertical-align: middle;
77
73
  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
- }
74
+ width: 20px;
75
+ height: 20px;
76
+ background: url('#{$image-url}') no-repeat center/contain;
77
+ filter: $base-filter;
78
+ @if $state != 'disabled' {
79
+ &:hover {
80
+ filter: icon-filter-hover($state);
87
81
  }
88
82
  }
89
83
  }
90
84
  }
91
85
  }
86
+
87
+ @mixin tm-icon-color($color-name) {
88
+ $filter: map-get($icon-color-filters, $color-name);
89
+ &::before,
90
+ &::after {
91
+ filter: $filter;
92
+ }
93
+ }
94
+
95
+ @mixin tm-icon-size($size) {
96
+ &::before,
97
+ &::after {
98
+ width: $size;
99
+ height: $size;
100
+ }
101
+ }
102
+
92
103
  /* stylelint-enable */
@@ -4,12 +4,14 @@
4
4
  @use '../../../mixins/breakpoint' as *;
5
5
  @use '../../../mixins/icon' as *;
6
6
 
7
+ // "!importants" can be removed if the styles are not overridden by other styles (comes often from main.scss)
8
+
7
9
  .tm-btn {
8
10
  $position: 'right';
9
11
 
10
12
  align-items: center;
11
13
  border: none;
12
- border-radius: 8px;
14
+ border-radius: 8px !important;
13
15
  color: tm-color('white');
14
16
  cursor: pointer;
15
17
  display: inline-flex;
@@ -25,177 +27,26 @@
25
27
  position: relative;
26
28
  text-decoration: none;
27
29
 
28
- &__icon--left {
29
- padding-right: rem-calc(24) !important;
30
-
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');
139
- }
30
+ &--full-size {
31
+ display: flex;
140
32
  }
141
33
 
142
34
  &__primary {
143
35
  background-color: tm-color('dark-blue-new');
144
36
 
145
37
  &--large {
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
- }
38
+ text-transform: uppercase;
164
39
  }
165
40
 
166
41
  &--medium {
167
42
  font-size: rem-calc(14);
168
43
  line-height: rem-calc(20);
169
44
  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
- }
182
45
  }
183
46
 
184
47
  &--small {
185
48
  font-size: rem-calc(12);
186
49
  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
- }
199
50
  }
200
51
 
201
52
  &:hover {
@@ -219,12 +70,12 @@
219
70
  }
220
71
 
221
72
  &--success {
222
- background-color: tm-color('success');
223
- color: tm-color('success-light');
73
+ background-color: tm-color('success-light');
74
+ color: tm-color('success');
224
75
 
225
76
  &:hover {
226
- background-color: tm-color('success-light');
227
- color: tm-color('success');
77
+ background-color: tm-color('success-dark');
78
+ color: tm-color('success-light');
228
79
  }
229
80
  }
230
81
  }
@@ -265,10 +116,10 @@
265
116
  }
266
117
 
267
118
  &--success {
268
- color: tm-color('success');
119
+ color: tm-color('success-dark');
269
120
 
270
121
  &:hover {
271
- color: tm-color('success-light');
122
+ color: tm-color('success');
272
123
  }
273
124
  }
274
125
  }
@@ -309,11 +160,413 @@
309
160
  }
310
161
 
311
162
  &--success {
312
- color: tm-color('success-light');
163
+ color: tm-color('success-dark');
313
164
 
314
165
  &:hover {
315
- color: tm-color('success-light');
166
+ color: tm-color('success');
316
167
  }
317
168
  }
318
169
  }
319
170
  }
171
+
172
+ .tm-icon-collect {
173
+ &__arrow {
174
+ padding-right: rem-calc(24);
175
+
176
+ @include tm-icon-generate('arrow');
177
+ }
178
+
179
+ &__arrow-right {
180
+ padding-left: rem-calc(24);
181
+
182
+ @include tm-icon-generate('arrow', right);
183
+ }
184
+
185
+ &__arrow-both {
186
+ @include tm-icon-generate('arrow', both);
187
+ }
188
+
189
+ &__chevron {
190
+ padding-right: rem-calc(24);
191
+
192
+ @include tm-icon-generate('chevron');
193
+ }
194
+
195
+ &__chevron-right {
196
+ padding-left: rem-calc(24);
197
+
198
+ @include tm-icon-generate('chevron', right);
199
+ }
200
+
201
+ &__chevron-both {
202
+ @include tm-icon-generate('chevron', both);
203
+ }
204
+
205
+ &__check {
206
+ padding-right: rem-calc(24);
207
+
208
+ @include tm-icon-generate('check');
209
+ }
210
+
211
+ &__check-right {
212
+ padding-left: rem-calc(24);
213
+
214
+ @include tm-icon-generate('check', right);
215
+ }
216
+
217
+ &__check-both {
218
+ @include tm-icon-generate('check', both);
219
+ }
220
+
221
+ &__clipboard {
222
+ padding-right: rem-calc(24);
223
+
224
+ @include tm-icon-generate('clipboard');
225
+ }
226
+
227
+ &__clipboard-right {
228
+ padding-left: rem-calc(24);
229
+
230
+ @include tm-icon-generate('clipboard', right);
231
+ }
232
+
233
+ &__clipboard-both {
234
+ @include tm-icon-generate('clipboard', both);
235
+ }
236
+
237
+ &__close {
238
+ padding-right: rem-calc(24);
239
+
240
+ @include tm-icon-generate('close');
241
+ }
242
+
243
+ &__close-right {
244
+ padding-left: rem-calc(24);
245
+
246
+ @include tm-icon-generate('close', right);
247
+ }
248
+
249
+ &__close-both {
250
+ @include tm-icon-generate('close', both);
251
+ }
252
+
253
+ &__copy {
254
+ padding-right: rem-calc(24);
255
+
256
+ @include tm-icon-generate('copy');
257
+ }
258
+
259
+ &__copy-right {
260
+ padding-left: rem-calc(24);
261
+
262
+ @include tm-icon-generate('copy', right);
263
+ }
264
+
265
+ &__copy-both {
266
+ @include tm-icon-generate('copy', both);
267
+ }
268
+
269
+ &__delete {
270
+ padding-right: rem-calc(24);
271
+
272
+ @include tm-icon-generate('delete');
273
+ }
274
+
275
+ &__delete-right {
276
+ padding-left: rem-calc(24);
277
+
278
+ @include tm-icon-generate('delete', right);
279
+ }
280
+
281
+ &__delete-both {
282
+ @include tm-icon-generate('delete', both);
283
+ }
284
+
285
+ &__edit {
286
+ padding-right: rem-calc(24);
287
+
288
+ @include tm-icon-generate('edit');
289
+ }
290
+
291
+ &__edit-right {
292
+ padding-left: rem-calc(24);
293
+
294
+ @include tm-icon-generate('edit', right);
295
+ }
296
+
297
+ &__edit-both {
298
+ @include tm-icon-generate('edit', both);
299
+ }
300
+
301
+ &__filter {
302
+ padding-right: rem-calc(24);
303
+
304
+ @include tm-icon-generate('filter');
305
+ }
306
+
307
+ &__filter-right {
308
+ padding-left: rem-calc(24);
309
+
310
+ @include tm-icon-generate('filter', right);
311
+ }
312
+
313
+ &__filter-both {
314
+ @include tm-icon-generate('filter', both);
315
+ }
316
+
317
+ &__globe {
318
+ padding-right: rem-calc(24);
319
+
320
+ @include tm-icon-generate('globe');
321
+ }
322
+
323
+ &__globe-right {
324
+ padding-left: rem-calc(24);
325
+
326
+ @include tm-icon-generate('globe', right);
327
+ }
328
+
329
+ &__globe-both {
330
+ @include tm-icon-generate('globe', both);
331
+ }
332
+
333
+ &__log-in {
334
+ padding-right: rem-calc(24);
335
+
336
+ @include tm-icon-generate('log-in');
337
+ }
338
+
339
+ &__log-in-right {
340
+ padding-left: rem-calc(24);
341
+
342
+ @include tm-icon-generate('log-in', right);
343
+ }
344
+
345
+ &__log-in-both {
346
+ @include tm-icon-generate('log-in', both);
347
+ }
348
+
349
+ &__log-out {
350
+ padding-right: rem-calc(24);
351
+
352
+ @include tm-icon-generate('log-out');
353
+ }
354
+
355
+ &__log-out-right {
356
+ padding-left: rem-calc(24);
357
+
358
+ @include tm-icon-generate('log-out', right);
359
+ }
360
+
361
+ &__log-out-both {
362
+ @include tm-icon-generate('log-out', both);
363
+ }
364
+
365
+ &__mail {
366
+ padding-right: rem-calc(24);
367
+
368
+ @include tm-icon-generate('mail');
369
+ }
370
+
371
+ &__mail-right {
372
+ padding-left: rem-calc(24);
373
+
374
+ @include tm-icon-generate('mail', right);
375
+ }
376
+
377
+ &__mail-both {
378
+ @include tm-icon-generate('mail', both);
379
+ }
380
+
381
+ &__map-pin {
382
+ padding-right: rem-calc(24);
383
+
384
+ @include tm-icon-generate('map-pin');
385
+ }
386
+
387
+ &__map-pin-right {
388
+ padding-left: rem-calc(24);
389
+
390
+ @include tm-icon-generate('map-pin', right);
391
+ }
392
+
393
+ &__map-pin-both {
394
+ @include tm-icon-generate('map-pin', both);
395
+ }
396
+
397
+ &__refresh {
398
+ padding-right: rem-calc(24);
399
+
400
+ @include tm-icon-generate('refresh');
401
+ }
402
+
403
+ &__refresh-right {
404
+ padding-left: rem-calc(24);
405
+
406
+ @include tm-icon-generate('refresh', right);
407
+ }
408
+
409
+ &__refresh-both {
410
+ @include tm-icon-generate('refresh', both);
411
+ }
412
+
413
+ &__search {
414
+ padding-right: rem-calc(24);
415
+
416
+ @include tm-icon-generate('search');
417
+ }
418
+
419
+ &__search-right {
420
+ padding-left: rem-calc(24);
421
+
422
+ @include tm-icon-generate('search', right);
423
+ }
424
+
425
+ &__search-both {
426
+ @include tm-icon-generate('search', both);
427
+ }
428
+
429
+ &__settings {
430
+ padding-right: rem-calc(24);
431
+
432
+ @include tm-icon-generate('settings');
433
+ }
434
+
435
+ &__settings-right {
436
+ padding-left: rem-calc(24);
437
+
438
+ @include tm-icon-generate('settings', right);
439
+ }
440
+
441
+ &__settings-both {
442
+ @include tm-icon-generate('settings', both);
443
+ }
444
+
445
+ &__share {
446
+ padding-right: rem-calc(24);
447
+
448
+ @include tm-icon-generate('share');
449
+ }
450
+
451
+ &__share-right {
452
+ padding-left: rem-calc(24);
453
+
454
+ @include tm-icon-generate('share', right);
455
+ }
456
+
457
+ &__share-both {
458
+ @include tm-icon-generate('share', both);
459
+ }
460
+
461
+ &__star {
462
+ padding-right: rem-calc(24);
463
+
464
+ @include tm-icon-generate('star');
465
+ }
466
+
467
+ &__star-right {
468
+ padding-left: rem-calc(24);
469
+
470
+ @include tm-icon-generate('star', right);
471
+ }
472
+
473
+ &__star-both {
474
+ @include tm-icon-generate('star', both);
475
+ }
476
+
477
+ &__trash {
478
+ padding-right: rem-calc(24);
479
+
480
+ @include tm-icon-generate('trash');
481
+ }
482
+
483
+ &__trash-right {
484
+ padding-left: rem-calc(24);
485
+
486
+ @include tm-icon-generate('trash', right);
487
+ }
488
+
489
+ &__trash-both {
490
+ @include tm-icon-generate('trash', both);
491
+ }
492
+
493
+ &__user {
494
+ padding-right: rem-calc(24);
495
+
496
+ @include tm-icon-generate('user');
497
+ }
498
+
499
+ &__user-right {
500
+ padding-left: rem-calc(24);
501
+
502
+ @include tm-icon-generate('user', right);
503
+ }
504
+
505
+ &__user-both {
506
+ @include tm-icon-generate('user', both);
507
+ }
508
+
509
+ &__white {
510
+ @include tm-icon-color(white);
511
+ }
512
+
513
+ &__admiral {
514
+ @include tm-icon-color(admiral);
515
+
516
+ &:hover {
517
+ @include tm-icon-color(lightblue-light);
518
+ }
519
+ }
520
+
521
+ &__lightblue-light {
522
+ @include tm-icon-color(lightblue-light);
523
+ }
524
+
525
+ &__darkblue-400 {
526
+ @include tm-icon-color(darkblue-400);
527
+ }
528
+
529
+ &__warning-dark {
530
+ @include tm-icon-color(warning-dark);
531
+
532
+ &:hover {
533
+ @include tm-icon-color(white);
534
+ }
535
+ }
536
+
537
+ &__warning {
538
+ @include tm-icon-color(warning-dark);
539
+
540
+ &:hover {
541
+ @include tm-icon-color(warning);
542
+ }
543
+ }
544
+
545
+ &__success {
546
+ @include tm-icon-color(success);
547
+
548
+ &:hover {
549
+ @include tm-icon-color(success-light);
550
+ }
551
+ }
552
+
553
+ &__success-dark {
554
+ @include tm-icon-color(success-dark);
555
+
556
+ &:hover {
557
+ @include tm-icon-color(success);
558
+ }
559
+ }
560
+
561
+ &__large {
562
+ @include tm-icon-size(24px);
563
+ }
564
+
565
+ &__medium {
566
+ @include tm-icon-size(16px);
567
+ }
568
+
569
+ &__small {
570
+ @include tm-icon-size(14px);
571
+ }
572
+ }