@dynamic-labs/sdk-react-core 0.17.0-RC.12 → 0.17.0-RC.13
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 +13 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +8 -8
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -0
- package/src/lib/Main.cjs +2 -0
- package/src/lib/Main.js +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +2 -0
- package/src/lib/components/Divider/Divider.cjs +2 -0
- package/src/lib/components/Divider/Divider.js +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +2 -0
- package/src/lib/components/Popper/Popper/Popper.cjs +54 -0
- package/src/lib/components/Popper/Popper/Popper.d.ts +12 -0
- package/src/lib/components/Popper/Popper/Popper.js +50 -0
- package/src/lib/components/Popper/Popper/index.d.ts +1 -0
- package/src/lib/components/Popper/Popper.types.d.ts +6 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +18 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +9 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.js +14 -0
- package/src/lib/components/Popper/PopperContent/index.d.ts +1 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.cjs +26 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.d.ts +8 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.js +20 -0
- package/src/lib/components/Popper/PopperContext/index.d.ts +1 -0
- package/src/lib/components/Popper/index.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +14 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +10 -0
- package/src/lib/components/Popper/utils/getChildPosition/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +3 -0
- package/src/lib/components/Popper/utils/isScrollable/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.cjs +16 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.js +12 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +24 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +20 -0
- package/src/lib/components/Portal/Portal.cjs +2 -0
- package/src/lib/components/Portal/Portal.js +2 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +2 -0
- package/src/lib/components/Tooltip/Tooltip.js +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.cjs +2 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.js +2 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -0
- package/src/lib/views/NoAccess/NoAccess.js +2 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +7 -27
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +8 -28
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +2 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +2 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +2 -0
- package/src/polyfills.cjs +11 -0
- package/src/polyfills.d.ts +1 -0
- package/src/polyfills.js +9 -0
- package/src/shim/process.cjs +238 -0
- package/src/shim/process.d.ts +34 -0
- package/src/shim/process.js +234 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +0 -68
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +0 -64
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.17.0-RC.13](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.12...v0.17.0-RC.13) (2023-05-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* discriminate magic connectors ([#2069](https://github.com/dynamic-labs/DynamicAuth/issues/2069)) ([e9f6fd1](https://github.com/dynamic-labs/DynamicAuth/commit/e9f6fd15082364612a86d6d2a091cb8bd4eccc1f))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* add popper to fix dots menu positioning ([#2075](https://github.com/dynamic-labs/DynamicAuth/issues/2075)) ([fe945bd](https://github.com/dynamic-labs/DynamicAuth/commit/fe945bd3bcc5edeecfa0a2e7e53e30dc507c6118))
|
|
13
|
+
* polyfill process if not defined in global ([#2088](https://github.com/dynamic-labs/DynamicAuth/issues/2088)) ([a5d8194](https://github.com/dynamic-labs/DynamicAuth/commit/a5d81942440a6fe290c15b58b942012afe42aa00))
|
|
14
|
+
|
|
2
15
|
## [0.17.0-RC.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.11...v0.17.0-RC.12) (2023-05-09)
|
|
3
16
|
|
|
4
17
|
|
package/package.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "0.17.0-RC.
|
|
5
|
+
var version = "0.17.0-RC.13";
|
|
6
6
|
var dependencies = {
|
|
7
7
|
"react-focus-lock": "^2.9.2",
|
|
8
8
|
"@dynamic-labs/iconic": "^0.1.19",
|
|
9
9
|
"@dynamic-labs/sdk-api": "0.0.189",
|
|
10
|
-
"@dynamic-labs/wallet-book": "^0.0.
|
|
10
|
+
"@dynamic-labs/wallet-book": "^0.0.15",
|
|
11
11
|
"@hcaptcha/react-hcaptcha": "~1.4.4",
|
|
12
12
|
"country-list": "^2.3.0",
|
|
13
13
|
yup: "^0.32.11",
|
package/package.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var version = "0.17.0-RC.
|
|
1
|
+
var version = "0.17.0-RC.13";
|
|
2
2
|
var dependencies = {
|
|
3
3
|
"react-focus-lock": "^2.9.2",
|
|
4
4
|
"@dynamic-labs/iconic": "^0.1.19",
|
|
5
5
|
"@dynamic-labs/sdk-api": "0.0.189",
|
|
6
|
-
"@dynamic-labs/wallet-book": "^0.0.
|
|
6
|
+
"@dynamic-labs/wallet-book": "^0.0.15",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "~1.4.4",
|
|
8
8
|
"country-list": "^2.3.0",
|
|
9
9
|
yup: "^0.32.11",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "0.17.0-RC.
|
|
3
|
+
"version": "0.17.0-RC.13",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"react-focus-lock": "^2.9.2",
|
|
11
11
|
"@dynamic-labs/iconic": "^0.1.19",
|
|
12
12
|
"@dynamic-labs/sdk-api": "0.0.189",
|
|
13
|
-
"@dynamic-labs/wallet-book": "^0.0.
|
|
13
|
+
"@dynamic-labs/wallet-book": "^0.0.15",
|
|
14
14
|
"@hcaptcha/react-hcaptcha": "~1.4.4",
|
|
15
15
|
"country-list": "^2.3.0",
|
|
16
16
|
"yup": "^0.32.11",
|
|
17
17
|
"formik": "^2.2.9",
|
|
18
18
|
"qrcode": "1.5.1",
|
|
19
19
|
"ethers": "^5.7.2",
|
|
20
|
-
"@dynamic-labs/logger": "0.17.0-RC.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "0.17.0-RC.
|
|
22
|
-
"@dynamic-labs/rpc-providers": "0.17.0-RC.
|
|
23
|
-
"@dynamic-labs/types": "0.17.0-RC.
|
|
24
|
-
"@dynamic-labs/utils": "0.17.0-RC.
|
|
25
|
-
"@dynamic-labs/wallet-connector-core": "0.17.0-RC.
|
|
20
|
+
"@dynamic-labs/logger": "0.17.0-RC.13",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "0.17.0-RC.13",
|
|
22
|
+
"@dynamic-labs/rpc-providers": "0.17.0-RC.13",
|
|
23
|
+
"@dynamic-labs/types": "0.17.0-RC.13",
|
|
24
|
+
"@dynamic-labs/utils": "0.17.0-RC.13",
|
|
25
|
+
"@dynamic-labs/wallet-connector-core": "0.17.0-RC.13"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"semver": "^7.3.8"
|
package/src/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('./polyfills.cjs');
|
|
5
6
|
var version = require('./version.cjs');
|
|
6
7
|
var data = require('./lib/views/WalletList/data.cjs');
|
|
7
8
|
var getAuthToken = require('./lib/utils/functions/getAuthToken/getAuthToken.cjs');
|
|
@@ -91,6 +92,8 @@ var DynamicConnectButton = require('./lib/components/DynamicConnectButton/Dynami
|
|
|
91
92
|
require('./lib/components/IconButton/IconButton.cjs');
|
|
92
93
|
require('./lib/components/Alert/Alert.cjs');
|
|
93
94
|
require('@dynamic-labs/iconic');
|
|
95
|
+
require('./lib/components/Popper/Popper/Popper.cjs');
|
|
96
|
+
require('./lib/components/Popper/PopperContext/PopperContext.cjs');
|
|
94
97
|
var WalletList = require('./lib/views/WalletList/WalletList.cjs');
|
|
95
98
|
var PendingSignatureView = require('./lib/views/PendingSignatureView/PendingSignatureView.cjs');
|
|
96
99
|
var CollectUserDataView = require('./lib/views/CollectUserDataView/CollectUserDataView.cjs');
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import './polyfills.js';
|
|
1
2
|
export { VERSION } from './version.js';
|
|
2
3
|
export { getInstalledWallets, getNotInstalledWallets } from './lib/views/WalletList/data.js';
|
|
3
4
|
export { getAuthToken } from './lib/utils/functions/getAuthToken/getAuthToken.js';
|
|
@@ -87,6 +88,8 @@ export { DynamicConnectButton } from './lib/components/DynamicConnectButton/Dyna
|
|
|
87
88
|
import './lib/components/IconButton/IconButton.js';
|
|
88
89
|
import './lib/components/Alert/Alert.js';
|
|
89
90
|
import '@dynamic-labs/iconic';
|
|
91
|
+
import './lib/components/Popper/Popper/Popper.js';
|
|
92
|
+
import './lib/components/Popper/PopperContext/PopperContext.js';
|
|
90
93
|
export { WalletList } from './lib/views/WalletList/WalletList.js';
|
|
91
94
|
export { PendingSignatureView } from './lib/views/PendingSignatureView/PendingSignatureView.js';
|
|
92
95
|
export { CollectUserDataView } from './lib/views/CollectUserDataView/CollectUserDataView.js';
|
package/src/lib/Main.cjs
CHANGED
|
@@ -35,6 +35,8 @@ require('./components/Alert/Alert.cjs');
|
|
|
35
35
|
require('./components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
36
36
|
require('./components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
37
37
|
require('./components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
38
|
+
require('./components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('./components/Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
var DynamicAuthLayout = require('./layout/DynamicAuthLayout/DynamicAuthLayout.cjs');
|
|
39
41
|
var SocialRedirectContext = require('./context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
40
42
|
var useVerifyOnAwaitingSignature = require('./utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs');
|
package/src/lib/Main.js
CHANGED
|
@@ -31,6 +31,8 @@ import './components/Alert/Alert.js';
|
|
|
31
31
|
import './components/Transition/ZoomTransition/ZoomTransition.js';
|
|
32
32
|
import './components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
33
33
|
import './components/Transition/OpacityTransition/OpacityTransition.js';
|
|
34
|
+
import './components/Popper/Popper/Popper.js';
|
|
35
|
+
import './components/Popper/PopperContext/PopperContext.js';
|
|
34
36
|
import { DynamicAuthLayout } from './layout/DynamicAuthLayout/DynamicAuthLayout.js';
|
|
35
37
|
import { SocialRedirectContextProvider } from './context/SocialRedirectContext/SocialRedirectContext.js';
|
|
36
38
|
import { useVerifyOnAwaitingSignature } from './utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js';
|
|
@@ -29,6 +29,8 @@ require('../../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
|
29
29
|
require('../../../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
30
30
|
require('../../../IconButton/IconButton.cjs');
|
|
31
31
|
require('../../../Alert/Alert.cjs');
|
|
32
|
+
require('../../../Popper/Popper/Popper.cjs');
|
|
33
|
+
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
32
34
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
33
35
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
34
36
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -25,6 +25,8 @@ import '../../../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
25
25
|
import '../../../Transition/OpacityTransition/OpacityTransition.js';
|
|
26
26
|
import '../../../IconButton/IconButton.js';
|
|
27
27
|
import '../../../Alert/Alert.js';
|
|
28
|
+
import '../../../Popper/Popper/Popper.js';
|
|
29
|
+
import '../../../Popper/PopperContext/PopperContext.js';
|
|
28
30
|
import '../../../../context/MockContext/MockContext.js';
|
|
29
31
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
30
32
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -28,6 +28,8 @@ require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
|
28
28
|
require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
29
|
require('../IconButton/IconButton.cjs');
|
|
30
30
|
require('../Alert/Alert.cjs');
|
|
31
|
+
require('../Popper/Popper/Popper.cjs');
|
|
32
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
31
33
|
var useForceUpdate = require('../../utils/hooks/useForceUpdate/useForceUpdate.cjs');
|
|
32
34
|
require('../../context/MockContext/MockContext.cjs');
|
|
33
35
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -24,6 +24,8 @@ import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
24
24
|
import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
25
25
|
import '../IconButton/IconButton.js';
|
|
26
26
|
import '../Alert/Alert.js';
|
|
27
|
+
import '../Popper/Popper/Popper.js';
|
|
28
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
27
29
|
import { useForceUpdate } from '../../utils/hooks/useForceUpdate/useForceUpdate.js';
|
|
28
30
|
import '../../context/MockContext/MockContext.js';
|
|
29
31
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -31,6 +31,8 @@ require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
31
31
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
32
32
|
require('../IconButton/IconButton.cjs');
|
|
33
33
|
require('../Alert/Alert.cjs');
|
|
34
|
+
require('../Popper/Popper/Popper.cjs');
|
|
35
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
34
36
|
|
|
35
37
|
const Divider = ({ text }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'divider' }, { children: [jsxRuntime.jsx("div", { className: 'divider__dash' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'divider__text', variant: 'body_small', color: 'secondary' }, { children: text })), jsxRuntime.jsx("div", { className: 'divider__dash' })] })));
|
|
36
38
|
|
|
@@ -27,6 +27,8 @@ import '../../context/CaptchaContext/CaptchaContext.js';
|
|
|
27
27
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
28
28
|
import '../IconButton/IconButton.js';
|
|
29
29
|
import '../Alert/Alert.js';
|
|
30
|
+
import '../Popper/Popper/Popper.js';
|
|
31
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
30
32
|
|
|
31
33
|
const Divider = ({ text }) => (jsxs("div", Object.assign({ className: 'divider' }, { children: [jsx("div", { className: 'divider__dash' }), jsx(Typography, Object.assign({ className: 'divider__text', variant: 'body_small', color: 'secondary' }, { children: text })), jsx("div", { className: 'divider__dash' })] })));
|
|
32
34
|
|
|
@@ -32,6 +32,8 @@ require('../../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
|
32
32
|
require('../../../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
33
33
|
var IconButton = require('../../../IconButton/IconButton.cjs');
|
|
34
34
|
require('../../../Alert/Alert.cjs');
|
|
35
|
+
require('../../../Popper/Popper/Popper.cjs');
|
|
36
|
+
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
35
37
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
36
38
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
37
39
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -28,6 +28,8 @@ import '../../../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
28
28
|
import '../../../Transition/OpacityTransition/OpacityTransition.js';
|
|
29
29
|
import { IconButton } from '../../../IconButton/IconButton.js';
|
|
30
30
|
import '../../../Alert/Alert.js';
|
|
31
|
+
import '../../../Popper/Popper/Popper.js';
|
|
32
|
+
import '../../../Popper/PopperContext/PopperContext.js';
|
|
31
33
|
import '../../../../context/MockContext/MockContext.js';
|
|
32
34
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
33
35
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -34,6 +34,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
34
34
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
35
35
|
require('../../../IconButton/IconButton.cjs');
|
|
36
36
|
require('../../../Alert/Alert.cjs');
|
|
37
|
+
require('../../../Popper/Popper/Popper.cjs');
|
|
38
|
+
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
37
39
|
var NetworkControlSkeleton = require('../NetworkControlSkeleton/NetworkControlSkeleton.cjs');
|
|
38
40
|
var UnsupportedNetwork = require('../UnsupportedNetwork/UnsupportedNetwork.cjs');
|
|
39
41
|
|
|
@@ -30,6 +30,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
30
30
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
31
31
|
import '../../../IconButton/IconButton.js';
|
|
32
32
|
import '../../../Alert/Alert.js';
|
|
33
|
+
import '../../../Popper/Popper/Popper.js';
|
|
34
|
+
import '../../../Popper/PopperContext/PopperContext.js';
|
|
33
35
|
import { NetworkControlSkeleton } from '../NetworkControlSkeleton/NetworkControlSkeleton.js';
|
|
34
36
|
import { UnsupportedNetwork } from '../UnsupportedNetwork/UnsupportedNetwork.js';
|
|
35
37
|
|
|
@@ -35,6 +35,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
35
35
|
require('../../../IconButton/IconButton.cjs');
|
|
36
36
|
require('../../../Alert/Alert.cjs');
|
|
37
37
|
var Spinner = require('../../../IconWithSpinner/Spinner/Spinner.cjs');
|
|
38
|
+
require('../../../Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
|
|
39
41
|
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, }) => (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('network', className) }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'network__title-container' }, { children: [iconUrl ? (jsxRuntime.jsx("img", { src: iconUrl, className: 'network__title-icon', alt: `${networkName} icon` })) : (jsxRuntime.jsx(error.ReactComponent, {})), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary', className: 'network__title-copy', as: 'span', weight: 'medium' }, { children: networkName }))] })), jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('network__status-container', {
|
|
40
42
|
'network__status-container--active': isActive,
|
|
@@ -31,6 +31,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
31
31
|
import '../../../IconButton/IconButton.js';
|
|
32
32
|
import '../../../Alert/Alert.js';
|
|
33
33
|
import { Spinner } from '../../../IconWithSpinner/Spinner/Spinner.js';
|
|
34
|
+
import '../../../Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../Popper/PopperContext/PopperContext.js';
|
|
34
36
|
|
|
35
37
|
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, }) => (jsxs("div", Object.assign({ className: classNames('network', className) }, { children: [jsxs("div", Object.assign({ className: 'network__title-container' }, { children: [iconUrl ? (jsx("img", { src: iconUrl, className: 'network__title-icon', alt: `${networkName} icon` })) : (jsx(SvgError, {})), jsx(Typography, Object.assign({ variant: 'button_primary', className: 'network__title-copy', as: 'span', weight: 'medium' }, { children: networkName }))] })), jsxs("div", Object.assign({ className: classNames('network__status-container', {
|
|
36
38
|
'network__status-container--active': isActive,
|
|
@@ -35,6 +35,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
35
35
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
36
36
|
require('../../../IconButton/IconButton.cjs');
|
|
37
37
|
require('../../../Alert/Alert.cjs');
|
|
38
|
+
require('../../../Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
var capitalize = require('../../../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
39
41
|
|
|
40
42
|
const NonNetworkSwitchingSupportedControl = ({ walletConnector, className, showNetworkName = false, }) => {
|
|
@@ -31,6 +31,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
31
31
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
32
32
|
import '../../../IconButton/IconButton.js';
|
|
33
33
|
import '../../../Alert/Alert.js';
|
|
34
|
+
import '../../../Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../Popper/PopperContext/PopperContext.js';
|
|
34
36
|
import { capitalize } from '../../../../shared/utils/functions/capitalize/capitalize.js';
|
|
35
37
|
|
|
36
38
|
const NonNetworkSwitchingSupportedControl = ({ walletConnector, className, showNetworkName = false, }) => {
|
|
@@ -42,6 +42,8 @@ var TosAndPp = require('../TosAndPp/TosAndPp.cjs');
|
|
|
42
42
|
var PinField = require('../PinField/PinField.cjs');
|
|
43
43
|
var IconWithStatus = require('../IconWithStatus/IconWithStatus.cjs');
|
|
44
44
|
var ModalHeaderBanner = require('../ModalHeaderBanner/ModalHeaderBanner.cjs');
|
|
45
|
+
require('../Popper/Popper/Popper.cjs');
|
|
46
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
45
47
|
|
|
46
48
|
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, termsOfServiceUrl, privacyPolicyUrl, onPinChange, displayPoweredByDynamic = false, }) => {
|
|
47
49
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
|
|
@@ -38,6 +38,8 @@ import { TosAndPp } from '../TosAndPp/TosAndPp.js';
|
|
|
38
38
|
import { PinField } from '../PinField/PinField.js';
|
|
39
39
|
import { IconWithStatus } from '../IconWithStatus/IconWithStatus.js';
|
|
40
40
|
import { ModalHeaderBanner } from '../ModalHeaderBanner/ModalHeaderBanner.js';
|
|
41
|
+
import '../Popper/Popper/Popper.js';
|
|
42
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
41
43
|
|
|
42
44
|
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, termsOfServiceUrl, privacyPolicyUrl, onPinChange, displayPoweredByDynamic = false, }) => {
|
|
43
45
|
const backButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
|
|
@@ -28,6 +28,8 @@ require('../../context/ThemeContext/ThemeContext.cjs');
|
|
|
28
28
|
require('react-focus-lock');
|
|
29
29
|
require('../IconButton/IconButton.cjs');
|
|
30
30
|
require('../Alert/Alert.cjs');
|
|
31
|
+
require('../Popper/Popper/Popper.cjs');
|
|
32
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
31
33
|
require('../../context/MockContext/MockContext.cjs');
|
|
32
34
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
33
35
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -24,6 +24,8 @@ import '../../context/ThemeContext/ThemeContext.js';
|
|
|
24
24
|
import 'react-focus-lock';
|
|
25
25
|
import '../IconButton/IconButton.js';
|
|
26
26
|
import '../Alert/Alert.js';
|
|
27
|
+
import '../Popper/Popper/Popper.js';
|
|
28
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
27
29
|
import '../../context/MockContext/MockContext.js';
|
|
28
30
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
29
31
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
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 PopperContext = require('../PopperContext/PopperContext.cjs');
|
|
9
|
+
var getChildPosition = require('../utils/getChildPosition/getChildPosition.cjs');
|
|
10
|
+
var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs');
|
|
11
|
+
var PopperContent = require('../PopperContent/PopperContent.cjs');
|
|
12
|
+
|
|
13
|
+
const Popper = React.forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, }, ref) => {
|
|
14
|
+
const { containerRef } = PopperContext.usePopper();
|
|
15
|
+
const [anchorPosition, setAnchorPosition] = React.useState();
|
|
16
|
+
const container = containerRef.current;
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (!isOpen) {
|
|
19
|
+
return setAnchorPosition(undefined);
|
|
20
|
+
}
|
|
21
|
+
const container = containerRef.current;
|
|
22
|
+
const anchor = anchorRef.current;
|
|
23
|
+
if (!container || !anchor)
|
|
24
|
+
return;
|
|
25
|
+
setAnchorPosition(getChildPosition.getChildPosition(container, anchor));
|
|
26
|
+
return watchToScrollInHierarchy.watchToScrollInHierarchy(container, anchor, () => {
|
|
27
|
+
setIsOpen(false);
|
|
28
|
+
});
|
|
29
|
+
}, [anchorRef, containerRef, isOpen, setAnchorPosition, setIsOpen]);
|
|
30
|
+
const anchorOriginPosition = React.useMemo(() => {
|
|
31
|
+
var _a;
|
|
32
|
+
const anchorRect = (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
33
|
+
if (!anchorPosition || !anchorRect)
|
|
34
|
+
return;
|
|
35
|
+
switch (anchorOrigin) {
|
|
36
|
+
case 'top-left':
|
|
37
|
+
return anchorPosition;
|
|
38
|
+
case 'top-right':
|
|
39
|
+
return Object.assign(Object.assign({}, anchorPosition), { left: anchorPosition.left + anchorRect.width });
|
|
40
|
+
case 'bottom-left':
|
|
41
|
+
return Object.assign(Object.assign({}, anchorPosition), { top: anchorPosition.top + anchorRect.height });
|
|
42
|
+
case 'bottom-right':
|
|
43
|
+
return Object.assign(Object.assign({}, anchorPosition), { left: anchorPosition.left + anchorRect.width, top: anchorPosition.top + anchorRect.height });
|
|
44
|
+
default:
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
}, [anchorPosition, anchorRef, anchorOrigin]);
|
|
48
|
+
if (!isOpen || !anchorOriginPosition || container === null)
|
|
49
|
+
return null;
|
|
50
|
+
return reactDom.createPortal(jsxRuntime.jsx(PopperContent.PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: anchorOriginPosition }, { children: children })), container);
|
|
51
|
+
});
|
|
52
|
+
Popper.displayName = 'Popper';
|
|
53
|
+
|
|
54
|
+
exports.Popper = Popper;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { AnchorOrigin, TransformOrigin } from '../Popper.types';
|
|
3
|
+
export type PopperProps = {
|
|
4
|
+
anchorOrigin?: AnchorOrigin;
|
|
5
|
+
anchorRef: MutableRefObject<HTMLElement | null>;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
8
|
+
transformOrigin?: TransformOrigin;
|
|
9
|
+
};
|
|
10
|
+
export declare const Popper: import("react").ForwardRefExoticComponent<PopperProps & {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useState, useEffect, useMemo } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import { usePopper } from '../PopperContext/PopperContext.js';
|
|
5
|
+
import { getChildPosition } from '../utils/getChildPosition/getChildPosition.js';
|
|
6
|
+
import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js';
|
|
7
|
+
import { PopperContent } from '../PopperContent/PopperContent.js';
|
|
8
|
+
|
|
9
|
+
const Popper = forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, }, ref) => {
|
|
10
|
+
const { containerRef } = usePopper();
|
|
11
|
+
const [anchorPosition, setAnchorPosition] = useState();
|
|
12
|
+
const container = containerRef.current;
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (!isOpen) {
|
|
15
|
+
return setAnchorPosition(undefined);
|
|
16
|
+
}
|
|
17
|
+
const container = containerRef.current;
|
|
18
|
+
const anchor = anchorRef.current;
|
|
19
|
+
if (!container || !anchor)
|
|
20
|
+
return;
|
|
21
|
+
setAnchorPosition(getChildPosition(container, anchor));
|
|
22
|
+
return watchToScrollInHierarchy(container, anchor, () => {
|
|
23
|
+
setIsOpen(false);
|
|
24
|
+
});
|
|
25
|
+
}, [anchorRef, containerRef, isOpen, setAnchorPosition, setIsOpen]);
|
|
26
|
+
const anchorOriginPosition = useMemo(() => {
|
|
27
|
+
var _a;
|
|
28
|
+
const anchorRect = (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
29
|
+
if (!anchorPosition || !anchorRect)
|
|
30
|
+
return;
|
|
31
|
+
switch (anchorOrigin) {
|
|
32
|
+
case 'top-left':
|
|
33
|
+
return anchorPosition;
|
|
34
|
+
case 'top-right':
|
|
35
|
+
return Object.assign(Object.assign({}, anchorPosition), { left: anchorPosition.left + anchorRect.width });
|
|
36
|
+
case 'bottom-left':
|
|
37
|
+
return Object.assign(Object.assign({}, anchorPosition), { top: anchorPosition.top + anchorRect.height });
|
|
38
|
+
case 'bottom-right':
|
|
39
|
+
return Object.assign(Object.assign({}, anchorPosition), { left: anchorPosition.left + anchorRect.width, top: anchorPosition.top + anchorRect.height });
|
|
40
|
+
default:
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
}, [anchorPosition, anchorRef, anchorOrigin]);
|
|
44
|
+
if (!isOpen || !anchorOriginPosition || container === null)
|
|
45
|
+
return null;
|
|
46
|
+
return createPortal(jsx(PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: anchorOriginPosition }, { children: children })), container);
|
|
47
|
+
});
|
|
48
|
+
Popper.displayName = 'Popper';
|
|
49
|
+
|
|
50
|
+
export { Popper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popper } from './Popper';
|
|
@@ -0,0 +1,18 @@
|
|
|
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 classNames = require('../../../utils/functions/classNames/classNames.cjs');
|
|
8
|
+
|
|
9
|
+
const mapTransformOriginToClassName = {
|
|
10
|
+
'bottom-left': 'popper-content__transform-origin-bottom-left',
|
|
11
|
+
'bottom-right': 'popper-content__transform-origin-bottom-right',
|
|
12
|
+
'top-left': 'popper-content__transform-origin-top-left',
|
|
13
|
+
'top-right': 'popper-content__transform-origin-top-right',
|
|
14
|
+
};
|
|
15
|
+
const PopperContent = React.forwardRef(({ children, transformOrigin, style }, ref) => (jsxRuntime.jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames.classNames('popper-content', mapTransformOriginToClassName[transformOrigin]), style: style }, { children: children }))));
|
|
16
|
+
PopperContent.displayName = 'PopperContent';
|
|
17
|
+
|
|
18
|
+
exports.PopperContent = PopperContent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TransformOrigin } from '../Popper.types';
|
|
3
|
+
export type PopperContentProps = {
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
transformOrigin: TransformOrigin;
|
|
6
|
+
};
|
|
7
|
+
export declare const PopperContent: import("react").ForwardRefExoticComponent<PopperContentProps & {
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { classNames } from '../../../utils/functions/classNames/classNames.js';
|
|
4
|
+
|
|
5
|
+
const mapTransformOriginToClassName = {
|
|
6
|
+
'bottom-left': 'popper-content__transform-origin-bottom-left',
|
|
7
|
+
'bottom-right': 'popper-content__transform-origin-bottom-right',
|
|
8
|
+
'top-left': 'popper-content__transform-origin-top-left',
|
|
9
|
+
'top-right': 'popper-content__transform-origin-top-right',
|
|
10
|
+
};
|
|
11
|
+
const PopperContent = forwardRef(({ children, transformOrigin, style }, ref) => (jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames('popper-content', mapTransformOriginToClassName[transformOrigin]), style: style }, { children: children }))));
|
|
12
|
+
PopperContent.displayName = 'PopperContent';
|
|
13
|
+
|
|
14
|
+
export { PopperContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PopperContent } from './PopperContent';
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
|
|
8
|
+
const popperContext = React.createContext(undefined);
|
|
9
|
+
const PopperProvider = ({ children }) => {
|
|
10
|
+
const { Provider } = popperContext;
|
|
11
|
+
const containerRef = React.useRef(null);
|
|
12
|
+
return (jsxRuntime.jsx(Provider, Object.assign({ value: {
|
|
13
|
+
containerRef,
|
|
14
|
+
} }, { children: jsxRuntime.jsx("div", Object.assign({ ref: containerRef, style: { position: 'relative' } }, { children: children })) })));
|
|
15
|
+
};
|
|
16
|
+
const usePopper = () => {
|
|
17
|
+
const context = React.useContext(popperContext);
|
|
18
|
+
if (!context) {
|
|
19
|
+
throw new Error('To use popper, use the PopperProvider above in the dom hierarchy');
|
|
20
|
+
}
|
|
21
|
+
return context;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.PopperProvider = PopperProvider;
|
|
25
|
+
exports.popperContext = popperContext;
|
|
26
|
+
exports.usePopper = usePopper;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, MutableRefObject, PropsWithChildren } from 'react';
|
|
2
|
+
type PopperContext = {
|
|
3
|
+
containerRef: MutableRefObject<HTMLDivElement | null>;
|
|
4
|
+
};
|
|
5
|
+
export declare const popperContext: import("react").Context<PopperContext | undefined>;
|
|
6
|
+
export declare const PopperProvider: FC<PropsWithChildren>;
|
|
7
|
+
export declare const usePopper: () => PopperContext;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useContext, useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
const popperContext = createContext(undefined);
|
|
5
|
+
const PopperProvider = ({ children }) => {
|
|
6
|
+
const { Provider } = popperContext;
|
|
7
|
+
const containerRef = useRef(null);
|
|
8
|
+
return (jsx(Provider, Object.assign({ value: {
|
|
9
|
+
containerRef,
|
|
10
|
+
} }, { children: jsx("div", Object.assign({ ref: containerRef, style: { position: 'relative' } }, { children: children })) })));
|
|
11
|
+
};
|
|
12
|
+
const usePopper = () => {
|
|
13
|
+
const context = useContext(popperContext);
|
|
14
|
+
if (!context) {
|
|
15
|
+
throw new Error('To use popper, use the PopperProvider above in the dom hierarchy');
|
|
16
|
+
}
|
|
17
|
+
return context;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { PopperProvider, popperContext, usePopper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PopperProvider, usePopper } from './PopperContext';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const getChildPosition = (root, element) => {
|
|
6
|
+
const rootRect = root.getBoundingClientRect();
|
|
7
|
+
const elementRect = element.getBoundingClientRect();
|
|
8
|
+
return {
|
|
9
|
+
left: elementRect.x - rootRect.x,
|
|
10
|
+
top: elementRect.y - rootRect.y,
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.getChildPosition = getChildPosition;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const getChildPosition = (root, element) => {
|
|
2
|
+
const rootRect = root.getBoundingClientRect();
|
|
3
|
+
const elementRect = element.getBoundingClientRect();
|
|
4
|
+
return {
|
|
5
|
+
left: elementRect.x - rootRect.x,
|
|
6
|
+
top: elementRect.y - rootRect.y,
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { getChildPosition };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getChildPosition } from './getChildPosition';
|