@dynamic-labs/sdk-react-core 0.18.0-RC.8 → 0.18.0-beta.28

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 (630) hide show
  1. package/CHANGELOG.md +275 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +9 -9
  5. package/src/index.cjs +19 -11
  6. package/src/index.d.ts +3 -1
  7. package/src/index.js +9 -4
  8. package/src/lib/Main.cjs +53 -10
  9. package/src/lib/Main.js +53 -10
  10. package/src/lib/assets/index.d.ts +1 -0
  11. package/src/lib/assets/no-wallet-found.cjs +75 -0
  12. package/src/lib/assets/no-wallet-found.js +51 -0
  13. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +4 -2
  14. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +4 -2
  15. package/src/lib/components/AnimatePresence/AnimatePresence.cjs +4 -2
  16. package/src/lib/components/AnimatePresence/AnimatePresence.js +4 -2
  17. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +4 -2
  18. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +4 -2
  19. package/src/lib/components/Button/Button.cjs +12 -4
  20. package/src/lib/components/Button/Button.d.ts +3 -2
  21. package/src/lib/components/Button/Button.js +12 -4
  22. package/src/lib/components/ChainCard/ChainCard.cjs +1 -1
  23. package/src/lib/components/ChainCard/ChainCard.js +1 -1
  24. package/src/lib/components/Divider/Divider.cjs +4 -2
  25. package/src/lib/components/Divider/Divider.js +4 -2
  26. package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +2 -2
  27. package/src/lib/components/IconWithSpinner/IconWithSpinner.js +2 -2
  28. package/src/lib/components/InlineWidget/InlineWidget.cjs +12 -0
  29. package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
  30. package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
  31. package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
  32. package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
  33. package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
  34. package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
  35. package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
  36. package/src/lib/components/InlineWidget/index.d.ts +2 -0
  37. package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.cjs +9 -0
  38. package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.d.ts +2 -0
  39. package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.js +5 -0
  40. package/src/lib/components/LegacySafariCssOverrides/index.d.ts +1 -0
  41. package/src/lib/components/LogoutButton/LogoutButton.cjs +17 -3
  42. package/src/lib/components/LogoutButton/LogoutButton.js +17 -3
  43. package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +86 -0
  44. package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
  45. package/src/lib/components/MenuList/Dropdown/Dropdown.js +82 -0
  46. package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
  47. package/src/lib/components/MenuList/MenuList/MenuList.cjs +34 -0
  48. package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
  49. package/src/lib/components/MenuList/MenuList/MenuList.js +30 -0
  50. package/src/lib/components/MenuList/MenuList/index.d.ts +1 -0
  51. package/src/lib/components/MenuList/index.d.ts +1 -0
  52. package/src/lib/components/MenuList/utils/index.d.ts +1 -0
  53. package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +6 -1
  54. package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +5 -0
  55. package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +6 -1
  56. package/src/lib/components/Modal/Modal.cjs +39 -1
  57. package/src/lib/components/Modal/Modal.d.ts +3 -0
  58. package/src/lib/components/Modal/Modal.js +39 -1
  59. package/src/lib/components/ModalCard/ModalCard.cjs +4 -1
  60. package/src/lib/components/ModalCard/ModalCard.d.ts +6 -1
  61. package/src/lib/components/ModalCard/ModalCard.js +4 -1
  62. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +13 -15
  63. package/src/lib/components/NetworkPicker/NetworkPicker.js +13 -15
  64. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +4 -2
  65. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +4 -2
  66. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +4 -2
  67. package/src/lib/components/NetworkPicker/components/Network/Network.js +4 -2
  68. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +0 -5
  69. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +1 -1
  70. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +0 -5
  71. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +4 -2
  72. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +4 -2
  73. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +4 -2
  74. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +4 -2
  75. package/src/lib/components/OverlayCard/OverlayCard.cjs +13 -13
  76. package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
  77. package/src/lib/components/OverlayCard/OverlayCard.js +14 -13
  78. package/src/lib/components/Popper/Popper/Popper.cjs +12 -12
  79. package/src/lib/components/Popper/Popper/Popper.d.ts +7 -4
  80. package/src/lib/components/Popper/Popper/Popper.js +12 -12
  81. package/src/lib/components/Popper/PopperContent/PopperContent.cjs +1 -1
  82. package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +2 -1
  83. package/src/lib/components/Popper/PopperContent/PopperContent.js +1 -1
  84. package/src/lib/components/Popper/PopperContext/PopperContext.js +1 -1
  85. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +1 -0
  86. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +1 -0
  87. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +1 -0
  88. package/src/lib/components/Popper/utils/index.d.ts +0 -1
  89. package/src/lib/components/Portal/Portal.cjs +6 -4
  90. package/src/lib/components/Portal/Portal.js +6 -4
  91. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +9 -1
  92. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +9 -1
  93. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
  94. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
  95. package/src/lib/components/ShadowDOM/ShadowDOM.cjs +4 -2
  96. package/src/lib/components/ShadowDOM/ShadowDOM.js +4 -2
  97. package/src/lib/components/Step/Step.cjs +35 -3
  98. package/src/lib/components/Step/Step.d.ts +3 -3
  99. package/src/lib/components/Step/Step.js +36 -4
  100. package/src/lib/components/Toolkit/Toolkit.cjs +3 -3
  101. package/src/lib/components/Toolkit/Toolkit.js +3 -3
  102. package/src/lib/components/Toolkit/components/MultiWalletSwitch.cjs +18 -0
  103. package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +8 -0
  104. package/src/lib/components/Toolkit/components/MultiWalletSwitch.js +14 -0
  105. package/src/lib/components/Toolkit/components/index.d.ts +1 -1
  106. package/src/lib/components/Tooltip/Tooltip.cjs +4 -2
  107. package/src/lib/components/Tooltip/Tooltip.js +4 -2
  108. package/src/lib/components/TosAndPp/TosAndPp.cjs +18 -3
  109. package/src/lib/components/TosAndPp/TosAndPp.d.ts +1 -6
  110. package/src/lib/components/TosAndPp/TosAndPp.js +19 -4
  111. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
  112. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
  113. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +5 -3
  114. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +5 -3
  115. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +4 -2
  116. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +4 -2
  117. package/src/lib/components/UserAddress/UserAddress.cjs +32 -2
  118. package/src/lib/components/UserAddress/UserAddress.d.ts +4 -2
  119. package/src/lib/components/UserAddress/UserAddress.js +32 -2
  120. package/src/lib/components/UserProfile/UserProfile.cjs +6 -14
  121. package/src/lib/components/UserProfile/UserProfile.js +6 -14
  122. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +4 -2
  123. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +4 -2
  124. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +4 -2
  125. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +4 -2
  126. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +17 -67
  127. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.d.ts +2 -4
  128. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +17 -67
  129. package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +33 -0
  130. package/src/lib/components/WalletInformationCard/WalletInformationCard.d.ts +11 -0
  131. package/src/lib/components/WalletInformationCard/WalletInformationCard.js +29 -0
  132. package/src/lib/components/WalletInformationCard/index.d.ts +1 -0
  133. package/src/lib/components/index.d.ts +3 -0
  134. package/src/lib/context/AccountExistsContext/AccountExistsContext.cjs +27 -0
  135. package/src/lib/context/AccountExistsContext/AccountExistsContext.d.ts +17 -0
  136. package/src/lib/context/AccountExistsContext/AccountExistsContext.js +21 -0
  137. package/src/lib/context/AccountExistsContext/index.d.ts +1 -0
  138. package/src/lib/context/DynamicContext/DynamicContext.cjs +190 -84
  139. package/src/lib/context/DynamicContext/DynamicContext.d.ts +13 -127
  140. package/src/lib/context/DynamicContext/DynamicContext.js +193 -88
  141. package/src/lib/context/DynamicContext/helpers.cjs +16 -2
  142. package/src/lib/context/DynamicContext/helpers.d.ts +8 -0
  143. package/src/lib/context/DynamicContext/helpers.js +16 -3
  144. package/src/lib/context/DynamicContext/hooks/index.d.ts +4 -1
  145. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +1 -1
  146. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +1 -1
  147. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/index.d.ts +1 -0
  148. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +33 -0
  149. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.d.ts +1 -0
  150. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +29 -0
  151. package/src/lib/context/DynamicContext/types/index.d.ts +146 -0
  152. package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +7 -2
  153. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +4 -2
  154. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +4 -2
  155. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +9 -3
  156. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
  157. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +9 -3
  158. package/src/lib/context/DynamicContext/useDynamicContext.cjs +8 -3
  159. package/src/lib/context/DynamicContext/useDynamicContext.d.ts +2 -2
  160. package/src/lib/context/DynamicContext/useDynamicContext.js +8 -3
  161. package/src/lib/context/DynamicContext/useInternalDynamicContext.d.ts +1 -1
  162. package/src/lib/context/FundingContext/FundingContext.cjs +13 -1
  163. package/src/lib/context/FundingContext/FundingContext.js +13 -1
  164. package/src/lib/context/MockContext/MockContext.cjs +36 -2
  165. package/src/lib/context/MockContext/MockContext.d.ts +1 -1
  166. package/src/lib/context/MockContext/MockContext.js +36 -2
  167. package/src/lib/context/MockContext/constants/index.cjs +64 -0
  168. package/src/lib/context/MockContext/constants/index.d.ts +2 -0
  169. package/src/lib/context/MockContext/constants/index.js +60 -0
  170. package/src/lib/context/QrCodeContext/QrCodeContext.cjs +4 -2
  171. package/src/lib/context/QrCodeContext/QrCodeContext.js +4 -2
  172. package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +4 -2
  173. package/src/lib/context/SendBalanceContext/SendBalanceContext.js +4 -2
  174. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +6 -5
  175. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +6 -5
  176. package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
  177. package/src/lib/context/WalletContext/WalletContext.cjs +4 -1
  178. package/src/lib/context/WalletContext/WalletContext.js +4 -1
  179. package/src/lib/data/api.cjs +27 -0
  180. package/src/lib/data/api.d.ts +4 -0
  181. package/src/lib/data/api.js +28 -2
  182. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +25 -21
  183. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +26 -22
  184. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +7 -3
  185. package/src/lib/layout/DynamicAuthLayout/Header/header.js +7 -3
  186. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +5 -3
  187. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +5 -3
  188. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +4 -2
  189. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +4 -2
  190. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +1 -1
  191. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.js +1 -1
  192. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +4 -2
  193. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +4 -2
  194. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +4 -2
  195. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +4 -2
  196. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +4 -2
  197. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +4 -2
  198. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +8 -5
  199. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +8 -5
  200. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +61 -0
  201. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.d.ts +2 -0
  202. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +57 -0
  203. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/index.d.ts +1 -0
  204. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
  205. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
  206. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
  207. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
  208. package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +1 -0
  209. package/src/lib/layouts/{SelectWalletListLayout/SelectWalletListLayout.cjs → BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs} +8 -7
  210. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.d.ts +9 -0
  211. package/src/lib/layouts/{SelectWalletListLayout/SelectWalletListLayout.js → BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js} +8 -7
  212. package/src/lib/layouts/BridgeNextWalletToConnectLayout/index.d.ts +1 -0
  213. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +4 -2
  214. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +4 -2
  215. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +6 -4
  216. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
  217. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +6 -4
  218. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +4 -2
  219. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +4 -2
  220. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +4 -2
  221. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +4 -2
  222. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +4 -2
  223. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +4 -2
  224. package/src/lib/modals/index.d.ts +0 -1
  225. package/src/lib/shared/types/index.d.ts +6 -2
  226. package/src/lib/shared/utils/classes/storage/localStorage.cjs +42 -24
  227. package/src/lib/shared/utils/classes/storage/localStorage.d.ts +17 -3
  228. package/src/lib/shared/utils/classes/storage/localStorage.js +43 -25
  229. package/src/lib/shared/utils/hooks/index.d.ts +2 -0
  230. package/src/lib/shared/utils/hooks/useEffectOnce/index.d.ts +1 -0
  231. package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.cjs +27 -0
  232. package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.d.ts +17 -0
  233. package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.js +23 -0
  234. package/src/lib/shared/utils/hooks/useForwardedRef/index.d.ts +1 -0
  235. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs +25 -0
  236. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +2 -0
  237. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js +21 -0
  238. package/src/lib/styles/index.shadow.cjs +1 -1
  239. package/src/lib/styles/index.shadow.js +1 -1
  240. package/src/lib/utils/constants/localStorage.cjs +3 -1
  241. package/src/lib/utils/constants/localStorage.d.ts +1 -0
  242. package/src/lib/utils/constants/localStorage.js +3 -2
  243. package/src/lib/utils/constants/onrampProviders.cjs +7 -0
  244. package/src/lib/utils/constants/onrampProviders.d.ts +1 -0
  245. package/src/lib/utils/constants/onrampProviders.js +3 -0
  246. package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +10 -1
  247. package/src/lib/utils/functions/createUserProfile/createUserProfile.js +10 -1
  248. package/src/lib/utils/functions/generateMessages/index.cjs +3 -3
  249. package/src/lib/utils/functions/generateMessages/index.d.ts +1 -1
  250. package/src/lib/utils/functions/generateMessages/index.js +3 -3
  251. package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +2 -1
  252. package/src/lib/utils/functions/getAuthToken/getAuthToken.d.ts +1 -1
  253. package/src/lib/utils/functions/getAuthToken/getAuthToken.js +2 -1
  254. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +1 -0
  255. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +1 -0
  256. package/src/lib/utils/functions/getMissingChains/getMissingChains.cjs +16 -0
  257. package/src/lib/utils/functions/getMissingChains/getMissingChains.d.ts +3 -0
  258. package/src/lib/utils/functions/getMissingChains/getMissingChains.js +12 -0
  259. package/src/lib/utils/functions/getMissingChains/index.d.ts +1 -0
  260. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -2
  261. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +3 -3
  262. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -2
  263. package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
  264. package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
  265. package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
  266. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +3 -1
  267. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -1
  268. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +3 -1
  269. package/src/lib/utils/functions/index.d.ts +4 -0
  270. package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +4 -2
  271. package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +4 -2
  272. package/src/lib/utils/functions/isOnrampProvider/index.d.ts +1 -0
  273. package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.cjs +9 -0
  274. package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.d.ts +2 -0
  275. package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.js +5 -0
  276. package/src/lib/utils/functions/isProviderEnabled/index.d.ts +1 -0
  277. package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.cjs +7 -0
  278. package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.d.ts +2 -0
  279. package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.js +3 -0
  280. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +2 -2
  281. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.d.ts +1 -1
  282. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +2 -2
  283. package/src/lib/utils/functions/isSocialKycEnabled/index.d.ts +1 -0
  284. package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs +7 -0
  285. package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.d.ts +2 -0
  286. package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.js +3 -0
  287. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
  288. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
  289. package/src/lib/utils/functions/storeAuthToken/index.cjs +1 -3
  290. package/src/lib/utils/functions/storeAuthToken/index.js +1 -3
  291. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +1 -1
  292. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +1 -1
  293. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +31 -6
  294. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +32 -7
  295. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +11 -2
  296. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +11 -2
  297. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
  298. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
  299. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +5 -2
  300. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +5 -2
  301. package/src/lib/utils/hooks/index.d.ts +2 -0
  302. package/src/lib/utils/hooks/multiWallet/useMultiWallet/index.d.ts +1 -0
  303. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +17 -0
  304. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +8 -0
  305. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +13 -0
  306. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +22 -5
  307. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +5 -2
  308. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +22 -5
  309. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +9 -11
  310. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +9 -11
  311. package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.cjs +29 -0
  312. package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.d.ts +5 -0
  313. package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.js +25 -0
  314. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +22 -5
  315. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
  316. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +22 -5
  317. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -0
  318. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -0
  319. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +16 -3
  320. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +16 -3
  321. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +142 -97
  322. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +17 -15
  323. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +143 -98
  324. package/src/lib/utils/hooks/useConnectWithEmail/index.d.ts +1 -0
  325. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +6 -4
  326. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +1 -4
  327. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +6 -4
  328. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs +13 -23
  329. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
  330. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js +13 -23
  331. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +69 -0
  332. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.d.ts +1 -0
  333. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +65 -0
  334. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +5 -4
  335. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
  336. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +5 -4
  337. package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
  338. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
  339. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
  340. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
  341. package/src/lib/utils/hooks/useEmailProvider/index.d.ts +1 -0
  342. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +54 -0
  343. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.d.ts +10 -0
  344. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +50 -0
  345. package/src/lib/utils/hooks/useEventListener/index.d.ts +1 -0
  346. package/src/lib/utils/hooks/useEventListener/useEventListener.cjs +25 -0
  347. package/src/lib/utils/hooks/useEventListener/useEventListener.d.ts +1 -0
  348. package/src/lib/utils/hooks/useEventListener/useEventListener.js +21 -0
  349. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +2 -1
  350. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +3 -1
  351. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -2
  352. package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +6 -10
  353. package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +7 -11
  354. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +20 -5
  355. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +20 -5
  356. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +17 -2
  357. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +17 -2
  358. package/src/lib/utils/hooks/usePromise/usePromise.cjs +93 -29
  359. package/src/lib/utils/hooks/usePromise/usePromise.d.ts +33 -3
  360. package/src/lib/utils/hooks/usePromise/usePromise.js +94 -30
  361. package/src/lib/utils/hooks/usePromise/usePromise.types.d.ts +9 -0
  362. package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.cjs +18 -0
  363. package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.d.ts +13 -0
  364. package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.js +14 -0
  365. package/src/lib/utils/hooks/usePromise/utils/createReducer/index.d.ts +1 -0
  366. package/src/lib/utils/hooks/usePromise/utils/index.d.ts +2 -0
  367. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/index.d.ts +1 -0
  368. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +32 -0
  369. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.d.ts +5 -0
  370. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +28 -0
  371. package/src/lib/utils/hooks/useSocialAccounts/index.d.ts +1 -0
  372. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +159 -0
  373. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +10 -0
  374. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +155 -0
  375. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
  376. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
  377. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
  378. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +32 -6
  379. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.d.ts +8 -4
  380. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +33 -7
  381. package/src/lib/utils/hooks/useValidateSession/index.d.ts +1 -0
  382. package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +82 -0
  383. package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +12 -0
  384. package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +78 -0
  385. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +18 -21
  386. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +2 -2
  387. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +19 -22
  388. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +12 -2
  389. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +4 -2
  390. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +12 -2
  391. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +31 -4
  392. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +5 -4
  393. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +31 -4
  394. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +7 -6
  395. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +7 -6
  396. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +4 -2
  397. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +4 -2
  398. package/src/lib/utils/hooks/useWallets/useWallets.cjs +6 -0
  399. package/src/lib/utils/hooks/useWallets/useWallets.js +7 -1
  400. package/src/lib/utils/hooks/useWallets/utils/index.d.ts +1 -0
  401. package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/index.d.ts +1 -0
  402. package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +35 -0
  403. package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.d.ts +6 -0
  404. package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +29 -0
  405. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +73 -0
  406. package/src/lib/views/AccountExistsView/AccountExistsView.d.ts +2 -0
  407. package/src/lib/views/AccountExistsView/AccountExistsView.js +69 -0
  408. package/src/lib/views/AccountExistsView/index.d.ts +1 -0
  409. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +38 -0
  410. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.d.ts +2 -0
  411. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +34 -0
  412. package/src/lib/views/BridgeNextWalletConnectionView/index.d.ts +1 -0
  413. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +44 -0
  414. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.d.ts +2 -0
  415. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +40 -0
  416. package/src/lib/views/BridgeSummaryView/index.d.ts +1 -0
  417. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +48 -0
  418. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.d.ts +2 -0
  419. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +44 -0
  420. package/src/lib/views/BridgeWelcomeView/index.d.ts +1 -0
  421. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +6 -5
  422. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +6 -5
  423. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +5 -3
  424. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +5 -3
  425. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +14 -5
  426. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +14 -5
  427. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +4 -2
  428. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +4 -2
  429. package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +8 -4
  430. package/src/lib/views/CollectUserDataView/fieldsConfig.js +8 -4
  431. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +5 -3
  432. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +5 -3
  433. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +5 -3
  434. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +5 -3
  435. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +4 -2
  436. package/src/lib/views/EmailUpdate/EmailUpdate.js +4 -2
  437. package/src/lib/views/EmailVerification/EmailVerification.cjs +14 -6
  438. package/src/lib/views/EmailVerification/EmailVerification.js +15 -7
  439. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +4 -2
  440. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +4 -2
  441. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +5 -3
  442. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +5 -3
  443. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +27 -52
  444. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +27 -52
  445. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +2 -2
  446. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +2 -2
  447. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +11 -7
  448. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +11 -7
  449. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +28 -23
  450. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +29 -24
  451. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +28 -22
  452. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +28 -22
  453. package/src/lib/views/NoAccess/NoAccess.cjs +16 -23
  454. package/src/lib/views/NoAccess/NoAccess.js +16 -23
  455. package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
  456. package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
  457. package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
  458. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +4 -2
  459. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +4 -2
  460. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +4 -2
  461. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +4 -2
  462. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +4 -2
  463. package/src/lib/views/PendingConnectView/PendingConnectView.js +4 -2
  464. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +4 -2
  465. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +4 -2
  466. package/src/lib/views/QrCodeView/QRCode.cjs +4 -2
  467. package/src/lib/views/QrCodeView/QRCode.js +4 -2
  468. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +4 -2
  469. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +4 -2
  470. package/src/lib/views/QrCodeView/QrCodeView.cjs +4 -2
  471. package/src/lib/views/QrCodeView/QrCodeView.js +4 -2
  472. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +6 -4
  473. package/src/lib/views/SendBalanceView/SendBalanceView.js +6 -4
  474. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +4 -2
  475. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +4 -2
  476. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -2
  477. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -2
  478. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +4 -2
  479. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +4 -2
  480. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +5 -3
  481. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +5 -3
  482. package/src/lib/views/WalletList/{SearchInstead/SearchInstead.cjs → SearchNotFoundMessage/SearchNotFoundMessage.cjs} +7 -4
  483. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +8 -0
  484. package/src/lib/views/WalletList/{SearchInstead/SearchInstead.js → SearchNotFoundMessage/SearchNotFoundMessage.js} +7 -4
  485. package/src/lib/views/WalletList/SearchNotFoundMessage/index.d.ts +1 -0
  486. package/src/lib/views/WalletList/WalletList.cjs +9 -7
  487. package/src/lib/views/WalletList/WalletList.js +10 -8
  488. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +9 -6
  489. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +9 -6
  490. package/src/lib/views/WalletList/WalletListItem/WalletListItem.types.d.ts +1 -2
  491. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +5 -3
  492. package/src/lib/views/WalletLockedView/WalletLockedView.js +5 -3
  493. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -2
  494. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -2
  495. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +9 -4
  496. package/src/lib/views/WalletUsedView/WalletUsedView.js +9 -4
  497. package/src/lib/views/viewToComponentMap.cjs +9 -0
  498. package/src/lib/views/viewToComponentMap.js +9 -0
  499. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +19 -11
  500. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -4
  501. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +20 -12
  502. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +4 -2
  503. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +4 -2
  504. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +4 -2
  505. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.d.ts +1 -1
  506. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +4 -2
  507. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +31 -10
  508. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +0 -1
  509. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +32 -11
  510. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +61 -0
  511. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.d.ts +7 -0
  512. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +57 -0
  513. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/index.d.ts +1 -0
  514. package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +2 -0
  515. package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +2 -0
  516. package/src/lib/widgets/DynamicBridgeWidget/index.d.ts +0 -1
  517. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +20 -13
  518. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +20 -13
  519. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +11 -11
  520. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.d.ts +6 -6
  521. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +12 -12
  522. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +14 -6
  523. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +16 -8
  524. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +4 -2
  525. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +4 -2
  526. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +10 -8
  527. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +10 -8
  528. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +5 -3
  529. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +5 -3
  530. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +8 -6
  531. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
  532. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +8 -6
  533. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +4 -2
  534. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +4 -2
  535. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +8 -4
  536. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +8 -4
  537. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +4 -2
  538. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +4 -2
  539. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +7 -5
  540. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +7 -5
  541. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +4 -2
  542. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +4 -2
  543. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +4 -2
  544. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +4 -2
  545. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +5 -3
  546. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +5 -3
  547. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +4 -2
  548. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +4 -2
  549. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +4 -2
  550. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +4 -2
  551. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +4 -2
  552. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +4 -2
  553. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +5 -3
  554. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +5 -3
  555. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +6 -4
  556. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +6 -4
  557. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +4 -2
  558. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +4 -2
  559. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +4 -2
  560. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +4 -2
  561. package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +17 -1
  562. package/src/lib/widgets/DynamicWidget/helpers/helpers.js +17 -1
  563. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +4 -2
  564. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +4 -2
  565. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +4 -2
  566. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +4 -2
  567. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +4 -2
  568. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +4 -2
  569. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
  570. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
  571. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +4 -2
  572. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +4 -2
  573. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +4 -2
  574. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +4 -2
  575. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +4 -2
  576. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +4 -2
  577. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +5 -3
  578. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +5 -3
  579. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +4 -2
  580. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +4 -2
  581. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +4 -2
  582. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +4 -2
  583. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +4 -2
  584. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +4 -2
  585. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +4 -2
  586. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +4 -2
  587. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +4 -2
  588. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +4 -2
  589. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +4 -2
  590. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +4 -2
  591. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +4 -2
  592. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +4 -2
  593. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +4 -2
  594. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +4 -2
  595. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -71
  596. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
  597. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -65
  598. package/src/lib/components/NetworkPicker/components/ActionList/index.d.ts +0 -1
  599. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +0 -1
  600. package/src/lib/components/Toolkit/components/BrandStyleSwitch.cjs +0 -22
  601. package/src/lib/components/Toolkit/components/BrandStyleSwitch.d.ts +0 -2
  602. package/src/lib/components/Toolkit/components/BrandStyleSwitch.js +0 -18
  603. package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.cjs +0 -77
  604. package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.d.ts +0 -2
  605. package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.js +0 -73
  606. package/src/lib/modals/MultiWalletStepSelectorModal/index.d.ts +0 -1
  607. package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.cjs +0 -62
  608. package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.d.ts +0 -6
  609. package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.js +0 -58
  610. package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/index.d.ts +0 -1
  611. package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.cjs +0 -89
  612. package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.d.ts +0 -8
  613. package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.js +0 -85
  614. package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/index.d.ts +0 -1
  615. package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.cjs +0 -72
  616. package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.d.ts +0 -7
  617. package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.js +0 -68
  618. package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/index.d.ts +0 -1
  619. package/src/lib/modals/MultiWalletStepSelectorModal/views/index.d.ts +0 -3
  620. package/src/lib/utils/functions/groupBy/groupBy.cjs +0 -30
  621. package/src/lib/utils/functions/groupBy/groupBy.js +0 -26
  622. package/src/lib/views/WalletList/SearchInstead/SearchInstead.d.ts +0 -2
  623. package/src/lib/views/WalletList/SearchInstead/index.d.ts +0 -1
  624. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.cjs +0 -23
  625. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.d.ts +0 -8
  626. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.js +0 -19
  627. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -53
  628. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -10
  629. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -45
  630. /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
@@ -20,13 +20,17 @@ require('@dynamic-labs/wallet-book');
20
20
  require('../../utils/constants/colors.cjs');
21
21
  require('../../shared/utils/classes/storage/localStorage.cjs');
22
22
  require('ethers');
23
+ var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
23
24
  require('../../shared/consts/index.cjs');
24
25
  require('@dynamic-labs/multi-wallet');
25
26
  require('@dynamic-labs/rpc-providers');
27
+ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
26
28
  require('../../context/DynamicContext/DynamicContext.cjs');
27
29
  require('../../context/ErrorContext/ErrorContext.cjs');
28
30
  require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
29
- require('../ShadowDOM/ShadowDOM.cjs');
31
+ require('../../context/AccountExistsContext/AccountExistsContext.cjs');
32
+ var classNames = require('../../utils/functions/classNames/classNames.cjs');
33
+ var ShadowDOM = require('../ShadowDOM/ShadowDOM.cjs');
30
34
  require('../../context/ThemeContext/ThemeContext.cjs');
31
35
  require('react-focus-lock');
32
36
  require('../IconButton/IconButton.cjs');
@@ -35,24 +39,20 @@ require('../Popper/Popper/Popper.cjs');
35
39
  require('../Popper/PopperContext/PopperContext.cjs');
36
40
  require('formik');
37
41
  require('yup');
38
- require('../../context/WalletGroupContext/WalletGroupContext.cjs');
39
- require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
42
+ require('../InlineWidget/InlineWidget.cjs');
43
+ require('../MenuList/Dropdown/Dropdown.cjs');
40
44
  require('../../context/MockContext/MockContext.cjs');
41
45
  require('../../context/CaptchaContext/CaptchaContext.cjs');
42
46
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
43
47
  var OverlayCard_context = require('./OverlayCard.context.cjs');
44
48
 
45
- const noContextError = new Error('OverlayCard is not a child of OverlayCardTarget, please add OverlayCardTarget where the card should be displayed');
46
- const OverlayCard = ({ isOpen, children, onClickOverlay, }) => {
49
+ const OverlayCard = ({ isOpen, children, onClickOverlay, style, className, }) => {
47
50
  const context = React.useContext(OverlayCard_context.overlayCardContext);
48
- if (!context) {
49
- throw noContextError;
50
- }
51
- const { portal } = context;
52
- if (!portal)
53
- return null;
54
- return reactDom.createPortal(jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(SlideInUpTransition.SlideInUpTransition, {}) }, { children: isOpen && (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && jsxRuntime.jsx("div", Object.assign({ className: 'overlay-card--content' }, { children: children })) }))) }))] }), portal);
51
+ usePreventPageScroll.usePreventPageScroll(isOpen && !context.portal);
52
+ const content = (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(SlideInUpTransition.SlideInUpTransition, {}) }, { children: isOpen && (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames(className, 'overlay-card--content'), style: style }, { children: children }))) }))) }))] }));
53
+ if (context === null || context === void 0 ? void 0 : context.portal)
54
+ return reactDom.createPortal(content, context.portal);
55
+ return reactDom.createPortal(jsxRuntime.jsx(ShadowDOM.ShadowDOM, { children: content }), document.body);
55
56
  };
56
57
 
57
58
  exports.OverlayCard = OverlayCard;
58
- exports.noContextError = noContextError;
@@ -1,8 +1,10 @@
1
- import { FC, MouseEventHandler, PropsWithChildren } from 'react';
1
+ import { CSSProperties, FC, MouseEventHandler, PropsWithChildren } from 'react';
2
2
  type OverlayCardProps = {
3
3
  isOpen: boolean;
4
4
  onClickOverlay?: MouseEventHandler<HTMLDivElement>;
5
+ style?: CSSProperties;
6
+ className?: string;
7
+ maxHeight?: number;
5
8
  };
6
- export declare const noContextError: Error;
7
9
  export declare const OverlayCard: FC<PropsWithChildren<OverlayCardProps>>;
8
10
  export {};
@@ -16,13 +16,17 @@ import '@dynamic-labs/wallet-book';
16
16
  import '../../utils/constants/colors.js';
17
17
  import '../../shared/utils/classes/storage/localStorage.js';
18
18
  import 'ethers';
19
+ import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
19
20
  import '../../shared/consts/index.js';
20
21
  import '@dynamic-labs/multi-wallet';
21
22
  import '@dynamic-labs/rpc-providers';
23
+ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
22
24
  import '../../context/DynamicContext/DynamicContext.js';
23
25
  import '../../context/ErrorContext/ErrorContext.js';
24
26
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
25
- import '../ShadowDOM/ShadowDOM.js';
27
+ import '../../context/AccountExistsContext/AccountExistsContext.js';
28
+ import { classNames } from '../../utils/functions/classNames/classNames.js';
29
+ import { ShadowDOM } from '../ShadowDOM/ShadowDOM.js';
26
30
  import '../../context/ThemeContext/ThemeContext.js';
27
31
  import 'react-focus-lock';
28
32
  import '../IconButton/IconButton.js';
@@ -31,23 +35,20 @@ import '../Popper/Popper/Popper.js';
31
35
  import '../Popper/PopperContext/PopperContext.js';
32
36
  import 'formik';
33
37
  import 'yup';
34
- import '../../context/WalletGroupContext/WalletGroupContext.js';
35
- import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
38
+ import '../InlineWidget/InlineWidget.js';
39
+ import '../MenuList/Dropdown/Dropdown.js';
36
40
  import '../../context/MockContext/MockContext.js';
37
41
  import '../../context/CaptchaContext/CaptchaContext.js';
38
42
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
39
43
  import { overlayCardContext } from './OverlayCard.context.js';
40
44
 
41
- const noContextError = new Error('OverlayCard is not a child of OverlayCardTarget, please add OverlayCardTarget where the card should be displayed');
42
- const OverlayCard = ({ isOpen, children, onClickOverlay, }) => {
45
+ const OverlayCard = ({ isOpen, children, onClickOverlay, style, className, }) => {
43
46
  const context = useContext(overlayCardContext);
44
- if (!context) {
45
- throw noContextError;
46
- }
47
- const { portal } = context;
48
- if (!portal)
49
- return null;
50
- return createPortal(jsxs("div", { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(SlideInUpTransition, {}) }, { children: isOpen && (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && jsx("div", Object.assign({ className: 'overlay-card--content' }, { children: children })) }))) }))] }), portal);
47
+ usePreventPageScroll(isOpen && !context.portal);
48
+ const content = (jsxs("div", { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(SlideInUpTransition, {}) }, { children: isOpen && (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", Object.assign({ className: classNames(className, 'overlay-card--content'), style: style }, { children: children }))) }))) }))] }));
49
+ if (context === null || context === void 0 ? void 0 : context.portal)
50
+ return createPortal(content, context.portal);
51
+ return createPortal(jsx(ShadowDOM, { children: content }), document.body);
51
52
  };
52
53
 
53
- export { OverlayCard, noContextError };
54
+ export { OverlayCard };
@@ -5,28 +5,28 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
7
  var reactDom = require('react-dom');
8
+ var PopperContent = require('../PopperContent/PopperContent.cjs');
8
9
  var PopperContext = require('../PopperContext/PopperContext.cjs');
9
10
  var getChildPosition = require('../utils/getChildPosition/getChildPosition.cjs');
10
- var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs');
11
- var PopperContent = require('../PopperContent/PopperContent.cjs');
12
11
 
13
- const Popper = React.forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, }, ref) => {
12
+ // eslint-disable-next-line multiline-comment-style
13
+ /** Allows to render content outside of the current DOM parent and specify a reference position
14
+ * To allow for opening and closing of menus, see MenuList and Dropdown components
15
+ */
16
+ const Popper = React.forwardRef(({ anchorRef, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, style, className, }, ref) => {
14
17
  const { containerRef } = PopperContext.usePopper();
15
18
  const [anchorPosition, setAnchorPosition] = React.useState();
16
19
  const container = containerRef.current;
20
+ // Calculates anchor position based on anchorOrigin's relative position to popper's container
21
+ // and sets up scroll listener to close popper
17
22
  React.useEffect(() => {
18
- if (!isOpen) {
19
- return setAnchorPosition(undefined);
20
- }
21
23
  const container = containerRef.current;
22
24
  const anchor = anchorRef.current;
23
25
  if (!container || !anchor)
24
26
  return;
25
27
  setAnchorPosition(getChildPosition.getChildPosition(container, anchor));
26
- return watchToScrollInHierarchy.watchToScrollInHierarchy(container, anchor, () => {
27
- setIsOpen(false);
28
- });
29
- }, [anchorRef, containerRef, isOpen, setAnchorPosition, setIsOpen]);
28
+ }, [anchorRef, containerRef, setAnchorPosition]);
29
+ /** Position of the anchor's vertex that was selected by anchorOrigin */
30
30
  const anchorOriginPosition = React.useMemo(() => {
31
31
  var _a;
32
32
  const anchorRect = (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
@@ -45,9 +45,9 @@ const Popper = React.forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin =
45
45
  return undefined;
46
46
  }
47
47
  }, [anchorPosition, anchorRef, anchorOrigin]);
48
- if (!isOpen || !anchorOriginPosition || container === null)
48
+ if (!anchorOriginPosition || container === null)
49
49
  return null;
50
- return reactDom.createPortal(jsxRuntime.jsx(PopperContent.PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: anchorOriginPosition }, { children: children })), container);
50
+ return reactDom.createPortal(jsxRuntime.jsx(PopperContent.PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: Object.assign(Object.assign({}, anchorOriginPosition), style), className: className }, { children: children })), container);
51
51
  });
52
52
  Popper.displayName = 'Popper';
53
53
 
@@ -1,12 +1,15 @@
1
- import { MutableRefObject } from 'react';
1
+ import { CSSProperties, MutableRefObject } from 'react';
2
2
  import { AnchorOrigin, TransformOrigin } from '../Popper.types';
3
3
  export type PopperProps = {
4
- anchorOrigin?: AnchorOrigin;
5
4
  anchorRef: MutableRefObject<HTMLElement | null>;
6
- isOpen: boolean;
7
- setIsOpen: (isOpen: boolean) => void;
5
+ anchorOrigin?: AnchorOrigin;
8
6
  transformOrigin?: TransformOrigin;
7
+ className?: string;
8
+ style?: CSSProperties;
9
9
  };
10
+ /** Allows to render content outside of the current DOM parent and specify a reference position
11
+ * To allow for opening and closing of menus, see MenuList and Dropdown components
12
+ */
10
13
  export declare const Popper: import("react").ForwardRefExoticComponent<PopperProps & {
11
14
  children?: import("react").ReactNode;
12
15
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,28 +1,28 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef, useState, useEffect, useMemo } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
+ import { PopperContent } from '../PopperContent/PopperContent.js';
4
5
  import { usePopper } from '../PopperContext/PopperContext.js';
5
6
  import { getChildPosition } from '../utils/getChildPosition/getChildPosition.js';
6
- import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js';
7
- import { PopperContent } from '../PopperContent/PopperContent.js';
8
7
 
9
- const Popper = forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, }, ref) => {
8
+ // eslint-disable-next-line multiline-comment-style
9
+ /** Allows to render content outside of the current DOM parent and specify a reference position
10
+ * To allow for opening and closing of menus, see MenuList and Dropdown components
11
+ */
12
+ const Popper = forwardRef(({ anchorRef, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, style, className, }, ref) => {
10
13
  const { containerRef } = usePopper();
11
14
  const [anchorPosition, setAnchorPosition] = useState();
12
15
  const container = containerRef.current;
16
+ // Calculates anchor position based on anchorOrigin's relative position to popper's container
17
+ // and sets up scroll listener to close popper
13
18
  useEffect(() => {
14
- if (!isOpen) {
15
- return setAnchorPosition(undefined);
16
- }
17
19
  const container = containerRef.current;
18
20
  const anchor = anchorRef.current;
19
21
  if (!container || !anchor)
20
22
  return;
21
23
  setAnchorPosition(getChildPosition(container, anchor));
22
- return watchToScrollInHierarchy(container, anchor, () => {
23
- setIsOpen(false);
24
- });
25
- }, [anchorRef, containerRef, isOpen, setAnchorPosition, setIsOpen]);
24
+ }, [anchorRef, containerRef, setAnchorPosition]);
25
+ /** Position of the anchor's vertex that was selected by anchorOrigin */
26
26
  const anchorOriginPosition = useMemo(() => {
27
27
  var _a;
28
28
  const anchorRect = (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
@@ -41,9 +41,9 @@ const Popper = forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin = 'top-l
41
41
  return undefined;
42
42
  }
43
43
  }, [anchorPosition, anchorRef, anchorOrigin]);
44
- if (!isOpen || !anchorOriginPosition || container === null)
44
+ if (!anchorOriginPosition || container === null)
45
45
  return null;
46
- return createPortal(jsx(PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: anchorOriginPosition }, { children: children })), container);
46
+ return createPortal(jsx(PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: Object.assign(Object.assign({}, anchorOriginPosition), style), className: className }, { children: children })), container);
47
47
  });
48
48
  Popper.displayName = 'Popper';
49
49
 
@@ -12,7 +12,7 @@ const mapTransformOriginToClassName = {
12
12
  'top-left': 'popper-content__transform-origin-top-left',
13
13
  'top-right': 'popper-content__transform-origin-top-right',
14
14
  };
15
- const PopperContent = React.forwardRef(({ children, transformOrigin, style }, ref) => (jsxRuntime.jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames.classNames('popper-content', mapTransformOriginToClassName[transformOrigin]), style: style }, { children: children }))));
15
+ const PopperContent = React.forwardRef(({ children, transformOrigin, style, className }, ref) => (jsxRuntime.jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames.classNames('popper-content', mapTransformOriginToClassName[transformOrigin], className), style: style }, { children: children }))));
16
16
  PopperContent.displayName = 'PopperContent';
17
17
 
18
18
  exports.PopperContent = PopperContent;
@@ -1,8 +1,9 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { TransformOrigin } from '../Popper.types';
3
3
  export type PopperContentProps = {
4
- style?: CSSProperties;
5
4
  transformOrigin: TransformOrigin;
5
+ style?: CSSProperties;
6
+ className?: string;
6
7
  };
7
8
  export declare const PopperContent: import("react").ForwardRefExoticComponent<PopperContentProps & {
8
9
  children?: import("react").ReactNode;
@@ -8,7 +8,7 @@ const mapTransformOriginToClassName = {
8
8
  'top-left': 'popper-content__transform-origin-top-left',
9
9
  'top-right': 'popper-content__transform-origin-top-right',
10
10
  };
11
- const PopperContent = forwardRef(({ children, transformOrigin, style }, ref) => (jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames('popper-content', mapTransformOriginToClassName[transformOrigin]), style: style }, { children: children }))));
11
+ const PopperContent = forwardRef(({ children, transformOrigin, style, className }, ref) => (jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames('popper-content', mapTransformOriginToClassName[transformOrigin], className), style: style }, { children: children }))));
12
12
  PopperContent.displayName = 'PopperContent';
13
13
 
14
14
  export { PopperContent };
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { createContext, useContext, useRef } from 'react';
2
+ import { createContext, useRef, useContext } from 'react';
3
3
 
4
4
  const popperContext = createContext(undefined);
5
5
  const PopperProvider = ({ children }) => {
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ /** Return element's top-left position relative to root */
5
6
  const getChildPosition = (root, element) => {
6
7
  const rootRect = root.getBoundingClientRect();
7
8
  const elementRect = element.getBoundingClientRect();
@@ -1,2 +1,3 @@
1
1
  import { Position } from '../../Popper.types';
2
+ /** Return element's top-left position relative to root */
2
3
  export declare const getChildPosition: (root: HTMLElement, element: HTMLElement) => Position;
@@ -1,3 +1,4 @@
1
+ /** Return element's top-left position relative to root */
1
2
  const getChildPosition = (root, element) => {
2
3
  const rootRect = root.getBoundingClientRect();
3
4
  const elementRect = element.getBoundingClientRect();
@@ -1,3 +1,2 @@
1
1
  export * from './getChildPosition';
2
- export * from './watchToScrollInHierarchy';
3
2
  export * from './isScrollable';
@@ -23,9 +23,11 @@ require('ethers');
23
23
  require('../../shared/consts/index.cjs');
24
24
  require('@dynamic-labs/multi-wallet');
25
25
  require('@dynamic-labs/rpc-providers');
26
+ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
26
27
  require('../../context/DynamicContext/DynamicContext.cjs');
27
28
  require('../../context/ErrorContext/ErrorContext.cjs');
28
29
  require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
30
+ require('../../context/AccountExistsContext/AccountExistsContext.cjs');
29
31
  var useElementById = require('../../utils/hooks/useElementById/useElementById.cjs');
30
32
  var ShadowDOM = require('../ShadowDOM/ShadowDOM.cjs');
31
33
  require('../../context/ThemeContext/ThemeContext.cjs');
@@ -36,8 +38,8 @@ require('../Popper/Popper/Popper.cjs');
36
38
  require('../Popper/PopperContext/PopperContext.cjs');
37
39
  require('formik');
38
40
  require('yup');
39
- require('../../context/WalletGroupContext/WalletGroupContext.cjs');
40
- require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
41
+ require('../InlineWidget/InlineWidget.cjs');
42
+ require('../MenuList/Dropdown/Dropdown.cjs');
41
43
  require('../../context/MockContext/MockContext.cjs');
42
44
  require('../../context/CaptchaContext/CaptchaContext.cjs');
43
45
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
@@ -69,11 +71,11 @@ const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, wh
69
71
  inputKey: 'Escape',
70
72
  onKeyPressed: handleClose,
71
73
  });
72
- return (jsxRuntime.jsxs(ReactFocusLock__default["default"], Object.assign({ className: 'modal__container', whiteList: whiteList }, { children: [withBackdrop && (jsxRuntime.jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: (e) => {
74
+ return (jsxRuntime.jsxs(ReactFocusLock__default["default"], Object.assign({ className: 'portal__container', whiteList: whiteList }, { children: [withBackdrop && (jsxRuntime.jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: (e) => {
73
75
  onBackdropClick(e);
74
76
  }, onKeyDown: handleKeyClose, tabIndex: 0, "aria-label": 'Close modal',
75
77
  // z-index - 2 to ensure that the backdrop is always behind the content
76
- style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'modal__backdrop' })), jsxRuntime.jsx("div", Object.assign({ className: 'modal', style: { zIndex } }, { children: children }))] })));
78
+ style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'portal__backdrop' })), jsxRuntime.jsx("div", Object.assign({ style: { zIndex } }, { children: children }))] })));
77
79
  };
78
80
  const Portal = ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId = 'dynamic-modal', }) => {
79
81
  const modalRootElementRef = useElementById.useElementById(elementId);
@@ -19,9 +19,11 @@ import 'ethers';
19
19
  import '../../shared/consts/index.js';
20
20
  import '@dynamic-labs/multi-wallet';
21
21
  import '@dynamic-labs/rpc-providers';
22
+ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
22
23
  import '../../context/DynamicContext/DynamicContext.js';
23
24
  import '../../context/ErrorContext/ErrorContext.js';
24
25
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
26
+ import '../../context/AccountExistsContext/AccountExistsContext.js';
25
27
  import { useElementById } from '../../utils/hooks/useElementById/useElementById.js';
26
28
  import { ShadowDOM } from '../ShadowDOM/ShadowDOM.js';
27
29
  import '../../context/ThemeContext/ThemeContext.js';
@@ -32,8 +34,8 @@ import '../Popper/Popper/Popper.js';
32
34
  import '../Popper/PopperContext/PopperContext.js';
33
35
  import 'formik';
34
36
  import 'yup';
35
- import '../../context/WalletGroupContext/WalletGroupContext.js';
36
- import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
37
+ import '../InlineWidget/InlineWidget.js';
38
+ import '../MenuList/Dropdown/Dropdown.js';
37
39
  import '../../context/MockContext/MockContext.js';
38
40
  import '../../context/CaptchaContext/CaptchaContext.js';
39
41
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
@@ -61,11 +63,11 @@ const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, wh
61
63
  inputKey: 'Escape',
62
64
  onKeyPressed: handleClose,
63
65
  });
64
- return (jsxs(ReactFocusLock, Object.assign({ className: 'modal__container', whiteList: whiteList }, { children: [withBackdrop && (jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: (e) => {
66
+ return (jsxs(ReactFocusLock, Object.assign({ className: 'portal__container', whiteList: whiteList }, { children: [withBackdrop && (jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: (e) => {
65
67
  onBackdropClick(e);
66
68
  }, onKeyDown: handleKeyClose, tabIndex: 0, "aria-label": 'Close modal',
67
69
  // z-index - 2 to ensure that the backdrop is always behind the content
68
- style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'modal__backdrop' })), jsx("div", Object.assign({ className: 'modal', style: { zIndex } }, { children: children }))] })));
70
+ style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'portal__backdrop' })), jsx("div", Object.assign({ style: { zIndex } }, { children: children }))] })));
69
71
  };
70
72
  const Portal = ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId = 'dynamic-modal', }) => {
71
73
  const modalRootElementRef = useElementById(elementId);
@@ -7,12 +7,20 @@ var classNames = require('../../utils/functions/classNames/classNames.cjs');
7
7
  var Typography = require('../Typography/Typography.cjs');
8
8
  require('react');
9
9
  var dynamicLogo = require('../../assets/dynamic-logo.cjs');
10
+ var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
10
11
 
11
12
  const URL = 'https://dynamic.xyz';
12
13
  const alignClassNames = {
13
14
  center: 'powered-by-dynamic--center',
14
15
  right: 'powered-by-dynamic--right',
15
16
  };
16
- const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, }) => (jsxRuntime.jsxs("a", Object.assign({ target: '_blank', href: URL, className: classNames.classNames('powered-by-dynamic', alignClassNames[align], classNameRoot), rel: 'noreferrer' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular', variant: 'body_mini', className: classNames.classNames('powered-by-dynamic__text', classNameText) }, { children: "Powered by" })), jsxRuntime.jsx(dynamicLogo.ReactComponent, { className: classNames.classNames('powered-by-dynamic__logo', classNameLogo) })] })));
17
+ const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, }) => {
18
+ var _a;
19
+ const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
20
+ if (((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.displayDynamicMessaging) === false) {
21
+ return null;
22
+ }
23
+ return (jsxRuntime.jsxs("a", Object.assign({ target: '_blank', href: URL, className: classNames.classNames('powered-by-dynamic', alignClassNames[align], classNameRoot), rel: 'noreferrer' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular', variant: 'body_mini', className: classNames.classNames('powered-by-dynamic__text', classNameText) }, { children: "Powered by" })), jsxRuntime.jsx(dynamicLogo.ReactComponent, { className: classNames.classNames('powered-by-dynamic__logo', classNameLogo) })] })));
24
+ };
17
25
 
18
26
  exports.PoweredByDynamic = PoweredByDynamic;
@@ -3,12 +3,20 @@ import { classNames } from '../../utils/functions/classNames/classNames.js';
3
3
  import { Typography } from '../Typography/Typography.js';
4
4
  import 'react';
5
5
  import { ReactComponent as SvgDynamicLogo } from '../../assets/dynamic-logo.js';
6
+ import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
6
7
 
7
8
  const URL = 'https://dynamic.xyz';
8
9
  const alignClassNames = {
9
10
  center: 'powered-by-dynamic--center',
10
11
  right: 'powered-by-dynamic--right',
11
12
  };
12
- const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, }) => (jsxs("a", Object.assign({ target: '_blank', href: URL, className: classNames('powered-by-dynamic', alignClassNames[align], classNameRoot), rel: 'noreferrer' }, { children: [jsx(Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular', variant: 'body_mini', className: classNames('powered-by-dynamic__text', classNameText) }, { children: "Powered by" })), jsx(SvgDynamicLogo, { className: classNames('powered-by-dynamic__logo', classNameLogo) })] })));
13
+ const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, }) => {
14
+ var _a;
15
+ const { projectSettings } = useInternalDynamicContext();
16
+ if (((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.displayDynamicMessaging) === false) {
17
+ return null;
18
+ }
19
+ return (jsxs("a", Object.assign({ target: '_blank', href: URL, className: classNames('powered-by-dynamic', alignClassNames[align], classNameRoot), rel: 'noreferrer' }, { children: [jsx(Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular', variant: 'body_mini', className: classNames('powered-by-dynamic__text', classNameText) }, { children: "Powered by" })), jsx(SvgDynamicLogo, { className: classNames('powered-by-dynamic__logo', classNameLogo) })] })));
20
+ };
13
21
 
14
22
  export { PoweredByDynamic };
@@ -45,7 +45,7 @@ const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack
45
45
  return;
46
46
  return parseFloat(balance);
47
47
  }, [balance]);
48
- return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })), walletName && (jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletName }) }))), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) }))] })) })), jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__body' }, { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: error && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__error' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), networkName && networkIcon && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__network-container' }, { children: jsxRuntime.jsx(Chip.Chip, Object.assign({ icon: networkIcon }, { children: networkName })) }))), jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__balance-container' }, { children: [jsxRuntime.jsx(FormFieldLabel.FormFieldLabel, Object.assign({ divider: true }, { children: "Token" })), jsxRuntime.jsx(TokenBalanceCard.TokenBalanceCard, { chain: chain, currencySymbol: currencySymbol, balance: balance })] })), jsxRuntime.jsx(SendBalanceForm.SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber }), displayPoweredByDynamicFooter && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__footer' }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) })))] }))] }));
48
+ return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })), walletName && (jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletName }) }))), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) }))] })) })), jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__body' }, { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: error && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__error' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), networkName && networkIcon && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__network-container' }, { children: jsxRuntime.jsx(Chip.Chip, Object.assign({ icon: networkIcon }, { children: networkName })) }))), jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__balance-container' }, { children: [jsxRuntime.jsx(FormFieldLabel.FormFieldLabel, Object.assign({ divider: true }, { children: "Token" })), jsxRuntime.jsx(TokenBalanceCard.TokenBalanceCard, { chain: chain, currencySymbol: currencySymbol, balance: balance })] })), jsxRuntime.jsx(SendBalanceForm.SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] }))] }));
49
49
  };
50
50
 
51
51
  exports.SendBalancePageLayout = SendBalancePageLayout;
@@ -41,7 +41,7 @@ const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack
41
41
  return;
42
42
  return parseFloat(balance);
43
43
  }, [balance]);
44
- return (jsxs("div", { children: [jsx(ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })), walletName && (jsx(Icon, Object.assign({ size: 'small' }, { children: jsx(WalletIcon, { walletName: walletName }) }))), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: shortenWalletAddress(walletAddress, 3, 3) }))] })) })), jsxs("div", Object.assign({ className: 'send-balance-page-layout__body' }, { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: error && (jsx("div", Object.assign({ className: 'send-balance-page-layout__error' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), networkName && networkIcon && (jsx("div", Object.assign({ className: 'send-balance-page-layout__network-container' }, { children: jsx(Chip, Object.assign({ icon: networkIcon }, { children: networkName })) }))), jsxs("div", Object.assign({ className: 'send-balance-page-layout__balance-container' }, { children: [jsx(FormFieldLabel, Object.assign({ divider: true }, { children: "Token" })), jsx(TokenBalanceCard, { chain: chain, currencySymbol: currencySymbol, balance: balance })] })), jsx(SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber }), displayPoweredByDynamicFooter && (jsx("div", Object.assign({ className: 'send-balance-page-layout__footer' }, { children: jsx(PoweredByDynamic, {}) })))] }))] }));
44
+ return (jsxs("div", { children: [jsx(ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })), walletName && (jsx(Icon, Object.assign({ size: 'small' }, { children: jsx(WalletIcon, { walletName: walletName }) }))), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: shortenWalletAddress(walletAddress, 3, 3) }))] })) })), jsxs("div", Object.assign({ className: 'send-balance-page-layout__body' }, { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: error && (jsx("div", Object.assign({ className: 'send-balance-page-layout__error' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), networkName && networkIcon && (jsx("div", Object.assign({ className: 'send-balance-page-layout__network-container' }, { children: jsx(Chip, Object.assign({ icon: networkIcon }, { children: networkName })) }))), jsxs("div", Object.assign({ className: 'send-balance-page-layout__balance-container' }, { children: [jsx(FormFieldLabel, Object.assign({ divider: true }, { children: "Token" })), jsx(TokenBalanceCard, { chain: chain, currencySymbol: currencySymbol, balance: balance })] })), jsx(SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] }))] }));
45
45
  };
46
46
 
47
47
  export { SendBalancePageLayout };
@@ -5,9 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
7
  var reactDom = require('react-dom');
8
+ var utils$1 = require('@dynamic-labs/utils');
8
9
  var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
9
10
  var index_shadow = require('../../styles/index.shadow.cjs');
10
11
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
12
+ var LegacySafariCssOverrides = require('../LegacySafariCssOverrides/LegacySafariCssOverrides.cjs');
11
13
  var utils = require('./utils.cjs');
12
14
 
13
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -47,10 +49,10 @@ const ShadowDOM = ({ mode = 'open', id, className, children, dataTestId, zIndex,
47
49
  }, [shadowDOMEnabled, nodeRef, mode]);
48
50
  const shouldRenderStyles = Boolean(Object.keys(index_shadow).length);
49
51
  if (!shadowDOMEnabled) {
50
- return (jsxRuntime.jsxs("div", Object.assign({ "data-testid": dataTestId, ref: nodeRef, id: id, className: classNames.classNames('dynamic-shadow-dom', className), style: { zIndex } }, { children: [children, shouldRenderStyles && jsxRuntime.jsx(ShadowDOMStyle, {}), CssOverridesElement && jsxRuntime.jsx(CssOverridesElement, {})] })));
52
+ return (jsxRuntime.jsxs("div", Object.assign({ "data-testid": dataTestId, ref: nodeRef, id: id, className: classNames.classNames('dynamic-shadow-dom', className), style: { zIndex } }, { children: [children, shouldRenderStyles && jsxRuntime.jsx(ShadowDOMStyle, {}), utils$1.isLegacySafari() && jsxRuntime.jsx(LegacySafariCssOverrides.LegacySafariCssOverrides, {}), CssOverridesElement && jsxRuntime.jsx(CssOverridesElement, {})] })));
51
53
  }
52
54
  return (jsxRuntime.jsx(ShadowDOMContext.Provider, Object.assign({ value: { shadowRoot } }, { children: jsxRuntime.jsx("div", Object.assign({ "data-testid": dataTestId, ref: nodeRef, id: id, className: classNames.classNames('dynamic-shadow-dom', className), style: { zIndex } }, { children: shadowRoot &&
53
- reactDom.createPortal(jsxRuntime.jsxs("div", Object.assign({ className: 'dynamic-shadow-dom-content' }, { children: [children, shouldRenderStyles && jsxRuntime.jsx(ShadowDOMStyle, {}), CssOverridesElement && jsxRuntime.jsx(CssOverridesElement, {})] })), shadowRoot) })) })));
55
+ reactDom.createPortal(jsxRuntime.jsxs("div", Object.assign({ className: 'dynamic-shadow-dom-content' }, { children: [children, shouldRenderStyles && jsxRuntime.jsx(ShadowDOMStyle, {}), utils$1.isLegacySafari() && jsxRuntime.jsx(LegacySafariCssOverrides.LegacySafariCssOverrides, {}), CssOverridesElement && jsxRuntime.jsx(CssOverridesElement, {})] })), shadowRoot) })) })));
54
56
  };
55
57
 
56
58
  exports.ShadowDOM = ShadowDOM;
@@ -1,9 +1,11 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import React__default, { useRef, useState, useMemo, useLayoutEffect } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
+ import { isLegacySafari } from '@dynamic-labs/utils';
4
5
  import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
5
6
  import css_248z from '../../styles/index.shadow.js';
6
7
  import { classNames } from '../../utils/functions/classNames/classNames.js';
8
+ import { LegacySafariCssOverrides } from '../LegacySafariCssOverrides/LegacySafariCssOverrides.js';
7
9
  import { isShadowDOMFlagEnabled } from './utils.js';
8
10
 
9
11
  const ShadowDOMContext = React__default.createContext({});
@@ -39,10 +41,10 @@ const ShadowDOM = ({ mode = 'open', id, className, children, dataTestId, zIndex,
39
41
  }, [shadowDOMEnabled, nodeRef, mode]);
40
42
  const shouldRenderStyles = Boolean(Object.keys(css_248z).length);
41
43
  if (!shadowDOMEnabled) {
42
- return (jsxs("div", Object.assign({ "data-testid": dataTestId, ref: nodeRef, id: id, className: classNames('dynamic-shadow-dom', className), style: { zIndex } }, { children: [children, shouldRenderStyles && jsx(ShadowDOMStyle, {}), CssOverridesElement && jsx(CssOverridesElement, {})] })));
44
+ return (jsxs("div", Object.assign({ "data-testid": dataTestId, ref: nodeRef, id: id, className: classNames('dynamic-shadow-dom', className), style: { zIndex } }, { children: [children, shouldRenderStyles && jsx(ShadowDOMStyle, {}), isLegacySafari() && jsx(LegacySafariCssOverrides, {}), CssOverridesElement && jsx(CssOverridesElement, {})] })));
43
45
  }
44
46
  return (jsx(ShadowDOMContext.Provider, Object.assign({ value: { shadowRoot } }, { children: jsx("div", Object.assign({ "data-testid": dataTestId, ref: nodeRef, id: id, className: classNames('dynamic-shadow-dom', className), style: { zIndex } }, { children: shadowRoot &&
45
- createPortal(jsxs("div", Object.assign({ className: 'dynamic-shadow-dom-content' }, { children: [children, shouldRenderStyles && jsx(ShadowDOMStyle, {}), CssOverridesElement && jsx(CssOverridesElement, {})] })), shadowRoot) })) })));
47
+ createPortal(jsxs("div", Object.assign({ className: 'dynamic-shadow-dom-content' }, { children: [children, shouldRenderStyles && jsx(ShadowDOMStyle, {}), isLegacySafari() && jsx(LegacySafariCssOverrides, {}), CssOverridesElement && jsx(CssOverridesElement, {})] })), shadowRoot) })) })));
46
48
  };
47
49
 
48
50
  export { ShadowDOM, ShadowDOMContext, ShadowDOMStyle };
@@ -3,12 +3,44 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var React = require('react');
6
7
  var Typography = require('../Typography/Typography.cjs');
7
8
  var Icon = require('../Icon/Icon.cjs');
8
9
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
10
+ require('@dynamic-labs/sdk-api');
11
+ require('../../shared/logger.cjs');
12
+ require('@dynamic-labs/iconic');
13
+ require('@dynamic-labs/wallet-connector-core');
14
+ require('../../context/ViewContext/ViewContext.cjs');
15
+ var check = require('../../shared/assets/check.cjs');
16
+ require('@dynamic-labs/wallet-book');
17
+ require('@dynamic-labs/utils');
18
+ require('../../utils/constants/colors.cjs');
19
+ require('../../shared/utils/classes/storage/localStorage.cjs');
20
+ require('ethers');
21
+ require('../../shared/consts/index.cjs');
9
22
 
10
- const Step = ({ children, icon, active = false, }) => (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('step', {
11
- step__active: active,
12
- }) }, { children: [icon ? (jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small', className: 'step__icon' }, { children: icon }))) : (jsxRuntime.jsx("div", Object.assign({ className: 'step__index' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: active ? undefined : 'secondary' }, { children: jsxRuntime.jsx("span", { className: 'step__index-label' }) })) }))), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: active ? 'primary' : 'secondary' }, { children: children }))] })));
23
+ const typographyOpacityMap = {
24
+ current: '1',
25
+ default: '1',
26
+ done: '0.4',
27
+ upcoming: '0.15',
28
+ };
29
+ const Step = ({ children, className, icon, state = 'default', }) => {
30
+ // Reduce opacity of icon if upcoming
31
+ const style = React.useMemo(() => ({ opacity: state === 'upcoming' ? 0.5 : 1 }), [state]);
32
+ const ComputedIcon = React.useMemo(() => {
33
+ // If done use checkmark icon
34
+ if (state === 'done')
35
+ return (jsxRuntime.jsx("div", Object.assign({ className: 'step__icon step__icon--done' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'step__icon__check-mark' }, { children: jsxRuntime.jsx(check.ReactComponent, { style: style }) })) })));
36
+ // Use provided icon if available
37
+ else if (icon)
38
+ return (jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'step__icon' }, { children: jsxRuntime.jsx("div", Object.assign({ style: style }, { children: icon })) })));
39
+ // Otherwise use step index as icon
40
+ else
41
+ return (jsxRuntime.jsx("div", Object.assign({ className: 'step__index' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_small', style: style }, { children: jsxRuntime.jsx("span", { className: 'step__index-label' }) })) })));
42
+ }, [icon, state, style]);
43
+ return (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('step', className) }, { children: [ComputedIcon, jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_small', style: { opacity: typographyOpacityMap[state] } }, { children: children }))] })));
44
+ };
13
45
 
14
46
  exports.Step = Step;
@@ -1,7 +1,7 @@
1
1
  import { FC, PropsWithChildren, ReactElement } from 'react';
2
- type StepProps = {
2
+ export type StepProps = {
3
3
  icon?: ReactElement;
4
- active?: boolean;
4
+ state?: 'current' | 'done' | 'upcoming' | 'default';
5
+ className?: string;
5
6
  };
6
7
  export declare const Step: FC<PropsWithChildren<StepProps>>;
7
- export {};