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,374 @@
|
|
|
1
|
+
export const createStyles = (props) => ({
|
|
2
|
+
// Main container with background overlay (with explanations)
|
|
3
|
+
mainContainerWithExplanations: {
|
|
4
|
+
boxShadow: "xl",
|
|
5
|
+
border: `${props.borderSize} solid ${props.borderColor}`,
|
|
6
|
+
overflow: "hidden",
|
|
7
|
+
backgroundImage: props.backgroundImage,
|
|
8
|
+
backgroundSize: "cover",
|
|
9
|
+
position: "relative",
|
|
10
|
+
borderRadius: props.mdBorderRadius,
|
|
11
|
+
minHeight: "250px",
|
|
12
|
+
"&::before": {
|
|
13
|
+
content: '""',
|
|
14
|
+
position: "absolute",
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0,
|
|
17
|
+
right: 0,
|
|
18
|
+
bottom: 0,
|
|
19
|
+
borderRadius: "inherit",
|
|
20
|
+
zIndex: 0,
|
|
21
|
+
background: "linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
// Main container with background overlay (without explanations)
|
|
25
|
+
mainContainer: {
|
|
26
|
+
display: "flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
gap: "40px",
|
|
29
|
+
p: props.spacingScale.xl,
|
|
30
|
+
boxShadow: "xl",
|
|
31
|
+
border: `${props.borderSize} solid ${props.borderColor}`,
|
|
32
|
+
overflow: "hidden",
|
|
33
|
+
backgroundImage: props.backgroundImage,
|
|
34
|
+
backgroundSize: "cover",
|
|
35
|
+
position: "relative",
|
|
36
|
+
borderRadius: props.mdBorderRadius,
|
|
37
|
+
minHeight: "250px",
|
|
38
|
+
"&::before": {
|
|
39
|
+
content: '""',
|
|
40
|
+
position: "absolute",
|
|
41
|
+
top: 0,
|
|
42
|
+
left: 0,
|
|
43
|
+
right: 0,
|
|
44
|
+
bottom: 0,
|
|
45
|
+
borderRadius: "inherit",
|
|
46
|
+
zIndex: 0,
|
|
47
|
+
background: "linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
// Score state wrapper content
|
|
51
|
+
scoreStateWrapperContent: {
|
|
52
|
+
display: "flex",
|
|
53
|
+
flexDirection: "column",
|
|
54
|
+
gap: "40px",
|
|
55
|
+
p: props.spacingScale.xl,
|
|
56
|
+
},
|
|
57
|
+
// Main content wrapper
|
|
58
|
+
mainContentWrapper: {
|
|
59
|
+
display: "flex",
|
|
60
|
+
flexDirection: "column",
|
|
61
|
+
gap: "24px",
|
|
62
|
+
zIndex: 10,
|
|
63
|
+
},
|
|
64
|
+
// Score container with backdrop
|
|
65
|
+
scoreContainer: {
|
|
66
|
+
borderRadius: props.mdBorderRadius,
|
|
67
|
+
p: props.spacingScale.md,
|
|
68
|
+
display: "flex",
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
alignSelf: "stretch",
|
|
72
|
+
gap: props.spacingScale.md,
|
|
73
|
+
backdropFilter: "blur(4px)",
|
|
74
|
+
position: "relative",
|
|
75
|
+
"&::before": {
|
|
76
|
+
content: '""',
|
|
77
|
+
position: "absolute",
|
|
78
|
+
top: 0,
|
|
79
|
+
left: 0,
|
|
80
|
+
right: 0,
|
|
81
|
+
bottom: 0,
|
|
82
|
+
backgroundColor: props.contentBgColor,
|
|
83
|
+
opacity: 0.5,
|
|
84
|
+
borderRadius: "inherit",
|
|
85
|
+
zIndex: 0,
|
|
86
|
+
backdropFilter: "blur(4px)",
|
|
87
|
+
},
|
|
88
|
+
"& > *": {
|
|
89
|
+
position: "relative",
|
|
90
|
+
zIndex: 1,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
// Score content wrapper
|
|
94
|
+
scoreContentWrapper: {
|
|
95
|
+
display: "flex",
|
|
96
|
+
flexDirection: { xs: "column", md: "row" },
|
|
97
|
+
justifyContent: "center",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
alignSelf: "stretch",
|
|
100
|
+
},
|
|
101
|
+
// Score section
|
|
102
|
+
scoreSection: {
|
|
103
|
+
display: "flex",
|
|
104
|
+
py: props.spacingScale.xs,
|
|
105
|
+
gap: props.spacingScale.md,
|
|
106
|
+
justifyContent: "center",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
flex: "1 0 0",
|
|
109
|
+
},
|
|
110
|
+
// Score section wrapper
|
|
111
|
+
scoreSectionWrapper: {
|
|
112
|
+
display: "flex",
|
|
113
|
+
minWidth: "200px",
|
|
114
|
+
p: props.spacingScale.xs,
|
|
115
|
+
justifyContent: "center",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
gap: props.spacingScale.md,
|
|
118
|
+
flex: "1 0 0",
|
|
119
|
+
alignSelf: "stretch",
|
|
120
|
+
flexDirection: { xs: "column", md: "row" },
|
|
121
|
+
},
|
|
122
|
+
// Achievement badge container
|
|
123
|
+
achievementBadgeContainer: {
|
|
124
|
+
display: "flex",
|
|
125
|
+
width: { xs: "172px", md: "auto" },
|
|
126
|
+
height: { xs: "160px", md: "auto" },
|
|
127
|
+
flexDirection: "column",
|
|
128
|
+
justifyContent: "center",
|
|
129
|
+
alignItems: "center",
|
|
130
|
+
position: "relative",
|
|
131
|
+
},
|
|
132
|
+
// Hexagon background
|
|
133
|
+
hexagonBackground: {
|
|
134
|
+
width: "160px",
|
|
135
|
+
height: "160px",
|
|
136
|
+
position: "absolute",
|
|
137
|
+
top: "55%",
|
|
138
|
+
left: "50%",
|
|
139
|
+
transform: "translate(-50%, -50%)",
|
|
140
|
+
},
|
|
141
|
+
// Achievement emoji
|
|
142
|
+
achievementEmoji: {
|
|
143
|
+
maxWidth: "80px",
|
|
144
|
+
maxHeight: "80px",
|
|
145
|
+
position: "relative",
|
|
146
|
+
},
|
|
147
|
+
// Text section
|
|
148
|
+
textSection: {
|
|
149
|
+
display: "flex",
|
|
150
|
+
flexDirection: "column",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
},
|
|
153
|
+
// Congratulations text
|
|
154
|
+
congratulationsText: {
|
|
155
|
+
color: props.textPrimary,
|
|
156
|
+
textAlign: "center",
|
|
157
|
+
fontFamily: props.fontFamilyPrimary,
|
|
158
|
+
fontSize: "1.5rem",
|
|
159
|
+
fontStyle: "normal",
|
|
160
|
+
fontWeight: 400,
|
|
161
|
+
lineHeight: "133.4%",
|
|
162
|
+
px: 2,
|
|
163
|
+
},
|
|
164
|
+
// Score numbers container
|
|
165
|
+
scoreNumbersContainer: {
|
|
166
|
+
display: "flex",
|
|
167
|
+
alignItems: "center",
|
|
168
|
+
gap: "4px",
|
|
169
|
+
},
|
|
170
|
+
// Score numbers wrapper
|
|
171
|
+
scoreNumbersWrapper: {
|
|
172
|
+
display: "flex",
|
|
173
|
+
alignItems: "flex-end",
|
|
174
|
+
gap: "4px",
|
|
175
|
+
},
|
|
176
|
+
// Correct score text
|
|
177
|
+
correctScoreText: {
|
|
178
|
+
textAlign: "center",
|
|
179
|
+
color: props.scorePercentage > 30 ? props.successColor : props.dangerColor,
|
|
180
|
+
fontFamily: props.fontFamilyPrimary,
|
|
181
|
+
fontSize: "3.75rem",
|
|
182
|
+
fontStyle: "normal",
|
|
183
|
+
fontWeight: 500,
|
|
184
|
+
lineHeight: "120%",
|
|
185
|
+
letterSpacing: "-0.5px",
|
|
186
|
+
},
|
|
187
|
+
// Total score text
|
|
188
|
+
totalScoreText: {
|
|
189
|
+
textAlign: "center",
|
|
190
|
+
color: props.scorePercentage > 30 ? props.successColor : props.dangerColor,
|
|
191
|
+
fontFamily: props.fontFamilyPrimary,
|
|
192
|
+
fontSize: "3.75rem",
|
|
193
|
+
fontStyle: "normal",
|
|
194
|
+
fontWeight: 500,
|
|
195
|
+
lineHeight: "120%",
|
|
196
|
+
letterSpacing: "-0.5px",
|
|
197
|
+
},
|
|
198
|
+
// Time text
|
|
199
|
+
timeText: {
|
|
200
|
+
textAlign: "center",
|
|
201
|
+
color: props.textPrimary,
|
|
202
|
+
fontFamily: props.fontFamilySecondary,
|
|
203
|
+
fontSize: "0.875rem",
|
|
204
|
+
fontStyle: "normal",
|
|
205
|
+
fontWeight: 700,
|
|
206
|
+
lineHeight: "143%",
|
|
207
|
+
letterSpacing: "0.024px",
|
|
208
|
+
},
|
|
209
|
+
// Points text
|
|
210
|
+
pointsText: {
|
|
211
|
+
textAlign: "center",
|
|
212
|
+
color: props.textPrimary,
|
|
213
|
+
fontFamily: props.fontFamilyPrimary,
|
|
214
|
+
fontSize: "1.25rem",
|
|
215
|
+
fontStyle: "normal",
|
|
216
|
+
fontWeight: 500,
|
|
217
|
+
lineHeight: "120%",
|
|
218
|
+
letterSpacing: "0.15px",
|
|
219
|
+
},
|
|
220
|
+
// CTA section
|
|
221
|
+
ctaSection: {
|
|
222
|
+
display: "flex",
|
|
223
|
+
py: props.spacingScale.xs,
|
|
224
|
+
justifyContent: "center",
|
|
225
|
+
alignItems: "center",
|
|
226
|
+
gap: "24px",
|
|
227
|
+
flex: "1 0 0",
|
|
228
|
+
},
|
|
229
|
+
// CTA content wrapper
|
|
230
|
+
ctaContentWrapper: {
|
|
231
|
+
display: "flex",
|
|
232
|
+
flexDirection: "column",
|
|
233
|
+
justifyContent: "center",
|
|
234
|
+
alignItems: "center",
|
|
235
|
+
gap: "16px",
|
|
236
|
+
flex: "1 0 0",
|
|
237
|
+
},
|
|
238
|
+
// Thanks text
|
|
239
|
+
thanksText: {
|
|
240
|
+
color: props.textPrimary,
|
|
241
|
+
textAlign: "center",
|
|
242
|
+
fontFamily: props.fontFamilyPrimary,
|
|
243
|
+
fontSize: "1.25rem",
|
|
244
|
+
fontStyle: "normal",
|
|
245
|
+
fontWeight: 500,
|
|
246
|
+
lineHeight: "120%",
|
|
247
|
+
letterSpacing: "0.15px",
|
|
248
|
+
},
|
|
249
|
+
// Buttons container
|
|
250
|
+
buttonsContainer: {
|
|
251
|
+
display: "flex",
|
|
252
|
+
flexDirection: { xs: "column", md: "row" },
|
|
253
|
+
gap: "24px",
|
|
254
|
+
},
|
|
255
|
+
// Play again button
|
|
256
|
+
playAgainButton: {
|
|
257
|
+
display: "flex",
|
|
258
|
+
minHeight: "48px",
|
|
259
|
+
py: "12px",
|
|
260
|
+
pr: "24px",
|
|
261
|
+
pl: "16px",
|
|
262
|
+
flexDirection: "column",
|
|
263
|
+
justifyContent: "center",
|
|
264
|
+
alignItems: "center",
|
|
265
|
+
gap: "8px",
|
|
266
|
+
borderRadius: props.xlBorderRadius,
|
|
267
|
+
bgcolor: props.onSurfaceColor,
|
|
268
|
+
"&:hover": {
|
|
269
|
+
bgcolor: props.surfaceVariantColor,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
// Play again button content
|
|
273
|
+
playAgainButtonContent: {
|
|
274
|
+
display: "flex",
|
|
275
|
+
justifyContent: "center",
|
|
276
|
+
alignItems: "center",
|
|
277
|
+
gap: "8px",
|
|
278
|
+
alignSelf: "stretch",
|
|
279
|
+
},
|
|
280
|
+
// Play again icon
|
|
281
|
+
playAgainIcon: {
|
|
282
|
+
display: "flex",
|
|
283
|
+
width: "24px",
|
|
284
|
+
height: "24px",
|
|
285
|
+
justifyContent: "center",
|
|
286
|
+
alignItems: "center",
|
|
287
|
+
color: props.textPrimary,
|
|
288
|
+
},
|
|
289
|
+
// Play again text
|
|
290
|
+
playAgainText: {
|
|
291
|
+
color: props.textPrimary,
|
|
292
|
+
textAlign: "center",
|
|
293
|
+
fontFamily: props.fontFamilyPrimary,
|
|
294
|
+
fontSize: "0.9375rem",
|
|
295
|
+
fontStyle: "normal",
|
|
296
|
+
fontWeight: 500,
|
|
297
|
+
lineHeight: "24px",
|
|
298
|
+
letterSpacing: "0.46px",
|
|
299
|
+
textTransform: "uppercase",
|
|
300
|
+
},
|
|
301
|
+
// Share button
|
|
302
|
+
shareButton: {
|
|
303
|
+
display: "flex",
|
|
304
|
+
minHeight: "48px",
|
|
305
|
+
py: "12px",
|
|
306
|
+
pr: "24px",
|
|
307
|
+
pl: "16px",
|
|
308
|
+
flexDirection: "column",
|
|
309
|
+
justifyContent: "center",
|
|
310
|
+
alignItems: "center",
|
|
311
|
+
gap: "8px",
|
|
312
|
+
borderRadius: props.xlBorderRadius,
|
|
313
|
+
bgcolor: props.primaryColor,
|
|
314
|
+
"&:hover": {
|
|
315
|
+
bgcolor: props.primaryColor,
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
// Share button content
|
|
319
|
+
shareButtonContent: {
|
|
320
|
+
display: "flex",
|
|
321
|
+
justifyContent: "center",
|
|
322
|
+
alignItems: "center",
|
|
323
|
+
gap: "8px",
|
|
324
|
+
alignSelf: "stretch",
|
|
325
|
+
},
|
|
326
|
+
// Share icon
|
|
327
|
+
shareIcon: {
|
|
328
|
+
display: "flex",
|
|
329
|
+
width: "24px",
|
|
330
|
+
height: "24px",
|
|
331
|
+
justifyContent: "center",
|
|
332
|
+
alignItems: "center",
|
|
333
|
+
},
|
|
334
|
+
// Share text
|
|
335
|
+
shareText: {
|
|
336
|
+
color: props.textPrimary,
|
|
337
|
+
textAlign: "center",
|
|
338
|
+
fontFamily: props.fontFamilyPrimary,
|
|
339
|
+
fontSize: "0.9375rem",
|
|
340
|
+
fontStyle: "normal",
|
|
341
|
+
fontWeight: 500,
|
|
342
|
+
lineHeight: "24px",
|
|
343
|
+
letterSpacing: "0.40px",
|
|
344
|
+
textTransform: "uppercase",
|
|
345
|
+
},
|
|
346
|
+
// Lead collection container
|
|
347
|
+
leadCollectionContainer: {
|
|
348
|
+
borderRadius: props.mdBorderRadius,
|
|
349
|
+
p: props.spacingScale.md,
|
|
350
|
+
display: "flex",
|
|
351
|
+
flexDirection: "column",
|
|
352
|
+
alignSelf: "stretch",
|
|
353
|
+
gap: props.spacingScale.md,
|
|
354
|
+
backdropFilter: "blur(4px)",
|
|
355
|
+
position: "relative",
|
|
356
|
+
"&::before": {
|
|
357
|
+
content: '""',
|
|
358
|
+
position: "absolute",
|
|
359
|
+
top: 0,
|
|
360
|
+
left: 0,
|
|
361
|
+
right: 0,
|
|
362
|
+
bottom: 0,
|
|
363
|
+
backgroundColor: props.contentBgColor,
|
|
364
|
+
opacity: 0.5,
|
|
365
|
+
borderRadius: "inherit",
|
|
366
|
+
zIndex: 0,
|
|
367
|
+
backdropFilter: "blur(4px)",
|
|
368
|
+
},
|
|
369
|
+
"& > *": {
|
|
370
|
+
position: "relative",
|
|
371
|
+
zIndex: 1,
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClassicQuizFullModel } from "fansunited-sdk-esm";
|
|
3
|
+
type SplitAuthErrorProps = {
|
|
4
|
+
classicQuiz: ClassicQuizFullModel;
|
|
5
|
+
};
|
|
6
|
+
declare const SplitAuthError: React.FC<SplitAuthErrorProps>;
|
|
7
|
+
export default SplitAuthError;
|
|
8
|
+
//# sourceMappingURL=SplitAuthError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitAuthError.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Variants/Split/AuthError/SplitAuthError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAI1D,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkFjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from "@mui/joy";
|
|
3
|
+
import { stripHtmlTags, useImageUrl, isMobile, useColors, useCornerRadius, useFontFamily, useInternalTheme, useSpacingScale, } from "@fansunited/common";
|
|
4
|
+
import MainCard from "../../../Shared/MainCard";
|
|
5
|
+
import bgImage from "../../../../assets/default-quiz-bg.png";
|
|
6
|
+
import mobileBgImage from "../../../../assets/default-quiz-bg-vertical.jpg";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import PresentedBy from "../../../Shared/PresentedBy";
|
|
9
|
+
import AlertMessage from "../../../Shared/AlertMessage";
|
|
10
|
+
import { createStyles } from "./SplitAuthError.styles";
|
|
11
|
+
const SplitAuthError = (props) => {
|
|
12
|
+
const internalTheme = useInternalTheme();
|
|
13
|
+
const quizImage = useImageUrl(props.classicQuiz.images);
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const brandingColors = props.classicQuiz.branding?.colors || null;
|
|
16
|
+
const brandingLogo = isMobile()
|
|
17
|
+
? props.classicQuiz.branding?.images.mobileLogo ||
|
|
18
|
+
props.classicQuiz.branding?.images.mainLogo ||
|
|
19
|
+
""
|
|
20
|
+
: props.classicQuiz.branding?.images.mainLogo || "";
|
|
21
|
+
const imagePlaceholder = isMobile() ? mobileBgImage : bgImage;
|
|
22
|
+
// Styling variables
|
|
23
|
+
const fontFamilySecondary = useFontFamily().secondary;
|
|
24
|
+
const fontFamilyPrimary = useFontFamily().primary;
|
|
25
|
+
const mdBorderRadius = useCornerRadius().md;
|
|
26
|
+
const textColor = useColors().textColor;
|
|
27
|
+
const spacingScale = useSpacingScale();
|
|
28
|
+
// Create styles with current props/theme values
|
|
29
|
+
const styles = createStyles({
|
|
30
|
+
quizImage,
|
|
31
|
+
imagePlaceholder,
|
|
32
|
+
spacingScale,
|
|
33
|
+
borderRadius: useCornerRadius(),
|
|
34
|
+
fontFamilyPrimary,
|
|
35
|
+
fontFamilySecondary,
|
|
36
|
+
mdBorderRadius,
|
|
37
|
+
textColor,
|
|
38
|
+
brandingColors,
|
|
39
|
+
darkTextColor: internalTheme.colorSchemes.dark.textColor,
|
|
40
|
+
});
|
|
41
|
+
return (_jsxs(MainCard, { brandingBorderColor: brandingColors?.borderColor || null, children: [_jsx(Box, { sx: styles.headlineSection, children: _jsxs(Box, { sx: styles.headlineContent, children: [_jsxs(Box, { children: [_jsx(Typography, { level: "body-sm", sx: styles.quizHeadlineText, children: t("classicQuiz.headline") }), _jsxs(Box, { sx: styles.contentContainer, children: [_jsx(Typography, { level: "body-lg", sx: styles.quizTitleText, children: props.classicQuiz.title }), _jsx(Typography, { level: "body-md", sx: styles.quizDescriptionText, children: stripHtmlTags(props.classicQuiz.description) })] })] }), _jsx(Box, { sx: styles.presentedByDesktop, children: _jsx(PresentedBy, { brandingLogo: brandingLogo, textColor: brandingColors?.contentColor ||
|
|
42
|
+
internalTheme.colorSchemes.dark.textColor }) })] }) }), _jsxs(Box, { sx: styles.questionArea, children: [_jsx(AlertMessage, { variant: "error", title: t("common.authentication.accessRequired"), message: t("common.authentication.invalidOrMissingAuth") }), _jsx(Box, { sx: styles.presentedByMobile, children: _jsx(PresentedBy, { brandingLogo: brandingLogo, textColor: brandingColors?.contentColor || textColor }) })] })] }));
|
|
43
|
+
};
|
|
44
|
+
export default SplitAuthError;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { CustomSpacingScale, CustomBorderRadius } from "@fansunited/common";
|
|
2
|
+
import { BrandingColorsModel } from "fansunited-sdk-esm";
|
|
3
|
+
interface StyleProps {
|
|
4
|
+
quizImage: string | null;
|
|
5
|
+
imagePlaceholder: string;
|
|
6
|
+
spacingScale: CustomSpacingScale;
|
|
7
|
+
borderRadius: CustomBorderRadius;
|
|
8
|
+
fontFamilyPrimary: string;
|
|
9
|
+
fontFamilySecondary: string;
|
|
10
|
+
mdBorderRadius: string;
|
|
11
|
+
textColor: string;
|
|
12
|
+
brandingColors: BrandingColorsModel | null;
|
|
13
|
+
darkTextColor: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const createStyles: (props: StyleProps) => {
|
|
16
|
+
headlineSection: {
|
|
17
|
+
display: string;
|
|
18
|
+
flexDirection: string;
|
|
19
|
+
justifyContent: string;
|
|
20
|
+
gap: string;
|
|
21
|
+
flex: string;
|
|
22
|
+
backgroundImage: string;
|
|
23
|
+
backgroundSize: string;
|
|
24
|
+
backgroundPosition: string;
|
|
25
|
+
borderTopLeftRadius: string;
|
|
26
|
+
borderTopRightRadius: {
|
|
27
|
+
xs: string;
|
|
28
|
+
md: string;
|
|
29
|
+
};
|
|
30
|
+
borderBottomLeftRadius: {
|
|
31
|
+
xs: number;
|
|
32
|
+
md: string;
|
|
33
|
+
};
|
|
34
|
+
overflow: string;
|
|
35
|
+
height: string;
|
|
36
|
+
position: string;
|
|
37
|
+
minHeight: {
|
|
38
|
+
xs: string;
|
|
39
|
+
md: string;
|
|
40
|
+
};
|
|
41
|
+
"&::before": {
|
|
42
|
+
content: string;
|
|
43
|
+
position: string;
|
|
44
|
+
width: string;
|
|
45
|
+
height: string;
|
|
46
|
+
background: string;
|
|
47
|
+
borderTopLeftRadius: string;
|
|
48
|
+
borderTopRightRadius: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
headlineContent: {
|
|
52
|
+
zIndex: number;
|
|
53
|
+
height: string;
|
|
54
|
+
p: string;
|
|
55
|
+
gap: string;
|
|
56
|
+
display: string;
|
|
57
|
+
flexDirection: string;
|
|
58
|
+
justifyContent: string;
|
|
59
|
+
};
|
|
60
|
+
quizHeadlineText: {
|
|
61
|
+
fontWeight: number;
|
|
62
|
+
lineHeight: string;
|
|
63
|
+
letterSpacing: string;
|
|
64
|
+
fontSize: string;
|
|
65
|
+
color: string;
|
|
66
|
+
opacity: string;
|
|
67
|
+
textTransform: string;
|
|
68
|
+
fontFamily: string;
|
|
69
|
+
textAlign: {
|
|
70
|
+
xs: string;
|
|
71
|
+
md: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
contentContainer: {
|
|
75
|
+
display: string;
|
|
76
|
+
flexDirection: string;
|
|
77
|
+
gap: string;
|
|
78
|
+
};
|
|
79
|
+
quizTitleText: {
|
|
80
|
+
fontWeight: number;
|
|
81
|
+
lineHeight: string;
|
|
82
|
+
fontSize: string;
|
|
83
|
+
letterSpacing: string;
|
|
84
|
+
color: string;
|
|
85
|
+
fontFamily: string;
|
|
86
|
+
textAlign: {
|
|
87
|
+
xs: string;
|
|
88
|
+
md: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
quizDescriptionText: {
|
|
92
|
+
fontWeight: number;
|
|
93
|
+
lineHeight: string;
|
|
94
|
+
fontSize: string;
|
|
95
|
+
letterSpacing: string;
|
|
96
|
+
color: string;
|
|
97
|
+
opacity: string;
|
|
98
|
+
fontFamily: string;
|
|
99
|
+
textAlign: {
|
|
100
|
+
xs: string;
|
|
101
|
+
md: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
presentedByDesktop: {
|
|
105
|
+
display: {
|
|
106
|
+
xs: string;
|
|
107
|
+
md: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
questionArea: {
|
|
111
|
+
flex: string;
|
|
112
|
+
display: string;
|
|
113
|
+
flexDirection: string;
|
|
114
|
+
justifyContent: string;
|
|
115
|
+
gap: string;
|
|
116
|
+
p: string;
|
|
117
|
+
};
|
|
118
|
+
presentedByMobile: {
|
|
119
|
+
display: {
|
|
120
|
+
xs: string;
|
|
121
|
+
md: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=SplitAuthError.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitAuthError.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Variants/Split/AuthError/SplitAuthError.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,UAAU,UAAU;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,kBAAkB,CAAC;IACjC,YAAY,EAAE,kBAAkB,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,UAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuG5C,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const createStyles = (props) => ({
|
|
2
|
+
// Main headline section with background image
|
|
3
|
+
headlineSection: {
|
|
4
|
+
display: "flex",
|
|
5
|
+
flexDirection: "column",
|
|
6
|
+
justifyContent: "space-between",
|
|
7
|
+
gap: "10px",
|
|
8
|
+
flex: "0.5",
|
|
9
|
+
backgroundImage: `url(${props.quizImage || props.imagePlaceholder})`,
|
|
10
|
+
backgroundSize: "cover",
|
|
11
|
+
backgroundPosition: "center",
|
|
12
|
+
borderTopLeftRadius: props.mdBorderRadius,
|
|
13
|
+
borderTopRightRadius: { xs: props.mdBorderRadius, md: "0" },
|
|
14
|
+
borderBottomLeftRadius: { xs: 0, md: props.mdBorderRadius },
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
height: "auto",
|
|
17
|
+
position: "relative",
|
|
18
|
+
minHeight: { xs: "210px", md: "430px" },
|
|
19
|
+
"&::before": {
|
|
20
|
+
content: '""',
|
|
21
|
+
position: "absolute",
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: "100%",
|
|
24
|
+
background: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
25
|
+
borderTopLeftRadius: "5px",
|
|
26
|
+
borderTopRightRadius: "5px",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
// Headline content wrapper
|
|
30
|
+
headlineContent: {
|
|
31
|
+
zIndex: 1,
|
|
32
|
+
height: "100%",
|
|
33
|
+
p: props.spacingScale.xl,
|
|
34
|
+
gap: props.spacingScale.xl,
|
|
35
|
+
display: "flex",
|
|
36
|
+
flexDirection: "column",
|
|
37
|
+
justifyContent: "space-between",
|
|
38
|
+
},
|
|
39
|
+
// Quiz headline typography
|
|
40
|
+
quizHeadlineText: {
|
|
41
|
+
fontWeight: 500,
|
|
42
|
+
lineHeight: "166%",
|
|
43
|
+
letterSpacing: "1px",
|
|
44
|
+
fontSize: "0.75rem",
|
|
45
|
+
color: props.brandingColors?.secondaryColor || props.darkTextColor,
|
|
46
|
+
opacity: "70%",
|
|
47
|
+
textTransform: "uppercase",
|
|
48
|
+
fontFamily: props.fontFamilySecondary,
|
|
49
|
+
textAlign: { xs: "center", md: "left" },
|
|
50
|
+
},
|
|
51
|
+
// Content container
|
|
52
|
+
contentContainer: {
|
|
53
|
+
display: "flex",
|
|
54
|
+
flexDirection: "column",
|
|
55
|
+
gap: props.spacingScale["3xs"],
|
|
56
|
+
},
|
|
57
|
+
// Quiz title typography
|
|
58
|
+
quizTitleText: {
|
|
59
|
+
fontWeight: 700,
|
|
60
|
+
lineHeight: "133%",
|
|
61
|
+
fontSize: "1.5rem",
|
|
62
|
+
letterSpacing: "0.15px",
|
|
63
|
+
color: props.brandingColors?.contentColor || props.darkTextColor,
|
|
64
|
+
fontFamily: props.fontFamilyPrimary,
|
|
65
|
+
textAlign: { xs: "center", md: "left" },
|
|
66
|
+
},
|
|
67
|
+
// Quiz description typography
|
|
68
|
+
quizDescriptionText: {
|
|
69
|
+
fontWeight: 500,
|
|
70
|
+
lineHeight: "140%",
|
|
71
|
+
fontSize: "1.25rem",
|
|
72
|
+
letterSpacing: "0.15px",
|
|
73
|
+
color: props.brandingColors?.secondaryColor || props.darkTextColor,
|
|
74
|
+
opacity: "70%",
|
|
75
|
+
fontFamily: props.fontFamilyPrimary,
|
|
76
|
+
textAlign: { xs: "center", md: "left" },
|
|
77
|
+
},
|
|
78
|
+
// Presented by desktop container
|
|
79
|
+
presentedByDesktop: {
|
|
80
|
+
display: { xs: "none", md: "block" },
|
|
81
|
+
},
|
|
82
|
+
// Question area (error section)
|
|
83
|
+
questionArea: {
|
|
84
|
+
flex: "0.5",
|
|
85
|
+
display: "flex",
|
|
86
|
+
flexDirection: "column",
|
|
87
|
+
justifyContent: "center",
|
|
88
|
+
gap: props.spacingScale.md,
|
|
89
|
+
p: props.spacingScale.lg,
|
|
90
|
+
},
|
|
91
|
+
// Presented by mobile container
|
|
92
|
+
presentedByMobile: {
|
|
93
|
+
display: { xs: "block", md: "none" },
|
|
94
|
+
},
|
|
95
|
+
});
|
|
@@ -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 StandardScoreStateProps = {
|
|
5
|
+
summary: ClassicQuizUserParticipationModel;
|
|
6
|
+
totalTime: number;
|
|
7
|
+
showAnswerExplanations: boolean;
|
|
8
|
+
maxAttemptsReached: boolean;
|
|
9
|
+
classicQuiz: ClassicQuizFullModel;
|
|
10
|
+
sdk: FansUnitedSDKModel;
|
|
11
|
+
leads?: LeadsOptions;
|
|
12
|
+
playAgain: () => void;
|
|
13
|
+
};
|
|
14
|
+
declare const SplitScoreState: React.FC<StandardScoreStateProps>;
|
|
15
|
+
export default SplitScoreState;
|
|
16
|
+
//# sourceMappingURL=SplitScoreState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitScoreState.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Variants/Split/ScoreState/SplitScoreState.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAIL,YAAY,EAQb,MAAM,oBAAoB,CAAC;AAc5B,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,iCAAiC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,oBAAoB,CAAC;IAClC,GAAG,EAAE,kBAAkB,CAAC;IACxB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsStD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|