@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
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { loadingButtonClasses } from '@mui/lab';
|
|
2
|
+
import type {} from '@mui/lab/themeAugmentation';
|
|
3
|
+
import type {
|
|
4
|
+
CSSObject,
|
|
5
|
+
PaletteMode,
|
|
6
|
+
SimplePaletteColorOptions,
|
|
7
|
+
} from '@mui/material';
|
|
8
|
+
import {
|
|
9
|
+
alpha,
|
|
10
|
+
createTheme as createMuiTheme,
|
|
11
|
+
css,
|
|
12
|
+
darken,
|
|
13
|
+
dialogActionsClasses,
|
|
14
|
+
getContrastRatio,
|
|
15
|
+
keyframes,
|
|
16
|
+
lighten,
|
|
17
|
+
touchRippleClasses,
|
|
18
|
+
} from '@mui/material';
|
|
19
|
+
import type { WidgetTheme } from '../types/widget.js';
|
|
20
|
+
import type {} from './types.js';
|
|
21
|
+
import { getStyleOverrides } from './utils.js';
|
|
22
|
+
|
|
23
|
+
const palette = {
|
|
24
|
+
primary: {
|
|
25
|
+
main: '#5C67FF',
|
|
26
|
+
light: lighten('#5C67FF', 0.84),
|
|
27
|
+
dark: darken('#5C67FF', 0.2),
|
|
28
|
+
},
|
|
29
|
+
secondary: {
|
|
30
|
+
main: '#F5B5FF',
|
|
31
|
+
light: lighten('#F5B5FF', 0.84),
|
|
32
|
+
dark: darken('#F5B5FF', 0.2),
|
|
33
|
+
},
|
|
34
|
+
success: {
|
|
35
|
+
main: '#0AA65B',
|
|
36
|
+
},
|
|
37
|
+
warning: {
|
|
38
|
+
main: '#FFCC00',
|
|
39
|
+
},
|
|
40
|
+
error: {
|
|
41
|
+
main: '#E5452F',
|
|
42
|
+
},
|
|
43
|
+
info: {
|
|
44
|
+
main: '#297EFF',
|
|
45
|
+
},
|
|
46
|
+
common: {
|
|
47
|
+
black: '#000',
|
|
48
|
+
white: '#fff',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const paletteLight = {
|
|
53
|
+
background: {
|
|
54
|
+
// default: '#c0c9d2',
|
|
55
|
+
// paper: '#dfdfdf',
|
|
56
|
+
},
|
|
57
|
+
text: {
|
|
58
|
+
primary: '#000000',
|
|
59
|
+
secondary: '#747474',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const paletteDark = {
|
|
64
|
+
background: {
|
|
65
|
+
paper: '#212121',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const shape = {
|
|
70
|
+
borderRadius: 12,
|
|
71
|
+
borderRadiusSecondary: 12,
|
|
72
|
+
borderRadiusTertiary: 24,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const enterKeyframe = keyframes`
|
|
76
|
+
0% {
|
|
77
|
+
transform: scale(0);
|
|
78
|
+
opacity: 0.05;
|
|
79
|
+
}
|
|
80
|
+
100% {
|
|
81
|
+
transform: scale(1);
|
|
82
|
+
opacity: 0.1;
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
|
|
86
|
+
export const createTheme = (
|
|
87
|
+
mode: PaletteMode,
|
|
88
|
+
widgetTheme: WidgetTheme = {},
|
|
89
|
+
) => {
|
|
90
|
+
const primaryMainColor =
|
|
91
|
+
(widgetTheme.palette?.primary as SimplePaletteColorOptions)?.main ??
|
|
92
|
+
palette.primary.main;
|
|
93
|
+
const primaryLightColor = lighten(primaryMainColor, 0.84);
|
|
94
|
+
const primaryDarkColor = darken(primaryMainColor, 0.2);
|
|
95
|
+
const secondaryMainColor =
|
|
96
|
+
(widgetTheme.palette?.secondary as SimplePaletteColorOptions)?.main ??
|
|
97
|
+
palette.secondary.main;
|
|
98
|
+
const contrastButtonColor =
|
|
99
|
+
getContrastRatio(palette.common.white, primaryMainColor) >= 3
|
|
100
|
+
? palette.common.white
|
|
101
|
+
: palette.common.black;
|
|
102
|
+
const contrastTextButtonColor =
|
|
103
|
+
getContrastRatio(palette.common.white, alpha(primaryMainColor, 0.08)) >= 3
|
|
104
|
+
? palette.common.white
|
|
105
|
+
: palette.common.black;
|
|
106
|
+
const borderRadiusSecondary =
|
|
107
|
+
widgetTheme.shape?.borderRadiusSecondary ?? shape.borderRadiusSecondary;
|
|
108
|
+
|
|
109
|
+
return createMuiTheme({
|
|
110
|
+
container: widgetTheme.container,
|
|
111
|
+
navigation: {
|
|
112
|
+
edge: true,
|
|
113
|
+
dense: true,
|
|
114
|
+
...widgetTheme.navigation,
|
|
115
|
+
},
|
|
116
|
+
typography: {
|
|
117
|
+
fontFamily: 'Inter var, Inter, sans-serif',
|
|
118
|
+
...widgetTheme.typography,
|
|
119
|
+
},
|
|
120
|
+
palette: {
|
|
121
|
+
mode,
|
|
122
|
+
...palette,
|
|
123
|
+
...(mode === 'light' ? paletteLight : paletteDark),
|
|
124
|
+
...widgetTheme.palette,
|
|
125
|
+
primary: {
|
|
126
|
+
main: primaryMainColor,
|
|
127
|
+
light: primaryLightColor,
|
|
128
|
+
dark: primaryDarkColor,
|
|
129
|
+
},
|
|
130
|
+
secondary: {
|
|
131
|
+
main: secondaryMainColor,
|
|
132
|
+
light: lighten(secondaryMainColor, 0.84),
|
|
133
|
+
dark: darken(secondaryMainColor, 0.2),
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
shape: {
|
|
137
|
+
...shape,
|
|
138
|
+
...widgetTheme.shape,
|
|
139
|
+
},
|
|
140
|
+
breakpoints: {
|
|
141
|
+
values: {
|
|
142
|
+
xs: 360,
|
|
143
|
+
sm: 416,
|
|
144
|
+
md: 900,
|
|
145
|
+
lg: 1200,
|
|
146
|
+
xl: 1536,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
components: {
|
|
150
|
+
MuiScopedCssBaseline: {
|
|
151
|
+
styleOverrides: {
|
|
152
|
+
root: {
|
|
153
|
+
fontFamily: 'Inter, sans-serif',
|
|
154
|
+
...widgetTheme.typography,
|
|
155
|
+
'@supports (font-variation-settings: normal)': {
|
|
156
|
+
fontFamily: 'Inter var, sans-serif',
|
|
157
|
+
...widgetTheme.typography,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
MuiAppBar: {
|
|
163
|
+
styleOverrides: {
|
|
164
|
+
root: ({ ownerState, theme }) => ({
|
|
165
|
+
minHeight: 40,
|
|
166
|
+
padding: 0,
|
|
167
|
+
...getStyleOverrides('MuiAppBar', 'root', widgetTheme, ownerState),
|
|
168
|
+
}),
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
MuiCard: {
|
|
172
|
+
defaultProps: {
|
|
173
|
+
variant: 'outlined',
|
|
174
|
+
...widgetTheme.components?.MuiCard?.defaultProps,
|
|
175
|
+
},
|
|
176
|
+
styleOverrides: {
|
|
177
|
+
root: ({ ownerState, theme }) => {
|
|
178
|
+
const root = widgetTheme.components?.MuiCard?.styleOverrides
|
|
179
|
+
?.root as CSSObject;
|
|
180
|
+
const rootHover = root?.['&:hover'];
|
|
181
|
+
return {
|
|
182
|
+
backgroundColor: theme.palette.background.paper,
|
|
183
|
+
borderRadius: theme.shape.borderRadius,
|
|
184
|
+
overflow: 'hidden',
|
|
185
|
+
position: 'relative',
|
|
186
|
+
boxSizing: 'border-box',
|
|
187
|
+
transition: theme.transitions.create(
|
|
188
|
+
['background-color', 'filter'],
|
|
189
|
+
{
|
|
190
|
+
duration: theme.transitions.duration.enteringScreen,
|
|
191
|
+
easing: theme.transitions.easing.easeOut,
|
|
192
|
+
},
|
|
193
|
+
),
|
|
194
|
+
...(!!ownerState.onClick && {
|
|
195
|
+
'&:hover': {
|
|
196
|
+
cursor: 'pointer',
|
|
197
|
+
},
|
|
198
|
+
}),
|
|
199
|
+
...(!!ownerState.onClick &&
|
|
200
|
+
(ownerState.variant === 'outlined' ||
|
|
201
|
+
ownerState.variant === 'filled') && {
|
|
202
|
+
'&:hover': {
|
|
203
|
+
cursor: 'pointer',
|
|
204
|
+
backgroundColor:
|
|
205
|
+
theme.palette.mode === 'light'
|
|
206
|
+
? darken(theme.palette.background.paper, 0.02)
|
|
207
|
+
: lighten(theme.palette.background.paper, 0.02),
|
|
208
|
+
},
|
|
209
|
+
}),
|
|
210
|
+
...(!!ownerState.onClick &&
|
|
211
|
+
ownerState.variant === 'elevation' && {
|
|
212
|
+
'&:hover': {
|
|
213
|
+
cursor: 'pointer',
|
|
214
|
+
filter: `drop-shadow(0 1px 4px ${alpha(theme.palette.common.black, 0.08)})`,
|
|
215
|
+
},
|
|
216
|
+
}),
|
|
217
|
+
...(typeof root === 'object' && root),
|
|
218
|
+
...(!!ownerState.onClick &&
|
|
219
|
+
!!rootHover && {
|
|
220
|
+
'&:hover': {
|
|
221
|
+
...rootHover,
|
|
222
|
+
},
|
|
223
|
+
}),
|
|
224
|
+
...(!ownerState.onClick && {
|
|
225
|
+
'&:hover': {},
|
|
226
|
+
}),
|
|
227
|
+
};
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
variants: widgetTheme.components?.MuiCard?.variants ?? [
|
|
231
|
+
{
|
|
232
|
+
props: { variant: 'outlined' },
|
|
233
|
+
style: ({ theme }) => ({
|
|
234
|
+
borderWidth: 1,
|
|
235
|
+
borderStyle: 'solid',
|
|
236
|
+
borderColor:
|
|
237
|
+
theme.palette.mode === 'light'
|
|
238
|
+
? theme.palette.grey[300]
|
|
239
|
+
: theme.palette.grey[800],
|
|
240
|
+
}),
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
props: { variant: 'elevation' },
|
|
244
|
+
style: ({ theme }) => ({
|
|
245
|
+
border: 'none',
|
|
246
|
+
boxShadow: 'none',
|
|
247
|
+
filter: `drop-shadow(0 1px 4px ${alpha(theme.palette.common.black, 0.04)})`,
|
|
248
|
+
}),
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
props: { variant: 'filled' },
|
|
252
|
+
style: {
|
|
253
|
+
border: 'none',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
},
|
|
258
|
+
MuiInputCard: {
|
|
259
|
+
...widgetTheme.components?.MuiInputCard,
|
|
260
|
+
},
|
|
261
|
+
MuiButtonBase: {
|
|
262
|
+
styleOverrides: {
|
|
263
|
+
// This `css()` function invokes keyframes. `styled-components` only supports keyframes
|
|
264
|
+
// in string templates. Do not convert these styles in JS object as it will break.
|
|
265
|
+
root: css`
|
|
266
|
+
&
|
|
267
|
+
.${touchRippleClasses.ripple}.${touchRippleClasses.rippleVisible} {
|
|
268
|
+
opacity: 0.1;
|
|
269
|
+
animation-name: ${enterKeyframe};
|
|
270
|
+
}
|
|
271
|
+
`,
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
MuiButton: {
|
|
275
|
+
defaultProps: {
|
|
276
|
+
disableElevation: true,
|
|
277
|
+
...widgetTheme.components?.MuiButton?.defaultProps,
|
|
278
|
+
},
|
|
279
|
+
styleOverrides: {
|
|
280
|
+
root: ({ theme, ownerState }) => ({
|
|
281
|
+
borderRadius: borderRadiusSecondary,
|
|
282
|
+
textTransform: 'none',
|
|
283
|
+
fontSize: 16,
|
|
284
|
+
fontWeight: 600,
|
|
285
|
+
[`&.Mui-disabled, &.Mui-disabled:hover`]: {
|
|
286
|
+
color: alpha(
|
|
287
|
+
mode === 'light' ? palette.common.black : palette.common.white,
|
|
288
|
+
0.56,
|
|
289
|
+
),
|
|
290
|
+
cursor: 'not-allowed',
|
|
291
|
+
pointerEvents: 'auto',
|
|
292
|
+
},
|
|
293
|
+
[`&.${loadingButtonClasses.loading}.Mui-disabled`]: {
|
|
294
|
+
backgroundColor: primaryMainColor,
|
|
295
|
+
color: contrastButtonColor,
|
|
296
|
+
cursor: 'auto',
|
|
297
|
+
pointerEvents: 'auto',
|
|
298
|
+
},
|
|
299
|
+
[`.${loadingButtonClasses.loadingIndicator}`]: {
|
|
300
|
+
color: contrastButtonColor,
|
|
301
|
+
},
|
|
302
|
+
[`&.${loadingButtonClasses.root}.${loadingButtonClasses.loading}`]:
|
|
303
|
+
{
|
|
304
|
+
color: 'transparent',
|
|
305
|
+
},
|
|
306
|
+
...getStyleOverrides('MuiButton', 'root', widgetTheme, ownerState),
|
|
307
|
+
}),
|
|
308
|
+
text: ({ theme, ownerState }) => ({
|
|
309
|
+
backgroundColor:
|
|
310
|
+
mode === 'light'
|
|
311
|
+
? alpha(primaryMainColor, 0.08)
|
|
312
|
+
: alpha(primaryMainColor, 0.42),
|
|
313
|
+
'&:hover': {
|
|
314
|
+
backgroundColor:
|
|
315
|
+
mode === 'light'
|
|
316
|
+
? alpha(primaryMainColor, 0.12)
|
|
317
|
+
: alpha(primaryMainColor, 0.56),
|
|
318
|
+
},
|
|
319
|
+
color:
|
|
320
|
+
mode === 'light' ? primaryMainColor : contrastTextButtonColor,
|
|
321
|
+
...getStyleOverrides('MuiButton', 'text', widgetTheme, ownerState),
|
|
322
|
+
}),
|
|
323
|
+
contained: ({ theme, ownerState }) => ({
|
|
324
|
+
'&:hover': {
|
|
325
|
+
color: contrastButtonColor,
|
|
326
|
+
},
|
|
327
|
+
...getStyleOverrides(
|
|
328
|
+
'MuiButton',
|
|
329
|
+
'contained',
|
|
330
|
+
widgetTheme,
|
|
331
|
+
ownerState,
|
|
332
|
+
),
|
|
333
|
+
}),
|
|
334
|
+
sizeMedium: ({ theme, ownerState }) => ({
|
|
335
|
+
padding: '10px 14px',
|
|
336
|
+
[`.${dialogActionsClasses.root} &`]: {
|
|
337
|
+
padding: '6px 12px',
|
|
338
|
+
},
|
|
339
|
+
...getStyleOverrides(
|
|
340
|
+
'MuiButton',
|
|
341
|
+
'sizeMedium',
|
|
342
|
+
widgetTheme,
|
|
343
|
+
ownerState,
|
|
344
|
+
),
|
|
345
|
+
}),
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
MuiIconButton: {
|
|
349
|
+
...widgetTheme.components?.MuiIconButton,
|
|
350
|
+
styleOverrides: {
|
|
351
|
+
...widgetTheme.components?.MuiIconButton?.styleOverrides,
|
|
352
|
+
root: ({ theme, ownerState }) => ({
|
|
353
|
+
color: 'inherit',
|
|
354
|
+
'&:hover': {
|
|
355
|
+
color: 'inherit',
|
|
356
|
+
},
|
|
357
|
+
...getStyleOverrides(
|
|
358
|
+
'MuiIconButton',
|
|
359
|
+
'root',
|
|
360
|
+
widgetTheme,
|
|
361
|
+
ownerState,
|
|
362
|
+
),
|
|
363
|
+
}),
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
MuiAvatar: {
|
|
367
|
+
styleOverrides: {
|
|
368
|
+
root: {
|
|
369
|
+
height: 40,
|
|
370
|
+
width: 40,
|
|
371
|
+
},
|
|
372
|
+
img: {
|
|
373
|
+
objectFit: 'contain',
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
...widgetTheme.components?.MuiAvatar,
|
|
377
|
+
},
|
|
378
|
+
MuiListItemText: {
|
|
379
|
+
styleOverrides: {
|
|
380
|
+
primary: ({ theme }) => ({
|
|
381
|
+
fontWeight: 600,
|
|
382
|
+
fontSize: '1.125rem',
|
|
383
|
+
lineHeight: '1.2778',
|
|
384
|
+
color: theme.palette.text.primary,
|
|
385
|
+
}),
|
|
386
|
+
secondary: ({ theme }) => ({
|
|
387
|
+
fontWeight: 500,
|
|
388
|
+
fontSize: '0.75rem',
|
|
389
|
+
color: theme.palette.text.secondary,
|
|
390
|
+
}),
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
MuiTooltip: {
|
|
394
|
+
styleOverrides: {
|
|
395
|
+
tooltip: ({ theme }) => ({
|
|
396
|
+
backgroundColor: 'rgb(0 0 0 / 64%)',
|
|
397
|
+
backdropFilter: 'blur(3px)',
|
|
398
|
+
fontSize: '0.75rem',
|
|
399
|
+
padding: theme.spacing(1, 1.5),
|
|
400
|
+
}),
|
|
401
|
+
arrow: {
|
|
402
|
+
color: 'rgb(0 0 0 / 64%)',
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
MuiMenu: {
|
|
407
|
+
styleOverrides: {
|
|
408
|
+
paper: ({ theme }) => ({
|
|
409
|
+
backgroundColor: theme.palette.background.default,
|
|
410
|
+
}),
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
});
|
|
415
|
+
};
|
package/themes/jumper.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { WidgetTheme } from '../types/widget.js';
|
|
2
|
+
|
|
3
|
+
export const jumperTheme: WidgetTheme = {
|
|
4
|
+
palette: {},
|
|
5
|
+
// shape: {
|
|
6
|
+
// borderRadius: 0,
|
|
7
|
+
// borderRadiusSecondary: 0,
|
|
8
|
+
// borderRadiusTertiary: 0,
|
|
9
|
+
// },
|
|
10
|
+
container: {},
|
|
11
|
+
playground: {},
|
|
12
|
+
components: {
|
|
13
|
+
MuiIconButton: {
|
|
14
|
+
styleOverrides: {
|
|
15
|
+
// root: ({ theme }) => ({
|
|
16
|
+
// backgroundColor: alpha(
|
|
17
|
+
// theme.palette.mode === 'light'
|
|
18
|
+
// ? theme.palette.common.black
|
|
19
|
+
// : theme.palette.common.white,
|
|
20
|
+
// 0.04,
|
|
21
|
+
// ),
|
|
22
|
+
// color: 'inherit',
|
|
23
|
+
// borderRadius: theme.shape.borderRadiusSecondary,
|
|
24
|
+
// '&:hover': {
|
|
25
|
+
// backgroundColor: alpha(
|
|
26
|
+
// theme.palette.mode === 'light'
|
|
27
|
+
// ? theme.palette.common.black
|
|
28
|
+
// : theme.palette.common.white,
|
|
29
|
+
// 0.08,
|
|
30
|
+
// ),
|
|
31
|
+
// color: 'inherit',
|
|
32
|
+
// },
|
|
33
|
+
// }),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
package/themes/types.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type {} from '@mui/lab/themeAugmentation';
|
|
2
|
+
import type {
|
|
3
|
+
CardProps,
|
|
4
|
+
ComponentsOverrides,
|
|
5
|
+
ComponentsVariants,
|
|
6
|
+
} from '@mui/material';
|
|
7
|
+
import type { CSSProperties } from 'react';
|
|
8
|
+
import type { NavigationProps } from '../types/widget.js';
|
|
9
|
+
|
|
10
|
+
// @mui/icons-material ESM issue
|
|
11
|
+
// https://github.com/mui/material-ui/issues/30671
|
|
12
|
+
|
|
13
|
+
// https://mui.com/customization/palette/
|
|
14
|
+
declare module '@mui/material/styles' {
|
|
15
|
+
interface TypographyVariants {
|
|
16
|
+
'@supports (font-variation-settings: normal)': React.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
interface TypographyVariantsOptions {
|
|
19
|
+
'@supports (font-variation-settings: normal)'?: React.CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
interface Shape {
|
|
22
|
+
borderRadius: number;
|
|
23
|
+
borderRadiusSecondary: number;
|
|
24
|
+
borderRadiusTertiary: number;
|
|
25
|
+
}
|
|
26
|
+
interface Theme {
|
|
27
|
+
shape: Shape;
|
|
28
|
+
container: CSSProperties;
|
|
29
|
+
navigation: NavigationProps;
|
|
30
|
+
}
|
|
31
|
+
interface ThemeOptions {
|
|
32
|
+
shape?: Partial<Shape>;
|
|
33
|
+
container?: CSSProperties;
|
|
34
|
+
navigation?: NavigationProps;
|
|
35
|
+
}
|
|
36
|
+
interface ComponentNameToClassKey {
|
|
37
|
+
MuiInputCard: 'root';
|
|
38
|
+
}
|
|
39
|
+
interface ComponentsPropsList {
|
|
40
|
+
MuiInputCard: Partial<CardProps>;
|
|
41
|
+
}
|
|
42
|
+
interface Components {
|
|
43
|
+
MuiInputCard?: {
|
|
44
|
+
defaultProps?: ComponentsPropsList['MuiInputCard'];
|
|
45
|
+
styleOverrides?: ComponentsOverrides<
|
|
46
|
+
Omit<Theme, 'components'>
|
|
47
|
+
>['MuiInputCard'];
|
|
48
|
+
variants?: ComponentsVariants['MuiInputCard'];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare module '@mui/material/Paper' {
|
|
54
|
+
interface PaperPropsVariantOverrides {
|
|
55
|
+
filled: true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare module '@mui/material/Typography' {
|
|
60
|
+
interface TypographyPropsVariantOverrides {
|
|
61
|
+
'@supports (font-variation-settings: normal)': true;
|
|
62
|
+
}
|
|
63
|
+
}
|
package/themes/utils.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WidgetTheme, WidgetThemeComponents } from '../types/widget.js';
|
|
2
|
+
|
|
3
|
+
type ComponentName = keyof WidgetThemeComponents;
|
|
4
|
+
|
|
5
|
+
export const getStyleOverrides = (
|
|
6
|
+
componentName: ComponentName,
|
|
7
|
+
styleOverrideProp: string,
|
|
8
|
+
theme: WidgetTheme,
|
|
9
|
+
ownerState?: any,
|
|
10
|
+
) => {
|
|
11
|
+
const component = theme.components?.[componentName];
|
|
12
|
+
const property = (component?.styleOverrides as any)?.[styleOverrideProp];
|
|
13
|
+
|
|
14
|
+
if (typeof property === 'function') {
|
|
15
|
+
return property({ theme, ownerState });
|
|
16
|
+
}
|
|
17
|
+
return property;
|
|
18
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { WidgetTheme } from '../types/widget.js';
|
|
2
|
+
|
|
3
|
+
export const windows95Theme: WidgetTheme = {
|
|
4
|
+
palette: {
|
|
5
|
+
primary: {
|
|
6
|
+
main: '#0000ff',
|
|
7
|
+
},
|
|
8
|
+
secondary: {
|
|
9
|
+
main: '#f7c303',
|
|
10
|
+
},
|
|
11
|
+
text: {
|
|
12
|
+
primary: '#30313d',
|
|
13
|
+
secondary: '#6d6e78',
|
|
14
|
+
},
|
|
15
|
+
background: {
|
|
16
|
+
default: '#c0c9d2',
|
|
17
|
+
paper: '#dfdfdf',
|
|
18
|
+
},
|
|
19
|
+
grey: {
|
|
20
|
+
300: '#bbb',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
shape: {
|
|
24
|
+
borderRadius: 0,
|
|
25
|
+
borderRadiusSecondary: 0,
|
|
26
|
+
borderRadiusTertiary: 0,
|
|
27
|
+
},
|
|
28
|
+
container: {
|
|
29
|
+
border: '1px solid #0a0a0a',
|
|
30
|
+
},
|
|
31
|
+
playground: {
|
|
32
|
+
background: '#008080',
|
|
33
|
+
},
|
|
34
|
+
components: {
|
|
35
|
+
MuiButton: {
|
|
36
|
+
styleOverrides: {
|
|
37
|
+
root: {
|
|
38
|
+
boxShadow:
|
|
39
|
+
'inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf',
|
|
40
|
+
'&:hover': {
|
|
41
|
+
boxShadow:
|
|
42
|
+
'inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
MuiCard: {
|
|
48
|
+
defaultProps: {
|
|
49
|
+
variant: 'outlined',
|
|
50
|
+
},
|
|
51
|
+
styleOverrides: {
|
|
52
|
+
root: {
|
|
53
|
+
boxShadow:
|
|
54
|
+
'inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf',
|
|
55
|
+
borderWidth: 0,
|
|
56
|
+
'&:hover': {
|
|
57
|
+
cursor: 'pointer',
|
|
58
|
+
backgroundColor: '#ccc',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
variants: [
|
|
63
|
+
{
|
|
64
|
+
props: { variant: 'outlined' },
|
|
65
|
+
style: {
|
|
66
|
+
borderWidth: 0,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
MuiInputCard: {
|
|
72
|
+
styleOverrides: {
|
|
73
|
+
root: {
|
|
74
|
+
backgroundColor: '#fff',
|
|
75
|
+
boxShadow:
|
|
76
|
+
'inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
MuiIconButton: {
|
|
81
|
+
defaultProps: {
|
|
82
|
+
// disableRipple: true,
|
|
83
|
+
},
|
|
84
|
+
styleOverrides: {
|
|
85
|
+
root: {
|
|
86
|
+
borderRadius: 0,
|
|
87
|
+
boxShadow:
|
|
88
|
+
'inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf',
|
|
89
|
+
backgroundColor: '#dfdfdf',
|
|
90
|
+
'&:hover': {
|
|
91
|
+
color: 'inherit',
|
|
92
|
+
backgroundColor: '#ccc',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
package/types/events.ts
CHANGED
|
@@ -12,6 +12,7 @@ export enum WidgetEvent {
|
|
|
12
12
|
SendToWalletToggled = 'sendToWalletToggled',
|
|
13
13
|
ReviewTransactionPageEntered = 'reviewTransactionPageEntered',
|
|
14
14
|
WalletConnected = 'walletConnected',
|
|
15
|
+
WidgetExpanded = 'widgetExpanded',
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export type WidgetEvents = {
|
|
@@ -26,6 +27,7 @@ export type WidgetEvents = {
|
|
|
26
27
|
sendToWalletToggled: boolean;
|
|
27
28
|
reviewTransactionPageEntered?: Route;
|
|
28
29
|
walletConnected: WalletConnected;
|
|
30
|
+
widgetExpanded: boolean;
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
export interface ContactSupport {
|