@lifi/widget 3.19.0-beta.2 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/esm/AppDrawer.js +6 -7
- package/dist/esm/AppDrawer.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js +1 -3
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.js +3 -2
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.js +1 -1
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.js.map +1 -1
- package/dist/esm/components/AppContainer.js +1 -1
- package/dist/esm/components/AppContainer.js.map +1 -1
- package/dist/esm/components/Avatar/AccountAvatar.js +1 -1
- package/dist/esm/components/Avatar/AccountAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.js +9 -9
- package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
- package/dist/esm/components/Avatar/SmallAvatar.js +1 -1
- package/dist/esm/components/Avatar/SmallAvatar.js.map +1 -1
- package/dist/esm/components/BottomSheet/BottomSheet.js +2 -2
- package/dist/esm/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/esm/components/ButtonTertiary.js +6 -5
- package/dist/esm/components/ButtonTertiary.js.map +1 -1
- package/dist/esm/components/Card/Card.js +18 -18
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardButton.style.js +1 -1
- package/dist/esm/components/Card/CardButton.style.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.js +2 -2
- package/dist/esm/components/Card/CardHeader.js.map +1 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +1 -1
- package/dist/esm/components/Card/CardIconButton.js +3 -2
- package/dist/esm/components/Card/CardIconButton.js.map +1 -1
- package/dist/esm/components/Card/CardLabel.js +21 -15
- package/dist/esm/components/Card/CardLabel.js.map +1 -1
- package/dist/esm/components/Card/CardTitle.js +2 -2
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.style.js +2 -2
- package/dist/esm/components/ContractComponent/NFT/NFT.style.js.map +1 -1
- package/dist/esm/components/Dialog.d.ts +2 -10
- package/dist/esm/components/Dialog.js +10 -10
- package/dist/esm/components/Dialog.js.map +1 -1
- package/dist/esm/components/Header/BackButton.js +1 -1
- package/dist/esm/components/Header/BackButton.js.map +1 -1
- package/dist/esm/components/Header/CloseDrawerButton.js +1 -1
- package/dist/esm/components/Header/CloseDrawerButton.js.map +1 -1
- package/dist/esm/components/Header/DisconnectIconButton.js +1 -1
- package/dist/esm/components/Header/DisconnectIconButton.js.map +1 -1
- package/dist/esm/components/Header/Header.style.js +7 -15
- package/dist/esm/components/Header/Header.style.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.js +1 -1
- package/dist/esm/components/Header/SettingsButton.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.style.js +7 -18
- package/dist/esm/components/Header/SettingsButton.style.js.map +1 -1
- package/dist/esm/components/Header/TransactionHistoryButton.js +1 -1
- package/dist/esm/components/Header/TransactionHistoryButton.js.map +1 -1
- package/dist/esm/components/Header/WalletHeader.js +1 -2
- package/dist/esm/components/Header/WalletHeader.js.map +1 -1
- package/dist/esm/components/Header/WalletMenu.js +1 -3
- package/dist/esm/components/Header/WalletMenu.js.map +1 -1
- package/dist/esm/components/Header/WalletMenu.style.js +4 -4
- package/dist/esm/components/Header/WalletMenu.style.js.map +1 -1
- package/dist/esm/components/IconTypography.js +4 -4
- package/dist/esm/components/IconTypography.js.map +1 -1
- package/dist/esm/components/ListItemButton.js +4 -2
- package/dist/esm/components/ListItemButton.js.map +1 -1
- package/dist/esm/components/Menu.js +3 -3
- package/dist/esm/components/Menu.js.map +1 -1
- package/dist/esm/components/Messages/AccountNotDeployedMessage.js +1 -1
- package/dist/esm/components/Messages/AccountNotDeployedMessage.js.map +1 -1
- package/dist/esm/components/Messages/AlertMessage.style.js +12 -18
- package/dist/esm/components/Messages/AlertMessage.style.js.map +1 -1
- package/dist/esm/components/Messages/FundsSufficiencyMessage.js +1 -1
- package/dist/esm/components/Messages/FundsSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Messages/GasRefuelMessage.js +1 -1
- package/dist/esm/components/Messages/GasRefuelMessage.js.map +1 -1
- package/dist/esm/components/Messages/GasRefuelMessage.style.js +7 -7
- package/dist/esm/components/Messages/GasRefuelMessage.style.js.map +1 -1
- package/dist/esm/components/Messages/GasSufficiencyMessage.js +1 -1
- package/dist/esm/components/Messages/GasSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Messages/ToAddressRequiredMessage.js +1 -1
- package/dist/esm/components/Messages/ToAddressRequiredMessage.js.map +1 -1
- package/dist/esm/components/NotFound.js +1 -1
- package/dist/esm/components/NotFound.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.js +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.js.map +1 -1
- package/dist/esm/components/ProgressToNextUpdate.js +6 -6
- package/dist/esm/components/ProgressToNextUpdate.js.map +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.js +1 -2
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.style.js +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.style.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +1 -2
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.js +1 -2
- package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +1 -1
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.style.js +2 -2
- package/dist/esm/components/Routes/RoutesExpanded.style.js.map +1 -1
- package/dist/esm/components/Search/SearchInput.js +1 -1
- package/dist/esm/components/Search/SearchInput.js.map +1 -1
- package/dist/esm/components/Search/SearchInput.style.js +1 -1
- package/dist/esm/components/Search/SearchInput.style.js.map +1 -1
- package/dist/esm/components/Search/SearchNotFound.js +1 -1
- package/dist/esm/components/Search/SearchNotFound.js.map +1 -1
- package/dist/esm/components/Search/SearchNotFound.style.js +1 -1
- package/dist/esm/components/Search/SearchNotFound.style.js.map +1 -1
- package/dist/esm/components/Select.js +4 -4
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.js +4 -2
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +7 -8
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWallet.style.js +2 -2
- package/dist/esm/components/SendToWallet/SendToWallet.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletExpandButton.js +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletExpandButton.js.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.js +3 -3
- package/dist/esm/components/Skeleton/WidgetSkeleton.js.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.js +2 -2
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.js.map +1 -1
- package/dist/esm/components/Step/CircularProgress.js +3 -5
- package/dist/esm/components/Step/CircularProgress.js.map +1 -1
- package/dist/esm/components/Step/CircularProgress.style.js +10 -11
- package/dist/esm/components/Step/CircularProgress.style.js.map +1 -1
- package/dist/esm/components/Step/DestinationWalletAddress.js +1 -2
- package/dist/esm/components/Step/DestinationWalletAddress.js.map +1 -1
- package/dist/esm/components/Step/StepProcess.js +1 -1
- package/dist/esm/components/Step/StepProcess.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.js +1 -3
- package/dist/esm/components/StepActions/StepActions.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.style.js +10 -10
- package/dist/esm/components/StepActions/StepActions.style.js.map +1 -1
- package/dist/esm/components/Switch.js +16 -10
- package/dist/esm/components/Switch.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.style.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.style.js +16 -10
- package/dist/esm/components/Tabs/Tabs.style.js.map +1 -1
- package/dist/esm/components/TextFitter/TextFitter.js +1 -1
- package/dist/esm/components/TextFitter/TextFitter.js.map +1 -1
- package/dist/esm/components/Timer/TimerContent.js +1 -1
- package/dist/esm/components/Timer/TimerContent.js.map +1 -1
- package/dist/esm/components/Token/Token.style.js +6 -6
- package/dist/esm/components/Token/Token.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.js +1 -5
- package/dist/esm/components/TokenList/TokenList.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +2 -2
- package/dist/esm/components/TokenList/TokenList.style.js +3 -2
- package/dist/esm/components/TokenList/TokenList.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/types.d.ts +3 -3
- package/dist/esm/components/TokenRate/TokenRate.style.js +1 -1
- package/dist/esm/components/TokenRate/TokenRate.style.js.map +1 -1
- package/dist/esm/components/TransactionDetails.js +1 -3
- package/dist/esm/components/TransactionDetails.js.map +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/hooks/useRoutes.js +4 -4
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/hooks/useSetContentHeight.d.ts +2 -2
- package/dist/esm/hooks/useSetContentHeight.js.map +1 -1
- package/dist/esm/i18n/en.json +1 -2
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js.map +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +1 -1
- package/dist/esm/pages/LanguagesPage.js +1 -1
- package/dist/esm/pages/LanguagesPage.js.map +1 -1
- package/dist/esm/pages/SelectEnabledToolsPage.js +1 -4
- package/dist/esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +3 -2
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js +1 -3
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js +1 -5
- package/dist/esm/pages/SendToWallet/BookmarksPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +1 -2
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js +1 -4
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js +1 -6
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js +1 -3
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js +1 -4
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js +10 -9
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.js +1 -2
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/GasPriceSettings.js +1 -1
- package/dist/esm/pages/SettingsPage/GasPriceSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/LanguageSetting.js +1 -1
- package/dist/esm/pages/SettingsPage/LanguageSetting.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js +3 -2
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/RoutePrioritySettings.js +1 -1
- package/dist/esm/pages/SettingsPage/RoutePrioritySettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +1 -2
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +14 -18
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ThemeSettings.js +7 -9
- package/dist/esm/pages/SettingsPage/ThemeSettings.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +1 -2
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +2 -2
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.js +1 -2
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js +1 -4
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.js +7 -19
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js +1 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/dist/esm/providers/ThemeProvider/ThemeProvider.js +22 -7
- package/dist/esm/providers/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/esm/stores/settings/types.d.ts +2 -1
- package/dist/esm/stores/settings/useAppearance.d.ts +2 -0
- package/dist/esm/stores/settings/useAppearance.js +11 -0
- package/dist/esm/stores/settings/useAppearance.js.map +1 -0
- package/dist/esm/stores/settings/useSettingsStore.js +7 -2
- package/dist/esm/stores/settings/useSettingsStore.js.map +1 -1
- package/dist/esm/stores/settings/utils/getStateValues.js +1 -0
- package/dist/esm/stores/settings/utils/getStateValues.js.map +1 -1
- package/dist/esm/themes/createTheme.d.ts +2 -1
- package/dist/esm/themes/createTheme.js +67 -108
- package/dist/esm/themes/createTheme.js.map +1 -1
- package/dist/esm/themes/jumper.js +1 -1
- package/dist/esm/themes/jumper.js.map +1 -1
- package/dist/esm/themes/watermelonLight.js +1 -1
- package/dist/esm/themes/watermelonLight.js.map +1 -1
- package/dist/esm/types/widget.d.ts +12 -22
- package/dist/esm/types/widget.js +1 -0
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/colors.d.ts +15 -0
- package/dist/esm/utils/colors.js +35 -0
- package/dist/esm/utils/colors.js.map +1 -0
- package/package.json +9 -9
- package/package.json.tmp +9 -9
- package/src/AppDrawer.tsx +7 -9
- package/src/components/ActiveTransactions/ActiveTransactionItem.tsx +1 -3
- package/src/components/ActiveTransactions/ActiveTransactions.style.ts +3 -2
- package/src/components/AmountInput/AmountInputAdornment.style.tsx +1 -1
- package/src/components/AppContainer.tsx +1 -1
- package/src/components/Avatar/AccountAvatar.tsx +1 -1
- package/src/components/Avatar/Avatar.style.tsx +9 -9
- package/src/components/Avatar/SmallAvatar.tsx +1 -1
- package/src/components/BottomSheet/BottomSheet.tsx +2 -1
- package/src/components/ButtonTertiary.tsx +6 -5
- package/src/components/Card/Card.tsx +18 -18
- package/src/components/Card/CardButton.style.tsx +1 -1
- package/src/components/Card/CardHeader.tsx +2 -2
- package/src/components/Card/CardIconButton.tsx +3 -2
- package/src/components/Card/CardLabel.tsx +59 -15
- package/src/components/Card/CardTitle.tsx +2 -2
- package/src/components/ContractComponent/NFT/NFT.style.ts +2 -2
- package/src/components/Dialog.tsx +12 -10
- package/src/components/Header/BackButton.tsx +1 -1
- package/src/components/Header/CloseDrawerButton.tsx +1 -1
- package/src/components/Header/DisconnectIconButton.tsx +1 -1
- package/src/components/Header/Header.style.ts +7 -15
- package/src/components/Header/SettingsButton.style.tsx +10 -17
- package/src/components/Header/SettingsButton.tsx +1 -1
- package/src/components/Header/TransactionHistoryButton.tsx +1 -1
- package/src/components/Header/WalletHeader.tsx +1 -2
- package/src/components/Header/WalletMenu.style.tsx +4 -4
- package/src/components/Header/WalletMenu.tsx +5 -3
- package/src/components/IconTypography.ts +4 -4
- package/src/components/ListItemButton.tsx +4 -2
- package/src/components/Menu.tsx +3 -3
- package/src/components/Messages/AccountNotDeployedMessage.tsx +1 -1
- package/src/components/Messages/AlertMessage.style.tsx +16 -18
- package/src/components/Messages/FundsSufficiencyMessage.tsx +1 -1
- package/src/components/Messages/GasRefuelMessage.style.ts +7 -7
- package/src/components/Messages/GasRefuelMessage.tsx +1 -1
- package/src/components/Messages/GasSufficiencyMessage.tsx +1 -1
- package/src/components/Messages/ToAddressRequiredMessage.tsx +1 -1
- package/src/components/NotFound.tsx +1 -1
- package/src/components/PoweredBy/PoweredBy.style.ts +1 -1
- package/src/components/ProgressToNextUpdate.tsx +6 -6
- package/src/components/ReverseTokensButton/ReverseTokensButton.style.tsx +1 -1
- package/src/components/ReverseTokensButton/ReverseTokensButton.tsx +1 -2
- package/src/components/RouteCard/RouteCard.tsx +1 -2
- package/src/components/RouteCard/RouteCardEssentials.tsx +1 -2
- package/src/components/RouteCard/RouteCardEssentialsExpanded.tsx +1 -1
- package/src/components/RouteCard/RouteCardSkeleton.tsx +1 -1
- package/src/components/RouteCard/RouteNotFoundCard.tsx +1 -1
- package/src/components/Routes/Routes.tsx +1 -1
- package/src/components/Routes/RoutesExpanded.style.ts +2 -2
- package/src/components/Search/SearchInput.style.tsx +1 -1
- package/src/components/Search/SearchInput.tsx +1 -1
- package/src/components/Search/SearchNotFound.style.tsx +1 -1
- package/src/components/Search/SearchNotFound.tsx +1 -1
- package/src/components/Select.tsx +4 -4
- package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +9 -7
- package/src/components/SelectTokenButton/SelectTokenButton.tsx +4 -2
- package/src/components/SendToWallet/SendToWallet.style.tsx +2 -2
- package/src/components/SendToWallet/SendToWalletButton.tsx +1 -1
- package/src/components/SendToWallet/SendToWalletExpandButton.tsx +1 -1
- package/src/components/Skeleton/WidgetSkeleton.style.tsx +2 -2
- package/src/components/Skeleton/WidgetSkeleton.tsx +6 -9
- package/src/components/Step/CircularProgress.style.tsx +11 -11
- package/src/components/Step/CircularProgress.tsx +8 -5
- package/src/components/Step/DestinationWalletAddress.tsx +1 -2
- package/src/components/Step/StepProcess.tsx +1 -1
- package/src/components/StepActions/StepActions.style.tsx +10 -9
- package/src/components/StepActions/StepActions.tsx +1 -3
- package/src/components/Switch.tsx +21 -10
- package/src/components/Tabs/Tabs.style.tsx +16 -9
- package/src/components/TextFitter/TextFitter.tsx +1 -1
- package/src/components/Timer/TimerContent.tsx +1 -1
- package/src/components/Token/Token.style.tsx +6 -6
- package/src/components/TokenList/TokenList.style.tsx +3 -2
- package/src/components/TokenList/TokenList.tsx +1 -5
- package/src/components/TokenList/TokenListItem.tsx +1 -1
- package/src/components/TokenList/types.ts +3 -3
- package/src/components/TokenRate/TokenRate.style.ts +1 -1
- package/src/components/TransactionDetails.tsx +5 -3
- package/src/config/version.ts +1 -1
- package/src/hooks/useRoutes.ts +4 -4
- package/src/hooks/useSetContentHeight.ts +2 -2
- package/src/i18n/en.json +1 -2
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.tsx +1 -1
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +1 -1
- package/src/pages/LanguagesPage.tsx +1 -1
- package/src/pages/SelectEnabledToolsPage.tsx +6 -4
- package/src/pages/SelectTokenPage/SelectTokenPage.tsx +4 -2
- package/src/pages/SendToWallet/BookmarkAddressSheet.tsx +8 -6
- package/src/pages/SendToWallet/BookmarksPage.tsx +7 -5
- package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +3 -4
- package/src/pages/SendToWallet/ConnectedWalletsPage.tsx +6 -4
- package/src/pages/SendToWallet/RecentWalletsPage.tsx +8 -6
- package/src/pages/SendToWallet/SendToConfiguredWalletPage.tsx +5 -3
- package/src/pages/SendToWallet/SendToWalletPage.style.tsx +10 -9
- package/src/pages/SendToWallet/SendToWalletPage.tsx +6 -4
- package/src/pages/SettingsPage/BridgeAndExchangeSettings.tsx +1 -2
- package/src/pages/SettingsPage/GasPriceSettings.tsx +1 -1
- package/src/pages/SettingsPage/LanguageSetting.tsx +1 -1
- package/src/pages/SettingsPage/ResetSettingsButton.style.tsx +3 -2
- package/src/pages/SettingsPage/ResetSettingsButton.tsx +1 -1
- package/src/pages/SettingsPage/RoutePrioritySettings.tsx +1 -1
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +15 -17
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +1 -2
- package/src/pages/SettingsPage/ThemeSettings.tsx +7 -10
- package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +1 -2
- package/src/pages/TransactionHistoryPage/TransactionHistoryEmpty.tsx +1 -1
- package/src/pages/TransactionHistoryPage/TransactionHistorySkeleton.tsx +2 -2
- package/src/pages/TransactionPage/ConfirmToAddressSheet.tsx +3 -4
- package/src/pages/TransactionPage/ExchangeRateBottomSheet.tsx +7 -5
- package/src/pages/TransactionPage/StatusBottomSheet.style.tsx +7 -19
- package/src/pages/TransactionPage/StatusBottomSheet.tsx +6 -4
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +3 -3
- package/src/pages/TransactionPage/TransactionPage.tsx +1 -1
- package/src/providers/ThemeProvider/ThemeProvider.tsx +27 -20
- package/src/stores/settings/types.ts +2 -1
- package/src/stores/settings/useAppearance.ts +15 -0
- package/src/stores/settings/useSettingsStore.ts +7 -2
- package/src/stores/settings/utils/getStateValues.ts +1 -0
- package/src/themes/createTheme.ts +91 -124
- package/src/themes/jumper.ts +1 -1
- package/src/themes/types.ts +0 -1
- package/src/themes/watermelonLight.ts +1 -1
- package/src/types/widget.ts +17 -26
- package/src/utils/colors.ts +53 -0
|
@@ -8,6 +8,7 @@ import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.j
|
|
|
8
8
|
import type { FormTypeProps } from '../../stores/form/types.js'
|
|
9
9
|
import { FormKeyHelper } from '../../stores/form/types.js'
|
|
10
10
|
import { useFieldValues } from '../../stores/form/useFieldValues.js'
|
|
11
|
+
import { HiddenUI } from '../../types/widget.js'
|
|
11
12
|
import { navigationRoutes } from '../../utils/navigationRoutes.js'
|
|
12
13
|
import { AvatarBadgedDefault, AvatarBadgedSkeleton } from '../Avatar/Avatar.js'
|
|
13
14
|
import { TokenAvatar } from '../Avatar/TokenAvatar.js'
|
|
@@ -25,7 +26,7 @@ export const SelectTokenButton: React.FC<
|
|
|
25
26
|
> = ({ formType, compact }) => {
|
|
26
27
|
const { t } = useTranslation()
|
|
27
28
|
const navigate = useNavigate()
|
|
28
|
-
const { disabledUI, subvariant } = useWidgetConfig()
|
|
29
|
+
const { disabledUI, subvariant, hiddenUI } = useWidgetConfig()
|
|
29
30
|
const swapOnly = useSwapOnly()
|
|
30
31
|
const tokenKey = FormKeyHelper.getTokenKey(formType)
|
|
31
32
|
const [chainId, tokenAddress] = useFieldValues(
|
|
@@ -50,7 +51,8 @@ export const SelectTokenButton: React.FC<
|
|
|
50
51
|
const defaultPlaceholder =
|
|
51
52
|
formType === 'to' && subvariant === 'refuel'
|
|
52
53
|
? t('main.selectChain')
|
|
53
|
-
: formType === 'to' && swapOnly
|
|
54
|
+
: (formType === 'to' && swapOnly) ||
|
|
55
|
+
hiddenUI?.includes(HiddenUI.ChainSelect)
|
|
54
56
|
? t('main.selectToken')
|
|
55
57
|
: t('main.selectChainAndToken')
|
|
56
58
|
const cardTitle: string =
|
|
@@ -6,7 +6,7 @@ export const SendToWalletCardHeader = styled(CardHeader, {
|
|
|
6
6
|
})<{ selected?: boolean }>(({ theme }) => ({
|
|
7
7
|
width: '100%',
|
|
8
8
|
[`.${cardHeaderClasses.title}`]: {
|
|
9
|
-
color: theme.
|
|
9
|
+
color: theme.palette.text.secondary,
|
|
10
10
|
textOverflow: 'ellipsis',
|
|
11
11
|
whiteSpace: 'nowrap',
|
|
12
12
|
overflow: 'hidden',
|
|
@@ -36,7 +36,7 @@ export const SendToWalletCardHeader = styled(CardHeader, {
|
|
|
36
36
|
props: ({ selected }) => selected,
|
|
37
37
|
style: {
|
|
38
38
|
[`.${cardHeaderClasses.title}`]: {
|
|
39
|
-
color: theme.
|
|
39
|
+
color: theme.palette.text.primary,
|
|
40
40
|
fontWeight: 600,
|
|
41
41
|
width: 224,
|
|
42
42
|
[theme.breakpoints.down(theme.breakpoints.values.sm)]: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useAccount } from '@lifi/wallet-management'
|
|
2
|
-
import CloseRounded from '@mui/icons-material
|
|
2
|
+
import { CloseRounded } from '@mui/icons-material'
|
|
3
3
|
import { Box, Collapse } from '@mui/material'
|
|
4
4
|
import { type MouseEventHandler, useEffect, useRef } from 'react'
|
|
5
5
|
import { useTranslation } from 'react-i18next'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Wallet from '@mui/icons-material
|
|
1
|
+
import { Wallet } from '@mui/icons-material'
|
|
2
2
|
import { Button, Tooltip } from '@mui/material'
|
|
3
3
|
import { useTranslation } from 'react-i18next'
|
|
4
4
|
import { useToAddressRequirements } from '../../hooks/useToAddressRequirements.js'
|
|
@@ -6,7 +6,7 @@ export const SkeletonHeaderAppBar = styled(Box)(({ theme }) => ({
|
|
|
6
6
|
flexDirection: 'row',
|
|
7
7
|
justifyContent: 'flex-end',
|
|
8
8
|
alignItems: 'center',
|
|
9
|
-
color: theme.
|
|
9
|
+
color: theme.palette?.text.primary,
|
|
10
10
|
paddingRight: theme.navigation?.edge ? 0 : theme.spacing?.(1),
|
|
11
11
|
}))
|
|
12
12
|
|
|
@@ -71,7 +71,7 @@ export const SkeletonHeaderContainer = styled(Box)(({ theme }) => {
|
|
|
71
71
|
return {
|
|
72
72
|
display: 'flex',
|
|
73
73
|
flexDirection: 'column',
|
|
74
|
-
backgroundColor: theme.
|
|
74
|
+
backgroundColor: theme.palette.background.default,
|
|
75
75
|
backdropFilter: 'blur(12px)',
|
|
76
76
|
position: 'relative',
|
|
77
77
|
top: 0,
|
|
@@ -71,22 +71,19 @@ export const WidgetSkeleton = ({ config }: WidgetConfigPartialProps) => {
|
|
|
71
71
|
const configTheme = config?.theme
|
|
72
72
|
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')
|
|
73
73
|
const appearanceMode =
|
|
74
|
-
!appearance || appearance === '
|
|
74
|
+
!appearance || appearance === 'auto'
|
|
75
75
|
? prefersDarkMode
|
|
76
76
|
? 'dark'
|
|
77
77
|
: 'light'
|
|
78
78
|
: appearance
|
|
79
79
|
|
|
80
|
-
const theme = useMemo(
|
|
80
|
+
const theme = useMemo(
|
|
81
|
+
() => createTheme(appearanceMode, configTheme),
|
|
82
|
+
[appearanceMode, configTheme]
|
|
83
|
+
)
|
|
81
84
|
|
|
82
85
|
return (
|
|
83
|
-
<ThemeProvider
|
|
84
|
-
theme={theme}
|
|
85
|
-
defaultMode={appearanceMode}
|
|
86
|
-
modeStorageKey="li.fi-widget-mode"
|
|
87
|
-
colorSchemeStorageKey="li.fi-widget-color-scheme"
|
|
88
|
-
disableTransitionOnChange
|
|
89
|
-
>
|
|
86
|
+
<ThemeProvider theme={theme}>
|
|
90
87
|
<AppExpandedContainer>
|
|
91
88
|
<RelativeContainer sx={{ display: 'flex', flexDirection: 'column' }}>
|
|
92
89
|
<SkeletonHeaderContainer>
|
|
@@ -3,6 +3,7 @@ import type { Theme } from '@mui/material'
|
|
|
3
3
|
import {
|
|
4
4
|
Box,
|
|
5
5
|
CircularProgress as MuiCircularProgress,
|
|
6
|
+
alpha,
|
|
6
7
|
circularProgressClasses,
|
|
7
8
|
keyframes,
|
|
8
9
|
styled,
|
|
@@ -15,16 +16,16 @@ const getStatusColor = (
|
|
|
15
16
|
) => {
|
|
16
17
|
switch (status) {
|
|
17
18
|
case 'ACTION_REQUIRED':
|
|
18
|
-
return
|
|
19
|
+
return alpha(theme.palette.info.main, 0.12)
|
|
19
20
|
case 'DONE':
|
|
20
21
|
if (substatus === 'PARTIAL' || substatus === 'REFUNDED') {
|
|
21
|
-
return
|
|
22
|
+
return alpha(theme.palette.warning.main, 0.48)
|
|
22
23
|
}
|
|
23
|
-
return
|
|
24
|
+
return alpha(theme.palette.success.main, 0.12)
|
|
24
25
|
case 'FAILED':
|
|
25
|
-
return
|
|
26
|
+
return alpha(theme.palette.error.main, 0.12)
|
|
26
27
|
default:
|
|
27
|
-
return theme.
|
|
28
|
+
return theme.palette.grey[theme.palette.mode === 'light' ? 300 : 800]
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -34,7 +35,7 @@ export const CircularIcon = styled(Box, {
|
|
|
34
35
|
({ theme, status, substatus }) => ({
|
|
35
36
|
backgroundColor: ['ACTION_REQUIRED', 'DONE', 'FAILED'].includes(status!)
|
|
36
37
|
? getStatusColor(theme, status, substatus)
|
|
37
|
-
: theme.
|
|
38
|
+
: theme.palette.background.paper,
|
|
38
39
|
borderStyle: 'solid',
|
|
39
40
|
borderColor: getStatusColor(theme, status, substatus),
|
|
40
41
|
borderWidth: !['ACTION_REQUIRED', 'DONE', 'FAILED'].includes(status!)
|
|
@@ -67,11 +68,10 @@ const circleAnimation = keyframes`
|
|
|
67
68
|
// This `styled()` function invokes keyframes. `styled-components` only supports keyframes
|
|
68
69
|
// in string templates. Do not convert these styles in JS object as it will break.
|
|
69
70
|
export const CircularProgressPending = styled(MuiCircularProgress)`
|
|
70
|
-
color: ${({ theme }) =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})}
|
|
71
|
+
color: ${({ theme }) =>
|
|
72
|
+
theme.palette.mode === 'light'
|
|
73
|
+
? theme.palette.primary.main
|
|
74
|
+
: theme.palette.primary.light};
|
|
75
75
|
animation-duration: 3s;
|
|
76
76
|
position: absolute;
|
|
77
77
|
.${circularProgressClasses.circle} {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Process } from '@lifi/sdk'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
Done,
|
|
4
|
+
ErrorRounded,
|
|
5
|
+
InfoRounded,
|
|
6
|
+
WarningRounded,
|
|
7
|
+
} from '@mui/icons-material'
|
|
8
|
+
import { darken } from '@mui/material'
|
|
6
9
|
import {
|
|
7
10
|
CircularIcon,
|
|
8
11
|
CircularProgressPending,
|
|
@@ -29,7 +32,7 @@ export function CircularProgress({ process }: { process: Process }) {
|
|
|
29
32
|
sx={(theme) => ({
|
|
30
33
|
position: 'absolute',
|
|
31
34
|
fontSize: '1.5rem',
|
|
32
|
-
color:
|
|
35
|
+
color: darken(theme.palette.warning.main, 0.32),
|
|
33
36
|
})}
|
|
34
37
|
/>
|
|
35
38
|
) : process.status === 'DONE' ? (
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { LiFiStepExtended } from '@lifi/sdk'
|
|
2
|
-
import LinkRounded from '@mui/icons-material
|
|
3
|
-
import Wallet from '@mui/icons-material/Wallet'
|
|
2
|
+
import { LinkRounded, Wallet } from '@mui/icons-material'
|
|
4
3
|
import { Box, Link, Typography } from '@mui/material'
|
|
5
4
|
import { useTranslation } from 'react-i18next'
|
|
6
5
|
import { CardIconButton } from '../Card/CardIconButton.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LiFiStep, Process } from '@lifi/sdk'
|
|
2
|
-
import OpenInNewRounded from '@mui/icons-material
|
|
2
|
+
import { OpenInNewRounded } from '@mui/icons-material'
|
|
3
3
|
import { Box, Link, Typography } from '@mui/material'
|
|
4
4
|
import { useExplorer } from '../../hooks/useExplorer.js'
|
|
5
5
|
import { useProcessMessage } from '../../hooks/useProcessMessage.js'
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
StepConnector as MuiStepConnector,
|
|
4
4
|
StepLabel as MuiStepLabel,
|
|
5
5
|
Typography,
|
|
6
|
+
alpha,
|
|
6
7
|
stepConnectorClasses,
|
|
7
8
|
stepLabelClasses,
|
|
8
9
|
styled,
|
|
@@ -17,9 +18,9 @@ export const StepConnector = styled(MuiStepConnector, {
|
|
|
17
18
|
[`.${stepConnectorClasses.line}`]: {
|
|
18
19
|
minHeight: 8,
|
|
19
20
|
borderLeftWidth: 2,
|
|
20
|
-
borderColor:
|
|
21
|
-
...theme.applyStyles('
|
|
22
|
-
borderColor:
|
|
21
|
+
borderColor: alpha(theme.palette.common.white, 0.16),
|
|
22
|
+
...theme.applyStyles('light', {
|
|
23
|
+
borderColor: alpha(theme.palette.common.black, 0.12),
|
|
23
24
|
}),
|
|
24
25
|
},
|
|
25
26
|
}))
|
|
@@ -48,19 +49,16 @@ export const StepLabelTypography = styled(Typography)(({ theme }) => ({
|
|
|
48
49
|
fontSize: 12,
|
|
49
50
|
fontWeight: 500,
|
|
50
51
|
lineHeight: 1.325,
|
|
51
|
-
color: theme.
|
|
52
|
+
color: theme.palette.text.secondary,
|
|
52
53
|
padding: theme.spacing(0.5, 0),
|
|
53
54
|
}))
|
|
54
55
|
|
|
55
56
|
export const StepContent = styled(Box, {
|
|
56
57
|
shouldForwardProp: (prop) => !['last'].includes(prop as string),
|
|
57
58
|
})<{ last: boolean }>(({ theme }) => ({
|
|
59
|
+
borderLeft: `2px solid ${alpha(theme.palette.common.white, 0.16)}`,
|
|
58
60
|
margin: theme.spacing(0, 0, 0, 2.375),
|
|
59
61
|
paddingLeft: theme.spacing(4.375),
|
|
60
|
-
borderLeft: `2px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.12)`,
|
|
61
|
-
...theme.applyStyles('dark', {
|
|
62
|
-
borderLeft: `2px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.16)`,
|
|
63
|
-
}),
|
|
64
62
|
variants: [
|
|
65
63
|
{
|
|
66
64
|
props: ({ last }) => last,
|
|
@@ -70,9 +68,12 @@ export const StepContent = styled(Box, {
|
|
|
70
68
|
},
|
|
71
69
|
},
|
|
72
70
|
],
|
|
71
|
+
...theme.applyStyles('light', {
|
|
72
|
+
borderLeft: `2px solid ${alpha(theme.palette.common.black, 0.12)}`,
|
|
73
|
+
}),
|
|
73
74
|
}))
|
|
74
75
|
|
|
75
76
|
export const StepAvatar = styled(AvatarMasked)(({ theme }) => ({
|
|
76
|
-
color: theme.
|
|
77
|
+
color: theme.palette.text.primary,
|
|
77
78
|
backgroundColor: 'transparent',
|
|
78
79
|
}))
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { LiFiStep, StepExtended } from '@lifi/sdk'
|
|
2
2
|
import { isGaslessStep } from '@lifi/sdk'
|
|
3
|
-
import ArrowForward from '@mui/icons-material
|
|
4
|
-
import ExpandLess from '@mui/icons-material/ExpandLess'
|
|
5
|
-
import ExpandMore from '@mui/icons-material/ExpandMore'
|
|
3
|
+
import { ArrowForward, ExpandLess, ExpandMore } from '@mui/icons-material'
|
|
6
4
|
import type { StepIconProps } from '@mui/material'
|
|
7
5
|
import {
|
|
8
6
|
Badge,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Switch as MuiSwitch,
|
|
3
|
+
alpha,
|
|
4
|
+
styled,
|
|
5
|
+
switchClasses,
|
|
6
|
+
} from '@mui/material'
|
|
2
7
|
|
|
3
8
|
export const Switch = styled(MuiSwitch)(({ theme }) => ({
|
|
4
9
|
width: 42,
|
|
@@ -10,9 +15,9 @@ export const Switch = styled(MuiSwitch)(({ theme }) => ({
|
|
|
10
15
|
transitionDuration: theme.transitions.duration.standard,
|
|
11
16
|
[`&.${switchClasses.checked}`]: {
|
|
12
17
|
transform: 'translateX(18px)',
|
|
13
|
-
color: theme.
|
|
18
|
+
color: theme.palette.common.white,
|
|
14
19
|
[`& + .${switchClasses.track}`]: {
|
|
15
|
-
backgroundColor: theme.
|
|
20
|
+
backgroundColor: theme.palette.primary.main,
|
|
16
21
|
opacity: 1,
|
|
17
22
|
border: 0,
|
|
18
23
|
},
|
|
@@ -21,17 +26,20 @@ export const Switch = styled(MuiSwitch)(({ theme }) => ({
|
|
|
21
26
|
},
|
|
22
27
|
},
|
|
23
28
|
[`&.Mui-focusVisible .${switchClasses.thumb}`]: {
|
|
24
|
-
color: theme.
|
|
29
|
+
color: theme.palette.primary.main,
|
|
25
30
|
border: '6px solid',
|
|
26
|
-
borderColor: theme.
|
|
31
|
+
borderColor: theme.palette.common.white,
|
|
27
32
|
},
|
|
28
33
|
[`&.${switchClasses.disabled} .${switchClasses.thumb}`]: {
|
|
29
|
-
color:
|
|
34
|
+
color: alpha(theme.palette.common.white, 0.12),
|
|
35
|
+
...theme.applyStyles('light', {
|
|
36
|
+
color: alpha(theme.palette.common.black, 0.12),
|
|
37
|
+
}),
|
|
30
38
|
},
|
|
31
39
|
[`&.${switchClasses.disabled} + .${switchClasses.track}`]: {
|
|
32
|
-
opacity: 0.
|
|
33
|
-
...theme.applyStyles('
|
|
34
|
-
opacity: 0.
|
|
40
|
+
opacity: 0.3,
|
|
41
|
+
...theme.applyStyles('light', {
|
|
42
|
+
opacity: 0.7,
|
|
35
43
|
}),
|
|
36
44
|
},
|
|
37
45
|
},
|
|
@@ -42,10 +50,13 @@ export const Switch = styled(MuiSwitch)(({ theme }) => ({
|
|
|
42
50
|
},
|
|
43
51
|
[`.${switchClasses.track}`]: {
|
|
44
52
|
borderRadius: 24 / 2,
|
|
53
|
+
backgroundColor: alpha(theme.palette.common.white, 0.16),
|
|
45
54
|
opacity: 1,
|
|
46
55
|
transition: theme.transitions.create(['background-color'], {
|
|
47
56
|
duration: theme.transitions.duration.standard,
|
|
48
57
|
}),
|
|
49
|
-
|
|
58
|
+
...theme.applyStyles('light', {
|
|
59
|
+
backgroundColor: alpha(theme.palette.common.black, 0.16),
|
|
60
|
+
}),
|
|
50
61
|
},
|
|
51
62
|
}))
|
|
@@ -2,6 +2,7 @@ import type { TabProps } from '@mui/material'
|
|
|
2
2
|
import {
|
|
3
3
|
Tab as MuiTab,
|
|
4
4
|
Tabs as MuiTabs,
|
|
5
|
+
alpha,
|
|
5
6
|
styled,
|
|
6
7
|
tabClasses,
|
|
7
8
|
tabsClasses,
|
|
@@ -21,15 +22,15 @@ export const Tabs = styled(MuiTabs)(({ theme }) => ({
|
|
|
21
22
|
}))
|
|
22
23
|
|
|
23
24
|
export const CardTabs = styled(Tabs)(({ theme }) => ({
|
|
24
|
-
backgroundColor:
|
|
25
|
+
backgroundColor: alpha(theme.palette.common.white, 0.08),
|
|
25
26
|
[`.${tabsClasses.indicator}`]: {
|
|
26
|
-
backgroundColor: theme.
|
|
27
|
+
backgroundColor: alpha(theme.palette.common.black, 0.56),
|
|
28
|
+
...theme.applyStyles('light', {
|
|
29
|
+
backgroundColor: theme.palette.background.paper,
|
|
30
|
+
}),
|
|
27
31
|
},
|
|
28
|
-
...theme.applyStyles('
|
|
29
|
-
backgroundColor:
|
|
30
|
-
[`.${tabsClasses.indicator}`]: {
|
|
31
|
-
backgroundColor: `rgba(${theme.vars.palette.common.backgroundChannel} / 0.56)`,
|
|
32
|
-
},
|
|
32
|
+
...theme.applyStyles('light', {
|
|
33
|
+
backgroundColor: alpha(theme.palette.common.black, 0.04),
|
|
33
34
|
}),
|
|
34
35
|
}))
|
|
35
36
|
|
|
@@ -39,8 +40,14 @@ export const Tab = styled(MuiTab)<TabProps>(({ theme }) => ({
|
|
|
39
40
|
textTransform: 'none',
|
|
40
41
|
fontSize: '1rem',
|
|
41
42
|
fontWeight: 700,
|
|
42
|
-
color: theme.
|
|
43
|
+
color: theme.palette.common.white,
|
|
43
44
|
[`&.${tabClasses.selected}`]: {
|
|
44
|
-
color: theme.
|
|
45
|
+
color: theme.palette.common.white,
|
|
46
|
+
...theme.applyStyles('light', {
|
|
47
|
+
color: theme.palette.common.black,
|
|
48
|
+
}),
|
|
45
49
|
},
|
|
50
|
+
...theme.applyStyles('light', {
|
|
51
|
+
color: theme.palette.common.black,
|
|
52
|
+
}),
|
|
46
53
|
}))
|
|
@@ -75,7 +75,7 @@ export const TextFitter: React.FC<PropsWithChildren<TextFitterProps>> = ({
|
|
|
75
75
|
// : height
|
|
76
76
|
// }
|
|
77
77
|
preserveAspectRatio={preserveAspectRatio}
|
|
78
|
-
fill={theme.
|
|
78
|
+
fill={theme.palette.text.primary}
|
|
79
79
|
ref={ref}
|
|
80
80
|
>
|
|
81
81
|
<title>{children}</title>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Typography, styled } from '@mui/material'
|
|
1
|
+
import { Box, Typography, alpha, styled } from '@mui/material'
|
|
2
2
|
|
|
3
3
|
export const TextSecondaryContainer = styled(Box)(() => ({
|
|
4
4
|
display: 'flex',
|
|
@@ -13,13 +13,13 @@ export const TextSecondary = styled(Typography, {
|
|
|
13
13
|
fontSize: 12,
|
|
14
14
|
lineHeight: 1,
|
|
15
15
|
fontWeight: 500,
|
|
16
|
-
color: theme.
|
|
16
|
+
color: theme.palette.text.secondary,
|
|
17
17
|
whiteSpace: 'nowrap',
|
|
18
18
|
variants: [
|
|
19
19
|
{
|
|
20
20
|
props: ({ dot }) => dot,
|
|
21
21
|
style: {
|
|
22
|
-
color:
|
|
22
|
+
color: alpha(theme.palette.text.secondary, 0.56),
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
],
|
|
@@ -29,8 +29,8 @@ export const TokenDivider = styled(Box)(({ theme }) => ({
|
|
|
29
29
|
height: 16,
|
|
30
30
|
borderLeftWidth: 2,
|
|
31
31
|
borderLeftStyle: 'solid',
|
|
32
|
-
borderColor: theme.
|
|
33
|
-
...theme.applyStyles('
|
|
34
|
-
borderColor: theme.
|
|
32
|
+
borderColor: theme.palette.grey[800],
|
|
33
|
+
...theme.applyStyles('light', {
|
|
34
|
+
borderColor: theme.palette.grey[300],
|
|
35
35
|
}),
|
|
36
36
|
}))
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IconButtonProps, LinkProps } from '@mui/material'
|
|
2
2
|
import { IconButton as MuiIconButton, styled } from '@mui/material'
|
|
3
|
+
import { getContrastAlphaColor } from '../../utils/colors.js'
|
|
3
4
|
import { ListItem as ListItemBase } from '../ListItem/ListItem.js'
|
|
4
5
|
|
|
5
6
|
export const ListItem = styled(ListItemBase)(() => ({
|
|
@@ -18,9 +19,9 @@ export const IconButton = styled(MuiIconButton)<IconButtonProps & LinkProps>(
|
|
|
18
19
|
color: 'inherit',
|
|
19
20
|
backgroundColor: 'unset',
|
|
20
21
|
minWidth: 'unset',
|
|
21
|
-
borderRadius: theme.
|
|
22
|
+
borderRadius: theme.shape.borderRadiusTertiary,
|
|
22
23
|
'&:hover': {
|
|
23
|
-
backgroundColor:
|
|
24
|
+
backgroundColor: getContrastAlphaColor(theme, 0.04),
|
|
24
25
|
},
|
|
25
26
|
svg: {
|
|
26
27
|
fontSize: 14,
|
|
@@ -53,11 +53,7 @@ export const TokenList: FC<TokenListProps> = ({
|
|
|
53
53
|
.filter(
|
|
54
54
|
(token) =>
|
|
55
55
|
token.name?.toUpperCase().includes(searchFilter) ||
|
|
56
|
-
token.symbol
|
|
57
|
-
.toUpperCase()
|
|
58
|
-
// Replace ₮ with T for USD₮0
|
|
59
|
-
.replaceAll('₮', 'T')
|
|
60
|
-
.includes(searchFilter) ||
|
|
56
|
+
token.symbol.toUpperCase().includes(searchFilter) ||
|
|
61
57
|
token.address.toUpperCase().includes(searchFilter)
|
|
62
58
|
)
|
|
63
59
|
.sort(filteredTokensComparator(searchFilter))
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ExtendedChain } from '@lifi/sdk'
|
|
2
2
|
import type { Account } from '@lifi/wallet-management'
|
|
3
|
-
import type { MouseEventHandler,
|
|
3
|
+
import type { MouseEventHandler, MutableRefObject } from 'react'
|
|
4
4
|
import type { FormType } from '../../stores/form/types.js'
|
|
5
5
|
import type { TokenAmount } from '../../types/token.js'
|
|
6
6
|
|
|
7
7
|
export interface TokenListProps {
|
|
8
|
-
parentRef:
|
|
8
|
+
parentRef: MutableRefObject<HTMLElement | null>
|
|
9
9
|
formType: FormType
|
|
10
10
|
height: number
|
|
11
11
|
onClick?(): void
|
|
@@ -14,7 +14,7 @@ export interface TokenListProps {
|
|
|
14
14
|
export interface VirtualizedTokenListProps {
|
|
15
15
|
account: Account
|
|
16
16
|
tokens: TokenAmount[]
|
|
17
|
-
scrollElementRef:
|
|
17
|
+
scrollElementRef: MutableRefObject<HTMLElement | null>
|
|
18
18
|
isLoading: boolean
|
|
19
19
|
isBalanceLoading: boolean
|
|
20
20
|
chainId?: number
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { RouteExtended } from '@lifi/sdk'
|
|
2
2
|
import { isGaslessStep } from '@lifi/sdk'
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
ExpandLess,
|
|
5
|
+
ExpandMore,
|
|
6
|
+
LocalGasStationRounded,
|
|
7
|
+
} from '@mui/icons-material'
|
|
6
8
|
import type { CardProps } from '@mui/material'
|
|
7
9
|
import { Box, Collapse, Tooltip, Typography } from '@mui/material'
|
|
8
10
|
import { useState } from 'react'
|
package/src/config/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/widget'
|
|
2
|
-
export const version = '3.19.0
|
|
2
|
+
export const version = '3.19.0'
|
package/src/hooks/useRoutes.ts
CHANGED
|
@@ -227,10 +227,10 @@ export const useRoutes = ({ observableRoute }: RoutesProps = {}) => {
|
|
|
227
227
|
: allowedExchanges
|
|
228
228
|
|
|
229
229
|
const calculatedFee = await feeConfig?.calculateFee?.({
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
fromChain: fromChain!,
|
|
231
|
+
toChain: toChain!,
|
|
232
|
+
fromToken: fromToken!,
|
|
233
|
+
toToken: toToken!,
|
|
234
234
|
fromAddress,
|
|
235
235
|
toAddress,
|
|
236
236
|
fromAmount,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MutableRefObject } from 'react'
|
|
2
2
|
import { useLayoutEffect } from 'react'
|
|
3
3
|
import { getRelativeContainer } from '../utils/elements.js'
|
|
4
4
|
import { useDefaultElementId } from './useDefaultElementId.js'
|
|
@@ -8,7 +8,7 @@ import { useDefaultElementId } from './useDefaultElementId.js'
|
|
|
8
8
|
// CSS changes in those components can have implications for the functionality in this hook
|
|
9
9
|
|
|
10
10
|
export const useSetContentHeight = (
|
|
11
|
-
ref:
|
|
11
|
+
ref: MutableRefObject<HTMLElement | null>,
|
|
12
12
|
dependency?: unknown
|
|
13
13
|
) => {
|
|
14
14
|
const elementId = useDefaultElementId()
|
package/src/i18n/en.json
CHANGED
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"startSwapping": "Start swapping",
|
|
48
48
|
"swap": "Swap",
|
|
49
49
|
"swapReview": "Review swap",
|
|
50
|
-
"system": "System",
|
|
51
50
|
"tryAgain": "Try again",
|
|
52
51
|
"viewCoverage": "View coverage",
|
|
53
52
|
"viewOnExplorer": "View on explorer"
|
|
@@ -309,7 +308,7 @@
|
|
|
309
308
|
"searchExchanges": "Search by exchange name"
|
|
310
309
|
},
|
|
311
310
|
"settings": {
|
|
312
|
-
"
|
|
311
|
+
"theme": "Theme",
|
|
313
312
|
"enabledBridges": "Bridges",
|
|
314
313
|
"enabledExchanges": "Exchanges",
|
|
315
314
|
"gasPrice": {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ToolsResponse } from '@lifi/sdk'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
Check,
|
|
4
|
+
CheckBoxOutlineBlankOutlined,
|
|
5
|
+
CheckBoxOutlined,
|
|
6
|
+
IndeterminateCheckBoxOutlined,
|
|
7
|
+
} from '@mui/icons-material'
|
|
6
8
|
import {
|
|
7
9
|
Avatar,
|
|
8
10
|
IconButton,
|
|
@@ -12,6 +12,7 @@ import { useScrollableOverflowHidden } from '../../hooks/useScrollableContainer.
|
|
|
12
12
|
import { useSwapOnly } from '../../hooks/useSwapOnly.js'
|
|
13
13
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'
|
|
14
14
|
import type { FormTypeProps } from '../../stores/form/types.js'
|
|
15
|
+
import { HiddenUI } from '../../types/widget.js'
|
|
15
16
|
import { SearchTokenInput } from './SearchTokenInput.js'
|
|
16
17
|
|
|
17
18
|
export const SelectTokenPage: FC<FormTypeProps> = ({ formType }) => {
|
|
@@ -26,7 +27,7 @@ export const SelectTokenPage: FC<FormTypeProps> = ({ formType }) => {
|
|
|
26
27
|
|
|
27
28
|
const swapOnly = useSwapOnly()
|
|
28
29
|
|
|
29
|
-
const { subvariant } = useWidgetConfig()
|
|
30
|
+
const { subvariant, hiddenUI } = useWidgetConfig()
|
|
30
31
|
const { t } = useTranslation()
|
|
31
32
|
const title =
|
|
32
33
|
formType === 'from'
|
|
@@ -37,7 +38,8 @@ export const SelectTokenPage: FC<FormTypeProps> = ({ formType }) => {
|
|
|
37
38
|
|
|
38
39
|
useHeader(title)
|
|
39
40
|
|
|
40
|
-
const hideChainSelect =
|
|
41
|
+
const hideChainSelect =
|
|
42
|
+
(swapOnly && formType === 'to') || hiddenUI?.includes(HiddenUI.ChainSelect)
|
|
41
43
|
|
|
42
44
|
return (
|
|
43
45
|
<FullPageContainer disableGutters>
|