@chainberry/ui-components 1.0.9 → 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). */
@@ -1533,11 +1532,11 @@ declare type RiskAssessment_2 = {
1533
1532
  };
1534
1533
 
1535
1534
  /** Outcome of the KYT/risk engine — drives the RiskAssessment status chip. */
1536
- declare type RiskDecision = "auto-approved" | "approved" | "manual-review" | "flagged" | "rejected";
1535
+ declare type RiskDecision = 'auto-approved' | 'approved' | 'manual-review' | 'flagged' | 'rejected';
1537
1536
 
1538
1537
  export declare type RiskLevel = "low" | "medium" | "high";
1539
1538
 
1540
- declare type RiskLevel_2 = "low" | "medium" | "high";
1539
+ declare type RiskLevel_2 = 'low' | 'medium' | 'high';
1541
1540
 
1542
1541
  export declare function RiskSignal({ level }: {
1543
1542
  level: RiskLevel;
@@ -1779,7 +1778,7 @@ declare type Transaction = {
1779
1778
  id: string;
1780
1779
  type: TxType;
1781
1780
  status: TxStatus;
1782
- risk: RiskLevel_2;
1781
+ risk?: RiskLevel_2;
1783
1782
  /** signed coin figure, e.g. "+1,582.18" or "-140.80" */
1784
1783
  amount: string;
1785
1784
  /** currency code appended after the amount, e.g. "USDT" */
@@ -1897,12 +1896,13 @@ export declare namespace transactionsData {
1897
1896
  }
1898
1897
  }
1899
1898
 
1900
- export declare function TransactionsFilterPanel({ open, onOpenChange, value, onApply, onSave, }: {
1899
+ export declare function TransactionsFilterPanel({ open, onOpenChange, value, assets, onApply, onReset, }: {
1901
1900
  open: boolean;
1902
1901
  onOpenChange: (open: boolean) => void;
1903
1902
  value: TxFilter;
1903
+ assets: AssetOption[];
1904
1904
  onApply: (filter: TxFilter) => void;
1905
- onSave: (filter: TxFilter) => void;
1905
+ onReset?: () => void;
1906
1906
  }): JSX.Element;
1907
1907
 
1908
1908
  export declare namespace transactionsFilters {
@@ -1929,7 +1929,7 @@ export declare namespace transactionsStatuses {
1929
1929
  }
1930
1930
  }
1931
1931
 
1932
- export declare function TransactionsTable({ data, loading, onRowClick, columnVisibility, presets, pageSize, totalTransactions, currentPage, onPageChange, }: TransactionsTableProps): JSX.Element;
1932
+ export declare function TransactionsTable({ data, loading, onRowClick, columnVisibility, presets, pageSize, totalTransactions, currentPage, onPageChange, activeSort, onSortChange, }: TransactionsTableProps): JSX.Element;
1933
1933
 
1934
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, }: {
1935
1935
  search: string;
@@ -1941,8 +1941,9 @@ export declare function TransactionsTableOptions({ search, onSearchChange, searc
1941
1941
  searchScope?: string;
1942
1942
  onSearchScopeChange?: (value: string) => void;
1943
1943
  searchPlaceholder?: string;
1944
- segment: string;
1945
- 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;
1946
1947
  tabs?: {
1947
1948
  value: string;
1948
1949
  label: string;
@@ -1951,9 +1952,10 @@ export declare function TransactionsTableOptions({ search, onSearchChange, searc
1951
1952
  tabCounts?: Record<string, number>;
1952
1953
  onFilter?: () => void;
1953
1954
  filterCount?: number;
1954
- columns: ColumnOption[];
1955
- columnVisibility: Record<string, boolean>;
1956
- 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;
1957
1959
  onRefresh?: () => void;
1958
1960
  refreshing?: boolean;
1959
1961
  onDownload?: (format: string) => void;
@@ -1976,6 +1978,15 @@ export declare type TransactionsTableProps = {
1976
1978
  totalTransactions?: number;
1977
1979
  currentPage?: number;
1978
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;
1979
1990
  };
1980
1991
 
1981
1992
  export declare namespace transactionsTypes {
@@ -2010,9 +2021,9 @@ declare type TxFilter = {
2010
2021
  to?: string;
2011
2022
  };
2012
2023
 
2013
- 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";
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';
2014
2025
 
2015
- declare type TxType = "unknown" | "deposit" | "withdrawal" | "checkout" | "manual-deposit" | "manual-withdrawal" | "auto-conversion-deposit" | "auto-conversion-withdrawal" | "automatic-withdrawal";
2026
+ declare type TxType = 'UNKNOWN' | 'DEPOSIT' | 'WITHDRAWAL' | 'CHECKOUT' | 'MANUAL_DEPOSIT' | 'MANUAL_WITHDRAWAL' | 'AUTO_CONVERSION_DEPOSIT' | 'AUTO_CONVERSION_WITHDRAWAL' | 'AUTOMATIC_WITHDRAWAL';
2016
2027
 
2017
2028
  declare const TYPE_OPTIONS: {
2018
2029
  value: TxType;