@lifi/widget 3.23.3 → 3.24.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +165 -0
- package/README.md +4 -8
- package/dist/esm/components/AppContainer.js +22 -8
- package/dist/esm/components/AppContainer.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.d.ts +6 -1
- package/dist/esm/components/Avatar/Avatar.js +4 -4
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.d.ts +13 -4
- package/dist/esm/components/Avatar/Avatar.style.js +20 -10
- package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
- package/dist/esm/components/Avatar/SmallAvatar.d.ts +8 -2
- package/dist/esm/components/Avatar/SmallAvatar.js +7 -5
- package/dist/esm/components/Avatar/SmallAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/TokenAvatar.d.ts +6 -0
- package/dist/esm/components/Avatar/TokenAvatar.js +7 -7
- package/dist/esm/components/Avatar/TokenAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/utils.d.ts +1 -8
- package/dist/esm/components/Avatar/utils.js +5 -8
- package/dist/esm/components/Avatar/utils.js.map +1 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.js +6 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/dist/esm/components/Header/Header.style.d.ts +4 -1
- package/dist/esm/components/Header/Header.style.js +7 -5
- package/dist/esm/components/Header/Header.style.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +3 -3
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.js +7 -13
- package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +2 -2
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +2 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.js +3 -3
- package/dist/esm/components/StepActions/StepActions.style.d.ts +4 -1
- package/dist/esm/components/TokenList/TokenDetailsSheet.d.ts +6 -0
- package/dist/esm/components/TokenList/TokenDetailsSheet.js +24 -0
- package/dist/esm/components/TokenList/TokenDetailsSheet.js.map +1 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.d.ts +8 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.js +67 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.js.map +1 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.d.ts +5 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.js +28 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.js.map +1 -0
- package/dist/esm/components/TokenList/TokenListItem.js +29 -11
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +45 -40
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TokenList/types.d.ts +7 -0
- package/dist/esm/components/TransactionDetails.js +7 -7
- package/dist/esm/components/TransactionDetails.js.map +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/i18n/bn.json +5 -0
- package/dist/esm/i18n/de.json +5 -0
- package/dist/esm/i18n/en.json +4 -0
- package/dist/esm/i18n/es.json +5 -0
- package/dist/esm/i18n/fr.json +5 -0
- package/dist/esm/i18n/hi.json +5 -0
- package/dist/esm/i18n/id.json +5 -0
- package/dist/esm/i18n/it.json +5 -0
- package/dist/esm/i18n/ja.json +5 -0
- package/dist/esm/i18n/ko.json +5 -0
- package/dist/esm/i18n/pt.json +5 -0
- package/dist/esm/i18n/th.json +5 -0
- package/dist/esm/i18n/tr.json +5 -0
- package/dist/esm/i18n/uk.json +5 -0
- package/dist/esm/i18n/vi.json +5 -0
- package/dist/esm/i18n/zh.json +5 -0
- package/dist/esm/icons/lifi.d.ts +1 -1
- package/dist/esm/icons/lifi.js +1 -1
- package/dist/esm/icons/lifi.js.map +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.js +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/dist/esm/pages/SelectEnabledToolsPage.js +1 -1
- package/dist/esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +4 -4
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/utils/format.d.ts +1 -0
- package/dist/esm/utils/format.js +16 -0
- package/dist/esm/utils/format.js.map +1 -1
- package/package.json +14 -14
- package/package.json.tmp +14 -14
- package/src/components/AppContainer.tsx +26 -8
- package/src/components/Avatar/Avatar.style.tsx +23 -11
- package/src/components/Avatar/Avatar.tsx +11 -6
- package/src/components/Avatar/SmallAvatar.tsx +13 -5
- package/src/components/Avatar/TokenAvatar.tsx +38 -8
- package/src/components/Avatar/utils.ts +5 -10
- package/src/components/BaseTransactionButton/BaseTransactionButton.tsx +5 -1
- package/src/components/Header/Header.style.ts +10 -6
- package/src/components/RouteCard/RouteCard.tsx +3 -3
- package/src/components/RouteCard/RouteCardEssentials.tsx +7 -14
- package/src/components/Routes/RoutesExpanded.tsx +7 -2
- package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +2 -2
- package/src/components/SendToWallet/SendToWalletButton.tsx +3 -2
- package/src/components/StepActions/StepActions.tsx +3 -3
- package/src/components/TokenList/TokenDetailsSheet.tsx +48 -0
- package/src/components/TokenList/TokenDetailsSheetContent.style.tsx +34 -0
- package/src/components/TokenList/TokenDetailsSheetContent.tsx +200 -0
- package/src/components/TokenList/TokenListItem.tsx +117 -50
- package/src/components/TokenList/VirtualizedTokenList.tsx +95 -74
- package/src/components/TokenList/types.ts +8 -0
- package/src/components/TransactionDetails.tsx +8 -8
- package/src/config/version.ts +1 -1
- package/src/i18n/bn.json +5 -0
- package/src/i18n/de.json +5 -0
- package/src/i18n/en.json +4 -0
- package/src/i18n/es.json +5 -0
- package/src/i18n/fr.json +5 -0
- package/src/i18n/hi.json +5 -0
- package/src/i18n/id.json +5 -0
- package/src/i18n/it.json +5 -0
- package/src/i18n/ja.json +5 -0
- package/src/i18n/ko.json +5 -0
- package/src/i18n/pt.json +5 -0
- package/src/i18n/th.json +5 -0
- package/src/i18n/tr.json +5 -0
- package/src/i18n/uk.json +5 -0
- package/src/i18n/vi.json +5 -0
- package/src/i18n/zh.json +5 -0
- package/src/icons/lifi.ts +1 -1
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +1 -0
- package/src/pages/RoutesPage/RoutesPage.tsx +1 -1
- package/src/pages/SelectChainPage/SelectChainPage.tsx +1 -1
- package/src/pages/SelectEnabledToolsPage.tsx +1 -1
- package/src/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +1 -0
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +4 -4
- package/src/utils/format.ts +19 -0
- package/LICENSE.md +0 -201
package/LICENSE
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
package/README.md
CHANGED
|
@@ -37,25 +37,26 @@ LI.FI Widget is available as an [npm package](https://www.npmjs.com/package/@lif
|
|
|
37
37
|
**pnpm:**
|
|
38
38
|
|
|
39
39
|
```sh
|
|
40
|
-
pnpm add @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @tanstack/react-query
|
|
40
|
+
pnpm add @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @tanstack/react-query @mysten/dapp-kit
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
**npm:**
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
|
-
npm install @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @tanstack/react-query
|
|
46
|
+
npm install @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @tanstack/react-query @mysten/dapp-kit
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
**yarn:**
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
yarn add @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @tanstack/react-query
|
|
52
|
+
yarn add @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @tanstack/react-query @mysten/dapp-kit
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
- [Wagmi](https://wagmi.sh/) is type safe, extensible, and modular library for building Ethereum apps.
|
|
56
56
|
- [Bigmi](https://github.com/lifinance/bigmi) is modular TypeScript library that provides reactive primitives for building Bitcoin applications.
|
|
57
57
|
- [@solana/wallet-adapter-react](https://github.com/anza-xyz/wallet-adapter) is modular TypeScript wallet adapters and components for Solana applications.
|
|
58
58
|
- [TanStack Query](https://tanstack.com/query/v5) is an async state manager that handles requests, caching, and more.
|
|
59
|
+
- [@mysten/dapp-kit](https://sdk.mystenlabs.com/dapp-kit) provides React tools for wallet integration and data access in Sui blockchain dApps.
|
|
59
60
|
|
|
60
61
|
### LI.FI Wallet Management
|
|
61
62
|
|
|
@@ -121,8 +122,3 @@ Thank you for your support!
|
|
|
121
122
|
## Changelog
|
|
122
123
|
|
|
123
124
|
The [changelog](/CHANGELOG.md) is regularly updated to reflect what's changed in each new release.
|
|
124
|
-
|
|
125
|
-
## License
|
|
126
|
-
|
|
127
|
-
This project is licensed under the terms of the
|
|
128
|
-
[Apache-2.0](/LICENSE.md).
|
|
@@ -37,6 +37,11 @@ export const AppExpandedContainer = styled(Box, {
|
|
|
37
37
|
export const RelativeContainer = styled(Box, {
|
|
38
38
|
shouldForwardProp: (prop) => prop !== 'variant',
|
|
39
39
|
})(({ theme }) => {
|
|
40
|
+
const maxHeight = theme.container?.height === 'fit-content'
|
|
41
|
+
? 'none'
|
|
42
|
+
: theme.container?.maxHeight ||
|
|
43
|
+
theme.container?.height ||
|
|
44
|
+
defaultMaxHeight;
|
|
40
45
|
return {
|
|
41
46
|
position: 'relative',
|
|
42
47
|
boxSizing: 'content-box',
|
|
@@ -50,9 +55,7 @@ export const RelativeContainer = styled(Box, {
|
|
|
50
55
|
...theme.container,
|
|
51
56
|
maxHeight: theme.container?.display === 'flex' && !theme.container?.height
|
|
52
57
|
? '100%'
|
|
53
|
-
:
|
|
54
|
-
? theme.container?.maxHeight
|
|
55
|
-
: theme.container?.height || defaultMaxHeight,
|
|
58
|
+
: maxHeight,
|
|
56
59
|
variants: [
|
|
57
60
|
{
|
|
58
61
|
props: {
|
|
@@ -70,9 +73,11 @@ export const RelativeContainer = styled(Box, {
|
|
|
70
73
|
const CssBaselineContainer = styled(ScopedCssBaseline, {
|
|
71
74
|
shouldForwardProp: (prop) => !['variant', 'paddingTopAdjustment', 'elementId'].includes(prop),
|
|
72
75
|
})(({ theme, variant, paddingTopAdjustment }) => {
|
|
73
|
-
const
|
|
74
|
-
?
|
|
75
|
-
: theme.container?.
|
|
76
|
+
const maxHeight = theme.container?.height === 'fit-content'
|
|
77
|
+
? 'none'
|
|
78
|
+
: theme.container?.maxHeight ||
|
|
79
|
+
theme.container?.height ||
|
|
80
|
+
defaultMaxHeight;
|
|
76
81
|
return {
|
|
77
82
|
display: 'flex',
|
|
78
83
|
flex: 1,
|
|
@@ -82,13 +87,22 @@ const CssBaselineContainer = styled(ScopedCssBaseline, {
|
|
|
82
87
|
width: '100%',
|
|
83
88
|
maxHeight: variant === 'drawer' || theme.container?.display === 'flex'
|
|
84
89
|
? 'none'
|
|
85
|
-
:
|
|
90
|
+
: maxHeight,
|
|
86
91
|
overflowY: 'auto',
|
|
87
92
|
height: theme.container?.display === 'flex' ? 'auto' : '100%',
|
|
88
93
|
paddingTop: paddingTopAdjustment,
|
|
89
94
|
// This allows FullPageContainer.tsx to expand and fill the available vertical space in max height and default layout modes
|
|
90
95
|
'&:has(.full-page-container)': {
|
|
91
|
-
height:
|
|
96
|
+
height: theme.container?.maxHeight ||
|
|
97
|
+
theme.container?.height ||
|
|
98
|
+
defaultMaxHeight,
|
|
99
|
+
},
|
|
100
|
+
'&:has(.long-list)': {
|
|
101
|
+
maxHeight: theme.container?.maxHeight ||
|
|
102
|
+
(theme.container?.height !== 'fit-content'
|
|
103
|
+
? theme.container?.height
|
|
104
|
+
: undefined) ||
|
|
105
|
+
defaultMaxHeight,
|
|
92
106
|
},
|
|
93
107
|
};
|
|
94
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppContainer.js","sourceRoot":"","sources":["../../../src/components/AppContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAA;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAEpE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEjE,0GAA0G;AAC1G,wHAAwH;AACxH,uHAAuH;AACvH,mIAAmI;AACnI,0BAA0B;AAC1B,2BAA2B;AAC3B,6EAA6E;AAE7E,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,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,QAAQ;IACxB,UAAU,EAAE,OAAO;IACnB,IAAI,EAAE,CAAC;IACP,MAAM,EACJ,KAAK,CAAC,SAAS,EAAE,OAAO,KAAK,MAAM;QACjC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,KAAK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AAe,EAAE,CAAA;IAC1C,MAAM,uBAAuB,GAC3B,KAAK,EAAE,MAAM,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;IAExD,OAAO,CACL,KAAC,iBAAiB,IAChB,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,eAAe,CAAC,SAAS,CAAC,iBAAiB,EAAE,SAAS,CAAC,YAE3D,KAAC,oBAAoB,IACnB,EAAE,EAAE,eAAe,CAAC,SAAS,CAAC,mBAAmB,EAAE,SAAS,CAAC,EAC7D,OAAO,EAAE,OAAO,EAChB,iBAAiB,QACjB,oBAAoB,EAAE,uBAAuB,EAC7C,SAAS,EAAE,SAAS,YAGpB,KAAC,aAAa,IAAC,cAAc,kBAAE,QAAQ,GAAiB,GACnC,GAEL,CACrB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -4,5 +4,10 @@ export declare const AvatarBadgedDefault: React.FC<{
|
|
|
4
4
|
}>;
|
|
5
5
|
export declare const AvatarBadgedSkeleton: React.FC<{
|
|
6
6
|
sx?: SxProps<Theme>;
|
|
7
|
+
avatarSize?: number;
|
|
8
|
+
badgeSize?: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const AvatarSkeleton: React.FC<{
|
|
11
|
+
avatarSize: number;
|
|
12
|
+
badgeSize: number;
|
|
7
13
|
}>;
|
|
8
|
-
export declare const AvatarSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,10 +5,10 @@ import { SmallAvatarSkeleton } from './SmallAvatar.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
|
-
export const AvatarBadgedSkeleton = ({ sx }) => {
|
|
9
|
-
return (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(SmallAvatarSkeleton, {}), sx: sx, children: _jsx(AvatarSkeleton, {}) }));
|
|
8
|
+
export const AvatarBadgedSkeleton = ({ sx, avatarSize = 40, badgeSize = 16 }) => {
|
|
9
|
+
return (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(SmallAvatarSkeleton, { size: badgeSize }), sx: sx, children: _jsx(AvatarSkeleton, { avatarSize: avatarSize, badgeSize: badgeSize }) }));
|
|
10
10
|
};
|
|
11
|
-
export const AvatarSkeleton = () => {
|
|
12
|
-
return (_jsx(AvatarSkeletonMaskedContainer, { children: _jsx(Skeleton, { width:
|
|
11
|
+
export const AvatarSkeleton = ({ avatarSize, badgeSize }) => {
|
|
12
|
+
return (_jsx(AvatarSkeletonMaskedContainer, { badgeSize: badgeSize, children: _jsx(Skeleton, { width: avatarSize, height: avatarSize, variant: "circular" }) }));
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=Avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEtD,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,EAA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IACjC,OAAO,CACL,KAAC,6BAA6B,IAAC,SAAS,EAAE,SAAS,YACjD,KAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAC,UAAU,GAAG,GACxC,CACjC,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
export declare const AvatarMasked: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet" | "slots" | "slotProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
1
|
+
export declare const AvatarMasked: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet" | "slots" | "slotProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
2
|
+
avatarSize?: number;
|
|
3
|
+
badgeSize?: number;
|
|
4
|
+
}, {}, {}>;
|
|
2
5
|
export declare const TokenAvatarGroup: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarGroupOwnProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/material").AvatarGroupOwnProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
|
-
export declare const AvatarDefault: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
4
|
-
|
|
6
|
+
export declare const AvatarDefault: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
7
|
+
badgeSize?: number;
|
|
8
|
+
}, {}, {}>;
|
|
9
|
+
export declare const AvatarDefaultBadge: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
10
|
+
size?: number;
|
|
11
|
+
}, {}, {}>;
|
|
5
12
|
export declare const AvatarSkeletonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
6
|
-
export declare const AvatarSkeletonMaskedContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
13
|
+
export declare const AvatarSkeletonMaskedContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
14
|
+
badgeSize?: number;
|
|
15
|
+
}, {}, {}>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { AvatarGroup, Box, Avatar as MuiAvatar, avatarClasses, badgeClasses, styled, } from '@mui/material';
|
|
2
|
-
import {
|
|
3
|
-
export const AvatarMasked = styled(MuiAvatar
|
|
4
|
-
|
|
2
|
+
import { getAvatarMask } from './utils.js';
|
|
3
|
+
export const AvatarMasked = styled(MuiAvatar, {
|
|
4
|
+
shouldForwardProp: (prop) => prop !== 'avatarSize' && prop !== 'badgeSize',
|
|
5
|
+
})(({ avatarSize = 40, badgeSize = 16 }) => ({
|
|
6
|
+
width: avatarSize,
|
|
7
|
+
height: avatarSize,
|
|
8
|
+
mask: getAvatarMask(badgeSize),
|
|
5
9
|
}));
|
|
6
10
|
export const TokenAvatarGroup = styled(AvatarGroup)(({ theme }) => ({
|
|
7
11
|
[`& .${badgeClasses.badge}:last-of-type .${avatarClasses.root}`]: {
|
|
@@ -19,7 +23,9 @@ export const TokenAvatarGroup = styled(AvatarGroup)(({ theme }) => ({
|
|
|
19
23
|
border: 'none',
|
|
20
24
|
},
|
|
21
25
|
}));
|
|
22
|
-
export const AvatarDefault = styled(Box
|
|
26
|
+
export const AvatarDefault = styled(Box, {
|
|
27
|
+
shouldForwardProp: (prop) => prop !== 'badgeSize',
|
|
28
|
+
})(({ theme, badgeSize = 16 }) => {
|
|
23
29
|
const root = theme.components?.MuiAvatar?.styleOverrides?.root;
|
|
24
30
|
return {
|
|
25
31
|
display: 'flex',
|
|
@@ -29,18 +35,20 @@ export const AvatarDefault = styled(Box)(({ theme }) => {
|
|
|
29
35
|
height: root?.height,
|
|
30
36
|
width: root?.width,
|
|
31
37
|
color: theme.vars.palette.text.secondary,
|
|
32
|
-
mask:
|
|
38
|
+
mask: getAvatarMask(badgeSize),
|
|
33
39
|
background: theme.vars.palette.grey[300],
|
|
34
40
|
...theme.applyStyles('dark', {
|
|
35
41
|
background: theme.vars.palette.grey[800],
|
|
36
42
|
}),
|
|
37
43
|
};
|
|
38
44
|
});
|
|
39
|
-
export const AvatarDefaultBadge = styled(Box
|
|
45
|
+
export const AvatarDefaultBadge = styled(Box, {
|
|
46
|
+
shouldForwardProp: (prop) => prop !== 'size',
|
|
47
|
+
})(({ theme, size = 16 }) => {
|
|
40
48
|
return {
|
|
41
49
|
borderRadius: '50%',
|
|
42
|
-
height:
|
|
43
|
-
width:
|
|
50
|
+
height: size,
|
|
51
|
+
width: size,
|
|
44
52
|
background: theme.vars.palette.grey[300],
|
|
45
53
|
...theme.applyStyles('dark', {
|
|
46
54
|
background: theme.vars.palette.grey[800],
|
|
@@ -51,9 +59,11 @@ export const AvatarSkeletonContainer = styled(Box)(({ theme }) => ({
|
|
|
51
59
|
background: theme.vars.palette.background.paper,
|
|
52
60
|
borderRadius: '50%',
|
|
53
61
|
}));
|
|
54
|
-
export const AvatarSkeletonMaskedContainer = styled(Box
|
|
62
|
+
export const AvatarSkeletonMaskedContainer = styled(Box, {
|
|
63
|
+
shouldForwardProp: (prop) => prop !== 'badgeSize',
|
|
64
|
+
})(({ theme, badgeSize = 16 }) => ({
|
|
55
65
|
background: theme.vars.palette.background.paper,
|
|
56
66
|
borderRadius: '50%',
|
|
57
|
-
mask:
|
|
67
|
+
mask: getAvatarMask(badgeSize),
|
|
58
68
|
}));
|
|
59
69
|
//# sourceMappingURL=Avatar.style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.style.js","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.style.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,GAAG,EACH,MAAM,IAAI,SAAS,EACnB,aAAa,EACb,YAAY,EACZ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AAG,CAAC;QACxC,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE;YAC3B,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;SACzC,CAAC;KACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK;IAC/C,YAAY,EAAE,KAAK;CACpB,CAAC,CAAC,CAAA;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,GAAG,EAAE;IACvD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW;CAClD,CAAC,CAAyB,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACzD,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK;IAC/C,YAAY,EAAE,KAAK;IACnB,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC;CAC/B,CAAC,CAAC,CAAA"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface SmallAvatarProps {
|
|
2
|
+
size?: number;
|
|
3
|
+
}
|
|
4
|
+
export declare const SmallAvatar: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet" | "slots" | "slotProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & SmallAvatarProps, {}, {}>;
|
|
5
|
+
export declare const SmallAvatarSkeleton: React.FC<{
|
|
6
|
+
size?: number;
|
|
7
|
+
}>;
|
|
8
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Avatar, Skeleton, styled } from '@mui/material';
|
|
3
3
|
import { AvatarSkeletonContainer } from './Avatar.style.js';
|
|
4
|
-
export const SmallAvatar = styled(Avatar
|
|
4
|
+
export const SmallAvatar = styled(Avatar, {
|
|
5
|
+
shouldForwardProp: (prop) => prop !== 'size',
|
|
6
|
+
})(({ theme, size = 16 }) => ({
|
|
5
7
|
background: theme.vars.palette.background.paper,
|
|
6
|
-
width:
|
|
7
|
-
height:
|
|
8
|
+
width: size,
|
|
9
|
+
height: size,
|
|
8
10
|
}));
|
|
9
|
-
export const SmallAvatarSkeleton = () => {
|
|
10
|
-
return (_jsx(AvatarSkeletonContainer, { children: _jsx(Skeleton, { width:
|
|
11
|
+
export const SmallAvatarSkeleton = ({ size = 16 }) => {
|
|
12
|
+
return (_jsx(AvatarSkeletonContainer, { children: _jsx(Skeleton, { width: size, height: size, variant: "circular" }) }));
|
|
11
13
|
};
|
|
12
14
|
//# sourceMappingURL=SmallAvatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmallAvatar.js","sourceRoot":"","sources":["../../../../src/components/Avatar/SmallAvatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"SmallAvatar.js","sourceRoot":"","sources":["../../../../src/components/Avatar/SmallAvatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE;IACxC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM;CAC7C,CAAC,CAAmB,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK;IAC/C,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACb,CAAC,CAAC,CAAA;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAE3B,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE;IACrB,OAAO,CACL,KAAC,uBAAuB,cACtB,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,UAAU,GAAG,GAClC,CAC3B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -5,15 +5,21 @@ export declare const TokenAvatar: React.FC<{
|
|
|
5
5
|
chain?: Chain;
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
sx?: SxProps<Theme>;
|
|
8
|
+
tokenAvatarSize?: number;
|
|
9
|
+
chainAvatarSize?: number;
|
|
8
10
|
}>;
|
|
9
11
|
export declare const TokenAvatarFallback: React.FC<{
|
|
10
12
|
token?: StaticToken;
|
|
11
13
|
isLoading?: boolean;
|
|
12
14
|
sx?: SxProps<Theme>;
|
|
15
|
+
tokenAvatarSize: number;
|
|
16
|
+
chainAvatarSize: number;
|
|
13
17
|
}>;
|
|
14
18
|
export declare const TokenAvatarBase: React.FC<{
|
|
15
19
|
token?: StaticToken;
|
|
16
20
|
chain?: Chain;
|
|
17
21
|
isLoading?: boolean;
|
|
18
22
|
sx?: SxProps<Theme>;
|
|
23
|
+
avatarSize: number;
|
|
24
|
+
badgeSize: number;
|
|
19
25
|
}>;
|
|
@@ -5,18 +5,18 @@ import { useToken } from '../../hooks/useToken.js';
|
|
|
5
5
|
import { AvatarBadgedSkeleton } from './Avatar.js';
|
|
6
6
|
import { AvatarDefaultBadge, AvatarMasked } from './Avatar.style.js';
|
|
7
7
|
import { SmallAvatar } from './SmallAvatar.js';
|
|
8
|
-
export const TokenAvatar = ({ token, chain, isLoading, sx }) => {
|
|
8
|
+
export const TokenAvatar = ({ token, chain, isLoading, sx, tokenAvatarSize = 40, chainAvatarSize = 16, }) => {
|
|
9
9
|
if (!chain || !token?.logoURI) {
|
|
10
|
-
return _jsx(TokenAvatarFallback, { token: token, isLoading: isLoading, sx: sx });
|
|
10
|
+
return (_jsx(TokenAvatarFallback, { token: token, isLoading: isLoading, sx: sx, tokenAvatarSize: tokenAvatarSize, chainAvatarSize: chainAvatarSize }));
|
|
11
11
|
}
|
|
12
|
-
return (_jsx(TokenAvatarBase, { token: token, chain: chain, isLoading: isLoading, sx: sx }));
|
|
12
|
+
return (_jsx(TokenAvatarBase, { token: token, chain: chain, isLoading: isLoading, sx: sx, avatarSize: tokenAvatarSize, badgeSize: chainAvatarSize }));
|
|
13
13
|
};
|
|
14
|
-
export const TokenAvatarFallback = ({ token, isLoading, sx }) => {
|
|
14
|
+
export const TokenAvatarFallback = ({ token, isLoading, sx, tokenAvatarSize, chainAvatarSize }) => {
|
|
15
15
|
const { chain } = useChain(token?.chainId);
|
|
16
16
|
const { token: chainToken, isLoading: isLoadingToken } = useToken(token?.chainId, token?.address);
|
|
17
|
-
return (_jsx(TokenAvatarBase, { token: chainToken ?? token, isLoading: isLoading || isLoadingToken, chain: chain, sx: sx }));
|
|
17
|
+
return (_jsx(TokenAvatarBase, { token: chainToken ?? token, isLoading: isLoading || isLoadingToken, chain: chain, sx: sx, avatarSize: tokenAvatarSize, badgeSize: chainAvatarSize }));
|
|
18
18
|
};
|
|
19
|
-
export const TokenAvatarBase = ({ token, chain, isLoading, sx }) => {
|
|
20
|
-
return isLoading ? (_jsx(AvatarBadgedSkeleton, {})) : (_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, {})), sx: sx, children: _jsx(AvatarMasked, { src: token?.logoURI, alt: token?.symbol, children: token?.symbol?.[0] }) }));
|
|
19
|
+
export const TokenAvatarBase = ({ token, chain, isLoading, sx, avatarSize, badgeSize }) => {
|
|
20
|
+
return isLoading ? (_jsx(AvatarBadgedSkeleton, { avatarSize: avatarSize, badgeSize: badgeSize })) : (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: chain ? (_jsx(SmallAvatar, { src: chain.logoURI, alt: chain.name, size: badgeSize, children: chain.name[0] })) : (_jsx(AvatarDefaultBadge, { size: badgeSize })), sx: sx, children: _jsx(AvatarMasked, { src: token?.logoURI, alt: token?.symbol, avatarSize: avatarSize, badgeSize: badgeSize, children: token?.symbol?.[0] }) }));
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=TokenAvatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenAvatar.js","sourceRoot":"","sources":["../../../../src/components/Avatar/TokenAvatar.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,CAAC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"TokenAvatar.js","source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
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Avatar mask for 16px badge
|
|
3
|
-
*/
|
|
4
|
-
export declare const avatarMask16 = "radial-gradient(circle 10.5px at calc(100% - 5.5px) calc(100% - 5.5px), #fff0 96%, #fff) 100% 100% / 100% 100% no-repeat";
|
|
5
|
-
/**
|
|
6
|
-
* Avatar mask for 12px badge
|
|
7
|
-
*/
|
|
8
|
-
export declare const avatarMask12 = "radial-gradient(circle 8.5px at calc(100% - 3.5px) calc(100% - 3.5px), #fff0 96%, #fff) 100% 100% / 100% 100% no-repeat";
|
|
1
|
+
export declare const getAvatarMask: (badgeSize: number) => string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Avatar mask for 12px badge
|
|
7
|
-
*/
|
|
8
|
-
export const avatarMask12 = 'radial-gradient(circle 8.5px at calc(100% - 3.5px) calc(100% - 3.5px), #fff0 96%, #fff) 100% 100% / 100% 100% no-repeat';
|
|
1
|
+
const borderWidthPx = 2.5;
|
|
2
|
+
// 14% is the right bottom offset of the MUI's badge (MuiBadge-badge class)
|
|
3
|
+
export const getAvatarMask = (badgeSize) => {
|
|
4
|
+
return `radial-gradient(circle ${badgeSize / 2 + borderWidthPx}px at calc(100% - 14%) calc(100% - 14%), #fff0 96%, #fff) 100% 100% / 100% 100% no-repeat`;
|
|
5
|
+
};
|
|
9
6
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/Avatar/utils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/Avatar/utils.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,GAAG,CAAA;AAEzB,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,EAAE;IACjD,OAAO,0BAA0B,SAAS,GAAG,CAAC,GAAG,aAAa,2FAA2F,CAAA;AAC3J,CAAC,CAAA"}
|
|
@@ -21,7 +21,12 @@ export const BaseTransactionButton = ({ onClick, text, disabled, loading, route,
|
|
|
21
21
|
walletConfig.onConnect();
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
|
|
24
|
+
if (missingChain) {
|
|
25
|
+
openWalletMenu({ chain: missingChain });
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
openWalletMenu();
|
|
29
|
+
}
|
|
25
30
|
}
|
|
26
31
|
};
|
|
27
32
|
const getButtonText = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTransactionButton.js","sourceRoot":"","sources":["../../../../src/components/BaseTransactionButton/BaseTransactionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGpE,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,KAAK,GACN,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAA;IAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAC1C,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;IACvC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,iCAAiC,CACnE,KAAK,EACL,KAAK,CACN,CAAA;IAED,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC7B,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,EAAE,EAAE,CAAA;QACb,CAAC;aAAM,IAAI,YAAY,EAAE,SAAS,EAAE,CAAC;YACnC,YAAY,CAAC,SAAS,EAAE,CAAA;QAC1B,CAAC;aAAM,CAAC;YACN,cAAc,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"BaseTransactionButton.js","sourceRoot":"","sources":["../../../../src/components/BaseTransactionButton/BaseTransactionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGpE,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,KAAK,GACN,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAA;IAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAC1C,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;IACvC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,iCAAiC,CACnE,KAAK,EACL,KAAK,CACN,CAAA;IAED,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC7B,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,EAAE,EAAE,CAAA;QACb,CAAC;aAAM,IAAI,YAAY,EAAE,SAAS,EAAE,CAAC;YACnC,YAAY,CAAC,SAAS,EAAE,CAAA;QAC1B,CAAC;aAAM,CAAC;YACN,IAAI,YAAY,EAAE,CAAC;gBACjB,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAA;YACzC,CAAC;iBAAM,CAAC;gBACN,cAAc,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;QACD,OAAO,YAAY;YACjB,CAAC,CAAC,CAAC,CAAC,2BAA2B,EAAE;gBAC7B,KAAK,EAAE,YAAY,CAAC,IAAI;aACzB,CAAC;YACJ,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAA;IAC/B,CAAC,CAAA;IAED,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,SAAS,IAAI,QAAQ,EAC/B,OAAO,EAAE,OAAO,EAChB,eAAe,EAAC,QAAQ,EACxB,SAAS,kBAER,aAAa,EAAE,GACT,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -8,4 +8,7 @@ export declare const WalletButton: import("@emotion/styled").StyledComponent<imp
|
|
|
8
8
|
}, {}, {}>;
|
|
9
9
|
export declare const DrawerWalletContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
10
|
export declare const HeaderControlsContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
|
-
export declare const WalletAvatar: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet" | "slots" | "slotProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
11
|
+
export declare const WalletAvatar: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet" | "slots" | "slotProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
12
|
+
avatarSize?: number;
|
|
13
|
+
badgeSize?: number;
|
|
14
|
+
}, {}, {}>;
|