@dynamic-labs/sdk-react-core 1.0.1 → 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.
- package/CHANGELOG.md +25 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +13 -13
- package/src/lib/components/Alert/Alert.types.d.ts +2 -1
- package/src/lib/components/Button/Button.cjs +2 -2
- package/src/lib/components/Button/Button.d.ts +2 -1
- package/src/lib/components/Button/Button.js +2 -2
- package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +3 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -2
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +2 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +2 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
- package/src/lib/components/Input/Input.types.d.ts +2 -1
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/ListTile.types.d.ts +2 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +9 -5
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +1 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +9 -5
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -3
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -3
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -6
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -6
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -1
- package/src/lib/components/Search/Search.cjs +1 -1
- package/src/lib/components/Search/Search.d.ts +2 -1
- package/src/lib/components/Search/Search.js +1 -1
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +2 -2
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +2 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -3
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -3
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
- package/src/lib/components/TextButton/TextButton.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +2 -2
- package/src/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.js +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
- package/src/lib/components/Typography/Typography.types.d.ts +2 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.d.ts +1 -0
- package/src/lib/components/UserProfile/UserProfile.js +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
- package/src/lib/data/api.cjs +0 -13
- package/src/lib/data/api.d.ts +1 -2
- package/src/lib/data/api.js +1 -13
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +2 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +2 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +2 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +2 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +2 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +2 -2
- package/src/lib/locale/en/translation.cjs +124 -1
- package/src/lib/locale/en/translation.d.ts +124 -1
- package/src/lib/locale/en/translation.js +124 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -1
- package/src/lib/shared/types/index.d.ts +3 -0
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +5 -3
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +5 -3
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +28 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +28 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +51 -7
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +51 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +3 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +3 -0
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/index.d.ts +1 -0
- package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs → useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs} +53 -67
- package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts → useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts} +3 -2
- package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.js → useProcessNetworkConfigurations/useProcessNetworkConfigurations.js} +53 -67
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +20 -14
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +20 -14
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +26 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +26 -4
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -4
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +9 -8
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +9 -8
- package/src/lib/views/CollectUserDataView/useFields.cjs +11 -0
- package/src/lib/views/CollectUserDataView/useFields.d.ts +11 -0
- package/src/lib/views/CollectUserDataView/useFields.js +11 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -2
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +35 -24
- package/src/lib/views/EmailVerification/EmailVerification.js +35 -24
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.d.ts +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +3 -3
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +3 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
- package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +2 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +8 -6
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +2 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +8 -6
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
- package/src/lib/views/WalletList/WalletList.cjs +6 -9
- package/src/lib/views/WalletList/WalletList.js +6 -9
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +5 -3
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/index.d.ts +0 -1
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/index.d.ts +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
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
|
+
|
|
17
|
+
### [1.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.1...v1.0.2) (2023-12-18)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* prevent duplicated brave wallet connector ([#4209](https://github.com/dynamic-labs/DynamicAuth/issues/4209)) ([31589b9](https://github.com/dynamic-labs/DynamicAuth/commit/31589b92ea067a5e7ca5a5bd9adb881d086d7868))
|
|
23
|
+
* ensure wagmi connects to primary wallet ([#4206](https://github.com/dynamic-labs/DynamicAuth/issues/4206)) ([#4210](https://github.com/dynamic-labs/DynamicAuth/issues/4210)) ([072bb05](https://github.com/dynamic-labs/DynamicAuth/commit/072bb05a5a9fd5b82f5498c20ff74ca966f3ea9f))
|
|
24
|
+
* ensure wallets group view shows multiple options ([#4184](https://github.com/dynamic-labs/DynamicAuth/issues/4184)) ([#4187](https://github.com/dynamic-labs/DynamicAuth/issues/4187)) ([b751f49](https://github.com/dynamic-labs/DynamicAuth/commit/b751f4952ea5a46b536edc999f37ea134348f8ef)), closes [#4186](https://github.com/dynamic-labs/DynamicAuth/issues/4186)
|
|
25
|
+
* enable brave to read the connected network ([#4198](https://github.com/dynamic-labs/DynamicAuth/issues/4198)) ([979e866](https://github.com/dynamic-labs/DynamicAuth/commit/979e86660f13982992cd43b1d9a8218150437e8b))
|
|
26
|
+
|
|
2
27
|
### [1.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0...v1.0.1) (2023-12-14)
|
|
3
28
|
|
|
4
29
|
|
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.
|
|
5
|
+
var version = "1.0.3";
|
|
6
6
|
var dependencies = {
|
|
7
|
-
"@dynamic-labs/iconic": "0.1.
|
|
8
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
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.
|
|
1
|
+
var version = "1.0.3";
|
|
2
2
|
var dependencies = {
|
|
3
|
-
"@dynamic-labs/iconic": "0.1.
|
|
4
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
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.
|
|
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.
|
|
11
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
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.
|
|
21
|
-
"@dynamic-labs/logger": "1.0.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "1.0.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "1.0.
|
|
24
|
-
"@dynamic-labs/types": "1.0.
|
|
25
|
-
"@dynamic-labs/utils": "1.0.
|
|
26
|
-
"@dynamic-labs/viem-utils": "1.0.
|
|
27
|
-
"@dynamic-labs/wallet-book": "1.0.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "1.0.
|
|
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.
|
|
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 = ({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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,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 = ({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 };
|
package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs
CHANGED
|
@@ -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;
|
package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
11
|
+
successBannerTextKey?: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const OTPVerificationView: FC<OtpVerificationLayoutProps>;
|
|
14
14
|
export {};
|