fansunited-frontend-components 0.0.1-RC4 → 0.0.1-RC5
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/{components.js → classic-quiz-play.es.js} +1 -1
- package/classic-quiz-play.umd.js +174 -0
- package/index.d.ts +3 -0
- package/package.json +2 -2
- package/src/components/ClassicQuizNotFound.d.ts +4 -0
- package/src/components/ClassicQuizNotFound.d.ts.map +1 -0
- package/src/components/ClassicQuizNotFound.js +55 -0
- package/src/components/ClassicQuizPlay.d.ts +5 -0
- package/src/components/ClassicQuizPlay.d.ts.map +1 -0
- package/src/components/ClassicQuizPlay.js +321 -0
- package/src/components/Leads/CollectLead.d.ts +22 -0
- package/src/components/Leads/CollectLead.d.ts.map +1 -0
- package/src/components/Leads/CollectLead.js +20 -0
- package/src/components/Leads/LeadAgreementCheckbox.d.ts +10 -0
- package/src/components/Leads/LeadAgreementCheckbox.d.ts.map +1 -0
- package/src/components/Leads/LeadAgreementCheckbox.js +45 -0
- package/src/components/Leads/LeadForm.d.ts +20 -0
- package/src/components/Leads/LeadForm.d.ts.map +1 -0
- package/src/components/Leads/LeadForm.js +289 -0
- package/src/components/Shared/AlertMessage.d.ts +10 -0
- package/src/components/Shared/AlertMessage.d.ts.map +1 -0
- package/src/components/Shared/AlertMessage.js +37 -0
- package/src/components/Shared/Answers/Answers.d.ts +14 -0
- package/src/components/Shared/Answers/Answers.d.ts.map +1 -0
- package/src/components/Shared/Answers/Answers.js +31 -0
- package/src/components/Shared/Answers/Option.d.ts +13 -0
- package/src/components/Shared/Answers/Option.d.ts.map +1 -0
- package/src/components/Shared/Answers/Option.js +118 -0
- package/src/components/Shared/Button.d.ts +12 -0
- package/src/components/Shared/Button.d.ts.map +1 -0
- package/src/components/Shared/Button.js +43 -0
- package/src/components/Shared/MainCard.d.ts +10 -0
- package/src/components/Shared/MainCard.d.ts.map +1 -0
- package/src/components/Shared/MainCard.js +24 -0
- package/src/components/Shared/Pagination.d.ts +10 -0
- package/src/components/Shared/Pagination.d.ts.map +1 -0
- package/src/components/Shared/Pagination.js +118 -0
- package/src/components/Shared/PresentedBy.d.ts +8 -0
- package/src/components/Shared/PresentedBy.d.ts.map +1 -0
- package/src/components/Shared/PresentedBy.js +51 -0
- package/src/components/Shared/ScoreStateWrapper.d.ts +13 -0
- package/src/components/Shared/ScoreStateWrapper.d.ts.map +1 -0
- package/src/components/Shared/ScoreStateWrapper.js +254 -0
- package/src/components/Shared/Stepper.d.ts +11 -0
- package/src/components/Shared/Stepper.d.ts.map +1 -0
- package/src/components/Shared/Stepper.js +75 -0
- package/src/components/Shared/Stopwatch.d.ts +12 -0
- package/src/components/Shared/Stopwatch.d.ts.map +1 -0
- package/src/components/Shared/Stopwatch.js +103 -0
- package/src/components/Variants/Overlay/AuthError/OverlayAuthError.d.ts +8 -0
- package/src/components/Variants/Overlay/AuthError/OverlayAuthError.d.ts.map +1 -0
- package/src/components/Variants/Overlay/AuthError/OverlayAuthError.js +68 -0
- package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.d.ts +118 -0
- package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.d.ts.map +1 -0
- package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.js +103 -0
- package/src/components/Variants/Overlay/OverlayVariant.d.ts +5 -0
- package/src/components/Variants/Overlay/OverlayVariant.d.ts.map +1 -0
- package/src/components/Variants/Overlay/OverlayVariant.js +100 -0
- package/src/components/Variants/Overlay/OverlayVariant.styles.d.ts +286 -0
- package/src/components/Variants/Overlay/OverlayVariant.styles.d.ts.map +1 -0
- package/src/components/Variants/Overlay/OverlayVariant.styles.js +266 -0
- package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.d.ts +16 -0
- package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.d.ts.map +1 -0
- package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js +90 -0
- package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.d.ts +364 -0
- package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.d.ts.map +1 -0
- package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.js +374 -0
- package/src/components/Variants/Split/AuthError/SplitAuthError.d.ts +8 -0
- package/src/components/Variants/Split/AuthError/SplitAuthError.d.ts.map +1 -0
- package/src/components/Variants/Split/AuthError/SplitAuthError.js +44 -0
- package/src/components/Variants/Split/AuthError/SplitAuthError.styles.d.ts +126 -0
- package/src/components/Variants/Split/AuthError/SplitAuthError.styles.d.ts.map +1 -0
- package/src/components/Variants/Split/AuthError/SplitAuthError.styles.js +95 -0
- package/src/components/Variants/Split/ScoreState/SplitScoreState.d.ts +16 -0
- package/src/components/Variants/Split/ScoreState/SplitScoreState.d.ts.map +1 -0
- package/src/components/Variants/Split/ScoreState/SplitScoreState.js +84 -0
- package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.d.ts +403 -0
- package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.d.ts.map +1 -0
- package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.js +400 -0
- package/src/components/Variants/Split/SplitVariant.d.ts +5 -0
- package/src/components/Variants/Split/SplitVariant.d.ts.map +1 -0
- package/src/components/Variants/Split/SplitVariant.js +79 -0
- package/src/components/Variants/Split/SplitVariant.styles.d.ts +252 -0
- package/src/components/Variants/Split/SplitVariant.styles.d.ts.map +1 -0
- package/src/components/Variants/Split/SplitVariant.styles.js +216 -0
- package/src/components/Variants/Standard/AuthError/StandardAuthError.d.ts +9 -0
- package/src/components/Variants/Standard/AuthError/StandardAuthError.d.ts.map +1 -0
- package/src/components/Variants/Standard/AuthError/StandardAuthError.js +43 -0
- package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.d.ts +231 -0
- package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.d.ts.map +1 -0
- package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.js +201 -0
- package/src/components/Variants/Standard/ScoreState/StandardScoreState.d.ts +17 -0
- package/src/components/Variants/Standard/ScoreState/StandardScoreState.d.ts.map +1 -0
- package/src/components/Variants/Standard/ScoreState/StandardScoreState.js +78 -0
- package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.d.ts +350 -0
- package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.d.ts.map +1 -0
- package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.js +349 -0
- package/src/components/Variants/Standard/StandardVariant.d.ts +10 -0
- package/src/components/Variants/Standard/StandardVariant.d.ts.map +1 -0
- package/src/components/Variants/Standard/StandardVariant.js +82 -0
- package/src/components/Variants/Standard/StandardVariant.styles.d.ts +414 -0
- package/src/components/Variants/Standard/StandardVariant.styles.d.ts.map +1 -0
- package/src/components/Variants/Standard/StandardVariant.styles.js +373 -0
- package/src/constants/constants.d.ts +7 -0
- package/src/constants/constants.d.ts.map +1 -0
- package/src/constants/constants.js +446 -0
- package/src/hooks/useClassicQuizById.d.ts +3 -0
- package/src/hooks/useClassicQuizById.d.ts.map +1 -0
- package/src/hooks/useClassicQuizById.js +20 -0
- package/src/hooks/useEmbedCodeContainer.d.ts +2 -0
- package/src/hooks/useEmbedCodeContainer.d.ts.map +1 -0
- package/src/hooks/useEmbedCodeContainer.js +38 -0
- package/src/hooks/useMyParticipation.d.ts +3 -0
- package/src/hooks/useMyParticipation.d.ts.map +1 -0
- package/src/hooks/useMyParticipation.js +22 -0
- package/src/hooks/useScoreStateHelpers.d.ts +18 -0
- package/src/hooks/useScoreStateHelpers.d.ts.map +1 -0
- package/src/hooks/useScoreStateHelpers.js +156 -0
- package/src/index.d.ts +2 -3
- package/src/index.d.ts.map +1 -1
- package/src/index.js +2 -0
- package/src/main.d.ts +5 -0
- package/src/main.d.ts.map +1 -0
- package/src/main.js +53 -0
- package/src/services/service.d.ts +1 -0
- package/src/services/service.d.ts.map +1 -0
- package/src/services/service.js +1 -0
- package/src/styles/form.styles.d.ts +19 -0
- package/src/styles/form.styles.d.ts.map +1 -0
- package/src/styles/form.styles.js +18 -0
- package/src/types/types.d.ts +28 -0
- package/src/types/types.d.ts.map +1 -0
- package/src/types/types.js +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/components.d.ts +0 -1
- package/src/indexUmd.d.ts +0 -2
- package/src/indexUmd.d.ts.map +0 -1
- package/vite.config.d.ts +0 -3
- package/vite.config.d.ts.map +0 -1
- package/vite.config.umd.d.ts +0 -3
- package/vite.config.umd.d.ts.map +0 -1
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { CustomSpacingScale } from "@fansunited/common";
|
|
2
|
+
import { BrandingColorsModel } from "fansunited-sdk-esm";
|
|
3
|
+
import { CSSProperties } from "react";
|
|
4
|
+
interface StyleProps {
|
|
5
|
+
spacingScale: CustomSpacingScale;
|
|
6
|
+
brandingColors: BrandingColorsModel | null;
|
|
7
|
+
secondaryColor: string;
|
|
8
|
+
fontFamilyPrimary: string;
|
|
9
|
+
fontFamilySecondary: string;
|
|
10
|
+
mdBorderRadius: string;
|
|
11
|
+
smBorderRadius: string;
|
|
12
|
+
borderSize: string;
|
|
13
|
+
contentBgColor: string;
|
|
14
|
+
buttonRadius: string;
|
|
15
|
+
primaryColor: string;
|
|
16
|
+
onPrimaryColor: string;
|
|
17
|
+
backgroundImage: string;
|
|
18
|
+
darkTextColor: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const createStyles: (props: StyleProps) => {
|
|
21
|
+
pulseAnimation: {
|
|
22
|
+
"@keyframes pulse": {
|
|
23
|
+
"0%": {
|
|
24
|
+
transform: string;
|
|
25
|
+
};
|
|
26
|
+
"50%": {
|
|
27
|
+
transform: string;
|
|
28
|
+
};
|
|
29
|
+
"100%": {
|
|
30
|
+
transform: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
mainContainer: {
|
|
35
|
+
display: string;
|
|
36
|
+
flexDirection: string;
|
|
37
|
+
justifyContent: string;
|
|
38
|
+
gap: string;
|
|
39
|
+
p: string;
|
|
40
|
+
boxShadow: string;
|
|
41
|
+
border: string;
|
|
42
|
+
overflow: string;
|
|
43
|
+
backgroundImage: string;
|
|
44
|
+
backgroundSize: string;
|
|
45
|
+
position: string;
|
|
46
|
+
borderRadius: string;
|
|
47
|
+
minHeight: string;
|
|
48
|
+
"&::before": {
|
|
49
|
+
content: string;
|
|
50
|
+
position: string;
|
|
51
|
+
background: string;
|
|
52
|
+
top: number;
|
|
53
|
+
left: number;
|
|
54
|
+
right: number;
|
|
55
|
+
bottom: number;
|
|
56
|
+
borderRadius: string;
|
|
57
|
+
zIndex: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
headlineSection: {
|
|
61
|
+
display: string;
|
|
62
|
+
justifyContent: string;
|
|
63
|
+
flex: string;
|
|
64
|
+
alignSelf: string;
|
|
65
|
+
};
|
|
66
|
+
headlineContent: {
|
|
67
|
+
display: string;
|
|
68
|
+
flexDirection: string;
|
|
69
|
+
alignItems: string;
|
|
70
|
+
flex: string;
|
|
71
|
+
gap: string;
|
|
72
|
+
};
|
|
73
|
+
headlineContentInner: {
|
|
74
|
+
zIndex: number;
|
|
75
|
+
};
|
|
76
|
+
quizHeadlineText: {
|
|
77
|
+
fontWeight: number;
|
|
78
|
+
lineHeight: string;
|
|
79
|
+
letterSpacing: string;
|
|
80
|
+
textAlign: {
|
|
81
|
+
xs: string;
|
|
82
|
+
md: string;
|
|
83
|
+
};
|
|
84
|
+
color: string;
|
|
85
|
+
opacity: string;
|
|
86
|
+
textTransform: string;
|
|
87
|
+
fontFamily: string;
|
|
88
|
+
fontSize: string;
|
|
89
|
+
};
|
|
90
|
+
contentContainer: {
|
|
91
|
+
display: string;
|
|
92
|
+
flexDirection: string;
|
|
93
|
+
gap: string;
|
|
94
|
+
};
|
|
95
|
+
quizTitleText: {
|
|
96
|
+
fontWeight: number;
|
|
97
|
+
lineHeight: string;
|
|
98
|
+
letterSpacing: string;
|
|
99
|
+
textAlign: {
|
|
100
|
+
xs: string;
|
|
101
|
+
md: string;
|
|
102
|
+
};
|
|
103
|
+
fontSize: string;
|
|
104
|
+
color: string;
|
|
105
|
+
fontFamily: string;
|
|
106
|
+
};
|
|
107
|
+
quizDescriptionText: {
|
|
108
|
+
fontWeight: number;
|
|
109
|
+
lineHeight: string;
|
|
110
|
+
letterSpacing: string;
|
|
111
|
+
fontSize: string;
|
|
112
|
+
textAlign: {
|
|
113
|
+
xs: string;
|
|
114
|
+
md: string;
|
|
115
|
+
};
|
|
116
|
+
color: string;
|
|
117
|
+
opacity: string;
|
|
118
|
+
fontFamily: string;
|
|
119
|
+
};
|
|
120
|
+
filterScreenBottomContainer: {
|
|
121
|
+
display: string;
|
|
122
|
+
alignItems: string;
|
|
123
|
+
justifyContent: string;
|
|
124
|
+
flexDirection: {
|
|
125
|
+
xs: string;
|
|
126
|
+
md: string;
|
|
127
|
+
};
|
|
128
|
+
gap: string;
|
|
129
|
+
};
|
|
130
|
+
startButton: {
|
|
131
|
+
borderRadius: string;
|
|
132
|
+
bgcolor: string;
|
|
133
|
+
color: string;
|
|
134
|
+
py: string;
|
|
135
|
+
pr: string;
|
|
136
|
+
pl: string;
|
|
137
|
+
"&:hover": {
|
|
138
|
+
bgcolor: string;
|
|
139
|
+
};
|
|
140
|
+
"&:active": {
|
|
141
|
+
color: string;
|
|
142
|
+
};
|
|
143
|
+
animation: string;
|
|
144
|
+
};
|
|
145
|
+
startButtonText: {
|
|
146
|
+
fontFamily: string;
|
|
147
|
+
fontWeight: number;
|
|
148
|
+
fontSize: string;
|
|
149
|
+
lineHeight: string;
|
|
150
|
+
letterSpacing: string;
|
|
151
|
+
textTransform: string;
|
|
152
|
+
color: string;
|
|
153
|
+
gap: string;
|
|
154
|
+
display: string;
|
|
155
|
+
alignItems: string;
|
|
156
|
+
};
|
|
157
|
+
mainContentSection: {
|
|
158
|
+
display: string;
|
|
159
|
+
flexDirection: string;
|
|
160
|
+
gap: string;
|
|
161
|
+
};
|
|
162
|
+
stopwatchContainer: {
|
|
163
|
+
display: string;
|
|
164
|
+
justifyContent: string;
|
|
165
|
+
};
|
|
166
|
+
contentContainerWithBackdrop: {
|
|
167
|
+
borderRadius: string;
|
|
168
|
+
p: string;
|
|
169
|
+
display: string;
|
|
170
|
+
flexDirection: string;
|
|
171
|
+
gap: string;
|
|
172
|
+
backdropFilter: string;
|
|
173
|
+
position: string;
|
|
174
|
+
"&::before": {
|
|
175
|
+
content: string;
|
|
176
|
+
position: string;
|
|
177
|
+
top: number;
|
|
178
|
+
left: number;
|
|
179
|
+
right: number;
|
|
180
|
+
bottom: number;
|
|
181
|
+
backgroundColor: string;
|
|
182
|
+
opacity: number;
|
|
183
|
+
borderRadius: string;
|
|
184
|
+
zIndex: number;
|
|
185
|
+
};
|
|
186
|
+
"& > *": {
|
|
187
|
+
position: string;
|
|
188
|
+
zIndex: number;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
aspectRatioContainer: {
|
|
192
|
+
borderRadius: string;
|
|
193
|
+
};
|
|
194
|
+
questionImageContainer: {
|
|
195
|
+
overflow: string;
|
|
196
|
+
borderRadius: string;
|
|
197
|
+
};
|
|
198
|
+
questionImageBox: {
|
|
199
|
+
borderRadius: string;
|
|
200
|
+
overflow: string;
|
|
201
|
+
height: string;
|
|
202
|
+
};
|
|
203
|
+
questionImage: {
|
|
204
|
+
width: string;
|
|
205
|
+
height: string;
|
|
206
|
+
objectFit: CSSProperties["objectFit"];
|
|
207
|
+
};
|
|
208
|
+
questionSection: {
|
|
209
|
+
display: {
|
|
210
|
+
md: string;
|
|
211
|
+
xs: string;
|
|
212
|
+
};
|
|
213
|
+
gap: string;
|
|
214
|
+
alignItems: string;
|
|
215
|
+
justifyContent: string;
|
|
216
|
+
};
|
|
217
|
+
questionStepsText: {
|
|
218
|
+
fontFamily: string;
|
|
219
|
+
lineHeight: string;
|
|
220
|
+
letterSpacing: string;
|
|
221
|
+
fontWeight: number;
|
|
222
|
+
fontSize: string;
|
|
223
|
+
color: string;
|
|
224
|
+
opacity: string;
|
|
225
|
+
textAlign: string;
|
|
226
|
+
};
|
|
227
|
+
questionText: {
|
|
228
|
+
fontFamily: string;
|
|
229
|
+
lineHeight: string;
|
|
230
|
+
letterSpacing: string;
|
|
231
|
+
fontWeight: number;
|
|
232
|
+
fontSize: string;
|
|
233
|
+
textAlign: string;
|
|
234
|
+
color: string;
|
|
235
|
+
};
|
|
236
|
+
bottomFooterContainer: {
|
|
237
|
+
display: string;
|
|
238
|
+
alignItems: string;
|
|
239
|
+
justifyContent: string;
|
|
240
|
+
flexDirection: {
|
|
241
|
+
xs: string;
|
|
242
|
+
md: string;
|
|
243
|
+
};
|
|
244
|
+
gap: string;
|
|
245
|
+
};
|
|
246
|
+
nextButton: {
|
|
247
|
+
borderRadius: string;
|
|
248
|
+
py: string;
|
|
249
|
+
pr: string;
|
|
250
|
+
pl: string;
|
|
251
|
+
bgcolor: string;
|
|
252
|
+
color: string;
|
|
253
|
+
transition: string;
|
|
254
|
+
transform: string;
|
|
255
|
+
ml: {
|
|
256
|
+
md: string;
|
|
257
|
+
};
|
|
258
|
+
"&:hover": {
|
|
259
|
+
bgcolor: string;
|
|
260
|
+
transform: string;
|
|
261
|
+
};
|
|
262
|
+
"&:active": {
|
|
263
|
+
color: string;
|
|
264
|
+
transform: string;
|
|
265
|
+
};
|
|
266
|
+
"&:disabled": {
|
|
267
|
+
bgcolor: string;
|
|
268
|
+
color: string;
|
|
269
|
+
opacity: string;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
nextButtonText: {
|
|
273
|
+
fontFamily: string;
|
|
274
|
+
fontWeight: number;
|
|
275
|
+
fontSize: string;
|
|
276
|
+
lineHeight: string;
|
|
277
|
+
letterSpacing: string;
|
|
278
|
+
textTransform: string;
|
|
279
|
+
color: string;
|
|
280
|
+
gap: string;
|
|
281
|
+
display: string;
|
|
282
|
+
alignItems: string;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
export {};
|
|
286
|
+
//# sourceMappingURL=OverlayVariant.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayVariant.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Variants/Overlay/OverlayVariant.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,UAAU,UAAU;IAClB,YAAY,EAAE,kBAAkB,CAAC;IACjC,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,UAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgNpB,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFlD,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
export const createStyles = (props) => ({
|
|
2
|
+
// Pulse animation for buttons
|
|
3
|
+
pulseAnimation: {
|
|
4
|
+
"@keyframes pulse": {
|
|
5
|
+
"0%": { transform: "scale(1)" },
|
|
6
|
+
"50%": { transform: "scale(1.05)" },
|
|
7
|
+
"100%": { transform: "scale(1)" },
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
// Main container with background overlay
|
|
11
|
+
mainContainer: {
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
justifyContent: "space-between",
|
|
15
|
+
gap: "40px",
|
|
16
|
+
p: props.spacingScale.xl,
|
|
17
|
+
boxShadow: "xl",
|
|
18
|
+
border: props.brandingColors?.borderColor
|
|
19
|
+
? `${props.borderSize} solid ${props.brandingColors.borderColor}`
|
|
20
|
+
: "none",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
backgroundImage: props.backgroundImage,
|
|
23
|
+
backgroundSize: "cover",
|
|
24
|
+
position: "relative",
|
|
25
|
+
borderRadius: props.mdBorderRadius,
|
|
26
|
+
minHeight: "250px",
|
|
27
|
+
"&::before": {
|
|
28
|
+
content: '""',
|
|
29
|
+
position: "absolute",
|
|
30
|
+
background: "linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
31
|
+
top: 0,
|
|
32
|
+
left: 0,
|
|
33
|
+
right: 0,
|
|
34
|
+
bottom: 0,
|
|
35
|
+
borderRadius: "inherit",
|
|
36
|
+
zIndex: 0,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
// Headline section wrapper
|
|
40
|
+
headlineSection: {
|
|
41
|
+
display: "flex",
|
|
42
|
+
justifyContent: "space-between",
|
|
43
|
+
flex: "1 0 0",
|
|
44
|
+
alignSelf: "stretch",
|
|
45
|
+
},
|
|
46
|
+
// Headline content container
|
|
47
|
+
headlineContent: {
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexDirection: "column",
|
|
50
|
+
alignItems: "flex-start",
|
|
51
|
+
flex: "1 0 0",
|
|
52
|
+
gap: "16px",
|
|
53
|
+
},
|
|
54
|
+
// Headline content with z-index
|
|
55
|
+
headlineContentInner: {
|
|
56
|
+
zIndex: 10,
|
|
57
|
+
},
|
|
58
|
+
// Quiz headline typography
|
|
59
|
+
quizHeadlineText: {
|
|
60
|
+
fontWeight: 500,
|
|
61
|
+
lineHeight: "166%",
|
|
62
|
+
letterSpacing: "1px",
|
|
63
|
+
textAlign: { xs: "center", md: "left" },
|
|
64
|
+
color: props.secondaryColor,
|
|
65
|
+
opacity: "70%",
|
|
66
|
+
textTransform: "uppercase",
|
|
67
|
+
fontFamily: props.fontFamilySecondary,
|
|
68
|
+
fontSize: "0.75rem",
|
|
69
|
+
},
|
|
70
|
+
// Content container
|
|
71
|
+
contentContainer: {
|
|
72
|
+
display: "flex",
|
|
73
|
+
flexDirection: "column",
|
|
74
|
+
gap: props.spacingScale["3xs"],
|
|
75
|
+
},
|
|
76
|
+
// Quiz title typography
|
|
77
|
+
quizTitleText: {
|
|
78
|
+
fontWeight: 700,
|
|
79
|
+
lineHeight: "133%",
|
|
80
|
+
letterSpacing: "0px",
|
|
81
|
+
textAlign: { xs: "center", md: "left" },
|
|
82
|
+
fontSize: "1.5rem",
|
|
83
|
+
color: props.darkTextColor,
|
|
84
|
+
fontFamily: props.fontFamilyPrimary,
|
|
85
|
+
},
|
|
86
|
+
// Quiz description typography
|
|
87
|
+
quizDescriptionText: {
|
|
88
|
+
fontWeight: 500,
|
|
89
|
+
lineHeight: "140%",
|
|
90
|
+
letterSpacing: "0.15px",
|
|
91
|
+
fontSize: "1.25rem",
|
|
92
|
+
textAlign: { xs: "center", md: "left" },
|
|
93
|
+
color: props.secondaryColor,
|
|
94
|
+
opacity: "70%",
|
|
95
|
+
fontFamily: props.fontFamilyPrimary,
|
|
96
|
+
},
|
|
97
|
+
// Filter screen bottom container
|
|
98
|
+
filterScreenBottomContainer: {
|
|
99
|
+
display: "flex",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
justifyContent: "space-between",
|
|
102
|
+
flexDirection: { xs: "column-reverse", md: "row" },
|
|
103
|
+
gap: props.spacingScale.md,
|
|
104
|
+
},
|
|
105
|
+
// Start button (filter screen)
|
|
106
|
+
startButton: {
|
|
107
|
+
borderRadius: props.buttonRadius,
|
|
108
|
+
bgcolor: props.primaryColor,
|
|
109
|
+
color: "#FFFFFF",
|
|
110
|
+
py: "10px",
|
|
111
|
+
pr: "12px",
|
|
112
|
+
pl: "16px",
|
|
113
|
+
"&:hover": {
|
|
114
|
+
bgcolor: props.primaryColor,
|
|
115
|
+
},
|
|
116
|
+
"&:active": {
|
|
117
|
+
color: props.onPrimaryColor,
|
|
118
|
+
},
|
|
119
|
+
animation: "pulse 1s infinite",
|
|
120
|
+
},
|
|
121
|
+
// Start button text
|
|
122
|
+
startButtonText: {
|
|
123
|
+
fontFamily: props.fontFamilyPrimary,
|
|
124
|
+
fontWeight: 500,
|
|
125
|
+
fontSize: "0.9375rem",
|
|
126
|
+
lineHeight: "24px",
|
|
127
|
+
letterSpacing: "0.46px",
|
|
128
|
+
textTransform: "uppercase",
|
|
129
|
+
color: props.onPrimaryColor,
|
|
130
|
+
gap: "8px",
|
|
131
|
+
display: "flex",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
},
|
|
134
|
+
// Main content section (non-filter screen)
|
|
135
|
+
mainContentSection: {
|
|
136
|
+
display: "flex",
|
|
137
|
+
flexDirection: "column",
|
|
138
|
+
gap: "24px",
|
|
139
|
+
},
|
|
140
|
+
// Stopwatch container
|
|
141
|
+
stopwatchContainer: {
|
|
142
|
+
display: "flex",
|
|
143
|
+
justifyContent: "center",
|
|
144
|
+
},
|
|
145
|
+
// Content container with backdrop
|
|
146
|
+
contentContainerWithBackdrop: {
|
|
147
|
+
borderRadius: props.mdBorderRadius,
|
|
148
|
+
p: props.spacingScale.md,
|
|
149
|
+
display: "flex",
|
|
150
|
+
flexDirection: "column",
|
|
151
|
+
gap: props.spacingScale.md,
|
|
152
|
+
backdropFilter: "blur(4px)",
|
|
153
|
+
position: "relative",
|
|
154
|
+
"&::before": {
|
|
155
|
+
content: '""',
|
|
156
|
+
position: "absolute",
|
|
157
|
+
top: 0,
|
|
158
|
+
left: 0,
|
|
159
|
+
right: 0,
|
|
160
|
+
bottom: 0,
|
|
161
|
+
backgroundColor: props.contentBgColor,
|
|
162
|
+
opacity: 0.5,
|
|
163
|
+
borderRadius: "inherit",
|
|
164
|
+
zIndex: 0,
|
|
165
|
+
},
|
|
166
|
+
"& > *": {
|
|
167
|
+
position: "relative",
|
|
168
|
+
zIndex: 1,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
// Aspect ratio container for embed/image
|
|
172
|
+
aspectRatioContainer: {
|
|
173
|
+
borderRadius: props.smBorderRadius,
|
|
174
|
+
},
|
|
175
|
+
// Question image container
|
|
176
|
+
questionImageContainer: {
|
|
177
|
+
overflow: "hidden",
|
|
178
|
+
borderRadius: props.smBorderRadius,
|
|
179
|
+
},
|
|
180
|
+
// Question image box
|
|
181
|
+
questionImageBox: {
|
|
182
|
+
borderRadius: props.smBorderRadius,
|
|
183
|
+
overflow: "hidden",
|
|
184
|
+
height: "auto",
|
|
185
|
+
},
|
|
186
|
+
// Question image
|
|
187
|
+
questionImage: {
|
|
188
|
+
width: "100%",
|
|
189
|
+
height: "100%",
|
|
190
|
+
objectFit: "cover",
|
|
191
|
+
},
|
|
192
|
+
// Question section
|
|
193
|
+
questionSection: {
|
|
194
|
+
display: { md: "flex", xs: "block" },
|
|
195
|
+
gap: "8px",
|
|
196
|
+
alignItems: "flex-start",
|
|
197
|
+
justifyContent: "center",
|
|
198
|
+
},
|
|
199
|
+
// Question steps typography
|
|
200
|
+
questionStepsText: {
|
|
201
|
+
fontFamily: props.fontFamilyPrimary,
|
|
202
|
+
lineHeight: "150%",
|
|
203
|
+
letterSpacing: "0.15px",
|
|
204
|
+
fontWeight: 500,
|
|
205
|
+
fontSize: "1.25rem",
|
|
206
|
+
color: props.secondaryColor,
|
|
207
|
+
opacity: "70%",
|
|
208
|
+
textAlign: "center",
|
|
209
|
+
},
|
|
210
|
+
// Question text
|
|
211
|
+
questionText: {
|
|
212
|
+
fontFamily: props.fontFamilyPrimary,
|
|
213
|
+
lineHeight: "150%",
|
|
214
|
+
letterSpacing: "0.15px",
|
|
215
|
+
fontWeight: 500,
|
|
216
|
+
fontSize: "1.25rem",
|
|
217
|
+
textAlign: "center",
|
|
218
|
+
color: props.darkTextColor,
|
|
219
|
+
},
|
|
220
|
+
// Bottom footer container
|
|
221
|
+
bottomFooterContainer: {
|
|
222
|
+
display: "flex",
|
|
223
|
+
alignItems: "center",
|
|
224
|
+
justifyContent: "space-between",
|
|
225
|
+
flexDirection: { xs: "column-reverse", md: "row" },
|
|
226
|
+
gap: props.spacingScale.md,
|
|
227
|
+
},
|
|
228
|
+
// Next button
|
|
229
|
+
nextButton: {
|
|
230
|
+
borderRadius: props.buttonRadius,
|
|
231
|
+
py: "10px",
|
|
232
|
+
pr: "12px",
|
|
233
|
+
pl: "16px",
|
|
234
|
+
bgcolor: props.primaryColor,
|
|
235
|
+
color: "#FFFFFF",
|
|
236
|
+
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
237
|
+
transform: "scale(1)",
|
|
238
|
+
ml: { md: "auto" },
|
|
239
|
+
"&:hover": {
|
|
240
|
+
bgcolor: props.primaryColor,
|
|
241
|
+
transform: "scale(1.02)",
|
|
242
|
+
},
|
|
243
|
+
"&:active": {
|
|
244
|
+
color: props.onPrimaryColor,
|
|
245
|
+
transform: "scale(0.98)",
|
|
246
|
+
},
|
|
247
|
+
"&:disabled": {
|
|
248
|
+
bgcolor: props.primaryColor,
|
|
249
|
+
color: props.onPrimaryColor,
|
|
250
|
+
opacity: "34%",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
// Next button text
|
|
254
|
+
nextButtonText: {
|
|
255
|
+
fontFamily: props.fontFamilyPrimary,
|
|
256
|
+
fontWeight: 500,
|
|
257
|
+
fontSize: "0.9375rem",
|
|
258
|
+
lineHeight: "24px",
|
|
259
|
+
letterSpacing: "0.46px",
|
|
260
|
+
textTransform: "uppercase",
|
|
261
|
+
color: props.onPrimaryColor,
|
|
262
|
+
gap: "8px",
|
|
263
|
+
display: "flex",
|
|
264
|
+
alignItems: "center",
|
|
265
|
+
},
|
|
266
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClassicQuizUserParticipationModel, ClassicQuizFullModel, FansUnitedSDKModel } from "fansunited-sdk-esm";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { LeadsOptions } from "@fansunited/common";
|
|
4
|
+
type OverlayScoreState = {
|
|
5
|
+
summary: ClassicQuizUserParticipationModel;
|
|
6
|
+
totalTime: number;
|
|
7
|
+
showAnswerExplanations: boolean;
|
|
8
|
+
classicQuiz: ClassicQuizFullModel;
|
|
9
|
+
maxAttemptsReached: boolean;
|
|
10
|
+
sdk: FansUnitedSDKModel;
|
|
11
|
+
leads?: LeadsOptions;
|
|
12
|
+
playAgain: () => void;
|
|
13
|
+
};
|
|
14
|
+
declare const OverlayScoreState: React.FC<OverlayScoreState>;
|
|
15
|
+
export default OverlayScoreState;
|
|
16
|
+
//# sourceMappingURL=OverlayScoreState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayScoreState.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Variants/Overlay/ScoreState/OverlayScoreState.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EAGjC,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,EAIb,MAAM,oBAAoB,CAAC;AAwC5B,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,iCAAiC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,WAAW,EAAE,oBAAoB,CAAC;IAClC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,GAAG,EAAE,kBAAkB,CAAC;IACxB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmOlD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Button, Typography } from "@mui/joy";
|
|
3
|
+
import { useInternalTheme, WidgetTemplate, isMobile, useSpacingScale, } from "@fansunited/common";
|
|
4
|
+
import ReplayIcon from "@mui/icons-material/Replay";
|
|
5
|
+
import share from "../../../../assets/share.svg";
|
|
6
|
+
import bgImage from "../../../../assets/default-quiz-bg.png";
|
|
7
|
+
import mobileBgImage from "../../../../assets/default-quiz-bg-vertical.jpg";
|
|
8
|
+
import ScoreStateWrapper from "../../../Shared/ScoreStateWrapper";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
import PresentedBy from "../../../Shared/PresentedBy";
|
|
11
|
+
import CollectLead from "../../../Leads/CollectLead";
|
|
12
|
+
import { createStyles } from "./OverlayScoreState.styles";
|
|
13
|
+
import AlertMessage from "../../../Shared/AlertMessage";
|
|
14
|
+
import { useScoreStateHelpers } from "../../../../hooks/useScoreStateHelpers";
|
|
15
|
+
const extractQuizBrandingProperties = (classicQuiz) => {
|
|
16
|
+
let brandingImage = classicQuiz.branding?.images?.backgroundImage || null;
|
|
17
|
+
let brandingLogo = classicQuiz.branding?.images?.mainLogo || null;
|
|
18
|
+
let brandingColors = null;
|
|
19
|
+
if (isMobile() && classicQuiz.branding?.images) {
|
|
20
|
+
brandingImage = classicQuiz.branding.images.mobileBackgroundImage;
|
|
21
|
+
brandingLogo = classicQuiz.branding.images.mobileLogo;
|
|
22
|
+
}
|
|
23
|
+
if (classicQuiz.branding?.colors) {
|
|
24
|
+
brandingColors = classicQuiz.branding.colors;
|
|
25
|
+
}
|
|
26
|
+
return { brandingImage, brandingColors, brandingLogo };
|
|
27
|
+
};
|
|
28
|
+
const sanitizeBackgroundUrl = (url) => {
|
|
29
|
+
try {
|
|
30
|
+
return `url("${encodeURI(url)}")`;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return "none";
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const OverlayScoreState = (props) => {
|
|
37
|
+
const theme = useInternalTheme();
|
|
38
|
+
const spacingScale = useSpacingScale();
|
|
39
|
+
const { t } = useTranslation();
|
|
40
|
+
const imagePlaceholder = isMobile() ? mobileBgImage : bgImage;
|
|
41
|
+
const quizImage = props.classicQuiz.images?.cover || "";
|
|
42
|
+
const { brandingImage, brandingColors, brandingLogo } = extractQuizBrandingProperties(props.classicQuiz);
|
|
43
|
+
const { getHexagonBackground, formatTime, displayCongratulations, getRandomEmoji, shareResult, scorePercentage, } = useScoreStateHelpers({
|
|
44
|
+
summary: props.summary,
|
|
45
|
+
totalTime: props.totalTime,
|
|
46
|
+
classicQuiz: props.classicQuiz,
|
|
47
|
+
variant: WidgetTemplate.OVERLAY,
|
|
48
|
+
});
|
|
49
|
+
// Styling variables
|
|
50
|
+
const primaryColor = brandingColors?.primaryColor ||
|
|
51
|
+
theme.colorSchemes.light.palette.primary.plainColor;
|
|
52
|
+
const textPrimary = theme.colorSchemes.dark.textPrimary;
|
|
53
|
+
const fontFamilyPrimary = theme.customFontFamily.light.primary;
|
|
54
|
+
const fontFamilySecondary = theme.customFontFamily.light.secondary;
|
|
55
|
+
const mdBorderRadius = theme.customRadius.light.md;
|
|
56
|
+
const xlBorderRadius = theme.customRadius.light.xl;
|
|
57
|
+
const borderColor = brandingColors?.borderColor || theme.colorSchemes.dark.secondaryContainer;
|
|
58
|
+
const borderSize = theme.border.light.size;
|
|
59
|
+
const contentBgColor = brandingColors?.backgroundColor || theme.colorSchemes.dark.surfaceVariant;
|
|
60
|
+
const showLead = props.leads?.position === "after" &&
|
|
61
|
+
props.classicQuiz.authRequirement === "LEAD";
|
|
62
|
+
const backgroundImage = sanitizeBackgroundUrl(brandingImage || quizImage || imagePlaceholder);
|
|
63
|
+
// Create styles with current props/theme values
|
|
64
|
+
const styles = createStyles({
|
|
65
|
+
spacingScale,
|
|
66
|
+
brandingColors,
|
|
67
|
+
primaryColor,
|
|
68
|
+
textPrimary,
|
|
69
|
+
fontFamilyPrimary,
|
|
70
|
+
fontFamilySecondary,
|
|
71
|
+
mdBorderRadius,
|
|
72
|
+
xlBorderRadius,
|
|
73
|
+
borderColor,
|
|
74
|
+
borderSize,
|
|
75
|
+
contentBgColor,
|
|
76
|
+
backgroundImage,
|
|
77
|
+
successColor: theme.colorSchemes.dark.palette.success.plainColor,
|
|
78
|
+
dangerColor: theme.colorSchemes.dark.palette.danger.plainColor,
|
|
79
|
+
onSurfaceColor: theme.colorSchemes.dark.onSurface,
|
|
80
|
+
surfaceVariantColor: theme.colorSchemes.dark.surfaceVariant,
|
|
81
|
+
scorePercentage,
|
|
82
|
+
});
|
|
83
|
+
const renderMainContent = () => {
|
|
84
|
+
return (_jsxs(Box, { sx: styles.mainContentWrapper, children: [props.summary.classicQuizId ? (_jsx(Box, { sx: styles.scoreContainer, children: _jsxs(Box, { sx: styles.scoreContentWrapper, children: [_jsx(Box, { sx: styles.scoreSection, children: _jsxs(Box, { sx: styles.scoreSectionWrapper, children: [_jsxs(Box, { sx: styles.achievementBadgeContainer, children: [_jsx("img", { style: styles.hexagonBackground, src: getHexagonBackground(), alt: "achievement-badge-background" }), _jsx("img", { style: styles.achievementEmoji, src: getRandomEmoji("dark"), alt: "achievement-badge" })] }), _jsxs(Box, { sx: styles.textSection, children: [_jsx(Typography, { level: "body-lg", sx: styles.congratulationsText, children: props.maxAttemptsReached
|
|
85
|
+
? t("classicQuiz.maxAttemptsReached")
|
|
86
|
+
: displayCongratulations() }), _jsx(Box, { sx: styles.scoreNumbersContainer, children: _jsxs(Box, { sx: styles.scoreNumbersWrapper, children: [_jsx(Typography, { level: "h2", sx: styles.correctScoreText, children: props.summary.correct }), _jsxs(Typography, { level: "h2", sx: styles.totalScoreText, children: ["/", props.summary.classicQuizQuestions] })] }) }), props.totalTime ? (_jsxs(Typography, { level: "body-md", sx: styles.timeText, children: [t("classicQuiz.youDidItFor"), " ", formatTime()] })) : null, props.classicQuiz.scored ? (_jsxs(Typography, { level: "body-lg", sx: styles.pointsText, children: [t("classicQuiz.youWon"), " ", props.summary.correct * props.classicQuiz.points, " ", t("common.labels.points")] })) : null] })] }) }), _jsx(Box, { sx: styles.ctaSection, children: _jsxs(Box, { sx: styles.ctaContentWrapper, children: [_jsx(Typography, { level: "body-lg", sx: styles.thanksText, children: t("classicQuiz.thanksForPlaying") }), _jsxs(Box, { sx: styles.buttonsContainer, children: [!props.maxAttemptsReached && (_jsx(Button, { sx: styles.playAgainButton, onClick: props.playAgain, children: _jsxs(Box, { sx: styles.playAgainButtonContent, children: [_jsx(ReplayIcon, { sx: styles.playAgainIcon }), _jsx(Typography, { sx: styles.playAgainText, children: t("classicQuiz.buttons.playAgain") })] }) })), _jsx(Button, { sx: styles.shareButton, onClick: shareResult, children: _jsxs(Box, { sx: styles.shareButtonContent, children: [_jsx("img", { src: share, alt: "share-icon", style: styles.shareIcon }), _jsx(Typography, { sx: styles.shareText, children: t("classicQuiz.buttons.share") })] }) })] })] }) })] }) })) : (_jsx(_Fragment, { children: _jsx(AlertMessage, { variant: "error", title: t("common.authentication.accessRequired"), message: t("common.authentication.invalidOrMissingAuth") }) })), !props.maxAttemptsReached && showLead && (_jsx(Box, { sx: styles.leadCollectionContainer, children: _jsx(CollectLead, { sdk: props.sdk, contentType: "quiz", contentId: props.classicQuiz.id, contentName: props.classicQuiz.title, brandingColors: props.classicQuiz.branding?.colors, brandingUrls: props.classicQuiz.branding?.urls, campaignId: props.leads?.campaignId, campaignName: props.leads?.campaignName, fields: props.leads?.fields, leadTitle: props.classicQuiz.labels?.leadTitle, leadDescription: props.classicQuiz.labels?.leadDescription, leadCta: props.classicQuiz.labels?.leadCta, leadSuccessTitle: props.classicQuiz.labels?.leadSuccessTitle, leadSuccessDescription: props.classicQuiz.labels?.leadSuccessDescription }) })), _jsx(PresentedBy, { brandingLogo: brandingLogo, textColor: theme.colorSchemes.dark.textColor })] }));
|
|
87
|
+
};
|
|
88
|
+
return (_jsx(_Fragment, { children: props.showAnswerExplanations ? (_jsx(Box, { sx: styles.mainContainerWithExplanations, children: _jsx(ScoreStateWrapper, { questions: props.classicQuiz.questions, userParticipation: props.summary.answers, resultsTabPanelSxProps: { p: 0 }, isOverlayVariant: true, brandingColors: props.classicQuiz.branding?.colors, children: _jsx(Box, { sx: styles.scoreStateWrapperContent, children: renderMainContent() }) }) })) : (_jsx(Box, { sx: styles.mainContainer, children: renderMainContent() })) }));
|
|
89
|
+
};
|
|
90
|
+
export default OverlayScoreState;
|