@times-components/ts-components 1.146.2-784617dc4a33959b8795da1d7f425c9929322fae.24 → 1.146.2-e5795a0ef59e2adb61ba52aeb7332fda4405cb7a.4

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 (73) hide show
  1. package/dist/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.d.ts +10 -0
  2. package/dist/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.js +69 -0
  3. package/dist/components/opta/football/opta-match-stats/matchday-live/MobileWidget.d.ts +12 -0
  4. package/dist/components/opta/football/opta-match-stats/matchday-live/MobileWidget.js +90 -0
  5. package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.d.ts +12 -0
  6. package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.js +10 -0
  7. package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.js +24 -0
  8. package/dist/components/opta/football/opta-match-stats/matchday-live/__tests__/MobileWidget.test.js +57 -0
  9. package/dist/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.d.ts +2 -0
  10. package/dist/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.js +48 -0
  11. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.d.ts +1 -0
  12. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.js +19 -0
  13. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.d.ts +12 -0
  14. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.js +67 -0
  15. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.d.ts +6 -0
  16. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.js +736 -0
  17. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/NavigationWrapper.test.d.ts +1 -0
  18. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/NavigationWrapper.test.js +33 -0
  19. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/WidgetContainer.test.d.ts +1 -0
  20. package/dist/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/WidgetContainer.test.js +36 -0
  21. package/dist/components/opta/football/opta-match-stats/shared/styles.js +8 -1
  22. package/dist/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.js +2 -2
  23. package/dist/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.stories.js +1 -1
  24. package/dist/components/opta/football/opta-match-stats/summary/WidgetContainer.js +19 -5
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +2 -2
  27. package/package.json +3 -3
  28. package/rnw.js +1 -1
  29. package/src/components/opta/football/opta-match-stats/commentary/__tests__/__snapshots__/OptaMatchStatsCommentary.test.tsx.snap +1 -1
  30. package/src/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.tsx +108 -0
  31. package/src/components/opta/football/opta-match-stats/matchday-live/MobileWidget.tsx +158 -0
  32. package/src/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.tsx +38 -0
  33. package/src/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.tsx +23 -0
  34. package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/MobileWidget.test.tsx +69 -0
  35. package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.tsx +61 -0
  36. package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/__snapshots__/OptaMatchStatsMatchdayLive.test.tsx.snap +61 -0
  37. package/src/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.tsx +19 -0
  38. package/src/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.tsx +81 -0
  39. package/src/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.tsx +767 -0
  40. package/src/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/NavigationWrapper.test.tsx +67 -0
  41. package/src/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/WidgetContainer.test.tsx +64 -0
  42. package/src/components/opta/football/opta-match-stats/shared/styles.ts +8 -0
  43. package/src/components/opta/football/opta-match-stats/stats-graphs/__tests__/__snapshots__/OptaMatchStatsGraphs.test.tsx.snap +1 -1
  44. package/src/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.stories.tsx +1 -1
  45. package/src/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.tsx +1 -1
  46. package/src/components/opta/football/opta-match-stats/summary/WidgetContainer.tsx +18 -4
  47. package/src/components/opta/football/opta-match-stats/summary/__tests__/__snapshots__/OptaMatchStatsSummary.test.tsx.snap +1 -1
  48. package/src/index.ts +3 -1
  49. package/dist/components/travel-mini-cta/__tests__/index.test.js +0 -262
  50. package/dist/components/travel-mini-cta/index.d.ts +0 -10
  51. package/dist/components/travel-mini-cta/index.js +0 -93
  52. package/dist/components/travel-mini-cta/styles.d.ts +0 -42
  53. package/dist/components/travel-mini-cta/styles.js +0 -268
  54. package/dist/components/travel-mini-cta/travel-mini-cta.stories.js +0 -8
  55. package/dist/components/travel-mini-cta/types.d.ts +0 -10
  56. package/dist/components/travel-mini-cta/types.js +0 -2
  57. package/dist/utils/applyDarkMode.d.ts +0 -1
  58. package/dist/utils/applyDarkMode.js +0 -12
  59. package/dist/utils/getMediaQuery.d.ts +0 -11
  60. package/dist/utils/getMediaQuery.js +0 -19
  61. package/dist/utils/index.d.ts +0 -2
  62. package/dist/utils/index.js +0 -3
  63. package/src/components/travel-mini-cta/__tests__/__snapshots__/index.test.tsx.snap +0 -211
  64. package/src/components/travel-mini-cta/__tests__/index.test.tsx +0 -330
  65. package/src/components/travel-mini-cta/index.tsx +0 -190
  66. package/src/components/travel-mini-cta/styles.ts +0 -331
  67. package/src/components/travel-mini-cta/travel-mini-cta.stories.tsx +0 -23
  68. package/src/components/travel-mini-cta/types.ts +0 -10
  69. package/src/utils/applyDarkMode.ts +0 -12
  70. package/src/utils/getMediaQuery.ts +0 -25
  71. package/src/utils/index.ts +0 -2
  72. /package/dist/components/{travel-mini-cta/travel-mini-cta.stories.d.ts → opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.d.ts} +0 -0
  73. /package/dist/components/{travel-mini-cta/__tests__/index.test.d.ts → opta/football/opta-match-stats/matchday-live/__tests__/MobileWidget.test.d.ts} +0 -0
@@ -1,331 +0,0 @@
1
- import styled from 'styled-components';
2
- import { getMediaQuery, applyDarkMode } from '../../utils';
3
-
4
- const BaseLabel = styled.div<{ isApp?: boolean }>`
5
- font-family: 'Roboto';
6
- font-weight: 500;
7
- line-height: 1.125;
8
- font-size: 14px;
9
- letter-spacing: 0em;
10
- color: #236fa3;
11
- text-transform: uppercase;
12
-
13
- ${({ isApp }) =>
14
- applyDarkMode(
15
- `
16
- color: #f5f5f5 !important;
17
- `,
18
- isApp
19
- )};
20
- `;
21
-
22
- export const Container = styled.div<{ isApp?: boolean }>`
23
- background-color: #ffffff;
24
- padding: 24px 0;
25
- border-top: 1px dashed;
26
- border-bottom: 1px dashed;
27
- border-color: #cccccc;
28
-
29
- ${({ isApp }) =>
30
- applyDarkMode(
31
- `
32
- background-color: #f5f5f5 !important;
33
- border-color: #e4e4e4 !important;
34
- `,
35
- isApp
36
- )};
37
- `;
38
-
39
- export const ContentWrapper = styled.div`
40
- display: flex;
41
- justify-content: space-between;
42
- align-items: flex-start;
43
- gap: 20px;
44
-
45
- ${getMediaQuery('xs', 'md')} {
46
- flex-direction: column;
47
- gap: 24px;
48
- }
49
- `;
50
-
51
- export const LeftSection = styled.div`
52
- display: flex;
53
- align-items: flex-start;
54
- width: 50%;
55
- gap: 24px;
56
-
57
- ${getMediaQuery('xs', 'md')} {
58
- width: 100%;
59
- flex-direction: column;
60
- gap: 16px;
61
- }
62
- `;
63
-
64
- export const LogoContainer = styled.div`
65
- display: flex;
66
- align-items: center;
67
- justify-content: center;
68
- flex-shrink: 0;
69
-
70
- ${getMediaQuery('xs', 'md')} {
71
- flex-direction: row-reverse;
72
- justify-content: flex-start;
73
- justify-content: space-between;
74
- width: 100%;
75
- }
76
- `;
77
-
78
- export const LogoBox = styled.div<{ isApp?: boolean }>`
79
- width: 40px;
80
- height: 40px;
81
- position: relative;
82
- display: flex;
83
- align-items: center;
84
- justify-content: center;
85
- background-color: #236fa3;
86
-
87
- ${({ isApp }) =>
88
- applyDarkMode(
89
- `
90
- background-color: #c2c2c2 !important;
91
- `,
92
- isApp
93
- )};
94
- `;
95
-
96
- export const LogoText = styled.span<{ isApp?: boolean }>`
97
- font-family: 'Times Modern', serif;
98
- font-weight: 700;
99
- font-size: 40px;
100
- line-height: 1.125;
101
- letter-spacing: 0.02em;
102
- color: #ffffff;
103
- padding-top: 4px;
104
-
105
- ${({ isApp }) =>
106
- applyDarkMode(
107
- `
108
- color: #1d1d1b !important;
109
- `,
110
- isApp
111
- )};
112
- `;
113
-
114
- export const TextContainer = styled.div`
115
- display: flex;
116
- flex-direction: column;
117
- gap: 16px;
118
- max-width: 375px;
119
-
120
- ${getMediaQuery('xs', 'md')} {
121
- gap: 24px;
122
- }
123
- `;
124
-
125
- export const Label = styled(BaseLabel)`
126
- ${getMediaQuery('xs', 'md')} {
127
- display: none;
128
- }
129
- `;
130
-
131
- export const MobileLabel = styled(BaseLabel)`
132
- display: none;
133
-
134
- ${getMediaQuery('xs', 'md')} {
135
- display: block;
136
- }
137
- `;
138
-
139
- export const Description = styled.div<{ isApp?: boolean }>`
140
- font-family: 'Times Modern';
141
- font-weight: 700;
142
- line-height: 1.125;
143
- font-size: 24px;
144
- letter-spacing: 0em;
145
- color: #333333;
146
-
147
- ${({ isApp }) =>
148
- applyDarkMode(
149
- `
150
- color: #cccccc !important;
151
- `,
152
- isApp
153
- )};
154
-
155
- ${getMediaQuery('xs', 'md')} {
156
- margin-right: 64px;
157
- }
158
- `;
159
-
160
- export const RightSection = styled.div`
161
- display: flex;
162
- flex-direction: column;
163
- gap: 24px;
164
- width: 50%;
165
-
166
- ${getMediaQuery('xs', 'md')} {
167
- gap: 32px;
168
- width: 100%;
169
- }
170
- `;
171
-
172
- export const ContactInfo = styled.div`
173
- display: flex;
174
- flex-direction: column;
175
- gap: 16px;
176
- `;
177
-
178
- export const PhoneLabel = styled.a<{ isApp?: boolean }>`
179
- text-decoration: none;
180
- display: inline;
181
- font-family: 'Times Digital W04 Regular';
182
- font-weight: 400;
183
- line-height: 1.5;
184
- font-size: 18px;
185
- letter-spacing: 0em;
186
- color: #333333;
187
- cursor: pointer;
188
-
189
- ${({ isApp }) =>
190
- applyDarkMode(
191
- `
192
- color: #c2c2c2 !important;
193
- `,
194
- isApp
195
- )};
196
-
197
- &:hover {
198
- text-decoration: underline;
199
- }
200
- `;
201
-
202
- export const PhoneNumber = styled.span<{ isApp?: boolean }>`
203
- font-family: 'Times Modern';
204
- font-weight: 700;
205
- line-height: 1.125;
206
- font-size: 22px;
207
- letter-spacing: 0em;
208
- color: #333333;
209
-
210
- ${({ isApp }) =>
211
- applyDarkMode(
212
- `
213
- color: #c2c2c2 !important;
214
- `,
215
- isApp
216
- )};
217
- `;
218
-
219
- export const WorkingHoursContainer = styled.div`
220
- display: flex;
221
- flex-wrap: wrap;
222
- gap: 8px;
223
-
224
- ${getMediaQuery('xs', 'md')} {
225
- flex-direction: column;
226
- }
227
- `;
228
-
229
- export const WorkingHoursText = styled.div<{ isApp?: boolean }>`
230
- font-family: 'Times Digital W04 Regular';
231
- font-weight: 400;
232
- line-height: 1.5;
233
- font-size: 18px;
234
- letter-spacing: 0em;
235
- color: #333333;
236
-
237
- ${({ isApp }) =>
238
- applyDarkMode(
239
- `
240
- color: #cccccc !important;
241
- `,
242
- isApp
243
- )};
244
- `;
245
-
246
- export const ButtonsContainer = styled.div`
247
- display: flex;
248
- gap: 16px;
249
-
250
- ${getMediaQuery('xs', 'md')} {
251
- flex-direction: column;
252
- }
253
- `;
254
-
255
- const BaseButton = styled.a`
256
- text-decoration: none;
257
- border-radius: 0px;
258
- width: 100%;
259
- min-height: 44px;
260
- font-family: 'Roboto';
261
- font-weight: 500;
262
- line-height: 1.5;
263
- font-size: 16px;
264
- letter-spacing: 0em;
265
- display: flex;
266
- align-items: center;
267
- justify-content: center;
268
- padding: 12px;
269
- cursor: pointer;
270
- transition: all 0.2s ease;
271
- `;
272
-
273
- export const PrimaryButton = styled(BaseButton)<{
274
- disabled?: boolean;
275
- isApp?: boolean;
276
- }>`
277
- border: none;
278
- background-color: #005c8a;
279
- color: #ffffff;
280
- cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
281
- opacity: ${({ disabled }) => (disabled ? 0.6 : 1)};
282
-
283
- div[data-lp-event] {
284
- cursor: pointer;
285
- font-family: 'Roboto';
286
- font-weight: 500;
287
- line-height: 1.5;
288
- font-size: 16px;
289
- letter-spacing: 0em;
290
- }
291
-
292
- &:hover {
293
- background-color: #00527a;
294
- }
295
-
296
- ${({ isApp }) =>
297
- applyDarkMode(
298
- `
299
- background-color: #74bade !important;
300
- color: #1d1d1b !important;
301
-
302
- &:hover {
303
- background-color: #93cbe8 !important;
304
- }
305
- `,
306
- isApp
307
- )};
308
- `;
309
-
310
- export const SecondaryButton = styled(BaseButton)<{ isApp?: boolean }>`
311
- border: 1px solid #005c8a;
312
- background-color: transparent;
313
- color: #005c8a;
314
-
315
- &:hover {
316
- background-color: #f5f5f5;
317
- }
318
-
319
- ${({ isApp }) =>
320
- applyDarkMode(
321
- `
322
- border-color: #74bade !important;
323
- color: #74bade !important;
324
-
325
- &:hover {
326
- background-color: #01000d !important;
327
- }
328
- `,
329
- isApp
330
- )};
331
- `;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { TravelMiniCTA } from './index';
4
- import { ArticleHarness } from '../../fixtures/article-harness/ArticleHarness';
5
-
6
- storiesOf('Typescript Component/In Article/Travel Mini CTA', module).add(
7
- 'Travel Mini CTA',
8
- () => (
9
- <ArticleHarness>
10
- <div style={{ padding: '16px' }}>
11
- <TravelMiniCTA
12
- description="Begin your journey to Croatia with a holiday designed around you, guided by a dedicated travel expert."
13
- phoneLabel="Call us on"
14
- phoneNumber="08083049757"
15
- workingHours={['Mon - Fri: 9am - 6pm', 'Sat: 10am - 5pm']}
16
- primaryButtonText="Chat with us"
17
- secondaryButtonText="Enquire now"
18
- secondaryButtonUrl="/enquire"
19
- />
20
- </div>
21
- </ArticleHarness>
22
- )
23
- );
@@ -1,10 +0,0 @@
1
- export interface TravelMiniCTAProps {
2
- description?: string;
3
- phoneLabel?: string;
4
- phoneNumber?: string;
5
- workingHours?: string[];
6
- primaryButtonText?: string;
7
- secondaryButtonText?: string;
8
- secondaryButtonUrl?: string;
9
- isApp?: boolean;
10
- }
@@ -1,12 +0,0 @@
1
- // Helper for dark mode styling
2
- export const applyDarkMode = (styles: string, isApp?: boolean) => {
3
- if (!isApp) {
4
- return '';
5
- }
6
-
7
- return `
8
- @media (prefers-color-scheme: dark) {
9
- ${styles}
10
- }
11
- `;
12
- };
@@ -1,25 +0,0 @@
1
- export const breakpoints = {
2
- xs: 0,
3
- sm: 520,
4
- md: 768,
5
- lg: 1024,
6
- xl: 1320,
7
- all: 0
8
- };
9
-
10
- export type BreakPointKeys = keyof typeof breakpoints;
11
- export type MQ = Partial<Record<BreakPointKeys, string>> | string;
12
-
13
- export const getMediaQuery = (
14
- minWidth?: keyof typeof breakpoints,
15
- maxWidth?: keyof typeof breakpoints
16
- ) => () => {
17
- const queries = ['@media screen'];
18
- if (minWidth && breakpoints[minWidth]) {
19
- queries.push(` and (min-width: ${breakpoints[minWidth]}px)`);
20
- }
21
- if (maxWidth) {
22
- queries.push(` and (max-width: ${breakpoints[maxWidth] - 1}px)`);
23
- }
24
- return queries.join('');
25
- };
@@ -1,2 +0,0 @@
1
- export { applyDarkMode } from './applyDarkMode';
2
- export { getMediaQuery } from './getMediaQuery';