@rango-dev/ui 0.1.14-next.10 → 0.1.14-next.12
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/components/Alert/Alert.stories.d.ts +4 -4
- package/dist/components/BestRoute/BestRoute.stories.d.ts +5 -4
- package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +2 -3
- package/dist/components/Button/Button.stories.d.ts +5 -4
- package/dist/components/Checkbox/Checkbox.stories.d.ts +5 -4
- package/dist/components/Chip/Chip.stories.d.ts +2 -3
- package/dist/components/ColorPicker/ColorPicker.stories.d.ts +2 -3
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -3
- package/dist/components/Icon/Icons.stories.d.ts +2 -3
- package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +2 -3
- package/dist/components/Modal/Modal.stories.d.ts +2 -3
- package/dist/components/Radio/Radio.stories.d.ts +2 -3
- package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +4 -3
- package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +5 -4
- package/dist/components/Skeleton/Skeleton.stories.d.ts +2 -3
- package/dist/components/Spinner/Spinner.stories.d.ts +2 -3
- package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +2 -3
- package/dist/components/StepDetail/StepDetail.stories.d.ts +5 -4
- package/dist/components/SwapDetail/SwapDetail.stories.d.ts +5 -4
- package/dist/components/Switch/Switch.stories.d.ts +2 -3
- package/dist/components/TextField/TextField.stories.d.ts +1 -2
- package/dist/components/TokenList/TokenList.stories.d.ts +2 -3
- package/dist/components/Tooltip/Tooltip.stories.d.ts +5 -4
- package/dist/components/Typography/Typography.stories.d.ts +5 -4
- package/dist/components/Wallet/Wallet.stories.d.ts +4 -3
- package/dist/components/index.d.ts +0 -6
- package/dist/containers/BlockchainSelector/BlockchainSelector.stories.d.ts +5 -0
- package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +5 -4
- package/dist/containers/ConnectWalletsModal/ConnectWallets.stories.d.ts +5 -0
- package/dist/containers/History/History.stories.d.ts +7 -4
- package/dist/containers/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +5 -0
- package/dist/containers/Settings/Settings.stories.d.ts +5 -0
- package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +12 -4
- package/dist/{components → containers}/TokenSelector/TokenSelector.d.ts +1 -1
- package/dist/containers/TokenSelector/TokenSelector.stories.d.ts +5 -0
- package/dist/containers/index.d.ts +5 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +4 -4
- package/package.json +12 -7
- package/src/components/Alert/Alert.stories.tsx +19 -6
- package/src/components/Alert/Alert.tsx +3 -3
- package/src/components/BestRoute/BestRoute.stories.tsx +15 -5
- package/src/components/BestRoute/mock.ts +1 -1
- package/src/components/BlockchainsList/BlockchainsList.stories.tsx +9 -3
- package/src/components/BlockchainsList/mockData.ts +603 -108
- package/src/components/Button/Button.stories.tsx +8 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +6 -2
- package/src/components/Chip/Chip.stories.tsx +23 -7
- package/src/components/ColorPicker/ColorPicker.stories.tsx +6 -3
- package/src/components/Divider/Divider.tsx +113 -11
- package/src/components/Drawer/Drawer.stories.tsx +8 -11
- package/src/components/Icon/Icons.stories.tsx +8 -4
- package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +6 -3
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +3 -3
- package/src/components/Modal/Modal.stories.tsx +9 -10
- package/src/components/Radio/Radio.stories.tsx +12 -7
- package/src/components/SecondaryPage/SecondaryPage.stories.tsx +12 -3
- package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +2 -2
- package/src/components/Skeleton/Skeleton.stories.tsx +6 -2
- package/src/components/Spinner/Spinner.stories.tsx +6 -2
- package/src/components/StatusDrawer/StatusDrawer.stories.tsx +7 -2
- package/src/components/StatusDrawer/StatusDrawer.tsx +2 -2
- package/src/components/StepDetail/StepDetail.stories.tsx +9 -2
- package/src/components/SwapDetail/SwapDetail.stories.tsx +5 -2
- package/src/components/SwapDetail/SwapDetail.tsx +3 -3
- package/src/components/SwapDetail/Token.tsx +4 -4
- package/src/components/Switch/Switch.stories.tsx +2 -2
- package/src/components/TextField/TextField.stories.tsx +3 -2
- package/src/components/TokenList/TokenList.stories.tsx +3 -3
- package/src/components/Tooltip/Tooltip.stories.tsx +7 -2
- package/src/components/Typography/Typography.stories.tsx +2 -2
- package/src/components/Wallet/Wallet.stories.tsx +7 -13
- package/src/components/index.ts +0 -6
- package/src/containers/BlockchainSelector/BlockchainSelector.stories.tsx +41 -0
- package/src/{components → containers}/BlockchainSelector/BlockchainSelector.tsx +5 -5
- package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +223 -10
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +21 -12
- package/src/containers/ConnectWalletsModal/ConnectWallets.stories.tsx +24 -0
- package/src/{components → containers}/ConnectWalletsModal/ConnectWalletsModal.tsx +3 -3
- package/src/containers/History/History.stories.tsx +2 -2
- package/src/containers/History/History.tsx +1 -1
- package/src/containers/History/mock.ts +3 -3
- package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +7 -4
- package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +2 -3
- package/src/containers/Settings/Settings.stories.tsx +27 -0
- package/src/{components → containers}/Settings/Settings.tsx +11 -8
- package/src/containers/SwapHistory/SwapHistory.stories.tsx +3 -3
- package/src/containers/SwapHistory/SwapHistory.tsx +4 -5
- package/src/containers/SwapHistory/mock.ts +2 -2
- package/src/{components → containers}/TokenSelector/TokenSelector.stories.tsx +7 -8
- package/src/{components → containers}/TokenSelector/TokenSelector.tsx +7 -6
- package/src/containers/index.ts +5 -0
- package/dist/components/BlockchainSelector/BlockchainSelector.stories.d.ts +0 -6
- package/dist/components/ConnectWalletsModal/ConnectWallets.stories.d.ts +0 -6
- package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +0 -6
- package/dist/components/Settings/Settings.stories.d.ts +0 -6
- package/dist/components/Spacer/Spacer.d.ts +0 -6
- package/dist/components/Spacer/Spacer.stories.d.ts +0 -6
- package/dist/components/Spacer/index.d.ts +0 -1
- package/dist/components/SwapContainer/SwapContainer.stories.d.ts +0 -6
- package/dist/components/TokenSelector/TokenSelector.stories.d.ts +0 -6
- package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +0 -25
- package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +0 -13
- package/src/components/Settings/Settings.stories.tsx +0 -34
- package/src/components/Spacer/Spacer.stories.tsx +0 -31
- package/src/components/Spacer/Spacer.tsx +0 -128
- package/src/components/Spacer/index.ts +0 -1
- package/src/components/SwapContainer/SwapContainer.stories.tsx +0 -13
- /package/dist/{components → containers}/BlockchainSelector/BlockchainSelector.d.ts +0 -0
- /package/dist/{components → containers}/BlockchainSelector/index.d.ts +0 -0
- /package/dist/{components → containers}/ConnectWalletsModal/ConnectWalletsModal.d.ts +0 -0
- /package/dist/{components → containers}/ConnectWalletsModal/index.d.ts +0 -0
- /package/dist/{components → containers}/ConnectWalletsModal/mockData.d.ts +0 -0
- /package/dist/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +0 -0
- /package/dist/{components → containers}/LiquiditySourcesSelector/index.d.ts +0 -0
- /package/dist/{components → containers}/Settings/Settings.d.ts +0 -0
- /package/dist/{components → containers}/Settings/index.d.ts +0 -0
- /package/dist/{components → containers}/TokenSelector/index.d.ts +0 -0
- /package/src/{components → containers}/BlockchainSelector/index.ts +0 -0
- /package/src/{components → containers}/ConnectWalletsModal/index.ts +0 -0
- /package/src/{components → containers}/ConnectWalletsModal/mockData.ts +0 -0
- /package/src/{components → containers}/LiquiditySourcesSelector/index.ts +0 -0
- /package/src/{components → containers}/Settings/index.ts +0 -0
- /package/src/{components → containers}/TokenSelector/index.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/ui",
|
|
3
|
-
"version": "0.1.14-next.
|
|
3
|
+
"version": "0.1.14-next.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"bundle": "esbuild src/index.ts --bundle --minify --keep-names --sourcemap --outdir=dist --platform=node --format=esm --packages=external",
|
|
14
14
|
"build": "yarn type-checking && yarn bundle",
|
|
15
15
|
"type-checking": "tsc --declaration --emitDeclarationOnly",
|
|
16
|
-
"storybook": "
|
|
17
|
-
"build-storybook": "build
|
|
16
|
+
"storybook": "storybook dev -p 3000",
|
|
17
|
+
"build-storybook": "storybook build"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@rango-dev/queue-manager-rango-preset": "*",
|
|
@@ -22,12 +22,16 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/core": "^7.20.2",
|
|
25
|
+
"@babel/preset-env": "^7.21.4",
|
|
26
|
+
"@babel/preset-react": "^7.18.6",
|
|
27
|
+
"@babel/preset-typescript": "^7.21.4",
|
|
25
28
|
"@size-limit/preset-small-lib": "^8.1.0",
|
|
26
|
-
"@storybook/addon-essentials": "^
|
|
29
|
+
"@storybook/addon-essentials": "^7.0.9",
|
|
27
30
|
"@storybook/addon-info": "^5.3.21",
|
|
28
|
-
"@storybook/addon-links": "^
|
|
29
|
-
"@storybook/addons": "^
|
|
30
|
-
"@storybook/react": "^
|
|
31
|
+
"@storybook/addon-links": "^7.0.9",
|
|
32
|
+
"@storybook/addons": "^7.0.9",
|
|
33
|
+
"@storybook/react": "^7.0.9",
|
|
34
|
+
"@storybook/react-webpack5": "^7.0.9",
|
|
31
35
|
"@types/react": "^18.0.25",
|
|
32
36
|
"@types/react-dom": "^18.0.8",
|
|
33
37
|
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
|
@@ -39,6 +43,7 @@
|
|
|
39
43
|
"react-dom": "^18.2.0",
|
|
40
44
|
"react-is": "^18.2.0",
|
|
41
45
|
"size-limit": "^8.1.0",
|
|
46
|
+
"storybook": "^7.0.9",
|
|
42
47
|
"tsdx": "^0.14.1",
|
|
43
48
|
"tslib": "^2.4.1",
|
|
44
49
|
"typescript": "^4.8.4"
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
3
2
|
import { Alert } from '.';
|
|
4
3
|
import { PropTypes } from './Alert';
|
|
4
|
+
import { Meta } from '@storybook/react';
|
|
5
|
+
import { Typography } from '../Typography';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
title: 'Alert',
|
|
8
|
+
title: 'Components/Alert',
|
|
8
9
|
component: Alert,
|
|
10
|
+
args: {
|
|
11
|
+
type: 'success',
|
|
12
|
+
title: 'Alert Title',
|
|
13
|
+
footer: <Typography variant='body1'>It's a Alert!</Typography>
|
|
14
|
+
},
|
|
9
15
|
argTypes: {
|
|
10
16
|
type: {
|
|
17
|
+
name: 'type',
|
|
11
18
|
defaultValue: 'success',
|
|
19
|
+
control: {
|
|
20
|
+
type: 'select',
|
|
21
|
+
options: ['primary', 'secondary', 'success', 'warning', 'error'],
|
|
22
|
+
},
|
|
12
23
|
},
|
|
24
|
+
|
|
13
25
|
title: {
|
|
26
|
+
name: 'title',
|
|
14
27
|
defaultValue: 'Alert Title',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
control: {
|
|
29
|
+
type: 'text',
|
|
30
|
+
},
|
|
18
31
|
},
|
|
19
32
|
},
|
|
20
|
-
} as
|
|
33
|
+
} as Meta<typeof Alert>;
|
|
21
34
|
|
|
22
35
|
export const Main = (args: PropTypes) => <Alert {...args} />;
|
|
@@ -2,7 +2,7 @@ import React, { PropsWithChildren, ReactNode } from 'react';
|
|
|
2
2
|
import { CheckCircleIcon, InfoCircleIcon, WarningIcon } from '../Icon';
|
|
3
3
|
import { Typography } from '../Typography';
|
|
4
4
|
import { styled } from '../../theme';
|
|
5
|
-
import {
|
|
5
|
+
import { Divider } from '../Divider';
|
|
6
6
|
|
|
7
7
|
const MainContainer = styled('div', {
|
|
8
8
|
width: '100%',
|
|
@@ -72,7 +72,7 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
|
72
72
|
{type === 'success' && <CheckCircleIcon color={type} size={24} />}
|
|
73
73
|
{type === 'warning' && <WarningIcon color={type} size={24} />}
|
|
74
74
|
{type === 'error' && <InfoCircleIcon color={type} size={24} />}
|
|
75
|
-
<
|
|
75
|
+
<Divider size={4} direction='horizontal' />
|
|
76
76
|
</div>
|
|
77
77
|
</>
|
|
78
78
|
)}
|
|
@@ -90,7 +90,7 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
|
90
90
|
<Typography className="title" variant="title" color={type}>
|
|
91
91
|
{title}
|
|
92
92
|
</Typography>
|
|
93
|
-
{!!children && <
|
|
93
|
+
{!!children && <Divider size={4} />}
|
|
94
94
|
</>
|
|
95
95
|
)}
|
|
96
96
|
{children}
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
3
2
|
import { BestRoute, PropTypes } from './BestRoute';
|
|
4
3
|
import { bestRoute, bestRouteExample2, bestRouteExample3 } from './mock';
|
|
4
|
+
import { Meta } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Components/Best Route',
|
|
8
8
|
component: BestRoute,
|
|
9
|
-
} as
|
|
9
|
+
} as Meta<typeof BestRoute>;
|
|
10
10
|
|
|
11
11
|
export const Main = (props: PropTypes) => (
|
|
12
12
|
<div style={{ maxWidth: 512 }}>
|
|
13
|
-
<BestRoute {...props} data={bestRoute} />
|
|
13
|
+
<BestRoute {...props} data={bestRoute} totalFee="0.28" totalTime="10:45" />
|
|
14
14
|
</div>
|
|
15
15
|
);
|
|
16
16
|
export const With4Step = (props: PropTypes) => (
|
|
17
17
|
<div style={{ maxWidth: 512 }}>
|
|
18
|
-
<BestRoute
|
|
18
|
+
<BestRoute
|
|
19
|
+
{...props}
|
|
20
|
+
data={bestRouteExample2}
|
|
21
|
+
totalFee="0.28"
|
|
22
|
+
totalTime="10:45"
|
|
23
|
+
/>
|
|
19
24
|
</div>
|
|
20
25
|
);
|
|
21
26
|
|
|
22
27
|
export const With2Step = (props: PropTypes) => (
|
|
23
28
|
<div style={{ maxWidth: 512 }}>
|
|
24
|
-
<BestRoute
|
|
29
|
+
<BestRoute
|
|
30
|
+
{...props}
|
|
31
|
+
data={bestRouteExample3}
|
|
32
|
+
totalFee="0.28"
|
|
33
|
+
totalTime="10:45"
|
|
34
|
+
/>
|
|
25
35
|
</div>
|
|
26
36
|
);
|
|
27
37
|
export const WithError = (props: PropTypes) => (
|
|
@@ -174,7 +174,7 @@ export const bestRouteExample2: BestRouteType = {
|
|
|
174
174
|
warnings: [],
|
|
175
175
|
swapperId: 'ParaSwap Bsc',
|
|
176
176
|
swapperType: 'DEX',
|
|
177
|
-
swapperLogo: 'https://api.rango.exchange/swappers/
|
|
177
|
+
swapperLogo: 'https://api.rango.exchange/swappers/paraswap.svg',
|
|
178
178
|
|
|
179
179
|
from: {
|
|
180
180
|
symbol: 'USDC',
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
3
|
import { BlockchainsList, PropTypes } from './BlockchainsList';
|
|
4
4
|
import { blockchainMeta } from './mockData';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Blockchains List',
|
|
7
|
+
title: 'Components/Blockchains List',
|
|
8
8
|
component: BlockchainsList,
|
|
9
|
+
args: {
|
|
10
|
+
searchedText: '',
|
|
11
|
+
},
|
|
9
12
|
argTypes: {
|
|
10
13
|
searchedText: {
|
|
11
14
|
type: 'string',
|
|
12
15
|
defaultValue: '',
|
|
16
|
+
control: {
|
|
17
|
+
type: 'text',
|
|
18
|
+
},
|
|
13
19
|
},
|
|
14
20
|
},
|
|
15
|
-
} as
|
|
21
|
+
} as Meta<typeof BlockchainsList>;
|
|
16
22
|
|
|
17
23
|
export const Main = (args: PropTypes) => {
|
|
18
24
|
return (
|