@opexa/portal-components 0.0.1037 → 0.0.1038

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.
@@ -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';
@@ -174,7 +176,13 @@ export function InstapayWithdrawal() {
174
176
  sameWidth: true,
175
177
  }, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
176
178
  o.field.onChange(details.value.at(0) ?? '');
177
- }, 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 })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _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'), onKeyDown: (e) => {
179
+ }, 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) => {
180
+ o.field.onChange(details.value);
181
+ }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Account number" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, { onKeyDown: (e) => {
182
+ if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
183
+ e.preventDefault();
184
+ }
185
+ } }), _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'), onKeyDown: (e) => {
178
186
  if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
179
187
  e.preventDefault();
180
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.1037",
3
+ "version": "0.0.1038",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",