fansunited-frontend-components 0.0.1-RC3 → 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.
Files changed (162) hide show
  1. package/{dist/esm/components.js → classic-quiz-play.es.js} +1 -1
  2. package/classic-quiz-play.umd.js +174 -0
  3. package/index.d.ts +3 -0
  4. package/package.json +4 -26
  5. package/src/components/ClassicQuizNotFound.d.ts +4 -0
  6. package/src/components/ClassicQuizNotFound.d.ts.map +1 -0
  7. package/src/components/ClassicQuizNotFound.js +55 -0
  8. package/src/components/ClassicQuizPlay.d.ts +5 -0
  9. package/src/components/ClassicQuizPlay.d.ts.map +1 -0
  10. package/src/components/ClassicQuizPlay.js +321 -0
  11. package/src/components/Leads/CollectLead.d.ts +22 -0
  12. package/src/components/Leads/CollectLead.d.ts.map +1 -0
  13. package/src/components/Leads/CollectLead.js +20 -0
  14. package/src/components/Leads/LeadAgreementCheckbox.d.ts +10 -0
  15. package/src/components/Leads/LeadAgreementCheckbox.d.ts.map +1 -0
  16. package/src/components/Leads/LeadAgreementCheckbox.js +45 -0
  17. package/src/components/Leads/LeadForm.d.ts +20 -0
  18. package/src/components/Leads/LeadForm.d.ts.map +1 -0
  19. package/src/components/Leads/LeadForm.js +289 -0
  20. package/src/components/Shared/AlertMessage.d.ts +10 -0
  21. package/src/components/Shared/AlertMessage.d.ts.map +1 -0
  22. package/src/components/Shared/AlertMessage.js +37 -0
  23. package/src/components/Shared/Answers/Answers.d.ts +14 -0
  24. package/src/components/Shared/Answers/Answers.d.ts.map +1 -0
  25. package/src/components/Shared/Answers/Answers.js +31 -0
  26. package/src/components/Shared/Answers/Option.d.ts +13 -0
  27. package/src/components/Shared/Answers/Option.d.ts.map +1 -0
  28. package/src/components/Shared/Answers/Option.js +118 -0
  29. package/src/components/Shared/Button.d.ts +12 -0
  30. package/src/components/Shared/Button.d.ts.map +1 -0
  31. package/src/components/Shared/Button.js +43 -0
  32. package/src/components/Shared/MainCard.d.ts +10 -0
  33. package/src/components/Shared/MainCard.d.ts.map +1 -0
  34. package/src/components/Shared/MainCard.js +24 -0
  35. package/src/components/Shared/Pagination.d.ts +10 -0
  36. package/src/components/Shared/Pagination.d.ts.map +1 -0
  37. package/src/components/Shared/Pagination.js +118 -0
  38. package/src/components/Shared/PresentedBy.d.ts +8 -0
  39. package/src/components/Shared/PresentedBy.d.ts.map +1 -0
  40. package/src/components/Shared/PresentedBy.js +51 -0
  41. package/src/components/Shared/ScoreStateWrapper.d.ts +13 -0
  42. package/src/components/Shared/ScoreStateWrapper.d.ts.map +1 -0
  43. package/src/components/Shared/ScoreStateWrapper.js +254 -0
  44. package/src/components/Shared/Stepper.d.ts +11 -0
  45. package/src/components/Shared/Stepper.d.ts.map +1 -0
  46. package/src/components/Shared/Stepper.js +75 -0
  47. package/src/components/Shared/Stopwatch.d.ts +12 -0
  48. package/src/components/Shared/Stopwatch.d.ts.map +1 -0
  49. package/src/components/Shared/Stopwatch.js +103 -0
  50. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.d.ts +8 -0
  51. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.d.ts.map +1 -0
  52. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.js +68 -0
  53. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.d.ts +118 -0
  54. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.d.ts.map +1 -0
  55. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.js +103 -0
  56. package/src/components/Variants/Overlay/OverlayVariant.d.ts +5 -0
  57. package/src/components/Variants/Overlay/OverlayVariant.d.ts.map +1 -0
  58. package/src/components/Variants/Overlay/OverlayVariant.js +100 -0
  59. package/src/components/Variants/Overlay/OverlayVariant.styles.d.ts +286 -0
  60. package/src/components/Variants/Overlay/OverlayVariant.styles.d.ts.map +1 -0
  61. package/src/components/Variants/Overlay/OverlayVariant.styles.js +266 -0
  62. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.d.ts +16 -0
  63. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.d.ts.map +1 -0
  64. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js +90 -0
  65. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.d.ts +364 -0
  66. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.d.ts.map +1 -0
  67. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.js +374 -0
  68. package/src/components/Variants/Split/AuthError/SplitAuthError.d.ts +8 -0
  69. package/src/components/Variants/Split/AuthError/SplitAuthError.d.ts.map +1 -0
  70. package/src/components/Variants/Split/AuthError/SplitAuthError.js +44 -0
  71. package/src/components/Variants/Split/AuthError/SplitAuthError.styles.d.ts +126 -0
  72. package/src/components/Variants/Split/AuthError/SplitAuthError.styles.d.ts.map +1 -0
  73. package/src/components/Variants/Split/AuthError/SplitAuthError.styles.js +95 -0
  74. package/src/components/Variants/Split/ScoreState/SplitScoreState.d.ts +16 -0
  75. package/src/components/Variants/Split/ScoreState/SplitScoreState.d.ts.map +1 -0
  76. package/src/components/Variants/Split/ScoreState/SplitScoreState.js +84 -0
  77. package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.d.ts +403 -0
  78. package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.d.ts.map +1 -0
  79. package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.js +400 -0
  80. package/src/components/Variants/Split/SplitVariant.d.ts +5 -0
  81. package/src/components/Variants/Split/SplitVariant.d.ts.map +1 -0
  82. package/src/components/Variants/Split/SplitVariant.js +79 -0
  83. package/src/components/Variants/Split/SplitVariant.styles.d.ts +252 -0
  84. package/src/components/Variants/Split/SplitVariant.styles.d.ts.map +1 -0
  85. package/src/components/Variants/Split/SplitVariant.styles.js +216 -0
  86. package/src/components/Variants/Standard/AuthError/StandardAuthError.d.ts +9 -0
  87. package/src/components/Variants/Standard/AuthError/StandardAuthError.d.ts.map +1 -0
  88. package/src/components/Variants/Standard/AuthError/StandardAuthError.js +43 -0
  89. package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.d.ts +231 -0
  90. package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.d.ts.map +1 -0
  91. package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.js +201 -0
  92. package/src/components/Variants/Standard/ScoreState/StandardScoreState.d.ts +17 -0
  93. package/src/components/Variants/Standard/ScoreState/StandardScoreState.d.ts.map +1 -0
  94. package/src/components/Variants/Standard/ScoreState/StandardScoreState.js +78 -0
  95. package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.d.ts +350 -0
  96. package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.d.ts.map +1 -0
  97. package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.js +349 -0
  98. package/src/components/Variants/Standard/StandardVariant.d.ts +10 -0
  99. package/src/components/Variants/Standard/StandardVariant.d.ts.map +1 -0
  100. package/src/components/Variants/Standard/StandardVariant.js +82 -0
  101. package/src/components/Variants/Standard/StandardVariant.styles.d.ts +414 -0
  102. package/src/components/Variants/Standard/StandardVariant.styles.d.ts.map +1 -0
  103. package/src/components/Variants/Standard/StandardVariant.styles.js +373 -0
  104. package/src/constants/constants.d.ts +7 -0
  105. package/src/constants/constants.d.ts.map +1 -0
  106. package/src/constants/constants.js +446 -0
  107. package/src/hooks/useClassicQuizById.d.ts +3 -0
  108. package/src/hooks/useClassicQuizById.d.ts.map +1 -0
  109. package/src/hooks/useClassicQuizById.js +20 -0
  110. package/src/hooks/useEmbedCodeContainer.d.ts +2 -0
  111. package/src/hooks/useEmbedCodeContainer.d.ts.map +1 -0
  112. package/src/hooks/useEmbedCodeContainer.js +38 -0
  113. package/src/hooks/useMyParticipation.d.ts +3 -0
  114. package/src/hooks/useMyParticipation.d.ts.map +1 -0
  115. package/src/hooks/useMyParticipation.js +22 -0
  116. package/src/hooks/useScoreStateHelpers.d.ts +18 -0
  117. package/src/hooks/useScoreStateHelpers.d.ts.map +1 -0
  118. package/src/hooks/useScoreStateHelpers.js +156 -0
  119. package/src/index.d.ts +3 -0
  120. package/src/index.d.ts.map +1 -0
  121. package/src/index.js +2 -0
  122. package/src/main.d.ts +5 -0
  123. package/src/main.d.ts.map +1 -0
  124. package/src/main.js +53 -0
  125. package/src/services/service.d.ts +1 -0
  126. package/src/services/service.d.ts.map +1 -0
  127. package/src/services/service.js +1 -0
  128. package/src/styles/form.styles.d.ts +19 -0
  129. package/src/styles/form.styles.d.ts.map +1 -0
  130. package/src/styles/form.styles.js +18 -0
  131. package/src/types/types.d.ts +28 -0
  132. package/src/types/types.d.ts.map +1 -0
  133. package/src/types/types.js +1 -0
  134. package/tsconfig.tsbuildinfo +1 -0
  135. package/dist/esm/components.d.ts +0 -1
  136. package/dist/esm/src/index.d.ts +0 -4
  137. package/dist/esm/src/index.d.ts.map +0 -1
  138. package/dist/esm/src/indexUmd.d.ts +0 -2
  139. package/dist/esm/src/indexUmd.d.ts.map +0 -1
  140. package/dist/esm/vite.config.d.ts +0 -3
  141. package/dist/esm/vite.config.d.ts.map +0 -1
  142. package/dist/esm/vite.config.umd.d.ts +0 -3
  143. package/dist/esm/vite.config.umd.d.ts.map +0 -1
  144. package/dist/src/index.d.ts +0 -3
  145. package/dist/src/index.d.ts.map +0 -1
  146. package/dist/src/index.js +0 -2
  147. package/dist/src/indexUmd.d.ts +0 -2
  148. package/dist/src/indexUmd.d.ts.map +0 -1
  149. package/dist/src/indexUmd.js +0 -4
  150. package/dist/tsconfig.tsbuildinfo +0 -1
  151. package/dist/vite.config.d.ts +0 -3
  152. package/dist/vite.config.d.ts.map +0 -1
  153. package/dist/vite.config.js +0 -38
  154. package/dist/vite.config.umd.d.ts +0 -3
  155. package/dist/vite.config.umd.d.ts.map +0 -1
  156. package/dist/vite.config.umd.js +0 -35
  157. package/src/index.ts +0 -3
  158. package/src/indexUmd.ts +0 -5
  159. package/tsconfig.json +0 -10
  160. package/vite.config.ts +0 -42
  161. package/vite.config.umd.ts +0 -39
  162. package/vite.config_2.ts +0 -30
@@ -0,0 +1,252 @@
1
+ import { CustomSpacingScale, CustomBorderRadius } from "@fansunited/common";
2
+ import { BrandingColorsModel } from "fansunited-sdk-esm";
3
+ import { CSSProperties } from "react";
4
+ interface StyleProps {
5
+ quizImage: string | null;
6
+ questionImage: string | null;
7
+ imagePlaceholder: string;
8
+ spacingScale: CustomSpacingScale;
9
+ borderRadius: CustomBorderRadius;
10
+ fontFamilyPrimary: string;
11
+ fontFamilySecondary: string;
12
+ secondaryColor: string;
13
+ opacity: string;
14
+ buttonRadius: string;
15
+ bgcolor: string;
16
+ primaryColor: string;
17
+ onPrimaryColor: string;
18
+ textColor: string;
19
+ brandingColors: BrandingColorsModel | null;
20
+ darkTextColor: string;
21
+ applyFilterScreen: boolean;
22
+ }
23
+ export declare const createStyles: (props: StyleProps) => {
24
+ pulseAnimation: {
25
+ "@keyframes pulse": {
26
+ "0%": {
27
+ transform: string;
28
+ };
29
+ "50%": {
30
+ transform: string;
31
+ };
32
+ "100%": {
33
+ transform: string;
34
+ };
35
+ };
36
+ };
37
+ headlineSection: {
38
+ display: string;
39
+ flexDirection: string;
40
+ justifyContent: string;
41
+ gap: string;
42
+ flex: string;
43
+ backgroundImage: string;
44
+ backgroundSize: string;
45
+ backgroundPosition: string;
46
+ borderTopLeftRadius: string;
47
+ borderTopRightRadius: {
48
+ xs: string;
49
+ md: string;
50
+ };
51
+ borderBottomLeftRadius: {
52
+ xs: number;
53
+ md: string;
54
+ };
55
+ overflow: string;
56
+ height: string;
57
+ position: string;
58
+ minHeight: {
59
+ xs: string;
60
+ md: string;
61
+ };
62
+ "&::before": {
63
+ content: string;
64
+ position: string;
65
+ width: string;
66
+ height: string;
67
+ background: string;
68
+ borderTopLeftRadius: string;
69
+ borderTopRightRadius: string;
70
+ };
71
+ };
72
+ headlineContent: {
73
+ zIndex: number;
74
+ height: string;
75
+ p: string;
76
+ gap: string;
77
+ display: string;
78
+ flexDirection: string;
79
+ justifyContent: string;
80
+ };
81
+ quizHeadlineText: {
82
+ fontWeight: number;
83
+ lineHeight: string;
84
+ letterSpacing: string;
85
+ fontSize: string;
86
+ color: string;
87
+ opacity: string;
88
+ textTransform: string;
89
+ fontFamily: string;
90
+ textAlign: {
91
+ xs: string;
92
+ md: string;
93
+ };
94
+ };
95
+ contentContainer: {
96
+ display: string;
97
+ flexDirection: string;
98
+ gap: string;
99
+ };
100
+ quizTitleText: {
101
+ fontWeight: number;
102
+ lineHeight: string;
103
+ fontSize: string;
104
+ letterSpacing: string;
105
+ color: string;
106
+ fontFamily: string;
107
+ textAlign: {
108
+ xs: string;
109
+ md: string;
110
+ };
111
+ };
112
+ quizDescriptionText: {
113
+ fontWeight: number;
114
+ lineHeight: string;
115
+ fontSize: string;
116
+ letterSpacing: string;
117
+ color: string;
118
+ opacity: string;
119
+ fontFamily: string;
120
+ textAlign: {
121
+ xs: string;
122
+ md: string;
123
+ };
124
+ };
125
+ filterScreenBottomContainer: {
126
+ display: string;
127
+ flexDirection: {
128
+ md: string;
129
+ xs: string;
130
+ };
131
+ justifyContent: string;
132
+ alignItems: string;
133
+ gap: string;
134
+ };
135
+ startButton: {
136
+ borderRadius: string;
137
+ bgcolor: string;
138
+ color: string;
139
+ "&:hover": {
140
+ bgcolor: string;
141
+ };
142
+ "&:active": {
143
+ color: string;
144
+ };
145
+ animation: string;
146
+ };
147
+ startButtonText: {
148
+ fontFamily: string;
149
+ fontWeight: number;
150
+ fontSize: string;
151
+ lineHeight: string;
152
+ letterSpacing: string;
153
+ textTransform: string;
154
+ color: string;
155
+ gap: string;
156
+ display: string;
157
+ alignItems: string;
158
+ };
159
+ presentedByDesktop: {
160
+ display: {
161
+ xs: string;
162
+ md: string;
163
+ };
164
+ };
165
+ questionArea: {
166
+ flex: string;
167
+ display: string;
168
+ flexDirection: string;
169
+ justifyContent: string;
170
+ gap: string;
171
+ p: string;
172
+ };
173
+ stopwatchContainer: {
174
+ display: string;
175
+ justifyContent: string;
176
+ };
177
+ leadContentContainer: {
178
+ p: string;
179
+ gap: string;
180
+ display: string;
181
+ flexDirection: string;
182
+ backdropFilter: string;
183
+ bgcolor: string;
184
+ borderRadius: string;
185
+ };
186
+ mainContentContainer: {
187
+ p: string;
188
+ gap: string;
189
+ display: string;
190
+ flexDirection: string;
191
+ backdropFilter: string;
192
+ bgcolor: string;
193
+ borderRadius: string;
194
+ };
195
+ aspectRatioContainer: {
196
+ borderRadius: string;
197
+ };
198
+ questionImageContainer: {
199
+ overflow: string;
200
+ borderRadius: string;
201
+ };
202
+ questionImageBox: {
203
+ borderRadius: string;
204
+ overflow: string;
205
+ height: string;
206
+ };
207
+ questionImage: {
208
+ width: string;
209
+ height: string;
210
+ objectFit: CSSProperties["objectFit"];
211
+ };
212
+ questionSection: {
213
+ gap: string;
214
+ display: {
215
+ md: string;
216
+ xs: string;
217
+ };
218
+ justifyContent: string;
219
+ };
220
+ questionStepsText: {
221
+ fontFamily: string;
222
+ lineHeight: string;
223
+ letterSpacing: string;
224
+ fontWeight: number;
225
+ fontSize: string;
226
+ color: string;
227
+ opacity: string;
228
+ textAlign: string;
229
+ };
230
+ questionText: {
231
+ fontFamily: string;
232
+ lineHeight: string;
233
+ letterSpacing: string;
234
+ fontWeight: number;
235
+ fontSize: string;
236
+ textAlign: string;
237
+ color: string;
238
+ };
239
+ buttonFooterContainer: {
240
+ display: string;
241
+ flexDirection: string;
242
+ gap: string;
243
+ };
244
+ presentedByMobile: {
245
+ display: {
246
+ xs: string;
247
+ md: string;
248
+ };
249
+ };
250
+ };
251
+ export {};
252
+ //# sourceMappingURL=SplitVariant.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SplitVariant.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Variants/Split/SplitVariant.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,UAAU,UAAU;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,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,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,UAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAuMpB,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ClD,CAAC"}
@@ -0,0 +1,216 @@
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 headline section with background image
11
+ headlineSection: {
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ justifyContent: "space-between",
15
+ gap: "10px",
16
+ flex: "0.5",
17
+ backgroundImage: `url(${props.quizImage || props.imagePlaceholder})`,
18
+ backgroundSize: "cover",
19
+ backgroundPosition: "center",
20
+ borderTopLeftRadius: props.borderRadius.md,
21
+ borderTopRightRadius: { xs: props.borderRadius.md, md: "0" },
22
+ borderBottomLeftRadius: { xs: 0, md: props.borderRadius.md },
23
+ overflow: "hidden",
24
+ height: "auto",
25
+ position: "relative",
26
+ minHeight: { xs: "210px", md: "430px" },
27
+ "&::before": {
28
+ content: '""',
29
+ position: "absolute",
30
+ width: "100%",
31
+ height: "100%",
32
+ background: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
33
+ borderTopLeftRadius: "5px",
34
+ borderTopRightRadius: "5px",
35
+ },
36
+ },
37
+ // Headline content wrapper
38
+ headlineContent: {
39
+ zIndex: 1,
40
+ height: "100%",
41
+ p: props.spacingScale.xl,
42
+ gap: props.spacingScale.xl,
43
+ display: "flex",
44
+ flexDirection: "column",
45
+ justifyContent: "space-between",
46
+ },
47
+ // Quiz headline typography
48
+ quizHeadlineText: {
49
+ fontWeight: 500,
50
+ lineHeight: "166%",
51
+ letterSpacing: "1px",
52
+ fontSize: "0.75rem",
53
+ color: props.brandingColors?.secondaryColor || props.darkTextColor,
54
+ opacity: "70%",
55
+ textTransform: "uppercase",
56
+ fontFamily: props.fontFamilySecondary,
57
+ textAlign: { xs: "center", md: "left" },
58
+ },
59
+ // Content container
60
+ contentContainer: {
61
+ display: "flex",
62
+ flexDirection: "column",
63
+ gap: props.spacingScale["3xs"],
64
+ },
65
+ // Quiz title typography
66
+ quizTitleText: {
67
+ fontWeight: 700,
68
+ lineHeight: "133%",
69
+ fontSize: "1.5rem",
70
+ letterSpacing: "0.15px",
71
+ color: props.brandingColors?.contentColor || props.darkTextColor,
72
+ fontFamily: props.fontFamilyPrimary,
73
+ textAlign: { xs: "center", md: "left" },
74
+ },
75
+ // Quiz description typography
76
+ quizDescriptionText: {
77
+ fontWeight: 500,
78
+ lineHeight: "140%",
79
+ fontSize: "1.25rem",
80
+ letterSpacing: "0.15px",
81
+ color: props.brandingColors?.secondaryColor || props.darkTextColor,
82
+ opacity: "70%",
83
+ fontFamily: props.fontFamilyPrimary,
84
+ textAlign: { xs: "center", md: "left" },
85
+ },
86
+ // Filter screen bottom container
87
+ filterScreenBottomContainer: {
88
+ display: "flex",
89
+ flexDirection: { md: "row", xs: "column-reverse" },
90
+ justifyContent: "space-between",
91
+ alignItems: "center",
92
+ gap: props.spacingScale.lg,
93
+ },
94
+ // Start button (filter screen)
95
+ startButton: {
96
+ borderRadius: props.buttonRadius,
97
+ bgcolor: props.primaryColor,
98
+ color: props.onPrimaryColor,
99
+ "&:hover": {
100
+ bgcolor: props.primaryColor,
101
+ },
102
+ "&:active": {
103
+ color: props.onPrimaryColor,
104
+ },
105
+ animation: "pulse 1s infinite",
106
+ },
107
+ // Start button text
108
+ startButtonText: {
109
+ fontFamily: props.fontFamilyPrimary,
110
+ fontWeight: 500,
111
+ fontSize: "0.9375rem",
112
+ lineHeight: "24px",
113
+ letterSpacing: "0.46px",
114
+ textTransform: "uppercase",
115
+ color: "#FFFFFF",
116
+ gap: "8px",
117
+ display: "flex",
118
+ alignItems: "center",
119
+ },
120
+ // Presented by desktop container
121
+ presentedByDesktop: {
122
+ display: { xs: "none", md: "block" },
123
+ },
124
+ // Question area
125
+ questionArea: {
126
+ flex: "0.5",
127
+ display: props.applyFilterScreen ? "none" : "flex",
128
+ flexDirection: "column",
129
+ justifyContent: "center",
130
+ gap: "10px",
131
+ p: props.spacingScale.lg,
132
+ },
133
+ // Stopwatch container
134
+ stopwatchContainer: {
135
+ display: "flex",
136
+ justifyContent: "center",
137
+ },
138
+ // Lead content container (filter screen)
139
+ leadContentContainer: {
140
+ p: props.spacingScale.md,
141
+ gap: props.spacingScale.md,
142
+ display: "flex",
143
+ flexDirection: "column",
144
+ backdropFilter: "blur(4px)",
145
+ bgcolor: `rgba(${props.bgcolor ? props.bgcolor.replace(/[^\d,]/g, "") : ""}, 0.5)`,
146
+ borderRadius: props.borderRadius.sm,
147
+ },
148
+ // Main content container
149
+ mainContentContainer: {
150
+ p: props.spacingScale.lg,
151
+ gap: props.spacingScale.md,
152
+ display: "flex",
153
+ flexDirection: "column",
154
+ backdropFilter: "blur(4px)",
155
+ bgcolor: `rgba(${props.bgcolor ? props.bgcolor.replace(/[^\d,]/g, "") : ""}, 0.5)`,
156
+ borderRadius: props.borderRadius.sm,
157
+ },
158
+ // Aspect ratio container for embed/image
159
+ aspectRatioContainer: {
160
+ borderRadius: props.borderRadius.sm,
161
+ },
162
+ // Question image container
163
+ questionImageContainer: {
164
+ overflow: "hidden",
165
+ borderRadius: props.borderRadius.sm,
166
+ },
167
+ // Question image box
168
+ questionImageBox: {
169
+ borderRadius: props.borderRadius.sm,
170
+ overflow: "hidden",
171
+ height: "auto",
172
+ },
173
+ // Question image
174
+ questionImage: {
175
+ width: "100%",
176
+ height: "100%",
177
+ objectFit: "cover",
178
+ },
179
+ // Question section
180
+ questionSection: {
181
+ gap: "8px",
182
+ display: { md: "flex", xs: "block" },
183
+ justifyContent: "center",
184
+ },
185
+ // Question steps typography
186
+ questionStepsText: {
187
+ fontFamily: props.fontFamilyPrimary,
188
+ lineHeight: "150%",
189
+ letterSpacing: "0.15px",
190
+ fontWeight: 500,
191
+ fontSize: "1.25rem",
192
+ color: props.secondaryColor,
193
+ opacity: props.opacity,
194
+ textAlign: "center",
195
+ },
196
+ // Question text
197
+ questionText: {
198
+ fontFamily: props.fontFamilyPrimary,
199
+ lineHeight: "150%",
200
+ letterSpacing: "0.15px",
201
+ fontWeight: 500,
202
+ fontSize: "1.25rem",
203
+ textAlign: "center",
204
+ color: props.textColor,
205
+ },
206
+ // Button and footer container
207
+ buttonFooterContainer: {
208
+ display: "flex",
209
+ flexDirection: "column",
210
+ gap: props.spacingScale.lg,
211
+ },
212
+ // Presented by mobile container
213
+ presentedByMobile: {
214
+ display: { xs: "block", md: "none" },
215
+ },
216
+ });
@@ -0,0 +1,9 @@
1
+ import { ClassicQuizFullModel } from "fansunited-sdk-esm";
2
+ import React from "react";
3
+ type StandardAuthErrorProps = {
4
+ classicQuiz: ClassicQuizFullModel;
5
+ imagePosition?: "left" | "right";
6
+ };
7
+ declare const StandardAuthError: React.FC<StandardAuthErrorProps>;
8
+ export default StandardAuthError;
9
+ //# sourceMappingURL=StandardAuthError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StandardAuthError.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Variants/Standard/AuthError/StandardAuthError.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,sBAAsB,GAAG;IAC5B,WAAW,EAAE,oBAAoB,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqJvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import AlertMessage from "../../../Shared/AlertMessage";
3
+ import MainCard from "../../../Shared/MainCard";
4
+ import PresentedBy from "../../../Shared/PresentedBy";
5
+ import { stripHtmlTags, useImageUrl, isMobile, useColors, useCornerRadius, useFontFamily, useSpacingScale, useInternalTheme, } from "@fansunited/common";
6
+ import { Box, Typography } from "@mui/joy";
7
+ import { useTranslation } from "react-i18next";
8
+ import { createStyles } from "./StandardAuthError.styles";
9
+ const StandardAuthError = (props) => {
10
+ const brandingColors = props.classicQuiz.branding?.colors || null;
11
+ const theme = useInternalTheme();
12
+ const quizImage = useImageUrl(props.classicQuiz.images);
13
+ const spacingScale = useSpacingScale();
14
+ const fontFamilyPrimary = useFontFamily().primary;
15
+ const fontFamilySecondary = useFontFamily().secondary;
16
+ const borderRadius = useCornerRadius();
17
+ const textColor = brandingColors?.contentColor || useColors().textColor;
18
+ const secondaryColor = brandingColors?.secondaryColor || useColors().textColor;
19
+ const brandingLogo = isMobile()
20
+ ? props.classicQuiz.branding?.images.mobileLogo ||
21
+ props.classicQuiz.branding?.images.mainLogo ||
22
+ ""
23
+ : props.classicQuiz.branding?.images.mainLogo || "";
24
+ const { t } = useTranslation();
25
+ const imagePosition = props.imagePosition || "left";
26
+ const opacity = "60%";
27
+ // Create styles with current props/theme values
28
+ const styles = createStyles({
29
+ quizImage,
30
+ spacingScale,
31
+ borderRadius,
32
+ fontFamilyPrimary,
33
+ fontFamilySecondary,
34
+ textColor,
35
+ secondaryColor,
36
+ brandingColors,
37
+ darkTextColor: theme.colorSchemes.dark.textColor,
38
+ opacity,
39
+ imagePosition,
40
+ });
41
+ return (_jsxs(MainCard, { brandingBorderColor: brandingColors?.borderColor || null, children: [quizImage ? (_jsx(Box, { sx: styles.mobileHeadlineWithImage, children: _jsx(Box, { sx: styles.mobileHeadlineContent, children: _jsxs(Box, { children: [_jsx(Typography, { level: "body-sm", sx: styles.headlineTypographyMobileImage, children: t("classicQuiz.headline") }), _jsxs(Box, { sx: styles.contentContainer, children: [_jsx(Typography, { level: "body-lg", sx: styles.titleTypographyMobileImage, children: props.classicQuiz.title }), _jsx(Typography, { level: "body-md", sx: styles.descriptionTypographyMobileImage, children: stripHtmlTags(props.classicQuiz.description) })] })] }) }) })) : (_jsx(Box, { sx: styles.mobileHeadlineWithoutImage, children: _jsxs(Box, { children: [_jsx(Typography, { level: "body-sm", sx: styles.headlineTypography, children: t("classicQuiz.headline") }), _jsxs(Box, { sx: styles.contentContainer, children: [_jsx(Typography, { level: "h4", sx: styles.titleTypography, children: props.classicQuiz.title }), _jsx(Typography, { level: "body-md", sx: styles.descriptionTypography, children: stripHtmlTags(props.classicQuiz.description) })] })] }) })), quizImage && imagePosition === "left" && (_jsx(Box, { sx: styles.imageContainerLeft, children: _jsx("img", { src: quizImage, alt: "Quiz illustration", style: styles.quizImage }) })), _jsxs(Box, { sx: styles.mainContentArea, children: [_jsx(Box, { children: _jsx(Box, { sx: styles.desktopHeadlineContainer, children: _jsxs(Box, { children: [_jsx(Typography, { level: "body-sm", sx: styles.headlineTypography, children: t("classicQuiz.headline") }), _jsxs(Box, { sx: styles.contentContainer, children: [_jsx(Typography, { level: "h4", sx: styles.titleTypographyDesktop, children: props.classicQuiz.title }), _jsx(Typography, { level: "body-md", sx: styles.descriptionTypographyDesktop, children: stripHtmlTags(props.classicQuiz.description) })] })] }) }) }), _jsx(Box, { sx: styles.questionArea, children: _jsxs(Box, { sx: styles.questionContainer, children: [_jsx(Box, { sx: styles.alertContainer, children: _jsx(AlertMessage, { variant: "error", title: t("common.authentication.accessRequired"), message: t("common.authentication.invalidOrMissingAuth") }) }), _jsx(PresentedBy, { brandingLogo: brandingLogo, textColor: textColor })] }) })] }), quizImage && imagePosition === "right" && (_jsx(Box, { sx: styles.imageContainerRight, children: _jsx("img", { src: quizImage, alt: "Quiz illustration", style: styles.quizImage }) }))] }));
42
+ };
43
+ export default StandardAuthError;