@lifi/widget 3.0.0-alpha.32 → 3.0.0-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.tsx +6 -3
- package/AppDefault.tsx +3 -3
- package/AppDrawer.tsx +3 -5
- package/_esm/App.js +6 -3
- package/_esm/App.js.map +1 -1
- package/_esm/AppDefault.js +3 -3
- package/_esm/AppDefault.js.map +1 -1
- package/_esm/AppDrawer.js +3 -3
- package/_esm/AppDrawer.js.map +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.d.ts +2 -2
- package/_esm/components/ActiveTransactions/ActiveTransactions.js +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +1 -1
- package/_esm/components/AmountInput/AmountInput.d.ts +3 -3
- package/_esm/components/AmountInput/AmountInput.js +2 -2
- package/_esm/components/AmountInput/AmountInput.js.map +1 -1
- package/_esm/components/AppContainer.js +3 -2
- package/_esm/components/AppContainer.js.map +1 -1
- package/_esm/components/Avatar/AccountAvatar.d.ts +3 -1
- package/_esm/components/Avatar/AccountAvatar.js +3 -3
- package/_esm/components/Avatar/AccountAvatar.js.map +1 -1
- package/_esm/components/Avatar/utils.d.ts +1 -1
- package/_esm/components/Avatar/utils.js +1 -1
- package/_esm/components/Avatar/utils.js.map +1 -1
- package/_esm/components/Card/Card.d.ts +7 -19
- package/_esm/components/Card/Card.js +36 -42
- package/_esm/components/Card/Card.js.map +1 -1
- package/_esm/components/Card/CardLabel.js +5 -3
- package/_esm/components/Card/CardLabel.js.map +1 -1
- package/_esm/components/Card/CardTitle.js +1 -0
- package/_esm/components/Card/CardTitle.js.map +1 -1
- package/_esm/components/Card/InputCard.d.ts +4 -0
- package/_esm/components/Card/InputCard.js +7 -0
- package/_esm/components/Card/InputCard.js.map +1 -0
- package/_esm/components/ChainSelect/ChainSelect.js +1 -1
- package/_esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/_esm/components/ChainSelect/ChainSelect.style.d.ts +2 -10
- package/_esm/components/ContractComponent/ContractComponent.d.ts +2 -2
- package/_esm/components/ContractComponent/ContractComponent.js.map +1 -1
- package/_esm/components/ContractComponent/ItemPrice.d.ts +8 -0
- package/_esm/components/ContractComponent/ItemPrice.js +23 -0
- package/_esm/components/ContractComponent/ItemPrice.js.map +1 -0
- package/_esm/components/{NFT → ContractComponent/NFT}/NFT.js +5 -11
- package/_esm/components/ContractComponent/NFT/NFT.js.map +1 -0
- package/_esm/components/ContractComponent/NFT/NFT.style.js.map +1 -0
- package/_esm/components/{NFT → ContractComponent/NFT}/NFTBase.js +1 -1
- package/_esm/components/ContractComponent/NFT/NFTBase.js.map +1 -0
- package/_esm/components/{NFT → ContractComponent/NFT}/types.d.ts +2 -3
- package/_esm/components/ContractComponent/NFT/types.js.map +1 -0
- package/_esm/components/Dialog.d.ts +2 -9
- package/_esm/components/Dialog.js +1 -0
- package/_esm/components/Dialog.js.map +1 -1
- package/_esm/components/Header/BackButton.d.ts +3 -0
- package/_esm/components/Header/BackButton.js +8 -0
- package/_esm/components/Header/BackButton.js.map +1 -0
- package/_esm/components/Header/CloseDrawerButton.d.ts +5 -1
- package/_esm/components/Header/CloseDrawerButton.js +8 -2
- package/_esm/components/Header/CloseDrawerButton.js.map +1 -1
- package/_esm/components/Header/Header.style.d.ts +4 -1
- package/_esm/components/Header/Header.style.js +24 -16
- package/_esm/components/Header/Header.style.js.map +1 -1
- package/_esm/components/Header/NavigationHeader.js +8 -9
- package/_esm/components/Header/NavigationHeader.js.map +1 -1
- package/_esm/components/Header/NavigationTabs.js +1 -1
- package/_esm/components/Header/NavigationTabs.js.map +1 -1
- package/_esm/components/Header/SettingsButton.style.d.ts +1 -1
- package/_esm/components/Header/TransactionHistoryButton.js +1 -1
- package/_esm/components/Header/TransactionHistoryButton.js.map +1 -1
- package/_esm/components/Header/WalletHeader.js +4 -11
- package/_esm/components/Header/WalletHeader.js.map +1 -1
- package/_esm/components/Header/WalletMenu.js +2 -2
- package/_esm/components/Header/WalletMenu.js.map +1 -1
- package/_esm/components/Insurance/types.d.ts +3 -3
- package/_esm/components/ListItem/ListItem.d.ts +1 -1
- package/_esm/components/PageContainer.d.ts +2 -1
- package/_esm/components/PageContainer.js +3 -3
- package/_esm/components/PageContainer.js.map +1 -1
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js +2 -2
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +9 -3
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.js +24 -14
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.js +2 -2
- package/_esm/components/RouteCard/RouteCard.js.map +1 -1
- package/_esm/components/RouteCard/RouteCardSkeleton.d.ts +2 -2
- package/_esm/components/RouteCard/RouteCardSkeleton.js +1 -1
- package/_esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/_esm/components/Routes/Routes.d.ts +2 -2
- package/_esm/components/Routes/Routes.js +1 -1
- package/_esm/components/Routes/Routes.js.map +1 -1
- package/_esm/components/Routes/RoutesExpanded.js +9 -3
- package/_esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/_esm/components/Routes/RoutesExpanded.style.js +1 -0
- package/_esm/components/Routes/RoutesExpanded.style.js.map +1 -1
- package/_esm/components/Select.d.ts +3 -1
- package/_esm/components/SelectChainAndToken.js +3 -6
- package/_esm/components/SelectChainAndToken.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.js +9 -10
- package/_esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +10 -0
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js +41 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletButton.d.ts +2 -2
- package/_esm/components/SendToWallet/SendToWalletButton.js +2 -2
- package/_esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/_esm/components/Step/Step.js +8 -8
- package/_esm/components/Step/Step.js.map +1 -1
- package/_esm/components/Step/StepList.js +1 -1
- package/_esm/components/Step/StepList.js.map +1 -1
- package/_esm/components/StepActions/StepActions.d.ts +4 -9
- package/_esm/components/StepActions/StepActions.js +13 -12
- package/_esm/components/StepActions/StepActions.js.map +1 -1
- package/_esm/components/StepActions/types.d.ts +8 -2
- package/_esm/components/TokenList/TokenList.js +4 -1
- package/_esm/components/TokenList/TokenList.js.map +1 -1
- package/_esm/components/TokenList/TokenList.style.d.ts +1 -1
- package/_esm/components/TokenList/TokenList.style.js +1 -1
- package/_esm/components/TokenList/TokenList.style.js.map +1 -1
- package/_esm/components/TokenList/VirtualizedTokenList.js +19 -18
- package/_esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_esm/components/TokenList/useTokenSelect.js +1 -1
- package/_esm/components/TokenList/useTokenSelect.js.map +1 -1
- package/_esm/components/TokenList/utils.d.ts +2 -0
- package/_esm/components/TokenList/utils.js +35 -0
- package/_esm/components/TokenList/utils.js.map +1 -0
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/hooks/useAddressValidation.d.ts +1 -1
- package/_esm/hooks/useGasRecommendation.d.ts +1 -1
- package/_esm/hooks/useProcessMessage.d.ts +2 -2
- package/_esm/hooks/useProcessMessage.js +16 -12
- package/_esm/hooks/useProcessMessage.js.map +1 -1
- package/_esm/hooks/useRoutes.d.ts +2 -2
- package/_esm/hooks/useRoutes.js +11 -20
- package/_esm/hooks/useRoutes.js.map +1 -1
- package/_esm/hooks/useTokenAddressBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalances.d.ts +1 -1
- package/_esm/hooks/useWideVariant.d.ts +1 -0
- package/_esm/hooks/{useExpandableVariant.js → useWideVariant.js} +3 -3
- package/_esm/hooks/useWideVariant.js.map +1 -0
- package/_esm/i18n/en.json +9 -5
- package/_esm/i18n/index.js +14 -14
- package/_esm/i18n/index.js.map +1 -1
- package/_esm/index.d.ts +6 -3
- package/_esm/index.js +6 -3
- package/_esm/index.js.map +1 -1
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +9 -2
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +1 -1
- package/_esm/pages/LanguagesPage.js +1 -0
- package/_esm/pages/LanguagesPage.js.map +1 -1
- package/_esm/pages/MainPage/MainPage.js +4 -4
- package/_esm/pages/MainPage/MainPage.js.map +1 -1
- package/_esm/pages/MainPage/ReviewButton.js +2 -2
- package/_esm/pages/MainPage/ReviewButton.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.js +1 -8
- package/_esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.style.js +1 -1
- package/_esm/pages/SelectChainPage/SelectChainPage.js +1 -0
- package/_esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/_esm/pages/SelectEnabledToolsPage.js +4 -2
- package/_esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/_esm/pages/SelectNativeTokenPage.js +1 -0
- package/_esm/pages/SelectNativeTokenPage.js.map +1 -1
- package/_esm/pages/SelectTokenPage/SearchTokenInput.js +2 -2
- package/_esm/pages/SelectTokenPage/SearchTokenInput.js.map +1 -1
- package/_esm/pages/SelectTokenPage/SelectTokenPage.js +1 -1
- package/_esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js +1 -0
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.js +1 -1
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToConfiguredWalletPage.js +1 -1
- package/_esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js +3 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.style.d.ts +3 -11
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js +3 -2
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +3 -3
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryPage.js +6 -3
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/_esm/pages/TransactionPage/StatusBottomSheet.js +6 -6
- package/_esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/_esm/pages/TransactionPage/TransactionPage.js +7 -7
- package/_esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/_esm/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/_esm/providers/ThemeProvider/ThemeProvider.js.map +1 -1
- package/_esm/stores/StoreProvider.js +1 -1
- package/_esm/stores/StoreProvider.js.map +1 -1
- package/_esm/stores/form/createFormStore.js +1 -6
- package/_esm/stores/form/createFormStore.js.map +1 -1
- package/_esm/stores/form/types.d.ts +4 -6
- package/_esm/stores/form/types.js.map +1 -1
- package/_esm/stores/form/useFieldController.d.ts +1 -1
- package/_esm/stores/form/useFieldValues.js +1 -1
- package/_esm/stores/form/useFieldValues.js.map +1 -1
- package/_esm/stores/form/useTouchedFields.d.ts +1 -4
- package/_esm/stores/settings/types.d.ts +4 -4
- package/_esm/stores/settings/useSettings.d.ts +1 -1
- package/_esm/themes/createTheme.d.ts +3 -0
- package/_esm/themes/createTheme.js +356 -0
- package/_esm/themes/createTheme.js.map +1 -0
- package/_esm/themes/jumper.d.ts +2 -0
- package/_esm/themes/jumper.js +36 -0
- package/_esm/themes/jumper.js.map +1 -0
- package/_esm/themes/types.d.ts +49 -0
- package/_esm/themes/types.js +2 -0
- package/_esm/{components/NFT → themes}/types.js.map +1 -1
- package/_esm/themes/utils.d.ts +4 -0
- package/_esm/themes/utils.js +9 -0
- package/_esm/themes/utils.js.map +1 -0
- package/_esm/themes/windows95.d.ts +2 -0
- package/_esm/themes/windows95.js +92 -0
- package/_esm/themes/windows95.js.map +1 -0
- package/_esm/types/events.d.ts +3 -1
- package/_esm/types/events.js +1 -0
- package/_esm/types/events.js.map +1 -1
- package/_esm/types/widget.d.ts +40 -27
- package/_esm/types/widget.js.map +1 -1
- package/_esm/utils/item.d.ts +1 -1
- package/components/ActiveTransactions/ActiveTransactions.tsx +3 -3
- package/components/AmountInput/AmountInput.tsx +6 -6
- package/components/AppContainer.tsx +2 -2
- package/components/Avatar/AccountAvatar.tsx +21 -17
- package/components/Avatar/utils.ts +1 -1
- package/components/Card/Card.tsx +45 -74
- package/components/Card/CardLabel.tsx +15 -3
- package/components/Card/CardTitle.tsx +1 -0
- package/components/Card/InputCard.tsx +7 -0
- package/components/ChainSelect/ChainSelect.tsx +6 -2
- package/components/ContractComponent/ContractComponent.tsx +2 -2
- package/components/ContractComponent/ItemPrice.tsx +33 -0
- package/components/{NFT → ContractComponent/NFT}/NFT.tsx +5 -11
- package/components/{NFT → ContractComponent/NFT}/NFTBase.tsx +1 -1
- package/components/{NFT → ContractComponent/NFT}/types.ts +2 -3
- package/components/Dialog.tsx +3 -2
- package/components/Header/BackButton.tsx +17 -0
- package/components/Header/CloseDrawerButton.tsx +16 -3
- package/components/Header/Header.style.ts +25 -16
- package/components/Header/NavigationHeader.tsx +8 -11
- package/components/Header/NavigationTabs.tsx +1 -1
- package/components/Header/TransactionHistoryButton.tsx +0 -1
- package/components/Header/WalletHeader.tsx +5 -12
- package/components/Header/WalletMenu.tsx +2 -2
- package/components/Insurance/types.ts +3 -3
- package/components/PageContainer.ts +6 -5
- package/components/ReverseTokensButton/ReverseTokensButton.style.tsx +26 -21
- package/components/ReverseTokensButton/ReverseTokensButton.tsx +10 -8
- package/components/RouteCard/RouteCard.tsx +2 -2
- package/components/RouteCard/RouteCardSkeleton.tsx +5 -6
- package/components/Routes/Routes.tsx +3 -3
- package/components/Routes/RoutesExpanded.style.ts +1 -0
- package/components/Routes/RoutesExpanded.tsx +11 -4
- package/components/SelectChainAndToken.tsx +7 -13
- package/components/SelectTokenButton/SelectTokenButton.style.tsx +51 -1
- package/components/SelectTokenButton/SelectTokenButton.tsx +43 -38
- package/components/SendToWallet/SendToWalletButton.tsx +8 -8
- package/components/Step/Step.tsx +8 -8
- package/components/Step/StepList.tsx +1 -1
- package/components/StepActions/StepActions.tsx +40 -21
- package/components/StepActions/types.ts +12 -2
- package/components/TokenList/TokenList.style.tsx +1 -1
- package/components/TokenList/TokenList.tsx +9 -6
- package/components/TokenList/VirtualizedTokenList.tsx +26 -20
- package/components/TokenList/useTokenSelect.ts +1 -1
- package/components/TokenList/utils.ts +42 -0
- package/config/version.ts +1 -1
- package/hooks/useProcessMessage.ts +38 -15
- package/hooks/useRoutes.ts +13 -30
- package/hooks/{useExpandableVariant.ts → useWideVariant.ts} +2 -2
- package/i18n/en.json +9 -5
- package/i18n/index.ts +14 -14
- package/index.ts +6 -3
- package/package.json +17 -17
- package/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +20 -5
- package/pages/LanguagesPage.tsx +1 -0
- package/pages/MainPage/MainPage.tsx +12 -10
- package/pages/MainPage/ReviewButton.tsx +2 -2
- package/pages/RoutesPage/RoutesPage.style.ts +1 -1
- package/pages/RoutesPage/RoutesPage.tsx +1 -9
- package/pages/SelectChainPage/SelectChainPage.tsx +1 -0
- package/pages/SelectEnabledToolsPage.tsx +8 -1
- package/pages/SelectNativeTokenPage.tsx +1 -0
- package/pages/SelectTokenPage/SearchTokenInput.tsx +3 -3
- package/pages/SelectTokenPage/SelectTokenPage.tsx +1 -1
- package/pages/SelectWalletPage/SelectWalletPage.tsx +1 -0
- package/pages/SendToWallet/BookmarkAddressSheet.tsx +2 -4
- package/pages/SendToWallet/SendToConfiguredWalletPage.tsx +1 -0
- package/pages/SendToWallet/SendToWalletPage.style.tsx +3 -2
- package/pages/SendToWallet/SendToWalletPage.tsx +7 -2
- package/pages/SettingsPage/SettingsPage.tsx +1 -1
- package/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +7 -8
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +1 -1
- package/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +19 -16
- package/pages/TransactionPage/StatusBottomSheet.tsx +7 -11
- package/pages/TransactionPage/TransactionPage.tsx +12 -16
- package/providers/ThemeProvider/ThemeProvider.tsx +1 -1
- package/stores/StoreProvider.tsx +1 -1
- package/stores/form/createFormStore.ts +1 -6
- package/stores/form/types.ts +4 -6
- package/stores/form/useFieldValues.ts +1 -1
- package/stores/settings/types.ts +4 -4
- package/themes/createTheme.ts +415 -0
- package/themes/jumper.ts +37 -0
- package/themes/types.ts +63 -0
- package/themes/utils.ts +18 -0
- package/themes/windows95.ts +98 -0
- package/types/events.ts +2 -0
- package/types/widget.ts +54 -32
- package/_esm/components/NFT/NFT.js.map +0 -1
- package/_esm/components/NFT/NFT.style.js.map +0 -1
- package/_esm/components/NFT/NFTBase.js.map +0 -1
- package/_esm/config/theme.d.ts +0 -27
- package/_esm/config/theme.js +0 -250
- package/_esm/config/theme.js.map +0 -1
- package/_esm/hooks/useExpandableVariant.d.ts +0 -1
- package/_esm/hooks/useExpandableVariant.js.map +0 -1
- package/config/theme.ts +0 -321
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFT.d.ts +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFT.style.d.ts +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFT.style.js +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFTBase.d.ts +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/types.js +0 -0
- /package/components/{NFT → ContractComponent/NFT}/NFT.style.ts +0 -0
package/config/theme.ts
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import { loadingButtonClasses } from '@mui/lab';
|
|
2
|
-
import type {} from '@mui/lab/themeAugmentation';
|
|
3
|
-
import type { PaletteMode, SimplePaletteColorOptions } from '@mui/material';
|
|
4
|
-
import {
|
|
5
|
-
alpha,
|
|
6
|
-
createTheme as createMuiTheme,
|
|
7
|
-
css,
|
|
8
|
-
darken,
|
|
9
|
-
dialogActionsClasses,
|
|
10
|
-
getContrastRatio,
|
|
11
|
-
keyframes,
|
|
12
|
-
lighten,
|
|
13
|
-
touchRippleClasses,
|
|
14
|
-
} from '@mui/material';
|
|
15
|
-
import type { ThemeConfig } from '../types/widget.js';
|
|
16
|
-
|
|
17
|
-
// @mui/icons-material ESM issue
|
|
18
|
-
// https://github.com/mui/material-ui/issues/30671
|
|
19
|
-
|
|
20
|
-
// https://mui.com/customization/palette/
|
|
21
|
-
declare module '@mui/material/styles' {
|
|
22
|
-
interface TypographyVariants {
|
|
23
|
-
'@supports (font-variation-settings: normal)': React.CSSProperties;
|
|
24
|
-
}
|
|
25
|
-
interface TypographyVariantsOptions {
|
|
26
|
-
'@supports (font-variation-settings: normal)'?: React.CSSProperties;
|
|
27
|
-
}
|
|
28
|
-
interface Shape {
|
|
29
|
-
borderRadius: number;
|
|
30
|
-
borderRadiusSecondary: number;
|
|
31
|
-
}
|
|
32
|
-
interface Theme {
|
|
33
|
-
shape: Shape;
|
|
34
|
-
}
|
|
35
|
-
interface ThemeOptions {
|
|
36
|
-
shape?: Partial<Shape>;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare module '@mui/material/Typography' {
|
|
41
|
-
interface TypographyPropsVariantOverrides {
|
|
42
|
-
'@supports (font-variation-settings: normal)': true;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const palette = {
|
|
47
|
-
primary: {
|
|
48
|
-
main: '#5C67FF',
|
|
49
|
-
light: lighten('#5C67FF', 0.5),
|
|
50
|
-
dark: darken('#5C67FF', 0.2),
|
|
51
|
-
},
|
|
52
|
-
secondary: {
|
|
53
|
-
main: '#F5B5FF',
|
|
54
|
-
light: lighten('#F5B5FF', 0.5),
|
|
55
|
-
dark: darken('#F5B5FF', 0.2),
|
|
56
|
-
},
|
|
57
|
-
success: {
|
|
58
|
-
main: '#0AA65B',
|
|
59
|
-
},
|
|
60
|
-
warning: {
|
|
61
|
-
main: '#FFCC00',
|
|
62
|
-
},
|
|
63
|
-
error: {
|
|
64
|
-
main: '#E5452F',
|
|
65
|
-
},
|
|
66
|
-
info: {
|
|
67
|
-
main: '#297EFF',
|
|
68
|
-
},
|
|
69
|
-
common: {
|
|
70
|
-
black: '#000',
|
|
71
|
-
white: '#fff',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const paletteLight = {
|
|
76
|
-
// background: {
|
|
77
|
-
// default: '#F5F5F5',
|
|
78
|
-
// },
|
|
79
|
-
text: {
|
|
80
|
-
primary: '#000000',
|
|
81
|
-
secondary: '#747474',
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const paletteDark = {
|
|
86
|
-
background: {
|
|
87
|
-
paper: '#212121',
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const shape = {
|
|
92
|
-
borderRadius: 12,
|
|
93
|
-
borderRadiusSecondary: 12,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const enterKeyframe = keyframes`
|
|
97
|
-
0% {
|
|
98
|
-
transform: scale(0);
|
|
99
|
-
opacity: 0.05;
|
|
100
|
-
}
|
|
101
|
-
100% {
|
|
102
|
-
transform: scale(1);
|
|
103
|
-
opacity: 0.1;
|
|
104
|
-
}
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
export const createTheme = (mode: PaletteMode, theme: ThemeConfig = {}) => {
|
|
108
|
-
const primaryMainColor =
|
|
109
|
-
(theme.palette?.primary as SimplePaletteColorOptions)?.main ??
|
|
110
|
-
palette.primary.main;
|
|
111
|
-
const primaryLightColor = lighten(
|
|
112
|
-
(theme.palette?.primary as SimplePaletteColorOptions)?.main ??
|
|
113
|
-
palette.primary.main,
|
|
114
|
-
0.5,
|
|
115
|
-
);
|
|
116
|
-
const primaryDarkColor = darken(
|
|
117
|
-
(theme.palette?.primary as SimplePaletteColorOptions)?.main ??
|
|
118
|
-
palette.primary.main,
|
|
119
|
-
0.2,
|
|
120
|
-
);
|
|
121
|
-
const contrastButtonColor =
|
|
122
|
-
getContrastRatio(palette.common.white, primaryMainColor) >= 3
|
|
123
|
-
? palette.common.white
|
|
124
|
-
: palette.common.black;
|
|
125
|
-
const contrastTextButtonColor =
|
|
126
|
-
getContrastRatio(palette.common.white, alpha(primaryMainColor, 0.08)) >= 3
|
|
127
|
-
? palette.common.white
|
|
128
|
-
: palette.common.black;
|
|
129
|
-
const borderRadiusSecondary =
|
|
130
|
-
theme.shape?.borderRadiusSecondary ?? shape.borderRadiusSecondary;
|
|
131
|
-
return createMuiTheme({
|
|
132
|
-
typography: {
|
|
133
|
-
fontFamily: 'Inter var, Inter, sans-serif',
|
|
134
|
-
...theme.typography,
|
|
135
|
-
},
|
|
136
|
-
palette: {
|
|
137
|
-
mode,
|
|
138
|
-
...palette,
|
|
139
|
-
...(mode === 'light' ? paletteLight : paletteDark),
|
|
140
|
-
...theme.palette,
|
|
141
|
-
primary: {
|
|
142
|
-
main: primaryMainColor,
|
|
143
|
-
light: primaryLightColor,
|
|
144
|
-
dark: primaryDarkColor,
|
|
145
|
-
},
|
|
146
|
-
secondary: {
|
|
147
|
-
main:
|
|
148
|
-
(theme.palette?.secondary as SimplePaletteColorOptions)?.main ??
|
|
149
|
-
palette.secondary.main,
|
|
150
|
-
light: lighten(
|
|
151
|
-
(theme.palette?.secondary as SimplePaletteColorOptions)?.main ??
|
|
152
|
-
palette.secondary.main,
|
|
153
|
-
0.5,
|
|
154
|
-
),
|
|
155
|
-
dark: darken(
|
|
156
|
-
(theme.palette?.secondary as SimplePaletteColorOptions)?.main ??
|
|
157
|
-
palette.secondary.main,
|
|
158
|
-
0.2,
|
|
159
|
-
),
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
shape: {
|
|
163
|
-
...shape,
|
|
164
|
-
...theme.shape,
|
|
165
|
-
},
|
|
166
|
-
breakpoints: {
|
|
167
|
-
values: {
|
|
168
|
-
xs: 360,
|
|
169
|
-
sm: 416,
|
|
170
|
-
md: 900,
|
|
171
|
-
lg: 1200,
|
|
172
|
-
xl: 1536,
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
components: {
|
|
176
|
-
MuiScopedCssBaseline: {
|
|
177
|
-
styleOverrides: {
|
|
178
|
-
root: {
|
|
179
|
-
fontFamily: 'Inter, sans-serif',
|
|
180
|
-
...theme.typography,
|
|
181
|
-
'@supports (font-variation-settings: normal)': {
|
|
182
|
-
fontFamily: 'Inter var, sans-serif',
|
|
183
|
-
...theme.typography,
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
MuiButtonBase: {
|
|
189
|
-
styleOverrides: {
|
|
190
|
-
// This `css()` function invokes keyframes. `styled-components` only supports keyframes
|
|
191
|
-
// in string templates. Do not convert these styles in JS object as it will break.
|
|
192
|
-
root: css`
|
|
193
|
-
&
|
|
194
|
-
.${touchRippleClasses.ripple}.${touchRippleClasses.rippleVisible} {
|
|
195
|
-
opacity: 0.1;
|
|
196
|
-
animation-name: ${enterKeyframe};
|
|
197
|
-
}
|
|
198
|
-
`,
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
MuiButton: {
|
|
202
|
-
defaultProps: {
|
|
203
|
-
disableElevation: true,
|
|
204
|
-
},
|
|
205
|
-
styleOverrides: {
|
|
206
|
-
root: {
|
|
207
|
-
borderRadius: borderRadiusSecondary,
|
|
208
|
-
textTransform: 'none',
|
|
209
|
-
fontSize: 16,
|
|
210
|
-
fontWeight: 600,
|
|
211
|
-
[`&.Mui-disabled, &.Mui-disabled:hover`]: {
|
|
212
|
-
color: alpha(
|
|
213
|
-
mode === 'light' ? palette.common.black : palette.common.white,
|
|
214
|
-
0.56,
|
|
215
|
-
),
|
|
216
|
-
cursor: 'not-allowed',
|
|
217
|
-
pointerEvents: 'auto',
|
|
218
|
-
},
|
|
219
|
-
[`&.${loadingButtonClasses.loading}.Mui-disabled`]: {
|
|
220
|
-
backgroundColor: primaryMainColor,
|
|
221
|
-
color: contrastButtonColor,
|
|
222
|
-
cursor: 'auto',
|
|
223
|
-
pointerEvents: 'auto',
|
|
224
|
-
},
|
|
225
|
-
[`.${loadingButtonClasses.loadingIndicator}`]: {
|
|
226
|
-
color: contrastButtonColor,
|
|
227
|
-
},
|
|
228
|
-
[`&.${loadingButtonClasses.root}.${loadingButtonClasses.loading}`]:
|
|
229
|
-
{
|
|
230
|
-
color: 'transparent',
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
text: {
|
|
234
|
-
backgroundColor:
|
|
235
|
-
mode === 'light'
|
|
236
|
-
? alpha(primaryMainColor, 0.08)
|
|
237
|
-
: alpha(primaryMainColor, 0.42),
|
|
238
|
-
'&:hover': {
|
|
239
|
-
backgroundColor:
|
|
240
|
-
mode === 'light'
|
|
241
|
-
? alpha(primaryMainColor, 0.12)
|
|
242
|
-
: alpha(primaryMainColor, 0.56),
|
|
243
|
-
},
|
|
244
|
-
color:
|
|
245
|
-
mode === 'light' ? primaryMainColor : contrastTextButtonColor,
|
|
246
|
-
},
|
|
247
|
-
contained: {
|
|
248
|
-
'&:hover': {
|
|
249
|
-
color: contrastButtonColor,
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
sizeMedium: {
|
|
253
|
-
padding: '10px 14px',
|
|
254
|
-
[`.${dialogActionsClasses.root} &`]: {
|
|
255
|
-
padding: '6px 12px',
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
MuiIconButton: {
|
|
261
|
-
styleOverrides: {
|
|
262
|
-
root: {
|
|
263
|
-
// backgroundColor: alpha(
|
|
264
|
-
// mode === 'light' ? palette.common.black : palette.common.white,
|
|
265
|
-
// 0.04,
|
|
266
|
-
// ),
|
|
267
|
-
color: 'inherit',
|
|
268
|
-
// borderRadius: borderRadiusSecondary,
|
|
269
|
-
'&:hover': {
|
|
270
|
-
// backgroundColor: alpha(
|
|
271
|
-
// mode === 'light' ? palette.common.black : palette.common.white,
|
|
272
|
-
// 0.08,
|
|
273
|
-
// ),
|
|
274
|
-
color: 'inherit',
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
MuiAvatar: {
|
|
280
|
-
styleOverrides: {
|
|
281
|
-
root: {
|
|
282
|
-
height: 40,
|
|
283
|
-
width: 40,
|
|
284
|
-
},
|
|
285
|
-
img: {
|
|
286
|
-
objectFit: 'contain',
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
...theme.components?.MuiAvatar,
|
|
290
|
-
},
|
|
291
|
-
MuiListItemText: {
|
|
292
|
-
styleOverrides: {
|
|
293
|
-
primary: ({ theme }) => ({
|
|
294
|
-
fontWeight: 600,
|
|
295
|
-
fontSize: '1.125rem',
|
|
296
|
-
lineHeight: '1.2778',
|
|
297
|
-
color: theme.palette.text.primary,
|
|
298
|
-
}),
|
|
299
|
-
secondary: ({ theme }) => ({
|
|
300
|
-
fontWeight: 500,
|
|
301
|
-
fontSize: '0.75rem',
|
|
302
|
-
color: theme.palette.text.secondary,
|
|
303
|
-
}),
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
MuiTooltip: {
|
|
307
|
-
styleOverrides: {
|
|
308
|
-
tooltip: ({ theme }) => ({
|
|
309
|
-
backgroundColor: 'rgb(0 0 0 / 64%)',
|
|
310
|
-
backdropFilter: 'blur(3px)',
|
|
311
|
-
fontSize: '0.75rem',
|
|
312
|
-
padding: theme.spacing(1, 1.5),
|
|
313
|
-
}),
|
|
314
|
-
arrow: {
|
|
315
|
-
color: 'rgb(0 0 0 / 64%)',
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
});
|
|
321
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|