@dynamic-labs/sdk-react-core 1.0.2 → 1.0.3

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 (206) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.cjs +3 -3
  3. package/package.js +3 -3
  4. package/package.json +13 -13
  5. package/src/lib/components/Alert/Alert.types.d.ts +2 -1
  6. package/src/lib/components/Button/Button.cjs +2 -2
  7. package/src/lib/components/Button/Button.d.ts +2 -1
  8. package/src/lib/components/Button/Button.js +2 -2
  9. package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
  10. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -2
  11. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +3 -2
  12. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -2
  13. package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
  14. package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +2 -1
  15. package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
  16. package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
  17. package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +2 -1
  18. package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
  19. package/src/lib/components/Input/Input.types.d.ts +2 -1
  20. package/src/lib/components/ListTile/ListTile.cjs +1 -1
  21. package/src/lib/components/ListTile/ListTile.js +1 -1
  22. package/src/lib/components/ListTile/ListTile.types.d.ts +2 -1
  23. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +9 -5
  24. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +1 -1
  25. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +9 -5
  26. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -3
  27. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -3
  28. package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
  29. package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
  30. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -6
  31. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -1
  32. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -6
  33. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -1
  34. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -1
  35. package/src/lib/components/Search/Search.cjs +1 -1
  36. package/src/lib/components/Search/Search.d.ts +2 -1
  37. package/src/lib/components/Search/Search.js +1 -1
  38. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +2 -2
  39. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +2 -2
  40. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -3
  41. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -3
  42. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
  43. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
  44. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
  45. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
  46. package/src/lib/components/TextButton/TextButton.d.ts +2 -1
  47. package/src/lib/components/Tooltip/Tooltip.cjs +2 -2
  48. package/src/lib/components/Tooltip/Tooltip.d.ts +2 -1
  49. package/src/lib/components/Tooltip/Tooltip.js +2 -2
  50. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -3
  51. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +2 -1
  52. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -3
  53. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +1 -1
  54. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +2 -1
  55. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +1 -1
  56. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
  57. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
  58. package/src/lib/components/Typography/Typography.types.d.ts +2 -1
  59. package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
  60. package/src/lib/components/UserProfile/UserProfile.d.ts +1 -0
  61. package/src/lib/components/UserProfile/UserProfile.js +2 -2
  62. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -2
  63. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +3 -2
  64. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -2
  65. package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
  66. package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
  67. package/src/lib/data/api.cjs +0 -13
  68. package/src/lib/data/api.d.ts +1 -2
  69. package/src/lib/data/api.js +1 -13
  70. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
  71. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
  72. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -2
  73. package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +2 -2
  74. package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -2
  75. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -1
  76. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -1
  77. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -1
  78. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -1
  79. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +2 -2
  80. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +2 -1
  81. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +2 -2
  82. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +2 -2
  83. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +2 -1
  84. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +2 -2
  85. package/src/lib/locale/en/translation.cjs +124 -1
  86. package/src/lib/locale/en/translation.d.ts +124 -1
  87. package/src/lib/locale/en/translation.js +124 -1
  88. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -1
  89. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -1
  90. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -2
  91. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -2
  92. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -1
  93. package/src/lib/shared/types/index.d.ts +3 -0
  94. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +28 -1
  95. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +28 -1
  96. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -0
  97. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
  98. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -0
  99. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +51 -7
  100. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -0
  101. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +51 -7
  102. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +3 -0
  103. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +3 -0
  104. package/src/lib/utils/hooks/useProcessNetworkConfigurations/index.d.ts +1 -0
  105. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs → useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs} +53 -67
  106. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts → useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts} +3 -2
  107. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.js → useProcessNetworkConfigurations/useProcessNetworkConfigurations.js} +53 -67
  108. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +20 -14
  109. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +20 -14
  110. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +26 -4
  111. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +26 -4
  112. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
  113. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
  114. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -1
  115. package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -1
  116. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
  117. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
  118. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
  119. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
  120. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
  121. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
  122. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -4
  123. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -4
  124. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +9 -8
  125. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +9 -8
  126. package/src/lib/views/CollectUserDataView/useFields.cjs +11 -0
  127. package/src/lib/views/CollectUserDataView/useFields.d.ts +11 -0
  128. package/src/lib/views/CollectUserDataView/useFields.js +11 -0
  129. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -3
  130. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -3
  131. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
  132. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
  133. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -2
  134. package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -2
  135. package/src/lib/views/EmailVerification/EmailVerification.cjs +35 -24
  136. package/src/lib/views/EmailVerification/EmailVerification.js +35 -24
  137. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
  138. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
  139. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +2 -2
  140. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.d.ts +3 -2
  141. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +2 -2
  142. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -1
  143. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -1
  144. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
  145. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
  146. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
  147. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
  148. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -2
  149. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -2
  150. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -1
  151. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -1
  152. package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
  153. package/src/lib/views/NoAccess/NoAccess.js +1 -1
  154. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
  155. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
  156. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
  157. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
  158. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +3 -3
  159. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +3 -3
  160. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
  161. package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
  162. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
  163. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
  164. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
  165. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
  166. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
  167. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
  168. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +2 -1
  169. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
  170. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
  171. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
  172. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
  173. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +8 -6
  174. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +2 -1
  175. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +8 -6
  176. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
  177. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
  178. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
  179. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
  180. package/src/lib/views/WalletList/WalletList.cjs +6 -9
  181. package/src/lib/views/WalletList/WalletList.js +6 -9
  182. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
  183. package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
  184. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
  185. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
  186. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
  187. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
  188. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
  189. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
  190. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
  191. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
  192. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +5 -3
  193. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +5 -3
  194. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -2
  195. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -2
  196. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -2
  197. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -1
  198. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -1
  199. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
  200. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
  201. package/src/lib/utils/hooks/useFetchNetworkConfigurations/index.d.ts +0 -1
  202. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/index.d.ts +0 -0
  203. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -0
  204. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -0
  205. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -0
  206. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
1
 
2
+ ### [1.0.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.2...v1.0.3) (2023-12-28)
3
+
4
+
5
+ ### Features
6
+
7
+ * add default footer to wallet list when tos and pp not enabled ([#4229](https://github.com/dynamic-labs/DynamicAuth/issues/4229)) ([a6d90a7](https://github.com/dynamic-labs/DynamicAuth/commit/a6d90a7276cafeaffcb21c5362837d020fc10215)), closes [#4224](https://github.com/dynamic-labs/DynamicAuth/issues/4224)
8
+ * add starknet support for sopelia ([#4268](https://github.com/dynamic-labs/DynamicAuth/issues/4268)) ([53d4ce4](https://github.com/dynamic-labs/DynamicAuth/commit/53d4ce400070adfb32021b01b9c748b9a7d90577))
9
+ * delay setting user to after pregenerated wallet flow ([#4244](https://github.com/dynamic-labs/DynamicAuth/issues/4244)) ([503d34d](https://github.com/dynamic-labs/DynamicAuth/commit/503d34d9d6f5edd55b009f1f63c049ac6dfb1fb7))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * coinbase solana signMessage ([#4261](https://github.com/dynamic-labs/DynamicAuth/issues/4261)) ([7e0e69c](https://github.com/dynamic-labs/DynamicAuth/commit/7e0e69c0ad9f9c9778ff9255909dd2314e16fa06))
15
+ * solflare connect ([#4215](https://github.com/dynamic-labs/DynamicAuth/issues/4215)) ([#4219](https://github.com/dynamic-labs/DynamicAuth/issues/4219)) ([df39306](https://github.com/dynamic-labs/DynamicAuth/commit/df393069b9a9859052b2d55db8dfc3399d85f2a9))
16
+
2
17
  ### [1.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.1...v1.0.2) (2023-12-18)
3
18
 
4
19
 
package/package.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.0.2";
5
+ var version = "1.0.3";
6
6
  var dependencies = {
7
- "@dynamic-labs/iconic": "0.1.45",
8
- "@dynamic-labs/sdk-api": "0.0.330",
7
+ "@dynamic-labs/iconic": "0.1.47",
8
+ "@dynamic-labs/sdk-api": "0.0.333",
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
- var version = "1.0.2";
1
+ var version = "1.0.3";
2
2
  var dependencies = {
3
- "@dynamic-labs/iconic": "0.1.45",
4
- "@dynamic-labs/sdk-api": "0.0.330",
3
+ "@dynamic-labs/iconic": "0.1.47",
4
+ "@dynamic-labs/sdk-api": "0.0.333",
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,14 +1,14 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
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/iconic": "0.1.45",
11
- "@dynamic-labs/sdk-api": "0.0.330",
10
+ "@dynamic-labs/iconic": "0.1.47",
11
+ "@dynamic-labs/sdk-api": "0.0.333",
12
12
  "@hcaptcha/react-hcaptcha": "1.4.4",
13
13
  "country-list": "2.3.0",
14
14
  "formik": "2.2.9",
@@ -17,15 +17,15 @@
17
17
  "react-focus-lock": "2.9.2",
18
18
  "react-i18next": "^13.2.0",
19
19
  "yup": "0.32.11",
20
- "@dynamic-labs/ethereum": "1.0.2",
21
- "@dynamic-labs/logger": "1.0.2",
22
- "@dynamic-labs/multi-wallet": "1.0.2",
23
- "@dynamic-labs/rpc-providers": "1.0.2",
24
- "@dynamic-labs/types": "1.0.2",
25
- "@dynamic-labs/utils": "1.0.2",
26
- "@dynamic-labs/viem-utils": "1.0.2",
27
- "@dynamic-labs/wallet-book": "1.0.2",
28
- "@dynamic-labs/wallet-connector-core": "1.0.2",
20
+ "@dynamic-labs/ethereum": "1.0.3",
21
+ "@dynamic-labs/logger": "1.0.3",
22
+ "@dynamic-labs/multi-wallet": "1.0.3",
23
+ "@dynamic-labs/rpc-providers": "1.0.3",
24
+ "@dynamic-labs/types": "1.0.3",
25
+ "@dynamic-labs/utils": "1.0.3",
26
+ "@dynamic-labs/viem-utils": "1.0.3",
27
+ "@dynamic-labs/wallet-book": "1.0.3",
28
+ "@dynamic-labs/wallet-connector-core": "1.0.3",
29
29
  "eventemitter3": "5.0.1"
30
30
  },
31
31
  "devDependencies": {
@@ -34,7 +34,7 @@
34
34
  "peerDependencies": {
35
35
  "react": "^17.0.2 || ^18.0.0",
36
36
  "react-dom": "^17.0.2 || ^18.0.0",
37
- "viem": "^1.1.0"
37
+ "viem": "^1.19.13"
38
38
  },
39
39
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
40
40
  "bugs": {
@@ -1,8 +1,9 @@
1
1
  import { FC, PropsWithChildren, ReactElement } from 'react';
2
+ import { CopyKey } from '../../shared';
2
3
  export type AlertIcons = 'error';
3
4
  export type AlertProps = {
4
5
  contentDataTestId?: string;
5
6
  icon?: ReactElement | AlertIcons;
6
7
  variant?: 'error' | 'warning';
7
- };
8
+ } & CopyKey;
8
9
  export type AlertComponent = FC<PropsWithChildren<AlertProps>>;
@@ -11,7 +11,7 @@ var Typography = require('../Typography/Typography.cjs');
11
11
 
12
12
  const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant = 'primary', children, feedback, expanded, dataTestId, disabled = false, showInternalLoading = true, loading = false, onClick, type, startSlot, endSlot, typographyProps = {
13
13
  variant: 'button_primary',
14
- }, }) => {
14
+ }, copykey, }) => {
15
15
  const [internalButtonLoading, setInternalButtonLoading] = React.useState(false);
16
16
  const [isFeedbackVisible, setIsFeedbackVisible] = React.useState(false);
17
17
  const buttonVariantClassNameMap = {
@@ -54,7 +54,7 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
54
54
  }, 2000);
55
55
  }
56
56
  });
57
- const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [startSlot && jsxRuntime.jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsxRuntime.jsx("div", { className: 'button__end-slot', children: endSlot })] }));
57
+ const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [startSlot && jsxRuntime.jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { copykey: copykey, children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsxRuntime.jsx("div", { className: 'button__end-slot', children: endSlot })] }));
58
58
  return (jsxRuntime.jsxs("button", { type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId, children: [(internalButtonLoading || loading) && (jsxRuntime.jsx("div", { className: 'button__spinner-container', "data-testid": 'button__spinner', children: jsxRuntime.jsx(spinner.Spinner, { className: 'button__spinner' }) })), buttonContent] }));
59
59
  };
60
60
 
@@ -1,5 +1,6 @@
1
1
  import { ButtonHTMLAttributes, FC, MouseEventHandler, ReactNode } from 'react';
2
2
  import { TypographyProps } from '../Typography/Typography.types';
3
+ import { CopyKey } from '../../shared';
3
4
  type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'brand-primary';
4
5
  type ButtonPadding = 'small' | 'medium' | 'large' | 'none' | 'default' | 'login-screen-height';
5
6
  export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> & {
@@ -16,6 +17,6 @@ export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick
16
17
  startSlot?: JSX.Element;
17
18
  typographyProps?: Omit<TypographyProps, 'as'>;
18
19
  onClick?: MouseEventHandler<HTMLButtonElement> | (() => Promise<void>);
19
- };
20
+ } & CopyKey;
20
21
  export declare const Button: FC<ButtonProps>;
21
22
  export {};
@@ -7,7 +7,7 @@ import { Typography } from '../Typography/Typography.js';
7
7
 
8
8
  const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant = 'primary', children, feedback, expanded, dataTestId, disabled = false, showInternalLoading = true, loading = false, onClick, type, startSlot, endSlot, typographyProps = {
9
9
  variant: 'button_primary',
10
- }, }) => {
10
+ }, copykey, }) => {
11
11
  const [internalButtonLoading, setInternalButtonLoading] = useState(false);
12
12
  const [isFeedbackVisible, setIsFeedbackVisible] = useState(false);
13
13
  const buttonVariantClassNameMap = {
@@ -50,7 +50,7 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
50
50
  }, 2000);
51
51
  }
52
52
  });
53
- const buttonContent = (jsxs(Fragment, { children: [startSlot && jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) && (jsx(Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsx("div", { className: 'button__end-slot', children: endSlot })] }));
53
+ const buttonContent = (jsxs(Fragment, { children: [startSlot && jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) && (jsx(Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { copykey: copykey, children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsx("div", { className: 'button__end-slot', children: endSlot })] }));
54
54
  return (jsxs("button", { type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId, children: [(internalButtonLoading || loading) && (jsx("div", { className: 'button__spinner-container', "data-testid": 'button__spinner', children: jsx(Spinner, { className: 'button__spinner' }) })), buttonContent] }));
55
55
  };
56
56
 
@@ -1,9 +1,10 @@
1
1
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ import { CopyKey } from '../../..';
2
3
  type Props = ComponentPropsWithoutRef<'button'> & {
3
4
  children: ReactNode;
4
5
  className?: string;
5
6
  onClick?: VoidFunction;
6
7
  textToCopy: string;
7
8
  };
8
- export declare const CopyButton: ({ children, className, textToCopy, onClick, }: Props) => JSX.Element;
9
+ export declare const CopyButton: ({ children, className, textToCopy, onClick, }: Props & CopyKey) => JSX.Element;
9
10
  export {};
@@ -9,7 +9,7 @@ var useInternalDynamicContext = require('../../context/DynamicContext/useInterna
9
9
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
10
10
  var ConnectButton = require('./components/ConnectButton.cjs');
11
11
 
12
- const DynamicConnectButton = ({ buttonContainerClassName = '', buttonClassName = '', children, }) => {
12
+ const DynamicConnectButton = ({ buttonContainerClassName = '', buttonClassName = '', children, copykey, }) => {
13
13
  const { isProjectSettingsLoading, setShowAuthFlow, setSelectedWalletConnectorKey, } = useInternalDynamicContext.useInternalDynamicContext();
14
14
  const { setView } = ViewContext.useViewContext();
15
15
  const [didUserClick, setUserClicked] = React.useState(false);
@@ -20,7 +20,7 @@ const DynamicConnectButton = ({ buttonContainerClassName = '', buttonClassName =
20
20
  setSelectedWalletConnectorKey(null);
21
21
  setShowAuthFlow(true);
22
22
  }), [didUserClick, setSelectedWalletConnectorKey, setShowAuthFlow, setView]);
23
- return (jsxRuntime.jsx(ConnectButton.ConnectButton, { isLoading: isProjectSettingsLoading, isActive: didUserClick, onClick: handleOnClick, buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, children: children }));
23
+ return (jsxRuntime.jsx(ConnectButton.ConnectButton, { isLoading: isProjectSettingsLoading, isActive: didUserClick, onClick: handleOnClick, buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, copykey: copykey, children: children }));
24
24
  };
25
25
 
26
26
  exports.DynamicConnectButton = DynamicConnectButton;
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
+ import { CopyKey } from '../../shared';
2
3
  type Props = {
3
4
  buttonClassName?: string;
4
5
  buttonContainerClassName?: string;
5
6
  children: ReactNode;
6
- };
7
- export declare const DynamicConnectButton: ({ buttonContainerClassName, buttonClassName, children, }: Props) => JSX.Element;
7
+ } & CopyKey;
8
+ export declare const DynamicConnectButton: ({ buttonContainerClassName, buttonClassName, children, copykey, }: Props) => JSX.Element;
8
9
  export {};
@@ -5,7 +5,7 @@ import { useInternalDynamicContext } from '../../context/DynamicContext/useInter
5
5
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
6
6
  import { ConnectButton } from './components/ConnectButton.js';
7
7
 
8
- const DynamicConnectButton = ({ buttonContainerClassName = '', buttonClassName = '', children, }) => {
8
+ const DynamicConnectButton = ({ buttonContainerClassName = '', buttonClassName = '', children, copykey, }) => {
9
9
  const { isProjectSettingsLoading, setShowAuthFlow, setSelectedWalletConnectorKey, } = useInternalDynamicContext();
10
10
  const { setView } = useViewContext();
11
11
  const [didUserClick, setUserClicked] = useState(false);
@@ -16,7 +16,7 @@ const DynamicConnectButton = ({ buttonContainerClassName = '', buttonClassName =
16
16
  setSelectedWalletConnectorKey(null);
17
17
  setShowAuthFlow(true);
18
18
  }), [didUserClick, setSelectedWalletConnectorKey, setShowAuthFlow, setView]);
19
- return (jsx(ConnectButton, { isLoading: isProjectSettingsLoading, isActive: didUserClick, onClick: handleOnClick, buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, children: children }));
19
+ return (jsx(ConnectButton, { isLoading: isProjectSettingsLoading, isActive: didUserClick, onClick: handleOnClick, buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, copykey: copykey, children: children }));
20
20
  };
21
21
 
22
22
  export { DynamicConnectButton };
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var Button = require('../../Button/Button.cjs');
7
7
  var classNames = require('../../../utils/functions/classNames/classNames.cjs');
8
8
 
9
- const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsxRuntime.jsx("div", { className: buttonContainerClassName, children: jsxRuntime.jsx(Button.Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames.classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', children: children }) }));
9
+ const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, copykey, }) => (jsxRuntime.jsx("div", { className: buttonContainerClassName, children: jsxRuntime.jsx(Button.Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames.classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', copykey: copykey, children: children }) }));
10
10
 
11
11
  exports.ConnectButton = ConnectButton;
@@ -1,9 +1,10 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
+ import { CopyKey } from '../../../shared';
2
3
  export type ConnectButtonProps = {
3
4
  buttonClassName?: string;
4
5
  buttonContainerClassName?: string;
5
6
  isLoading?: boolean;
6
7
  isActive?: boolean;
7
8
  onClick?: () => void;
8
- };
9
+ } & CopyKey;
9
10
  export declare const ConnectButton: FC<PropsWithChildren<ConnectButtonProps>>;
@@ -2,6 +2,6 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { Button } from '../../Button/Button.js';
3
3
  import { classNames } from '../../../utils/functions/classNames/classNames.js';
4
4
 
5
- const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsx("div", { className: buttonContainerClassName, children: jsx(Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', children: children }) }));
5
+ const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, copykey, }) => (jsx("div", { className: buttonContainerClassName, children: jsx(Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', copykey: copykey, children: children }) }));
6
6
 
7
7
  export { ConnectButton };
@@ -19,14 +19,14 @@ require('../../shared/consts/index.cjs');
19
19
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
20
20
  var Typography = require('../Typography/Typography.cjs');
21
21
 
22
- const ErrorContainer = ({ children, className, isMultiWalletError = false, withIcon = true, variant = 'error', }) => {
22
+ const ErrorContainer = ({ children, className, isMultiWalletError = false, withIcon = true, variant = 'error', copykey, }) => {
23
23
  const effectiveContainerClassName = classNames.classNames('error-container', `error-container--${variant}`, className, {
24
24
  'error-container--multi-wallet': isMultiWalletError,
25
25
  });
26
26
  const effectiveErrorClassName = classNames.classNames('error', {
27
27
  'error--with-icon': withIcon,
28
28
  });
29
- return (jsxRuntime.jsxs("div", { className: effectiveContainerClassName, children: [withIcon && jsxRuntime.jsx(error.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: effectiveErrorClassName, children: children })] }));
29
+ return (jsxRuntime.jsxs("div", { className: effectiveContainerClassName, children: [withIcon && jsxRuntime.jsx(error.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: effectiveErrorClassName, copykey: copykey, children: children })] }));
30
30
  };
31
31
 
32
32
  exports.ErrorContainer = ErrorContainer;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { CopyKey } from '../../shared';
2
3
  type Variant = 'error' | 'info' | 'success';
3
4
  type Props = {
4
5
  children: ReactNode;
@@ -7,5 +8,5 @@ type Props = {
7
8
  variant?: Variant;
8
9
  withIcon?: boolean;
9
10
  };
10
- export declare const ErrorContainer: ({ children, className, isMultiWalletError, withIcon, variant, }: Props) => JSX.Element;
11
+ export declare const ErrorContainer: ({ children, className, isMultiWalletError, withIcon, variant, copykey, }: Props & CopyKey) => JSX.Element;
11
12
  export {};
@@ -15,14 +15,14 @@ import '../../shared/consts/index.js';
15
15
  import { classNames } from '../../utils/functions/classNames/classNames.js';
16
16
  import { Typography } from '../Typography/Typography.js';
17
17
 
18
- const ErrorContainer = ({ children, className, isMultiWalletError = false, withIcon = true, variant = 'error', }) => {
18
+ const ErrorContainer = ({ children, className, isMultiWalletError = false, withIcon = true, variant = 'error', copykey, }) => {
19
19
  const effectiveContainerClassName = classNames('error-container', `error-container--${variant}`, className, {
20
20
  'error-container--multi-wallet': isMultiWalletError,
21
21
  });
22
22
  const effectiveErrorClassName = classNames('error', {
23
23
  'error--with-icon': withIcon,
24
24
  });
25
- return (jsxs("div", { className: effectiveContainerClassName, children: [withIcon && jsx(SvgError, {}), jsx(Typography, { variant: 'body_small', className: effectiveErrorClassName, children: children })] }));
25
+ return (jsxs("div", { className: effectiveContainerClassName, children: [withIcon && jsx(SvgError, {}), jsx(Typography, { variant: 'body_small', className: effectiveErrorClassName, copykey: copykey, children: children })] }));
26
26
  };
27
27
 
28
28
  export { ErrorContainer };
@@ -1,4 +1,5 @@
1
1
  import { FC, PropsWithChildren, ReactNode } from 'react';
2
+ import { CopyKey } from '../../shared';
2
3
  export type InputVariant = 'dense' | 'regular';
3
4
  export type InputProps = React.ComponentPropsWithoutRef<'input'> & {
4
5
  className?: string;
@@ -10,5 +11,5 @@ export type InputProps = React.ComponentPropsWithoutRef<'input'> & {
10
11
  placeholder?: string;
11
12
  suffix?: ReactNode;
12
13
  variant?: InputVariant;
13
- };
14
+ } & CopyKey;
14
15
  export type InputComponent = FC<PropsWithChildren<InputProps>>;
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
7
7
  var Typography = require('../Typography/Typography.cjs');
8
8
 
9
- const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled, children: [leading, jsxRuntime.jsx("div", { className: 'list-tile__children', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', children: children }) }), trailing] }));
9
+ const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, copykey, }) => (jsxRuntime.jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled, children: [leading, jsxRuntime.jsx("div", { className: 'list-tile__children', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', copykey: copykey, children: children }) }), trailing] }));
10
10
 
11
11
  exports.ListTile = ListTile;
@@ -2,6 +2,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { classNames } from '../../utils/functions/classNames/classNames.js';
3
3
  import { Typography } from '../Typography/Typography.js';
4
4
 
5
- const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, }) => (jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled, children: [leading, jsx("div", { className: 'list-tile__children', children: jsx(Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', children: children }) }), trailing] }));
5
+ const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, copykey, }) => (jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled, children: [leading, jsx("div", { className: 'list-tile__children', children: jsx(Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', copykey: copykey, children: children }) }), trailing] }));
6
6
 
7
7
  export { ListTile };
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties, FC, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
2
+ import { CopyKey } from '../../shared';
2
3
  export type ListTileProps = {
3
4
  className?: string;
4
5
  dataTestId?: string;
@@ -7,5 +8,5 @@ export type ListTileProps = {
7
8
  disabled?: boolean;
8
9
  style?: CSSProperties;
9
10
  trailing?: ReactNode;
10
- };
11
+ } & CopyKey;
11
12
  export type ListTileComponent = FC<PropsWithChildren<ListTileProps>>;
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
6
7
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
7
8
  var AnimatePresence = require('../AnimatePresence/AnimatePresence.cjs');
8
9
  var Typography = require('../Typography/Typography.cjs');
@@ -16,10 +17,13 @@ const typographyColor = {
16
17
  notice: 'brand-primary',
17
18
  success: 'green-1',
18
19
  };
19
- const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsxRuntime.jsx("div", { className: classNames.classNames('modal-header-banner', {
20
- 'modal-header-banner__error': type === 'error',
21
- 'modal-header-banner__notice': type === 'notice',
22
- 'modal-header-banner__success': type === 'success',
23
- }), children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, children: message }) })) }));
20
+ const ModalHeaderBanner = ({ messageKey, type = 'error', disableTruncate = false, }) => {
21
+ const { t } = reactI18next.useTranslation();
22
+ return (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(messageKey) && (jsxRuntime.jsx("div", { className: classNames.classNames('modal-header-banner', {
23
+ 'modal-header-banner__error': type === 'error',
24
+ 'modal-header-banner__notice': type === 'notice',
25
+ 'modal-header-banner__success': type === 'success',
26
+ }), children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, copykey: messageKey, children: t(messageKey || '') }) })) }));
27
+ };
24
28
 
25
29
  exports.ModalHeaderBanner = ModalHeaderBanner;
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  type ModalHeaderBannerType = 'error' | 'success' | 'notice';
3
3
  export type ModalHeaderBannerProps = {
4
- message?: string;
4
+ messageKey?: string;
5
5
  type?: ModalHeaderBannerType;
6
6
  disableTruncate?: boolean;
7
7
  };
@@ -1,4 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { classNames } from '../../utils/functions/classNames/classNames.js';
3
4
  import { AnimatePresence } from '../AnimatePresence/AnimatePresence.js';
4
5
  import { Typography } from '../Typography/Typography.js';
@@ -12,10 +13,13 @@ const typographyColor = {
12
13
  notice: 'brand-primary',
13
14
  success: 'green-1',
14
15
  };
15
- const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsx("div", { className: classNames('modal-header-banner', {
16
- 'modal-header-banner__error': type === 'error',
17
- 'modal-header-banner__notice': type === 'notice',
18
- 'modal-header-banner__success': type === 'success',
19
- }), children: jsx(Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, children: message }) })) }));
16
+ const ModalHeaderBanner = ({ messageKey, type = 'error', disableTruncate = false, }) => {
17
+ const { t } = useTranslation();
18
+ return (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(messageKey) && (jsx("div", { className: classNames('modal-header-banner', {
19
+ 'modal-header-banner__error': type === 'error',
20
+ 'modal-header-banner__notice': type === 'notice',
21
+ 'modal-header-banner__success': type === 'success',
22
+ }), children: jsx(Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, copykey: messageKey, children: t(messageKey || '') }) })) }));
23
+ };
20
24
 
21
25
  export { ModalHeaderBanner };
@@ -80,7 +80,7 @@ const NeedHelpSection = () => {
80
80
  if (!hasContactInfo) {
81
81
  return null;
82
82
  }
83
- return (jsxRuntime.jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
83
+ return (jsxRuntime.jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', copykey: 'dyn_need_help_section.contact_support', children: jsxRuntime.jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
84
84
  };
85
85
  const getPasskeyRecoverySession = () => {
86
86
  if (!isRecoveryEnabled) {
@@ -90,14 +90,14 @@ const NeedHelpSection = () => {
90
90
  const finalRecoveryText = hasContactInfo
91
91
  ? recoveryText
92
92
  : recoveryText.slice(0, 1).toUpperCase() + recoveryText.slice(1);
93
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasContactInfo && (jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.divider') })), jsxRuntime.jsx(TextButton.TextButton, { className: classNames.classNames('helper-link', {
93
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasContactInfo && (jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.divider', children: t('dyn_need_help_section.divider') })), jsxRuntime.jsx(TextButton.TextButton, { copykey: 'dyn_need_help_section.recovery_button', className: classNames.classNames('helper-link', {
94
94
  'need-help-section--captalize': !hasContactInfo,
95
95
  }), onClick: initPasskeyRecoveryProcess, children: finalRecoveryText })] }));
96
96
  };
97
97
  if (!hasContactInfo && !isRecoveryEnabled) {
98
98
  return null;
99
99
  }
100
- return (jsxRuntime.jsxs("div", { className: 'need-help-section', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
100
+ return (jsxRuntime.jsxs("div", { className: 'need-help-section', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.info', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
101
101
  };
102
102
 
103
103
  exports.NeedHelpSection = NeedHelpSection;
@@ -76,7 +76,7 @@ const NeedHelpSection = () => {
76
76
  if (!hasContactInfo) {
77
77
  return null;
78
78
  }
79
- return (jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
79
+ return (jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsx(Typography, { variant: 'body_small', color: 'link', copykey: 'dyn_need_help_section.contact_support', children: jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
80
80
  };
81
81
  const getPasskeyRecoverySession = () => {
82
82
  if (!isRecoveryEnabled) {
@@ -86,14 +86,14 @@ const NeedHelpSection = () => {
86
86
  const finalRecoveryText = hasContactInfo
87
87
  ? recoveryText
88
88
  : recoveryText.slice(0, 1).toUpperCase() + recoveryText.slice(1);
89
- return (jsxs(Fragment, { children: [hasContactInfo && (jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.divider') })), jsx(TextButton, { className: classNames('helper-link', {
89
+ return (jsxs(Fragment, { children: [hasContactInfo && (jsx(Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.divider', children: t('dyn_need_help_section.divider') })), jsx(TextButton, { copykey: 'dyn_need_help_section.recovery_button', className: classNames('helper-link', {
90
90
  'need-help-section--captalize': !hasContactInfo,
91
91
  }), onClick: initPasskeyRecoveryProcess, children: finalRecoveryText })] }));
92
92
  };
93
93
  if (!hasContactInfo && !isRecoveryEnabled) {
94
94
  return null;
95
95
  }
96
- return (jsxs("div", { className: 'need-help-section', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
96
+ return (jsxs("div", { className: 'need-help-section', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.info', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
97
97
  };
98
98
 
99
99
  export { NeedHelpSection };
@@ -22,7 +22,7 @@ var Typography = require('../../../Typography/Typography.cjs');
22
22
 
23
23
  const UnsupportedNetwork = ({ showMsg }) => {
24
24
  const { t } = reactI18next.useTranslation();
25
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(error.ReactComponent, {}) }), showMsg && (jsxRuntime.jsx(Typography.Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', children: t('dyn_network_not_supported.button') }))] }));
25
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(error.ReactComponent, {}) }), showMsg && (jsxRuntime.jsx(Typography.Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', copykey: 'dyn_network_not_supported.button', children: t('dyn_network_not_supported.button') }))] }));
26
26
  };
27
27
 
28
28
  exports.UnsupportedNetwork = UnsupportedNetwork;
@@ -18,7 +18,7 @@ import { Typography } from '../../../Typography/Typography.js';
18
18
 
19
19
  const UnsupportedNetwork = ({ showMsg }) => {
20
20
  const { t } = useTranslation();
21
- return (jsxs(Fragment, { children: [jsx(Icon, { size: 'small', children: jsx(SvgError, {}) }), showMsg && (jsx(Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', children: t('dyn_network_not_supported.button') }))] }));
21
+ return (jsxs(Fragment, { children: [jsx(Icon, { size: 'small', children: jsx(SvgError, {}) }), showMsg && (jsx(Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', copykey: 'dyn_network_not_supported.button', children: t('dyn_network_not_supported.button') }))] }));
22
22
  };
23
23
 
24
24
  export { UnsupportedNetwork };
@@ -71,18 +71,19 @@ require('../Popper/Popper/Popper.cjs');
71
71
  require('../Popper/PopperContext/PopperContext.cjs');
72
72
  require('react-focus-lock');
73
73
 
74
- const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, successBannerText, }) => {
74
+ const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, successBannerTextKey, }) => {
75
75
  const { t } = reactI18next.useTranslation();
76
76
  const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
77
77
  const EmailIcon = React.useMemo(() => {
78
78
  const EmailIcon = (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signInWithEmail.ReactComponent, Object.assign({}, props, { "data-testid": 'sign-in-with-email-icon' })) }));
79
79
  return EmailIcon;
80
80
  }, []);
81
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, children: jsxRuntime.jsx("div", { className: 'otp-verification-view__status-header', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid
82
- ? t('dyn_otp_verification.verification_succeeded')
83
- : t('dyn_otp_verification.confirm_code') }) }) }), successBannerText && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsxs("div", { className: classNames.classNames('otp-verification-view', {
84
- 'otp-verification-view--message': Boolean(successBannerText || error),
85
- }), children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: EmailIcon, iconSize: 96, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: isLoading, className: 'otp-verification-view__icon-with-spinner', treatAsFunctionComponent: true })), jsxRuntime.jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_otp_verification.hang_tight') })), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_otp_verification.code_sent') }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) }), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) }))] })] }))] }), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange })] })] }));
81
+ const titleCopyKey = () => isValid
82
+ ? 'dyn_otp_verification.verification_succeeded'
83
+ : 'dyn_otp_verification.confirm_code';
84
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, children: jsxRuntime.jsx("div", { className: 'otp-verification-view__status-header', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', copykey: titleCopyKey(), children: t(titleCopyKey()) }) }) }), successBannerTextKey && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'notice', messageKey: successBannerTextKey, disableTruncate: true })), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', messageKey: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsxs("div", { className: classNames.classNames('otp-verification-view', {
85
+ 'otp-verification-view--message': Boolean(successBannerTextKey || error),
86
+ }), children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: EmailIcon, iconSize: 96, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: isLoading, className: 'otp-verification-view__icon-with-spinner', treatAsFunctionComponent: true })), jsxRuntime.jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.hang_tight', children: t('dyn_otp_verification.hang_tight') })), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.code_sent', children: t('dyn_otp_verification.code_sent') }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) }), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) }))] })] }))] }), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange })] })] }));
86
87
  };
87
88
 
88
89
  exports.OTPVerificationView = OTPVerificationView;
@@ -8,7 +8,7 @@ type OtpVerificationLayoutProps = {
8
8
  onClickEditEmail?: MouseEventHandler<HTMLButtonElement>;
9
9
  onPinChange?: (value: string) => void;
10
10
  onPinComplete: (value: string) => void;
11
- successBannerText?: string;
11
+ successBannerTextKey?: string;
12
12
  };
13
13
  export declare const OTPVerificationView: FC<OtpVerificationLayoutProps>;
14
14
  export {};
@@ -67,18 +67,19 @@ import '../Popper/Popper/Popper.js';
67
67
  import '../Popper/PopperContext/PopperContext.js';
68
68
  import 'react-focus-lock';
69
69
 
70
- const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, successBannerText, }) => {
70
+ const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, successBannerTextKey, }) => {
71
71
  const { t } = useTranslation();
72
72
  const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
73
73
  const EmailIcon = useMemo(() => {
74
74
  const EmailIcon = (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignInWithEmail, Object.assign({}, props, { "data-testid": 'sign-in-with-email-icon' })) }));
75
75
  return EmailIcon;
76
76
  }, []);
77
- return (jsxs(Fragment, { children: [jsx(ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, children: jsx("div", { className: 'otp-verification-view__status-header', children: jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid
78
- ? t('dyn_otp_verification.verification_succeeded')
79
- : t('dyn_otp_verification.confirm_code') }) }) }), successBannerText && (jsx(ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxs("div", { className: classNames('otp-verification-view', {
80
- 'otp-verification-view--message': Boolean(successBannerText || error),
81
- }), children: [isValid && (jsx(IconWithStatus, { Icon: EmailIcon, iconSize: 96, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: isLoading, className: 'otp-verification-view__icon-with-spinner', treatAsFunctionComponent: true })), jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_otp_verification.hang_tight') })), !isValid && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_otp_verification.code_sent') }), jsxs("div", { className: 'otp-verification-view__email-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) }), onClickEditEmail && (jsx(IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) }))] })] }))] }), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange })] })] }));
77
+ const titleCopyKey = () => isValid
78
+ ? 'dyn_otp_verification.verification_succeeded'
79
+ : 'dyn_otp_verification.confirm_code';
80
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, children: jsx("div", { className: 'otp-verification-view__status-header', children: jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', copykey: titleCopyKey(), children: t(titleCopyKey()) }) }) }), successBannerTextKey && (jsx(ModalHeaderBanner, { type: 'notice', messageKey: successBannerTextKey, disableTruncate: true })), jsx(ModalHeaderBanner, { type: 'error', messageKey: error === null || error === void 0 ? void 0 : error.message }), jsxs("div", { className: classNames('otp-verification-view', {
81
+ 'otp-verification-view--message': Boolean(successBannerTextKey || error),
82
+ }), children: [isValid && (jsx(IconWithStatus, { Icon: EmailIcon, iconSize: 96, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: isLoading, className: 'otp-verification-view__icon-with-spinner', treatAsFunctionComponent: true })), jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.hang_tight', children: t('dyn_otp_verification.hang_tight') })), !isValid && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.code_sent', children: t('dyn_otp_verification.code_sent') }), jsxs("div", { className: 'otp-verification-view__email-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) }), onClickEditEmail && (jsx(IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) }))] })] }))] }), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange })] })] }));
82
83
  };
83
84
 
84
85
  export { OTPVerificationView };