@opexa/portal-components 0.0.52 → 0.0.54
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/BetRecords/BetRecords.js +1 -1
- package/dist/components/KYC/Header.d.ts +1 -0
- package/dist/components/KYC/Header.js +6 -0
- package/dist/components/KYC/Indicator.d.ts +1 -0
- package/dist/components/KYC/Indicator.js +9 -0
- package/dist/components/KYC/KYC.js +15 -3
- package/dist/components/KYC/KYCContext.d.ts +3 -1
- package/dist/components/KYC/KYCContext.js +8 -3
- package/dist/components/KYC/KYCTrigger.js +2 -2
- package/dist/components/KYC/Step1.d.ts +1 -0
- package/dist/components/KYC/Step1.js +12 -0
- package/dist/components/KYC/Step2.d.ts +1 -0
- package/dist/components/KYC/Step2.js +12 -0
- package/dist/components/KYC/Step3.d.ts +1 -0
- package/dist/components/KYC/Step3.js +11 -0
- package/dist/components/KYC/Step4.d.ts +1 -0
- package/dist/components/KYC/Step4.js +6 -0
- package/dist/components/KYC/useKYC.d.ts +5 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/styles/theme.css +18 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/ui/AlertDialog/AlertDialog.d.ts +187 -187
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +17 -17
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/Dialog/Dialog.d.ts +187 -187
- package/dist/ui/Dialog/dialog.recipe.d.ts +17 -17
- package/dist/ui/Dialog/dialog.recipe.js +2 -2
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/package.json +1 -1
|
@@ -134,7 +134,7 @@ export function BetRecords(props) {
|
|
|
134
134
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
135
135
|
}) }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, status))) }) }) }) })] })] }), rows.length <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : File02Icon, title: loading ? 'Just a moment' : 'No data', message: loading
|
|
136
136
|
? 'Fetching latest bet records...'
|
|
137
|
-
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', '
|
|
137
|
+
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', 'bleed', 'lg:not-bleed', 'lg:mt-3xl', 'lg:w-full', 'lg:rounded-xl', 'lg:border-x'), children: [_jsx("div", { className: "border-border-secondary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-none border-b lg:rounded-t-xl", children: _jsxs(Table.Root, { className: "border-0", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Heading, { children: "Bet Time" }), _jsx(Table.Heading, { children: "Settlement Time" }), _jsx(Table.Heading, { children: "Bet Content" }), _jsx(Table.Heading, { children: "Odds" }), _jsx(Table.Heading, { children: "Bet Amount" }), _jsx(Table.Heading, { children: "Valid Bet" }), _jsx(Table.Heading, { children: "Settled Amount" }), _jsx(Table.Heading, { children: "Jackpot Contribution" }), _jsx(Table.Heading, { children: "Jackpot Payout" }), _jsx(Table.Heading, { children: "Bet Status" }), _jsx(Table.Heading, { children: "Game Name" }), _jsx(Table.Heading, { children: "Vendor Round ID" })] }) }), _jsx(Table.Body, { children: rows.map((data) => (_jsxs(Table.Row, { children: [_jsxs(Table.Cell, { className: "!py-1", children: [_jsx("div", { className: "leading-tight", children: format(data.dateTimeCreated, 'MM/dd/yyyy', {
|
|
138
138
|
in: tz(localeInfo.timezone),
|
|
139
139
|
}) }), _jsx("div", { className: "text-text-tertiary-600 leading-tight", children: format(data.dateTimeCreated, 'hh:mm a', {
|
|
140
140
|
in: tz(localeInfo.timezone),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Header(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon, XIcon } from '../../icons/index.js';
|
|
3
|
+
import { Dialog, IconButton } from '../../ui/index.js';
|
|
4
|
+
export function Header() {
|
|
5
|
+
return (_jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "bg-bg-primary-alt relative flex items-center gap-xl px-xl py-md lg:justify-center lg:bg-transparent lg:p-0", children: [_jsx(IconButton, { size: "2xs", variant: "outline", colorScheme: "gray", className: "lg:hidden", onClick: () => api.setOpen(false), children: _jsx(ChevronLeftIcon, {}) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "Personal Verification" }), _jsx("button", { type: "button", className: "text-text-quinary absolute right-0 top-1/2 hidden -translate-y-1/2 lg:block", onClick: () => api.setOpen(false), children: _jsx(XIcon, { className: "size-6" }) })] })) }));
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Indicator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { noop } from 'lodash-es';
|
|
3
|
+
import { ArrowLeftIcon } from '../../icons/index.js';
|
|
4
|
+
import { Progress } from '../../ui/index.js';
|
|
5
|
+
import { useKYCContext } from './KYCContext.js';
|
|
6
|
+
export function Indicator() {
|
|
7
|
+
const context = useKYCContext();
|
|
8
|
+
return (_jsxs("div", { className: "mt-xl grid grid-cols-[max-content_auto_auto] items-center px-xl lg:mt-md lg:px-0", children: [_jsxs("button", { className: "text-text-tertiary-600 flex items-center gap-sm text-sm font-semibold", children: [_jsx(ArrowLeftIcon, { className: "size-5" }), "Back"] }), _jsxs("div", { className: "flex justify-center gap-2", children: [_jsx(Progress.Root, { className: "w-[5.625rem] shrink-0", value: context.step >= 2 ? 100 : 50, onValueChange: noop, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx(Progress.Root, { className: "w-[5.625rem] shrink-0", value: context.step >= 3 ? 50 : 0, onValueChange: noop, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] })] }));
|
|
9
|
+
}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Portal } from '@ark-ui/react';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
5
|
import { useShallow } from 'zustand/shallow';
|
|
5
6
|
import { useGlobalStore } from '../../client/hooks/index.js';
|
|
6
7
|
import { Dialog } from '../../ui/index.js';
|
|
8
|
+
import { Header } from './Header.js';
|
|
9
|
+
import { Indicator } from './Indicator.js';
|
|
10
|
+
import { KYCContext } from './KYCContext.js';
|
|
11
|
+
import { Step1 } from './Step1.js';
|
|
12
|
+
import { Step2 } from './Step2.js';
|
|
13
|
+
import { Step3 } from './Step3.js';
|
|
14
|
+
import { Step4 } from './Step4.js';
|
|
15
|
+
import { useKYC } from './useKYC.js';
|
|
7
16
|
export function KYC() {
|
|
8
17
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
9
18
|
kyc: ctx.kyc,
|
|
10
19
|
})));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
const context = useKYC();
|
|
21
|
+
return (_jsx(KYCContext, { value: context, children: _jsx(Dialog.Root, { open: globalStore.kyc.open, onOpenChange: (details) => {
|
|
22
|
+
globalStore.kyc.setOpen(details.open);
|
|
23
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: twMerge(context.step === 4 && 'flex items-center'), children: _jsxs(Dialog.Content, { className: twMerge(context.step < 4
|
|
24
|
+
? 'bg-bg-primary lg:bg-bg-primary-alt mx-auto h-full w-full lg:h-auto lg:w-[400px] lg:p-3xl'
|
|
25
|
+
: 'mx-auto w-[25rem] max-w-[calc(100%-2rem)] p-3xl'), children: [context.step < 4 && _jsx(Header, {}), context.step < 4 && _jsx(Indicator, {}), context.step === 1 && _jsx(Step1, {}), context.step === 2 && _jsx(Step2, {}), context.step === 3 && _jsx(Step3, {}), context.step === 4 && _jsx(Step4, {})] }) })] }) }) }));
|
|
14
26
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
export const KYCContext = createContext(null);
|
|
4
|
+
export const useKYCContext = () => {
|
|
5
|
+
const context = useContext(KYCContext);
|
|
6
|
+
invariant(context);
|
|
7
|
+
return context;
|
|
8
|
+
};
|
|
@@ -7,8 +7,8 @@ export function KYCTrigger(props) {
|
|
|
7
7
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
8
8
|
kyc: ctx.kyc,
|
|
9
9
|
})));
|
|
10
|
-
return (_jsx(ark.button, { type: "button", ...props, onClick: (e) => {
|
|
10
|
+
return (_jsx(ark.button, { type: "button", "aria-label": "Verify your identity now", "data-state": globalStore.kyc.open ? 'open' : 'closed', ...props, onClick: (e) => {
|
|
11
11
|
globalStore.kyc.setOpen(true);
|
|
12
12
|
return props.onClick?.(e);
|
|
13
|
-
}
|
|
13
|
+
} }));
|
|
14
14
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Step1(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import { CheckIcon, XIcon } from '../../icons/index.js';
|
|
4
|
+
import uploadId from '../../images/capture-id-banner.png';
|
|
5
|
+
import { Button } from '../../ui/index.js';
|
|
6
|
+
import { useKYCContext } from './KYCContext.js';
|
|
7
|
+
export function Step1() {
|
|
8
|
+
const context = useKYCContext();
|
|
9
|
+
return (_jsxs("div", { className: "mt-2xl px-xl lg:mt-3xl lg:px-0", children: [_jsx("p", { className: "lg:text-text-secondary-700 text-center text-2xl font-semibold lg:text-base", children: "Prepare to upload your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt mt-6 rounded-xl border p-4 lg:mt-2xl lg:border-0 lg:bg-transparent lg:p-0", children: [_jsx(Image, { src: uploadId, alt: "", className: "h-auto w-full", width: 600, height: 352 }), _jsxs("ul", { className: "mt-2xl space-y-3", children: [_jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Upload front side of your ID"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Take a photo in a well lit room"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(XIcon, { className: "text-text-featured-icon-light-error size-6" }), "Don't edit image of your ID"] })] }), _jsxs("div", { className: "mt-4xl space-y-lg", children: [_jsx(Button, { onClick: () => {
|
|
10
|
+
context.setStep(2);
|
|
11
|
+
}, children: "Continue" }), _jsx(Button, { variant: "outline", children: "Continue on phone" })] })] })] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Step2(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import { CheckIcon, XIcon } from '../../icons/index.js';
|
|
4
|
+
import selfie from '../../images/capture-selfie-banner.png';
|
|
5
|
+
import { Button } from '../../ui/index.js';
|
|
6
|
+
import { useKYCContext } from './KYCContext.js';
|
|
7
|
+
export function Step2() {
|
|
8
|
+
const context = useKYCContext();
|
|
9
|
+
return (_jsxs("div", { className: "mt-2xl px-xl lg:mt-3xl lg:px-0", children: [_jsx("p", { className: "lg:text-text-secondary-700 text-center text-2xl font-semibold lg:text-base", children: "Take a selfie holding your ID" }), _jsxs("div", { className: "border-border-secondary bg-bg-primary-alt mt-6 rounded-xl border p-4 lg:mt-2xl lg:border-0 lg:bg-transparent lg:p-0", children: [_jsx(Image, { src: selfie, alt: "", className: "h-auto w-full", width: 600, height: 352 }), _jsxs("ul", { className: "mt-2xl space-y-3", children: [_jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Face and ID must be clearly visible"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(CheckIcon, { className: "text-text-featured-icon-light-success size-6" }), "Take a photo in a well lit room"] }), _jsxs("li", { className: "text-text-secondary-700 flex items-center gap-lg", children: [_jsx(XIcon, { className: "text-text-featured-icon-light-error size-6" }), "No hats, sunglasses, or masks"] })] }), _jsxs("div", { className: "mt-4xl space-y-lg", children: [_jsx(Button, { size: "sm", onClick: () => {
|
|
10
|
+
context.setStep(3);
|
|
11
|
+
}, children: "Continue" }), _jsx(Button, { variant: "outline", children: "Continue on phone" })] })] })] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Step3(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CheckIcon } from '../../icons/index.js';
|
|
3
|
+
import { Button, Checkbox, Field } from '../../ui/index.js';
|
|
4
|
+
import { useKYCContext } from './KYCContext.js';
|
|
5
|
+
export function Step3() {
|
|
6
|
+
const context = useKYCContext();
|
|
7
|
+
return (_jsxs("div", { className: "mt-2xl px-xl lg:mt-3xl lg:px-0", children: [_jsx("p", { className: "lg:text-text-secondary-700 text-center text-2xl font-semibold lg:text-base", children: "Enter your basic and work-related information" }), _jsxs("form", { className: "border-border-secondary bg-bg-primary-alt mt-6 rounded-xl border p-4 lg:mt-2xl lg:border-0 lg:bg-transparent lg:p-0", onSubmit: (e) => {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
context.setStep(4);
|
|
10
|
+
}, children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, { placeholder: "Enter your permanent address" })] }), _jsxs(Checkbox.Root, { className: "mt-2xl", children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Same as permanent address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-sm", children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, { placeholder: "Enter your current address" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, { placeholder: "Enter your source of income" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Work Description" }), _jsx(Field.Input, { placeholder: "Enter your work description" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, { placeholder: "Enter your place of birth" })] }), _jsxs(Field.Root, { className: "mt-2xl", children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality" })] }), _jsx(Button, { type: "submit", className: "mt-4xl", children: "Submit" })] })] }));
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Step4(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CheckCircleIcon } from '../../icons/index.js';
|
|
3
|
+
import { Button, Dialog } from '../../ui/index.js';
|
|
4
|
+
export function Step4() {
|
|
5
|
+
return (_jsxs("div", { children: [_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(CheckCircleIcon, {}) }), _jsx("h2", { className: "mt-3 text-center", children: "Submission Successful" }), _jsx("p", { className: "text-text-tertiary-600 text-center", children: "Your documents have been submitted successfully. They\u2019re now under review, and you\u2019ll receive a notification as soon as your account is verified." }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { className: "mt-3xl", onClick: () => api.setOpen(false), children: "Ok" })) })] }));
|
|
6
|
+
}
|
|
@@ -44,7 +44,7 @@ export function DepositRecordsTable() {
|
|
|
44
44
|
setDepositStatus(value.depositStatus);
|
|
45
45
|
} }), rows.length <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : File02Icon, title: loading ? 'Just a moment' : 'No data', message: loading
|
|
46
46
|
? 'Fetching latest deposit records...'
|
|
47
|
-
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', '
|
|
47
|
+
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', 'bleed', 'lg:not-bleed', 'lg:mt-3xl', 'lg:w-full', 'lg:rounded-xl', 'lg:border-x'), children: [_jsx("div", { className: "border-border-secondary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-none border-b lg:rounded-t-xl", children: _jsxs(Table.Root, { className: "border-0", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Heading, { children: "Deposit No." }), _jsx(Table.Heading, { children: "Reference" }), _jsx(Table.Heading, { children: "Deposit Method" }), _jsx(Table.Heading, { children: "Applied Amount" }), _jsx(Table.Heading, { children: "Recieved Amount" }), _jsx(Table.Heading, { children: "Transaction Fee" }), _jsx(Table.Heading, { children: "Deposit Time" }), _jsx(Table.Heading, { children: "Recieved Time" }), _jsx(Table.Heading, { children: "Status" })] }) }), _jsx(Table.Body, { children: rows.map((data) => (_jsxs(Table.Row, { children: [_jsx(Table.Cell, { className: "!py-1", children: data.depositNumber }), _jsx(Table.Cell, { className: "!py-1", children: data.reference }), _jsx(Table.Cell, { className: "!py-1", children: capitalize(data.type, {
|
|
48
48
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
49
49
|
}) }), _jsx(Table.Cell, { className: "!py-1", children: formatNumber(data.amount, {
|
|
50
50
|
currency: localeInfo.currency.code,
|
|
@@ -35,7 +35,7 @@ export function TransactionRecordsTable() {
|
|
|
35
35
|
transactionType: true,
|
|
36
36
|
} }), rows.length <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : File02Icon, title: loading ? 'Just a moment' : 'No data', message: loading
|
|
37
37
|
? 'Fetching latest transaction records...'
|
|
38
|
-
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', '
|
|
38
|
+
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', 'bleed', 'lg:not-bleed', 'lg:mt-3xl', 'lg:w-full', 'lg:rounded-xl', 'lg:border-x'), children: [_jsx("div", { className: "border-border-secondary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-none border-b lg:rounded-t-xl", children: _jsxs(Table.Root, { className: "border-0", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Heading, { children: "Transaction Type" }), _jsx(Table.Heading, { children: "Transaction Time" }), _jsx(Table.Heading, { children: "Amount" }), _jsx(Table.Heading, { children: "Current Balance" }), _jsx(Table.Heading, { children: "Reference Number" }), _jsx(Table.Heading, { children: "Content" })] }) }), _jsx(Table.Body, { children: rows.map((data) => (_jsxs(Table.Row, { children: [_jsx(Table.Cell, { className: "!py-1", children: capitalize(data.type, {
|
|
39
39
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
40
40
|
}) }), _jsxs(Table.Cell, { className: "!py-1", children: [_jsx("div", { className: "leading-tight", children: format(data.dateTimeCreated, 'MM/dd/yyyy', {
|
|
41
41
|
in: tz(localeInfo.timezone),
|
|
@@ -43,7 +43,7 @@ export function WithdrawalRecordsTable() {
|
|
|
43
43
|
setWithdrawalStatus(value.withdrawalStatus);
|
|
44
44
|
} }), rows.length <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : File02Icon, title: loading ? 'Just a moment' : 'No data', message: loading
|
|
45
45
|
? 'Fetching latest withdrawal records...'
|
|
46
|
-
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', '
|
|
46
|
+
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', 'bleed', 'lg:not-bleed', 'lg:mt-3xl', 'lg:w-full', 'lg:rounded-xl', 'lg:border-x'), children: [_jsx("div", { className: "border-border-secondary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-none border-b lg:rounded-t-xl", children: _jsxs(Table.Root, { className: "border-0", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Heading, { children: "Withdrawal No." }), _jsx(Table.Heading, { children: "Reference" }), _jsx(Table.Heading, { children: "Withdrawal Method" }), _jsx(Table.Heading, { children: "Mobile Number" }), _jsx(Table.Heading, { children: "Withdrawal Amount" }), _jsx(Table.Heading, { children: "Net Amount" }), _jsx(Table.Heading, { children: "Transaction Fee" }), _jsx(Table.Heading, { children: "Bank Name" }), _jsx(Table.Heading, { children: "Withdrawal Time" }), _jsx(Table.Heading, { children: "Status" })] }) }), _jsx(Table.Body, { children: rows.map((data) => (_jsxs(Table.Row, { children: [_jsx(Table.Cell, { className: "!py-1", children: data.withdrawalNumber }), _jsx(Table.Cell, { className: "!py-1", children: data.reference }), _jsx(Table.Cell, { className: "!py-1", children: capitalize(data.type, {
|
|
47
47
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
48
48
|
}) }), _jsx(Table.Cell, { className: "!py-1", children: data.recipientMobileNumber }), _jsx(Table.Cell, { className: "!py-1", children: formatNumber(data.amount, {
|
|
49
49
|
currency: localeInfo.currency.code,
|
package/dist/styles/theme.css
CHANGED
|
@@ -668,6 +668,24 @@
|
|
|
668
668
|
--arrow-size: --value([\*]);
|
|
669
669
|
}
|
|
670
670
|
|
|
671
|
+
@utility bleed {
|
|
672
|
+
position: relative;
|
|
673
|
+
width: 100dvw;
|
|
674
|
+
left: 50%;
|
|
675
|
+
right: 50%;
|
|
676
|
+
margin-left: -50dvw;
|
|
677
|
+
margin-right: -50dvw;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
@utility not-bleed {
|
|
681
|
+
position: relative;
|
|
682
|
+
width: auto;
|
|
683
|
+
left: auto;
|
|
684
|
+
right: auto;
|
|
685
|
+
margin-left: 0;
|
|
686
|
+
margin-right: 0;
|
|
687
|
+
}
|
|
688
|
+
|
|
671
689
|
@custom-variant icon (& svg);
|
|
672
690
|
@custom-variant tr (& tr);
|
|
673
691
|
@custom-variant td (& td);
|