@times-components/ts-components 1.145.1-76ee0965069e2a17bc1f8dcf02d24e8fefd6869a.0 → 1.145.1-7e7a12feaf05c514789e802bf49cadca92e6a2b9.10

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 (143) hide show
  1. package/dist/components/carousel-component/CarouselComponent.stories.js +146 -0
  2. package/dist/components/carousel-component/CarouselItem.d.ts +3 -0
  3. package/dist/components/carousel-component/CarouselItem.js +11 -0
  4. package/dist/components/carousel-component/DefaultNavigationArrow.d.ts +8 -0
  5. package/dist/components/carousel-component/DefaultNavigationArrow.js +6 -0
  6. package/dist/components/carousel-component/DefaultPageDot.d.ts +8 -0
  7. package/dist/components/carousel-component/DefaultPageDot.js +4 -0
  8. package/dist/components/{opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.d.ts → carousel-component/__tests__/CarouselComponent.test.d.ts} +0 -1
  9. package/dist/components/carousel-component/__tests__/CarouselComponent.test.js +163 -0
  10. package/dist/components/carousel-component/__tests__/CarouselItem.test.d.ts +1 -0
  11. package/dist/components/carousel-component/__tests__/CarouselItem.test.js +80 -0
  12. package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.d.ts +1 -0
  13. package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.js +62 -0
  14. package/dist/components/carousel-component/__tests__/DefaultPageDot.test.d.ts +1 -0
  15. package/dist/components/carousel-component/__tests__/DefaultPageDot.test.js +68 -0
  16. package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.d.ts +1 -0
  17. package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.js +459 -0
  18. package/dist/components/carousel-component/hooks/useCarousel.d.ts +2 -0
  19. package/dist/components/carousel-component/hooks/useCarousel.js +175 -0
  20. package/dist/components/carousel-component/index.d.ts +4 -0
  21. package/dist/components/carousel-component/index.js +20 -0
  22. package/dist/components/carousel-component/styles.d.ts +27 -0
  23. package/dist/components/carousel-component/styles.js +169 -0
  24. package/dist/components/carousel-component/types.d.ts +53 -0
  25. package/dist/components/carousel-component/types.js +2 -0
  26. package/dist/components/opta/football/opta-match-stats/shared/styles.js +1 -8
  27. package/dist/components/trip-cards/SkeletonCard.d.ts +6 -0
  28. package/dist/components/trip-cards/SkeletonCard.js +21 -0
  29. package/dist/components/trip-cards/TripCard.d.ts +3 -0
  30. package/dist/components/trip-cards/TripCard.js +49 -0
  31. package/dist/components/trip-cards/TripCards.stories.d.ts +1 -0
  32. package/dist/components/trip-cards/TripCards.stories.js +189 -0
  33. package/dist/components/trip-cards/TripCardsLayout.d.ts +3 -0
  34. package/dist/components/trip-cards/TripCardsLayout.js +37 -0
  35. package/dist/components/trip-cards/__tests__/SkeletonCard.test.d.ts +1 -0
  36. package/dist/components/trip-cards/__tests__/SkeletonCard.test.js +139 -0
  37. package/dist/components/trip-cards/__tests__/TripCard.test.d.ts +1 -0
  38. package/dist/components/trip-cards/__tests__/TripCard.test.js +95 -0
  39. package/dist/components/trip-cards/__tests__/TripCardsLayout.test.d.ts +1 -0
  40. package/dist/components/trip-cards/__tests__/TripCardsLayout.test.js +277 -0
  41. package/dist/components/trip-cards/__tests__/assets.test.d.ts +1 -0
  42. package/dist/components/trip-cards/__tests__/assets.test.js +165 -0
  43. package/dist/components/trip-cards/__tests__/helpers.test.d.ts +1 -0
  44. package/dist/components/trip-cards/__tests__/helpers.test.js +216 -0
  45. package/dist/components/trip-cards/__tests__/index.test.d.ts +1 -0
  46. package/dist/components/trip-cards/__tests__/index.test.js +433 -0
  47. package/dist/components/trip-cards/__tests__/mockData.test.d.ts +1 -0
  48. package/dist/components/trip-cards/__tests__/mockData.test.js +57 -0
  49. package/dist/components/trip-cards/__tests__/skeletonStyles.test.d.ts +1 -0
  50. package/dist/components/trip-cards/__tests__/skeletonStyles.test.js +194 -0
  51. package/dist/components/trip-cards/assets/BoatIcon.d.ts +1 -0
  52. package/dist/components/trip-cards/assets/BoatIcon.js +4 -0
  53. package/dist/components/trip-cards/assets/CalendarIcon.d.ts +1 -0
  54. package/dist/components/trip-cards/assets/CalendarIcon.js +4 -0
  55. package/dist/components/trip-cards/assets/ChevronRightIcon.d.ts +1 -0
  56. package/dist/components/trip-cards/assets/ChevronRightIcon.js +4 -0
  57. package/dist/components/trip-cards/assets/LocationIcon.d.ts +1 -0
  58. package/dist/components/trip-cards/assets/LocationIcon.js +4 -0
  59. package/dist/components/trip-cards/assets/MoonIcon.d.ts +1 -0
  60. package/dist/components/trip-cards/assets/MoonIcon.js +4 -0
  61. package/dist/components/trip-cards/assets/index.d.ts +6 -0
  62. package/dist/components/trip-cards/assets/index.js +7 -0
  63. package/dist/components/trip-cards/helpers.d.ts +4 -0
  64. package/dist/components/trip-cards/helpers.js +115 -0
  65. package/dist/components/trip-cards/index.d.ts +4 -0
  66. package/dist/components/trip-cards/index.js +70 -0
  67. package/dist/components/trip-cards/mockData.d.ts +3 -0
  68. package/dist/components/trip-cards/mockData.js +317 -0
  69. package/dist/components/trip-cards/skeletonStyles.d.ts +9 -0
  70. package/dist/components/trip-cards/skeletonStyles.js +37 -0
  71. package/dist/components/trip-cards/styles.d.ts +38 -0
  72. package/dist/components/trip-cards/styles.js +401 -0
  73. package/dist/components/trip-cards/types.d.ts +119 -0
  74. package/dist/components/trip-cards/types.js +2 -0
  75. package/dist/index.d.ts +1 -0
  76. package/dist/index.js +2 -4
  77. package/package.json +3 -3
  78. package/rnw.js +1 -1
  79. package/src/components/carousel-component/CarouselComponent.stories.tsx +220 -0
  80. package/src/components/carousel-component/CarouselItem.tsx +25 -0
  81. package/src/components/carousel-component/DefaultNavigationArrow.tsx +37 -0
  82. package/src/components/carousel-component/DefaultPageDot.tsx +20 -0
  83. package/src/components/carousel-component/__tests__/CarouselComponent.test.tsx +259 -0
  84. package/src/components/carousel-component/__tests__/CarouselItem.test.tsx +140 -0
  85. package/src/components/carousel-component/__tests__/DefaultNavigationArrow.test.tsx +153 -0
  86. package/src/components/carousel-component/__tests__/DefaultPageDot.test.tsx +105 -0
  87. package/src/components/carousel-component/hooks/__tests__/useCarousel.test.ts +625 -0
  88. package/src/components/carousel-component/hooks/useCarousel.ts +231 -0
  89. package/src/components/carousel-component/index.tsx +92 -0
  90. package/src/components/carousel-component/styles.ts +185 -0
  91. package/src/components/carousel-component/types.ts +62 -0
  92. package/src/components/opta/football/opta-match-stats/commentary/__tests__/__snapshots__/OptaMatchStatsCommentary.test.tsx.snap +1 -1
  93. package/src/components/opta/football/opta-match-stats/shared/styles.ts +0 -8
  94. package/src/components/opta/football/opta-match-stats/stats-graphs/__tests__/__snapshots__/OptaMatchStatsGraphs.test.tsx.snap +1 -1
  95. package/src/components/trip-cards/SkeletonCard.tsx +62 -0
  96. package/src/components/trip-cards/TripCard.tsx +143 -0
  97. package/src/components/trip-cards/TripCards.stories.tsx +254 -0
  98. package/src/components/trip-cards/TripCardsLayout.tsx +108 -0
  99. package/src/components/trip-cards/__tests__/SkeletonCard.test.tsx +169 -0
  100. package/src/components/trip-cards/__tests__/TripCard.test.tsx +120 -0
  101. package/src/components/trip-cards/__tests__/TripCardsLayout.test.tsx +532 -0
  102. package/src/components/trip-cards/__tests__/assets.test.tsx +206 -0
  103. package/src/components/trip-cards/__tests__/helpers.test.ts +266 -0
  104. package/src/components/trip-cards/__tests__/index.test.tsx +495 -0
  105. package/src/components/trip-cards/__tests__/mockData.test.ts +67 -0
  106. package/src/components/trip-cards/__tests__/skeletonStyles.test.tsx +256 -0
  107. package/src/components/trip-cards/assets/BoatIcon.tsx +17 -0
  108. package/src/components/trip-cards/assets/CalendarIcon.tsx +17 -0
  109. package/src/components/trip-cards/assets/ChevronRightIcon.tsx +20 -0
  110. package/src/components/trip-cards/assets/LocationIcon.tsx +17 -0
  111. package/src/components/trip-cards/assets/MoonIcon.tsx +17 -0
  112. package/src/components/trip-cards/assets/index.ts +7 -0
  113. package/src/components/trip-cards/helpers.ts +150 -0
  114. package/src/components/trip-cards/index.tsx +119 -0
  115. package/src/components/trip-cards/mockData.ts +345 -0
  116. package/src/components/trip-cards/skeletonStyles.ts +46 -0
  117. package/src/components/trip-cards/styles.ts +446 -0
  118. package/src/components/trip-cards/types.ts +128 -0
  119. package/src/index.ts +2 -3
  120. package/dist/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.d.ts +0 -10
  121. package/dist/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.js +0 -69
  122. package/dist/components/opta/football/opta-match-stats/matchday-live/MobileWidget.d.ts +0 -12
  123. package/dist/components/opta/football/opta-match-stats/matchday-live/MobileWidget.js +0 -90
  124. package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.d.ts +0 -12
  125. package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.js +0 -10
  126. package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.js +0 -24
  127. package/dist/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.js +0 -48
  128. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.d.ts +0 -1
  129. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.js +0 -19
  130. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.d.ts +0 -12
  131. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.js +0 -67
  132. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.d.ts +0 -6
  133. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.js +0 -714
  134. package/src/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.tsx +0 -108
  135. package/src/components/opta/football/opta-match-stats/matchday-live/MobileWidget.tsx +0 -158
  136. package/src/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.tsx +0 -38
  137. package/src/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.tsx +0 -23
  138. package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.tsx +0 -61
  139. package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/__snapshots__/OptaMatchStatsMatchdayLive.test.tsx.snap +0 -61
  140. package/src/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.tsx +0 -19
  141. package/src/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.tsx +0 -81
  142. package/src/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.tsx +0 -745
  143. /package/dist/components/{opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.d.ts → carousel-component/CarouselComponent.stories.d.ts} +0 -0
@@ -1,745 +0,0 @@
1
- import styled from 'styled-components';
2
- import { colours, fonts } from '@times-components/ts-styleguide';
3
- import { TeamColor } from '../../shared/types';
4
- import {
5
- backgroundColor,
6
- darkBackgroundColor,
7
- darkTextColor,
8
- borderColor,
9
- textColor,
10
- maxMDBreakpoint,
11
- darkBorderColor
12
- } from '../../shared/styles';
13
-
14
- export const WidgetContainer = styled.div<{
15
- isApp: boolean;
16
- homeTeamColor: TeamColor;
17
- awayTeamColor: TeamColor;
18
- }>`
19
- ${props =>
20
- props.isApp &&
21
- `
22
- @media(prefers-color-scheme: dark) {
23
- background-color: ${darkBackgroundColor} !important;
24
- color: ${darkTextColor} !important;
25
- }
26
- `} .Opta-Cf.Opta-js-main {
27
- ${props =>
28
- props.isApp &&
29
- `
30
- @media(prefers-color-scheme: dark) {
31
- background-color: ${darkBackgroundColor};
32
- }
33
- `};
34
- }
35
-
36
- .Opta > .Opta_W {
37
- margin-top: 0px !important;
38
- margin-bottom: 0px !important;
39
- }
40
-
41
- .Opta-Cf {
42
- display: flex;
43
- flex-direction: column;
44
-
45
- ${props =>
46
- props.isApp &&
47
- `
48
- @media(prefers-color-scheme: dark) {
49
- background-color: ${darkBackgroundColor} !important;
50
- color: ${darkTextColor} !important;
51
- }
52
- `};
53
- }
54
-
55
- .Opta-Score,
56
- .Opta-Divider {
57
- display: none !important;
58
- }
59
-
60
- // Move match data to top
61
- .Opta-Matchdata {
62
- order: -1;
63
- margin-top: 8px !important;
64
- margin-bottom: 0px !important;
65
- border-top: 1px solid ${borderColor};
66
- border-bottom: 1px solid ${borderColor};
67
- background-color: ${backgroundColor} !important;
68
-
69
- dd,
70
- dt {
71
- font-family: Roboto, sans-serif;
72
- font-weight: 400;
73
- line-height: 150%;
74
- color: #333;
75
- }
76
-
77
- ${props =>
78
- props.isApp &&
79
- `
80
- @media(prefers-color-scheme: dark) {
81
- background-color: ${darkBackgroundColor} !important;
82
- border-top: 1px solid ${darkBorderColor};
83
- border-bottom: 1px solid ${darkBorderColor};
84
- dd, dt {
85
- color: ${darkTextColor};
86
- }
87
- }
88
- `};
89
- }
90
-
91
- .Opta-MatchHeader {
92
- margin-bottom: 0;
93
- tr {
94
- display: flex;
95
- gap: 20px;
96
- align-items: center;
97
- padding: 16px;
98
- }
99
-
100
- .Opta-Team {
101
- font-family: Roboto, sans-serif;
102
- font-weight: 700;
103
- font-size: 20px;
104
- line-height: 150%;
105
- color: ${textColor};
106
- display: flex;
107
- align-items: center;
108
- ${props =>
109
- props.isApp &&
110
- `
111
- @media(prefers-color-scheme: dark) {
112
- color: ${darkTextColor};
113
- }
114
- `};
115
-
116
- &.Opta-Home {
117
- order: 2;
118
- }
119
-
120
- &.Opta-Away {
121
- order: 5;
122
- }
123
- }
124
-
125
- .Opta-Crest {
126
- display: contents;
127
-
128
- .Opta-Image-Team img {
129
- height: 48px;
130
- width: 48px;
131
- }
132
-
133
- .Opta-TeamFormation {
134
- font-family: Roboto, sans-serif;
135
- font-weight: 400;
136
- font-size: 14px;
137
- line-height: 150%;
138
- letter-spacing: 0.08px;
139
- color: ${textColor};
140
- ${props =>
141
- props.isApp &&
142
- `
143
- @media(prefers-color-scheme: dark) {
144
- color: ${darkTextColor};
145
- }
146
- `};
147
- }
148
-
149
- &:first-of-type {
150
- .Opta-Image-Team {
151
- order: 1;
152
- }
153
- .Opta-TeamFormation {
154
- order: 3;
155
- margin: 0;
156
- margin-right: auto;
157
- }
158
- }
159
-
160
- &:last-of-type {
161
- .Opta-Image-Team {
162
- order: 6;
163
- }
164
- .Opta-TeamFormation {
165
- order: 4;
166
- margin: 0;
167
- margin-left: auto;
168
- }
169
- }
170
- }
171
- }
172
-
173
- .Opta-FootballPitch {
174
- margin-inline: 16px;
175
- margin-bottom: 16px;
176
- border-radius: 8px;
177
- background: none !important;
178
- background-image: repeating-linear-gradient(
179
- 90deg,
180
- #d4e3db 0,
181
- #d4e3db 28px,
182
- #e5f0ea 28px,
183
- #e5f0ea 56px
184
- ) !important;
185
- background-size: 56px 100% !important;
186
-
187
- circle {
188
- stroke: none !important;
189
- &.Opta-Home {
190
- fill: ${props => props.homeTeamColor.light} !important;
191
- }
192
- &.Opta-Away {
193
- fill: ${props => props.awayTeamColor.light} !important;
194
- }
195
- }
196
-
197
- .Opta-JerseyNumber {
198
- font-family: ${fonts.headline};
199
- font-weight: 800;
200
- font-size: 16px;
201
- line-height: 112.99999%;
202
- transform: translateY(-1px);
203
- }
204
-
205
- .Opta-PlayerName {
206
- fill: ${textColor} !important;
207
- filter: none;
208
- font-family: Roboto, sans-serif;
209
- font-weight: 600;
210
- font-size: 13px;
211
- line-height: 100%;
212
- }
213
- }
214
-
215
- .Opta-Subs-Wrap {
216
- border-top: 1px solid ${borderColor};
217
- ${props =>
218
- props.isApp &&
219
- `
220
- @media(prefers-color-scheme: dark) {
221
- border-top: 1px solid ${darkBorderColor};
222
- }
223
- `};
224
- thead {
225
- th {
226
- background-color: ${backgroundColor} !important;
227
- color: ${textColor};
228
- font-family: Roboto, sans-serif;
229
- font-weight: 500;
230
- font-size: 18px;
231
- line-height: 112.999%;
232
- padding-block: 32px;
233
- ${props =>
234
- props.isApp &&
235
- `
236
- @media(prefers-color-scheme: dark) {
237
- background-color: ${darkBackgroundColor} !important;
238
- color: ${darkTextColor};
239
- }
240
- `};
241
- }
242
- }
243
-
244
- .Opta-FootballPitch-Subplayers {
245
- margin: 0;
246
- tr {
247
- display: flex;
248
- justify-content: center;
249
- }
250
- td {
251
- display: flex;
252
- flex-direction: column;
253
- height: auto;
254
-
255
- .Opta-Sub {
256
- display: grid;
257
- grid-template-columns: auto 16px auto auto;
258
- grid-template-rows: auto auto;
259
-
260
- &.Opta-Home {
261
- span.Opta-Circle {
262
- border: 2px solid ${props => props.homeTeamColor.light};
263
- color: ${props => props.homeTeamColor.light};
264
- }
265
- }
266
-
267
- &.Opta-Away {
268
- span.Opta-Circle {
269
- border: 2px solid ${props => props.awayTeamColor.light};
270
- color: ${props => props.awayTeamColor.light} !important;
271
- }
272
- }
273
-
274
- ${props =>
275
- props.isApp &&
276
- `
277
- @media(prefers-color-scheme: dark) {
278
- &.Opta-Home {
279
- span.Opta-Circle {
280
- border: 2px solid ${props.homeTeamColor.dark};
281
- color: ${props.homeTeamColor.dark};
282
- }
283
- }
284
-
285
- &.Opta-Away {
286
- span.Opta-Circle {
287
- border: 2px solid ${props.awayTeamColor.dark};
288
- color: ${props.awayTeamColor.dark} !important;
289
- }
290
- }
291
- }
292
- `};
293
-
294
- &.Opta-Unused {
295
- opacity: 1;
296
- }
297
-
298
- span.Opta-Circle {
299
- grid-column: 1 / 1;
300
- grid-row: 1 / 3;
301
- background-color: ${backgroundColor};
302
- font-family: ${fonts.headline};
303
- font-weight: 800;
304
- font-size: 16px;
305
- line-height: 112.99999%;
306
- margin-bottom: 0;
307
-
308
- ${props =>
309
- props.isApp &&
310
- `
311
- @media(prefers-color-scheme: dark) {
312
- background-color: ${darkBackgroundColor};
313
- }
314
- `};
315
-
316
- & + span.Opta-PlayerName {
317
- grid-column: 3 / 4;
318
- grid-row: 1 / 2;
319
- padding-right: 8px;
320
- width: max-content;
321
- font-size: 14px !important;
322
-
323
- & + span.Opta-PlayerName {
324
- grid-column: 4 / 5;
325
- grid-row: 1 / 2;
326
- width: max-content;
327
- font-size: 14px !important;
328
- }
329
- }
330
- }
331
-
332
- span.Opta-PlayerName {
333
- font-family: Roboto, sans-serif;
334
- font-weight: 500;
335
- font-size: 14px !important;
336
- line-height: 100%;
337
- }
338
-
339
- span.Opta-MatcheventsIcons {
340
- grid-column: 3 / 5;
341
- grid-row: 2 / 3;
342
- display: flex;
343
- gap: 4px;
344
- }
345
- }
346
- }
347
- }
348
- }
349
-
350
- .Opta-Overlay {
351
- border-radius: 8px;
352
- overflow: hidden;
353
- border: none !important;
354
- .Opta-Cf {
355
- ul {
356
- background-color: #e5f0ea;
357
- margin: 0 !important;
358
- padding: 16px;
359
- display: flex !important;
360
- flex-direction: column;
361
- align-items: center;
362
- text-align: center;
363
-
364
- .Opta-Circle {
365
- font-family: ${fonts.headline} !important;
366
- font-weight: 800 !important;
367
- font-size: 20px !important;
368
- line-height: 112.99999% !important;
369
- color: ${colours.functional.white};
370
- height: 48px !important;
371
- width: 48px !important;
372
- display: flex !important;
373
- align-items: center;
374
- justify-content: center;
375
- margin-bottom: 16px !important;
376
- &.Opta-Home {
377
- background-color: ${props => props.homeTeamColor.light} !important;
378
- }
379
-
380
- &.Opta-Away {
381
- background-color: ${props => props.awayTeamColor.light} !important;
382
- }
383
-
384
- & + li {
385
- color: ${textColor};
386
- font-family: Roboto, sans-serif;
387
- font-weight: 600;
388
- font-size: 20px;
389
- line-height: 100%;
390
- margin-bottom: 16px;
391
-
392
- & + li {
393
- color: ${textColor} !important;
394
- font-family: Roboto, sans-serif;
395
- font-weight: 500;
396
- font-size: 16px;
397
- margin-bottom: 8px;
398
- }
399
- }
400
- }
401
-
402
- .Opta-MatchEvent {
403
- display: flex;
404
- align-items: center;
405
-
406
- .Opta-Icon {
407
- &.Opta-IconGoal {
408
- margin-top: 2px;
409
- }
410
- &.Opta-IconOff,
411
- &.Opta-IconOn {
412
- margin-top: 6px;
413
- }
414
- }
415
-
416
- span {
417
- color: ${textColor} !important;
418
- font-family: Roboto, sans-serif !important;
419
- font-weight: 400 !important;
420
- font-size: 16px !important;
421
- }
422
- }
423
- }
424
- }
425
-
426
- .Opta-Flex {
427
- display: grid;
428
- grid-template-rows: 1fr;
429
- padding-inline: 32px;
430
- padding-block: 32px;
431
- ${props =>
432
- props.isApp &&
433
- `
434
- @media(prefers-color-scheme: dark) {
435
- background-color: ${darkBackgroundColor} !important;
436
- color: ${darkTextColor} !important;
437
- }
438
- `};
439
- }
440
-
441
- .Opta-Flex-Group {
442
- display: grid;
443
- grid-template-columns: repeat(3, 1fr);
444
- gap: 16px;
445
- }
446
-
447
- .Opta-Flex-Item {
448
- display: flex !important;
449
- width: 100% !important;
450
- height: 100% !important;
451
- padding: 0 !important;
452
- padding-bottom: 16px !important;
453
- }
454
-
455
- .Opta-Stat {
456
- flex-grow: 1 !important;
457
- background-color: #e5f0ea !important;
458
- border-radius: 8px;
459
- padding-block: 16px;
460
- padding-inline: 8px;
461
- margin: 0 !important;
462
- .Opta-Value {
463
- color: ${textColor} !important;
464
- font-family: ${fonts.headline} !important;
465
- font-weight: 800;
466
- font-size: 36px;
467
- line-height: 112.999%;
468
- padding-bottom: 4px;
469
- }
470
- .Opta-Label {
471
- color: ${textColor} !important;
472
- font-family: Roboto, sans-serif !important;
473
- font-weight: 500;
474
- font-size: 16px;
475
- line-height: 112.999%;
476
- }
477
- }
478
- }
479
-
480
- // Mobile styles
481
- @media (max-width: ${maxMDBreakpoint}px) {
482
- // General Styles
483
- .Opta-Cf {
484
- display: flex;
485
- flex-direction: column;
486
- ${props =>
487
- props.isApp &&
488
- `
489
- @media(prefers-color-scheme: dark) {
490
- background-color: ${darkBackgroundColor} !important;
491
- color: ${darkTextColor} !important;
492
- }
493
- `};
494
-
495
- // Formations
496
- .Opta-MatchHeader {
497
- order: 1;
498
- border-top: 1px solid ${borderColor};
499
- border-bottom: 1px solid ${borderColor};
500
- ${props =>
501
- props.isApp &&
502
- `
503
- @media(prefers-color-scheme: dark) {
504
- border-top: 1px solid ${darkBorderColor};
505
- border-bottom: 1px solid ${darkBorderColor};
506
- }
507
- `};
508
-
509
- tr {
510
- justify-content: center;
511
- }
512
-
513
- .Opta-Team {
514
- // Hide team name
515
- font-size: 0;
516
- padding: 0;
517
- }
518
-
519
- .Opta-TeamFormation {
520
- font-family: Roboto, sans-serif;
521
- font-weight: 700;
522
- font-size: 16px;
523
- line-height: 150%;
524
-
525
- &::before {
526
- content: 'Formation: ';
527
- font-size: 16px;
528
- font-family: Roboto, sans-serif;
529
- font-weight: 400;
530
- line-height: 150%;
531
- }
532
-
533
- ${props =>
534
- props.isApp &&
535
- `
536
- @media(prefers-color-scheme: dark) {
537
- color: ${darkTextColor};
538
- &::before {
539
- color: ${darkTextColor};
540
- }
541
- }
542
- `};
543
- }
544
- }
545
-
546
- // Pitch
547
- .Opta-FootballPitch {
548
- order: 2;
549
- margin: 0;
550
- border-radius: 0;
551
- background: none !important;
552
- background-image: repeating-linear-gradient(
553
- 0deg,
554
- #d4e3db 0,
555
- #d4e3db 56px,
556
- #e5f0ea 56px,
557
- #e5f0ea 112px
558
- ) !important;
559
-
560
- // Resize player elements
561
- .Opta-PlayerNumber {
562
- circle {
563
- stroke: #ffffff !important;
564
- stroke-width: 3px !important;
565
- r: 26px !important;
566
- border: 2px solid ${colours.functional.white} !important;
567
- -webkit-tap-highlight-color: transparent;
568
- }
569
- .Opta-JerseyNumber {
570
- font-size: 32px;
571
- -webkit-tap-highlight-color: transparent;
572
- }
573
- }
574
- .Opta-PlayerName {
575
- font-size: 18px;
576
- transform: translateY(14px);
577
- & + .Opta-PlayerName {
578
- transform: translateY(20px);
579
- & + .Opta-Icon {
580
- transform: translateY(30px);
581
- }
582
- }
583
- }
584
- .Opta-Icon {
585
- transform: translateY(20px);
586
- }
587
- }
588
-
589
- // Referee
590
- .Opta-Matchdata {
591
- order: 3;
592
- margin: 0 !important;
593
- padding: 16px !important;
594
- border-bottom: none !important;
595
- dt {
596
- font-family: Roboto, sans-serif;
597
- font-weight: 400;
598
- font-size: 16px;
599
- line-height: 150%;
600
- }
601
- dd {
602
- font-family: Roboto, sans-serif;
603
- font-weight: 700;
604
- font-size: 16px;
605
- line-height: 150%;
606
- }
607
-
608
- ${props =>
609
- props.isApp &&
610
- `
611
- @media(prefers-color-scheme: dark) {
612
- background-color: ${darkBackgroundColor} !important;
613
- dt, dd {
614
- color: ${darkTextColor};
615
- }
616
- }
617
- `};
618
- }
619
-
620
- // Substitutions
621
- .Opta-Subs-Wrap {
622
- order: 4;
623
- thead {
624
- th {
625
- font-family: ${fonts.headline};
626
- font-size: 24px;
627
- font-weight: 800;
628
- padding-block: 40px;
629
- display: flex;
630
- justify-content: center;
631
- align-items: center;
632
- ${props =>
633
- props.isApp &&
634
- `
635
- @media(prefers-color-scheme: dark) {
636
- color: ${darkTextColor};
637
- background-color: ${darkBackgroundColor} !important;
638
- }
639
- `};
640
- }
641
- }
642
- tbody {
643
- tr {
644
- justify-content: flex-start;
645
-
646
- td {
647
- padding: 0;
648
- }
649
-
650
- .Opta-Sub {
651
- display: flex;
652
- flex-direction: row;
653
- align-items: center;
654
- margin-top: 0;
655
- margin-left: 16px;
656
- margin-bottom: 16px;
657
-
658
- .Opta-Circle {
659
- aspect-ratio: 1 / 1;
660
- height: 30px !important;
661
- width: 30px !important;
662
- font-size: 16px !important;
663
- display: flex;
664
- justify-content: center;
665
- align-items: center;
666
- margin-right: 8px;
667
- border-width: 1px !important;
668
- padding-top: 3px;
669
- -webkit-tap-highlight-color: transparent;
670
- }
671
-
672
- .Opta-PlayerName {
673
- padding-right: 4px !important;
674
- white-space: nowrap;
675
- font-size: 16px !important;
676
- }
677
-
678
- .Opta-MatcheventsIcons {
679
- margin-top: 0;
680
- }
681
- }
682
- }
683
- }
684
- }
685
- }
686
-
687
- .Opta-Overlay {
688
- .Opta-Circle {
689
- padding-top: 3px;
690
- }
691
- }
692
-
693
- // Need to override specific styles due to higher specificity in mobile view
694
- .Opta-Subs-Wrap
695
- .Opta-FootballPitch-Subplayers
696
- td
697
- .Opta-Sub
698
- span.Opta-Circle {
699
- color: ${textColor} !important;
700
- border-color: ${textColor} !important;
701
- ${props =>
702
- props.isApp &&
703
- `
704
- @media(prefers-color-scheme: dark) {
705
- color: ${darkTextColor} !important;
706
- border-color: ${darkTextColor} !important;
707
- }
708
- `};
709
- }
710
- .Opta-Subs-Wrap
711
- .Opta-FootballPitch-Subplayers
712
- td
713
- .Opta-Sub.Opta-Away
714
- span.Opta-Circle {
715
- color: ${textColor} !important;
716
- border-color: ${textColor} !important;
717
- ${props =>
718
- props.isApp &&
719
- `
720
- @media(prefers-color-scheme: dark) {
721
- color: ${darkTextColor} !important;
722
- border-color: ${darkTextColor} !important;
723
- }
724
- `};
725
- }
726
-
727
- // Home team styles
728
- &.home-widget-container {
729
- .Opta-MatchHeader {
730
- .Opta-Away {
731
- display: none;
732
- }
733
- }
734
- }
735
-
736
- // Away team styles
737
- &.away-widget-container {
738
- .Opta-MatchHeader {
739
- .Opta-Home {
740
- display: none;
741
- }
742
- }
743
- }
744
- }
745
- `;