@lifi/widget 1.13.2 → 1.13.5
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/App.d.ts +1 -1
- package/AppDrawer.d.ts +3 -3
- package/AppProvider.d.ts +2 -2
- package/AppProvider.js +1 -3
- 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 +29 -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 +4 -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 +174 -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/AppContainer.d.ts +1 -1
- package/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/components/BottomSheet/types.d.ts +2 -2
- package/components/Card/Card.d.ts +1 -1
- package/components/Dialog.d.ts +2 -2
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.d.ts +2 -2
- package/components/Header/Header.d.ts +1 -1
- package/components/Header/useHeaderActionStore.d.ts +1 -1
- package/components/LiFiLogo.d.ts +1 -1
- package/components/ProgressToNextUpdate/ProgressToNextUpdate.d.ts +1 -1
- package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +1 -1
- package/components/SelectChainAndToken.d.ts +1 -1
- package/components/SelectTokenButton/SelectTokenButton.d.ts +1 -1
- package/components/SelectTokenButton/SelectTokenButton.js +1 -1
- package/components/Step/CircularProgress.d.ts +1 -1
- package/components/Step/CircularProgress.style.d.ts +2 -2
- package/components/Step/Step.d.ts +1 -1
- package/components/Step/StepProcess.d.ts +1 -1
- package/components/Step/StepTimer.d.ts +1 -1
- package/components/Step/utils.d.ts +2 -2
- package/components/Step/utils.js +1 -1
- package/components/StepActions/StepActions.d.ts +2 -2
- package/components/StepActions/StepActions.js +1 -1
- package/components/StepActions/types.d.ts +2 -2
- package/components/SwapButton/SwapButton.d.ts +1 -1
- package/components/SwapInProgress/SwapInProgress.d.ts +1 -1
- package/components/SwapInput/FormPriceHelperText.d.ts +1 -1
- package/components/SwapInput/FormPriceHelperText.js +1 -1
- package/components/SwapInput/SwapInput.d.ts +1 -1
- package/components/SwapInput/SwapInput.js +1 -1
- package/components/SwapInput/SwapInputAdornment.d.ts +1 -1
- package/components/SwapInput/SwapInputAdornment.js +1 -1
- package/components/SwapRouteCard/SwapRouteCard.d.ts +2 -2
- package/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +2 -2
- package/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +2 -2
- package/components/SwapRouteCard/types.d.ts +1 -1
- package/components/TextFitter/TextFitter.d.ts +2 -2
- package/components/TextFitter/TextFitter.js +1 -1
- package/components/TextFitter/types.d.ts +1 -1
- package/components/Token/Token.d.ts +2 -2
- package/components/TokenAvatar/TokenAvatar.d.ts +2 -2
- package/components/TokenList/TokenList.d.ts +2 -2
- package/components/TokenList/TokenListItem.d.ts +1 -1
- package/components/TokenList/VirtualizedTokenList.d.ts +2 -2
- package/components/TokenList/types.d.ts +4 -4
- package/config/lifi.d.ts +2 -1
- package/config/theme.d.ts +2 -2
- package/config/theme.js +3 -4
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useGasSufficiency.d.ts +1 -1
- package/hooks/useRouteExecution.d.ts +1 -1
- package/hooks/useTokenBalances.d.ts +1 -1
- package/hooks/useTokenSearch.d.ts +1 -1
- package/hooks/useTokens.d.ts +1 -1
- package/hooks/useTools.d.ts +1 -1
- package/icons/LiFiFullLogo.d.ts +1 -1
- package/icons/LiFiLogo.d.ts +1 -1
- package/icons/LiFiToolLogo.d.ts +1 -1
- package/index.js +3 -1
- package/package.json +25 -11
- package/pages/MainPage/SwapRoutes.d.ts +1 -1
- package/pages/SelectTokenPage/ChainSelect.d.ts +1 -1
- package/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -2
- package/pages/SwapHistoryPage/SwapHistoryItem.d.ts +1 -1
- package/pages/SwapPage/StatusBottomSheet.d.ts +1 -1
- package/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
- package/pages/SwapPage/utils.d.ts +2 -2
- package/pages/SwapPage/utils.js +1 -1
- package/pages/SwapRoutesPage/SwapRoutesPage.d.ts +1 -1
- package/providers/WalletProvider/WalletProvider.d.ts +3 -3
- package/providers/WalletProvider/types.d.ts +3 -3
- package/providers/WidgetProvider/types.d.ts +1 -1
- package/stores/route/types.d.ts +1 -1
- package/stores/route/useExecutingRoutes.d.ts +1 -1
- package/stores/route/useSwapHistory.d.ts +1 -1
- package/stores/settings/types.d.ts +2 -2
- package/stores/settings/useAppearance.d.ts +1 -1
- package/stores/settings/useSetSettings.d.ts +1 -1
- package/stores/settings/useSettings.d.ts +1 -1
- package/stores/settings/useSettingsStore.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -0
- package/types/token.d.ts +1 -1
- package/types/widget.d.ts +5 -5
- package/utils/colors.d.ts +2 -2
- package/utils/colors.js +4 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const CardHeader: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
action?: import("react").ReactNode;
|
|
4
|
+
avatar?: import("react").ReactNode;
|
|
5
|
+
classes?: Partial<import("@mui/material").CardHeaderClasses> | undefined;
|
|
6
|
+
disableTypography?: boolean | undefined;
|
|
7
|
+
subheader?: import("react").ReactNode;
|
|
8
|
+
subheaderTypographyProps?: import("@mui/material").TypographyProps<"span", {
|
|
9
|
+
component?: "span" | undefined;
|
|
10
|
+
}> | undefined;
|
|
11
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
12
|
+
title?: import("react").ReactNode;
|
|
13
|
+
titleTypographyProps?: import("@mui/material").TypographyProps<"span", {
|
|
14
|
+
component?: "span" | undefined;
|
|
15
|
+
}> | undefined;
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
17
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
18
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "title" | "action" | "sx" | "avatar" | "disableTypography" | "subheader" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardHeader = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const CardHeader_1 = require("@mui/material/CardHeader");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
exports.CardHeader = (0, styles_1.styled)(material_1.CardHeader)(({ theme }) => ({
|
|
8
|
+
[`.${CardHeader_1.cardHeaderClasses.action}`]: {
|
|
9
|
+
marginTop: -2,
|
|
10
|
+
alignSelf: 'center',
|
|
11
|
+
},
|
|
12
|
+
[`.${CardHeader_1.cardHeaderClasses.title}`]: {
|
|
13
|
+
fontWeight: '500',
|
|
14
|
+
fontSize: '1.125rem',
|
|
15
|
+
lineHeight: '1.2778',
|
|
16
|
+
color: theme.palette.text.primary,
|
|
17
|
+
},
|
|
18
|
+
[`.${CardHeader_1.cardHeaderClasses.subheader}`]: {
|
|
19
|
+
fontWeight: '400',
|
|
20
|
+
fontSize: '0.75rem',
|
|
21
|
+
color: theme.palette.text.secondary,
|
|
22
|
+
},
|
|
23
|
+
}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const CardTitle: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
3
|
+
align?: "inherit" | "left" | "right" | "center" | "justify" | undefined;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
6
|
+
gutterBottom?: boolean | undefined;
|
|
7
|
+
noWrap?: boolean | undefined;
|
|
8
|
+
paragraph?: boolean | undefined;
|
|
9
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
10
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
|
|
11
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)", string>> | undefined;
|
|
12
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | ("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") | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardTitle = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
exports.CardTitle = (0, styles_1.styled)(material_1.Typography)(({ theme }) => ({
|
|
7
|
+
fontSize: '0.875rem',
|
|
8
|
+
lineHeight: '1.286',
|
|
9
|
+
letterSpacing: '0.01071em',
|
|
10
|
+
fontWeight: 700,
|
|
11
|
+
padding: theme.spacing(1.75, 2, 0, 2),
|
|
12
|
+
}));
|
|
@@ -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("./Card"), exports);
|
|
18
|
+
__exportStar(require("./CardHeader"), exports);
|
|
19
|
+
__exportStar(require("./CardTitle"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dialog = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const hooks_1 = require("../hooks");
|
|
7
|
+
const Dialog = ({ children, open, onClose, }) => {
|
|
8
|
+
const containerElement = (0, hooks_1.useScrollableContainer)();
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Dialog, Object.assign({ open: open, onClose: onClose, container: containerElement, sx: {
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
}, PaperProps: {
|
|
13
|
+
sx: (theme) => ({
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
backgroundImage: 'none',
|
|
16
|
+
borderTopLeftRadius: theme.shape.borderRadius,
|
|
17
|
+
borderTopRightRadius: theme.shape.borderRadius,
|
|
18
|
+
}),
|
|
19
|
+
}, BackdropProps: {
|
|
20
|
+
sx: {
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
backgroundColor: 'rgb(0 0 0 / 32%)',
|
|
23
|
+
backdropFilter: 'blur(3px)',
|
|
24
|
+
},
|
|
25
|
+
} }, { children: children })));
|
|
26
|
+
};
|
|
27
|
+
exports.Dialog = Dialog;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.GasSufficiencyMessage = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
17
|
+
const material_1 = require("@mui/material");
|
|
18
|
+
const react_i18next_1 = require("react-i18next");
|
|
19
|
+
const hooks_1 = require("../../hooks");
|
|
20
|
+
const Card_1 = require("../Card");
|
|
21
|
+
const GasSufficiencyMessage_style_1 = require("./GasSufficiencyMessage.style");
|
|
22
|
+
const GasSufficiencyMessage = (_a) => {
|
|
23
|
+
var { route } = _a, props = __rest(_a, ["route"]);
|
|
24
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
25
|
+
const { insufficientFunds, insufficientGas } = (0, hooks_1.useGasSufficiency)(route);
|
|
26
|
+
if (!insufficientFunds && !insufficientGas.length) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)(GasSufficiencyMessage_style_1.MessageCard, Object.assign({}, props, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.WarningAmber, { sx: {
|
|
30
|
+
marginTop: 2,
|
|
31
|
+
marginLeft: 2,
|
|
32
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [insufficientGas.length ? ((0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`swap.warning.title.insufficientGas`) })) : null, insufficientFunds ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", px: 2, pb: insufficientGas.length ? 0 : 2, pt: insufficientGas.length ? 1 : 2 }, { children: insufficientFunds
|
|
33
|
+
? t(`swap.warning.message.insufficientFunds`)
|
|
34
|
+
: null }))) : null, insufficientGas.length ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", px: 2, pt: 1 }, { children: t(`swap.warning.message.insufficientGas`) }))) : null, insufficientGas.length
|
|
35
|
+
? insufficientGas.map((item, index) => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", px: 2, pb: insufficientGas.length - 1 === index ? 2 : 0, pt: 0.5 }, { children: t(`swap.tokenOnChainAmount`, {
|
|
38
|
+
amount: (_a = item.insufficientAmount) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
39
|
+
tokenSymbol: item.token.symbol,
|
|
40
|
+
chainName: (_b = item.chain) === null || _b === void 0 ? void 0 : _b.name,
|
|
41
|
+
}) }), index));
|
|
42
|
+
})
|
|
43
|
+
: null] })] })));
|
|
44
|
+
};
|
|
45
|
+
exports.GasSufficiencyMessage = GasSufficiencyMessage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const MessageCard: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
component?: import("react").ElementType<any> | undefined;
|
|
5
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
6
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
7
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
9
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("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") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageCard = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
exports.MessageCard = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
7
|
+
backgroundColor: theme.palette.mode === 'light'
|
|
8
|
+
? theme.palette.warning.main
|
|
9
|
+
: (0, styles_1.alpha)(theme.palette.warning.main, 0.42),
|
|
10
|
+
borderRadius: theme.shape.borderRadius,
|
|
11
|
+
position: 'relative',
|
|
12
|
+
display: 'flex',
|
|
13
|
+
whiteSpace: 'pre-line',
|
|
14
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GasSufficiencyMessage';
|
|
@@ -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("./GasSufficiencyMessage"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Header = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
const WidgetProvider_1 = require("../../providers/WidgetProvider");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const Header_style_1 = require("./Header.style");
|
|
9
|
+
const NavigationHeader_1 = require("./NavigationHeader");
|
|
10
|
+
const WalletHeader_1 = require("./WalletHeader");
|
|
11
|
+
const stickyHeaderRoutes = [
|
|
12
|
+
utils_1.navigationRoutes.selectWallet,
|
|
13
|
+
utils_1.navigationRoutes.settings,
|
|
14
|
+
utils_1.navigationRoutes.swapRoutes,
|
|
15
|
+
utils_1.navigationRoutes.swapExecution,
|
|
16
|
+
utils_1.navigationRoutes.swapHistory,
|
|
17
|
+
utils_1.navigationRoutes.swapDetails,
|
|
18
|
+
];
|
|
19
|
+
const HeaderContainer = ({ children }) => {
|
|
20
|
+
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.Container, Object.assign({ id: utils_1.ElementId.Header, sticky: stickyHeaderRoutes.some((route) => pathname.includes(route)) }, { children: children })));
|
|
22
|
+
};
|
|
23
|
+
const Header = () => {
|
|
24
|
+
const { walletManagement } = (0, WidgetProvider_1.useWidgetConfig)();
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(HeaderContainer, { children: [!walletManagement ? (0, jsx_runtime_1.jsx)(WalletHeader_1.WalletHeader, {}) : null, (0, jsx_runtime_1.jsx)(NavigationHeader_1.NavigationHeader, {})] }));
|
|
26
|
+
};
|
|
27
|
+
exports.Header = Header;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").PaperProps<"div", {}>, "classes" | "color" | "position"> & {
|
|
3
|
+
classes?: Partial<import("@mui/material").AppBarClasses> | undefined;
|
|
4
|
+
color?: "inherit" | "transparent" | "default" | "primary" | "secondary" | undefined;
|
|
5
|
+
enableColorOnDark?: boolean | undefined;
|
|
6
|
+
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
7
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
8
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").HTMLAttributes<HTMLElement> | "key"> & {
|
|
9
|
+
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
10
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "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" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
|
+
export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
12
|
+
children?: import("react").ReactNode;
|
|
13
|
+
component?: import("react").ElementType<any> | undefined;
|
|
14
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
15
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
17
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
18
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("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") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
19
|
+
sticky?: boolean | undefined;
|
|
20
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Container = exports.HeaderAppBar = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
exports.HeaderAppBar = (0, styles_1.styled)(material_1.AppBar)(({ theme }) => ({
|
|
7
|
+
backgroundColor: theme.palette.background.default,
|
|
8
|
+
color: theme.palette.text.primary,
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
position: 'relative',
|
|
12
|
+
minHeight: 40,
|
|
13
|
+
padding: theme.spacing(0, 3, 0, 3),
|
|
14
|
+
':first-of-type': {
|
|
15
|
+
paddingTop: theme.spacing(1.5),
|
|
16
|
+
paddingBottom: theme.spacing(0.5),
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
exports.Container = (0, styles_1.styled)(material_1.Box, {
|
|
20
|
+
shouldForwardProp: (prop) => prop !== 'sticky',
|
|
21
|
+
})(({ theme, sticky }) => ({
|
|
22
|
+
backgroundColor: theme.palette.background.default,
|
|
23
|
+
position: sticky ? 'sticky' : 'relative',
|
|
24
|
+
top: 0,
|
|
25
|
+
zIndex: 1200,
|
|
26
|
+
}));
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationHeader = 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_i18next_1 = require("react-i18next");
|
|
8
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
9
|
+
const WalletProvider_1 = require("../../providers/WalletProvider");
|
|
10
|
+
const utils_1 = require("../../utils");
|
|
11
|
+
const Header_style_1 = require("./Header.style");
|
|
12
|
+
const useHeaderActionStore_1 = require("./useHeaderActionStore");
|
|
13
|
+
const backButtonRoutes = [
|
|
14
|
+
utils_1.navigationRoutes.selectWallet,
|
|
15
|
+
utils_1.navigationRoutes.settings,
|
|
16
|
+
utils_1.navigationRoutes.swapHistory,
|
|
17
|
+
utils_1.navigationRoutes.fromToken,
|
|
18
|
+
utils_1.navigationRoutes.toToken,
|
|
19
|
+
utils_1.navigationRoutes.swapRoutes,
|
|
20
|
+
utils_1.navigationRoutes.swapExecution,
|
|
21
|
+
utils_1.navigationRoutes.swapDetails,
|
|
22
|
+
];
|
|
23
|
+
const NavigationHeader = () => {
|
|
24
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
25
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
26
|
+
const { account } = (0, WalletProvider_1.useWallet)();
|
|
27
|
+
const { element } = (0, useHeaderActionStore_1.useHeaderActionStore)();
|
|
28
|
+
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
29
|
+
const path = pathname.substring(pathname.lastIndexOf('/') + 1);
|
|
30
|
+
const hasPath = utils_1.navigationRoutesValues.includes(path);
|
|
31
|
+
const handleBack = () => {
|
|
32
|
+
navigate(-1);
|
|
33
|
+
};
|
|
34
|
+
const handleHeaderTitle = () => {
|
|
35
|
+
switch (path) {
|
|
36
|
+
case utils_1.navigationRoutes.selectWallet:
|
|
37
|
+
return t(`header.selectWallet`);
|
|
38
|
+
case utils_1.navigationRoutes.settings:
|
|
39
|
+
return t(`header.settings`);
|
|
40
|
+
case utils_1.navigationRoutes.swapHistory:
|
|
41
|
+
return t(`header.swapHistory`);
|
|
42
|
+
case utils_1.navigationRoutes.fromToken:
|
|
43
|
+
return t(`header.from`);
|
|
44
|
+
case utils_1.navigationRoutes.toToken:
|
|
45
|
+
return t(`header.to`);
|
|
46
|
+
case utils_1.navigationRoutes.swapRoutes:
|
|
47
|
+
return t(`header.routes`);
|
|
48
|
+
case utils_1.navigationRoutes.swapExecution:
|
|
49
|
+
return t(`header.swap`);
|
|
50
|
+
case utils_1.navigationRoutes.swapDetails:
|
|
51
|
+
return t(`header.swapDetails`);
|
|
52
|
+
default:
|
|
53
|
+
return t(`header.swap`);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: [backButtonRoutes.includes(path) ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "start", onClick: handleBack }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.ArrowBack, {}) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true }, { children: handleHeaderTitle() })), (0, jsx_runtime_1.jsxs)(react_router_dom_1.Routes, { children: [(0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: utils_1.navigationRoutes.home, element: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [account.isActive ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "swap-history", edge: "start", onClick: () => navigate(utils_1.navigationRoutes.swapHistory) }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.History, {}) }))) : null, (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: () => navigate(utils_1.navigationRoutes.settings) }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.SettingsOutlined, {}) }))] }) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "*", element: element || (0, jsx_runtime_1.jsx)(material_1.Box, { width: 28, height: 40 }) })] })] })));
|
|
57
|
+
};
|
|
58
|
+
exports.NavigationHeader = NavigationHeader;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.WalletHeader = void 0;
|
|
13
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
14
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
15
|
+
const material_1 = require("@mui/material");
|
|
16
|
+
const react_i18next_1 = require("react-i18next");
|
|
17
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
18
|
+
const WalletProvider_1 = require("../../providers/WalletProvider");
|
|
19
|
+
const WidgetProvider_1 = require("../../providers/WidgetProvider");
|
|
20
|
+
const utils_1 = require("../../utils");
|
|
21
|
+
const Header_style_1 = require("./Header.style");
|
|
22
|
+
const WalletHeader = () => {
|
|
23
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
24
|
+
const { account, disconnect } = (0, WalletProvider_1.useWallet)();
|
|
25
|
+
const walletAddress = account.address
|
|
26
|
+
? `${account.address.substring(0, 7)}...${account.address.substring(account.address.length - 7)}`
|
|
27
|
+
: null;
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: walletAddress ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flex: 1,
|
|
31
|
+
flexDirection: 'column',
|
|
32
|
+
}, mr: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "caption", align: "right" }, { children: t(`header.walletConnected`) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600" }, { children: walletAddress }))] })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "disconnect", edge: "end", onClick: disconnect }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.Logout, {}) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600", flex: 1, mr: 0.5 }, { children: t(`header.connectWallet`) })), (0, jsx_runtime_1.jsx)(ConnectButton, {})] })) })));
|
|
33
|
+
};
|
|
34
|
+
exports.WalletHeader = WalletHeader;
|
|
35
|
+
const ConnectButton = () => {
|
|
36
|
+
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
37
|
+
const config = (0, WidgetProvider_1.useWidgetConfig)();
|
|
38
|
+
const { connect: walletConnect } = (0, WalletProvider_1.useWallet)();
|
|
39
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
40
|
+
const connect = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
if (config.walletManagement) {
|
|
42
|
+
yield walletConnect();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
navigate(utils_1.navigationRoutes.selectWallet);
|
|
46
|
+
});
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "disconnect", edge: "end", onClick: !pathname.includes(utils_1.navigationRoutes.selectWallet) ? connect : undefined }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.AccountBalanceWalletOutlined, {}) })));
|
|
48
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./Header"), exports);
|
|
18
|
+
__exportStar(require("./useHeaderActionStore"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { HeaderActionStore } from './types';
|
|
3
|
+
export declare const useHeaderActionStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<HeaderActionStore>, "setState"> & {
|
|
4
|
+
setState(nextStateOrUpdater: HeaderActionStore | Partial<HeaderActionStore> | ((state: import("immer/dist/internal").WritableDraft<HeaderActionStore>) => void), shouldReplace?: boolean | undefined): void;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const useSetHeaderAction: () => (element?: import("react").ReactNode) => () => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
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.useSetHeaderAction = exports.useHeaderActionStore = void 0;
|
|
7
|
+
/* eslint-disable no-underscore-dangle */
|
|
8
|
+
const zustand_1 = __importDefault(require("zustand"));
|
|
9
|
+
const immer_1 = require("zustand/middleware/immer");
|
|
10
|
+
exports.useHeaderActionStore = (0, zustand_1.default)()((0, immer_1.immer)((set, get) => ({
|
|
11
|
+
setAction: (element) => {
|
|
12
|
+
set((state) => {
|
|
13
|
+
state.element = element;
|
|
14
|
+
});
|
|
15
|
+
return get().removeAction;
|
|
16
|
+
},
|
|
17
|
+
removeAction: () => {
|
|
18
|
+
set((state) => {
|
|
19
|
+
state.element = null;
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
})));
|
|
23
|
+
const useSetHeaderAction = () => {
|
|
24
|
+
return (0, exports.useHeaderActionStore)((state) => state.setAction);
|
|
25
|
+
};
|
|
26
|
+
exports.useSetHeaderAction = useSetHeaderAction;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Initializer = void 0;
|
|
4
|
+
const hooks_1 = require("../hooks");
|
|
5
|
+
const Initializer = () => {
|
|
6
|
+
(0, hooks_1.useInitializer)();
|
|
7
|
+
return null;
|
|
8
|
+
};
|
|
9
|
+
exports.Initializer = Initializer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Input: import("@emotion/styled").StyledComponent<import("@mui/material").InputBaseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Input = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const InputBase_1 = require("@mui/material/InputBase");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
exports.Input = (0, styles_1.styled)(material_1.InputBase)(({ theme }) => ({
|
|
8
|
+
backgroundColor: theme.palette.mode === 'light'
|
|
9
|
+
? theme.palette.common.white
|
|
10
|
+
: theme.palette.background.paper,
|
|
11
|
+
paddingRight: theme.spacing(2),
|
|
12
|
+
[`.${InputBase_1.inputBaseClasses.input}`]: {
|
|
13
|
+
padding: theme.spacing(1.5, 1, 1.5, 2),
|
|
14
|
+
height: '2.875em',
|
|
15
|
+
boxSizing: 'inherit',
|
|
16
|
+
},
|
|
17
|
+
}));
|
|
@@ -0,0 +1,10 @@
|
|
|
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 icons_1 = require("../icons");
|
|
6
|
+
const LiFiLogo = ({ variant = 'icon', style }) => {
|
|
7
|
+
const Component = variant === 'icon' ? icons_1.LiFiLogo : icons_1.LiFiFullLogo;
|
|
8
|
+
return (0, jsx_runtime_1.jsx)(Component, { style: style, fill: "currentColor", color: "currentColor" });
|
|
9
|
+
};
|
|
10
|
+
exports.LiFiLogo = LiFiLogo;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotFound = 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_i18next_1 = require("react-i18next");
|
|
8
|
+
const NotFound = () => {
|
|
9
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
flex: 1,
|
|
16
|
+
padding: 3,
|
|
17
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 48 }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.Block, { fontSize: "inherit" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 18, fontWeight: 700 }, { children: t('tooltip.notFound.title') })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2 }, { children: t('tooltip.notFound.text') }))] })));
|
|
18
|
+
};
|
|
19
|
+
exports.NotFound = NotFound;
|