@lifi/widget 1.13.0 → 1.13.3
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/cjs/App.d.ts +4 -0
- package/cjs/App.js +80 -0
- package/cjs/AppDrawer.d.ts +14 -0
- package/cjs/AppDrawer.js +44 -0
- package/cjs/AppDrawer.style.d.ts +53 -0
- package/cjs/AppDrawer.style.js +75 -0
- package/cjs/AppProvider.d.ts +11 -0
- package/cjs/AppProvider.js +31 -0
- package/cjs/components/AppContainer.d.ts +15 -0
- package/cjs/components/AppContainer.js +59 -0
- package/cjs/components/BottomSheet/BottomSheet.d.ts +3 -0
- package/cjs/components/BottomSheet/BottomSheet.js +45 -0
- package/cjs/components/BottomSheet/index.d.ts +2 -0
- package/cjs/components/BottomSheet/index.js +18 -0
- package/cjs/components/BottomSheet/types.d.ts +10 -0
- package/cjs/components/BottomSheet/types.js +2 -0
- package/cjs/components/Card/Card.d.ts +14 -0
- package/cjs/components/Card/Card.js +35 -0
- package/cjs/components/Card/CardHeader.d.ts +18 -0
- package/cjs/components/Card/CardHeader.js +23 -0
- package/cjs/components/Card/CardTitle.d.ts +14 -0
- package/cjs/components/Card/CardTitle.js +12 -0
- package/cjs/components/Card/index.d.ts +3 -0
- package/cjs/components/Card/index.js +19 -0
- package/cjs/components/Dialog.d.ts +3 -0
- package/cjs/components/Dialog.js +27 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.d.ts +6 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +45 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +9 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +14 -0
- package/cjs/components/GasSufficiencyMessage/index.d.ts +1 -0
- package/cjs/components/GasSufficiencyMessage/index.js +17 -0
- package/cjs/components/Header/Header.d.ts +2 -0
- package/cjs/components/Header/Header.js +27 -0
- package/cjs/components/Header/Header.style.d.ts +20 -0
- package/cjs/components/Header/Header.style.js +26 -0
- package/cjs/components/Header/NavigationHeader.d.ts +2 -0
- package/cjs/components/Header/NavigationHeader.js +58 -0
- package/cjs/components/Header/WalletHeader.d.ts +2 -0
- package/cjs/components/Header/WalletHeader.js +48 -0
- package/cjs/components/Header/index.d.ts +2 -0
- package/cjs/components/Header/index.js +18 -0
- package/cjs/components/Header/types.d.ts +8 -0
- package/cjs/components/Header/types.js +2 -0
- package/cjs/components/Header/useHeaderActionStore.d.ts +6 -0
- package/cjs/components/Header/useHeaderActionStore.js +26 -0
- package/cjs/components/Initializer.d.ts +2 -0
- package/cjs/components/Initializer.js +9 -0
- package/cjs/components/Input.d.ts +1 -0
- package/cjs/components/Input.js +17 -0
- package/cjs/components/LiFiLogo.d.ts +5 -0
- package/cjs/components/LiFiLogo.js +10 -0
- package/cjs/components/NotFound.d.ts +2 -0
- package/cjs/components/NotFound.js +19 -0
- package/cjs/components/PoweredBy/PoweredBy.d.ts +2 -0
- package/cjs/components/PoweredBy/PoweredBy.js +16 -0
- package/cjs/components/PoweredBy/PoweredBy.style.d.ts +12 -0
- package/cjs/components/PoweredBy/PoweredBy.style.js +12 -0
- package/cjs/components/PoweredBy/index.d.ts +1 -0
- package/cjs/components/PoweredBy/index.js +5 -0
- package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.d.ts +7 -0
- package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.js +63 -0
- package/cjs/components/ProgressToNextUpdate/index.d.ts +1 -0
- package/cjs/components/ProgressToNextUpdate/index.js +17 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.d.ts +4 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +26 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +29 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.js +19 -0
- package/cjs/components/ReverseTokensButton/index.d.ts +1 -0
- package/cjs/components/ReverseTokensButton/index.js +17 -0
- package/cjs/components/Select.d.ts +3 -0
- package/cjs/components/Select.js +30 -0
- package/cjs/components/SelectChainAndToken.d.ts +3 -0
- package/cjs/components/SelectChainAndToken.js +23 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.d.ts +5 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.js +35 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.style.d.ts +21 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.style.js +27 -0
- package/cjs/components/SelectTokenButton/index.d.ts +1 -0
- package/cjs/components/SelectTokenButton/index.js +17 -0
- package/cjs/components/SmallAvatar.d.ts +16 -0
- package/cjs/components/SmallAvatar.js +11 -0
- package/cjs/components/Step/CircularProgress.d.ts +5 -0
- package/cjs/components/Step/CircularProgress.js +24 -0
- package/cjs/components/Step/CircularProgress.style.d.ts +6 -0
- package/cjs/components/Step/CircularProgress.style.js +54 -0
- package/cjs/components/Step/Step.d.ts +7 -0
- package/cjs/components/Step/Step.js +36 -0
- package/cjs/components/Step/StepProcess.d.ts +6 -0
- package/cjs/components/Step/StepProcess.js +25 -0
- package/cjs/components/Step/StepProcess.style.d.ts +39 -0
- package/cjs/components/Step/StepProcess.style.js +8 -0
- package/cjs/components/Step/StepTimer.d.ts +5 -0
- package/cjs/components/Step/StepTimer.js +64 -0
- package/cjs/components/Step/index.d.ts +1 -0
- package/cjs/components/Step/index.js +17 -0
- package/cjs/components/Step/utils.d.ts +6 -0
- package/cjs/components/Step/utils.js +93 -0
- package/cjs/components/StepActions/StepActions.d.ts +13 -0
- package/cjs/components/StepActions/StepActions.js +71 -0
- package/cjs/components/StepActions/StepActions.style.d.ts +20 -0
- package/cjs/components/StepActions/StepActions.style.js +59 -0
- package/cjs/components/StepActions/index.d.ts +1 -0
- package/cjs/components/StepActions/index.js +5 -0
- package/cjs/components/StepActions/types.d.ts +6 -0
- package/cjs/components/StepActions/types.js +2 -0
- package/cjs/components/StepDivider/StepDivider.d.ts +2 -0
- package/cjs/components/StepDivider/StepDivider.js +10 -0
- package/cjs/components/StepDivider/StepDivider.style.d.ts +11 -0
- package/cjs/components/StepDivider/StepDivider.style.js +11 -0
- package/cjs/components/StepDivider/index.d.ts +1 -0
- package/cjs/components/StepDivider/index.js +17 -0
- package/cjs/components/SwapButton/ButtonTooltip.d.ts +5 -0
- package/cjs/components/SwapButton/ButtonTooltip.js +7 -0
- package/cjs/components/SwapButton/SwapButton.d.ts +3 -0
- package/cjs/components/SwapButton/SwapButton.js +74 -0
- package/cjs/components/SwapButton/SwapButton.style.d.ts +65 -0
- package/cjs/components/SwapButton/SwapButton.style.js +15 -0
- package/cjs/components/SwapButton/index.d.ts +1 -0
- package/cjs/components/SwapButton/index.js +5 -0
- package/cjs/components/SwapButton/types.d.ts +7 -0
- package/cjs/components/SwapButton/types.js +2 -0
- package/cjs/components/SwapInProgress/SwapInProgress.d.ts +3 -0
- package/cjs/components/SwapInProgress/SwapInProgress.js +29 -0
- package/cjs/components/SwapInProgress/SwapInProgress.style.d.ts +31 -0
- package/cjs/components/SwapInProgress/SwapInProgress.style.js +17 -0
- package/cjs/components/SwapInProgress/index.d.ts +1 -0
- package/cjs/components/SwapInProgress/index.js +17 -0
- package/cjs/components/SwapInput/FormPriceHelperText.d.ts +5 -0
- package/cjs/components/SwapInput/FormPriceHelperText.js +31 -0
- package/cjs/components/SwapInput/SwapInput.d.ts +3 -0
- package/cjs/components/SwapInput/SwapInput.js +46 -0
- package/cjs/components/SwapInput/SwapInput.style.d.ts +21 -0
- package/cjs/components/SwapInput/SwapInput.style.js +33 -0
- package/cjs/components/SwapInput/SwapInputAdornment.d.ts +3 -0
- package/cjs/components/SwapInput/SwapInputAdornment.js +27 -0
- package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +34 -0
- package/cjs/components/SwapInput/SwapInputAdornment.style.js +23 -0
- package/cjs/components/SwapInput/index.d.ts +1 -0
- package/cjs/components/SwapInput/index.js +17 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +4 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.js +42 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +16 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +30 -0
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +4 -0
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +32 -0
- package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +4 -0
- package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.js +30 -0
- package/cjs/components/SwapRouteCard/index.d.ts +3 -0
- package/cjs/components/SwapRouteCard/index.js +19 -0
- package/cjs/components/SwapRouteCard/types.d.ts +9 -0
- package/cjs/components/SwapRouteCard/types.js +2 -0
- package/cjs/components/Switch.d.ts +1 -0
- package/cjs/components/Switch.js +56 -0
- package/cjs/components/TextFitter/TextFitter.d.ts +3 -0
- package/cjs/components/TextFitter/TextFitter.js +52 -0
- package/cjs/components/TextFitter/index.d.ts +1 -0
- package/cjs/components/TextFitter/index.js +17 -0
- package/cjs/components/TextFitter/types.d.ts +12 -0
- package/cjs/components/TextFitter/types.js +2 -0
- package/cjs/components/Token/Token.d.ts +7 -0
- package/cjs/components/Token/Token.js +35 -0
- package/cjs/components/Token/Token.style.d.ts +24 -0
- package/cjs/components/Token/Token.style.js +34 -0
- package/cjs/components/Token/index.d.ts +2 -0
- package/cjs/components/Token/index.js +18 -0
- package/cjs/components/TokenAvatar/TokenAvatar.d.ts +7 -0
- package/cjs/components/TokenAvatar/TokenAvatar.js +13 -0
- package/cjs/components/TokenAvatar/TokenAvatar.style.d.ts +1 -0
- package/cjs/components/TokenAvatar/TokenAvatar.style.js +19 -0
- package/cjs/components/TokenAvatar/index.d.ts +2 -0
- package/cjs/components/TokenAvatar/index.js +18 -0
- package/cjs/components/TokenList/TokenList.d.ts +3 -0
- package/cjs/components/TokenList/TokenList.js +55 -0
- package/cjs/components/TokenList/TokenList.style.d.ts +32 -0
- package/cjs/components/TokenList/TokenList.style.js +28 -0
- package/cjs/components/TokenList/TokenListItem.d.ts +5 -0
- package/cjs/components/TokenList/TokenListItem.js +32 -0
- package/cjs/components/TokenList/TokenNotFound.d.ts +2 -0
- package/cjs/components/TokenList/TokenNotFound.js +19 -0
- package/cjs/components/TokenList/VirtualizedTokenList.d.ts +3 -0
- package/cjs/components/TokenList/VirtualizedTokenList.js +57 -0
- package/cjs/components/TokenList/index.d.ts +1 -0
- package/cjs/components/TokenList/index.js +17 -0
- package/cjs/components/TokenList/types.d.ts +32 -0
- package/cjs/components/TokenList/types.js +2 -0
- package/cjs/config/env.d.ts +3 -0
- package/cjs/config/env.js +6 -0
- package/cjs/config/lifi.d.ts +3 -0
- package/cjs/config/lifi.js +12 -0
- package/cjs/config/queryClient.d.ts +2 -0
- package/cjs/config/queryClient.js +28 -0
- package/cjs/config/sentry.d.ts +1 -0
- package/cjs/config/sentry.js +65 -0
- package/cjs/config/theme.d.ts +27 -0
- package/cjs/config/theme.js +175 -0
- package/cjs/config/version.d.ts +2 -0
- package/cjs/config/version.js +5 -0
- package/cjs/hooks/index.d.ts +17 -0
- package/cjs/hooks/index.js +33 -0
- package/cjs/hooks/useChain.d.ts +4 -0
- package/cjs/hooks/useChain.js +17 -0
- package/cjs/hooks/useChains.d.ts +101 -0
- package/cjs/hooks/useChains.js +43 -0
- package/cjs/hooks/useContentHeight.d.ts +1 -0
- package/cjs/hooks/useContentHeight.js +27 -0
- package/cjs/hooks/useDebouncedWatch.d.ts +1 -0
- package/cjs/hooks/useDebouncedWatch.js +36 -0
- package/cjs/hooks/useFeaturedTokens.d.ts +1 -0
- package/cjs/hooks/useFeaturedTokens.js +10 -0
- package/cjs/hooks/useGasSufficiency.d.ts +15 -0
- package/cjs/hooks/useGasSufficiency.js +105 -0
- package/cjs/hooks/useInitializer.d.ts +1 -0
- package/cjs/hooks/useInitializer.js +9 -0
- package/cjs/hooks/useRouteExecution.d.ts +8 -0
- package/cjs/hooks/useRouteExecution.js +163 -0
- package/cjs/hooks/useScrollableContainer.d.ts +2 -0
- package/cjs/hooks/useScrollableContainer.js +29 -0
- package/cjs/hooks/useSwapRoutes.d.ts +9 -0
- package/cjs/hooks/useSwapRoutes.js +109 -0
- package/cjs/hooks/useTelemetry.d.ts +1 -0
- package/cjs/hooks/useTelemetry.js +22 -0
- package/cjs/hooks/useToken.d.ts +5 -0
- package/cjs/hooks/useToken.js +18 -0
- package/cjs/hooks/useTokenBalance.d.ts +5 -0
- package/cjs/hooks/useTokenBalance.js +19 -0
- package/cjs/hooks/useTokenBalances.d.ts +10 -0
- package/cjs/hooks/useTokenBalances.js +80 -0
- package/cjs/hooks/useTokenSearch.d.ts +7 -0
- package/cjs/hooks/useTokenSearch.js +41 -0
- package/cjs/hooks/useTokens.d.ts +6 -0
- package/cjs/hooks/useTokens.js +36 -0
- package/cjs/hooks/useTools.d.ts +10 -0
- package/cjs/hooks/useTools.js +28 -0
- package/cjs/i18n/en/translation.json +175 -0
- package/cjs/i18n/index.d.ts +181 -0
- package/cjs/i18n/index.js +27 -0
- package/cjs/icons/LiFiFullLogo.d.ts +2 -0
- package/cjs/icons/LiFiFullLogo.js +6 -0
- package/cjs/icons/LiFiLogo.d.ts +2 -0
- package/cjs/icons/LiFiLogo.js +6 -0
- package/cjs/icons/LiFiToolLogo.d.ts +2 -0
- package/cjs/icons/LiFiToolLogo.js +6 -0
- package/cjs/icons/index.d.ts +3 -0
- package/cjs/icons/index.js +19 -0
- package/cjs/index.d.ts +5 -0
- package/cjs/index.js +28 -0
- package/cjs/pages/MainPage/MainPage.d.ts +2 -0
- package/cjs/pages/MainPage/MainPage.js +15 -0
- package/cjs/pages/MainPage/MainPage.style.d.ts +11 -0
- package/cjs/pages/MainPage/MainPage.style.js +11 -0
- package/cjs/pages/MainPage/MainSwapButton.d.ts +2 -0
- package/cjs/pages/MainPage/MainSwapButton.js +34 -0
- package/cjs/pages/MainPage/SwapRoutes.d.ts +3 -0
- package/cjs/pages/MainPage/SwapRoutes.js +40 -0
- package/cjs/pages/MainPage/SwapRoutes.style.d.ts +11 -0
- package/cjs/pages/MainPage/SwapRoutes.style.js +16 -0
- package/cjs/pages/MainPage/index.d.ts +1 -0
- package/cjs/pages/MainPage/index.js +17 -0
- package/cjs/pages/SelectTokenPage/ChainSelect.d.ts +3 -0
- package/cjs/pages/SelectTokenPage/ChainSelect.js +32 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +2 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.js +21 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.style.d.ts +1 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.style.js +8 -0
- package/cjs/pages/SelectTokenPage/SelectTokenPage.d.ts +5 -0
- package/cjs/pages/SelectTokenPage/SelectTokenPage.js +27 -0
- package/cjs/pages/SelectTokenPage/index.d.ts +2 -0
- package/cjs/pages/SelectTokenPage/index.js +18 -0
- package/cjs/pages/SelectTokenPage/types.d.ts +4 -0
- package/cjs/pages/SelectTokenPage/types.js +8 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +2 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.js +53 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts +46 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.style.js +30 -0
- package/cjs/pages/SelectWalletPage/index.d.ts +1 -0
- package/cjs/pages/SelectWalletPage/index.js +17 -0
- package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +2 -0
- package/cjs/pages/SettingsPage/AdvancedPreferences.js +24 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +2 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +24 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +33 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.js +19 -0
- package/cjs/pages/SettingsPage/EnabledBridgesSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +30 -0
- package/cjs/pages/SettingsPage/EnabledExchangesSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +29 -0
- package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/GasPriceSelect.js +17 -0
- package/cjs/pages/SettingsPage/RoutePrioritySelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/RoutePrioritySelect.js +18 -0
- package/cjs/pages/SettingsPage/SettingsPage.d.ts +2 -0
- package/cjs/pages/SettingsPage/SettingsPage.js +14 -0
- package/cjs/pages/SettingsPage/SlippageInput.d.ts +2 -0
- package/cjs/pages/SettingsPage/SlippageInput.js +29 -0
- package/cjs/pages/SettingsPage/index.d.ts +1 -0
- package/cjs/pages/SettingsPage/index.js +17 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.d.ts +2 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +69 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +11 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.js +8 -0
- package/cjs/pages/SwapDetailsPage/index.d.ts +1 -0
- package/cjs/pages/SwapDetailsPage/index.js +17 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +2 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.js +18 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryItem.d.ts +5 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +27 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryPage.d.ts +2 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +34 -0
- package/cjs/pages/SwapHistoryPage/index.d.ts +1 -0
- package/cjs/pages/SwapHistoryPage/index.js +17 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.d.ts +3 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.js +83 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.style.d.ts +25 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.style.js +35 -0
- package/cjs/pages/SwapPage/SwapPage.d.ts +2 -0
- package/cjs/pages/SwapPage/SwapPage.js +49 -0
- package/cjs/pages/SwapPage/SwapPage.style.d.ts +11 -0
- package/cjs/pages/SwapPage/SwapPage.style.js +8 -0
- package/cjs/pages/SwapPage/index.d.ts +1 -0
- package/cjs/pages/SwapPage/index.js +17 -0
- package/cjs/pages/SwapPage/utils.d.ts +6 -0
- package/cjs/pages/SwapPage/utils.js +93 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.d.ts +3 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +39 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +11 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.js +9 -0
- package/cjs/pages/SwapRoutesPage/index.d.ts +1 -0
- package/cjs/pages/SwapRoutesPage/index.js +17 -0
- package/cjs/providers/SwapFormProvider/SwapFormProvider.d.ts +6 -0
- package/cjs/providers/SwapFormProvider/SwapFormProvider.js +45 -0
- package/cjs/providers/SwapFormProvider/index.d.ts +2 -0
- package/cjs/providers/SwapFormProvider/index.js +18 -0
- package/cjs/providers/SwapFormProvider/types.d.ts +25 -0
- package/cjs/providers/SwapFormProvider/types.js +17 -0
- package/cjs/providers/ThemeProvider/ThemeProvider.d.ts +2 -0
- package/cjs/providers/ThemeProvider/ThemeProvider.js +37 -0
- package/cjs/providers/ThemeProvider/index.d.ts +1 -0
- package/cjs/providers/ThemeProvider/index.js +17 -0
- package/cjs/providers/WalletProvider/WalletProvider.d.ts +19 -0
- package/cjs/providers/WalletProvider/WalletProvider.js +106 -0
- package/cjs/providers/WalletProvider/index.d.ts +2 -0
- package/cjs/providers/WalletProvider/index.js +18 -0
- package/cjs/providers/WalletProvider/types.d.ts +17 -0
- package/cjs/providers/WalletProvider/types.js +2 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.d.ts +4 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.js +68 -0
- package/cjs/providers/WidgetProvider/index.d.ts +2 -0
- package/cjs/providers/WidgetProvider/index.js +18 -0
- package/cjs/providers/WidgetProvider/types.d.ts +8 -0
- package/cjs/providers/WidgetProvider/types.js +2 -0
- package/cjs/stores/index.d.ts +2 -0
- package/cjs/stores/index.js +18 -0
- package/cjs/stores/route/index.d.ts +5 -0
- package/cjs/stores/route/index.js +21 -0
- package/cjs/stores/route/types.d.ts +14 -0
- package/cjs/stores/route/types.js +2 -0
- package/cjs/stores/route/useExecutingRoutes.d.ts +2 -0
- package/cjs/stores/route/useExecutingRoutes.js +13 -0
- package/cjs/stores/route/useRouteStore.d.ts +18 -0
- package/cjs/stores/route/useRouteStore.js +57 -0
- package/cjs/stores/route/useSetExecutableRoute.d.ts +1 -0
- package/cjs/stores/route/useSetExecutableRoute.js +8 -0
- package/cjs/stores/route/useSwapHistory.d.ts +2 -0
- package/cjs/stores/route/useSwapHistory.js +18 -0
- package/cjs/stores/settings/index.d.ts +5 -0
- package/cjs/stores/settings/index.js +21 -0
- package/cjs/stores/settings/types.d.ts +23 -0
- package/cjs/stores/settings/types.js +4 -0
- package/cjs/stores/settings/useAppearance.d.ts +2 -0
- package/cjs/stores/settings/useAppearance.js +14 -0
- package/cjs/stores/settings/useSetSettings.d.ts +5 -0
- package/cjs/stores/settings/useSetSettings.js +12 -0
- package/cjs/stores/settings/useSettings.d.ts +2 -0
- package/cjs/stores/settings/useSettings.js +15 -0
- package/cjs/stores/settings/useSettingsStore.d.ts +38 -0
- package/cjs/stores/settings/useSettingsStore.js +90 -0
- package/cjs/types/index.d.ts +2 -0
- package/cjs/types/index.js +18 -0
- package/cjs/types/token.d.ts +4 -0
- package/cjs/types/token.js +2 -0
- package/cjs/types/widget.d.ts +47 -0
- package/cjs/types/widget.js +2 -0
- package/cjs/utils/colors.d.ts +3 -0
- package/cjs/utils/colors.js +13 -0
- package/cjs/utils/deepClone.d.ts +1 -0
- package/cjs/utils/deepClone.js +7 -0
- package/cjs/utils/elements.d.ts +4 -0
- package/cjs/utils/elements.js +8 -0
- package/cjs/utils/format.d.ts +9 -0
- package/cjs/utils/format.js +86 -0
- package/cjs/utils/index.d.ts +6 -0
- package/cjs/utils/index.js +22 -0
- package/cjs/utils/input.d.ts +1 -0
- package/cjs/utils/input.js +28 -0
- package/cjs/utils/navigationRoutes.d.ts +13 -0
- package/cjs/utils/navigationRoutes.js +15 -0
- package/components/LiFiLogo.js +1 -2
- package/components/Step/CircularProgress.d.ts +1 -0
- package/components/StepActions/StepActions.js +1 -1
- package/components/SwapButton/ButtonTooltip.d.ts +1 -0
- package/components/SwapInput/SwapInputAdornment.d.ts +1 -0
- package/config/sentry.js +3 -0
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useChains.d.ts +10 -10
- package/icons/LiFiFullLogo.d.ts +2 -0
- package/icons/LiFiFullLogo.js +2 -0
- package/icons/LiFiLogo.d.ts +2 -0
- package/icons/LiFiLogo.js +2 -0
- package/icons/LiFiToolLogo.d.ts +2 -0
- package/icons/LiFiToolLogo.js +2 -0
- package/icons/index.d.ts +3 -0
- package/icons/index.js +3 -0
- package/index.js +3 -1
- package/package.json +30 -16
- package/pages/SelectTokenPage/ChainSelect.d.ts +1 -0
- package/pages/SelectTokenPage/SearchTokenInput.d.ts +1 -0
- package/pages/SelectWalletPage/SelectWalletPage.d.ts +1 -0
- package/pages/SelectWalletPage/SelectWalletPage.js +1 -1
- package/pages/SettingsPage/AdvancedPreferences.d.ts +1 -0
- package/pages/SettingsPage/GasPriceSelect.d.ts +1 -0
- package/pages/SettingsPage/SettingsPage.d.ts +1 -0
- package/pages/SettingsPage/SlippageInput.d.ts +1 -0
- package/providers/SwapFormProvider/SwapFormProvider.js +14 -8
- package/providers/WalletProvider/WalletProvider.d.ts +5 -0
- package/providers/WalletProvider/WalletProvider.js +12 -6
- package/tsconfig.cjs.tsbuildinfo +1 -0
- package/icons/LiFiFullLogo.svg +0 -10
- package/icons/LiFiLogo.svg +0 -5
- package/icons/LiFiToolLogo.svg +0 -6
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export declare const defaultNS = "translation";
|
|
2
|
+
export declare const resources: {
|
|
3
|
+
readonly en: {
|
|
4
|
+
readonly translation: {
|
|
5
|
+
header: {
|
|
6
|
+
walletConnected: string;
|
|
7
|
+
connectWallet: string;
|
|
8
|
+
selectWallet: string;
|
|
9
|
+
swap: string;
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
settings: string;
|
|
13
|
+
routes: string;
|
|
14
|
+
swapHistory: string;
|
|
15
|
+
swapDetails: string;
|
|
16
|
+
};
|
|
17
|
+
button: {
|
|
18
|
+
connectWallet: string;
|
|
19
|
+
switchChain: string;
|
|
20
|
+
swap: string;
|
|
21
|
+
reviewSwap: string;
|
|
22
|
+
startSwap: string;
|
|
23
|
+
restartSwap: string;
|
|
24
|
+
removeSwap: string;
|
|
25
|
+
done: string;
|
|
26
|
+
okay: string;
|
|
27
|
+
seeDetails: string;
|
|
28
|
+
tryAgain: string;
|
|
29
|
+
light: string;
|
|
30
|
+
dark: string;
|
|
31
|
+
auto: string;
|
|
32
|
+
ok: string;
|
|
33
|
+
cancel: string;
|
|
34
|
+
delete: string;
|
|
35
|
+
hide: string;
|
|
36
|
+
max: string;
|
|
37
|
+
contactSupport: string;
|
|
38
|
+
lifiSwap: string;
|
|
39
|
+
};
|
|
40
|
+
swap: {
|
|
41
|
+
from: string;
|
|
42
|
+
to: string;
|
|
43
|
+
amount: string;
|
|
44
|
+
maxAmount: string;
|
|
45
|
+
routes: string;
|
|
46
|
+
approximateCurrency: string;
|
|
47
|
+
currency: string;
|
|
48
|
+
sendToRecipient: string;
|
|
49
|
+
addressConfirmation: string;
|
|
50
|
+
gas: string;
|
|
51
|
+
minutes: string;
|
|
52
|
+
tokenSearch: string;
|
|
53
|
+
selectChain: string;
|
|
54
|
+
selectToken: string;
|
|
55
|
+
selectChainAndToken: string;
|
|
56
|
+
featuredTokens: string;
|
|
57
|
+
otherTokens: string;
|
|
58
|
+
inProgress: string;
|
|
59
|
+
couldntFindTokens: string;
|
|
60
|
+
stepSwap: string;
|
|
61
|
+
stepBridge: string;
|
|
62
|
+
stepSwapAndBridge: string;
|
|
63
|
+
estimatedTime: string;
|
|
64
|
+
networkIsBusy: string;
|
|
65
|
+
crossStepDetails: string;
|
|
66
|
+
swapStepDetails: string;
|
|
67
|
+
tokenOnChain: string;
|
|
68
|
+
tokenOnChainAmount: string;
|
|
69
|
+
routeId: string;
|
|
70
|
+
tags: {
|
|
71
|
+
recommended: string;
|
|
72
|
+
fastest: string;
|
|
73
|
+
cheapest: string;
|
|
74
|
+
safest: string;
|
|
75
|
+
general: string;
|
|
76
|
+
};
|
|
77
|
+
success: {
|
|
78
|
+
title: {
|
|
79
|
+
fundsReceived: string;
|
|
80
|
+
};
|
|
81
|
+
message: {
|
|
82
|
+
fundsReceived: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
info: {
|
|
86
|
+
title: {
|
|
87
|
+
routeNotFound: string;
|
|
88
|
+
emptySwapHistory: string;
|
|
89
|
+
};
|
|
90
|
+
message: {
|
|
91
|
+
routeNotFound: string;
|
|
92
|
+
emptySwapHistory: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
warning: {
|
|
96
|
+
title: {
|
|
97
|
+
insufficientGas: string;
|
|
98
|
+
deleteSwap: string;
|
|
99
|
+
deleteSwapHistory: string;
|
|
100
|
+
};
|
|
101
|
+
message: {
|
|
102
|
+
insufficientFunds: string;
|
|
103
|
+
insufficientGas: string;
|
|
104
|
+
deleteSwap: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
error: {
|
|
108
|
+
title: {
|
|
109
|
+
chainSwitch: string;
|
|
110
|
+
transactionFailed: string;
|
|
111
|
+
transactionUnderpriced: string;
|
|
112
|
+
transactionUnprepared: string;
|
|
113
|
+
unknown: string;
|
|
114
|
+
userRejectedSignatureRequest: string;
|
|
115
|
+
slippageTooLarge: string;
|
|
116
|
+
};
|
|
117
|
+
message: {
|
|
118
|
+
signatureRequired: string;
|
|
119
|
+
transactionFailed: string;
|
|
120
|
+
transactionNotSent: string;
|
|
121
|
+
slippageTooLarge: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
process: {
|
|
125
|
+
tokenAllowance: {
|
|
126
|
+
started: string;
|
|
127
|
+
pending: string;
|
|
128
|
+
done: string;
|
|
129
|
+
};
|
|
130
|
+
switchChain: {
|
|
131
|
+
pending: string;
|
|
132
|
+
done: string;
|
|
133
|
+
};
|
|
134
|
+
swap: {
|
|
135
|
+
started: string;
|
|
136
|
+
actionRequired: string;
|
|
137
|
+
pending: string;
|
|
138
|
+
done: string;
|
|
139
|
+
};
|
|
140
|
+
crossChain: {
|
|
141
|
+
started: string;
|
|
142
|
+
actionRequired: string;
|
|
143
|
+
pending: string;
|
|
144
|
+
done: string;
|
|
145
|
+
};
|
|
146
|
+
receivingChain: {
|
|
147
|
+
pending: string;
|
|
148
|
+
done: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
settings: {
|
|
153
|
+
routePriority: string;
|
|
154
|
+
slippage: string;
|
|
155
|
+
gasPrice: {
|
|
156
|
+
title: string;
|
|
157
|
+
slow: string;
|
|
158
|
+
normal: string;
|
|
159
|
+
fast: string;
|
|
160
|
+
};
|
|
161
|
+
advancedPreferences: string;
|
|
162
|
+
enabledBridges: string;
|
|
163
|
+
selectEnabledBridges: string;
|
|
164
|
+
enabledExchanges: string;
|
|
165
|
+
selectEnabledExchanges: string;
|
|
166
|
+
resetToDefault: string;
|
|
167
|
+
};
|
|
168
|
+
wallet: {
|
|
169
|
+
extensionNotFound: string;
|
|
170
|
+
};
|
|
171
|
+
tooltip: {
|
|
172
|
+
notFound: {
|
|
173
|
+
title: string;
|
|
174
|
+
text: string;
|
|
175
|
+
};
|
|
176
|
+
progressToNextUpdate: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
export declare function configureReactI18next(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureReactI18next = exports.resources = exports.defaultNS = void 0;
|
|
7
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
8
|
+
const react_i18next_1 = require("react-i18next");
|
|
9
|
+
const translation_json_1 = __importDefault(require("./en/translation.json"));
|
|
10
|
+
exports.defaultNS = 'translation';
|
|
11
|
+
exports.resources = {
|
|
12
|
+
en: {
|
|
13
|
+
translation: translation_json_1.default,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
function configureReactI18next() {
|
|
17
|
+
i18next_1.default.use(react_i18next_1.initReactI18next).init({
|
|
18
|
+
lng: 'en',
|
|
19
|
+
fallbackLng: 'en',
|
|
20
|
+
lowerCaseLng: true,
|
|
21
|
+
interpolation: {
|
|
22
|
+
escapeValue: false,
|
|
23
|
+
},
|
|
24
|
+
resources: exports.resources,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.configureReactI18next = configureReactI18next;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiFiFullLogo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const LiFiFullLogo = (props) => ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: "84", height: "32", viewBox: "0 0 84 32", fill: "inherit", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M50.6689 20.5714H42.6849V8H39V24H50.6689V20.5714Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M53.0717 24H56.7566V8H53.0717V24Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M59.5088 24H63.0117V20.48H59.5088V24Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M69.4396 17.76H77.1506V14.6057H69.4396V11.2457H77.8103V8H65.7547V24H69.4396V17.76Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M80.3151 24H84V8H80.3151V24Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M14.6163 21.6947L5.1336 23.89C4.78772 23.9766 4.52832 24.3232 4.52832 24.6698V31.1978C4.52832 31.7467 4.96066 32.0933 5.50829 31.9777L18.7379 28.9159C19.2856 28.8004 19.5162 28.2805 19.2856 27.7894L16.8933 22.8501C16.5186 22.0702 16.8933 21.2614 17.7291 21.0881L26.376 19.0084C26.9813 18.864 27.5001 18.2285 27.5001 17.593V11.5561C27.5001 11.0073 27.0677 10.6318 26.5201 10.7762L14.0398 13.7514C13.2616 13.9247 12.9157 14.6757 13.2616 15.3978L15.4521 19.9327C15.8268 20.7126 15.4521 21.4925 14.6163 21.6947Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M8.36225 5.3748L10.841 10.4585C11.1581 11.1229 10.841 11.8161 10.1204 11.9606L5.53762 13.0293C4.96116 13.1737 4.5 13.7514 4.5 14.3291V19.7884C4.5 20.7127 5.24939 21.2904 6.1429 21.0882L10.4087 20.1061C10.9851 19.9906 11.4463 19.384 11.4463 18.8063L11.4751 13.2026C11.4751 12.4227 12.1092 11.6428 12.8586 11.4695L26.8376 8.11886C27.1835 8.03221 27.4429 7.68559 27.4429 7.33897V0.810981C27.4429 0.262168 27.0106 -0.113336 26.4629 0.0310883L8.90988 4.24829C8.36225 4.36383 8.13167 4.88375 8.36225 5.3748Z" })] })));
|
|
6
|
+
exports.LiFiFullLogo = LiFiFullLogo;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiFiLogo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const LiFiLogo = (props) => ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "inherit", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M14.6163 21.6947L5.1336 23.89C4.78772 23.9766 4.52832 24.3232 4.52832 24.6698V31.1978C4.52832 31.7467 4.96066 32.0933 5.50829 31.9777L18.7379 28.9159C19.2856 28.8004 19.5162 28.2805 19.2856 27.7894L16.8933 22.8501C16.5186 22.0702 16.8933 21.2614 17.7291 21.0881L26.376 19.0084C26.9813 18.864 27.5001 18.2285 27.5001 17.593V11.5561C27.5001 11.0073 27.0677 10.6318 26.5201 10.7762L14.0398 13.7514C13.2616 13.9247 12.9157 14.6757 13.2616 15.3978L15.4521 19.9327C15.8268 20.7126 15.4521 21.4925 14.6163 21.6947Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M8.36225 5.3748L10.841 10.4585C11.1581 11.1229 10.841 11.8161 10.1204 11.9606L5.53762 13.0293C4.96116 13.1737 4.5 13.7514 4.5 14.3291V19.7884C4.5 20.7127 5.24939 21.2904 6.1429 21.0882L10.4087 20.1061C10.9851 19.9906 11.4463 19.384 11.4463 18.8063L11.4751 13.2026C11.4751 12.4227 12.1092 11.6428 12.8586 11.4695L26.8376 8.11886C27.1835 8.03221 27.4429 7.68559 27.4429 7.33897V0.810981C27.4429 0.262168 27.0106 -0.113336 26.4629 0.0310883L8.90988 4.24829C8.36225 4.36383 8.13167 4.88375 8.36225 5.3748Z" })] })));
|
|
6
|
+
exports.LiFiLogo = LiFiLogo;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiFiToolLogo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const LiFiToolLogo = (props) => ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: "16", cy: "16", r: "16", fill: "#F5B5FF" }), (0, jsx_runtime_1.jsx)("path", { d: "M15.5031 19.2031L10.1691 20.4379C9.97453 20.4867 9.82861 20.6816 9.82861 20.8766V24.5486C9.82861 24.8573 10.0718 25.0523 10.3798 24.9873L17.8215 23.265C18.1296 23.2 18.2593 22.9076 18.1296 22.6314L16.7839 19.853C16.5731 19.4143 16.7839 18.9594 17.2541 18.8619L22.1179 17.692C22.4584 17.6108 22.7502 17.2534 22.7502 16.8959V13.5001C22.7502 13.1914 22.507 12.9802 22.199 13.0614L15.1788 14.735C14.7411 14.8324 14.5465 15.2549 14.7411 15.6611L15.9733 18.212C16.184 18.6507 15.9733 19.0893 15.5031 19.2031Z", fill: "black" }), (0, jsx_runtime_1.jsx)("path", { d: "M11.985 10.0233L13.3793 12.8829C13.5577 13.2566 13.3793 13.6466 12.974 13.7278L10.3962 14.329C10.0719 14.4102 9.8125 14.7352 9.8125 15.0601V18.1309C9.8125 18.6509 10.234 18.9758 10.7366 18.8621L13.1361 18.3097C13.4604 18.2447 13.7198 17.9035 13.7198 17.5785L13.736 14.4265C13.736 13.9878 14.0927 13.5491 14.5142 13.4516L22.3774 11.5669C22.572 11.5181 22.7179 11.3231 22.7179 11.1282V7.45618C22.7179 7.14747 22.4747 6.93625 22.1666 7.01749L12.2931 9.38966C11.985 9.45465 11.8553 9.74711 11.985 10.0233Z", fill: "black" })] })));
|
|
6
|
+
exports.LiFiToolLogo = LiFiToolLogo;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./LiFiFullLogo"), exports);
|
|
18
|
+
__exportStar(require("./LiFiLogo"), exports);
|
|
19
|
+
__exportStar(require("./LiFiToolLogo"), exports);
|
package/cjs/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './fonts/inter.css';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export declare const LiFiWidget: import("react").FC<import("./AppProvider").AppProps>;
|
|
5
|
+
export declare const LiFiWidgetDrawer: import("react").ForwardRefExoticComponent<Pick<import("./AppDrawer").AppDrawerProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "elementRef" | "components" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "config" | "elevation" | "ModalProps" | "PaperProps" | "SlideProps"> & import("react").RefAttributes<import("./AppDrawer").AppDrawerBase>>;
|
package/cjs/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.LiFiWidgetDrawer = exports.LiFiWidget = void 0;
|
|
18
|
+
const App_1 = require("./App");
|
|
19
|
+
const AppDrawer_1 = require("./AppDrawer");
|
|
20
|
+
require("./fonts/inter.css");
|
|
21
|
+
const i18n_1 = require("./i18n");
|
|
22
|
+
__exportStar(require("./types"), exports);
|
|
23
|
+
(0, i18n_1.configureReactI18next)();
|
|
24
|
+
// ClassNameGenerator.configure((componentName) =>
|
|
25
|
+
// componentName.replace('Mui', 'LiFi'),
|
|
26
|
+
// );
|
|
27
|
+
exports.LiFiWidget = App_1.App;
|
|
28
|
+
exports.LiFiWidgetDrawer = AppDrawer_1.AppDrawer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MainPage = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const SelectChainAndToken_1 = require("../../components/SelectChainAndToken");
|
|
7
|
+
const SwapInProgress_1 = require("../../components/SwapInProgress");
|
|
8
|
+
const SwapInput_1 = require("../../components/SwapInput");
|
|
9
|
+
const MainPage_style_1 = require("./MainPage.style");
|
|
10
|
+
const MainSwapButton_1 = require("./MainSwapButton");
|
|
11
|
+
const SwapRoutes_1 = require("./SwapRoutes");
|
|
12
|
+
const MainPage = () => {
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, Object.assign({ disableGutters: true }, { children: [(0, jsx_runtime_1.jsx)(SwapInProgress_1.SwapInProgress, { mx: 3, mt: 1, mb: 2 }), (0, jsx_runtime_1.jsx)(SelectChainAndToken_1.SelectChainAndToken, { mt: 1, mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mx: 3, mb: 3 }, { children: (0, jsx_runtime_1.jsx)(SwapInput_1.SwapInput, { formType: "from" }) })), (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutes, { mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mx: 3, mb: 1 }, { children: (0, jsx_runtime_1.jsx)(MainSwapButton_1.MainSwapButton, {}) }))] })));
|
|
14
|
+
};
|
|
15
|
+
exports.MainPage = MainPage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const FormContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
classes?: Partial<import("@mui/material").ContainerClasses> | undefined;
|
|
5
|
+
disableGutters?: boolean | undefined;
|
|
6
|
+
fixed?: boolean | undefined;
|
|
7
|
+
maxWidth?: false | import("@mui/material").Breakpoint | undefined;
|
|
8
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
9
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
10
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
11
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "maxWidth" | "fixed" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormContainer = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
exports.FormContainer = (0, styles_1.styled)(material_1.Container)({
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
flexGrow: 1,
|
|
10
|
+
position: 'relative',
|
|
11
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MainSwapButton = void 0;
|
|
13
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
14
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
15
|
+
const SwapButton_1 = require("../../components/SwapButton");
|
|
16
|
+
const hooks_1 = require("../../hooks");
|
|
17
|
+
const stores_1 = require("../../stores");
|
|
18
|
+
const utils_1 = require("../../utils");
|
|
19
|
+
const MainSwapButton = () => {
|
|
20
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
21
|
+
const setExecutableRoute = (0, stores_1.useSetExecutableRoute)();
|
|
22
|
+
const { routes: swapRoutes, isLoading, isFetching } = (0, hooks_1.useSwapRoutes)();
|
|
23
|
+
const currentRoute = swapRoutes === null || swapRoutes === void 0 ? void 0 : swapRoutes[0];
|
|
24
|
+
const handleClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
if (currentRoute) {
|
|
26
|
+
setExecutableRoute(currentRoute);
|
|
27
|
+
navigate(utils_1.navigationRoutes.swapExecution, {
|
|
28
|
+
state: { routeId: currentRoute.id },
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: handleClick, currentRoute: currentRoute, loading: isLoading || isFetching || !currentRoute }));
|
|
33
|
+
};
|
|
34
|
+
exports.MainSwapButton = MainSwapButton;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SwapRoutes = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/* eslint-disable react/no-array-index-key */
|
|
6
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const react_i18next_1 = require("react-i18next");
|
|
10
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
11
|
+
const Card_1 = require("../../components/Card");
|
|
12
|
+
const GasSufficiencyMessage_1 = require("../../components/GasSufficiencyMessage");
|
|
13
|
+
const ProgressToNextUpdate_1 = require("../../components/ProgressToNextUpdate");
|
|
14
|
+
const SwapRouteCard_1 = require("../../components/SwapRouteCard");
|
|
15
|
+
const hooks_1 = require("../../hooks");
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
17
|
+
const SwapRoutes_style_1 = require("./SwapRoutes.style");
|
|
18
|
+
const SwapRoutes = (props) => {
|
|
19
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
20
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
21
|
+
const { routes, isLoading, isFetching, isFetched, dataUpdatedAt, refetchTime, refetch, } = (0, hooks_1.useSwapRoutes)();
|
|
22
|
+
const handleCardClick = (0, react_1.useCallback)(() => {
|
|
23
|
+
navigate(utils_1.navigationRoutes.swapRoutes);
|
|
24
|
+
}, [navigate]);
|
|
25
|
+
const currentRoute = routes === null || routes === void 0 ? void 0 : routes[0];
|
|
26
|
+
if (!currentRoute && !isLoading && !isFetching && !isFetched) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const routeNotFound = !currentRoute && !isLoading && !isFetching;
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({}, props, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t('swap.routes') }), (0, jsx_runtime_1.jsx)(ProgressToNextUpdate_1.ProgressToNextUpdate, { updatedAt: dataUpdatedAt || new Date().getTime(), timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
top: 8,
|
|
33
|
+
right: 8,
|
|
34
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: 'flex' } }, { children: [(0, jsx_runtime_1.jsx)(SwapRoutes_style_1.Stack, Object.assign({ direction: "row", spacing: 2, my: 2, ml: 2, mr: routeNotFound ? 2 : 1, sx: {
|
|
35
|
+
borderWidth: !routeNotFound && (isFetching || (routes && routes.length > 1))
|
|
36
|
+
? 1
|
|
37
|
+
: 0,
|
|
38
|
+
} }, { children: isLoading || isFetching ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { minWidth: "80%", dense: true }), (0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { minWidth: "80%", dense: true })] })) : !currentRoute ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteNotFoundCard, { minWidth: "100%", dense: true })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { minWidth: routes.length > 1 ? '80%' : '100%', route: currentRoute, active: true, dense: true }), routes.length > 1 ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { minWidth: "80%", route: routes[1], dense: true })) : null] })) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' } }, { children: !routeNotFound ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ py: 1, pr: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleCardClick, size: "medium", "aria-label": "swap-routes" }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) })) }))) : null }))] }))] })), (0, jsx_runtime_1.jsx)(GasSufficiencyMessage_1.GasSufficiencyMessage, Object.assign({ route: !isFetching ? currentRoute : undefined }, props))] }));
|
|
39
|
+
};
|
|
40
|
+
exports.SwapRoutes = SwapRoutes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Stack: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
3
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
direction?: import("@mui/system").ResponsiveStyleValue<"row" | "column" | "column-reverse" | "row-reverse"> | undefined;
|
|
6
|
+
spacing?: import("@mui/system").ResponsiveStyleValue<string | number> | undefined;
|
|
7
|
+
divider?: import("react").ReactNode;
|
|
8
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
9
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
10
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
11
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | "direction" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "spacing"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Stack = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
exports.Stack = (0, styles_1.styled)(material_1.Stack)(({ theme }) => ({
|
|
7
|
+
alignItems: 'stretch',
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flex: 1,
|
|
10
|
+
flexWrap: 'nowrap',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
borderRight: `solid ${theme.palette.mode === 'light'
|
|
13
|
+
? theme.palette.grey[300]
|
|
14
|
+
: theme.palette.grey[800]}`,
|
|
15
|
+
width: 'calc(100% - 48px)',
|
|
16
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MainPage';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MainPage"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChainSelect = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
8
|
+
const react_i18next_1 = require("react-i18next");
|
|
9
|
+
const Card_1 = require("../../components/Card");
|
|
10
|
+
const Select_1 = require("../../components/Select");
|
|
11
|
+
const hooks_1 = require("../../hooks");
|
|
12
|
+
const SwapFormProvider_1 = require("../../providers/SwapFormProvider");
|
|
13
|
+
const WidgetProvider_1 = require("../../providers/WidgetProvider");
|
|
14
|
+
const ChainSelect = ({ formType }) => {
|
|
15
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
16
|
+
const { setValue, register } = (0, react_hook_form_1.useFormContext)();
|
|
17
|
+
const { fromChain, toChain } = (0, WidgetProvider_1.useWidgetConfig)();
|
|
18
|
+
const { chains, isLoading } = (0, hooks_1.useChains)();
|
|
19
|
+
const chainKey = SwapFormProvider_1.SwapFormKeyHelper.getChainKey(formType);
|
|
20
|
+
const [chainId] = (0, react_hook_form_1.useWatch)({
|
|
21
|
+
name: [chainKey],
|
|
22
|
+
});
|
|
23
|
+
const { onChange, onBlur, name, ref } = register(chainKey);
|
|
24
|
+
const handleChain = (event) => {
|
|
25
|
+
onChange(event);
|
|
26
|
+
setValue(SwapFormProvider_1.SwapFormKeyHelper.getTokenKey(formType), '');
|
|
27
|
+
setValue(SwapFormProvider_1.SwapFormKeyHelper.getAmountKey(formType), '');
|
|
28
|
+
setValue(SwapFormProvider_1.SwapFormKey.TokenSearchFilter, '');
|
|
29
|
+
};
|
|
30
|
+
return !isLoading ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`swap.selectChain`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Select_1.Select, Object.assign({ ref: ref, labelId: chainKey, name: name, MenuProps: { elevation: 2 }, defaultValue: formType === 'from' ? fromChain : toChain, value: chainId, onChange: handleChain, onBlur: onBlur, IconComponent: icons_material_1.KeyboardArrowDown }, { children: chains === null || chains === void 0 ? void 0 : chains.map((chain) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: chain.id }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: chain.logoURI, alt: chain.key }, { children: chain.name[0] })) }), chain.name] }), chain.key))) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: "100%", height: 98, sx: { borderRadius: 1 } }));
|
|
31
|
+
};
|
|
32
|
+
exports.ChainSelect = ChainSelect;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchTokenInput = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
9
|
+
const react_i18next_1 = require("react-i18next");
|
|
10
|
+
const Card_1 = require("../../components/Card");
|
|
11
|
+
const SwapFormProvider_1 = require("../../providers/SwapFormProvider");
|
|
12
|
+
const SearchTokenInput_style_1 = require("./SearchTokenInput.style");
|
|
13
|
+
const SearchTokenInput = () => {
|
|
14
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
15
|
+
const { register, setValue } = (0, react_hook_form_1.useFormContext)();
|
|
16
|
+
(0, react_1.useEffect)(() => () => {
|
|
17
|
+
setValue(SwapFormProvider_1.SwapFormKey.TokenSearchFilter, '');
|
|
18
|
+
}, [setValue]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(Card_1.Card, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(SearchTokenInput_style_1.Input, { size: "small", placeholder: t(`swap.tokenSearch`), defaultValue: "", endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.Search, {}) })), inputProps: Object.assign({ inputMode: 'search' }, register(SwapFormProvider_1.SwapFormKey.TokenSearchFilter)), autoComplete: "off" }) })) }));
|
|
20
|
+
};
|
|
21
|
+
exports.SearchTokenInput = SearchTokenInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Input: import("@emotion/styled").StyledComponent<import("@mui/material").InputBaseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Input = void 0;
|
|
4
|
+
const styles_1 = require("@mui/material/styles");
|
|
5
|
+
const Input_1 = require("../../components/Input");
|
|
6
|
+
exports.Input = (0, styles_1.styled)(Input_1.Input)(({ theme }) => ({
|
|
7
|
+
paddingRight: theme.spacing(1.5),
|
|
8
|
+
}));
|