@dynamic-labs/sdk-react-core 2.1.0-alpha.1 → 2.1.0-alpha.10

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 (210) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +13 -14
  5. package/src/index.cjs +6 -2
  6. package/src/index.d.ts +2 -1
  7. package/src/index.js +3 -1
  8. package/src/lib/Main.cjs +7 -0
  9. package/src/lib/Main.js +7 -0
  10. package/src/lib/components/Alert/Alert.cjs +2 -2
  11. package/src/lib/components/Alert/Alert.js +2 -2
  12. package/src/lib/components/Alert/Alert.types.d.ts +1 -0
  13. package/src/lib/components/EmailForm/EmailForm.cjs +1 -1
  14. package/src/lib/components/EmailForm/EmailForm.js +1 -1
  15. package/src/lib/components/PhoneNumberField/PhoneNumberField.cjs +1 -1
  16. package/src/lib/components/PhoneNumberField/PhoneNumberField.js +1 -1
  17. package/src/lib/components/Portal/Portal.cjs +2 -1
  18. package/src/lib/components/Portal/Portal.js +2 -1
  19. package/src/lib/components/RadioButton/RadioButton.cjs +14 -0
  20. package/src/lib/components/RadioButton/RadioButton.d.ts +5 -0
  21. package/src/lib/components/RadioButton/RadioButton.js +10 -0
  22. package/src/lib/components/RadioButton/index.d.ts +1 -0
  23. package/src/lib/components/Tooltip/Tooltip.cjs +2 -1
  24. package/src/lib/components/Tooltip/Tooltip.js +2 -1
  25. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -1
  26. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +2 -1
  27. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -1
  28. package/src/lib/components/index.d.ts +1 -0
  29. package/src/lib/context/DynamicContext/DynamicContext.cjs +23 -7
  30. package/src/lib/context/DynamicContext/DynamicContext.d.ts +5 -0
  31. package/src/lib/context/DynamicContext/DynamicContext.js +20 -4
  32. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +2 -2
  33. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +2 -2
  34. package/src/lib/context/DynamicContext/types/index.d.ts +0 -1
  35. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +5 -2
  36. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +5 -2
  37. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +2 -1
  38. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.d.ts +1 -1
  39. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +2 -1
  40. package/src/lib/context/ErrorBoundary/ErrorBoundary.cjs +64 -0
  41. package/src/lib/context/ErrorBoundary/ErrorBoundary.d.ts +3 -0
  42. package/src/lib/context/ErrorBoundary/ErrorBoundary.js +60 -0
  43. package/src/lib/context/ErrorBoundary/ErrorBoundaryBase.cjs +40 -0
  44. package/src/lib/context/ErrorBoundary/ErrorBoundaryBase.d.ts +14 -0
  45. package/src/lib/context/ErrorBoundary/ErrorBoundaryBase.js +36 -0
  46. package/src/lib/context/ErrorBoundary/ErrorBoundaryContext.cjs +24 -0
  47. package/src/lib/context/ErrorBoundary/ErrorBoundaryContext.d.ts +5 -0
  48. package/src/lib/context/ErrorBoundary/ErrorBoundaryContext.js +18 -0
  49. package/src/lib/context/ErrorBoundary/ErrorBoundaryExclude.cjs +17 -0
  50. package/src/lib/context/ErrorBoundary/ErrorBoundaryExclude.d.ts +4 -0
  51. package/src/lib/context/ErrorBoundary/ErrorBoundaryExclude.js +13 -0
  52. package/src/lib/context/ErrorBoundary/ErrorBoundaryInclude.cjs +17 -0
  53. package/src/lib/context/ErrorBoundary/ErrorBoundaryInclude.d.ts +4 -0
  54. package/src/lib/context/ErrorBoundary/ErrorBoundaryInclude.js +13 -0
  55. package/src/lib/context/ErrorBoundary/index.d.ts +3 -0
  56. package/src/lib/context/ErrorBoundary/types.d.ts +13 -0
  57. package/src/lib/context/ViewContext/ViewContext.cjs +2 -2
  58. package/src/lib/context/ViewContext/ViewContext.js +2 -2
  59. package/src/lib/context/ViewContext/types/index.d.ts +7 -2
  60. package/src/lib/data/api/user/user.cjs +16 -0
  61. package/src/lib/data/api/user/user.js +16 -1
  62. package/src/lib/data/api/wallets/wallets.cjs +26 -6
  63. package/src/lib/data/api/wallets/wallets.d.ts +4 -0
  64. package/src/lib/data/api/wallets/wallets.js +26 -7
  65. package/src/lib/events/dynamicEvents.d.ts +1 -1
  66. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +6 -0
  67. package/src/lib/layout/DynamicAuthLayout/Header/header.js +6 -0
  68. package/src/lib/locale/en/translation.cjs +45 -4
  69. package/src/lib/locale/en/translation.d.ts +44 -3
  70. package/src/lib/locale/en/translation.js +45 -4
  71. package/src/lib/shared/types/dynamicEventsCallbacks.d.ts +2 -1
  72. package/src/lib/shared/utils/classes/storage/localStorage.cjs +2 -2
  73. package/src/lib/shared/utils/classes/storage/localStorage.js +2 -2
  74. package/src/lib/styles/index.shadow.cjs +1 -1
  75. package/src/lib/styles/index.shadow.js +1 -1
  76. package/src/lib/utils/constants/errors.cjs +0 -2
  77. package/src/lib/utils/constants/errors.js +1 -2
  78. package/src/lib/utils/functions/addPasskeyIdentifierToWalletConnector/addPasskeyIdentifierToWalletConnector.cjs +14 -0
  79. package/src/lib/utils/functions/addPasskeyIdentifierToWalletConnector/addPasskeyIdentifierToWalletConnector.d.ts +3 -0
  80. package/src/lib/utils/functions/addPasskeyIdentifierToWalletConnector/addPasskeyIdentifierToWalletConnector.js +10 -0
  81. package/src/lib/utils/functions/addPasskeyIdentifierToWalletConnector/index.d.ts +1 -0
  82. package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -2
  83. package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -2
  84. package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.cjs +3 -4
  85. package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.d.ts +1 -1
  86. package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.js +4 -5
  87. package/src/lib/utils/functions/findTurnkeyWallet/findTurnkeyWallet.cjs +12 -9
  88. package/src/lib/utils/functions/findTurnkeyWallet/findTurnkeyWallet.d.ts +8 -2
  89. package/src/lib/utils/functions/findTurnkeyWallet/findTurnkeyWallet.js +13 -10
  90. package/src/lib/utils/functions/findTurnkeyWallet/index.d.ts +1 -1
  91. package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.cjs +5 -5
  92. package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.d.ts +3 -2
  93. package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.js +5 -5
  94. package/src/lib/utils/functions/hasEmbeddedWallet/hasEmbeddedWallet.cjs +7 -2
  95. package/src/lib/utils/functions/hasEmbeddedWallet/hasEmbeddedWallet.js +7 -2
  96. package/src/lib/utils/functions/index.d.ts +2 -1
  97. package/src/lib/utils/functions/serializeWalletConnectors/index.d.ts +1 -0
  98. package/src/lib/utils/functions/serializeWalletConnectors/serializeWalletConnectors.cjs +32 -0
  99. package/src/lib/utils/functions/serializeWalletConnectors/serializeWalletConnectors.d.ts +2 -0
  100. package/src/lib/utils/functions/serializeWalletConnectors/serializeWalletConnectors.js +28 -0
  101. package/src/lib/utils/hooks/index.d.ts +1 -0
  102. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +22 -17
  103. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +22 -17
  104. package/src/lib/utils/hooks/useConfirmationModal/useConfirmationModal.cjs +2 -1
  105. package/src/lib/utils/hooks/useConfirmationModal/useConfirmationModal.js +2 -1
  106. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +22 -18
  107. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.d.ts +7 -2
  108. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +22 -18
  109. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +8 -0
  110. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +8 -0
  111. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +3 -3
  112. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +3 -3
  113. package/src/lib/utils/hooks/useElementById/useElementById.cjs +33 -18
  114. package/src/lib/utils/hooks/useElementById/useElementById.d.ts +3 -1
  115. package/src/lib/utils/hooks/useElementById/useElementById.js +33 -18
  116. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +14 -10
  117. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +14 -2
  118. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +14 -10
  119. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +6 -6
  120. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +1 -1
  121. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +6 -6
  122. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.cjs +8 -8
  123. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.d.ts +2 -2
  124. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.js +8 -8
  125. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +148 -46
  126. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.d.ts +21 -8
  127. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +152 -50
  128. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +45 -18
  129. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.d.ts +4 -1
  130. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +45 -18
  131. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +2 -2
  132. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +2 -2
  133. package/src/lib/utils/hooks/useMergeUserAccounts/index.d.ts +1 -0
  134. package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.cjs +99 -0
  135. package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.d.ts +4 -0
  136. package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.js +95 -0
  137. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +2 -1
  138. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +2 -1
  139. package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +13 -4
  140. package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.d.ts +10 -2
  141. package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +13 -4
  142. package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.cjs +6 -13
  143. package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.d.ts +1 -3
  144. package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.js +6 -12
  145. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +5 -0
  146. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +6 -1
  147. package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.cjs +25 -2
  148. package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.js +25 -2
  149. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +2 -4
  150. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -1
  151. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +2 -4
  152. package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.cjs +3 -3
  153. package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.js +3 -3
  154. package/src/lib/views/CollectUserDataView/useFields.cjs +1 -0
  155. package/src/lib/views/CollectUserDataView/useFields.d.ts +2 -0
  156. package/src/lib/views/CollectUserDataView/useFields.js +1 -0
  157. package/src/lib/views/EmailVerification/EmailVerification.cjs +38 -11
  158. package/src/lib/views/EmailVerification/EmailVerification.js +38 -11
  159. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +2 -2
  160. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +2 -2
  161. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +126 -0
  162. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.d.ts +6 -0
  163. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +122 -0
  164. package/src/lib/views/MergeUserAccountsConflictsView/index.d.ts +1 -0
  165. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +123 -0
  166. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.d.ts +4 -0
  167. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +119 -0
  168. package/src/lib/views/MergeUserAccountsView/index.d.ts +1 -0
  169. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +3 -3
  170. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +3 -3
  171. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -3
  172. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -3
  173. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +2 -1
  174. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +2 -1
  175. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +9 -9
  176. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.d.ts +6 -1
  177. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +9 -9
  178. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +2 -1
  179. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +2 -1
  180. package/src/lib/views/Passkey/utils/{createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs → createEmbeddedWalletRequest/createEmbeddedWalletRequest.cjs} +18 -19
  181. package/src/lib/views/Passkey/utils/{createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.d.ts → createEmbeddedWalletRequest/createEmbeddedWalletRequest.d.ts} +7 -3
  182. package/src/lib/views/Passkey/utils/{createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js → createEmbeddedWalletRequest/createEmbeddedWalletRequest.js} +18 -19
  183. package/src/lib/views/Passkey/utils/createEmbeddedWalletRequest/index.d.ts +1 -0
  184. package/src/lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs +16 -0
  185. package/src/lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.d.ts +2 -0
  186. package/src/lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js +12 -0
  187. package/src/lib/views/Passkey/utils/findPrimaryEmbeddedChain/index.d.ts +1 -0
  188. package/src/lib/views/Passkey/utils/index.d.ts +1 -2
  189. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +9 -9
  190. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +9 -9
  191. package/src/lib/views/WalletList/WalletList.cjs +3 -6
  192. package/src/lib/views/WalletList/WalletList.js +3 -6
  193. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +2 -8
  194. package/src/lib/views/WalletLockedView/WalletLockedView.js +2 -8
  195. package/src/lib/views/viewToComponentMap.cjs +4 -0
  196. package/src/lib/views/viewToComponentMap.d.ts +6 -2
  197. package/src/lib/views/viewToComponentMap.js +4 -0
  198. package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +2 -1
  199. package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +2 -1
  200. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -1
  201. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -1
  202. package/src/lib/utils/functions/isEmbeddedWalletPresent/index.d.ts +0 -1
  203. package/src/lib/utils/functions/isEmbeddedWalletPresent/isEmbeddedWalletPresent.cjs +0 -19
  204. package/src/lib/utils/functions/isEmbeddedWalletPresent/isEmbeddedWalletPresent.d.ts +0 -1
  205. package/src/lib/utils/functions/isEmbeddedWalletPresent/isEmbeddedWalletPresent.js +0 -15
  206. package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/index.d.ts +0 -1
  207. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +0 -65
  208. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.d.ts +0 -16
  209. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +0 -61
  210. package/src/lib/views/Passkey/utils/createPregeneratedWallet/index.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,83 @@
1
1
 
2
+ ## [2.1.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2024-04-30)
3
+
4
+
5
+ ### Features
6
+
7
+ * bump @coinbase/wallet-sdk to latest beta ([#5388](https://github.com/dynamic-labs/DynamicAuth/issues/5388)) ([9225546](https://github.com/dynamic-labs/DynamicAuth/commit/922554630ccf2ef98bc297521309918f922bc671))
8
+
9
+ ## [2.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2024-04-30)
10
+
11
+
12
+ ### Features
13
+
14
+ * headless create embedded wallet with optional passkey data parameter ([#5487](https://github.com/dynamic-labs/DynamicAuth/issues/5487)) ([891c3d7](https://github.com/dynamic-labs/DynamicAuth/commit/891c3d77a02a019140bcb8dd03b62b1afd69710e))
15
+
16
+ ## [2.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2024-04-26)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * display wallet tabs when linking a wallet ([#5491](https://github.com/dynamic-labs/DynamicAuth/issues/5491)) ([10fd6b4](https://github.com/dynamic-labs/DynamicAuth/commit/10fd6b4d9aec7596338c50e17f79f6be534cf2c1))
22
+ * ensure zerodev viem client handles eth_accounts call ([#5477](https://github.com/dynamic-labs/DynamicAuth/issues/5477)) ([1132e1e](https://github.com/dynamic-labs/DynamicAuth/commit/1132e1e8655b58e81cb56789453ba56a059f52ec))
23
+ * network with keplr ([#5485](https://github.com/dynamic-labs/DynamicAuth/issues/5485)) ([b86f2fc](https://github.com/dynamic-labs/DynamicAuth/commit/b86f2fce491f9752e80a86643916da9ac7fb9276))
24
+ * refetch nameservice data and display properly ([#5476](https://github.com/dynamic-labs/DynamicAuth/issues/5476)) ([2aee798](https://github.com/dynamic-labs/DynamicAuth/commit/2aee798846f69496201bec7aa52e7ec1f370b7c3))
25
+ * use embeddedWallet create response authToken in embeddedWalletCreated ([#5478](https://github.com/dynamic-labs/DynamicAuth/issues/5478)) ([51772da](https://github.com/dynamic-labs/DynamicAuth/commit/51772daf557a72984c757efd8301e2b510dc37f1))
26
+
27
+ ## [2.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.6...v2.1.0-alpha.7) (2024-04-25)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * restore embedded wallet session iframe element conflict ([#5474](https://github.com/dynamic-labs/DynamicAuth/issues/5474)) ([c157477](https://github.com/dynamic-labs/DynamicAuth/commit/c157477ea126b3130b13b711796bdd06215e7af1))
33
+
34
+ ## [2.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2024-04-24)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * embedded wallets headless session control fixes ([#5469](https://github.com/dynamic-labs/DynamicAuth/issues/5469)) ([92e6c35](https://github.com/dynamic-labs/DynamicAuth/commit/92e6c359d2710fd4f5f5a6fedc4acf6c4bab78ba))
40
+
41
+ ## [2.1.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2024-04-23)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * get embedded wallet checking the wrong chain enum ([#5458](https://github.com/dynamic-labs/DynamicAuth/issues/5458)) ([ed1c523](https://github.com/dynamic-labs/DynamicAuth/commit/ed1c523ca14cd4d21c00181ab40802f876c02b80))
47
+
48
+ ## [2.1.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.3...v2.1.0-alpha.4) (2024-04-23)
49
+
50
+
51
+ ### Features
52
+
53
+ * add email and sms to client auth module ([#5436](https://github.com/dynamic-labs/DynamicAuth/issues/5436)) ([5420476](https://github.com/dynamic-labs/DynamicAuth/commit/5420476d1ba38fd4f987f28e9aefbfb3e61ea2bf))
54
+ * headless create passkeys for embedded wallets ([#5395](https://github.com/dynamic-labs/DynamicAuth/issues/5395)) ([0b64099](https://github.com/dynamic-labs/DynamicAuth/commit/0b6409968457f65886248f0a0879e39ec3803fd0))
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * prevent wagmi from reconnect when DynamicContextProvider rerender ([#5446](https://github.com/dynamic-labs/DynamicAuth/issues/5446)) ([33337af](https://github.com/dynamic-labs/DynamicAuth/commit/33337af76786963cb3db7fa7c58c1292c529d0ac))
60
+
61
+ ## [2.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.2...v2.1.0-alpha.3) (2024-04-23)
62
+
63
+
64
+ ### Features
65
+
66
+ * add merge user accounts flow ([#5429](https://github.com/dynamic-labs/DynamicAuth/issues/5429)) ([41d4239](https://github.com/dynamic-labs/DynamicAuth/commit/41d423906625e28004ba8f20baf57847ed8bf5d0))
67
+
68
+
69
+ ### Bug Fixes
70
+
71
+ * disconnect wallet on lock in connect-only ([#5422](https://github.com/dynamic-labs/DynamicAuth/issues/5422)) ([a26f9fe](https://github.com/dynamic-labs/DynamicAuth/commit/a26f9fe93cf8568f1482e10b831de98c77fb2a2d))
72
+ * useReactiveProxy to stop proxing when it finds a reactive value ([#5428](https://github.com/dynamic-labs/DynamicAuth/issues/5428)) ([838dce9](https://github.com/dynamic-labs/DynamicAuth/commit/838dce9ee953361e41772239a91adb1dd8d40234))
73
+
74
+ ## [2.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.1...v2.1.0-alpha.2) (2024-04-19)
75
+
76
+
77
+ ### Bug Fixes
78
+
79
+ * buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([bd40441](https://github.com/dynamic-labs/DynamicAuth/commit/bd404414a2e51d79fad86d7603dae89628c225b9))
80
+
2
81
  ## [2.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2024-04-18)
3
82
 
4
83
 
package/package.cjs CHANGED
@@ -3,9 +3,9 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "2.1.0-alpha.1";
6
+ var version = "2.1.0-alpha.10";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.0.422",
8
+ "@dynamic-labs/sdk-api-core": "0.0.432",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
10
10
  "country-list": "2.3.0",
11
11
  formik: "2.2.9",
package/package.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client'
2
- var version = "2.1.0-alpha.1";
2
+ var version = "2.1.0-alpha.10";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.0.422",
4
+ "@dynamic-labs/sdk-api-core": "0.0.432",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
6
6
  "country-list": "2.3.0",
7
7
  formik: "2.2.9",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "2.1.0-alpha.1",
3
+ "version": "2.1.0-alpha.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
7
7
  "directory": "packages/sdk-react-core"
8
8
  },
9
9
  "dependencies": {
10
- "@dynamic-labs/sdk-api-core": "0.0.422",
10
+ "@dynamic-labs/sdk-api-core": "0.0.432",
11
11
  "@hcaptcha/react-hcaptcha": "1.4.4",
12
12
  "country-list": "2.3.0",
13
13
  "formik": "2.2.9",
@@ -17,18 +17,17 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/ethereum": "2.1.0-alpha.1",
21
- "@dynamic-labs/iconic": "2.1.0-alpha.1",
22
- "@dynamic-labs/logger": "2.1.0-alpha.1",
23
- "@dynamic-labs/multi-wallet": "2.1.0-alpha.1",
24
- "@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.1",
25
- "@dynamic-labs/rpc-provider-solana": "2.1.0-alpha.1",
26
- "@dynamic-labs/rpc-providers": "2.1.0-alpha.1",
27
- "@dynamic-labs/types": "2.1.0-alpha.1",
28
- "@dynamic-labs/utils": "2.1.0-alpha.1",
29
- "@dynamic-labs/viem-utils": "2.1.0-alpha.1",
30
- "@dynamic-labs/wallet-book": "2.1.0-alpha.1",
31
- "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.1",
20
+ "@dynamic-labs/iconic": "2.1.0-alpha.10",
21
+ "@dynamic-labs/logger": "2.1.0-alpha.10",
22
+ "@dynamic-labs/multi-wallet": "2.1.0-alpha.10",
23
+ "@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.10",
24
+ "@dynamic-labs/rpc-provider-solana": "2.1.0-alpha.10",
25
+ "@dynamic-labs/rpc-providers": "2.1.0-alpha.10",
26
+ "@dynamic-labs/types": "2.1.0-alpha.10",
27
+ "@dynamic-labs/utils": "2.1.0-alpha.10",
28
+ "@dynamic-labs/viem-utils": "2.1.0-alpha.10",
29
+ "@dynamic-labs/wallet-book": "2.1.0-alpha.10",
30
+ "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.10",
32
31
  "eventemitter3": "5.0.1"
33
32
  },
34
33
  "devDependencies": {
package/src/index.cjs CHANGED
@@ -8,6 +8,9 @@ var version = require('./version.cjs');
8
8
  var data = require('./lib/views/WalletList/data.cjs');
9
9
  var getAuthToken = require('./lib/utils/functions/getAuthToken/getAuthToken.cjs');
10
10
  var DynamicContext = require('./lib/context/DynamicContext/DynamicContext.cjs');
11
+ var ErrorBoundary = require('./lib/context/ErrorBoundary/ErrorBoundary.cjs');
12
+ var ErrorBoundaryExclude = require('./lib/context/ErrorBoundary/ErrorBoundaryExclude.cjs');
13
+ var ErrorBoundaryInclude = require('./lib/context/ErrorBoundary/ErrorBoundaryInclude.cjs');
11
14
  var useDynamicContext = require('./lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs');
12
15
  require('react');
13
16
  var useDynamicScopes = require('./lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs');
@@ -61,7 +64,6 @@ require('react-international-phone');
61
64
  var mergeNetworks = require('./lib/utils/functions/mergeNetworks/mergeNetworks.cjs');
62
65
  var createWalletClientFromWallet = require('./lib/utils/functions/createWalletClientFromWallet/createWalletClientFromWallet.cjs');
63
66
  var useEmbeddedWallet = require('./lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs');
64
- var useSecureEnclaveEmbeddedWallet = require('./lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs');
65
67
  require('./lib/context/WalletContext/WalletContext.cjs');
66
68
  require('./lib/context/ErrorContext/ErrorContext.cjs');
67
69
  require('./lib/context/ThemeContext/ThemeContext.cjs');
@@ -150,6 +152,9 @@ exports.getWallets = data.getWallets;
150
152
  exports.getAuthToken = getAuthToken.getAuthToken;
151
153
  exports.DynamicContext = DynamicContext.DynamicContext;
152
154
  exports.DynamicContextProvider = DynamicContext.DynamicContextProvider;
155
+ exports.ErrorBoundary = ErrorBoundary.ErrorBoundary;
156
+ exports.ErrorBoundaryExclude = ErrorBoundaryExclude.ErrorBoundaryExclude;
157
+ exports.ErrorBoundaryInclude = ErrorBoundaryInclude.ErrorBoundaryInclude;
153
158
  exports.useDynamicContext = useDynamicContext.useDynamicContext;
154
159
  exports.useDynamicScopes = useDynamicScopes.useDynamicScopes;
155
160
  exports.useUserWallets = UserWalletsContext.useUserWallets;
@@ -189,7 +194,6 @@ exports.ArrowIcon = stroke.ReactComponent;
189
194
  exports.mergeNetworks = mergeNetworks.mergeNetworks;
190
195
  exports.createWalletClientFromWallet = createWalletClientFromWallet.createWalletClientFromWallet;
191
196
  exports.useEmbeddedWallet = useEmbeddedWallet.useEmbeddedWallet;
192
- exports.useSecureEnclaveEmbeddedWallet = useSecureEnclaveEmbeddedWallet.useSecureEnclaveEmbeddedWallet;
193
197
  exports.useIsLoggedIn = useIsLoggedIn.useIsLoggedIn;
194
198
  exports.useOtpVerificationRequest = useOtpVerificationRequest.useOtpVerificationRequest;
195
199
  exports.usePasskeyRecovery = usePasskeyRecovery.usePasskeyRecovery;
package/src/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { VERSION } from './version';
3
3
  export { getWallets } from './lib/views/WalletList/data';
4
4
  export { getAuthToken } from './lib/utils/functions/getAuthToken';
5
5
  export { DynamicContextProvider, DynamicContext, } from './lib/context/DynamicContext';
6
+ export { ErrorBoundary, ErrorBoundaryInclude, ErrorBoundaryExclude, } from './lib/context/ErrorBoundary';
6
7
  export type { DynamicContextProps } from './lib/context/DynamicContext';
7
8
  export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContext';
8
9
  export { useDynamicScopes } from './lib/utils/hooks/useDynamicScopes';
@@ -105,7 +106,7 @@ export { FilterAndSortWallets, FilterBridgeChainsName, FilterChain, FilterWallet
105
106
  export {
106
107
  /** @deprecated */
107
108
  DynamicWidgetContextProvider, } from './lib/widgets/DynamicWidget/context';
108
- export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useSecureEnclaveEmbeddedWallet, } from './lib/utils/hooks';
109
+ export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, } from './lib/utils/hooks';
109
110
  export { useUserUpdateRequest, useWalletConnectorEvent, } from './lib/utils/hooks';
110
111
  export { type VerifyOtp, useOtpVerificationRequest, } from './lib/utils/hooks/authenticationHooks/';
111
112
  export type { UpdateUserFieldsArg } from './lib/utils/hooks/';
package/src/index.js CHANGED
@@ -4,6 +4,9 @@ export { VERSION } from './version.js';
4
4
  export { getWallets } from './lib/views/WalletList/data.js';
5
5
  export { getAuthToken } from './lib/utils/functions/getAuthToken/getAuthToken.js';
6
6
  export { DynamicContext, DynamicContextProvider } from './lib/context/DynamicContext/DynamicContext.js';
7
+ export { ErrorBoundary } from './lib/context/ErrorBoundary/ErrorBoundary.js';
8
+ export { ErrorBoundaryExclude } from './lib/context/ErrorBoundary/ErrorBoundaryExclude.js';
9
+ export { ErrorBoundaryInclude } from './lib/context/ErrorBoundary/ErrorBoundaryInclude.js';
7
10
  export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContext/useDynamicContext.js';
8
11
  import 'react';
9
12
  export { useDynamicScopes } from './lib/utils/hooks/useDynamicScopes/useDynamicScopes.js';
@@ -57,7 +60,6 @@ import 'react-international-phone';
57
60
  export { mergeNetworks } from './lib/utils/functions/mergeNetworks/mergeNetworks.js';
58
61
  export { createWalletClientFromWallet } from './lib/utils/functions/createWalletClientFromWallet/createWalletClientFromWallet.js';
59
62
  export { useEmbeddedWallet } from './lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js';
60
- export { useSecureEnclaveEmbeddedWallet } from './lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js';
61
63
  import './lib/context/WalletContext/WalletContext.js';
62
64
  import './lib/context/ErrorContext/ErrorContext.js';
63
65
  import './lib/context/ThemeContext/ThemeContext.js';
package/src/lib/Main.cjs CHANGED
@@ -23,6 +23,8 @@ var localStorage = require('./shared/utils/classes/storage/localStorage.cjs');
23
23
  var usePreventPageScroll = require('./shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
24
24
  var index$1 = require('./shared/consts/index.cjs');
25
25
  require('./context/DynamicContext/DynamicContext.cjs');
26
+ require('./context/ErrorBoundary/ErrorBoundaryBase.cjs');
27
+ require('./context/ErrorBoundary/ErrorBoundaryContext.cjs');
26
28
  var dynamicEvents = require('./events/dynamicEvents.cjs');
27
29
  require('./context/CaptchaContext/CaptchaContext.cjs');
28
30
  require('./context/ErrorContext/ErrorContext.cjs');
@@ -105,8 +107,13 @@ const Main = () => {
105
107
  usePreventPageScroll.usePreventPageScroll(showAuthFlow);
106
108
  const userWallets = UserWalletsContext.useUserWallets();
107
109
  const handleClose = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
110
+ var _a;
108
111
  if (viewsToDisableCloseOnOverlayClick.includes(view.type))
109
112
  return;
113
+ if ((_a = view.events) === null || _a === void 0 ? void 0 : _a.onClose) {
114
+ view.events.onClose();
115
+ return;
116
+ }
110
117
  if ((view.type === 'network-not-supported' ||
111
118
  view.type === 'network-not-supported-manual') &&
112
119
  userWallets.length === 1) {
package/src/lib/Main.js CHANGED
@@ -19,6 +19,8 @@ import { LocalStorage } from './shared/utils/classes/storage/localStorage.js';
19
19
  import { usePreventPageScroll } from './shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
20
20
  import { authModalZIndex } from './shared/consts/index.js';
21
21
  import './context/DynamicContext/DynamicContext.js';
22
+ import './context/ErrorBoundary/ErrorBoundaryBase.js';
23
+ import './context/ErrorBoundary/ErrorBoundaryContext.js';
22
24
  import { dynamicEvents } from './events/dynamicEvents.js';
23
25
  import './context/CaptchaContext/CaptchaContext.js';
24
26
  import './context/ErrorContext/ErrorContext.js';
@@ -101,8 +103,13 @@ const Main = () => {
101
103
  usePreventPageScroll(showAuthFlow);
102
104
  const userWallets = useUserWallets();
103
105
  const handleClose = () => __awaiter(void 0, void 0, void 0, function* () {
106
+ var _a;
104
107
  if (viewsToDisableCloseOnOverlayClick.includes(view.type))
105
108
  return;
109
+ if ((_a = view.events) === null || _a === void 0 ? void 0 : _a.onClose) {
110
+ view.events.onClose();
111
+ return;
112
+ }
106
113
  if ((view.type === 'network-not-supported' ||
107
114
  view.type === 'network-not-supported-manual') &&
108
115
  userWallets.length === 1) {
@@ -24,10 +24,10 @@ var classNames = require('../../utils/functions/classNames/classNames.cjs');
24
24
  const errorIconMap = {
25
25
  error: jsxRuntime.jsx(error.ReactComponent, {}),
26
26
  };
27
- const Alert = ({ children, icon, variant = 'error', contentDataTestId, }) => (jsxRuntime.jsxs("div", { className: classNames.classNames('alert', {
27
+ const Alert = ({ children, icon, variant = 'error', contentDataTestId, className = '', }) => (jsxRuntime.jsxs("div", { className: classNames.classNames('alert', {
28
28
  'alert--error': variant === 'error',
29
29
  'alert--info': variant === 'info',
30
30
  'alert--warning': variant === 'warning',
31
- }), children: [icon && (jsxRuntime.jsx(Icon.Icon, { size: 'small', className: 'alert__icon', children: typeof icon === 'string' ? errorIconMap[icon] : icon })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', "data-testid": contentDataTestId, children: children })] }));
31
+ }, className), children: [icon && (jsxRuntime.jsx(Icon.Icon, { size: 'small', className: 'alert__icon', children: typeof icon === 'string' ? errorIconMap[icon] : icon })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', "data-testid": contentDataTestId, children: children })] }));
32
32
 
33
33
  exports.Alert = Alert;
@@ -20,10 +20,10 @@ import { classNames } from '../../utils/functions/classNames/classNames.js';
20
20
  const errorIconMap = {
21
21
  error: jsx(SvgError, {}),
22
22
  };
23
- const Alert = ({ children, icon, variant = 'error', contentDataTestId, }) => (jsxs("div", { className: classNames('alert', {
23
+ const Alert = ({ children, icon, variant = 'error', contentDataTestId, className = '', }) => (jsxs("div", { className: classNames('alert', {
24
24
  'alert--error': variant === 'error',
25
25
  'alert--info': variant === 'info',
26
26
  'alert--warning': variant === 'warning',
27
- }), children: [icon && (jsx(Icon, { size: 'small', className: 'alert__icon', children: typeof icon === 'string' ? errorIconMap[icon] : icon })), jsx(Typography, { variant: 'body_small', "data-testid": contentDataTestId, children: children })] }));
27
+ }, className), children: [icon && (jsx(Icon, { size: 'small', className: 'alert__icon', children: typeof icon === 'string' ? errorIconMap[icon] : icon })), jsx(Typography, { variant: 'body_small', "data-testid": contentDataTestId, children: children })] }));
28
28
 
29
29
  export { Alert };
@@ -5,5 +5,6 @@ export type AlertProps = {
5
5
  contentDataTestId?: string;
6
6
  icon?: ReactElement | AlertIcons;
7
7
  variant?: 'error' | 'warning' | 'info';
8
+ className?: string;
8
9
  } & CopyKey;
9
10
  export type AlertComponent = FC<PropsWithChildren<AlertProps>>;
@@ -96,7 +96,7 @@ const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail,
96
96
  }
97
97
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(emailInput);
98
98
  });
99
- return (jsxRuntime.jsxs("form", { className: classNames.classNames('login-with-email-form', className), style: style, "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsxRuntime.jsx(Input.Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsxRuntime.jsx(InlineSubmitButton.InlineSubmitButton, { disabled: isLoading || isDisabled, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading || isDisabled, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) }), !emailSubmitButtonInsideInput && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3 || isDisabled, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: buttonCopyKey, typographyProps: {
99
+ return (jsxRuntime.jsxs("form", { className: classNames.classNames('login-with-email-form', className), style: style, "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsxRuntime.jsx(Input.Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsxRuntime.jsx(InlineSubmitButton.InlineSubmitButton, { disabled: isLoading || isDisabled, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading || isDisabled, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), autoComplete: 'email' }), !emailSubmitButtonInsideInput && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3 || isDisabled, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: buttonCopyKey, typographyProps: {
100
100
  color: 'inherit',
101
101
  }, children: t(buttonCopyKey) }))] }));
102
102
  };
@@ -92,7 +92,7 @@ const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail,
92
92
  }
93
93
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(emailInput);
94
94
  });
95
- return (jsxs("form", { className: classNames('login-with-email-form', className), style: style, "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsx(Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsx(InlineSubmitButton, { disabled: isLoading || isDisabled, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading || isDisabled, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) }), !emailSubmitButtonInsideInput && (jsx(TypographyButton, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3 || isDisabled, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: buttonCopyKey, typographyProps: {
95
+ return (jsxs("form", { className: classNames('login-with-email-form', className), style: style, "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsx(Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsx(InlineSubmitButton, { disabled: isLoading || isDisabled, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading || isDisabled, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), autoComplete: 'email' }), !emailSubmitButtonInsideInput && (jsx(TypographyButton, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3 || isDisabled, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: buttonCopyKey, typographyProps: {
96
96
  color: 'inherit',
97
97
  }, children: t(buttonCopyKey) }))] }));
98
98
  };
@@ -98,7 +98,7 @@ const PhoneNumberField = ({ isLoading, disabled, error, label, onUpdate, appendR
98
98
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
99
99
  }, ref: anchorRef, children: [jsxRuntime.jsxs("div", { className: classNames.classNames('phone-number-field__fields__country-code', {
100
100
  'phone-number-field__fields__country-code--disabled': isLoading || disabled,
101
- }), onClick: openDropdown, "data-testid": 'country-code', children: [jsxRuntime.jsx(reactInternationalPhone.FlagImage, { iso2: currentCountry.iso2, size: '24px', className: 'phone-number-field__fields__country-code__flag' }), jsxRuntime.jsx(Typography.Typography, { className: 'phone-number-field__fields__country-code__plus', variant: 'body_normal', weight: 'regular', style: { fontSize: countryFontSize }, color: 'primary', children: "+" }), jsxRuntime.jsx(Input.Input, { label: '', id: 'country_code_field', value: countryInput, onChange: handleCountryInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__country-code__container', className: 'phone-number-field__fields__country-code__container__input', onBlur: onBlurCountry, ref: countryInputRef, onKeyDown: handleCountryKeyDown, onFocus: onFocusCountry, style: { fontSize: countryFontSize }, "data-testid": 'country-code-input', inputMode: 'numeric' }), jsxRuntime.jsx(Icon.Icon, { className: 'phone-number-field__fields__country-code__chevron', children: jsxRuntime.jsx(chevronDown.ReactComponent, {}) })] }), jsxRuntime.jsx(Input.Input, { label: '', id: 'phoneNumber', value: formattedPhone, onChange: handlePhoneInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__phone-number', className: 'phone-number-field__fields__phone-number__input', ref: inputRef, error: Boolean(invalidNumberMessage || error), inputMode: 'numeric', "data-testid": 'phone_number_input' }), !hasInput && (jsxRuntime.jsx(Typography.Typography, { className: 'phone-number-field__fields__placeholder', variant: 'body_normal', weight: 'regular', copykey: 'dyn_collect_user_data.fields.phone_number.label', children: label !== null && label !== void 0 ? label : t('dyn_collect_user_data.fields.phone_number.label') })), appendRight] }), jsxRuntime.jsx(MenuList.MenuList, { isOpen: countryDropdownOpen, onClickClose: closeDropdown, popperProps: {
101
+ }), onClick: openDropdown, "data-testid": 'country-code', children: [jsxRuntime.jsx(reactInternationalPhone.FlagImage, { iso2: currentCountry.iso2, size: '24px', className: 'phone-number-field__fields__country-code__flag' }), jsxRuntime.jsx(Typography.Typography, { className: 'phone-number-field__fields__country-code__plus', variant: 'body_normal', weight: 'regular', style: { fontSize: countryFontSize }, color: 'primary', children: "+" }), jsxRuntime.jsx(Input.Input, { label: '', id: 'country_code_field', value: countryInput, onChange: handleCountryInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__country-code__container', className: 'phone-number-field__fields__country-code__container__input', onBlur: onBlurCountry, ref: countryInputRef, onKeyDown: handleCountryKeyDown, onFocus: onFocusCountry, style: { fontSize: countryFontSize }, "data-testid": 'country-code-input', inputMode: 'numeric', autoComplete: 'tel-country-code' }), jsxRuntime.jsx(Icon.Icon, { className: 'phone-number-field__fields__country-code__chevron', children: jsxRuntime.jsx(chevronDown.ReactComponent, {}) })] }), jsxRuntime.jsx(Input.Input, { label: '', id: 'phoneNumber', value: formattedPhone, onChange: handlePhoneInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__phone-number', className: 'phone-number-field__fields__phone-number__input', ref: inputRef, error: Boolean(invalidNumberMessage || error), inputMode: 'numeric', "data-testid": 'phone_number_input', autoComplete: 'tel-national' }), !hasInput && (jsxRuntime.jsx(Typography.Typography, { className: 'phone-number-field__fields__placeholder', variant: 'body_normal', weight: 'regular', copykey: 'dyn_collect_user_data.fields.phone_number.label', children: label !== null && label !== void 0 ? label : t('dyn_collect_user_data.fields.phone_number.label') })), appendRight] }), jsxRuntime.jsx(MenuList.MenuList, { isOpen: countryDropdownOpen, onClickClose: closeDropdown, popperProps: {
102
102
  anchorOrigin: 'bottom-left',
103
103
  anchorRef,
104
104
  }, mobileTitle: 'Select country', dropdownClassName: 'phone-number-field__dropdown', children: jsxRuntime.jsx("div", { className: 'phone-number-field__dropdown__items', ref: onMenuDisplayToggle, children: filteredCountries.map((countryData) => {
@@ -94,7 +94,7 @@ const PhoneNumberField = ({ isLoading, disabled, error, label, onUpdate, appendR
94
94
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
95
95
  }, ref: anchorRef, children: [jsxs("div", { className: classNames('phone-number-field__fields__country-code', {
96
96
  'phone-number-field__fields__country-code--disabled': isLoading || disabled,
97
- }), onClick: openDropdown, "data-testid": 'country-code', children: [jsx(FlagImage, { iso2: currentCountry.iso2, size: '24px', className: 'phone-number-field__fields__country-code__flag' }), jsx(Typography, { className: 'phone-number-field__fields__country-code__plus', variant: 'body_normal', weight: 'regular', style: { fontSize: countryFontSize }, color: 'primary', children: "+" }), jsx(Input, { label: '', id: 'country_code_field', value: countryInput, onChange: handleCountryInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__country-code__container', className: 'phone-number-field__fields__country-code__container__input', onBlur: onBlurCountry, ref: countryInputRef, onKeyDown: handleCountryKeyDown, onFocus: onFocusCountry, style: { fontSize: countryFontSize }, "data-testid": 'country-code-input', inputMode: 'numeric' }), jsx(Icon, { className: 'phone-number-field__fields__country-code__chevron', children: jsx(SvgChevronDown, {}) })] }), jsx(Input, { label: '', id: 'phoneNumber', value: formattedPhone, onChange: handlePhoneInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__phone-number', className: 'phone-number-field__fields__phone-number__input', ref: inputRef, error: Boolean(invalidNumberMessage || error), inputMode: 'numeric', "data-testid": 'phone_number_input' }), !hasInput && (jsx(Typography, { className: 'phone-number-field__fields__placeholder', variant: 'body_normal', weight: 'regular', copykey: 'dyn_collect_user_data.fields.phone_number.label', children: label !== null && label !== void 0 ? label : t('dyn_collect_user_data.fields.phone_number.label') })), appendRight] }), jsx(MenuList, { isOpen: countryDropdownOpen, onClickClose: closeDropdown, popperProps: {
97
+ }), onClick: openDropdown, "data-testid": 'country-code', children: [jsx(FlagImage, { iso2: currentCountry.iso2, size: '24px', className: 'phone-number-field__fields__country-code__flag' }), jsx(Typography, { className: 'phone-number-field__fields__country-code__plus', variant: 'body_normal', weight: 'regular', style: { fontSize: countryFontSize }, color: 'primary', children: "+" }), jsx(Input, { label: '', id: 'country_code_field', value: countryInput, onChange: handleCountryInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__country-code__container', className: 'phone-number-field__fields__country-code__container__input', onBlur: onBlurCountry, ref: countryInputRef, onKeyDown: handleCountryKeyDown, onFocus: onFocusCountry, style: { fontSize: countryFontSize }, "data-testid": 'country-code-input', inputMode: 'numeric', autoComplete: 'tel-country-code' }), jsx(Icon, { className: 'phone-number-field__fields__country-code__chevron', children: jsx(SvgChevronDown, {}) })] }), jsx(Input, { label: '', id: 'phoneNumber', value: formattedPhone, onChange: handlePhoneInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__phone-number', className: 'phone-number-field__fields__phone-number__input', ref: inputRef, error: Boolean(invalidNumberMessage || error), inputMode: 'numeric', "data-testid": 'phone_number_input', autoComplete: 'tel-national' }), !hasInput && (jsx(Typography, { className: 'phone-number-field__fields__placeholder', variant: 'body_normal', weight: 'regular', copykey: 'dyn_collect_user_data.fields.phone_number.label', children: label !== null && label !== void 0 ? label : t('dyn_collect_user_data.fields.phone_number.label') })), appendRight] }), jsx(MenuList, { isOpen: countryDropdownOpen, onClickClose: closeDropdown, popperProps: {
98
98
  anchorOrigin: 'bottom-left',
99
99
  anchorRef,
100
100
  }, mobileTitle: 'Select country', dropdownClassName: 'phone-number-field__dropdown', children: jsx("div", { className: 'phone-number-field__dropdown__items', ref: onMenuDisplayToggle, children: filteredCountries.map((countryData) => {
@@ -106,7 +106,8 @@ const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, wh
106
106
  style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'portal__backdrop' })), jsxRuntime.jsx("div", { style: { zIndex }, children: children })] }));
107
107
  };
108
108
  const Portal = ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId = 'dynamic-modal', }) => {
109
- const modalRootElementRef = useElementById.useElementById(elementId);
109
+ const { createRootElement } = useElementById.useElementById();
110
+ const modalRootElementRef = createRootElement(elementId);
110
111
  return reactDom.createPortal(jsxRuntime.jsx(ShadowDOM.ShadowDOM, { zIndex: zIndex, dataTestId: 'dynamic-modal-shadow', children: jsxRuntime.jsx(OpacityTransition.OpacityTransition, Object.assign({ isShown: isShown }, transitionEvents, { children: jsxRuntime.jsx(ModalComponent, { handleClose: handleClose, withBackdrop: withBackdrop, whiteList: (node) => modalRootElementRef.current.contains(node), children: children }) })) }), modalRootElementRef.current);
111
112
  };
112
113
 
@@ -98,7 +98,8 @@ const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, wh
98
98
  style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'portal__backdrop' })), jsx("div", { style: { zIndex }, children: children })] }));
99
99
  };
100
100
  const Portal = ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId = 'dynamic-modal', }) => {
101
- const modalRootElementRef = useElementById(elementId);
101
+ const { createRootElement } = useElementById();
102
+ const modalRootElementRef = createRootElement(elementId);
102
103
  return createPortal(jsx(ShadowDOM, { zIndex: zIndex, dataTestId: 'dynamic-modal-shadow', children: jsx(OpacityTransition, Object.assign({ isShown: isShown }, transitionEvents, { children: jsx(ModalComponent, { handleClose: handleClose, withBackdrop: withBackdrop, whiteList: (node) => modalRootElementRef.current.contains(node), children: children }) })) }), modalRootElementRef.current);
103
104
  };
104
105
 
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var classNames = require('../../utils/functions/classNames/classNames.cjs');
8
+
9
+ const RadioButton = ({ children, checked, value, name, disabled = false, className = '', onChange, }) => {
10
+ const radioId = `${name}_${value}`;
11
+ return (jsxRuntime.jsxs("div", { className: classNames.classNames('radio-button', className), children: [jsxRuntime.jsx("input", { type: 'radio', id: radioId, name: name, value: value, disabled: disabled, defaultChecked: checked, onChange: onChange }), jsxRuntime.jsx("label", { htmlFor: radioId, children: children })] }));
12
+ };
13
+
14
+ exports.RadioButton = RadioButton;
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithoutRef, FC } from 'react';
2
+ export type RadioButtonProps = ComponentPropsWithoutRef<'input'> & {
3
+ className?: string;
4
+ };
5
+ export declare const RadioButton: FC<RadioButtonProps>;
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { classNames } from '../../utils/functions/classNames/classNames.js';
4
+
5
+ const RadioButton = ({ children, checked, value, name, disabled = false, className = '', onChange, }) => {
6
+ const radioId = `${name}_${value}`;
7
+ return (jsxs("div", { className: classNames('radio-button', className), children: [jsx("input", { type: 'radio', id: radioId, name: name, value: value, disabled: disabled, defaultChecked: checked, onChange: onChange }), jsx("label", { htmlFor: radioId, children: children })] }));
8
+ };
9
+
10
+ export { RadioButton };
@@ -0,0 +1 @@
1
+ export { RadioButton } from './RadioButton';
@@ -79,7 +79,8 @@ require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage
79
79
  require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
80
80
 
81
81
  const Tooltip = ({ children, content, className, as: Tag = 'span', copykey, }) => {
82
- const portalRoot = useElementById.useElementById('dynamic-tooltips');
82
+ const { createRootElement } = useElementById.useElementById();
83
+ const portalRoot = createRootElement('dynamic-tooltips');
83
84
  const [vector, setVector] = React.useState([0, 0]);
84
85
  const childrenRef = React.useRef(null);
85
86
  const [visible, setVisible] = React.useState(false);
@@ -75,7 +75,8 @@ import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.
75
75
  import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
76
76
 
77
77
  const Tooltip = ({ children, content, className, as: Tag = 'span', copykey, }) => {
78
- const portalRoot = useElementById('dynamic-tooltips');
78
+ const { createRootElement } = useElementById();
79
+ const portalRoot = createRootElement('dynamic-tooltips');
79
80
  const [vector, setVector] = useState([0, 0]);
80
81
  const childrenRef = useRef(null);
81
82
  const [visible, setVisible] = useState(false);
@@ -77,7 +77,7 @@ require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/Se
77
77
  require('@hcaptcha/react-hcaptcha');
78
78
  require('../../../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
79
79
 
80
- const UserProfileField = ({ name, label, value, copykey, }) => {
80
+ const UserProfileField = ({ name, label, value, copykey, autoComplete, }) => {
81
81
  var _a, _b;
82
82
  const { user } = useInternalDynamicContext.useInternalDynamicContext();
83
83
  const { t } = reactI18next.useTranslation();
@@ -5,5 +5,6 @@ export type UserProfileFieldProps = {
5
5
  label?: string;
6
6
  name: string;
7
7
  value?: string | boolean | null;
8
+ autoComplete?: string;
8
9
  } & CopyKey;
9
- export declare const UserProfileField: ({ name, label, value, copykey, }: UserProfileFieldProps) => JSX.Element;
10
+ export declare const UserProfileField: ({ name, label, value, copykey, autoComplete, }: UserProfileFieldProps) => JSX.Element;
@@ -73,7 +73,7 @@ import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/Sec
73
73
  import '@hcaptcha/react-hcaptcha';
74
74
  import '../../../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
75
75
 
76
- const UserProfileField = ({ name, label, value, copykey, }) => {
76
+ const UserProfileField = ({ name, label, value, copykey, autoComplete, }) => {
77
77
  var _a, _b;
78
78
  const { user } = useInternalDynamicContext();
79
79
  const { t } = useTranslation();
@@ -42,6 +42,7 @@ export * from './Portal';
42
42
  export * from './PoweredByDynamic';
43
43
  export * from './QRCode';
44
44
  export * from './QrCodeWrapper';
45
+ export * from './RadioButton';
45
46
  export * from './RenderView';
46
47
  export * from './SandboxIndicatorWrapper';
47
48
  export * from './SecureEmbeddedWalletCard';