@opexa/portal-components 0.0.664 → 0.0.666

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 (54) hide show
  1. package/dist/components/Account/Account.lazy.d.ts +2 -0
  2. package/dist/components/Account/Account.lazy.js +1 -1
  3. package/dist/components/Account/AccountTrigger.d.ts +3 -1
  4. package/dist/components/Account/AccountTrigger.js +2 -2
  5. package/dist/components/AccountInfo/AccountInfo.d.ts +2 -0
  6. package/dist/components/AccountInfo/AccountInfo.js +5 -5
  7. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
  8. package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
  9. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +2 -4
  10. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.d.ts +3 -0
  11. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.js +36 -0
  12. package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
  13. package/dist/components/DigitainLauncher/Loading.js +5 -0
  14. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -0
  15. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -0
  16. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  17. package/dist/components/KYC/BasicInformation.js +101 -0
  18. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  19. package/dist/components/KYC/IdentityVerification.js +120 -0
  20. package/dist/components/KYC/Indicator.d.ts +1 -0
  21. package/dist/components/KYC/Indicator.js +8 -0
  22. package/dist/components/KYC/KYC.lazy.d.ts +6 -0
  23. package/dist/components/KYC/KYC.lazy.js +45 -0
  24. package/dist/components/KYC/KYCContext.d.ts +6 -0
  25. package/dist/components/KYC/KYCContext.js +2 -0
  26. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  27. package/dist/components/KYC/PersonalInformation.js +122 -0
  28. package/dist/components/KYC/useKYC.d.ts +25 -0
  29. package/dist/components/KYC/useKYC.js +38 -0
  30. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
  31. package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
  32. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +1 -0
  33. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +29 -0
  34. package/dist/components/SessionWatcher/SessionWatcher.d.ts +1 -0
  35. package/dist/components/SessionWatcher/SessionWatcher.js +20 -0
  36. package/dist/components/SessionWatcher/index.d.ts +1 -0
  37. package/dist/components/SessionWatcher/index.js +1 -0
  38. package/dist/icons/LinkBrokenIcon.d.ts +2 -0
  39. package/dist/icons/LinkBrokenIcon.js +4 -0
  40. package/dist/images/placeholder-avatar-2.png +0 -0
  41. package/dist/images/responsible-gaming-yellow.png +0 -0
  42. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  43. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  44. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  45. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  46. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  47. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  48. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  49. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  50. package/dist/ui/Popover/Popover.d.ts +55 -55
  51. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  52. package/package.json +5 -1
  53. package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +0 -1
  54. package/dist/components/PortalProvider/AndroidOnlyComponents.js +0 -12
@@ -51,5 +51,7 @@ export interface AccountProps {
51
51
  notificationsEnabled?: boolean;
52
52
  /** @default true */
53
53
  shouldShowAccountStatus?: boolean;
54
+ /** Avatar image source */
55
+ avatar?: string;
54
56
  }
55
57
  export declare function Account(props: AccountProps): import("react/jsx-runtime").JSX.Element;
@@ -92,7 +92,7 @@ function Profile() {
92
92
  return 'danger';
93
93
  }
94
94
  };
95
- return (_jsxs("div", { className: "flex shrink-0 items-center gap-lg", children: [_jsx(Image, { src: avatarPlaceholder, alt: "", width: 48, height: 48, className: "size-12" }), _jsxs("div", { className: "grow", children: [_jsx("p", { className: "font-semibold text-text-secondary-700 leading-tight", children: account?.name }), _jsxs("div", { className: "flex", children: [_jsxs("p", { className: "grow items-center text-text-tertiary-600 leading-tight", children: ["ID: ", account?.id] }), accountProps.shouldShowAccountStatus && (_jsxs(Badge.Root, { colorScheme: getVerificationColorScheme(account?.verificationStatus), className: "self-start", children: [_jsx(Badge.Indicator, {}), _jsx(Badge.Label, { children: capitalize(account?.verificationStatus || '') })] }))] })] })] }));
95
+ return (_jsxs("div", { className: "flex shrink-0 items-center gap-lg", children: [_jsx(Image, { src: accountProps.avatar || avatarPlaceholder, alt: "", width: 48, height: 48, className: "size-12" }), _jsxs("div", { className: "grow", children: [_jsx("p", { className: "font-semibold text-text-secondary-700 leading-tight", children: account?.name }), _jsxs("div", { className: "flex", children: [_jsxs("p", { className: "grow items-center text-text-tertiary-600 leading-tight", children: ["ID: ", account?.id] }), accountProps.shouldShowAccountStatus && (_jsxs(Badge.Root, { colorScheme: getVerificationColorScheme(account?.verificationStatus), className: "self-start", children: [_jsx(Badge.Indicator, {}), _jsx(Badge.Label, { children: capitalize(account?.verificationStatus || '') })] }))] })] })] }));
96
96
  }
97
97
  function Links({ router, classNames, }) {
98
98
  const accountProps = useAccountPropsContext();
@@ -1,5 +1,7 @@
1
1
  import type { ComponentPropsWithRef } from 'react';
2
2
  export interface AccountTriggerProps extends ComponentPropsWithRef<'button'> {
3
3
  asChild?: boolean;
4
+ /** Avatar image source */
5
+ avatar?: string;
4
6
  }
5
- export declare function AccountTrigger({ asChild, children, ...props }: AccountTriggerProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function AccountTrigger({ asChild, children, avatar, ...props }: AccountTriggerProps): import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
8
8
  import { XIcon } from '../../icons/XIcon.js';
9
9
  import avatarPlaceholder from '../../images/placeholder-avatar.png';
10
10
  import { IconButton } from '../../ui/IconButton/index.js';
11
- export function AccountTrigger({ asChild, children, ...props }) {
11
+ export function AccountTrigger({ asChild, children, avatar, ...props }) {
12
12
  const desktop = useMediaQuery('(min-width: 1024px)', {
13
13
  defaultValue: true,
14
14
  });
@@ -22,5 +22,5 @@ export function AccountTrigger({ asChild, children, ...props }) {
22
22
  return (_jsx(ark.button, { type: "button", "aria-label": "Toggle account menu", "data-open": disclosure.open ? 'open' : 'closed', ...props, onClick: (e) => {
23
23
  disclosure.setOpen(!disclosure.open);
24
24
  return props.onClick?.(e);
25
- }, asChild: !children ? true : asChild, children: children ?? (_jsx(IconButton, { id: "opexa-powerplay:account-trigger", size: "sm", colorScheme: "gray", children: !desktop && disclosure.open ? (_jsx(XIcon, {})) : (_jsx(Image, { src: avatarPlaceholder, alt: "", width: 64, height: 64, className: "size-10" })) })) }));
25
+ }, asChild: !children ? true : asChild, children: children ?? (_jsx(IconButton, { id: "opexa-powerplay:account-trigger", size: "sm", colorScheme: "gray", children: !desktop && disclosure.open ? (_jsx(XIcon, {})) : (_jsx(Image, { src: avatar || avatarPlaceholder, alt: "", width: 64, height: 64, className: "size-10" })) })) }));
26
26
  }
@@ -7,6 +7,8 @@ interface BaseAccountInfoProps {
7
7
  className?: string;
8
8
  googleSso?: boolean;
9
9
  facebookSso?: boolean;
10
+ /** Avatar image source */
11
+ avatar?: string;
10
12
  }
11
13
  interface WithoutBranchCode extends BaseAccountInfoProps {
12
14
  shouldShowBranchCode?: false;
@@ -25,7 +25,7 @@ import { FacebookIcon } from '../../icons/FacebookIcon.js';
25
25
  import { GoogleIcon } from '../../icons/GoogleIcon.js';
26
26
  import { LinkBroken02Icon } from '../../icons/LinkBroken02Icon.js';
27
27
  import { XIcon } from '../../icons/XIcon.js';
28
- import avatar from '../../images/placeholder-avatar.png';
28
+ import avatarPlaceholder from '../../images/placeholder-avatar.png';
29
29
  import { Button } from '../../ui/Button/index.js';
30
30
  import { Dialog } from '../../ui/Dialog/index.js';
31
31
  import { Field } from '../../ui/Field/index.js';
@@ -41,9 +41,9 @@ const accountSchema = z.object({
41
41
  .regex(/^[a-zA-Z0-9]+$/, 'Username can only contain letters and numbers'),
42
42
  });
43
43
  export function AccountInfo(props) {
44
- return (_jsxs("div", { className: twMerge('space-y-3xl', props.className), children: [_jsx(ProfileInfo, {}), _jsx(ContactInfo, {}), _jsx(PersonalInfo, { shouldShowBranchCode: props.shouldShowBranchCode, branchCodes: props.branchCodes }), _jsx(SSO, { google: props.googleSso, facebook: props.facebookSso })] }));
44
+ return (_jsxs("div", { className: twMerge('space-y-3xl', props.className), children: [_jsx(ProfileInfo, { avatar: props.avatar }), _jsx(ContactInfo, {}), _jsx(PersonalInfo, { shouldShowBranchCode: props.shouldShowBranchCode, branchCodes: props.branchCodes }), _jsx(SSO, { google: props.googleSso, facebook: props.facebookSso })] }));
45
45
  }
46
- function ProfileInfo() {
46
+ function ProfileInfo({ avatar }) {
47
47
  const [edit, setEdit] = useState(false);
48
48
  const accountQuery = useAccountQuery();
49
49
  const account = accountQuery.data;
@@ -74,7 +74,7 @@ function ProfileInfo() {
74
74
  },
75
75
  resolver: zodResolver(accountSchema),
76
76
  });
77
- return (_jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Profile Info" }), _jsx("div", { className: "mt-5 rounded-xl border border-border-secondary bg-bg-primary-alt", children: _jsx("div", { className: "border-border-secondary px-4 py-5", children: _jsxs("div", { className: "flex items-start gap-xl", children: [_jsx(Image, { src: avatar, alt: "", width: 80, height: 80, className: "mt-2 size-14 shrink-0 rounded-md object-cover" }), edit ? (_jsxs("form", { onSubmit: form.handleSubmit((data) => {
77
+ return (_jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Profile Info" }), _jsx("div", { className: "mt-5 rounded-xl border border-border-secondary bg-bg-primary-alt", children: _jsx("div", { className: "border-border-secondary px-4 py-5", children: _jsxs("div", { className: "flex items-start gap-xl", children: [_jsx(Image, { src: avatar || avatarPlaceholder, alt: "", width: 80, height: 80, className: "mt-2 size-14 shrink-0 rounded-md object-cover" }), edit ? (_jsxs("form", { onSubmit: form.handleSubmit((data) => {
78
78
  mutate({
79
79
  name: data.name,
80
80
  });
@@ -147,7 +147,7 @@ function PersonalInfo(props) {
147
147
  ? data.birthDay
148
148
  : undefined,
149
149
  });
150
- }), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Full name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Date of birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), props.shouldShowBranchCode && (_jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Branch Code" }), _jsx(Field.Input, { type: "text", disabled: true, value: displayBranchName ?? account?.branchCode ?? '' })] }))] }), form.formState.isDirty && (_jsxs("div", { className: "flex justify-end gap-lg border-border-secondary border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
150
+ }), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Full name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Date of birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay'), className: twMerge('h-full py-2.5', account?.birthDay && 'pointer-events-none') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), props.shouldShowBranchCode && (_jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Branch Code" }), _jsx(Field.Input, { type: "text", disabled: true, value: displayBranchName ?? account?.branchCode ?? '' })] }))] }), form.formState.isDirty && (_jsxs("div", { className: "flex justify-end gap-lg border-border-secondary border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
151
151
  }
152
152
  function ContactInfo() {
153
153
  const localeInfo = useLocaleInfo();
@@ -0,0 +1,7 @@
1
+ import { type UseDisclosureReturn } from '../../client/hooks/useDisclosure';
2
+ interface GoogleDisconnectProps {
3
+ onConfirmAction?: (ctx: UseDisclosureReturn) => React.ReactNode;
4
+ children?: (ctx: UseDisclosureReturn) => React.ReactNode;
5
+ }
6
+ export declare function GoogleDisconnect(props: GoogleDisconnectProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useDisclosure, } from '../../client/hooks/useDisclosure.js';
4
+ import { LinkBrokenIcon } from '../../icons/LinkBrokenIcon.js';
5
+ import { XIcon } from '../../icons/XIcon.js';
6
+ import { Dialog } from '../../ui/Dialog/index.js';
7
+ import { Portal } from '../../ui/Portal/index.js';
8
+ export function GoogleDisconnect(props) {
9
+ const disclosure = useDisclosure();
10
+ return (_jsxs(_Fragment, { children: [props.children?.(disclosure), _jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[25rem] overflow-y-auto rounded-xl p-6", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col ", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(LinkBrokenIcon, {}) }), _jsx("h2", { className: "mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Google Account" }), _jsx("p", { className: "text-center text-sm text-text-tertiary-600 leading-2xl", children: "Are you sure you want to disconnect your Google account? This may affect your ability to log in or sync data." })] }), _jsx("div", { className: "pt-6", children: props.onConfirmAction?.(disclosure) })] }) })] }) })] }));
11
+ }
@@ -1,18 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Image from 'next/image';
3
2
  import { QrCode02Icon } from '../../../../icons/QrCode02Icon.js';
4
3
  import { XIcon } from '../../../../icons/XIcon.js';
5
- import qrphIcon from '../../../../images/qrph-icon.png';
6
4
  import { Button } from '../../../../ui/Button/index.js';
7
5
  import { Dialog } from '../../../../ui/Dialog/index.js';
8
6
  import { Portal } from '../../../../ui/Portal/index.js';
9
- import { QrCode } from '../../../../ui/QrCode/index.js';
10
7
  import { useQRPHDepositContext } from './QRPHDepositContext.js';
8
+ import { QRPHQRCode } from './QRPHQRCode.js';
11
9
  export function QRPHDepositDetails() {
12
10
  const context = useQRPHDepositContext();
13
11
  if (context.view !== 'qrCode')
14
12
  return null;
15
- return (_jsxs("div", { className: "rounded-lg bg-bg-primary-alt p-2xl", children: [_jsx("p", { className: "text-center font-semibold text-lg lg:text-xl", children: "QR Code" }), _jsx("p", { className: "mt-3 text-center text-sm text-text-secondary-700 lg:text-base", children: "Scan the QR code below with your banking app, or upload it to complete your deposit." }), _jsxs(QrCode.Root, { value: context.deposit?.qrCode ?? '', className: "mx-auto mt-6 w-[12.5rem] rounded-lg border border-border-primary bg-bg-brand-secondary-alt p-5 lg:w-[13rem] lg:p-6", children: [_jsxs("div", { className: "relative", children: [_jsx(QrCode.Frame, { className: "mx-auto size-[10rem] rounded-[0.25rem] border border-border-primary bg-white", children: _jsx(QrCode.Pattern, {}) }), _jsx(QrCode.Overlay, { className: "bg-white p-0.5", children: _jsx(Image, { src: qrphIcon, alt: "", className: "size-8", width: 40, height: 40 }) })] }), _jsx(QrCode.DownloadTrigger, { fileName: `qrcode-${Date.now()}`, mimeType: "image/png", className: "mt-5 block w-full text-center font-semibold text-sm text-text-secondary-700", children: "Download QR Code" })] }), _jsx("div", { className: "mt-6 flex flex-col gap-4 lg:flex-row", children: _jsx(Button, { size: "sm", variant: "outline", colorScheme: "gray", onClick: context.reset, children: "Generate New QR Code" }) }), _jsx(Instruction, {})] }));
13
+ return (_jsxs("div", { className: "rounded-lg bg-bg-primary-alt p-2xl", children: [_jsx("p", { className: "text-center font-semibold text-lg lg:text-xl", children: "QR Code" }), _jsx("p", { className: "mt-3 text-center text-sm text-text-secondary-700 lg:text-base", children: "Scan the QR code below with your banking app, or upload it to complete your deposit." }), _jsx(QRPHQRCode, { qrCodeString: context.deposit?.qrCode ?? '' }), _jsx("div", { className: "mt-6 flex flex-col gap-4 lg:flex-row", children: _jsx(Button, { size: "sm", variant: "outline", colorScheme: "gray", onClick: context.reset, children: "Generate New QR Code" }) }), _jsx(Instruction, {})] }));
16
14
  }
17
15
  function Instruction() {
18
16
  return (_jsxs("p", { className: "mt-6 text-center text-text-tertiary-600 text-xs", children: ["Need help using the QR Code?", ' ', _jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Trigger, { className: "text-text-warning-primary-600", children: "See instructions" }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto w-[calc(100%-2rem)] overflow-y-auto rounded-lg p-4xl lg:w-[33.625rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Dialog.Body, { children: [_jsxs("div", { className: "flex items-center gap-xl", children: [_jsx("div", { className: "flex size-11 items-center justify-center rounded-lg border border-border-primary text-gray-700 text-text-secondary-700 shadow-xs", children: _jsx(QrCode02Icon, { className: "size-6" }) }), _jsx(Dialog.Title, { className: "font-semibold text-lg", children: "How to Use the QR Code for Payment" })] }), _jsx(Dialog.Description, { className: "mt-5", children: "Follow these simple steps to complete your transaction:" }), _jsxs("ol", { className: "mt-3 list-inside list-decimal space-y-3", children: [_jsx("li", { children: "Open your preferred banking or EMI mobile app and select 'Transfer Money' or 'Pay via QR'" }), _jsx("li", { children: "Scan or upload the generated QR Ph code. If prompted by the app, enter the amount to be sent." }), _jsx("li", { children: "Proceed with the transfer or payment." })] })] })] }) })] })] })] }));
@@ -0,0 +1,3 @@
1
+ export declare function QRPHQRCode(props: {
2
+ qrCodeString: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Capacitor } from '@capacitor/core';
4
+ import { Directory, Filesystem } from '@capacitor/filesystem';
5
+ import Image from 'next/image';
6
+ import { toaster } from '../../../../client/utils/toaster.js';
7
+ import qrphIcon from '../../../../images/qrph-icon.png';
8
+ import { QrCode } from '../../../../ui/QrCode/index.js';
9
+ export function QRPHQRCode(props) {
10
+ async function handleNativeDownload() {
11
+ const QRCode = await import('qrcode');
12
+ const dataUrl = await QRCode.toDataURL(props.qrCodeString, {
13
+ type: 'image/png',
14
+ });
15
+ const base64 = dataUrl.split(',')[1];
16
+ try {
17
+ await Filesystem.writeFile({
18
+ path: `qrcode-${Date.now()}.png`,
19
+ data: base64,
20
+ directory: Directory.Documents,
21
+ });
22
+ toaster.success({
23
+ title: 'QR Code successfully saved to your device',
24
+ description: 'To continue with your deposit, please upload the QR code in your banking app.',
25
+ });
26
+ }
27
+ catch (error) {
28
+ console.log(error, 'error');
29
+ toaster.error({
30
+ title: 'Failed to save QR Code',
31
+ description: 'An error occurred while saving the QR code to your device.',
32
+ });
33
+ }
34
+ }
35
+ return (_jsxs(QrCode.Root, { value: props.qrCodeString, className: "mx-auto mt-6 w-[12.5rem] rounded-lg border border-border-primary bg-bg-brand-secondary-alt p-5 lg:w-[13rem] lg:p-6", children: [_jsxs("div", { className: "relative", children: [_jsx(QrCode.Frame, { id: "qrph-qrcode", className: "mx-auto size-[10rem] rounded-[0.25rem] border border-border-primary bg-white", children: _jsx(QrCode.Pattern, {}) }), _jsx(QrCode.Overlay, { className: "bg-white p-0.5", children: _jsx(Image, { src: qrphIcon, alt: "", className: "size-8", width: 40, height: 40 }) })] }), Capacitor.isNativePlatform() ? (_jsx("button", { type: "button", onClick: handleNativeDownload, className: "mt-5 block w-full text-center font-semibold text-sm text-text-secondary-700", children: "Download QR Code to Deviceaa" })) : (_jsx(QrCode.DownloadTrigger, { fileName: `qrcode-${Date.now()}`, mimeType: "image/png", className: "mt-5 block w-full text-center font-semibold text-sm text-text-secondary-700", children: "Download QR Code" }))] }));
36
+ }
@@ -0,0 +1 @@
1
+ export declare function Loading(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export function Loading() {
4
+ return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-blue-500 border-t-transparent" }), _jsx("p", { className: "font-medium text-gray-700 text-lg", children: "Loading Sports Book\u2026" })] }) }));
5
+ }
@@ -0,0 +1,184 @@
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -0,0 +1,184 @@
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -0,0 +1 @@
1
+ export declare function BasicInformation(): import("react/jsx-runtime").JSX.Element;