@0xsquid/ui 0.25.1-beta.0 → 0.26.0-beta.0
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/cjs/index.js +923 -829
- package/dist/cjs/types/components/buttons/StopsButton.d.ts +13 -0
- package/dist/cjs/types/components/icons/Arrow.d.ts +12 -0
- package/dist/cjs/types/components/icons/CompassRound.d.ts +5 -1
- package/dist/cjs/types/components/layout/DetailsToolbar.d.ts +3 -11
- package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +2 -1
- package/dist/cjs/types/components/lists/HistoryItem.d.ts +1 -1
- package/dist/cjs/types/components/lists/ListItem.d.ts +5 -1
- package/dist/cjs/types/components/lists/PropertyListItem.d.ts +5 -1
- package/dist/cjs/types/components/lists/RouteStep.d.ts +9 -0
- package/dist/cjs/types/components/lists/index.d.ts +1 -0
- package/dist/cjs/types/hooks/useDropdownMenu.d.ts +9 -2
- package/dist/cjs/types/stories/buttons/StopsButton.stories.d.ts +10 -0
- package/dist/cjs/types/stories/layout/DetailsToolbar.stories.d.ts +3 -3
- package/dist/cjs/types/stories/lists/DropdownMenuItem.stories.d.ts +1 -0
- package/dist/cjs/types/stories/lists/ListItem.stories.d.ts +1 -0
- package/dist/cjs/types/stories/lists/PropertyListItem.stories.d.ts +2 -0
- package/dist/cjs/types/stories/lists/RouteStep.stories.d.ts +7 -0
- package/dist/cjs/types/types/components.d.ts +1 -0
- package/dist/cjs/types/types/config.d.ts +1 -1
- package/dist/esm/index.js +917 -829
- package/dist/esm/types/components/buttons/StopsButton.d.ts +13 -0
- package/dist/esm/types/components/icons/Arrow.d.ts +12 -0
- package/dist/esm/types/components/icons/CompassRound.d.ts +5 -1
- package/dist/esm/types/components/layout/DetailsToolbar.d.ts +3 -11
- package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +2 -1
- package/dist/esm/types/components/lists/HistoryItem.d.ts +1 -1
- package/dist/esm/types/components/lists/ListItem.d.ts +5 -1
- package/dist/esm/types/components/lists/PropertyListItem.d.ts +5 -1
- package/dist/esm/types/components/lists/RouteStep.d.ts +9 -0
- package/dist/esm/types/components/lists/index.d.ts +1 -0
- package/dist/esm/types/hooks/useDropdownMenu.d.ts +9 -2
- package/dist/esm/types/stories/buttons/StopsButton.stories.d.ts +10 -0
- package/dist/esm/types/stories/layout/DetailsToolbar.stories.d.ts +3 -3
- package/dist/esm/types/stories/lists/DropdownMenuItem.stories.d.ts +1 -0
- package/dist/esm/types/stories/lists/ListItem.stories.d.ts +1 -0
- package/dist/esm/types/stories/lists/PropertyListItem.stories.d.ts +2 -0
- package/dist/esm/types/stories/lists/RouteStep.stories.d.ts +7 -0
- package/dist/esm/types/types/components.d.ts +1 -0
- package/dist/esm/types/types/config.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +58 -18
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ type ChainTypeFilter = 'source' | 'destination';
|
|
|
63
63
|
type StatusFilter = 'success' | 'ongoing' | 'error';
|
|
64
64
|
type AssetsButtonVariant = 'primary' | 'accent';
|
|
65
65
|
type PropertyListItemSize = 'small' | 'large';
|
|
66
|
+
type DropdownPosition = 'top' | 'bottom' | 'center';
|
|
66
67
|
|
|
67
68
|
interface IconLabelProps {
|
|
68
69
|
isLoading?: boolean;
|
|
@@ -365,6 +366,18 @@ declare function ArrowCornerDownRightIcon({ size, className, }: {
|
|
|
365
366
|
size?: string;
|
|
366
367
|
className?: string;
|
|
367
368
|
}): react_jsx_runtime.JSX.Element;
|
|
369
|
+
declare function ChevronDownSmallIcon({ size, className, }: {
|
|
370
|
+
size?: string;
|
|
371
|
+
className?: string;
|
|
372
|
+
}): react_jsx_runtime.JSX.Element;
|
|
373
|
+
declare function ArrowDownIcon({ size, className, }: {
|
|
374
|
+
size?: string;
|
|
375
|
+
className?: string;
|
|
376
|
+
}): react_jsx_runtime.JSX.Element;
|
|
377
|
+
declare function ArrowSplit({ size, className, }: {
|
|
378
|
+
size?: string;
|
|
379
|
+
className?: string;
|
|
380
|
+
}): react_jsx_runtime.JSX.Element;
|
|
368
381
|
|
|
369
382
|
declare function ArrowRotate(): react_jsx_runtime.JSX.Element;
|
|
370
383
|
|
|
@@ -433,7 +446,11 @@ declare function StocksIcon({ size, className, }: {
|
|
|
433
446
|
|
|
434
447
|
declare function CollectionIcon(): react_jsx_runtime.JSX.Element;
|
|
435
448
|
|
|
436
|
-
declare function
|
|
449
|
+
declare function CompassRoundOutlinedIcon({ size, className, }: {
|
|
450
|
+
size?: string;
|
|
451
|
+
className?: string;
|
|
452
|
+
}): react_jsx_runtime.JSX.Element;
|
|
453
|
+
declare function CompassRoundSolidIcon({ size, className, }: {
|
|
437
454
|
size?: string;
|
|
438
455
|
className?: string;
|
|
439
456
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -1263,6 +1280,16 @@ interface DescriptionBlocksProps extends ComponentProps<'div'> {
|
|
|
1263
1280
|
declare function DescriptionBlocks({ className, blocks: blocksProp, ...props }: DescriptionBlocksProps): react_jsx_runtime.JSX.Element;
|
|
1264
1281
|
declare function Inline({ className, children, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
1265
1282
|
|
|
1283
|
+
interface StopsProps extends React.ComponentProps<'button'> {
|
|
1284
|
+
stopsCount?: string | number;
|
|
1285
|
+
estimatedTime?: string;
|
|
1286
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1287
|
+
providers: Provider[];
|
|
1288
|
+
}
|
|
1289
|
+
type Provider = {
|
|
1290
|
+
logoUrl: string;
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1266
1293
|
interface DetailsToolbarProps {
|
|
1267
1294
|
errorMessage?: string;
|
|
1268
1295
|
flipButton?: {
|
|
@@ -1275,23 +1302,15 @@ interface DetailsToolbarProps {
|
|
|
1275
1302
|
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1276
1303
|
onClick: () => void;
|
|
1277
1304
|
};
|
|
1278
|
-
estimatedTime?: string;
|
|
1279
1305
|
isLoading?: boolean;
|
|
1280
1306
|
isEmpty?: boolean;
|
|
1281
1307
|
helpButton?: {
|
|
1282
1308
|
label: string;
|
|
1283
1309
|
onClick: () => void;
|
|
1284
1310
|
};
|
|
1285
|
-
|
|
1286
|
-
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1287
|
-
onClick?: ({ boostMode }: {
|
|
1288
|
-
boostMode: BoostMode;
|
|
1289
|
-
}) => void;
|
|
1290
|
-
canToggleBoostMode?: boolean;
|
|
1291
|
-
boostMode?: BoostMode;
|
|
1292
|
-
};
|
|
1311
|
+
stopsButton?: StopsProps;
|
|
1293
1312
|
}
|
|
1294
|
-
declare function DetailsToolbar({ errorMessage,
|
|
1313
|
+
declare function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButton, feeButton, stopsButton, }: DetailsToolbarProps): react_jsx_runtime.JSX.Element;
|
|
1295
1314
|
|
|
1296
1315
|
interface DropdownMenuItemProps {
|
|
1297
1316
|
label: string;
|
|
@@ -1299,8 +1318,9 @@ interface DropdownMenuItemProps {
|
|
|
1299
1318
|
imageUrl?: string;
|
|
1300
1319
|
icon?: React.ReactNode;
|
|
1301
1320
|
onClick?: () => void;
|
|
1321
|
+
link?: string;
|
|
1302
1322
|
}
|
|
1303
|
-
declare function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1323
|
+
declare function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1304
1324
|
|
|
1305
1325
|
interface HistoryItemProps {
|
|
1306
1326
|
firstImageUrl: string;
|
|
@@ -1316,7 +1336,7 @@ interface HistoryItemProps {
|
|
|
1316
1336
|
onClick?: () => void;
|
|
1317
1337
|
warningLabel?: string;
|
|
1318
1338
|
}
|
|
1319
|
-
declare function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems, itemsContainerRef, status, warningLabel, onClick, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
|
|
1339
|
+
declare function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems: _dropdownMenuItemsProp, itemsContainerRef, status, warningLabel, onClick, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
|
|
1320
1340
|
|
|
1321
1341
|
interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
1322
1342
|
itemTitle: string | React.ReactNode;
|
|
@@ -1341,9 +1361,12 @@ interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
1341
1361
|
containerProps?: React.HTMLAttributes<HTMLLIElement>;
|
|
1342
1362
|
compactOnMobile?: boolean;
|
|
1343
1363
|
extraPadding?: boolean;
|
|
1364
|
+
dropdownMenuItems?: DropdownMenuItemProps[];
|
|
1365
|
+
itemsContainerRef?: React.RefObject<HTMLElement>;
|
|
1344
1366
|
}
|
|
1345
1367
|
type ListItemSize = 'small' | 'large';
|
|
1346
|
-
declare function ListItem({ itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding, ...props }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
1368
|
+
declare function ListItem({ itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding, itemsContainerRef, dropdownMenuItems: _dropdownMenuItemsProp, ...props }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
1369
|
+
declare const ListItemActionsButton: (props: React.ComponentProps<'button'>) => react_jsx_runtime.JSX.Element;
|
|
1347
1370
|
|
|
1348
1371
|
interface MenuItemProps {
|
|
1349
1372
|
label: string;
|
|
@@ -1358,8 +1381,12 @@ interface PropertyListItemProps extends ComponentProps<'li'> {
|
|
|
1358
1381
|
icon?: React.ReactNode;
|
|
1359
1382
|
detail?: React.ReactNode;
|
|
1360
1383
|
variant?: PropertyListItemSize;
|
|
1384
|
+
showGradientBg?: boolean;
|
|
1385
|
+
labelClassName?: string;
|
|
1386
|
+
iconClassName?: string;
|
|
1387
|
+
detailClassName?: string;
|
|
1361
1388
|
}
|
|
1362
|
-
declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, ...props }: PropertyListItemProps): react_jsx_runtime.JSX.Element;
|
|
1389
|
+
declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, showGradientBg, labelClassName, iconClassName, detailClassName, ...props }: PropertyListItemProps): react_jsx_runtime.JSX.Element;
|
|
1363
1390
|
|
|
1364
1391
|
interface SectionTitleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1365
1392
|
title: string;
|
|
@@ -1730,6 +1757,14 @@ interface TransactionItemProps {
|
|
|
1730
1757
|
}
|
|
1731
1758
|
declare function TransactionItem({ className, isLoading, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant, }: TransactionItemProps): react_jsx_runtime.JSX.Element;
|
|
1732
1759
|
|
|
1760
|
+
interface RouteStepProps {
|
|
1761
|
+
imageUrl: string;
|
|
1762
|
+
descriptionBlocks: DescriptionBlock[];
|
|
1763
|
+
subtitle: string;
|
|
1764
|
+
showStepSeparator?: boolean;
|
|
1765
|
+
}
|
|
1766
|
+
declare function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator, }: RouteStepProps): react_jsx_runtime.JSX.Element;
|
|
1767
|
+
|
|
1733
1768
|
interface DropdownMenuProps {
|
|
1734
1769
|
dropdownRef?: React.RefObject<HTMLDivElement>;
|
|
1735
1770
|
menuRef?: React.RefObject<HTMLDivElement>;
|
|
@@ -2426,14 +2461,19 @@ declare function SquidConfigProvider({ theme, children, themeType, }: {
|
|
|
2426
2461
|
themeType?: ThemeType;
|
|
2427
2462
|
}): react_jsx_runtime.JSX.Element;
|
|
2428
2463
|
|
|
2429
|
-
|
|
2464
|
+
interface UseDropdownMenuParams {
|
|
2430
2465
|
initialIsModalOpen?: boolean;
|
|
2431
|
-
|
|
2466
|
+
itemsContainerRef?: React.RefObject<HTMLElement>;
|
|
2467
|
+
}
|
|
2468
|
+
declare function useDropdownMenu(props?: UseDropdownMenuParams): {
|
|
2432
2469
|
isDropdownOpen: boolean;
|
|
2433
2470
|
openDropdown: () => void;
|
|
2434
2471
|
closeDropdown: () => void;
|
|
2435
2472
|
dropdownRef: React.RefObject<HTMLDivElement>;
|
|
2436
2473
|
openDropdownButtonRef: React.RefObject<HTMLButtonElement>;
|
|
2474
|
+
dropdownPosition: DropdownPosition | null;
|
|
2475
|
+
itemRef: React.RefObject<HTMLLIElement>;
|
|
2476
|
+
menuRef: React.RefObject<HTMLDivElement>;
|
|
2437
2477
|
};
|
|
2438
2478
|
|
|
2439
2479
|
type UseMediaQueryOptions = {
|
|
@@ -2524,4 +2564,4 @@ declare const baseTailwindConfig: Config;
|
|
|
2524
2564
|
*/
|
|
2525
2565
|
declare const cn: (...inputs: ClassValue[]) => string;
|
|
2526
2566
|
|
|
2527
|
-
export { type ActionButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, type ActionStatus, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, type AssetsButtonVariant, AssetsView, BackpackIcon, BadgeImage, BankIcon, type BaseActionProps, type BaseTransactionViewProps, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, type ChipProps, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockIcon, ClockOutlineIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon,
|
|
2567
|
+
export { type ActionButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, type ActionStatus, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, type AssetsButtonVariant, AssetsView, BackpackIcon, BadgeImage, BankIcon, type BaseActionProps, type BaseTransactionViewProps, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, type ChipProps, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockIcon, ClockOutlineIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CrossAnimatedIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, Dollar, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, FeeButton, FeesAction, type FeesActionProps, FeesLines, FeesTotal, FilledHeartIcon, FilterButton, FilterIcon, GasIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, type HistoryItemStatus, HomeIcon, IconButton, IconLabel, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LightningIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PieChartIcon, PipeSeparator, PlusIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, type PropertyListItemProps, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsGearIcon, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidConfigProvider, SquidLogo, type SquidTheme, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunriseIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, type SwapHeaderProps, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, type SwapPropertiesProps, SwapState, type SwapStep, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, type SwapStepsCollapsedFooterButton, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, type ThemeType, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, TradingViewStepsIcon, TransactionAction, type TransactionActionProps, type TransactionActionType, TransactionFilters, TransactionHeader, TransactionHeaderLayout, type TransactionHeaderProps, type TransactionHeaderType, TransactionItem, TransactionProperties, type TransactionPropertiesProps, type TransactionPropertiesType, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, type TransactionViewProps, type TransactionViewType, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, cn, darkTheme, lightTheme, linkActionTimelineProps, statusTextClassMap, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useVersion };
|