@opexa/portal-components 0.0.55 → 0.0.56

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 (63) hide show
  1. package/dist/components/AccountPaymentMethods/AccountPaymentMethods.d.ts +1 -0
  2. package/dist/components/AccountPaymentMethods/AccountPaymentMethods.js +3 -0
  3. package/dist/components/AccountPaymentMethods/index.d.ts +1 -0
  4. package/dist/components/AccountPaymentMethods/index.js +1 -0
  5. package/dist/components/AccountVerification/AccountVerificationContext.d.ts +14 -0
  6. package/dist/components/AccountVerification/AccountVerificationContext.js +27 -0
  7. package/dist/components/AccountVerification/VerificationCapture.d.ts +1 -0
  8. package/dist/components/AccountVerification/VerificationCapture.js +28 -0
  9. package/dist/components/AccountVerification/VerificationComplete.d.ts +1 -0
  10. package/dist/components/AccountVerification/VerificationComplete.js +9 -0
  11. package/dist/components/AccountVerification/VerificationDetails.d.ts +1 -0
  12. package/dist/components/AccountVerification/VerificationDetails.js +38 -0
  13. package/dist/components/GamesSearch/GamesSearchTrigger.d.ts +5 -0
  14. package/dist/components/GamesSearch/GamesSearchTrigger.js +14 -0
  15. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -184
  16. package/dist/components/KYC/AccountVerificationContext.d.ts +14 -0
  17. package/dist/components/KYC/AccountVerificationContext.js +27 -0
  18. package/dist/components/KYC/VerificationCapture.d.ts +1 -0
  19. package/dist/components/KYC/VerificationCapture.js +28 -0
  20. package/dist/components/KYC/VerificationComplete.d.ts +1 -0
  21. package/dist/components/KYC/VerificationComplete.js +9 -0
  22. package/dist/components/KYC/VerificationDetails.d.ts +1 -0
  23. package/dist/components/KYC/VerificationDetails.js +38 -0
  24. package/dist/components/Promo/Promo.client.d.ts +2 -0
  25. package/dist/components/Promo/Promo.client.js +9 -0
  26. package/dist/components/Promo/Promo.js +2 -2
  27. package/dist/components/Promos/PromoCarousel.js +3 -3
  28. package/dist/components/Promos/PromoGrid.js +3 -4
  29. package/dist/components/Promos/PromoItem.d.ts +1 -1
  30. package/dist/components/Promos/PromoItem.js +5 -4
  31. package/dist/components/Promos/Promos.d.ts +1 -3
  32. package/dist/components/Promos/Promos.js +3 -1
  33. package/dist/styles/theme.css +696 -696
  34. package/dist/tsconfig.build.tsbuildinfo +1 -1
  35. package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
  36. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
  37. package/dist/ui/Badge/Badge.d.ts +12 -12
  38. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  39. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  40. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  41. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  42. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  43. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  44. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  45. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  46. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  47. package/dist/ui/DatePicker/DatePicker.d.ts +192 -192
  48. package/dist/ui/DatePicker/datePicker.recipe.d.ts +8 -8
  49. package/dist/ui/Dialog/Dialog.d.ts +154 -154
  50. package/dist/ui/Dialog/dialog.recipe.d.ts +14 -14
  51. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  52. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  53. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  54. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  55. package/dist/ui/Popover/Popover.d.ts +88 -88
  56. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  57. package/dist/ui/Select/Select.d.ts +45 -45
  58. package/dist/ui/Select/select.recipe.d.ts +3 -3
  59. package/dist/ui/Table/Table.d.ts +21 -21
  60. package/dist/ui/Table/table.recipe.d.ts +3 -3
  61. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  62. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  63. package/package.json +156 -156
@@ -0,0 +1 @@
1
+ export declare function AccountPaymentMethods(): null;
@@ -0,0 +1,3 @@
1
+ export function AccountPaymentMethods() {
2
+ return null;
3
+ }
@@ -0,0 +1 @@
1
+ export * from './AccountPaymentMethods';
@@ -0,0 +1 @@
1
+ export * from './AccountPaymentMethods.js';
@@ -0,0 +1,14 @@
1
+ type Step = 1 | 2 | 3 | (number & {});
2
+ interface UseAccountVerificationReturn {
3
+ step: Step;
4
+ setStep: (step: Step) => void;
5
+ started: boolean;
6
+ setStarted: (started: boolean) => void;
7
+ completed: boolean;
8
+ setCompleted: (completed: boolean) => void;
9
+ reset: () => void;
10
+ }
11
+ export declare function useAccountVerification(): UseAccountVerificationReturn;
12
+ export declare const AccountVerificationContext: import("react").Context<UseAccountVerificationReturn | null>;
13
+ export declare function useAccountVerificationContext(): UseAccountVerificationReturn;
14
+ export {};
@@ -0,0 +1,27 @@
1
+ import { createContext, useContext, useState } from 'react';
2
+ import invariant from 'tiny-invariant';
3
+ export function useAccountVerification() {
4
+ const [step, setStep] = useState(1);
5
+ const [started, setStarted] = useState(false);
6
+ const [completed, setCompleted] = useState(false);
7
+ function reset() {
8
+ setStep(1);
9
+ setStarted(false);
10
+ setCompleted(false);
11
+ }
12
+ return {
13
+ step,
14
+ setStep,
15
+ started,
16
+ setStarted,
17
+ completed,
18
+ setCompleted,
19
+ reset,
20
+ };
21
+ }
22
+ export const AccountVerificationContext = createContext(null);
23
+ export function useAccountVerificationContext() {
24
+ const context = useContext(AccountVerificationContext);
25
+ invariant(context);
26
+ return context;
27
+ }
@@ -0,0 +1 @@
1
+ export declare function VerificationCapture(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { noop } from 'lodash-es';
3
+ import Image from 'next/image';
4
+ import { ArrowLeftIcon, CheckIcon, XIcon } from '../../icons/index.js';
5
+ import uploadId from '../../images/capture-id-banner.png';
6
+ import selfie from '../../images/capture-selfie-banner.png';
7
+ import { Button, Checkbox, Field, Progress } from '../../ui/index.js';
8
+ import { useAccountVerificationContext } from './AccountVerificationContext.js';
9
+ export function VerificationCapture() {
10
+ const context = useAccountVerificationContext();
11
+ if (!context.started)
12
+ return null;
13
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "grid grid-cols-4 items-center", children: [_jsxs("button", { className: "text-text-tertiary-600 flex gap-sm text-sm font-semibold", disabled: context.step <= 1, onClick: () => context.setStep(context.step - 1), children: [_jsx(ArrowLeftIcon, { className: "size-5" }), "Back"] }), _jsxs("div", { className: "col-span-2 flex justify-center gap-2", children: [_jsx(Progress.Root, { value: context.step >= 2 ? 100 : context.step >= 1 ? 50 : 0, onValueChange: noop, className: "w-22.5 shrink-0", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx(Progress.Root, { value: context.completed ? 100 : context.step >= 3 ? 50 : 0, onValueChange: noop, className: "w-22.5 shrink-0", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] })] }), context.step === 1 && _jsx(Step1, {}), context.step === 2 && _jsx(Step2, {}), context.step === 3 && _jsx(Step3, {})] }));
14
+ }
15
+ function Step1() {
16
+ const context = useAccountVerificationContext();
17
+ return (_jsxs(_Fragment, { children: [_jsx("p", { className: "mt-2xl text-center text-2xl font-semibold", children: "Prepare to upload your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt shadow-xs mt-6 rounded-2xl border", children: [_jsxs("div", { className: "px-4 py-5", children: [_jsx(Image, { src: uploadId, alt: "", className: "h-auto w-full", width: 600, height: 352 }), _jsxs("ul", { className: "mt-2xl space-y-3", children: [_jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Upload front side of your ID"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Take a photo in a well lit room"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(XIcon, { className: "text-text-featured-icon-light-error size-6" }), "Don't edit image of your ID"] })] })] }), _jsx("div", { className: "border-border-secondary border-t px-xl py-lg", children: _jsx(Button, { size: "sm", onClick: () => context.setStep(2), children: "Continue" }) })] })] }));
18
+ }
19
+ function Step2() {
20
+ const context = useAccountVerificationContext();
21
+ return (_jsxs(_Fragment, { children: [_jsx("p", { className: "mt-2xl text-center text-2xl font-semibold", children: "Take a selfie holding your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt shadow-xs mt-6 rounded-2xl border", children: [_jsxs("div", { className: "px-4 py-5", children: [_jsx(Image, { src: selfie, alt: "", className: "h-auto w-full", width: 600, height: 352 }), _jsxs("ul", { className: "mt-2xl space-y-3", children: [_jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Face and ID must be clearly visible"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Take a photo in a well lit room"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(XIcon, { className: "text-text-featured-icon-light-error size-6" }), "No hats, sunglasses, or masks"] })] })] }), _jsx("div", { className: "border-border-secondary border-t px-xl py-lg", children: _jsx(Button, { size: "sm", onClick: () => context.setStep(3), children: "Continue" }) })] })] }));
22
+ }
23
+ function Step3() {
24
+ const context = useAccountVerificationContext();
25
+ return (_jsxs(_Fragment, { children: [_jsx("p", { className: "mt-2xl text-center text-2xl font-semibold", children: "Enter your basic and work-related information" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt shadow-xs mt-6 rounded-2xl border", children: [_jsxs("div", { className: "px-4 py-5", children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, {})] }), _jsxs(Checkbox.Root, { className: "mt-sm", children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Same as permanent address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Nature of work" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, {})] })] }), _jsx("div", { className: "border-border-secondary border-t px-xl py-lg", children: _jsx(Button, { size: "sm", onClick: () => {
26
+ context.setCompleted(true);
27
+ }, children: "Continue" }) })] })] }));
28
+ }
@@ -0,0 +1 @@
1
+ export declare function VerificationComplete(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Portal } from '@ark-ui/react';
3
+ import { CheckCircleIcon } from '../../icons/index.js';
4
+ import { AlertDialog, Button } from '../../ui/index.js';
5
+ import { useAccountVerificationContext } from './AccountVerificationContext.js';
6
+ export function VerificationComplete() {
7
+ const context = useAccountVerificationContext();
8
+ return (_jsx(AlertDialog.Root, { open: context.completed, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "bg-bg-overlay/75 backdrop-blur-sm" }), _jsx(AlertDialog.Positioner, { children: _jsxs(AlertDialog.Content, { className: "mx-auto w-[21.438rem] p-xl", children: [_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(CheckCircleIcon, {}) }), _jsx(AlertDialog.Title, { className: "mt-3 text-center", children: "Submission Successful" }), _jsx(AlertDialog.Description, { className: "text-text-tertiary-600 text-center", children: "Your documents have been submitted successfully. They\u2019re now under review, and you\u2019ll receive a notification as soon as your account is verified." }), _jsx(Button, { className: "mt-3xl", onClick: () => context.reset(), children: "Ok" })] }) })] }) }));
9
+ }
@@ -0,0 +1 @@
1
+ export declare function VerificationDetails(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { ark } from '@ark-ui/react';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { useMemberVerificationQuery, useProfileCompletionQuery, } from '../../client/hooks/index.js';
5
+ import { AlertCircleIcon, CheckVerified02Icon, CreditCard02Icon, FaceIdIcon, FileCheck02Icon, FileSearch02Icon, FileX02Icon, Globe05Icon, } from '../../icons/index.js';
6
+ import { Button } from '../../ui/index.js';
7
+ import { useAccountVerificationContext } from './AccountVerificationContext.js';
8
+ export function VerificationDetails() {
9
+ const context = useAccountVerificationContext();
10
+ const profileCompletionQuery = useProfileCompletionQuery();
11
+ const profileCompletion = profileCompletionQuery.data;
12
+ const verificationQuery = useMemberVerificationQuery();
13
+ const verification = verificationQuery.data;
14
+ const empty = verification == null;
15
+ const pending = verification?.status === 'PENDING';
16
+ const success = verification?.status === 'VERIFIED' || verification?.status === 'APPROVED';
17
+ const failed = verification?.status === 'REJECTED' ||
18
+ verification?.status === 'UNVERIFIED';
19
+ if (context.started)
20
+ return null;
21
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-start gap-8", children: [_jsxs("div", { className: "grow", children: [_jsx("h2", { className: "text-text-secondary-700 text-sm font-semibold", children: "Verify your identity" }), _jsx("p", { className: "text-text-tertiary-600 text-sm", children: "Complete personal verification to unlock all features and enhance account security." })] }), _jsx(ark.svg, { asChild: true, className: twMerge('size-6', profileCompletion?.accountVerification
22
+ ? 'text-text-success-primary'
23
+ : 'text-text-warning-primary'), children: profileCompletion?.accountVerification ? (_jsx(CheckVerified02Icon, {})) : (_jsx(AlertCircleIcon, {})) })] }), _jsxs("div", { className: "shadow-xs border-border-secondary bg-bg-primary-alt mt-5 rounded-xl border", children: [_jsx("div", { className: "px-4 py-5", children: _jsxs("ul", { className: "space-y-lg", children: [_jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(FileCheck02Icon, {}), "Basic Information"] }), _jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(Globe05Icon, {}), "Proof of address"] }), _jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(CreditCard02Icon, {}), "Government ID"] }), _jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(FaceIdIcon, {}), "Facial Verification"] })] }) }), _jsx("div", { className: "border-border-secondary flex justify-end border-t px-4 py-3 lg:py-xl", children: _jsx(Button, { size: "sm", onClick: () => {
24
+ context.setStarted(true);
25
+ }, className: "w-full lg:w-fit", children: "Verify Now" }) })] }), success && _jsx(VerificationSuccess, {}), pending && _jsx(VerificationInProgress, {}), failed && _jsx(VerificationFailed, {}), empty && _jsx(VerificationNotSubmitted, {})] }));
26
+ }
27
+ function VerificationNotSubmitted() {
28
+ return (_jsxs("div", { className: "shadow-xs border-border-primary bg-bg-primary-alt mt-6 flex flex-col gap-2 rounded-xl border p-xl lg:flex-row", children: [_jsx("div", { className: "border-text-warning-primary/10 flex size-[2.1875rem] items-center justify-center rounded-full border-2", children: _jsx("div", { className: "border-text-warning-primary/30 flex size-[1.666625rem] items-center justify-center rounded-full border-2", children: _jsx(AlertCircleIcon, { className: "text-text-warning-primary size-5" }) }) }), _jsx("p", { className: "text-text-tertiary-600 max-w-[800px] text-sm", 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." })] }));
29
+ }
30
+ function VerificationInProgress() {
31
+ return (_jsxs("div", { className: "shadow-xs border-border-primary bg-bg-primary-alt mt-6 flex flex-col gap-2 rounded-xl border p-xl lg:flex-row", children: [_jsx("div", { className: "border-text-warning-primary/10 flex size-[2.1875rem] items-center justify-center rounded-full border-2", children: _jsx("div", { className: "border-text-warning-primary/30 flex size-[1.666625rem] items-center justify-center rounded-full border-2", children: _jsx(FileSearch02Icon, { className: "text-text-warning-primary size-5" }) }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-text-secondary-700 text-sm font-semibold", children: "Under review" }), _jsx("p", { className: "text-text-tertiary-600 mt-xs text-sm", 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." })] })] }));
32
+ }
33
+ function VerificationSuccess() {
34
+ return (_jsxs("div", { className: "shadow-xs border-border-primary bg-bg-primary-alt mt-6 flex flex-col gap-2 rounded-xl border p-xl lg:flex-row", children: [_jsx("div", { className: "border-text-success-primary/10 flex size-[2.1875rem] items-center justify-center rounded-full border-2", children: _jsx("div", { className: "border-text-success-primary/30 flex size-[1.666625rem] items-center justify-center rounded-full border-2", children: _jsx(FileCheck02Icon, { className: "text-text-success-primary size-5" }) }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-text-secondary-700 text-sm font-semibold", children: "Verification successful" }), _jsx("p", { className: "text-text-tertiary-600 mt-xs text-sm", children: "Your account has been successfully verified. You now have full access to all features and improved account security." })] })] }));
35
+ }
36
+ function VerificationFailed() {
37
+ return (_jsxs("div", { className: "shadow-xs border-border-primary bg-bg-primary-alt mt-6 flex flex-col gap-2 rounded-xl border p-xl lg:flex-row", children: [_jsx("div", { className: "border-text-error-primary/10 flex size-[2.1875rem] items-center justify-center rounded-full border-2", children: _jsx("div", { className: "border-text-error-primary/30 flex size-[1.666625rem] items-center justify-center rounded-full border-2", children: _jsx(FileX02Icon, { className: "text-text-error-primary size-5" }) }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-text-secondary-700 text-sm font-semibold", children: "Verification failed" }), _jsx("p", { className: "text-text-tertiary-600 mt-xs text-sm", children: "There was an issue with the verification process. Please try again or contact support for assistance." })] })] }));
38
+ }
@@ -0,0 +1,5 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ export interface GamesSearchTriggerProps extends ComponentPropsWithRef<'button'> {
3
+ asChild?: boolean;
4
+ }
5
+ export declare function GamesSearchTrigger(props: GamesSearchTriggerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ark } from '@ark-ui/react';
4
+ import { useShallow } from 'zustand/shallow';
5
+ import { useGlobalStore } from '../../client/hooks/index.js';
6
+ export function GamesSearchTrigger(props) {
7
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
8
+ gamesSearch: ctx.gamesSearch,
9
+ })));
10
+ return (_jsx(ark.button, { type: "button", ...props, onClick: (e) => {
11
+ globalStore.gamesSearch.setOpen(!globalStore.gamesSearch.open);
12
+ return props.onClick?.(e);
13
+ }, "data-state": globalStore.gamesSearch.open ? 'open' : 'closed' }));
14
+ }
@@ -1,184 +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
- }
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,14 @@
1
+ type Step = 1 | 2 | 3 | (number & {});
2
+ interface UseAccountVerificationReturn {
3
+ step: Step;
4
+ setStep: (step: Step) => void;
5
+ started: boolean;
6
+ setStarted: (started: boolean) => void;
7
+ completed: boolean;
8
+ setCompleted: (completed: boolean) => void;
9
+ reset: () => void;
10
+ }
11
+ export declare function useAccountVerification(): UseAccountVerificationReturn;
12
+ export declare const AccountVerificationContext: import("react").Context<UseAccountVerificationReturn | null>;
13
+ export declare function useAccountVerificationContext(): UseAccountVerificationReturn;
14
+ export {};
@@ -0,0 +1,27 @@
1
+ import { createContext, useContext, useState } from 'react';
2
+ import invariant from 'tiny-invariant';
3
+ export function useAccountVerification() {
4
+ const [step, setStep] = useState(1);
5
+ const [started, setStarted] = useState(false);
6
+ const [completed, setCompleted] = useState(false);
7
+ function reset() {
8
+ setStep(1);
9
+ setStarted(false);
10
+ setCompleted(false);
11
+ }
12
+ return {
13
+ step,
14
+ setStep,
15
+ started,
16
+ setStarted,
17
+ completed,
18
+ setCompleted,
19
+ reset,
20
+ };
21
+ }
22
+ export const AccountVerificationContext = createContext(null);
23
+ export function useAccountVerificationContext() {
24
+ const context = useContext(AccountVerificationContext);
25
+ invariant(context);
26
+ return context;
27
+ }
@@ -0,0 +1 @@
1
+ export declare function VerificationCapture(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { noop } from 'lodash-es';
3
+ import Image from 'next/image';
4
+ import { ArrowLeftIcon, CheckIcon, XIcon } from '../../icons/index.js';
5
+ import uploadId from '../../images/capture-id-banner.png';
6
+ import selfie from '../../images/capture-selfie-banner.png';
7
+ import { Button, Checkbox, Field, Progress } from '../../ui/index.js';
8
+ import { useAccountVerificationContext } from './AccountVerificationContext.js';
9
+ export function VerificationCapture() {
10
+ const context = useAccountVerificationContext();
11
+ if (!context.started)
12
+ return null;
13
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "grid grid-cols-4 items-center", children: [_jsxs("button", { className: "text-text-tertiary-600 flex gap-sm text-sm font-semibold", disabled: context.step <= 1, onClick: () => context.setStep(context.step - 1), children: [_jsx(ArrowLeftIcon, { className: "size-5" }), "Back"] }), _jsxs("div", { className: "col-span-2 flex justify-center gap-2", children: [_jsx(Progress.Root, { value: context.step >= 2 ? 100 : context.step >= 1 ? 50 : 0, onValueChange: noop, className: "w-22.5 shrink-0", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx(Progress.Root, { value: context.completed ? 100 : context.step >= 3 ? 50 : 0, onValueChange: noop, className: "w-22.5 shrink-0", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] })] }), context.step === 1 && _jsx(Step1, {}), context.step === 2 && _jsx(Step2, {}), context.step === 3 && _jsx(Step3, {})] }));
14
+ }
15
+ function Step1() {
16
+ const context = useAccountVerificationContext();
17
+ return (_jsxs(_Fragment, { children: [_jsx("p", { className: "mt-2xl text-center text-2xl font-semibold", children: "Prepare to upload your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt shadow-xs mt-6 rounded-2xl border", children: [_jsxs("div", { className: "px-4 py-5", children: [_jsx(Image, { src: uploadId, alt: "", className: "h-auto w-full", width: 600, height: 352 }), _jsxs("ul", { className: "mt-2xl space-y-3", children: [_jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Upload front side of your ID"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Take a photo in a well lit room"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(XIcon, { className: "text-text-featured-icon-light-error size-6" }), "Don't edit image of your ID"] })] })] }), _jsx("div", { className: "border-border-secondary border-t px-xl py-lg", children: _jsx(Button, { size: "sm", onClick: () => context.setStep(2), children: "Continue" }) })] })] }));
18
+ }
19
+ function Step2() {
20
+ const context = useAccountVerificationContext();
21
+ return (_jsxs(_Fragment, { children: [_jsx("p", { className: "mt-2xl text-center text-2xl font-semibold", children: "Take a selfie holding your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt shadow-xs mt-6 rounded-2xl border", children: [_jsxs("div", { className: "px-4 py-5", children: [_jsx(Image, { src: selfie, alt: "", className: "h-auto w-full", width: 600, height: 352 }), _jsxs("ul", { className: "mt-2xl space-y-3", children: [_jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Face and ID must be clearly visible"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Take a photo in a well lit room"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(XIcon, { className: "text-text-featured-icon-light-error size-6" }), "No hats, sunglasses, or masks"] })] })] }), _jsx("div", { className: "border-border-secondary border-t px-xl py-lg", children: _jsx(Button, { size: "sm", onClick: () => context.setStep(3), children: "Continue" }) })] })] }));
22
+ }
23
+ function Step3() {
24
+ const context = useAccountVerificationContext();
25
+ return (_jsxs(_Fragment, { children: [_jsx("p", { className: "mt-2xl text-center text-2xl font-semibold", children: "Enter your basic and work-related information" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt shadow-xs mt-6 rounded-2xl border", children: [_jsxs("div", { className: "px-4 py-5", children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, {})] }), _jsxs(Checkbox.Root, { className: "mt-sm", children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Same as permanent address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Nature of work" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-6", children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, {})] })] }), _jsx("div", { className: "border-border-secondary border-t px-xl py-lg", children: _jsx(Button, { size: "sm", onClick: () => {
26
+ context.setCompleted(true);
27
+ }, children: "Continue" }) })] })] }));
28
+ }
@@ -0,0 +1 @@
1
+ export declare function VerificationComplete(): import("react/jsx-runtime").JSX.Element;