@chainberry/ui-components 1.0.8 → 1.0.10

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
@@ -692,10 +692,9 @@ declare type ExportEntry = {
692
692
  generatedBy: string;
693
693
  };
694
694
 
695
- export declare function ExportHistoryList({ entries, onDownload, className, }: {
695
+ export declare function ExportHistoryList({ entries, onDownload, }: {
696
696
  entries: ExportEntry[];
697
697
  onDownload?: (entry: ExportEntry) => void;
698
- className?: string;
699
698
  }): JSX.Element;
700
699
 
701
700
  /** "42,120.00" → 42120.0 (drops grouping commas and any sign). */
@@ -1288,10 +1287,11 @@ export declare function PasswordGate({ children }: {
1288
1287
  children: ReactNode;
1289
1288
  }): JSX.Element;
1290
1289
 
1291
- export declare function PaymentType({ type, label, }: {
1292
- type: "deposit" | "withdraw";
1293
- /** overrides the default capitalized `type` text */
1294
- label?: string;
1290
+ declare type PaymentDirection = "in" | "out" | "neutral";
1291
+
1292
+ export declare function PaymentType({ direction, label, }: {
1293
+ direction: PaymentDirection;
1294
+ label: string;
1295
1295
  }): JSX.Element;
1296
1296
 
1297
1297
  export declare function PeriodPicker({ value, onChange, today, className, }: {
@@ -1532,11 +1532,11 @@ declare type RiskAssessment_2 = {
1532
1532
  };
1533
1533
 
1534
1534
  /** Outcome of the KYT/risk engine — drives the RiskAssessment status chip. */
1535
- declare type RiskDecision = "auto-approved" | "approved" | "manual-review" | "flagged" | "rejected";
1535
+ declare type RiskDecision = 'auto-approved' | 'approved' | 'manual-review' | 'flagged' | 'rejected';
1536
1536
 
1537
1537
  export declare type RiskLevel = "low" | "medium" | "high";
1538
1538
 
1539
- declare type RiskLevel_2 = "low" | "medium" | "high";
1539
+ declare type RiskLevel_2 = 'low' | 'medium' | 'high';
1540
1540
 
1541
1541
  export declare function RiskSignal({ level }: {
1542
1542
  level: RiskLevel;
@@ -1684,7 +1684,8 @@ declare const STATUS_META: Record<TxStatus, {
1684
1684
  tone: BadgeTone;
1685
1685
  }>;
1686
1686
 
1687
- /** Display order (reading order) for status lists. */
1687
+ /** Display order (reading order) for status lists — grouped by lifecycle:
1688
+ intake → in-progress/pending → success → problems. */
1688
1689
  declare const STATUS_ORDER: TxStatus[];
1689
1690
 
1690
1691
  export declare function StatusBadge({ children, tone, className, }: {
@@ -1777,7 +1778,7 @@ declare type Transaction = {
1777
1778
  id: string;
1778
1779
  type: TxType;
1779
1780
  status: TxStatus;
1780
- risk: RiskLevel_2;
1781
+ risk?: RiskLevel_2;
1781
1782
  /** signed coin figure, e.g. "+1,582.18" or "-140.80" */
1782
1783
  amount: string;
1783
1784
  /** currency code appended after the amount, e.g. "USDT" */
@@ -1895,12 +1896,13 @@ export declare namespace transactionsData {
1895
1896
  }
1896
1897
  }
1897
1898
 
1898
- export declare function TransactionsFilterPanel({ open, onOpenChange, value, onApply, onSave, }: {
1899
+ export declare function TransactionsFilterPanel({ open, onOpenChange, value, assets, onApply, onReset, }: {
1899
1900
  open: boolean;
1900
1901
  onOpenChange: (open: boolean) => void;
1901
1902
  value: TxFilter;
1903
+ assets: AssetOption[];
1902
1904
  onApply: (filter: TxFilter) => void;
1903
- onSave: (filter: TxFilter) => void;
1905
+ onReset?: () => void;
1904
1906
  }): JSX.Element;
1905
1907
 
1906
1908
  export declare namespace transactionsFilters {
@@ -1927,7 +1929,7 @@ export declare namespace transactionsStatuses {
1927
1929
  }
1928
1930
  }
1929
1931
 
1930
- export declare function TransactionsTable({ data, loading, onRowClick, columnVisibility, presets, }: TransactionsTableProps): JSX.Element;
1932
+ export declare function TransactionsTable({ data, loading, onRowClick, columnVisibility, presets, pageSize, totalTransactions, currentPage, onPageChange, activeSort, onSortChange, }: TransactionsTableProps): JSX.Element;
1931
1933
 
1932
1934
  export declare function TransactionsTableOptions({ search, onSearchChange, searchScopes, searchScope, onSearchScopeChange, searchPlaceholder, segment, onSegmentChange, tabs, tabCounts, onFilter, filterCount, columns, columnVisibility, onColumnChange, onRefresh, refreshing, onDownload, show, className, }: {
1933
1935
  search: string;
@@ -1939,8 +1941,9 @@ export declare function TransactionsTableOptions({ search, onSearchChange, searc
1939
1941
  searchScope?: string;
1940
1942
  onSearchScopeChange?: (value: string) => void;
1941
1943
  searchPlaceholder?: string;
1942
- segment: string;
1943
- onSegmentChange: (value: string) => void;
1944
+ /** tabs are optional — omit (with `show.tabs: false`) on tab-less pages */
1945
+ segment?: string;
1946
+ onSegmentChange?: (value: string) => void;
1944
1947
  tabs?: {
1945
1948
  value: string;
1946
1949
  label: string;
@@ -1949,9 +1952,10 @@ export declare function TransactionsTableOptions({ search, onSearchChange, searc
1949
1952
  tabCounts?: Record<string, number>;
1950
1953
  onFilter?: () => void;
1951
1954
  filterCount?: number;
1952
- columns: ColumnOption[];
1953
- columnVisibility: Record<string, boolean>;
1954
- onColumnChange: (id: string, next: boolean) => void;
1955
+ /** column controls are optional — omit (with `show.columns: false`) to hide */
1956
+ columns?: ColumnOption[];
1957
+ columnVisibility?: Record<string, boolean>;
1958
+ onColumnChange?: (id: string, next: boolean) => void;
1955
1959
  onRefresh?: () => void;
1956
1960
  refreshing?: boolean;
1957
1961
  onDownload?: (format: string) => void;
@@ -1969,6 +1973,20 @@ export declare type TransactionsTableProps = {
1969
1973
  columnVisibility?: Record<string, boolean>;
1970
1974
  /** the SavedPresetsBar row, rendered just above the table */
1971
1975
  presets?: ReactNode;
1976
+ /** pagination */
1977
+ pageSize?: number;
1978
+ totalTransactions?: number;
1979
+ currentPage?: number;
1980
+ onPageChange?: (page: number) => void;
1981
+ /** sorting */
1982
+ activeSort?: {
1983
+ id: string;
1984
+ dir: 'asc' | 'desc';
1985
+ } | null;
1986
+ onSortChange?: (sort: {
1987
+ id: string;
1988
+ dir: 'asc' | 'desc';
1989
+ } | null) => void;
1972
1990
  };
1973
1991
 
1974
1992
  export declare namespace transactionsTypes {
@@ -2003,9 +2021,9 @@ declare type TxFilter = {
2003
2021
  to?: string;
2004
2022
  };
2005
2023
 
2006
- declare type TxStatus = "created" | "confirmed" | "rejected" | "failed" | "pending-approval" | "processing" | "expired" | "cancelled" | "refunded" | "partially-confirmed" | "under-review" | "settled" | "currency-mismatch";
2024
+ declare type TxStatus = 'CREATED' | 'PROCESSING' | 'KYT_IN_PROGRESS' | 'PENDING_APPROVAL' | 'REJECTED' | 'CONFIRMED' | 'FAILED' | 'CONVERSION_IN_PROGRESS' | 'REFUND_IN_PROGRESS' | 'PENDING_VERIFICATION' | 'PARTIALLY_COMPLETED' | 'CURRENCY_MISMATCH';
2007
2025
 
2008
- declare type TxType = "deposit" | "withdraw";
2026
+ declare type TxType = 'UNKNOWN' | 'DEPOSIT' | 'WITHDRAWAL' | 'CHECKOUT' | 'MANUAL_DEPOSIT' | 'MANUAL_WITHDRAWAL' | 'AUTO_CONVERSION_DEPOSIT' | 'AUTO_CONVERSION_WITHDRAWAL' | 'AUTOMATIC_WITHDRAWAL';
2009
2027
 
2010
2028
  declare const TYPE_OPTIONS: {
2011
2029
  value: TxType;