@chainberry/ui-components 1.0.6 → 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;
@@ -339,31 +363,6 @@ export declare function ConvertPanel({ currentUser, onSubmit, className, }: {
339
363
  className?: string;
340
364
  }): JSX.Element;
341
365
 
342
- export declare function ConvertPickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
343
- id?: string;
344
- label?: ReactNode;
345
- value: string | null;
346
- options: ConvertPickerOption[];
347
- onChange: (value: string) => void;
348
- placeholder?: ReactNode;
349
- emptyMessage?: ReactNode;
350
- disabled?: boolean;
351
- className?: string;
352
- }): JSX.Element;
353
-
354
- export declare type ConvertPickerOption = {
355
- value: string;
356
- /** primary line — shown both in the list and in the closed trigger */
357
- label: ReactNode;
358
- /** muted secondary line */
359
- sublabel?: ReactNode;
360
- /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
361
- leading?: ReactNode;
362
- /** right-aligned trailing content, e.g. an available balance */
363
- meta?: ReactNode;
364
- disabled?: boolean;
365
- };
366
-
367
366
  export declare function ConvertSummary({ fromCoin, toCoin, payAmount, payFiat, receiveAmount, receiveFiat, rateLabel, rateCountdown, rateTtl, rateVersion, feeLabel, fromWalletName, fromWalletAddress, toWalletName, toWalletAddress, footer, className, }: {
368
367
  fromCoin: string | null;
369
368
  toCoin: string | null;
@@ -538,31 +537,6 @@ export declare function DepositPanel({ className }: {
538
537
  className?: string;
539
538
  }): JSX.Element;
540
539
 
541
- export declare function DepositPickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
542
- id?: string;
543
- label?: ReactNode;
544
- value: string | null;
545
- options: DepositPickerOption[];
546
- onChange: (value: string) => void;
547
- placeholder?: ReactNode;
548
- emptyMessage?: ReactNode;
549
- disabled?: boolean;
550
- className?: string;
551
- }): JSX.Element;
552
-
553
- export declare type DepositPickerOption = {
554
- value: string;
555
- /** primary line — shown both in the list and in the closed trigger */
556
- label: ReactNode;
557
- /** muted secondary line */
558
- sublabel?: ReactNode;
559
- /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
560
- leading?: ReactNode;
561
- /** right-aligned trailing content, e.g. an available balance */
562
- meta?: ReactNode;
563
- disabled?: boolean;
564
- };
565
-
566
540
  export declare function DepositReceiveCard({ wallet, coin, network, networkName, className, }: {
567
541
  wallet: DepositWallet | null;
568
542
  coin: string | null;
@@ -1356,6 +1330,39 @@ declare type PeriodSelection = {
1356
1330
  label?: string;
1357
1331
  };
1358
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
+
1359
1366
  export declare function Popover(props: ComponentProps<typeof PopoverPrimitive.Root>): JSX.Element;
1360
1367
 
1361
1368
  export declare function PopoverAnchor(props: ComponentProps<typeof PopoverPrimitive.Anchor>): JSX.Element;
@@ -1726,6 +1733,30 @@ export declare const tabsListVariants: (props?: ({
1726
1733
 
1727
1734
  export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Trigger>): React_2.JSX.Element;
1728
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
+
1729
1760
  export declare function TextLink({ href, className, children, ...props }: ComponentProps<"a">): JSX.Element;
1730
1761
 
1731
1762
  export declare function TextStack({ primary, secondary, align, tabularNums, primaryClassName, secondaryClassName, className, }: {
@@ -2048,6 +2079,34 @@ export declare function WalletBalancesTable({ balances, actionsVariant, classNam
2048
2079
  className?: string;
2049
2080
  }): JSX.Element;
2050
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
+
2051
2110
  /** One end of a movement — a named treasury wallet or an on-chain address. */
2052
2111
  declare type WalletRef = {
2053
2112
  /** what's shown, e.g. "Low Risk Wallet" or a truncated address */
@@ -2118,31 +2177,6 @@ export declare function WithdrawPanel({ currentUser, onSubmit, className, }: {
2118
2177
  className?: string;
2119
2178
  }): JSX.Element;
2120
2179
 
2121
- export declare function WithdrawPickerField({ id, label, value, options, onChange, placeholder, emptyMessage, disabled, className, }: {
2122
- id?: string;
2123
- label?: ReactNode;
2124
- value: string | null;
2125
- options: WithdrawPickerOption[];
2126
- onChange: (value: string) => void;
2127
- placeholder?: ReactNode;
2128
- emptyMessage?: ReactNode;
2129
- disabled?: boolean;
2130
- className?: string;
2131
- }): JSX.Element;
2132
-
2133
- export declare type WithdrawPickerOption = {
2134
- value: string;
2135
- /** primary line — shown both in the list and in the closed trigger */
2136
- label: ReactNode;
2137
- /** muted secondary line */
2138
- sublabel?: ReactNode;
2139
- /** leading visual, e.g. <CoinLogo /> or <CurrencyNetwork /> */
2140
- leading?: ReactNode;
2141
- /** right-aligned trailing content, e.g. an available balance */
2142
- meta?: ReactNode;
2143
- disabled?: boolean;
2144
- };
2145
-
2146
2180
  export declare function WithdrawSummary({ coin, network, networkName, amount, amountFiat, from, to, footer, className, }: {
2147
2181
  coin: string | null;
2148
2182
  network: string | null;