@times-components/ts-components 1.145.1-82bc6796129e892c1eb22c6257c5e3809c159767.3 → 1.145.1-9176eda9ce171a0f5596bdc9d385a1fc60b23ea1.12
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/dist/components/carousel-component/CarouselComponent.stories.js +146 -0
- package/dist/components/carousel-component/CarouselItem.d.ts +3 -0
- package/dist/components/carousel-component/CarouselItem.js +11 -0
- package/dist/components/carousel-component/DefaultNavigationArrow.d.ts +8 -0
- package/dist/components/carousel-component/DefaultNavigationArrow.js +6 -0
- package/dist/components/carousel-component/DefaultPageDot.d.ts +8 -0
- package/dist/components/carousel-component/DefaultPageDot.js +4 -0
- package/dist/components/carousel-component/__tests__/CarouselComponent.test.js +163 -0
- package/dist/components/carousel-component/__tests__/CarouselItem.test.js +80 -0
- package/dist/components/carousel-component/__tests__/DefaultNavigationArrow.test.js +62 -0
- package/dist/components/{opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.d.ts → carousel-component/__tests__/DefaultPageDot.test.d.ts} +0 -1
- package/dist/components/carousel-component/__tests__/DefaultPageDot.test.js +68 -0
- package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.d.ts +1 -0
- package/dist/components/carousel-component/hooks/__tests__/useCarousel.test.js +459 -0
- package/dist/components/carousel-component/hooks/useCarousel.d.ts +2 -0
- package/dist/components/carousel-component/hooks/useCarousel.js +175 -0
- package/dist/components/carousel-component/index.d.ts +4 -0
- package/dist/components/carousel-component/index.js +20 -0
- package/dist/components/carousel-component/styles.d.ts +27 -0
- package/dist/components/carousel-component/styles.js +169 -0
- package/dist/components/carousel-component/types.d.ts +53 -0
- package/dist/components/carousel-component/types.js +2 -0
- package/dist/components/opta/football/opta-match-stats/shared/styles.js +1 -8
- package/dist/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.js +2 -2
- package/dist/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.stories.js +1 -1
- package/dist/components/opta/football/opta-match-stats/summary/WidgetContainer.js +4 -13
- package/dist/components/trip-cards/SkeletonCard.d.ts +6 -0
- package/dist/components/trip-cards/SkeletonCard.js +21 -0
- package/dist/components/trip-cards/TripCard.d.ts +3 -0
- package/dist/components/trip-cards/TripCard.js +49 -0
- package/dist/components/trip-cards/TripCards.stories.d.ts +1 -0
- package/dist/components/trip-cards/TripCards.stories.js +189 -0
- package/dist/components/trip-cards/TripCardsLayout.d.ts +3 -0
- package/dist/components/trip-cards/TripCardsLayout.js +37 -0
- package/dist/components/trip-cards/__tests__/SkeletonCard.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/SkeletonCard.test.js +139 -0
- package/dist/components/trip-cards/__tests__/TripCard.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/TripCard.test.js +95 -0
- package/dist/components/trip-cards/__tests__/TripCardsLayout.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/TripCardsLayout.test.js +277 -0
- package/dist/components/trip-cards/__tests__/assets.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/assets.test.js +165 -0
- package/dist/components/trip-cards/__tests__/helpers.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/helpers.test.js +214 -0
- package/dist/components/trip-cards/__tests__/index.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/index.test.js +433 -0
- package/dist/components/trip-cards/__tests__/mockData.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/mockData.test.js +57 -0
- package/dist/components/trip-cards/__tests__/skeletonStyles.test.d.ts +1 -0
- package/dist/components/trip-cards/__tests__/skeletonStyles.test.js +194 -0
- package/dist/components/trip-cards/assets/BoatIcon.d.ts +1 -0
- package/dist/components/trip-cards/assets/BoatIcon.js +4 -0
- package/dist/components/trip-cards/assets/CalendarIcon.d.ts +1 -0
- package/dist/components/trip-cards/assets/CalendarIcon.js +4 -0
- package/dist/components/trip-cards/assets/ChevronRightIcon.d.ts +1 -0
- package/dist/components/trip-cards/assets/ChevronRightIcon.js +4 -0
- package/dist/components/trip-cards/assets/LocationIcon.d.ts +1 -0
- package/dist/components/trip-cards/assets/LocationIcon.js +4 -0
- package/dist/components/trip-cards/assets/MoonIcon.d.ts +1 -0
- package/dist/components/trip-cards/assets/MoonIcon.js +4 -0
- package/dist/components/trip-cards/assets/index.d.ts +6 -0
- package/dist/components/trip-cards/assets/index.js +7 -0
- package/dist/components/trip-cards/helpers.d.ts +4 -0
- package/dist/components/trip-cards/helpers.js +116 -0
- package/dist/components/trip-cards/index.d.ts +4 -0
- package/dist/components/trip-cards/index.js +70 -0
- package/dist/components/trip-cards/mockData.d.ts +3 -0
- package/dist/components/trip-cards/mockData.js +317 -0
- package/dist/components/trip-cards/skeletonStyles.d.ts +9 -0
- package/dist/components/trip-cards/skeletonStyles.js +37 -0
- package/dist/components/trip-cards/styles.d.ts +38 -0
- package/dist/components/trip-cards/styles.js +401 -0
- package/dist/components/trip-cards/types.d.ts +119 -0
- package/dist/components/trip-cards/types.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/rnw.js +1 -1
- package/src/components/carousel-component/CarouselComponent.stories.tsx +220 -0
- package/src/components/carousel-component/CarouselItem.tsx +25 -0
- package/src/components/carousel-component/DefaultNavigationArrow.tsx +37 -0
- package/src/components/carousel-component/DefaultPageDot.tsx +20 -0
- package/src/components/carousel-component/__tests__/CarouselComponent.test.tsx +259 -0
- package/src/components/carousel-component/__tests__/CarouselItem.test.tsx +140 -0
- package/src/components/carousel-component/__tests__/DefaultNavigationArrow.test.tsx +153 -0
- package/src/components/carousel-component/__tests__/DefaultPageDot.test.tsx +105 -0
- package/src/components/carousel-component/hooks/__tests__/useCarousel.test.ts +625 -0
- package/src/components/carousel-component/hooks/useCarousel.ts +231 -0
- package/src/components/carousel-component/index.tsx +92 -0
- package/src/components/carousel-component/styles.ts +185 -0
- package/src/components/carousel-component/types.ts +62 -0
- package/src/components/opta/football/opta-match-stats/commentary/__tests__/__snapshots__/OptaMatchStatsCommentary.test.tsx.snap +1 -1
- package/src/components/opta/football/opta-match-stats/shared/styles.ts +0 -8
- package/src/components/opta/football/opta-match-stats/stats-graphs/__tests__/__snapshots__/OptaMatchStatsGraphs.test.tsx.snap +1 -1
- package/src/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.stories.tsx +1 -1
- package/src/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.tsx +1 -1
- package/src/components/opta/football/opta-match-stats/summary/WidgetContainer.tsx +3 -12
- package/src/components/opta/football/opta-match-stats/summary/__tests__/__snapshots__/OptaMatchStatsSummary.test.tsx.snap +1 -1
- package/src/components/trip-cards/SkeletonCard.tsx +62 -0
- package/src/components/trip-cards/TripCard.tsx +143 -0
- package/src/components/trip-cards/TripCards.stories.tsx +254 -0
- package/src/components/trip-cards/TripCardsLayout.tsx +108 -0
- package/src/components/trip-cards/__tests__/SkeletonCard.test.tsx +169 -0
- package/src/components/trip-cards/__tests__/TripCard.test.tsx +120 -0
- package/src/components/trip-cards/__tests__/TripCardsLayout.test.tsx +532 -0
- package/src/components/trip-cards/__tests__/assets.test.tsx +206 -0
- package/src/components/trip-cards/__tests__/helpers.test.ts +264 -0
- package/src/components/trip-cards/__tests__/index.test.tsx +495 -0
- package/src/components/trip-cards/__tests__/mockData.test.ts +67 -0
- package/src/components/trip-cards/__tests__/skeletonStyles.test.tsx +256 -0
- package/src/components/trip-cards/assets/BoatIcon.tsx +17 -0
- package/src/components/trip-cards/assets/CalendarIcon.tsx +17 -0
- package/src/components/trip-cards/assets/ChevronRightIcon.tsx +20 -0
- package/src/components/trip-cards/assets/LocationIcon.tsx +17 -0
- package/src/components/trip-cards/assets/MoonIcon.tsx +17 -0
- package/src/components/trip-cards/assets/index.ts +7 -0
- package/src/components/trip-cards/helpers.ts +151 -0
- package/src/components/trip-cards/index.tsx +119 -0
- package/src/components/trip-cards/mockData.ts +345 -0
- package/src/components/trip-cards/skeletonStyles.ts +46 -0
- package/src/components/trip-cards/styles.ts +446 -0
- package/src/components/trip-cards/types.ts +128 -0
- package/src/index.ts +2 -3
- package/dist/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.d.ts +0 -10
- package/dist/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.js +0 -69
- package/dist/components/opta/football/opta-match-stats/matchday-live/MobileWidget.d.ts +0 -12
- package/dist/components/opta/football/opta-match-stats/matchday-live/MobileWidget.js +0 -90
- package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.d.ts +0 -12
- package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.js +0 -10
- package/dist/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.js +0 -24
- package/dist/components/opta/football/opta-match-stats/matchday-live/__tests__/MobileWidget.test.js +0 -57
- package/dist/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.js +0 -48
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.d.ts +0 -1
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.js +0 -19
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.d.ts +0 -12
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.js +0 -67
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.d.ts +0 -6
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.js +0 -730
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/NavigationWrapper.test.js +0 -33
- package/dist/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/WidgetContainer.test.js +0 -36
- package/src/components/opta/football/opta-match-stats/matchday-live/DesktopWidget.tsx +0 -108
- package/src/components/opta/football/opta-match-stats/matchday-live/MobileWidget.tsx +0 -158
- package/src/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.tsx +0 -38
- package/src/components/opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.tsx +0 -23
- package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/MobileWidget.test.tsx +0 -69
- package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/OptaMatchStatsMatchdayLive.test.tsx +0 -61
- package/src/components/opta/football/opta-match-stats/matchday-live/__tests__/__snapshots__/OptaMatchStatsMatchdayLive.test.tsx.snap +0 -61
- package/src/components/opta/football/opta-match-stats/matchday-live/styles/MatchdayLiveController.tsx +0 -19
- package/src/components/opta/football/opta-match-stats/matchday-live/styles/NavigationWrapper.tsx +0 -81
- package/src/components/opta/football/opta-match-stats/matchday-live/styles/WidgetContainer.tsx +0 -761
- package/src/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/NavigationWrapper.test.tsx +0 -67
- package/src/components/opta/football/opta-match-stats/matchday-live/styles/__tests__/WidgetContainer.test.tsx +0 -64
- /package/dist/components/{opta/football/opta-match-stats/matchday-live/OptaMatchStatsMatchdayLive.stories.d.ts → carousel-component/CarouselComponent.stories.d.ts} +0 -0
- /package/dist/components/{opta/football/opta-match-stats/matchday-live/__tests__/MobileWidget.test.d.ts → carousel-component/__tests__/CarouselComponent.test.d.ts} +0 -0
- /package/dist/components/{opta/football/opta-match-stats/matchday-live/styles/__tests__/NavigationWrapper.test.d.ts → carousel-component/__tests__/CarouselItem.test.d.ts} +0 -0
- /package/dist/components/{opta/football/opta-match-stats/matchday-live/styles/__tests__/WidgetContainer.test.d.ts → carousel-component/__tests__/DefaultNavigationArrow.test.d.ts} +0 -0
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom';
|
|
4
|
-
import { NavigationWrapper } from '../NavigationWrapper';
|
|
5
|
-
|
|
6
|
-
const HomeColour = { light: '#123456', dark: '#abcdef' };
|
|
7
|
-
const AwayColour = { light: '#654321', dark: '#fedcba' };
|
|
8
|
-
|
|
9
|
-
describe('Matchday Live NavigationWrapper', () => {
|
|
10
|
-
it('renders with active home', () => {
|
|
11
|
-
const { container } = render(
|
|
12
|
-
<NavigationWrapper
|
|
13
|
-
isApp={false}
|
|
14
|
-
activeTeam="home"
|
|
15
|
-
homeTeamColor={HomeColour}
|
|
16
|
-
awayTeamColor={AwayColour}
|
|
17
|
-
>
|
|
18
|
-
<div className="navigation-buttons">
|
|
19
|
-
<button className="active home">Home</button>
|
|
20
|
-
<button className="away">Away</button>
|
|
21
|
-
</div>
|
|
22
|
-
<div className="home-widget-container">Home widget</div>
|
|
23
|
-
<div className="away-widget-container">Away widget</div>
|
|
24
|
-
</NavigationWrapper>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
expect(container.querySelector('.navigation-buttons')).toBeInTheDocument();
|
|
28
|
-
expect(
|
|
29
|
-
container.querySelector('.navigation-buttons .active.home')
|
|
30
|
-
).toBeInTheDocument();
|
|
31
|
-
expect(
|
|
32
|
-
container.querySelector('.home-widget-container')
|
|
33
|
-
).toBeInTheDocument();
|
|
34
|
-
expect(
|
|
35
|
-
container.querySelector('.away-widget-container')
|
|
36
|
-
).toBeInTheDocument();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('renders with active away and isApp true', () => {
|
|
40
|
-
const { container } = render(
|
|
41
|
-
<NavigationWrapper
|
|
42
|
-
isApp={true}
|
|
43
|
-
activeTeam="away"
|
|
44
|
-
homeTeamColor={HomeColour}
|
|
45
|
-
awayTeamColor={AwayColour}
|
|
46
|
-
>
|
|
47
|
-
<div className="navigation-buttons">
|
|
48
|
-
<button className="home">Home</button>
|
|
49
|
-
<button className="active away">Away</button>
|
|
50
|
-
</div>
|
|
51
|
-
<div className="home-widget-container">Home widget</div>
|
|
52
|
-
<div className="away-widget-container">Away widget</div>
|
|
53
|
-
</NavigationWrapper>
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
expect(container.querySelector('.navigation-buttons')).toBeInTheDocument();
|
|
57
|
-
expect(
|
|
58
|
-
container.querySelector('.navigation-buttons .active.away')
|
|
59
|
-
).toBeInTheDocument();
|
|
60
|
-
expect(
|
|
61
|
-
container.querySelector('.home-widget-container')
|
|
62
|
-
).toBeInTheDocument();
|
|
63
|
-
expect(
|
|
64
|
-
container.querySelector('.away-widget-container')
|
|
65
|
-
).toBeInTheDocument();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom';
|
|
4
|
-
import { WidgetContainer } from '../WidgetContainer';
|
|
5
|
-
|
|
6
|
-
describe('Matchday Live WidgetContainer', () => {
|
|
7
|
-
const baseProps = {
|
|
8
|
-
isApp: true,
|
|
9
|
-
homeTeamColor: { light: '#000000', dark: '#a19c9cff' },
|
|
10
|
-
awayTeamColor: { light: '#007A3F', dark: '#007A3F' }
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
it('generates styles', () => {
|
|
14
|
-
const { container } = render(
|
|
15
|
-
<WidgetContainer {...baseProps}>
|
|
16
|
-
<div className="Opta">
|
|
17
|
-
<div className="Opta_W">content</div>
|
|
18
|
-
</div>
|
|
19
|
-
</WidgetContainer>
|
|
20
|
-
);
|
|
21
|
-
expect(container.querySelector('.Opta > .Opta_W')).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('generates dark-mode styles under .Opta-Overlay .Opta-Flex', () => {
|
|
25
|
-
const { container } = render(
|
|
26
|
-
<WidgetContainer {...baseProps}>
|
|
27
|
-
<div className="Opta-Overlay">
|
|
28
|
-
<div className="Opta-Flex">flex</div>
|
|
29
|
-
</div>
|
|
30
|
-
</WidgetContainer>
|
|
31
|
-
);
|
|
32
|
-
expect(container.querySelector('.Opta-Overlay .Opta-Flex')).toBeTruthy();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('applies home-widget-container styles', () => {
|
|
36
|
-
const { container } = render(
|
|
37
|
-
<WidgetContainer {...baseProps} className="home-widget-container">
|
|
38
|
-
<div className="Opta-MatchHeader">
|
|
39
|
-
<div className="Opta-Away">Away Team</div>
|
|
40
|
-
</div>
|
|
41
|
-
</WidgetContainer>
|
|
42
|
-
);
|
|
43
|
-
expect(
|
|
44
|
-
container.querySelector(
|
|
45
|
-
'.home-widget-container .Opta-MatchHeader .Opta-Away'
|
|
46
|
-
)
|
|
47
|
-
).toBeTruthy();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it('applies away-widget-container styles', () => {
|
|
51
|
-
const { container } = render(
|
|
52
|
-
<WidgetContainer {...baseProps} className="away-widget-container">
|
|
53
|
-
<div className="Opta-MatchHeader">
|
|
54
|
-
<div className="Opta-Home">Home Team</div>
|
|
55
|
-
</div>
|
|
56
|
-
</WidgetContainer>
|
|
57
|
-
);
|
|
58
|
-
expect(
|
|
59
|
-
container.querySelector(
|
|
60
|
-
'.away-widget-container .Opta-MatchHeader .Opta-Home'
|
|
61
|
-
)
|
|
62
|
-
).toBeTruthy();
|
|
63
|
-
});
|
|
64
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|