@times-components/ts-components 1.145.1-d1253ed8e87e7cdf861fbf772a5f9026182434db.4 → 1.145.1-e871182934034874ea6a75e1e684090e5504df44.2
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/opta/cricket/scorecard/OptaCricketScorecard.js +2 -10
- package/dist/components/opta/cricket/scorecard/__tests__/OptaCricketScorecard.test.js +17 -94
- package/dist/components/opta/football/summary/OptaFootballSummary.js +2 -10
- package/dist/components/opta/football/summary/__tests__/OptaFootballSummary.test.js +18 -95
- package/dist/components/opta/rugby/summary/OptaRugbySummary.js +2 -10
- package/dist/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.js +17 -94
- package/dist/components/travel-mini-cta/index.d.ts +3 -0
- package/dist/components/travel-mini-cta/index.js +86 -0
- package/dist/components/travel-mini-cta/styles.d.ts +42 -0
- package/dist/components/travel-mini-cta/styles.js +273 -0
- package/dist/components/travel-mini-cta/travel-mini-cta.stories.d.ts +110 -0
- package/dist/components/travel-mini-cta/travel-mini-cta.stories.js +121 -0
- package/dist/components/travel-mini-cta/types.d.ts +10 -0
- package/dist/components/travel-mini-cta/types.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/utils/applyDarkMode.d.ts +1 -0
- package/dist/utils/applyDarkMode.js +12 -0
- package/dist/utils/getMediaQuery.d.ts +11 -0
- package/dist/utils/getMediaQuery.js +19 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +3 -0
- package/package.json +3 -3
- package/rnw.js +1 -1
- package/src/components/opta/cricket/scorecard/OptaCricketScorecard.tsx +0 -13
- package/src/components/opta/cricket/scorecard/__tests__/OptaCricketScorecard.test.tsx +16 -126
- package/src/components/opta/cricket/scorecard/__tests__/__snapshots__/OptaCricketScorecard.test.tsx.snap +6 -5
- package/src/components/opta/football/summary/OptaFootballSummary.tsx +0 -13
- package/src/components/opta/football/summary/__tests__/OptaFootballSummary.test.tsx +18 -127
- package/src/components/opta/football/summary/__tests__/__snapshots__/OptaFootballSummary.test.tsx.snap +6 -5
- package/src/components/opta/rugby/summary/OptaRugbySummary.tsx +0 -13
- package/src/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.tsx +17 -127
- package/src/components/opta/rugby/summary/__tests__/__snapshots__/OptaRugbySummary.test.tsx.snap +6 -5
- package/src/components/travel-mini-cta/index.tsx +164 -0
- package/src/components/travel-mini-cta/styles.ts +336 -0
- package/src/components/travel-mini-cta/travel-mini-cta.stories.tsx +157 -0
- package/src/components/travel-mini-cta/types.ts +10 -0
- package/src/index.ts +1 -0
- package/src/utils/applyDarkMode.ts +12 -0
- package/src/utils/getMediaQuery.ts +25 -0
- package/src/utils/index.ts +2 -0
- package/dist/components/opta/utils/__tests__/emitEvent.test.d.ts +0 -1
- package/dist/components/opta/utils/__tests__/emitEvent.test.js +0 -264
- package/dist/components/opta/utils/emitEvent.d.ts +0 -1
- package/dist/components/opta/utils/emitEvent.js +0 -15
- package/src/components/opta/utils/__tests__/emitEvent.test.tsx +0 -415
- package/src/components/opta/utils/emitEvent.ts +0 -20
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render, act, fireEvent
|
|
2
|
+
import { render, act, fireEvent } from '@testing-library/react';
|
|
3
|
+
|
|
3
4
|
import 'regenerator-runtime';
|
|
4
5
|
import '@testing-library/jest-dom';
|
|
5
6
|
|
|
@@ -10,27 +11,22 @@ jest.mock('@times-components/image', () => ({
|
|
|
10
11
|
const mockInitSettings = jest.fn();
|
|
11
12
|
const mockInitStyleSheet = jest.fn();
|
|
12
13
|
const mockInitComponent = jest.fn();
|
|
13
|
-
const
|
|
14
|
-
const mockEmitEvent = jest.fn();
|
|
14
|
+
const mockHasMatchEvents = jest.fn();
|
|
15
15
|
|
|
16
|
-
const mockInitElement =
|
|
16
|
+
const mockInitElement = () => {
|
|
17
17
|
const element = document.createElement('div');
|
|
18
18
|
element.appendChild(document.createTextNode('Widget'));
|
|
19
19
|
return element;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
|
|
22
22
|
jest.mock('../../../utils/config', () => ({
|
|
23
23
|
initSettings: mockInitSettings,
|
|
24
24
|
initStyleSheet: mockInitStyleSheet,
|
|
25
|
-
initScript:
|
|
25
|
+
initScript: () => new Promise(resolve => resolve({})),
|
|
26
26
|
initElement: mockInitElement,
|
|
27
27
|
initComponent: mockInitComponent
|
|
28
28
|
}));
|
|
29
29
|
|
|
30
|
-
jest.mock('../../../utils/emitEvent', () => ({
|
|
31
|
-
emitEvent: mockEmitEvent
|
|
32
|
-
}));
|
|
33
|
-
|
|
34
30
|
import { OptaRugbySummary } from '../OptaRugbySummary';
|
|
35
31
|
|
|
36
32
|
const requiredProps = {
|
|
@@ -38,30 +34,22 @@ const requiredProps = {
|
|
|
38
34
|
competition: '209',
|
|
39
35
|
match: '921100'
|
|
40
36
|
};
|
|
41
|
-
|
|
42
37
|
describe('OptaRugbySummary', () => {
|
|
43
38
|
beforeEach(() => {
|
|
44
39
|
jest.clearAllMocks();
|
|
45
|
-
mockInitScript.mockResolvedValue({});
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
afterEach(() => {
|
|
49
|
-
jest.clearAllMocks();
|
|
50
|
-
document.body.innerHTML = '';
|
|
51
40
|
});
|
|
52
41
|
|
|
53
42
|
it('should render correctly', async () => {
|
|
54
|
-
const { asFragment
|
|
55
|
-
<OptaRugbySummary {...requiredProps} />
|
|
56
|
-
);
|
|
43
|
+
const { asFragment } = render(<OptaRugbySummary {...requiredProps} />);
|
|
57
44
|
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
act(() => {
|
|
46
|
+
mockInitComponent();
|
|
47
|
+
mockHasMatchEvents();
|
|
60
48
|
});
|
|
61
49
|
|
|
62
|
-
expect(
|
|
50
|
+
expect(mockInitSettings).toHaveBeenCalledTimes(1);
|
|
51
|
+
expect(mockInitStyleSheet).toHaveBeenCalledTimes(1);
|
|
63
52
|
expect(mockInitComponent).toHaveBeenCalledTimes(1);
|
|
64
|
-
expect(getByRole('button')).toBeInTheDocument();
|
|
65
53
|
|
|
66
54
|
expect(asFragment()).toMatchSnapshot();
|
|
67
55
|
});
|
|
@@ -72,112 +60,14 @@ describe('OptaRugbySummary', () => {
|
|
|
72
60
|
expect(button).not.toBeDisabled();
|
|
73
61
|
});
|
|
74
62
|
|
|
75
|
-
it('should toggle details when button is clicked',
|
|
63
|
+
it('should toggle details when button is clicked', () => {
|
|
76
64
|
const { getByRole } = render(<OptaRugbySummary {...requiredProps} />);
|
|
77
65
|
const button = getByRole('button');
|
|
78
66
|
|
|
79
67
|
expect(button).toHaveTextContent('Show Details');
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
await waitFor(() => {
|
|
86
|
-
expect(button).toHaveTextContent('Hide Details');
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
act(() => {
|
|
90
|
-
fireEvent.click(button);
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
await waitFor(() => {
|
|
94
|
-
expect(button).toHaveTextContent('Show Details');
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
describe('emitEvent', () => {
|
|
99
|
-
it('should call emitEvent with updateHeight when details are toggled', async () => {
|
|
100
|
-
const { getByRole } = render(<OptaRugbySummary {...requiredProps} />);
|
|
101
|
-
const button = getByRole('button');
|
|
102
|
-
|
|
103
|
-
// Clear initial calls
|
|
104
|
-
jest.clearAllMocks();
|
|
105
|
-
|
|
106
|
-
act(() => {
|
|
107
|
-
fireEvent.click(button);
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
await waitFor(() => {
|
|
111
|
-
expect(mockEmitEvent).toHaveBeenCalledWith(
|
|
112
|
-
'updateHeight',
|
|
113
|
-
expect.any(Number)
|
|
114
|
-
);
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
it('should emit updateHeight event on each toggle', async () => {
|
|
119
|
-
const { getByRole } = render(<OptaRugbySummary {...requiredProps} />);
|
|
120
|
-
const button = getByRole('button');
|
|
121
|
-
|
|
122
|
-
// Clear initial calls
|
|
123
|
-
jest.clearAllMocks();
|
|
124
|
-
|
|
125
|
-
// First toggle
|
|
126
|
-
act(() => {
|
|
127
|
-
fireEvent.click(button);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
await waitFor(() => {
|
|
131
|
-
expect(mockEmitEvent).toHaveBeenCalledTimes(1);
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
// Second toggle
|
|
135
|
-
act(() => {
|
|
136
|
-
fireEvent.click(button);
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
await waitFor(() => {
|
|
140
|
-
expect(mockEmitEvent).toHaveBeenCalledTimes(2);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// Third toggle
|
|
144
|
-
act(() => {
|
|
145
|
-
fireEvent.click(button);
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
await waitFor(() => {
|
|
149
|
-
expect(mockEmitEvent).toHaveBeenCalledTimes(3);
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
it('should emit updateHeight with container offsetHeight', async () => {
|
|
154
|
-
const { getByRole, container } = render(
|
|
155
|
-
<OptaRugbySummary {...requiredProps} />
|
|
156
|
-
);
|
|
157
|
-
const button = getByRole('button');
|
|
158
|
-
|
|
159
|
-
// Clear initial calls
|
|
160
|
-
jest.clearAllMocks();
|
|
161
|
-
|
|
162
|
-
// Mock offsetHeight
|
|
163
|
-
const containerElement = container.querySelector('[class*="Container"]');
|
|
164
|
-
if (containerElement) {
|
|
165
|
-
Object.defineProperty(containerElement, 'offsetHeight', {
|
|
166
|
-
value: 250,
|
|
167
|
-
configurable: true
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
act(() => {
|
|
172
|
-
fireEvent.click(button);
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
await waitFor(() => {
|
|
176
|
-
expect(mockEmitEvent).toHaveBeenCalledWith(
|
|
177
|
-
'updateHeight',
|
|
178
|
-
expect.any(Number)
|
|
179
|
-
);
|
|
180
|
-
});
|
|
181
|
-
});
|
|
68
|
+
fireEvent.click(button);
|
|
69
|
+
expect(button).toHaveTextContent('Hide Details');
|
|
70
|
+
fireEvent.click(button);
|
|
71
|
+
expect(button).toHaveTextContent('Show Details');
|
|
182
72
|
});
|
|
183
73
|
});
|
package/src/components/opta/rugby/summary/__tests__/__snapshots__/OptaRugbySummary.test.tsx.snap
CHANGED
|
@@ -7,16 +7,17 @@ exports[`OptaRugbySummary should render correctly 1`] = `
|
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
9
|
class="sc-htpNat sc-bxivhb hNtyxM"
|
|
10
|
-
|
|
11
|
-
<div>
|
|
12
|
-
Widget
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
10
|
+
/>
|
|
15
11
|
<button
|
|
16
12
|
class="sc-ifAKCX fvBTJK"
|
|
17
13
|
>
|
|
18
14
|
Show Details
|
|
19
15
|
</button>
|
|
16
|
+
<div
|
|
17
|
+
class="sc-bwzfXH eSqyJ"
|
|
18
|
+
>
|
|
19
|
+
Placeholder
|
|
20
|
+
</div>
|
|
20
21
|
</div>
|
|
21
22
|
</DocumentFragment>
|
|
22
23
|
`;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import React, { FC, useState, useRef, useEffect, MouseEvent } from 'react';
|
|
2
|
+
import { TravelMiniCTAProps } from './types';
|
|
3
|
+
import {
|
|
4
|
+
Container,
|
|
5
|
+
ContentWrapper,
|
|
6
|
+
LeftSection,
|
|
7
|
+
LogoContainer,
|
|
8
|
+
LogoBox,
|
|
9
|
+
LogoText,
|
|
10
|
+
TextContainer,
|
|
11
|
+
Label,
|
|
12
|
+
MobileLabel,
|
|
13
|
+
Description,
|
|
14
|
+
RightSection,
|
|
15
|
+
ContactInfo,
|
|
16
|
+
PhoneLabel,
|
|
17
|
+
PhoneNumber,
|
|
18
|
+
WorkingHoursContainer,
|
|
19
|
+
WorkingHoursText,
|
|
20
|
+
ButtonsContainer,
|
|
21
|
+
PrimaryButton,
|
|
22
|
+
SecondaryButton
|
|
23
|
+
} from './styles';
|
|
24
|
+
|
|
25
|
+
export const TravelMiniCTA: FC<TravelMiniCTAProps> = ({
|
|
26
|
+
description,
|
|
27
|
+
phoneLabel,
|
|
28
|
+
phoneNumber,
|
|
29
|
+
workingHours,
|
|
30
|
+
primaryButtonText,
|
|
31
|
+
secondaryButtonText,
|
|
32
|
+
secondaryButtonUrl,
|
|
33
|
+
isApp
|
|
34
|
+
}) => {
|
|
35
|
+
const [chatReady, setChatReady] = useState(false);
|
|
36
|
+
const [chatFailed, setChatFailed] = useState(false);
|
|
37
|
+
const chatDivRef = useRef<HTMLDivElement>(null);
|
|
38
|
+
|
|
39
|
+
const formattedWorkingHours = workingHours
|
|
40
|
+
? workingHours.split(',').map(hour => hour.trim())
|
|
41
|
+
: [];
|
|
42
|
+
|
|
43
|
+
const handlePrimaryButtonClick = (
|
|
44
|
+
e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>
|
|
45
|
+
) => {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
|
|
48
|
+
const chatDiv = chatDivRef.current;
|
|
49
|
+
if (chatDiv) {
|
|
50
|
+
const lpEventElement = chatDiv.querySelector(
|
|
51
|
+
'[data-lp-event]'
|
|
52
|
+
) as HTMLElement;
|
|
53
|
+
if (lpEventElement) {
|
|
54
|
+
lpEventElement.click();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
useEffect(
|
|
60
|
+
() => {
|
|
61
|
+
const chatDiv = chatDivRef.current;
|
|
62
|
+
if (!chatDiv || typeof window === 'undefined') {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let timeoutId: NodeJS.Timeout | null = null;
|
|
67
|
+
let previouslyFound = false;
|
|
68
|
+
|
|
69
|
+
const observer = new MutationObserver(() => {
|
|
70
|
+
const lpEventElement = chatDiv.querySelector(
|
|
71
|
+
'[data-lp-event]'
|
|
72
|
+
) as HTMLElement;
|
|
73
|
+
|
|
74
|
+
if (lpEventElement && !previouslyFound) {
|
|
75
|
+
previouslyFound = true;
|
|
76
|
+
setChatReady(true);
|
|
77
|
+
setChatFailed(false);
|
|
78
|
+
|
|
79
|
+
if (primaryButtonText) {
|
|
80
|
+
lpEventElement.textContent = primaryButtonText;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Clear timeout since chat loaded successfully
|
|
84
|
+
if (timeoutId) {
|
|
85
|
+
clearTimeout(timeoutId);
|
|
86
|
+
timeoutId = null;
|
|
87
|
+
}
|
|
88
|
+
} else if (!lpEventElement && previouslyFound) {
|
|
89
|
+
previouslyFound = false;
|
|
90
|
+
setChatReady(false);
|
|
91
|
+
setChatFailed(false);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
observer.observe(chatDiv, { childList: true, subtree: true });
|
|
96
|
+
|
|
97
|
+
timeoutId = setTimeout(() => {
|
|
98
|
+
if (!previouslyFound) {
|
|
99
|
+
observer.disconnect();
|
|
100
|
+
setChatFailed(true);
|
|
101
|
+
}
|
|
102
|
+
}, 15000);
|
|
103
|
+
|
|
104
|
+
return () => {
|
|
105
|
+
observer.disconnect();
|
|
106
|
+
if (timeoutId) {
|
|
107
|
+
clearTimeout(timeoutId);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
[primaryButtonText]
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<Container data-testid="travel-mini-cta" isApp={isApp}>
|
|
116
|
+
<ContentWrapper>
|
|
117
|
+
<LeftSection>
|
|
118
|
+
<LogoContainer>
|
|
119
|
+
<LogoBox isApp={isApp}>
|
|
120
|
+
<LogoText isApp={isApp}>T</LogoText>
|
|
121
|
+
</LogoBox>
|
|
122
|
+
<MobileLabel isApp={isApp}>VISIT TIMES HOLIDAYS</MobileLabel>
|
|
123
|
+
</LogoContainer>
|
|
124
|
+
<TextContainer>
|
|
125
|
+
<Label isApp={isApp}>VISIT TIMES HOLIDAYS</Label>
|
|
126
|
+
<Description isApp={isApp}>{description}</Description>
|
|
127
|
+
</TextContainer>
|
|
128
|
+
</LeftSection>
|
|
129
|
+
|
|
130
|
+
<RightSection>
|
|
131
|
+
<ContactInfo>
|
|
132
|
+
<PhoneLabel href={`tel:${phoneNumber}`} isApp={isApp}>
|
|
133
|
+
{phoneLabel}{' '}
|
|
134
|
+
<PhoneNumber isApp={isApp}>{phoneNumber}</PhoneNumber>
|
|
135
|
+
</PhoneLabel>
|
|
136
|
+
<WorkingHoursContainer>
|
|
137
|
+
{formattedWorkingHours.map((hours, index) => (
|
|
138
|
+
<WorkingHoursText key={index} isApp={isApp}>
|
|
139
|
+
{hours}
|
|
140
|
+
</WorkingHoursText>
|
|
141
|
+
))}
|
|
142
|
+
</WorkingHoursContainer>
|
|
143
|
+
</ContactInfo>
|
|
144
|
+
<ButtonsContainer>
|
|
145
|
+
<PrimaryButton
|
|
146
|
+
as="button"
|
|
147
|
+
type="button"
|
|
148
|
+
onClick={handlePrimaryButtonClick}
|
|
149
|
+
isApp={isApp}
|
|
150
|
+
disabled={!chatReady}
|
|
151
|
+
>
|
|
152
|
+
{chatFailed && 'Chat unavailable'}
|
|
153
|
+
{!chatReady && !chatFailed && 'Loading chat...'}
|
|
154
|
+
<div id="LP_DIV_TRAVEL_1239001" ref={chatDivRef} />
|
|
155
|
+
</PrimaryButton>
|
|
156
|
+
<SecondaryButton href={secondaryButtonUrl} isApp={isApp}>
|
|
157
|
+
{secondaryButtonText}
|
|
158
|
+
</SecondaryButton>
|
|
159
|
+
</ButtonsContainer>
|
|
160
|
+
</RightSection>
|
|
161
|
+
</ContentWrapper>
|
|
162
|
+
</Container>
|
|
163
|
+
);
|
|
164
|
+
};
|
|
@@ -0,0 +1,336 @@
|
|
|
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: 0.875rem;
|
|
9
|
+
letter-spacing: 0em;
|
|
10
|
+
color: #01000d;
|
|
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;
|
|
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
|
+
flex-direction: row;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
align-items: flex-start;
|
|
44
|
+
gap: 20px;
|
|
45
|
+
|
|
46
|
+
${getMediaQuery('xs', 'md')} {
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: 24px;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export const LeftSection = styled.div`
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
align-items: flex-start;
|
|
56
|
+
width: 50%;
|
|
57
|
+
gap: 24px;
|
|
58
|
+
|
|
59
|
+
${getMediaQuery('xs', 'md')} {
|
|
60
|
+
width: 100%;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
gap: 16px;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
export const LogoContainer = styled.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
flex-shrink: 0;
|
|
71
|
+
|
|
72
|
+
${getMediaQuery('xs', 'md')} {
|
|
73
|
+
flex-direction: row-reverse;
|
|
74
|
+
justify-content: flex-start;
|
|
75
|
+
justify-content: space-between;
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
export const LogoBox = styled.div<{ isApp?: boolean }>`
|
|
81
|
+
width: 40px;
|
|
82
|
+
height: 40px;
|
|
83
|
+
position: relative;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
background-color: #aaaaaa;
|
|
88
|
+
|
|
89
|
+
${({ isApp }) =>
|
|
90
|
+
applyDarkMode(
|
|
91
|
+
`
|
|
92
|
+
background-color: #c2c2c2 !important;
|
|
93
|
+
`,
|
|
94
|
+
isApp
|
|
95
|
+
)};
|
|
96
|
+
`;
|
|
97
|
+
|
|
98
|
+
export const LogoText = styled.span<{ isApp?: boolean }>`
|
|
99
|
+
font-family: 'Times Modern', serif;
|
|
100
|
+
font-weight: 700;
|
|
101
|
+
font-size: 40px;
|
|
102
|
+
line-height: 1.125;
|
|
103
|
+
letter-spacing: 0.02em;
|
|
104
|
+
color: #ffffff;
|
|
105
|
+
padding-top: 4px;
|
|
106
|
+
|
|
107
|
+
${({ isApp }) =>
|
|
108
|
+
applyDarkMode(
|
|
109
|
+
`
|
|
110
|
+
color: #1d1d1b !important;
|
|
111
|
+
`,
|
|
112
|
+
isApp
|
|
113
|
+
)};
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
export const TextContainer = styled.div`
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 16px;
|
|
120
|
+
max-width: 375px;
|
|
121
|
+
|
|
122
|
+
${getMediaQuery('xs', 'md')} {
|
|
123
|
+
gap: 24px;
|
|
124
|
+
}
|
|
125
|
+
`;
|
|
126
|
+
|
|
127
|
+
export const Label = styled(BaseLabel)`
|
|
128
|
+
${getMediaQuery('xs', 'md')} {
|
|
129
|
+
display: none;
|
|
130
|
+
}
|
|
131
|
+
`;
|
|
132
|
+
|
|
133
|
+
export const MobileLabel = styled(BaseLabel)`
|
|
134
|
+
display: none;
|
|
135
|
+
|
|
136
|
+
${getMediaQuery('xs', 'md')} {
|
|
137
|
+
display: block;
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
export const Description = styled.div<{ isApp?: boolean }>`
|
|
142
|
+
font-family: 'Times Modern';
|
|
143
|
+
font-weight: 700;
|
|
144
|
+
line-height: 1.125;
|
|
145
|
+
font-size: 1.5rem;
|
|
146
|
+
letter-spacing: 0em;
|
|
147
|
+
color: #333333;
|
|
148
|
+
|
|
149
|
+
${({ isApp }) =>
|
|
150
|
+
applyDarkMode(
|
|
151
|
+
`
|
|
152
|
+
color: #cccccc !important;
|
|
153
|
+
`,
|
|
154
|
+
isApp
|
|
155
|
+
)};
|
|
156
|
+
|
|
157
|
+
${getMediaQuery('xs', 'md')} {
|
|
158
|
+
margin-right: 64px;
|
|
159
|
+
}
|
|
160
|
+
`;
|
|
161
|
+
|
|
162
|
+
export const RightSection = styled.div`
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
gap: 24px;
|
|
166
|
+
width: 50%;
|
|
167
|
+
|
|
168
|
+
${getMediaQuery('xs', 'md')} {
|
|
169
|
+
gap: 32px;
|
|
170
|
+
width: 100%;
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
173
|
+
|
|
174
|
+
export const ContactInfo = styled.div`
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
gap: 16px;
|
|
178
|
+
`;
|
|
179
|
+
|
|
180
|
+
export const PhoneLabel = styled.a<{ isApp?: boolean }>`
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
display: inline;
|
|
183
|
+
font-family: 'Times Digital W04 Regular';
|
|
184
|
+
font-weight: 400;
|
|
185
|
+
line-height: 1.5;
|
|
186
|
+
font-size: 1.125rem;
|
|
187
|
+
letter-spacing: 0em;
|
|
188
|
+
color: #333333;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
|
|
191
|
+
${({ isApp }) =>
|
|
192
|
+
applyDarkMode(
|
|
193
|
+
`
|
|
194
|
+
color: #c2c2c2 !important;
|
|
195
|
+
`,
|
|
196
|
+
isApp
|
|
197
|
+
)};
|
|
198
|
+
|
|
199
|
+
&:hover {
|
|
200
|
+
text-decoration: underline;
|
|
201
|
+
}
|
|
202
|
+
`;
|
|
203
|
+
|
|
204
|
+
export const PhoneNumber = styled.span<{ isApp?: boolean }>`
|
|
205
|
+
font-family: 'Times Modern';
|
|
206
|
+
font-weight: 700;
|
|
207
|
+
line-height: 1.125;
|
|
208
|
+
font-size: 1.5rem;
|
|
209
|
+
letter-spacing: 0em;
|
|
210
|
+
color: #333333;
|
|
211
|
+
font-size: 2.2rem;
|
|
212
|
+
|
|
213
|
+
${({ isApp }) =>
|
|
214
|
+
applyDarkMode(
|
|
215
|
+
`
|
|
216
|
+
color: #c2c2c2 !important;
|
|
217
|
+
`,
|
|
218
|
+
isApp
|
|
219
|
+
)};
|
|
220
|
+
`;
|
|
221
|
+
|
|
222
|
+
export const WorkingHoursContainer = styled.div`
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: row;
|
|
225
|
+
gap: 8px;
|
|
226
|
+
flex-wrap: wrap;
|
|
227
|
+
|
|
228
|
+
${getMediaQuery('xs', 'md')} {
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
|
|
233
|
+
export const WorkingHoursText = styled.div<{ isApp?: boolean }>`
|
|
234
|
+
font-family: 'Times Digital W04 Regular';
|
|
235
|
+
font-weight: 400;
|
|
236
|
+
line-height: 1.5;
|
|
237
|
+
font-size: 1.125rem;
|
|
238
|
+
letter-spacing: 0em;
|
|
239
|
+
color: #333333;
|
|
240
|
+
|
|
241
|
+
${({ isApp }) =>
|
|
242
|
+
applyDarkMode(
|
|
243
|
+
`
|
|
244
|
+
color: #cccccc !important;
|
|
245
|
+
`,
|
|
246
|
+
isApp
|
|
247
|
+
)};
|
|
248
|
+
`;
|
|
249
|
+
|
|
250
|
+
export const ButtonsContainer = styled.div`
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: row;
|
|
253
|
+
gap: 16px;
|
|
254
|
+
|
|
255
|
+
${getMediaQuery('xs', 'md')} {
|
|
256
|
+
flex-direction: column;
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
259
|
+
|
|
260
|
+
const BaseButton = styled.a`
|
|
261
|
+
text-decoration: none;
|
|
262
|
+
border-radius: 0px;
|
|
263
|
+
width: 100%;
|
|
264
|
+
min-height: 44px;
|
|
265
|
+
font-family: 'Roboto';
|
|
266
|
+
font-weight: 500;
|
|
267
|
+
line-height: 1.5;
|
|
268
|
+
font-size: 1rem;
|
|
269
|
+
letter-spacing: 0em;
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
padding: 12px;
|
|
274
|
+
cursor: pointer;
|
|
275
|
+
transition: all 0.2s ease;
|
|
276
|
+
`;
|
|
277
|
+
|
|
278
|
+
export const PrimaryButton = styled(BaseButton)<{
|
|
279
|
+
disabled?: boolean;
|
|
280
|
+
isApp?: boolean;
|
|
281
|
+
}>`
|
|
282
|
+
border: none;
|
|
283
|
+
background-color: #005c8a;
|
|
284
|
+
color: #ffffff;
|
|
285
|
+
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
|
|
286
|
+
opacity: ${({ disabled }) => (disabled ? 0.6 : 1)};
|
|
287
|
+
|
|
288
|
+
div[data-lp-event] {
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
font-family: 'Roboto';
|
|
291
|
+
font-weight: 500;
|
|
292
|
+
line-height: 1.5;
|
|
293
|
+
font-size: 1rem;
|
|
294
|
+
letter-spacing: 0em;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
&:hover {
|
|
298
|
+
background-color: #00527a;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
${({ isApp }) =>
|
|
302
|
+
applyDarkMode(
|
|
303
|
+
`
|
|
304
|
+
background-color: #74bade !important;
|
|
305
|
+
color: #1d1d1b !important;
|
|
306
|
+
|
|
307
|
+
&:hover {
|
|
308
|
+
background-color: #93cbe8 !important;
|
|
309
|
+
}
|
|
310
|
+
`,
|
|
311
|
+
isApp
|
|
312
|
+
)};
|
|
313
|
+
`;
|
|
314
|
+
|
|
315
|
+
export const SecondaryButton = styled(BaseButton)<{ isApp?: boolean }>`
|
|
316
|
+
border: 1px solid #005c8a;
|
|
317
|
+
background-color: transparent;
|
|
318
|
+
color: #005c8a;
|
|
319
|
+
|
|
320
|
+
&:hover {
|
|
321
|
+
background-color: #f5f5f5;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
${({ isApp }) =>
|
|
325
|
+
applyDarkMode(
|
|
326
|
+
`
|
|
327
|
+
border-color: #74bade !important;
|
|
328
|
+
color: #74bade !important;
|
|
329
|
+
|
|
330
|
+
&:hover {
|
|
331
|
+
background-color: #01000d !important;
|
|
332
|
+
}
|
|
333
|
+
`,
|
|
334
|
+
isApp
|
|
335
|
+
)};
|
|
336
|
+
`;
|