@lifi/widget 1.27.1 → 1.28.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.
Files changed (221) hide show
  1. package/AppDrawer.style.d.ts +1 -1
  2. package/AppRoutes.js +15 -33
  3. package/README.md +1 -1
  4. package/cjs/AppDrawer.style.d.ts +1 -1
  5. package/cjs/AppRoutes.js +15 -33
  6. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  7. package/cjs/components/Card/Card.d.ts +1 -1
  8. package/cjs/components/ChainSelect/ChainSelect.style.d.ts +1 -1
  9. package/cjs/components/ContractComponent/ContractComponent.d.ts +3 -0
  10. package/cjs/components/ContractComponent/ContractComponent.js +14 -0
  11. package/cjs/components/ContractComponent/index.d.ts +1 -0
  12. package/cjs/components/ContractComponent/index.js +17 -0
  13. package/cjs/components/Header/Header.style.d.ts +2 -2
  14. package/cjs/components/Header/NavigationHeader.js +10 -2
  15. package/cjs/components/Header/WalletHeader.js +1 -1
  16. package/cjs/components/NFT/NFT.d.ts +4 -0
  17. package/cjs/components/NFT/NFT.js +41 -0
  18. package/cjs/components/NFT/NFT.style.d.ts +16 -0
  19. package/cjs/components/NFT/NFT.style.js +11 -0
  20. package/cjs/components/NFT/index.d.ts +2 -0
  21. package/cjs/components/NFT/index.js +18 -0
  22. package/cjs/components/NFT/types.d.ts +15 -0
  23. package/cjs/components/NFT/types.js +2 -0
  24. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  25. package/cjs/components/Select.d.ts +1 -1
  26. package/cjs/components/SelectChainAndToken.js +12 -2
  27. package/cjs/components/SelectTokenButton/SelectTokenButton.js +5 -2
  28. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  29. package/cjs/components/SmallAvatar.d.ts +1 -1
  30. package/cjs/components/Step/StepProcess.style.d.ts +1 -1
  31. package/cjs/components/StepActions/StepActions.d.ts +6 -7
  32. package/cjs/components/StepActions/StepActions.js +41 -12
  33. package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
  34. package/cjs/components/StepActions/types.d.ts +5 -0
  35. package/cjs/components/SwapInput/SwapInput.d.ts +2 -1
  36. package/cjs/components/SwapInput/SwapInput.js +15 -3
  37. package/cjs/components/SwapInput/SwapInput.style.d.ts +1 -1
  38. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  39. package/cjs/components/SwapRouteCard/SwapRouteCard.js +3 -1
  40. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  41. package/cjs/components/Token/Token.d.ts +1 -1
  42. package/cjs/components/Token/Token.js +12 -12
  43. package/cjs/components/TokenAvatar/TokenAvatar.d.ts +5 -3
  44. package/cjs/components/TokenAvatar/TokenAvatar.js +10 -9
  45. package/cjs/components/TokenList/TokenList.style.js +6 -0
  46. package/cjs/components/TokenList/VirtualizedTokenList.js +4 -2
  47. package/cjs/config/theme.js +3 -5
  48. package/cjs/config/version.d.ts +1 -1
  49. package/cjs/config/version.js +1 -1
  50. package/cjs/hooks/useSwapRoutes.d.ts +5 -2
  51. package/cjs/hooks/useSwapRoutes.js +64 -14
  52. package/cjs/hooks/useToken.d.ts +1 -1
  53. package/cjs/hooks/useTokenSearch.d.ts +1 -1
  54. package/cjs/i18n/de.json +214 -214
  55. package/cjs/i18n/en.json +218 -214
  56. package/cjs/i18n/es.json +191 -191
  57. package/cjs/i18n/fr.json +214 -214
  58. package/cjs/i18n/it.json +214 -214
  59. package/cjs/i18n/uk.json +214 -214
  60. package/cjs/i18n/zh.json +214 -214
  61. package/cjs/index.d.ts +2 -0
  62. package/cjs/index.js +4 -1
  63. package/cjs/pages/MainPage/MainPage.js +5 -1
  64. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  65. package/cjs/pages/SettingsPage/LanguageSelect.js +1 -2
  66. package/cjs/providers/SwapFormProvider/types.d.ts +10 -0
  67. package/cjs/providers/SwapFormProvider/types.js +5 -0
  68. package/cjs/stores/chains/useChainOrderStore.d.ts +1 -1
  69. package/cjs/stores/routes/useRouteExecutionStore.d.ts +1 -1
  70. package/cjs/stores/settings/useSettingsStore.d.ts +1 -1
  71. package/cjs/types/widget.d.ts +12 -6
  72. package/cjs/types/widget.js +2 -0
  73. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  74. package/components/Card/Card.d.ts +1 -1
  75. package/components/ChainSelect/ChainSelect.style.d.ts +1 -1
  76. package/components/ContractComponent/ContractComponent.d.ts +3 -0
  77. package/components/ContractComponent/ContractComponent.js +10 -0
  78. package/components/ContractComponent/index.d.ts +1 -0
  79. package/components/ContractComponent/index.js +1 -0
  80. package/components/Header/Header.style.d.ts +2 -2
  81. package/components/Header/NavigationHeader.js +12 -4
  82. package/components/Header/WalletHeader.js +1 -1
  83. package/components/NFT/NFT.d.ts +4 -0
  84. package/components/NFT/NFT.js +37 -0
  85. package/components/NFT/NFT.style.d.ts +16 -0
  86. package/components/NFT/NFT.style.js +8 -0
  87. package/components/NFT/index.d.ts +2 -0
  88. package/components/NFT/index.js +2 -0
  89. package/components/NFT/types.d.ts +15 -0
  90. package/components/NFT/types.js +1 -0
  91. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  92. package/components/Select.d.ts +1 -1
  93. package/components/SelectChainAndToken.js +12 -2
  94. package/components/SelectTokenButton/SelectTokenButton.js +5 -2
  95. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  96. package/components/SmallAvatar.d.ts +1 -1
  97. package/components/Step/StepProcess.style.d.ts +1 -1
  98. package/components/StepActions/StepActions.d.ts +6 -7
  99. package/components/StepActions/StepActions.js +40 -12
  100. package/components/StepActions/StepActions.style.d.ts +1 -1
  101. package/components/StepActions/types.d.ts +5 -0
  102. package/components/SwapInput/SwapInput.d.ts +2 -1
  103. package/components/SwapInput/SwapInput.js +15 -3
  104. package/components/SwapInput/SwapInput.style.d.ts +1 -1
  105. package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  106. package/components/SwapRouteCard/SwapRouteCard.js +3 -1
  107. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  108. package/components/Token/Token.d.ts +1 -1
  109. package/components/Token/Token.js +13 -13
  110. package/components/TokenAvatar/TokenAvatar.d.ts +5 -3
  111. package/components/TokenAvatar/TokenAvatar.js +10 -9
  112. package/components/TokenList/TokenList.style.js +6 -0
  113. package/components/TokenList/VirtualizedTokenList.js +4 -2
  114. package/config/theme.js +3 -5
  115. package/config/version.d.ts +1 -1
  116. package/config/version.js +1 -1
  117. package/hooks/useSwapRoutes.d.ts +5 -2
  118. package/hooks/useSwapRoutes.js +64 -14
  119. package/hooks/useToken.d.ts +1 -1
  120. package/hooks/useTokenSearch.d.ts +1 -1
  121. package/i18n/de.json +214 -214
  122. package/i18n/en.json +218 -214
  123. package/i18n/es.json +191 -191
  124. package/i18n/fr.json +214 -214
  125. package/i18n/it.json +214 -214
  126. package/i18n/uk.json +214 -214
  127. package/i18n/zh.json +214 -214
  128. package/index.d.ts +2 -0
  129. package/index.js +2 -0
  130. package/package.json +15 -13
  131. package/pages/MainPage/MainPage.js +5 -1
  132. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  133. package/pages/SettingsPage/LanguageSelect.js +1 -2
  134. package/providers/SwapFormProvider/types.d.ts +10 -0
  135. package/providers/SwapFormProvider/types.js +5 -0
  136. package/stores/chains/useChainOrderStore.d.ts +1 -1
  137. package/stores/routes/useRouteExecutionStore.d.ts +1 -1
  138. package/stores/settings/useSettingsStore.d.ts +1 -1
  139. package/tsconfig.cjs.tsbuildinfo +1 -1
  140. package/types/widget.d.ts +12 -6
  141. package/types/widget.js +2 -0
  142. package/cjs/fonts/Inter-Black.woff +0 -0
  143. package/cjs/fonts/Inter-Black.woff2 +0 -0
  144. package/cjs/fonts/Inter-BlackItalic.woff +0 -0
  145. package/cjs/fonts/Inter-BlackItalic.woff2 +0 -0
  146. package/cjs/fonts/Inter-Bold.woff +0 -0
  147. package/cjs/fonts/Inter-Bold.woff2 +0 -0
  148. package/cjs/fonts/Inter-BoldItalic.woff +0 -0
  149. package/cjs/fonts/Inter-BoldItalic.woff2 +0 -0
  150. package/cjs/fonts/Inter-ExtraBold.woff +0 -0
  151. package/cjs/fonts/Inter-ExtraBold.woff2 +0 -0
  152. package/cjs/fonts/Inter-ExtraBoldItalic.woff +0 -0
  153. package/cjs/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
  154. package/cjs/fonts/Inter-ExtraLight.woff +0 -0
  155. package/cjs/fonts/Inter-ExtraLight.woff2 +0 -0
  156. package/cjs/fonts/Inter-ExtraLightItalic.woff +0 -0
  157. package/cjs/fonts/Inter-ExtraLightItalic.woff2 +0 -0
  158. package/cjs/fonts/Inter-Italic.woff +0 -0
  159. package/cjs/fonts/Inter-Italic.woff2 +0 -0
  160. package/cjs/fonts/Inter-Light.woff +0 -0
  161. package/cjs/fonts/Inter-Light.woff2 +0 -0
  162. package/cjs/fonts/Inter-LightItalic.woff +0 -0
  163. package/cjs/fonts/Inter-LightItalic.woff2 +0 -0
  164. package/cjs/fonts/Inter-Medium.woff +0 -0
  165. package/cjs/fonts/Inter-Medium.woff2 +0 -0
  166. package/cjs/fonts/Inter-MediumItalic.woff +0 -0
  167. package/cjs/fonts/Inter-MediumItalic.woff2 +0 -0
  168. package/cjs/fonts/Inter-Regular.woff +0 -0
  169. package/cjs/fonts/Inter-Regular.woff2 +0 -0
  170. package/cjs/fonts/Inter-SemiBold.woff +0 -0
  171. package/cjs/fonts/Inter-SemiBold.woff2 +0 -0
  172. package/cjs/fonts/Inter-SemiBoldItalic.woff +0 -0
  173. package/cjs/fonts/Inter-SemiBoldItalic.woff2 +0 -0
  174. package/cjs/fonts/Inter-Thin.woff +0 -0
  175. package/cjs/fonts/Inter-Thin.woff2 +0 -0
  176. package/cjs/fonts/Inter-ThinItalic.woff +0 -0
  177. package/cjs/fonts/Inter-ThinItalic.woff2 +0 -0
  178. package/cjs/fonts/Inter-italic.var.woff2 +0 -0
  179. package/cjs/fonts/Inter-roman.var.woff2 +0 -0
  180. package/cjs/fonts/Inter.var.woff2 +0 -0
  181. package/cjs/fonts/inter.css +0 -200
  182. package/fonts/Inter-Black.woff +0 -0
  183. package/fonts/Inter-Black.woff2 +0 -0
  184. package/fonts/Inter-BlackItalic.woff +0 -0
  185. package/fonts/Inter-BlackItalic.woff2 +0 -0
  186. package/fonts/Inter-Bold.woff +0 -0
  187. package/fonts/Inter-Bold.woff2 +0 -0
  188. package/fonts/Inter-BoldItalic.woff +0 -0
  189. package/fonts/Inter-BoldItalic.woff2 +0 -0
  190. package/fonts/Inter-ExtraBold.woff +0 -0
  191. package/fonts/Inter-ExtraBold.woff2 +0 -0
  192. package/fonts/Inter-ExtraBoldItalic.woff +0 -0
  193. package/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
  194. package/fonts/Inter-ExtraLight.woff +0 -0
  195. package/fonts/Inter-ExtraLight.woff2 +0 -0
  196. package/fonts/Inter-ExtraLightItalic.woff +0 -0
  197. package/fonts/Inter-ExtraLightItalic.woff2 +0 -0
  198. package/fonts/Inter-Italic.woff +0 -0
  199. package/fonts/Inter-Italic.woff2 +0 -0
  200. package/fonts/Inter-Light.woff +0 -0
  201. package/fonts/Inter-Light.woff2 +0 -0
  202. package/fonts/Inter-LightItalic.woff +0 -0
  203. package/fonts/Inter-LightItalic.woff2 +0 -0
  204. package/fonts/Inter-Medium.woff +0 -0
  205. package/fonts/Inter-Medium.woff2 +0 -0
  206. package/fonts/Inter-MediumItalic.woff +0 -0
  207. package/fonts/Inter-MediumItalic.woff2 +0 -0
  208. package/fonts/Inter-Regular.woff +0 -0
  209. package/fonts/Inter-Regular.woff2 +0 -0
  210. package/fonts/Inter-SemiBold.woff +0 -0
  211. package/fonts/Inter-SemiBold.woff2 +0 -0
  212. package/fonts/Inter-SemiBoldItalic.woff +0 -0
  213. package/fonts/Inter-SemiBoldItalic.woff2 +0 -0
  214. package/fonts/Inter-Thin.woff +0 -0
  215. package/fonts/Inter-Thin.woff2 +0 -0
  216. package/fonts/Inter-ThinItalic.woff +0 -0
  217. package/fonts/Inter-ThinItalic.woff2 +0 -0
  218. package/fonts/Inter-italic.var.woff2 +0 -0
  219. package/fonts/Inter-roman.var.woff2 +0 -0
  220. package/fonts/Inter.var.woff2 +0 -0
  221. package/fonts/inter.css +0 -200
@@ -2,7 +2,7 @@
2
2
  export declare const DrawerButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: "inherit" | "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
5
+ color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
package/AppRoutes.js CHANGED
@@ -34,20 +34,14 @@ export const AppRoutes = () => {
34
34
  path: navigationRoutes.toTokenNative,
35
35
  element: _jsx(SelectChainPage, { formType: "to", selectNativeToken: true }),
36
36
  },
37
- ...[
38
- navigationRoutes.fromChain,
39
- `${navigationRoutes.fromToken}/${navigationRoutes.fromChain}`,
40
- ].map((path) => ({
41
- path,
37
+ {
38
+ path: `${navigationRoutes.fromToken}?/${navigationRoutes.fromChain}`,
42
39
  element: _jsx(SelectChainPage, { formType: "from" }),
43
- })),
44
- ...[
45
- navigationRoutes.toChain,
46
- `${navigationRoutes.toToken}/${navigationRoutes.toChain}`,
47
- ].map((path) => ({
48
- path,
40
+ },
41
+ {
42
+ path: `${navigationRoutes.toToken}?/${navigationRoutes.toChain}`,
49
43
  element: _jsx(SelectChainPage, { formType: "to" }),
50
- })),
44
+ },
51
45
  {
52
46
  path: navigationRoutes.swapRoutes,
53
47
  element: _jsx(SwapRoutesPage, {}),
@@ -60,30 +54,18 @@ export const AppRoutes = () => {
60
54
  path: navigationRoutes.swapHistory,
61
55
  element: _jsx(SwapHistoryPage, {}),
62
56
  },
63
- ...[
64
- `${navigationRoutes.swapHistory}/${navigationRoutes.swapDetails}`,
65
- `${navigationRoutes.swapExecution}/${navigationRoutes.swapDetails}`,
66
- `${navigationRoutes.swapRoutes}/${navigationRoutes.swapExecution}/${navigationRoutes.swapDetails}`,
67
- ].map((path) => ({
68
- path,
57
+ {
58
+ path: `${navigationRoutes.swapHistory}?/${navigationRoutes.swapRoutes}?/${navigationRoutes.swapExecution}?/${navigationRoutes.swapDetails}`,
69
59
  element: _jsx(SwapDetailsPage, {}),
70
- })),
71
- ...[
72
- navigationRoutes.selectWallet,
73
- `${navigationRoutes.swapExecution}/${navigationRoutes.selectWallet}`,
74
- `${navigationRoutes.swapRoutes}/${navigationRoutes.swapExecution}/${navigationRoutes.selectWallet}`,
75
- ].map((path) => ({
76
- path,
60
+ },
61
+ {
62
+ path: `${navigationRoutes.swapRoutes}?/${navigationRoutes.swapExecution}?/${navigationRoutes.selectWallet}`,
77
63
  element: _jsx(SelectWalletPage, {}),
78
- })),
79
- ...[
80
- navigationRoutes.swapExecution,
81
- `${navigationRoutes.swapRoutes}/${navigationRoutes.swapExecution}`,
82
- `${navigationRoutes.activeSwaps}/${navigationRoutes.swapExecution}`,
83
- ].map((path) => ({
84
- path,
64
+ },
65
+ {
66
+ path: `${navigationRoutes.swapRoutes}?/${navigationRoutes.activeSwaps}?/${navigationRoutes.swapExecution}`,
85
67
  element: _jsx(SwapPage, {}),
86
- })),
68
+ },
87
69
  {
88
70
  path: '*',
89
71
  element: _jsx(NotFound, {}),
package/README.md CHANGED
@@ -74,7 +74,7 @@ export const WidgetPage = () => {
74
74
 
75
75
  ## Examples
76
76
 
77
- Visit our [playground](https://testing.li.finance) to see how you can customize your [LI.FI Widget](https://www.npmjs.com/package/@lifi/widget) experience.
77
+ Visit our [playground](https://playground.li.fi) to see how you can customize your [LI.FI Widget](https://www.npmjs.com/package/@lifi/widget) experience.
78
78
 
79
79
  ## Documentation
80
80
 
@@ -2,7 +2,7 @@
2
2
  export declare const DrawerButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: "inherit" | "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
5
+ color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
package/cjs/AppRoutes.js CHANGED
@@ -37,20 +37,14 @@ const AppRoutes = () => {
37
37
  path: utils_1.navigationRoutes.toTokenNative,
38
38
  element: (0, jsx_runtime_1.jsx)(SelectChainPage_1.SelectChainPage, { formType: "to", selectNativeToken: true }),
39
39
  },
40
- ...[
41
- utils_1.navigationRoutes.fromChain,
42
- `${utils_1.navigationRoutes.fromToken}/${utils_1.navigationRoutes.fromChain}`,
43
- ].map((path) => ({
44
- path,
40
+ {
41
+ path: `${utils_1.navigationRoutes.fromToken}?/${utils_1.navigationRoutes.fromChain}`,
45
42
  element: (0, jsx_runtime_1.jsx)(SelectChainPage_1.SelectChainPage, { formType: "from" }),
46
- })),
47
- ...[
48
- utils_1.navigationRoutes.toChain,
49
- `${utils_1.navigationRoutes.toToken}/${utils_1.navigationRoutes.toChain}`,
50
- ].map((path) => ({
51
- path,
43
+ },
44
+ {
45
+ path: `${utils_1.navigationRoutes.toToken}?/${utils_1.navigationRoutes.toChain}`,
52
46
  element: (0, jsx_runtime_1.jsx)(SelectChainPage_1.SelectChainPage, { formType: "to" }),
53
- })),
47
+ },
54
48
  {
55
49
  path: utils_1.navigationRoutes.swapRoutes,
56
50
  element: (0, jsx_runtime_1.jsx)(SwapRoutesPage_1.SwapRoutesPage, {}),
@@ -63,30 +57,18 @@ const AppRoutes = () => {
63
57
  path: utils_1.navigationRoutes.swapHistory,
64
58
  element: (0, jsx_runtime_1.jsx)(SwapHistoryPage_1.SwapHistoryPage, {}),
65
59
  },
66
- ...[
67
- `${utils_1.navigationRoutes.swapHistory}/${utils_1.navigationRoutes.swapDetails}`,
68
- `${utils_1.navigationRoutes.swapExecution}/${utils_1.navigationRoutes.swapDetails}`,
69
- `${utils_1.navigationRoutes.swapRoutes}/${utils_1.navigationRoutes.swapExecution}/${utils_1.navigationRoutes.swapDetails}`,
70
- ].map((path) => ({
71
- path,
60
+ {
61
+ path: `${utils_1.navigationRoutes.swapHistory}?/${utils_1.navigationRoutes.swapRoutes}?/${utils_1.navigationRoutes.swapExecution}?/${utils_1.navigationRoutes.swapDetails}`,
72
62
  element: (0, jsx_runtime_1.jsx)(SwapDetailsPage_1.SwapDetailsPage, {}),
73
- })),
74
- ...[
75
- utils_1.navigationRoutes.selectWallet,
76
- `${utils_1.navigationRoutes.swapExecution}/${utils_1.navigationRoutes.selectWallet}`,
77
- `${utils_1.navigationRoutes.swapRoutes}/${utils_1.navigationRoutes.swapExecution}/${utils_1.navigationRoutes.selectWallet}`,
78
- ].map((path) => ({
79
- path,
63
+ },
64
+ {
65
+ path: `${utils_1.navigationRoutes.swapRoutes}?/${utils_1.navigationRoutes.swapExecution}?/${utils_1.navigationRoutes.selectWallet}`,
80
66
  element: (0, jsx_runtime_1.jsx)(SelectWalletPage_1.SelectWalletPage, {}),
81
- })),
82
- ...[
83
- utils_1.navigationRoutes.swapExecution,
84
- `${utils_1.navigationRoutes.swapRoutes}/${utils_1.navigationRoutes.swapExecution}`,
85
- `${utils_1.navigationRoutes.activeSwaps}/${utils_1.navigationRoutes.swapExecution}`,
86
- ].map((path) => ({
87
- path,
67
+ },
68
+ {
69
+ path: `${utils_1.navigationRoutes.swapRoutes}?/${utils_1.navigationRoutes.activeSwaps}?/${utils_1.navigationRoutes.swapExecution}`,
88
70
  element: (0, jsx_runtime_1.jsx)(SwapPage_1.SwapPage, {}),
89
- })),
71
+ },
90
72
  {
91
73
  path: '*',
92
74
  element: (0, jsx_runtime_1.jsx)(NotFound_1.NotFound, {}),
@@ -39,7 +39,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
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;
42
- color?: "inherit" | "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
42
+ color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
43
43
  disabled?: boolean | undefined;
44
44
  disableElevation?: boolean | undefined;
45
45
  disableFocusRipple?: boolean | undefined;
@@ -18,7 +18,7 @@ export declare const Card: import("@emotion/styled").StyledComponent<import("@mu
18
18
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
19
19
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
20
20
  variant?: CardVariant | undefined;
21
- selectionColor?: "secondary" | "primary" | undefined;
21
+ selectionColor?: "primary" | "secondary" | undefined;
22
22
  dense?: boolean | undefined;
23
23
  indented?: boolean | undefined;
24
24
  onClick?: MouseEventHandler<HTMLDivElement> | undefined;
@@ -8,7 +8,7 @@ export declare const ChainCard: import("@emotion/styled").StyledComponent<import
8
8
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
9
9
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
10
10
  variant?: ("default" | "error" | "selected") | undefined;
11
- selectionColor?: "secondary" | "primary" | undefined;
11
+ selectionColor?: "primary" | "secondary" | undefined;
12
12
  dense?: boolean | undefined;
13
13
  indented?: boolean | undefined;
14
14
  onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { BoxProps } from '@mui/material';
3
+ export declare const ContractComponent: React.FC<BoxProps>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContractComponent = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const providers_1 = require("../../providers");
6
+ const Card_1 = require("../Card");
7
+ const ContractComponent = (props) => {
8
+ const { contractComponent } = (0, providers_1.useWidgetConfig)();
9
+ if (!contractComponent) {
10
+ return null;
11
+ }
12
+ return ((0, jsx_runtime_1.jsx)(Card_1.Card, Object.assign({ flex: 1 }, props, { children: contractComponent })));
13
+ };
14
+ exports.ContractComponent = ContractComponent;
@@ -0,0 +1 @@
1
+ export * from './ContractComponent';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ContractComponent"), exports);
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").PaperProps<"div", {}>, "classes" | "color" | "position"> & {
3
3
  classes?: Partial<import("@mui/material").AppBarClasses> | undefined;
4
- color?: "inherit" | "transparent" | "default" | "secondary" | "primary" | undefined;
4
+ color?: "inherit" | "transparent" | "default" | "primary" | "secondary" | undefined;
5
5
  enableColorOnDark?: boolean | undefined;
6
6
  position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
7
7
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
@@ -21,7 +21,7 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
21
21
  export declare const WalletButton: import("@emotion/styled").StyledComponent<{
22
22
  children?: import("react").ReactNode;
23
23
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
24
- color?: "inherit" | "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
24
+ color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
25
25
  disabled?: boolean | undefined;
26
26
  disableElevation?: boolean | undefined;
27
27
  disableFocusRipple?: boolean | undefined;
@@ -47,8 +47,16 @@ const NavigationHeader = () => {
47
47
  return t(`header.swap`);
48
48
  case utils_1.navigationRoutes.swapDetails:
49
49
  return t(`header.swapDetails`);
50
- default:
51
- return variant !== 'refuel' ? t(`header.swap`) : t(`header.gas`);
50
+ default: {
51
+ switch (variant) {
52
+ case 'nft':
53
+ return t(`header.checkout`);
54
+ case 'refuel':
55
+ return t(`header.gas`);
56
+ default:
57
+ return t(`header.swap`);
58
+ }
59
+ }
52
60
  }
53
61
  };
54
62
  return ((0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: [utils_1.backButtonRoutes.includes(path) ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "start", onClick: navigateBack }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.ArrowBack, {}) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true }, { children: handleHeaderTitle() })), (0, jsx_runtime_1.jsxs)(react_router_dom_1.Routes, { children: [(0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: utils_1.navigationRoutes.home, element: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [account.isActive ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: t(`header.swapHistory`), enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "start", onClick: () => navigate(utils_1.navigationRoutes.swapHistory) }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.ReceiptLongRounded, {}) })) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: t(`header.settings`), enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", onClick: () => navigate(utils_1.navigationRoutes.settings), sx: {
@@ -66,5 +66,5 @@ const ConnectedButton = () => {
66
66
  });
67
67
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, Object.assign({ endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}), startIcon: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: chain === null || chain === void 0 ? void 0 : chain.logoURI, alt: chain === null || chain === void 0 ? void 0 : chain.key, sx: { width: 24, height: 24 } }, { children: chain === null || chain === void 0 ? void 0 : chain.name[0] })), sx: {
68
68
  marginRight: -1.25,
69
- }, onClick: handleClick }, { children: walletAddress })), (0, jsx_runtime_1.jsxs)(Menu_1.Menu, Object.assign({ elevation: 2, anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose }, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: handleCopyAddress, disableRipple: true, dense: true }, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] })), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: handleDisconnect, disableRipple: true, dense: true }, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNewRounded, {}), t(`button.disconnectWallet`)] }))] }))] }));
69
+ }, onClick: handleClick }, { children: walletAddress })), (0, jsx_runtime_1.jsxs)(Menu_1.Menu, Object.assign({ elevation: 2, anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose }, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: handleCopyAddress, disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] })), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: handleDisconnect, disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNewRounded, {}), t(`button.disconnectWallet`)] }))] }))] }));
70
70
  };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { BoxProps } from '@mui/material';
3
+ import type { NFTProps } from './types';
4
+ export declare const NFT: React.FC<BoxProps & NFTProps>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.NFT = void 0;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const material_1 = require("@mui/material");
17
+ const react_1 = require("react");
18
+ const react_hook_form_1 = require("react-hook-form");
19
+ const react_i18next_1 = require("react-i18next");
20
+ const providers_1 = require("../../providers");
21
+ const Token_1 = require("../Token");
22
+ const NFT_style_1 = require("./NFT.style");
23
+ const NFT = (_a) => {
24
+ var { imageUrl, isLoading, collectonName, assetName, owner, token, contract } = _a, props = __rest(_a, ["imageUrl", "isLoading", "collectonName", "assetName", "owner", "token", "contract"]);
25
+ const { t } = (0, react_i18next_1.useTranslation)();
26
+ const { setValue } = (0, react_hook_form_1.useFormContext)();
27
+ (0, react_1.useEffect)(() => {
28
+ if (token) {
29
+ setValue(providers_1.SwapFormKey.ToChain, token.chainId);
30
+ setValue(providers_1.SwapFormKey.ToToken, token.address);
31
+ setValue(providers_1.SwapFormKey.ToAmount, token.amount);
32
+ }
33
+ if (contract) {
34
+ setValue(providers_1.SwapFormKey.ToContractAddress, contract.address);
35
+ setValue(providers_1.SwapFormKey.ToContractCallData, contract.callData);
36
+ setValue(providers_1.SwapFormKey.ToContractGasLimit, contract.gasLimit);
37
+ }
38
+ }, [contract, setValue, token]);
39
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ p: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex" }, { children: [isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 96, height: 96, variant: "rectangular", sx: { borderRadius: 1 } })) : ((0, jsx_runtime_1.jsx)(NFT_style_1.PreviewAvatar, { src: imageUrl })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ ml: 2 }, { children: [isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 144, height: 21, variant: "text" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, color: "text.secondary" }, { children: collectonName }))), isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 112, height: 27, variant: "text" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 18, fontWeight: 600 }, { children: assetName }))), isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 128, height: 21, variant: "text" })) : owner ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ fontSize: 14, color: "text.secondary" }, { children: [t('swap.ownedBy'), ' ', (0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ href: owner.url, target: "_blank", underline: "none", color: "primary" }, { children: owner.name }))] }))) : null] }))] })), (0, jsx_runtime_1.jsx)(Token_1.Token, { token: token, isLoading: isLoading, mt: 2 })] })));
40
+ };
41
+ exports.NFT = NFT;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export declare const PreviewAvatar: import("@emotion/styled").StyledComponent<{
3
+ alt?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ classes?: Partial<import("@mui/material").AvatarClasses> | undefined;
6
+ imgProps?: (import("react").ImgHTMLAttributes<HTMLImageElement> & {
7
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
8
+ }) | undefined;
9
+ sizes?: string | undefined;
10
+ src?: string | undefined;
11
+ srcSet?: string | undefined;
12
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
13
+ variant?: "square" | "circular" | "rounded" | undefined;
14
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
15
+ ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
16
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreviewAvatar = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const styles_1 = require("@mui/material/styles");
6
+ exports.PreviewAvatar = (0, styles_1.styled)(material_1.Avatar)(({ theme }) => ({
7
+ background: theme.palette.background.paper,
8
+ width: 96,
9
+ height: 96,
10
+ borderRadius: theme.shape.borderRadius,
11
+ }));
@@ -0,0 +1,2 @@
1
+ export * from './NFT';
2
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./NFT"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,15 @@
1
+ import type { TokenAmount } from '@lifi/sdk';
2
+ import type { WidgetContract } from '../../types';
3
+ export interface NFTProps {
4
+ imageUrl?: string;
5
+ collectonName?: string;
6
+ assetName?: string;
7
+ isLoading?: boolean;
8
+ owner?: NFTOwner;
9
+ token?: TokenAmount;
10
+ contract?: WidgetContract;
11
+ }
12
+ export interface NFTOwner {
13
+ name?: string;
14
+ url?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@
2
2
  export declare const IconButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
5
- color?: "inherit" | "default" | "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
5
+ color?: "inherit" | "default" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  edge?: false | "end" | "start" | undefined;
@@ -1,3 +1,3 @@
1
- export declare const Select: import("@emotion/styled").StyledComponent<import("@mui/material").SelectProps<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
1
+ export declare const Select: import("@emotion/styled").StyledComponent<(import("@mui/material").SelectProps<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>) & {
2
2
  dense?: boolean | undefined;
3
3
  }, {}, {}>;
@@ -22,7 +22,17 @@ const SelectChainAndToken = (props) => {
22
22
  const disabledReverse = variant === 'refuel' ||
23
23
  (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(types_1.DisabledUI.FromToken)) ||
24
24
  (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(types_1.DisabledUI.ToToken));
25
- const isCompact = fromChain && toChain && fromToken && toToken && !prefersNarrowView;
26
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [(0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "from", compact: isCompact }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, m: !disabledReverse ? -1.125 : 1 }, { children: !disabledReverse ? ((0, jsx_runtime_1.jsx)(ReverseTokensButton_1.ReverseTokensButton, { vertical: !isCompact })) : null })), (0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "to", compact: isCompact })] })));
25
+ const nftVariant = variant === 'nft';
26
+ const isCompact = fromChain &&
27
+ toChain &&
28
+ fromToken &&
29
+ toToken &&
30
+ !prefersNarrowView &&
31
+ !nftVariant;
32
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [(0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "from", compact: isCompact }), !nftVariant ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: {
33
+ display: 'flex',
34
+ justifyContent: 'center',
35
+ alignItems: 'center',
36
+ }, m: !disabledReverse ? -1.125 : 1 }, { children: !disabledReverse ? ((0, jsx_runtime_1.jsx)(ReverseTokensButton_1.ReverseTokensButton, { vertical: !isCompact })) : null }))) : null, !nftVariant ? ((0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "to", compact: isCompact })) : null] })));
27
37
  };
28
38
  exports.SelectChainAndToken = SelectChainAndToken;
@@ -31,9 +31,12 @@ const SelectTokenButton = ({ formType, compact }) => {
31
31
  };
32
32
  const isSelected = !!(chain && token);
33
33
  const onClick = !(disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(tokenKey)) ? handleClick : undefined;
34
- const defaultTitle = formType === 'to' && variant === 'refuel'
34
+ const defaultPlaceholder = formType === 'to' && variant === 'refuel'
35
35
  ? t(`header.selectChain`)
36
36
  : t(`swap.selectChainAndToken`);
37
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ flex: 1, onClick: onClick }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`swap.${formType}`) }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32 }), title: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 24 }), subheader: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: isSelected ? ((0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token, chain: chain })) : ((0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatarDefault, {})), title: isSelected ? token.symbol : defaultTitle, subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] })));
37
+ const cardTitle = formType === 'from' && variant === 'nft'
38
+ ? t(`swap.payWith`)
39
+ : t(`swap.${formType}`);
40
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ flex: 1, onClick: onClick }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: cardTitle }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32 }), title: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 24 }), subheader: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: isSelected ? ((0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token, chain: chain })) : ((0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatarDefault, {})), title: isSelected ? token.symbol : defaultPlaceholder, subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] })));
38
41
  };
39
42
  exports.SelectTokenButton = SelectTokenButton;
@@ -2,7 +2,7 @@
2
2
  export declare const FormControl: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
5
- color?: "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
5
+ color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  error?: boolean | undefined;
8
8
  fullWidth?: boolean | undefined;
@@ -13,7 +13,7 @@ export declare const SmallAvatar: import("@emotion/styled").StyledComponent<{
13
13
  variant?: "square" | "circular" | "rounded" | undefined;
14
14
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
15
15
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
16
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "src" | "sizes" | "srcSet" | "imgProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
16
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
17
17
  export declare const SmallAvatarSkeletonBase: import("@emotion/styled").StyledComponent<{
18
18
  animation?: false | "pulse" | "wave" | undefined;
19
19
  children?: import("react").ReactNode;
@@ -2,7 +2,7 @@
2
2
  export declare const LinkButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
5
- color?: "inherit" | "default" | "success" | "warning" | "error" | "secondary" | "primary" | "info" | undefined;
5
+ color?: "inherit" | "default" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  edge?: false | "end" | "start" | undefined;
@@ -1,13 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import type { Step } from '@lifi/sdk';
3
- import type { StepActionsProps } from './types';
3
+ import type { WidgetVariant } from '../../types';
4
+ import type { StepActionsProps, StepDetailsLabelProps } from './types';
4
5
  export declare const StepActions: React.FC<StepActionsProps>;
5
6
  export declare const StepDetailsContent: React.FC<{
6
7
  step: Step;
8
+ variant?: WidgetVariant;
7
9
  }>;
8
- export declare const CrossStepDetailsLabel: React.FC<{
9
- step: Step;
10
- }>;
11
- export declare const SwapStepDetailsLabel: React.FC<{
12
- step: Step;
13
- }>;
10
+ export declare const CustomStepDetailsLabel: React.FC<StepDetailsLabelProps>;
11
+ export declare const CrossStepDetailsLabel: React.FC<Omit<StepDetailsLabelProps, 'variant'>>;
12
+ export declare const SwapStepDetailsLabel: React.FC<Omit<StepDetailsLabelProps, 'variant'>>;