@rango-dev/widget-embedded 0.20.1-next.9 → 0.21.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/QueueManager.d.ts.map +1 -1
- package/dist/components/AppRouter.d.ts.map +1 -1
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/BlockchainList/BlockchainList.styles.d.ts +169 -1
- package/dist/components/BlockchainList/BlockchainList.styles.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +4 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +514 -1089
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts +12 -0
- package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts.map +1 -1
- package/dist/components/CustomCollapsible/CustomCollapsible.d.ts +5 -0
- package/dist/components/CustomCollapsible/CustomCollapsible.d.ts.map +1 -0
- package/dist/components/CustomCollapsible/CustomCollapsible.styles.d.ts +654 -0
- package/dist/components/CustomCollapsible/CustomCollapsible.styles.d.ts.map +1 -0
- package/dist/components/CustomCollapsible/CustomCollapsible.types.d.ts +10 -0
- package/dist/components/CustomCollapsible/CustomCollapsible.types.d.ts.map +1 -0
- package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts +20 -0
- package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts.map +1 -1
- package/dist/components/HeaderButtons/HeaderButtons.types.d.ts +0 -1
- package/dist/components/HeaderButtons/HeaderButtons.types.d.ts.map +1 -1
- package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
- package/dist/components/Layout/Layout.d.ts +2 -3
- package/dist/components/Layout/Layout.d.ts.map +1 -1
- package/dist/components/Layout/Layout.helpers.d.ts +2 -0
- package/dist/components/Layout/Layout.helpers.d.ts.map +1 -0
- package/dist/components/Layout/Layout.styles.d.ts +14 -4
- package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
- package/dist/components/Layout/Layout.types.d.ts +6 -3
- package/dist/components/Layout/Layout.types.d.ts.map +1 -1
- package/dist/components/Layout/PageContainer.d.ts +166 -0
- package/dist/components/Layout/PageContainer.d.ts.map +1 -0
- package/dist/components/Layout/ScrollableArea.d.ts +164 -0
- package/dist/components/Layout/ScrollableArea.d.ts.map +1 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts +4 -0
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +56 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
- package/dist/components/NoResult/NoResult.styles.d.ts +12 -0
- package/dist/components/NoResult/NoResult.styles.d.ts.map +1 -1
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
- package/dist/components/NotificationContent/NotificationContent.styles.d.ts +16 -0
- package/dist/components/NotificationContent/NotificationContent.styles.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/Quote.styles.d.ts +387 -3
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
- package/dist/components/Quote/Quote.types.d.ts +19 -0
- package/dist/components/Quote/Quote.types.d.ts.map +1 -1
- package/dist/components/Quote/QuoteCostDetails.d.ts +4 -0
- package/dist/components/Quote/QuoteCostDetails.d.ts.map +1 -0
- package/dist/components/Quote/QuoteCostDetails.styles.d.ts +806 -0
- package/dist/components/Quote/QuoteCostDetails.styles.d.ts.map +1 -0
- package/dist/components/Quote/QuoteSummary.styles.d.ts +8 -0
- package/dist/components/Quote/QuoteSummary.styles.d.ts.map +1 -1
- package/dist/components/Quote/QuoteTrigger .d.ts +4 -0
- package/dist/components/Quote/QuoteTrigger .d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.styles.d.ts +16 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.styles.d.ts.map +1 -1
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts +40 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts.map +1 -1
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts +20 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts +1 -0
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts +16 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts +1 -0
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts +1 -0
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.styles.d.ts +4 -0
- package/dist/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
- package/dist/components/SettingsContainer/SettingsContainer.style.d.ts +11 -156
- package/dist/components/SettingsContainer/SettingsContainer.style.d.ts.map +1 -1
- package/dist/components/SettingsContainer/index.d.ts +1 -1
- package/dist/components/SettingsContainer/index.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.styles.d.ts +20 -0
- package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +1 -1
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts +523 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts +4 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts +2 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +2 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +20 -0
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +68 -0
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/components/WalletModal/WalletModalContent.styles.d.ts +16 -0
- package/dist/components/WalletModal/WalletModalContent.styles.d.ts.map +1 -1
- package/dist/components/WidgetEvents.d.ts.map +1 -1
- package/dist/components/common/ActivateTabAlert/ActivateTabAlert.d.ts +4 -0
- package/dist/components/common/ActivateTabAlert/ActivateTabAlert.d.ts.map +1 -0
- package/dist/components/common/ActivateTabAlert/ActivateTabAlert.types.d.ts +4 -0
- package/dist/components/common/ActivateTabAlert/ActivateTabAlert.types.d.ts.map +1 -0
- package/dist/components/common/ActivateTabAlert/index.d.ts +2 -0
- package/dist/components/common/ActivateTabAlert/index.d.ts.map +1 -0
- package/dist/components/common/ActivateTabModal/ActivateTabModal.d.ts +4 -0
- package/dist/components/common/ActivateTabModal/ActivateTabModal.d.ts.map +1 -0
- package/dist/components/common/ActivateTabModal/ActivateTabModal.types.d.ts +6 -0
- package/dist/components/common/ActivateTabModal/ActivateTabModal.types.d.ts.map +1 -0
- package/dist/components/common/ActivateTabModal/index.d.ts +2 -0
- package/dist/components/common/ActivateTabModal/index.d.ts.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/quote.d.ts +12 -0
- package/dist/constants/quote.d.ts.map +1 -0
- package/dist/constants/searchParams.d.ts +6 -6
- package/dist/constants/searchParams.d.ts.map +1 -1
- package/dist/containers/App/App.d.ts.map +1 -1
- package/dist/containers/App/App.styles.d.ts +4 -0
- package/dist/containers/App/App.styles.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +10 -314
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +0 -7
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
- package/dist/containers/Widget/Widget.d.ts.map +1 -1
- package/dist/containers/WidgetInfo/WidgetInfo.d.ts.map +1 -1
- package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts +7 -0
- package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts.map +1 -1
- package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -1
- package/dist/hooks/useLanguage.d.ts +2 -1
- package/dist/hooks/useLanguage.d.ts.map +1 -1
- package/dist/hooks/useSwapInput.d.ts.map +1 -1
- package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -1
- package/dist/hooks/useSyncUrlAndStore/index.d.ts +2 -0
- package/dist/hooks/useSyncUrlAndStore/index.d.ts.map +1 -0
- package/dist/hooks/useSyncUrlAndStore/useSyncUrlAndStore.d.ts +2 -0
- package/dist/hooks/useSyncUrlAndStore/useSyncUrlAndStore.d.ts.map +1 -0
- package/dist/hooks/useSyncUrlAndStore/useSyncUrlAndStore.helpers.d.ts +4 -0
- package/dist/hooks/useSyncUrlAndStore/useSyncUrlAndStore.helpers.d.ts.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +4 -4
- package/dist/libs/tabManager/index.d.ts +3 -0
- package/dist/libs/tabManager/index.d.ts.map +1 -0
- package/dist/libs/tabManager/tabManager.constants.d.ts +4 -0
- package/dist/libs/tabManager/tabManager.constants.d.ts.map +1 -0
- package/dist/libs/tabManager/tabManager.d.ts +63 -0
- package/dist/libs/tabManager/tabManager.d.ts.map +1 -0
- package/dist/libs/tabManager/tabManager.types.d.ts +29 -0
- package/dist/libs/tabManager/tabManager.types.d.ts.map +1 -0
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/HistoryPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/LanguagePage.d.ts.map +1 -1
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
- package/dist/pages/ThemePage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/store/AppStore.d.ts +2 -2
- package/dist/store/app.d.ts +2 -2
- package/dist/store/slices/settings.d.ts +2 -2
- package/dist/store/slices/settings.d.ts.map +1 -1
- package/dist/store/ui.d.ts +12 -10
- package/dist/store/ui.d.ts.map +1 -1
- package/dist/types/notification.d.ts +1 -2
- package/dist/types/notification.d.ts.map +1 -1
- package/dist/utils/quote.d.ts +5 -2
- package/dist/utils/quote.d.ts.map +1 -1
- package/dist/utils/swap.d.ts +5 -1
- package/dist/utils/swap.d.ts.map +1 -1
- package/dist/utils/ui.d.ts +2 -0
- package/dist/utils/ui.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/QueueManager.tsx +4 -1
- package/src/components/AppRouter.tsx +1 -8
- package/src/components/AppRoutes.tsx +11 -0
- package/src/components/BlockchainList/BlockchainList.styles.ts +4 -3
- package/src/components/BlockchainList/BlockchainList.tsx +1 -1
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +27 -96
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +24 -39
- package/src/components/ConfirmWalletsModal/WalletList.tsx +3 -0
- package/src/components/CustomCollapsible/CustomCollapsible.styles.ts +75 -0
- package/src/components/CustomCollapsible/CustomCollapsible.tsx +55 -0
- package/src/components/CustomCollapsible/CustomCollapsible.types.ts +10 -0
- package/src/components/HeaderButtons/HeaderButtons.types.ts +0 -1
- package/src/components/HeaderButtons/HomeButtons.tsx +1 -2
- package/src/components/Layout/Layout.helpers.ts +16 -0
- package/src/components/Layout/Layout.styles.ts +17 -31
- package/src/components/Layout/Layout.tsx +60 -29
- package/src/components/Layout/Layout.types.ts +9 -8
- package/src/components/Layout/PageContainer.tsx +24 -0
- package/src/components/Layout/ScrollableArea.tsx +11 -0
- package/src/components/Layout/index.ts +2 -0
- package/src/components/NotificationContent/NotificationContent.tsx +10 -4
- package/src/components/Quote/Quote.styles.ts +44 -5
- package/src/components/Quote/Quote.tsx +10 -77
- package/src/components/Quote/Quote.types.ts +22 -0
- package/src/components/Quote/QuoteCostDetails.styles.ts +50 -0
- package/src/components/Quote/QuoteCostDetails.tsx +218 -0
- package/src/components/Quote/QuoteTrigger .tsx +215 -0
- package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +3 -1
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +0 -1
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +3 -1
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
- package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +3 -1
- package/src/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.tsx +3 -1
- package/src/components/SettingsContainer/SettingsContainer.style.ts +0 -5
- package/src/components/SettingsContainer/index.ts +0 -1
- package/src/components/Slippage/Slippage.tsx +5 -5
- package/src/components/Slippage/SlippageTooltipContent.tsx +1 -1
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +12 -13
- package/src/components/SwapDetails/SwapDetails.helpers.tsx +43 -3
- package/src/components/SwapDetails/SwapDetails.styles.ts +18 -6
- package/src/components/SwapDetails/SwapDetails.tsx +16 -5
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.tsx +13 -7
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.types.ts +2 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +9 -1
- package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +10 -2
- package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +2 -0
- package/src/components/SwapsGroup/SwapsGroup.tsx +13 -2
- package/src/components/TokenList/TokenList.styles.ts +2 -0
- package/src/components/TokenList/TokenList.tsx +1 -1
- package/src/components/WidgetEvents.tsx +2 -14
- package/src/components/common/ActivateTabAlert/ActivateTabAlert.tsx +26 -0
- package/src/components/common/ActivateTabAlert/ActivateTabAlert.types.ts +3 -0
- package/src/components/common/ActivateTabAlert/index.ts +1 -0
- package/src/components/common/ActivateTabModal/ActivateTabModal.tsx +31 -0
- package/src/components/common/ActivateTabModal/ActivateTabModal.types.ts +5 -0
- package/src/components/common/ActivateTabModal/index.ts +1 -0
- package/src/constants/index.ts +1 -0
- package/src/constants/quote.ts +23 -0
- package/src/constants/searchParams.ts +6 -6
- package/src/containers/App/App.styles.ts +2 -0
- package/src/containers/App/App.tsx +1 -4
- package/src/containers/QuoteInfo/QuoteInfo.styles.ts +0 -15
- package/src/containers/QuoteInfo/QuoteInfo.tsx +30 -77
- package/src/containers/QuoteInfo/QuoteInfo.types.ts +0 -7
- package/src/containers/Wallets/Wallets.tsx +3 -3
- package/src/containers/Widget/Widget.tsx +6 -1
- package/src/containers/WidgetInfo/WidgetInfo.tsx +13 -1
- package/src/containers/WidgetInfo/WidgetInfo.types.ts +7 -0
- package/src/containers/WidgetProvider/WidgetProvider.tsx +2 -1
- package/src/hooks/useLanguage.ts +6 -4
- package/src/hooks/useSwapInput.ts +6 -1
- package/src/hooks/useSyncStoresWithConfig.ts +3 -17
- package/src/hooks/useSyncUrlAndStore/index.ts +1 -0
- package/src/hooks/useSyncUrlAndStore/useSyncUrlAndStore.helpers.ts +35 -0
- package/src/hooks/useSyncUrlAndStore/useSyncUrlAndStore.ts +135 -0
- package/src/index.ts +2 -2
- package/src/libs/tabManager/index.ts +2 -0
- package/src/libs/tabManager/tabManager.constants.ts +3 -0
- package/src/libs/tabManager/tabManager.ts +222 -0
- package/src/libs/tabManager/tabManager.types.ts +28 -0
- package/src/pages/ConfirmSwapPage.tsx +55 -47
- package/src/pages/HistoryPage.tsx +5 -17
- package/src/pages/Home.tsx +47 -43
- package/src/pages/LanguagePage.tsx +3 -4
- package/src/pages/LiquiditySourcePage.tsx +3 -4
- package/src/pages/SelectBlockchainPage.tsx +38 -38
- package/src/pages/SelectSwapItemsPage.tsx +40 -38
- package/src/pages/SettingsPage.tsx +3 -4
- package/src/pages/SwapDetailsPage.tsx +21 -7
- package/src/pages/ThemePage.tsx +3 -4
- package/src/pages/WalletsPage.tsx +15 -13
- package/src/store/slices/settings.ts +3 -3
- package/src/store/ui.ts +39 -11
- package/src/types/notification.ts +0 -7
- package/src/utils/quote.ts +18 -28
- package/src/utils/swap.ts +35 -0
- package/src/utils/ui.ts +20 -0
- package/dist/components/UpdateUrl.d.ts +0 -2
- package/dist/components/UpdateUrl.d.ts.map +0 -1
- package/src/components/UpdateUrl.tsx +0 -158
|
@@ -1,34 +1,12 @@
|
|
|
1
|
-
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
1
|
import {
|
|
3
2
|
Button,
|
|
4
3
|
css,
|
|
5
4
|
darkTheme,
|
|
6
5
|
IconButton,
|
|
7
|
-
keyframes,
|
|
8
6
|
styled,
|
|
9
7
|
TextField,
|
|
10
8
|
} from '@rango-dev/ui';
|
|
11
9
|
|
|
12
|
-
export const EXPANDABLE_TRANSITION_DURATION = 300;
|
|
13
|
-
|
|
14
|
-
const slideDown = keyframes({
|
|
15
|
-
from: {
|
|
16
|
-
height: 0,
|
|
17
|
-
},
|
|
18
|
-
to: {
|
|
19
|
-
height: 'var(--radix-collapsible-content-height)',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const slideUp = keyframes({
|
|
24
|
-
from: {
|
|
25
|
-
height: 'var(--radix-collapsible-content-height)',
|
|
26
|
-
},
|
|
27
|
-
to: {
|
|
28
|
-
height: 0,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
|
|
32
10
|
export const Title = styled('div', {
|
|
33
11
|
display: 'flex',
|
|
34
12
|
flexDirection: 'column',
|
|
@@ -93,16 +71,6 @@ export const ShowMoreWallets = styled(WalletButton, {
|
|
|
93
71
|
alignSelf: 'stretch',
|
|
94
72
|
minHeight: '93px',
|
|
95
73
|
});
|
|
96
|
-
|
|
97
|
-
export const Trigger = styled(Collapsible.Trigger, {
|
|
98
|
-
padding: '$0',
|
|
99
|
-
border: 'none',
|
|
100
|
-
outline: 'none',
|
|
101
|
-
width: '100%',
|
|
102
|
-
backgroundColor: 'transparent',
|
|
103
|
-
fontFamily: 'inherit',
|
|
104
|
-
});
|
|
105
|
-
|
|
106
74
|
export const ShowMoreHeader = styled('div', {
|
|
107
75
|
padding: '$20',
|
|
108
76
|
display: 'flex',
|
|
@@ -132,20 +100,36 @@ export const walletsListStyles = css({
|
|
|
132
100
|
height: '100%',
|
|
133
101
|
});
|
|
134
102
|
|
|
135
|
-
export const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
true: {
|
|
141
|
-
outlineWidth: 1,
|
|
142
|
-
outlineColor: '$secondary500',
|
|
143
|
-
outlineStyle: 'solid',
|
|
144
|
-
},
|
|
145
|
-
},
|
|
103
|
+
export const CustomDestination = styled('div', {
|
|
104
|
+
padding: '$10 $0',
|
|
105
|
+
'& .button__content': {
|
|
106
|
+
display: 'flex',
|
|
107
|
+
alignItems: 'center',
|
|
146
108
|
},
|
|
109
|
+
'& .alarms': { paddingTop: '$5' },
|
|
110
|
+
'& .collapsible_content': {
|
|
111
|
+
backgroundColor: '$neutral100',
|
|
112
|
+
},
|
|
113
|
+
'& .collapsible_root': {
|
|
114
|
+
backgroundColor: '$neutral200',
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export const alarmsStyles = css({
|
|
119
|
+
paddingTop: '$5',
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export const ConfirmButton = styled('div', {
|
|
123
|
+
display: 'flex',
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export const StyledTextField = styled(TextField, {
|
|
127
|
+
backgroundColor: '$neutral100',
|
|
128
|
+
padding: '$0 $15 $15 $15',
|
|
147
129
|
});
|
|
148
130
|
|
|
131
|
+
export const Wallets = styled('div', { overflow: 'visible', width: '100%' });
|
|
132
|
+
|
|
149
133
|
export const CustomDestinationButton = styled(Button, {
|
|
150
134
|
width: '100%',
|
|
151
135
|
borderRadius: '$sm !important',
|
|
@@ -174,56 +158,3 @@ export const CustomDestinationButton = styled(Button, {
|
|
|
174
158
|
outline: 0,
|
|
175
159
|
},
|
|
176
160
|
});
|
|
177
|
-
|
|
178
|
-
export const CustomDestination = styled('div', {
|
|
179
|
-
padding: '$10 $0',
|
|
180
|
-
'& .button__content': {
|
|
181
|
-
display: 'flex',
|
|
182
|
-
alignItems: 'center',
|
|
183
|
-
},
|
|
184
|
-
'& .alarms': { paddingTop: '5px' },
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
export const alarmsStyles = css({
|
|
188
|
-
paddingTop: '5px',
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
export const ExpandedIcon = styled('div', {
|
|
192
|
-
transition: `all ${EXPANDABLE_TRANSITION_DURATION}ms ease`,
|
|
193
|
-
variants: {
|
|
194
|
-
orientation: {
|
|
195
|
-
down: {
|
|
196
|
-
transform: 'rotate(0)',
|
|
197
|
-
},
|
|
198
|
-
up: {
|
|
199
|
-
transform: 'rotate(180deg)',
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
export const ConfirmButton = styled('div', {
|
|
206
|
-
display: 'flex',
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
export const StyledTextField = styled(TextField, {
|
|
210
|
-
backgroundColor: '$neutral100',
|
|
211
|
-
padding: '$0 $15 $15 $15',
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
export const CollapsibleContent = styled(Collapsible.Content, {
|
|
215
|
-
backgroundColor: '$neutral100',
|
|
216
|
-
overflow: 'hidden',
|
|
217
|
-
variants: {
|
|
218
|
-
open: {
|
|
219
|
-
true: {
|
|
220
|
-
animation: `${slideDown} ${EXPANDABLE_TRANSITION_DURATION}ms ease-out`,
|
|
221
|
-
},
|
|
222
|
-
false: {
|
|
223
|
-
animation: `${slideUp} ${EXPANDABLE_TRANSITION_DURATION}ms ease-out`,
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
export const Wallets = styled('div', { overflow: 'visible', width: '100%' });
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
Typography,
|
|
16
16
|
WalletIcon,
|
|
17
17
|
} from '@rango-dev/ui';
|
|
18
|
-
import React, { useEffect,
|
|
18
|
+
import React, { useEffect, useState } from 'react';
|
|
19
19
|
import { useNavigate } from 'react-router-dom';
|
|
20
20
|
|
|
21
21
|
import { RANGO_SWAP_BOX_ID } from '../../constants';
|
|
@@ -26,23 +26,20 @@ import { useQuoteStore } from '../../store/quote';
|
|
|
26
26
|
import { useWalletsStore } from '../../store/wallets';
|
|
27
27
|
import { getBlockchainShortNameFor } from '../../utils/meta';
|
|
28
28
|
import { confirmSwapDisabled } from '../../utils/swap';
|
|
29
|
+
import { CustomCollapsible } from '../CustomCollapsible/CustomCollapsible';
|
|
30
|
+
import { ExpandedIcon } from '../CustomCollapsible/CustomCollapsible.styles';
|
|
29
31
|
|
|
30
32
|
import { getRequiredWallets, isValidAddress } from './ConfirmWallets.helpers';
|
|
31
33
|
import {
|
|
32
34
|
alarmsStyles,
|
|
33
|
-
CollapsibleContent,
|
|
34
|
-
CollapsibleRoot,
|
|
35
35
|
ConfirmButton,
|
|
36
36
|
CustomDestination,
|
|
37
37
|
CustomDestinationButton,
|
|
38
|
-
EXPANDABLE_TRANSITION_DURATION,
|
|
39
|
-
ExpandedIcon,
|
|
40
38
|
ListContainer,
|
|
41
39
|
NavigateBack,
|
|
42
40
|
ShowMoreHeader,
|
|
43
41
|
StyledTextField,
|
|
44
42
|
Title,
|
|
45
|
-
Trigger,
|
|
46
43
|
Wallets,
|
|
47
44
|
WalletsContainer,
|
|
48
45
|
walletsListStyles,
|
|
@@ -76,7 +73,6 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
76
73
|
const [showCustomDestination, setShowCustomDestination] = useState(
|
|
77
74
|
!!customDestination
|
|
78
75
|
);
|
|
79
|
-
const customDestinationRef = useRef<HTMLDivElement | null>(null);
|
|
80
76
|
|
|
81
77
|
const requiredWallets = getRequiredWallets(quote);
|
|
82
78
|
|
|
@@ -231,14 +227,6 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
231
227
|
);
|
|
232
228
|
}, [connectedWallets.length]);
|
|
233
229
|
|
|
234
|
-
useLayoutEffect(() => {
|
|
235
|
-
if (showCustomDestination && customDestinationRef.current) {
|
|
236
|
-
setTimeout(() => {
|
|
237
|
-
customDestinationRef?.current?.scrollIntoView({ behavior: 'smooth' });
|
|
238
|
-
}, EXPANDABLE_TRANSITION_DURATION);
|
|
239
|
-
}
|
|
240
|
-
}, [showCustomDestination]);
|
|
241
|
-
|
|
242
230
|
const modalContainer = document.getElementById(
|
|
243
231
|
RANGO_SWAP_BOX_ID
|
|
244
232
|
) as HTMLDivElement;
|
|
@@ -394,10 +382,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
394
382
|
{!isLastWallet && <Divider size={32} />}
|
|
395
383
|
{isLastWallet && config?.customDestination && (
|
|
396
384
|
<CustomDestination>
|
|
397
|
-
<
|
|
398
|
-
ref={customDestinationRef}
|
|
399
|
-
selected={showCustomDestination}
|
|
400
|
-
open={showCustomDestination}
|
|
385
|
+
<CustomCollapsible
|
|
401
386
|
onOpenChange={(checked) => {
|
|
402
387
|
if (!checked) {
|
|
403
388
|
resetCustomDestination();
|
|
@@ -423,11 +408,11 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
423
408
|
);
|
|
424
409
|
}
|
|
425
410
|
}
|
|
426
|
-
}}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
411
|
+
}}
|
|
412
|
+
hasSelected
|
|
413
|
+
open={showCustomDestination}
|
|
414
|
+
triggerAnchor="top"
|
|
415
|
+
trigger={
|
|
431
416
|
<CustomDestinationButton
|
|
432
417
|
fullWidth
|
|
433
418
|
variant="default"
|
|
@@ -447,21 +432,21 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
447
432
|
</Typography>
|
|
448
433
|
</div>
|
|
449
434
|
</CustomDestinationButton>
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
435
|
+
}
|
|
436
|
+
onClickTrigger={() =>
|
|
437
|
+
setShowCustomDestination((prev) => !prev)
|
|
438
|
+
}>
|
|
439
|
+
<Divider size={4} />
|
|
440
|
+
<StyledTextField
|
|
441
|
+
autoFocus
|
|
442
|
+
placeholder={i18n.t('Your destination address')}
|
|
443
|
+
value={destination}
|
|
444
|
+
onChange={(e) => {
|
|
445
|
+
setDestination(e.target.value);
|
|
446
|
+
}}
|
|
447
|
+
/>
|
|
448
|
+
</CustomCollapsible>
|
|
449
|
+
|
|
465
450
|
{isAddressMatched && (
|
|
466
451
|
<div className={alarmsStyles()}>
|
|
467
452
|
<Alert
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
TIME_TO_IGNORE_MODAL,
|
|
26
26
|
} from '../../pages/WalletsPage';
|
|
27
27
|
import { useAppStore } from '../../store/AppStore';
|
|
28
|
+
import { useUiStore } from '../../store/ui';
|
|
28
29
|
import { useWalletsStore } from '../../store/wallets';
|
|
29
30
|
import { getBlockchainDisplayNameFor } from '../../utils/meta';
|
|
30
31
|
import {
|
|
@@ -44,6 +45,7 @@ import {
|
|
|
44
45
|
export function WalletList(props: PropTypes) {
|
|
45
46
|
const { chain, isSelected, selectWallet, limit, onShowMore } = props;
|
|
46
47
|
const { config } = useAppStore();
|
|
48
|
+
const isActiveTab = useUiStore.use.isActiveTab();
|
|
47
49
|
|
|
48
50
|
const connectedWallets = useWalletsStore.use.connectedWallets();
|
|
49
51
|
const { blockchains } = useAppStore();
|
|
@@ -289,6 +291,7 @@ export function WalletList(props: PropTypes) {
|
|
|
289
291
|
description={connectedWalletDescription}
|
|
290
292
|
onClick={onClick}
|
|
291
293
|
selected={isSelected(wallet.type, chain)}
|
|
294
|
+
disabled={!isActiveTab}
|
|
292
295
|
{...wallet}
|
|
293
296
|
/>
|
|
294
297
|
</>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
|
+
import { keyframes, styled } from '@rango-dev/ui';
|
|
3
|
+
|
|
4
|
+
export const EXPANDABLE_TRANSITION_DURATION = 300;
|
|
5
|
+
|
|
6
|
+
const slideDown = keyframes({
|
|
7
|
+
from: {
|
|
8
|
+
height: 0,
|
|
9
|
+
},
|
|
10
|
+
to: {
|
|
11
|
+
height: 'var(--radix-collapsible-content-height)',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const slideUp = keyframes({
|
|
16
|
+
from: {
|
|
17
|
+
height: 'var(--radix-collapsible-content-height)',
|
|
18
|
+
},
|
|
19
|
+
to: {
|
|
20
|
+
height: 0,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const CollapsibleRoot = styled(Collapsible.Root, {
|
|
25
|
+
borderRadius: '$sm',
|
|
26
|
+
variants: {
|
|
27
|
+
selected: {
|
|
28
|
+
true: {
|
|
29
|
+
outlineWidth: 1,
|
|
30
|
+
outlineColor: '$secondary500',
|
|
31
|
+
outlineStyle: 'solid',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const Trigger = styled(Collapsible.Trigger, {
|
|
38
|
+
padding: '$0',
|
|
39
|
+
border: 'none',
|
|
40
|
+
outline: 'none',
|
|
41
|
+
width: '100%',
|
|
42
|
+
backgroundColor: 'transparent',
|
|
43
|
+
fontFamily: 'inherit',
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const CollapsibleContent = styled(Collapsible.Content, {
|
|
48
|
+
overflow: 'hidden',
|
|
49
|
+
variants: {
|
|
50
|
+
open: {
|
|
51
|
+
true: {
|
|
52
|
+
animation: `${slideDown} ${EXPANDABLE_TRANSITION_DURATION}ms ease-out`,
|
|
53
|
+
},
|
|
54
|
+
false: {
|
|
55
|
+
animation: `${slideUp} ${EXPANDABLE_TRANSITION_DURATION}ms ease-out`,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export const ExpandedIcon = styled('div', {
|
|
62
|
+
transition: `all ${EXPANDABLE_TRANSITION_DURATION}ms ease`,
|
|
63
|
+
display: 'flex',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
variants: {
|
|
66
|
+
orientation: {
|
|
67
|
+
down: {
|
|
68
|
+
transform: 'rotate(0)',
|
|
69
|
+
},
|
|
70
|
+
up: {
|
|
71
|
+
transform: 'rotate(180deg)',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { PropTypes } from './CustomCollapsible.types';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
import React, { useLayoutEffect, useRef } from 'react';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
CollapsibleContent,
|
|
8
|
+
CollapsibleRoot,
|
|
9
|
+
EXPANDABLE_TRANSITION_DURATION,
|
|
10
|
+
Trigger,
|
|
11
|
+
} from './CustomCollapsible.styles';
|
|
12
|
+
|
|
13
|
+
export function CustomCollapsible(props: PropsWithChildren<PropTypes>) {
|
|
14
|
+
const {
|
|
15
|
+
open,
|
|
16
|
+
hasSelected,
|
|
17
|
+
onOpenChange,
|
|
18
|
+
children,
|
|
19
|
+
onClickTrigger,
|
|
20
|
+
trigger,
|
|
21
|
+
triggerAnchor,
|
|
22
|
+
} = props;
|
|
23
|
+
const ref = useRef<HTMLDivElement | null>(null);
|
|
24
|
+
|
|
25
|
+
useLayoutEffect(() => {
|
|
26
|
+
if (open && ref.current) {
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
ref?.current?.scrollIntoView({ behavior: 'smooth' });
|
|
29
|
+
}, EXPANDABLE_TRANSITION_DURATION);
|
|
30
|
+
}
|
|
31
|
+
}, [open]);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<CollapsibleRoot
|
|
35
|
+
ref={ref}
|
|
36
|
+
className="collapsible_root"
|
|
37
|
+
selected={hasSelected && open}
|
|
38
|
+
open={open}
|
|
39
|
+
onOpenChange={onOpenChange}>
|
|
40
|
+
{triggerAnchor === 'top' && (
|
|
41
|
+
<Trigger className="collapsible_trigger" onClick={onClickTrigger}>
|
|
42
|
+
{trigger}
|
|
43
|
+
</Trigger>
|
|
44
|
+
)}
|
|
45
|
+
<CollapsibleContent className="collapsible_content" open={open}>
|
|
46
|
+
{children}
|
|
47
|
+
</CollapsibleContent>
|
|
48
|
+
{triggerAnchor === 'bottom' && (
|
|
49
|
+
<Trigger className="collapsible_trigger" onClick={onClickTrigger}>
|
|
50
|
+
{trigger}
|
|
51
|
+
</Trigger>
|
|
52
|
+
)}
|
|
53
|
+
</CollapsibleRoot>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -20,7 +20,7 @@ import { RefreshButton } from './RefreshButton';
|
|
|
20
20
|
import { UnreadNotificationsBadge } from './UnreadNotificationsBadge';
|
|
21
21
|
|
|
22
22
|
export function HomeButtons(props: HomeButtonsPropTypes) {
|
|
23
|
-
const {
|
|
23
|
+
const { onClickRefresh, onClickHistory, onClickSettings } = props;
|
|
24
24
|
|
|
25
25
|
const {
|
|
26
26
|
config: { features },
|
|
@@ -40,7 +40,6 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
|
|
|
40
40
|
{!isNotificationsHidden && (
|
|
41
41
|
<Popover
|
|
42
42
|
align="center"
|
|
43
|
-
collisionBoundary={layoutRef}
|
|
44
43
|
collisionPadding={{ right: 20, left: 20 }}
|
|
45
44
|
container={getContainer()}
|
|
46
45
|
content={<NotificationContent />}>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getContainer } from '../../utils/common';
|
|
2
|
+
|
|
3
|
+
export function onScrollContentAttachStatusToContainer(e: Event) {
|
|
4
|
+
const contentElement = e.target as HTMLElement | null;
|
|
5
|
+
|
|
6
|
+
if (contentElement) {
|
|
7
|
+
const fromTop = contentElement.scrollTop;
|
|
8
|
+
const container = getContainer();
|
|
9
|
+
|
|
10
|
+
if (fromTop > 1) {
|
|
11
|
+
container.classList.add('rng-scrolled');
|
|
12
|
+
} else {
|
|
13
|
+
container.classList.remove('rng-scrolled');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,54 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
|
+
const WIDGET_HEIGHT = '700px';
|
|
3
4
|
export const Container = styled('div', {
|
|
4
5
|
position: 'relative',
|
|
5
6
|
display: 'flex',
|
|
6
7
|
flexDirection: 'column',
|
|
7
8
|
borderRadius: '$primary',
|
|
8
|
-
|
|
9
|
-
boxShadow: '15px 15px 15px 0px rgba(0, 0, 0, 0.05)',
|
|
10
|
-
width: '100vw',
|
|
9
|
+
width: '100vh',
|
|
11
10
|
minWidth: '300px',
|
|
12
11
|
maxWidth: '390px',
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$$color: '$colors$neutral300',
|
|
18
|
-
},
|
|
19
|
-
backgroundColor: '$$color',
|
|
12
|
+
boxShadow: '15px 15px 15px 0px rgba(0, 0, 0, 0.05)',
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
backgroundColor: '$background',
|
|
15
|
+
|
|
20
16
|
variants: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
height: '
|
|
17
|
+
height: {
|
|
18
|
+
auto: {
|
|
19
|
+
height: 'auto',
|
|
20
|
+
maxHeight: WIDGET_HEIGHT,
|
|
24
21
|
},
|
|
25
|
-
|
|
26
|
-
height:
|
|
22
|
+
fixed: {
|
|
23
|
+
height: WIDGET_HEIGHT,
|
|
27
24
|
},
|
|
28
25
|
},
|
|
29
26
|
},
|
|
30
27
|
});
|
|
31
28
|
|
|
32
29
|
export const Content = styled('div', {
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
position: 'relative',
|
|
31
|
+
overflow: 'hidden',
|
|
32
|
+
flexGrow: 1,
|
|
35
33
|
display: 'flex',
|
|
36
34
|
flexDirection: 'column',
|
|
37
|
-
|
|
38
|
-
padding: '$20 $20 $10 $20',
|
|
39
|
-
backgroundColor: '$background',
|
|
40
|
-
position: 'relative',
|
|
35
|
+
padding: 0,
|
|
41
36
|
overflowY: 'auto',
|
|
42
|
-
overflowX: 'hidden',
|
|
43
|
-
variants: {
|
|
44
|
-
noPadding: {
|
|
45
|
-
true: {
|
|
46
|
-
padding: '0',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
37
|
});
|
|
51
|
-
|
|
52
38
|
export const Footer = styled('div', {
|
|
53
39
|
backgroundColor: '$background',
|
|
54
40
|
'& .footer__content': {
|