@lifi/widget 1.20.3 → 1.22.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 (230) hide show
  1. package/App.d.ts +2 -2
  2. package/App.js +5 -3
  3. package/AppDrawer.d.ts +3 -8
  4. package/AppDrawer.style.d.ts +1 -1
  5. package/AppProvider.d.ts +2 -5
  6. package/AppProvider.js +2 -2
  7. package/AppRoutes.js +5 -0
  8. package/cjs/App.d.ts +2 -2
  9. package/cjs/App.js +5 -4
  10. package/cjs/AppDrawer.d.ts +3 -8
  11. package/cjs/AppDrawer.style.d.ts +1 -1
  12. package/cjs/AppProvider.d.ts +2 -5
  13. package/cjs/AppProvider.js +1 -1
  14. package/cjs/AppRoutes.js +5 -0
  15. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  16. package/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
  17. package/cjs/components/ChainSelect/ChainSelect.d.ts +0 -1
  18. package/cjs/components/ChainSelect/ChainSelect.js +1 -3
  19. package/cjs/components/ChainSelect/useChainSelect.d.ts +1 -1
  20. package/cjs/components/Header/Header.style.d.ts +34 -1
  21. package/cjs/components/Header/Header.style.js +19 -1
  22. package/cjs/components/Header/NavigationHeader.js +4 -1
  23. package/cjs/components/Header/WalletHeader.js +34 -9
  24. package/cjs/components/Menu.d.ts +1 -0
  25. package/cjs/components/Menu.js +24 -0
  26. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  27. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  28. package/cjs/components/SelectChainAndToken.js +6 -1
  29. package/cjs/components/SelectTokenButton/SelectTokenButton.js +8 -6
  30. package/cjs/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
  31. package/cjs/components/SendToWallet/SendToWallet.js +5 -0
  32. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  33. package/cjs/components/SendToWallet/SendToWalletButton.js +5 -1
  34. package/cjs/components/Step/CircularProgress.d.ts +0 -1
  35. package/cjs/components/Step/StepProcess.style.d.ts +2 -2
  36. package/cjs/components/Step/StepTimer.js +1 -1
  37. package/cjs/components/StepActions/StepActions.js +6 -1
  38. package/cjs/components/SwapInput/FormPriceHelperText.js +4 -4
  39. package/cjs/components/SwapInput/SwapInput.js +5 -2
  40. package/cjs/components/SwapInput/SwapInput.style.d.ts +1 -1
  41. package/cjs/components/SwapInput/SwapInputAdornment.d.ts +0 -1
  42. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  43. package/cjs/components/SwapRouteCard/SwapRouteCard.js +5 -3
  44. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  45. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
  46. package/cjs/components/SwapRoutes/SwapRoutes.js +8 -3
  47. package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  48. package/cjs/components/Token/Token.js +6 -5
  49. package/cjs/components/TokenAvatar/TokenAvatar.d.ts +6 -1
  50. package/cjs/components/TokenAvatar/TokenAvatar.js +10 -3
  51. package/cjs/components/TokenList/TokenList.js +2 -23
  52. package/cjs/components/TokenList/TokenListItem.d.ts +2 -1
  53. package/cjs/components/TokenList/TokenListItem.js +12 -6
  54. package/cjs/components/TokenList/index.d.ts +1 -0
  55. package/cjs/components/TokenList/index.js +1 -0
  56. package/cjs/components/TokenList/types.d.ts +6 -0
  57. package/cjs/components/TokenList/useTokenSelect.d.ts +2 -0
  58. package/cjs/components/TokenList/useTokenSelect.js +33 -0
  59. package/cjs/config/version.d.ts +1 -1
  60. package/cjs/config/version.js +1 -1
  61. package/cjs/hooks/useChain.d.ts +2 -2
  62. package/cjs/hooks/useChains.d.ts +2 -2
  63. package/cjs/hooks/useExpandableVariant.js +3 -5
  64. package/cjs/hooks/useProcessMessage.d.ts +2 -2
  65. package/cjs/hooks/useSwapRoutes.js +11 -7
  66. package/cjs/i18n/de.json +199 -0
  67. package/cjs/i18n/{en/translation.json → en.json} +157 -150
  68. package/cjs/i18n/es.json +199 -0
  69. package/cjs/i18n/fr.json +199 -0
  70. package/cjs/i18n/index.d.ts +8 -199
  71. package/cjs/i18n/index.js +16 -22
  72. package/cjs/i18n/it.json +199 -0
  73. package/cjs/i18n/uk.json +200 -0
  74. package/cjs/i18n/zh.json +199 -0
  75. package/cjs/index.d.ts +6 -3
  76. package/cjs/index.js +3 -2
  77. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  78. package/cjs/pages/SelectChainPage/SelectChainPage.d.ts +1 -1
  79. package/cjs/pages/SelectChainPage/SelectChainPage.js +2 -5
  80. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
  81. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +21 -0
  82. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
  83. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +20 -0
  84. package/cjs/pages/SelectNativeTokenPage/index.d.ts +1 -0
  85. package/cjs/pages/SelectNativeTokenPage/index.js +17 -0
  86. package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  87. package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  88. package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +0 -1
  89. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  90. package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  91. package/cjs/pages/SettingsPage/LanguageSelect.d.ts +2 -0
  92. package/cjs/pages/SettingsPage/LanguageSelect.js +38 -0
  93. package/cjs/pages/SettingsPage/SettingsPage.d.ts +0 -1
  94. package/cjs/pages/SettingsPage/SettingsPage.js +2 -1
  95. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -2
  96. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +6 -0
  97. package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
  98. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
  99. package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
  100. package/cjs/pages/SwapPage/StatusBottomSheet.js +3 -3
  101. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +1 -1
  102. package/cjs/providers/I18nProvider/I18nProvider.d.ts +2 -0
  103. package/cjs/providers/I18nProvider/I18nProvider.js +62 -0
  104. package/cjs/providers/I18nProvider/index.d.ts +2 -0
  105. package/cjs/providers/I18nProvider/index.js +18 -0
  106. package/cjs/providers/I18nProvider/types.d.ts +16 -0
  107. package/cjs/providers/I18nProvider/types.js +2 -0
  108. package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
  109. package/cjs/providers/WidgetProvider/utils.js +4 -4
  110. package/cjs/providers/index.d.ts +1 -0
  111. package/cjs/providers/index.js +1 -0
  112. package/cjs/stores/settings/types.d.ts +1 -0
  113. package/cjs/stores/settings/useSettingsStore.d.ts +2 -0
  114. package/cjs/types/widget.d.ts +30 -8
  115. package/cjs/types/widget.js +8 -0
  116. package/cjs/utils/deepMerge.d.ts +1 -0
  117. package/cjs/utils/deepMerge.js +18 -0
  118. package/cjs/utils/index.d.ts +1 -0
  119. package/cjs/utils/index.js +1 -0
  120. package/cjs/utils/navigationRoutes.d.ts +8 -7
  121. package/cjs/utils/navigationRoutes.js +10 -7
  122. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  123. package/components/BottomSheet/BottomSheet.d.ts +1 -1
  124. package/components/ChainSelect/ChainSelect.d.ts +0 -1
  125. package/components/ChainSelect/ChainSelect.js +1 -3
  126. package/components/ChainSelect/useChainSelect.d.ts +1 -1
  127. package/components/Header/Header.style.d.ts +34 -1
  128. package/components/Header/Header.style.js +19 -1
  129. package/components/Header/NavigationHeader.js +4 -1
  130. package/components/Header/WalletHeader.js +37 -12
  131. package/components/Menu.d.ts +1 -0
  132. package/components/Menu.js +21 -0
  133. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  134. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  135. package/components/SelectChainAndToken.js +7 -2
  136. package/components/SelectTokenButton/SelectTokenButton.js +9 -7
  137. package/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
  138. package/components/SendToWallet/SendToWallet.js +6 -1
  139. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  140. package/components/SendToWallet/SendToWalletButton.js +6 -2
  141. package/components/Step/CircularProgress.d.ts +0 -1
  142. package/components/Step/StepProcess.style.d.ts +2 -2
  143. package/components/Step/StepTimer.js +1 -1
  144. package/components/StepActions/StepActions.js +6 -1
  145. package/components/SwapInput/FormPriceHelperText.js +4 -4
  146. package/components/SwapInput/SwapInput.js +6 -3
  147. package/components/SwapInput/SwapInput.style.d.ts +1 -1
  148. package/components/SwapInput/SwapInputAdornment.d.ts +0 -1
  149. package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  150. package/components/SwapRouteCard/SwapRouteCard.js +5 -3
  151. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  152. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
  153. package/components/SwapRoutes/SwapRoutes.js +8 -3
  154. package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  155. package/components/Token/Token.js +7 -6
  156. package/components/TokenAvatar/TokenAvatar.d.ts +6 -1
  157. package/components/TokenAvatar/TokenAvatar.js +8 -2
  158. package/components/TokenList/TokenList.js +4 -25
  159. package/components/TokenList/TokenListItem.d.ts +2 -1
  160. package/components/TokenList/TokenListItem.js +10 -5
  161. package/components/TokenList/index.d.ts +1 -0
  162. package/components/TokenList/index.js +1 -0
  163. package/components/TokenList/types.d.ts +6 -0
  164. package/components/TokenList/useTokenSelect.d.ts +2 -0
  165. package/components/TokenList/useTokenSelect.js +29 -0
  166. package/config/version.d.ts +1 -1
  167. package/config/version.js +1 -1
  168. package/hooks/useChain.d.ts +2 -2
  169. package/hooks/useChains.d.ts +2 -2
  170. package/hooks/useExpandableVariant.js +3 -5
  171. package/hooks/useProcessMessage.d.ts +2 -2
  172. package/hooks/useSwapRoutes.js +12 -8
  173. package/i18n/de.json +199 -0
  174. package/i18n/{en/translation.json → en.json} +157 -150
  175. package/i18n/es.json +199 -0
  176. package/i18n/fr.json +199 -0
  177. package/i18n/index.d.ts +8 -199
  178. package/i18n/index.js +9 -20
  179. package/i18n/it.json +199 -0
  180. package/i18n/uk.json +200 -0
  181. package/i18n/zh.json +199 -0
  182. package/index.d.ts +6 -3
  183. package/index.js +3 -2
  184. package/package.json +18 -17
  185. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  186. package/pages/SelectChainPage/SelectChainPage.d.ts +1 -1
  187. package/pages/SelectChainPage/SelectChainPage.js +2 -5
  188. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
  189. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +17 -0
  190. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
  191. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +17 -0
  192. package/pages/SelectNativeTokenPage/index.d.ts +1 -0
  193. package/pages/SelectNativeTokenPage/index.js +1 -0
  194. package/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  195. package/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  196. package/pages/SettingsPage/AdvancedPreferences.d.ts +0 -1
  197. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  198. package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  199. package/pages/SettingsPage/LanguageSelect.d.ts +2 -0
  200. package/pages/SettingsPage/LanguageSelect.js +34 -0
  201. package/pages/SettingsPage/SettingsPage.d.ts +0 -1
  202. package/pages/SettingsPage/SettingsPage.js +2 -1
  203. package/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -2
  204. package/pages/SettingsPage/ShowDestinationWallet.js +6 -0
  205. package/pages/SettingsPage/SlippageInput.d.ts +0 -1
  206. package/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
  207. package/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
  208. package/pages/SwapPage/StatusBottomSheet.js +3 -3
  209. package/pages/SwapPage/TokenValueBottomSheet.js +1 -1
  210. package/providers/I18nProvider/I18nProvider.d.ts +2 -0
  211. package/providers/I18nProvider/I18nProvider.js +58 -0
  212. package/providers/I18nProvider/index.d.ts +2 -0
  213. package/providers/I18nProvider/index.js +2 -0
  214. package/providers/I18nProvider/types.d.ts +16 -0
  215. package/providers/I18nProvider/types.js +1 -0
  216. package/providers/WidgetProvider/utils.d.ts +1 -1
  217. package/providers/WidgetProvider/utils.js +4 -4
  218. package/providers/index.d.ts +1 -0
  219. package/providers/index.js +1 -0
  220. package/stores/settings/types.d.ts +1 -0
  221. package/stores/settings/useSettingsStore.d.ts +2 -0
  222. package/tsconfig.cjs.tsbuildinfo +1 -1
  223. package/types/widget.d.ts +30 -8
  224. package/types/widget.js +7 -1
  225. package/utils/deepMerge.d.ts +1 -0
  226. package/utils/deepMerge.js +14 -0
  227. package/utils/index.d.ts +1 -0
  228. package/utils/index.js +1 -0
  229. package/utils/navigationRoutes.d.ts +8 -7
  230. package/utils/navigationRoutes.js +10 -7
package/App.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import type { AppProps } from './AppProvider';
3
- export declare const App: React.FC<AppProps>;
2
+ import type { WidgetProps } from './types';
3
+ export declare const App: React.FC<WidgetProps>;
4
4
  export declare const AppDefault: () => JSX.Element;
package/App.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { AppDrawer } from './AppDrawer';
2
4
  import { AppProvider } from './AppProvider';
3
5
  import { AppRoutes } from './AppRoutes';
4
6
  import { AppContainer, AppExpandedContainer, FlexContainer, } from './components/AppContainer';
@@ -7,9 +9,9 @@ import { Initializer } from './components/Initializer';
7
9
  import { PoweredBy } from './components/PoweredBy';
8
10
  import { SwapRoutesExpanded } from './components/SwapRoutes';
9
11
  import { useExpandableVariant } from './hooks';
10
- export const App = ({ config }) => {
11
- return (_jsx(AppProvider, Object.assign({ config: config }, { children: _jsx(AppDefault, {}) })));
12
- };
12
+ export const App = forwardRef(({ elementRef, open, config }, ref) => {
13
+ return (config === null || config === void 0 ? void 0 : config.variant) !== 'drawer' ? (_jsx(AppProvider, Object.assign({ config: config }, { children: _jsx(AppDefault, {}) }))) : (_jsx(AppDrawer, { ref: ref, elementRef: elementRef, config: config, open: open }));
14
+ });
13
15
  export const AppDefault = () => {
14
16
  const expandable = useExpandableVariant();
15
17
  return (_jsxs(AppExpandedContainer, { children: [_jsxs(AppContainer, { children: [_jsx(Header, {}), _jsx(FlexContainer, Object.assign({ disableGutters: true }, { children: _jsx(AppRoutes, {}) })), _jsx(PoweredBy, {}), _jsx(Initializer, {})] }), expandable ? _jsx(SwapRoutesExpanded, {}) : null] }));
package/AppDrawer.d.ts CHANGED
@@ -1,14 +1,9 @@
1
- import type { DrawerProps } from '@mui/material';
2
- import type { RefObject } from 'react';
3
- import type { WidgetConfig } from './types';
4
- export declare type WidgetDrawerProps = DrawerProps & {
5
- elementRef?: RefObject<HTMLDivElement>;
6
- config?: WidgetConfig;
7
- };
1
+ /// <reference types="react" />
2
+ import type { WidgetProps } from './types';
8
3
  export interface WidgetDrawer {
9
4
  isOpen(): void;
10
5
  toggleDrawer(): void;
11
6
  openDrawer(): void;
12
7
  closeDrawer(): void;
13
8
  }
14
- export declare const AppDrawer: import("react").ForwardRefExoticComponent<Pick<WidgetDrawerProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "elementRef" | "components" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "config" | "elevation" | "ModalProps" | "PaperProps" | "SlideProps"> & import("react").RefAttributes<WidgetDrawer>>;
9
+ export declare const AppDrawer: import("react").ForwardRefExoticComponent<WidgetProps & import("react").RefAttributes<WidgetDrawer>>;
@@ -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" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
package/AppProvider.d.ts CHANGED
@@ -1,7 +1,4 @@
1
1
  import type { PropsWithChildren } from 'react';
2
- import type { WidgetConfig } from '.';
3
- export interface AppProps {
4
- config?: WidgetConfig;
5
- }
6
- export declare const AppProvider: React.FC<PropsWithChildren<AppProps>>;
2
+ import type { WidgetProps } from './types';
3
+ export declare const AppProvider: React.FC<PropsWithChildren<WidgetProps>>;
7
4
  export declare const AppRouter: React.FC<PropsWithChildren<{}>>;
package/AppProvider.js CHANGED
@@ -3,10 +3,10 @@ import { QueryClientProvider } from '@tanstack/react-query';
3
3
  import { Fragment } from 'react';
4
4
  import { MemoryRouter, useInRouterContext } from 'react-router-dom';
5
5
  import { queryClient } from './config/queryClient';
6
- import { SDKProvider, SwapFormProvider, TelemetryProvider, ThemeProvider, WalletProvider, WidgetProvider, } from './providers';
6
+ import { I18nProvider, SDKProvider, SwapFormProvider, TelemetryProvider, ThemeProvider, WalletProvider, WidgetProvider, } from './providers';
7
7
  const QueryProvider = QueryClientProvider;
8
8
  export const AppProvider = ({ children, config, }) => {
9
- return (_jsx(QueryProvider, Object.assign({ client: queryClient }, { children: _jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(SDKProvider, { children: _jsx(TelemetryProvider, { children: _jsx(SwapFormProvider, { children: _jsx(ThemeProvider, { children: _jsx(WalletProvider, { children: _jsx(AppRouter, { children: children }) }) }) }) }) }) })) })));
9
+ return (_jsx(QueryProvider, Object.assign({ client: queryClient }, { children: _jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(SDKProvider, { children: _jsx(TelemetryProvider, { children: _jsx(SwapFormProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(WalletProvider, { children: _jsx(AppRouter, { children: children }) }) }) }) }) }) }) })) })));
10
10
  };
11
11
  export const AppRouter = ({ children }) => {
12
12
  const inRouterContext = useInRouterContext();
package/AppRoutes.js CHANGED
@@ -4,6 +4,7 @@ import { NotFound } from './components/NotFound';
4
4
  import { ActiveSwapsPage } from './pages/ActiveSwapsPage';
5
5
  import { MainPage } from './pages/MainPage';
6
6
  import { SelectChainPage } from './pages/SelectChainPage';
7
+ import { SelectNativeTokenPage } from './pages/SelectNativeTokenPage';
7
8
  import { SelectTokenPage } from './pages/SelectTokenPage';
8
9
  import { SelectWalletPage } from './pages/SelectWalletPage';
9
10
  import { SettingsPage } from './pages/SettingsPage';
@@ -30,6 +31,10 @@ export const AppRoutes = () => {
30
31
  path: navigationRoutes.toToken,
31
32
  element: _jsx(SelectTokenPage, { formType: "to" }),
32
33
  },
34
+ {
35
+ path: navigationRoutes.toTokenNative,
36
+ element: _jsx(SelectNativeTokenPage, { formType: "to" }),
37
+ },
33
38
  ...[
34
39
  navigationRoutes.fromChain,
35
40
  `${navigationRoutes.fromToken}/${navigationRoutes.fromChain}`,
package/cjs/App.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import type { AppProps } from './AppProvider';
3
- export declare const App: React.FC<AppProps>;
2
+ import type { WidgetProps } from './types';
3
+ export declare const App: React.FC<WidgetProps>;
4
4
  export declare const AppDefault: () => JSX.Element;
package/cjs/App.js CHANGED
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppDefault = exports.App = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const AppDrawer_1 = require("./AppDrawer");
5
7
  const AppProvider_1 = require("./AppProvider");
6
8
  const AppRoutes_1 = require("./AppRoutes");
7
9
  const AppContainer_1 = require("./components/AppContainer");
@@ -10,10 +12,9 @@ const Initializer_1 = require("./components/Initializer");
10
12
  const PoweredBy_1 = require("./components/PoweredBy");
11
13
  const SwapRoutes_1 = require("./components/SwapRoutes");
12
14
  const hooks_1 = require("./hooks");
13
- const App = ({ config }) => {
14
- return ((0, jsx_runtime_1.jsx)(AppProvider_1.AppProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(exports.AppDefault, {}) })));
15
- };
16
- exports.App = App;
15
+ exports.App = (0, react_1.forwardRef)(({ elementRef, open, config }, ref) => {
16
+ return (config === null || config === void 0 ? void 0 : config.variant) !== 'drawer' ? ((0, jsx_runtime_1.jsx)(AppProvider_1.AppProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(exports.AppDefault, {}) }))) : ((0, jsx_runtime_1.jsx)(AppDrawer_1.AppDrawer, { ref: ref, elementRef: elementRef, config: config, open: open }));
17
+ });
17
18
  const AppDefault = () => {
18
19
  const expandable = (0, hooks_1.useExpandableVariant)();
19
20
  return ((0, jsx_runtime_1.jsxs)(AppContainer_1.AppExpandedContainer, { children: [(0, jsx_runtime_1.jsxs)(AppContainer_1.AppContainer, { children: [(0, jsx_runtime_1.jsx)(Header_1.Header, {}), (0, jsx_runtime_1.jsx)(AppContainer_1.FlexContainer, Object.assign({ disableGutters: true }, { children: (0, jsx_runtime_1.jsx)(AppRoutes_1.AppRoutes, {}) })), (0, jsx_runtime_1.jsx)(PoweredBy_1.PoweredBy, {}), (0, jsx_runtime_1.jsx)(Initializer_1.Initializer, {})] }), expandable ? (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutesExpanded, {}) : null] }));
@@ -1,14 +1,9 @@
1
- import type { DrawerProps } from '@mui/material';
2
- import type { RefObject } from 'react';
3
- import type { WidgetConfig } from './types';
4
- export declare type WidgetDrawerProps = DrawerProps & {
5
- elementRef?: RefObject<HTMLDivElement>;
6
- config?: WidgetConfig;
7
- };
1
+ /// <reference types="react" />
2
+ import type { WidgetProps } from './types';
8
3
  export interface WidgetDrawer {
9
4
  isOpen(): void;
10
5
  toggleDrawer(): void;
11
6
  openDrawer(): void;
12
7
  closeDrawer(): void;
13
8
  }
14
- export declare const AppDrawer: import("react").ForwardRefExoticComponent<Pick<WidgetDrawerProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "elementRef" | "components" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "config" | "elevation" | "ModalProps" | "PaperProps" | "SlideProps"> & import("react").RefAttributes<WidgetDrawer>>;
9
+ export declare const AppDrawer: import("react").ForwardRefExoticComponent<WidgetProps & import("react").RefAttributes<WidgetDrawer>>;
@@ -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" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
@@ -1,7 +1,4 @@
1
1
  import type { PropsWithChildren } from 'react';
2
- import type { WidgetConfig } from '.';
3
- export interface AppProps {
4
- config?: WidgetConfig;
5
- }
6
- export declare const AppProvider: React.FC<PropsWithChildren<AppProps>>;
2
+ import type { WidgetProps } from './types';
3
+ export declare const AppProvider: React.FC<PropsWithChildren<WidgetProps>>;
7
4
  export declare const AppRouter: React.FC<PropsWithChildren<{}>>;
@@ -9,7 +9,7 @@ const queryClient_1 = require("./config/queryClient");
9
9
  const providers_1 = require("./providers");
10
10
  const QueryProvider = react_query_1.QueryClientProvider;
11
11
  const AppProvider = ({ children, config, }) => {
12
- return ((0, jsx_runtime_1.jsx)(QueryProvider, Object.assign({ client: queryClient_1.queryClient }, { children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.TelemetryProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.SwapFormProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) }) }) }) }) }) })) })));
12
+ return ((0, jsx_runtime_1.jsx)(QueryProvider, Object.assign({ client: queryClient_1.queryClient }, { children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.TelemetryProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.SwapFormProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.I18nProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) }) }) }) }) }) }) })) })));
13
13
  };
14
14
  exports.AppProvider = AppProvider;
15
15
  const AppRouter = ({ children }) => {
package/cjs/AppRoutes.js CHANGED
@@ -7,6 +7,7 @@ const NotFound_1 = require("./components/NotFound");
7
7
  const ActiveSwapsPage_1 = require("./pages/ActiveSwapsPage");
8
8
  const MainPage_1 = require("./pages/MainPage");
9
9
  const SelectChainPage_1 = require("./pages/SelectChainPage");
10
+ const SelectNativeTokenPage_1 = require("./pages/SelectNativeTokenPage");
10
11
  const SelectTokenPage_1 = require("./pages/SelectTokenPage");
11
12
  const SelectWalletPage_1 = require("./pages/SelectWalletPage");
12
13
  const SettingsPage_1 = require("./pages/SettingsPage");
@@ -33,6 +34,10 @@ const AppRoutes = () => {
33
34
  path: utils_1.navigationRoutes.toToken,
34
35
  element: (0, jsx_runtime_1.jsx)(SelectTokenPage_1.SelectTokenPage, { formType: "to" }),
35
36
  },
37
+ {
38
+ path: utils_1.navigationRoutes.toTokenNative,
39
+ element: (0, jsx_runtime_1.jsx)(SelectNativeTokenPage_1.SelectNativeTokenPage, { formType: "to" }),
40
+ },
36
41
  ...[
37
42
  utils_1.navigationRoutes.fromChain,
38
43
  `${utils_1.navigationRoutes.fromToken}/${utils_1.navigationRoutes.fromChain}`,
@@ -33,7 +33,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
33
33
  export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
34
34
  children?: import("react").ReactNode;
35
35
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
36
- color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
36
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
37
37
  disabled?: boolean | undefined;
38
38
  disableElevation?: boolean | undefined;
39
39
  disableFocusRipple?: boolean | undefined;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import type { BottomSheetBase, BottomSheetProps } from './types';
3
- export declare const BottomSheet: import("react").ForwardRefExoticComponent<Pick<BottomSheetProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "elementRef" | "components" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "elevation" | "ModalProps" | "PaperProps" | "SlideProps"> & import("react").RefAttributes<BottomSheetBase>>;
3
+ export declare const BottomSheet: import("react").ForwardRefExoticComponent<Pick<BottomSheetProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "components" | "elementRef" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "slotProps" | "slots" | "elevation" | "PaperProps" | "ModalProps" | "SlideProps"> & import("react").RefAttributes<BottomSheetBase>>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SwapFormTypeProps } from '../../providers';
3
2
  export declare const ChainSelect: ({ formType }: SwapFormTypeProps) => JSX.Element;
@@ -18,9 +18,7 @@ const ChainSelect = ({ formType }) => {
18
18
  name: [providers_1.SwapFormKeyHelper.getChainKey(formType)],
19
19
  });
20
20
  const showAllChains = () => {
21
- navigate(utils_1.navigationRoutes[`${formType}Chain`], {
22
- state: { formType },
23
- });
21
+ navigate(utils_1.navigationRoutes[`${formType}Chain`]);
24
22
  };
25
23
  const chainsToHide = ((_a = chains === null || chains === void 0 ? void 0 : chains.length) !== null && _a !== void 0 ? _a : 0) - stores_1.maxChainToOrder;
26
24
  return ((0, jsx_runtime_1.jsxs)(ChainSelect_style_1.ChainContainer, { children: [isLoading
@@ -1,7 +1,7 @@
1
1
  import type { EVMChain } from '@lifi/sdk';
2
2
  import type { SwapFormType } from '../../providers';
3
3
  export declare const useChainSelect: (formType: SwapFormType) => {
4
- chains: EVMChain[] | undefined;
4
+ chains: import("@lifi/sdk").ExtendedChain[] | undefined;
5
5
  getChains: () => EVMChain[];
6
6
  setCurrentChain: (chainId: number) => void;
7
7
  isLoading: boolean;
@@ -7,7 +7,7 @@ export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<Omi
7
7
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
8
8
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").HTMLAttributes<HTMLElement> | "key"> & {
9
9
  ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
10
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
10
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
11
11
  export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
12
12
  children?: import("react").ReactNode;
13
13
  component?: import("react").ElementType<any> | undefined;
@@ -18,3 +18,36 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
18
18
  }, 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> & {
19
19
  sticky?: boolean | undefined;
20
20
  }, {}, {}>;
21
+ export declare const WalletButton: import("@emotion/styled").StyledComponent<{
22
+ children?: import("react").ReactNode;
23
+ classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
24
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
25
+ disabled?: boolean | undefined;
26
+ disableElevation?: boolean | undefined;
27
+ disableFocusRipple?: boolean | undefined;
28
+ endIcon?: import("react").ReactNode;
29
+ fullWidth?: boolean | undefined;
30
+ href?: string | undefined;
31
+ size?: "small" | "medium" | "large" | undefined;
32
+ startIcon?: import("react").ReactNode;
33
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
34
+ variant?: "text" | "outlined" | "contained" | undefined;
35
+ } & Omit<{
36
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
37
+ centerRipple?: boolean | undefined;
38
+ children?: import("react").ReactNode;
39
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
40
+ disabled?: boolean | undefined;
41
+ disableRipple?: boolean | undefined;
42
+ disableTouchRipple?: boolean | undefined;
43
+ focusRipple?: boolean | undefined;
44
+ focusVisibleClassName?: string | undefined;
45
+ LinkComponent?: import("react").ElementType<any> | undefined;
46
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
47
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
48
+ tabIndex?: number | undefined;
49
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
50
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
51
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
52
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
53
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Container = exports.HeaderAppBar = void 0;
3
+ exports.WalletButton = exports.Container = exports.HeaderAppBar = void 0;
4
4
  const material_1 = require("@mui/material");
5
+ const Button_1 = require("@mui/material/Button");
5
6
  const styles_1 = require("@mui/material/styles");
6
7
  exports.HeaderAppBar = (0, styles_1.styled)(material_1.AppBar)(({ theme }) => ({
7
8
  backgroundColor: 'transparent',
@@ -25,3 +26,20 @@ exports.Container = (0, styles_1.styled)(material_1.Box, {
25
26
  top: 0,
26
27
  zIndex: 1200,
27
28
  }));
29
+ exports.WalletButton = (0, styles_1.styled)(material_1.Button)(({ theme }) => ({
30
+ color: theme.palette.text.primary,
31
+ backgroundColor: 'transparent',
32
+ padding: theme.spacing(1, 1.5),
33
+ maxHeight: 40,
34
+ fontSize: '0.875rem',
35
+ fontWeight: 600,
36
+ borderRadius: theme.shape.borderRadius * 2,
37
+ '&:hover': {
38
+ backgroundColor: theme.palette.mode === 'light'
39
+ ? (0, styles_1.alpha)(theme.palette.common.black, 0.04)
40
+ : (0, styles_1.alpha)(theme.palette.common.white, 0.08),
41
+ },
42
+ [`.${Button_1.buttonClasses.endIcon} > *:nth-of-type(1)`]: {
43
+ fontSize: '24px',
44
+ },
45
+ }));
@@ -33,6 +33,7 @@ const NavigationHeader = () => {
33
33
  case utils_1.navigationRoutes.fromToken:
34
34
  return t(`header.from`);
35
35
  case utils_1.navigationRoutes.toToken:
36
+ case utils_1.navigationRoutes.toTokenNative:
36
37
  return t(`header.to`);
37
38
  case utils_1.navigationRoutes.fromChain:
38
39
  case utils_1.navigationRoutes.toChain:
@@ -49,6 +50,8 @@ const NavigationHeader = () => {
49
50
  return t(`header.swap`);
50
51
  }
51
52
  };
52
- 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.History, {}) })) }))) : 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", edge: "end", onClick: () => navigate(utils_1.navigationRoutes.settings) }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.SettingsOutlined, {}) })) }))] }) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "*", element: element || (0, jsx_runtime_1.jsx)(material_1.Box, { width: 28, height: 40 }) })] })] })));
53
+ 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.History, {}) })) }))) : 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: {
54
+ marginRight: -1.25,
55
+ } }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.SettingsOutlined, {}) })) }))] }) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "*", element: element || (0, jsx_runtime_1.jsx)(material_1.Box, { width: 28, height: 40 }) })] })] })));
53
56
  };
54
57
  exports.NavigationHeader = NavigationHeader;
@@ -13,23 +13,21 @@ exports.WalletHeader = void 0;
13
13
  const jsx_runtime_1 = require("react/jsx-runtime");
14
14
  const icons_material_1 = require("@mui/icons-material");
15
15
  const material_1 = require("@mui/material");
16
+ const react_1 = require("react");
16
17
  const react_i18next_1 = require("react-i18next");
17
18
  const react_router_dom_1 = require("react-router-dom");
19
+ const hooks_1 = require("../../hooks");
18
20
  const providers_1 = require("../../providers");
19
21
  const utils_1 = require("../../utils");
22
+ const Menu_1 = require("../Menu");
20
23
  const Header_style_1 = require("./Header.style");
21
24
  const WalletHeader = () => {
22
- const { t } = (0, react_i18next_1.useTranslation)();
23
- const { account, disconnect } = (0, providers_1.useWallet)();
24
- const walletAddress = (0, utils_1.shortenWalletAddress)(account.address);
25
- return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: walletAddress ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
26
- display: 'flex',
27
- flex: 1,
28
- flexDirection: 'column',
29
- }, mr: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "caption", align: "right" }, { children: t(`header.walletConnected`) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600" }, { children: walletAddress }))] })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: disconnect }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.Logout, {}) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600", flex: 1, mr: 0.5 }, { children: t(`header.connectWallet`) })), (0, jsx_runtime_1.jsx)(ConnectButton, {})] })) })));
25
+ const { account } = (0, providers_1.useWallet)();
26
+ return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0, sx: { justifyContent: 'flex-end' } }, { children: account.isActive ? (0, jsx_runtime_1.jsx)(ConnectedButton, {}) : (0, jsx_runtime_1.jsx)(ConnectButton, {}) })));
30
27
  };
31
28
  exports.WalletHeader = WalletHeader;
32
29
  const ConnectButton = () => {
30
+ const { t } = (0, react_i18next_1.useTranslation)();
33
31
  const { pathname } = (0, react_router_dom_1.useLocation)();
34
32
  const config = (0, providers_1.useWidgetConfig)();
35
33
  const { connect: walletConnect } = (0, providers_1.useWallet)();
@@ -41,5 +39,32 @@ const ConnectButton = () => {
41
39
  }
42
40
  navigate(utils_1.navigationRoutes.selectWallet);
43
41
  });
44
- return ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: !pathname.includes(utils_1.navigationRoutes.selectWallet) ? connect : undefined }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.WalletOutlined, {}) })));
42
+ return ((0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, Object.assign({ endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.WalletOutlined, {}), onClick: !pathname.includes(utils_1.navigationRoutes.selectWallet) ? connect : undefined, sx: {
43
+ marginRight: -1.25,
44
+ } }, { children: t(`button.connectWallet`) })));
45
+ };
46
+ const ConnectedButton = () => {
47
+ const { t } = (0, react_i18next_1.useTranslation)();
48
+ const { account, disconnect } = (0, providers_1.useWallet)();
49
+ const walletAddress = (0, utils_1.shortenWalletAddress)(account.address);
50
+ const { chain } = (0, hooks_1.useChain)(account.chainId);
51
+ const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
52
+ const handleClick = (event) => {
53
+ setAnchorEl(event.currentTarget);
54
+ };
55
+ const handleClose = () => {
56
+ setAnchorEl(null);
57
+ };
58
+ const handleDisconnect = () => {
59
+ disconnect();
60
+ handleClose();
61
+ };
62
+ const handleCopyAddress = () => __awaiter(void 0, void 0, void 0, function* () {
63
+ var _a;
64
+ yield navigator.clipboard.writeText((_a = account.address) !== null && _a !== void 0 ? _a : '');
65
+ handleClose();
66
+ });
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
+ 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.PowerSettingsNew, {}), t(`button.disconnectWallet`)] }))] }))] }));
45
70
  };
@@ -0,0 +1 @@
1
+ export declare const Menu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Menu = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const Menu_1 = require("@mui/material/Menu");
6
+ const MenuItem_1 = require("@mui/material/MenuItem");
7
+ const styles_1 = require("@mui/material/styles");
8
+ const SvgIcon_1 = require("@mui/material/SvgIcon");
9
+ exports.Menu = (0, styles_1.styled)(material_1.Menu)(({ theme }) => ({
10
+ [`& .${Menu_1.menuClasses.paper}`]: {
11
+ borderRadius: theme.shape.borderRadiusSecondary,
12
+ color: theme.palette.text.primary,
13
+ [`& .${Menu_1.menuClasses.list}`]: {
14
+ padding: theme.spacing(0.5, 0),
15
+ },
16
+ [`& .${MenuItem_1.menuItemClasses.root}`]: {
17
+ [`& .${SvgIcon_1.svgIconClasses.root}`]: {
18
+ fontSize: 18,
19
+ color: theme.palette.text.primary,
20
+ marginRight: theme.spacing(1.5),
21
+ },
22
+ },
23
+ },
24
+ }));