fansunited-frontend-core 0.0.25 → 0.0.26
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/README.md +98 -0
- package/components/Portal.d.ts +11 -0
- package/components/Portal.d.ts.map +1 -0
- package/components/Skeletons/NotFoundSkeleton.d.ts +28 -0
- package/components/Skeletons/NotFoundSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.d.ts +16 -0
- package/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.styles.d.ts +191 -0
- package/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Overlay/OverlaySkeleton.d.ts +45 -0
- package/components/Skeletons/Overlay/OverlaySkeleton.d.ts.map +1 -0
- package/components/Skeletons/Overlay/OverlaySkeleton.styles.d.ts +111 -0
- package/components/Skeletons/Overlay/OverlaySkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.d.ts +50 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.styles.d.ts +107 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.d.ts +52 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.styles.d.ts +63 -0
- package/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.d.ts +20 -0
- package/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.styles.d.ts +105 -0
- package/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.d.ts +16 -0
- package/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.styles.d.ts +166 -0
- package/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.d.ts +60 -0
- package/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.styles.d.ts +111 -0
- package/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Split/SignIn/SplitSignInSkeleton.d.ts +53 -0
- package/components/Skeletons/Split/SignIn/SplitSignInSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Split/SignIn/SplitSignInSkeleton.styles.d.ts +100 -0
- package/components/Skeletons/Split/SignIn/SplitSignInSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Split/SplitSkeleton.d.ts +56 -0
- package/components/Skeletons/Split/SplitSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Split/SplitSkeleton.styles.d.ts +189 -0
- package/components/Skeletons/Split/SplitSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.d.ts +17 -0
- package/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.styles.d.ts +266 -0
- package/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.d.ts +45 -0
- package/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.styles.d.ts +41 -0
- package/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.d.ts +45 -0
- package/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.styles.d.ts +203 -0
- package/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.d.ts +57 -0
- package/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.styles.d.ts +192 -0
- package/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.styles.d.ts.map +1 -0
- package/components/Skeletons/Standard/StandardSkeleton.d.ts +59 -0
- package/components/Skeletons/Standard/StandardSkeleton.d.ts.map +1 -0
- package/components/Skeletons/Standard/StandardSkeleton.styles.d.ts +207 -0
- package/components/Skeletons/Standard/StandardSkeleton.styles.d.ts.map +1 -0
- package/index.d.ts +15 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +10947 -7613
- package/interfaces/interfaces.d.ts +27 -1
- package/interfaces/interfaces.d.ts.map +1 -1
- package/locales/bg.json.d.ts +106 -1
- package/locales/en.json.d.ts +106 -0
- package/package.json +1 -1
- package/types/types.d.ts +1 -0
- package/types/types.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,7 @@ import {
|
|
|
81
81
|
CTADetails,
|
|
82
82
|
SignInCTADetails,
|
|
83
83
|
OnSuccessCTADetails,
|
|
84
|
+
AdditionalCTADetails,
|
|
84
85
|
|
|
85
86
|
// Analytics and Events
|
|
86
87
|
AnalyticsEvent,
|
|
@@ -247,6 +248,103 @@ import { initializeI18n } from "fansunited-frontend-core";
|
|
|
247
248
|
initializeI18n("en");
|
|
248
249
|
```
|
|
249
250
|
|
|
251
|
+
## Call-to-Action (CTA) Interfaces
|
|
252
|
+
|
|
253
|
+
The package provides several CTA interfaces for different use cases:
|
|
254
|
+
|
|
255
|
+
### AdditionalCTADetails
|
|
256
|
+
|
|
257
|
+
Configure additional call-to-action buttons for widget completion screens.
|
|
258
|
+
|
|
259
|
+
```tsx
|
|
260
|
+
import { AdditionalCTADetails } from "fansunited-frontend-core";
|
|
261
|
+
|
|
262
|
+
// Custom component
|
|
263
|
+
const additionalCTA: AdditionalCTADetails = {
|
|
264
|
+
component: <CustomCTAButton />,
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// Basic CTA with onClick handler
|
|
268
|
+
const additionalCTA: AdditionalCTADetails = {
|
|
269
|
+
defaultLabel: "Learn More",
|
|
270
|
+
onClick: () => {
|
|
271
|
+
console.log("Additional CTA clicked");
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
// CTA with URL navigation
|
|
276
|
+
const additionalCTA: AdditionalCTADetails = {
|
|
277
|
+
defaultLabel: "Visit Website",
|
|
278
|
+
url: "https://your-website.com",
|
|
279
|
+
target: "_blank", // or "_self"
|
|
280
|
+
};
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Interface Definition:**
|
|
284
|
+
|
|
285
|
+
```tsx
|
|
286
|
+
interface AdditionalCTADetails {
|
|
287
|
+
defaultLabel?: string; // Not required when component is provided
|
|
288
|
+
onClick?: () => void; // Required when only defaultLabel is provided
|
|
289
|
+
url?: string | null;
|
|
290
|
+
target?: LinkTargetType; // "_blank" | "_self" | "_parent" | "_top"
|
|
291
|
+
component?: React.ReactElement | null;
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Priority Order:**
|
|
296
|
+
|
|
297
|
+
1. **Custom Component** - If `component` is provided, it will be rendered
|
|
298
|
+
2. **Click Handler** - If `onClick` is provided, a button with the handler will be rendered
|
|
299
|
+
3. **URL Navigation** - If `url` is provided, a button will be rendered and clicking will navigate to the URL
|
|
300
|
+
|
|
301
|
+
**Usage:**
|
|
302
|
+
|
|
303
|
+
- **ClassicQuizPlay**: Displayed after "Play Again" and "Share Result" buttons (Standard), after "Play Again" (Split), after "Play Again" and "Share Result" (Overlay)
|
|
304
|
+
- **PollVote**: Displayed before "Vote Again" (Standard), same container as "Vote Again" (Split), after "Vote Again" (Overlay)
|
|
305
|
+
- **PersonalityQuizPlay**: Displayed before "Play Again" (Standard), in thank you container after "Play Again" (Split), after "Play Again" if available (Overlay)
|
|
306
|
+
- **MatchQuizPlay**: Displayed same line as branding logo (Standard), centered after main content (Split), same line as branding logo (Overlay)
|
|
307
|
+
|
|
308
|
+
### SignInCTADetails
|
|
309
|
+
|
|
310
|
+
Configure sign-in call-to-action buttons for authentication-required widgets.
|
|
311
|
+
|
|
312
|
+
```tsx
|
|
313
|
+
import { SignInCTADetails } from "fansunited-frontend-core";
|
|
314
|
+
|
|
315
|
+
// Custom component
|
|
316
|
+
const signInCTA: SignInCTADetails = {
|
|
317
|
+
component: <CustomSignInButton />,
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// Basic sign-in with onClick handler
|
|
321
|
+
const signInCTA: SignInCTADetails = {
|
|
322
|
+
defaultLabel: "Sign In",
|
|
323
|
+
onClick: () => {
|
|
324
|
+
console.log("Sign in clicked");
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
// Sign-in with URL navigation
|
|
329
|
+
const signInCTA: SignInCTADetails = {
|
|
330
|
+
defaultLabel: "Login",
|
|
331
|
+
url: "https://your-auth-provider.com/login",
|
|
332
|
+
target: "_blank",
|
|
333
|
+
};
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Interface Definition:**
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
interface SignInCTADetails {
|
|
340
|
+
defaultLabel?: string; // Not required when component is provided
|
|
341
|
+
onClick?: () => void; // Required when only defaultLabel is provided
|
|
342
|
+
url?: string | null;
|
|
343
|
+
target?: LinkTargetType; // "_blank" | "_self" | "_parent" | "_top"
|
|
344
|
+
component?: React.ReactElement | null;
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
250
348
|
## Supported Languages
|
|
251
349
|
|
|
252
350
|
- English (en)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MainProps } from '../interfaces/interfaces';
|
|
3
|
+
import { PackageNamesType } from '../types/types';
|
|
4
|
+
|
|
5
|
+
interface PortalProps extends MainProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
packageName: PackageNamesType;
|
|
8
|
+
}
|
|
9
|
+
declare const Portal: React.FC<PortalProps>;
|
|
10
|
+
export default Portal;
|
|
11
|
+
//# sourceMappingURL=Portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../src/components/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,UAAU,WAAY,SAAQ,SAAS;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,gBAAgB,CAAC;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA8FjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props for the NotFoundSkeleton component
|
|
5
|
+
*/
|
|
6
|
+
export interface NotFoundSkeletonProps {
|
|
7
|
+
/** Title for the not found message */
|
|
8
|
+
notFoundTitle: string;
|
|
9
|
+
/** Description message for the not found state */
|
|
10
|
+
notFoundMessage: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* NotFoundSkeleton Component
|
|
14
|
+
*
|
|
15
|
+
* A reusable skeleton component for displaying "not found" states across all widget packages.
|
|
16
|
+
* This component provides a consistent centered layout with a danger-colored icon and message.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <NotFoundSkeleton
|
|
21
|
+
* notFoundTitle={t("poll.pollNotFound")}
|
|
22
|
+
* notFoundMessage={t("poll.pollNotFoundDescription")}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const NotFoundSkeleton: React.FC<NotFoundSkeletonProps>;
|
|
27
|
+
export default NotFoundSkeleton;
|
|
28
|
+
//# sourceMappingURL=NotFoundSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeletons/NotFoundSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0ErD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SkeletonEntity } from '../../../../interfaces/interfaces';
|
|
3
|
+
|
|
4
|
+
export interface OverlayApiErrorSkeletonProps {
|
|
5
|
+
entity: SkeletonEntity;
|
|
6
|
+
headline: string;
|
|
7
|
+
tryAgainButtonText: string;
|
|
8
|
+
defaultImagePlaceholderUrl?: string;
|
|
9
|
+
isApiError: boolean;
|
|
10
|
+
toggleTryAgain: () => void;
|
|
11
|
+
apiErrorMessage?: string;
|
|
12
|
+
renderPresentedBy: (textColor: string) => React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const OverlayApiErrorSkeleton: React.FC<OverlayApiErrorSkeletonProps>;
|
|
15
|
+
export default OverlayApiErrorSkeleton;
|
|
16
|
+
//# sourceMappingURL=OverlayApiErrorSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayApiErrorSkeleton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CAC3D;AAED,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA8HnE,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { CustomBorderRadius, CustomSpacingScale } from '../../../../index';
|
|
2
|
+
import { BrandingColorsModel } from 'fansunited-sdk-esm';
|
|
3
|
+
|
|
4
|
+
interface StyleProps {
|
|
5
|
+
spacingScale: CustomSpacingScale;
|
|
6
|
+
brandingColors: BrandingColorsModel | null;
|
|
7
|
+
secondaryColor: string;
|
|
8
|
+
fontFamilyPrimary: string;
|
|
9
|
+
fontFamilySecondary: string;
|
|
10
|
+
borderRadius: CustomBorderRadius;
|
|
11
|
+
borderSize: string;
|
|
12
|
+
darkTextColor: string;
|
|
13
|
+
backgroundImage: string;
|
|
14
|
+
imageBackgroundGradient: string;
|
|
15
|
+
contentBgColor: string;
|
|
16
|
+
onSurfaceColor: string;
|
|
17
|
+
surfaceVariantColor: string;
|
|
18
|
+
textPrimary: string;
|
|
19
|
+
isMobile: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const createStyles: (props: StyleProps) => {
|
|
22
|
+
mainContainer: {
|
|
23
|
+
display: string;
|
|
24
|
+
flexDirection: string;
|
|
25
|
+
justifyContent: string;
|
|
26
|
+
gap: string;
|
|
27
|
+
p: string;
|
|
28
|
+
boxShadow: string;
|
|
29
|
+
border: string;
|
|
30
|
+
overflow: string;
|
|
31
|
+
backgroundImage: string;
|
|
32
|
+
backgroundSize: string;
|
|
33
|
+
backgroundPosition: string;
|
|
34
|
+
position: string;
|
|
35
|
+
borderRadius: string;
|
|
36
|
+
minHeight: string;
|
|
37
|
+
"&::before": {
|
|
38
|
+
content: string;
|
|
39
|
+
position: string;
|
|
40
|
+
background: string;
|
|
41
|
+
top: number;
|
|
42
|
+
left: number;
|
|
43
|
+
right: number;
|
|
44
|
+
bottom: number;
|
|
45
|
+
borderRadius: string;
|
|
46
|
+
zIndex: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
headlineSection: {
|
|
50
|
+
display: string;
|
|
51
|
+
justifyContent: string;
|
|
52
|
+
flex: string;
|
|
53
|
+
alignSelf: string;
|
|
54
|
+
};
|
|
55
|
+
headlineContent: {
|
|
56
|
+
display: string;
|
|
57
|
+
flexDirection: string;
|
|
58
|
+
alignItems: string;
|
|
59
|
+
flex: string;
|
|
60
|
+
gap: string;
|
|
61
|
+
};
|
|
62
|
+
headlineContentInner: {
|
|
63
|
+
zIndex: number;
|
|
64
|
+
};
|
|
65
|
+
headlineText: {
|
|
66
|
+
fontWeight: number;
|
|
67
|
+
lineHeight: string;
|
|
68
|
+
letterSpacing: string;
|
|
69
|
+
textAlign: string;
|
|
70
|
+
color: string;
|
|
71
|
+
opacity: string;
|
|
72
|
+
textTransform: string;
|
|
73
|
+
fontFamily: string;
|
|
74
|
+
fontSize: string;
|
|
75
|
+
};
|
|
76
|
+
contentContainer: {
|
|
77
|
+
display: string;
|
|
78
|
+
flexDirection: string;
|
|
79
|
+
gap: string;
|
|
80
|
+
};
|
|
81
|
+
titleText: {
|
|
82
|
+
fontWeight: number;
|
|
83
|
+
lineHeight: string;
|
|
84
|
+
letterSpacing: string;
|
|
85
|
+
textAlign: string;
|
|
86
|
+
fontSize: string;
|
|
87
|
+
color: string;
|
|
88
|
+
fontFamily: string;
|
|
89
|
+
};
|
|
90
|
+
descriptionText: {
|
|
91
|
+
fontWeight: number;
|
|
92
|
+
lineHeight: string;
|
|
93
|
+
letterSpacing: string;
|
|
94
|
+
fontSize: string;
|
|
95
|
+
textAlign: string;
|
|
96
|
+
color: string;
|
|
97
|
+
opacity: string;
|
|
98
|
+
fontFamily: string;
|
|
99
|
+
};
|
|
100
|
+
bottomSection: {
|
|
101
|
+
display: string;
|
|
102
|
+
flexDirection: string;
|
|
103
|
+
gap: string;
|
|
104
|
+
zIndex: number;
|
|
105
|
+
};
|
|
106
|
+
footerContainer: {
|
|
107
|
+
display: string;
|
|
108
|
+
alignItems: string;
|
|
109
|
+
justifyContent: string;
|
|
110
|
+
flexDirection: string;
|
|
111
|
+
gap: string;
|
|
112
|
+
};
|
|
113
|
+
ctaSection: {
|
|
114
|
+
borderRadius: string;
|
|
115
|
+
py: string;
|
|
116
|
+
display: string;
|
|
117
|
+
flexDirection: string;
|
|
118
|
+
alignItems: string;
|
|
119
|
+
alignSelf: string;
|
|
120
|
+
gap: string;
|
|
121
|
+
backdropFilter: string;
|
|
122
|
+
position: string;
|
|
123
|
+
"&::before": {
|
|
124
|
+
content: string;
|
|
125
|
+
position: string;
|
|
126
|
+
top: number;
|
|
127
|
+
left: number;
|
|
128
|
+
right: number;
|
|
129
|
+
bottom: number;
|
|
130
|
+
backgroundColor: string;
|
|
131
|
+
opacity: number;
|
|
132
|
+
borderRadius: string;
|
|
133
|
+
zIndex: number;
|
|
134
|
+
backdropFilter: string;
|
|
135
|
+
};
|
|
136
|
+
"& > *": {
|
|
137
|
+
position: string;
|
|
138
|
+
zIndex: number;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
buttonsContainer: {
|
|
142
|
+
display: string;
|
|
143
|
+
flexDirection: string;
|
|
144
|
+
gap: string;
|
|
145
|
+
};
|
|
146
|
+
tryAgainButton: {
|
|
147
|
+
display: string;
|
|
148
|
+
minHeight: string;
|
|
149
|
+
py: string;
|
|
150
|
+
pr: string;
|
|
151
|
+
pl: string;
|
|
152
|
+
flexDirection: string;
|
|
153
|
+
justifyContent: string;
|
|
154
|
+
alignItems: string;
|
|
155
|
+
gap: string;
|
|
156
|
+
borderRadius: string;
|
|
157
|
+
bgcolor: string;
|
|
158
|
+
"&:hover": {
|
|
159
|
+
bgcolor: string;
|
|
160
|
+
};
|
|
161
|
+
fontSize: string;
|
|
162
|
+
};
|
|
163
|
+
tryAgainButtonContent: {
|
|
164
|
+
display: string;
|
|
165
|
+
justifyContent: string;
|
|
166
|
+
alignItems: string;
|
|
167
|
+
gap: string;
|
|
168
|
+
alignSelf: string;
|
|
169
|
+
};
|
|
170
|
+
tryAgainIcon: {
|
|
171
|
+
display: string;
|
|
172
|
+
width: string;
|
|
173
|
+
height: string;
|
|
174
|
+
justifyContent: string;
|
|
175
|
+
alignItems: string;
|
|
176
|
+
color: string;
|
|
177
|
+
};
|
|
178
|
+
tryAgainText: {
|
|
179
|
+
color: string;
|
|
180
|
+
textAlign: string;
|
|
181
|
+
fontFamily: string;
|
|
182
|
+
fontSize: string;
|
|
183
|
+
fontStyle: string;
|
|
184
|
+
fontWeight: number;
|
|
185
|
+
lineHeight: string;
|
|
186
|
+
letterSpacing: string;
|
|
187
|
+
textTransform: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
export {};
|
|
191
|
+
//# sourceMappingURL=OverlayApiErrorSkeleton.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayApiErrorSkeleton.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,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,YAAY,EAAE,kBAAkB,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,UAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwM5C,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { SkeletonEntity } from '../../../interfaces/interfaces';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props for the OverlaySkeleton component
|
|
6
|
+
*/
|
|
7
|
+
export interface OverlaySkeletonProps {
|
|
8
|
+
/** Entity object containing title, description, images, and branding */
|
|
9
|
+
entity: SkeletonEntity;
|
|
10
|
+
/** Headline text (e.g., "POLL", "QUIZ", "MATCH QUIZ") - from translation */
|
|
11
|
+
headline: string;
|
|
12
|
+
/** Final image URL to display (already processed by useImageVariant) */
|
|
13
|
+
finalImage: string;
|
|
14
|
+
/** Children content to render in the main content area */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* OverlaySkeleton Component
|
|
19
|
+
*
|
|
20
|
+
* A reusable skeleton/wrapper component for Overlay variant layouts across all packages.
|
|
21
|
+
* Handles:
|
|
22
|
+
* - Background image with gradient overlay
|
|
23
|
+
* - Headline rendering with title and description
|
|
24
|
+
* - Content container with backdrop blur effect
|
|
25
|
+
* - Consistent z-index layering for overlay elements
|
|
26
|
+
*
|
|
27
|
+
* Based on the implementation from match-quiz-play MatchQuizOverlayVariant.
|
|
28
|
+
*
|
|
29
|
+
* Usage across packages:
|
|
30
|
+
* - poll-vote, classic-quiz-play, personality-quiz-play, match-quiz-play
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <OverlaySkeleton
|
|
35
|
+
* entity={quiz}
|
|
36
|
+
* headline={t("quiz.headline")}
|
|
37
|
+
* finalImage={finalImage}
|
|
38
|
+
* >
|
|
39
|
+
* {/* Your content here *\/}
|
|
40
|
+
* </OverlaySkeleton>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const OverlaySkeleton: React.FC<OverlaySkeletonProps>;
|
|
44
|
+
export default OverlaySkeleton;
|
|
45
|
+
//# sourceMappingURL=OverlaySkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlaySkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeletons/Overlay/OverlaySkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWzC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,MAAM,EAAE,cAAc,CAAC;IACvB,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsEnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { CustomSpacingScale } from '../../../interfaces/interfaces';
|
|
2
|
+
import { BrandingColorsModel } from 'fansunited-sdk-esm';
|
|
3
|
+
|
|
4
|
+
interface StyleProps {
|
|
5
|
+
spacingScale: CustomSpacingScale;
|
|
6
|
+
brandingColors: BrandingColorsModel | null;
|
|
7
|
+
secondaryColor: string;
|
|
8
|
+
fontFamilyPrimary: string;
|
|
9
|
+
fontFamilySecondary: string;
|
|
10
|
+
mdBorderRadius: string;
|
|
11
|
+
borderSize: string;
|
|
12
|
+
backgroundImage: string;
|
|
13
|
+
darkTextColor: string;
|
|
14
|
+
imageBackgroundGradient: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const createStyles: (props: StyleProps) => {
|
|
17
|
+
mainContainer: {
|
|
18
|
+
display: string;
|
|
19
|
+
flexDirection: string;
|
|
20
|
+
justifyContent: string;
|
|
21
|
+
gap: string;
|
|
22
|
+
p: string;
|
|
23
|
+
boxShadow: string;
|
|
24
|
+
border: string;
|
|
25
|
+
overflow: string;
|
|
26
|
+
backgroundImage: string;
|
|
27
|
+
backgroundPosition: string;
|
|
28
|
+
backgroundSize: string;
|
|
29
|
+
position: string;
|
|
30
|
+
borderRadius: string;
|
|
31
|
+
minHeight: string;
|
|
32
|
+
"&::before": {
|
|
33
|
+
content: string;
|
|
34
|
+
position: string;
|
|
35
|
+
background: string;
|
|
36
|
+
top: number;
|
|
37
|
+
left: number;
|
|
38
|
+
right: number;
|
|
39
|
+
bottom: number;
|
|
40
|
+
borderRadius: string;
|
|
41
|
+
zIndex: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
headlineSection: {
|
|
45
|
+
display: string;
|
|
46
|
+
justifyContent: string;
|
|
47
|
+
flex: string;
|
|
48
|
+
alignSelf: string;
|
|
49
|
+
};
|
|
50
|
+
headlineContent: {
|
|
51
|
+
display: string;
|
|
52
|
+
flexDirection: string;
|
|
53
|
+
alignItems: string;
|
|
54
|
+
flex: string;
|
|
55
|
+
gap: string;
|
|
56
|
+
};
|
|
57
|
+
headlineContentInner: {
|
|
58
|
+
zIndex: number;
|
|
59
|
+
};
|
|
60
|
+
headlineText: {
|
|
61
|
+
fontWeight: number;
|
|
62
|
+
lineHeight: string;
|
|
63
|
+
letterSpacing: string;
|
|
64
|
+
textAlign: {
|
|
65
|
+
xs: string;
|
|
66
|
+
md: string;
|
|
67
|
+
};
|
|
68
|
+
color: string;
|
|
69
|
+
opacity: string;
|
|
70
|
+
textTransform: string;
|
|
71
|
+
fontFamily: string;
|
|
72
|
+
fontSize: string;
|
|
73
|
+
};
|
|
74
|
+
contentContainer: {
|
|
75
|
+
display: string;
|
|
76
|
+
flexDirection: string;
|
|
77
|
+
gap: string;
|
|
78
|
+
};
|
|
79
|
+
titleText: {
|
|
80
|
+
fontWeight: number;
|
|
81
|
+
lineHeight: string;
|
|
82
|
+
letterSpacing: string;
|
|
83
|
+
textAlign: {
|
|
84
|
+
xs: string;
|
|
85
|
+
md: string;
|
|
86
|
+
};
|
|
87
|
+
fontSize: string;
|
|
88
|
+
color: string;
|
|
89
|
+
fontFamily: string;
|
|
90
|
+
};
|
|
91
|
+
descriptionText: {
|
|
92
|
+
fontWeight: number;
|
|
93
|
+
lineHeight: string;
|
|
94
|
+
letterSpacing: string;
|
|
95
|
+
fontSize: string;
|
|
96
|
+
textAlign: {
|
|
97
|
+
xs: string;
|
|
98
|
+
md: string;
|
|
99
|
+
};
|
|
100
|
+
color: string;
|
|
101
|
+
opacity: string;
|
|
102
|
+
fontFamily: string;
|
|
103
|
+
};
|
|
104
|
+
mainContentSection: {
|
|
105
|
+
display: string;
|
|
106
|
+
flexDirection: string;
|
|
107
|
+
gap: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export {};
|
|
111
|
+
//# sourceMappingURL=OverlaySkeleton.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlaySkeleton.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeletons/Overlay/OverlaySkeleton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,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,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,YAAY,UAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuG5C,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { SkeletonEntity } from '../../../../interfaces/interfaces';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props for the OverlayScoreStateSkeleton component
|
|
6
|
+
*/
|
|
7
|
+
export interface OverlayScoreStateSkeletonProps {
|
|
8
|
+
/** Entity object containing title, description, images, and branding */
|
|
9
|
+
entity: SkeletonEntity;
|
|
10
|
+
/** Headline text (e.g., "POLL", "QUIZ", "MATCH QUIZ") - from translation */
|
|
11
|
+
headline: string;
|
|
12
|
+
/** Background image URL */
|
|
13
|
+
backgroundImage: string;
|
|
14
|
+
/** Background gradient overlay */
|
|
15
|
+
imageBackgroundGradient: string;
|
|
16
|
+
/** Children content to render in the main content area */
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* OverlayScoreStateSkeleton Component
|
|
21
|
+
*
|
|
22
|
+
* A reusable skeleton/wrapper component for Overlay variant Score State layouts
|
|
23
|
+
* that include a headline section (like poll-vote and match-quiz).
|
|
24
|
+
*
|
|
25
|
+
* This component provides:
|
|
26
|
+
* - Background image with gradient overlay
|
|
27
|
+
* - Headline section with title and description
|
|
28
|
+
* - Main content area for results/score content
|
|
29
|
+
* - Consistent dark theme styling
|
|
30
|
+
*
|
|
31
|
+
* Used by: poll-vote, match-quiz-play Score State components
|
|
32
|
+
*
|
|
33
|
+
* For score states that use ScoreStateWrapper (classic-quiz, personality-quiz),
|
|
34
|
+
* use OverlayScoreStateWrapperSkeleton instead.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <OverlayScoreStateSkeleton
|
|
39
|
+
* entity={poll}
|
|
40
|
+
* headline={t("poll.headline")}
|
|
41
|
+
* backgroundImage={backgroundImage}
|
|
42
|
+
* imageBackgroundGradient={imageBackgroundGradient}
|
|
43
|
+
* >
|
|
44
|
+
* {/* Score state content here *\/}
|
|
45
|
+
* </OverlayScoreStateSkeleton>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare const OverlayScoreStateSkeleton: React.FC<OverlayScoreStateSkeletonProps>;
|
|
49
|
+
export default OverlayScoreStateSkeleton;
|
|
50
|
+
//# sourceMappingURL=OverlayScoreStateSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayScoreStateSkeleton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQzC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,wEAAwE;IACxE,MAAM,EAAE,cAAc,CAAC;IACvB,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,uBAAuB,EAAE,MAAM,CAAC;IAChC,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAiEvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|