@hyperbridge/ui 0.0.4 → 0.0.6

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
@@ -10,6 +10,7 @@ import * as motion_dist_react from 'motion/dist/react';
10
10
  import { Variants } from 'motion/react';
11
11
  import * as TabsPrimitive from '@radix-ui/react-tabs';
12
12
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
13
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
13
14
  import { Drawer as Drawer$1 } from 'vaul';
14
15
 
15
16
  interface SearchInputProps extends Omit<React.ComponentProps<"input">, "size"> {
@@ -23,7 +24,7 @@ declare function LabelledSeperator(props: {
23
24
  }): react_jsx_runtime.JSX.Element;
24
25
 
25
26
  declare const variant_: {
26
- disiplay: string;
27
+ display: string;
27
28
  h1: string;
28
29
  h2: string;
29
30
  h3: string;
@@ -31,6 +32,7 @@ declare const variant_: {
31
32
  h5: string;
32
33
  h6: string;
33
34
  h7: string;
35
+ title: string;
34
36
  body1: string;
35
37
  body2: string;
36
38
  p: string;
@@ -135,30 +137,36 @@ interface TokenInfo {
135
137
  };
136
138
  }
137
139
  interface SwapFormProps<T extends number = 25 | 50 | 100> {
138
- senderAddress?: string;
139
- senderBalance?: string;
140
- senderAmount?: string;
141
- senderUsdValue?: string | number;
142
- senderToken?: TokenInfo;
143
- onSenderAmountChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;
144
- onSenderTokenSelect?: () => void;
145
- receiverAddress?: string;
146
- receiverAmount?: string | number;
147
- receiverUsdValue?: string | number;
148
- receiverToken?: TokenInfo;
149
- onReceiverTokenSelect?: () => void;
150
- onReceiverAddressEdit?: () => void;
151
- percentagePresets?: T[];
152
- activePercentage?: T | null;
153
- onPercentageClick?: (percentage: T) => void;
154
- onPercentageReset?: () => void;
140
+ sender: {
141
+ address: string;
142
+ balance: React.JSX.Element;
143
+ amount: string;
144
+ usdValue: string | number;
145
+ token: TokenInfo;
146
+ onAmountChange: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;
147
+ onTokenSelect: () => void;
148
+ };
149
+ receiver: {
150
+ address: string;
151
+ amount: string;
152
+ usdValue: string | number;
153
+ token: TokenInfo;
154
+ onAmountChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;
155
+ onTokenSelect: () => void;
156
+ onAddressEdit: () => void;
157
+ };
158
+ percentage?: {
159
+ options: number[];
160
+ value: number | null;
161
+ };
162
+ onPercentageChange?: (percentage: number | null) => void;
155
163
  onInvert?: () => void;
156
164
  estimatedTime?: string;
157
165
  isLoading?: boolean;
158
166
  className?: string;
159
167
  error?: boolean;
160
168
  }
161
- declare function SwapForm<T extends number = 25 | 50 | 100>({ senderAddress, senderBalance, senderAmount, senderUsdValue, senderToken, onSenderAmountChange, onSenderTokenSelect, receiverAddress, receiverAmount, receiverUsdValue, receiverToken, onReceiverTokenSelect, onReceiverAddressEdit, percentagePresets, activePercentage, onPercentageClick, onPercentageReset, onInvert, estimatedTime, isLoading, className, error, }: SwapFormProps<T>): react_jsx_runtime.JSX.Element;
169
+ declare function SwapForm<T extends number = 25 | 50 | 100>({ sender, receiver, percentage, onPercentageChange, onInvert, estimatedTime, isLoading, className, error, }: SwapFormProps<T>): react_jsx_runtime.JSX.Element;
162
170
 
163
171
  interface Network {
164
172
  name: string;
@@ -340,6 +348,7 @@ declare function WalletProviderItem(props: {
340
348
  onRetry?: () => void;
341
349
  onCancel?: () => void;
342
350
  onConnect?: () => void;
351
+ onDisconnect?: () => void;
343
352
  }): react_jsx_runtime.JSX.Element;
344
353
  declare function NetworkGroupItem(props: {
345
354
  image: {
@@ -402,7 +411,7 @@ declare function DialogFooter({ className, ...props }: React$1.ComponentProps<"d
402
411
  declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
403
412
  declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
404
413
 
405
- declare function DialogMorphContent({ className, children, showCloseButton, ...props }: DialogPrimitive.DialogContentProps & {
414
+ declare function DialogMorphContent({ className, children, showCloseButton, onInteractOutside, ...props }: DialogPrimitive.DialogContentProps & {
406
415
  showCloseButton?: boolean;
407
416
  }): react_jsx_runtime.JSX.Element;
408
417
 
@@ -417,32 +426,6 @@ declare function EmptyState(props: {
417
426
  children?: React__default.ReactNode;
418
427
  }): react_jsx_runtime.JSX.Element;
419
428
 
420
- type Item = {
421
- network: {
422
- name: string;
423
- image: string;
424
- };
425
- wallet: {
426
- image: string;
427
- name: string;
428
- };
429
- address: string;
430
- isActive?: boolean;
431
- };
432
- declare function ConnectedHeader(props: {
433
- accounts: Item[];
434
- onCopy?: (account: string) => void;
435
- onDisconnect?: (account: Item, index: number) => void;
436
- onConnect?: (networkType: "evm" | "polkadot") => void;
437
- polkadotImage?: {
438
- name: string;
439
- src: string;
440
- };
441
- evmImage?: {
442
- name: string;
443
- src: string;
444
- };
445
- }): react_jsx_runtime.JSX.Element;
446
429
  declare function WalletManagerUIProvider(props: {
447
430
  expand?: boolean;
448
431
  children: React__default.ReactNode;
@@ -493,7 +476,7 @@ interface ModalProps {
493
476
  title?: string;
494
477
  animationPreset?: AnimationPreset;
495
478
  }
496
- declare const Modal: ({ isOpen, children, onClose, className, animationPreset, }: ModalProps) => react_jsx_runtime.JSX.Element;
479
+ declare const Modal: (props: ModalProps) => react_jsx_runtime.JSX.Element;
497
480
 
498
481
  /**
499
482
  * Renders a Separator that shows a border when the referenced Scrollable Element is scrolled.
@@ -524,7 +507,7 @@ declare function ScrollAwareSeparator(props: React__default.ComponentProps<"div"
524
507
  scrollRef: React__default.RefObject<HTMLElement | null>;
525
508
  }): react_jsx_runtime.JSX.Element;
526
509
 
527
- declare function BridgeSummary(props: {
510
+ declare function Summary(props: {
528
511
  children: React.ReactNode;
529
512
  }): react_jsx_runtime.JSX.Element;
530
513
  type SummaryEntryItem = {
@@ -545,6 +528,9 @@ declare const SummaryValues: {
545
528
  GasEntry: ({ children }: {
546
529
  children: React.ReactNode;
547
530
  }) => react_jsx_runtime.JSX.Element;
531
+ Rate: ({ children }: {
532
+ children: React.ReactNode;
533
+ }) => react_jsx_runtime.JSX.Element;
548
534
  SpillageTolerance: ({ children }: {
549
535
  children: React.ReactNode;
550
536
  }) => react_jsx_runtime.JSX.Element;
@@ -554,6 +540,12 @@ declare const SummaryValues: {
554
540
  ETA: ({ children }: {
555
541
  children: React.ReactNode;
556
542
  }) => react_jsx_runtime.JSX.Element;
543
+ RecipientAddress: ({ children }: {
544
+ children: React.ReactNode;
545
+ }) => react_jsx_runtime.JSX.Element;
546
+ Fee: ({ children }: {
547
+ children: React.ReactNode;
548
+ }) => react_jsx_runtime.JSX.Element;
557
549
  };
558
550
  Values: {
559
551
  Highlight: ({ children }: {
@@ -588,7 +580,7 @@ type TimelineData = {
588
580
  processingStatus: "upcoming" | "error";
589
581
  } | {
590
582
  processingStatus: "completed";
591
- data: {
583
+ data?: {
592
584
  transactionUrl: string;
593
585
  completedIn: EstimatedTimeFormatted;
594
586
  };
@@ -596,6 +588,7 @@ type TimelineData = {
596
588
  type TimelineItemProps = Prettify<TimelineData & Level & {
597
589
  caption: string;
598
590
  secondary?: string;
591
+ durationMode?: "none" | "visible";
599
592
  }>;
600
593
  declare function TimelineItem(props: TimelineItemProps): react_jsx_runtime.JSX.Element;
601
594
  declare function TimelineListGroup(props: {
@@ -806,9 +799,10 @@ declare function HeaderNested(props: {
806
799
  onBack: () => void;
807
800
  hideBackButton?: boolean;
808
801
  }): react_jsx_runtime.JSX.Element;
809
- declare function ListSection({ children, caption, }: {
802
+ declare function ListSection({ children, caption, contentClassName, }: {
810
803
  caption: React.ReactNode;
811
- children: React.ReactNode;
804
+ children?: React.ReactNode;
805
+ contentClassName?: string;
812
806
  }): react_jsx_runtime.JSX.Element;
813
807
  declare function CWDrawerContent({ children, ...props }: {
814
808
  children: React.ReactNode;
@@ -841,9 +835,98 @@ declare function TokenSelectionItem(props: {
841
835
  AddWalletButton: React__default.ReactNode;
842
836
  } & React__default.ComponentProps<"button">): react_jsx_runtime.JSX.Element;
843
837
 
838
+ interface SwapTokenSelectorProps {
839
+ isOpen: boolean;
840
+ onClose: () => void;
841
+ children?: React__default.ReactNode;
842
+ className?: string;
843
+ }
844
+ declare const SwapTokenSelector: ({ isOpen, onClose, children, className, }: SwapTokenSelectorProps) => react_jsx_runtime.JSX.Element;
845
+ interface SwapTokenSelectorHeaderProps {
846
+ title?: string;
847
+ onClose?: () => void;
848
+ children?: React__default.ReactNode;
849
+ className?: string;
850
+ }
851
+ declare const SwapTokenSelectorHeader: ({ title, onClose, children, className, }: SwapTokenSelectorHeaderProps) => react_jsx_runtime.JSX.Element;
852
+ interface SwapTokenSelectorSearchProps {
853
+ children: React__default.ReactNode;
854
+ className?: string;
855
+ }
856
+ declare const SwapTokenSelectorSearch: ({ children, className, }: SwapTokenSelectorSearchProps) => react_jsx_runtime.JSX.Element;
857
+ interface SwapTokenSelectorContentProps {
858
+ children: React__default.ReactNode;
859
+ className?: string;
860
+ }
861
+ declare const SwapTokenSelectorContent: ({ children, className, }: SwapTokenSelectorContentProps) => react_jsx_runtime.JSX.Element;
862
+ interface SwapTokenSelectorSectionProps {
863
+ title?: string;
864
+ children: React__default.ReactNode;
865
+ className?: string;
866
+ }
867
+ declare const SwapTokenSelectorSection: ({ title, children, className, }: SwapTokenSelectorSectionProps) => react_jsx_runtime.JSX.Element;
868
+ interface SwapTokenSelectorEmptyProps {
869
+ children: React__default.ReactNode;
870
+ className?: string;
871
+ }
872
+ declare const SwapTokenSelectorEmpty: ({ children, className, }: SwapTokenSelectorEmptyProps) => react_jsx_runtime.JSX.Element;
873
+ interface SwapTokenItemProps {
874
+ token: Omit<Token, "address" | "network_group" | "amount" | "usdValue">;
875
+ network: Omit<Network, "group">;
876
+ address: React__default.ReactNode;
877
+ isActive?: boolean;
878
+ onClick?: () => void;
879
+ className?: string;
880
+ amount: string;
881
+ usdValue: string;
882
+ }
883
+ declare const SwapTokenItem: ({ token, network, address, isActive, onClick, className, amount, usdValue, }: SwapTokenItemProps) => react_jsx_runtime.JSX.Element;
884
+
844
885
  declare function TooltipProvider({ delayDuration, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
845
886
  declare function Tooltip({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
846
887
  declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
847
888
  declare function TooltipContent({ className, sideOffset, children, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
848
889
 
849
- export { AccessoryButton, type AccessoryButtonProps, AccountItem, AccountStack, type AccountStackProps, AddressInput, AddressInputFocusBehaviour, AssetList, AssetListItem, AssetValueTrend, BadgeIcon, Balance, BridgeForm, type BridgeFormProps, BridgeInput, BridgeSettings, type BridgeSettingsProps, BridgeSummary, BridgeTokenButton, Button, type ButtonProps, CWDrawerContent, ConnectedHeader, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMorphContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerContent, EmptyState, EmptyStateConceal, EmptyStateContent, EmptyStateDescription, EmptyStateTitle, type EstimatedTimeFormatted, GradientButton, Header, HeaderContent, HeaderGradient, HeaderNested, IconButton, Input, type InputProps, LabelledSeperator, ListHeading, ListSection, ManageAccounts, Modal, type ModalProps, type Network, NetworkGroupItem, NetworkSelectionItem, NetworkSelector, type NetworkSelectorProps, NetworkSwitcher, NetworkSwitcherButton, type NetworkSwitcherProps, ReviewItem, ReviewItemAddress, ReviewItemCopyAddressButton, ScrollAwareSeparator, SearchInput, type SearchInputProps, Settings, type SettingsProps, Sheet, SheetContent, SheetTrigger, SummaryValues, SwapForm, type SwapFormProps, SwapTokenButton, TabAlt, TabAltContent, TabAltHeader, TabAltHeaders, TabAltPanel, TabItem, Tabs, TabsContent, TabsList, TagButton, Text, TimelineItem, TimelineList, TimelineListGroup, TimelineRoot, TimerWrap, ToastBox, type Token, TokenImage, type TokenInfo, TokenSelectionItem, TokenSelector, type TokenSelectorProps, TokenTransferPair, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionTimer, TxList, TxListItem, TxListItemProcessing, type WalletAccount, WalletAccountItem, WalletConnectedHeader, type WalletConnectedHeaderProps, WalletHeader, type WalletHeaderCallbacks, WalletHeaderContent, WalletHeaderContentBlur, type WalletHeaderContentProps, type WalletHeaderProps, WalletHeaderTabItem, WalletHeaderTabs, WalletHeaderTabsContent, WalletHeaderTabsList, type WalletHeaderTabsProps, WalletManagerUIContent, WalletManagerUIProvider, WalletProviderItem, makeEntry };
890
+ declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
891
+ declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
892
+ declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
893
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
894
+ declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
895
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
896
+ inset?: boolean;
897
+ variant?: "default" | "destructive";
898
+ }): react_jsx_runtime.JSX.Element;
899
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
900
+ declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
901
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
902
+ declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
903
+ inset?: boolean;
904
+ }): react_jsx_runtime.JSX.Element;
905
+ declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
906
+ declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
907
+ declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
908
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
909
+ inset?: boolean;
910
+ }): react_jsx_runtime.JSX.Element;
911
+ declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
912
+
913
+ declare const badgeVariants: (props?: ({
914
+ size?: "sm" | null | undefined;
915
+ variant?: "default" | "outline" | "secondary" | "destructive" | "success" | null | undefined;
916
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
917
+ declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
918
+ asChild?: boolean;
919
+ }): react_jsx_runtime.JSX.Element;
920
+
921
+ declare function HBDrawer({ ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
922
+ declare function HBDrawerTrigger({ ...props }: React$1.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime.JSX.Element;
923
+ declare function HBDrawerPortal({ ...props }: React$1.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime.JSX.Element;
924
+ declare function HBDrawerClose({ ...props }: React$1.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime.JSX.Element;
925
+ declare function HBDrawerOverlay({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Overlay>): react_jsx_runtime.JSX.Element;
926
+ declare function HBDrawerContent({ className, children, ...props }: React$1.ComponentProps<typeof Drawer$1.Content>): react_jsx_runtime.JSX.Element;
927
+ declare function HBDrawerHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
928
+ declare function HBDrawerFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
929
+ declare function HBDrawerTitle({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime.JSX.Element;
930
+ declare function HBDrawerDescription({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime.JSX.Element;
931
+
932
+ export { AccessoryButton, type AccessoryButtonProps, AccountItem, AccountStack, type AccountStackProps, AddressInput, AddressInputFocusBehaviour, AssetList, AssetListItem, AssetValueTrend, Badge, BadgeIcon, Balance, BridgeForm, type BridgeFormProps, BridgeInput, BridgeSettings, type BridgeSettingsProps, BridgeTokenButton, Button, type ButtonProps, CWDrawerContent, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMorphContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerContent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateConceal, EmptyStateContent, EmptyStateDescription, EmptyStateTitle, type EstimatedTimeFormatted, GradientButton, HBDrawer, HBDrawerClose, HBDrawerContent, HBDrawerDescription, HBDrawerFooter, HBDrawerHeader, HBDrawerOverlay, HBDrawerPortal, HBDrawerTitle, HBDrawerTrigger, Header, HeaderContent, HeaderGradient, HeaderNested, IconButton, Input, type InputProps, LabelledSeperator, ListHeading, ListSection, ManageAccounts, Modal, type ModalProps, type Network, NetworkGroupItem, NetworkSelectionItem, NetworkSelector, type NetworkSelectorProps, NetworkSwitcher, NetworkSwitcherButton, type NetworkSwitcherProps, ReviewItem, ReviewItemAddress, ReviewItemCopyAddressButton, ScrollAwareSeparator, SearchInput, type SearchInputProps, Settings, type SettingsProps, Sheet, SheetContent, SheetTrigger, Summary, SummaryValues, SwapForm, type SwapFormProps, SwapTokenButton, SwapTokenItem, type SwapTokenItemProps, SwapTokenSelector, SwapTokenSelectorContent, type SwapTokenSelectorContentProps, SwapTokenSelectorEmpty, type SwapTokenSelectorEmptyProps, SwapTokenSelectorHeader, type SwapTokenSelectorHeaderProps, type SwapTokenSelectorProps, SwapTokenSelectorSearch, type SwapTokenSelectorSearchProps, SwapTokenSelectorSection, type SwapTokenSelectorSectionProps, TabAlt, TabAltContent, TabAltHeader, TabAltHeaders, TabAltPanel, TabItem, Tabs, TabsContent, TabsList, TagButton, Text, TimelineItem, TimelineList, TimelineListGroup, TimelineRoot, TimerWrap, ToastBox, type Token, TokenImage, type TokenInfo, TokenSelectionItem, TokenSelector, type TokenSelectorProps, TokenTransferPair, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionTimer, TxList, TxListItem, TxListItemProcessing, type WalletAccount, WalletAccountItem, WalletConnectedHeader, type WalletConnectedHeaderProps, WalletHeader, type WalletHeaderCallbacks, WalletHeaderContent, WalletHeaderContentBlur, type WalletHeaderContentProps, type WalletHeaderProps, WalletHeaderTabItem, WalletHeaderTabs, WalletHeaderTabsContent, WalletHeaderTabsList, type WalletHeaderTabsProps, WalletManagerUIContent, WalletManagerUIProvider, WalletProviderItem, badgeVariants, makeEntry };