@0xsquid/ui 0.3.0 → 0.4.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 +284 -129
- package/dist/cjs/types/components/buttons/AssetsButton.d.ts +10 -0
- package/dist/cjs/types/components/buttons/BoostButton.d.ts +1 -1
- package/dist/cjs/types/components/buttons/SettingsButton.d.ts +4 -0
- package/dist/cjs/types/components/buttons/index.d.ts +2 -1
- package/dist/cjs/types/components/controls/SettingsSlider.d.ts +5 -0
- package/dist/cjs/types/components/controls/Switch.d.ts +2 -2
- package/dist/cjs/types/components/controls/Tooltip.d.ts +4 -2
- package/dist/cjs/types/components/controls/index.d.ts +1 -0
- package/dist/cjs/types/components/icons/Arrow.d.ts +20 -0
- package/dist/cjs/types/components/icons/Clock.d.ts +8 -0
- package/dist/cjs/types/components/icons/Coins.d.ts +4 -0
- package/dist/cjs/types/components/icons/CompassRound.d.ts +8 -0
- package/dist/cjs/types/components/icons/DashboardFast.d.ts +4 -0
- package/dist/cjs/types/components/icons/DotGrid.d.ts +4 -1
- package/dist/cjs/types/components/icons/Help.d.ts +16 -0
- package/dist/cjs/types/components/icons/Infinity.d.ts +4 -0
- package/dist/cjs/types/components/icons/Lightning.d.ts +4 -0
- package/dist/cjs/types/components/icons/SquidLogo.d.ts +1 -0
- package/dist/cjs/types/components/icons/SwapStepSeparator.d.ts +1 -0
- package/dist/cjs/types/components/icons/TradingViewSteps.d.ts +4 -0
- package/dist/cjs/types/components/layout/Boost.d.ts +9 -1
- package/dist/cjs/types/components/layout/DropdownMenu.d.ts +9 -0
- package/dist/cjs/types/components/layout/Menu.d.ts +6 -2
- package/dist/cjs/types/components/layout/NavigationBar.d.ts +3 -1
- package/dist/cjs/types/components/layout/SwapProgressViewHeader.d.ts +6 -0
- package/dist/cjs/types/components/layout/SwapStepsCollapsed.d.ts +5 -0
- package/dist/cjs/types/components/layout/TokenPair.d.ts +12 -0
- package/dist/cjs/types/components/layout/index.d.ts +3 -0
- package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +3 -3
- package/dist/cjs/types/components/lists/SettingsItem.d.ts +9 -0
- package/dist/cjs/types/components/lists/SwapDetailListItem.d.ts +8 -0
- package/dist/cjs/types/components/lists/SwapStepItem.d.ts +9 -0
- package/dist/cjs/types/components/lists/index.d.ts +3 -0
- package/dist/cjs/types/components/views/ProfileView.d.ts +1 -0
- package/dist/cjs/types/components/views/SwapDetailsView.d.ts +1 -0
- package/dist/cjs/types/core/themes.d.ts +2 -0
- package/dist/cjs/types/hooks/index.d.ts +1 -0
- package/dist/cjs/types/hooks/useModal.d.ts +10 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/providers/SquidConfigProvider.d.ts +4 -2
- package/dist/cjs/types/stories/buttons/{Dropdown.stories.d.ts → AssetsButton.stories.d.ts} +3 -2
- package/dist/cjs/types/stories/buttons/SettingsButton.stories.d.ts +6 -0
- package/dist/cjs/types/stories/controls/SettingsSlider.stories.d.ts +7 -0
- package/dist/cjs/types/stories/layout/Boost.stories.d.ts +6 -0
- package/dist/cjs/types/stories/layout/DropdownMenu.stories.d.ts +6 -0
- package/dist/cjs/types/stories/layout/Menu.stories.d.ts +2 -0
- package/dist/cjs/types/stories/layout/NavigationBar.stories.d.ts +1 -0
- package/dist/cjs/types/stories/layout/SwapProgressView.stories.d.ts +9 -0
- package/dist/cjs/types/stories/layout/SwapProgressViewHeader.stories.d.ts +6 -0
- package/dist/cjs/types/stories/layout/TokenPair.stories.d.ts +6 -0
- package/dist/cjs/types/stories/lists/SettingsItem.stories.d.ts +9 -0
- package/dist/cjs/types/stories/lists/SwapDetailListItem.stories.d.ts +7 -0
- package/dist/cjs/types/stories/lists/SwapStepItem.stories.d.ts +10 -0
- package/dist/cjs/types/stories/views/ProfileView.stories.d.ts +6 -0
- package/dist/cjs/types/stories/views/SwapDetailsView.stories.d.ts +6 -0
- package/dist/cjs/types/types/components.d.ts +11 -0
- package/dist/esm/index.js +276 -130
- package/dist/esm/types/components/buttons/AssetsButton.d.ts +10 -0
- package/dist/esm/types/components/buttons/BoostButton.d.ts +1 -1
- package/dist/esm/types/components/buttons/SettingsButton.d.ts +4 -0
- package/dist/esm/types/components/buttons/index.d.ts +2 -1
- package/dist/esm/types/components/controls/SettingsSlider.d.ts +5 -0
- package/dist/esm/types/components/controls/Switch.d.ts +2 -2
- package/dist/esm/types/components/controls/Tooltip.d.ts +4 -2
- package/dist/esm/types/components/controls/index.d.ts +1 -0
- package/dist/esm/types/components/icons/Arrow.d.ts +20 -0
- package/dist/esm/types/components/icons/Clock.d.ts +8 -0
- package/dist/esm/types/components/icons/Coins.d.ts +4 -0
- package/dist/esm/types/components/icons/CompassRound.d.ts +8 -0
- package/dist/esm/types/components/icons/DashboardFast.d.ts +4 -0
- package/dist/esm/types/components/icons/DotGrid.d.ts +4 -1
- package/dist/esm/types/components/icons/Help.d.ts +16 -0
- package/dist/esm/types/components/icons/Infinity.d.ts +4 -0
- package/dist/esm/types/components/icons/Lightning.d.ts +4 -0
- package/dist/esm/types/components/icons/SquidLogo.d.ts +1 -0
- package/dist/esm/types/components/icons/SwapStepSeparator.d.ts +1 -0
- package/dist/esm/types/components/icons/TradingViewSteps.d.ts +4 -0
- package/dist/esm/types/components/layout/Boost.d.ts +9 -1
- package/dist/esm/types/components/layout/DropdownMenu.d.ts +9 -0
- package/dist/esm/types/components/layout/Menu.d.ts +6 -2
- package/dist/esm/types/components/layout/NavigationBar.d.ts +3 -1
- package/dist/esm/types/components/layout/SwapProgressViewHeader.d.ts +6 -0
- package/dist/esm/types/components/layout/SwapStepsCollapsed.d.ts +5 -0
- package/dist/esm/types/components/layout/TokenPair.d.ts +12 -0
- package/dist/esm/types/components/layout/index.d.ts +3 -0
- package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +3 -3
- package/dist/esm/types/components/lists/SettingsItem.d.ts +9 -0
- package/dist/esm/types/components/lists/SwapDetailListItem.d.ts +8 -0
- package/dist/esm/types/components/lists/SwapStepItem.d.ts +9 -0
- package/dist/esm/types/components/lists/index.d.ts +3 -0
- package/dist/esm/types/components/views/ProfileView.d.ts +1 -0
- package/dist/esm/types/components/views/SwapDetailsView.d.ts +1 -0
- package/dist/esm/types/core/themes.d.ts +2 -0
- package/dist/esm/types/hooks/index.d.ts +1 -0
- package/dist/esm/types/hooks/useModal.d.ts +10 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/providers/SquidConfigProvider.d.ts +4 -2
- package/dist/esm/types/stories/buttons/{Dropdown.stories.d.ts → AssetsButton.stories.d.ts} +3 -2
- package/dist/esm/types/stories/buttons/SettingsButton.stories.d.ts +6 -0
- package/dist/esm/types/stories/controls/SettingsSlider.stories.d.ts +7 -0
- package/dist/esm/types/stories/layout/Boost.stories.d.ts +6 -0
- package/dist/esm/types/stories/layout/DropdownMenu.stories.d.ts +6 -0
- package/dist/esm/types/stories/layout/Menu.stories.d.ts +2 -0
- package/dist/esm/types/stories/layout/NavigationBar.stories.d.ts +1 -0
- package/dist/esm/types/stories/layout/SwapProgressView.stories.d.ts +9 -0
- package/dist/esm/types/stories/layout/SwapProgressViewHeader.stories.d.ts +6 -0
- package/dist/esm/types/stories/layout/TokenPair.stories.d.ts +6 -0
- package/dist/esm/types/stories/lists/SettingsItem.stories.d.ts +9 -0
- package/dist/esm/types/stories/lists/SwapDetailListItem.stories.d.ts +7 -0
- package/dist/esm/types/stories/lists/SwapStepItem.stories.d.ts +10 -0
- package/dist/esm/types/stories/views/ProfileView.stories.d.ts +6 -0
- package/dist/esm/types/stories/views/SwapDetailsView.stories.d.ts +6 -0
- package/dist/esm/types/types/components.d.ts +11 -0
- package/dist/index.css +337 -54
- package/dist/index.d.ts +116 -23
- package/package.json +1 -1
- package/dist/cjs/types/components/buttons/Dropdown.d.ts +0 -10
- package/dist/esm/types/components/buttons/Dropdown.d.ts +0 -10
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './AddressButton';
|
|
2
2
|
export * from './ArrowButton';
|
|
3
|
+
export * from './AssetsButton';
|
|
3
4
|
export * from './BoostButton';
|
|
4
5
|
export * from './Button';
|
|
5
6
|
export * from './Chip';
|
|
6
|
-
export * from './Dropdown';
|
|
7
7
|
export * from './FeeButton';
|
|
8
|
+
export * from './SettingsButton';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SwitchSize } from '../../types/components';
|
|
2
2
|
interface SwitchProps {
|
|
3
|
-
checked
|
|
4
|
-
onChange
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
onChange?: (checked: boolean) => void;
|
|
5
5
|
size: SwitchSize;
|
|
6
6
|
}
|
|
7
7
|
export declare function Switch({ checked, onChange, size }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,9 @@ interface TooltipProps {
|
|
|
6
6
|
tooltipContent: React.ReactNode;
|
|
7
7
|
threshold?: TooltipThreshold;
|
|
8
8
|
tooltipWidth?: TooltipWidth;
|
|
9
|
-
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
childrenClassName?: string;
|
|
11
|
+
tooltipClassName?: string;
|
|
10
12
|
}
|
|
11
|
-
export declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold,
|
|
13
|
+
export declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -11,3 +11,23 @@ export declare function ChevronRightSmallIcon(): import("react/jsx-runtime").JSX
|
|
|
11
11
|
export declare function ArrowLeftIcon(): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare function ArrowRightUpCircleIcon(): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare function ArrowOutOfBoxIcon(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function ChevronGrabberVerticalIcon({ size, className, }: {
|
|
15
|
+
size?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function SquareArrowTopRight2Icon({ className, size, }: {
|
|
19
|
+
className?: string;
|
|
20
|
+
size?: string;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ArrowBottomTopIcon({ className, size, }: {
|
|
23
|
+
className?: string;
|
|
24
|
+
size?: string;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function ArrowWallDownIcon({ className, size, }: {
|
|
27
|
+
className?: string;
|
|
28
|
+
size?: string;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function ReorderIcon({ size, className, }: {
|
|
31
|
+
size?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function ClockIcon({ className, size, }: {
|
|
2
|
+
className?: string;
|
|
3
|
+
size?: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function ClockOutlineIcon({ className, size, }: {
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export declare function CoinsIcon(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export declare function CoinsAddIcon(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function Dollar({ className, size, }: {
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function CompassRound({ size, className, }: {
|
|
2
|
+
size?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function CircleX({ size, className, }: {
|
|
6
|
+
size?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function HelpIcon({ size, className, }: {
|
|
2
|
+
size?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function GasIcon({ size, className, }: {
|
|
6
|
+
size?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ReceiptBillIcon({ size, className, }: {
|
|
10
|
+
size?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function SnapIcon({ size, className, }: {
|
|
14
|
+
size?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SquidLogo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SwapStepSeparator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { BoostMode } from '../../types/components';
|
|
2
|
+
interface BoostProps {
|
|
3
|
+
boostMode: BoostMode;
|
|
4
|
+
onToggleBoostMode?: ({ boostMode }: {
|
|
5
|
+
boostMode: BoostMode;
|
|
6
|
+
}) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function Boost({ boostMode, onToggleBoostMode }: BoostProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DropdownMenuItemProps } from '../lists';
|
|
3
|
+
interface DropdownMenuProps {
|
|
4
|
+
dropdownRef?: React.RefObject<HTMLDivElement>;
|
|
5
|
+
items: DropdownMenuItemProps[];
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function DropdownMenu({ dropdownRef, items, className, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
type Rounded = 'sm' | 'lg';
|
|
2
3
|
interface MenuProps extends React.ComponentProps<'div'> {
|
|
3
|
-
|
|
4
|
+
containerClassName?: string;
|
|
4
5
|
contentClassName?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
displayControls?: boolean;
|
|
8
|
+
rounded?: Rounded;
|
|
5
9
|
}
|
|
6
|
-
export declare function Menu({ children,
|
|
10
|
+
export declare function Menu({ children, containerClassName, contentClassName, title, displayControls, rounded, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
export {};
|
|
@@ -2,6 +2,8 @@ interface NavigationBarProps {
|
|
|
2
2
|
title?: string;
|
|
3
3
|
displayBackButton?: boolean;
|
|
4
4
|
logoUrl?: string;
|
|
5
|
+
transparent?: boolean;
|
|
6
|
+
displayButtonShadows?: boolean;
|
|
5
7
|
}
|
|
6
|
-
export declare function NavigationBar({ title, displayBackButton, logoUrl, }: NavigationBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function NavigationBar({ title, displayBackButton, logoUrl, transparent, displayButtonShadows, }: NavigationBarProps): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface TokenPairProps {
|
|
2
|
+
firstToken: {
|
|
3
|
+
imageUrl: string;
|
|
4
|
+
bgColor: string;
|
|
5
|
+
};
|
|
6
|
+
secondToken: {
|
|
7
|
+
imageUrl: string;
|
|
8
|
+
bgColor: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare function TokenPair({ firstToken, secondToken }: TokenPairProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -5,4 +5,7 @@ export * from './Modal';
|
|
|
5
5
|
export * from './NavigationBar';
|
|
6
6
|
export * from './ProductCard';
|
|
7
7
|
export * from './SwapConfiguration';
|
|
8
|
+
export * from './SwapProgressViewHeader';
|
|
9
|
+
export * from './SwapStepsCollapsed';
|
|
10
|
+
export * from './TokenPair';
|
|
8
11
|
export * from './WalletAddress';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface DropdownMenuItemProps {
|
|
2
|
+
export interface DropdownMenuItemProps {
|
|
3
3
|
label: string;
|
|
4
|
+
labelClassName?: string;
|
|
4
5
|
imageUrl?: string;
|
|
5
6
|
icon?: React.ReactNode;
|
|
6
7
|
}
|
|
7
|
-
export declare function DropdownMenuItem({ label, imageUrl, icon, }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
8
|
+
export declare function DropdownMenuItem({ label, imageUrl, icon, labelClassName, }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SettingsItemProps {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
controls?: React.ReactNode;
|
|
6
|
+
transparentControls?: boolean;
|
|
7
|
+
showHelpIcon?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function SettingsItem({ icon, label, controls, transparentControls, showHelpIcon, }: SettingsItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SwapDetailListItemProps {
|
|
3
|
+
label: string;
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
detail?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function SwapDetailListItem({ label, detail, icon, }: SwapDetailListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SwapStepDescriptionBlock } from '../../types/components';
|
|
3
|
+
interface SwapStepItemProps {
|
|
4
|
+
descriptionBlocks: SwapStepDescriptionBlock[];
|
|
5
|
+
chipContent: React.ReactNode;
|
|
6
|
+
showStepSeparator?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function SwapStepItem({ descriptionBlocks, chipContent, showStepSeparator, }: SwapStepItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ProfileView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SwapDetailsView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { ThemeType } from '../types/components';
|
|
1
2
|
import { ConfigTheme } from '../types/config';
|
|
2
3
|
export type Theme = {
|
|
3
4
|
name: string;
|
|
4
5
|
themeImgPath: string;
|
|
5
6
|
websiteBackgroundColor: string;
|
|
6
7
|
theme: ConfigTheme;
|
|
8
|
+
type: ThemeType;
|
|
7
9
|
};
|
|
8
10
|
export declare const themes: Theme[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useModal';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useModal(props?: {
|
|
3
|
+
initialIsModalOpen?: boolean;
|
|
4
|
+
}): {
|
|
5
|
+
isModalOpen: boolean;
|
|
6
|
+
openModal: () => void;
|
|
7
|
+
closeModal: () => void;
|
|
8
|
+
modalRef: React.RefObject<HTMLDivElement>;
|
|
9
|
+
openModalButtonRef: React.RefObject<HTMLButtonElement>;
|
|
10
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConfigTheme } from '../types/config';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { ThemeType } from '../types/components';
|
|
4
|
+
export declare function SquidConfigProvider({ theme, children, themeType, }: {
|
|
5
|
+
theme: ConfigTheme;
|
|
5
6
|
children?: React.ReactNode;
|
|
7
|
+
themeType?: ThemeType;
|
|
6
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { AssetsButton } from '../../components/buttons/AssetsButton';
|
|
3
|
+
declare const meta: Meta<typeof AssetsButton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Empty: Story;
|
|
7
7
|
export declare const ChainOnly: Story;
|
|
8
8
|
export declare const ChainAndToken: Story;
|
|
9
|
+
export declare const LongTokenSymbol: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SettingsButton } from '../../components/buttons/SettingsButton';
|
|
3
|
+
declare const meta: Meta<typeof SettingsButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SettingsSlider } from '../../components/controls/SettingsSlider';
|
|
3
|
+
declare const meta: Meta<typeof SettingsSlider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Percentage: Story;
|
|
7
|
+
export declare const Amount: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { DropdownMenu } from '../../components/layout/DropdownMenu';
|
|
3
|
+
declare const meta: Meta<typeof DropdownMenu>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SwapStepsCollapsed } from '../../components/layout/SwapStepsCollapsed';
|
|
3
|
+
declare const meta: Meta<typeof SwapStepsCollapsed>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const FirstStep: Story;
|
|
7
|
+
export declare const MiddleStep: Story;
|
|
8
|
+
export declare const LastStep: Story;
|
|
9
|
+
export declare const LongerRoute: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SwapProgressViewHeader } from '../../components/layout/SwapProgressViewHeader';
|
|
3
|
+
declare const meta: Meta<typeof SwapProgressViewHeader>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SettingsItem } from '../../components/lists/SettingsItem';
|
|
3
|
+
declare const meta: Meta<typeof SettingsItem>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithControls: Story;
|
|
8
|
+
export declare const WithoutHelpIcon: Story;
|
|
9
|
+
export declare const TransparentControls: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SwapDetailListItem } from '../../components/lists/SwapDetailListItem';
|
|
3
|
+
declare const meta: Meta<typeof SwapDetailListItem>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithDetail: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SwapStepItem } from '../../components/lists/SwapStepItem';
|
|
3
|
+
declare const meta: Meta<typeof SwapStepItem>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const TextOnlyDescription: Story;
|
|
7
|
+
export declare const CustomDescription: Story;
|
|
8
|
+
export declare const ShowSeparator: Story;
|
|
9
|
+
export declare const LongDescription: Story;
|
|
10
|
+
export declare const LongDescriptionWithSeparator: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SwapDetailsView } from '../../components/views/SwapDetailsView';
|
|
3
|
+
declare const meta: Meta<typeof SwapDetailsView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export type TextSize = 'small' | 'medium' | 'large';
|
|
2
3
|
export type SwitchSize = 'small' | 'large';
|
|
3
4
|
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
4
5
|
export type ButtonSize = 'md' | 'lg';
|
|
5
6
|
export type SwapDirection = 'from' | 'to';
|
|
6
7
|
export type BoostMode = 'normal' | 'boost';
|
|
8
|
+
export type SwapStepDescriptionBlock = {
|
|
9
|
+
type: 'string' | 'image';
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
export type SwapStep = {
|
|
13
|
+
descriptionBlocks: SwapStepDescriptionBlock[];
|
|
14
|
+
chipContent: React.ReactNode;
|
|
15
|
+
routeStepOrder: number;
|
|
16
|
+
};
|
|
7
17
|
export declare enum DetailsToolbarState {
|
|
8
18
|
FULL = 0,
|
|
9
19
|
LOADING = 1,
|
|
10
20
|
EMPTY = 2,
|
|
11
21
|
ERROR = 3
|
|
12
22
|
}
|
|
23
|
+
export type ThemeType = 'light' | 'dark';
|