@times-components/ts-components 1.24.0 → 1.26.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/CHANGELOG.md +35 -0
- package/dist/__mocks__/isomorphic-unfetch.d.ts +3 -0
- package/dist/__mocks__/isomorphic-unfetch.js +4 -0
- package/dist/components/article-flag/LiveArticleFlag.js +5 -5
- package/dist/components/article-flag/styles.d.ts +4 -3
- package/dist/components/article-flag/styles.js +30 -26
- package/dist/components/article-header/ArticleHeader.js +11 -2
- package/dist/components/common-styles.d.ts +13 -0
- package/dist/components/common-styles.js +54 -10
- package/dist/components/in-article-big-numbers/BigNumbers.js +4 -4
- package/dist/components/in-article-big-numbers/styles.d.ts +1 -13
- package/dist/components/in-article-big-numbers/styles.js +3 -52
- package/dist/components/in-article-timelines/Timelines.d.ts +4 -0
- package/dist/components/in-article-timelines/Timelines.js +70 -0
- package/dist/components/in-article-timelines/Timelines.stories.d.ts +1 -0
- package/dist/components/in-article-timelines/Timelines.stories.js +21 -0
- package/dist/components/in-article-timelines/__tests__/Timelines.test.d.ts +2 -0
- package/dist/components/in-article-timelines/__tests__/Timelines.test.js +256 -0
- package/dist/components/in-article-timelines/styles.d.ts +15 -0
- package/dist/components/in-article-timelines/styles.js +115 -0
- package/dist/components/opta/football/fixtures/OptaFootballFixtures.js +5 -4
- package/dist/components/opta/football/fixtures/__tests__/OptaFootballFixtures.test.d.ts +2 -0
- package/dist/components/opta/football/fixtures/__tests__/OptaFootballFixtures.test.js +41 -0
- package/dist/components/opta/football/match-stats/OptaFootballMatchStats.js +4 -3
- package/dist/components/opta/football/match-stats/__tests__/OptaFootballMatchStats.test.d.ts +2 -0
- package/dist/components/opta/football/match-stats/__tests__/OptaFootballMatchStats.test.js +40 -0
- package/dist/components/opta/football/standings/OptaFootballStandings.js +4 -3
- package/dist/components/opta/football/standings/__tests__/OptaFootballStandings.test.d.ts +2 -0
- package/dist/components/opta/football/standings/__tests__/OptaFootballStandings.test.js +39 -0
- package/dist/components/opta/football/summary/OptaFootballSummary.js +4 -3
- package/dist/components/opta/football/summary/__tests__/OptaFootballSummary.test.d.ts +2 -0
- package/dist/components/opta/football/summary/__tests__/OptaFootballSummary.test.js +40 -0
- package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.d.ts +8 -0
- package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.js +54 -0
- package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.stories.d.ts +1 -0
- package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.stories.js +26 -0
- package/dist/components/opta/rugby/fixtures/__tests__/OptaRugbyFixtures.test.d.ts +2 -0
- package/dist/components/opta/rugby/fixtures/__tests__/OptaRugbyFixtures.test.js +41 -0
- package/dist/components/opta/rugby/fixtures/styles.d.ts +2 -0
- package/dist/components/opta/rugby/fixtures/styles.js +255 -0
- package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.d.ts +7 -0
- package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.js +43 -0
- package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.stories.d.ts +1 -0
- package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.stories.js +26 -0
- package/dist/components/opta/rugby/match-stats/__tests__/OptaRugbyMatchStats.test.d.ts +2 -0
- package/dist/components/opta/rugby/match-stats/__tests__/OptaRugbyMatchStats.test.js +40 -0
- package/dist/components/opta/rugby/match-stats/styles.d.ts +1 -0
- package/dist/components/opta/rugby/match-stats/styles.js +153 -0
- package/dist/components/opta/rugby/shared-styles.d.ts +6 -0
- package/dist/components/opta/rugby/shared-styles.js +72 -0
- package/dist/components/opta/rugby/standings/OptaRugbyStandings.d.ts +8 -0
- package/dist/components/opta/rugby/standings/OptaRugbyStandings.js +36 -0
- package/dist/components/opta/rugby/standings/OptaRugbyStandings.stories.d.ts +1 -0
- package/dist/components/opta/rugby/standings/OptaRugbyStandings.stories.js +36 -0
- package/dist/components/opta/rugby/standings/__tests__/OptaRugbyStandings.test.d.ts +2 -0
- package/dist/components/opta/rugby/standings/__tests__/OptaRugbyStandings.test.js +39 -0
- package/dist/components/opta/rugby/standings/styles.d.ts +1 -0
- package/dist/components/opta/rugby/standings/styles.js +247 -0
- package/dist/components/opta/rugby/summary/OptaRugbySummary.d.ts +7 -0
- package/dist/components/opta/rugby/summary/OptaRugbySummary.js +44 -0
- package/dist/components/opta/rugby/summary/OptaRugbySummary.stories.d.ts +1 -0
- package/dist/components/opta/rugby/summary/OptaRugbySummary.stories.js +26 -0
- package/dist/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.d.ts +2 -0
- package/dist/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.js +40 -0
- package/dist/components/opta/rugby/summary/styles.d.ts +1 -0
- package/dist/components/opta/rugby/summary/styles.js +152 -0
- package/dist/components/opta/utils/__tests__/config.test.d.ts +1 -0
- package/dist/components/opta/utils/__tests__/config.test.js +24 -0
- package/dist/components/opta/utils/config.d.ts +1 -1
- package/dist/components/opta/utils/config.js +12 -3
- package/dist/helpers/fetch/FetchProvider.js +3 -3
- package/dist/helpers/fetch/__tests__/FetchProvider.test.d.ts +0 -1
- package/dist/helpers/fetch/__tests__/FetchProvider.test.js +17 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/jest.config.js +4 -4
- package/package.json +6 -5
- package/rnw.js +1 -1
- package/src/__mocks__/isomorphic-unfetch.ts +3 -0
- package/src/components/article-flag/LiveArticleFlag.tsx +7 -6
- package/src/components/article-flag/__tests__/__snapshots__/ArticleFlag.test.tsx.snap +100 -100
- package/src/components/article-flag/__tests__/__snapshots__/LiveArticleFlag.test.tsx.snap +33 -33
- package/src/components/article-flag/styles.ts +32 -27
- package/src/components/article-header/ArticleHeader.tsx +10 -2
- package/src/components/article-header/__tests__/__snapshots__/ArticleHeader.test.tsx.snap +14 -11
- package/src/components/carousel/__tests__/__snapshots__/GalleryCarousel.test.tsx.snap +3 -3
- package/src/components/common-styles.ts +66 -7
- package/src/components/in-article-big-numbers/BigNumbers.tsx +11 -8
- package/src/components/in-article-big-numbers/__tests__/__snapshots__/BigNumbers.test.tsx.snap +67 -67
- package/src/components/in-article-big-numbers/styles.ts +2 -65
- package/src/components/in-article-info-card/__tests__/__snapshots__/InfoCard.test.tsx.snap +8 -8
- package/src/components/in-article-info-card-bulletpoints/__tests__/__snapshots__/InfoCardBulletPoints.test.tsx.snap +2 -2
- package/src/components/in-article-puff/__tests__/__snapshots__/InArticlePuff.test.tsx.snap +10 -10
- package/src/components/in-article-timelines/Timelines.stories.tsx +33 -0
- package/src/components/in-article-timelines/Timelines.tsx +160 -0
- package/src/components/in-article-timelines/__tests__/Timelines.test.tsx +309 -0
- package/src/components/in-article-timelines/__tests__/__snapshots__/Timelines.test.tsx.snap +727 -0
- package/src/components/in-article-timelines/styles.ts +127 -0
- package/src/components/opta/football/fixtures/OptaFootballFixtures.tsx +5 -3
- package/src/components/opta/football/fixtures/__tests__/OptaFootballFixtures.test.tsx +53 -0
- package/src/components/opta/football/fixtures/__tests__/__snapshots__/OptaFootballFixtures.test.tsx.snap +34 -0
- package/src/components/opta/football/match-stats/OptaFootballMatchStats.tsx +4 -2
- package/src/components/opta/football/match-stats/__tests__/OptaFootballMatchStats.test.tsx +52 -0
- package/src/components/opta/football/match-stats/__tests__/__snapshots__/OptaFootballMatchStats.test.tsx.snap +34 -0
- package/src/components/opta/football/standings/OptaFootballStandings.tsx +4 -2
- package/src/components/opta/football/standings/__tests__/OptaFootballStandings.test.tsx +51 -0
- package/src/components/opta/football/standings/__tests__/__snapshots__/OptaFootballStandings.test.tsx.snap +34 -0
- package/src/components/opta/football/summary/OptaFootballSummary.tsx +4 -2
- package/src/components/opta/football/summary/__tests__/OptaFootballSummary.test.tsx +52 -0
- package/src/components/opta/football/summary/__tests__/__snapshots__/OptaFootballSummary.test.tsx.snap +34 -0
- package/src/components/opta/rugby/fixtures/OptaRugbyFixtures.stories.tsx +44 -0
- package/src/components/opta/rugby/fixtures/OptaRugbyFixtures.tsx +86 -0
- package/src/components/opta/rugby/fixtures/__tests__/OptaRugbyFixtures.test.tsx +53 -0
- package/src/components/opta/rugby/fixtures/__tests__/__snapshots__/OptaRugbyFixtures.test.tsx.snap +34 -0
- package/src/components/opta/rugby/fixtures/styles.ts +257 -0
- package/src/components/opta/rugby/match-stats/OptaRugbyMatchStats.stories.tsx +34 -0
- package/src/components/opta/rugby/match-stats/OptaRugbyMatchStats.tsx +71 -0
- package/src/components/opta/rugby/match-stats/__tests__/OptaRugbyMatchStats.test.tsx +52 -0
- package/src/components/opta/rugby/match-stats/__tests__/__snapshots__/OptaRugbyMatchStats.test.tsx.snap +34 -0
- package/src/components/opta/rugby/match-stats/styles.ts +154 -0
- package/src/components/opta/rugby/shared-styles.ts +75 -0
- package/src/components/opta/rugby/standings/OptaRugbyStandings.stories.tsx +49 -0
- package/src/components/opta/rugby/standings/OptaRugbyStandings.tsx +66 -0
- package/src/components/opta/rugby/standings/__tests__/OptaRugbyStandings.test.tsx +51 -0
- package/src/components/opta/rugby/standings/__tests__/__snapshots__/OptaRugbyStandings.test.tsx.snap +34 -0
- package/src/components/opta/rugby/standings/styles.ts +248 -0
- package/src/components/opta/rugby/summary/OptaRugbySummary.stories.tsx +34 -0
- package/src/components/opta/rugby/summary/OptaRugbySummary.tsx +71 -0
- package/src/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.tsx +52 -0
- package/src/components/opta/rugby/summary/__tests__/__snapshots__/OptaRugbySummary.test.tsx.snap +34 -0
- package/src/components/opta/rugby/summary/styles.ts +153 -0
- package/src/components/opta/utils/__tests__/config.test.tsx +38 -0
- package/src/components/opta/utils/config.ts +13 -3
- package/src/helpers/fetch/FetchProvider.tsx +2 -2
- package/src/helpers/fetch/__tests__/FetchProvider.test.tsx +21 -31
- package/src/helpers/fetch/__tests__/__snapshots__/FetchProvider.test.tsx.snap +10 -2
- package/src/index.ts +1 -0
package/src/components/in-article-big-numbers/__tests__/__snapshots__/BigNumbers.test.tsx.snap
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
exports[`BigNumbers click show all 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
|
-
class="sc-
|
|
6
|
+
class="sc-dnqmqq hHfasZ"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="sc-
|
|
9
|
+
class="sc-iwsKbI fMDvHO"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
class="sc-
|
|
12
|
+
class="sc-bwzfXH gzPkze"
|
|
13
13
|
>
|
|
14
14
|
President Race
|
|
15
15
|
</div>
|
|
16
16
|
<div
|
|
17
|
-
class="sc-
|
|
17
|
+
class="sc-gzVnrw cqivXS"
|
|
18
18
|
>
|
|
19
19
|
The stats behind the two candidates
|
|
20
20
|
</div>
|
|
@@ -22,74 +22,74 @@ exports[`BigNumbers click show all 1`] = `
|
|
|
22
22
|
class="sc-EHOje kSjPZf"
|
|
23
23
|
>
|
|
24
24
|
<ul
|
|
25
|
-
class="sc-
|
|
25
|
+
class="sc-ifAKCX LUyZI"
|
|
26
26
|
>
|
|
27
27
|
<li
|
|
28
|
-
class="sc-
|
|
28
|
+
class="sc-gqjmRU ejoKUJ"
|
|
29
29
|
>
|
|
30
30
|
<div
|
|
31
|
-
class="sc-
|
|
31
|
+
class="sc-VigVT lbzqVL"
|
|
32
32
|
>
|
|
33
33
|
$497.8m
|
|
34
34
|
</div>
|
|
35
35
|
<div
|
|
36
|
-
class="sc-
|
|
36
|
+
class="sc-bxivhb bPVvqJ"
|
|
37
37
|
>
|
|
38
38
|
Money raised by Hillary Clinton
|
|
39
39
|
</div>
|
|
40
40
|
</li>
|
|
41
41
|
<li
|
|
42
|
-
class="sc-
|
|
42
|
+
class="sc-gqjmRU ejoKUJ"
|
|
43
43
|
>
|
|
44
44
|
<div
|
|
45
|
-
class="sc-
|
|
45
|
+
class="sc-VigVT lbzqVL"
|
|
46
46
|
>
|
|
47
47
|
$247.8m
|
|
48
48
|
</div>
|
|
49
49
|
<div
|
|
50
|
-
class="sc-
|
|
50
|
+
class="sc-bxivhb bPVvqJ"
|
|
51
51
|
>
|
|
52
52
|
Money raised by Donald Trump
|
|
53
53
|
</div>
|
|
54
54
|
</li>
|
|
55
55
|
<li
|
|
56
|
-
class="sc-
|
|
56
|
+
class="sc-gqjmRU ejoKUJ"
|
|
57
57
|
>
|
|
58
58
|
<div
|
|
59
|
-
class="sc-
|
|
59
|
+
class="sc-VigVT lbzqVL"
|
|
60
60
|
>
|
|
61
61
|
71.6m
|
|
62
62
|
</div>
|
|
63
63
|
<div
|
|
64
|
-
class="sc-
|
|
64
|
+
class="sc-bxivhb bPVvqJ"
|
|
65
65
|
>
|
|
66
66
|
The number of people who turned in to the final president debate
|
|
67
67
|
</div>
|
|
68
68
|
</li>
|
|
69
69
|
<li
|
|
70
|
-
class="sc-
|
|
70
|
+
class="sc-gqjmRU ejoKUJ"
|
|
71
71
|
>
|
|
72
72
|
<div
|
|
73
|
-
class="sc-
|
|
73
|
+
class="sc-VigVT lbzqVL"
|
|
74
74
|
>
|
|
75
75
|
2-7
|
|
76
76
|
</div>
|
|
77
77
|
<div
|
|
78
|
-
class="sc-
|
|
78
|
+
class="sc-bxivhb bPVvqJ"
|
|
79
79
|
>
|
|
80
80
|
Clinton’s odds of winning the US election (provided by Paddy Power)
|
|
81
81
|
</div>
|
|
82
82
|
</li>
|
|
83
83
|
<li
|
|
84
|
-
class="sc-
|
|
84
|
+
class="sc-gqjmRU ejoKUJ"
|
|
85
85
|
>
|
|
86
86
|
<div
|
|
87
|
-
class="sc-
|
|
87
|
+
class="sc-VigVT lbzqVL"
|
|
88
88
|
>
|
|
89
89
|
3-1
|
|
90
90
|
</div>
|
|
91
91
|
<div
|
|
92
|
-
class="sc-
|
|
92
|
+
class="sc-bxivhb bPVvqJ"
|
|
93
93
|
>
|
|
94
94
|
Trump’s odds of winning the US election (provided by Paddy Power)
|
|
95
95
|
</div>
|
|
@@ -98,10 +98,10 @@ exports[`BigNumbers click show all 1`] = `
|
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
<div
|
|
101
|
-
class="sc-
|
|
101
|
+
class="sc-bZQynM iNwlGF"
|
|
102
102
|
>
|
|
103
103
|
<button
|
|
104
|
-
class="sc-
|
|
104
|
+
class="sc-htoDjs sc-gZMcBi fiRWob"
|
|
105
105
|
>
|
|
106
106
|
Collapse
|
|
107
107
|
</button>
|
|
@@ -113,7 +113,7 @@ exports[`BigNumbers click show all 1`] = `
|
|
|
113
113
|
exports[`BigNumbers should render the initial loading state correctly 1`] = `
|
|
114
114
|
<DocumentFragment>
|
|
115
115
|
<div
|
|
116
|
-
class="sc-
|
|
116
|
+
class="sc-bdVaJa dwiMsX"
|
|
117
117
|
>
|
|
118
118
|
<div>
|
|
119
119
|
Placeholder
|
|
@@ -125,18 +125,18 @@ exports[`BigNumbers should render the initial loading state correctly 1`] = `
|
|
|
125
125
|
exports[`BigNumbers should render the standard component 1`] = `
|
|
126
126
|
<DocumentFragment>
|
|
127
127
|
<div
|
|
128
|
-
class="sc-
|
|
128
|
+
class="sc-dnqmqq hHfasZ"
|
|
129
129
|
>
|
|
130
130
|
<div
|
|
131
|
-
class="sc-
|
|
131
|
+
class="sc-iwsKbI fMDvHO"
|
|
132
132
|
>
|
|
133
133
|
<div
|
|
134
|
-
class="sc-
|
|
134
|
+
class="sc-bwzfXH gzPkze"
|
|
135
135
|
>
|
|
136
136
|
President Race
|
|
137
137
|
</div>
|
|
138
138
|
<div
|
|
139
|
-
class="sc-
|
|
139
|
+
class="sc-gzVnrw cqivXS"
|
|
140
140
|
>
|
|
141
141
|
The stats behind the two candidates
|
|
142
142
|
</div>
|
|
@@ -144,74 +144,74 @@ exports[`BigNumbers should render the standard component 1`] = `
|
|
|
144
144
|
class="sc-EHOje kSjPZf"
|
|
145
145
|
>
|
|
146
146
|
<ul
|
|
147
|
-
class="sc-
|
|
147
|
+
class="sc-ifAKCX LUyZI"
|
|
148
148
|
>
|
|
149
149
|
<li
|
|
150
|
-
class="sc-
|
|
150
|
+
class="sc-gqjmRU ejoKUJ"
|
|
151
151
|
>
|
|
152
152
|
<div
|
|
153
|
-
class="sc-
|
|
153
|
+
class="sc-VigVT lbzqVL"
|
|
154
154
|
>
|
|
155
155
|
$497.8m
|
|
156
156
|
</div>
|
|
157
157
|
<div
|
|
158
|
-
class="sc-
|
|
158
|
+
class="sc-bxivhb bPVvqJ"
|
|
159
159
|
>
|
|
160
160
|
Money raised by Hillary Clinton
|
|
161
161
|
</div>
|
|
162
162
|
</li>
|
|
163
163
|
<li
|
|
164
|
-
class="sc-
|
|
164
|
+
class="sc-gqjmRU ejoKUJ"
|
|
165
165
|
>
|
|
166
166
|
<div
|
|
167
|
-
class="sc-
|
|
167
|
+
class="sc-VigVT lbzqVL"
|
|
168
168
|
>
|
|
169
169
|
$247.8m
|
|
170
170
|
</div>
|
|
171
171
|
<div
|
|
172
|
-
class="sc-
|
|
172
|
+
class="sc-bxivhb bPVvqJ"
|
|
173
173
|
>
|
|
174
174
|
Money raised by Donald Trump
|
|
175
175
|
</div>
|
|
176
176
|
</li>
|
|
177
177
|
<li
|
|
178
|
-
class="sc-
|
|
178
|
+
class="sc-gqjmRU ejoKUJ"
|
|
179
179
|
>
|
|
180
180
|
<div
|
|
181
|
-
class="sc-
|
|
181
|
+
class="sc-VigVT lbzqVL"
|
|
182
182
|
>
|
|
183
183
|
71.6m
|
|
184
184
|
</div>
|
|
185
185
|
<div
|
|
186
|
-
class="sc-
|
|
186
|
+
class="sc-bxivhb bPVvqJ"
|
|
187
187
|
>
|
|
188
188
|
The number of people who turned in to the final president debate
|
|
189
189
|
</div>
|
|
190
190
|
</li>
|
|
191
191
|
<li
|
|
192
|
-
class="sc-
|
|
192
|
+
class="sc-gqjmRU ejoKUJ"
|
|
193
193
|
>
|
|
194
194
|
<div
|
|
195
|
-
class="sc-
|
|
195
|
+
class="sc-VigVT lbzqVL"
|
|
196
196
|
>
|
|
197
197
|
2-7
|
|
198
198
|
</div>
|
|
199
199
|
<div
|
|
200
|
-
class="sc-
|
|
200
|
+
class="sc-bxivhb bPVvqJ"
|
|
201
201
|
>
|
|
202
202
|
Clinton’s odds of winning the US election (provided by Paddy Power)
|
|
203
203
|
</div>
|
|
204
204
|
</li>
|
|
205
205
|
<li
|
|
206
|
-
class="sc-
|
|
206
|
+
class="sc-gqjmRU ejoKUJ"
|
|
207
207
|
>
|
|
208
208
|
<div
|
|
209
|
-
class="sc-
|
|
209
|
+
class="sc-VigVT lbzqVL"
|
|
210
210
|
>
|
|
211
211
|
3-1
|
|
212
212
|
</div>
|
|
213
213
|
<div
|
|
214
|
-
class="sc-
|
|
214
|
+
class="sc-bxivhb bPVvqJ"
|
|
215
215
|
>
|
|
216
216
|
Trump’s odds of winning the US election (provided by Paddy Power)
|
|
217
217
|
</div>
|
|
@@ -220,10 +220,10 @@ exports[`BigNumbers should render the standard component 1`] = `
|
|
|
220
220
|
</div>
|
|
221
221
|
</div>
|
|
222
222
|
<div
|
|
223
|
-
class="sc-
|
|
223
|
+
class="sc-bZQynM iNwlGF"
|
|
224
224
|
>
|
|
225
225
|
<button
|
|
226
|
-
class="sc-
|
|
226
|
+
class="sc-htoDjs sc-gZMcBi fiRWob"
|
|
227
227
|
>
|
|
228
228
|
Show all
|
|
229
229
|
</button>
|
|
@@ -235,18 +235,18 @@ exports[`BigNumbers should render the standard component 1`] = `
|
|
|
235
235
|
exports[`BigNumbers should render the wide component 1`] = `
|
|
236
236
|
<DocumentFragment>
|
|
237
237
|
<div
|
|
238
|
-
class="sc-
|
|
238
|
+
class="sc-dnqmqq gFoWtC"
|
|
239
239
|
>
|
|
240
240
|
<div
|
|
241
|
-
class="sc-
|
|
241
|
+
class="sc-iwsKbI fMDvHO"
|
|
242
242
|
>
|
|
243
243
|
<div
|
|
244
|
-
class="sc-
|
|
244
|
+
class="sc-bwzfXH gzPkze"
|
|
245
245
|
>
|
|
246
246
|
President Race
|
|
247
247
|
</div>
|
|
248
248
|
<div
|
|
249
|
-
class="sc-
|
|
249
|
+
class="sc-gzVnrw cqivXS"
|
|
250
250
|
>
|
|
251
251
|
The stats behind the two candidates
|
|
252
252
|
</div>
|
|
@@ -254,74 +254,74 @@ exports[`BigNumbers should render the wide component 1`] = `
|
|
|
254
254
|
class="sc-EHOje kSjPZf"
|
|
255
255
|
>
|
|
256
256
|
<ul
|
|
257
|
-
class="sc-
|
|
257
|
+
class="sc-ifAKCX LUyZI"
|
|
258
258
|
>
|
|
259
259
|
<li
|
|
260
|
-
class="sc-
|
|
260
|
+
class="sc-gqjmRU dvjqsJ"
|
|
261
261
|
>
|
|
262
262
|
<div
|
|
263
|
-
class="sc-
|
|
263
|
+
class="sc-VigVT lbzqVL"
|
|
264
264
|
>
|
|
265
265
|
$497.8m
|
|
266
266
|
</div>
|
|
267
267
|
<div
|
|
268
|
-
class="sc-
|
|
268
|
+
class="sc-bxivhb bPVvqJ"
|
|
269
269
|
>
|
|
270
270
|
Money raised by Hillary Clinton
|
|
271
271
|
</div>
|
|
272
272
|
</li>
|
|
273
273
|
<li
|
|
274
|
-
class="sc-
|
|
274
|
+
class="sc-gqjmRU dvjqsJ"
|
|
275
275
|
>
|
|
276
276
|
<div
|
|
277
|
-
class="sc-
|
|
277
|
+
class="sc-VigVT lbzqVL"
|
|
278
278
|
>
|
|
279
279
|
$247.8m
|
|
280
280
|
</div>
|
|
281
281
|
<div
|
|
282
|
-
class="sc-
|
|
282
|
+
class="sc-bxivhb bPVvqJ"
|
|
283
283
|
>
|
|
284
284
|
Money raised by Donald Trump
|
|
285
285
|
</div>
|
|
286
286
|
</li>
|
|
287
287
|
<li
|
|
288
|
-
class="sc-
|
|
288
|
+
class="sc-gqjmRU dvjqsJ"
|
|
289
289
|
>
|
|
290
290
|
<div
|
|
291
|
-
class="sc-
|
|
291
|
+
class="sc-VigVT lbzqVL"
|
|
292
292
|
>
|
|
293
293
|
71.6m
|
|
294
294
|
</div>
|
|
295
295
|
<div
|
|
296
|
-
class="sc-
|
|
296
|
+
class="sc-bxivhb bPVvqJ"
|
|
297
297
|
>
|
|
298
298
|
The number of people who turned in to the final president debate
|
|
299
299
|
</div>
|
|
300
300
|
</li>
|
|
301
301
|
<li
|
|
302
|
-
class="sc-
|
|
302
|
+
class="sc-gqjmRU dvjqsJ"
|
|
303
303
|
>
|
|
304
304
|
<div
|
|
305
|
-
class="sc-
|
|
305
|
+
class="sc-VigVT lbzqVL"
|
|
306
306
|
>
|
|
307
307
|
2-7
|
|
308
308
|
</div>
|
|
309
309
|
<div
|
|
310
|
-
class="sc-
|
|
310
|
+
class="sc-bxivhb bPVvqJ"
|
|
311
311
|
>
|
|
312
312
|
Clinton’s odds of winning the US election (provided by Paddy Power)
|
|
313
313
|
</div>
|
|
314
314
|
</li>
|
|
315
315
|
<li
|
|
316
|
-
class="sc-
|
|
316
|
+
class="sc-gqjmRU dvjqsJ"
|
|
317
317
|
>
|
|
318
318
|
<div
|
|
319
|
-
class="sc-
|
|
319
|
+
class="sc-VigVT lbzqVL"
|
|
320
320
|
>
|
|
321
321
|
3-1
|
|
322
322
|
</div>
|
|
323
323
|
<div
|
|
324
|
-
class="sc-
|
|
324
|
+
class="sc-bxivhb bPVvqJ"
|
|
325
325
|
>
|
|
326
326
|
Trump’s odds of winning the US election (provided by Paddy Power)
|
|
327
327
|
</div>
|
|
@@ -330,10 +330,10 @@ exports[`BigNumbers should render the wide component 1`] = `
|
|
|
330
330
|
</div>
|
|
331
331
|
</div>
|
|
332
332
|
<div
|
|
333
|
-
class="sc-
|
|
333
|
+
class="sc-bZQynM iNwlGF"
|
|
334
334
|
>
|
|
335
335
|
<button
|
|
336
|
-
class="sc-
|
|
336
|
+
class="sc-htoDjs sc-gZMcBi fiRWob"
|
|
337
337
|
>
|
|
338
338
|
Show all
|
|
339
339
|
</button>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { breakpoints, colours, fonts } from '@times-components/styleguide';
|
|
3
|
+
import { ShowAllButton } from '../common-styles';
|
|
3
4
|
|
|
4
5
|
export const Container = styled.div<{
|
|
5
6
|
sectionColour: string;
|
|
@@ -31,67 +32,10 @@ export const ContentContainer = styled.div`
|
|
|
31
32
|
padding: 0 16px;
|
|
32
33
|
`;
|
|
33
34
|
|
|
34
|
-
export const
|
|
35
|
-
font-family: ${fonts.headline};
|
|
36
|
-
font-size: 24px;
|
|
37
|
-
line-height: 24px;
|
|
38
|
-
color: ${colours.functional.brandColour};
|
|
39
|
-
margin: 0 0 6px;
|
|
40
|
-
@media (min-width: ${breakpoints.medium}px) {
|
|
41
|
-
font-size: 32px;
|
|
42
|
-
line-height: 32px;
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
export const ShowAllContainer = styled.div<{
|
|
47
|
-
showAll: boolean;
|
|
48
|
-
displayShowAll: boolean;
|
|
49
|
-
}>`
|
|
50
|
-
display: flex;
|
|
51
|
-
border-top: 1px solid ${colours.functional.keyline};
|
|
52
|
-
padding: 5px;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
display: ${({ displayShowAll: displayShowAll }) =>
|
|
55
|
-
displayShowAll ? 'flex' : 'none'};
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
export const ShowAllButton = styled.button`
|
|
35
|
+
export const StyledShowAllButton = styled(ShowAllButton)`
|
|
59
36
|
font-size: 12px;
|
|
60
|
-
font-family: ${fonts.supporting};
|
|
61
|
-
font-weight: 500;
|
|
62
|
-
line-height: 20px;
|
|
63
|
-
border: 1px solid ${colours.functional.primary};
|
|
64
|
-
background: transparent;
|
|
65
37
|
margin: 15px 0;
|
|
66
38
|
padding: 10px 12px 5px;
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
&:active {
|
|
69
|
-
border: 1px solid ${colours.functional.action};
|
|
70
|
-
color: ${colours.functional.action};
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
|
|
74
|
-
export const ListContainer = styled.div<{
|
|
75
|
-
showAll: boolean;
|
|
76
|
-
maxHeight: number;
|
|
77
|
-
displayShowAll: boolean;
|
|
78
|
-
}>`
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-direction: column;
|
|
81
|
-
justify-content: space-between;
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
max-height: ${({ showAll, maxHeight, displayShowAll }) =>
|
|
84
|
-
!showAll && displayShowAll ? maxHeight + 'px' : 'none'};
|
|
85
|
-
`;
|
|
86
|
-
|
|
87
|
-
export const List = styled.ul`
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-wrap: wrap;
|
|
90
|
-
margin: 0 -2px -1px -15px;
|
|
91
|
-
list-style: none;
|
|
92
|
-
padding: 0;
|
|
93
|
-
@media (min-width: ${breakpoints.medium}px) {
|
|
94
|
-
}
|
|
95
39
|
`;
|
|
96
40
|
|
|
97
41
|
export const ListItem = styled.li<{
|
|
@@ -129,10 +73,3 @@ export const NumberContainer = styled.div<{ sectionColour: string }>`
|
|
|
129
73
|
line-height: 40px;
|
|
130
74
|
}
|
|
131
75
|
`;
|
|
132
|
-
|
|
133
|
-
export const Copy = styled.div`
|
|
134
|
-
color: ${colours.functional.secondary};
|
|
135
|
-
font-family: ${fonts.body};
|
|
136
|
-
font-size: 16px;
|
|
137
|
-
line-height: 24px;
|
|
138
|
-
`;
|
|
@@ -37,7 +37,7 @@ exports[`InfoCard renders 1`] = `
|
|
|
37
37
|
tabindex="0"
|
|
38
38
|
>
|
|
39
39
|
<div
|
|
40
|
-
class="sc-
|
|
40
|
+
class="sc-hSdWYo dVKMAw"
|
|
41
41
|
>
|
|
42
42
|
<img
|
|
43
43
|
class="sc-kGXeez iiZPJL"
|
|
@@ -198,7 +198,7 @@ exports[`InfoCard renders 1`] = `
|
|
|
198
198
|
class="sc-chPdSV cxUg"
|
|
199
199
|
>
|
|
200
200
|
<div
|
|
201
|
-
class="sc-dxgOiQ
|
|
201
|
+
class="sc-dxgOiQ gNDmzV"
|
|
202
202
|
>
|
|
203
203
|
Best places to stay
|
|
204
204
|
</div>
|
|
@@ -307,7 +307,7 @@ exports[`InfoCard renders no image 1`] = `
|
|
|
307
307
|
tabindex="0"
|
|
308
308
|
>
|
|
309
309
|
<div
|
|
310
|
-
class="sc-
|
|
310
|
+
class="sc-hSdWYo dVKMAw"
|
|
311
311
|
>
|
|
312
312
|
<img
|
|
313
313
|
class="sc-kGXeez iiZPJL"
|
|
@@ -468,7 +468,7 @@ exports[`InfoCard renders no image 1`] = `
|
|
|
468
468
|
class="sc-chPdSV cxUg"
|
|
469
469
|
>
|
|
470
470
|
<div
|
|
471
|
-
class="sc-dxgOiQ
|
|
471
|
+
class="sc-dxgOiQ gNDmzV"
|
|
472
472
|
>
|
|
473
473
|
Best places to stay
|
|
474
474
|
</div>
|
|
@@ -590,7 +590,7 @@ exports[`InfoCard should render the standard component 1`] = `
|
|
|
590
590
|
tabindex="0"
|
|
591
591
|
>
|
|
592
592
|
<div
|
|
593
|
-
class="sc-
|
|
593
|
+
class="sc-hSdWYo dVKMAw"
|
|
594
594
|
>
|
|
595
595
|
<img
|
|
596
596
|
class="sc-kGXeez iiZPJL"
|
|
@@ -746,7 +746,7 @@ exports[`InfoCard should render the standard component 1`] = `
|
|
|
746
746
|
class="sc-chPdSV cxUg"
|
|
747
747
|
>
|
|
748
748
|
<div
|
|
749
|
-
class="sc-dxgOiQ
|
|
749
|
+
class="sc-dxgOiQ gNDmzV"
|
|
750
750
|
>
|
|
751
751
|
Best places to stay
|
|
752
752
|
</div>
|
|
@@ -853,7 +853,7 @@ exports[`InfoCard should render the wide component 1`] = `
|
|
|
853
853
|
tabindex="0"
|
|
854
854
|
>
|
|
855
855
|
<div
|
|
856
|
-
class="sc-
|
|
856
|
+
class="sc-hSdWYo dVKMAw"
|
|
857
857
|
>
|
|
858
858
|
<img
|
|
859
859
|
class="sc-kGXeez iiZPJL"
|
|
@@ -1009,7 +1009,7 @@ exports[`InfoCard should render the wide component 1`] = `
|
|
|
1009
1009
|
class="sc-chPdSV cxUg"
|
|
1010
1010
|
>
|
|
1011
1011
|
<div
|
|
1012
|
-
class="sc-dxgOiQ
|
|
1012
|
+
class="sc-dxgOiQ gNDmzV"
|
|
1013
1013
|
>
|
|
1014
1014
|
Best places to stay
|
|
1015
1015
|
</div>
|
|
@@ -9,7 +9,7 @@ exports[`InfoCardBulletPoints should render the component 1`] = `
|
|
|
9
9
|
class="sc-bwzfXH blmhpN"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
class="sc-dnqmqq
|
|
12
|
+
class="sc-dnqmqq cjsHty"
|
|
13
13
|
>
|
|
14
14
|
Venezuelan Politics
|
|
15
15
|
</div>
|
|
@@ -88,7 +88,7 @@ exports[`InfoCardBulletPoints tracking click read more 1`] = `
|
|
|
88
88
|
class="sc-bwzfXH blmhpN"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
91
|
-
class="sc-dnqmqq
|
|
91
|
+
class="sc-dnqmqq cjsHty"
|
|
92
92
|
>
|
|
93
93
|
Venezuelan Politics
|
|
94
94
|
</div>
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
exports[`InArticlePuff should render optional fields correctly 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
|
-
class="sc-
|
|
6
|
+
class="sc-gqjmRU gHUBfw"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="sc-
|
|
9
|
+
class="sc-VigVT gIbSHY"
|
|
10
10
|
>
|
|
11
11
|
<a
|
|
12
12
|
href="https://www.thetimes.co.uk"
|
|
@@ -21,11 +21,11 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
|
|
|
21
21
|
</a>
|
|
22
22
|
</div>
|
|
23
23
|
<div
|
|
24
|
-
class="sc-
|
|
24
|
+
class="sc-jTzLTM cAAdkC"
|
|
25
25
|
>
|
|
26
26
|
<div>
|
|
27
27
|
<div
|
|
28
|
-
class="sc-
|
|
28
|
+
class="sc-fjdhpX bCDTJX"
|
|
29
29
|
>
|
|
30
30
|
interactive
|
|
31
31
|
</div>
|
|
@@ -33,13 +33,13 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
|
|
|
33
33
|
href="https://www.thetimes.co.uk"
|
|
34
34
|
>
|
|
35
35
|
<h4
|
|
36
|
-
class="sc-
|
|
36
|
+
class="sc-jzJRlG bluMUd"
|
|
37
37
|
>
|
|
38
38
|
Where can I get a Covid vaccine in England?
|
|
39
39
|
</h4>
|
|
40
40
|
</a>
|
|
41
41
|
<div
|
|
42
|
-
class="sc-
|
|
42
|
+
class="sc-cSHVUG itcrty"
|
|
43
43
|
>
|
|
44
44
|
Enter your postcode to find your nearest centre
|
|
45
45
|
</div>
|
|
@@ -69,14 +69,14 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
|
|
|
69
69
|
exports[`InArticlePuff should render required fields correctly 1`] = `
|
|
70
70
|
<DocumentFragment>
|
|
71
71
|
<div
|
|
72
|
-
class="sc-
|
|
72
|
+
class="sc-gqjmRU gHUBfw"
|
|
73
73
|
>
|
|
74
74
|
<div
|
|
75
|
-
class="sc-
|
|
75
|
+
class="sc-jTzLTM jFRmZO"
|
|
76
76
|
>
|
|
77
77
|
<div>
|
|
78
78
|
<div
|
|
79
|
-
class="sc-
|
|
79
|
+
class="sc-fjdhpX gKXrO"
|
|
80
80
|
>
|
|
81
81
|
interactive
|
|
82
82
|
</div>
|
|
@@ -84,7 +84,7 @@ exports[`InArticlePuff should render required fields correctly 1`] = `
|
|
|
84
84
|
href="https://www.thetimes.co.uk"
|
|
85
85
|
>
|
|
86
86
|
<h4
|
|
87
|
-
class="sc-
|
|
87
|
+
class="sc-jzJRlG crzPVo"
|
|
88
88
|
>
|
|
89
89
|
Where can I get a Covid vaccine in England?
|
|
90
90
|
</h4>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { storiesOf } from '@storybook/react';
|
|
3
|
+
import { ArticleHarness } from '../../fixtures/article-harness/ArticleHarness';
|
|
4
|
+
import { FetchProvider } from '../../helpers/fetch/FetchProvider';
|
|
5
|
+
import { Timelines } from './Timelines';
|
|
6
|
+
import { TrackingContextProvider } from '../../helpers/tracking/TrackingContextProvider';
|
|
7
|
+
import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
|
|
8
|
+
|
|
9
|
+
storiesOf('Typescript Component/In Article/Timelines', module)
|
|
10
|
+
.addDecorator((storyFn: () => React.ReactNode) => (
|
|
11
|
+
<TrackingContextProvider
|
|
12
|
+
context={{
|
|
13
|
+
component: 'ArticleSkeleton',
|
|
14
|
+
attrs: {
|
|
15
|
+
article_name: 'articleHeadline',
|
|
16
|
+
section_details: 'section'
|
|
17
|
+
}
|
|
18
|
+
}}
|
|
19
|
+
analyticsStream={analyticsStream}
|
|
20
|
+
>
|
|
21
|
+
<ArticleHarness>{storyFn()}</ArticleHarness>
|
|
22
|
+
</TrackingContextProvider>
|
|
23
|
+
))
|
|
24
|
+
.add('Timelines with Bullet Point', () => (
|
|
25
|
+
<FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/45060">
|
|
26
|
+
<Timelines sectionColour="#008347" />
|
|
27
|
+
</FetchProvider>
|
|
28
|
+
))
|
|
29
|
+
.add('Timelines with Circular Image', () => (
|
|
30
|
+
<FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/45061">
|
|
31
|
+
<Timelines sectionColour="#008347" />
|
|
32
|
+
</FetchProvider>
|
|
33
|
+
));
|