@lifi/widget 2.0.0-beta.13 → 2.0.0-beta.14
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/AppDrawer.style.d.ts +1 -1
- package/cjs/AppDrawer.style.d.ts +1 -1
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
- package/cjs/components/Card/CardIconButton.d.ts +1 -1
- package/cjs/components/Header/Header.style.d.ts +1 -1
- package/cjs/components/Header/NavigationTabs.style.js +2 -2
- package/cjs/components/ListItemButton.d.ts +1 -1
- package/cjs/components/NFT/NFT.style.d.ts +1 -1
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/cjs/components/SmallAvatar.d.ts +1 -1
- package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
- package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/cjs/components/TokenList/TokenList.style.d.ts +4 -4
- package/cjs/components/TokenList/TokenList.style.js +11 -8
- package/cjs/components/TokenList/TokenListItem.js +3 -7
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/i18n/fr.json +24 -7
- package/cjs/i18n/ko.json +24 -7
- package/cjs/i18n/th.json +24 -7
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
- package/cjs/pages/SelectTokenPage/types.js +1 -1
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
- package/cjs/providers/SwapFormProvider/types.js +1 -1
- package/cjs/stores/routes/types.js +1 -1
- package/cjs/types/events.js +1 -1
- package/cjs/types/widget.js +3 -3
- package/cjs/utils/elements.js +1 -1
- package/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
- package/components/Card/CardIconButton.d.ts +1 -1
- package/components/Header/Header.style.d.ts +1 -1
- package/components/Header/NavigationTabs.style.js +2 -2
- package/components/ListItemButton.d.ts +1 -1
- package/components/NFT/NFT.style.d.ts +1 -1
- package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/components/SmallAvatar.d.ts +1 -1
- package/components/StepActions/StepActions.style.d.ts +1 -1
- package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/components/TokenList/TokenList.style.d.ts +4 -4
- package/components/TokenList/TokenList.style.js +11 -8
- package/components/TokenList/TokenListItem.js +4 -8
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/i18n/fr.json +24 -7
- package/i18n/ko.json +24 -7
- package/i18n/th.json +24 -7
- package/package.json +8 -8
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/cjs/i18n/th.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"button": {
|
|
3
3
|
"auto": "อัตโนมัติ",
|
|
4
|
+
"buy": "ซื้อ",
|
|
5
|
+
"buyNow": "ซื้อตอนนี้",
|
|
4
6
|
"cancel": "ยกเลิก",
|
|
5
7
|
"connectWallet": "เชื่อมต่อ กระเป๋า",
|
|
6
8
|
"contactSupport": "ติดต่อฝ่ายสนับสนุน",
|
|
@@ -23,6 +25,7 @@
|
|
|
23
25
|
"resetSettings": "รีเซ็ตการตั้งค่า",
|
|
24
26
|
"restartSwap": "เริ่มต้นการแลกเปลี่ยนใหม่",
|
|
25
27
|
"reviewGasSwap": "ตรวจสอบแก๊สในการแลกเปลี่ยน",
|
|
28
|
+
"reviewPurchase": "ตรวจสอบการสั่งซื้อ",
|
|
26
29
|
"reviewSwap": "ตรวจสอบการแลกเปลี่ยน",
|
|
27
30
|
"seeDetails": "ดูรายละเอียด",
|
|
28
31
|
"showAll": "แสดงทั้งหมด",
|
|
@@ -39,10 +42,14 @@
|
|
|
39
42
|
},
|
|
40
43
|
"header": {
|
|
41
44
|
"activeSwaps": "เปิดการใช้งาน การแลกเปลี่ยน",
|
|
45
|
+
"bridge": "บริดจ์",
|
|
42
46
|
"checkout": "เช็คเอาท์",
|
|
43
47
|
"from": "แลกเปลี่ยนจาก",
|
|
44
48
|
"gas": "แก็ส",
|
|
45
49
|
"gasSwap": "แก็สในการแลกเปลี่ยน",
|
|
50
|
+
"payWith": "ชำระด้วย",
|
|
51
|
+
"purchase": "ซื้อ",
|
|
52
|
+
"purchaseDetails": "รายละเอียดการซื้อ",
|
|
46
53
|
"routes": "คุณได้รับ",
|
|
47
54
|
"selectChain": "เลือกเชน",
|
|
48
55
|
"selectWallet": "เลือกกระเป๋าของคุณ",
|
|
@@ -75,6 +82,8 @@
|
|
|
75
82
|
"currentAmount": "จำนวนเงินปัจจุบัน",
|
|
76
83
|
"error": {
|
|
77
84
|
"message": {
|
|
85
|
+
"allowanceRequired": "โอนด้วยจำนวน {{tokenSymbol}} ตามการอนุญาตของคุณ.ได้โปรดเพิ่มการอนุญาตของคุณอีกครั้ง",
|
|
86
|
+
"insufficientFunds": "คุณมีแก็สไม่พอสำหรับการธุรกรรมนี้",
|
|
78
87
|
"slippageThreshold": "การคลาดเคลื่อนมีขนาดใหญ่กว่าเกณฑ์ที่กำหนด โปรดขอเส้นทางใหม่เพื่อได้รับการเสนอราคาใหม่.",
|
|
79
88
|
"transactionFailed": "โปรดตรวจสอบบล็อกการสำรวจสำหรับข้อมูลเพิ่มเติม.",
|
|
80
89
|
"transactionNotSent": "ไม่ได้ส่งธุรกรรม. {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} บน {{chainName}} ยังคงอยู่ในกระเป๋าเงินของคุณ.",
|
|
@@ -82,10 +91,12 @@
|
|
|
82
91
|
"unknown": "โปรดลองอีกครั้งหรือติดต่อฝ่ายสนับสนุน."
|
|
83
92
|
},
|
|
84
93
|
"title": {
|
|
94
|
+
"allowanceRequired": "การอนุญาตไม่เพียงพอ",
|
|
85
95
|
"balanceIsTooLow": "ยอดคงเหลือต่ำเกินไป",
|
|
86
96
|
"chainSwitch": "จำเป็นต้องเปลี่ยนเชน",
|
|
87
97
|
"failed": "การแลกเปลี่ยนล้มเหลว",
|
|
88
98
|
"gasLimitIsTooLow": "แก๊สคงเหลือต่ำเกินไป",
|
|
99
|
+
"insufficientFunds": "ยอดคงเหลือไม่เพียงพอ",
|
|
89
100
|
"slippageNotMet": "ความคลาดเคลื่อนของราคาไม่เป็นไปตามเงื่อนไข.",
|
|
90
101
|
"transactionCanceled": "ธุรกรรมถูกยกเลิกแล้ว",
|
|
91
102
|
"transactionFailed": "การทำธุรกรรมล้มเหลว",
|
|
@@ -108,8 +119,8 @@
|
|
|
108
119
|
"inProgress": "กำลังดำเนินการ",
|
|
109
120
|
"insurance": {
|
|
110
121
|
"bridgeExploits": "การบริดจ์ทำงานผิดปกติ แฮ็กหรือหาผลประโยชน์",
|
|
111
|
-
"insure": "
|
|
112
|
-
"insured": "
|
|
122
|
+
"insure": "ประกัน<strong>{{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}}</strong> ในการขนส่ง",
|
|
123
|
+
"insured": "คุณได้ประกัน<strong>{{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}}</strong> ในการขนส่ง",
|
|
113
124
|
"slippageError": "เกิดข้อผิดพลาดในการคลาดเคลื่อนของโทเค็นที่ได้รับ"
|
|
114
125
|
},
|
|
115
126
|
"info": {
|
|
@@ -131,7 +142,6 @@
|
|
|
131
142
|
"onChain": "บน {{chainName}}",
|
|
132
143
|
"otherTokens": "โทเค็นอื่น",
|
|
133
144
|
"ownedBy": "เป็นเจ้าของโดย",
|
|
134
|
-
"payWith": "ชำระด้วย",
|
|
135
145
|
"process": {
|
|
136
146
|
"crossChain": {
|
|
137
147
|
"actionRequired": "กรุณาเซ็นชื่อในการทำธุรกรรม",
|
|
@@ -139,6 +149,9 @@
|
|
|
139
149
|
"pending": "รอสำหรับการทำรายการบริดจ์",
|
|
140
150
|
"started": "เตรียมการทำรายการบริดจ์"
|
|
141
151
|
},
|
|
152
|
+
"nft": {
|
|
153
|
+
"done": "ซื้อ NFT แล้ว"
|
|
154
|
+
},
|
|
142
155
|
"receivingChain": {
|
|
143
156
|
"done": "ข้ามเชนเสร็จสมบูรณ์",
|
|
144
157
|
"partial": "การข้ามเชนเสร็จสมบูรณ์บางส่วน",
|
|
@@ -165,24 +178,27 @@
|
|
|
165
178
|
"rateChange": "อัตราแลกเปลี่ยน",
|
|
166
179
|
"receiving": "ได้รับ",
|
|
167
180
|
"refuelStepDetails": "รับแก๊สผ่าน {{tool}}",
|
|
168
|
-
"
|
|
169
|
-
"selectChain": "เชน",
|
|
181
|
+
"selectChain": "เลือกเชน",
|
|
170
182
|
"selectChainAndToken": "เลือกเชนและโทเค็น",
|
|
171
|
-
"selectToken": "
|
|
183
|
+
"selectToken": "เลือกโทเคน",
|
|
172
184
|
"sendToAddress": "ส่งไปยัง {{address}}",
|
|
173
185
|
"sendToWallet": "ส่งไปยังกระเป๋าเงินอื่น",
|
|
174
186
|
"sentToAddress": "ส่งไปยัง {{address}}",
|
|
175
187
|
"stepBridge": "บริดจ์",
|
|
188
|
+
"stepBridgeAndBuy": "บริดจ์และซื้อ",
|
|
176
189
|
"stepDetails": "{{tool}} โดย LI.FI",
|
|
177
190
|
"stepSwap": "แลกเปลี่ยน",
|
|
178
191
|
"stepSwapAndBridge": "แลกเปลี่ยนและบริดจ์",
|
|
192
|
+
"stepSwapAndBuy": "แลกเปลี่ยน และ ซื้อ",
|
|
179
193
|
"success": {
|
|
180
194
|
"message": {
|
|
181
195
|
"swapPartiallySuccessful": "เราได้พยายามดำเนินการแลกเปลี่ยนให้เสร็จสมบูรณ์แต่ {{tool}} ขาดสภาพคล่องสำหรับโทเค็น {{tokenSymbol}}",
|
|
196
|
+
"purchaseSuccessful": "คุณมี {{assetName}} ใน{{walletAddress}} กระเป๋า บน{{chainName}} เครือข่าย",
|
|
182
197
|
"swapSuccessful": "ตอนนี้มี {{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}} ใน {{walletAddress}} กระเป๋าบน {{chainName}} เชน."
|
|
183
198
|
},
|
|
184
199
|
"title": {
|
|
185
200
|
"gasSwapSuccessful": "แลกเปลี่ยนแก็สสำเร็จ",
|
|
201
|
+
"purchaseSuccessful": "การซื้อเสร็จสมบูรณ์",
|
|
186
202
|
"refundIssued": "คืนเงินแล้ว",
|
|
187
203
|
"swapPartiallySuccessful": "แลกเปลี่ยนสำเร็จบางส่วน",
|
|
188
204
|
"swapSuccessful": "แลกเปลี่ยนสำเร็จ"
|
|
@@ -203,7 +219,7 @@
|
|
|
203
219
|
"to": "ถึง",
|
|
204
220
|
"tokenOnChain": "{{tokenSymbol}} บน {{chainName}}",
|
|
205
221
|
"tokenOnChainAmount": "{{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}} บน {{chainName}}",
|
|
206
|
-
"tokenSearch": "
|
|
222
|
+
"tokenSearch": "ค้นหาชื่อของเหรียญ หรือ ที่อยู่",
|
|
207
223
|
"valueLoss": "มูลค่าที่สูญเสีย",
|
|
208
224
|
"walletAddressOrEns": "ที่อยู่กระเป๋าหรือชื่อENS",
|
|
209
225
|
"warning": {
|
|
@@ -237,6 +253,7 @@
|
|
|
237
253
|
},
|
|
238
254
|
"numberOfSteps": "ขั้นตอนการแลกเปลี่ยนหลายขั้นตอน แต่ละขั้นตอนสามารถมี 1-2 รายการที่ต้องใช้ลายเซ็น.",
|
|
239
255
|
"progressToNextUpdate": "ข้อมูลที่แสดงจะรีเฟรชอัตโนมัติหลังจาก {{value}} วินาที คลิกที่นี่เพื่ออัปเดตด้วยตนเอง",
|
|
256
|
+
"recommended": "เส้นทางที่ถูกมียอดคงเหลือที่เพียงพอและง่ายต่องการใช้งาน",
|
|
240
257
|
"settingsModified": "การตั้งค่า (แก้ไข)"
|
|
241
258
|
},
|
|
242
259
|
"wallet": {
|
|
@@ -17,4 +17,4 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -5,4 +5,4 @@ var TokenFilterType;
|
|
|
5
5
|
(function (TokenFilterType) {
|
|
6
6
|
TokenFilterType[TokenFilterType["My"] = 0] = "My";
|
|
7
7
|
TokenFilterType[TokenFilterType["All"] = 1] = "All";
|
|
8
|
-
})(TokenFilterType
|
|
8
|
+
})(TokenFilterType || (exports.TokenFilterType = TokenFilterType = {}));
|
|
@@ -9,7 +9,7 @@ export declare const ToggleButton: import("@emotion/styled").StyledComponent<{
|
|
|
9
9
|
onChange?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
|
|
10
10
|
onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
|
|
11
11
|
selected?: boolean | undefined;
|
|
12
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "
|
|
12
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").ToggleButtonPropsSizeOverrides> | undefined;
|
|
13
13
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
14
14
|
value: {};
|
|
15
15
|
} & Omit<{
|
|
@@ -17,5 +17,5 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
21
|
export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -15,7 +15,7 @@ var SwapFormKey;
|
|
|
15
15
|
SwapFormKey["ToContractGasLimit"] = "ToContractGasLimit";
|
|
16
16
|
SwapFormKey["ToToken"] = "toToken";
|
|
17
17
|
SwapFormKey["TokenSearchFilter"] = "tokenSearchFilter";
|
|
18
|
-
})(SwapFormKey
|
|
18
|
+
})(SwapFormKey || (exports.SwapFormKey = SwapFormKey = {}));
|
|
19
19
|
exports.SwapFormKeyHelper = {
|
|
20
20
|
getChainKey: (formType) => `${formType}Chain`,
|
|
21
21
|
getTokenKey: (formType) => `${formType}Token`,
|
|
@@ -9,4 +9,4 @@ var RouteExecutionStatus;
|
|
|
9
9
|
RouteExecutionStatus[RouteExecutionStatus["Failed"] = 4] = "Failed";
|
|
10
10
|
RouteExecutionStatus[RouteExecutionStatus["Partial"] = 8] = "Partial";
|
|
11
11
|
RouteExecutionStatus[RouteExecutionStatus["Refunded"] = 16] = "Refunded";
|
|
12
|
-
})(RouteExecutionStatus
|
|
12
|
+
})(RouteExecutionStatus || (exports.RouteExecutionStatus = RouteExecutionStatus = {}));
|
package/cjs/types/events.js
CHANGED
|
@@ -8,4 +8,4 @@ var WidgetEvent;
|
|
|
8
8
|
WidgetEvent["RouteExecutionCompleted"] = "routeExecutionCompleted";
|
|
9
9
|
WidgetEvent["RouteExecutionFailed"] = "routeExecutionFailed";
|
|
10
10
|
WidgetEvent["RouteHighValueLoss"] = "routeHighValueLoss";
|
|
11
|
-
})(WidgetEvent
|
|
11
|
+
})(WidgetEvent || (exports.WidgetEvent = WidgetEvent = {}));
|
package/cjs/types/widget.js
CHANGED
|
@@ -7,7 +7,7 @@ var DisabledUI;
|
|
|
7
7
|
DisabledUI["FromToken"] = "fromToken";
|
|
8
8
|
DisabledUI["ToAddress"] = "toAddress";
|
|
9
9
|
DisabledUI["ToToken"] = "toToken";
|
|
10
|
-
})(DisabledUI
|
|
10
|
+
})(DisabledUI || (exports.DisabledUI = DisabledUI = {}));
|
|
11
11
|
var HiddenUI;
|
|
12
12
|
(function (HiddenUI) {
|
|
13
13
|
HiddenUI["Appearance"] = "appearance";
|
|
@@ -18,8 +18,8 @@ var HiddenUI;
|
|
|
18
18
|
HiddenUI["ToAddress"] = "toAddress";
|
|
19
19
|
HiddenUI["ToToken"] = "toToken";
|
|
20
20
|
HiddenUI["WalletMenu"] = "walletMenu";
|
|
21
|
-
})(HiddenUI
|
|
21
|
+
})(HiddenUI || (exports.HiddenUI = HiddenUI = {}));
|
|
22
22
|
var RequiredUI;
|
|
23
23
|
(function (RequiredUI) {
|
|
24
24
|
RequiredUI["ToAddress"] = "toAddress";
|
|
25
|
-
})(RequiredUI
|
|
25
|
+
})(RequiredUI || (exports.RequiredUI = RequiredUI = {}));
|
package/cjs/utils/elements.js
CHANGED
|
@@ -5,6 +5,6 @@ var ElementId;
|
|
|
5
5
|
(function (ElementId) {
|
|
6
6
|
ElementId["ScrollableContainer"] = "widget-scrollable-container";
|
|
7
7
|
ElementId["Header"] = "widget-header";
|
|
8
|
-
})(ElementId
|
|
8
|
+
})(ElementId || (exports.ElementId = ElementId = {}));
|
|
9
9
|
const createElementId = (ElementId, elementId) => `${ElementId}-${elementId}`;
|
|
10
10
|
exports.createElementId = createElementId;
|
|
@@ -17,7 +17,7 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
21
|
export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
22
22
|
button?: false | undefined;
|
|
23
23
|
} & import("@mui/material").ListItemBaseProps & {
|
|
@@ -35,7 +35,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
|
35
35
|
} | undefined;
|
|
36
36
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
37
37
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
38
|
-
}, "button" | "className" | "style" | "classes" | "autoFocus" | "children" | "disabled" | "sx" | "alignItems" | "
|
|
38
|
+
}, "button" | "className" | "style" | "classes" | "autoFocus" | "children" | "disabled" | "sx" | "alignItems" | "divider" | "components" | "dense" | "slotProps" | "slots" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
39
39
|
export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
|
|
40
40
|
children?: import("react").ReactNode;
|
|
41
41
|
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
@@ -46,7 +46,7 @@ export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
|
|
|
46
46
|
endIcon?: import("react").ReactNode;
|
|
47
47
|
fullWidth?: boolean | undefined;
|
|
48
48
|
href?: string | undefined;
|
|
49
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "
|
|
49
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").ButtonPropsSizeOverrides> | undefined;
|
|
50
50
|
startIcon?: import("react").ReactNode;
|
|
51
51
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
52
52
|
variant?: import("@mui/types").OverridableStringUnion<"text" | "outlined" | "contained", import("@mui/material").ButtonPropsVariantOverrides> | undefined;
|
|
@@ -6,7 +6,7 @@ export declare const CardIconButton: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
edge?: false | "end" | "start" | undefined;
|
|
9
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "
|
|
9
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").IconButtonPropsSizeOverrides> | undefined;
|
|
10
10
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
11
11
|
} & Omit<{
|
|
12
12
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const WalletButton: import("@emotion/styled").StyledComponent<{
|
|
|
35
35
|
endIcon?: import("react").ReactNode;
|
|
36
36
|
fullWidth?: boolean | undefined;
|
|
37
37
|
href?: string | undefined;
|
|
38
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "
|
|
38
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").ButtonPropsSizeOverrides> | undefined;
|
|
39
39
|
startIcon?: import("react").ReactNode;
|
|
40
40
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
41
41
|
variant?: import("@mui/types").OverridableStringUnion<"text" | "outlined" | "contained", import("@mui/material").ButtonPropsVariantOverrides> | undefined;
|
|
@@ -2,7 +2,7 @@ import { Tab, Tabs, tabClasses, tabsClasses } from '@mui/material';
|
|
|
2
2
|
import { alpha, styled } from '@mui/material/styles';
|
|
3
3
|
export const NavbarTabs = styled(Tabs)(({ theme }) => ({
|
|
4
4
|
backgroundColor: theme.palette.mode === 'dark'
|
|
5
|
-
? theme.palette.
|
|
5
|
+
? theme.palette.background.paper
|
|
6
6
|
: alpha(theme.palette.common.black, 0.04),
|
|
7
7
|
borderRadius: Math.max(theme.shape.borderRadius, theme.shape.borderRadiusSecondary),
|
|
8
8
|
padding: theme.spacing(0.5),
|
|
@@ -22,7 +22,7 @@ export const NavbarTabs = styled(Tabs)(({ theme }) => ({
|
|
|
22
22
|
transform: 'translateY(-50%)',
|
|
23
23
|
height: 48,
|
|
24
24
|
backgroundColor: theme.palette.mode === 'dark'
|
|
25
|
-
? theme.palette.
|
|
25
|
+
? theme.palette.background.default
|
|
26
26
|
: theme.palette.common.white,
|
|
27
27
|
borderRadius: theme.shape.borderRadiusSecondary,
|
|
28
28
|
boxShadow: `0px 2px 4px ${alpha(theme.palette.common.black, 0.04)}`,
|
|
@@ -17,4 +17,4 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -10,7 +10,7 @@ export declare const PreviewAvatar: import("@emotion/styled").StyledComponent<{
|
|
|
10
10
|
src?: string | undefined;
|
|
11
11
|
srcSet?: string | undefined;
|
|
12
12
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
13
|
-
variant?: import("@mui/types").OverridableStringUnion<"
|
|
13
|
+
variant?: import("@mui/types").OverridableStringUnion<"circular" | "rounded" | "square", import("@mui/material").AvatarPropsVariantOverrides> | undefined;
|
|
14
14
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
15
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
16
16
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -6,7 +6,7 @@ export declare const IconButton: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
edge?: false | "end" | "start" | undefined;
|
|
9
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "
|
|
9
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").IconButtonPropsSizeOverrides> | undefined;
|
|
10
10
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
11
11
|
} & Omit<{
|
|
12
12
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
@@ -10,7 +10,7 @@ export declare const SmallAvatar: import("@emotion/styled").StyledComponent<{
|
|
|
10
10
|
src?: string | undefined;
|
|
11
11
|
srcSet?: string | undefined;
|
|
12
12
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
13
|
-
variant?: import("@mui/types").OverridableStringUnion<"
|
|
13
|
+
variant?: import("@mui/types").OverridableStringUnion<"circular" | "rounded" | "square", import("@mui/material").AvatarPropsVariantOverrides> | undefined;
|
|
14
14
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
15
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
16
16
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -14,7 +14,7 @@ export declare const StepAvatar: import("@emotion/styled").StyledComponent<{
|
|
|
14
14
|
src?: string | undefined;
|
|
15
15
|
srcSet?: string | undefined;
|
|
16
16
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
17
|
-
variant?: import("@mui/types").OverridableStringUnion<"
|
|
17
|
+
variant?: import("@mui/types").OverridableStringUnion<"circular" | "rounded" | "square", import("@mui/material").AvatarPropsVariantOverrides> | undefined;
|
|
18
18
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
20
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -9,7 +9,7 @@ export declare const Button: import("@emotion/styled").StyledComponent<{
|
|
|
9
9
|
endIcon?: import("react").ReactNode;
|
|
10
10
|
fullWidth?: boolean | undefined;
|
|
11
11
|
href?: string | undefined;
|
|
12
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "
|
|
12
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").ButtonPropsSizeOverrides> | undefined;
|
|
13
13
|
startIcon?: import("react").ReactNode;
|
|
14
14
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
15
|
variant?: import("@mui/types").OverridableStringUnion<"text" | "outlined" | "contained", import("@mui/material").ButtonPropsVariantOverrides> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { StyledComponent } from '@emotion/styled';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IconButtonProps, LinkProps } from '@mui/material';
|
|
4
4
|
export declare const ListItemButton: StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
5
5
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
6
6
|
centerRipple?: boolean | undefined;
|
|
@@ -19,7 +19,7 @@ export declare const ListItemButton: StyledComponent<import("@mui/material").Lis
|
|
|
19
19
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
20
20
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
21
21
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
22
|
-
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
22
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
23
23
|
export declare const ListItem: StyledComponent<{
|
|
24
24
|
button?: false | undefined;
|
|
25
25
|
} & import("@mui/material").ListItemBaseProps & {
|
|
@@ -37,5 +37,5 @@ export declare const ListItem: StyledComponent<{
|
|
|
37
37
|
} | undefined;
|
|
38
38
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
39
39
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
40
|
-
}, "button" | "className" | "style" | "classes" | "autoFocus" | "children" | "disabled" | "sx" | "alignItems" | "
|
|
41
|
-
export declare const
|
|
40
|
+
}, "button" | "className" | "style" | "classes" | "autoFocus" | "children" | "disabled" | "sx" | "alignItems" | "divider" | "components" | "dense" | "slotProps" | "slots" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
41
|
+
export declare const IconButton: StyledComponent<IconButtonProps & LinkProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconButton as MuiIconButton, ListItem as MuiListItem, } from '@mui/material';
|
|
2
2
|
import { listItemSecondaryActionClasses } from '@mui/material/ListItemSecondaryAction';
|
|
3
3
|
import { listItemTextClasses } from '@mui/material/ListItemText';
|
|
4
4
|
import { alpha, styled } from '@mui/material/styles';
|
|
@@ -20,28 +20,31 @@ export const ListItem = styled(MuiListItem)(({ theme }) => ({
|
|
|
20
20
|
[`.${listItemSecondaryActionClasses.root}`]: {
|
|
21
21
|
right: theme.spacing(3),
|
|
22
22
|
},
|
|
23
|
+
[`& .${listItemTextClasses.primary}`]: {
|
|
24
|
+
height: 22,
|
|
25
|
+
},
|
|
23
26
|
[`& .${listItemTextClasses.primary}, & .${listItemTextClasses.secondary}`]: {
|
|
24
27
|
textOverflow: 'ellipsis',
|
|
25
28
|
overflow: 'hidden',
|
|
26
29
|
whiteSpace: 'nowrap',
|
|
27
30
|
},
|
|
28
31
|
}));
|
|
29
|
-
export const
|
|
32
|
+
export const IconButton = styled(MuiIconButton)(({ theme }) => ({
|
|
30
33
|
lineHeight: 1,
|
|
31
34
|
fontSize: '0.75rem',
|
|
32
35
|
fontWeight: 400,
|
|
33
|
-
padding: theme.spacing(0.375, 0.
|
|
36
|
+
padding: theme.spacing(0.375, 0.375),
|
|
37
|
+
marginLeft: theme.spacing(0.25),
|
|
34
38
|
color: 'inherit',
|
|
35
39
|
backgroundColor: 'unset',
|
|
40
|
+
minWidth: 'unset',
|
|
41
|
+
borderRadius: '50%',
|
|
36
42
|
'&:hover': {
|
|
37
43
|
backgroundColor: theme.palette.mode === 'light'
|
|
38
44
|
? alpha(theme.palette.common.black, 0.04)
|
|
39
45
|
: alpha(theme.palette.common.white, 0.08),
|
|
40
46
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
[`.${buttonClasses.endIcon} > *:nth-of-type(1)`]: {
|
|
45
|
-
fontSize: '0.75rem',
|
|
47
|
+
svg: {
|
|
48
|
+
fontSize: '0.875rem',
|
|
46
49
|
},
|
|
47
50
|
}));
|
|
@@ -4,7 +4,7 @@ import { Avatar, Box, Link, ListItemAvatar, ListItemText, Skeleton, Slide, Typog
|
|
|
4
4
|
import { memo, useRef, useState } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { formatTokenAmount, formatTokenPrice, shortenAddress, } from '../../utils';
|
|
7
|
-
import {
|
|
7
|
+
import { IconButton, ListItem, ListItemButton } from './TokenList.style';
|
|
8
8
|
export const TokenListItem = memo(({ onClick, size, start, token, chain, showBalance, isBalanceLoading, startAdornment, endAdornment, }) => {
|
|
9
9
|
const handleClick = () => onClick?.(token.address);
|
|
10
10
|
return (_jsxs(ListItem, { disablePadding: true, style: {
|
|
@@ -29,15 +29,11 @@ export const TokenListItemButton = ({ onClick, token, chain, showBalance, isBala
|
|
|
29
29
|
};
|
|
30
30
|
return (_jsxs(ListItemButton, { onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, dense: true, children: [_jsx(ListItemAvatar, { children: _jsx(Avatar, { src: token.logoURI, alt: token.symbol, children: token.symbol?.[0] }) }), _jsx(ListItemText, { primary: token.symbol, secondaryTypographyProps: {
|
|
31
31
|
component: 'div',
|
|
32
|
-
|
|
33
|
-
overflow: 'auto',
|
|
34
|
-
marginLeft: -0.75,
|
|
35
|
-
},
|
|
36
|
-
}, secondary: _jsxs(Box, { position: "relative", height: 18, ref: container, children: [_jsx(Slide, { direction: "down", in: !showAddress, container: container.current, style: {
|
|
32
|
+
}, secondary: _jsxs(Box, { position: "relative", height: 20, ref: container, children: [_jsx(Slide, { direction: "down", in: !showAddress, container: container.current, style: {
|
|
37
33
|
position: 'absolute',
|
|
38
|
-
}, appear: false, children: _jsx(Box, {
|
|
34
|
+
}, appear: false, children: _jsx(Box, { pt: 0.25, children: token.name }) }), _jsx(Slide, { direction: "up", in: showAddress, container: container.current, style: {
|
|
39
35
|
position: 'absolute',
|
|
40
|
-
}, appear: false, mountOnEnter: true, children: _jsx(
|
|
36
|
+
}, appear: false, mountOnEnter: true, children: _jsxs(Box, { display: "flex", children: [_jsx(Box, { display: "flex", alignItems: "center", pt: 0.125, children: shortenAddress(token.address) }), _jsx(IconButton, { size: "small", LinkComponent: Link, href: `${chain?.metamask.blockExplorerUrls[0]}address/${token.address}`, target: "_blank", rel: "nofollow noreferrer", onClick: (e) => e.stopPropagation(), children: _jsx(OpenInNewIcon, {}) })] }) })] }) }), showBalance ? (isBalanceLoading ? (_jsx(TokenAmountSkeleton, {})) : (_jsxs(Box, { sx: { textAlign: 'right' }, children: [Number(token.amount) ? (_jsx(Typography, { variant: "body1", noWrap: true, children: t('format.number', {
|
|
41
37
|
value: formatTokenAmount(token.amount),
|
|
42
38
|
}) })) : null, tokenPrice ? (_jsx(Typography, { fontWeight: 400, fontSize: 12, color: "text.secondary", "data-price": token.priceUSD, children: t(`format.currency`, {
|
|
43
39
|
value: tokenPrice,
|
package/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "2.0.0-beta.
|
|
2
|
+
export declare const version = "2.0.0-beta.14";
|
package/config/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/widget';
|
|
2
|
-
export const version = '2.0.0-beta.
|
|
2
|
+
export const version = '2.0.0-beta.14';
|