@opexa/portal-components 0.0.1036 → 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
  }
@@ -68,7 +68,7 @@ export function JackpotsListItemDesktop({ animate = true, customJackpotChestImag
68
68
  maxDecimalPlaces: 2,
69
69
  })] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] }), _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }), _jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: { strategy: 'fixed', placement: 'top' }, children: [_jsx(Tooltip.Trigger, { asChild: true, children: _jsx("div", { className: "absolute inset-0 h-full bg-black opacity-30", style: {
70
70
  width: `${getPercentage(jackpot.minimumJackpotPoolDrawingLimit, jackpot.pool)}%`,
71
- } }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsxs("div", { className: "text-xs", children: ["Minimum Payout Limit:", ' ', formatNumber(jackpot.minimumJackpotPoolDrawingLimit, {
71
+ } }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsxs("div", { className: "text-xs", children: ["Minimum Jackpot Pool Drawing Limit:", ' ', formatNumber(jackpot.minimumJackpotPoolDrawingLimit, {
72
72
  currency: localeInfo.currency.code,
73
73
  minDecimalPlaces: 2,
74
74
  maxDecimalPlaces: 2,
@@ -96,7 +96,7 @@ export function JackpotsListItemDesktop({ animate = true, customJackpotChestImag
96
96
  if (jackpot.status === 'DISABLED' && jackpot.drawing !== true) {
97
97
  return null;
98
98
  }
99
- return (_jsxs("div", { ref: rootRef, className: twMerge('rounded-2xl border border-border-primary bg-bg-tertiary', className?.itemRoot), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5'), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [isPayingOut ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx("span", { className: "full size-1.5 animate-pulse rounded bg-utility-success-500" }), "Paying Out"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "Accumulating"] })), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpotAmount, {
99
+ return (_jsxs("div", { ref: rootRef, className: twMerge('rounded-2xl border border-border-primary bg-bg-tertiary', className?.itemRoot), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5'), children: [_jsxs("div", { className: "relative z-20 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [isPayingOut ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx("span", { className: "full size-1.5 animate-pulse rounded bg-utility-success-500" }), "Paying Out"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "Accumulating"] })), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpotAmount, {
100
100
  currency: localeInfo.currency.code,
101
101
  minDecimalPlaces: 2,
102
102
  maxDecimalPlaces: 2,
@@ -84,7 +84,9 @@ export function PersonalInformation() {
84
84
  kyc.setDone(true);
85
85
  globalStore.kyc.setOpen(false);
86
86
  globalStore.kycAccountVerificationRequired.setOpen(false);
87
- globalStore.kycReminder.setOpen(true);
87
+ if (accountQuery.data?.status === 'VERIFICATION_LOCKED') {
88
+ globalStore.kycReminder.setOpen(true);
89
+ }
88
90
  toaster.success({
89
91
  title: 'Success',
90
92
  description: 'Personal information has been set successfully.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.1036",
3
+ "version": "0.0.1038",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",