@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
@@ -12,6 +12,8 @@ require('@dynamic-labs/wallet-connector-core');
12
12
  var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
13
13
  var close = require('../../../shared/assets/close.cjs');
14
14
  var chevronLeft = require('../../../shared/assets/chevron-left.cjs');
15
+ var footerInfoIcon = require('../../../shared/assets/footer-info-icon.cjs');
16
+ var questionMark = require('../../../shared/assets/question-mark.cjs');
15
17
  require('@dynamic-labs/wallet-book');
16
18
  require('@dynamic-labs/utils');
17
19
  require('../../../utils/constants/colors.cjs');
@@ -40,16 +42,21 @@ require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secon
40
42
  require('../../../context/MockContext/MockContext.cjs');
41
43
  require('../../../context/CaptchaContext/CaptchaContext.cjs');
42
44
  require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
45
+ var Tooltip = require('../../../components/Tooltip/Tooltip.cjs');
43
46
  require('../../../components/Popper/Popper/Popper.cjs');
44
47
  require('../../../components/Popper/PopperContext/PopperContext.cjs');
45
48
  require('formik');
46
49
  require('yup');
47
50
  var QrCodeContext = require('../../../context/QrCodeContext/QrCodeContext.cjs');
51
+ var useAuthLayoutChecks = require('../../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs');
52
+ var index = require('../../../context/FooterAnimationContext/index.cjs');
48
53
 
49
- const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
54
+ const Header = ({ onClose: handleClose, heading, projectSettings, walletConnector, }) => {
50
55
  const { clearStatesOnBackClick, selectedWalletConnector } = useInternalDynamicContext.useInternalDynamicContext();
51
- const { showQrCodeMessage, setShowQrCodeImage, showQrCodeImage } = QrCodeContext.useQrCodeContext();
56
+ const { setShowQrCodeImage } = QrCodeContext.useQrCodeContext();
57
+ const { isFooterExpanded, setIsFooterExpanded } = index.useFooterAnimationContext();
52
58
  const { view, goToInitialView } = ViewContext.useViewContext();
59
+ const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
53
60
  const handleBackClick = React.useCallback(() => {
54
61
  goToInitialView();
55
62
  // on back button click in Coinbase wallet clearing state would kill connection and refresh the page
@@ -57,21 +64,33 @@ const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
57
64
  clearStatesOnBackClick();
58
65
  }
59
66
  }, [clearStatesOnBackClick, selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, goToInitialView]);
60
- const positionAbsolute = view === 'login-with-email-verification';
61
- const showCloseButton = view !== 'login-with-email-or-wallet-full-wallet-list' &&
62
- view !== 'login-with-email-verification';
63
- const backButton = (view === 'qr-code' ||
64
- view === 'pending-signature' ||
65
- view === 'no-qr-not-installed' ||
66
- view === 'wallet-connect-mobile-wallets-list' ||
67
- view === 'login-with-email-verification' ||
68
- view === 'login-with-email-or-wallet-full-wallet-list' ||
69
- view === 'wallet-group' ||
70
- view === 'pending-connect') && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: handleBackClick, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
67
+ const leadingButtons = React.useMemo(() => {
68
+ let buttons = [];
69
+ if (showBackButton) {
70
+ buttons = [
71
+ ...buttons,
72
+ jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }), 'back-button'),
73
+ ];
74
+ }
75
+ if (showHelpContent) {
76
+ buttons = [
77
+ ...buttons,
78
+ jsxRuntime.jsx(Tooltip.Tooltip, Object.assign({ content: 'Need some help?', className: 'header__tooltip' }, { children: jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon' }, { children: isWalletListTypeView ? jsxRuntime.jsx(questionMark.ReactComponent, {}) : jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) })) }), 'info-button'),
79
+ ];
80
+ }
81
+ return buttons;
82
+ }, [
83
+ handleBackClick,
84
+ isFooterExpanded,
85
+ isWalletListTypeView,
86
+ setIsFooterExpanded,
87
+ showBackButton,
88
+ showHelpContent,
89
+ ]);
71
90
  const closeButton = showCloseButton && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: handleClose, type: 'button', id: 'close-button', "data-testid": 'close-button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
72
91
  const qrCodePreHeader = (jsxRuntime.jsxs("div", Object.assign({ className: 'qr-code-view__scan-issue-message' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_small' }, { children: "If you're having issues scanning, click\u00A0" })), jsxRuntime.jsx("button", Object.assign({ className: 'qr-code-view__scan-issue-button', onClick: () => setShowQrCodeImage(true) }, { children: "here" }))] })));
73
- const showQrCodePreHeader = view === 'qr-code' && showQrCodeMessage && !showQrCodeImage;
74
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ leading: backButton, trailing: closeButton, positionAbsolute: positionAbsolute }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography' }, { children: !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'header__skeleton' })) : (heading) })) }))] }));
92
+ const positionAbsolute = view === 'login-with-email-verification';
93
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ leading: leadingButtons, trailing: closeButton, positionAbsolute: positionAbsolute }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography' }, { children: !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'header__skeleton' })) : (heading) })) }))] }));
75
94
  };
76
95
 
77
96
  exports.Header = Header;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { WalletHeaderProps } from './header.types';
3
- export declare const Header: ({ onClose: handleClose, heading, projectSettings, }: WalletHeaderProps) => JSX.Element;
3
+ export declare const Header: ({ onClose: handleClose, heading, projectSettings, walletConnector, }: WalletHeaderProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { useCallback } from 'react';
2
+ import { useCallback, useMemo } from 'react';
3
3
  import { Typography } from '../../../components/Typography/Typography.js';
4
4
  import '@dynamic-labs/sdk-api';
5
5
  import '../../../shared/logger.js';
@@ -8,6 +8,8 @@ import '@dynamic-labs/wallet-connector-core';
8
8
  import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
9
9
  import { ReactComponent as SvgClose } from '../../../shared/assets/close.js';
10
10
  import { ReactComponent as SvgChevronLeft } from '../../../shared/assets/chevron-left.js';
11
+ import { ReactComponent as SvgFooterInfoIcon } from '../../../shared/assets/footer-info-icon.js';
12
+ import { ReactComponent as SvgQuestionMark } from '../../../shared/assets/question-mark.js';
11
13
  import '@dynamic-labs/wallet-book';
12
14
  import '@dynamic-labs/utils';
13
15
  import '../../../utils/constants/colors.js';
@@ -36,16 +38,21 @@ import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/Second
36
38
  import '../../../context/MockContext/MockContext.js';
37
39
  import '../../../context/CaptchaContext/CaptchaContext.js';
38
40
  import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
41
+ import { Tooltip } from '../../../components/Tooltip/Tooltip.js';
39
42
  import '../../../components/Popper/Popper/Popper.js';
40
43
  import '../../../components/Popper/PopperContext/PopperContext.js';
41
44
  import 'formik';
42
45
  import 'yup';
43
46
  import { useQrCodeContext } from '../../../context/QrCodeContext/QrCodeContext.js';
47
+ import { useAuthLayoutChecks } from '../../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js';
48
+ import { useFooterAnimationContext } from '../../../context/FooterAnimationContext/index.js';
44
49
 
45
- const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
50
+ const Header = ({ onClose: handleClose, heading, projectSettings, walletConnector, }) => {
46
51
  const { clearStatesOnBackClick, selectedWalletConnector } = useInternalDynamicContext();
47
- const { showQrCodeMessage, setShowQrCodeImage, showQrCodeImage } = useQrCodeContext();
52
+ const { setShowQrCodeImage } = useQrCodeContext();
53
+ const { isFooterExpanded, setIsFooterExpanded } = useFooterAnimationContext();
48
54
  const { view, goToInitialView } = useViewContext();
55
+ const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, } = useAuthLayoutChecks(walletConnector);
49
56
  const handleBackClick = useCallback(() => {
50
57
  goToInitialView();
51
58
  // on back button click in Coinbase wallet clearing state would kill connection and refresh the page
@@ -53,21 +60,33 @@ const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
53
60
  clearStatesOnBackClick();
54
61
  }
55
62
  }, [clearStatesOnBackClick, selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, goToInitialView]);
56
- const positionAbsolute = view === 'login-with-email-verification';
57
- const showCloseButton = view !== 'login-with-email-or-wallet-full-wallet-list' &&
58
- view !== 'login-with-email-verification';
59
- const backButton = (view === 'qr-code' ||
60
- view === 'pending-signature' ||
61
- view === 'no-qr-not-installed' ||
62
- view === 'wallet-connect-mobile-wallets-list' ||
63
- view === 'login-with-email-verification' ||
64
- view === 'login-with-email-or-wallet-full-wallet-list' ||
65
- view === 'wallet-group' ||
66
- view === 'pending-connect') && (jsx(IconButton, Object.assign({ type: 'button', onClick: handleBackClick, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
63
+ const leadingButtons = useMemo(() => {
64
+ let buttons = [];
65
+ if (showBackButton) {
66
+ buttons = [
67
+ ...buttons,
68
+ jsx(IconButton, Object.assign({ type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon' }, { children: jsx(SvgChevronLeft, {}) }), 'back-button'),
69
+ ];
70
+ }
71
+ if (showHelpContent) {
72
+ buttons = [
73
+ ...buttons,
74
+ jsx(Tooltip, Object.assign({ content: 'Need some help?', className: 'header__tooltip' }, { children: jsx(IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon' }, { children: isWalletListTypeView ? jsx(SvgQuestionMark, {}) : jsx(SvgFooterInfoIcon, {}) })) }), 'info-button'),
75
+ ];
76
+ }
77
+ return buttons;
78
+ }, [
79
+ handleBackClick,
80
+ isFooterExpanded,
81
+ isWalletListTypeView,
82
+ setIsFooterExpanded,
83
+ showBackButton,
84
+ showHelpContent,
85
+ ]);
67
86
  const closeButton = showCloseButton && (jsx(IconButton, Object.assign({ onClick: handleClose, type: 'button', id: 'close-button', "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
68
87
  const qrCodePreHeader = (jsxs("div", Object.assign({ className: 'qr-code-view__scan-issue-message' }, { children: [jsx(Typography, Object.assign({ color: 'primary', variant: 'body_small' }, { children: "If you're having issues scanning, click\u00A0" })), jsx("button", Object.assign({ className: 'qr-code-view__scan-issue-button', onClick: () => setShowQrCodeImage(true) }, { children: "here" }))] })));
69
- const showQrCodePreHeader = view === 'qr-code' && showQrCodeMessage && !showQrCodeImage;
70
- return (jsxs(Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsx(ModalHeader, Object.assign({ leading: backButton, trailing: closeButton, positionAbsolute: positionAbsolute }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography' }, { children: !projectSettings ? (jsx(Skeleton, { className: 'header__skeleton' })) : (heading) })) }))] }));
88
+ const positionAbsolute = view === 'login-with-email-verification';
89
+ return (jsxs(Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsx(ModalHeader, Object.assign({ leading: leadingButtons, trailing: closeButton, positionAbsolute: positionAbsolute }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography' }, { children: !projectSettings ? (jsx(Skeleton, { className: 'header__skeleton' })) : (heading) })) }))] }));
71
90
  };
72
91
 
73
92
  export { Header };
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { ProjectSettings } from '@dynamic-labs/sdk-api';
3
+ import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
3
4
  import { ModalProps } from '../../../shared/types';
4
5
  export type WalletHeaderProps = ModalProps & {
5
6
  heading: string | JSX.Element;
6
7
  projectSettings?: ProjectSettings;
8
+ walletConnector?: WalletConnector | null;
7
9
  };
@@ -5,6 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
7
7
  /* istanbul ignore next */
8
- const EmptyFooterContent = () => (jsxRuntime.jsx("div", { "data-testid": 'empty-footer-content' }));
8
+ const EmptyHelpContent = () => jsxRuntime.jsx("div", { "data-testid": 'empty-help-content' });
9
9
 
10
- exports.EmptyFooterContent = EmptyFooterContent;
10
+ exports.EmptyHelpContent = EmptyHelpContent;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const EmptyHelpContent: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+
3
+ /* istanbul ignore next */
4
+ const EmptyHelpContent = () => jsx("div", { "data-testid": 'empty-help-content' });
5
+
6
+ export { EmptyHelpContent };
@@ -0,0 +1 @@
1
+ export { EmptyHelpContent } from './EmptyHelpContent';
@@ -0,0 +1,36 @@
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 ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
8
+ var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
9
+ var WalletListHelpContent = require('./WalletListHelpContent/WalletListHelpContent.cjs');
10
+ var WalletMoreInfoContent = require('./WalletMoreInfoContent/WalletMoreInfoContent.cjs');
11
+ var EmptyHelpContent = require('./EmptyHelpContent/EmptyHelpContent.cjs');
12
+ var HelpHeader = require('./HelpHeader/HelpHeader.cjs');
13
+
14
+ const HelpContent = () => (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(HelpHeader.HelpHeader, {}), jsxRuntime.jsx(HelpContentSwitch, {})] }));
15
+ const HelpContentSwitch = () => {
16
+ const { view } = ViewContext.useViewContext();
17
+ const { projectSettings, newToWeb3WalletChainMap, selectedWalletConnector } = useInternalDynamicContext.useInternalDynamicContext();
18
+ const isWalletListTypeView = React.useMemo(() => view === 'wallet-connect-mobile-wallets-list' ||
19
+ view === 'wallet-list' ||
20
+ view === 'login-with-email-or-wallet-full-wallet-list', [view]);
21
+ const isPendingSignatureTypeView = React.useMemo(() => view === 'pending-signature-without-back-button' ||
22
+ view === 'pending-signature', [view]);
23
+ const isPendingConnectTypeView = React.useMemo(() => view === 'pending-connect' || view === 'qr-code', [view]);
24
+ if (isWalletListTypeView) {
25
+ return (jsxRuntime.jsx(WalletListHelpContent.WalletListHelpContent, { chains: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.chains, newToWeb3WalletChainMap: newToWeb3WalletChainMap }));
26
+ }
27
+ if (isPendingSignatureTypeView) {
28
+ return (jsxRuntime.jsx(WalletMoreInfoContent.WalletMoreInfoContent, { variant: 'sign', walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name }));
29
+ }
30
+ if (isPendingConnectTypeView) {
31
+ return jsxRuntime.jsx(WalletMoreInfoContent.WalletMoreInfoContent, { variant: 'connect' });
32
+ }
33
+ return jsxRuntime.jsx(EmptyHelpContent.EmptyHelpContent, {});
34
+ };
35
+
36
+ exports.HelpContent = HelpContent;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const HelpContent: () => JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useMemo } from 'react';
3
+ import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
4
+ import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
5
+ import { WalletListHelpContent } from './WalletListHelpContent/WalletListHelpContent.js';
6
+ import { WalletMoreInfoContent } from './WalletMoreInfoContent/WalletMoreInfoContent.js';
7
+ import { EmptyHelpContent } from './EmptyHelpContent/EmptyHelpContent.js';
8
+ import { HelpHeader } from './HelpHeader/HelpHeader.js';
9
+
10
+ const HelpContent = () => (jsxs("div", { children: [jsx(HelpHeader, {}), jsx(HelpContentSwitch, {})] }));
11
+ const HelpContentSwitch = () => {
12
+ const { view } = useViewContext();
13
+ const { projectSettings, newToWeb3WalletChainMap, selectedWalletConnector } = useInternalDynamicContext();
14
+ const isWalletListTypeView = useMemo(() => view === 'wallet-connect-mobile-wallets-list' ||
15
+ view === 'wallet-list' ||
16
+ view === 'login-with-email-or-wallet-full-wallet-list', [view]);
17
+ const isPendingSignatureTypeView = useMemo(() => view === 'pending-signature-without-back-button' ||
18
+ view === 'pending-signature', [view]);
19
+ const isPendingConnectTypeView = useMemo(() => view === 'pending-connect' || view === 'qr-code', [view]);
20
+ if (isWalletListTypeView) {
21
+ return (jsx(WalletListHelpContent, { chains: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.chains, newToWeb3WalletChainMap: newToWeb3WalletChainMap }));
22
+ }
23
+ if (isPendingSignatureTypeView) {
24
+ return (jsx(WalletMoreInfoContent, { variant: 'sign', walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name }));
25
+ }
26
+ if (isPendingConnectTypeView) {
27
+ return jsx(WalletMoreInfoContent, { variant: 'connect' });
28
+ }
29
+ return jsx(EmptyHelpContent, {});
30
+ };
31
+
32
+ export { HelpContent };
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ require('react');
7
+ var Typography = require('../../../../components/Typography/Typography.cjs');
8
+ require('@dynamic-labs/sdk-api');
9
+ require('../../../../shared/logger.cjs');
10
+ require('@dynamic-labs/iconic');
11
+ require('@dynamic-labs/wallet-connector-core');
12
+ var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
13
+ var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
14
+ require('@dynamic-labs/wallet-book');
15
+ require('@dynamic-labs/utils');
16
+ require('../../../../utils/constants/colors.cjs');
17
+ require('../../../../shared/utils/classes/storage/localStorage.cjs');
18
+ require('ethers');
19
+ require('../../../../shared/consts/index.cjs');
20
+ require('../../../../context/DynamicContext/DynamicContext.cjs');
21
+ require('@dynamic-labs/multi-wallet');
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
+ var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
34
+ var IconButton = require('../../../../components/IconButton/IconButton.cjs');
35
+ require('../../../../components/Alert/Alert.cjs');
36
+ require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
37
+ require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
38
+ require('../../../../context/MockContext/MockContext.cjs');
39
+ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
40
+ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
41
+ require('../../../../components/Popper/Popper/Popper.cjs');
42
+ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
43
+ require('formik');
44
+ require('yup');
45
+ var index = require('../../../../context/FooterAnimationContext/index.cjs');
46
+ var getDynamicLayoutData = require('../../../../utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs');
47
+
48
+ const HelpHeader = () => {
49
+ const { setIsFooterExpanded } = index.useFooterAnimationContext();
50
+ const { view } = ViewContext.useViewContext();
51
+ const { helpHeaderData } = getDynamicLayoutData.getDynamicLayoutData({ view });
52
+ const backButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(false), "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'back-button ' }) })));
53
+ return (jsxRuntime.jsx("div", Object.assign({ className: 'help-header' }, { children: jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: backButton }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-help-heading', className: 'header__typography' }, { children: helpHeaderData === null || helpHeaderData === void 0 ? void 0 : helpHeaderData.heading })) })) })));
54
+ };
55
+
56
+ exports.HelpHeader = HelpHeader;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const HelpHeader: () => JSX.Element;
@@ -0,0 +1,52 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import 'react';
3
+ import { Typography } from '../../../../components/Typography/Typography.js';
4
+ import '@dynamic-labs/sdk-api';
5
+ import '../../../../shared/logger.js';
6
+ import '@dynamic-labs/iconic';
7
+ import '@dynamic-labs/wallet-connector-core';
8
+ import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
9
+ import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
10
+ import '@dynamic-labs/wallet-book';
11
+ import '@dynamic-labs/utils';
12
+ import '../../../../utils/constants/colors.js';
13
+ import '../../../../shared/utils/classes/storage/localStorage.js';
14
+ import 'ethers';
15
+ import '../../../../shared/consts/index.js';
16
+ import '../../../../context/DynamicContext/DynamicContext.js';
17
+ import '@dynamic-labs/multi-wallet';
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 { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
30
+ import { IconButton } from '../../../../components/IconButton/IconButton.js';
31
+ import '../../../../components/Alert/Alert.js';
32
+ import '../../../../context/WalletGroupContext/WalletGroupContext.js';
33
+ import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
34
+ import '../../../../context/MockContext/MockContext.js';
35
+ import '../../../../context/CaptchaContext/CaptchaContext.js';
36
+ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
37
+ import '../../../../components/Popper/Popper/Popper.js';
38
+ import '../../../../components/Popper/PopperContext/PopperContext.js';
39
+ import 'formik';
40
+ import 'yup';
41
+ import { useFooterAnimationContext } from '../../../../context/FooterAnimationContext/index.js';
42
+ import { getDynamicLayoutData } from '../../../../utils/functions/getDynamicLayoutData/getDynamicLayoutData.js';
43
+
44
+ const HelpHeader = () => {
45
+ const { setIsFooterExpanded } = useFooterAnimationContext();
46
+ const { view } = useViewContext();
47
+ const { helpHeaderData } = getDynamicLayoutData({ view });
48
+ const backButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(false), "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, { className: 'back-button ' }) })));
49
+ return (jsx("div", Object.assign({ className: 'help-header' }, { children: jsx(ModalHeader, Object.assign({ trailing: backButton }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-help-heading', className: 'header__typography' }, { children: helpHeaderData === null || helpHeaderData === void 0 ? void 0 : helpHeaderData.heading })) })) })));
50
+ };
51
+
52
+ export { HelpHeader };
@@ -0,0 +1 @@
1
+ export { HelpHeader } from './HelpHeader';
@@ -50,7 +50,7 @@ var NewToWeb3WalletItem = require('./NewToWeb3WalletItem/NewToWeb3WalletItem.cjs
50
50
  var Item = require('./Item/Item.cjs');
51
51
  var WalletExtensionOrAppContinueButton = require('./WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs');
52
52
 
53
- const WalletListFooterContent = ({ chains, newToWeb3WalletChainMap, }) => {
53
+ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
54
54
  var _a, _b;
55
55
  const { wallets } = useInternalDynamicContext.useInternalDynamicContext();
56
56
  const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
@@ -84,7 +84,7 @@ const WalletListFooterContent = ({ chains, newToWeb3WalletChainMap, }) => {
84
84
  if (!Object.keys((_b = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _b !== void 0 ? _b : {}).length) {
85
85
  return jsxRuntime.jsx(Skeleton.Skeleton, { className: 'walletlist-footer-content__container' });
86
86
  }
87
- return (jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-footer-content__container' }, { children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-footer-content__icon' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletName, style: { height: pixelToRem.pixelToRem(56), width: pixelToRem.pixelToRem(56) } }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-footer-content__typography-wrapper' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', walletBook.getWalletBookWallet(walletBook$1, walletName).name] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-footer-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-footer-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsxRuntime.jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsxRuntime.jsx(Item.Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-footer-content__custodial-wallet-area' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'walletlist-footer-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsxRuntime.jsx(WalletExtensionOrAppContinueButton.WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
87
+ return (jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletName, style: { height: pixelToRem.pixelToRem(56), width: pixelToRem.pixelToRem(56) } }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-help-content__typography-wrapper' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', walletBook.getWalletBookWallet(walletBook$1, walletName).name] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsxRuntime.jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsxRuntime.jsx(Item.Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-help-content__custodial-wallet-area' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsxRuntime.jsx(WalletExtensionOrAppContinueButton.WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
88
88
  };
89
89
 
90
- exports.WalletListFooterContent = WalletListFooterContent;
90
+ exports.WalletListHelpContent = WalletListHelpContent;
@@ -5,5 +5,5 @@ interface Props {
5
5
  chains: ProjectSettingsChains[] | undefined;
6
6
  newToWeb3WalletChainMap: ChainToWalletMap;
7
7
  }
8
- export declare const WalletListFooterContent: ({ chains, newToWeb3WalletChainMap, }: Props) => JSX.Element;
8
+ export declare const WalletListHelpContent: ({ chains, newToWeb3WalletChainMap, }: Props) => JSX.Element;
9
9
  export {};
@@ -46,7 +46,7 @@ import { NewToWeb3WalletItem } from './NewToWeb3WalletItem/NewToWeb3WalletItem.j
46
46
  import { Item } from './Item/Item.js';
47
47
  import { WalletExtensionOrAppContinueButton } from './WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js';
48
48
 
49
- const WalletListFooterContent = ({ chains, newToWeb3WalletChainMap, }) => {
49
+ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
50
50
  var _a, _b;
51
51
  const { wallets } = useInternalDynamicContext();
52
52
  const { walletBook } = useWalletBookContext();
@@ -80,7 +80,7 @@ const WalletListFooterContent = ({ chains, newToWeb3WalletChainMap, }) => {
80
80
  if (!Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length) {
81
81
  return jsx(Skeleton, { className: 'walletlist-footer-content__container' });
82
82
  }
83
- return (jsx("div", Object.assign({ className: 'walletlist-footer-content__container' }, { children: jsxs(EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsx("div", Object.assign({ className: 'walletlist-footer-content__icon' }, { children: jsx(WalletIcon, { walletName: walletName, style: { height: pixelToRem(56), width: pixelToRem(56) } }) })), jsxs("div", Object.assign({ className: 'walletlist-footer-content__typography-wrapper' }, { children: [jsxs(Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', getWalletBookWallet(walletBook, walletName).name] })), jsx(Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-footer-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsx("div", Object.assign({ className: 'walletlist-footer-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsx(Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxs("div", Object.assign({ className: 'walletlist-footer-content__custodial-wallet-area' }, { children: [jsx(Typography, Object.assign({ className: 'walletlist-footer-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsx(NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsx(WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
83
+ return (jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxs(EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsx(WalletIcon, { walletName: walletName, style: { height: pixelToRem(56), width: pixelToRem(56) } }) })), jsxs("div", Object.assign({ className: 'walletlist-help-content__typography-wrapper' }, { children: [jsxs(Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', getWalletBookWallet(walletBook, walletName).name] })), jsx(Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsx("div", Object.assign({ className: 'walletlist-help-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsx(Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxs("div", Object.assign({ className: 'walletlist-help-content__custodial-wallet-area' }, { children: [jsx(Typography, Object.assign({ className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsx(NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsx(WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
84
84
  };
85
85
 
86
- export { WalletListFooterContent };
86
+ export { WalletListHelpContent };
@@ -0,0 +1 @@
1
+ export { WalletListHelpContent } from './WalletListHelpContent';
@@ -47,7 +47,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
47
47
  require('formik');
48
48
  require('yup');
49
49
 
50
- const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
50
+ const WalletMoreInfoContent = ({ variant, walletName, }) => {
51
51
  const defaultSignContent = {
52
52
  info: [
53
53
  {
@@ -72,9 +72,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
72
72
  {
73
73
  content: (jsxRuntime.jsxs("div", Object.assign({ className: 'footer-more-info-content__item--phantom-ledger' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Ledger does not support message signing functionality, commonly used to log in to sites. Instead, we sign a transaction as a proxy to prove ownership of the wallet." })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: [jsxRuntime.jsx("strong", { children: "Important" }), ": we do not", ' ', jsxRuntime.jsx("strong", { children: "broadcast" }), " this transaction, meaning Ledger based login will still be gasless."] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Phantom in turn shows that a fee may apply as part of the \u201Ctransaction\u201D." })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "As always, please be cautious of the extensions and websites you use to prevent unwanted transactions from being broadcasted to the network." }))] }))),
74
74
  icon: footerGasIcon.ReactComponent,
75
- title: walletName === walletConnectorCore.PhantomLedgerWalletName
76
- ? 'Why do I see a fee when using ledger'
77
- : 'There are no associated gas costs',
75
+ title: 'Why do I see a fee when using ledger',
78
76
  },
79
77
  ],
80
78
  }
@@ -95,7 +93,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
95
93
  },
96
94
  sign: signInfoMessage,
97
95
  };
98
- return (jsxRuntime.jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsxRuntime.jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsxRuntime.jsx(InfoItem.InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { align: 'left' }) }))] })));
96
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsxRuntime.jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsxRuntime.jsx(InfoItem.InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { align: 'center' }) }))] })));
99
97
  };
100
98
 
101
99
  exports.WalletMoreInfoContent = WalletMoreInfoContent;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ variant: 'connect' | 'sign';
4
+ walletName?: string;
5
+ }
6
+ export declare const WalletMoreInfoContent: ({ variant, walletName, }: Props) => JSX.Element;
7
+ export {};
@@ -43,7 +43,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
43
43
  import 'formik';
44
44
  import 'yup';
45
45
 
46
- const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
46
+ const WalletMoreInfoContent = ({ variant, walletName, }) => {
47
47
  const defaultSignContent = {
48
48
  info: [
49
49
  {
@@ -68,9 +68,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
68
68
  {
69
69
  content: (jsxs("div", Object.assign({ className: 'footer-more-info-content__item--phantom-ledger' }, { children: [jsx(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Ledger does not support message signing functionality, commonly used to log in to sites. Instead, we sign a transaction as a proxy to prove ownership of the wallet." })), jsxs(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: [jsx("strong", { children: "Important" }), ": we do not", ' ', jsx("strong", { children: "broadcast" }), " this transaction, meaning Ledger based login will still be gasless."] })), jsx(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Phantom in turn shows that a fee may apply as part of the \u201Ctransaction\u201D." })), jsx(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "As always, please be cautious of the extensions and websites you use to prevent unwanted transactions from being broadcasted to the network." }))] }))),
70
70
  icon: SvgFooterGasIcon,
71
- title: walletName === PhantomLedgerWalletName
72
- ? 'Why do I see a fee when using ledger'
73
- : 'There are no associated gas costs',
71
+ title: 'Why do I see a fee when using ledger',
74
72
  },
75
73
  ],
76
74
  }
@@ -91,7 +89,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
91
89
  },
92
90
  sign: signInfoMessage,
93
91
  };
94
- return (jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsx(InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsx(PoweredByDynamic, { align: 'left' }) }))] })));
92
+ return (jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsx(InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsx(PoweredByDynamic, { align: 'center' }) }))] })));
95
93
  };
96
94
 
97
95
  export { WalletMoreInfoContent };
@@ -0,0 +1,4 @@
1
+ export { EmptyHelpContent } from './EmptyHelpContent';
2
+ export { WalletMoreInfoContent } from './WalletMoreInfoContent';
3
+ export { WalletListHelpContent } from './WalletListHelpContent';
4
+ export { HelpContent } from './HelpContent';