@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
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
Error as ErrorIcon,
|
|
3
|
+
TurnedIn,
|
|
4
|
+
WarningRounded,
|
|
5
|
+
} from '@mui/icons-material'
|
|
4
6
|
import { Button, Typography } from '@mui/material'
|
|
5
|
-
import type { ChangeEvent,
|
|
7
|
+
import type { ChangeEvent, MutableRefObject } from 'react'
|
|
6
8
|
import { forwardRef, useState } from 'react'
|
|
7
9
|
import { useTranslation } from 'react-i18next'
|
|
8
10
|
import { BottomSheet } from '../../components/BottomSheet/BottomSheet.js'
|
|
@@ -46,7 +48,7 @@ export const BookmarkAddressSheet = forwardRef<
|
|
|
46
48
|
|
|
47
49
|
const handleCancel = () => {
|
|
48
50
|
setError(undefined)
|
|
49
|
-
;(ref as
|
|
51
|
+
;(ref as MutableRefObject<BottomSheetBase>).current?.close()
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
const validateWithAddressFromInput = async () => {
|
|
@@ -110,7 +112,7 @@ export const BookmarkAddressSheet = forwardRef<
|
|
|
110
112
|
})
|
|
111
113
|
return
|
|
112
114
|
}
|
|
113
|
-
;(ref as
|
|
115
|
+
;(ref as MutableRefObject<BottomSheetBase>).current?.close()
|
|
114
116
|
|
|
115
117
|
onAddBookmark({
|
|
116
118
|
name: validatedBookmark.name,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {
|
|
2
|
+
ContentCopyRounded,
|
|
3
|
+
DeleteOutline,
|
|
4
|
+
MoreHoriz,
|
|
5
|
+
OpenInNewRounded,
|
|
6
|
+
TurnedIn,
|
|
7
|
+
} from '@mui/icons-material'
|
|
6
8
|
import { Button, ListItemAvatar, ListItemText, MenuItem } from '@mui/material'
|
|
7
9
|
import { useId, useRef, useState } from 'react'
|
|
8
10
|
import { useTranslation } from 'react-i18next'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import Wallet from '@mui/icons-material
|
|
2
|
-
import WarningRounded from '@mui/icons-material/WarningRounded'
|
|
1
|
+
import { Wallet, WarningRounded } from '@mui/icons-material'
|
|
3
2
|
import { Button, Typography } from '@mui/material'
|
|
4
|
-
import type {
|
|
3
|
+
import type { MutableRefObject } from 'react'
|
|
5
4
|
import { forwardRef, useRef } from 'react'
|
|
6
5
|
import { useTranslation } from 'react-i18next'
|
|
7
6
|
import { BottomSheet } from '../../components/BottomSheet/BottomSheet.js'
|
|
@@ -34,7 +33,7 @@ export const ConfirmAddressSheet = forwardRef<
|
|
|
34
33
|
ConfirmAddressSheetProps
|
|
35
34
|
>((props, ref) => {
|
|
36
35
|
const handleClose = () => {
|
|
37
|
-
;(ref as
|
|
36
|
+
;(ref as MutableRefObject<BottomSheetBase>).current?.close()
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
return (
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { Account } from '@lifi/wallet-management'
|
|
2
2
|
import { useAccount } from '@lifi/wallet-management'
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import {
|
|
4
|
+
ContentCopyRounded,
|
|
5
|
+
MoreHoriz,
|
|
6
|
+
OpenInNewRounded,
|
|
7
|
+
Wallet,
|
|
8
|
+
} from '@mui/icons-material'
|
|
7
9
|
import { ListItemAvatar, ListItemText, MenuItem } from '@mui/material'
|
|
8
10
|
import { useId, useState } from 'react'
|
|
9
11
|
import { useTranslation } from 'react-i18next'
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
ContentCopyRounded,
|
|
3
|
+
DeleteOutline,
|
|
4
|
+
History,
|
|
5
|
+
MoreHoriz,
|
|
6
|
+
OpenInNewRounded,
|
|
7
|
+
TurnedInNot,
|
|
8
|
+
} from '@mui/icons-material'
|
|
7
9
|
import { ListItemAvatar, ListItemText, MenuItem } from '@mui/material'
|
|
8
10
|
import { useId, useRef, useState } from 'react'
|
|
9
11
|
import { useTranslation } from 'react-i18next'
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
ContentCopyRounded,
|
|
3
|
+
MoreHoriz,
|
|
4
|
+
OpenInNewRounded,
|
|
5
|
+
} from '@mui/icons-material'
|
|
4
6
|
import { ListItemAvatar, ListItemText, MenuItem } from '@mui/material'
|
|
5
7
|
import { useId, useState } from 'react'
|
|
6
8
|
import { useTranslation } from 'react-i18next'
|
|
@@ -13,6 +13,7 @@ import { InputCard } from '../../components/Card/InputCard.js'
|
|
|
13
13
|
import { Input } from '../../components/Input.js'
|
|
14
14
|
import type { PageContainerProps } from '../../components/PageContainer.js'
|
|
15
15
|
import { PageContainer } from '../../components/PageContainer.js'
|
|
16
|
+
import { getContrastAlphaColor } from '../../utils/colors.js'
|
|
16
17
|
|
|
17
18
|
export const AddressInput = styled(Input)(({ theme }) => ({
|
|
18
19
|
padding: 0,
|
|
@@ -86,12 +87,12 @@ export const IconContainer = styled(Box)(({ theme }) => ({
|
|
|
86
87
|
alignItems: 'center',
|
|
87
88
|
width: 80,
|
|
88
89
|
height: 80,
|
|
90
|
+
color: theme.palette.grey[300],
|
|
91
|
+
background: theme.palette.grey[800],
|
|
89
92
|
borderRadius: '50%',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
color: theme.vars.palette.grey[300],
|
|
94
|
-
background: theme.vars.palette.grey[800],
|
|
93
|
+
...theme.applyStyles('light', {
|
|
94
|
+
color: theme.palette.grey[700],
|
|
95
|
+
background: theme.palette.grey[200],
|
|
95
96
|
}),
|
|
96
97
|
}))
|
|
97
98
|
|
|
@@ -118,7 +119,7 @@ export const BookmarksListContainer = styled(ListContainer)(({ theme }) => ({
|
|
|
118
119
|
: { minHeight: 440 }),
|
|
119
120
|
}))
|
|
120
121
|
export const BookmarkButtonContainer = styled(Box)(({ theme }) => ({
|
|
121
|
-
background: theme.
|
|
122
|
+
background: theme.palette.background.default,
|
|
122
123
|
display: 'flex',
|
|
123
124
|
flexDirection: 'column',
|
|
124
125
|
bottom: 0,
|
|
@@ -140,10 +141,10 @@ export const EmptyContainer = styled(Box)(({ theme }) => ({
|
|
|
140
141
|
export const ValidationAlert = styled(Alert)(({ theme }) => ({
|
|
141
142
|
backgroundColor: 'transparent',
|
|
142
143
|
padding: 0,
|
|
143
|
-
color: theme.
|
|
144
|
+
color: theme.palette.text.primary,
|
|
144
145
|
[`.${alertClasses.icon}`]: {
|
|
145
146
|
padding: 0,
|
|
146
|
-
color: theme.
|
|
147
|
+
color: theme.palette.error.main,
|
|
147
148
|
},
|
|
148
149
|
[`.${alertClasses.message}`]: { padding: theme.spacing(0.25, 0, 0, 0) },
|
|
149
150
|
}))
|
|
@@ -153,6 +154,6 @@ export const OptionsMenuButton = styled(IconButton)(({ theme }) => ({
|
|
|
153
154
|
top: theme.spacing(1.75),
|
|
154
155
|
right: theme.spacing(2),
|
|
155
156
|
'&:hover': {
|
|
156
|
-
backgroundColor:
|
|
157
|
+
backgroundColor: getContrastAlphaColor(theme, 0.04),
|
|
157
158
|
},
|
|
158
159
|
}))
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useAccount } from '@lifi/wallet-management'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
Error as ErrorIcon,
|
|
4
|
+
History,
|
|
5
|
+
TurnedIn,
|
|
6
|
+
Wallet,
|
|
7
|
+
} from '@mui/icons-material'
|
|
6
8
|
import { Box, Tooltip, Typography } from '@mui/material'
|
|
7
9
|
import type { ChangeEvent } from 'react'
|
|
8
10
|
import { useRef, useState } from 'react'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import AirlineStops from '@mui/icons-material
|
|
2
|
-
import SwapHoriz from '@mui/icons-material/SwapHoriz'
|
|
1
|
+
import { AirlineStops, SwapHoriz } from '@mui/icons-material'
|
|
3
2
|
import { useTranslation } from 'react-i18next'
|
|
4
3
|
import { useNavigate } from 'react-router-dom'
|
|
5
4
|
import { shallow } from 'zustand/shallow'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import EvStation from '@mui/icons-material
|
|
1
|
+
import { EvStation } from '@mui/icons-material'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
import { CardTabs, Tab } from '../../components/Tabs/Tabs.style.js'
|
|
4
4
|
import { useSettingMonitor } from '../../hooks/useSettingMonitor.js'
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Box, styled } from '@mui/material'
|
|
2
|
+
import { getContrastAlphaColor } from '../../utils/colors.js'
|
|
2
3
|
|
|
3
4
|
export const ResetButtonContainer = styled(Box)(({ theme }) => ({
|
|
4
|
-
background:
|
|
5
|
+
background: getContrastAlphaColor(theme, 0.04),
|
|
5
6
|
borderRadius: '16px',
|
|
6
7
|
padding: '16px',
|
|
7
8
|
svg: {
|
|
8
|
-
fill:
|
|
9
|
+
fill: getContrastAlphaColor(theme, 0.4),
|
|
9
10
|
},
|
|
10
11
|
}))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Order } from '@lifi/sdk'
|
|
2
|
-
import Route from '@mui/icons-material
|
|
2
|
+
import { Route } from '@mui/icons-material'
|
|
3
3
|
import { useTranslation } from 'react-i18next'
|
|
4
4
|
import { CardTabs, Tab } from '../../components/Tabs/Tabs.style.js'
|
|
5
5
|
import { useSettingMonitor } from '../../hooks/useSettingMonitor.js'
|
|
@@ -3,30 +3,30 @@ import {
|
|
|
3
3
|
Box,
|
|
4
4
|
ButtonBase,
|
|
5
5
|
InputBase,
|
|
6
|
+
alpha,
|
|
6
7
|
inputBaseClasses,
|
|
7
8
|
styled,
|
|
8
9
|
} from '@mui/material'
|
|
9
10
|
|
|
10
11
|
export const SettingsFieldSet = styled(Box)(({ theme }) => ({
|
|
11
12
|
display: 'flex',
|
|
12
|
-
|
|
13
|
+
backgroundColor: alpha(theme.palette.common.white, 0.08),
|
|
14
|
+
borderRadius: theme.shape.borderRadius,
|
|
13
15
|
padding: theme.spacing(0.5),
|
|
14
16
|
gap: theme.spacing(0.5),
|
|
15
17
|
height: '3.5rem',
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08)`,
|
|
18
|
+
...theme.applyStyles('light', {
|
|
19
|
+
backgroundColor: alpha(theme.palette.common.black, 0.04),
|
|
19
20
|
}),
|
|
20
21
|
}))
|
|
21
22
|
|
|
22
23
|
const slippageControlSelected = (theme: Theme) => ({
|
|
23
|
-
backgroundColor:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
borderRadius: `calc(${theme.vars.shape.borderRadius} - 4px)`,
|
|
24
|
+
backgroundColor:
|
|
25
|
+
theme.palette.mode === 'light'
|
|
26
|
+
? theme.palette.background.paper
|
|
27
|
+
: alpha(theme.palette.common.black, 0.56),
|
|
28
|
+
borderRadius: theme.shape.borderRadius - 4,
|
|
29
|
+
boxShadow: `0px 2px 4px ${alpha(theme.palette.common.black, 0.04)}`,
|
|
30
30
|
})
|
|
31
31
|
|
|
32
32
|
interface SlippageDefaultProps {
|
|
@@ -35,11 +35,10 @@ interface SlippageDefaultProps {
|
|
|
35
35
|
|
|
36
36
|
export const SlippageDefaultButton = styled(ButtonBase)<SlippageDefaultProps>(
|
|
37
37
|
({ theme, selected }) => {
|
|
38
|
-
const slippageControlSelectedStyles = slippageControlSelected(theme)
|
|
39
38
|
const selectedStyle = selected
|
|
40
39
|
? {
|
|
41
40
|
'&:not(:focus)': {
|
|
42
|
-
...
|
|
41
|
+
...slippageControlSelected(theme),
|
|
43
42
|
},
|
|
44
43
|
}
|
|
45
44
|
: {}
|
|
@@ -50,7 +49,7 @@ export const SlippageDefaultButton = styled(ButtonBase)<SlippageDefaultProps>(
|
|
|
50
49
|
fontSize: '1rem',
|
|
51
50
|
fontWeight: 700,
|
|
52
51
|
'&:focus': {
|
|
53
|
-
...
|
|
52
|
+
...slippageControlSelected(theme),
|
|
54
53
|
},
|
|
55
54
|
...selectedStyle,
|
|
56
55
|
}
|
|
@@ -59,11 +58,10 @@ export const SlippageDefaultButton = styled(ButtonBase)<SlippageDefaultProps>(
|
|
|
59
58
|
|
|
60
59
|
export const SlippageCustomInput = styled(InputBase)<SlippageDefaultProps>(
|
|
61
60
|
({ theme, selected }) => {
|
|
62
|
-
const slippageControlSelectedStyles = slippageControlSelected(theme)
|
|
63
61
|
const selectedStyle = selected
|
|
64
62
|
? {
|
|
65
63
|
'&:not(:focus)': {
|
|
66
|
-
...
|
|
64
|
+
...slippageControlSelected(theme),
|
|
67
65
|
},
|
|
68
66
|
}
|
|
69
67
|
: {}
|
|
@@ -82,7 +80,7 @@ export const SlippageCustomInput = styled(InputBase)<SlippageDefaultProps>(
|
|
|
82
80
|
opacity: 1,
|
|
83
81
|
},
|
|
84
82
|
'&:focus': {
|
|
85
|
-
...
|
|
83
|
+
...slippageControlSelected(theme),
|
|
86
84
|
},
|
|
87
85
|
...selectedStyle,
|
|
88
86
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import Percent from '@mui/icons-material
|
|
2
|
-
import WarningRounded from '@mui/icons-material/WarningRounded'
|
|
1
|
+
import { Percent, WarningRounded } from '@mui/icons-material'
|
|
3
2
|
import { Box, Typography, debounce } from '@mui/material'
|
|
4
3
|
import type { ChangeEventHandler, FocusEventHandler } from 'react'
|
|
5
4
|
import { useCallback, useMemo, useRef, useState } from 'react'
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import BrightnessAuto from '@mui/icons-material
|
|
2
|
-
import
|
|
3
|
-
import Nightlight from '@mui/icons-material/Nightlight'
|
|
4
|
-
import { Tooltip, useColorScheme } from '@mui/material'
|
|
1
|
+
import { BrightnessAuto, LightMode, Nightlight } from '@mui/icons-material'
|
|
2
|
+
import { Tooltip } from '@mui/material'
|
|
5
3
|
import { useTranslation } from 'react-i18next'
|
|
6
4
|
import { CardValue } from '../../components/Card/CardButton.style.js'
|
|
7
5
|
import { CardTabs, Tab } from '../../components/Tabs/Tabs.style.js'
|
|
8
6
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'
|
|
7
|
+
import { useAppearance } from '../../stores/settings/useAppearance.js'
|
|
9
8
|
import type { Appearance } from '../../types/widget.js'
|
|
10
9
|
import { HiddenUI } from '../../types/widget.js'
|
|
11
10
|
import { SettingCardExpandable } from './SettingsCard/SettingCardExpandable.js'
|
|
@@ -13,7 +12,7 @@ import { SettingCardExpandable } from './SettingsCard/SettingCardExpandable.js'
|
|
|
13
12
|
const themeIcons = {
|
|
14
13
|
light: LightMode,
|
|
15
14
|
dark: Nightlight,
|
|
16
|
-
|
|
15
|
+
auto: BrightnessAuto,
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
interface ThemeTabProps {
|
|
@@ -37,29 +36,27 @@ const ThemeTab: React.FC<ThemeTabProps> = ({
|
|
|
37
36
|
|
|
38
37
|
export const ThemeSettings: React.FC = () => {
|
|
39
38
|
const { t } = useTranslation()
|
|
40
|
-
const
|
|
39
|
+
const [appearance, setAppearance] = useAppearance()
|
|
41
40
|
const { hiddenUI } = useWidgetConfig()
|
|
42
41
|
|
|
43
42
|
if (hiddenUI?.includes(HiddenUI.Appearance)) {
|
|
44
43
|
return null
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
const appearance = mode ?? 'system'
|
|
48
|
-
|
|
49
46
|
const ThemeIcon = themeIcons[appearance]
|
|
50
47
|
|
|
51
48
|
const handleThemeChange = (
|
|
52
49
|
_: React.SyntheticEvent,
|
|
53
50
|
appearance: Appearance
|
|
54
51
|
) => {
|
|
55
|
-
|
|
52
|
+
setAppearance(appearance)
|
|
56
53
|
}
|
|
57
54
|
|
|
58
55
|
return (
|
|
59
56
|
<SettingCardExpandable
|
|
60
57
|
value={<CardValue>{t(`button.${appearance}`)} </CardValue>}
|
|
61
58
|
icon={<ThemeIcon />}
|
|
62
|
-
title={t('settings.
|
|
59
|
+
title={t('settings.theme')}
|
|
63
60
|
>
|
|
64
61
|
<CardTabs
|
|
65
62
|
value={appearance}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import ContentCopyRounded from '@mui/icons-material
|
|
2
|
-
import OpenInNew from '@mui/icons-material/OpenInNew'
|
|
1
|
+
import { ContentCopyRounded, OpenInNew } from '@mui/icons-material'
|
|
3
2
|
import { Box, Typography } from '@mui/material'
|
|
4
3
|
import { useTranslation } from 'react-i18next'
|
|
5
4
|
import { Card } from '../../components/Card/Card.js'
|
|
@@ -24,7 +24,7 @@ export const TransactionHistoryItemSkeleton = () => {
|
|
|
24
24
|
width={96}
|
|
25
25
|
height={16}
|
|
26
26
|
sx={(theme) => ({
|
|
27
|
-
borderRadius: theme.
|
|
27
|
+
borderRadius: `${theme.shape.borderRadius}px`,
|
|
28
28
|
})}
|
|
29
29
|
/>
|
|
30
30
|
<Skeleton
|
|
@@ -32,7 +32,7 @@ export const TransactionHistoryItemSkeleton = () => {
|
|
|
32
32
|
width={64}
|
|
33
33
|
height={16}
|
|
34
34
|
sx={(theme) => ({
|
|
35
|
-
borderRadius: theme.
|
|
35
|
+
borderRadius: `${theme.shape.borderRadius}px`,
|
|
36
36
|
})}
|
|
37
37
|
/>
|
|
38
38
|
</Box>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import Wallet from '@mui/icons-material
|
|
2
|
-
import WarningRounded from '@mui/icons-material/WarningRounded'
|
|
1
|
+
import { Wallet, WarningRounded } from '@mui/icons-material'
|
|
3
2
|
import { Button, Typography } from '@mui/material'
|
|
4
|
-
import type {
|
|
3
|
+
import type { MutableRefObject } from 'react'
|
|
5
4
|
import { forwardRef, useRef } from 'react'
|
|
6
5
|
import { useTranslation } from 'react-i18next'
|
|
7
6
|
import { BottomSheet } from '../../components/BottomSheet/BottomSheet.js'
|
|
@@ -33,7 +32,7 @@ export const ConfirmToAddressSheet = forwardRef<
|
|
|
33
32
|
ConfirmToAddressSheetProps
|
|
34
33
|
>((props, ref) => {
|
|
35
34
|
const handleClose = () => {
|
|
36
|
-
;(ref as
|
|
35
|
+
;(ref as MutableRefObject<BottomSheetBase>).current?.close()
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExchangeRateUpdateParams } from '@lifi/sdk'
|
|
2
|
-
import WarningRounded from '@mui/icons-material
|
|
2
|
+
import { WarningRounded } from '@mui/icons-material'
|
|
3
3
|
import { Box, Button, Typography } from '@mui/material'
|
|
4
|
-
import type {
|
|
4
|
+
import type { MutableRefObject } from 'react'
|
|
5
5
|
import {
|
|
6
6
|
forwardRef,
|
|
7
7
|
useCallback,
|
|
@@ -37,17 +37,19 @@ export const ExchangeRateBottomSheet = forwardRef<
|
|
|
37
37
|
const resolverRef = useRef<(value: boolean) => void>(null)
|
|
38
38
|
|
|
39
39
|
const handleContinue = () => {
|
|
40
|
-
;(ref as
|
|
40
|
+
;(ref as MutableRefObject<ExchangeRateBottomSheetBase>).current?.close(true)
|
|
41
41
|
onContinue?.()
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const handleCancel = useCallback(() => {
|
|
45
|
-
;(ref as
|
|
45
|
+
;(ref as MutableRefObject<ExchangeRateBottomSheetBase>).current?.close(
|
|
46
|
+
false
|
|
47
|
+
)
|
|
46
48
|
onCancel?.()
|
|
47
49
|
}, [onCancel, ref])
|
|
48
50
|
|
|
49
51
|
const handleClose = useCallback(() => {
|
|
50
|
-
;(ref as
|
|
52
|
+
;(ref as MutableRefObject<ExchangeRateBottomSheetBase>).current?.close(
|
|
51
53
|
false,
|
|
52
54
|
false
|
|
53
55
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Theme } from '@mui/material'
|
|
2
|
-
import { Box, styled } from '@mui/material'
|
|
2
|
+
import { Box, alpha, darken, styled } from '@mui/material'
|
|
3
3
|
import { RouteExecutionStatus } from '../../stores/routes/types.js'
|
|
4
4
|
|
|
5
5
|
type StatusColor = RouteExecutionStatus | 'warning'
|
|
@@ -7,31 +7,19 @@ type StatusColor = RouteExecutionStatus | 'warning'
|
|
|
7
7
|
const getStatusColor = (status: StatusColor, theme: Theme) => {
|
|
8
8
|
switch (status) {
|
|
9
9
|
case RouteExecutionStatus.Done:
|
|
10
|
-
return {
|
|
11
|
-
color: theme.vars.palette.success.mainChannel,
|
|
12
|
-
alpha: 0.12,
|
|
13
|
-
darken: 0,
|
|
14
|
-
}
|
|
10
|
+
return { color: theme.palette.success.main, alpha: 0.12, darken: 0 }
|
|
15
11
|
case RouteExecutionStatus.Failed:
|
|
16
|
-
return {
|
|
17
|
-
color: theme.vars.palette.error.mainChannel,
|
|
18
|
-
alpha: 0.12,
|
|
19
|
-
darken: 0,
|
|
20
|
-
}
|
|
12
|
+
return { color: theme.palette.error.main, alpha: 0.12, darken: 0 }
|
|
21
13
|
case RouteExecutionStatus.Done | RouteExecutionStatus.Partial:
|
|
22
14
|
case RouteExecutionStatus.Done | RouteExecutionStatus.Refunded:
|
|
23
15
|
case 'warning':
|
|
24
16
|
return {
|
|
25
|
-
color: theme.
|
|
17
|
+
color: theme.palette.warning.main,
|
|
26
18
|
alpha: 0.48,
|
|
27
19
|
darken: theme.palette.mode === 'light' ? 0.32 : 0,
|
|
28
20
|
}
|
|
29
21
|
default:
|
|
30
|
-
return {
|
|
31
|
-
color: theme.vars.palette.primary.mainChannel,
|
|
32
|
-
alpha: 0.12,
|
|
33
|
-
darken: 0,
|
|
34
|
-
}
|
|
22
|
+
return { color: theme.palette.primary.main, alpha: 0.12, darken: 0 }
|
|
35
23
|
}
|
|
36
24
|
}
|
|
37
25
|
|
|
@@ -50,7 +38,7 @@ export const IconCircle = styled(Box, {
|
|
|
50
38
|
darken: darkenValue,
|
|
51
39
|
} = getStatusColor(status, theme)
|
|
52
40
|
return {
|
|
53
|
-
backgroundColor:
|
|
41
|
+
backgroundColor: alpha(color, alphaValue),
|
|
54
42
|
borderRadius: '50%',
|
|
55
43
|
width: 64,
|
|
56
44
|
height: 64,
|
|
@@ -58,7 +46,7 @@ export const IconCircle = styled(Box, {
|
|
|
58
46
|
position: 'relative',
|
|
59
47
|
placeItems: 'center',
|
|
60
48
|
'& > svg': {
|
|
61
|
-
color:
|
|
49
|
+
color: darken(color, darkenValue),
|
|
62
50
|
width: 32,
|
|
63
51
|
height: 32,
|
|
64
52
|
},
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
Done,
|
|
3
|
+
ErrorRounded,
|
|
4
|
+
InfoRounded,
|
|
5
|
+
WarningRounded,
|
|
6
|
+
} from '@mui/icons-material'
|
|
5
7
|
import { Box, Button, Skeleton, Typography } from '@mui/material'
|
|
6
8
|
import { useCallback, useEffect, useRef } from 'react'
|
|
7
9
|
import { useTranslation } from 'react-i18next'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Route } from '@lifi/sdk'
|
|
2
2
|
import { isGaslessStep } from '@lifi/sdk'
|
|
3
|
-
import WarningRounded from '@mui/icons-material
|
|
3
|
+
import { WarningRounded } from '@mui/icons-material'
|
|
4
4
|
import { Box, Button, Typography } from '@mui/material'
|
|
5
|
-
import type {
|
|
5
|
+
import type { MutableRefObject } from 'react'
|
|
6
6
|
import { forwardRef, useRef } from 'react'
|
|
7
7
|
import { useTranslation } from 'react-i18next'
|
|
8
8
|
import { BottomSheet } from '../../components/BottomSheet/BottomSheet.js'
|
|
@@ -24,7 +24,7 @@ export const TokenValueBottomSheet = forwardRef<
|
|
|
24
24
|
TokenValueBottomSheetProps
|
|
25
25
|
>(({ route, onContinue, onCancel }, ref) => {
|
|
26
26
|
const handleCancel = () => {
|
|
27
|
-
;(ref as
|
|
27
|
+
;(ref as MutableRefObject<BottomSheetBase>).current?.close()
|
|
28
28
|
onCancel?.()
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExchangeRateUpdateParams } from '@lifi/sdk'
|
|
2
|
-
import Delete from '@mui/icons-material
|
|
2
|
+
import { Delete } from '@mui/icons-material'
|
|
3
3
|
import { Box, Button, Tooltip } from '@mui/material'
|
|
4
4
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
|
5
5
|
import { useTranslation } from 'react-i18next'
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '
|
|
5
|
-
import { useEffect, useMemo } from 'react'
|
|
1
|
+
import type { PaletteMode } from '@mui/material'
|
|
2
|
+
import { ThemeProvider as MuiThemeProvider, useMediaQuery } from '@mui/material'
|
|
3
|
+
import { useEffect, useMemo, useState } from 'react'
|
|
4
|
+
import { useAppearance } from '../../stores/settings/useAppearance.js'
|
|
6
5
|
import { createTheme } from '../../themes/createTheme.js'
|
|
7
6
|
import { useWidgetConfig } from '../WidgetProvider/WidgetProvider.js'
|
|
8
7
|
|
|
@@ -10,26 +9,34 @@ export const ThemeProvider: React.FC<React.PropsWithChildren> = ({
|
|
|
10
9
|
children,
|
|
11
10
|
}) => {
|
|
12
11
|
const { appearance: colorSchemeMode, theme: themeConfig } = useWidgetConfig()
|
|
13
|
-
const
|
|
12
|
+
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')
|
|
13
|
+
const [appearance, setAppearance] = useAppearance()
|
|
14
|
+
const [mode, setMode] = useState<PaletteMode>(
|
|
15
|
+
(colorSchemeMode ?? appearance === 'auto')
|
|
16
|
+
? prefersDarkMode
|
|
17
|
+
? 'dark'
|
|
18
|
+
: 'light'
|
|
19
|
+
: appearance
|
|
20
|
+
)
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (appearance === 'auto') {
|
|
24
|
+
setMode(prefersDarkMode ? 'dark' : 'light')
|
|
25
|
+
} else {
|
|
26
|
+
setMode(appearance)
|
|
27
|
+
}
|
|
28
|
+
}, [appearance, prefersDarkMode])
|
|
29
|
+
|
|
30
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: setAppearance is stable
|
|
16
31
|
useEffect(() => {
|
|
17
32
|
if (colorSchemeMode) {
|
|
18
|
-
|
|
33
|
+
setAppearance(colorSchemeMode)
|
|
19
34
|
}
|
|
20
35
|
}, [colorSchemeMode])
|
|
21
36
|
|
|
22
|
-
const theme = useMemo(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<MuiThemeProvider
|
|
26
|
-
theme={theme}
|
|
27
|
-
defaultMode={colorSchemeMode ?? 'system'}
|
|
28
|
-
modeStorageKey="li.fi-widget-mode"
|
|
29
|
-
colorSchemeStorageKey="li.fi-widget-color-scheme"
|
|
30
|
-
disableTransitionOnChange
|
|
31
|
-
>
|
|
32
|
-
{children}
|
|
33
|
-
</MuiThemeProvider>
|
|
37
|
+
const theme = useMemo(
|
|
38
|
+
() => createTheme(mode, themeConfig),
|
|
39
|
+
[mode, themeConfig]
|
|
34
40
|
)
|
|
41
|
+
return <MuiThemeProvider theme={theme}>{children}</MuiThemeProvider>
|
|
35
42
|
}
|