@opexa/portal-components 0.0.696 → 0.0.697

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 (56) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +7 -44
  2. package/dist/components/DepositWithdrawal/PaymentMethods.js +26 -9
  3. package/dist/components/DepositWithdrawal/utils.d.ts +1 -3
  4. package/dist/components/DepositWithdrawal/utils.js +0 -3
  5. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -0
  6. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -0
  7. package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +1 -0
  8. package/dist/components/KYC/KYCDefault/BasicInformation.js +101 -0
  9. package/dist/components/KYC/KYCVerificationStatus.d.ts +1 -0
  10. package/dist/components/KYC/KYCVerificationStatus.js +10 -0
  11. package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +1 -0
  12. package/dist/components/KYC/KYCVerificationStatus.lazy.js +33 -0
  13. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +1 -0
  14. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +29 -0
  15. package/dist/components/SessionWatcher/SessionWatcher.d.ts +1 -0
  16. package/dist/components/SessionWatcher/SessionWatcher.js +20 -0
  17. package/dist/components/SessionWatcher/index.d.ts +1 -0
  18. package/dist/components/SessionWatcher/index.js +1 -0
  19. package/dist/ui/Badge/Badge.d.ts +12 -12
  20. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  21. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  22. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  23. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  24. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  25. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  26. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  27. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  28. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  29. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  30. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  31. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  32. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  33. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  34. package/dist/ui/Field/Field.d.ts +21 -21
  35. package/dist/ui/Field/field.recipe.d.ts +3 -3
  36. package/dist/ui/Menu/Menu.d.ts +90 -90
  37. package/dist/ui/Menu/menu.recipe.d.ts +5 -5
  38. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  39. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  40. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  41. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  42. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  43. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  44. package/dist/ui/Popover/Popover.d.ts +55 -55
  45. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  46. package/dist/ui/Progress/Progress.d.ts +27 -27
  47. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  48. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  49. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  50. package/dist/ui/Select/Select.d.ts +45 -45
  51. package/dist/ui/Select/select.recipe.d.ts +3 -3
  52. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  53. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  54. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  55. package/package.json +1 -1
  56. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -7,7 +7,6 @@ import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSetting
7
7
  import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
8
8
  import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
9
9
  import { onMobileDevice } from '../../../utils/onMobileDevice.js';
10
- import { AiOPaymentMethods } from '../AiOPaymentMethods.js';
11
10
  import { PaymentMethods } from '../PaymentMethods.js';
12
11
  import { AiOGCashDeposit } from './AiOGCashDeposit/AiOGCashDeposit.js';
13
12
  import { AiOGrabPayDeposit } from './AiOGrabPayDeposit/AiOGrabPayDeposit.js';
@@ -25,15 +24,6 @@ export function Deposit() {
25
24
  const paymentSettingsQuery = usePaymentSettingsQuery();
26
25
  const paymentSettings = paymentSettingsQuery.data;
27
26
  const featureFlag = useFeatureFlag();
28
- const aioDepositMethodEnabled = (() => {
29
- const isMobile = onMobileDevice();
30
- const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
31
- return (paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
32
- paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
33
- paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
34
- paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
35
- false);
36
- })();
37
27
  const enabledPaymentMethods = (() => {
38
28
  const l = [];
39
29
  if (onMaya) {
@@ -69,45 +59,24 @@ export function Deposit() {
69
59
  method: 'PISO_PAY',
70
60
  condition: () => paymentSettings?.pisoPayDepositGatewaySettings?.[enabledKey] || false,
71
61
  },
72
- {
73
- method: 'AIO_EWALLET',
74
- condition: () => featureFlag.enabled && aioDepositMethodEnabled,
75
- },
76
- ];
77
- paymentMethods.forEach(({ method, condition }) => {
78
- if (condition()) {
79
- l.push(method);
80
- }
81
- });
82
- return l;
83
- })();
84
- const enabledAiOeWalletPaymentMethods = (() => {
85
- const l = [];
86
- const isMobile = onMobileDevice();
87
- const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
88
- const m = [
89
62
  {
90
63
  method: 'AIO_GCASH',
91
- condition: () => paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
92
- false,
64
+ condition: () => (paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
93
65
  },
94
66
  {
95
67
  method: 'AIO_PAY_MAYA',
96
- condition: () => paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
97
- false,
68
+ condition: () => (paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
98
69
  },
99
70
  {
100
71
  method: 'AIO_GRAB_PAY',
101
- condition: () => paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
102
- false,
72
+ condition: () => (paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
103
73
  },
104
74
  {
105
75
  method: 'AIO_PALAWAN_PAY',
106
- condition: () => paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
107
- false,
76
+ condition: () => (paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
108
77
  },
109
78
  ];
110
- m.forEach(({ method, condition }) => {
79
+ paymentMethods.forEach(({ method, condition }) => {
111
80
  if (condition()) {
112
81
  l.push(method);
113
82
  }
@@ -115,7 +84,6 @@ export function Deposit() {
115
84
  return l;
116
85
  })();
117
86
  const [paymentMethod, setPaymentMethod] = useState();
118
- const [paymentMethodAiOeWallet, setPaymentMethodAiOeWallet] = useState('AIO_GCASH');
119
87
  useEffect(() => {
120
88
  if (enabledPaymentMethods.length > 0 && !paymentMethod) {
121
89
  setPaymentMethod(enabledPaymentMethods[0]);
@@ -129,15 +97,10 @@ export function Deposit() {
129
97
  if (!isMayaSessionValid) {
130
98
  return _jsx(MayaSessionSessionExpired, {});
131
99
  }
132
- if (enabledPaymentMethods.length <= 0 &&
133
- enabledAiOeWalletPaymentMethods.length <= 0) {
100
+ if (enabledPaymentMethods.length <= 0) {
134
101
  return _jsx(NoAvailablePaymentMethods, {});
135
102
  }
136
- return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_EWALLET' && (_jsxs(_Fragment, { children: [_jsx(AiOPaymentMethods, { value: paymentMethodAiOeWallet, onChange: setPaymentMethodAiOeWallet, options: enabledAiOeWalletPaymentMethods, label: "AIO eWallet payment methods", defaultValue: "AIO_GCASH" }), paymentMethodAiOeWallet === 'AIO_GCASH' &&
137
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOGCashDeposit, {}), paymentMethodAiOeWallet === 'AIO_PAY_MAYA' &&
138
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOPayMayaDeposit, {}), paymentMethodAiOeWallet === 'AIO_GRAB_PAY' &&
139
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOGrabPayDeposit, {}), paymentMethodAiOeWallet === 'AIO_PALAWAN_PAY' &&
140
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOPalawanPayDeposit, {})] }))] }));
103
+ return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_GCASH' && _jsx(AiOGCashDeposit, {}), paymentMethod === 'AIO_PAY_MAYA' && _jsx(AiOPayMayaDeposit, {}), paymentMethod === 'AIO_GRAB_PAY' && _jsx(AiOGrabPayDeposit, {}), paymentMethod === 'AIO_PALAWAN_PAY' && _jsx(AiOPalawanPayDeposit, {})] }));
141
104
  }
142
105
  function MayaSessionSessionExpired() {
143
106
  return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Session Expired" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
@@ -10,7 +10,8 @@ import maya from '../../images/maya.png';
10
10
  import onlineBank from '../../images/online-bank.png';
11
11
  import pisoPay from '../../images/piso-pay.png';
12
12
  import qrph from '../../images/QRPH.png';
13
- import wallet from '../../images/wallet.png';
13
+ import palawanPay from '../../images/palawanpay.png';
14
+ import grabPay from '../../images/grabpay.png';
14
15
  import { Checkbox } from '../../ui/Checkbox/index.js';
15
16
  import { Field } from '../../ui/Field/index.js';
16
17
  import { PaymentMethodDefinition } from './utils.js';
@@ -61,9 +62,24 @@ const OPTIONS = [
61
62
  image: pisoPay,
62
63
  },
63
64
  {
64
- value: 'AIO_EWALLET',
65
- label: 'AIO eWallet',
66
- image: wallet,
65
+ value: 'AIO_GCASH',
66
+ label: 'GCash',
67
+ image: gcash,
68
+ },
69
+ {
70
+ value: 'AIO_PAY_MAYA',
71
+ label: 'Maya',
72
+ image: maya,
73
+ },
74
+ {
75
+ value: 'AIO_GRAB_PAY',
76
+ label: 'GrabPay',
77
+ image: grabPay,
78
+ },
79
+ {
80
+ value: 'AIO_PALAWAN_PAY',
81
+ label: 'Palawan Pay',
82
+ image: palawanPay,
67
83
  },
68
84
  ];
69
85
  export function PaymentMethods(props) {
@@ -80,9 +96,10 @@ export function PaymentMethods(props) {
80
96
  if (!lastValue)
81
97
  return;
82
98
  setValue(PaymentMethodDefinition.parse(lastValue));
83
- }, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "flex cursor-pointer items-center justify-between rounded-xl border border-border-secondary ui-checked:border-border-brand-solid p-lg", children: [_jsxs("div", { className: twMerge('rounded-xs bg-white px-sm py-[0.688rem]', option.value === 'GCASH' && 'bg-[#017EFF]', option.value === 'AIO_EWALLET' &&
84
- 'flex items-center space-x-sm bg-bg-secondary'), children: [_jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', option.value === 'LIBANGAN_PAY_IN' ||
85
- option.value === 'VENTAJA_DISBURSEMENT'
86
- ? 'h-[2.5rem]'
87
- : 'h-[1.063rem]'), draggable: false }), option.value === 'AIO_EWALLET' && (_jsx("p", { className: "text-text-secondary-700 text-xs leading-tight", children: "AIO eWallet" }))] }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
99
+ }, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "flex cursor-pointer items-center justify-between rounded-xl border border-border-secondary ui-checked:border-border-brand-solid p-lg", children: [_jsx("div", { className: twMerge('rounded-xs', option.value === 'AIO_GRAB_PAY'
100
+ ? 'bg-transparent px-0 py-0'
101
+ : 'bg-white px-sm py-[0.688rem]', option.value.includes('GCASH') && 'bg-[#017EFF]', option.value === 'AIO_PALAWAN_PAY' && 'bg-[#026308]', option.value === 'AIO_PAY_MAYA' && 'bg-black'), children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', 'h-[1.063rem]', option.value === 'LIBANGAN_PAY_IN' ||
102
+ option.value === 'VENTAJA_DISBURSEMENT'
103
+ ? 'h-[2.5rem]'
104
+ : '', option.value === 'AIO_GRAB_PAY' && 'h-[3rem] rounded-[4px]', option.value === 'AIO_PALAWAN_PAY' && 'h-[2rem]'), draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
88
105
  }
@@ -1,8 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { KnownDepositError, KnownWithdrawalError, WithdrawalError } from '../../types';
3
- export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_EWALLET"]>;
4
- export declare const AiOeWalletPaymentMethodDefinition: z.ZodEnum<["AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY"]>;
3
+ export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY"]>;
5
4
  export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
6
- export type AiOeWalletPaymentMethod = z.infer<typeof AiOeWalletPaymentMethodDefinition>;
7
5
  export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
8
6
  export declare function explainError(error?: DepositWithdrawalErrors): string;
@@ -9,9 +9,6 @@ export const PaymentMethodDefinition = z.enum([
9
9
  'LIBANGAN_PAY_IN',
10
10
  'VENTAJA_DISBURSEMENT',
11
11
  'PISO_PAY',
12
- 'AIO_EWALLET',
13
- ]);
14
- export const AiOeWalletPaymentMethodDefinition = z.enum([
15
12
  'AIO_GCASH',
16
13
  'AIO_PAY_MAYA',
17
14
  'AIO_GRAB_PAY',
@@ -0,0 +1,184 @@
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -0,0 +1,184 @@
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -0,0 +1 @@
1
+ export declare function BasicInformation(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,101 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import { differenceInYears, format, isSameDay, isValid, parse } from 'date-fns';
4
+ import { isNil, omitBy, size } from 'lodash-es';
5
+ import { useEffect } from 'react';
6
+ import { useForm } from 'react-hook-form';
7
+ import invariant from 'tiny-invariant';
8
+ import { z } from 'zod';
9
+ import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
10
+ import { useUpdateAccountMutation } from '../../../client/hooks/useUpdateAccountMutation.js';
11
+ import { toaster } from '../../../client/utils/toaster.js';
12
+ import { Button } from '../../../ui/Button/index.js';
13
+ import { Dialog } from '../../../ui/Dialog/index.js';
14
+ import { Field } from '../../../ui/Field/index.js';
15
+ import { useKYCDefaultContext } from './KYCDefaultContext.js';
16
+ const definition = z.object({
17
+ realName: z
18
+ .string()
19
+ .min(3, 'Name must be 3 or more characters')
20
+ .max(50, 'Name must not be more than 50 characters')
21
+ .regex(/^[a-z0-9 ]+$/gi, 'Name must not contain special characters')
22
+ .trim(),
23
+ birthDay: z
24
+ .string()
25
+ .min(1, 'Date of birth is required')
26
+ .superRefine((value, ctx) => {
27
+ const dob = parse(value, 'yyyy-MM-dd', new Date());
28
+ if (!isValid(dob)) {
29
+ return ctx.addIssue({
30
+ code: z.ZodIssueCode.invalid_date,
31
+ });
32
+ }
33
+ const now = new Date();
34
+ const age = differenceInYears(now, dob);
35
+ if (age < 21) {
36
+ return ctx.addIssue({
37
+ code: z.ZodIssueCode.custom,
38
+ message: 'You must be at least 21 years old',
39
+ });
40
+ }
41
+ }),
42
+ branchCode: z.string().min(4).max(10).optional().or(z.literal('')),
43
+ });
44
+ export function BasicInformation() {
45
+ const kyc = useKYCDefaultContext();
46
+ const form = useForm({
47
+ resolver: zodResolver(definition),
48
+ mode: 'all',
49
+ defaultValues: {
50
+ birthDay: '',
51
+ branchCode: '',
52
+ realName: '',
53
+ },
54
+ });
55
+ const accountQuery = useAccountQuery();
56
+ const account = accountQuery.data;
57
+ const stepCompleted = account != null && account.realName != null && account.birthDay != null;
58
+ useEffect(() => {
59
+ if (stepCompleted)
60
+ kyc.setStep(2);
61
+ }, [stepCompleted, kyc]);
62
+ useEffect(() => {
63
+ if (account) {
64
+ form.reset({
65
+ realName: account.realName ?? '',
66
+ birthDay: account.birthDay
67
+ ? format(account.birthDay, 'yyyy-MM-dd')
68
+ : '',
69
+ });
70
+ }
71
+ }, [account, form]);
72
+ const updateAccountMutation = useUpdateAccountMutation({
73
+ onError(error) {
74
+ toaster.error({
75
+ title: 'Error',
76
+ description: error.message,
77
+ });
78
+ },
79
+ onSuccess() {
80
+ kyc.setStep(2);
81
+ toaster.success({
82
+ title: 'Success',
83
+ description: 'Basic information has been set successfully.',
84
+ });
85
+ },
86
+ });
87
+ return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold text-lg", children: "Basic Information" }), _jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Enter your basic details for identification and communication." }), _jsxs("form", { className: "mt-3", onSubmit: form.handleSubmit((data) => {
88
+ invariant(account);
89
+ const input = omitBy({
90
+ realName: account.realName === data.realName ? undefined : data.realName,
91
+ birthDay: account.birthDay && isSameDay(data.birthDay, account.birthDay)
92
+ ? undefined
93
+ : format(data.birthDay, 'yyyy-MM-dd'),
94
+ }, isNil);
95
+ if (size(input) === 0)
96
+ return kyc.setStep(2);
97
+ updateAccountMutation.mutate(input);
98
+ }), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!accountQuery.data?.realName, children: [_jsx(Field.Label, { children: "Real Name" }), _jsx(Field.Input, { placeholder: "Enter your real name", ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-3", invalid: !!form.formState.errors.branchCode, readOnly: !!accountQuery.data?.birthDay, children: [_jsx(Field.Label, { children: "Date of Birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), _jsx(Button, { type: "submit", className: "mt-8", disabled: accountQuery.isLoading ||
99
+ updateAccountMutation.isPending ||
100
+ stepCompleted, children: "Continue" })] })] }));
101
+ }
@@ -0,0 +1 @@
1
+ export declare function KYCVerificationStatus(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import dynamic from 'next/dynamic';
4
+ const Component = dynamic(() => import('./KYCVerificationStatus.lazy.js').then((m) => m.KYCVerificationStatus), {
5
+ ssr: false,
6
+ loading: () => null,
7
+ });
8
+ export function KYCVerificationStatus() {
9
+ return _jsx(Component, {});
10
+ }
@@ -0,0 +1 @@
1
+ export declare function KYCVerificationStatus(): import("react/jsx-runtime").JSX.Element;