@dynamic-labs/sdk-react-core 0.17.25 → 0.17.26

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 (250) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +8 -8
  5. package/src/index.cjs +3 -0
  6. package/src/index.js +2 -0
  7. package/src/lib/Main.cjs +3 -2
  8. package/src/lib/Main.js +3 -2
  9. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
  10. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
  11. package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
  12. package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
  13. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
  14. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
  15. package/src/lib/components/Divider/Divider.cjs +1 -0
  16. package/src/lib/components/Divider/Divider.js +1 -0
  17. package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +83 -0
  18. package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
  19. package/src/lib/components/MenuList/Dropdown/Dropdown.js +79 -0
  20. package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
  21. package/src/lib/components/MenuList/MenuList/MenuList.cjs +33 -0
  22. package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
  23. package/src/lib/components/MenuList/MenuList/MenuList.js +29 -0
  24. package/src/lib/components/MenuList/MenuList/index.d.ts +1 -0
  25. package/src/lib/components/MenuList/index.d.ts +1 -0
  26. package/src/lib/components/MenuList/utils/index.d.ts +1 -0
  27. package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +6 -1
  28. package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +5 -0
  29. package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +6 -1
  30. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +9 -12
  31. package/src/lib/components/NetworkPicker/NetworkPicker.js +9 -12
  32. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -0
  33. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -0
  34. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
  35. package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
  36. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
  37. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
  38. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +1 -0
  39. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -0
  40. package/src/lib/components/OverlayCard/OverlayCard.cjs +10 -11
  41. package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
  42. package/src/lib/components/OverlayCard/OverlayCard.js +11 -11
  43. package/src/lib/components/Popper/Popper/Popper.cjs +12 -12
  44. package/src/lib/components/Popper/Popper/Popper.d.ts +7 -4
  45. package/src/lib/components/Popper/Popper/Popper.js +12 -12
  46. package/src/lib/components/Popper/PopperContent/PopperContent.cjs +1 -1
  47. package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +2 -1
  48. package/src/lib/components/Popper/PopperContent/PopperContent.js +1 -1
  49. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +1 -0
  50. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +1 -0
  51. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +1 -0
  52. package/src/lib/components/Popper/utils/index.d.ts +0 -1
  53. package/src/lib/components/Portal/Portal.cjs +1 -0
  54. package/src/lib/components/Portal/Portal.js +1 -0
  55. package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
  56. package/src/lib/components/Tooltip/Tooltip.js +1 -0
  57. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
  58. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
  59. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
  60. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
  61. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
  62. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
  63. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
  64. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
  65. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
  66. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
  67. package/src/lib/components/index.d.ts +1 -0
  68. package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -0
  69. package/src/lib/context/DynamicContext/DynamicContext.js +2 -0
  70. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
  71. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
  72. package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -0
  73. package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -0
  74. package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
  75. package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
  76. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
  77. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
  78. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
  79. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
  80. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +1 -0
  81. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +1 -0
  82. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +1 -0
  83. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +1 -0
  84. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
  85. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
  86. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +1 -0
  87. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +1 -0
  88. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
  89. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
  90. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
  91. package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
  92. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
  93. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
  94. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
  95. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
  96. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
  97. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
  98. package/src/lib/shared/utils/hooks/index.d.ts +1 -0
  99. package/src/lib/shared/utils/hooks/useForwardedRef/index.d.ts +1 -0
  100. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs +25 -0
  101. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +2 -0
  102. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js +21 -0
  103. package/src/lib/styles/index.shadow.cjs +1 -1
  104. package/src/lib/styles/index.shadow.js +1 -1
  105. package/src/lib/utils/hooks/useTransition/useTransition.js +1 -1
  106. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
  107. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
  108. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
  109. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
  110. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -0
  111. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -0
  112. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -0
  113. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -0
  114. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -0
  115. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
  116. package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +8 -4
  117. package/src/lib/views/CollectUserDataView/fieldsConfig.js +8 -4
  118. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -0
  119. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -0
  120. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
  121. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
  122. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
  123. package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
  124. package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -0
  125. package/src/lib/views/EmailVerification/EmailVerification.js +1 -0
  126. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
  127. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
  128. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +1 -0
  129. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +1 -0
  130. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +1 -0
  131. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +1 -0
  132. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -0
  133. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -0
  134. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
  135. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
  136. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
  137. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
  138. package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
  139. package/src/lib/views/NoAccess/NoAccess.js +1 -0
  140. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
  141. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
  142. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
  143. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
  144. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
  145. package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
  146. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
  147. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
  148. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
  149. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
  150. package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
  151. package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
  152. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
  153. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
  154. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
  155. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
  156. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
  157. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
  158. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
  159. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
  160. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +1 -0
  161. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +1 -0
  162. package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +1 -0
  163. package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +1 -0
  164. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
  165. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
  166. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
  167. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
  168. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
  169. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
  170. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
  171. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
  172. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +3 -2
  173. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +4 -3
  174. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
  175. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
  176. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +4 -3
  177. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +4 -3
  178. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
  179. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
  180. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +5 -4
  181. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
  182. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +5 -4
  183. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
  184. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
  185. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +4 -1
  186. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +4 -1
  187. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
  188. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
  189. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +4 -3
  190. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +4 -3
  191. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +1 -0
  192. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +1 -0
  193. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
  194. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
  195. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
  196. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
  197. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -0
  198. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
  199. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
  200. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
  201. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
  202. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
  203. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
  204. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
  205. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
  206. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
  207. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +2 -1
  208. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +2 -1
  209. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
  210. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
  211. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
  212. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
  213. package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +19 -1
  214. package/src/lib/widgets/DynamicWidget/helpers/helpers.js +19 -1
  215. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
  216. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
  217. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
  218. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
  219. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
  220. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
  221. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
  222. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
  223. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
  224. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
  225. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
  226. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
  227. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
  228. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
  229. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
  230. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
  231. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
  232. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
  233. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
  234. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
  235. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
  236. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
  237. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
  238. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
  239. package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +1 -0
  240. package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +1 -0
  241. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -0
  242. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -0
  243. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
  244. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
  245. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -69
  246. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
  247. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -63
  248. package/src/lib/components/NetworkPicker/components/ActionList/index.d.ts +0 -1
  249. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +0 -1
  250. /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
1
 
2
+ ### [0.17.26](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.25...v0.17.26) (2023-07-25)
3
+
4
+
5
+ ### Features
6
+
7
+ * introduce MenuList and Dropdown components to unify redundant i… ([#2698](https://github.com/dynamic-labs/DynamicAuth/issues/2698)) ([9cab849](https://github.com/dynamic-labs/DynamicAuth/commit/9cab849ed3173c81fe09a3cbe7291e31dde44bfb)), closes [#2675](https://github.com/dynamic-labs/DynamicAuth/issues/2675)
8
+ * Update WalletConnect wallet registry ([#2742](https://github.com/dynamic-labs/DynamicAuth/issues/2742)) ([4bf5266](https://github.com/dynamic-labs/DynamicAuth/commit/4bf5266d3fa8202f00411230e8fa617ead01d405))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * correctly round balance numbers on widget ([#2625](https://github.com/dynamic-labs/DynamicAuth/issues/2625)) ([#2688](https://github.com/dynamic-labs/DynamicAuth/issues/2688)) ([88f7b07](https://github.com/dynamic-labs/DynamicAuth/commit/88f7b07d1764be7767c202500b6a7680daf2a971))
14
+ * **GVTY-58:** do not allow users to submit empty whitespace strings in onboarding form ([#2723](https://github.com/dynamic-labs/DynamicAuth/issues/2723)) ([31f29ed](https://github.com/dynamic-labs/DynamicAuth/commit/31f29ed4c8db5ab3ccb6283301fa04e29c130b39))
15
+ * remove center style to match main ([#2728](https://github.com/dynamic-labs/DynamicAuth/issues/2728)) ([e58a3a5](https://github.com/dynamic-labs/DynamicAuth/commit/e58a3a541db62c24d8be5ee3b5994d59f16b0f30))
16
+
2
17
  ### [0.17.25](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.24...v0.17.25) (2023-07-19)
3
18
 
4
19
  ### Features
package/package.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.17.25";
5
+ var version = "0.17.26";
6
6
  var dependencies = {
7
7
  "react-focus-lock": "2.9.2",
8
8
  "@dynamic-labs/iconic": "0.1.23",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "0.17.25";
1
+ var version = "0.17.26";
2
2
  var dependencies = {
3
3
  "react-focus-lock": "2.9.2",
4
4
  "@dynamic-labs/iconic": "0.1.23",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "0.17.25",
3
+ "version": "0.17.26",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -16,13 +16,13 @@
16
16
  "formik": "2.2.9",
17
17
  "qrcode": "1.5.1",
18
18
  "ethers": "5.7.2",
19
- "@dynamic-labs/logger": "0.17.25",
20
- "@dynamic-labs/multi-wallet": "0.17.25",
21
- "@dynamic-labs/rpc-providers": "0.17.25",
22
- "@dynamic-labs/types": "0.17.25",
23
- "@dynamic-labs/utils": "0.17.25",
24
- "@dynamic-labs/wallet-book": "0.17.25",
25
- "@dynamic-labs/wallet-connector-core": "0.17.25"
19
+ "@dynamic-labs/logger": "0.17.26",
20
+ "@dynamic-labs/multi-wallet": "0.17.26",
21
+ "@dynamic-labs/rpc-providers": "0.17.26",
22
+ "@dynamic-labs/types": "0.17.26",
23
+ "@dynamic-labs/utils": "0.17.26",
24
+ "@dynamic-labs/wallet-book": "0.17.26",
25
+ "@dynamic-labs/wallet-connector-core": "0.17.26"
26
26
  },
27
27
  "devDependencies": {
28
28
  "semver": "7.3.8"
package/src/index.cjs CHANGED
@@ -41,6 +41,7 @@ var useLocalStorage = require('./lib/shared/utils/hooks/useLocalStorage/useLocal
41
41
  var index$1 = require('./lib/shared/utils/hooks/useOnClickOutside/index.cjs');
42
42
  var usePreventPageScroll = require('./lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
43
43
  var useGlobalLoading = require('./lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs');
44
+ var useForwardedRef = require('./lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs');
44
45
  var PhantomLedgerIcon = require('./lib/shared/assets/wallets/PhantomLedgerIcon/PhantomLedgerIcon.cjs');
45
46
  var stroke = require('./lib/shared/assets/stroke.cjs');
46
47
  var arrowRight = require('./lib/shared/assets/arrow-right.cjs');
@@ -106,6 +107,7 @@ require('./lib/components/Popper/Popper/Popper.cjs');
106
107
  require('./lib/components/Popper/PopperContext/PopperContext.cjs');
107
108
  require('formik');
108
109
  require('yup');
110
+ require('./lib/components/MenuList/Dropdown/Dropdown.cjs');
109
111
  var WalletList = require('./lib/views/WalletList/WalletList.cjs');
110
112
  var PendingSignatureView = require('./lib/views/PendingSignatureView/PendingSignatureView.cjs');
111
113
  var CollectUserDataView = require('./lib/views/CollectUserDataView/CollectUserDataView.cjs');
@@ -164,6 +166,7 @@ exports.useLocalStorage = useLocalStorage.useLocalStorage;
164
166
  exports.useOnClickOutside = index$1.useOnClickOutside;
165
167
  exports.usePreventPageScroll = usePreventPageScroll.usePreventPageScroll;
166
168
  exports.useGlobalLoading = useGlobalLoading.useGlobalLoading;
169
+ exports.useForwardedRef = useForwardedRef.useForwardedRef;
167
170
  exports.PhantomLedgerIcon = PhantomLedgerIcon.PhantomLedgerIcon;
168
171
  exports.ArrowIcon = stroke.ReactComponent;
169
172
  exports.ArrowRightIcon = arrowRight.ReactComponent;
package/src/index.js CHANGED
@@ -37,6 +37,7 @@ export { useLocalStorage } from './lib/shared/utils/hooks/useLocalStorage/useLoc
37
37
  export { useOnClickOutside } from './lib/shared/utils/hooks/useOnClickOutside/index.js';
38
38
  export { usePreventPageScroll } from './lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
39
39
  export { useGlobalLoading } from './lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.js';
40
+ export { useForwardedRef } from './lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js';
40
41
  export { PhantomLedgerIcon } from './lib/shared/assets/wallets/PhantomLedgerIcon/PhantomLedgerIcon.js';
41
42
  export { ReactComponent as ArrowIcon } from './lib/shared/assets/stroke.js';
42
43
  export { ReactComponent as ArrowRightIcon } from './lib/shared/assets/arrow-right.js';
@@ -102,6 +103,7 @@ import './lib/components/Popper/Popper/Popper.js';
102
103
  import './lib/components/Popper/PopperContext/PopperContext.js';
103
104
  import 'formik';
104
105
  import 'yup';
106
+ import './lib/components/MenuList/Dropdown/Dropdown.js';
105
107
  export { WalletList } from './lib/views/WalletList/WalletList.js';
106
108
  export { PendingSignatureView } from './lib/views/PendingSignatureView/PendingSignatureView.js';
107
109
  export { CollectUserDataView } from './lib/views/CollectUserDataView/CollectUserDataView.js';
package/src/lib/Main.cjs CHANGED
@@ -40,9 +40,10 @@ require('./components/Alert/Alert.cjs');
40
40
  var useWalletItemActions = require('./utils/hooks/useWalletItemActions/useWalletItemActions.cjs');
41
41
  require('./utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
42
42
  require('./components/Popper/Popper/Popper.cjs');
43
- require('./components/Popper/PopperContext/PopperContext.cjs');
43
+ var PopperContext = require('./components/Popper/PopperContext/PopperContext.cjs');
44
44
  require('formik');
45
45
  require('yup');
46
+ require('./components/MenuList/Dropdown/Dropdown.cjs');
46
47
  var DynamicAuthLayout = require('./layout/DynamicAuthLayout/DynamicAuthLayout.cjs');
47
48
  var SocialRedirectContext = require('./context/SocialRedirectContext/SocialRedirectContext.cjs');
48
49
  var useVerifyOnAwaitingSignature = require('./utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs');
@@ -106,7 +107,7 @@ const Main = () => {
106
107
  const showDynamicAuth = showAuthFlow && !isProjectSettingsLoading;
107
108
  return (jsxRuntime.jsx(SocialRedirectContext.SocialRedirectContextProvider, { children: jsxRuntime.jsx(index.FooterAnimationContextProvider, { children: jsxRuntime.jsx(Portal.Portal, Object.assign({ zIndex: index$1.authModalZIndex, isShown: showDynamicAuth, handleClose: handleClose, withBackdrop: true, transitionEvents: {
108
109
  onUnmount: handleOnPortalUnmount,
109
- } }, { children: jsxRuntime.jsx(DynamicAuthLayout.DynamicAuthLayout, Object.assign({ transitionProps: { isShown: showDynamicAuth }, appName: appName, onClose: handleClose, walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, projectSettings: projectSettings, newToWeb3WalletChainMap: newToWeb3WalletChainMap, walletConnector: selectedWalletConnector, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }, { children: viewToComponentMap.viewToComponentMap[view] })) })) }) }));
110
+ } }, { children: jsxRuntime.jsx(PopperContext.PopperProvider, { children: jsxRuntime.jsx(DynamicAuthLayout.DynamicAuthLayout, Object.assign({ transitionProps: { isShown: showDynamicAuth }, appName: appName, onClose: handleClose, walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, projectSettings: projectSettings, newToWeb3WalletChainMap: newToWeb3WalletChainMap, walletConnector: selectedWalletConnector, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }, { children: viewToComponentMap.viewToComponentMap[view] })) }) })) }) }));
110
111
  };
111
112
 
112
113
  exports.Main = Main;
package/src/lib/Main.js CHANGED
@@ -36,9 +36,10 @@ import './components/Alert/Alert.js';
36
36
  import { useWalletItemActions } from './utils/hooks/useWalletItemActions/useWalletItemActions.js';
37
37
  import './utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
38
38
  import './components/Popper/Popper/Popper.js';
39
- import './components/Popper/PopperContext/PopperContext.js';
39
+ import { PopperProvider } from './components/Popper/PopperContext/PopperContext.js';
40
40
  import 'formik';
41
41
  import 'yup';
42
+ import './components/MenuList/Dropdown/Dropdown.js';
42
43
  import { DynamicAuthLayout } from './layout/DynamicAuthLayout/DynamicAuthLayout.js';
43
44
  import { SocialRedirectContextProvider } from './context/SocialRedirectContext/SocialRedirectContext.js';
44
45
  import { useVerifyOnAwaitingSignature } from './utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js';
@@ -102,7 +103,7 @@ const Main = () => {
102
103
  const showDynamicAuth = showAuthFlow && !isProjectSettingsLoading;
103
104
  return (jsx(SocialRedirectContextProvider, { children: jsx(FooterAnimationContextProvider, { children: jsx(Portal, Object.assign({ zIndex: authModalZIndex, isShown: showDynamicAuth, handleClose: handleClose, withBackdrop: true, transitionEvents: {
104
105
  onUnmount: handleOnPortalUnmount,
105
- } }, { children: jsx(DynamicAuthLayout, Object.assign({ transitionProps: { isShown: showDynamicAuth }, appName: appName, onClose: handleClose, walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, projectSettings: projectSettings, newToWeb3WalletChainMap: newToWeb3WalletChainMap, walletConnector: selectedWalletConnector, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }, { children: viewToComponentMap[view] })) })) }) }));
106
+ } }, { children: jsx(PopperProvider, { children: jsx(DynamicAuthLayout, Object.assign({ transitionProps: { isShown: showDynamicAuth }, appName: appName, onClose: handleClose, walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, projectSettings: projectSettings, newToWeb3WalletChainMap: newToWeb3WalletChainMap, walletConnector: selectedWalletConnector, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }, { children: viewToComponentMap[view] })) }) })) }) }));
106
107
  };
107
108
 
108
109
  export { Main, Main as default };
@@ -36,6 +36,7 @@ require('../../../Popper/Popper/Popper.cjs');
36
36
  require('../../../Popper/PopperContext/PopperContext.cjs');
37
37
  require('formik');
38
38
  require('yup');
39
+ require('../../../MenuList/Dropdown/Dropdown.cjs');
39
40
  require('../../../../context/MockContext/MockContext.cjs');
40
41
  require('../../../../context/CaptchaContext/CaptchaContext.cjs');
41
42
  require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
@@ -32,6 +32,7 @@ import '../../../Popper/Popper/Popper.js';
32
32
  import '../../../Popper/PopperContext/PopperContext.js';
33
33
  import 'formik';
34
34
  import 'yup';
35
+ import '../../../MenuList/Dropdown/Dropdown.js';
35
36
  import '../../../../context/MockContext/MockContext.js';
36
37
  import '../../../../context/CaptchaContext/CaptchaContext.js';
37
38
  import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
@@ -35,6 +35,7 @@ require('../Popper/Popper/Popper.cjs');
35
35
  require('../Popper/PopperContext/PopperContext.cjs');
36
36
  require('formik');
37
37
  require('yup');
38
+ require('../MenuList/Dropdown/Dropdown.cjs');
38
39
  var useForceUpdate = require('../../utils/hooks/useForceUpdate/useForceUpdate.cjs');
39
40
  require('../../context/MockContext/MockContext.cjs');
40
41
  require('../../context/CaptchaContext/CaptchaContext.cjs');
@@ -31,6 +31,7 @@ import '../Popper/Popper/Popper.js';
31
31
  import '../Popper/PopperContext/PopperContext.js';
32
32
  import 'formik';
33
33
  import 'yup';
34
+ import '../MenuList/Dropdown/Dropdown.js';
34
35
  import { useForceUpdate } from '../../utils/hooks/useForceUpdate/useForceUpdate.js';
35
36
  import '../../context/MockContext/MockContext.js';
36
37
  import '../../context/CaptchaContext/CaptchaContext.js';
@@ -38,6 +38,7 @@ require('../Popper/Popper/Popper.cjs');
38
38
  require('../Popper/PopperContext/PopperContext.cjs');
39
39
  require('formik');
40
40
  require('yup');
41
+ require('../MenuList/Dropdown/Dropdown.cjs');
41
42
  require('../../context/MockContext/MockContext.cjs');
42
43
  require('../../context/CaptchaContext/CaptchaContext.cjs');
43
44
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
@@ -34,6 +34,7 @@ import '../Popper/Popper/Popper.js';
34
34
  import '../Popper/PopperContext/PopperContext.js';
35
35
  import 'formik';
36
36
  import 'yup';
37
+ import '../MenuList/Dropdown/Dropdown.js';
37
38
  import '../../context/MockContext/MockContext.js';
38
39
  import '../../context/CaptchaContext/CaptchaContext.js';
39
40
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
@@ -39,6 +39,7 @@ require('../Popper/Popper/Popper.cjs');
39
39
  require('../Popper/PopperContext/PopperContext.cjs');
40
40
  require('formik');
41
41
  require('yup');
42
+ require('../MenuList/Dropdown/Dropdown.cjs');
42
43
 
43
44
  const Divider = ({ text, className = '', fullWidth = false }) => (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('divider', className, {
44
45
  'divider__full-width': fullWidth,
@@ -35,6 +35,7 @@ import '../Popper/Popper/Popper.js';
35
35
  import '../Popper/PopperContext/PopperContext.js';
36
36
  import 'formik';
37
37
  import 'yup';
38
+ import '../MenuList/Dropdown/Dropdown.js';
38
39
 
39
40
  const Divider = ({ text, className = '', fullWidth = false }) => (jsxs("div", Object.assign({ className: classNames('divider', className, {
40
41
  'divider__full-width': fullWidth,
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _tslib = require('../../../../../_virtual/_tslib.cjs');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var React = require('react');
8
+ var classNames = require('../../../utils/functions/classNames/classNames.cjs');
9
+ var Popper = require('../../Popper/Popper/Popper.cjs');
10
+ var PopperContext = require('../../Popper/PopperContext/PopperContext.cjs');
11
+ var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs');
12
+ require('../../../shared/logger.cjs');
13
+ require('@dynamic-labs/sdk-api');
14
+ require('../../../config/LSSuffix.cjs');
15
+ require('@dynamic-labs/iconic');
16
+ require('@dynamic-labs/wallet-connector-core');
17
+ require('../../../context/ViewContext/ViewContext.cjs');
18
+ require('@dynamic-labs/utils');
19
+ require('../../../utils/constants/colors.cjs');
20
+ require('ethers');
21
+ var index = require('../../../shared/utils/hooks/useOnClickOutside/index.cjs');
22
+ var useForwardedRef = require('../../../shared/utils/hooks/useForwardedRef/useForwardedRef.cjs');
23
+ require('../../../shared/consts/index.cjs');
24
+ require('../../../config/ApiEndpoint.cjs');
25
+ require('@dynamic-labs/multi-wallet');
26
+ require('@dynamic-labs/rpc-providers');
27
+ require('../../../context/DynamicContext/DynamicContext.cjs');
28
+ require('../../../context/ErrorContext/ErrorContext.cjs');
29
+ require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
30
+ var useTransition = require('../../../utils/hooks/useTransition/useTransition.cjs');
31
+ require('react-dom');
32
+ require('../../ShadowDOM/ShadowDOM.cjs');
33
+ require('../../../context/ThemeContext/ThemeContext.cjs');
34
+ require('react-focus-lock');
35
+ require('../../Transition/ZoomTransition/ZoomTransition.cjs');
36
+ require('../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
37
+ require('../../Transition/OpacityTransition/OpacityTransition.cjs');
38
+ require('../../IconButton/IconButton.cjs');
39
+ require('../../Alert/Alert.cjs');
40
+ require('@dynamic-labs/wallet-book');
41
+ require('formik');
42
+ require('yup');
43
+ require('../../../context/MockContext/MockContext.cjs');
44
+ require('../../../context/CaptchaContext/CaptchaContext.cjs');
45
+ require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
46
+
47
+ const IN_DURATION = 300;
48
+ const OUT_DURATION = 300;
49
+ const Dropdown = React.forwardRef((_a, ref) => {
50
+ var { children, isOpen, onClickOutside, onScroll, className, style, maxHeight = 300 } = _a, popperProps = _tslib.__rest(_a, ["children", "isOpen", "onClickOutside", "onScroll", "className", "style", "maxHeight"]);
51
+ // Get popper container
52
+ const { containerRef } = PopperContext.usePopper();
53
+ // ==============================
54
+ // OPEN/CLOSE LOGIC
55
+ // ==============================
56
+ const contentRef = useForwardedRef.useForwardedRef(ref);
57
+ // Close on click outside
58
+ index.useOnClickOutside(contentRef, () => onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside());
59
+ // Listen for scroll events to auto close
60
+ React.useEffect(() => {
61
+ if (!containerRef.current || !popperProps.anchorRef.current)
62
+ return;
63
+ return watchToScrollInHierarchy.watchToScrollInHierarchy(containerRef.current, popperProps.anchorRef.current, () => onScroll === null || onScroll === void 0 ? void 0 : onScroll());
64
+ }, [containerRef, popperProps.anchorRef, onScroll]);
65
+ // ==============================
66
+ // ANIMATIONS
67
+ // ==============================
68
+ const { mount, stage, currentDuration } = useTransition.useTransition({
69
+ inDuration: IN_DURATION,
70
+ isShown: isOpen,
71
+ outDuration: OUT_DURATION,
72
+ });
73
+ const transitionClassName = classNames.classNames({
74
+ 'dropdown--entering': stage === 'ENTERING',
75
+ 'dropdown--exiting': stage === 'EXITING',
76
+ });
77
+ if (!mount)
78
+ return null;
79
+ return (jsxRuntime.jsx(Popper.Popper, Object.assign({}, popperProps, { ref: contentRef }, { children: jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('dropdown', transitionClassName, className), style: Object.assign({ '--max-height': `${maxHeight}px`, animationDuration: `${currentDuration}ms` }, style) }, { children: children })) })));
80
+ });
81
+ Dropdown.displayName = 'Dropdown';
82
+
83
+ exports.Dropdown = Dropdown;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { PopperProps } from '../../Popper/Popper/Popper';
3
+ export type DropdownProps = PopperProps & {
4
+ isOpen: boolean;
5
+ onClickOutside?: () => void;
6
+ onScroll?: () => void;
7
+ maxHeight?: number;
8
+ };
9
+ export declare const Dropdown: import("react").ForwardRefExoticComponent<PopperProps & {
10
+ isOpen: boolean;
11
+ onClickOutside?: (() => void) | undefined;
12
+ onScroll?: (() => void) | undefined;
13
+ maxHeight?: number | undefined;
14
+ } & {
15
+ children?: import("react").ReactNode;
16
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,79 @@
1
+ import { __rest } from '../../../../../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { forwardRef, useEffect } from 'react';
4
+ import { classNames } from '../../../utils/functions/classNames/classNames.js';
5
+ import { Popper } from '../../Popper/Popper/Popper.js';
6
+ import { usePopper } from '../../Popper/PopperContext/PopperContext.js';
7
+ import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js';
8
+ import '../../../shared/logger.js';
9
+ import '@dynamic-labs/sdk-api';
10
+ import '../../../config/LSSuffix.js';
11
+ import '@dynamic-labs/iconic';
12
+ import '@dynamic-labs/wallet-connector-core';
13
+ import '../../../context/ViewContext/ViewContext.js';
14
+ import '@dynamic-labs/utils';
15
+ import '../../../utils/constants/colors.js';
16
+ import 'ethers';
17
+ import { useOnClickOutside } from '../../../shared/utils/hooks/useOnClickOutside/index.js';
18
+ import { useForwardedRef } from '../../../shared/utils/hooks/useForwardedRef/useForwardedRef.js';
19
+ import '../../../shared/consts/index.js';
20
+ import '../../../config/ApiEndpoint.js';
21
+ import '@dynamic-labs/multi-wallet';
22
+ import '@dynamic-labs/rpc-providers';
23
+ import '../../../context/DynamicContext/DynamicContext.js';
24
+ import '../../../context/ErrorContext/ErrorContext.js';
25
+ import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
26
+ import { useTransition } from '../../../utils/hooks/useTransition/useTransition.js';
27
+ import 'react-dom';
28
+ import '../../ShadowDOM/ShadowDOM.js';
29
+ import '../../../context/ThemeContext/ThemeContext.js';
30
+ import 'react-focus-lock';
31
+ import '../../Transition/ZoomTransition/ZoomTransition.js';
32
+ import '../../Transition/SlideInUpTransition/SlideInUpTransition.js';
33
+ import '../../Transition/OpacityTransition/OpacityTransition.js';
34
+ import '../../IconButton/IconButton.js';
35
+ import '../../Alert/Alert.js';
36
+ import '@dynamic-labs/wallet-book';
37
+ import 'formik';
38
+ import 'yup';
39
+ import '../../../context/MockContext/MockContext.js';
40
+ import '../../../context/CaptchaContext/CaptchaContext.js';
41
+ import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
42
+
43
+ const IN_DURATION = 300;
44
+ const OUT_DURATION = 300;
45
+ const Dropdown = forwardRef((_a, ref) => {
46
+ var { children, isOpen, onClickOutside, onScroll, className, style, maxHeight = 300 } = _a, popperProps = __rest(_a, ["children", "isOpen", "onClickOutside", "onScroll", "className", "style", "maxHeight"]);
47
+ // Get popper container
48
+ const { containerRef } = usePopper();
49
+ // ==============================
50
+ // OPEN/CLOSE LOGIC
51
+ // ==============================
52
+ const contentRef = useForwardedRef(ref);
53
+ // Close on click outside
54
+ useOnClickOutside(contentRef, () => onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside());
55
+ // Listen for scroll events to auto close
56
+ useEffect(() => {
57
+ if (!containerRef.current || !popperProps.anchorRef.current)
58
+ return;
59
+ return watchToScrollInHierarchy(containerRef.current, popperProps.anchorRef.current, () => onScroll === null || onScroll === void 0 ? void 0 : onScroll());
60
+ }, [containerRef, popperProps.anchorRef, onScroll]);
61
+ // ==============================
62
+ // ANIMATIONS
63
+ // ==============================
64
+ const { mount, stage, currentDuration } = useTransition({
65
+ inDuration: IN_DURATION,
66
+ isShown: isOpen,
67
+ outDuration: OUT_DURATION,
68
+ });
69
+ const transitionClassName = classNames({
70
+ 'dropdown--entering': stage === 'ENTERING',
71
+ 'dropdown--exiting': stage === 'EXITING',
72
+ });
73
+ if (!mount)
74
+ return null;
75
+ return (jsx(Popper, Object.assign({}, popperProps, { ref: contentRef }, { children: jsx("div", Object.assign({ className: classNames('dropdown', transitionClassName, className), style: Object.assign({ '--max-height': `${maxHeight}px`, animationDuration: `${currentDuration}ms` }, style) }, { children: children })) })));
76
+ });
77
+ Dropdown.displayName = 'Dropdown';
78
+
79
+ export { Dropdown };
@@ -0,0 +1 @@
1
+ export * from './Dropdown';
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var utils = require('@dynamic-labs/utils');
7
+ var classNames = require('../../../utils/functions/classNames/classNames.cjs');
8
+ var OverlayCard = require('../../OverlayCard/OverlayCard.cjs');
9
+ require('react');
10
+ require('../../OverlayCard/OverlayCard.context.cjs');
11
+ var Dropdown = require('../Dropdown/Dropdown.cjs');
12
+ var ModalHeader = require('../../ModalHeader/ModalHeader.cjs');
13
+ var Typography = require('../../Typography/Typography.cjs');
14
+ var IconButton = require('../../IconButton/IconButton.cjs');
15
+ require('@dynamic-labs/sdk-api');
16
+ require('../../../shared/logger.cjs');
17
+ require('../../../config/LSSuffix.cjs');
18
+ require('@dynamic-labs/iconic');
19
+ require('@dynamic-labs/wallet-connector-core');
20
+ require('../../../context/ViewContext/ViewContext.cjs');
21
+ var close = require('../../../shared/assets/close.cjs');
22
+ require('../../../utils/constants/colors.cjs');
23
+ require('ethers');
24
+ require('../../../shared/consts/index.cjs');
25
+
26
+ const MenuList = ({ isOpen, onClickClose, popperProps, dropdownClassName, dropdownStyle, overlayCardClassName, overlayCardStyle, className, style, children, mobileTitle, }) => {
27
+ const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickClose, type: 'button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
28
+ if (utils.isMobile())
29
+ return (jsxRuntime.jsxs(OverlayCard.OverlayCard, Object.assign({ isOpen: isOpen, onClickOverlay: onClickClose, className: classNames.classNames(overlayCardClassName, className), style: Object.assign(Object.assign({}, style), overlayCardStyle) }, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary' }, { children: mobileTitle })) })), jsxRuntime.jsx("div", Object.assign({ className: 'menu-list__overlay-card__container' }, { children: children }))] })));
30
+ return (jsxRuntime.jsx(Dropdown.Dropdown, Object.assign({ isOpen: isOpen, onClickOutside: onClickClose, onScroll: onClickClose, className: classNames.classNames(dropdownClassName, className), style: Object.assign(Object.assign({}, style), dropdownStyle) }, popperProps, { children: children })));
31
+ };
32
+
33
+ exports.MenuList = MenuList;
@@ -0,0 +1,15 @@
1
+ import { CSSProperties, FC, PropsWithChildren } from 'react';
2
+ import { PopperProps } from '../../Popper/Popper/Popper';
3
+ export interface MenuListProps {
4
+ isOpen: boolean;
5
+ popperProps: Omit<Omit<PopperProps, 'className'>, 'style'>;
6
+ onClickClose?: () => void;
7
+ mobileTitle?: string;
8
+ dropdownClassName?: string;
9
+ dropdownStyle?: CSSProperties;
10
+ overlayCardClassName?: string;
11
+ overlayCardStyle?: CSSProperties;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ }
15
+ export declare const MenuList: FC<PropsWithChildren<MenuListProps>>;
@@ -0,0 +1,29 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { isMobile } from '@dynamic-labs/utils';
3
+ import { classNames } from '../../../utils/functions/classNames/classNames.js';
4
+ import { OverlayCard } from '../../OverlayCard/OverlayCard.js';
5
+ import 'react';
6
+ import '../../OverlayCard/OverlayCard.context.js';
7
+ import { Dropdown } from '../Dropdown/Dropdown.js';
8
+ import { ModalHeader } from '../../ModalHeader/ModalHeader.js';
9
+ import { Typography } from '../../Typography/Typography.js';
10
+ import { IconButton } from '../../IconButton/IconButton.js';
11
+ import '@dynamic-labs/sdk-api';
12
+ import '../../../shared/logger.js';
13
+ import '../../../config/LSSuffix.js';
14
+ import '@dynamic-labs/iconic';
15
+ import '@dynamic-labs/wallet-connector-core';
16
+ import '../../../context/ViewContext/ViewContext.js';
17
+ import { ReactComponent as SvgClose } from '../../../shared/assets/close.js';
18
+ import '../../../utils/constants/colors.js';
19
+ import 'ethers';
20
+ import '../../../shared/consts/index.js';
21
+
22
+ const MenuList = ({ isOpen, onClickClose, popperProps, dropdownClassName, dropdownStyle, overlayCardClassName, overlayCardStyle, className, style, children, mobileTitle, }) => {
23
+ const closeButton = (jsx(IconButton, Object.assign({ onClick: onClickClose, type: 'button' }, { children: jsx(SvgClose, {}) })));
24
+ if (isMobile())
25
+ return (jsxs(OverlayCard, Object.assign({ isOpen: isOpen, onClickOverlay: onClickClose, className: classNames(overlayCardClassName, className), style: Object.assign(Object.assign({}, style), overlayCardStyle) }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary' }, { children: mobileTitle })) })), jsx("div", Object.assign({ className: 'menu-list__overlay-card__container' }, { children: children }))] })));
26
+ return (jsx(Dropdown, Object.assign({ isOpen: isOpen, onClickOutside: onClickClose, onScroll: onClickClose, className: classNames(dropdownClassName, className), style: Object.assign(Object.assign({}, style), dropdownStyle) }, popperProps, { children: children })));
27
+ };
28
+
29
+ export { MenuList };
@@ -0,0 +1 @@
1
+ export * from './MenuList';
@@ -0,0 +1 @@
1
+ export * from './Dropdown';
@@ -0,0 +1 @@
1
+ export * from './watchToScrollInHierarchy';
@@ -2,8 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var isScrollable = require('../isScrollable/isScrollable.cjs');
5
+ var isScrollable = require('../../../Popper/utils/isScrollable/isScrollable.cjs');
6
6
 
7
+ // eslint-disable-next-line multiline-comment-style
8
+ /** Listens for scroll events in all elements in the hierarchy range between the root and the element,
9
+ * and executes the callback whenever it is triggered.
10
+ * @returns A callback to clean up all event listeners created
11
+ */
7
12
  const watchToScrollInHierarchy = (root, element, callback) => {
8
13
  const elementsWithListener = [];
9
14
  let currentElement = element;
@@ -0,0 +1,5 @@
1
+ /** Listens for scroll events in all elements in the hierarchy range between the root and the element,
2
+ * and executes the callback whenever it is triggered.
3
+ * @returns A callback to clean up all event listeners created
4
+ */
5
+ export declare const watchToScrollInHierarchy: (root: HTMLElement, element: HTMLElement, callback: () => void) => () => void;
@@ -1,5 +1,10 @@
1
- import { isScrollable } from '../isScrollable/isScrollable.js';
1
+ import { isScrollable } from '../../../Popper/utils/isScrollable/isScrollable.js';
2
2
 
3
+ // eslint-disable-next-line multiline-comment-style
4
+ /** Listens for scroll events in all elements in the hierarchy range between the root and the element,
5
+ * and executes the callback whenever it is triggered.
6
+ * @returns A callback to clean up all event listeners created
7
+ */
3
8
  const watchToScrollInHierarchy = (root, element, callback) => {
4
9
  const elementsWithListener = [];
5
10
  let currentElement = element;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../../../_virtual/_tslib.cjs');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var React = require('react');
8
+ var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
8
9
  require('@dynamic-labs/sdk-api');
9
10
  var logger = require('../../shared/logger.cjs');
10
11
  require('../../config/LSSuffix.cjs');
@@ -14,12 +15,10 @@ require('../../context/ViewContext/ViewContext.cjs');
14
15
  require('@dynamic-labs/utils');
15
16
  require('../../utils/constants/colors.cjs');
16
17
  require('ethers');
17
- var index = require('../../shared/utils/hooks/useOnClickOutside/index.cjs');
18
18
  require('../../shared/consts/index.cjs');
19
- var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
20
- var classNames = require('../../utils/functions/classNames/classNames.cjs');
21
19
  require('@dynamic-labs/multi-wallet');
22
20
  var isNetworkUnsupported = require('../../utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs');
21
+ var classNames = require('../../utils/functions/classNames/classNames.cjs');
23
22
  require('../../config/ApiEndpoint.cjs');
24
23
  require('@dynamic-labs/rpc-providers');
25
24
  require('../../context/ErrorContext/ErrorContext.cjs');
@@ -38,13 +37,14 @@ require('../Popper/Popper/Popper.cjs');
38
37
  require('../Popper/PopperContext/PopperContext.cjs');
39
38
  require('formik');
40
39
  require('yup');
40
+ require('../MenuList/Dropdown/Dropdown.cjs');
41
41
  require('../../context/MockContext/MockContext.cjs');
42
42
  require('../../context/CaptchaContext/CaptchaContext.cjs');
43
43
  var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
44
44
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
45
- var NetworkControl = require('./components/NetworkControl/NetworkControl.cjs');
46
- var ActionList = require('./components/ActionList/ActionList.cjs');
45
+ var MenuList = require('../MenuList/MenuList/MenuList.cjs');
47
46
  var NetworkAction = require('./components/NetworkAction/NetworkAction.cjs');
47
+ var NetworkControl = require('./components/NetworkControl/NetworkControl.cjs');
48
48
 
49
49
  const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxClassName = '', connector, evmNetworks, isNetworkPickerOpen, listClassName = '', mainClassName = '', setIsNetworkPickerOpen, showNetworkName, customCallbackOnSuccess, }) => {
50
50
  const pickerRef = React.useRef(null);
@@ -52,11 +52,8 @@ const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxCla
52
52
  const { loadingNetwork, network, setNetwork } = useInternalDynamicContext.useInternalDynamicContext();
53
53
  const { data: supportedWalletNetworks } = usePromise.usePromise(() => connector === null || connector === void 0 ? void 0 : connector.getSupportedNetworks(), [network]);
54
54
  const shouldAllowOpenDropdown = isNetworkUnsupported.isNetworkUnsupported(network, evmNetworks) || (evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.length) > 1;
55
- index.useOnClickOutside(pickerRef, () => {
56
- if (isNetworkPickerOpen) {
57
- setIsNetworkPickerOpen(false);
58
- }
59
- });
55
+ // Ref to anchor popper to
56
+ const anchorRef = React.useRef(null);
60
57
  const handleNetworkChange = (networkId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
61
58
  setNewNetworkId(networkId);
62
59
  try {
@@ -76,8 +73,8 @@ const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxCla
76
73
  setIsNetworkPickerOpen(false);
77
74
  }
78
75
  });
79
- return (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('non-widget-network-picker', mainClassName), ref: pickerRef }, { children: [jsxRuntime.jsx(NetworkControl.NetworkControl, { evmNetworks: evmNetworks, activeClassName: activeClassName, network: network, loading: loadingNetwork, isOpen: isNetworkPickerOpen, setIsOpen: setIsNetworkPickerOpen, walletConnector: connector, showNetworkName: showNetworkName, buttonClassName: buttonClassName }), shouldAllowOpenDropdown && (jsxRuntime.jsx(ActionList.ActionList, Object.assign({ className: listClassName, title: 'Select network', isOpen: isNetworkPickerOpen, setIsOpen: setIsNetworkPickerOpen }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'network-picker__dropdown' }, { children: evmNetworks.map(({ name, networkId, vanityName, iconUrls }) => (jsxRuntime.jsx(NetworkAction.NetworkAction, { iconUrl: iconUrls === null || iconUrls === void 0 ? void 0 : iconUrls[0], networkId: networkId, networkName: vanityName || name, network: network, onClick: handleNetworkChange, checkboxClassName: checkboxClassName, newNetworkId: newNetworkId, notSupported: supportedWalletNetworks &&
80
- !supportedWalletNetworks.includes(`${networkId}`) }, networkId))) })) })))] })));
76
+ return (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('non-widget-network-picker', mainClassName), ref: pickerRef }, { children: [jsxRuntime.jsx(NetworkControl.NetworkControl, { evmNetworks: evmNetworks, activeClassName: activeClassName, network: network, loading: loadingNetwork, isOpen: isNetworkPickerOpen, setIsOpen: setIsNetworkPickerOpen, walletConnector: connector, showNetworkName: showNetworkName, buttonClassName: buttonClassName }), jsxRuntime.jsx("div", { ref: anchorRef, style: { marginTop: 5, position: 'absolute' } }), shouldAllowOpenDropdown && (jsxRuntime.jsx(MenuList.MenuList, Object.assign({ className: listClassName, isOpen: isNetworkPickerOpen, onClickClose: () => setIsNetworkPickerOpen(false), popperProps: { anchorOrigin: 'bottom-left', anchorRef }, mobileTitle: 'Select network' }, { children: evmNetworks.map(({ name, networkId, vanityName, iconUrls }) => (jsxRuntime.jsx(NetworkAction.NetworkAction, { iconUrl: iconUrls === null || iconUrls === void 0 ? void 0 : iconUrls[0], networkId: networkId, networkName: vanityName || name, network: network, onClick: handleNetworkChange, checkboxClassName: checkboxClassName, newNetworkId: newNetworkId, notSupported: supportedWalletNetworks &&
77
+ !supportedWalletNetworks.includes(`${networkId}`) }, networkId))) })))] })));
81
78
  };
82
79
 
83
80
  exports.NetworkPicker = NetworkPicker;