@opexa/portal-components 0.0.624 → 0.0.626

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.
@@ -22,5 +22,5 @@ export function KYCDefault(props) {
22
22
  const isDialogOpen = !globalStore.kycReminder.open && globalStore.kyc.open && !sessionLoading;
23
23
  return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: isDialogOpen && !globalStore.responsibleGamingReminder.open, onOpenChange: (details) => {
24
24
  globalStore.kyc.setOpen(details.open);
25
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: "mx-auto min-h-full w-full overflow-y-auto bg-bg-primary-alt lg:min-h-auto lg:w-fit", children: _jsxs("div", { className: "flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit sm:overflow-auto lg:w-[400px]", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto mb-5 block h-7.5 w-auto", draggable: false }), _jsx(Indicator, {}), kyc.step === 1 && _jsx(IdentityVerification, {}), kyc.step === 2 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { hasResponsibleGamingReminder: true, ...props })] }));
25
+ }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: "mx-auto min-h-full w-full overflow-y-auto bg-bg-primary-alt lg:min-h-auto lg:w-fit", children: _jsxs("div", { className: "flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit sm:overflow-auto lg:w-[400px]", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto mb-5 block h-7.5 w-auto", draggable: false }), _jsx(Indicator, {}), kyc.step === 1 && _jsx(IdentityVerification, {}), kyc.step === 2 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props })] }));
26
26
  }
@@ -12,6 +12,5 @@ export interface KYCReminderProps {
12
12
  styles: string;
13
13
  logo: ImageProps['src'];
14
14
  };
15
- hasResponsibleGamingReminder?: boolean;
16
15
  }
17
16
  export declare function KYCReminder(props: KYCReminderProps): import("react/jsx-runtime").JSX.Element;
@@ -46,9 +46,10 @@ export function KYCReminder(props) {
46
46
  const isAccountReady = !accountLoading;
47
47
  const isSessionReady = !sessionLoading && session?.status === 'authenticated';
48
48
  const isKYCReminderOpen = globalStore.kycReminder.open && !globalStore.kyc.open;
49
- const isResponsibleGamingReminderClosed = props.hasResponsibleGamingReminder &&
50
- !globalStore.responsibleGamingReminder.open;
51
- const isKYCStateRelevant = isNotVerified || (isPending && isVerificationLocked);
49
+ const isResponsibleGamingReminderClosed = !globalStore.responsibleGamingReminder.open || true;
50
+ const isKYCStateRelevant = isNotVerified ||
51
+ (isPending && isVerificationLocked) ||
52
+ (isNotVerified && isVerificationLocked);
52
53
  return (_jsx(Dialog.Root, { open: isSessionReady &&
53
54
  isAccountReady &&
54
55
  isKYCReminderOpen &&
@@ -65,7 +66,9 @@ export function KYCReminder(props) {
65
66
  responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
66
67
  api.setOpen(false);
67
68
  globalStore.kyc.setOpen(true);
68
- }, children: "Complete KYC" }) })) })] })] })), isNotVerified && !isVerificationLocked && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-primary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, " services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
69
+ }, children: "Complete KYC" }) })) })] })] })), isNotVerified &&
70
+ !isVerificationLocked &&
71
+ !(daysFromCreationToNow <= 3 && daysFromCreationToNow > 1) && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-primary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, ' ', "services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
69
72
  api.setOpen(false);
70
73
  globalStore.kyc.setOpen(true);
71
74
  }, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] })), isPending && isVerificationLocked && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
@@ -159,5 +159,5 @@ export function KYCSumsub(props) {
159
159
  }
160
160
  }, onError: (error) => {
161
161
  console.warn(error);
162
- }, className: "block max-h-full w-full overflow-y-auto rounded-md", force: true }) }))] }) })] }) }), _jsx(KYCReminder, { hasResponsibleGamingReminder: false, ...props })] }));
162
+ }, className: "block max-h-full w-full overflow-y-auto rounded-md", force: true }) }))] }) })] }) }), _jsx(KYCReminder, { ...props })] }));
163
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.624",
3
+ "version": "0.0.626",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",