sy-ui-lib 1.0.29 → 1.0.30
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/BankingDetailsCard/BankingDetailsCard.component.d.ts +27 -0
- package/dist/components/BankingDetailsCard/BankingDetailsCard.stories.d.ts +11 -0
- package/dist/components/BankingDetailsCard/BankingDetailsCard.types.d.ts +35 -0
- package/dist/components/BankingDetailsCard/index.d.ts +3 -0
- package/dist/components/Icon/SvgIcons.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +18 -18
- package/dist/index.css +1 -1
- package/dist/index.js +3230 -3125
- package/package.json +61 -61
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PaymentDetailsCardProps } from './BankingDetailsCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* BankingDetailsCard displays payment account information for Bank, Crypto, and UPI accounts.
|
|
4
|
+
* Supports account details, QR code display, copyable fields, account status, toggle actions,
|
|
5
|
+
* and delete functionality based on the selected payment variant.
|
|
6
|
+
*
|
|
7
|
+
* Variants:
|
|
8
|
+
* - bank: Displays account holder, account number, bank name, IFSC, etc.
|
|
9
|
+
* * - crypto: Displays wallet details, withdrawal amount, QR code, and copyable values.
|
|
10
|
+
* - upi: Displays UPI account details and QR code when available.
|
|
11
|
+
*
|
|
12
|
+
* @param {PaymentDetailsCardProps} props - Card configuration and account details.
|
|
13
|
+
* @returns {JSX.Element} Payment account details card.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <BankingDetailsCard
|
|
17
|
+
* variant="bank"
|
|
18
|
+
* title="HDFC Bank"
|
|
19
|
+
* details={[
|
|
20
|
+
* { label: "Account Holder", value: "John Doe" },
|
|
21
|
+
* { label: "Account Number", value: "1234567890" }
|
|
22
|
+
* ]}
|
|
23
|
+
* status="Approved"
|
|
24
|
+
* />
|
|
25
|
+
*/
|
|
26
|
+
declare const BankingDetailsCard: React.FC<PaymentDetailsCardProps>;
|
|
27
|
+
export default BankingDetailsCard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as BankingDetailsCard } from './BankingDetailsCard.component';
|
|
3
|
+
declare const meta: Meta<typeof BankingDetailsCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BankingDetailsCard>;
|
|
6
|
+
export declare const BankAccount: Story;
|
|
7
|
+
export declare const CryptoWallet: Story;
|
|
8
|
+
export declare const UPIAccount: Story;
|
|
9
|
+
export declare const WithToggle: Story;
|
|
10
|
+
export declare const DeletableAccount: Story;
|
|
11
|
+
export declare const PendingApproval: Story;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChipType, ToggleProps } from '..';
|
|
2
|
+
export type PaymentVariant = "bank" | "crypto" | "upi";
|
|
3
|
+
export type DetailItem = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
copyable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const PaymentStatus: {
|
|
9
|
+
readonly approved: "Approved";
|
|
10
|
+
readonly pending: "Pending";
|
|
11
|
+
readonly rejected: "Rejected";
|
|
12
|
+
};
|
|
13
|
+
export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
|
|
14
|
+
export declare const CHIP_STATE_MAP: Record<PaymentStatus, ChipType>;
|
|
15
|
+
/** Props for BankingDetailsCard. */
|
|
16
|
+
export type PaymentDetailsCardProps = {
|
|
17
|
+
/** Payment account type */
|
|
18
|
+
variant: PaymentVariant;
|
|
19
|
+
/** Primary account title */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Withdrawal amount (used by crypto accounts) */
|
|
22
|
+
amount?: string;
|
|
23
|
+
/** List of account details to display */
|
|
24
|
+
details: DetailItem[];
|
|
25
|
+
/** QR code image URL */
|
|
26
|
+
qrCode?: string;
|
|
27
|
+
/** Enables delete action */
|
|
28
|
+
toDelete?: boolean;
|
|
29
|
+
/** Current account approval status */
|
|
30
|
+
status?: string;
|
|
31
|
+
/** Optional account toggle configuration */
|
|
32
|
+
toggle?: ToggleProps;
|
|
33
|
+
/** Delete action handler */
|
|
34
|
+
handleDelete?: () => void;
|
|
35
|
+
};
|
|
@@ -92,4 +92,5 @@ export declare const icons: {
|
|
|
92
92
|
setting: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
93
93
|
dog: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
94
94
|
horse: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
copy: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
95
96
|
};
|