@opexa/portal-components 0.0.751 → 0.0.752
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/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
CHANGED
|
@@ -15,6 +15,7 @@ import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
|
15
15
|
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
16
16
|
import { CheckIcon } from '../../../../icons/CheckIcon.js';
|
|
17
17
|
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
18
|
+
import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
|
|
18
19
|
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
19
20
|
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
20
21
|
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
@@ -22,6 +23,7 @@ import { XIcon } from '../../../../icons/XIcon.js';
|
|
|
22
23
|
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
23
24
|
import { Button } from '../../../../ui/Button/index.js';
|
|
24
25
|
import { Field } from '../../../../ui/Field/index.js';
|
|
26
|
+
import { NumberInput } from '../../../../ui/NumberInput/index.js';
|
|
25
27
|
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
26
28
|
import { Portal } from '../../../../ui/Portal/index.js';
|
|
27
29
|
import { Select } from '../../../../ui/Select/index.js';
|
|
@@ -152,7 +154,9 @@ export function InstapayWithdrawal() {
|
|
|
152
154
|
sameWidth: true,
|
|
153
155
|
}, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
|
|
154
156
|
o.field.onChange(details.value.at(0) ?? '');
|
|
155
|
-
}, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }),
|
|
157
|
+
}, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsx(Controller, { control: form.control, name: "accountNumber", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
158
|
+
o.field.onChange(details.value);
|
|
159
|
+
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Bank account number" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
|
|
156
160
|
form.setValue('amount', value.toString(), {
|
|
157
161
|
shouldTouch: true,
|
|
158
162
|
shouldDirty: true,
|
|
@@ -141,7 +141,9 @@ export function PisoPayWithdrawal() {
|
|
|
141
141
|
sameWidth: true,
|
|
142
142
|
}, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
|
|
143
143
|
o.field.onChange(details.value.at(0) ?? '');
|
|
144
|
-
}, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item, index) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, index))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }),
|
|
144
|
+
}, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item, index) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, index))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsx(Controller, { control: form.control, name: "accountNumber", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
145
|
+
o.field.onChange(details.value);
|
|
146
|
+
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Bank account number" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] })) }), _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) => {
|
|
145
147
|
o.field.onChange(details.value);
|
|
146
148
|
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
|
|
147
149
|
form.setValue('amount', value.toString(), {
|