@dynamic-labs/sdk-react-core 4.0.0-alpha.17 → 4.0.0-alpha.18

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.
@@ -6,9 +6,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var React = require('react');
8
8
  var reactI18next = require('react-i18next');
9
- var walletBook = require('@dynamic-labs/wallet-book');
10
9
  var utils = require('@dynamic-labs/utils');
10
+ var walletBook = require('@dynamic-labs/wallet-book');
11
+ var Icon = require('../../components/Icon/Icon.cjs');
11
12
  var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
13
+ var Typography = require('../../components/Typography/Typography.cjs');
14
+ var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
12
15
  require('../../context/DynamicContext/DynamicContext.cjs');
13
16
  require('@dynamic-labs/sdk-api-core');
14
17
  require('../../shared/logger.cjs');
@@ -16,7 +19,6 @@ require('@dynamic-labs/iconic');
16
19
  require('@dynamic-labs/wallet-connector-core');
17
20
  require('../../context/ViewContext/ViewContext.cjs');
18
21
  var externalLink = require('../../shared/assets/externalLink.cjs');
19
- var footerInfoIcon = require('../../shared/assets/footer-info-icon.cjs');
20
22
  require('../../utils/constants/colors.cjs');
21
23
  require('../../utils/constants/values.cjs');
22
24
  require('../../store/state/loadingAndLifecycle.cjs');
@@ -52,10 +54,7 @@ require('@dynamic-labs/rpc-providers');
52
54
  require('../../store/state/environmentId.cjs');
53
55
  require('../../store/state/walletConnectorOptions.cjs');
54
56
  require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
55
- var Alert = require('../../components/Alert/Alert.cjs');
56
- var Typography = require('../../components/Typography/Typography.cjs');
57
- var Icon = require('../../components/Icon/Icon.cjs');
58
- var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
57
+ require('../../components/Alert/Alert.cjs');
59
58
  require('../../components/ShadowDOM/ShadowDOM.cjs');
60
59
  require('../../components/IconButton/IconButton.cjs');
61
60
  require('../../components/InlineWidget/InlineWidget.cjs');
@@ -116,7 +115,7 @@ const MobileWalletRedirectView = ({ onRetry, }) => {
116
115
  height: pixelToRem.pixelToRem(size),
117
116
  width: pixelToRem.pixelToRem(size),
118
117
  } }));
119
- return (jsxRuntime.jsxs("div", { className: 'mobile-wallet-redirect', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: makeIcon(94 * IconWithSpinner.iconRatio), iconSize: 94, isSpinning: true, className: 'mobile-wallet-redirect__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'mobile-wallet-redirect__copy-text', copykey: 'dyn_login.mobile_wallet_redirect.prompt', children: t('dyn_login.mobile_wallet_redirect.prompt') }), jsxRuntime.jsxs(TypographyButton.TypographyButton, { buttonVariant: 'brand-primary', typographyProps: { color: 'white', variant: 'button_secondary' }, onClick: onRetry, buttonPadding: 'small', children: [t('dyn_login.mobile_wallet_redirect.open_prompt'), ' ', selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name] }), jsxRuntime.jsx(Alert.Alert, { variant: 'info', className: 'mobile-wallet-redirect__alert', icon: jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}), children: t('dyn_login.mobile_wallet_redirect.redirect_fail_message', {
118
+ return (jsxRuntime.jsxs("div", { className: 'mobile-wallet-redirect', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: makeIcon(94 * IconWithSpinner.iconRatio), iconSize: 94, isSpinning: true, className: 'mobile-wallet-redirect__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'mobile-wallet-redirect__copy-text', copykey: 'dyn_login.mobile_wallet_redirect.prompt', children: t('dyn_login.mobile_wallet_redirect.prompt') }), jsxRuntime.jsxs(TypographyButton.TypographyButton, { buttonVariant: 'brand-primary', typographyProps: { color: 'white', variant: 'button_secondary' }, onClick: onRetry, buttonPadding: 'small', children: [t('dyn_login.mobile_wallet_redirect.open_prompt'), ' ', selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'mobile-wallet-redirect__alert', children: t('dyn_login.mobile_wallet_redirect.redirect_fail_message', {
120
119
  walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name,
121
120
  }) }), storeName && (jsxRuntime.jsxs("div", { className: 'mobile-wallet-redirect__wallet-app', onClick: openWalletApp, children: [jsxRuntime.jsxs("div", { className: 'mobile-wallet-redirect__wallet-app__group', children: [makeIcon(26), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', weight: 'bold', children: [t('dyn_login.mobile_wallet_redirect.get_app_prompt'), ' ', selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name] })] }), jsxRuntime.jsxs("div", { className: 'mobile-wallet-redirect__wallet-app__group', children: [jsxRuntime.jsx(Typography.Typography, { className: 'mobile-wallet-redirect__wallet-app__group__app-store', variant: 'body_small', weight: 'bold', color: 'secondary', children: storeName }), jsxRuntime.jsx(Icon.Icon, { color: 'text-secondary', size: 'small', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) })] })] }))] }));
122
121
  };
@@ -2,9 +2,12 @@
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useMemo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
- import { useWalletBookContext, getWalletLinks, WalletIcon } from '@dynamic-labs/wallet-book';
6
5
  import { isIOS, isAndroid, isSamsungBrowser } from '@dynamic-labs/utils';
6
+ import { useWalletBookContext, getWalletLinks, WalletIcon } from '@dynamic-labs/wallet-book';
7
+ import { Icon } from '../../components/Icon/Icon.js';
7
8
  import { IconWithSpinner, iconRatio } from '../../components/IconWithSpinner/IconWithSpinner.js';
9
+ import { Typography } from '../../components/Typography/Typography.js';
10
+ import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
8
11
  import '../../context/DynamicContext/DynamicContext.js';
9
12
  import '@dynamic-labs/sdk-api-core';
10
13
  import '../../shared/logger.js';
@@ -12,7 +15,6 @@ import '@dynamic-labs/iconic';
12
15
  import '@dynamic-labs/wallet-connector-core';
13
16
  import '../../context/ViewContext/ViewContext.js';
14
17
  import { ReactComponent as SvgExternalLink } from '../../shared/assets/externalLink.js';
15
- import { ReactComponent as SvgFooterInfoIcon } from '../../shared/assets/footer-info-icon.js';
16
18
  import '../../utils/constants/colors.js';
17
19
  import '../../utils/constants/values.js';
18
20
  import '../../store/state/loadingAndLifecycle.js';
@@ -48,10 +50,7 @@ import '@dynamic-labs/rpc-providers';
48
50
  import '../../store/state/environmentId.js';
49
51
  import '../../store/state/walletConnectorOptions.js';
50
52
  import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
51
- import { Alert } from '../../components/Alert/Alert.js';
52
- import { Typography } from '../../components/Typography/Typography.js';
53
- import { Icon } from '../../components/Icon/Icon.js';
54
- import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
53
+ import '../../components/Alert/Alert.js';
55
54
  import '../../components/ShadowDOM/ShadowDOM.js';
56
55
  import '../../components/IconButton/IconButton.js';
57
56
  import '../../components/InlineWidget/InlineWidget.js';
@@ -112,7 +111,7 @@ const MobileWalletRedirectView = ({ onRetry, }) => {
112
111
  height: pixelToRem(size),
113
112
  width: pixelToRem(size),
114
113
  } }));
115
- return (jsxs("div", { className: 'mobile-wallet-redirect', children: [jsx(IconWithSpinner, { Icon: makeIcon(94 * iconRatio), iconSize: 94, isSpinning: true, className: 'mobile-wallet-redirect__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: 'mobile-wallet-redirect__copy-text', copykey: 'dyn_login.mobile_wallet_redirect.prompt', children: t('dyn_login.mobile_wallet_redirect.prompt') }), jsxs(TypographyButton, { buttonVariant: 'brand-primary', typographyProps: { color: 'white', variant: 'button_secondary' }, onClick: onRetry, buttonPadding: 'small', children: [t('dyn_login.mobile_wallet_redirect.open_prompt'), ' ', selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name] }), jsx(Alert, { variant: 'info', className: 'mobile-wallet-redirect__alert', icon: jsx(SvgFooterInfoIcon, {}), children: t('dyn_login.mobile_wallet_redirect.redirect_fail_message', {
114
+ return (jsxs("div", { className: 'mobile-wallet-redirect', children: [jsx(IconWithSpinner, { Icon: makeIcon(94 * iconRatio), iconSize: 94, isSpinning: true, className: 'mobile-wallet-redirect__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: 'mobile-wallet-redirect__copy-text', copykey: 'dyn_login.mobile_wallet_redirect.prompt', children: t('dyn_login.mobile_wallet_redirect.prompt') }), jsxs(TypographyButton, { buttonVariant: 'brand-primary', typographyProps: { color: 'white', variant: 'button_secondary' }, onClick: onRetry, buttonPadding: 'small', children: [t('dyn_login.mobile_wallet_redirect.open_prompt'), ' ', selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name] }), jsx(Typography, { variant: 'body_small', color: 'secondary', className: 'mobile-wallet-redirect__alert', children: t('dyn_login.mobile_wallet_redirect.redirect_fail_message', {
116
115
  walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name,
117
116
  }) }), storeName && (jsxs("div", { className: 'mobile-wallet-redirect__wallet-app', onClick: openWalletApp, children: [jsxs("div", { className: 'mobile-wallet-redirect__wallet-app__group', children: [makeIcon(26), jsxs(Typography, { variant: 'body_small', weight: 'bold', children: [t('dyn_login.mobile_wallet_redirect.get_app_prompt'), ' ', selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name] })] }), jsxs("div", { className: 'mobile-wallet-redirect__wallet-app__group', children: [jsx(Typography, { className: 'mobile-wallet-redirect__wallet-app__group__app-store', variant: 'body_small', weight: 'bold', color: 'secondary', children: storeName }), jsx(Icon, { color: 'text-secondary', size: 'small', children: jsx(SvgExternalLink, {}) })] })] }))] }));
118
117
  };