@dynamic-labs/sdk-react-core 0.16.4 → 0.17.0-RC.1
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 +21 -7
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +5 -5
- package/src/index.cjs +5 -3
- package/src/index.js +3 -2
- package/src/lib/Main.cjs +8 -4
- package/src/lib/Main.js +8 -4
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +6 -6
- package/src/lib/components/AnimatePresence/AnimatePresence.js +6 -6
- package/src/lib/components/AnimatePresence/AnimatePresence.types.d.ts +2 -4
- package/src/lib/components/AnimatePresence/index.d.ts +0 -1
- package/src/lib/components/IconListTile/IconListTile.cjs +15 -0
- package/src/lib/components/IconListTile/IconListTile.d.ts +2 -0
- package/src/lib/components/IconListTile/IconListTile.js +11 -0
- package/src/lib/components/IconListTile/index.d.ts +1 -0
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/index.d.ts +1 -0
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +5 -2
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +5 -2
- package/src/lib/components/OverlayCard/OverlayCard.cjs +45 -0
- package/src/lib/components/OverlayCard/OverlayCard.context.cjs +9 -0
- package/src/lib/components/OverlayCard/OverlayCard.context.d.ts +6 -0
- package/src/lib/components/OverlayCard/OverlayCard.context.js +5 -0
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +8 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +40 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget.cjs +17 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget.d.ts +2 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget.js +13 -0
- package/src/lib/components/OverlayCard/index.d.ts +2 -0
- package/src/lib/components/Portal/Portal.cjs +17 -1
- package/src/lib/components/Portal/Portal.js +17 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +50 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.d.ts +4 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +46 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.types.d.ts +6 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/index.d.ts +1 -0
- package/src/lib/components/Transition/index.d.ts +1 -0
- package/src/lib/components/Transition/transition.type.d.ts +2 -4
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +6 -7
- package/src/lib/context/DynamicContext/DynamicContext.js +6 -7
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +107 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +16 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +101 -0
- package/src/lib/context/SocialRedirectContext/index.d.ts +1 -0
- package/src/lib/context/ViewContext/ViewContext.cjs +4 -1
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/ViewContext/ViewContext.js +4 -1
- package/src/lib/data/api.cjs +4 -6
- package/src/lib/data/api.js +5 -7
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +4 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +4 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +5 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +5 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +5 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +5 -2
- package/src/lib/shared/assets/dots-horizontal.cjs +54 -0
- package/src/lib/shared/assets/dots-horizontal.js +30 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.cjs +22 -0
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.d.ts +3 -0
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.js +18 -0
- package/src/lib/utils/functions/getSocialIcon/index.d.ts +1 -0
- package/src/lib/utils/functions/shouldManuallyReconnectOnRefresh/shouldManuallyReconnectOnRefresh.cjs +1 -7
- package/src/lib/utils/functions/shouldManuallyReconnectOnRefresh/shouldManuallyReconnectOnRefresh.js +1 -7
- package/src/lib/utils/functions/walletListBuilder/index.d.ts +1 -19
- package/src/lib/utils/functions/walletListBuilder/{index.cjs → walletListBuilder.cjs} +4 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.d.ts +19 -0
- package/src/lib/utils/functions/walletListBuilder/{index.js → walletListBuilder.js} +5 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +28 -34
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +29 -35
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +0 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +0 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +1 -2
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +1 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +0 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +0 -2
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +9 -3
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +9 -3
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -2
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +2 -2
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +1 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +8 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +9 -2
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +61 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.d.ts +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +57 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/index.d.ts +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +3 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +3 -3
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +51 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.d.ts +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +47 -0
- package/src/lib/views/SocialRedirectView/index.d.ts +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +2 -2
- package/src/lib/views/WalletList/WalletList.js +1 -1
- package/src/lib/views/WalletNoAccess/WalletNoAccess.cjs +1 -2
- package/src/lib/views/WalletNoAccess/WalletNoAccess.js +1 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +20 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +20 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.types.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +3 -3
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.cjs +0 -57
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.d.ts +0 -4
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.js +0 -51
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.types.d.ts +0 -8
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/index.d.ts +0 -1
- package/src/lib/components/AnimatePresence/animations/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
## [0.17.0-RC.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.0...v0.17.0-RC.1) (2023-04-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add getNameService method to connectors ([#1894](https://github.com/dynamic-labs/DynamicAuth/issues/1894)) ([000b4e9](https://github.com/dynamic-labs/DynamicAuth/commit/000b4e9af89bb69299191c1452984168f30d81b5))
|
|
8
|
+
* add social sign in flow ([#1849](https://github.com/dynamic-labs/DynamicAuth/issues/1849)) ([aa0f201](https://github.com/dynamic-labs/DynamicAuth/commit/aa0f201e6de35b092edc8283fc95e1a9074c7d56))
|
|
9
|
+
* add wallet filter by chain name ([#1878](https://github.com/dynamic-labs/DynamicAuth/issues/1878)) ([8f3f99f](https://github.com/dynamic-labs/DynamicAuth/commit/8f3f99ff4f6d63d5e5ae9193277f35d4c2f99ab6))
|
|
10
|
+
* only set view to wallet list when linking ([#1905](https://github.com/dynamic-labs/DynamicAuth/issues/1905)) ([3413048](https://github.com/dynamic-labs/DynamicAuth/commit/341304832340f2d262e58a59df44691c81572ed6))
|
|
11
|
+
* social sign in ux improvements ([#1898](https://github.com/dynamic-labs/DynamicAuth/issues/1898)) ([cb5a037](https://github.com/dynamic-labs/DynamicAuth/commit/cb5a0376d051a401aadb15c3ad49f0d3301de3e9))
|
|
12
|
+
* **SocialUICard:** adds overlay card with more social options ([#1889](https://github.com/dynamic-labs/DynamicAuth/issues/1889)) ([8ff6920](https://github.com/dynamic-labs/DynamicAuth/commit/8ff6920844b104c4d0679bb23a092eb675297d95))
|
|
3
13
|
|
|
4
14
|
|
|
5
15
|
### Bug Fixes
|
|
6
16
|
|
|
7
|
-
*
|
|
17
|
+
* **DYN-2147:** connectWallet calling createVisit multiple times ([ceba216](https://github.com/dynamic-labs/DynamicAuth/commit/ceba216a82f4073751a210be6e6c8326286e4266))
|
|
18
|
+
* handle undefined or defined cases in new WalletConnector class ([#1914](https://github.com/dynamic-labs/DynamicAuth/issues/1914)) ([869afa6](https://github.com/dynamic-labs/DynamicAuth/commit/869afa67536b26715b4c91a457d8965548f107bd))
|
|
19
|
+
* issue with wallets list being empty after linking new wallet ([#1883](https://github.com/dynamic-labs/DynamicAuth/issues/1883)) ([19bd8cd](https://github.com/dynamic-labs/DynamicAuth/commit/19bd8cd47619b5164fe18235fca02c0a7935780f))
|
|
20
|
+
* make providerResources default to undefined instead of empty array ([#1913](https://github.com/dynamic-labs/DynamicAuth/issues/1913)) ([dbcc5f1](https://github.com/dynamic-labs/DynamicAuth/commit/dbcc5f1874209295464032bdfd3e42d23828e5ab))
|
|
21
|
+
* remove event listeners ([#1910](https://github.com/dynamic-labs/DynamicAuth/issues/1910)) ([b6e1dfd](https://github.com/dynamic-labs/DynamicAuth/commit/b6e1dfd09951e7e97678d5c92648ef2abb548664))
|
|
22
|
+
* use named export from coinbase wallet sdk ([#1903](https://github.com/dynamic-labs/DynamicAuth/issues/1903)) ([cbd106f](https://github.com/dynamic-labs/DynamicAuth/commit/cbd106f065f86a161b082a41023efb2ffd7ab9e0))
|
|
23
|
+
* when linking a new wallet, show sign message if active wallet is not linked ([#1887](https://github.com/dynamic-labs/DynamicAuth/issues/1887)) ([11d86d6](https://github.com/dynamic-labs/DynamicAuth/commit/11d86d6641c8c0b5e48b040d02226585b6d5f1dd))
|
|
8
24
|
|
|
9
|
-
|
|
25
|
+
## [0.17.0-RC.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.1...v0.17.0-RC.0) (2023-04-18)
|
|
10
26
|
|
|
11
27
|
|
|
12
28
|
### Features
|
|
13
29
|
|
|
14
|
-
* add
|
|
15
|
-
|
|
16
|
-
### [0.16.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.1...v0.16.2) (2023-04-18)
|
|
30
|
+
* add magic social wallet connector ([#1848](https://github.com/dynamic-labs/DynamicAuth/issues/1848)) ([3f49d22](https://github.com/dynamic-labs/DynamicAuth/commit/3f49d2222ddf90835e3e3d58ac860835f33c9910))
|
|
17
31
|
|
|
18
32
|
|
|
19
33
|
### Bug Fixes
|
|
20
34
|
|
|
21
|
-
* type=module requires dot cjs files for running with node ([#1890](https://github.com/dynamic-labs/DynamicAuth/issues/1890)) ([
|
|
35
|
+
* type=module requires dot cjs files for running with node ([#1890](https://github.com/dynamic-labs/DynamicAuth/issues/1890)) ([5751d6e](https://github.com/dynamic-labs/DynamicAuth/commit/5751d6ebd6df376b241e812c5ae860b3a0cf6c80))
|
|
22
36
|
|
|
23
37
|
### [0.16.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0...v0.16.1) (2023-04-15)
|
|
24
38
|
|
package/package.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "0.
|
|
5
|
+
var version = "0.17.0-RC.1";
|
|
6
6
|
var dependencies = {
|
|
7
7
|
"react-focus-lock": "^2.9.2",
|
|
8
8
|
"@dynamic-labs/sdk-api": "0.0.174",
|
|
9
|
-
"@dynamic-labs/iconic": "^0.1.
|
|
9
|
+
"@dynamic-labs/iconic": "^0.1.17",
|
|
10
10
|
"@dynamic-labs/wallet-book": "^0.0.11",
|
|
11
11
|
"@hcaptcha/react-hcaptcha": "~1.4.4",
|
|
12
12
|
"country-list": "^2.3.0",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var version = "0.
|
|
1
|
+
var version = "0.17.0-RC.1";
|
|
2
2
|
var dependencies = {
|
|
3
3
|
"react-focus-lock": "^2.9.2",
|
|
4
4
|
"@dynamic-labs/sdk-api": "0.0.174",
|
|
5
|
-
"@dynamic-labs/iconic": "^0.1.
|
|
5
|
+
"@dynamic-labs/iconic": "^0.1.17",
|
|
6
6
|
"@dynamic-labs/wallet-book": "^0.0.11",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "~1.4.4",
|
|
8
8
|
"country-list": "^2.3.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-RC.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react-focus-lock": "^2.9.2",
|
|
11
11
|
"@dynamic-labs/sdk-api": "0.0.174",
|
|
12
|
-
"@dynamic-labs/iconic": "^0.1.
|
|
12
|
+
"@dynamic-labs/iconic": "^0.1.17",
|
|
13
13
|
"@dynamic-labs/wallet-book": "^0.0.11",
|
|
14
14
|
"@hcaptcha/react-hcaptcha": "~1.4.4",
|
|
15
15
|
"country-list": "^2.3.0",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"formik": "^2.2.9",
|
|
18
18
|
"qrcode": "^1.5.1",
|
|
19
19
|
"ethers": "^5.7.2",
|
|
20
|
-
"@dynamic-labs/logger": "0.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "0.
|
|
22
|
-
"@dynamic-labs/wallet-connector-core": "0.
|
|
20
|
+
"@dynamic-labs/logger": "0.17.0-RC.1",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "0.17.0-RC.1",
|
|
22
|
+
"@dynamic-labs/wallet-connector-core": "0.17.0-RC.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"semver": "^7.3.8"
|
package/src/index.cjs
CHANGED
|
@@ -63,12 +63,12 @@ var pencilAltIcon = require('./lib/shared/assets/pencil-alt-icon.cjs');
|
|
|
63
63
|
var pencil = require('./lib/shared/assets/pencil.cjs');
|
|
64
64
|
var tooltipArrow = require('./lib/shared/assets/tooltip-arrow.cjs');
|
|
65
65
|
var switchHorizontal = require('./lib/shared/assets/switch-horizontal.cjs');
|
|
66
|
+
var dotsHorizontal = require('./lib/shared/assets/dots-horizontal.cjs');
|
|
66
67
|
var index$2 = require('./lib/shared/consts/index.cjs');
|
|
67
68
|
var logger = require('./lib/shared/logger.cjs');
|
|
68
69
|
require('./lib/utils/constants/colors.cjs');
|
|
69
70
|
var multiWallet = require('@dynamic-labs/multi-wallet');
|
|
70
71
|
require('@dynamic-labs/sdk-api');
|
|
71
|
-
var isSameWalletName = require('./lib/utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
72
72
|
var ShadowDOM = require('./lib/components/ShadowDOM/ShadowDOM.cjs');
|
|
73
73
|
require('./lib/context/ThemeContext/ThemeContext.cjs');
|
|
74
74
|
require('react-dom');
|
|
@@ -76,8 +76,9 @@ require('react-focus-lock');
|
|
|
76
76
|
require('./lib/components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
77
77
|
require('./lib/components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
78
78
|
require('./lib/components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
79
|
-
require('./lib/context/ViewContext/ViewContext.cjs');
|
|
80
79
|
require('./lib/config/ApiEndpoint.cjs');
|
|
80
|
+
var isSameWalletName = require('./lib/utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
81
|
+
require('./lib/context/ViewContext/ViewContext.cjs');
|
|
81
82
|
require('./lib/context/ErrorContext/ErrorContext.cjs');
|
|
82
83
|
require('ethers');
|
|
83
84
|
var useWalletItemActions = require('./lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs');
|
|
@@ -165,6 +166,7 @@ exports.PencilAltIcon = pencilAltIcon.ReactComponent;
|
|
|
165
166
|
exports.PencilIcon = pencil.ReactComponent;
|
|
166
167
|
exports.TooltipArrow = tooltipArrow.ReactComponent;
|
|
167
168
|
exports.SwitchHorizontalIcon = switchHorizontal.ReactComponent;
|
|
169
|
+
exports.DotsHorizontalIcon = dotsHorizontal.ReactComponent;
|
|
168
170
|
exports.authModalZIndex = index$2.authModalZIndex;
|
|
169
171
|
exports.countryCodes = index$2.countryCodes;
|
|
170
172
|
exports.defaultWalletsForChains = index$2.defaultWalletsForChains;
|
|
@@ -178,8 +180,8 @@ Object.defineProperty(exports, 'normalizeWalletName', {
|
|
|
178
180
|
enumerable: true,
|
|
179
181
|
get: function () { return multiWallet.normalizeWalletName; }
|
|
180
182
|
});
|
|
181
|
-
exports.isSameWalletName = isSameWalletName.isSameWalletName;
|
|
182
183
|
exports.ShadowDOM = ShadowDOM.ShadowDOM;
|
|
184
|
+
exports.isSameWalletName = isSameWalletName.isSameWalletName;
|
|
183
185
|
exports.useWalletItemActions = useWalletItemActions.useWalletItemActions;
|
|
184
186
|
exports.useUserUpdateRequest = useUserUpdateRequest.useUserUpdateRequest;
|
|
185
187
|
exports.DynamicConnectButton = DynamicConnectButton.DynamicConnectButton;
|
package/src/index.js
CHANGED
|
@@ -59,12 +59,12 @@ export { ReactComponent as PencilAltIcon } from './lib/shared/assets/pencil-alt-
|
|
|
59
59
|
export { ReactComponent as PencilIcon } from './lib/shared/assets/pencil.js';
|
|
60
60
|
export { ReactComponent as TooltipArrow } from './lib/shared/assets/tooltip-arrow.js';
|
|
61
61
|
export { ReactComponent as SwitchHorizontalIcon } from './lib/shared/assets/switch-horizontal.js';
|
|
62
|
+
export { ReactComponent as DotsHorizontalIcon } from './lib/shared/assets/dots-horizontal.js';
|
|
62
63
|
export { authModalZIndex, countryCodes, defaultWalletsForChains, tShirtSizes, teamNames, toolkitZIndex, tooltipZIndex, widgetModalZIndex } from './lib/shared/consts/index.js';
|
|
63
64
|
export { logger } from './lib/shared/logger.js';
|
|
64
65
|
import './lib/utils/constants/colors.js';
|
|
65
66
|
export { normalizeWalletName } from '@dynamic-labs/multi-wallet';
|
|
66
67
|
import '@dynamic-labs/sdk-api';
|
|
67
|
-
export { isSameWalletName } from './lib/utils/functions/isSameWalletName/isSameWalletName.js';
|
|
68
68
|
export { ShadowDOM } from './lib/components/ShadowDOM/ShadowDOM.js';
|
|
69
69
|
import './lib/context/ThemeContext/ThemeContext.js';
|
|
70
70
|
import 'react-dom';
|
|
@@ -72,8 +72,9 @@ import 'react-focus-lock';
|
|
|
72
72
|
import './lib/components/Transition/ZoomTransition/ZoomTransition.js';
|
|
73
73
|
import './lib/components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
74
74
|
import './lib/components/Transition/OpacityTransition/OpacityTransition.js';
|
|
75
|
-
import './lib/context/ViewContext/ViewContext.js';
|
|
76
75
|
import './lib/config/ApiEndpoint.js';
|
|
76
|
+
export { isSameWalletName } from './lib/utils/functions/isSameWalletName/isSameWalletName.js';
|
|
77
|
+
import './lib/context/ViewContext/ViewContext.js';
|
|
77
78
|
import './lib/context/ErrorContext/ErrorContext.js';
|
|
78
79
|
import 'ethers';
|
|
79
80
|
export { useWalletItemActions } from './lib/utils/hooks/useWalletItemActions/useWalletItemActions.js';
|
package/src/lib/Main.cjs
CHANGED
|
@@ -17,18 +17,22 @@ require('./utils/constants/colors.cjs');
|
|
|
17
17
|
var usePreventPageScroll = require('./shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
18
18
|
var index$1 = require('./shared/consts/index.cjs');
|
|
19
19
|
var useInternalDynamicContext = require('./context/DynamicContext/useInternalDynamicContext.cjs');
|
|
20
|
-
var isSameWalletName = require('./utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
21
20
|
require('./components/ShadowDOM/ShadowDOM.cjs');
|
|
22
21
|
require('./context/ThemeContext/ThemeContext.cjs');
|
|
23
22
|
var Portal = require('./components/Portal/Portal.cjs');
|
|
24
23
|
require('react-dom');
|
|
25
24
|
require('./config/ApiEndpoint.cjs');
|
|
25
|
+
var isSameWalletName = require('./utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
26
26
|
require('./context/ErrorContext/ErrorContext.cjs');
|
|
27
27
|
require('ethers');
|
|
28
28
|
var useWalletItemActions = require('./utils/hooks/useWalletItemActions/useWalletItemActions.cjs');
|
|
29
29
|
require('./utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
30
30
|
require('./components/IconButton/IconButton.cjs');
|
|
31
|
+
require('./components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
32
|
+
require('./components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
33
|
+
require('./components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
31
34
|
var DynamicAuthLayout = require('./layout/DynamicAuthLayout/DynamicAuthLayout.cjs');
|
|
35
|
+
var SocialRedirectContext = require('./context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
32
36
|
var useVerifyOnAwaitingSignature = require('./utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs');
|
|
33
37
|
var isSelectedWalletAlreadyConnected = require('./utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs');
|
|
34
38
|
var viewToComponentMap = require('./views/viewToComponentMap.cjs');
|
|
@@ -85,9 +89,9 @@ const Main = () => {
|
|
|
85
89
|
}
|
|
86
90
|
}, [wallets]);
|
|
87
91
|
const showDynamicAuth = showAuthFlow && !isProjectSettingsLoading;
|
|
88
|
-
return (jsxRuntime.jsx(index.FooterAnimationContextProvider, { children: jsxRuntime.jsx(Portal.Portal, Object.assign({ zIndex: index$1.authModalZIndex, isShown: showDynamicAuth, handleClose: handleClose, withBackdrop: true, transitionEvents: {
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
return (jsxRuntime.jsx(SocialRedirectContext.SocialRedirectContextProvider, { children: jsxRuntime.jsx(index.FooterAnimationContextProvider, { children: jsxRuntime.jsx(Portal.Portal, Object.assign({ zIndex: index$1.authModalZIndex, isShown: showDynamicAuth, handleClose: handleClose, withBackdrop: true, transitionEvents: {
|
|
93
|
+
onUnmount: handleOnPortalUnmount,
|
|
94
|
+
} }, { children: jsxRuntime.jsx(DynamicAuthLayout.DynamicAuthLayout, Object.assign({ transitionProps: { isShown: showDynamicAuth }, appName: appName, onClose: handleClose, walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, projectSettings: projectSettings, newToWeb3WalletChainMap: newToWeb3WalletChainMap, walletConnector: selectedWalletConnector, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }, { children: viewToComponentMap.viewToComponentMap[view] })) })) }) }));
|
|
91
95
|
};
|
|
92
96
|
|
|
93
97
|
exports.Main = Main;
|
package/src/lib/Main.js
CHANGED
|
@@ -13,18 +13,22 @@ import './utils/constants/colors.js';
|
|
|
13
13
|
import { usePreventPageScroll } from './shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
|
|
14
14
|
import { authModalZIndex } from './shared/consts/index.js';
|
|
15
15
|
import { useInternalDynamicContext } from './context/DynamicContext/useInternalDynamicContext.js';
|
|
16
|
-
import { isSameWalletName } from './utils/functions/isSameWalletName/isSameWalletName.js';
|
|
17
16
|
import './components/ShadowDOM/ShadowDOM.js';
|
|
18
17
|
import './context/ThemeContext/ThemeContext.js';
|
|
19
18
|
import { Portal } from './components/Portal/Portal.js';
|
|
20
19
|
import 'react-dom';
|
|
21
20
|
import './config/ApiEndpoint.js';
|
|
21
|
+
import { isSameWalletName } from './utils/functions/isSameWalletName/isSameWalletName.js';
|
|
22
22
|
import './context/ErrorContext/ErrorContext.js';
|
|
23
23
|
import 'ethers';
|
|
24
24
|
import { useWalletItemActions } from './utils/hooks/useWalletItemActions/useWalletItemActions.js';
|
|
25
25
|
import './utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
26
26
|
import './components/IconButton/IconButton.js';
|
|
27
|
+
import './components/Transition/ZoomTransition/ZoomTransition.js';
|
|
28
|
+
import './components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
29
|
+
import './components/Transition/OpacityTransition/OpacityTransition.js';
|
|
27
30
|
import { DynamicAuthLayout } from './layout/DynamicAuthLayout/DynamicAuthLayout.js';
|
|
31
|
+
import { SocialRedirectContextProvider } from './context/SocialRedirectContext/SocialRedirectContext.js';
|
|
28
32
|
import { useVerifyOnAwaitingSignature } from './utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js';
|
|
29
33
|
import { isSelectedWalletAlreadyConnected } from './utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js';
|
|
30
34
|
import { viewToComponentMap } from './views/viewToComponentMap.js';
|
|
@@ -81,9 +85,9 @@ const Main = () => {
|
|
|
81
85
|
}
|
|
82
86
|
}, [wallets]);
|
|
83
87
|
const showDynamicAuth = showAuthFlow && !isProjectSettingsLoading;
|
|
84
|
-
return (jsx(FooterAnimationContextProvider, { children: jsx(Portal, Object.assign({ zIndex: authModalZIndex, isShown: showDynamicAuth, handleClose: handleClose, withBackdrop: true, transitionEvents: {
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
return (jsx(SocialRedirectContextProvider, { children: jsx(FooterAnimationContextProvider, { children: jsx(Portal, Object.assign({ zIndex: authModalZIndex, isShown: showDynamicAuth, handleClose: handleClose, withBackdrop: true, transitionEvents: {
|
|
89
|
+
onUnmount: handleOnPortalUnmount,
|
|
90
|
+
} }, { children: jsx(DynamicAuthLayout, Object.assign({ transitionProps: { isShown: showDynamicAuth }, appName: appName, onClose: handleClose, walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, projectSettings: projectSettings, newToWeb3WalletChainMap: newToWeb3WalletChainMap, walletConnector: selectedWalletConnector, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }, { children: viewToComponentMap[view] })) })) }) }));
|
|
87
91
|
};
|
|
88
92
|
|
|
89
93
|
export { Main, Main as default };
|
|
@@ -30,12 +30,12 @@ require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
30
30
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
31
31
|
|
|
32
32
|
const AnimatePresence = ({ children, animationComponent, }) => {
|
|
33
|
-
const [
|
|
33
|
+
const [isShown, setIsShown] = React.useState(true);
|
|
34
34
|
const forceRerender = useForceUpdate.useForceUpdate();
|
|
35
35
|
const childrenRef = React.useRef(null);
|
|
36
36
|
const isChildrenPresent = React.useMemo(() => Boolean(children), [children]);
|
|
37
37
|
const prevIsChildrenPresent = usePrevious.usePrevious(isChildrenPresent);
|
|
38
|
-
const
|
|
38
|
+
const onUnmount = React.useCallback(() => {
|
|
39
39
|
childrenRef.current = null;
|
|
40
40
|
forceRerender();
|
|
41
41
|
}, [forceRerender]);
|
|
@@ -46,16 +46,16 @@ const AnimatePresence = ({ children, animationComponent, }) => {
|
|
|
46
46
|
}, [children]);
|
|
47
47
|
React.useEffect(() => {
|
|
48
48
|
if (isChildrenPresent && !prevIsChildrenPresent) {
|
|
49
|
-
|
|
49
|
+
setIsShown(true);
|
|
50
50
|
}
|
|
51
51
|
if (prevIsChildrenPresent && !isChildrenPresent) {
|
|
52
|
-
|
|
52
|
+
setIsShown(false);
|
|
53
53
|
}
|
|
54
54
|
}, [isChildrenPresent, prevIsChildrenPresent]);
|
|
55
55
|
return React.cloneElement(animationComponent, {
|
|
56
56
|
children: children || childrenRef.current,
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
isShown,
|
|
58
|
+
onUnmount,
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -26,12 +26,12 @@ import '../../context/CaptchaContext/CaptchaContext.js';
|
|
|
26
26
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
27
27
|
|
|
28
28
|
const AnimatePresence = ({ children, animationComponent, }) => {
|
|
29
|
-
const [
|
|
29
|
+
const [isShown, setIsShown] = useState(true);
|
|
30
30
|
const forceRerender = useForceUpdate();
|
|
31
31
|
const childrenRef = useRef(null);
|
|
32
32
|
const isChildrenPresent = useMemo(() => Boolean(children), [children]);
|
|
33
33
|
const prevIsChildrenPresent = usePrevious(isChildrenPresent);
|
|
34
|
-
const
|
|
34
|
+
const onUnmount = useCallback(() => {
|
|
35
35
|
childrenRef.current = null;
|
|
36
36
|
forceRerender();
|
|
37
37
|
}, [forceRerender]);
|
|
@@ -42,16 +42,16 @@ const AnimatePresence = ({ children, animationComponent, }) => {
|
|
|
42
42
|
}, [children]);
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
if (isChildrenPresent && !prevIsChildrenPresent) {
|
|
45
|
-
|
|
45
|
+
setIsShown(true);
|
|
46
46
|
}
|
|
47
47
|
if (prevIsChildrenPresent && !isChildrenPresent) {
|
|
48
|
-
|
|
48
|
+
setIsShown(false);
|
|
49
49
|
}
|
|
50
50
|
}, [isChildrenPresent, prevIsChildrenPresent]);
|
|
51
51
|
return cloneElement(animationComponent, {
|
|
52
52
|
children: children || childrenRef.current,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
isShown,
|
|
54
|
+
onUnmount,
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onAnimationEnd?: () => void;
|
|
5
|
-
}>;
|
|
2
|
+
import { ITransitionOptions } from '../Transition/transition.type';
|
|
3
|
+
export type AnimationComponentProps<T extends Record<string, unknown> = Record<string, unknown>> = PropsWithChildren<T & ITransitionOptions>;
|
|
6
4
|
export type AnimationComponent<T extends Record<string, unknown> = Record<string, unknown>> = FC<AnimationComponentProps<T>>;
|
|
7
5
|
export type AnimatePresenceProps = {
|
|
8
6
|
animationComponent: ReactElement<AnimationComponentProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
8
|
+
var ListTile = require('../ListTile/ListTile.cjs');
|
|
9
|
+
|
|
10
|
+
const IconListTile = (_a) => {
|
|
11
|
+
var { children, className } = _a, props = _tslib.__rest(_a, ["children", "className"]);
|
|
12
|
+
return (jsxRuntime.jsx(ListTile.ListTile, Object.assign({}, props, { className: classNames.classNames(className, 'icon-list-tile') }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'icon-list-tile--children' }, { children: children })) })));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.IconListTile = IconListTile;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __rest } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
4
|
+
import { ListTile } from '../ListTile/ListTile.js';
|
|
5
|
+
|
|
6
|
+
const IconListTile = (_a) => {
|
|
7
|
+
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
8
|
+
return (jsx(ListTile, Object.assign({}, props, { className: classNames(className, 'icon-list-tile') }, { children: jsx("div", Object.assign({ className: 'icon-list-tile--children' }, { children: children })) })));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { IconListTile };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IconListTile } from './IconListTile';
|
|
@@ -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, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style }, { children: [leading, jsxRuntime.jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: children })) })), trailing] })));
|
|
9
|
+
const ListTile = ({ children, onClick, leading, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style }, { children: [leading, jsxRuntime.jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { 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, trailing, style, className = '', dataTestId, }) => (jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style }, { children: [leading, jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: children })) })), trailing] })));
|
|
5
|
+
const ListTile = ({ children, onClick, leading, trailing, style, className = '', dataTestId, }) => (jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style }, { children: [leading, jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: children })) })), trailing] })));
|
|
6
6
|
|
|
7
7
|
export { ListTile };
|
|
@@ -5,13 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
7
7
|
var AnimatePresence = require('../AnimatePresence/AnimatePresence.cjs');
|
|
8
|
-
var VerticalDrawerAnimation = require('../AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.cjs');
|
|
9
8
|
var Typography = require('../Typography/Typography.cjs');
|
|
9
|
+
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
10
|
+
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
11
|
+
require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
12
|
+
var VerticalDrawerTransition = require('../Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs');
|
|
10
13
|
|
|
11
14
|
const typographyColor = {
|
|
12
15
|
error: 'error-1',
|
|
13
16
|
};
|
|
14
|
-
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(
|
|
17
|
+
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }) }, { children: Boolean(message) && (jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('modal-header-banner', {
|
|
15
18
|
'modal-header-banner__error': type === 'error',
|
|
16
19
|
}) }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: typographyColor[type], truncate: true }, { children: message })) }))) })));
|
|
17
20
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
3
3
|
import { AnimatePresence } from '../AnimatePresence/AnimatePresence.js';
|
|
4
|
-
import { VerticalDrawerAnimation } from '../AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.js';
|
|
5
4
|
import { Typography } from '../Typography/Typography.js';
|
|
5
|
+
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
6
|
+
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
7
|
+
import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
8
|
+
import { VerticalDrawerTransition } from '../Transition/VerticalDrawerTransition/VerticalDrawerTransition.js';
|
|
6
9
|
|
|
7
10
|
const typographyColor = {
|
|
8
11
|
error: 'error-1',
|
|
9
12
|
};
|
|
10
|
-
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(
|
|
13
|
+
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }) }, { children: Boolean(message) && (jsx("div", Object.assign({ className: classNames('modal-header-banner', {
|
|
11
14
|
'modal-header-banner__error': type === 'error',
|
|
12
15
|
}) }, { children: jsx(Typography, Object.assign({ variant: 'body_small', color: typographyColor[type], truncate: true }, { children: message })) }))) })));
|
|
13
16
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var reactDom = require('react-dom');
|
|
8
|
+
var AnimatePresence = require('../AnimatePresence/AnimatePresence.cjs');
|
|
9
|
+
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
10
|
+
var SlideInUpTransition = require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
11
|
+
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
12
|
+
require('@dynamic-labs/multi-wallet');
|
|
13
|
+
require('@dynamic-labs/sdk-api');
|
|
14
|
+
require('../../config/ApiEndpoint.cjs');
|
|
15
|
+
require('../../shared/logger.cjs');
|
|
16
|
+
require('@dynamic-labs/iconic');
|
|
17
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
18
|
+
require('../../utils/constants/colors.cjs');
|
|
19
|
+
require('../../shared/consts/index.cjs');
|
|
20
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
21
|
+
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
22
|
+
require('../ShadowDOM/ShadowDOM.cjs');
|
|
23
|
+
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
24
|
+
require('react-focus-lock');
|
|
25
|
+
require('../IconButton/IconButton.cjs');
|
|
26
|
+
require('ethers');
|
|
27
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
28
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
29
|
+
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
30
|
+
var OverlayCard_context = require('./OverlayCard.context.cjs');
|
|
31
|
+
|
|
32
|
+
const noContextError = new Error('OverlayCard is not a child of OverlayCardTarget, please add OverlayCardTarget where the card should be displayed');
|
|
33
|
+
const OverlayCard = ({ isOpen, children, onClickOverlay, }) => {
|
|
34
|
+
const context = React.useContext(OverlayCard_context.overlayCardContext);
|
|
35
|
+
if (!context) {
|
|
36
|
+
throw noContextError;
|
|
37
|
+
}
|
|
38
|
+
const { portal } = context;
|
|
39
|
+
if (!portal)
|
|
40
|
+
return null;
|
|
41
|
+
return reactDom.createPortal(jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(SlideInUpTransition.SlideInUpTransition, {}) }, { children: isOpen && (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && jsxRuntime.jsx("div", Object.assign({ className: 'overlay-card--content' }, { children: children })) }))) }))] }), portal);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.OverlayCard = OverlayCard;
|
|
45
|
+
exports.noContextError = noContextError;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, MouseEventHandler, PropsWithChildren } from 'react';
|
|
2
|
+
type OverlayCardProps = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClickOverlay?: MouseEventHandler<HTMLDivElement>;
|
|
5
|
+
};
|
|
6
|
+
export declare const noContextError: Error;
|
|
7
|
+
export declare const OverlayCard: FC<PropsWithChildren<OverlayCardProps>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import { AnimatePresence } from '../AnimatePresence/AnimatePresence.js';
|
|
5
|
+
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
6
|
+
import { SlideInUpTransition } from '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
7
|
+
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
8
|
+
import '@dynamic-labs/multi-wallet';
|
|
9
|
+
import '@dynamic-labs/sdk-api';
|
|
10
|
+
import '../../config/ApiEndpoint.js';
|
|
11
|
+
import '../../shared/logger.js';
|
|
12
|
+
import '@dynamic-labs/iconic';
|
|
13
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
14
|
+
import '../../utils/constants/colors.js';
|
|
15
|
+
import '../../shared/consts/index.js';
|
|
16
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
17
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
18
|
+
import '../ShadowDOM/ShadowDOM.js';
|
|
19
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
20
|
+
import 'react-focus-lock';
|
|
21
|
+
import '../IconButton/IconButton.js';
|
|
22
|
+
import 'ethers';
|
|
23
|
+
import '../../context/MockContext/MockContext.js';
|
|
24
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
25
|
+
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
26
|
+
import { overlayCardContext } from './OverlayCard.context.js';
|
|
27
|
+
|
|
28
|
+
const noContextError = new Error('OverlayCard is not a child of OverlayCardTarget, please add OverlayCardTarget where the card should be displayed');
|
|
29
|
+
const OverlayCard = ({ isOpen, children, onClickOverlay, }) => {
|
|
30
|
+
const context = useContext(overlayCardContext);
|
|
31
|
+
if (!context) {
|
|
32
|
+
throw noContextError;
|
|
33
|
+
}
|
|
34
|
+
const { portal } = context;
|
|
35
|
+
if (!portal)
|
|
36
|
+
return null;
|
|
37
|
+
return createPortal(jsxs("div", { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(SlideInUpTransition, {}) }, { children: isOpen && (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && jsx("div", Object.assign({ className: 'overlay-card--content' }, { children: children })) }))) }))] }), portal);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { OverlayCard, noContextError };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var OverlayCard_context = require('./OverlayCard.context.cjs');
|
|
8
|
+
|
|
9
|
+
const OverlayCardTarget = ({ children }) => {
|
|
10
|
+
const { Provider } = OverlayCard_context.overlayCardContext;
|
|
11
|
+
const [portal, setPortal] = React.useState(null);
|
|
12
|
+
return (jsxRuntime.jsxs(Provider, Object.assign({ value: {
|
|
13
|
+
portal,
|
|
14
|
+
} }, { children: [children, jsxRuntime.jsx("div", { ref: setPortal })] })));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.OverlayCardTarget = OverlayCardTarget;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { overlayCardContext } from './OverlayCard.context.js';
|
|
4
|
+
|
|
5
|
+
const OverlayCardTarget = ({ children }) => {
|
|
6
|
+
const { Provider } = overlayCardContext;
|
|
7
|
+
const [portal, setPortal] = useState(null);
|
|
8
|
+
return (jsxs(Provider, Object.assign({ value: {
|
|
9
|
+
portal,
|
|
10
|
+
} }, { children: [children, jsx("div", { ref: setPortal })] })));
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { OverlayCardTarget };
|