@opexa/portal-components 0.0.245 → 0.0.247

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/components/FeatureFlag/FeatureFlag.d.ts +1 -0
  2. package/dist/components/FeatureFlag/FeatureFlag.js +29 -0
  3. package/dist/components/FeatureFlag/index.d.ts +1 -0
  4. package/dist/components/FeatureFlag/index.js +1 -0
  5. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  6. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  7. package/dist/components/KYC/AutoOpen.d.ts +1 -0
  8. package/dist/components/KYC/AutoOpen.js +40 -0
  9. package/dist/components/KYC/KYC.lazy.js +5 -1
  10. package/dist/components/KYC/backup/Header.d.ts +1 -0
  11. package/dist/components/KYC/backup/Header.js +8 -0
  12. package/dist/components/KYC/backup/Indicator.d.ts +1 -0
  13. package/dist/components/KYC/backup/Indicator.js +9 -0
  14. package/dist/components/KYC/backup/KYC.d.ts +1 -0
  15. package/dist/components/KYC/backup/KYC.js +14 -0
  16. package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
  17. package/dist/components/KYC/backup/KYC.lazy.js +26 -0
  18. package/dist/components/KYC/backup/KYCContext.d.ts +6 -0
  19. package/dist/components/KYC/backup/KYCContext.js +2 -0
  20. package/dist/components/KYC/backup/Step1.d.ts +1 -0
  21. package/dist/components/KYC/backup/Step1.js +13 -0
  22. package/dist/components/KYC/backup/Step2.d.ts +1 -0
  23. package/dist/components/KYC/backup/Step2.js +13 -0
  24. package/dist/components/KYC/backup/Step3.d.ts +1 -0
  25. package/dist/components/KYC/backup/Step3.js +13 -0
  26. package/dist/components/KYC/backup/Step4.d.ts +1 -0
  27. package/dist/components/KYC/backup/Step4.js +7 -0
  28. package/dist/components/KYC/backup/useKYC.d.ts +10 -0
  29. package/dist/components/KYC/backup/useKYC.js +8 -0
  30. package/dist/components/KYC/loadModels.d.ts +1 -0
  31. package/dist/components/KYC/loadModels.js +9 -0
  32. package/dist/components/KYC/utils.js +18 -18
  33. package/dist/components/Messages/Message.d.ts +1 -0
  34. package/dist/components/Messages/Message.js +35 -0
  35. package/dist/components/Messages/MessageContext.d.ts +6 -0
  36. package/dist/components/Messages/MessageContext.js +2 -0
  37. package/dist/components/Messages/MessagePopup.d.ts +1 -0
  38. package/dist/components/Messages/MessagePopup.js +20 -0
  39. package/dist/components/Messages/MessageTrigger.d.ts +8 -0
  40. package/dist/components/Messages/MessageTrigger.js +19 -0
  41. package/dist/components/Quests/CountdownTimer.d.ts +15 -0
  42. package/dist/components/Quests/CountdownTimer.js +33 -0
  43. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
  44. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +78 -0
  45. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  46. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
  47. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
  48. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
  49. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
  50. package/dist/components/Quests/WageringQuest/WageringQuest.js +20 -0
  51. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
  52. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
  53. package/dist/components/SignUp/SignUp.lazy.d.ts +12 -0
  54. package/dist/components/SignUp/SignUp.lazy.js +18 -0
  55. package/dist/components/SignUp/SignUpContext.d.ts +6 -0
  56. package/dist/components/SignUp/SignUpContext.js +2 -0
  57. package/dist/components/SignUp/SignUpForm.d.ts +1 -0
  58. package/dist/components/SignUp/SignUpForm.js +284 -0
  59. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +1 -0
  60. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +198 -0
  61. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +1 -0
  62. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +251 -0
  63. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +10 -0
  64. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +41 -0
  65. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +1 -0
  66. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +429 -0
  67. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +13 -0
  68. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +26 -0
  69. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +7 -0
  70. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +2 -0
  71. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +11 -0
  72. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +20 -0
  73. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  74. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  75. package/dist/constants/BranchCode.d.ts +4 -0
  76. package/dist/constants/BranchCode.js +42 -0
  77. package/dist/icons/BellRingIcon.d.ts +2 -0
  78. package/dist/icons/BellRingIcon.js +4 -0
  79. package/dist/services/queries.js +2528 -2528
  80. package/dist/styles/theme.css +694 -694
  81. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  82. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  83. package/dist/utils/dataUrlToBlob.d.ts +1 -0
  84. package/dist/utils/dataUrlToBlob.js +11 -0
  85. package/dist/utils/getGameImageUrl.js +1 -1
  86. package/dist/utils/resizeImageSize.d.ts +2 -0
  87. package/dist/utils/resizeImageSize.js +11 -0
  88. package/package.json +165 -165
@@ -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 @@
1
+ export declare function AutoOpen(): null;
@@ -0,0 +1,40 @@
1
+ import { useEffect } from 'react';
2
+ import { useShallow } from 'zustand/shallow';
3
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
4
+ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
5
+ import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
6
+ import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
7
+ import { KYC_PROMPT_LOCALSTORAGE_KEY } from '../../constants/index.js';
8
+ export function AutoOpen() {
9
+ const kycStore = useGlobalStore(useShallow((ctx) => ctx.kyc));
10
+ const { data: session } = useSessionQuery();
11
+ const { data: account } = useAccountQuery();
12
+ const { data: verification } = useMemberVerificationQuery();
13
+ const isBasicInfoCompleted = account?.realName !== null && account?.birthDay !== null;
14
+ const isUploadCompleted = verification &&
15
+ verification.idFrontImage !== null &&
16
+ verification.selfieImage !== null;
17
+ const isRejected = Boolean(verification?.status === 'REJECTED');
18
+ const step = !isBasicInfoCompleted
19
+ ? 1
20
+ : isRejected
21
+ ? 2
22
+ : isUploadCompleted
23
+ ? 3
24
+ : 2;
25
+ const shouldOpen = !isBasicInfoCompleted || !isUploadCompleted || isRejected;
26
+ useEffect(() => {
27
+ if (session?.status == 'authenticated' &&
28
+ shouldOpen &&
29
+ localStorage.getItem(KYC_PROMPT_LOCALSTORAGE_KEY) === null) {
30
+ kycStore.setKycReminder(true);
31
+ return;
32
+ }
33
+ }, [kycStore, session?.status, shouldOpen]);
34
+ useEffect(() => {
35
+ if (step) {
36
+ kycStore.setStep(step);
37
+ }
38
+ }, [kycStore, step]);
39
+ return null;
40
+ }
@@ -28,7 +28,11 @@ export function KYC(props) {
28
28
  Boolean(verification?.status === 'PENDING') ||
29
29
  Boolean(verification?.status === 'APPROVED');
30
30
  const hasMissingData = !isBasicInfoCompleted || !isUploadCompleted || !isVerified;
31
- const steps = !isBasicInfoCompleted ? 1 : !isUploadCompleted ? 2 : 3;
31
+ const steps = !isBasicInfoCompleted
32
+ ? 1
33
+ : !isUploadCompleted || !isVerified
34
+ ? 2
35
+ : 3;
32
36
  useEffect(() => {
33
37
  if (steps) {
34
38
  kyc.setStep(steps);
@@ -0,0 +1 @@
1
+ export declare function Header(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
3
+ import { XIcon } from '../../../icons/XIcon.js';
4
+ import { Dialog } from '../../../ui/Dialog/index.js';
5
+ import { IconButton } from '../../../ui/IconButton/index.js';
6
+ export function Header() {
7
+ return (_jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "bg-bg-primary-alt relative flex items-center gap-xl px-xl py-md lg:justify-center lg:bg-transparent lg:p-0", children: [_jsx(IconButton, { size: "2xs", variant: "outline", colorScheme: "gray", className: "lg:hidden", onClick: () => api.setOpen(false), children: _jsx(ChevronLeftIcon, {}) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "Personal Verification" }), _jsx("button", { type: "button", className: "text-text-quinary absolute right-0 top-1/2 hidden -translate-y-1/2 lg:block", onClick: () => api.setOpen(false), children: _jsx(XIcon, { className: "size-6" }) })] })) }));
8
+ }
@@ -0,0 +1 @@
1
+ export declare function Indicator(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { noop } from 'lodash-es';
3
+ import { ArrowLeftIcon } from '../../../icons/ArrowLeftIcon.js';
4
+ import { Progress } from '../../../ui/Progress/index.js';
5
+ import { useKYCContext } from './KYCContext.js';
6
+ export function Indicator() {
7
+ const context = useKYCContext();
8
+ return (_jsxs("div", { className: "mt-xl grid grid-cols-[max-content_auto_auto] items-center px-xl lg:mt-md lg:px-0", children: [_jsxs("button", { className: "text-text-tertiary-600 flex items-center gap-sm text-sm font-semibold", children: [_jsx(ArrowLeftIcon, { className: "size-5" }), "Back"] }), _jsxs("div", { className: "flex justify-center gap-2", children: [_jsx(Progress.Root, { className: "w-[5.625rem] shrink-0", value: context.step >= 2 ? 100 : 50, onValueChange: noop, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx(Progress.Root, { className: "w-[5.625rem] shrink-0", value: context.step >= 3 ? 50 : 0, onValueChange: noop, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] })] }));
9
+ }
@@ -0,0 +1 @@
1
+ export declare function KYC(): import("react/jsx-runtime").JSX.Element | undefined;
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import dynamic from 'next/dynamic';
4
+ import { useShallow } from 'zustand/shallow';
5
+ import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
+ const Component = dynamic(() => import('./KYC.lazy.js').then((m) => m.KYC), {
7
+ ssr: false,
8
+ loading: () => null,
9
+ });
10
+ export function KYC() {
11
+ const touched = useGlobalStore(useShallow((ctx) => ctx.kyc['~touched']));
12
+ if (touched)
13
+ return _jsx(Component, {});
14
+ }
@@ -0,0 +1 @@
1
+ export declare function KYC(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { useShallow } from 'zustand/shallow';
5
+ import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
+ import { Dialog } from '../../../ui/Dialog/index.js';
7
+ import { Portal } from '../../../ui/Portal/index.js';
8
+ import { Header } from './Header.js';
9
+ import { Indicator } from './Indicator.js';
10
+ import { KYCContext } from './KYCContext.js';
11
+ import { Step1 } from './Step1.js';
12
+ import { Step2 } from './Step2.js';
13
+ import { Step3 } from './Step3.js';
14
+ import { Step4 } from './Step4.js';
15
+ import { useKYC } from './useKYC.js';
16
+ export function KYC() {
17
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
18
+ kyc: ctx.kyc,
19
+ })));
20
+ const context = useKYC();
21
+ return (_jsx(KYCContext, { value: context, children: _jsx(Dialog.Root, { open: globalStore.kyc.open, onOpenChange: (details) => {
22
+ globalStore.kyc.setOpen(details.open);
23
+ }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: twMerge(context.step === 4 && 'flex items-center'), children: _jsxs(Dialog.Content, { className: twMerge(context.step < 4
24
+ ? 'bg-bg-primary lg:bg-bg-primary-alt mx-auto h-full w-full lg:h-auto lg:w-[400px] lg:p-3xl'
25
+ : 'mx-auto w-[25rem] max-w-[calc(100%-2rem)] p-3xl'), children: [context.step < 4 && _jsx(Header, {}), context.step < 4 && _jsx(Indicator, {}), context.step === 1 && _jsx(Step1, {}), context.step === 2 && _jsx(Step2, {}), context.step === 3 && _jsx(Step3, {}), context.step === 4 && _jsx(Step4, {})] }) })] }) }) }));
26
+ }
@@ -0,0 +1,6 @@
1
+ import type { UseKYCReturn } from './useKYC';
2
+ export declare const KYCContext: (props: {
3
+ value: UseKYCReturn;
4
+ } & {
5
+ children?: import("react").ReactNode | undefined;
6
+ }) => React.ReactNode, useKYCContext: () => UseKYCReturn;
@@ -0,0 +1,2 @@
1
+ import { createContext } from '../../../client/utils/createContext.js';
2
+ export const [KYCContext, useKYCContext] = createContext();
@@ -0,0 +1 @@
1
+ export declare function Step1(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Image from 'next/image';
3
+ import { CheckIcon } from '../../../icons/CheckIcon.js';
4
+ import { XIcon } from '../../../icons/XIcon.js';
5
+ import uploadId from '../../../images/capture-id-banner.png';
6
+ import { Button } from '../../../ui/Button/index.js';
7
+ import { useKYCContext } from './KYCContext.js';
8
+ export function Step1() {
9
+ const context = useKYCContext();
10
+ return (_jsxs("div", { className: "mt-2xl px-xl lg:mt-3xl lg:px-0", children: [_jsx("p", { className: "lg:text-text-secondary-700 text-center text-2xl font-semibold lg:text-base", children: "Prepare to upload your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt mt-6 rounded-xl border p-4 lg:mt-2xl lg:border-0 lg:bg-transparent lg:p-0", 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"] })] }), _jsxs("div", { className: "mt-4xl space-y-lg", children: [_jsx(Button, { onClick: () => {
11
+ context.setStep(2);
12
+ }, children: "Continue" }), _jsx(Button, { variant: "outline", children: "Continue on phone" })] })] })] }));
13
+ }
@@ -0,0 +1 @@
1
+ export declare function Step2(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Image from 'next/image';
3
+ import { CheckIcon } from '../../../icons/CheckIcon.js';
4
+ import { XIcon } from '../../../icons/XIcon.js';
5
+ import selfie from '../../../images/capture-selfie-banner.png';
6
+ import { Button } from '../../../ui/Button/index.js';
7
+ import { useKYCContext } from './KYCContext.js';
8
+ export function Step2() {
9
+ const context = useKYCContext();
10
+ return (_jsxs("div", { className: "mt-2xl px-xl lg:mt-3xl lg:px-0", children: [_jsx("p", { className: "lg:text-text-secondary-700 text-center text-2xl font-semibold lg:text-base", children: "Take a selfie holding your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt mt-6 rounded-xl border p-4 lg:mt-2xl lg:border-0 lg:bg-transparent lg:p-0", 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"] })] }), _jsxs("div", { className: "mt-4xl space-y-lg", children: [_jsx(Button, { size: "sm", onClick: () => {
11
+ context.setStep(3);
12
+ }, children: "Continue" }), _jsx(Button, { variant: "outline", children: "Continue on phone" })] })] })] }));
13
+ }
@@ -0,0 +1 @@
1
+ export declare function Step3(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CheckIcon } from '../../../icons/CheckIcon.js';
3
+ import { Button } from '../../../ui/Button/index.js';
4
+ import { Checkbox } from '../../../ui/Checkbox/index.js';
5
+ import { Field } from '../../../ui/Field/index.js';
6
+ import { useKYCContext } from './KYCContext.js';
7
+ export function Step3() {
8
+ const context = useKYCContext();
9
+ return (_jsxs("div", { className: "mt-2xl px-xl lg:mt-3xl lg:px-0", children: [_jsx("p", { className: "lg:text-text-secondary-700 text-center text-2xl font-semibold lg:text-base", children: "Enter your basic and work-related information" }), _jsxs("form", { className: "border-border-secondary bg-bg-primary-alt mt-6 rounded-xl border p-4 lg:mt-2xl lg:border-0 lg:bg-transparent lg:p-0", onSubmit: (e) => {
10
+ e.preventDefault();
11
+ context.setStep(4);
12
+ }, children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, { placeholder: "Enter your permanent address" })] }), _jsxs(Checkbox.Root, { className: "mt-2xl", 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-sm", children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, { placeholder: "Enter your current address" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, { placeholder: "Enter your source of income" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Work Description" }), _jsx(Field.Input, { placeholder: "Enter your work description" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, { placeholder: "Enter your place of birth" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality" })] }), _jsx(Button, { type: "submit", className: "mt-4xl", children: "Submit" })] })] }));
13
+ }
@@ -0,0 +1 @@
1
+ export declare function Step4(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CheckCircleIcon } from '../../../icons/CheckCircleIcon.js';
3
+ import { Button } from '../../../ui/Button/index.js';
4
+ import { Dialog } from '../../../ui/Dialog/index.js';
5
+ export function Step4() {
6
+ return (_jsxs("div", { 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("h2", { className: "mt-3 text-center", children: "Submission Successful" }), _jsx("p", { 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(Dialog.Context, { children: (api) => (_jsx(Button, { className: "mt-3xl", onClick: () => api.setOpen(false), children: "Ok" })) })] }));
7
+ }
@@ -0,0 +1,10 @@
1
+ type Step = 1 | 2 | 3 | 4;
2
+ export interface UseKYCReturn {
3
+ step: Step;
4
+ setStep: (step: Step) => void;
5
+ }
6
+ export declare function useKYC(): {
7
+ step: Step;
8
+ setStep: import("react").Dispatch<import("react").SetStateAction<Step>>;
9
+ };
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { useState } from 'react';
2
+ export function useKYC() {
3
+ const [step, setStep] = useState(1);
4
+ return {
5
+ step,
6
+ setStep,
7
+ };
8
+ }
@@ -0,0 +1 @@
1
+ export declare function loadFaceApiModels(): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import * as faceapi from 'face-api.js';
2
+ export async function loadFaceApiModels() {
3
+ const MODEL_URL = '/models';
4
+ await Promise.all([
5
+ faceapi.nets.tinyFaceDetector.loadFromUri(MODEL_URL),
6
+ faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL),
7
+ faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL),
8
+ ]);
9
+ }