@opexa/portal-components 0.0.34 → 0.0.35

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 (88) hide show
  1. package/dist/client/hooks/useMemberVerificationQuery.js +0 -1
  2. package/dist/client/hooks/useMessagesQuery.js +0 -1
  3. package/dist/client/hooks/useTransactionRecordsQuery.js +0 -1
  4. package/dist/client/hooks/useWithdrawalRecordsQuery.js +0 -1
  5. package/dist/components/Account/Account.js +1 -1
  6. package/dist/components/AccountInfo/AccountInfo.js +1 -1
  7. package/dist/components/AccountSecurity/AccountSecurity.js +2 -2
  8. package/dist/components/AccountVerification/AccountVerification.d.ts +4 -1
  9. package/dist/components/AccountVerification/AccountVerification.js +36 -2
  10. package/dist/components/AccountVerification/VerificationCapture.d.ts +1 -0
  11. package/dist/components/AccountVerification/VerificationCapture.js +57 -0
  12. package/dist/components/AccountVerification/selfie.png +0 -0
  13. package/dist/components/AccountVerification/upload-id.png +0 -0
  14. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
  15. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
  16. package/dist/components/DepositWithdrawal/PaymentMethods.js +5 -5
  17. package/dist/components/Disclaimer/Disclaimer.js +2 -2
  18. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  19. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -1
  20. package/dist/components/JackpotCounter/JackpotCounterItem.js +11 -22
  21. package/dist/components/Jackpots/JackpotItemDesktop.js +12 -11
  22. package/dist/components/Jackpots/JackpotItemMobile.js +11 -10
  23. package/dist/components/Jackpots/Jackpots.js +4 -2
  24. package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -1
  25. package/dist/components/Jackpots/useJackpotItemData.js +0 -7
  26. package/dist/components/TournamentCounter/TournamentCounter.client.js +5 -12
  27. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +3 -4
  28. package/dist/components/TournamentCounter/TournamentCounterItem.js +24 -13
  29. package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -1
  30. package/dist/components/Tournaments/TournamentGameProviders.js +3 -4
  31. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
  32. package/dist/components/Tournaments/TournamentItemDesktop.js +57 -0
  33. package/dist/components/Tournaments/TournamentItemMobile.d.ts +6 -6
  34. package/dist/components/Tournaments/TournamentItemMobile.js +21 -61
  35. package/dist/components/Tournaments/Tournaments.d.ts +3 -1
  36. package/dist/components/Tournaments/Tournaments.js +8 -15
  37. package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
  38. package/dist/components/Tournaments/useTournamentItemData.js +64 -0
  39. package/dist/components/index.d.ts +0 -1
  40. package/dist/components/index.js +0 -1
  41. package/dist/icons/CreditCardCheckIcon.d.ts +2 -0
  42. package/dist/icons/CreditCardCheckIcon.js +4 -0
  43. package/dist/icons/FaceIdIcon.d.ts +2 -0
  44. package/dist/icons/FaceIdIcon.js +4 -0
  45. package/dist/icons/FileSearch02Icon.d.ts +2 -0
  46. package/dist/icons/FileSearch02Icon.js +4 -0
  47. package/dist/icons/FileX02Icon.d.ts +2 -0
  48. package/dist/icons/FileX02Icon.js +4 -0
  49. package/dist/icons/Globe05Icon.d.ts +2 -0
  50. package/dist/icons/Globe05Icon.js +4 -0
  51. package/dist/icons/index.d.ts +5 -0
  52. package/dist/icons/index.js +5 -0
  53. package/dist/styles/theme.css +5 -0
  54. package/dist/tsconfig.build.tsbuildinfo +1 -1
  55. package/dist/ui/Progress/progress.recipe.js +1 -1
  56. package/dist/utils/getPercentage.d.ts +1 -0
  57. package/dist/utils/getPercentage.js +5 -0
  58. package/dist/utils/maskDisplayName.d.ts +1 -0
  59. package/dist/utils/maskDisplayName.js +8 -0
  60. package/package.json +150 -150
  61. package/dist/components/KYC/KYC.d.ts +0 -5
  62. package/dist/components/KYC/KYC.js +0 -19
  63. package/dist/components/KYC/KYCContext.d.ts +0 -3
  64. package/dist/components/KYC/KYCContext.js +0 -8
  65. package/dist/components/KYC/KYCTrigger.d.ts +0 -5
  66. package/dist/components/KYC/KYCTrigger.js +0 -14
  67. package/dist/components/KYC/Step1.d.ts +0 -1
  68. package/dist/components/KYC/Step1.js +0 -10
  69. package/dist/components/KYC/Step2.d.ts +0 -1
  70. package/dist/components/KYC/Step2.js +0 -15
  71. package/dist/components/KYC/Step3.d.ts +0 -1
  72. package/dist/components/KYC/Step3.js +0 -11
  73. package/dist/components/KYC/StepIndicator.d.ts +0 -1
  74. package/dist/components/KYC/StepIndicator.js +0 -13
  75. package/dist/components/KYC/UploadDocument.d.ts +0 -1
  76. package/dist/components/KYC/UploadDocument.js +0 -8
  77. package/dist/components/KYC/UploadSelfie.d.ts +0 -1
  78. package/dist/components/KYC/UploadSelfie.js +0 -8
  79. package/dist/components/KYC/index.d.ts +0 -2
  80. package/dist/components/KYC/index.js +0 -2
  81. package/dist/components/KYC/useKYC.d.ts +0 -14
  82. package/dist/components/KYC/useKYC.js +0 -32
  83. package/dist/components/KYC/utils.d.ts +0 -0
  84. package/dist/components/KYC/utils.js +0 -1
  85. package/dist/components/Tournaments/TournamentItem.d.ts +0 -5
  86. package/dist/components/Tournaments/TournamentItem.js +0 -97
  87. package/dist/config.d.ts +0 -272
  88. package/dist/config.js +0 -39
@@ -11,7 +11,7 @@ export const progressRecipe = tv({
11
11
  unstyled: {},
12
12
  solid: {
13
13
  root: 'block w-full',
14
- track: 'bg-bg-primary w-full overflow-hidden rounded-full',
14
+ track: 'bg-bg-primary-hover w-full overflow-hidden rounded-full',
15
15
  range: 'bg-brand-400 h-full rounded-full transition-all duration-200 ease-in-out',
16
16
  },
17
17
  },
@@ -0,0 +1 @@
1
+ export declare const getPercentage: (part: number, total: number) => number;
@@ -0,0 +1,5 @@
1
+ export const getPercentage = (part, total) => {
2
+ if (total === 0)
3
+ return 0;
4
+ return (part / total) * 100;
5
+ };
@@ -0,0 +1 @@
1
+ export declare function maskDisplayName(name: string): string;
@@ -0,0 +1,8 @@
1
+ export function maskDisplayName(name) {
2
+ if (name.length <= 7) {
3
+ return '*'.repeat(name.length);
4
+ }
5
+ const visiblePart = name.slice(0, 3);
6
+ const maskedPart = '*'.repeat(7);
7
+ return visiblePart + maskedPart;
8
+ }
package/package.json CHANGED
@@ -1,150 +1,150 @@
1
- {
2
- "name": "@opexa/portal-components",
3
- "version": "0.0.34",
4
- "exports": {
5
- ".": {
6
- "types": "./dist/components/index.d.ts",
7
- "default": "./dist/components/index.js"
8
- },
9
- "./ui": {
10
- "types": "./dist/ui/index.d.ts",
11
- "default": "./dist/ui/index.js"
12
- },
13
- "./icons": {
14
- "types": "./dist/icons/index.d.ts",
15
- "default": "./dist/icons/index.js"
16
- },
17
- "./handlers": {
18
- "types": "./dist/handlers.d.ts",
19
- "default": "./dist/handlers.js"
20
- },
21
- "./middleware": {
22
- "types": "./dist/middleware.d.ts",
23
- "default": "./dist/middleware.js"
24
- },
25
- "./client/utils": {
26
- "types": "./dist/client-utils.d.ts",
27
- "import": "./dist/client-utils.mjs",
28
- "require": "./dist/client-utils.js"
29
- },
30
- "./client/hooks": {
31
- "types": "./dist/client/hooks/index.d.ts",
32
- "default": "./dist/client/hooks/index.js"
33
- },
34
- "./client/services": {
35
- "types": "./dist/client/services/index.d.ts",
36
- "default": "./dist/client/services/index.js"
37
- },
38
- "./server/utils": {
39
- "types": "./dist/server/utils/index.d.ts",
40
- "default": "./dist/server/utils/index.js"
41
- },
42
- "./server/services": {
43
- "types": "./dist/server/services/index.d.ts",
44
- "default": "./dist/server/services/index.js"
45
- },
46
- "./next.config": {
47
- "types": "./dist/next.config.d.ts",
48
- "default": "./dist/next.config.js"
49
- },
50
- "./types": {
51
- "types": "./dist/types/index.d.ts",
52
- "import": "./dist/types/index.js"
53
- },
54
- "./theme.css": "./dist/styles/theme.css",
55
- "./package.json": "./package.json"
56
- },
57
- "files": [
58
- "dist"
59
- ],
60
- "publishConfig": {
61
- "access": "public"
62
- },
63
- "scripts": {
64
- "dev": "next dev --port 4000 --turbopack",
65
- "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
66
- "build:app": "next build",
67
- "start": "next start",
68
- "lint": "next lint",
69
- "release": "release-it"
70
- },
71
- "dependencies": {
72
- "@ark-ui/anatomy": "3.5.0",
73
- "@ark-ui/react": "5.11.0",
74
- "@date-fns/tz": "^1.2.0",
75
- "@next/third-parties": "^15.3.3",
76
- "@tailwindcss/typography": "0.5.16",
77
- "date-fns": "4.1.0",
78
- "embla-carousel-autoplay": "8.6.0",
79
- "embla-carousel-react": "8.6.0",
80
- "is-mobile": "^5.0.0",
81
- "lodash-es": "4.17.21",
82
- "tailwind-merge": "3.3.0",
83
- "tailwind-variants": "1.0.0",
84
- "tailwindcss-plugin-zag": "0.1.0",
85
- "tiny-invariant": "1.3.3",
86
- "type-fest": "4.41.0",
87
- "usehooks-ts": "3.1.1",
88
- "zustand": "5.0.5"
89
- },
90
- "devDependencies": {
91
- "@eslint/eslintrc": "3",
92
- "@hookform/resolvers": "5.0.1",
93
- "@opexa/portal-sdk-core": "0.0.29",
94
- "@tailwindcss/postcss": "4",
95
- "@tanstack/react-query": "5.79.0",
96
- "@tanstack/react-query-devtools": "5.79.0",
97
- "@total-typescript/ts-reset": "0.6.1",
98
- "@types/lodash-es": "4.17.12",
99
- "@types/node": "22",
100
- "@types/react": "19",
101
- "@types/react-dom": "19",
102
- "copy-files-from-to": "^3.12.1",
103
- "eslint": "9",
104
- "eslint-config-next": "15.3.3",
105
- "next": "15.4.0-canary.61",
106
- "react": "19.1.0",
107
- "react-dom": "19.1.0",
108
- "react-hook-form": "7.56.4",
109
- "release-it": "19.0.3",
110
- "tailwindcss": "4.1.8",
111
- "tsc-alias": "^1.8.16",
112
- "typescript": "5",
113
- "zod": "3.25.46"
114
- },
115
- "peerDependencies": {
116
- "@hookform/resolvers": "^4.0.0",
117
- "@opexa/portal-sdk-core": "^0.0.29",
118
- "@tanstack/react-query": "^5.0.0",
119
- "next": "^15.4.0-canary.1",
120
- "react": "^19.0.0",
121
- "react-dom": "^19.0.0",
122
- "react-hook-form": "^7.0.0",
123
- "tailwindcss": "^4.0.0",
124
- "zod": "^3.0.0"
125
- },
126
- "release-it": {
127
- "git": {
128
- "commitMessage": "chore: release ${npm.name} v${version}",
129
- "tagName": "${npm.name}@${version}"
130
- },
131
- "github": {
132
- "release": false
133
- },
134
- "hooks": {
135
- "before:bump": [
136
- "pnpm lint"
137
- ],
138
- "after:bump": [
139
- "pnpm build"
140
- ]
141
- }
142
- },
143
- "copyFiles": [
144
- {
145
- "from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
146
- "to": "dist/",
147
- "toFlat": false
148
- }
149
- ]
150
- }
1
+ {
2
+ "name": "@opexa/portal-components",
3
+ "version": "0.0.35",
4
+ "exports": {
5
+ ".": {
6
+ "types": "./dist/components/index.d.ts",
7
+ "default": "./dist/components/index.js"
8
+ },
9
+ "./ui": {
10
+ "types": "./dist/ui/index.d.ts",
11
+ "default": "./dist/ui/index.js"
12
+ },
13
+ "./icons": {
14
+ "types": "./dist/icons/index.d.ts",
15
+ "default": "./dist/icons/index.js"
16
+ },
17
+ "./handlers": {
18
+ "types": "./dist/handlers.d.ts",
19
+ "default": "./dist/handlers.js"
20
+ },
21
+ "./middleware": {
22
+ "types": "./dist/middleware.d.ts",
23
+ "default": "./dist/middleware.js"
24
+ },
25
+ "./client/utils": {
26
+ "types": "./dist/client-utils.d.ts",
27
+ "import": "./dist/client-utils.mjs",
28
+ "require": "./dist/client-utils.js"
29
+ },
30
+ "./client/hooks": {
31
+ "types": "./dist/client/hooks/index.d.ts",
32
+ "default": "./dist/client/hooks/index.js"
33
+ },
34
+ "./client/services": {
35
+ "types": "./dist/client/services/index.d.ts",
36
+ "default": "./dist/client/services/index.js"
37
+ },
38
+ "./server/utils": {
39
+ "types": "./dist/server/utils/index.d.ts",
40
+ "default": "./dist/server/utils/index.js"
41
+ },
42
+ "./server/services": {
43
+ "types": "./dist/server/services/index.d.ts",
44
+ "default": "./dist/server/services/index.js"
45
+ },
46
+ "./next.config": {
47
+ "types": "./dist/next.config.d.ts",
48
+ "default": "./dist/next.config.js"
49
+ },
50
+ "./types": {
51
+ "types": "./dist/types/index.d.ts",
52
+ "import": "./dist/types/index.js"
53
+ },
54
+ "./theme.css": "./dist/styles/theme.css",
55
+ "./package.json": "./package.json"
56
+ },
57
+ "files": [
58
+ "dist"
59
+ ],
60
+ "publishConfig": {
61
+ "access": "public"
62
+ },
63
+ "scripts": {
64
+ "dev": "next dev --port 4000 --turbopack",
65
+ "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
66
+ "build:app": "next build",
67
+ "start": "next start",
68
+ "lint": "next lint",
69
+ "release": "release-it"
70
+ },
71
+ "dependencies": {
72
+ "@ark-ui/anatomy": "3.5.0",
73
+ "@ark-ui/react": "5.11.0",
74
+ "@date-fns/tz": "^1.2.0",
75
+ "@next/third-parties": "^15.3.3",
76
+ "@tailwindcss/typography": "0.5.16",
77
+ "date-fns": "4.1.0",
78
+ "embla-carousel-autoplay": "8.6.0",
79
+ "embla-carousel-react": "8.6.0",
80
+ "is-mobile": "^5.0.0",
81
+ "lodash-es": "4.17.21",
82
+ "tailwind-merge": "3.3.0",
83
+ "tailwind-variants": "1.0.0",
84
+ "tailwindcss-plugin-zag": "0.1.0",
85
+ "tiny-invariant": "1.3.3",
86
+ "type-fest": "4.41.0",
87
+ "usehooks-ts": "3.1.1",
88
+ "zustand": "5.0.5"
89
+ },
90
+ "devDependencies": {
91
+ "@eslint/eslintrc": "3",
92
+ "@hookform/resolvers": "5.0.1",
93
+ "@opexa/portal-sdk-core": "0.0.29",
94
+ "@tailwindcss/postcss": "4",
95
+ "@tanstack/react-query": "5.79.0",
96
+ "@tanstack/react-query-devtools": "5.79.0",
97
+ "@total-typescript/ts-reset": "0.6.1",
98
+ "@types/lodash-es": "4.17.12",
99
+ "@types/node": "22",
100
+ "@types/react": "19",
101
+ "@types/react-dom": "19",
102
+ "copy-files-from-to": "^3.12.1",
103
+ "eslint": "9",
104
+ "eslint-config-next": "15.3.3",
105
+ "next": "15.4.0-canary.61",
106
+ "react": "19.1.0",
107
+ "react-dom": "19.1.0",
108
+ "react-hook-form": "7.56.4",
109
+ "release-it": "19.0.3",
110
+ "tailwindcss": "4.1.8",
111
+ "tsc-alias": "^1.8.16",
112
+ "typescript": "5",
113
+ "zod": "3.25.46"
114
+ },
115
+ "peerDependencies": {
116
+ "@hookform/resolvers": "^4.0.0",
117
+ "@opexa/portal-sdk-core": "^0.0.29",
118
+ "@tanstack/react-query": "^5.0.0",
119
+ "next": "^15.4.0-canary.1",
120
+ "react": "^19.0.0",
121
+ "react-dom": "^19.0.0",
122
+ "react-hook-form": "^7.0.0",
123
+ "tailwindcss": "^4.0.0",
124
+ "zod": "^3.0.0"
125
+ },
126
+ "release-it": {
127
+ "git": {
128
+ "commitMessage": "chore: release ${npm.name} v${version}",
129
+ "tagName": "${npm.name}@${version}"
130
+ },
131
+ "github": {
132
+ "release": false
133
+ },
134
+ "hooks": {
135
+ "before:bump": [
136
+ "pnpm lint"
137
+ ],
138
+ "after:bump": [
139
+ "pnpm build"
140
+ ]
141
+ }
142
+ },
143
+ "copyFiles": [
144
+ {
145
+ "from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
146
+ "to": "dist/",
147
+ "toFlat": false
148
+ }
149
+ ]
150
+ }
@@ -1,5 +0,0 @@
1
- import type { ImageProps } from 'next/image';
2
- export interface KYCProps {
3
- logo: ImageProps['src'];
4
- }
5
- export declare function KYC(props: KYCProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Portal } from '@ark-ui/react';
4
- import Image from 'next/image';
5
- import { Dialog } from '../../ui/index.js';
6
- import { KYCContext } from './KYCContext.js';
7
- import { Step1 } from './Step1.js';
8
- import { Step2 } from './Step2.js';
9
- import { Step3 } from './Step3.js';
10
- import { StepIndicator } from './StepIndicator.js';
11
- import { UploadDocument } from './UploadDocument.js';
12
- import { UploadSelfie } from './UploadSelfie.js';
13
- import { useKYC } from './useKYC.js';
14
- export function KYC(props) {
15
- const context = useKYC();
16
- return (_jsx(KYCContext, { value: context, children: _jsx(Dialog.Root, { open: context.open, onOpenChange: (details) => {
17
- context.setOpen(details.open);
18
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "mx-auto w-fit", children: [context.uploadingSelfie && _jsx(UploadSelfie, {}), context.uploadingDocument && _jsx(UploadDocument, {}), !context.uploadingSelfie && !context.uploadingDocument && (_jsxs("div", { className: "bg-bg-primary-alt flex h-full w-full flex-col p-3xl lg:h-[800px] lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsx(StepIndicator, {}), context.step === 1 && _jsx(Step1, {}), context.step === 2 && _jsx(Step2, {}), context.step === 3 && _jsx(Step3, {})] }))] }) })] }) }) }));
19
- }
@@ -1,3 +0,0 @@
1
- import type { UseKYCReturn } from './useKYC';
2
- export declare const KYCContext: import("react").Context<UseKYCReturn | null>;
3
- export declare function useKYCContext(): UseKYCReturn;
@@ -1,8 +0,0 @@
1
- import { createContext, useContext } from 'react';
2
- import invariant from 'tiny-invariant';
3
- export const KYCContext = createContext(null);
4
- export function useKYCContext() {
5
- const context = useContext(KYCContext);
6
- invariant(context);
7
- return context;
8
- }
@@ -1,5 +0,0 @@
1
- import type { ComponentPropsWithRef } from 'react';
2
- export interface KYCTriggerProps extends ComponentPropsWithRef<'button'> {
3
- asChild?: boolean;
4
- }
5
- export declare function KYCTrigger(props: KYCTriggerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
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 KYCTrigger(props) {
7
- const globalStore = useGlobalStore(useShallow((ctx) => ({
8
- kyc: ctx.kyc,
9
- })));
10
- return (_jsx(ark.button, { type: "button", ...props, onClick: (e) => {
11
- globalStore.kyc.setOpen(true);
12
- return props.onClick?.(e);
13
- }, "data-state": globalStore.kyc.open ? 'open' : 'closed' }));
14
- }
@@ -1 +0,0 @@
1
- export declare function Step1(): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Field } from '../../ui/index.js';
3
- import { useKYCContext } from './KYCContext.js';
4
- export function Step1() {
5
- const context = useKYCContext();
6
- return (_jsxs("form", { className: "mt-3xl flex grow flex-col", onSubmit: (e) => {
7
- e.preventDefault();
8
- context.setStep(2);
9
- }, children: [_jsx("h2", { className: "text-text-primary-900 text-center text-lg", children: "Basic Information" }), _jsx("p", { className: "text-text-tertiary-600 text-center text-sm", children: "Enter your basic details for identification and communication." }), _jsxs("div", { className: "mt-9 grow", children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Real name" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-xl", children: [_jsx(Field.Label, { children: "Date of birth" }), _jsx(Field.Input, { type: "date" })] }), _jsx(Button, { type: "submit", className: "mt-xl", children: "Continue" })] }), _jsxs("div", { className: "text-text-tertiary-600 mt-3xl w-full text-center text-sm", children: ["Use another account.", ' ', _jsx("button", { type: "button", className: "text-button-tertiary-fg font-semibold", children: "Log out" })] })] }));
10
- }
@@ -1 +0,0 @@
1
- export declare function Step2(): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { HelpCircleIcon, UploadCloud02Icon } from '../../icons/index.js';
3
- import { Button, Field } from '../../ui/index.js';
4
- import { useKYCContext } from './KYCContext.js';
5
- export function Step2() {
6
- const context = useKYCContext();
7
- return (_jsxs("form", { className: "mt-3xl flex grow flex-col items-start justify-start overflow-y-auto", onSubmit: (e) => {
8
- e.preventDefault();
9
- context.setStep(3);
10
- }, children: [_jsx("h2", { className: "text-text-primary-900 w-full text-center text-lg", children: "Verify Your Identity" }), _jsx("p", { className: "text-text-tertiary-600 w-full text-center text-sm", children: "Verify your details to confirm your identity and secure your access." }), _jsxs("div", { className: "border-border-secondary bg-bg-brand-secondary-alt text-text-tertiary-600 mt-xl w-full rounded-xl border p-3 text-2xs leading-tight", children: [_jsx("h4", { className: "font-semibold", children: "Instructions" }), _jsxs("ol", { className: "mt-2 list-inside list-decimal", children: [_jsx("li", { children: "Upload a full photo of your ID." }), _jsx("li", { children: "Please ensure that all details in the uploaded image are legible." }), _jsx("li", { children: "Please ensure that the ID uploaded is within the validity period." })] })] }), _jsxs("div", { className: "scrollbar:w-2 scrollbar-track:bg-bg-primary-alt scrollbar-track:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-thumb:rounded-full mt-xl w-full grow overflow-y-auto", children: [_jsxs(Field.Root, { children: [_jsxs(Field.Label, { className: "flex items-center gap-1.5", children: ["Front of your ID", ' ', _jsx(HelpCircleIcon, { className: "text-text-quinary size-4" })] }), _jsxs("div", { className: "border-border-secondary bg-bg-primary rounded-xl border px-3xl py-xl", children: [_jsx("div", { className: "border-border-secondary shadow-xs text-text-secondary-700 mx-auto flex size-8 items-center justify-center rounded-sm border", children: _jsx(UploadCloud02Icon, { className: "size-4" }) }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-center text-xs", children: [_jsx("span", { className: "text-button-tertiary-fg font-semibold", children: "Click to upload" }), ' ', "or drag and drop"] }), _jsx("p", { className: "text-text-tertiary-600 mt-xs text-center text-xs", children: "PNG, JPG or JPEG (max. 10mb)" }), _jsx("p", { className: "text-text-tertiary-600 mt-xs text-center text-xs", children: "or" }), _jsx(Button, { size: "xs", variant: "outline", className: "mx-auto mt-xs w-fit", onClick: () => {
11
- context.setUploadingDocument(true);
12
- }, children: "Take a photo" })] })] }), _jsxs(Field.Root, { className: "mt-3", children: [_jsxs(Field.Label, { className: "flex items-center gap-1.5", children: ["Selfie holding your ID", ' ', _jsx(HelpCircleIcon, { className: "text-text-quinary size-4" })] }), _jsx("div", { className: "border-border-secondary bg-bg-primary flex h-[180px] items-center justify-center rounded-xl border px-3xl py-xl", children: _jsx(Button, { size: "xs", variant: "outline", className: "w-fit", onClick: () => {
13
- context.setUploadingDocument(true);
14
- }, children: "Take a photo" }) })] })] }), _jsxs("div", { className: "mt-xl w-full", children: [_jsx(Button, { type: "submit", children: "Continue" }), _jsxs("div", { className: "text-text-tertiary-600 mt-3xl w-full text-center text-sm", children: ["Use another account.", ' ', _jsx("button", { type: "button", className: "text-button-tertiary-fg font-semibold", children: "Log out" })] })] })] }));
15
- }
@@ -1 +0,0 @@
1
- export declare function Step3(): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CheckIcon } from '../../icons/index.js';
3
- import { Button, Checkbox, Field } from '../../ui/index.js';
4
- import { useKYCContext } from './KYCContext.js';
5
- export function Step3() {
6
- const context = useKYCContext();
7
- return (_jsxs("form", { className: "mt-3xl flex grow flex-col items-start justify-start overflow-y-auto", onSubmit: (e) => {
8
- e.preventDefault();
9
- context.setOpen(false);
10
- }, children: [_jsx("h2", { className: "text-text-primary-900 w-full text-center text-lg", children: "Personal Information" }), _jsx("p", { className: "text-text-tertiary-600 w-full text-center text-sm", children: "Provide your basic details and work info." }), _jsxs("div", { className: "scrollbar:w-2 scrollbar-track:bg-bg-primary-alt scrollbar-track:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-thumb:rounded-full mt-4 w-full grow overflow-y-auto", children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, {})] }), _jsxs(Checkbox.Root, { className: "mt-lg", children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Use permanent address as current address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-xl", children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-xl", children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-xl", children: [_jsx(Field.Label, { children: "Nature of work" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-xl", children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, {})] }), _jsxs(Field.Root, { className: "mt-xl", children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, {})] })] }), _jsxs("div", { className: "mt-xl w-full", children: [_jsx(Button, { type: "submit", children: "Submit and Play" }), _jsxs("div", { className: "text-text-tertiary-600 mt-3xl w-full text-center text-sm", children: ["Use another account.", ' ', _jsx("button", { type: "button", className: "text-button-tertiary-fg font-semibold", children: "Log out" })] })] })] }));
11
- }
@@ -1 +0,0 @@
1
- export declare function StepIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { dataAttr } from '../../utils/index.js';
3
- import { useKYCContext } from './KYCContext.js';
4
- export function StepIndicator() {
5
- const context = useKYCContext();
6
- return (_jsxs("div", { className: "mx-auto mt-3xl flex w-fit items-center", children: [_jsx(Circle, { active: context.step >= 1 }), _jsx(Line, { active: context.step >= 2 }), _jsx(Circle, { active: context.step >= 2 }), _jsx(Line, { active: context.step >= 3 }), _jsx(Circle, { active: context.step >= 3 })] }));
7
- }
8
- function Circle({ active }) {
9
- return (_jsx("div", { className: "ui-active:bg-bg-brand-solid ui-active:shadow-brand border-border-disabled-subtle bg-bg-disabled-subtle group flex size-6 items-center justify-center rounded-full transition-colors delay-300 duration-300", "data-active": dataAttr(active), children: _jsx("div", { className: "bg-text-disabled-subtle size-2.5 rounded-full transition-all delay-300 duration-300 ui-group-active:bg-white" }) }));
10
- }
11
- function Line({ active }) {
12
- return (_jsx("div", { className: "bg-bg-quaternary group relative h-0.5 w-20", "data-active": dataAttr(active), children: _jsx("div", { className: "bg-text-brand-primary-600 absolute left-0 top-0 h-full w-0 transition-all duration-300 ui-group-active:w-full" }) }));
13
- }
@@ -1 +0,0 @@
1
- export declare function UploadDocument(): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Camera01Icon, CheckCircleIcon, XIcon } from '../../icons/index.js';
3
- import { Button } from '../../ui/index.js';
4
- import { useKYCContext } from './KYCContext.js';
5
- export function UploadDocument() {
6
- const context = useKYCContext();
7
- return (_jsxs("div", { className: "bg-bg-primary-alt relative w-[747px] rounded-xl pb-12 pt-4xl", children: [_jsx("button", { type: "button", className: "absolute right-4 top-4", onClick: () => context.setUploadingDocument(false), children: _jsx(XIcon, { className: "text-text-quinary size-5" }) }), _jsx("h2", { className: "text-center text-xl font-semibold", children: "Take a Picture of Your Front ID" }), _jsxs("p", { className: "text-text-tertiary-600 mt-md text-center", children: ["Make sure your ID is clearly visible, well-lit, and not blurry.", _jsx("br", {}), " Avoid glare or reflections, and ensure all corners are within the frame."] }), _jsx("div", { className: "mx-auto mt-10 h-[333px] w-[643px] rounded-xl bg-white/10" }), _jsxs("div", { className: "mx-auto mt-10 flex w-fit gap-3", children: [_jsxs(Button, { variant: "outline", fullWidth: false, children: [_jsx(Camera01Icon, {}), "Retake Photo"] }), _jsxs(Button, { fullWidth: false, children: [_jsx(CheckCircleIcon, {}), "Use Photo"] })] })] }));
8
- }
@@ -1 +0,0 @@
1
- export declare function UploadSelfie(): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Camera01Icon, CheckCircleIcon, XIcon } from '../../icons/index.js';
3
- import { Button } from '../../ui/index.js';
4
- import { useKYCContext } from './KYCContext.js';
5
- export function UploadSelfie() {
6
- const context = useKYCContext();
7
- return (_jsxs("div", { className: "bg-bg-primary-alt relative w-[747px] rounded-xl pb-12 pt-4xl", children: [_jsx("button", { type: "button", className: "absolute right-4 top-4", onClick: () => context.setUploadingSelfie(false), children: _jsx(XIcon, { className: "text-text-quinary size-5" }) }), _jsx("h2", { className: "text-center text-xl font-semibold", children: "Take a Selfie Holding Your ID" }), _jsx("p", { className: "text-text-tertiary-600 mt-md text-center", children: "Make sure your face and ID are clearly visible, with no glare or blur." }), _jsx("div", { className: "mx-auto mt-10 h-[333px] w-[643px] rounded-xl bg-white/10" }), _jsxs("div", { className: "mx-auto mt-10 flex w-fit gap-3", children: [_jsxs(Button, { variant: "outline", fullWidth: false, children: [_jsx(Camera01Icon, {}), "Retake Photo"] }), _jsxs(Button, { fullWidth: false, children: [_jsx(CheckCircleIcon, {}), "Use Photo"] })] })] }));
8
- }
@@ -1,2 +0,0 @@
1
- export * from './KYC';
2
- export * from './KYCTrigger';
@@ -1,2 +0,0 @@
1
- export * from './KYC.js';
2
- export * from './KYCTrigger.js';
@@ -1,14 +0,0 @@
1
- export interface UseKYCReturn extends ReturnType<typeof useKYC> {
2
- }
3
- type Step = 1 | 2 | 3;
4
- export declare function useKYC(): {
5
- open: boolean;
6
- setOpen: (value: boolean) => void;
7
- step: Step;
8
- setStep: (value: Step) => void;
9
- uploadingSelfie: boolean;
10
- setUploadingSelfie: import("react").Dispatch<import("react").SetStateAction<boolean>>;
11
- uploadingDocument: boolean;
12
- setUploadingDocument: import("react").Dispatch<import("react").SetStateAction<boolean>>;
13
- };
14
- export {};
@@ -1,32 +0,0 @@
1
- import { useState } from 'react';
2
- import { useShallow } from 'zustand/shallow';
3
- import { useGlobalStore } from '../../client/hooks/index.js';
4
- export function useKYC() {
5
- const [step, setStep_] = useState(1);
6
- const [open, setOpen_] = useGlobalStore(useShallow((ctx) => [ctx.kyc.open, ctx.kyc.setOpen]));
7
- const [uploadingSelfie, setUploadingSelfie] = useState(false);
8
- const [uploadingDocument, setUploadingDocument] = useState(false);
9
- function setOpen(value) {
10
- setOpen_(value);
11
- if (!value) {
12
- setTimeout(() => {
13
- setStep_(1);
14
- setUploadingSelfie(false);
15
- setUploadingDocument(false);
16
- }, 1000);
17
- }
18
- }
19
- function setStep(value) {
20
- setStep_(value);
21
- }
22
- return {
23
- open,
24
- setOpen,
25
- step,
26
- setStep,
27
- uploadingSelfie,
28
- setUploadingSelfie,
29
- uploadingDocument,
30
- setUploadingDocument,
31
- };
32
- }
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,5 +0,0 @@
1
- import type { Jackpot } from '@opexa/portal-sdk-core';
2
- export interface TournamentItemProps {
3
- jackpot: Jackpot;
4
- }
5
- export declare function TournamentItem({ jackpot }: TournamentItemProps): import("react/jsx-runtime").JSX.Element;