@dynamic-labs/sdk-react-core 4.9.2-preview.0 → 4.9.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 +28 -1
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/index.cjs +2 -2
- package/src/index.js +2 -2
- package/src/lib/components/Portal/ModalComponent/ModalComponent.cjs +32 -0
- package/src/lib/components/Portal/ModalComponent/ModalComponent.d.ts +9 -0
- package/src/lib/components/Portal/ModalComponent/ModalComponent.js +24 -0
- package/src/lib/components/Portal/ModalComponent/index.d.ts +1 -0
- package/src/lib/components/Portal/Portal.cjs +3 -119
- package/src/lib/components/Portal/Portal.d.ts +3 -8
- package/src/lib/components/Portal/Portal.js +3 -115
- package/src/lib/components/TosAndPp/TosAndPp.cjs +3 -1
- package/src/lib/components/TosAndPp/TosAndPp.js +3 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +1 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +1 -1
- package/src/lib/components/TransactionCard/TransactionCard.cjs +1 -1
- package/src/lib/components/TransactionCard/TransactionCard.js +1 -1
- package/src/lib/components/Typography/Typography.cjs +1 -0
- package/src/lib/components/Typography/Typography.js +1 -0
- package/src/lib/components/Typography/Typography.types.d.ts +1 -1
- package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.cjs +10 -2
- package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.js +10 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +13 -9
- package/src/lib/context/DynamicContext/DynamicContext.js +15 -11
- package/src/lib/context/DynamicContext/helpers/helpers.cjs +0 -12
- package/src/lib/context/DynamicContext/helpers/helpers.d.ts +1 -9
- package/src/lib/context/DynamicContext/helpers/helpers.js +1 -12
- package/src/lib/context/DynamicContext/hooks/useInitialViewType/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useInitialViewType/useInitialViewType.cjs +18 -0
- package/src/lib/context/DynamicContext/hooks/useInitialViewType/useInitialViewType.d.ts +10 -0
- package/src/lib/context/DynamicContext/hooks/useInitialViewType/useInitialViewType.js +14 -0
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.js +1 -1
- package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +6 -2
- package/src/lib/context/ErrorContext/hooks/useErrorText/useErrorText.cjs +1 -0
- package/src/lib/context/ErrorContext/hooks/useErrorText/useErrorText.js +1 -0
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +1 -0
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +1 -1
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +1 -1
- package/src/lib/context/ViewContext/ViewContext.cjs +1 -1
- package/src/lib/context/ViewContext/ViewContext.js +1 -1
- package/src/lib/locale/en/translation.cjs +3 -2
- package/src/lib/locale/en/translation.d.ts +2 -1
- package/src/lib/locale/en/translation.js +3 -2
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/authViewLayoutChecks.cjs +135 -0
- package/src/lib/utils/constants/authViewLayoutChecks.d.ts +21 -0
- package/src/lib/utils/constants/authViewLayoutChecks.js +123 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/index.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +36 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.d.ts +11 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +32 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +20 -93
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +19 -92
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +7 -4
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +5 -2
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +7 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +8 -8
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +8 -8
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +2 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +2 -1
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +3 -2
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +3 -2
- package/src/lib/utils/hooks/useValidateSession/handleStoreAndEnvironmentMismatch/handleStoreAndEnvironmentMismatch.cjs +1 -3
- package/src/lib/utils/hooks/useValidateSession/handleStoreAndEnvironmentMismatch/handleStoreAndEnvironmentMismatch.d.ts +1 -2
- package/src/lib/utils/hooks/useValidateSession/handleStoreAndEnvironmentMismatch/handleStoreAndEnvironmentMismatch.js +1 -3
- package/src/lib/utils/hooks/useValidateSession/handleUserDataOutOfSync/handleUserDataOutOfSync.cjs +3 -5
- package/src/lib/utils/hooks/useValidateSession/handleUserDataOutOfSync/handleUserDataOutOfSync.d.ts +1 -2
- package/src/lib/utils/hooks/useValidateSession/handleUserDataOutOfSync/handleUserDataOutOfSync.js +3 -5
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.cjs +37 -0
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.d.ts +9 -0
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.js +33 -0
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/index.d.ts +1 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +2 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +4 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +4 -1
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +1 -4
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +1 -4
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +4 -10
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +4 -10
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +7 -5
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +7 -5
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.cjs +164 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.d.ts +3 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.js +160 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +11 -50
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +11 -50
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.d.ts +2 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -4
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.js +1 -1
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceItem/TokenBalanceItem.cjs +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceItem/TokenBalanceItem.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceItem/TokenBalanceItem.js +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceItem/index.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceList/TokenBalanceList.cjs +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceList/TokenBalanceList.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceList/TokenBalanceList.js +0 -0
- /package/src/lib/widgets/DynamicWidget/components/{ActiveWalletInformation → ActiveWalletBalance}/TokenBalanceList/index.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
|
|
2
|
-
### [4.9.
|
|
2
|
+
### [4.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.2...v4.9.3) (2025-03-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* allow adding extra text to ToS and PP footer using custom css ([#8290](https://github.com/dynamic-labs/dynamic-auth/issues/8290)) ([0f6eb26](https://github.com/dynamic-labs/dynamic-auth/commit/0f6eb2666ea93a32360710ba5ac14eac53e07e2d))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* log out if there is a mismatch in user and wallet state ([#8300](https://github.com/dynamic-labs/dynamic-auth/issues/8300)) ([82ec2ad](https://github.com/dynamic-labs/dynamic-auth/commit/82ec2add1682a576d00dfe13aa1b9cccecf96688))
|
|
13
|
+
* sol sponsored tx for v3 ([#8288](https://github.com/dynamic-labs/dynamic-auth/issues/8288)) ([c466fba](https://github.com/dynamic-labs/dynamic-auth/commit/c466fba417d39641631e29104ec9c156dfdf7647))
|
|
14
|
+
* v3 existing wallet could not log in again ([#8282](https://github.com/dynamic-labs/dynamic-auth/issues/8282)) ([c2d68ad](https://github.com/dynamic-labs/dynamic-auth/commit/c2d68adf575fcce371e438076184ef590f346c9f))
|
|
15
|
+
|
|
16
|
+
### [4.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2) (2025-03-12)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **QNTM-2951:** update sdk styles ([#8214](https://github.com/dynamic-labs/dynamic-auth/issues/8214)) ([45cefa8](https://github.com/dynamic-labs/dynamic-auth/commit/45cefa82bdaad769c63ffeab4fb48f88ac855461))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* embedded widget race condition that would show both embedded and non-embedded widgets at the same time ([#8208](https://github.com/dynamic-labs/dynamic-auth/issues/8208)) ([031fb77](https://github.com/dynamic-labs/dynamic-auth/commit/031fb775c10daa383bf56ab7ba5fa4cf6ae9451c))
|
|
27
|
+
* **iframe-setup:** require the initial parent url when using an iframe ([#8268](https://github.com/dynamic-labs/dynamic-auth/issues/8268)) ([258e8a1](https://github.com/dynamic-labs/dynamic-auth/commit/258e8a128c31b8695518f9943bc74de9fce63196))
|
|
28
|
+
* improve WalletConnect experience ([#8201](https://github.com/dynamic-labs/dynamic-auth/issues/8201)) ([a09b16d](https://github.com/dynamic-labs/dynamic-auth/commit/a09b16de2ccd3cbba89f70a8ded4b7656f09f807)), closes [#8202](https://github.com/dynamic-labs/dynamic-auth/issues/8202) [#8207](https://github.com/dynamic-labs/dynamic-auth/issues/8207)
|
|
29
|
+
* prevent closing modal when mfa view is required ([#8156](https://github.com/dynamic-labs/dynamic-auth/issues/8156)) ([c34b245](https://github.com/dynamic-labs/dynamic-auth/commit/c34b24509e3f96046e72150b055d9c820f98706f))
|
|
3
30
|
|
|
4
31
|
### [4.9.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.0...v4.9.1) (2025-03-11)
|
|
5
32
|
|
package/package.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.9.
|
|
6
|
+
var version = "4.9.3";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.642",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
10
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
11
11
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.9.
|
|
2
|
+
var version = "4.9.3";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.642",
|
|
5
5
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
6
6
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
7
7
|
"country-list": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.3",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
5
|
+
"@dynamic-labs/sdk-api-core": "0.0.642",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
8
8
|
"country-list": "2.3.0",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"react-international-phone": "4.2.5",
|
|
16
16
|
"bs58": "5.0.0",
|
|
17
|
-
"@dynamic-labs/assert-package-version": "4.9.
|
|
18
|
-
"@dynamic-labs/iconic": "4.9.
|
|
19
|
-
"@dynamic-labs/logger": "4.9.
|
|
20
|
-
"@dynamic-labs/multi-wallet": "4.9.
|
|
21
|
-
"@dynamic-labs/rpc-providers": "4.9.
|
|
22
|
-
"@dynamic-labs/store": "4.9.
|
|
23
|
-
"@dynamic-labs/types": "4.9.
|
|
24
|
-
"@dynamic-labs/utils": "4.9.
|
|
25
|
-
"@dynamic-labs/wallet-book": "4.9.
|
|
26
|
-
"@dynamic-labs/wallet-connector-core": "4.9.
|
|
17
|
+
"@dynamic-labs/assert-package-version": "4.9.3",
|
|
18
|
+
"@dynamic-labs/iconic": "4.9.3",
|
|
19
|
+
"@dynamic-labs/logger": "4.9.3",
|
|
20
|
+
"@dynamic-labs/multi-wallet": "4.9.3",
|
|
21
|
+
"@dynamic-labs/rpc-providers": "4.9.3",
|
|
22
|
+
"@dynamic-labs/store": "4.9.3",
|
|
23
|
+
"@dynamic-labs/types": "4.9.3",
|
|
24
|
+
"@dynamic-labs/utils": "4.9.3",
|
|
25
|
+
"@dynamic-labs/wallet-book": "4.9.3",
|
|
26
|
+
"@dynamic-labs/wallet-connector-core": "4.9.3",
|
|
27
27
|
"eventemitter3": "5.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -91,16 +91,16 @@ require('./lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
|
91
91
|
require('./lib/context/FieldsStateContext/FieldsStateContext.cjs');
|
|
92
92
|
var useRpcProviders = require('./lib/utils/hooks/useRpcProviders/useRpcProviders.cjs');
|
|
93
93
|
require('./lib/store/state/loadingAndLifecycle.cjs');
|
|
94
|
+
require('./lib/store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
94
95
|
require('./lib/context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
95
96
|
require('./lib/context/AccountExistsContext/AccountExistsContext.cjs');
|
|
96
97
|
require('./lib/context/ErrorContext/ErrorContext.cjs');
|
|
97
|
-
require('./lib/store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
98
98
|
require('@dynamic-labs/wallet-book');
|
|
99
99
|
require('./lib/store/state/walletOptions/walletOptions.cjs');
|
|
100
100
|
var useWalletItemActions = require('./lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs');
|
|
101
101
|
require('react-i18next');
|
|
102
|
-
var useSmartWallets = require('./lib/utils/hooks/useSmartWallets/useSmartWallets.cjs');
|
|
103
102
|
require('./lib/context/FooterAnimationContext/index.cjs');
|
|
103
|
+
var useSmartWallets = require('./lib/utils/hooks/useSmartWallets/useSmartWallets.cjs');
|
|
104
104
|
var ShadowDOM = require('./lib/components/ShadowDOM/ShadowDOM.cjs');
|
|
105
105
|
require('./lib/components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
106
106
|
require('./lib/components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
package/src/index.js
CHANGED
|
@@ -87,16 +87,16 @@ import './lib/context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
87
87
|
import './lib/context/FieldsStateContext/FieldsStateContext.js';
|
|
88
88
|
export { useRpcProviders } from './lib/utils/hooks/useRpcProviders/useRpcProviders.js';
|
|
89
89
|
import './lib/store/state/loadingAndLifecycle.js';
|
|
90
|
+
import './lib/store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
90
91
|
import './lib/context/AccessDeniedContext/AccessDeniedContext.js';
|
|
91
92
|
import './lib/context/AccountExistsContext/AccountExistsContext.js';
|
|
92
93
|
import './lib/context/ErrorContext/ErrorContext.js';
|
|
93
|
-
import './lib/store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
94
94
|
import '@dynamic-labs/wallet-book';
|
|
95
95
|
import './lib/store/state/walletOptions/walletOptions.js';
|
|
96
96
|
export { useWalletItemActions } from './lib/utils/hooks/useWalletItemActions/useWalletItemActions.js';
|
|
97
97
|
import 'react-i18next';
|
|
98
|
-
export { useSmartWallets } from './lib/utils/hooks/useSmartWallets/useSmartWallets.js';
|
|
99
98
|
import './lib/context/FooterAnimationContext/index.js';
|
|
99
|
+
export { useSmartWallets } from './lib/utils/hooks/useSmartWallets/useSmartWallets.js';
|
|
100
100
|
export { ShadowDOM } from './lib/components/ShadowDOM/ShadowDOM.js';
|
|
101
101
|
import './lib/components/Transition/ZoomTransition/ZoomTransition.js';
|
|
102
102
|
import './lib/components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var ReactFocusLock = require('react-focus-lock');
|
|
9
|
+
var useAllowClose = require('../../../utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs');
|
|
10
|
+
var useKeyboardEventListener = require('../../../utils/hooks/useKeyboardEventListener/useKeyboardEventListener.cjs');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var ReactFocusLock__default = /*#__PURE__*/_interopDefaultLegacy(ReactFocusLock);
|
|
15
|
+
|
|
16
|
+
const ModalComponent = ({ children, handleClose, withBackdrop = true, whiteList, }) => {
|
|
17
|
+
const { allowsClosing } = useAllowClose.useAllowClose();
|
|
18
|
+
const onBackdropClick = React.useCallback((e) => {
|
|
19
|
+
if (!allowsClosing)
|
|
20
|
+
return;
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
handleClose(e);
|
|
23
|
+
}, [allowsClosing, handleClose]);
|
|
24
|
+
useKeyboardEventListener.useKeyboardEventListener({
|
|
25
|
+
disabled: !allowsClosing,
|
|
26
|
+
inputKey: 'Escape',
|
|
27
|
+
onKeyPressed: handleClose,
|
|
28
|
+
});
|
|
29
|
+
return (jsxRuntime.jsxs(ReactFocusLock__default["default"], { className: 'modal-component__container', whiteList: whiteList, children: [withBackdrop && (jsxRuntime.jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: onBackdropClick, tabIndex: 0, "aria-label": 'Close modal', className: 'modal-component__backdrop' })), jsxRuntime.jsx("div", { children: children })] }));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.ModalComponent = ModalComponent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export type ModalComponentProps = PropsWithChildren & {
|
|
3
|
+
handleClose: (e: {
|
|
4
|
+
stopPropagation: VoidFunction;
|
|
5
|
+
}) => void;
|
|
6
|
+
whiteList?: (activeElement: HTMLElement) => boolean;
|
|
7
|
+
withBackdrop?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const ModalComponent: ({ children, handleClose, withBackdrop, whiteList, }: ModalComponentProps) => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import ReactFocusLock from 'react-focus-lock';
|
|
5
|
+
import { useAllowClose } from '../../../utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js';
|
|
6
|
+
import { useKeyboardEventListener } from '../../../utils/hooks/useKeyboardEventListener/useKeyboardEventListener.js';
|
|
7
|
+
|
|
8
|
+
const ModalComponent = ({ children, handleClose, withBackdrop = true, whiteList, }) => {
|
|
9
|
+
const { allowsClosing } = useAllowClose();
|
|
10
|
+
const onBackdropClick = useCallback((e) => {
|
|
11
|
+
if (!allowsClosing)
|
|
12
|
+
return;
|
|
13
|
+
e.stopPropagation();
|
|
14
|
+
handleClose(e);
|
|
15
|
+
}, [allowsClosing, handleClose]);
|
|
16
|
+
useKeyboardEventListener({
|
|
17
|
+
disabled: !allowsClosing,
|
|
18
|
+
inputKey: 'Escape',
|
|
19
|
+
onKeyPressed: handleClose,
|
|
20
|
+
});
|
|
21
|
+
return (jsxs(ReactFocusLock, { className: 'modal-component__container', whiteList: whiteList, children: [withBackdrop && (jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: onBackdropClick, tabIndex: 0, "aria-label": 'Close modal', className: 'modal-component__backdrop' })), jsx("div", { children: children })] }));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { ModalComponent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ModalComponent';
|
|
@@ -6,132 +6,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactDom = require('react-dom');
|
|
9
|
-
var ReactFocusLock = require('react-focus-lock');
|
|
10
|
-
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
11
|
-
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
12
|
-
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
13
|
-
require('../../../../_virtual/_tslib.cjs');
|
|
14
|
-
require('../../events/dynamicEvents.cjs');
|
|
15
|
-
require('@dynamic-labs/utils');
|
|
16
|
-
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
17
|
-
require('@dynamic-labs/sdk-api-core');
|
|
18
|
-
require('../../shared/logger.cjs');
|
|
19
|
-
require('@dynamic-labs/iconic');
|
|
20
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
21
|
-
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
22
|
-
require('@dynamic-labs/wallet-book');
|
|
23
|
-
require('../../utils/constants/colors.cjs');
|
|
24
|
-
require('../../utils/constants/values.cjs');
|
|
25
|
-
require('../../shared/consts/index.cjs');
|
|
26
|
-
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
27
|
-
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
28
|
-
require('@dynamic-labs/multi-wallet');
|
|
29
|
-
require('react-international-phone');
|
|
30
|
-
require('../../store/state/nonce/nonce.cjs');
|
|
31
|
-
require('../../store/state/projectSettings/projectSettings.cjs');
|
|
32
|
-
require('../../config/ApiEndpoint.cjs');
|
|
33
|
-
require('../../store/state/user/user.cjs');
|
|
34
|
-
require('../../locale/locale.cjs');
|
|
35
|
-
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
36
|
-
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
37
|
-
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
|
-
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
|
-
require('../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
40
|
-
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
41
|
-
require('../../context/VerificationContext/VerificationContext.cjs');
|
|
42
9
|
var useElementById = require('../../utils/hooks/useElementById/useElementById.cjs');
|
|
43
|
-
require('../../utils/functions/compareChains/compareChains.cjs');
|
|
44
|
-
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
45
|
-
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
46
|
-
require('bs58');
|
|
47
|
-
require('@dynamic-labs/types');
|
|
48
|
-
require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
49
|
-
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
50
|
-
require('../../context/WalletContext/WalletContext.cjs');
|
|
51
|
-
require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
52
|
-
require('yup');
|
|
53
|
-
require('../../context/MockContext/MockContext.cjs');
|
|
54
|
-
require('../../views/CollectUserDataView/useFields.cjs');
|
|
55
|
-
require('../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
56
|
-
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
57
|
-
require('@dynamic-labs/rpc-providers');
|
|
58
|
-
require('../../store/state/loadingAndLifecycle.cjs');
|
|
59
|
-
require('../../store/state/walletOptions/walletOptions.cjs');
|
|
60
|
-
require('react-i18next');
|
|
61
|
-
require('../Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
62
|
-
require('../Alert/Alert.cjs');
|
|
63
10
|
var ShadowDOM = require('../ShadowDOM/ShadowDOM.cjs');
|
|
64
|
-
require('../
|
|
65
|
-
require('
|
|
66
|
-
require('../Input/Input.cjs');
|
|
67
|
-
require('../IsBrowser/IsBrowser.cjs');
|
|
68
|
-
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
-
require('../OverlayCard/OverlayCard.cjs');
|
|
70
|
-
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
71
|
-
require('../Popper/Popper/Popper.cjs');
|
|
72
|
-
require('../Popper/PopperContext/PopperContext.cjs');
|
|
73
|
-
var useKeyboardEventListener = require('../../utils/hooks/useKeyboardEventListener/useKeyboardEventListener.cjs');
|
|
74
|
-
require('qrcode');
|
|
75
|
-
require('formik');
|
|
76
|
-
require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
77
|
-
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
78
|
-
require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
79
|
-
require('../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
80
|
-
require('../../context/ConnectWithOtpContext/constants.cjs');
|
|
81
|
-
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
82
|
-
require('@hcaptcha/react-hcaptcha');
|
|
83
|
-
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
84
|
-
require('../../context/FooterAnimationContext/index.cjs');
|
|
85
|
-
require('../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
86
|
-
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
87
|
-
require('../../store/state/sendBalances.cjs');
|
|
88
|
-
require('../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
89
|
-
require('../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
90
|
-
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
91
|
-
require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
92
|
-
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
93
|
-
require('../../context/OnrampContext/OnrampContext.cjs');
|
|
94
|
-
require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
95
|
-
require('../../../index.cjs');
|
|
96
|
-
require('../../store/state/tokenBalances.cjs');
|
|
97
|
-
require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
98
|
-
|
|
99
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
100
|
-
|
|
101
|
-
var ReactFocusLock__default = /*#__PURE__*/_interopDefaultLegacy(ReactFocusLock);
|
|
11
|
+
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
12
|
+
var ModalComponent = require('./ModalComponent/ModalComponent.cjs');
|
|
102
13
|
|
|
103
|
-
const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, whiteList, }) => {
|
|
104
|
-
const { view } = ViewContext.useViewContext();
|
|
105
|
-
const shouldCloseOnBackdropClick = (view === null || view === void 0 ? void 0 : view.type) &&
|
|
106
|
-
view.type !== 'collect-user-data' &&
|
|
107
|
-
view.type !== 'login-with-email-verification' &&
|
|
108
|
-
view.type !== 'login-with-sms-verification' &&
|
|
109
|
-
view.type !== 'verify-sms' &&
|
|
110
|
-
view.type !== 'verify-email' &&
|
|
111
|
-
view.type !== 'mfa-verification' &&
|
|
112
|
-
view.type !== 'mfa-display-backup-codes';
|
|
113
|
-
const onBackdropClick = (e) => {
|
|
114
|
-
if (!shouldCloseOnBackdropClick)
|
|
115
|
-
return;
|
|
116
|
-
e.stopPropagation();
|
|
117
|
-
handleClose(e);
|
|
118
|
-
};
|
|
119
|
-
useKeyboardEventListener.useKeyboardEventListener({
|
|
120
|
-
disabled: !shouldCloseOnBackdropClick,
|
|
121
|
-
inputKey: 'Escape',
|
|
122
|
-
onKeyPressed: handleClose,
|
|
123
|
-
});
|
|
124
|
-
return (jsxRuntime.jsxs(ReactFocusLock__default["default"], { className: 'portal__container', whiteList: whiteList, children: [withBackdrop && (jsxRuntime.jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: (e) => {
|
|
125
|
-
onBackdropClick(e);
|
|
126
|
-
}, tabIndex: 0, "aria-label": 'Close modal',
|
|
127
|
-
// z-index - 2 to ensure that the backdrop is always behind the content
|
|
128
|
-
style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'portal__backdrop' })), jsxRuntime.jsx("div", { style: { zIndex }, children: children })] }));
|
|
129
|
-
};
|
|
130
14
|
const Portal = ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId = 'dynamic-modal', }) => {
|
|
131
15
|
const { createRootElement } = useElementById.useElementById();
|
|
132
16
|
const modalRootElementRef = createRootElement(elementId);
|
|
133
17
|
const whiteList = React.useCallback((node) => modalRootElementRef.current.contains(node), [modalRootElementRef]);
|
|
134
|
-
return reactDom.createPortal(jsxRuntime.jsx(ShadowDOM.ShadowDOM, { zIndex: zIndex, dataTestId: 'dynamic-modal-shadow', children: jsxRuntime.jsx(OpacityTransition.OpacityTransition, Object.assign({ isShown: isShown }, transitionEvents, { children: jsxRuntime.jsx(ModalComponent, { handleClose: handleClose, withBackdrop: withBackdrop, whiteList: whiteList, children: children }) })) }), modalRootElementRef.current);
|
|
18
|
+
return reactDom.createPortal(jsxRuntime.jsx(ShadowDOM.ShadowDOM, { zIndex: zIndex, dataTestId: 'dynamic-modal-shadow', children: jsxRuntime.jsx(OpacityTransition.OpacityTransition, Object.assign({ isShown: isShown }, transitionEvents, { children: jsxRuntime.jsx(ModalComponent.ModalComponent, { handleClose: handleClose, withBackdrop: withBackdrop, whiteList: whiteList, children: children }) })) }), modalRootElementRef.current);
|
|
135
19
|
};
|
|
136
20
|
|
|
137
21
|
exports.Portal = Portal;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { UseTransitionEvents } from '../../utils/hooks/useTransition';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { ModalComponentProps } from './ModalComponent';
|
|
4
|
+
type PortalProps = PropsWithChildren & ModalComponentProps & {
|
|
5
5
|
elementId?: string;
|
|
6
|
-
handleClose: (e: {
|
|
7
|
-
stopPropagation: VoidFunction;
|
|
8
|
-
}) => void;
|
|
9
6
|
isShown?: boolean;
|
|
10
7
|
transitionEvents?: UseTransitionEvents;
|
|
11
|
-
whiteList?: (activeElement: HTMLElement) => boolean;
|
|
12
|
-
withBackdrop?: boolean;
|
|
13
8
|
zIndex?: number;
|
|
14
9
|
};
|
|
15
10
|
export declare const Portal: ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId, }: PortalProps) => JSX.Element;
|
|
@@ -1,124 +1,12 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { jsx
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
|
-
import ReactFocusLock from 'react-focus-lock';
|
|
6
|
-
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
7
|
-
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
8
|
-
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
9
|
-
import '../../../../_virtual/_tslib.js';
|
|
10
|
-
import '../../events/dynamicEvents.js';
|
|
11
|
-
import '@dynamic-labs/utils';
|
|
12
|
-
import '../../context/DynamicContext/DynamicContext.js';
|
|
13
|
-
import '@dynamic-labs/sdk-api-core';
|
|
14
|
-
import '../../shared/logger.js';
|
|
15
|
-
import '@dynamic-labs/iconic';
|
|
16
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
17
|
-
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
18
|
-
import '@dynamic-labs/wallet-book';
|
|
19
|
-
import '../../utils/constants/colors.js';
|
|
20
|
-
import '../../utils/constants/values.js';
|
|
21
|
-
import '../../shared/consts/index.js';
|
|
22
|
-
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
23
|
-
import '../../context/ErrorContext/ErrorContext.js';
|
|
24
|
-
import '@dynamic-labs/multi-wallet';
|
|
25
|
-
import 'react-international-phone';
|
|
26
|
-
import '../../store/state/nonce/nonce.js';
|
|
27
|
-
import '../../store/state/projectSettings/projectSettings.js';
|
|
28
|
-
import '../../config/ApiEndpoint.js';
|
|
29
|
-
import '../../store/state/user/user.js';
|
|
30
|
-
import '../../locale/locale.js';
|
|
31
|
-
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
32
|
-
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
33
|
-
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
34
|
-
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
35
|
-
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
36
|
-
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
37
|
-
import '../../context/VerificationContext/VerificationContext.js';
|
|
38
5
|
import { useElementById } from '../../utils/hooks/useElementById/useElementById.js';
|
|
39
|
-
import '../../utils/functions/compareChains/compareChains.js';
|
|
40
|
-
import '../../context/ThemeContext/ThemeContext.js';
|
|
41
|
-
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
42
|
-
import 'bs58';
|
|
43
|
-
import '@dynamic-labs/types';
|
|
44
|
-
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
45
|
-
import '../../context/LoadingContext/LoadingContext.js';
|
|
46
|
-
import '../../context/WalletContext/WalletContext.js';
|
|
47
|
-
import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
48
|
-
import 'yup';
|
|
49
|
-
import '../../context/MockContext/MockContext.js';
|
|
50
|
-
import '../../views/CollectUserDataView/useFields.js';
|
|
51
|
-
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
52
|
-
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
53
|
-
import '@dynamic-labs/rpc-providers';
|
|
54
|
-
import '../../store/state/loadingAndLifecycle.js';
|
|
55
|
-
import '../../store/state/walletOptions/walletOptions.js';
|
|
56
|
-
import 'react-i18next';
|
|
57
|
-
import '../Accordion/components/AccordionItem/AccordionItem.js';
|
|
58
|
-
import '../Alert/Alert.js';
|
|
59
6
|
import { ShadowDOM } from '../ShadowDOM/ShadowDOM.js';
|
|
60
|
-
import '../
|
|
61
|
-
import '
|
|
62
|
-
import '../Input/Input.js';
|
|
63
|
-
import '../IsBrowser/IsBrowser.js';
|
|
64
|
-
import '../MenuList/Dropdown/Dropdown.js';
|
|
65
|
-
import '../OverlayCard/OverlayCard.js';
|
|
66
|
-
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
67
|
-
import '../Popper/Popper/Popper.js';
|
|
68
|
-
import '../Popper/PopperContext/PopperContext.js';
|
|
69
|
-
import { useKeyboardEventListener } from '../../utils/hooks/useKeyboardEventListener/useKeyboardEventListener.js';
|
|
70
|
-
import 'qrcode';
|
|
71
|
-
import 'formik';
|
|
72
|
-
import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
73
|
-
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
74
|
-
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
75
|
-
import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
76
|
-
import '../../context/ConnectWithOtpContext/constants.js';
|
|
77
|
-
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
78
|
-
import '@hcaptcha/react-hcaptcha';
|
|
79
|
-
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
80
|
-
import '../../context/FooterAnimationContext/index.js';
|
|
81
|
-
import '../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
82
|
-
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
83
|
-
import '../../store/state/sendBalances.js';
|
|
84
|
-
import '../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
85
|
-
import '../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
86
|
-
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
87
|
-
import '../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
88
|
-
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
89
|
-
import '../../context/OnrampContext/OnrampContext.js';
|
|
90
|
-
import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
91
|
-
import '../../../index.js';
|
|
92
|
-
import '../../store/state/tokenBalances.js';
|
|
93
|
-
import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
7
|
+
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
8
|
+
import { ModalComponent } from './ModalComponent/ModalComponent.js';
|
|
94
9
|
|
|
95
|
-
const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, whiteList, }) => {
|
|
96
|
-
const { view } = useViewContext();
|
|
97
|
-
const shouldCloseOnBackdropClick = (view === null || view === void 0 ? void 0 : view.type) &&
|
|
98
|
-
view.type !== 'collect-user-data' &&
|
|
99
|
-
view.type !== 'login-with-email-verification' &&
|
|
100
|
-
view.type !== 'login-with-sms-verification' &&
|
|
101
|
-
view.type !== 'verify-sms' &&
|
|
102
|
-
view.type !== 'verify-email' &&
|
|
103
|
-
view.type !== 'mfa-verification' &&
|
|
104
|
-
view.type !== 'mfa-display-backup-codes';
|
|
105
|
-
const onBackdropClick = (e) => {
|
|
106
|
-
if (!shouldCloseOnBackdropClick)
|
|
107
|
-
return;
|
|
108
|
-
e.stopPropagation();
|
|
109
|
-
handleClose(e);
|
|
110
|
-
};
|
|
111
|
-
useKeyboardEventListener({
|
|
112
|
-
disabled: !shouldCloseOnBackdropClick,
|
|
113
|
-
inputKey: 'Escape',
|
|
114
|
-
onKeyPressed: handleClose,
|
|
115
|
-
});
|
|
116
|
-
return (jsxs(ReactFocusLock, { className: 'portal__container', whiteList: whiteList, children: [withBackdrop && (jsx("div", { "data-testid": 'portal-backdrop', role: 'button', onClick: (e) => {
|
|
117
|
-
onBackdropClick(e);
|
|
118
|
-
}, tabIndex: 0, "aria-label": 'Close modal',
|
|
119
|
-
// z-index - 2 to ensure that the backdrop is always behind the content
|
|
120
|
-
style: { zIndex: zIndex ? zIndex - 2 : undefined }, className: 'portal__backdrop' })), jsx("div", { style: { zIndex }, children: children })] }));
|
|
121
|
-
};
|
|
122
10
|
const Portal = ({ children, isShown, handleClose, withBackdrop, zIndex, transitionEvents, elementId = 'dynamic-modal', }) => {
|
|
123
11
|
const { createRootElement } = useElementById();
|
|
124
12
|
const modalRootElementRef = createRootElement(elementId);
|
|
@@ -114,7 +114,9 @@ const TosAndPp = () => {
|
|
|
114
114
|
}
|
|
115
115
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [termsOfServiceUrl && jsxRuntime.jsx(jsxRuntime.Fragment, { children: "\u00A0&\u00A0" }), jsxRuntime.jsx("a", { className: 'tos-and-pp__link', href: privacyPolicyUrl, target: '_blank', rel: 'noreferrer', children: "Privacy Policy" })] }));
|
|
116
116
|
};
|
|
117
|
-
|
|
117
|
+
const renderInjectedTextStart = () => (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'tos-and-pp__text', id: 'custom-tos-and-pp-footer-start', "data-testid": 'custom-tos-and-pp-footer-start' }));
|
|
118
|
+
const renderInjectedTextEnd = () => (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'tos-and-pp__text', id: 'custom-tos-and-pp-footer-end', "data-testid": 'custom-tos-and-pp-footer-end' }));
|
|
119
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [renderInjectedTextStart(), (privacyPolicyUrl || termsOfServiceUrl) && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'tos-and-pp__text', children: ["By ", connectionType, ", you agree to", jsxRuntime.jsx("br", {}), "our\u00A0", renderTermsOfServices(), renderPrivacyPolicy(), "."] })), customTermsOfServices, customPrivacyPolicy, renderInjectedTextEnd()] }));
|
|
118
120
|
};
|
|
119
121
|
|
|
120
122
|
exports.TosAndPp = TosAndPp;
|
|
@@ -110,7 +110,9 @@ const TosAndPp = () => {
|
|
|
110
110
|
}
|
|
111
111
|
return (jsxs(Fragment, { children: [termsOfServiceUrl && jsx(Fragment, { children: "\u00A0&\u00A0" }), jsx("a", { className: 'tos-and-pp__link', href: privacyPolicyUrl, target: '_blank', rel: 'noreferrer', children: "Privacy Policy" })] }));
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
const renderInjectedTextStart = () => (jsx(Typography, { variant: 'body_small', weight: 'regular', className: 'tos-and-pp__text', id: 'custom-tos-and-pp-footer-start', "data-testid": 'custom-tos-and-pp-footer-start' }));
|
|
114
|
+
const renderInjectedTextEnd = () => (jsx(Typography, { variant: 'body_small', weight: 'regular', className: 'tos-and-pp__text', id: 'custom-tos-and-pp-footer-end', "data-testid": 'custom-tos-and-pp-footer-end' }));
|
|
115
|
+
return (jsxs(Fragment, { children: [renderInjectedTextStart(), (privacyPolicyUrl || termsOfServiceUrl) && (jsxs(Typography, { variant: 'body_small', weight: 'regular', className: 'tos-and-pp__text', children: ["By ", connectionType, ", you agree to", jsx("br", {}), "our\u00A0", renderTermsOfServices(), renderPrivacyPolicy(), "."] })), customTermsOfServices, customPrivacyPolicy, renderInjectedTextEnd()] }));
|
|
114
116
|
};
|
|
115
117
|
|
|
116
118
|
export { TosAndPp };
|
|
@@ -74,8 +74,8 @@ require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
|
74
74
|
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
75
75
|
require('../Popper/Popper/Popper.cjs');
|
|
76
76
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
77
|
-
require('react-focus-lock');
|
|
78
77
|
require('../ShadowDOM/ShadowDOM.cjs');
|
|
78
|
+
require('react-focus-lock');
|
|
79
79
|
require('qrcode');
|
|
80
80
|
var useFetchChain = require('../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs');
|
|
81
81
|
require('formik');
|
|
@@ -70,8 +70,8 @@ import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
|
70
70
|
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
71
71
|
import '../Popper/Popper/Popper.js';
|
|
72
72
|
import '../Popper/PopperContext/PopperContext.js';
|
|
73
|
-
import 'react-focus-lock';
|
|
74
73
|
import '../ShadowDOM/ShadowDOM.js';
|
|
74
|
+
import 'react-focus-lock';
|
|
75
75
|
import 'qrcode';
|
|
76
76
|
import { useFetchChain } from '../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js';
|
|
77
77
|
import 'formik';
|
|
@@ -73,8 +73,8 @@ require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
|
73
73
|
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
74
74
|
require('../Popper/Popper/Popper.cjs');
|
|
75
75
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
76
|
-
require('react-focus-lock');
|
|
77
76
|
require('../ShadowDOM/ShadowDOM.cjs');
|
|
77
|
+
require('react-focus-lock');
|
|
78
78
|
require('qrcode');
|
|
79
79
|
var useFetchChain = require('../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs');
|
|
80
80
|
require('formik');
|
|
@@ -69,8 +69,8 @@ import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
|
69
69
|
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
70
70
|
import '../Popper/Popper/Popper.js';
|
|
71
71
|
import '../Popper/PopperContext/PopperContext.js';
|
|
72
|
-
import 'react-focus-lock';
|
|
73
72
|
import '../ShadowDOM/ShadowDOM.js';
|
|
73
|
+
import 'react-focus-lock';
|
|
74
74
|
import 'qrcode';
|
|
75
75
|
import { useFetchChain } from '../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js';
|
|
76
76
|
import 'formik';
|
|
@@ -17,6 +17,7 @@ const Typography = (_a) => {
|
|
|
17
17
|
button_secondary: 'typography--button-secondary',
|
|
18
18
|
button_tertiary: 'typography--button-tertiary',
|
|
19
19
|
numbers_big: 'typography--numbers-big',
|
|
20
|
+
numbers_display: 'typography--numbers-display',
|
|
20
21
|
numbers_medium: 'typography--numbers-medium',
|
|
21
22
|
title: 'typography--title',
|
|
22
23
|
};
|
|
@@ -13,6 +13,7 @@ const Typography = (_a) => {
|
|
|
13
13
|
button_secondary: 'typography--button-secondary',
|
|
14
14
|
button_tertiary: 'typography--button-tertiary',
|
|
15
15
|
numbers_big: 'typography--numbers-big',
|
|
16
|
+
numbers_display: 'typography--numbers-display',
|
|
16
17
|
numbers_medium: 'typography--numbers-medium',
|
|
17
18
|
title: 'typography--title',
|
|
18
19
|
};
|
|
@@ -2,7 +2,7 @@ import { ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';
|
|
|
2
2
|
import { CopyKey } from '../../shared';
|
|
3
3
|
import { ClassStyleProps } from '../../utils/types';
|
|
4
4
|
export type TypographyTag = ElementType;
|
|
5
|
-
export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_big' | 'numbers_medium';
|
|
5
|
+
export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_display' | 'numbers_big' | 'numbers_medium';
|
|
6
6
|
export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip' | 'green-1' | 'inherit' | 'white' | 'current-color';
|
|
7
7
|
export type TypographyWeight = 'regular' | 'medium' | 'bold';
|
|
8
8
|
export type TypographyTransform = 'uppercase';
|