@lifi/widget 3.0.0-alpha.30 → 3.0.0-alpha.32
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/AppDefault.tsx +0 -2
- package/AppDrawer.style.tsx +1 -97
- package/AppDrawer.tsx +7 -40
- package/_esm/AppDefault.js +1 -2
- package/_esm/AppDefault.js.map +1 -1
- package/_esm/AppDrawer.d.ts +1 -5
- package/_esm/AppDrawer.js +13 -25
- package/_esm/AppDrawer.js.map +1 -1
- package/_esm/AppDrawer.style.d.ts +0 -12
- package/_esm/AppDrawer.style.js +1 -76
- package/_esm/AppDrawer.style.js.map +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.style.js +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.style.js.map +1 -1
- package/_esm/components/AmountInput/PriceFormHelperText.js +2 -2
- package/_esm/components/AmountInput/PriceFormHelperText.js.map +1 -1
- package/_esm/components/AppContainer.d.ts +1 -1
- package/_esm/components/AppContainer.js +3 -3
- package/_esm/components/AppContainer.js.map +1 -1
- package/_esm/components/Avatar/AccountAvatar.js +3 -3
- package/_esm/components/Avatar/AccountAvatar.js.map +1 -1
- package/_esm/components/Avatar/Avatar.js +3 -3
- package/_esm/components/Avatar/Avatar.js.map +1 -1
- package/_esm/components/Avatar/Avatar.style.d.ts +6 -0
- package/_esm/components/Avatar/Avatar.style.js +11 -5
- package/_esm/components/Avatar/Avatar.style.js.map +1 -1
- package/_esm/components/Avatar/TokenAvatar.js +3 -3
- package/_esm/components/Avatar/TokenAvatar.js.map +1 -1
- package/_esm/components/Avatar/utils.d.ts +8 -0
- package/_esm/components/Avatar/utils.js +9 -0
- package/_esm/components/Avatar/utils.js.map +1 -0
- package/_esm/components/ButtonTertiary.d.ts +4 -0
- package/_esm/components/ButtonTertiary.js +19 -0
- package/_esm/components/ButtonTertiary.js.map +1 -0
- package/_esm/components/Card/Card.js +6 -7
- package/_esm/components/Card/Card.js.map +1 -1
- package/_esm/components/Card/CardHeader.js +3 -1
- package/_esm/components/Card/CardHeader.js.map +1 -1
- package/_esm/components/Card/CardIconButton.js +4 -6
- package/_esm/components/Card/CardIconButton.js.map +1 -1
- package/_esm/components/Card/CardLabel.js +0 -4
- 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/ChainSelect/useChainSelect.js +1 -2
- package/_esm/components/ChainSelect/useChainSelect.js.map +1 -1
- package/_esm/components/Header/Header.style.d.ts +4 -1
- package/_esm/components/Header/Header.style.js +12 -12
- package/_esm/components/Header/Header.style.js.map +1 -1
- package/_esm/components/Header/SettingsButton.style.d.ts +1 -1
- package/_esm/components/Header/WalletHeader.js +2 -3
- package/_esm/components/Header/WalletHeader.js.map +1 -1
- package/_esm/components/Header/WalletMenu.js +6 -4
- package/_esm/components/Header/WalletMenu.js.map +1 -1
- package/_esm/components/Input.js +1 -3
- package/_esm/components/Input.js.map +1 -1
- package/_esm/components/ListItem/ListItem.d.ts +1 -1
- package/_esm/components/ListItemButton.js +12 -9
- package/_esm/components/ListItemButton.js.map +1 -1
- package/_esm/components/ListItemText.js +1 -1
- package/_esm/components/NFT/NFT.style.d.ts +1 -1
- package/_esm/components/PageContainer.js +4 -1
- package/_esm/components/PageContainer.js.map +1 -1
- package/_esm/components/PoweredBy/PoweredBy.js +2 -13
- package/_esm/components/PoweredBy/PoweredBy.js.map +1 -1
- package/_esm/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/_esm/components/RouteCard/RouteCard.js +3 -7
- package/_esm/components/RouteCard/RouteCard.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.style.js +2 -2
- package/_esm/components/RouteCard/RouteCard.style.js.map +1 -1
- package/_esm/components/Routes/Routes.js +3 -2
- package/_esm/components/Routes/Routes.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.js +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js +7 -6
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWallet.style.js +14 -9
- package/_esm/components/SendToWallet/SendToWallet.style.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletButton.d.ts +3 -1
- package/_esm/components/SendToWallet/SendToWalletButton.js +18 -9
- package/_esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js +2 -1
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js.map +1 -1
- package/_esm/components/SmallAvatar.d.ts +1 -1
- package/_esm/components/SmallAvatar.js +4 -6
- package/_esm/components/SmallAvatar.js.map +1 -1
- package/_esm/components/Step/StepProcess.style.d.ts +1 -1
- package/_esm/components/Step/StepProcess.style.js +3 -2
- package/_esm/components/Step/StepProcess.style.js.map +1 -1
- package/_esm/components/StepActions/StepActions.js +1 -3
- package/_esm/components/StepActions/StepActions.js.map +1 -1
- package/_esm/components/StepActions/StepActions.style.d.ts +4 -2
- package/_esm/components/StepActions/StepActions.style.js +12 -15
- package/_esm/components/StepActions/StepActions.style.js.map +1 -1
- package/_esm/components/StepActions/StepFeeBreakdown.js +2 -1
- package/_esm/components/StepActions/StepFeeBreakdown.js.map +1 -1
- package/_esm/components/Tabs/Tabs.style.d.ts +1 -1
- package/_esm/components/Tabs/Tabs.style.js +10 -14
- package/_esm/components/Tabs/Tabs.style.js.map +1 -1
- package/_esm/components/Token/Token.js +2 -6
- package/_esm/components/Token/Token.js.map +1 -1
- package/_esm/components/TokenList/TokenList.js +1 -1
- package/_esm/components/TokenList/TokenList.js.map +1 -1
- package/_esm/components/TokenList/TokenList.style.d.ts +2 -2
- package/_esm/components/TokenList/TokenList.style.js +3 -4
- package/_esm/components/TokenList/TokenList.style.js.map +1 -1
- package/_esm/components/TokenList/TokenListItem.js +1 -1
- package/_esm/components/TokenList/TokenListItem.js.map +1 -1
- package/_esm/components/TokenList/useTokenSelect.js +1 -3
- package/_esm/components/TokenList/useTokenSelect.js.map +1 -1
- package/_esm/config/theme.js +25 -13
- package/_esm/config/theme.js.map +1 -1
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/hooks/useRoutes.d.ts +1 -1
- package/_esm/hooks/useToAddressReset.js +1 -1
- package/_esm/hooks/useToAddressReset.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/useTransactionHistory.js +13 -6
- package/_esm/hooks/useTransactionHistory.js.map +1 -1
- package/_esm/i18n/en.json +4 -10
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +1 -0
- 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 +5 -2
- package/_esm/pages/MainPage/MainPage.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.style.js +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.style.js.map +1 -1
- package/_esm/pages/SelectChainPage/SelectChainPage.js +1 -0
- package/_esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/_esm/pages/SelectEnabledToolsPage.js +1 -0
- 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/SelectWalletPage/SelectWalletPage.js +1 -0
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/EmptyListIndicator.js +3 -2
- package/_esm/pages/SendToWallet/EmptyListIndicator.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js +4 -3
- package/_esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.style.d.ts +24 -34
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js +6 -43
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/_esm/pages/SettingsPage/ResetSettingsButton.js +1 -1
- package/_esm/pages/SettingsPage/ResetSettingsButton.style.js +2 -2
- package/_esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
- package/_esm/pages/SettingsPage/RoutePrioritySettings.js +3 -3
- package/_esm/pages/SettingsPage/RoutePrioritySettings.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +1 -4
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.js +0 -8
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +1 -3
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_esm/providers/WalletProvider/EVMBaseProvider.js +1 -2
- package/_esm/providers/WalletProvider/EVMBaseProvider.js.map +1 -1
- package/_esm/stores/bookmarks/createBookmarkStore.js +1 -1
- package/_esm/stores/bookmarks/createBookmarkStore.js.map +1 -1
- package/_esm/stores/form/useFieldController.js +2 -2
- package/_esm/stores/form/useFieldController.js.map +1 -1
- package/_esm/stores/settings/useSettingsStore.js +5 -2
- package/_esm/stores/settings/useSettingsStore.js.map +1 -1
- package/_esm/types/widget.d.ts +0 -1
- package/_esm/types/widget.js +0 -1
- package/_esm/types/widget.js.map +1 -1
- package/_esm/utils/colors.d.ts +2 -2
- package/_esm/utils/colors.js +6 -4
- package/_esm/utils/colors.js.map +1 -1
- package/components/ActiveTransactions/ActiveTransactions.style.ts +1 -1
- package/components/AmountInput/PriceFormHelperText.tsx +3 -3
- package/components/AppContainer.tsx +3 -3
- package/components/Avatar/AccountAvatar.tsx +8 -4
- package/components/Avatar/Avatar.style.tsx +14 -4
- package/components/Avatar/Avatar.tsx +7 -3
- package/components/Avatar/TokenAvatar.tsx +4 -4
- package/components/Avatar/utils.ts +11 -0
- package/components/ButtonTertiary.tsx +19 -0
- package/components/Card/Card.tsx +12 -17
- package/components/Card/CardHeader.tsx +3 -1
- package/components/Card/CardIconButton.tsx +4 -7
- package/components/Card/CardLabel.tsx +0 -4
- package/components/Card/CardTitle.tsx +1 -0
- package/components/ChainSelect/useChainSelect.ts +1 -2
- package/components/Header/Header.style.ts +13 -14
- package/components/Header/WalletHeader.tsx +15 -13
- package/components/Header/WalletMenu.tsx +20 -13
- package/components/Input.tsx +1 -4
- package/components/ListItemButton.tsx +10 -7
- package/components/ListItemText.tsx +1 -1
- package/components/PageContainer.ts +9 -1
- package/components/PoweredBy/PoweredBy.tsx +21 -36
- package/components/RouteCard/RouteCard.style.ts +2 -2
- package/components/RouteCard/RouteCard.tsx +10 -27
- package/components/Routes/Routes.tsx +4 -3
- package/components/SelectTokenButton/SelectTokenButton.style.tsx +7 -6
- package/components/SelectTokenButton/SelectTokenButton.tsx +1 -1
- package/components/SendToWallet/SendToWallet.style.tsx +14 -9
- package/components/SendToWallet/SendToWalletButton.tsx +38 -19
- package/components/SendToWallet/SendToWalletExpandButton.tsx +2 -1
- package/components/SmallAvatar.tsx +4 -6
- package/components/Step/StepProcess.style.tsx +3 -2
- package/components/StepActions/StepActions.style.tsx +14 -19
- package/components/StepActions/StepActions.tsx +1 -3
- package/components/StepActions/StepFeeBreakdown.tsx +3 -2
- package/components/Tabs/Tabs.style.tsx +10 -19
- package/components/Token/Token.tsx +1 -5
- package/components/TokenList/TokenList.style.tsx +3 -5
- package/components/TokenList/TokenList.tsx +2 -1
- package/components/TokenList/TokenListItem.tsx +1 -1
- package/components/TokenList/useTokenSelect.ts +1 -3
- package/config/theme.ts +29 -15
- package/config/version.ts +1 -1
- package/hooks/useToAddressReset.ts +1 -1
- package/hooks/useTransactionHistory.ts +23 -14
- package/i18n/en.json +4 -10
- package/package.json +9 -9
- package/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +1 -0
- package/pages/LanguagesPage.tsx +1 -0
- package/pages/MainPage/MainPage.tsx +8 -3
- package/pages/RoutesPage/RoutesPage.style.ts +1 -1
- package/pages/SelectChainPage/SelectChainPage.tsx +1 -0
- package/pages/SelectEnabledToolsPage.tsx +1 -0
- package/pages/SelectNativeTokenPage.tsx +1 -0
- package/pages/SelectWalletPage/SelectWalletPage.tsx +1 -0
- package/pages/SendToWallet/EmptyListIndicator.tsx +5 -6
- package/pages/SendToWallet/SendToWalletPage.style.tsx +6 -53
- package/pages/SendToWallet/SendToWalletPage.tsx +11 -8
- package/pages/SettingsPage/ResetSettingsButton.style.tsx +2 -2
- package/pages/SettingsPage/ResetSettingsButton.tsx +1 -1
- package/pages/SettingsPage/RoutePrioritySettings.tsx +7 -7
- package/pages/SettingsPage/SettingsCard/SettingCard.style.tsx +0 -9
- package/pages/SettingsPage/SettingsPage.tsx +1 -1
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +1 -4
- package/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +1 -1
- package/providers/WalletProvider/EVMBaseProvider.tsx +0 -2
- package/stores/bookmarks/createBookmarkStore.ts +2 -1
- package/stores/form/useFieldController.ts +2 -2
- package/stores/settings/useSettingsStore.ts +5 -2
- package/types/widget.ts +0 -1
- package/utils/colors.ts +8 -9
package/AppDefault.tsx
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
} from './components/AppContainer.js';
|
|
8
8
|
import { Header } from './components/Header/Header.js';
|
|
9
9
|
import { Initializer } from './components/Initializer.js';
|
|
10
|
-
import { PoweredBy } from './components/PoweredBy/PoweredBy.js';
|
|
11
10
|
import { RoutesExpanded } from './components/Routes/RoutesExpanded.js';
|
|
12
11
|
import { useExpandableVariant } from './hooks/useExpandableVariant.js';
|
|
13
12
|
import { useWidgetConfig } from './providers/WidgetProvider/WidgetProvider.js';
|
|
@@ -26,7 +25,6 @@ export const AppDefault = () => {
|
|
|
26
25
|
<FlexContainer disableGutters>
|
|
27
26
|
<AppRoutes />
|
|
28
27
|
</FlexContainer>
|
|
29
|
-
<PoweredBy />
|
|
30
28
|
<Initializer />
|
|
31
29
|
</AppContainer>
|
|
32
30
|
{expandable ? <RoutesExpanded /> : null}
|
package/AppDrawer.style.tsx
CHANGED
|
@@ -1,100 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const getButtonTransformWidth = (
|
|
4
|
-
drawerWidth?: number | string,
|
|
5
|
-
drawerMaxWidth?: number | string,
|
|
6
|
-
) => {
|
|
7
|
-
if (typeof drawerWidth === 'number') {
|
|
8
|
-
return `${drawerWidth}px`;
|
|
9
|
-
}
|
|
10
|
-
if (typeof drawerWidth === 'string' && !drawerWidth.includes('%')) {
|
|
11
|
-
return drawerWidth;
|
|
12
|
-
}
|
|
13
|
-
if (typeof drawerMaxWidth === 'number') {
|
|
14
|
-
return `${drawerMaxWidth}px`;
|
|
15
|
-
}
|
|
16
|
-
if (typeof drawerMaxWidth === 'string' && !drawerMaxWidth.includes('%')) {
|
|
17
|
-
return drawerMaxWidth;
|
|
18
|
-
}
|
|
19
|
-
return '392px';
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const DrawerButton = styled(Button, {
|
|
23
|
-
shouldForwardProp: (prop) =>
|
|
24
|
-
!['open', 'drawerProps'].includes(prop as string),
|
|
25
|
-
})<{
|
|
26
|
-
open?: boolean;
|
|
27
|
-
drawerProps?: {
|
|
28
|
-
width?: number | string;
|
|
29
|
-
maxWidth?: number | string;
|
|
30
|
-
};
|
|
31
|
-
}>(({ theme, open, drawerProps }) => ({
|
|
32
|
-
background:
|
|
33
|
-
theme.palette.mode === 'light'
|
|
34
|
-
? theme.palette.common.black
|
|
35
|
-
: theme.palette.common.white,
|
|
36
|
-
color:
|
|
37
|
-
theme.palette.mode === 'light'
|
|
38
|
-
? theme.palette.common.white
|
|
39
|
-
: theme.palette.common.black,
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
borderRadius: `${theme.shape.borderRadiusSecondary}px 0 0 ${theme.shape.borderRadiusSecondary}px`,
|
|
42
|
-
display: 'flex',
|
|
43
|
-
flexDirection: 'column',
|
|
44
|
-
justifyContent: 'center',
|
|
45
|
-
minHeight: 144,
|
|
46
|
-
minWidth: 40,
|
|
47
|
-
padding: theme.spacing(1, 0, 1, 0),
|
|
48
|
-
position: 'absolute',
|
|
49
|
-
right: 0,
|
|
50
|
-
top: 'calc(50% - 74px)',
|
|
51
|
-
transform: `translate3d(calc(${
|
|
52
|
-
open
|
|
53
|
-
? getButtonTransformWidth(drawerProps?.width, drawerProps?.maxWidth)
|
|
54
|
-
: '0px'
|
|
55
|
-
} * -1), 0, 0)`,
|
|
56
|
-
transition: theme.transitions.create(['transform'], {
|
|
57
|
-
duration: open
|
|
58
|
-
? theme.transitions.duration.enteringScreen
|
|
59
|
-
: theme.transitions.duration.leavingScreen,
|
|
60
|
-
easing: open
|
|
61
|
-
? theme.transitions.easing.easeOut
|
|
62
|
-
: theme.transitions.easing.sharp,
|
|
63
|
-
}),
|
|
64
|
-
zIndex: 1500,
|
|
65
|
-
'&:hover': {
|
|
66
|
-
background:
|
|
67
|
-
theme.palette.mode === 'light'
|
|
68
|
-
? theme.palette.common.black
|
|
69
|
-
: theme.palette.common.white,
|
|
70
|
-
},
|
|
71
|
-
svg: {
|
|
72
|
-
color:
|
|
73
|
-
theme.palette.mode === 'light'
|
|
74
|
-
? theme.palette.common.white
|
|
75
|
-
: theme.palette.common.black,
|
|
76
|
-
},
|
|
77
|
-
}));
|
|
78
|
-
|
|
79
|
-
export const DrawerButtonTypography = styled(Typography)(({ theme }) => ({
|
|
80
|
-
borderRadius: `0 ${theme.shape.borderRadiusSecondary}px ${theme.shape.borderRadiusSecondary}px 0`,
|
|
81
|
-
background:
|
|
82
|
-
theme.palette.mode === 'light'
|
|
83
|
-
? theme.palette.common.black
|
|
84
|
-
: theme.palette.common.white,
|
|
85
|
-
color:
|
|
86
|
-
theme.palette.mode === 'light'
|
|
87
|
-
? theme.palette.common.white
|
|
88
|
-
: theme.palette.common.black,
|
|
89
|
-
cursor: 'pointer',
|
|
90
|
-
display: 'flex',
|
|
91
|
-
flexDirection: 'row',
|
|
92
|
-
padding: theme.spacing(1),
|
|
93
|
-
position: 'relative',
|
|
94
|
-
textTransform: 'none',
|
|
95
|
-
transform: 'rotateZ(180deg)',
|
|
96
|
-
writingMode: 'vertical-rl',
|
|
97
|
-
}));
|
|
1
|
+
import { IconButton, styled } from '@mui/material';
|
|
98
2
|
|
|
99
3
|
export const CloseButtonLayout = styled(IconButton)(() => ({
|
|
100
4
|
position: 'absolute',
|
package/AppDrawer.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { KeyboardArrowLeft, KeyboardArrowRight } from '@mui/icons-material';
|
|
2
1
|
import { Drawer } from '@mui/material';
|
|
3
2
|
import type { PropsWithChildren } from 'react';
|
|
4
3
|
import {
|
|
@@ -9,12 +8,9 @@ import {
|
|
|
9
8
|
useRef,
|
|
10
9
|
useState,
|
|
11
10
|
} from 'react';
|
|
12
|
-
import { useTranslation } from 'react-i18next';
|
|
13
|
-
import { DrawerButton, DrawerButtonTypography } from './AppDrawer.style.js';
|
|
14
11
|
import type { WidgetDrawerContext } from './AppDrawerContext.js';
|
|
15
12
|
import { DrawerContext } from './AppDrawerContext.js';
|
|
16
|
-
import type { WidgetDrawerProps
|
|
17
|
-
import { HiddenUI } from './types/widget.js';
|
|
13
|
+
import type { WidgetDrawerProps } from './types/widget.js';
|
|
18
14
|
|
|
19
15
|
export interface WidgetDrawer {
|
|
20
16
|
isOpen(): void;
|
|
@@ -71,17 +67,6 @@ export const AppDrawer = forwardRef<
|
|
|
71
67
|
|
|
72
68
|
return (
|
|
73
69
|
<DrawerContext.Provider value={drawerContext}>
|
|
74
|
-
{!config?.hiddenUI?.includes(HiddenUI.DrawerButton) ? (
|
|
75
|
-
<DrawerButton
|
|
76
|
-
variant="contained"
|
|
77
|
-
onClick={toggleDrawer}
|
|
78
|
-
open={drawerOpen}
|
|
79
|
-
drawerProps={config?.containerStyle}
|
|
80
|
-
>
|
|
81
|
-
{drawerOpen ? <KeyboardArrowRight /> : <KeyboardArrowLeft />}
|
|
82
|
-
<DrawerButtonText open={drawerOpen} subvariant={config?.subvariant} />
|
|
83
|
-
</DrawerButton>
|
|
84
|
-
) : null}
|
|
85
70
|
<Drawer
|
|
86
71
|
ref={elementRef}
|
|
87
72
|
anchor="right"
|
|
@@ -96,11 +81,13 @@ export const AppDrawer = forwardRef<
|
|
|
96
81
|
},
|
|
97
82
|
}}
|
|
98
83
|
PaperProps={{
|
|
99
|
-
sx: {
|
|
84
|
+
sx: (theme) => ({
|
|
100
85
|
width: config?.containerStyle?.width ?? '100%',
|
|
101
|
-
minWidth:
|
|
102
|
-
|
|
103
|
-
|
|
86
|
+
minWidth:
|
|
87
|
+
config?.containerStyle?.minWidth ?? theme.breakpoints.values.xs,
|
|
88
|
+
maxWidth:
|
|
89
|
+
config?.containerStyle?.maxWidth ?? theme.breakpoints.values.sm,
|
|
90
|
+
}),
|
|
104
91
|
}}
|
|
105
92
|
keepMounted
|
|
106
93
|
>
|
|
@@ -109,23 +96,3 @@ export const AppDrawer = forwardRef<
|
|
|
109
96
|
</DrawerContext.Provider>
|
|
110
97
|
);
|
|
111
98
|
});
|
|
112
|
-
|
|
113
|
-
export const DrawerButtonText = ({
|
|
114
|
-
open,
|
|
115
|
-
subvariant,
|
|
116
|
-
}: {
|
|
117
|
-
open: boolean;
|
|
118
|
-
subvariant?: WidgetSubvariant;
|
|
119
|
-
}) => {
|
|
120
|
-
const { t } = useTranslation();
|
|
121
|
-
|
|
122
|
-
return (
|
|
123
|
-
<DrawerButtonTypography>
|
|
124
|
-
{open
|
|
125
|
-
? t('button.hide')
|
|
126
|
-
: subvariant === 'nft'
|
|
127
|
-
? t('button.lifiCheckout')
|
|
128
|
-
: t('button.lifiExchange')}
|
|
129
|
-
</DrawerButtonTypography>
|
|
130
|
-
);
|
|
131
|
-
};
|
package/_esm/AppDefault.js
CHANGED
|
@@ -4,7 +4,6 @@ import { AppRoutes } from './AppRoutes.js';
|
|
|
4
4
|
import { AppContainer, AppExpandedContainer, FlexContainer, } from './components/AppContainer.js';
|
|
5
5
|
import { Header } from './components/Header/Header.js';
|
|
6
6
|
import { Initializer } from './components/Initializer.js';
|
|
7
|
-
import { PoweredBy } from './components/PoweredBy/PoweredBy.js';
|
|
8
7
|
import { RoutesExpanded } from './components/Routes/RoutesExpanded.js';
|
|
9
8
|
import { useExpandableVariant } from './hooks/useExpandableVariant.js';
|
|
10
9
|
import { useWidgetConfig } from './providers/WidgetProvider/WidgetProvider.js';
|
|
@@ -12,6 +11,6 @@ import { ElementId, createElementId } from './utils/elements.js';
|
|
|
12
11
|
export const AppDefault = () => {
|
|
13
12
|
const { elementId } = useWidgetConfig();
|
|
14
13
|
const expandable = useExpandableVariant();
|
|
15
|
-
return (_jsxs(AppExpandedContainer, { id: createElementId(ElementId.AppExpandedContainer, elementId), children: [_jsxs(AppContainer, { children: [_jsx(Header, {}), _jsx(FlexContainer, { disableGutters: true, children: _jsx(AppRoutes, {}) }), _jsx(
|
|
14
|
+
return (_jsxs(AppExpandedContainer, { id: createElementId(ElementId.AppExpandedContainer, elementId), children: [_jsxs(AppContainer, { children: [_jsx(Header, {}), _jsx(FlexContainer, { disableGutters: true, children: _jsx(AppRoutes, {}) }), _jsx(Initializer, {})] }), expandable ? _jsx(RoutesExpanded, {}) : null] }));
|
|
16
15
|
};
|
|
17
16
|
//# sourceMappingURL=AppDefault.js.map
|
package/_esm/AppDefault.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDefault.js","sourceRoot":"","sources":["../AppDefault.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,aAAa,GACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AppDefault.js","sourceRoot":"","sources":["../AppDefault.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,aAAa,GACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,CAAC;IACxC,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAE1C,OAAO,CACL,MAAC,oBAAoB,IACnB,EAAE,EAAE,eAAe,CAAC,SAAS,CAAC,oBAAoB,EAAE,SAAS,CAAC,aAE9D,MAAC,YAAY,eACX,KAAC,MAAM,KAAG,EACV,KAAC,aAAa,IAAC,cAAc,kBAC3B,KAAC,SAAS,KAAG,GACC,EAChB,KAAC,WAAW,KAAG,IACF,EACd,UAAU,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC,CAAC,CAAC,IAAI,IAClB,CACxB,CAAC;AACJ,CAAC,CAAC"}
|
package/_esm/AppDrawer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
-
import type { WidgetDrawerProps
|
|
2
|
+
import type { WidgetDrawerProps } from './types/widget.js';
|
|
3
3
|
export interface WidgetDrawer {
|
|
4
4
|
isOpen(): void;
|
|
5
5
|
toggleDrawer(): void;
|
|
@@ -9,7 +9,3 @@ export interface WidgetDrawer {
|
|
|
9
9
|
export declare const AppDrawer: import("react").ForwardRefExoticComponent<WidgetDrawerProps & {
|
|
10
10
|
children?: import("react").ReactNode;
|
|
11
11
|
} & import("react").RefAttributes<WidgetDrawer>>;
|
|
12
|
-
export declare const DrawerButtonText: ({ open, subvariant, }: {
|
|
13
|
-
open: boolean;
|
|
14
|
-
subvariant?: WidgetSubvariant | undefined;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
package/_esm/AppDrawer.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { KeyboardArrowLeft, KeyboardArrowRight } from '@mui/icons-material';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { Drawer } from '@mui/material';
|
|
4
3
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { DrawerButton, DrawerButtonTypography } from './AppDrawer.style.js';
|
|
7
4
|
import { DrawerContext } from './AppDrawerContext.js';
|
|
8
|
-
import { HiddenUI } from './types/widget.js';
|
|
9
5
|
export const AppDrawer = forwardRef(({ elementRef, open, onClose, config, children }, ref) => {
|
|
10
6
|
const openRef = useRef(Boolean(open));
|
|
11
7
|
const [drawerOpen, setDrawerOpen] = useState(Boolean(open));
|
|
@@ -36,27 +32,19 @@ export const AppDrawer = forwardRef(({ elementRef, open, onClose, config, childr
|
|
|
36
32
|
const drawerContext = useMemo(() => ({
|
|
37
33
|
closeDrawer,
|
|
38
34
|
}), [closeDrawer]);
|
|
39
|
-
return (
|
|
40
|
-
|
|
41
|
-
sx: {
|
|
42
|
-
backgroundColor: 'rgb(0 0 0 / 48%)',
|
|
43
|
-
backdropFilter: 'blur(3px)',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
}, PaperProps: {
|
|
35
|
+
return (_jsx(DrawerContext.Provider, { value: drawerContext, children: _jsx(Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, slotProps: {
|
|
36
|
+
backdrop: {
|
|
47
37
|
sx: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
maxWidth: config?.containerStyle?.maxWidth ?? 392,
|
|
38
|
+
backgroundColor: 'rgb(0 0 0 / 48%)',
|
|
39
|
+
backdropFilter: 'blur(3px)',
|
|
51
40
|
},
|
|
52
|
-
},
|
|
41
|
+
},
|
|
42
|
+
}, PaperProps: {
|
|
43
|
+
sx: (theme) => ({
|
|
44
|
+
width: config?.containerStyle?.width ?? '100%',
|
|
45
|
+
minWidth: config?.containerStyle?.minWidth ?? theme.breakpoints.values.xs,
|
|
46
|
+
maxWidth: config?.containerStyle?.maxWidth ?? theme.breakpoints.values.sm,
|
|
47
|
+
}),
|
|
48
|
+
}, keepMounted: true, children: children }) }));
|
|
53
49
|
});
|
|
54
|
-
export const DrawerButtonText = ({ open, subvariant, }) => {
|
|
55
|
-
const { t } = useTranslation();
|
|
56
|
-
return (_jsx(DrawerButtonTypography, { children: open
|
|
57
|
-
? t('button.hide')
|
|
58
|
-
: subvariant === 'nft'
|
|
59
|
-
? t('button.lifiCheckout')
|
|
60
|
-
: t('button.lifiExchange') }));
|
|
61
|
-
};
|
|
62
50
|
//# sourceMappingURL=AppDrawer.js.map
|
package/_esm/AppDrawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDrawer.js","sourceRoot":"","sources":["../AppDrawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AppDrawer.js","sourceRoot":"","sources":["../AppDrawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAUtD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAGjC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5D,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,OAAO,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC;YACxB,OAAO,OAAO,CAAC,OAAO,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACrB,OAAO,EAAE,EAAE,CAAC;QACd,CAAC;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,OAA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,EAAE;iBAClE,CAAC;aACH,EACD,WAAW,kBAEV,QAAQ,GACF,GACc,CAC1B,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
-
export declare const DrawerButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
-
}, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "href" | "disabled" | "action" | "size" | "classes" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
|
-
open?: boolean | undefined;
|
|
6
|
-
drawerProps?: {
|
|
7
|
-
width?: string | number | undefined;
|
|
8
|
-
maxWidth?: string | number | undefined;
|
|
9
|
-
} | undefined;
|
|
10
|
-
}, {}, {}>;
|
|
11
|
-
export declare const DrawerButtonTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
12
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
13
|
-
}, "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "style" | "className" | "align" | "classes" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
14
2
|
export declare const CloseButtonLayout: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
15
3
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
16
4
|
}, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "disabled" | "action" | "size" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
package/_esm/AppDrawer.style.js
CHANGED
|
@@ -1,79 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const getButtonTransformWidth = (drawerWidth, drawerMaxWidth) => {
|
|
3
|
-
if (typeof drawerWidth === 'number') {
|
|
4
|
-
return `${drawerWidth}px`;
|
|
5
|
-
}
|
|
6
|
-
if (typeof drawerWidth === 'string' && !drawerWidth.includes('%')) {
|
|
7
|
-
return drawerWidth;
|
|
8
|
-
}
|
|
9
|
-
if (typeof drawerMaxWidth === 'number') {
|
|
10
|
-
return `${drawerMaxWidth}px`;
|
|
11
|
-
}
|
|
12
|
-
if (typeof drawerMaxWidth === 'string' && !drawerMaxWidth.includes('%')) {
|
|
13
|
-
return drawerMaxWidth;
|
|
14
|
-
}
|
|
15
|
-
return '392px';
|
|
16
|
-
};
|
|
17
|
-
export const DrawerButton = styled(Button, {
|
|
18
|
-
shouldForwardProp: (prop) => !['open', 'drawerProps'].includes(prop),
|
|
19
|
-
})(({ theme, open, drawerProps }) => ({
|
|
20
|
-
background: theme.palette.mode === 'light'
|
|
21
|
-
? theme.palette.common.black
|
|
22
|
-
: theme.palette.common.white,
|
|
23
|
-
color: theme.palette.mode === 'light'
|
|
24
|
-
? theme.palette.common.white
|
|
25
|
-
: theme.palette.common.black,
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
borderRadius: `${theme.shape.borderRadiusSecondary}px 0 0 ${theme.shape.borderRadiusSecondary}px`,
|
|
28
|
-
display: 'flex',
|
|
29
|
-
flexDirection: 'column',
|
|
30
|
-
justifyContent: 'center',
|
|
31
|
-
minHeight: 144,
|
|
32
|
-
minWidth: 40,
|
|
33
|
-
padding: theme.spacing(1, 0, 1, 0),
|
|
34
|
-
position: 'absolute',
|
|
35
|
-
right: 0,
|
|
36
|
-
top: 'calc(50% - 74px)',
|
|
37
|
-
transform: `translate3d(calc(${open
|
|
38
|
-
? getButtonTransformWidth(drawerProps?.width, drawerProps?.maxWidth)
|
|
39
|
-
: '0px'} * -1), 0, 0)`,
|
|
40
|
-
transition: theme.transitions.create(['transform'], {
|
|
41
|
-
duration: open
|
|
42
|
-
? theme.transitions.duration.enteringScreen
|
|
43
|
-
: theme.transitions.duration.leavingScreen,
|
|
44
|
-
easing: open
|
|
45
|
-
? theme.transitions.easing.easeOut
|
|
46
|
-
: theme.transitions.easing.sharp,
|
|
47
|
-
}),
|
|
48
|
-
zIndex: 1500,
|
|
49
|
-
'&:hover': {
|
|
50
|
-
background: theme.palette.mode === 'light'
|
|
51
|
-
? theme.palette.common.black
|
|
52
|
-
: theme.palette.common.white,
|
|
53
|
-
},
|
|
54
|
-
svg: {
|
|
55
|
-
color: theme.palette.mode === 'light'
|
|
56
|
-
? theme.palette.common.white
|
|
57
|
-
: theme.palette.common.black,
|
|
58
|
-
},
|
|
59
|
-
}));
|
|
60
|
-
export const DrawerButtonTypography = styled(Typography)(({ theme }) => ({
|
|
61
|
-
borderRadius: `0 ${theme.shape.borderRadiusSecondary}px ${theme.shape.borderRadiusSecondary}px 0`,
|
|
62
|
-
background: theme.palette.mode === 'light'
|
|
63
|
-
? theme.palette.common.black
|
|
64
|
-
: theme.palette.common.white,
|
|
65
|
-
color: theme.palette.mode === 'light'
|
|
66
|
-
? theme.palette.common.white
|
|
67
|
-
: theme.palette.common.black,
|
|
68
|
-
cursor: 'pointer',
|
|
69
|
-
display: 'flex',
|
|
70
|
-
flexDirection: 'row',
|
|
71
|
-
padding: theme.spacing(1),
|
|
72
|
-
position: 'relative',
|
|
73
|
-
textTransform: 'none',
|
|
74
|
-
transform: 'rotateZ(180deg)',
|
|
75
|
-
writingMode: 'vertical-rl',
|
|
76
|
-
}));
|
|
1
|
+
import { IconButton, styled } from '@mui/material';
|
|
77
2
|
export const CloseButtonLayout = styled(IconButton)(() => ({
|
|
78
3
|
position: 'absolute',
|
|
79
4
|
top: '12px',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDrawer.style.js","sourceRoot":"","sources":["../AppDrawer.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AppDrawer.style.js","sourceRoot":"","sources":["../AppDrawer.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
button?: false | undefined;
|
|
7
7
|
} & import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
8
8
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
9
|
-
}, "button" | "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "disabled" | "selected" | "classes" | "divider" | "components" | "
|
|
9
|
+
}, "button" | "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "disabled" | "selected" | "classes" | "divider" | "components" | "slots" | "slotProps" | "componentsProps" | "dense" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
10
|
export declare const ShowAllButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
11
11
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
12
12
|
}, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "href" | "disabled" | "action" | "size" | "classes" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -6,7 +6,7 @@ export const ListItemButton = styled(MuiListItemButton)(({ theme }) => ({
|
|
|
6
6
|
paddingRight: theme.spacing(1.5),
|
|
7
7
|
height: 64,
|
|
8
8
|
'&:hover': {
|
|
9
|
-
backgroundColor: getContrastAlphaColor(theme
|
|
9
|
+
backgroundColor: getContrastAlphaColor(theme, 0.04),
|
|
10
10
|
},
|
|
11
11
|
}));
|
|
12
12
|
export const ListItem = styled(MuiListItem, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveTransactions.style.js","sourceRoot":"","sources":["../../../components/ActiveTransactions/ActiveTransactions.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,QAAQ,IAAI,WAAW,EACvB,cAAc,IAAI,iBAAiB,EACnC,8BAA8B,EAC9B,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACtE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY;IACtC,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IAC/B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IAChC,MAAM,EAAE,EAAE;IACV,SAAS,EAAE;QACT,eAAe,EAAE,qBAAqB,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ActiveTransactions.style.js","sourceRoot":"","sources":["../../../components/ActiveTransactions/ActiveTransactions.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,QAAQ,IAAI,WAAW,EACvB,cAAc,IAAI,iBAAiB,EACnC,8BAA8B,EAC9B,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACtE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY;IACtC,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IAC/B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IAChC,MAAM,EAAE,EAAE;IACV,SAAS,EAAE;QACT,eAAe,EAAE,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;KACpD;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE;IAC1C,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,eAAe;CACtD,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC;IAC9B,CAAC,IAAI,8BAA8B,CAAC,IAAI,EAAE,CAAC,EAAE;QAC3C,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KACxB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1D,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,UAAU,EAAE,MAAM;KACnB;IACD,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/B,QAAQ,EAAE,UAAU;CACrB,CAAC,CAAC,CAAC"}
|
|
@@ -20,12 +20,12 @@ export const PriceFormHelperTextBase = ({ formType, isLoading, tokenAddress, tok
|
|
|
20
20
|
margin: 0,
|
|
21
21
|
marginLeft: 2,
|
|
22
22
|
marginTop: 0.75,
|
|
23
|
-
}, children: [_jsx(Typography, { color:
|
|
23
|
+
}, children: [_jsx(Typography, { color: "text.secondary", fontWeight: 500, fontSize: 12, lineHeight: 1, flex: 1, sx: {
|
|
24
24
|
wordBreak: 'break-word',
|
|
25
25
|
overflowWrap: 'break-word',
|
|
26
26
|
}, children: t(`format.currency`, {
|
|
27
27
|
value: fromAmountTokenPrice,
|
|
28
|
-
}) }), isLoading && tokenAddress ? (_jsx(Skeleton, { variant: "text", width: 48, height: 12 })) : token?.amount ? (_jsx(Typography, { fontWeight:
|
|
28
|
+
}) }), isLoading && tokenAddress ? (_jsx(Skeleton, { variant: "text", width: 48, height: 12 })) : token?.amount ? (_jsx(Typography, { fontWeight: 500, fontSize: 12, color: "text.secondary", lineHeight: 1, pl: 0.25, children: `/ ${t(`format.number`, {
|
|
29
29
|
value: formatTokenAmount(token.amount, token.decimals),
|
|
30
30
|
})}` })) : null] }));
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceFormHelperText.js","sourceRoot":"","sources":["../../../components/AmountInput/PriceFormHelperText.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,CAAC,MAAM,mBAAmB,GAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,cAAc,CAC5C,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,EACnC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CACpC,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,sBAAsB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAE3E,OAAO,CACL,KAAC,uBAAuB,IACtB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAMhC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE;IACnD,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAA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BAAgB,EACtB,UAAU,EAAE,CAAC,EACb,EAAE,EAAE,IAAI,YAEP,KAAK,CAAC,CAAC,eAAe,EAAE;oBACvB,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;iBACvD,CAAC,EAAE,GACO,CACd,CAAC,CAAC,CAAC,IAAI,IACO,CAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { WidgetVariant } from '../types/widget.js';
|
|
3
|
-
export declare const maxHeight =
|
|
3
|
+
export declare const maxHeight = 682;
|
|
4
4
|
export declare const AppExpandedContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
6
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Container, ScopedCssBaseline, styled } from '@mui/material';
|
|
3
3
|
import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js';
|
|
4
4
|
import { ElementId, createElementId } from '../utils/elements.js';
|
|
5
|
-
export const maxHeight =
|
|
5
|
+
export const maxHeight = 682;
|
|
6
6
|
export const AppExpandedContainer = styled(Box, {
|
|
7
7
|
shouldForwardProp: (prop) => prop !== 'variant',
|
|
8
8
|
})(({ variant }) => ({
|
|
@@ -18,8 +18,8 @@ const RelativeContainer = styled(Box, {
|
|
|
18
18
|
position: 'relative',
|
|
19
19
|
boxSizing: 'content-box',
|
|
20
20
|
width: '100%',
|
|
21
|
-
minWidth:
|
|
22
|
-
maxWidth:
|
|
21
|
+
minWidth: theme.breakpoints.values.xs,
|
|
22
|
+
maxWidth: theme.breakpoints.values.sm,
|
|
23
23
|
maxHeight: variant === 'drawer' ? 'none' : maxHeight,
|
|
24
24
|
background: theme.palette.background.default,
|
|
25
25
|
overflow: 'auto',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppContainer.js","sourceRoot":"","sources":["../../components/AppContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAEhF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC;AAE7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,EAAE;IAC9C,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS;CAChD,CAAC,CAA8B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,QAAQ;IACxB,UAAU,EAAE,OAAO;IACnB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;CAClD,CAAC,CAAC,CAAC;AAEJ,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,EAAE;IACpC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS;CAChD,CAAC,CAA8B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IACvD,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,aAAa;IACxB,KAAK,EAAE,MAAM;IAC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AO,EAChB,iBAAiB,kBAGjB,KAAC,aAAa,IAAC,cAAc,kBAAE,QAAQ,GAAiB,GACnC,GAEL,CACrB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getConnectorIcon } from '@lifi/wallet-management';
|
|
3
3
|
import { Wallet } from '@mui/icons-material';
|
|
4
|
-
import {
|
|
4
|
+
import { Badge } from '@mui/material';
|
|
5
5
|
import { useChain } from '../../hooks/useChain.js';
|
|
6
6
|
import { SmallAvatar } from '../SmallAvatar.js';
|
|
7
|
-
import { AvatarDefault, AvatarDefaultBadge } from './Avatar.style.js';
|
|
7
|
+
import { AvatarDefault, AvatarDefaultBadge, AvatarMasked, } from './Avatar.style.js';
|
|
8
8
|
export const AccountAvatar = ({ chainId, account, empty, }) => {
|
|
9
9
|
const { chain } = useChain(chainId);
|
|
10
|
-
const avatar = account ? (_jsx(
|
|
10
|
+
const avatar = account ? (_jsx(AvatarMasked, { src: getConnectorIcon(account.connector), alt: account.connector?.name, sx: {
|
|
11
11
|
marginRight: chain?.logoURI ? 0 : 1.5,
|
|
12
12
|
}, children: account.connector?.name[0] })) : empty ? (_jsx(AvatarDefault, {})) : (_jsx(AvatarDefault, { children: _jsx(Wallet, { sx: { fontSize: 20 } }) }));
|
|
13
13
|
return (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: chain ? (_jsx(SmallAvatar, { src: chain.logoURI, alt: chain.name, children: chain.name[0] })) : (_jsx(AvatarDefaultBadge, {})), children: avatar }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountAvatar.js","sourceRoot":"","sources":["../../../components/Avatar/AccountAvatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC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,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACzD,YAAY,EACV,KAAK,CAAC,CAAC,CAAC,CACN,KAAC,WAAW,IAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,YAC7C,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GACF,CACf,CAAC,CAAC,CAAC,CACF,KAAC,kBAAkB,KAAG,CACvB,YAGF,MAAM,GACD,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Badge
|
|
2
|
+
import { Badge } from '@mui/material';
|
|
3
3
|
import { SmallAvatarSkeleton } from '../SmallAvatar.js';
|
|
4
|
-
import { AvatarDefault, AvatarDefaultBadge } from './Avatar.style.js';
|
|
4
|
+
import { AvatarDefault, AvatarDefaultBadge, AvatarSkeleton, } from './Avatar.style.js';
|
|
5
5
|
export const AvatarBadgedDefault = ({ sx }) => {
|
|
6
6
|
return (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(AvatarDefaultBadge, {}), sx: sx, children: _jsx(AvatarDefault, {}) }));
|
|
7
7
|
};
|
|
8
8
|
export const AvatarBadgedSkeleton = ({ sx }) => {
|
|
9
|
-
return (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(SmallAvatarSkeleton, {}), sx: sx, children: _jsx(
|
|
9
|
+
return (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(SmallAvatarSkeleton, {}), sx: sx, children: _jsx(AvatarSkeleton, { width: 40, height: 40, variant: "circular" }) }));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=Avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../components/Avatar/Avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../components/Avatar/Avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,mBAAmB,GAE3B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IACd,OAAO,CACL,KAAC,KAAK,IACJ,OAAO,EAAC,UAAU,EAClB,YAAY,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACzD,YAAY,EAAE,KAAC,kBAAkB,KAAG,EACpC,EAAE,EAAE,EAAE,YAEN,KAAC,aAAa,KAAG,GACX,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAE5B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IACd,OAAO,CACL,KAAC,KAAK,IACJ,OAAO,EAAC,UAAU,EAClB,YAAY,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACzD,YAAY,EAAE,KAAC,mBAAmB,KAAG,EACrC,EAAE,EAAE,EAAE,YAEN,KAAC,cAAc,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAC,UAAU,GAAG,GACtD,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
export declare const AvatarMasked: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, "children" | "sx" | "style" | "className" | "sizes" | "alt" | "src" | "srcSet" | "classes" | "variant" | "imgProps" | "slots" | "slotProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
export declare const AvatarSkeleton: import("@emotion/styled").StyledComponent<import("@mui/material").SkeletonOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
7
|
+
}, "width" | "height" | "animation" | "children" | "sx" | "style" | "className" | "classes" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
2
8
|
export declare const TokenAvatarGroup: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarGroupProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
9
|
export declare const AvatarDefault: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
10
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|