@chainberry/ui-components 1.0.39 → 1.0.41

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.d.ts CHANGED
@@ -414,6 +414,10 @@ declare const COINS_2: Coin_2[];
414
414
  /** Withdrawable assets and the networks each can move over. */
415
415
  declare const COINS_3: Coin_3[];
416
416
 
417
+ export declare function CoinsNetworksTable({ networks }: {
418
+ networks: OrgNetwork[];
419
+ }): JSX.Element;
420
+
417
421
  /** The asset logo for a code, or undefined when we have no artwork for it. */
418
422
  export declare function coinSrc(code: string): string | undefined;
419
423
 
@@ -455,6 +459,14 @@ declare interface Commission {
455
459
  network: string;
456
460
  }
457
461
 
462
+ export declare function CommissionsSummary({ commissions, note, columns, className, }: {
463
+ commissions: SummaryFigure[];
464
+ note?: ReactNode;
465
+ /** cells across from `sm` up — figures plus the note, if there is one */
466
+ columns?: 2 | 3 | 4 | 5;
467
+ className?: string;
468
+ }): JSX.Element;
469
+
458
470
  export declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, onConfirm, }: {
459
471
  open: boolean;
460
472
  onOpenChange: (open: boolean) => void;
@@ -903,6 +915,45 @@ export declare function DropdownMenuSubTrigger({ className, children, ...props }
903
915
 
904
916
  export declare function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
905
917
 
918
+ export declare function EditableInfoRow({ label, value,
919
+ /** show a copy button that copies `copyValue` (falls back to the string value) */
920
+ copyable, copyValue,
921
+ /** when set, renders the action button that calls this; omit for read-only rows */
922
+ onEdit,
923
+ /** action button text — override for rows that aren't a plain edit */
924
+ actionLabel,
925
+ /** action button icon; pass null for a text-only button */
926
+ actionIcon,
927
+ /** action button variant — "ghost" reads as a quiet Edit, "default" as a primary action */
928
+ actionVariant, className, }: {
929
+ label: ReactNode;
930
+ value: ReactNode;
931
+ copyable?: boolean;
932
+ copyValue?: string;
933
+ onEdit?: () => void;
934
+ actionLabel?: string;
935
+ actionIcon?: IconSvgElement | null;
936
+ actionVariant?: React.ComponentProps<typeof Button>["variant"];
937
+ className?: string;
938
+ }): JSX.Element;
939
+
940
+ export declare function EditFieldDialog({ open, onOpenChange, title, description, label, value, placeholder, inputMode, options, successMessage, onSave, }: {
941
+ open: boolean;
942
+ onOpenChange: (open: boolean) => void;
943
+ title: string;
944
+ description?: string;
945
+ label: string;
946
+ /** current committed value — seeds the draft each time the dialog opens */
947
+ value: string;
948
+ placeholder?: string;
949
+ inputMode?: React.ComponentProps<"input">["inputMode"];
950
+ /** when given, the modal edits via a PickerField instead of a text input */
951
+ options?: PickerOption[];
952
+ /** toast text after a successful save; defaults to "<label> updated" */
953
+ successMessage?: string;
954
+ onSave: (value: string) => void;
955
+ }): JSX.Element;
956
+
906
957
  declare const EMPTY_FILTER: TxFilter;
907
958
 
908
959
  declare const EMPTY_FILTER_2: ActivityFilter;
@@ -1339,8 +1390,44 @@ declare const icons: {
1339
1390
  }])[];
1340
1391
  };
1341
1392
 
1393
+ export declare function Initiator({ name, avatar, strong, }: {
1394
+ name: string;
1395
+ /** the chip before the name — two letters or a neutral user glyph */
1396
+ avatar?: "initials" | "icon";
1397
+ /** render the name semibold (Name column of a table) */
1398
+ strong?: boolean;
1399
+ }): JSX.Element;
1400
+
1342
1401
  export declare function Input({ className, type, ...props }: React_2.ComponentProps<"input">): React_2.JSX.Element;
1343
1402
 
1403
+ export declare function InviteUserDialog({ open, onOpenChange, onInvite, }: {
1404
+ open: boolean;
1405
+ onOpenChange: (open: boolean) => void;
1406
+ onInvite?: (name: string, email: string, roleId: string) => void;
1407
+ }): JSX.Element;
1408
+
1409
+ declare type Invoice = {
1410
+ id: string;
1411
+ date: string;
1412
+ status: InvoiceStatus;
1413
+ /** transaction count for the invoice period */
1414
+ txNo: number;
1415
+ /** dollar-formatted amounts, e.g. "$37.00", "$-0.08" */
1416
+ volume: string;
1417
+ commissions: string;
1418
+ other: string;
1419
+ total: string;
1420
+ };
1421
+
1422
+ declare type InvoiceActionId = "invoice" | "details-csv" | "details-xlsx";
1423
+
1424
+ export declare function InvoicesTable({ invoices, onAction, }: {
1425
+ invoices: Invoice[];
1426
+ onAction?: (id: InvoiceActionId, inv: Invoice) => void;
1427
+ }): JSX.Element;
1428
+
1429
+ declare type InvoiceStatus = "pending" | "paid";
1430
+
1344
1431
  declare function isFilterEmpty(f: TxFilter): boolean;
1345
1432
 
1346
1433
  declare function isFilterEmpty_2(f: ActivityFilter): boolean;
@@ -1365,6 +1452,10 @@ export declare function Logo({ src, alt, href, collapsed, }: {
1365
1452
  collapsed?: boolean;
1366
1453
  }): JSX.Element;
1367
1454
 
1455
+ export declare function MonthlyUsageTable({ rows }: {
1456
+ rows: UsageRow[];
1457
+ }): JSX.Element;
1458
+
1368
1459
  /** Flat id → item lookup across both presets (for route → page wiring). PRIMARY
1369
1460
  listed first so FULL wins for shared ids, while PRIMARY-only ids (e.g. the
1370
1461
  Treasury "All Transactions") still resolve. */
@@ -1533,6 +1624,23 @@ export declare type NotificationTone = "blue" | "red" | "green";
1533
1624
 
1534
1625
  declare type OptionKey = "search" | "tabs" | "filters" | "columns" | "refresh" | "download";
1535
1626
 
1627
+ /** A blockchain network row: whether (and which) assets are live for this org. */
1628
+ declare type OrgNetwork = {
1629
+ id: string;
1630
+ /** network display name — e.g. "Bitcoin", "BNB Chain" */
1631
+ network: string;
1632
+ /** asset code used for the network's overlaid logo — e.g. "ETH", "TRX" */
1633
+ networkCode: string;
1634
+ /** free-text example of the assets the network carries */
1635
+ exampleAssets: string;
1636
+ /** enabled asset codes for this org; empty ⇒ network not enabled */
1637
+ assets: string[];
1638
+ /** minimum deposit commission for the network — only set when enabled */
1639
+ minDepositCommission?: string;
1640
+ /** flat withdrawal cost for the network — only set when enabled */
1641
+ fixedWithdrawalCost?: string;
1642
+ };
1643
+
1536
1644
  export declare function PageContainer({ className, children, }: {
1537
1645
  className?: string;
1538
1646
  children: ReactNode;
@@ -1841,9 +1949,12 @@ export declare type RiskLevel = "low" | "medium" | "high";
1841
1949
 
1842
1950
  declare type RiskLevel_2 = 'low' | 'medium' | 'high';
1843
1951
 
1844
- export declare function RiskSignal({ level, score }: {
1952
+ export declare function RiskSignal({ level, score, colored, className, }: {
1845
1953
  level: RiskLevel;
1846
1954
  score?: number;
1955
+ /** Paint the lit bars in the level's tone instead of slate. */
1956
+ colored?: boolean;
1957
+ className?: string;
1847
1958
  }): JSX.Element;
1848
1959
 
1849
1960
  export declare const SAMPLE_NOTIFICATIONS: NotificationItemData[];
@@ -2008,6 +2119,14 @@ export declare function StatusBadge({ children, tone, className, }: {
2008
2119
  className?: string;
2009
2120
  }): JSX.Element;
2010
2121
 
2122
+ declare type SummaryFigure = {
2123
+ label: string;
2124
+ value: string;
2125
+ /** bold value. Defaults to true — set false for figures that support the
2126
+ * headline rather than being it (e.g. Billing's total leads on "To Pay"). */
2127
+ strong?: boolean;
2128
+ };
2129
+
2011
2130
  export declare function Table({ className, containerClassName, ...props }: React_2.ComponentProps<"table"> & {
2012
2131
  containerClassName?: string;
2013
2132
  }): React_2.JSX.Element;
@@ -2374,11 +2493,27 @@ export declare function UiBadge({ className, variant, asChild, ...props }: React
2374
2493
  asChild?: boolean;
2375
2494
  }): React_2.JSX.Element;
2376
2495
 
2496
+ /** One currency+network row of the monthly usage breakdown. All amounts are
2497
+ * strings in the settlement currency (USDT). */
2498
+ declare type UsageRow = {
2499
+ id: string;
2500
+ /** asset code, e.g. "USDT", "ETH" */
2501
+ code: string;
2502
+ /** network code used for the overlaid badge, e.g. "TRX", "ETH", "POL" */
2503
+ networkCode: string;
2504
+ txns: number;
2505
+ grossCommissions: string;
2506
+ refundable: string;
2507
+ toPay: string;
2508
+ };
2509
+
2377
2510
  export declare function useHeaderExtension(): HeaderStickyValue;
2378
2511
 
2379
2512
  /** Deposit addresses grouped by end user. */
2380
2513
  declare const USER_WALLET_GROUPS: UserWalletGroup[];
2381
2514
 
2515
+ declare type UserActionId = 'edit' | 'delete';
2516
+
2382
2517
  export declare function UserMenu({ name, avatarSrc, navMode, onNavModeChange, headerMode, onHeaderModeChange, onAccount, onLogout, onTakeTour, onResetDemo, collapsed, side, align, fullWidth, }: {
2383
2518
  name?: string;
2384
2519
  avatarSrc?: string;
@@ -2402,6 +2537,14 @@ export declare function UserMenu({ name, avatarSrc, navMode, onNavModeChange, he
2402
2537
  fullWidth?: boolean;
2403
2538
  }): JSX.Element;
2404
2539
 
2540
+ export declare function UserRowActions({ label, onAction, hideEdit, hideDelete, }: {
2541
+ /** context for the accessible label, e.g. the user's name */
2542
+ label?: string;
2543
+ onAction?: (id: UserActionId) => void;
2544
+ hideEdit?: boolean;
2545
+ hideDelete?: boolean;
2546
+ }): JSX.Element;
2547
+
2405
2548
  /** An end user and the deposit addresses they hold across networks. */
2406
2549
  export declare type UserWalletGroup = {
2407
2550
  /** userId — group key + React key. */
@@ -2713,11 +2856,14 @@ export declare namespace withdrawData {
2713
2856
  }
2714
2857
  }
2715
2858
 
2716
- export declare function WithdrawHistoryTable({ data, className, onRowClick, }: {
2859
+ export declare function WithdrawHistoryTable({ data, className, onRowClick, amountTone, emptyMessage, }: {
2717
2860
  data: WithdrawalRecord[];
2718
2861
  className?: string;
2719
2862
  /** click a row to open its Activity details panel */
2720
2863
  onRowClick?: (row: WithdrawalRecord) => void;
2864
+ /** "outflow" paints the figure red; "neutral" leaves it in the body colour */
2865
+ amountTone?: "outflow" | "neutral";
2866
+ emptyMessage?: string;
2721
2867
  }): JSX.Element;
2722
2868
 
2723
2869
  export declare function WithdrawPanel({ currentUser, onSubmit, className, }: {
@@ -2728,7 +2874,9 @@ export declare function WithdrawPanel({ currentUser, onSubmit, className, }: {
2728
2874
  className?: string;
2729
2875
  }): JSX.Element;
2730
2876
 
2731
- export declare function WithdrawSummary({ coin, network, networkName, amount, amountFiat, from, to, footer, className, }: {
2877
+ export declare function WithdrawSummary({ title, description, coin, network, networkName, amount, amountFiat, from, to, footer, className, }: {
2878
+ title?: string;
2879
+ description?: string;
2732
2880
  coin: string | null;
2733
2881
  network: string | null;
2734
2882
  networkName?: string;