@dynamic-labs/sdk-react-core 0.18.0-RC.6 → 0.18.0-RC.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +8 -8
  5. package/src/index.cjs +4 -0
  6. package/src/index.js +2 -0
  7. package/src/lib/Main.cjs +2 -2
  8. package/src/lib/Main.js +2 -2
  9. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +5 -3
  10. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +6 -4
  11. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.types.d.ts +1 -0
  12. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -5
  13. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +1 -9
  14. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -4
  15. package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +11 -0
  16. package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +9 -0
  17. package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +7 -0
  18. package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +1 -1
  19. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -3
  20. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
  21. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -3
  22. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +2 -1
  23. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +2 -1
  24. package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
  25. package/src/lib/components/Tooltip/Tooltip.js +1 -1
  26. package/src/lib/components/TosAndPp/TosAndPp.cjs +6 -5
  27. package/src/lib/components/TosAndPp/TosAndPp.d.ts +3 -4
  28. package/src/lib/components/TosAndPp/TosAndPp.js +6 -5
  29. package/src/lib/context/DynamicContext/DynamicContext.cjs +8 -14
  30. package/src/lib/context/DynamicContext/DynamicContext.js +9 -15
  31. package/src/lib/context/DynamicContext/helpers.cjs +1 -2
  32. package/src/lib/context/DynamicContext/helpers.js +1 -2
  33. package/src/lib/context/MockContext/MockContext.cjs +2 -14
  34. package/src/lib/context/MockContext/MockContext.js +2 -14
  35. package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
  36. package/src/lib/context/WalletContext/WalletContext.cjs +46 -0
  37. package/src/lib/context/WalletContext/WalletContext.d.ts +7 -0
  38. package/src/lib/context/WalletContext/WalletContext.js +41 -0
  39. package/src/lib/context/WalletContext/index.d.ts +1 -0
  40. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +22 -63
  41. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.d.ts +1 -6
  42. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +23 -64
  43. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +34 -15
  44. package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +1 -1
  45. package/src/lib/layout/DynamicAuthLayout/Header/header.js +35 -16
  46. package/src/lib/layout/DynamicAuthLayout/Header/header.types.d.ts +2 -0
  47. package/src/lib/layout/DynamicAuthLayout/{FooterContent/EmptyFooterContent/empty-footer-content.cjs → HelpContent/EmptyHelpContent/EmptyHelpContent.cjs} +2 -2
  48. package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.d.ts +2 -0
  49. package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.js +6 -0
  50. package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/index.d.ts +1 -0
  51. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +36 -0
  52. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.d.ts +2 -0
  53. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +32 -0
  54. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +56 -0
  55. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.d.ts +2 -0
  56. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +52 -0
  57. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/index.d.ts +1 -0
  58. package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.cjs → HelpContent/WalletListHelpContent/WalletListHelpContent.cjs} +3 -3
  59. package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.d.ts → HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts} +1 -1
  60. package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.js → HelpContent/WalletListHelpContent/WalletListHelpContent.js} +3 -3
  61. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/index.d.ts +1 -0
  62. package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.cjs +3 -5
  63. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +7 -0
  64. package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.js +3 -5
  65. package/src/lib/layout/DynamicAuthLayout/HelpContent/index.d.ts +4 -0
  66. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +49 -0
  67. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.d.ts +2 -0
  68. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +45 -0
  69. package/src/lib/layout/DynamicAuthLayout/ToSFooter/index.d.ts +1 -0
  70. package/src/lib/shared/assets/chevron-left.cjs +5 -5
  71. package/src/lib/shared/assets/chevron-left.js +5 -5
  72. package/src/lib/shared/assets/close.cjs +5 -5
  73. package/src/lib/shared/assets/close.js +5 -5
  74. package/src/lib/shared/assets/footer-info-icon.cjs +2 -2
  75. package/src/lib/shared/assets/footer-info-icon.js +2 -2
  76. package/src/lib/shared/assets/index.d.ts +1 -0
  77. package/src/lib/shared/assets/question-mark.cjs +58 -0
  78. package/src/lib/shared/assets/question-mark.js +34 -0
  79. package/src/lib/styles/index.shadow.cjs +1 -1
  80. package/src/lib/styles/index.shadow.js +1 -1
  81. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +7 -27
  82. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.d.ts +3 -4
  83. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +8 -28
  84. package/src/lib/utils/hooks/index.d.ts +3 -0
  85. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +9 -1
  86. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +9 -1
  87. package/src/lib/utils/hooks/useAuthLayoutChecks/index.d.ts +1 -0
  88. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +68 -0
  89. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +10 -0
  90. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +64 -0
  91. package/src/lib/utils/hooks/useInterval/useInterval.d.ts +1 -0
  92. package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +2 -0
  93. package/src/lib/utils/hooks/useTimeout/useTimeout.d.ts +1 -0
  94. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -1
  95. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +2 -1
  96. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -3
  97. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -3
  98. package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -3
  99. package/src/lib/views/EmailVerification/EmailVerification.js +2 -3
  100. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -2
  101. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -2
  102. package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +3 -0
  103. package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +3 -0
  104. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -3
  105. package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -3
  106. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -3
  107. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -3
  108. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -2
  109. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +1 -3
  110. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -2
  111. package/src/lib/views/QrCodeView/QrCodeView.cjs +2 -2
  112. package/src/lib/views/QrCodeView/QrCodeView.js +2 -2
  113. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -4
  114. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -4
  115. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +63 -0
  116. package/src/lib/views/WalletLockedView/WalletLockedView.d.ts +2 -0
  117. package/src/lib/views/WalletLockedView/WalletLockedView.js +59 -0
  118. package/src/lib/views/WalletLockedView/index.d.ts +1 -0
  119. package/src/lib/views/viewToComponentMap.cjs +2 -0
  120. package/src/lib/views/viewToComponentMap.js +2 -0
  121. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +2 -2
  122. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +2 -2
  123. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.cjs +23 -0
  124. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.d.ts +8 -0
  125. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.js +19 -0
  126. package/src/lib/widgets/DynamicBridgeWidget/index.d.ts +1 -0
  127. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +0 -67
  128. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.d.ts +0 -10
  129. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +0 -63
  130. package/src/lib/layout/DynamicAuthLayout/Footer/index.d.ts +0 -1
  131. package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.d.ts +0 -2
  132. package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.js +0 -6
  133. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/index.d.ts +0 -1
  134. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +0 -8
  135. package/src/lib/layout/DynamicAuthLayout/FooterContent/index.d.ts +0 -3
  136. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.cjs +0 -0
  137. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.d.ts +0 -0
  138. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.js +0 -0
  139. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/index.d.ts +0 -0
  140. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +0 -0
  141. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +0 -0
  142. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.js +0 -0
  143. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/index.d.ts +0 -0
  144. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +0 -0
  145. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.d.ts +0 -0
  146. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +0 -0
  147. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/index.d.ts +0 -0
  148. /package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/index.d.ts +0 -0
@@ -48,10 +48,10 @@ require('../../../components/Popper/PopperContext/PopperContext.cjs');
48
48
  require('formik');
49
49
  require('yup');
50
50
 
51
- const QrCodeContainer = ({ accentColor, walletName, qrcodeValue, Icon: WalletIcon, privacyPolicyUrl, termsOfServiceUrl, showCopyToClipboardButton = false, desktopUri, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'qrcode-container__container' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'qrcode-container__top' }, { children: [qrcodeValue ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletName: walletConnectorCore.normalizeWalletName(walletName) })) : (
51
+ const QrCodeContainer = ({ accentColor, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'qrcode-container__container' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'qrcode-container__top' }, { children: [qrcodeValue ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletName: walletConnectorCore.normalizeWalletName(walletName) })) : (
52
52
  // this div exists to give the parent a child, so that the parent
53
53
  // takes on its given width and height. the result is stable
54
54
  // rendering of this component, without this there is a brief flash
55
- jsxRuntime.jsx("div", {})), jsxRuntime.jsx(MockedQrCode.MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxRuntime.jsxs("div", Object.assign({ className: 'button-container' }, { children: [showCopyToClipboardButton && qrcodeValue && (jsxRuntime.jsx(CopyButton.CopyButton, Object.assign({ textToCopy: qrcodeValue }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'button__content' }, { children: [jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small', color: 'text-tertiary' }, { children: jsxRuntime.jsx(link.ReactComponent, {}) })), "Copy QR URI"] })) }))), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, Object.assign({ className: 'desktop-button', onClick: () => window.open(desktopUri) }, { children: [jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'xsmall', color: 'text-tertiary' }, { children: jsxRuntime.jsx(externalLink.ReactComponent, {}) })), "Open ", walletName, " App"] })))] })))] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary' }, { children: "Connect to your wallet" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content' }, { children: "Scan this QR code from your mobile wallet or phone's camera to connect." })), termsOfServiceUrl && privacyPolicyUrl && (jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary', className: 'qrcode-container__tos' }, { children: ["By connecting, you agree to our\u00A0", jsxRuntime.jsx("a", Object.assign({ className: 'tos__link', href: termsOfServiceUrl, target: '_blank', rel: 'noreferrer' }, { children: "Terms of Services" })), "\u00A0&\u00A0", jsxRuntime.jsx("a", Object.assign({ className: 'tos__link', href: privacyPolicyUrl, target: '_blank', rel: 'noreferrer' }, { children: "Privacy Policy" })), "."] })))] })));
55
+ jsxRuntime.jsx("div", {})), jsxRuntime.jsx(MockedQrCode.MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxRuntime.jsxs("div", Object.assign({ className: 'button-container' }, { children: [showCopyToClipboardButton && qrcodeValue && (jsxRuntime.jsx(CopyButton.CopyButton, Object.assign({ textToCopy: qrcodeValue }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'button__content' }, { children: [jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small', color: 'text-tertiary' }, { children: jsxRuntime.jsx(link.ReactComponent, {}) })), "Copy QR URI"] })) }))), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, Object.assign({ className: 'desktop-button', onClick: () => window.open(desktopUri) }, { children: [jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'xsmall', color: 'text-tertiary' }, { children: jsxRuntime.jsx(externalLink.ReactComponent, {}) })), "Open ", walletName, " App"] })))] })))] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary' }, { children: "Connect to your wallet" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content' }, { children: "Scan this QR code from your mobile wallet or phone's camera to connect." }))] })));
56
56
 
57
57
  exports.QrCodeContainer = QrCodeContainer;
@@ -3,11 +3,9 @@ type QrCodeContainerProps = {
3
3
  Icon: ReactElement;
4
4
  accentColor: string;
5
5
  desktopUri?: string;
6
- privacyPolicyUrl: string | undefined;
7
6
  qrcodeValue: string;
8
7
  showCopyToClipboardButton?: boolean;
9
- termsOfServiceUrl: string | undefined;
10
8
  walletName: string;
11
9
  };
12
- export declare const QrCodeContainer: ({ accentColor, walletName, qrcodeValue, Icon: WalletIcon, privacyPolicyUrl, termsOfServiceUrl, showCopyToClipboardButton, desktopUri, }: QrCodeContainerProps) => JSX.Element;
10
+ export declare const QrCodeContainer: ({ accentColor, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton, desktopUri, }: QrCodeContainerProps) => JSX.Element;
13
11
  export {};
@@ -44,10 +44,10 @@ import '../../../components/Popper/PopperContext/PopperContext.js';
44
44
  import 'formik';
45
45
  import 'yup';
46
46
 
47
- const QrCodeContainer = ({ accentColor, walletName, qrcodeValue, Icon: WalletIcon, privacyPolicyUrl, termsOfServiceUrl, showCopyToClipboardButton = false, desktopUri, }) => (jsxs("div", Object.assign({ className: 'qrcode-container__container' }, { children: [jsxs("div", Object.assign({ className: 'qrcode-container__top' }, { children: [qrcodeValue ? (jsx(QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletName: normalizeWalletName(walletName) })) : (
47
+ const QrCodeContainer = ({ accentColor, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, }) => (jsxs("div", Object.assign({ className: 'qrcode-container__container' }, { children: [jsxs("div", Object.assign({ className: 'qrcode-container__top' }, { children: [qrcodeValue ? (jsx(QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletName: normalizeWalletName(walletName) })) : (
48
48
  // this div exists to give the parent a child, so that the parent
49
49
  // takes on its given width and height. the result is stable
50
50
  // rendering of this component, without this there is a brief flash
51
- jsx("div", {})), jsx(MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxs("div", Object.assign({ className: 'button-container' }, { children: [showCopyToClipboardButton && qrcodeValue && (jsx(CopyButton, Object.assign({ textToCopy: qrcodeValue }, { children: jsxs("div", Object.assign({ className: 'button__content' }, { children: [jsx(Icon, Object.assign({ size: 'small', color: 'text-tertiary' }, { children: jsx(SvgLink, {}) })), "Copy QR URI"] })) }))), desktopUri && (jsxs(TextButton, Object.assign({ className: 'desktop-button', onClick: () => window.open(desktopUri) }, { children: [jsx(Icon, Object.assign({ size: 'xsmall', color: 'text-tertiary' }, { children: jsx(SvgExternalLink, {}) })), "Open ", walletName, " App"] })))] })))] })), jsx(Typography, Object.assign({ variant: 'title', color: 'primary' }, { children: "Connect to your wallet" })), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content' }, { children: "Scan this QR code from your mobile wallet or phone's camera to connect." })), termsOfServiceUrl && privacyPolicyUrl && (jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary', className: 'qrcode-container__tos' }, { children: ["By connecting, you agree to our\u00A0", jsx("a", Object.assign({ className: 'tos__link', href: termsOfServiceUrl, target: '_blank', rel: 'noreferrer' }, { children: "Terms of Services" })), "\u00A0&\u00A0", jsx("a", Object.assign({ className: 'tos__link', href: privacyPolicyUrl, target: '_blank', rel: 'noreferrer' }, { children: "Privacy Policy" })), "."] })))] })));
51
+ jsx("div", {})), jsx(MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxs("div", Object.assign({ className: 'button-container' }, { children: [showCopyToClipboardButton && qrcodeValue && (jsx(CopyButton, Object.assign({ textToCopy: qrcodeValue }, { children: jsxs("div", Object.assign({ className: 'button__content' }, { children: [jsx(Icon, Object.assign({ size: 'small', color: 'text-tertiary' }, { children: jsx(SvgLink, {}) })), "Copy QR URI"] })) }))), desktopUri && (jsxs(TextButton, Object.assign({ className: 'desktop-button', onClick: () => window.open(desktopUri) }, { children: [jsx(Icon, Object.assign({ size: 'xsmall', color: 'text-tertiary' }, { children: jsx(SvgExternalLink, {}) })), "Open ", walletName, " App"] })))] })))] })), jsx(Typography, Object.assign({ variant: 'title', color: 'primary' }, { children: "Connect to your wallet" })), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content' }, { children: "Scan this QR code from your mobile wallet or phone's camera to connect." }))] })));
52
52
 
53
53
  export { QrCodeContainer };
@@ -49,7 +49,7 @@ const QrCodeView = () => {
49
49
  const { theme: { theme }, } = ThemeContext.useThemeContext();
50
50
  const { name } = theme;
51
51
  const { setShowQrCodeMessage } = QrCodeContext.useQrCodeContext();
52
- const { qrcodeUri, desktopUri, selectedWalletConnector: walletConnector, termsOfServiceUrl, privacyPolicyUrl, } = useInternalDynamicContext.useInternalDynamicContext();
52
+ const { qrcodeUri, desktopUri, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
53
53
  const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
54
54
  React.useEffect(() => {
55
55
  setTimeout(() => {
@@ -64,7 +64,7 @@ const QrCodeView = () => {
64
64
  /* istanbul ignore next */
65
65
  name === 'dark'
66
66
  ? theme.colors.textPrimary
67
- : (_a = walletBook.getWalletPrimaryColor(walletBook$1, walletConnector.name)) !== null && _a !== void 0 ? _a : '', walletName: walletConnector.name, qrcodeValue: qrcodeUri, Icon: icon, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl, showCopyToClipboardButton: walletConnector.isWalletConnect }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'qr-code-view__powered-by' })] })));
67
+ : (_a = walletBook.getWalletPrimaryColor(walletBook$1, walletConnector.name)) !== null && _a !== void 0 ? _a : '', walletName: walletConnector.name, qrcodeValue: qrcodeUri, Icon: icon, showCopyToClipboardButton: walletConnector.isWalletConnect }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'qr-code-view__powered-by' })] })));
68
68
  };
69
69
 
70
70
  exports.QrCodeView = QrCodeView;
@@ -45,7 +45,7 @@ const QrCodeView = () => {
45
45
  const { theme: { theme }, } = useThemeContext();
46
46
  const { name } = theme;
47
47
  const { setShowQrCodeMessage } = useQrCodeContext();
48
- const { qrcodeUri, desktopUri, selectedWalletConnector: walletConnector, termsOfServiceUrl, privacyPolicyUrl, } = useInternalDynamicContext();
48
+ const { qrcodeUri, desktopUri, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
49
49
  const { walletBook } = useWalletBookContext();
50
50
  useEffect(() => {
51
51
  setTimeout(() => {
@@ -60,7 +60,7 @@ const QrCodeView = () => {
60
60
  /* istanbul ignore next */
61
61
  name === 'dark'
62
62
  ? theme.colors.textPrimary
63
- : (_a = getWalletPrimaryColor(walletBook, walletConnector.name)) !== null && _a !== void 0 ? _a : '', walletName: walletConnector.name, qrcodeValue: qrcodeUri, Icon: icon, privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl, showCopyToClipboardButton: walletConnector.isWalletConnect }), jsx(PoweredByDynamic, { classNameRoot: 'qr-code-view__powered-by' })] })));
63
+ : (_a = getWalletPrimaryColor(walletBook, walletConnector.name)) !== null && _a !== void 0 ? _a : '', walletName: walletConnector.name, qrcodeValue: qrcodeUri, Icon: icon, showCopyToClipboardButton: walletConnector.isWalletConnect }), jsx(PoweredByDynamic, { classNameRoot: 'qr-code-view__powered-by' })] })));
64
64
  };
65
65
 
66
66
  export { QrCodeView };
@@ -16,7 +16,7 @@ require('../../utils/constants/colors.cjs');
16
16
  require('../../shared/utils/classes/storage/localStorage.cjs');
17
17
  require('ethers');
18
18
  require('../../shared/consts/index.cjs');
19
- var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
19
+ require('../../context/DynamicContext/DynamicContext.cjs');
20
20
  require('@dynamic-labs/multi-wallet');
21
21
  require('../../components/ShadowDOM/ShadowDOM.cjs');
22
22
  require('../../context/ThemeContext/ThemeContext.cjs');
@@ -39,7 +39,6 @@ require('../../context/MockContext/MockContext.cjs');
39
39
  require('../../context/CaptchaContext/CaptchaContext.cjs');
40
40
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
41
41
  var useGetSocialIcon = require('../../utils/hooks/useGetSocialIcon/useGetSocialIcon.cjs');
42
- var TosAndPp = require('../../components/TosAndPp/TosAndPp.cjs');
43
42
  require('../../components/Popper/Popper/Popper.cjs');
44
43
  require('../../components/Popper/PopperContext/PopperContext.cjs');
45
44
  require('formik');
@@ -50,11 +49,10 @@ const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
50
49
  const SocialRedirectView = () => {
51
50
  const { socialProvider, socialWalletConnector } = SocialRedirectContext.useSocialRedirectContext();
52
51
  const getSocialIcon = useGetSocialIcon.useGetSocialIcon();
53
- const { termsOfServiceUrl, privacyPolicyUrl, isAuthenticated } = useInternalDynamicContext.useInternalDynamicContext();
54
52
  if (!socialWalletConnector || !socialProvider) {
55
53
  return null;
56
54
  }
57
- return (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('social-redirect-view__container') }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { iconSize: 64, Icon: getSocialIcon(socialProvider), isSpinning: true }), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: classNames.classNames('social-redirect-view__title') }, { children: ["Connecting to ", capitalize(socialProvider), "..."] })), jsxRuntime.jsx(TosAndPp.TosAndPp, { mode: isAuthenticated ? 'connecting' : 'logging in', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })] })));
55
+ return (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('social-redirect-view__container') }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { iconSize: 64, Icon: getSocialIcon(socialProvider), isSpinning: true }), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: classNames.classNames('social-redirect-view__title') }, { children: ["Connecting to ", capitalize(socialProvider), "..."] }))] })));
58
56
  };
59
57
 
60
58
  exports.SocialRedirectView = SocialRedirectView;
@@ -12,7 +12,7 @@ import '../../utils/constants/colors.js';
12
12
  import '../../shared/utils/classes/storage/localStorage.js';
13
13
  import 'ethers';
14
14
  import '../../shared/consts/index.js';
15
- import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
15
+ import '../../context/DynamicContext/DynamicContext.js';
16
16
  import '@dynamic-labs/multi-wallet';
17
17
  import '../../components/ShadowDOM/ShadowDOM.js';
18
18
  import '../../context/ThemeContext/ThemeContext.js';
@@ -35,7 +35,6 @@ import '../../context/MockContext/MockContext.js';
35
35
  import '../../context/CaptchaContext/CaptchaContext.js';
36
36
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
37
37
  import { useGetSocialIcon } from '../../utils/hooks/useGetSocialIcon/useGetSocialIcon.js';
38
- import { TosAndPp } from '../../components/TosAndPp/TosAndPp.js';
39
38
  import '../../components/Popper/Popper/Popper.js';
40
39
  import '../../components/Popper/PopperContext/PopperContext.js';
41
40
  import 'formik';
@@ -46,11 +45,10 @@ const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
46
45
  const SocialRedirectView = () => {
47
46
  const { socialProvider, socialWalletConnector } = useSocialRedirectContext();
48
47
  const getSocialIcon = useGetSocialIcon();
49
- const { termsOfServiceUrl, privacyPolicyUrl, isAuthenticated } = useInternalDynamicContext();
50
48
  if (!socialWalletConnector || !socialProvider) {
51
49
  return null;
52
50
  }
53
- return (jsxs("div", Object.assign({ className: classNames('social-redirect-view__container') }, { children: [jsx(IconWithSpinner, { iconSize: 64, Icon: getSocialIcon(socialProvider), isSpinning: true }), jsxs(Typography, Object.assign({ weight: 'medium', variant: 'title', className: classNames('social-redirect-view__title') }, { children: ["Connecting to ", capitalize(socialProvider), "..."] })), jsx(TosAndPp, { mode: isAuthenticated ? 'connecting' : 'logging in', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })] })));
51
+ return (jsxs("div", Object.assign({ className: classNames('social-redirect-view__container') }, { children: [jsx(IconWithSpinner, { iconSize: 64, Icon: getSocialIcon(socialProvider), isSpinning: true }), jsxs(Typography, Object.assign({ weight: 'medium', variant: 'title', className: classNames('social-redirect-view__title') }, { children: ["Connecting to ", capitalize(socialProvider), "..."] }))] })));
54
52
  };
55
53
 
56
54
  export { SocialRedirectView };
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var walletBook = require('@dynamic-labs/wallet-book');
7
+ require('react');
8
+ var Typography = require('../../components/Typography/Typography.cjs');
9
+ require('@dynamic-labs/sdk-api');
10
+ require('../../shared/logger.cjs');
11
+ require('@dynamic-labs/iconic');
12
+ require('@dynamic-labs/wallet-connector-core');
13
+ require('../../context/ViewContext/ViewContext.cjs');
14
+ require('@dynamic-labs/utils');
15
+ require('../../utils/constants/colors.cjs');
16
+ require('../../shared/utils/classes/storage/localStorage.cjs');
17
+ require('ethers');
18
+ require('../../shared/consts/index.cjs');
19
+ var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
20
+ require('@dynamic-labs/multi-wallet');
21
+ var pixelToRem = require('../../utils/functions/pixelToRem/pixelToRem.cjs');
22
+ require('../../components/ShadowDOM/ShadowDOM.cjs');
23
+ require('../../context/ThemeContext/ThemeContext.cjs');
24
+ require('react-dom');
25
+ require('react-focus-lock');
26
+ require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
27
+ require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
28
+ require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
29
+ require('../../config/ApiEndpoint.cjs');
30
+ require('@dynamic-labs/rpc-providers');
31
+ require('../../context/ErrorContext/ErrorContext.cjs');
32
+ require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
33
+ require('../../components/IconButton/IconButton.cjs');
34
+ var Button = require('../../components/Button/Button.cjs');
35
+ var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
36
+ require('../../components/Alert/Alert.cjs');
37
+ require('../../context/WalletGroupContext/WalletGroupContext.cjs');
38
+ require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
39
+ require('../../context/MockContext/MockContext.cjs');
40
+ require('../../context/CaptchaContext/CaptchaContext.cjs');
41
+ require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
42
+ var TextButton = require('../../components/TextButton/TextButton.cjs');
43
+ var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
44
+ require('../../components/Popper/Popper/Popper.cjs');
45
+ require('../../components/Popper/PopperContext/PopperContext.cjs');
46
+ require('formik');
47
+ require('yup');
48
+ var Divider = require('../../components/Divider/Divider.cjs');
49
+
50
+ const iconSize = 64;
51
+ const WalletLockedView = () => {
52
+ const { handleLogOut, primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
53
+ if (!primaryWallet) {
54
+ return null;
55
+ }
56
+ const icon = (jsxRuntime.jsx(walletBook.WalletIcon, { walletName: primaryWallet.connector.name, style: {
57
+ height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
58
+ width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
59
+ } }));
60
+ return (jsxRuntime.jsxs("div", Object.assign({ "data-testid": 'wallet-locked-view' }, { children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'wallet-locked-view__error-container' }, { children: "We cannot connect to your wallet" })), jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-locked-view__content' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title' }, { children: "Unlock your Wallet extension" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular' }, { children: "Your wallet extension is locked. To continue, open your extension and unlock your wallet." })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'wallet-locked-view__button-header' }, { children: "Once unlocked, click here" })), jsxRuntime.jsx(Button.Button, Object.assign({ buttonRounded: 'default', onClick: () => setShowAuthFlow(false), buttonClassName: 'wallet-locked-view__button' }, { children: "I unlocked the wallet" })), jsxRuntime.jsx(Divider.Divider, { text: 'Or' }), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'wallet-locked-view__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))] }))] })));
61
+ };
62
+
63
+ exports.WalletLockedView = WalletLockedView;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const WalletLockedView: () => JSX.Element | null;
@@ -0,0 +1,59 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { WalletIcon } from '@dynamic-labs/wallet-book';
3
+ import 'react';
4
+ import { Typography } from '../../components/Typography/Typography.js';
5
+ import '@dynamic-labs/sdk-api';
6
+ import '../../shared/logger.js';
7
+ import '@dynamic-labs/iconic';
8
+ import '@dynamic-labs/wallet-connector-core';
9
+ import '../../context/ViewContext/ViewContext.js';
10
+ import '@dynamic-labs/utils';
11
+ import '../../utils/constants/colors.js';
12
+ import '../../shared/utils/classes/storage/localStorage.js';
13
+ import 'ethers';
14
+ import '../../shared/consts/index.js';
15
+ import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
16
+ import '@dynamic-labs/multi-wallet';
17
+ import { pixelToRem } from '../../utils/functions/pixelToRem/pixelToRem.js';
18
+ import '../../components/ShadowDOM/ShadowDOM.js';
19
+ import '../../context/ThemeContext/ThemeContext.js';
20
+ import 'react-dom';
21
+ import 'react-focus-lock';
22
+ import '../../components/Transition/ZoomTransition/ZoomTransition.js';
23
+ import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
24
+ import '../../components/Transition/OpacityTransition/OpacityTransition.js';
25
+ import '../../config/ApiEndpoint.js';
26
+ import '@dynamic-labs/rpc-providers';
27
+ import '../../context/ErrorContext/ErrorContext.js';
28
+ import '../../context/AccessDeniedContext/AccessDeniedContext.js';
29
+ import '../../components/IconButton/IconButton.js';
30
+ import { Button } from '../../components/Button/Button.js';
31
+ import { IconWithSpinner, iconRatio } from '../../components/IconWithSpinner/IconWithSpinner.js';
32
+ import '../../components/Alert/Alert.js';
33
+ import '../../context/WalletGroupContext/WalletGroupContext.js';
34
+ import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
35
+ import '../../context/MockContext/MockContext.js';
36
+ import '../../context/CaptchaContext/CaptchaContext.js';
37
+ import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
38
+ import { TextButton } from '../../components/TextButton/TextButton.js';
39
+ import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
40
+ import '../../components/Popper/Popper/Popper.js';
41
+ import '../../components/Popper/PopperContext/PopperContext.js';
42
+ import 'formik';
43
+ import 'yup';
44
+ import { Divider } from '../../components/Divider/Divider.js';
45
+
46
+ const iconSize = 64;
47
+ const WalletLockedView = () => {
48
+ const { handleLogOut, primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
49
+ if (!primaryWallet) {
50
+ return null;
51
+ }
52
+ const icon = (jsx(WalletIcon, { walletName: primaryWallet.connector.name, style: {
53
+ height: pixelToRem(iconSize * iconRatio),
54
+ width: pixelToRem(iconSize * iconRatio),
55
+ } }));
56
+ return (jsxs("div", Object.assign({ "data-testid": 'wallet-locked-view' }, { children: [jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'wallet-locked-view__error-container' }, { children: "We cannot connect to your wallet" })), jsxs("div", Object.assign({ className: 'wallet-locked-view__content' }, { children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsx(Typography, Object.assign({ variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title' }, { children: "Unlock your Wallet extension" })), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular' }, { children: "Your wallet extension is locked. To continue, open your extension and unlock your wallet." })), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'wallet-locked-view__button-header' }, { children: "Once unlocked, click here" })), jsx(Button, Object.assign({ buttonRounded: 'default', onClick: () => setShowAuthFlow(false), buttonClassName: 'wallet-locked-view__button' }, { children: "I unlocked the wallet" })), jsx(Divider, { text: 'Or' }), jsx(TextButton, Object.assign({ className: 'wallet-locked-view__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))] }))] })));
57
+ };
58
+
59
+ export { WalletLockedView };
@@ -0,0 +1 @@
1
+ export { WalletLockedView } from './WalletLockedView';
@@ -24,6 +24,7 @@ var WalletSignSpinnerView = require('./WalletSignSpinnerView/WalletSignSpinnerVi
24
24
  var WalletUsedView = require('./WalletUsedView/WalletUsedView.cjs');
25
25
  var SocialWrongAccountView = require('./SocialWrongAccountView/SocialWrongAccountView.cjs');
26
26
  var WalletGroupView = require('./WalletGroupView/WalletGroupView.cjs');
27
+ var WalletLockedView = require('./WalletLockedView/WalletLockedView.cjs');
27
28
 
28
29
  const viewToComponentMap = {
29
30
  captcha: jsxRuntime.jsx(CaptchaVerifyUser.CaptchaVerifyUser, {}),
@@ -50,6 +51,7 @@ const viewToComponentMap = {
50
51
  'wallet-connect-mobile-wallets-list': jsxRuntime.jsx(WalletList.WalletList, { isWalletConnectList: true }),
51
52
  'wallet-group': jsxRuntime.jsx(WalletGroupView.WalletGroupView, {}),
52
53
  'wallet-list': jsxRuntime.jsx(WalletList.WalletList, {}),
54
+ 'wallet-locked-view': jsxRuntime.jsx(WalletLockedView.WalletLockedView, {}),
53
55
  'wallet-sign': jsxRuntime.jsx(WalletSignSpinnerView.WalletSignSpinnerView, {}),
54
56
  'wallet-used': jsxRuntime.jsx(WalletUsedView.WalletUsedView, {}),
55
57
  };
@@ -20,6 +20,7 @@ import { WalletSignSpinnerView } from './WalletSignSpinnerView/WalletSignSpinner
20
20
  import { WalletUsedView } from './WalletUsedView/WalletUsedView.js';
21
21
  import { SocialWrongAccountView } from './SocialWrongAccountView/SocialWrongAccountView.js';
22
22
  import { WalletGroupView } from './WalletGroupView/WalletGroupView.js';
23
+ import { WalletLockedView } from './WalletLockedView/WalletLockedView.js';
23
24
 
24
25
  const viewToComponentMap = {
25
26
  captcha: jsx(CaptchaVerifyUser, {}),
@@ -46,6 +47,7 @@ const viewToComponentMap = {
46
47
  'wallet-connect-mobile-wallets-list': jsx(WalletList, { isWalletConnectList: true }),
47
48
  'wallet-group': jsx(WalletGroupView, {}),
48
49
  'wallet-list': jsx(WalletList, {}),
50
+ 'wallet-locked-view': jsx(WalletLockedView, {}),
49
51
  'wallet-sign': jsx(WalletSignSpinnerView, {}),
50
52
  'wallet-used': jsx(WalletUsedView, {}),
51
53
  };
@@ -37,7 +37,6 @@ require('./views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
37
37
  require('../../context/MockContext/MockContext.cjs');
38
38
  require('../../context/CaptchaContext/CaptchaContext.cjs');
39
39
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
40
- var DynamicConnectButton = require('../../components/DynamicConnectButton/DynamicConnectButton.cjs');
41
40
  require('../../components/Popper/Popper/Popper.cjs');
42
41
  require('../../components/Popper/PopperContext/PopperContext.cjs');
43
42
  require('formik');
@@ -45,6 +44,7 @@ require('yup');
45
44
  var DynamicBridgeUserProfile = require('./components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs');
46
45
  var DynamicBridgeWidgetNav = require('./components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs');
47
46
  var DynamicBridgeWidgetContext = require('./context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
47
+ var DynamicBridgeConnectButton = require('./components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.cjs');
48
48
 
49
49
  const DynamicBridgeWidget = ({ buttonClassName, buttonContainerClassName, innerButtonComponent = 'Connect your wallet', variant = 'modal', }) => {
50
50
  var _a, _b;
@@ -61,7 +61,7 @@ const DynamicBridgeWidget = ({ buttonClassName, buttonContainerClassName, innerB
61
61
  }, [inlineControlsRef, variant, showAuthFlow, setShowBridgeWidget]);
62
62
  index.useOnClickOutside(widgetRef, closeOnOutsideClick);
63
63
  const isAuthorized = connectedWallets.length > 0 && primaryWallet;
64
- return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(ShadowDOM.ShadowDOM, Object.assign({ id: 'dynamic-bridge-widget', className: 'dynamic-widget__container' }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!isAuthorized && (jsxRuntime.jsx(DynamicConnectButton.ConnectButton, Object.assign({ buttonClassName: buttonClassName, buttonContainerClassName: buttonContainerClassName }, { children: innerButtonComponent }))), isAuthorized && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DynamicBridgeWidgetNav.DynamicBridgeWidgetNav, { ref: inlineControlsRef, primaryWalletAddress: primaryWallet.address, primaryWalletName: primaryWallet.connector.name, secondaryWalletAddress: (_a = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _a === void 0 ? void 0 : _a.address, secondaryWalletName: (_b = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _b === void 0 ? void 0 : _b.connector.name, onPrimaryWalletClick: () => setShowBridgeWidget(true), onSecondaryWalletClick: () => setShowBridgeWidget(true) }), jsxRuntime.jsx(DynamicBridgeUserProfile.DynamicBridgeUserProfile, { variant: variant })] }))] }) })) }));
64
+ return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(ShadowDOM.ShadowDOM, Object.assign({ id: 'dynamic-bridge-widget', className: 'dynamic-widget__container' }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!isAuthorized && (jsxRuntime.jsx(DynamicBridgeConnectButton.DynamicBridgeConnectButton, { buttonClassName: buttonClassName, buttonContainerClassName: buttonContainerClassName, innerButtonComponent: innerButtonComponent })), isAuthorized && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DynamicBridgeWidgetNav.DynamicBridgeWidgetNav, { ref: inlineControlsRef, primaryWalletAddress: primaryWallet.address, primaryWalletName: primaryWallet.connector.name, secondaryWalletAddress: (_a = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _a === void 0 ? void 0 : _a.address, secondaryWalletName: (_b = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _b === void 0 ? void 0 : _b.connector.name, onPrimaryWalletClick: () => setShowBridgeWidget(true), onSecondaryWalletClick: () => setShowBridgeWidget(true) }), jsxRuntime.jsx(DynamicBridgeUserProfile.DynamicBridgeUserProfile, { variant: variant })] }))] }) })) }));
65
65
  };
66
66
 
67
67
  exports.DynamicBridgeWidget = DynamicBridgeWidget;
@@ -33,7 +33,6 @@ import './views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
33
33
  import '../../context/MockContext/MockContext.js';
34
34
  import '../../context/CaptchaContext/CaptchaContext.js';
35
35
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
36
- import { ConnectButton } from '../../components/DynamicConnectButton/DynamicConnectButton.js';
37
36
  import '../../components/Popper/Popper/Popper.js';
38
37
  import '../../components/Popper/PopperContext/PopperContext.js';
39
38
  import 'formik';
@@ -41,6 +40,7 @@ import 'yup';
41
40
  import { DynamicBridgeUserProfile } from './components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js';
42
41
  import { DynamicBridgeWidgetNav } from './components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js';
43
42
  import { useDynamicBridgeWidgetContext } from './context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
43
+ import { DynamicBridgeConnectButton } from './components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.js';
44
44
 
45
45
  const DynamicBridgeWidget = ({ buttonClassName, buttonContainerClassName, innerButtonComponent = 'Connect your wallet', variant = 'modal', }) => {
46
46
  var _a, _b;
@@ -57,7 +57,7 @@ const DynamicBridgeWidget = ({ buttonClassName, buttonContainerClassName, innerB
57
57
  }, [inlineControlsRef, variant, showAuthFlow, setShowBridgeWidget]);
58
58
  useOnClickOutside(widgetRef, closeOnOutsideClick);
59
59
  const isAuthorized = connectedWallets.length > 0 && primaryWallet;
60
- return (jsx(IsBrowser, { children: jsx(ShadowDOM, Object.assign({ id: 'dynamic-bridge-widget', className: 'dynamic-widget__container' }, { children: jsxs(Fragment, { children: [!isAuthorized && (jsx(ConnectButton, Object.assign({ buttonClassName: buttonClassName, buttonContainerClassName: buttonContainerClassName }, { children: innerButtonComponent }))), isAuthorized && (jsxs(Fragment, { children: [jsx(DynamicBridgeWidgetNav, { ref: inlineControlsRef, primaryWalletAddress: primaryWallet.address, primaryWalletName: primaryWallet.connector.name, secondaryWalletAddress: (_a = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _a === void 0 ? void 0 : _a.address, secondaryWalletName: (_b = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _b === void 0 ? void 0 : _b.connector.name, onPrimaryWalletClick: () => setShowBridgeWidget(true), onSecondaryWalletClick: () => setShowBridgeWidget(true) }), jsx(DynamicBridgeUserProfile, { variant: variant })] }))] }) })) }));
60
+ return (jsx(IsBrowser, { children: jsx(ShadowDOM, Object.assign({ id: 'dynamic-bridge-widget', className: 'dynamic-widget__container' }, { children: jsxs(Fragment, { children: [!isAuthorized && (jsx(DynamicBridgeConnectButton, { buttonClassName: buttonClassName, buttonContainerClassName: buttonContainerClassName, innerButtonComponent: innerButtonComponent })), isAuthorized && (jsxs(Fragment, { children: [jsx(DynamicBridgeWidgetNav, { ref: inlineControlsRef, primaryWalletAddress: primaryWallet.address, primaryWalletName: primaryWallet.connector.name, secondaryWalletAddress: (_a = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _a === void 0 ? void 0 : _a.address, secondaryWalletName: (_b = secondaryWallets === null || secondaryWallets === void 0 ? void 0 : secondaryWallets[0]) === null || _b === void 0 ? void 0 : _b.connector.name, onPrimaryWalletClick: () => setShowBridgeWidget(true), onSecondaryWalletClick: () => setShowBridgeWidget(true) }), jsx(DynamicBridgeUserProfile, { variant: variant })] }))] }) })) }));
61
61
  };
62
62
 
63
63
  export { DynamicBridgeWidget };
@@ -0,0 +1,23 @@
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 React = require('react');
8
+ var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
9
+ var ConnectButton = require('../../../../components/DynamicConnectButton/components/ConnectButton.cjs');
10
+
11
+ const DynamicBridgeConnectButton = ({ buttonContainerClassName = '', buttonClassName = '', innerButtonComponent = 'Connect your wallet', }) => {
12
+ const { isProjectSettingsLoading, setShowBridgeAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
13
+ const [didUserClick, setUserClicked] = React.useState(false);
14
+ const handleOnClick = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
15
+ if (!didUserClick) {
16
+ setUserClicked(true);
17
+ }
18
+ setShowBridgeAuthFlow(true);
19
+ }), [didUserClick]);
20
+ return (jsxRuntime.jsx(ConnectButton.ConnectButton, Object.assign({ onClick: handleOnClick, isLoading: isProjectSettingsLoading, isActive: didUserClick, buttonClassName: buttonClassName, buttonContainerClassName: buttonContainerClassName }, { children: innerButtonComponent })));
21
+ };
22
+
23
+ exports.DynamicBridgeConnectButton = DynamicBridgeConnectButton;
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren, ReactNode } from 'react';
2
+ type Props = {
3
+ buttonClassName?: string;
4
+ buttonContainerClassName?: string;
5
+ innerButtonComponent?: ReactNode;
6
+ };
7
+ export declare const DynamicBridgeConnectButton: FC<PropsWithChildren<Props>>;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ import { __awaiter } from '../../../../../../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useState, useCallback } from 'react';
4
+ import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
5
+ import { ConnectButton } from '../../../../components/DynamicConnectButton/components/ConnectButton.js';
6
+
7
+ const DynamicBridgeConnectButton = ({ buttonContainerClassName = '', buttonClassName = '', innerButtonComponent = 'Connect your wallet', }) => {
8
+ const { isProjectSettingsLoading, setShowBridgeAuthFlow } = useInternalDynamicContext();
9
+ const [didUserClick, setUserClicked] = useState(false);
10
+ const handleOnClick = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
11
+ if (!didUserClick) {
12
+ setUserClicked(true);
13
+ }
14
+ setShowBridgeAuthFlow(true);
15
+ }), [didUserClick]);
16
+ return (jsx(ConnectButton, Object.assign({ onClick: handleOnClick, isLoading: isProjectSettingsLoading, isActive: didUserClick, buttonClassName: buttonClassName, buttonContainerClassName: buttonContainerClassName }, { children: innerButtonComponent })));
17
+ };
18
+
19
+ export { DynamicBridgeConnectButton };
@@ -1 +1,2 @@
1
1
  export { DynamicBridgeWidget } from './DynamicBridgeWidget';
2
+ export { DynamicBridgeConnectButton } from './components/DynamicBridgeConnectButton/DynamicBridgeConnectButton';
@@ -1,67 +0,0 @@
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 index = require('../../../context/FooterAnimationContext/index.cjs');
8
- var ThemeContext = require('../../../context/ThemeContext/ThemeContext.cjs');
9
- require('@dynamic-labs/sdk-api');
10
- require('../../../shared/logger.cjs');
11
- require('@dynamic-labs/iconic');
12
- require('@dynamic-labs/wallet-connector-core');
13
- require('../../../context/ViewContext/ViewContext.cjs');
14
- var arrowDown = require('../../../shared/assets/arrow-down.cjs');
15
- require('@dynamic-labs/wallet-book');
16
- require('@dynamic-labs/utils');
17
- require('../../../utils/constants/colors.cjs');
18
- require('../../../shared/utils/classes/storage/localStorage.cjs');
19
- require('ethers');
20
- require('../../../shared/consts/index.cjs');
21
- var Skeleton = require('../../../components/Skeleton/Skeleton.cjs');
22
- var classNames = require('../../../utils/functions/classNames/classNames.cjs');
23
- var Typography = require('../../../components/Typography/Typography.cjs');
24
- require('../../../context/DynamicContext/DynamicContext.cjs');
25
- require('@dynamic-labs/multi-wallet');
26
- require('../../../components/ShadowDOM/ShadowDOM.cjs');
27
- require('react-dom');
28
- require('react-focus-lock');
29
- require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
30
- require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
31
- require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
32
- require('../../../config/ApiEndpoint.cjs');
33
- require('@dynamic-labs/rpc-providers');
34
- require('../../../context/ErrorContext/ErrorContext.cjs');
35
- require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
36
- require('../../../components/IconButton/IconButton.cjs');
37
- require('../../../components/Alert/Alert.cjs');
38
- require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
39
- require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
40
- require('../../../context/MockContext/MockContext.cjs');
41
- require('../../../context/CaptchaContext/CaptchaContext.cjs');
42
- require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
43
- require('../../../components/Popper/Popper/Popper.cjs');
44
- require('../../../components/Popper/PopperContext/PopperContext.cjs');
45
- require('formik');
46
- require('yup');
47
-
48
- const Footer = ({ heading, icon, projectSettings }) => {
49
- const { theme } = ThemeContext.useThemeContext();
50
- const { isFooterExpanded, setIsFooterExpanded } = index.useFooterAnimationContext();
51
- const borderClassName = React.useMemo(() => {
52
- if (isFooterExpanded) {
53
- return 'footer--border-bottom';
54
- }
55
- return 'footer--border-top';
56
- }, [theme, isFooterExpanded]);
57
- const arrowClassName = React.useMemo(() => {
58
- const classes = ['footer__arrow'];
59
- if (isFooterExpanded) {
60
- classes.push('footer__arrow--open');
61
- }
62
- return classes.join(' ');
63
- }, [isFooterExpanded]);
64
- return (jsxRuntime.jsx("div", Object.assign({ onClick: () => projectSettings && setIsFooterExpanded(!isFooterExpanded), className: classNames.classNames('footer', borderClassName), role: 'button', "data-testid": 'wallet-footer-container' }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'footer__container' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'footer__container--heading' }, { children: [!projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'footer__skeleton--icon' })) : (Boolean(icon) && (jsxRuntime.jsx("div", Object.assign({ className: 'footer__container--icon', "data-testid": 'wallet-footer-icon' }, { children: icon })))), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h3', variant: 'body_normal' }, { children: !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'footer__skeleton--heading' })) : (heading) }))] })), projectSettings && jsxRuntime.jsx(arrowDown.ReactComponent, { className: arrowClassName })] })) })));
65
- };
66
-
67
- exports.Footer = Footer;
@@ -1,10 +0,0 @@
1
- import { FC, ReactNode, RefObject } from 'react';
2
- import { ProjectSettings } from '@dynamic-labs/sdk-api';
3
- interface Props {
4
- footerRef: RefObject<HTMLDivElement>;
5
- heading: string;
6
- icon?: ReactNode;
7
- projectSettings?: ProjectSettings;
8
- }
9
- export declare const Footer: FC<Props>;
10
- export {};
@@ -1,63 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
- import { useFooterAnimationContext } from '../../../context/FooterAnimationContext/index.js';
4
- import { useThemeContext } from '../../../context/ThemeContext/ThemeContext.js';
5
- import '@dynamic-labs/sdk-api';
6
- import '../../../shared/logger.js';
7
- import '@dynamic-labs/iconic';
8
- import '@dynamic-labs/wallet-connector-core';
9
- import '../../../context/ViewContext/ViewContext.js';
10
- import { ReactComponent as SvgArrowDown } from '../../../shared/assets/arrow-down.js';
11
- import '@dynamic-labs/wallet-book';
12
- import '@dynamic-labs/utils';
13
- import '../../../utils/constants/colors.js';
14
- import '../../../shared/utils/classes/storage/localStorage.js';
15
- import 'ethers';
16
- import '../../../shared/consts/index.js';
17
- import { Skeleton } from '../../../components/Skeleton/Skeleton.js';
18
- import { classNames } from '../../../utils/functions/classNames/classNames.js';
19
- import { Typography } from '../../../components/Typography/Typography.js';
20
- import '../../../context/DynamicContext/DynamicContext.js';
21
- import '@dynamic-labs/multi-wallet';
22
- import '../../../components/ShadowDOM/ShadowDOM.js';
23
- import 'react-dom';
24
- import 'react-focus-lock';
25
- import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
26
- import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
27
- import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
28
- import '../../../config/ApiEndpoint.js';
29
- import '@dynamic-labs/rpc-providers';
30
- import '../../../context/ErrorContext/ErrorContext.js';
31
- import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
32
- import '../../../components/IconButton/IconButton.js';
33
- import '../../../components/Alert/Alert.js';
34
- import '../../../context/WalletGroupContext/WalletGroupContext.js';
35
- import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
36
- import '../../../context/MockContext/MockContext.js';
37
- import '../../../context/CaptchaContext/CaptchaContext.js';
38
- import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
39
- import '../../../components/Popper/Popper/Popper.js';
40
- import '../../../components/Popper/PopperContext/PopperContext.js';
41
- import 'formik';
42
- import 'yup';
43
-
44
- const Footer = ({ heading, icon, projectSettings }) => {
45
- const { theme } = useThemeContext();
46
- const { isFooterExpanded, setIsFooterExpanded } = useFooterAnimationContext();
47
- const borderClassName = useMemo(() => {
48
- if (isFooterExpanded) {
49
- return 'footer--border-bottom';
50
- }
51
- return 'footer--border-top';
52
- }, [theme, isFooterExpanded]);
53
- const arrowClassName = useMemo(() => {
54
- const classes = ['footer__arrow'];
55
- if (isFooterExpanded) {
56
- classes.push('footer__arrow--open');
57
- }
58
- return classes.join(' ');
59
- }, [isFooterExpanded]);
60
- return (jsx("div", Object.assign({ onClick: () => projectSettings && setIsFooterExpanded(!isFooterExpanded), className: classNames('footer', borderClassName), role: 'button', "data-testid": 'wallet-footer-container' }, { children: jsxs("div", Object.assign({ className: 'footer__container' }, { children: [jsxs("div", Object.assign({ className: 'footer__container--heading' }, { children: [!projectSettings ? (jsx(Skeleton, { className: 'footer__skeleton--icon' })) : (Boolean(icon) && (jsx("div", Object.assign({ className: 'footer__container--icon', "data-testid": 'wallet-footer-icon' }, { children: icon })))), jsx(Typography, Object.assign({ as: 'h3', variant: 'body_normal' }, { children: !projectSettings ? (jsx(Skeleton, { className: 'footer__skeleton--heading' })) : (heading) }))] })), projectSettings && jsx(SvgArrowDown, { className: arrowClassName })] })) })));
61
- };
62
-
63
- export { Footer };
@@ -1 +0,0 @@
1
- export { Footer } from './Footer';
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const EmptyFooterContent: () => JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
-
3
- /* istanbul ignore next */
4
- const EmptyFooterContent = () => (jsx("div", { "data-testid": 'empty-footer-content' }));
5
-
6
- export { EmptyFooterContent };