@unifold/ui-react 0.1.21 → 0.1.23

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.mts CHANGED
@@ -20,6 +20,8 @@ interface DepositModalProps {
20
20
  destinationChainId?: string;
21
21
  destinationTokenAddress?: string;
22
22
  hideDepositTracker?: boolean;
23
+ /** Show balance in deposit modal header. Defaults to false */
24
+ showBalanceHeader?: boolean;
23
25
  /** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
24
26
  transferInputVariant?: "single_input" | "double_input";
25
27
  onDepositSuccess?: (data: {
@@ -34,7 +36,7 @@ interface DepositModalProps {
34
36
  }) => void;
35
37
  theme?: "light" | "dark" | "auto";
36
38
  }
37
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, transferInputVariant, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
39
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
38
40
 
39
41
  interface DepositHeaderProps {
40
42
  title: string;
@@ -45,8 +47,14 @@ interface DepositHeaderProps {
45
47
  badge?: {
46
48
  count: number;
47
49
  };
48
- }
49
- declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
50
+ showBalance?: boolean;
51
+ balanceAddress?: string;
52
+ balanceChainType?: "ethereum" | "solana" | "bitcoin";
53
+ balanceChainId?: string;
54
+ balanceTokenAddress?: string;
55
+ publishableKey?: string;
56
+ }
57
+ declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
50
58
 
51
59
  interface TransferCryptoSingleInputProps {
52
60
  userId: string;
@@ -550,5 +558,18 @@ declare function ThemeProvider({ children, mode, accentColor, theme, fontFamily,
550
558
  declare function useTheme(): ThemeContextValue;
551
559
 
552
560
  declare function cn(...inputs: ClassValue[]): string;
561
+ /**
562
+ * Format estimated processing time in human-readable format
563
+ * @param seconds - Time in seconds (can be null/undefined)
564
+ * @returns Formatted string like "< 30 secs", "< 5 mins", "< 1 hr 30 mins", or empty string if no value
565
+ */
566
+ /**
567
+ * Truncate a blockchain address to show first and last N characters
568
+ * @param address - Full address string
569
+ * @param startChars - Number of characters to show at the start (default 10)
570
+ * @param endChars - Number of characters to show at the end (default 8)
571
+ * @returns Truncated address like "0x1234...abcd" or full address if shorter than total chars
572
+ */
573
+ declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
553
574
 
554
- export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, useAllowedCountry, useTheme };
575
+ export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useTheme };
package/dist/index.d.ts CHANGED
@@ -20,6 +20,8 @@ interface DepositModalProps {
20
20
  destinationChainId?: string;
21
21
  destinationTokenAddress?: string;
22
22
  hideDepositTracker?: boolean;
23
+ /** Show balance in deposit modal header. Defaults to false */
24
+ showBalanceHeader?: boolean;
23
25
  /** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
24
26
  transferInputVariant?: "single_input" | "double_input";
25
27
  onDepositSuccess?: (data: {
@@ -34,7 +36,7 @@ interface DepositModalProps {
34
36
  }) => void;
35
37
  theme?: "light" | "dark" | "auto";
36
38
  }
37
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, transferInputVariant, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
39
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
38
40
 
39
41
  interface DepositHeaderProps {
40
42
  title: string;
@@ -45,8 +47,14 @@ interface DepositHeaderProps {
45
47
  badge?: {
46
48
  count: number;
47
49
  };
48
- }
49
- declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
50
+ showBalance?: boolean;
51
+ balanceAddress?: string;
52
+ balanceChainType?: "ethereum" | "solana" | "bitcoin";
53
+ balanceChainId?: string;
54
+ balanceTokenAddress?: string;
55
+ publishableKey?: string;
56
+ }
57
+ declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
50
58
 
51
59
  interface TransferCryptoSingleInputProps {
52
60
  userId: string;
@@ -550,5 +558,18 @@ declare function ThemeProvider({ children, mode, accentColor, theme, fontFamily,
550
558
  declare function useTheme(): ThemeContextValue;
551
559
 
552
560
  declare function cn(...inputs: ClassValue[]): string;
561
+ /**
562
+ * Format estimated processing time in human-readable format
563
+ * @param seconds - Time in seconds (can be null/undefined)
564
+ * @returns Formatted string like "< 30 secs", "< 5 mins", "< 1 hr 30 mins", or empty string if no value
565
+ */
566
+ /**
567
+ * Truncate a blockchain address to show first and last N characters
568
+ * @param address - Full address string
569
+ * @param startChars - Number of characters to show at the start (default 10)
570
+ * @param endChars - Number of characters to show at the end (default 8)
571
+ * @returns Truncated address like "0x1234...abcd" or full address if shorter than total chars
572
+ */
573
+ declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
553
574
 
554
- export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, useAllowedCountry, useTheme };
575
+ export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useTheme };