@opexa/portal-components 0.0.38 → 0.0.41
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.
- package/dist/client/hooks/useGlobalStore.d.ts +1 -2
- package/dist/client/hooks/useGlobalStore.js +19 -36
- package/dist/components/Account/Account.d.ts +1 -7
- package/dist/components/Account/Account.js +15 -40
- package/dist/components/AccountInfo/AccountInfo.js +20 -3
- package/dist/components/AccountSecurity/AccountSecurity.js +14 -6
- package/dist/components/AccountVerification/AccountVerification.js +5 -32
- package/dist/components/AccountVerification/AccountVerificationContext.d.ts +14 -0
- package/dist/components/AccountVerification/AccountVerificationContext.js +27 -0
- package/dist/components/AccountVerification/VerificationCapture.d.ts +1 -1
- package/dist/components/AccountVerification/VerificationCapture.js +16 -45
- package/dist/components/AccountVerification/VerificationComplete.d.ts +1 -0
- package/dist/components/AccountVerification/VerificationComplete.js +9 -0
- package/dist/components/AccountVerification/VerificationDetails.d.ts +1 -0
- package/dist/components/AccountVerification/VerificationDetails.js +38 -0
- package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +21 -16
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +4 -23
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +4 -23
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +4 -23
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +5 -24
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +4 -23
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +3 -3
- package/dist/components/DepositWithdrawal/PaymentMethods.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +27 -20
- package/dist/components/GameLaunch/GameLaunch.js +33 -57
- package/dist/components/KYC/KYC.d.ts +1 -0
- package/dist/components/KYC/KYC.js +3 -0
- package/dist/components/KYC/index.d.ts +1 -0
- package/dist/components/KYC/index.js +1 -0
- package/dist/components/Messages/MessageItem.js +12 -7
- package/dist/components/Messages/MessagePopup.js +8 -7
- package/dist/components/PortalProvider/PortalProvider.d.ts +2 -2
- package/dist/components/PortalProvider/PortalProvider.js +8 -5
- package/dist/components/PortalProvider/Providers.d.ts +4 -0
- package/dist/components/PortalProvider/Providers.js +12 -0
- package/dist/components/PortalProvider/Snackbar.d.ts +1 -0
- package/dist/components/PortalProvider/Snackbar.js +21 -0
- package/dist/components/PortalProvider/WebVitals.d.ts +1 -0
- package/dist/components/PortalProvider/WebVitals.js +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/images/gift.png +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
- package/dist/ui/AlertDialog/alertDialog.recipe.js +4 -4
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Button/button.recipe.js +1 -1
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/checkbox.recipe.js +2 -2
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +196 -196
- package/dist/ui/Combobox/combobox.recipe.d.ts +14 -14
- package/dist/ui/DatePicker/DatePicker.d.ts +192 -192
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +8 -8
- package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
- package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/package.json +7 -6
|
@@ -17,7 +17,7 @@ export function AmountChoices(props) {
|
|
|
17
17
|
});
|
|
18
18
|
return (_jsx("div", { className: twMerge('grid grid-cols-4 gap-2', props.className), children: options.map((option) => (_jsx(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
19
19
|
setValue(option);
|
|
20
|
-
}, disabled: min > option || max < option, "data-selected": dataAttr(value === option), children: formatNumber(option, {
|
|
20
|
+
}, disabled: min > option || max < option, className: "ui-selected:border-button-primary-border ui-selected:bg-button-primary-bg ui-selected:text-button-primary-fg", "data-selected": dataAttr(value === option), children: formatNumber(option, {
|
|
21
21
|
currency: localeInfo.currency.code,
|
|
22
22
|
minDecimalPlaces: 0,
|
|
23
23
|
maxDecimalPlaces: 0,
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createListCollection } from '@ark-ui/react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { CheckIcon, ChevronLeftIcon, ChevronRightIcon } from '../../../icons/index.js';
|
|
9
|
-
import { Checkbox, IconButton } from '../../../ui/index.js';
|
|
4
|
+
import { useAvailablePromosQuery, useControllableState, } from '../../../client/hooks/index.js';
|
|
5
|
+
import { CheckIcon, ChevronDownIcon } from '../../../icons/index.js';
|
|
6
|
+
import gift from '../../../images/gift.png';
|
|
7
|
+
import { Select } from '../../../ui/index.js';
|
|
10
8
|
export function AvailablePromos(props) {
|
|
11
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
12
|
-
depositWithdrawal: ctx.depositWithdrawal,
|
|
13
|
-
})));
|
|
14
9
|
const query = useAvailablePromosQuery();
|
|
15
10
|
const promos = query.data ?? [];
|
|
16
11
|
const [value, setValue] = useControllableState({
|
|
@@ -18,9 +13,19 @@ export function AvailablePromos(props) {
|
|
|
18
13
|
defaultValue: props.defaultValue ?? null,
|
|
19
14
|
onChange: props.onChange,
|
|
20
15
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
const collection = createListCollection({
|
|
17
|
+
items: promos,
|
|
18
|
+
itemToValue: (item) => item.id,
|
|
19
|
+
itemToString: (item) => item.name,
|
|
20
|
+
});
|
|
21
|
+
return (_jsxs(Select.Root, { collection: collection, lazyMount: true, positioning: {
|
|
22
|
+
sameWidth: true,
|
|
23
|
+
}, value: value ? [value] : [], onValueChange: (details) => {
|
|
24
|
+
const value = details.value.at(0);
|
|
25
|
+
setValue(value ?? null);
|
|
26
|
+
}, className: props.className, children: [_jsx(Select.Label, { children: "Choose a bonus" }), _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, { placeholder: "Pay without bonus" }), _jsx(Select.Context, { children: (api) => (_jsx(_Fragment, { children: api.value.length ? (_jsx(Select.ClearTrigger, { asChild: true, children: _jsx("span", { onClick: (e) => {
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
}, children: "Clear" }) })) : (_jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })) })) })] }), _jsx(Select.Positioner, { children: _jsxs(Select.Content, { children: [collection.items.length <= 0 && (_jsxs("div", { className: "p-2", children: [_jsx(Image, { src: gift, alt: "", width: 160, height: 160, className: "mx-auto size-[8.313rem] grayscale" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-1 max-w-[20rem] text-center text-sm", children: "No Bonuses are available at the moment. Please check back later!" })] })), collection.items.length > 0 && (_jsx(Select.ItemGroup, { children: collection.items.map((promo) => (_jsxs(Select.Item, { item: promo, children: [_jsxs(Select.ItemText, { children: [_jsx("span", { className: "block font-medium", children: promo.name }), _jsx("span", { className: "text-text-warning-primary-600 line-clamp-1 block", dangerouslySetInnerHTML: {
|
|
29
|
+
__html: promo.description,
|
|
30
|
+
} })] }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, promo.id))) }))] }) })] }));
|
|
26
31
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
3
|
import { useEffect } from 'react';
|
|
5
4
|
import { Controller, useForm } from 'react-hook-form';
|
|
6
5
|
import invariant from 'tiny-invariant';
|
|
7
6
|
import { z } from 'zod';
|
|
8
7
|
import { useShallow } from 'zustand/shallow';
|
|
9
|
-
import { useAvailablePromosQuery, useCreateGCashDepositMutation, useDepositsCountQuery,
|
|
8
|
+
import { useAvailablePromosQuery, useCreateGCashDepositMutation, useDepositsCountQuery, useGlobalStore, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
10
9
|
import { toaster } from '../../../../client/utils/index.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { ChevronDownIcon, ChevronUpIcon, SpinnerIcon } from '../../../../icons/index.js';
|
|
11
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
13
12
|
import { parseDecimal } from '../../../../utils/index.js';
|
|
14
13
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
15
14
|
import { AvailablePromos } from '../AvailablePromos.js';
|
|
16
15
|
export function GCashDeposit() {
|
|
17
|
-
const disclosure = useDisclosure();
|
|
18
16
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
19
17
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
20
18
|
})));
|
|
@@ -120,22 +118,5 @@ export function GCashDeposit() {
|
|
|
120
118
|
shouldDirty: true,
|
|
121
119
|
shouldValidate: true,
|
|
122
120
|
});
|
|
123
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-
|
|
124
|
-
const ok = await form.trigger('amount');
|
|
125
|
-
if (!ok)
|
|
126
|
-
return;
|
|
127
|
-
if (promos.length <= 0)
|
|
128
|
-
return;
|
|
129
|
-
if (form.getValues('promo'))
|
|
130
|
-
return;
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
disclosure.setOpen(true);
|
|
133
|
-
}, children: createDepositMutation.isPending ? (_jsxs(_Fragment, { children: [_jsx(SpinnerIcon, {}), "Processing..."] })) : ('Deposit') }), _jsx(AlertDialog.Root, { role: "alertdialog", open: disclosure.open, onOpenChange: (details) => {
|
|
134
|
-
disclosure.setOpen(details.open);
|
|
135
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+10)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+25)]", children: _jsxs(AlertDialog.Content, { children: [_jsxs(AlertDialog.Header, { children: [_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-[#FEE4E2] text-[#D92D20]", children: _jsx(AlertCircleIcon, {}) }), _jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) })] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Submit deposit request without promo?" }), _jsx(AlertDialog.Description, { children: "You haven\u2019t selected a promo. Are you sure you want to proceed without one?" })] }), _jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
136
|
-
disclosure.setOpen(false);
|
|
137
|
-
}, children: "Cancel" }), _jsx(Button, { onClick: () => {
|
|
138
|
-
handleSubmit();
|
|
139
|
-
disclosure.setOpen(false);
|
|
140
|
-
}, children: "Proceed" })] })] }) })] }) })] }));
|
|
121
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: o.field.onChange, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: createDepositMutation.isPending ? (_jsxs(_Fragment, { children: [_jsx(SpinnerIcon, {}), "Processing..."] })) : ('Deposit') }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
141
122
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
3
|
import { useEffect } from 'react';
|
|
5
4
|
import { Controller, useForm } from 'react-hook-form';
|
|
6
5
|
import { z } from 'zod';
|
|
7
6
|
import { useShallow } from 'zustand/shallow';
|
|
8
|
-
import { useAvailablePromosQuery, useCreateMayaAppDepositMutation, useDepositsCountQuery,
|
|
7
|
+
import { useAvailablePromosQuery, useCreateMayaAppDepositMutation, useDepositsCountQuery, useGlobalStore, useIsMayaSessionValidQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
9
8
|
import { toaster } from '../../../../client/utils/index.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { ChevronDownIcon, ChevronUpIcon, SpinnerIcon } from '../../../../icons/index.js';
|
|
10
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
12
11
|
import { parseDecimal } from '../../../../utils/index.js';
|
|
13
12
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
14
13
|
import { MayaSessionExpired } from '../../MayaSessionExpired.js';
|
|
15
14
|
import { AvailablePromos } from '../AvailablePromos.js';
|
|
16
15
|
export function MayaAppDeposit() {
|
|
17
|
-
const disclosure = useDisclosure();
|
|
18
16
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
19
17
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
20
18
|
})));
|
|
@@ -126,22 +124,5 @@ export function MayaAppDeposit() {
|
|
|
126
124
|
shouldDirty: true,
|
|
127
125
|
shouldValidate: true,
|
|
128
126
|
});
|
|
129
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-
|
|
130
|
-
const ok = await form.trigger('amount');
|
|
131
|
-
if (!ok)
|
|
132
|
-
return;
|
|
133
|
-
if (promos.length <= 0)
|
|
134
|
-
return;
|
|
135
|
-
if (form.getValues('promo'))
|
|
136
|
-
return;
|
|
137
|
-
e.preventDefault();
|
|
138
|
-
disclosure.setOpen(true);
|
|
139
|
-
}, children: createDepositMutation.isPending ? (_jsxs(_Fragment, { children: [_jsx(SpinnerIcon, {}), "Processing..."] })) : ('Deposit') }), _jsx(AlertDialog.Root, { role: "alertdialog", open: disclosure.open, onOpenChange: (details) => {
|
|
140
|
-
disclosure.setOpen(details.open);
|
|
141
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+10)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+25)]", children: _jsxs(AlertDialog.Content, { children: [_jsxs(AlertDialog.Header, { children: [_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-[#FEE4E2] text-[#D92D20]", children: _jsx(AlertCircleIcon, {}) }), _jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) })] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Submit deposit request without promo?" }), _jsx(AlertDialog.Description, { children: "You haven\u2019t selected a promo. Are you sure you want to proceed without one?" })] }), _jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
142
|
-
disclosure.setOpen(false);
|
|
143
|
-
}, children: "Cancel" }), _jsx(Button, { onClick: () => {
|
|
144
|
-
handleSubmit();
|
|
145
|
-
disclosure.setOpen(false);
|
|
146
|
-
}, children: "Proceed" })] })] }) })] }) })] }));
|
|
127
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: o.field.onChange, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: createDepositMutation.isPending ? (_jsxs(_Fragment, { children: [_jsx(SpinnerIcon, {}), "Processing..."] })) : ('Deposit') }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
147
128
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
3
|
import { useEffect } from 'react';
|
|
5
4
|
import { Controller, useForm } from 'react-hook-form';
|
|
6
5
|
import invariant from 'tiny-invariant';
|
|
7
6
|
import { z } from 'zod';
|
|
8
7
|
import { useShallow } from 'zustand/shallow';
|
|
9
|
-
import { useAvailablePromosQuery, useCreateMayaDepositMutation, useDepositsCountQuery,
|
|
8
|
+
import { useAvailablePromosQuery, useCreateMayaDepositMutation, useDepositsCountQuery, useGlobalStore, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
10
9
|
import { toaster } from '../../../../client/utils/index.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { ChevronDownIcon, ChevronUpIcon, SpinnerIcon } from '../../../../icons/index.js';
|
|
11
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
13
12
|
import { parseDecimal } from '../../../../utils/index.js';
|
|
14
13
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
15
14
|
import { AvailablePromos } from '../AvailablePromos.js';
|
|
16
15
|
export function MayaDeposit() {
|
|
17
|
-
const disclosure = useDisclosure();
|
|
18
16
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
19
17
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
20
18
|
})));
|
|
@@ -120,22 +118,5 @@ export function MayaDeposit() {
|
|
|
120
118
|
shouldDirty: true,
|
|
121
119
|
shouldValidate: true,
|
|
122
120
|
});
|
|
123
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-
|
|
124
|
-
const ok = await form.trigger('amount');
|
|
125
|
-
if (!ok)
|
|
126
|
-
return;
|
|
127
|
-
if (promos.length <= 0)
|
|
128
|
-
return;
|
|
129
|
-
if (form.getValues('promo'))
|
|
130
|
-
return;
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
disclosure.setOpen(true);
|
|
133
|
-
}, children: createDepositMutation.isPending ? (_jsxs(_Fragment, { children: [_jsx(SpinnerIcon, {}), "Processing..."] })) : ('Deposit') }), _jsx(AlertDialog.Root, { role: "alertdialog", open: disclosure.open, onOpenChange: (details) => {
|
|
134
|
-
disclosure.setOpen(details.open);
|
|
135
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+10)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+25)]", children: _jsxs(AlertDialog.Content, { children: [_jsxs(AlertDialog.Header, { children: [_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-[#FEE4E2] text-[#D92D20]", children: _jsx(AlertCircleIcon, {}) }), _jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) })] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Submit deposit request without promo?" }), _jsx(AlertDialog.Description, { children: "You haven\u2019t selected a promo. Are you sure you want to proceed without one?" })] }), _jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
136
|
-
disclosure.setOpen(false);
|
|
137
|
-
}, children: "Cancel" }), _jsx(Button, { onClick: () => {
|
|
138
|
-
handleSubmit();
|
|
139
|
-
disclosure.setOpen(false);
|
|
140
|
-
}, children: "Proceed" })] })] }) })] }) })] }));
|
|
121
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: o.field.onChange, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: createDepositMutation.isPending ? (_jsxs(_Fragment, { children: [_jsx(SpinnerIcon, {}), "Processing..."] })) : ('Deposit') }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
141
122
|
}
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
3
|
import { noop } from 'lodash-es';
|
|
5
4
|
import { useEffect } from 'react';
|
|
6
5
|
import { Controller, useForm } from 'react-hook-form';
|
|
7
6
|
import { z } from 'zod';
|
|
8
|
-
import { useAvailablePromosQuery, useDepositsCountQuery,
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useAvailablePromosQuery, useDepositsCountQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
8
|
+
import { ChevronDownIcon, ChevronUpIcon } from '../../../../icons/index.js';
|
|
9
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
11
10
|
import { parseDecimal } from '../../../../utils/index.js';
|
|
12
11
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
13
12
|
import { AvailablePromos } from '../AvailablePromos.js';
|
|
14
13
|
import { useOnlineBankDepositContext } from './OnlineBankDepositContext.js';
|
|
15
14
|
export function OnlineBankDepositForm() {
|
|
16
15
|
const context = useOnlineBankDepositContext();
|
|
17
|
-
const disclosure = useDisclosure();
|
|
18
16
|
const depositsCountQuery = useDepositsCountQuery();
|
|
19
17
|
const depositsCount = depositsCountQuery.data ?? 0;
|
|
20
18
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
@@ -97,7 +95,7 @@ export function OnlineBankDepositForm() {
|
|
|
97
95
|
},
|
|
98
96
|
});
|
|
99
97
|
});
|
|
100
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Bank" }), _jsx(Field.Input, { value: "BANKNET", onChange: noop, readOnly: true })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-
|
|
98
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Bank" }), _jsx(Field.Input, { value: "BANKNET", onChange: noop, readOnly: true })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
101
99
|
o.field.onChange(details.value);
|
|
102
100
|
}, formatOptions: {
|
|
103
101
|
maximumFractionDigits: 2,
|
|
@@ -108,22 +106,5 @@ export function OnlineBankDepositForm() {
|
|
|
108
106
|
shouldDirty: true,
|
|
109
107
|
shouldValidate: true,
|
|
110
108
|
});
|
|
111
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-
|
|
112
|
-
const ok = await form.trigger('amount');
|
|
113
|
-
if (!ok)
|
|
114
|
-
return;
|
|
115
|
-
if (promos.length <= 0)
|
|
116
|
-
return;
|
|
117
|
-
if (form.getValues('promo'))
|
|
118
|
-
return;
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
disclosure.setOpen(true);
|
|
121
|
-
}, children: "Deposit" }), _jsx(AlertDialog.Root, { role: "alertdialog", open: disclosure.open, onOpenChange: (details) => {
|
|
122
|
-
disclosure.setOpen(details.open);
|
|
123
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+10)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+25)]", children: _jsxs(AlertDialog.Content, { children: [_jsxs(AlertDialog.Header, { children: [_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-[#FEE4E2] text-[#D92D20]", children: _jsx(AlertCircleIcon, {}) }), _jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) })] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Submit deposit request without promo?" }), _jsx(AlertDialog.Description, { children: "You haven\u2019t selected a promo. Are you sure you want to proceed without one?" })] }), _jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
124
|
-
disclosure.setOpen(false);
|
|
125
|
-
}, children: "Cancel" }), _jsx(Button, { onClick: () => {
|
|
126
|
-
handleSubmit();
|
|
127
|
-
disclosure.setOpen(false);
|
|
128
|
-
}, children: "Proceed" })] })] }) })] }) })] }));
|
|
109
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { className: "mt-3xl", value: o.field.value, onChange: o.field.onChange })) }), _jsx(Button, { type: "submit", className: "mt-3xl", children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
129
110
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
3
|
import { useEffect } from 'react';
|
|
5
4
|
import { Controller, useForm } from 'react-hook-form';
|
|
6
5
|
import { z } from 'zod';
|
|
7
|
-
import { useAvailablePromosQuery, useDepositsCountQuery,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useAvailablePromosQuery, useDepositsCountQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
7
|
+
import { ChevronDownIcon, ChevronUpIcon } from '../../../../icons/index.js';
|
|
8
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
10
9
|
import { parseDecimal } from '../../../../utils/index.js';
|
|
11
10
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
11
|
import { AvailablePromos } from '../AvailablePromos.js';
|
|
13
12
|
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
14
13
|
export function QRPHDepositForm() {
|
|
15
14
|
const context = useQRPHDepositContext();
|
|
16
|
-
const disclosure = useDisclosure();
|
|
17
15
|
const depositsCountQuery = useDepositsCountQuery();
|
|
18
16
|
const depositsCount = depositsCountQuery.data ?? 0;
|
|
19
17
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
@@ -107,22 +105,5 @@ export function QRPHDepositForm() {
|
|
|
107
105
|
shouldDirty: true,
|
|
108
106
|
shouldValidate: true,
|
|
109
107
|
});
|
|
110
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-
|
|
111
|
-
const ok = await form.trigger('amount');
|
|
112
|
-
if (!ok)
|
|
113
|
-
return;
|
|
114
|
-
if (promos.length <= 0)
|
|
115
|
-
return;
|
|
116
|
-
if (form.getValues('promo'))
|
|
117
|
-
return;
|
|
118
|
-
e.preventDefault();
|
|
119
|
-
disclosure.setOpen(true);
|
|
120
|
-
}, children: "Deposit" }), _jsx(AlertDialog.Root, { role: "alertdialog", open: disclosure.open, onOpenChange: (details) => {
|
|
121
|
-
disclosure.setOpen(details.open);
|
|
122
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+10)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+25)]", children: _jsxs(AlertDialog.Content, { children: [_jsxs(AlertDialog.Header, { children: [_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-[#FEE4E2] text-[#D92D20]", children: _jsx(AlertCircleIcon, {}) }), _jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) })] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Submit deposit request without promo?" }), _jsx(AlertDialog.Description, { children: "You haven\u2019t selected a promo. Are you sure you want to proceed without one?" })] }), _jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
123
|
-
disclosure.setOpen(false);
|
|
124
|
-
}, children: "Cancel" }), _jsx(Button, { onClick: () => {
|
|
125
|
-
handleSubmit();
|
|
126
|
-
disclosure.setOpen(false);
|
|
127
|
-
}, children: "Proceed" })] })] }) })] }) })] }));
|
|
108
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: o.field.onChange, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
128
109
|
}
|
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
import { useShallow } from 'zustand/shallow';
|
|
7
7
|
import { useGlobalStore, useLocaleInfo, useWalletQuery, } from '../../client/hooks/index.js';
|
|
8
8
|
import { Wallet02Icon, XIcon } from '../../icons/index.js';
|
|
9
|
-
import { Dialog, Tabs } from '../../ui/index.js';
|
|
9
|
+
import { Dialog, IconButton, Tabs } from '../../ui/index.js';
|
|
10
10
|
import { formatNumber } from '../../utils/index.js';
|
|
11
11
|
import { Deposit } from './Deposit/Deposit.js';
|
|
12
12
|
import { Withdrawal } from './Withdrawal/Withdrawal.js';
|
|
@@ -20,12 +20,12 @@ export function DepositWithdrawal(props) {
|
|
|
20
20
|
});
|
|
21
21
|
return (_jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.depositWithdrawal.open, onOpenChange: (details) => {
|
|
22
22
|
globalStore.depositWithdrawal.setOpen(details.open);
|
|
23
|
-
}, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsx(Dialog.Trigger, { asChild: true, children: props.children ?? _jsx(DefaulTrigger, {}) }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "lg:min-h-auto mx-auto min-h-full w-full
|
|
23
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsx(Dialog.Trigger, { asChild: true, children: props.children ?? _jsx(DefaulTrigger, {}) }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "lg:min-h-auto mx-auto min-h-full w-full px-4 py-3xl lg:w-[480px] lg:rounded-xl", children: [_jsxs(Dialog.Header, { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-10 items-center justify-center rounded-md border", children: _jsx(Wallet02Icon, { className: "size-5" }) }), _jsx(Dialog.Title, { className: "grow text-lg font-semibold", children: "Wallet" }), _jsx(Dialog.Context, { children: (api) => (_jsx(IconButton, { size: "sm", variant: "outline", colorScheme: "gray", onClick: () => api.setOpen(false), children: _jsx(XIcon, {}) })) })] }), _jsxs(Dialog.Body, { className: "mt-3xl", children: [_jsx("p", { className: "text-text-secondary-700 text-center text-sm", children: "Deposit Balance" }), _jsx("p", { className: "text-center text-3xl font-bold leading-tight tracking-tight", children: formatNumber(walletQuery.data?.balance, {
|
|
24
24
|
currency: localeInfo.currency.code,
|
|
25
25
|
minDecimalPlaces: 2,
|
|
26
26
|
}) }), _jsxs(Tabs.Root, { value: globalStore.depositWithdrawal.tab, onValueChange: (details) => {
|
|
27
27
|
globalStore.depositWithdrawal.setTab(z.enum(['DEPOSIT', 'WITHDRAWAL']).parse(details.value));
|
|
28
|
-
}, lazyMount: true, unmountOnExit: true, className: "mt-
|
|
28
|
+
}, lazyMount: true, unmountOnExit: true, className: "mt-3xl space-y-4xl", children: [_jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "DEPOSIT", className: "grow", children: "Deposit" }), _jsx(Tabs.Trigger, { value: "WITHDRAWAL", className: "grow", children: "Withdrawal" }), _jsx(Tabs.Indicator, {})] }), _jsx(Tabs.Content, { value: "DEPOSIT", className: "space-y-3xl", children: _jsx(Deposit, {}) }), _jsx(Tabs.Content, { value: "WITHDRAWAL", className: "space-y-3xl", children: _jsx(Withdrawal, {}) })] })] })] }) })] })] }));
|
|
29
29
|
}
|
|
30
30
|
function DefaulTrigger(props) {
|
|
31
31
|
const localeInfo = useLocaleInfo();
|
|
@@ -50,10 +50,10 @@ export function PaymentMethods(props) {
|
|
|
50
50
|
defaultValue: props.defaultValue ?? options[0].value,
|
|
51
51
|
onChange: props.onChange,
|
|
52
52
|
});
|
|
53
|
-
return (_jsxs("div", { className: props.className, children: [_jsx(Field.Label, { asChild: true, children: _jsx("div", { children: "
|
|
53
|
+
return (_jsxs("div", { className: props.className, children: [_jsx(Field.Label, { asChild: true, children: _jsx("div", { children: "Available payment methods" }) }), _jsx(Checkbox.Group, { value: [value], onValueChange: (newValue) => {
|
|
54
54
|
const lastValue = newValue.at(-1);
|
|
55
55
|
if (!lastValue)
|
|
56
56
|
return;
|
|
57
57
|
setValue(PaymentMethodDefinition.parse(lastValue));
|
|
58
|
-
}, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "border-border-secondary ui-checked:border-
|
|
58
|
+
}, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "border-border-secondary ui-checked:border-border-brand-solid ui-checked:outline-solid ui-checked:outline-border-brand-solid flex cursor-pointer rounded-xl border p-xl ui-checked:outline", children: [_jsx("div", { className: "grow", children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: "h-5 w-auto lg:h-8", draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
|
|
59
59
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import Link from 'next/link';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, useState } from 'react';
|
|
4
3
|
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useAccountQuery, useGlobalStore, useOnMMA, usePaymentSettingsQuery, } from '../../../client/hooks/index.js';
|
|
6
|
-
import { AlertCircleIcon,
|
|
7
|
-
import {
|
|
4
|
+
import { useAccountQuery, useGlobalStore, useOnMMA, usePaymentSettingsQuery, useWalletQuery, } from '../../../client/hooks/index.js';
|
|
5
|
+
import { AlertCircleIcon, SpinnerIcon } from '../../../icons/index.js';
|
|
6
|
+
import { Button } from '../../../ui/index.js';
|
|
7
|
+
import { onMobileDevice, parseDecimal } from '../../../utils/index.js';
|
|
8
8
|
import { PaymentMethods } from '../PaymentMethods.js';
|
|
9
9
|
import { GCashWithdrawal } from './GCashWithdrawal/GCashWithdrawal.js';
|
|
10
10
|
import { InstapayWithdrawal } from './InstapayWithdrawal/InstapayWithdrawal.js';
|
|
@@ -12,6 +12,8 @@ import { MayaAppWithdrawal } from './MayaAppWithdrawal/MayaAppWithdrawal.js';
|
|
|
12
12
|
import { MayaWithdrawal } from './MayaWithdrawal/MayaWithdrawal.js';
|
|
13
13
|
export function Withdrawal() {
|
|
14
14
|
const [onMMA] = useOnMMA();
|
|
15
|
+
const walletQuery = useWalletQuery();
|
|
16
|
+
const wallet = walletQuery.data;
|
|
15
17
|
const accountQuery = useAccountQuery();
|
|
16
18
|
const account = accountQuery.data;
|
|
17
19
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
@@ -51,25 +53,30 @@ export function Withdrawal() {
|
|
|
51
53
|
setPaymentMethod(enabledPaymentMethods[0]);
|
|
52
54
|
}
|
|
53
55
|
}, [enabledPaymentMethods, paymentMethod]);
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return _jsx(WithdrawalNotAllowed, {});
|
|
58
|
-
}
|
|
59
|
-
if (paymentSettingsQuery.isLoading) {
|
|
56
|
+
if (accountQuery.isLoading ||
|
|
57
|
+
walletQuery.isLoading ||
|
|
58
|
+
paymentSettingsQuery.isLoading) {
|
|
60
59
|
return _jsx(SpinnerIcon, { className: "mx-auto size-6" });
|
|
61
60
|
}
|
|
61
|
+
if (parseDecimal(wallet?.balance, 0) < 1) {
|
|
62
|
+
return _jsx(InsufficientBalance, {});
|
|
63
|
+
}
|
|
64
|
+
if (!account?.transactionPassword ||
|
|
65
|
+
account.verificationStatus !== 'VERIFIED') {
|
|
66
|
+
return _jsx(AccountVerificationRequired, {});
|
|
67
|
+
}
|
|
62
68
|
if (enabledPaymentMethods.length <= 0) {
|
|
63
|
-
return
|
|
69
|
+
return _jsx(NoAvailablePaymentMethods, {});
|
|
64
70
|
}
|
|
65
71
|
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {})] }));
|
|
66
72
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
function AccountVerificationRequired() {
|
|
74
|
+
return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Personal Verification" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "To withdraw funds, you must first verify your identity. Complete personal verification to ensure your account\u2019s security." }), _jsx(Button, { className: "mt-3xl", children: "Verify Now" })] }));
|
|
75
|
+
}
|
|
76
|
+
function InsufficientBalance() {
|
|
77
|
+
const setTab = useGlobalStore(useShallow((ctx) => ctx.depositWithdrawal.setTab));
|
|
78
|
+
return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Balance is very low" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "No funds available for withdrawal. Please make a deposit." }), _jsx(Button, { className: "mt-3xl", onClick: () => setTab('DEPOSIT'), children: "Deposit" })] }));
|
|
79
|
+
}
|
|
80
|
+
function NoAvailablePaymentMethods() {
|
|
81
|
+
return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Not Available" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "Withdrawal is not available at this time. Please try again later or contact support for assistance." })] }));
|
|
75
82
|
}
|