@times-components/ts-components 1.93.0 → 1.95.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.
@@ -73,7 +73,8 @@ export const OptaFootballFixturesTicker: React.FC<{
73
73
  show_date: true,
74
74
  show_live: true,
75
75
  date_format: 'ddd Do MMM',
76
- fixture_width: 160
76
+ fixture_width: 160,
77
+ breakpoints: 520
77
78
  }).outerHTML;
78
79
 
79
80
  initComponent();
@@ -3,7 +3,7 @@
3
3
  exports[`OptaFootballFixturesTicker with flags should render correctly 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="sc-htpNat sc-ifAKCX kbwAVa"
6
+ class="sc-htpNat sc-ifAKCX jhYhmi"
7
7
  />
8
8
  <div
9
9
  class="sc-bwzfXH uxFfR"
@@ -17,7 +17,7 @@ exports[`OptaFootballFixturesTicker with flags should render correctly 1`] = `
17
17
  exports[`OptaFootballFixturesTicker with flags should render correctly 2`] = `
18
18
  <DocumentFragment>
19
19
  <div
20
- class="sc-htpNat sc-ifAKCX kbwAVa"
20
+ class="sc-htpNat sc-ifAKCX jhYhmi"
21
21
  >
22
22
  <div>
23
23
  Widget
@@ -29,7 +29,7 @@ exports[`OptaFootballFixturesTicker with flags should render correctly 2`] = `
29
29
  exports[`OptaFootballFixturesTicker without flags should render correctly 1`] = `
30
30
  <DocumentFragment>
31
31
  <div
32
- class="sc-htpNat sc-ifAKCX kbwAVa"
32
+ class="sc-htpNat sc-ifAKCX jhYhmi"
33
33
  />
34
34
  <div
35
35
  class="sc-bwzfXH uxFfR"
@@ -43,7 +43,7 @@ exports[`OptaFootballFixturesTicker without flags should render correctly 1`] =
43
43
  exports[`OptaFootballFixturesTicker without flags should render correctly 2`] = `
44
44
  <DocumentFragment>
45
45
  <div
46
- class="sc-htpNat sc-ifAKCX kbwAVa"
46
+ class="sc-htpNat sc-ifAKCX jhYhmi"
47
47
  >
48
48
  <div>
49
49
  Widget
@@ -55,7 +55,7 @@ exports[`OptaFootballFixturesTicker without flags should render correctly 2`] =
55
55
  exports[`OptaFootballFixturesTicker without flags should render correctly with fixturesPageUrl 1`] = `
56
56
  <DocumentFragment>
57
57
  <div
58
- class="sc-htpNat sc-ifAKCX kbwAVa"
58
+ class="sc-htpNat sc-ifAKCX jhYhmi"
59
59
  />
60
60
  <div
61
61
  class="sc-bwzfXH uxFfR"
@@ -69,7 +69,7 @@ exports[`OptaFootballFixturesTicker without flags should render correctly with f
69
69
  exports[`OptaFootballFixturesTicker without flags should render correctly with fixturesPageUrl 2`] = `
70
70
  <DocumentFragment>
71
71
  <div
72
- class="sc-htpNat sc-ifAKCX kbwAVa"
72
+ class="sc-htpNat sc-ifAKCX jhYhmi"
73
73
  >
74
74
  <div>
75
75
  Widget
@@ -81,7 +81,7 @@ exports[`OptaFootballFixturesTicker without flags should render correctly with f
81
81
  exports[`OptaFootballFixturesTicker without flags should render correctly with isApp property 1`] = `
82
82
  <DocumentFragment>
83
83
  <div
84
- class="sc-htpNat sc-ifAKCX ftpdln"
84
+ class="sc-htpNat sc-ifAKCX kSjimB"
85
85
  />
86
86
  <div
87
87
  class="sc-bwzfXH uxFfR"
@@ -95,7 +95,7 @@ exports[`OptaFootballFixturesTicker without flags should render correctly with i
95
95
  exports[`OptaFootballFixturesTicker without flags should render correctly with isApp property 2`] = `
96
96
  <DocumentFragment>
97
97
  <div
98
- class="sc-htpNat sc-ifAKCX ftpdln"
98
+ class="sc-htpNat sc-ifAKCX kSjimB"
99
99
  >
100
100
  <div>
101
101
  Widget
@@ -53,7 +53,7 @@ export const WidgetContainer = styled(WidgetContainerBase)<{
53
53
 
54
54
  @media (max-width: ${breakpoints.small}px) {
55
55
  .Opta-Scroller {
56
- display: ${({ isApp }) => (isApp ? 'block' : 'none')} !important;
56
+ display: none !important;
57
57
  }
58
58
  }
59
59
 
@@ -132,7 +132,6 @@ export const WidgetContainer = styled(WidgetContainerBase)<{
132
132
  background-color: white !important;
133
133
  border: 1px solid #999 !important;
134
134
  border-radius: 2px;
135
- border-radius: 2px;
136
135
  box-sizing: border-box;
137
136
  padding: 39px 0 !important;
138
137
  width: 28px !important;
@@ -191,17 +190,17 @@ export const WidgetContainer = styled(WidgetContainerBase)<{
191
190
  }
192
191
 
193
192
  .Opta-fixture {
194
- background-color: white;
195
- border-radius: 4px;
196
- box-sizing: border-box;
197
193
  height: 80px;
198
- margin-inline: 4px;
194
+ padding-inline: 4px;
199
195
  display: flex;
200
196
  flex-direction: column;
201
197
 
198
+ > div {
199
+ background-color: white !important;
200
+ }
201
+
202
202
  .Opta-Team,
203
203
  .Opta-timings {
204
- background-color: transparent !important;
205
204
  border-right: 0 !important;
206
205
  }
207
206
  .Opta-Team {
@@ -217,6 +216,8 @@ export const WidgetContainer = styled(WidgetContainerBase)<{
217
216
  height: 24px !important;
218
217
  order: -1;
219
218
  color: #696969 !important;
219
+ border-start-start-radius: 4px;
220
+ border-start-end-radius: 4px;
220
221
  }
221
222
 
222
223
  .Opta-timings .Opta-Time * {
@@ -230,8 +231,16 @@ export const WidgetContainer = styled(WidgetContainerBase)<{
230
231
  font-family: 'Roboto-Medium' !important;
231
232
  }
232
233
 
234
+ .Opta-Away {
235
+ border-end-start-radius: 4px;
236
+ border-end-end-radius: 4px;
237
+ height: 34px !important;
238
+ }
239
+
233
240
  &.Opta-prematch {
234
- background-color: #f5f5f5;
241
+ > div {
242
+ background-color: #f5f5f5 !important;
243
+ }
235
244
  .Opta-Team-Score::after {
236
245
  content: '-';
237
246
  }
@@ -241,11 +250,33 @@ export const WidgetContainer = styled(WidgetContainerBase)<{
241
250
  }
242
251
  }
243
252
 
244
- &.Opta-result {
245
- border: 1px solid #ccc;
253
+ &.Opta-result > div {
254
+ border: 1px solid #ccc !important;
255
+
256
+ &.Opta-timings {
257
+ border-bottom: none !important;
258
+ }
259
+ &.Opta-Home {
260
+ border-bottom: none !important;
261
+ border-top: none !important;
262
+ }
263
+ &.Opta-Away {
264
+ border-top: none !important;
265
+ }
246
266
  }
247
- &.Opta-live {
248
- border: 1px solid #01000d;
267
+ &.Opta-live > div {
268
+ border: 1px solid #01000d !important;
269
+
270
+ &.Opta-timings {
271
+ border-bottom: none !important;
272
+ }
273
+ &.Opta-Home {
274
+ border-bottom: none !important;
275
+ border-top: none !important;
276
+ }
277
+ &.Opta-Away {
278
+ border-top: none !important;
279
+ }
249
280
  }
250
281
 
251
282
  .Opta-Image-Team-Small {
@@ -34,6 +34,17 @@ const showcase = {
34
34
  ),
35
35
  name: 'PlayerStats (assists)',
36
36
  type: 'story'
37
+ },
38
+ {
39
+ component: () => (
40
+ <OptaFootballPlayerStats
41
+ season="2023"
42
+ competition="3"
43
+ visible_categories="cards_red"
44
+ />
45
+ ),
46
+ name: 'PlayerStats (red cards)',
47
+ type: 'story'
37
48
  }
38
49
  ],
39
50
  name: 'Typescript Component/In Article/Football/PlayerStats'
@@ -20,6 +20,7 @@ export const OptaFootballPlayerStats: React.FC<{
20
20
  competition: string;
21
21
  visible_categories: string; // goals | assists | cards_red | cards_yellow
22
22
  classes?: string;
23
+ hide_zeroes?: boolean;
23
24
  show_title?: boolean;
24
25
  full_width?: boolean;
25
26
  }> = React.memo(
@@ -27,6 +28,7 @@ export const OptaFootballPlayerStats: React.FC<{
27
28
  season,
28
29
  competition,
29
30
  full_width,
31
+ hide_zeroes = true,
30
32
  show_title = true,
31
33
  visible_categories,
32
34
  classes
@@ -48,6 +50,7 @@ export const OptaFootballPlayerStats: React.FC<{
48
50
  ref.current.innerHTML = initElement('opta-widget', {
49
51
  sport,
50
52
  widget: 'player_ranking',
53
+ hide_zeroes,
51
54
  season,
52
55
  competition,
53
56
  template: 'normal',