@times-components/ts-components 1.84.3 → 1.84.4-alpha.9
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/CHANGELOG.md +27 -0
- package/dist/components/article-sidebar/ArticleSidebar.d.ts +8 -0
- package/dist/components/article-sidebar/ArticleSidebar.js +18 -0
- package/dist/components/article-sidebar/ArticleSidebar.stories.d.ts +1 -0
- package/dist/components/article-sidebar/ArticleSidebar.stories.js +31 -0
- package/dist/components/article-sidebar/__tests__/index.test.d.ts +1 -0
- package/dist/components/article-sidebar/__tests__/index.test.js +28 -0
- package/dist/components/article-sidebar/assets/ChevronIcon.d.ts +2 -0
- package/dist/components/article-sidebar/assets/ChevronIcon.js +6 -0
- package/dist/components/article-sidebar/styles.d.ts +11 -0
- package/dist/components/article-sidebar/styles.js +98 -0
- package/dist/components/article-sidebar/types.d.ts +5 -0
- package/dist/components/article-sidebar/types.js +2 -0
- package/dist/components/opta/football/fixtures-ticker/OptaFootballFixturesTicker.d.ts +7 -0
- package/dist/components/opta/football/fixtures-ticker/OptaFootballFixturesTicker.js +43 -0
- package/dist/components/opta/football/fixtures-ticker/OptaFootballFixturesTicker.stories.d.ts +1 -0
- package/dist/components/opta/football/fixtures-ticker/OptaFootballFixturesTicker.stories.js +25 -0
- package/dist/components/opta/football/fixtures-ticker/__tests__/OptaFootballFixturesTicker.test.d.ts +2 -0
- package/dist/components/opta/football/fixtures-ticker/__tests__/OptaFootballFixturesTicker.test.js +41 -0
- package/dist/components/opta/football/fixtures-ticker/styles.d.ts +2 -0
- package/dist/components/opta/football/fixtures-ticker/styles.js +326 -0
- package/dist/components/opta/football/shared-styles.d.ts +3 -1
- package/dist/components/opta/football/shared-styles.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/package.json +16 -16
- package/rnw.js +1 -1
- package/src/components/article-sidebar/ArticleSidebar.stories.tsx +43 -0
- package/src/components/article-sidebar/ArticleSidebar.tsx +53 -0
- package/src/components/article-sidebar/__tests__/__snapshots__/index.test.tsx.snap +88 -0
- package/src/components/article-sidebar/__tests__/index.test.tsx +33 -0
- package/src/components/article-sidebar/assets/ChevronIcon.tsx +19 -0
- package/src/components/article-sidebar/styles.ts +108 -0
- package/src/components/article-sidebar/types.ts +5 -0
- package/src/components/opta/football/fixtures-ticker/OptaFootballFixturesTicker.stories.tsx +33 -0
- package/src/components/opta/football/fixtures-ticker/OptaFootballFixturesTicker.tsx +70 -0
- package/src/components/opta/football/fixtures-ticker/__tests__/OptaFootballFixturesTicker.test.tsx +53 -0
- package/src/components/opta/football/fixtures-ticker/__tests__/__snapshots__/OptaFootballFixturesTicker.test.tsx.snap +27 -0
- package/src/components/opta/football/fixtures-ticker/styles.ts +328 -0
- package/src/components/opta/football/shared-styles.ts +2 -2
- package/src/index.ts +4 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { breakpoints, colours, fonts } from '@times-components/ts-styleguide';
|
|
3
|
+
|
|
4
|
+
import { WidgetContainerBase } from '../shared-styles';
|
|
5
|
+
|
|
6
|
+
export const WidgetContainerOverride = styled(WidgetContainerBase)`
|
|
7
|
+
.Opta {
|
|
8
|
+
h2 {
|
|
9
|
+
margin: 20px 0 0 0 !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.Opta-js-main {
|
|
13
|
+
table {
|
|
14
|
+
tbody {
|
|
15
|
+
td.Opta-title {
|
|
16
|
+
background-color: transparent !important;
|
|
17
|
+
border-bottom: 1px solid #e4e4e4;
|
|
18
|
+
|
|
19
|
+
h3 {
|
|
20
|
+
margin: 20px 0 0 0 !important;
|
|
21
|
+
font-family: ${fonts.headline} !important;
|
|
22
|
+
font-size: 16px !important;
|
|
23
|
+
line-height: 30px !important;
|
|
24
|
+
text-align: center;
|
|
25
|
+
|
|
26
|
+
span {
|
|
27
|
+
font-size: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
31
|
+
font-size: 18px !important;
|
|
32
|
+
line-height: 40px !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
export const WidgetContainer = styled(WidgetContainerBase)`
|
|
43
|
+
@media (max-width: ${breakpoints.small}px) {
|
|
44
|
+
.Opta-Window {
|
|
45
|
+
left: 0 !important;
|
|
46
|
+
right: 0 !important;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.Opta-Scroller {
|
|
51
|
+
background-color: white !important;
|
|
52
|
+
|
|
53
|
+
border: 1px solid #999999 !important;
|
|
54
|
+
border-radius: 2px;
|
|
55
|
+
padding: 39px 0 !important;
|
|
56
|
+
|
|
57
|
+
&::after {
|
|
58
|
+
background: rgba(0, 0, 0, 0)
|
|
59
|
+
url(https://secure.widget.cloud.opta.net/v3/assets/images/sprites/controls.svg)
|
|
60
|
+
no-repeat !important;
|
|
61
|
+
background-size: 210px 186px !important;
|
|
62
|
+
background-position-x: -180px !important;
|
|
63
|
+
background-position-y: -19px !important;
|
|
64
|
+
height: 16px !important;
|
|
65
|
+
width: 16px !important;
|
|
66
|
+
top: calc(50% - 8px) !important;
|
|
67
|
+
left: calc(50% - 8px) !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.Opta-Next::after {
|
|
71
|
+
transform: rotate(-90deg) translateX(2px);
|
|
72
|
+
}
|
|
73
|
+
&.Opta-Previous::after {
|
|
74
|
+
transform: rotate(90deg) translateX(2px);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (max-width: ${breakpoints.small}px) {
|
|
78
|
+
display: none !important;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.Opta-fixture {
|
|
83
|
+
background-color: #f5f5f5;
|
|
84
|
+
border-radius: 4px;
|
|
85
|
+
height: 80px;
|
|
86
|
+
width: 160px !important;
|
|
87
|
+
margin-inline: 4px;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
|
|
91
|
+
.Opta-Team,
|
|
92
|
+
.Opta-timings {
|
|
93
|
+
background-color: transparent !important;
|
|
94
|
+
border-right: 0 !important;
|
|
95
|
+
}
|
|
96
|
+
.Opta-Team {
|
|
97
|
+
height: 24px !important;
|
|
98
|
+
}
|
|
99
|
+
.Opta-timings {
|
|
100
|
+
height: 24px !important;
|
|
101
|
+
order: -1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.Opta-TeamName,
|
|
105
|
+
.Opta-Team-Score {
|
|
106
|
+
color: black !important;
|
|
107
|
+
font-weight: bold !important;
|
|
108
|
+
}
|
|
109
|
+
&.Opta-prematch .Opta-Team-Score::after {
|
|
110
|
+
content: '-';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.Opta {
|
|
115
|
+
.Opta-js-main {
|
|
116
|
+
padding: 0;
|
|
117
|
+
background-color: transparent;
|
|
118
|
+
|
|
119
|
+
table {
|
|
120
|
+
tbody {
|
|
121
|
+
td.Opta-title {
|
|
122
|
+
height: 40px;
|
|
123
|
+
background-color: ${colours.functional.backgroundSecondary};
|
|
124
|
+
|
|
125
|
+
h3 {
|
|
126
|
+
height: auto;
|
|
127
|
+
margin: 0 0 0 10px;
|
|
128
|
+
color: ${colours.functional.brandColour};
|
|
129
|
+
font-family: ${fonts.supporting};
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
line-height: 14px;
|
|
132
|
+
font-weight: normal;
|
|
133
|
+
background-color: transparent;
|
|
134
|
+
border-bottom: 0;
|
|
135
|
+
|
|
136
|
+
span {
|
|
137
|
+
float: none;
|
|
138
|
+
padding: 0;
|
|
139
|
+
font-size: 13px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
143
|
+
margin: 0 0 0 20px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
tr.Opta-Scoreline {
|
|
149
|
+
height: 40px;
|
|
150
|
+
background-color: transparent !important;
|
|
151
|
+
border-bottom: 1px solid #e4e4e4;
|
|
152
|
+
|
|
153
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
154
|
+
height: 50px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
td {
|
|
158
|
+
max-width: none !important;
|
|
159
|
+
padding: 3px 0 0 0;
|
|
160
|
+
color: ${colours.functional.brandColour} !important;
|
|
161
|
+
font-family: ${fonts.headline};
|
|
162
|
+
font-size: 14px;
|
|
163
|
+
line-height: 14px;
|
|
164
|
+
background-color: transparent;
|
|
165
|
+
|
|
166
|
+
&.Opta-Time {
|
|
167
|
+
width: 50px !important;
|
|
168
|
+
padding: 6px 0 0 10px;
|
|
169
|
+
color: ${colours.section.sport} !important;
|
|
170
|
+
font-family: ${fonts.supporting};
|
|
171
|
+
|
|
172
|
+
abbr {
|
|
173
|
+
font-size: inherit;
|
|
174
|
+
line-height: inherit;
|
|
175
|
+
text-decoration: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
179
|
+
width: 60px !important;
|
|
180
|
+
padding: 6px 0 0 20px;
|
|
181
|
+
font-size: 13px;
|
|
182
|
+
line-height: 14px;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&.Opta-Team {
|
|
187
|
+
width: 30% !important;
|
|
188
|
+
padding-left: 10px;
|
|
189
|
+
|
|
190
|
+
&.Opta-Home {
|
|
191
|
+
padding-right: 10px;
|
|
192
|
+
padding-left: 0;
|
|
193
|
+
text-align: right;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
197
|
+
padding-left: 15px;
|
|
198
|
+
|
|
199
|
+
&.Opta-Home {
|
|
200
|
+
padding-right: 15px;
|
|
201
|
+
padding-left: 0;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.Opta-Score {
|
|
207
|
+
width: 25px !important;
|
|
208
|
+
font-size: 16px;
|
|
209
|
+
line-height: 16px;
|
|
210
|
+
text-align: left !important;
|
|
211
|
+
|
|
212
|
+
&.Opta-Home {
|
|
213
|
+
text-align: right !important;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
span {
|
|
217
|
+
font-size: inherit;
|
|
218
|
+
line-height: inherit;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
222
|
+
width: 30px !important;
|
|
223
|
+
font-size: 24px;
|
|
224
|
+
line-height: 24px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&.Opta-Crest {
|
|
229
|
+
width: 20px !important;
|
|
230
|
+
margin-top: -3px;
|
|
231
|
+
|
|
232
|
+
img {
|
|
233
|
+
width: 20px;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&.Opta-Divider {
|
|
238
|
+
width: 20px !important;
|
|
239
|
+
text-align: center;
|
|
240
|
+
|
|
241
|
+
abbr {
|
|
242
|
+
font-size: inherit;
|
|
243
|
+
line-height: inherit;
|
|
244
|
+
text-decoration: none;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&.Opta-Outer:not(.Opta-Time) {
|
|
249
|
+
width: 50px !important;
|
|
250
|
+
padding: 0 10px 0 0;
|
|
251
|
+
|
|
252
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
253
|
+
width: 60px !important;
|
|
254
|
+
padding: 0 20px 0 0;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@media (min-width: ${breakpoints.medium}px) {
|
|
259
|
+
font-size: 16px;
|
|
260
|
+
line-height: 16px;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
tr.Opta-agg {
|
|
266
|
+
background-color: transparent !important;
|
|
267
|
+
|
|
268
|
+
td {
|
|
269
|
+
padding: 10px;
|
|
270
|
+
color: ${colours.functional.primary};
|
|
271
|
+
font-family: ${fonts.supporting};
|
|
272
|
+
font-size: 13px;
|
|
273
|
+
line-height: 16px;
|
|
274
|
+
background-color: transparent;
|
|
275
|
+
|
|
276
|
+
span {
|
|
277
|
+
font-size: inherit;
|
|
278
|
+
line-height: inherit;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
span.Opta-agg-text {
|
|
282
|
+
text-transform: uppercase;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
tr {
|
|
288
|
+
td.Opta-Nest {
|
|
289
|
+
padding: 0;
|
|
290
|
+
|
|
291
|
+
.Opta_W {
|
|
292
|
+
> .Opta-Cf {
|
|
293
|
+
background-color: transparent;
|
|
294
|
+
border-bottom: 1px solid #e4e4e4;
|
|
295
|
+
|
|
296
|
+
.Opta-Events {
|
|
297
|
+
padding: 10px 0 2px 0;
|
|
298
|
+
|
|
299
|
+
li {
|
|
300
|
+
padding: 0 0 8px 0;
|
|
301
|
+
|
|
302
|
+
.Opta-Event-Text {
|
|
303
|
+
color: ${colours.functional.primary};
|
|
304
|
+
font-family: ${fonts.supporting};
|
|
305
|
+
font-size: 13px;
|
|
306
|
+
line-height: 16px;
|
|
307
|
+
|
|
308
|
+
.Opta-Event-Player,
|
|
309
|
+
.Opta-Event-Time {
|
|
310
|
+
font-size: inherit;
|
|
311
|
+
line-height: inherit;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.Opta-Event-Time {
|
|
315
|
+
color: ${colours.section.sport};
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
`;
|
|
@@ -21,9 +21,9 @@ export const Container = styled.div<{ border: boolean; fullWidth?: boolean }>`
|
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
23
|
|
|
24
|
-
export const PlaceholderContainer = styled.div
|
|
24
|
+
export const PlaceholderContainer = styled.div<{ height?: number }>`
|
|
25
25
|
position: relative;
|
|
26
|
-
height:
|
|
26
|
+
height: ${({ height }) => height || '200'}px;
|
|
27
27
|
`;
|
|
28
28
|
|
|
29
29
|
export const WidgetContainerBase = styled.div`
|
package/src/index.ts
CHANGED
|
@@ -38,6 +38,9 @@ export {
|
|
|
38
38
|
OptaCricketScorecard
|
|
39
39
|
} from './components/opta/cricket/scorecard/OptaCricketScorecard';
|
|
40
40
|
|
|
41
|
+
export {
|
|
42
|
+
OptaFootballFixturesTicker
|
|
43
|
+
} from './components/opta/football/fixtures-ticker/OptaFootballFixturesTicker';
|
|
41
44
|
export {
|
|
42
45
|
OptaFootballFixtures
|
|
43
46
|
} from './components/opta/football/fixtures/OptaFootballFixtures';
|
|
@@ -96,3 +99,4 @@ export { WelcomeBanner } from './components/welcome-banner/WelcomeBanner';
|
|
|
96
99
|
export {
|
|
97
100
|
default as safeDecodeURIComponent
|
|
98
101
|
} from './utils/safeDecodeURIComponent';
|
|
102
|
+
export { ArticleSidebar } from './components/article-sidebar/ArticleSidebar';
|