@chainberry/ui-components 1.0.25 → 1.0.26
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/index.cjs +1 -1
- package/dist/index.d.ts +97 -2
- package/dist/index.mjs +21314 -20899
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -268,10 +268,23 @@ export declare namespace balancesData {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
export declare namespace balancesDataV3 {
|
|
272
|
+
export {
|
|
273
|
+
vaultTotalFiat,
|
|
274
|
+
vaultsTotals,
|
|
275
|
+
VaultKind,
|
|
276
|
+
VaultRow,
|
|
277
|
+
Vault,
|
|
278
|
+
VAULTS
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
271
282
|
export declare function BalancesPage(): JSX.Element;
|
|
272
283
|
|
|
273
284
|
export declare function BalancesPageV2(): JSX.Element;
|
|
274
285
|
|
|
286
|
+
export declare function BalancesPageV3(): JSX.Element;
|
|
287
|
+
|
|
275
288
|
export declare namespace balancesRecentTransactions {
|
|
276
289
|
export {
|
|
277
290
|
RecentTxDirection,
|
|
@@ -671,6 +684,12 @@ declare type DateField = 'createdAt' | 'confirmedAt';
|
|
|
671
684
|
/** Default (English) tier column headers; override via the `tierLabels` prop. */
|
|
672
685
|
export declare const DEFAULT_TIER_LABELS: Record<WalletTier, string>;
|
|
673
686
|
|
|
687
|
+
/** Default (English) copy; override any subset via the `labels` prop. */
|
|
688
|
+
export declare const DEFAULT_V3_LABELS: WalletBalancesTableV3Labels;
|
|
689
|
+
|
|
690
|
+
/** Default (English) action labels; override via the `labels` prop. */
|
|
691
|
+
export declare const DEFAULT_WALLET_ACTION_LABELS: Record<WalletActionId, string>;
|
|
692
|
+
|
|
674
693
|
/** Past incoming deposits — the audit trail of received funds. Mixed senders,
|
|
675
694
|
receiving wallets, chains and statuses (confirmed / processing / pending). */
|
|
676
695
|
declare const DEPOSIT_HISTORY: DepositRecord[];
|
|
@@ -2300,6 +2319,49 @@ export declare function UserMenu({ name, avatarSrc, navMode, onNavModeChange, he
|
|
|
2300
2319
|
fullWidth?: boolean;
|
|
2301
2320
|
}): JSX.Element;
|
|
2302
2321
|
|
|
2322
|
+
/** A vault and the currency/network rows it holds. */
|
|
2323
|
+
declare type Vault = {
|
|
2324
|
+
kind: VaultKind;
|
|
2325
|
+
label: string;
|
|
2326
|
+
/** Short description under the vault name. */
|
|
2327
|
+
description: string;
|
|
2328
|
+
rows: VaultRow[];
|
|
2329
|
+
};
|
|
2330
|
+
|
|
2331
|
+
/** The two treasury vaults. */
|
|
2332
|
+
declare type VaultKind = "operation" | "treasury";
|
|
2333
|
+
|
|
2334
|
+
/** One currency/network holding inside a vault — a single table row. */
|
|
2335
|
+
declare type VaultRow = {
|
|
2336
|
+
id: string;
|
|
2337
|
+
/** Asset ticker, e.g. "USDT". */
|
|
2338
|
+
code: string;
|
|
2339
|
+
/** Full currency name, e.g. "Tether". */
|
|
2340
|
+
name: string;
|
|
2341
|
+
/** Network code for the badge (resolved via coinSrc), e.g. "TRON". */
|
|
2342
|
+
network: string;
|
|
2343
|
+
/** Network label shown under the code, e.g. "Tron". */
|
|
2344
|
+
networkName: string;
|
|
2345
|
+
amount: string;
|
|
2346
|
+
amountFiat: string;
|
|
2347
|
+
/** Pending crypto figure; omit when the row holds no pending funds. */
|
|
2348
|
+
pending?: string;
|
|
2349
|
+
pendingFiat?: string;
|
|
2350
|
+
};
|
|
2351
|
+
|
|
2352
|
+
declare const VAULTS: Vault[];
|
|
2353
|
+
|
|
2354
|
+
/** Roll-up shown in the summary card at the top of the Balances V3 screen. */
|
|
2355
|
+
declare function vaultsTotals(vaults: Vault[]): {
|
|
2356
|
+
totalAssets: string;
|
|
2357
|
+
totalPending: string;
|
|
2358
|
+
activeWallets: number;
|
|
2359
|
+
totalWallets: number;
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2362
|
+
/** Fiat subtotal for a single vault. */
|
|
2363
|
+
declare function vaultTotalFiat(vault: Vault): string;
|
|
2364
|
+
|
|
2303
2365
|
/** A named wallet within a currency, on a specific network. */
|
|
2304
2366
|
declare type Wallet = {
|
|
2305
2367
|
id: string;
|
|
@@ -2347,6 +2409,35 @@ export declare function WalletBalancesTableV2({ balances, actionsVariant, tierLa
|
|
|
2347
2409
|
className?: string;
|
|
2348
2410
|
}): JSX.Element;
|
|
2349
2411
|
|
|
2412
|
+
export declare function WalletBalancesTableV3({ vaults, actionsVariant, onRowAction, rowActions, labels, className, }: {
|
|
2413
|
+
vaults: Vault[];
|
|
2414
|
+
actionsVariant?: "icons" | "menu";
|
|
2415
|
+
/** Fired when a row's action is chosen. Without it the menu still renders
|
|
2416
|
+
but does nothing — pass `rowActions={[]}` to drop it entirely. */
|
|
2417
|
+
onRowAction?: (action: WalletActionId, row: VaultRow, vault: Vault) => void;
|
|
2418
|
+
/** Which actions each row offers, in order. Defaults to all three; `[]`
|
|
2419
|
+
renders no actions column content (read-only view). */
|
|
2420
|
+
rowActions?: WalletActionId[];
|
|
2421
|
+
/** Translated copy; unset keys fall back to English. */
|
|
2422
|
+
labels?: Partial<WalletBalancesTableV3Labels>;
|
|
2423
|
+
className?: string;
|
|
2424
|
+
}): JSX.Element;
|
|
2425
|
+
|
|
2426
|
+
/** Translatable strings the table renders itself. Everything else — vault
|
|
2427
|
+
labels and descriptions, the figures — comes in through `vaults`. */
|
|
2428
|
+
export declare type WalletBalancesTableV3Labels = {
|
|
2429
|
+
/** Left column header. */
|
|
2430
|
+
currencyNetwork: string;
|
|
2431
|
+
/** Right column header. */
|
|
2432
|
+
balance: string;
|
|
2433
|
+
/** Trailing word on a row's amber pending line, e.g. "+1,500.00 pending". */
|
|
2434
|
+
pending: string;
|
|
2435
|
+
/** A vault's asset count, e.g. (3) => "3 assets". */
|
|
2436
|
+
assets: (count: number) => string;
|
|
2437
|
+
/** Row action menu items. */
|
|
2438
|
+
actions: Partial<Record<WalletActionId, string>>;
|
|
2439
|
+
};
|
|
2440
|
+
|
|
2350
2441
|
export declare function WalletField({ id, label, placeholder, value, onChange, wallets, emptyMessage, variant, disabled, className, }: {
|
|
2351
2442
|
id?: string;
|
|
2352
2443
|
label?: ReactNode;
|
|
@@ -2387,11 +2478,15 @@ declare type WalletRef = {
|
|
|
2387
2478
|
|
|
2388
2479
|
export declare function WalletRowActions({ variant,
|
|
2389
2480
|
/** context for accessible labels, e.g. the wallet name */
|
|
2390
|
-
label, onAction, }: {
|
|
2481
|
+
label, onAction, actions, labels, }: {
|
|
2391
2482
|
variant?: "icons" | "menu";
|
|
2392
2483
|
label?: string;
|
|
2393
2484
|
onAction?: (id: WalletActionId) => void;
|
|
2394
|
-
|
|
2485
|
+
/** Which actions to offer, in order. Defaults to all three. */
|
|
2486
|
+
actions?: WalletActionId[];
|
|
2487
|
+
/** Translated action labels; unset keys fall back to English. */
|
|
2488
|
+
labels?: Partial<Record<WalletActionId, string>>;
|
|
2489
|
+
}): JSX.Element | null;
|
|
2395
2490
|
|
|
2396
2491
|
/** The risk tier a wallet belongs to in the V2 (four-tier) treasury split.
|
|
2397
2492
|
Machine-readable and locale-independent — `name` is display text and must
|