@opexa/portal-components 0.0.311 → 0.0.313
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useFileQuery.js +5 -5
- package/dist/client/hooks/useGenerateSumsubVerificationTokenMutation.d.ts +2 -0
- package/dist/client/hooks/useGenerateSumsubVerificationTokenMutation.js +19 -0
- package/dist/client/hooks/useGlobalStore.d.ts +25 -1
- package/dist/client/hooks/useGlobalStore.js +3 -2
- package/dist/client/utils/recaptcha.d.ts +14 -0
- package/dist/client/utils/recaptcha.js +18 -0
- package/dist/components/AccountVerification/AccountVerification.js +33 -21
- package/dist/components/Banner/Banner.client.d.ts +12 -0
- package/dist/components/Banner/Banner.client.js +49 -0
- package/dist/components/Banner/Banner.d.ts +5 -0
- package/dist/components/Banner/Banner.js +3 -0
- package/dist/components/Disclaimer/ResponsibleGaming.d.ts +10 -0
- package/dist/components/Disclaimer/ResponsibleGaming.js +13 -0
- package/dist/components/Disclaimer/TermsOfUse.d.ts +11 -0
- package/dist/components/Disclaimer/TermsOfUse.js +13 -0
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/KYC/CaptureIdDocument.js +219 -0
- package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/KYC/CaptureSelfie.js +285 -0
- package/dist/components/KYC/DisplayImage.d.ts +5 -0
- package/dist/components/KYC/DisplayImage.js +8 -0
- package/dist/components/KYC/FileUpload.d.ts +10 -0
- package/dist/components/KYC/FileUpload.js +72 -0
- package/dist/components/KYC/KYC.d.ts +4 -3
- package/dist/components/KYC/KYC.js +10 -3
- package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +1 -0
- package/dist/components/KYC/KYCDefault/BasicInformation.js +101 -0
- package/dist/components/KYC/KYCDefault/IdentityVerification.d.ts +1 -0
- package/dist/components/KYC/KYCDefault/IdentityVerification.js +120 -0
- package/dist/components/KYC/KYCDefault/Indicator.d.ts +1 -0
- package/dist/components/KYC/KYCDefault/Indicator.js +8 -0
- package/dist/components/KYC/KYCDefault/KYCDefault.d.ts +7 -0
- package/dist/components/KYC/KYCDefault/KYCDefault.js +45 -0
- package/dist/components/KYC/KYCDefault/KYCDefaultContext.d.ts +6 -0
- package/dist/components/KYC/KYCDefault/KYCDefaultContext.js +2 -0
- package/dist/components/KYC/KYCDefault/PersonalInformation.d.ts +1 -0
- package/dist/components/KYC/KYCDefault/PersonalInformation.js +122 -0
- package/dist/components/KYC/KYCDefault/index.d.ts +1 -0
- package/dist/components/KYC/KYCDefault/index.js +1 -0
- package/dist/components/KYC/KYCDefault/useKYCDefault.d.ts +25 -0
- package/dist/components/KYC/KYCDefault/useKYCDefault.js +38 -0
- package/dist/components/KYC/KYCReminder.d.ts +1 -0
- package/dist/components/KYC/KYCReminder.lazy.js +3 -3
- package/dist/components/KYC/KYCSumsub.d.ts +5 -0
- package/dist/components/KYC/KYCSumsub.js +54 -0
- package/dist/components/KYC/NoCameraError.d.ts +7 -0
- package/dist/components/KYC/NoCameraError.js +6 -0
- package/dist/components/KYC/PersonOverlayDesktop.d.ts +7 -0
- package/dist/components/KYC/PersonOverlayDesktop.js +9 -0
- package/dist/components/KYC/index.d.ts +0 -1
- package/dist/components/KYC/index.js +0 -1
- package/dist/components/KYC/utils.d.ts +9 -0
- package/dist/components/KYC/utils.js +79 -0
- package/dist/components/Quests/JourneyQuest.js +1 -1
- package/dist/components/Quests/RemainingTime.d.ts +5 -1
- package/dist/components/Quests/RemainingTime.js +6 -2
- package/dist/components/SignIn/utils.d.ts +8 -0
- package/dist/components/SignIn/utils.js +26 -0
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +17 -0
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +18 -0
- package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpDefault/SignUpContext.js +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +310 -0
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +198 -0
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +251 -0
- package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +10 -0
- package/dist/components/SignUp/SignUpKYC/ImageUploader.js +42 -0
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +7 -0
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +9 -0
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +464 -0
- package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +11 -0
- package/dist/components/SignUp/SignUpKYC/useImageUploader.js +20 -0
- package/dist/components/SignUp/SignUpKYC/utils.d.ts +9 -0
- package/dist/components/SignUp/SignUpKYC/utils.js +79 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/constants/Branches.d.ts +2 -0
- package/dist/constants/Branches.js +42 -0
- package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
- package/dist/handlers/postTransformIdFrontImage.js +82 -0
- package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
- package/dist/handlers/postTransformSelfieImage.js +82 -0
- package/dist/next.config.js +1 -0
- package/dist/services/account.d.ts +4 -0
- package/dist/services/account.js +5 -1
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/queries.js +2644 -2639
- package/dist/styles/theme.css +706 -706
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +1 -0
- package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
- package/dist/third-parties/FacebookPixel/index.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
- package/dist/third-parties/index.d.ts +2 -0
- package/dist/third-parties/index.js +2 -0
- package/dist/ui/Dialog/Dialog.d.ts +88 -88
- package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
- package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
- package/dist/utils/getGameName.d.ts +1 -0
- package/dist/utils/getGameName.js +6 -0
- package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
- package/dist/utils/isBetween3amAnd3pm.js +5 -0
- package/dist/utils/mutationKeys.d.ts +1 -0
- package/dist/utils/mutationKeys.js +1 -0
- package/package.json +160 -158
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
2
3
|
import { getFile } from '../../services/file.js';
|
|
3
4
|
import { getFileQueryKey } from '../../utils/queryKeys.js';
|
|
4
5
|
import { getSession } from '../services/getSession.js';
|
|
@@ -15,13 +16,12 @@ export const useFileQuery = (id, config) => {
|
|
|
15
16
|
queryKey: getFileQueryKey(id),
|
|
16
17
|
queryFn: async ({ signal }) => {
|
|
17
18
|
const session = await getSession();
|
|
19
|
+
invariant(session.status === 'authenticated');
|
|
18
20
|
const file = await getFile(id, {
|
|
19
21
|
signal,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
}),
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: `Bearer ${session.token}`,
|
|
24
|
+
},
|
|
25
25
|
});
|
|
26
26
|
return file ?? null;
|
|
27
27
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
import { generateSumsubVerificationToken } from '../../services/account.js';
|
|
4
|
+
import { getGenerateSumsubVerificationTokenMutationKey } from '../../utils/mutationKeys.js';
|
|
5
|
+
import { getSession } from '../services/getSession.js';
|
|
6
|
+
export const useGenerateSumsubVerificationTokenMutation = () => {
|
|
7
|
+
return useMutation({
|
|
8
|
+
mutationKey: getGenerateSumsubVerificationTokenMutationKey(),
|
|
9
|
+
mutationFn: async () => {
|
|
10
|
+
const session = await getSession();
|
|
11
|
+
invariant(session.status === 'authenticated');
|
|
12
|
+
return generateSumsubVerificationToken({
|
|
13
|
+
headers: {
|
|
14
|
+
Authorization: `Bearer ${session.token}`,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
};
|
|
@@ -82,5 +82,29 @@ export interface GlobalStore {
|
|
|
82
82
|
responsibleGaming: ResponsibleGamingStore;
|
|
83
83
|
pendingBonus: HasPendingBonusStore;
|
|
84
84
|
}
|
|
85
|
-
export declare const useGlobalStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GlobalStore
|
|
85
|
+
export declare const useGlobalStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<GlobalStore>, "setState" | "devtools"> & {
|
|
86
|
+
setState(partial: GlobalStore | Partial<GlobalStore> | ((state: GlobalStore) => GlobalStore | Partial<GlobalStore>), replace?: false | undefined, action?: (string | {
|
|
87
|
+
[x: string]: unknown;
|
|
88
|
+
[x: number]: unknown;
|
|
89
|
+
[x: symbol]: unknown;
|
|
90
|
+
type: string;
|
|
91
|
+
}) | undefined): void;
|
|
92
|
+
setState(state: GlobalStore | ((state: GlobalStore) => GlobalStore), replace: true, action?: (string | {
|
|
93
|
+
[x: string]: unknown;
|
|
94
|
+
[x: number]: unknown;
|
|
95
|
+
[x: symbol]: unknown;
|
|
96
|
+
type: string;
|
|
97
|
+
}) | undefined): void;
|
|
98
|
+
devtools: {
|
|
99
|
+
cleanup: () => void;
|
|
100
|
+
};
|
|
101
|
+
}, "subscribe"> & {
|
|
102
|
+
subscribe: {
|
|
103
|
+
(listener: (selectedState: GlobalStore, previousSelectedState: GlobalStore) => void): () => void;
|
|
104
|
+
<U>(selector: (state: GlobalStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
105
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
106
|
+
fireImmediately?: boolean;
|
|
107
|
+
} | undefined): () => void;
|
|
108
|
+
};
|
|
109
|
+
}>;
|
|
86
110
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { create } from 'zustand';
|
|
2
|
-
|
|
2
|
+
import { devtools, subscribeWithSelector } from 'zustand/middleware';
|
|
3
|
+
export const useGlobalStore = create()(devtools(subscribeWithSelector((set) => ({
|
|
3
4
|
signIn: {
|
|
4
5
|
open: false,
|
|
5
6
|
setOpen(open) {
|
|
@@ -392,4 +393,4 @@ export const useGlobalStore = create((set) => ({
|
|
|
392
393
|
})),
|
|
393
394
|
'~touched': false,
|
|
394
395
|
},
|
|
395
|
-
}));
|
|
396
|
+
}))));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ReCAPTCHAExecuteOptions {
|
|
2
|
+
action: 'submit' | (string & {});
|
|
3
|
+
}
|
|
4
|
+
export interface ReCAPTCHA {
|
|
5
|
+
ready(callback: () => void): void;
|
|
6
|
+
execute(siteKey: string, options: ReCAPTCHAExecuteOptions): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare function ReCAPTCHAReady(): Promise<void>;
|
|
9
|
+
export declare function ReCAPTCHAExecute(options: ReCAPTCHAExecuteOptions): Promise<string>;
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
grecaptcha: ReCAPTCHA;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RECAPTCHA_SITE_KEY } from '../../constants/index.js';
|
|
2
|
+
let loaded = false;
|
|
3
|
+
export function ReCAPTCHAReady() {
|
|
4
|
+
return new Promise((resolve) => {
|
|
5
|
+
if (!loaded) {
|
|
6
|
+
window.grecaptcha.ready(() => {
|
|
7
|
+
loaded = true;
|
|
8
|
+
resolve();
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
resolve();
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export async function ReCAPTCHAExecute(options) {
|
|
17
|
+
return await window.grecaptcha.execute(RECAPTCHA_SITE_KEY, options);
|
|
18
|
+
}
|
|
@@ -13,39 +13,51 @@ import { FaceIdIcon } from '../../icons/FaceIdIcon.js';
|
|
|
13
13
|
import { FileCheck02Icon } from '../../icons/FileCheck02Icon.js';
|
|
14
14
|
import { FileSearch02Icon } from '../../icons/FileSearch02Icon.js';
|
|
15
15
|
import { FileX02Icon } from '../../icons/FileX02Icon.js';
|
|
16
|
-
import { Spinner02Icon } from '../../icons/Spinner02Icon.js';
|
|
17
16
|
import { Button } from '../../ui/Button/index.js';
|
|
18
17
|
export function AccountVerification(props) {
|
|
19
18
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
20
19
|
kyc: ctx.kyc,
|
|
21
20
|
})));
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
const memberVerificationQuery = useMemberVerificationQuery();
|
|
22
|
+
const completed = memberVerificationQuery.data?.status === 'VERIFIED' ||
|
|
23
|
+
memberVerificationQuery.data?.status === 'PENDING' ||
|
|
24
|
+
memberVerificationQuery.data?.status === 'APPROVED';
|
|
25
|
+
return (_jsxs("div", { className: props.className, children: [_jsx(Header, {}), _jsxs("div", { className: "mt-5 rounded-xl border border-border-secondary bg-bg-primary-alt shadow-xs", children: [_jsx(Requirements, {}), !completed && (_jsx("div", { className: "flex justify-end border-border-secondary border-t px-4 py-3 lg:py-xl", children: _jsx(Button, { size: "sm", className: "w-full lg:w-fit", onClick: () => globalStore.kyc.setOpen(true), children: "Verify Now" }) }))] }), _jsx(Status, {})] }));
|
|
26
|
+
}
|
|
27
|
+
function Header() {
|
|
28
|
+
const query = useProfileCompletionQuery();
|
|
29
|
+
return (_jsxs("div", { className: "flex items-start gap-8", children: [_jsxs("div", { className: "grow", children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Verify your identity" }), _jsx("p", { className: "text-sm text-text-tertiary-600", children: "Complete personal verification to unlock all features and enhance account security." })] }), _jsx(ark.svg, { asChild: true, className: twMerge('size-6', query.data?.accountVerification
|
|
30
|
+
? 'text-text-success-primary'
|
|
31
|
+
: 'text-text-warning-primary'), children: query.data?.accountVerification ? (_jsx(CheckVerified02Icon, {})) : (_jsx(AlertCircleIcon, {})) })] }));
|
|
32
|
+
}
|
|
33
|
+
function Requirements() {
|
|
34
|
+
return (_jsx("div", { className: "px-4 py-5", children: _jsxs("ul", { className: "space-y-lg", children: [_jsxs("li", { className: "flex icon:size-6 items-center gap-lg icon:text-text-nav-item-button-icon text-text-secondary-700", children: [_jsx(FileCheck02Icon, {}), "Basic Information"] }), _jsxs("li", { className: "flex icon:size-6 items-center gap-lg icon:text-text-nav-item-button-icon text-text-secondary-700", children: [_jsx(CreditCard02Icon, {}), "Government ID"] }), _jsxs("li", { className: "flex icon:size-6 items-center gap-lg icon:text-text-nav-item-button-icon text-text-secondary-700", children: [_jsx(FaceIdIcon, {}), "Facial Verification"] })] }) }));
|
|
35
|
+
}
|
|
36
|
+
function Status() {
|
|
37
|
+
const query = useMemberVerificationQuery();
|
|
38
|
+
if (query.isLoading)
|
|
39
|
+
return null;
|
|
40
|
+
switch (query.data?.status) {
|
|
41
|
+
case 'PENDING':
|
|
42
|
+
return _jsx(Status__Pending, {});
|
|
43
|
+
case 'REJECTED':
|
|
44
|
+
return _jsx(Status__Failed, {});
|
|
45
|
+
case 'VERIFIED':
|
|
46
|
+
case 'APPROVED':
|
|
47
|
+
return _jsx(Status__Success, {});
|
|
48
|
+
default:
|
|
49
|
+
return _jsx(Status__Missing, {});
|
|
35
50
|
}
|
|
36
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-start gap-8", children: [_jsxs("div", { className: "grow", children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Verify your identity" }), _jsx("p", { className: "text-sm text-text-tertiary-600", children: "Complete personal verification to unlock all features and enhance account security." })] }), _jsx(ark.svg, { asChild: true, className: twMerge('size-6', profileCompletion?.accountVerification
|
|
37
|
-
? 'text-text-success-primary'
|
|
38
|
-
: 'text-text-warning-primary'), children: profileCompletion?.accountVerification ? (_jsx(CheckVerified02Icon, {})) : (_jsx(AlertCircleIcon, {})) })] }), _jsxs("div", { className: "mt-5 rounded-xl border border-border-secondary bg-bg-primary-alt shadow-xs", children: [_jsx("div", { className: "px-4 py-5", children: _jsxs("ul", { className: "space-y-lg", children: [_jsxs("li", { className: "flex icon:size-6 items-center gap-lg icon:text-text-nav-item-button-icon text-text-secondary-700", children: [_jsx(FileCheck02Icon, {}), "Basic Information"] }), _jsxs("li", { className: "flex icon:size-6 items-center gap-lg icon:text-text-nav-item-button-icon text-text-secondary-700", children: [_jsx(CreditCard02Icon, {}), "Government ID"] }), _jsxs("li", { className: "flex icon:size-6 items-center gap-lg icon:text-text-nav-item-button-icon text-text-secondary-700", children: [_jsx(FaceIdIcon, {}), "Facial Verification"] })] }) }), !isKycCompleted && (_jsx("div", { className: "flex justify-end border-border-secondary border-t px-4 py-3 lg:py-xl", children: _jsx(Button, { size: "sm", className: "w-full lg:w-fit", onClick: () => globalStore.kyc.setOpen(true), children: "Verify Now" }) }))] }), success && _jsx(VerificationSuccess, {}), pending && _jsx(VerificationInProgress, {}), failed && _jsx(VerificationFailed, {}), empty && _jsx(VerificationNotSubmitted, {})] }));
|
|
39
51
|
}
|
|
40
|
-
function
|
|
52
|
+
function Status__Missing() {
|
|
41
53
|
return (_jsxs("div", { className: "mt-6 flex flex-col gap-2 rounded-xl border border-border-primary bg-bg-primary-alt p-xl shadow-xs lg:flex-row", children: [_jsx("div", { className: "flex size-[2.1875rem] items-center justify-center rounded-full border-2 border-text-warning-primary/10", children: _jsx("div", { className: "flex size-[1.666625rem] items-center justify-center rounded-full border-2 border-text-warning-primary/30", children: _jsx(AlertCircleIcon, { className: "size-5 text-text-warning-primary" }) }) }), _jsx("p", { className: "max-w-[800px] text-sm text-text-tertiary-600", children: "To serve you better and unlock all features, please provide valid identification documents. This helps protect your account and makes recovery easier if ever needed." })] }));
|
|
42
54
|
}
|
|
43
|
-
function
|
|
55
|
+
function Status__Pending() {
|
|
44
56
|
return (_jsxs("div", { className: "mt-6 flex flex-col gap-2 rounded-xl border border-border-primary bg-bg-primary-alt p-xl shadow-xs lg:flex-row", children: [_jsx("div", { className: "flex size-[2.1875rem] items-center justify-center rounded-full border-2 border-text-warning-primary/10", children: _jsx("div", { className: "flex size-[1.666625rem] items-center justify-center rounded-full border-2 border-text-warning-primary/30", children: _jsx(FileSearch02Icon, { className: "size-5 text-text-warning-primary" }) }) }), _jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Under review" }), _jsx("p", { className: "mt-xs text-sm text-text-tertiary-600", children: "To serve you better and unlock all features, please provide valid identification documents. This helps protect your account and makes recovery easier if ever needed." })] })] }));
|
|
45
57
|
}
|
|
46
|
-
function
|
|
58
|
+
function Status__Success() {
|
|
47
59
|
return (_jsxs("div", { className: "mt-6 flex flex-col gap-2 rounded-xl border border-border-primary bg-bg-primary-alt p-xl shadow-xs lg:flex-row", children: [_jsx("div", { className: "flex size-[2.1875rem] items-center justify-center rounded-full border-2 border-text-success-primary/10", children: _jsx("div", { className: "flex size-[1.666625rem] items-center justify-center rounded-full border-2 border-text-success-primary/30", children: _jsx(FileCheck02Icon, { className: "size-5 text-text-success-primary" }) }) }), _jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Verification successful" }), _jsx("p", { className: "mt-xs text-sm text-text-tertiary-600", children: "Your account has been successfully verified. You now have full access to all features and improved account security." })] })] }));
|
|
48
60
|
}
|
|
49
|
-
function
|
|
61
|
+
function Status__Failed() {
|
|
50
62
|
return (_jsxs("div", { className: "mt-6 flex flex-col gap-2 rounded-xl border border-border-primary bg-bg-primary-alt p-xl shadow-xs lg:flex-row", children: [_jsx("div", { className: "flex size-[2.1875rem] items-center justify-center rounded-full border-2 border-text-error-primary/10", children: _jsx("div", { className: "flex size-[1.666625rem] items-center justify-center rounded-full border-2 border-text-error-primary/30", children: _jsx(FileX02Icon, { className: "size-5 text-text-error-primary" }) }) }), _jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Verification failed" }), _jsx("p", { className: "mt-xs text-sm text-text-tertiary-600", children: "There was an issue with the verification process. Please try again or contact support for assistance." })] })] }));
|
|
51
63
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
export interface BannerEntry {
|
|
3
|
+
src: ImageProps['src'];
|
|
4
|
+
redirectUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BannerProps {
|
|
7
|
+
banners: BannerEntry[];
|
|
8
|
+
imageWidth?: number | [mobile: number, desktop: number];
|
|
9
|
+
imageHeight?: number | [mobile: number, desktop: number];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import emblaCarouselAutoplay from 'embla-carousel-autoplay';
|
|
4
|
+
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
5
|
+
import isMobile from 'is-mobile';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import { Fragment, useEffect, useState } from 'react';
|
|
9
|
+
import { twMerge } from 'tailwind-merge';
|
|
10
|
+
import { dataAttr } from '../../utils/dataAttr.js';
|
|
11
|
+
export function Banner__client(props) {
|
|
12
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
13
|
+
loop: true,
|
|
14
|
+
align: 'start',
|
|
15
|
+
}, [
|
|
16
|
+
emblaCarouselAutoplay({
|
|
17
|
+
playOnInit: true,
|
|
18
|
+
delay: 5000,
|
|
19
|
+
}),
|
|
20
|
+
]);
|
|
21
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
function handler(detail) {
|
|
24
|
+
setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
|
|
25
|
+
}
|
|
26
|
+
emblaApi?.on('scroll', handler);
|
|
27
|
+
emblaApi?.on('init', handler);
|
|
28
|
+
return () => {
|
|
29
|
+
emblaApi?.on('init', handler);
|
|
30
|
+
emblaApi?.off('scroll', handler);
|
|
31
|
+
};
|
|
32
|
+
}, [emblaApi]);
|
|
33
|
+
const imageWidth = !props.imageWidth
|
|
34
|
+
? [400, 1200]
|
|
35
|
+
: Array.isArray(props.imageWidth)
|
|
36
|
+
? props.imageWidth
|
|
37
|
+
: [props.imageWidth, props.imageWidth];
|
|
38
|
+
const imageHeight = !props.imageHeight
|
|
39
|
+
? [225, 300]
|
|
40
|
+
: Array.isArray(props.imageHeight)
|
|
41
|
+
? props.imageHeight
|
|
42
|
+
: [props.imageHeight, props.imageHeight];
|
|
43
|
+
return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
|
|
44
|
+
const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
|
|
45
|
+
return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
|
|
46
|
+
}) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
|
|
47
|
+
emblaApi?.scrollTo(index);
|
|
48
|
+
}, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
|
|
49
|
+
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { ImageProps } from 'next/image';
|
|
2
|
+
/** @deprecated */
|
|
2
3
|
export interface BannerEntry {
|
|
3
4
|
src: ImageProps['src'];
|
|
4
5
|
redirectUrl?: string;
|
|
5
6
|
}
|
|
7
|
+
/** @deprecated */
|
|
6
8
|
export interface BannerProps {
|
|
7
9
|
banners: BannerEntry[];
|
|
8
10
|
imageWidth?: number | [mobile: number, desktop: number];
|
|
9
11
|
imageHeight?: number | [mobile: number, desktop: number];
|
|
10
12
|
className?: string;
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Please use Carousel and getImageProps for better performance
|
|
16
|
+
*/
|
|
12
17
|
export declare function Banner(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,9 @@ import Link from 'next/link';
|
|
|
8
8
|
import { Fragment, useEffect, useState } from 'react';
|
|
9
9
|
import { twMerge } from 'tailwind-merge';
|
|
10
10
|
import { dataAttr } from '../../utils/dataAttr.js';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Please use Carousel and getImageProps for better performance
|
|
13
|
+
*/
|
|
11
14
|
export function Banner(props) {
|
|
12
15
|
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
13
16
|
loop: true,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ImageProps } from 'next/image';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface ResponsibleGamingProps {
|
|
4
|
+
responsibleGamingContent: string | ReactNode;
|
|
5
|
+
logo: ImageProps['src'];
|
|
6
|
+
open: boolean;
|
|
7
|
+
onCloseAction: () => void;
|
|
8
|
+
responsibleGamingLogo?: ImageProps['src'];
|
|
9
|
+
}
|
|
10
|
+
export declare function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, ...props }: ResponsibleGamingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image, {} from 'next/image';
|
|
4
|
+
import pagcorLogo from '../../images/pagcor.png';
|
|
5
|
+
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
6
|
+
import { Button } from '../../ui/Button/index.js';
|
|
7
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
8
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
9
|
+
export function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, ...props }) {
|
|
10
|
+
return (_jsx(Dialog.Root, { open: open, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: "Responsible Gaming" }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: responsibleGamingContent }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx("div", { className: "w-full", children: _jsx(Button, { type: "button", className: "mt-3", onClick: () => {
|
|
11
|
+
onCloseAction();
|
|
12
|
+
}, children: "I Agree" }) })] }) })] }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ImageProps } from 'next/image';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface TermsOfUseProps {
|
|
4
|
+
logo: ImageProps['src'];
|
|
5
|
+
open: boolean;
|
|
6
|
+
onCloseAction: () => void;
|
|
7
|
+
termsOfUseContent: string | ReactNode;
|
|
8
|
+
siteName: string;
|
|
9
|
+
responsibleGamingLogo?: ImageProps['src'];
|
|
10
|
+
}
|
|
11
|
+
export declare function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, ...props }: TermsOfUseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image, {} from 'next/image';
|
|
4
|
+
import pagcorLogo from '../../images/pagcor.png';
|
|
5
|
+
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
6
|
+
import { Button } from '../../ui/Button/index.js';
|
|
7
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
8
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
9
|
+
export function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, ...props }) {
|
|
10
|
+
return (_jsx(Dialog.Root, { open: open, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: [siteName, " Terms of Use"] }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: termsOfUseContent }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx("div", { className: "w-full", children: _jsx(Button, { type: "button", className: "mt-3", onClick: () => {
|
|
11
|
+
onCloseAction();
|
|
12
|
+
}, children: "I Agree" }) })] }) })] }) }));
|
|
13
|
+
}
|