@chainberry/ui-components 1.0.5 → 1.0.7

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
@@ -27,6 +27,30 @@ export declare function ActionFooter({ actions, bleed, className, ...props }: {
27
27
  className?: string;
28
28
  } & Omit<ComponentProps<"div">, "className">): JSX.Element;
29
29
 
30
+ export declare function AmountField({ id, label, value, onChange,
31
+ /** trailing unit, e.g. the coin code */
32
+ suffix,
33
+ /** right-aligned note beside the label, e.g. "Available: 1.2 BTC" */
34
+ hint,
35
+ /** helper / error line under the input, e.g. a fiat estimate */
36
+ helper,
37
+ /** show a "Max" button when provided */
38
+ onMax, maxDisabled, disabled, invalid, placeholder, className, }: {
39
+ id?: string;
40
+ label?: ReactNode;
41
+ value: string;
42
+ onChange: (value: string) => void;
43
+ suffix?: ReactNode;
44
+ hint?: ReactNode;
45
+ helper?: ReactNode;
46
+ onMax?: () => void;
47
+ maxDisabled?: boolean;
48
+ disabled?: boolean;
49
+ invalid?: boolean;
50
+ placeholder?: string;
51
+ className?: string;
52
+ }): JSX.Element;
53
+
30
54
  export declare function AppHeaderV1({ user, navMode, onNavModeChange, headerMode, onHeaderModeChange, onAccount, onLogout, onTakeTour, onResetDemo, }: {
31
55
  user?: HeaderUser;
32
56
  navMode?: NavPreset;
@@ -318,6 +342,7 @@ export declare namespace convertData {
318
342
  formatUsd,
319
343
  formatCrypto,
320
344
  CONVERT_FEE_RATE,
345
+ WALLET_TIERS,
321
346
  NETWORK_NAMES,
322
347
  COINS,
323
348
  HOLDINGS,
@@ -338,32 +363,7 @@ export declare function ConvertPanel({ currentUser, onSubmit, className, }: {
338
363
  className?: string;
339
364
  }): JSX.Element;
340
365
 
341
- export declare function ConvertPickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
342
- id?: string;
343
- label?: ReactNode;
344
- value: string | null;
345
- options: ConvertPickerOption[];
346
- onChange: (value: string) => void;
347
- placeholder?: ReactNode;
348
- emptyMessage?: ReactNode;
349
- disabled?: boolean;
350
- className?: string;
351
- }): JSX.Element;
352
-
353
- export declare type ConvertPickerOption = {
354
- value: string;
355
- /** primary line — shown both in the list and in the closed trigger */
356
- label: ReactNode;
357
- /** muted secondary line */
358
- sublabel?: ReactNode;
359
- /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
360
- leading?: ReactNode;
361
- /** right-aligned trailing content, e.g. an available balance */
362
- meta?: ReactNode;
363
- disabled?: boolean;
364
- };
365
-
366
- export declare function ConvertSummary({ fromCoin, toCoin, payAmount, payFiat, receiveAmount, receiveFiat, rateLabel, feeLabel, fromWalletName, fromWalletAddress, toWalletName, toWalletAddress, footer, className, }: {
366
+ export declare function ConvertSummary({ fromCoin, toCoin, payAmount, payFiat, receiveAmount, receiveFiat, rateLabel, rateCountdown, rateTtl, rateVersion, feeLabel, fromWalletName, fromWalletAddress, toWalletName, toWalletAddress, footer, className, }: {
367
367
  fromCoin: string | null;
368
368
  toCoin: string | null;
369
369
  payAmount?: string | null;
@@ -371,6 +371,12 @@ export declare function ConvertSummary({ fromCoin, toCoin, payAmount, payFiat, r
371
371
  receiveAmount?: string | null;
372
372
  receiveFiat?: string | null;
373
373
  rateLabel?: string | null;
374
+ /** seconds until the quoted rate re-rolls; null hides the countdown */
375
+ rateCountdown?: number | null;
376
+ /** full length of the rate window, for the ring's progress */
377
+ rateTtl?: number;
378
+ /** increments each time a fresh rate lands — replays the flash on the value */
379
+ rateVersion?: number;
374
380
  feeLabel?: string | null;
375
381
  fromWalletName?: string | null;
376
382
  fromWalletAddress?: string | null;
@@ -531,31 +537,6 @@ export declare function DepositPanel({ className }: {
531
537
  className?: string;
532
538
  }): JSX.Element;
533
539
 
534
- export declare function DepositPickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
535
- id?: string;
536
- label?: ReactNode;
537
- value: string | null;
538
- options: DepositPickerOption[];
539
- onChange: (value: string) => void;
540
- placeholder?: ReactNode;
541
- emptyMessage?: ReactNode;
542
- disabled?: boolean;
543
- className?: string;
544
- }): JSX.Element;
545
-
546
- export declare type DepositPickerOption = {
547
- value: string;
548
- /** primary line — shown both in the list and in the closed trigger */
549
- label: ReactNode;
550
- /** muted secondary line */
551
- sublabel?: ReactNode;
552
- /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
553
- leading?: ReactNode;
554
- /** right-aligned trailing content, e.g. an available balance */
555
- meta?: ReactNode;
556
- disabled?: boolean;
557
- };
558
-
559
540
  export declare function DepositReceiveCard({ wallet, coin, network, networkName, className, }: {
560
541
  wallet: DepositWallet | null;
561
542
  coin: string | null;
@@ -1349,6 +1330,39 @@ declare type PeriodSelection = {
1349
1330
  label?: string;
1350
1331
  };
1351
1332
 
1333
+ declare function PickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
1334
+ id?: string;
1335
+ label?: ReactNode;
1336
+ value: string | null;
1337
+ options: PickerOption[];
1338
+ onChange: (value: string) => void;
1339
+ placeholder?: ReactNode;
1340
+ emptyMessage?: ReactNode;
1341
+ disabled?: boolean;
1342
+ className?: string;
1343
+ }): JSX.Element;
1344
+ export { PickerField as ConvertPickerField }
1345
+ export { PickerField as DepositPickerField }
1346
+ export { PickerField }
1347
+ export { PickerField as WithdrawPickerField }
1348
+
1349
+ declare type PickerOption = {
1350
+ value: string;
1351
+ /** primary line — shown both in the list and in the closed trigger */
1352
+ label: ReactNode;
1353
+ /** muted secondary line */
1354
+ sublabel?: ReactNode;
1355
+ /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
1356
+ leading?: ReactNode;
1357
+ /** right-aligned trailing content, e.g. an available balance */
1358
+ meta?: ReactNode;
1359
+ disabled?: boolean;
1360
+ };
1361
+ export { PickerOption as ConvertPickerOption }
1362
+ export { PickerOption as DepositPickerOption }
1363
+ export { PickerOption }
1364
+ export { PickerOption as WithdrawPickerOption }
1365
+
1352
1366
  export declare function Popover(props: ComponentProps<typeof PopoverPrimitive.Root>): JSX.Element;
1353
1367
 
1354
1368
  export declare function PopoverAnchor(props: ComponentProps<typeof PopoverPrimitive.Anchor>): JSX.Element;
@@ -1424,12 +1438,6 @@ declare type RecentTransaction = {
1424
1438
  txHash: string;
1425
1439
  };
1426
1440
 
1427
- export declare function RecentTransactionsPanel({ transactions, open, onOpenChange, }: {
1428
- transactions: RecentTransaction[];
1429
- open: boolean;
1430
- onOpenChange: (open: boolean) => void;
1431
- }): JSX.Element;
1432
-
1433
1441
  /** Direction drives the header icon and the amount color. */
1434
1442
  declare type RecentTxDirection = "in" | "out" | "transfer";
1435
1443
 
@@ -1725,6 +1733,30 @@ export declare const tabsListVariants: (props?: ({
1725
1733
 
1726
1734
  export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Trigger>): React_2.JSX.Element;
1727
1735
 
1736
+ export declare function TextField({ id, label, value, onChange, placeholder,
1737
+ /** right-aligned note beside the label */
1738
+ hint,
1739
+ /** helper / error line under the input */
1740
+ helper, disabled, invalid, inputMode, spellCheck, autoComplete, maxLength,
1741
+ /** extra classes on the <input> itself (e.g. font-mono, height) */
1742
+ inputClassName, className, }: {
1743
+ id?: string;
1744
+ label?: ReactNode;
1745
+ value: string;
1746
+ onChange: (value: string) => void;
1747
+ placeholder?: string;
1748
+ hint?: ReactNode;
1749
+ helper?: ReactNode;
1750
+ disabled?: boolean;
1751
+ invalid?: boolean;
1752
+ inputMode?: React.ComponentProps<"input">["inputMode"];
1753
+ spellCheck?: boolean;
1754
+ autoComplete?: string;
1755
+ maxLength?: number;
1756
+ inputClassName?: string;
1757
+ className?: string;
1758
+ }): JSX.Element;
1759
+
1728
1760
  export declare function TextLink({ href, className, children, ...props }: ComponentProps<"a">): JSX.Element;
1729
1761
 
1730
1762
  export declare function TextStack({ primary, secondary, align, tabularNums, primaryClassName, secondaryClassName, className, }: {
@@ -2031,6 +2063,14 @@ declare type Wallet = {
2031
2063
  pendingFiat?: string;
2032
2064
  };
2033
2065
 
2066
+ /** The source wallets you can convert FROM — the four treasury risk tiers.
2067
+ Currency + network are chosen separately, so these carry no coin/balance. */
2068
+ declare const WALLET_TIERS: {
2069
+ id: string;
2070
+ name: string;
2071
+ purpose: Holding["purpose"];
2072
+ }[];
2073
+
2034
2074
  export declare type WalletActionId = "withdraw" | "deposit" | "convert";
2035
2075
 
2036
2076
  export declare function WalletBalancesTable({ balances, actionsVariant, className, }: {
@@ -2039,6 +2079,34 @@ export declare function WalletBalancesTable({ balances, actionsVariant, classNam
2039
2079
  className?: string;
2040
2080
  }): JSX.Element;
2041
2081
 
2082
+ export declare function WalletField({ id, label, placeholder, value, onChange, wallets, emptyMessage, variant, disabled, className, }: {
2083
+ id?: string;
2084
+ label?: ReactNode;
2085
+ placeholder?: ReactNode;
2086
+ value: string | null;
2087
+ onChange: (value: string) => void;
2088
+ wallets: WalletOption[];
2089
+ emptyMessage?: ReactNode;
2090
+ /** "detailed" shows badge + address + balance; "simple" shows only the name */
2091
+ variant?: "detailed" | "simple";
2092
+ disabled?: boolean;
2093
+ className?: string;
2094
+ }): JSX.Element;
2095
+
2096
+ export declare type WalletOption = {
2097
+ id: string;
2098
+ /** primary line — the wallet name */
2099
+ name: string;
2100
+ /** detailed: short address / secondary line */
2101
+ address?: string;
2102
+ /** detailed: coin + network for the leading badge and balance unit */
2103
+ coin?: string;
2104
+ network?: string;
2105
+ /** detailed: right-aligned balance */
2106
+ amount?: string;
2107
+ amountFiat?: string;
2108
+ };
2109
+
2042
2110
  /** One end of a movement — a named treasury wallet or an on-chain address. */
2043
2111
  declare type WalletRef = {
2044
2112
  /** what's shown, e.g. "Low Risk Wallet" or a truncated address */
@@ -2109,31 +2177,6 @@ export declare function WithdrawPanel({ currentUser, onSubmit, className, }: {
2109
2177
  className?: string;
2110
2178
  }): JSX.Element;
2111
2179
 
2112
- export declare function WithdrawPickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
2113
- id?: string;
2114
- label?: ReactNode;
2115
- value: string | null;
2116
- options: WithdrawPickerOption[];
2117
- onChange: (value: string) => void;
2118
- placeholder?: ReactNode;
2119
- emptyMessage?: ReactNode;
2120
- disabled?: boolean;
2121
- className?: string;
2122
- }): JSX.Element;
2123
-
2124
- export declare type WithdrawPickerOption = {
2125
- value: string;
2126
- /** primary line — shown both in the list and in the closed trigger */
2127
- label: ReactNode;
2128
- /** muted secondary line */
2129
- sublabel?: ReactNode;
2130
- /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
2131
- leading?: ReactNode;
2132
- /** right-aligned trailing content, e.g. an available balance */
2133
- meta?: ReactNode;
2134
- disabled?: boolean;
2135
- };
2136
-
2137
2180
  export declare function WithdrawSummary({ coin, network, networkName, amount, amountFiat, from, to, footer, className, }: {
2138
2181
  coin: string | null;
2139
2182
  network: string | null;