@dynamic-labs/sdk-react-core 4.9.4 → 4.9.6

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 (64) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -12
  5. package/src/index.cjs +0 -2
  6. package/src/index.d.ts +0 -1
  7. package/src/index.js +0 -1
  8. package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.cjs +27 -0
  9. package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.d.ts +2 -0
  10. package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.js +23 -0
  11. package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.types.d.ts +17 -0
  12. package/src/lib/components/MenuList/DropdownMenu/index.d.ts +2 -0
  13. package/src/lib/components/MenuList/index.d.ts +1 -0
  14. package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.cjs +4 -4
  15. package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.js +4 -4
  16. package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +0 -3
  17. package/src/lib/context/OnrampContext/useEnabledOnrampProviders/useEnabledOnrampProviders.cjs +3 -18
  18. package/src/lib/context/OnrampContext/useEnabledOnrampProviders/useEnabledOnrampProviders.js +4 -19
  19. package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
  20. package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
  21. package/src/lib/styles/index.shadow.cjs +1 -1
  22. package/src/lib/styles/index.shadow.js +1 -1
  23. package/src/lib/utils/functions/onrampProviders/index.cjs +6 -10
  24. package/src/lib/utils/functions/onrampProviders/index.d.ts +4 -7
  25. package/src/lib/utils/functions/onrampProviders/index.js +7 -10
  26. package/src/lib/utils/functions/openOnrampPopup.cjs +21 -8
  27. package/src/lib/utils/functions/openOnrampPopup.d.ts +1 -0
  28. package/src/lib/utils/functions/openOnrampPopup.js +21 -8
  29. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +3 -0
  30. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +4 -1
  31. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +4 -1
  32. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +4 -1
  33. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +2 -2
  34. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +3 -3
  35. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.d.ts +2 -2
  36. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -1
  37. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -1
  38. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -1
  39. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -1
  40. package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -1
  41. package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -1
  42. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -1
  43. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -1
  44. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -1
  45. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -1
  46. package/src/lib/views/WalletList/data.d.ts +1 -1
  47. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/TokenBalanceItem/TokenBalanceItem.cjs +3 -0
  48. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/TokenBalanceItem/TokenBalanceItem.js +3 -0
  49. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.d.ts +2 -2
  50. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +2 -2
  51. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.d.ts +2 -2
  52. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +2 -2
  53. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +2 -2
  54. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +2 -12
  55. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +2 -2
  56. package/src/lib/widgets/DynamicWidget/components/DotsMenu/index.d.ts +0 -1
  57. package/src/lib/utils/functions/onrampProviders/coinbase.cjs +0 -55
  58. package/src/lib/utils/functions/onrampProviders/coinbase.d.ts +0 -15
  59. package/src/lib/utils/functions/onrampProviders/coinbase.js +0 -50
  60. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +0 -105
  61. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.d.ts +0 -2
  62. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +0 -101
  63. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.types.d.ts +0 -7
  64. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/index.d.ts +0 -1
@@ -3,22 +3,18 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var coinbase = require('./coinbase.cjs');
6
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
7
7
 
8
- /**
9
- * Registry of provider-specific URL formatters
10
- */
11
- const providerUrlFormatters = {
12
- coinbaseOnramp: coinbase.formatCoinbaseOnrampUrl,
13
- };
14
8
  /**
15
9
  * Registry of provider display modes (iframe or popup)
10
+ *
11
+ * This mapping controls how each onramp provider is displayed in the UI.
12
+ * - 'popup': Opens in a new browser window/tab
13
+ * - 'iframe': Embedded directly in the current page
16
14
  */
17
15
  const providerDisplayModes = {
18
- coinbaseOnramp: 'popup',
16
+ [sdkApiCore.ProviderEnum.CoinbaseOnramp]: 'popup',
19
17
  // Default for other providers is iframe
20
18
  };
21
19
 
22
- exports.formatCoinbaseOnrampUrl = coinbase.formatCoinbaseOnrampUrl;
23
20
  exports.providerDisplayModes = providerDisplayModes;
24
- exports.providerUrlFormatters = providerUrlFormatters;
@@ -1,11 +1,8 @@
1
- import type { Wallet } from '@dynamic-labs/wallet-connector-core';
2
- import { formatCoinbaseOnrampUrl } from './coinbase';
3
- /**
4
- * Registry of provider-specific URL formatters
5
- */
6
- export declare const providerUrlFormatters: Record<string, (url: string, wallet: Wallet) => string>;
7
1
  /**
8
2
  * Registry of provider display modes (iframe or popup)
3
+ *
4
+ * This mapping controls how each onramp provider is displayed in the UI.
5
+ * - 'popup': Opens in a new browser window/tab
6
+ * - 'iframe': Embedded directly in the current page
9
7
  */
10
8
  export declare const providerDisplayModes: Record<string, 'iframe' | 'popup'>;
11
- export { formatCoinbaseOnrampUrl };
@@ -1,19 +1,16 @@
1
1
  'use client'
2
- import { formatCoinbaseOnrampUrl } from './coinbase.js';
3
- export { formatCoinbaseOnrampUrl } from './coinbase.js';
2
+ import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
4
3
 
5
- /**
6
- * Registry of provider-specific URL formatters
7
- */
8
- const providerUrlFormatters = {
9
- coinbaseOnramp: formatCoinbaseOnrampUrl,
10
- };
11
4
  /**
12
5
  * Registry of provider display modes (iframe or popup)
6
+ *
7
+ * This mapping controls how each onramp provider is displayed in the UI.
8
+ * - 'popup': Opens in a new browser window/tab
9
+ * - 'iframe': Embedded directly in the current page
13
10
  */
14
11
  const providerDisplayModes = {
15
- coinbaseOnramp: 'popup',
12
+ [ProviderEnum.CoinbaseOnramp]: 'popup',
16
13
  // Default for other providers is iframe
17
14
  };
18
15
 
19
- export { providerDisplayModes, providerUrlFormatters };
16
+ export { providerDisplayModes };
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../../_virtual/_tslib.cjs');
7
7
  var sdkApiCore = require('@dynamic-labs/sdk-api-core');
8
- var index = require('./onrampProviders/index.cjs');
9
8
  var openPopup = require('./openPopup/openPopup.cjs');
10
9
 
11
10
  const ONRAMP_POPUP_CONFIG = {
@@ -19,16 +18,30 @@ const ONRAMP_POPUP_CONFIG = {
19
18
  * @param setShowOnramp Callback to update the UI state when popup is closed
20
19
  * @param provider The onramp provider ID
21
20
  * @returns A promise that resolves when the popup is opened
21
+ * @throws Error if there are issues with URL, wallet compatibility, etc.
22
22
  */
23
23
  const openOnrampPopup = (url_1, wallet_1, setShowOnramp_1, ...args_1) => _tslib.__awaiter(void 0, [url_1, wallet_1, setShowOnramp_1, ...args_1], void 0, function* (url, wallet, setShowOnramp, provider = sdkApiCore.OnrampProviders.CoinbaseOnramp) {
24
- // Format the URL with wallet information if a formatter exists for this provider
25
- const formatUrl = index.providerUrlFormatters[provider] || ((url) => url);
26
- const formattedUrl = wallet ? formatUrl(url, wallet) : url;
27
- // Open the popup - errors will propagate to the caller
28
- yield openPopup.openPopup(formattedUrl, ONRAMP_POPUP_CONFIG.width, ONRAMP_POPUP_CONFIG.height, () => {
29
- // When the popup is closed (by user or programmatically), update the UI
24
+ try {
25
+ // Safety check: don't open popup with empty URL
26
+ if (!url) {
27
+ throw new Error('Cannot open onramp popup: Empty URL');
28
+ }
29
+ // Open the popup - errors will propagate to the caller
30
+ yield openPopup.openPopup(url, ONRAMP_POPUP_CONFIG.width, ONRAMP_POPUP_CONFIG.height, () => {
31
+ // When the popup is closed (by user or programmatically), update the UI
32
+ setShowOnramp(false);
33
+ });
34
+ }
35
+ catch (error) {
36
+ // Always set showOnramp to false on any error
30
37
  setShowOnramp(false);
31
- });
38
+ // Re-throw any error
39
+ if (error instanceof Error) {
40
+ throw error;
41
+ }
42
+ // For non-Error objects, wrap in a generic Error
43
+ throw new Error('Error opening onramp popup');
44
+ }
32
45
  });
33
46
 
34
47
  exports.ONRAMP_POPUP_CONFIG = ONRAMP_POPUP_CONFIG;
@@ -11,5 +11,6 @@ export declare const ONRAMP_POPUP_CONFIG: {
11
11
  * @param setShowOnramp Callback to update the UI state when popup is closed
12
12
  * @param provider The onramp provider ID
13
13
  * @returns A promise that resolves when the popup is opened
14
+ * @throws Error if there are issues with URL, wallet compatibility, etc.
14
15
  */
15
16
  export declare const openOnrampPopup: (url: string, wallet: Wallet | undefined, setShowOnramp: (show: boolean) => void, provider?: OnrampProviders) => Promise<void>;
@@ -1,7 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../_virtual/_tslib.js';
3
3
  import { OnrampProviders } from '@dynamic-labs/sdk-api-core';
4
- import { providerUrlFormatters } from './onrampProviders/index.js';
5
4
  import { openPopup } from './openPopup/openPopup.js';
6
5
 
7
6
  const ONRAMP_POPUP_CONFIG = {
@@ -15,16 +14,30 @@ const ONRAMP_POPUP_CONFIG = {
15
14
  * @param setShowOnramp Callback to update the UI state when popup is closed
16
15
  * @param provider The onramp provider ID
17
16
  * @returns A promise that resolves when the popup is opened
17
+ * @throws Error if there are issues with URL, wallet compatibility, etc.
18
18
  */
19
19
  const openOnrampPopup = (url_1, wallet_1, setShowOnramp_1, ...args_1) => __awaiter(void 0, [url_1, wallet_1, setShowOnramp_1, ...args_1], void 0, function* (url, wallet, setShowOnramp, provider = OnrampProviders.CoinbaseOnramp) {
20
- // Format the URL with wallet information if a formatter exists for this provider
21
- const formatUrl = providerUrlFormatters[provider] || ((url) => url);
22
- const formattedUrl = wallet ? formatUrl(url, wallet) : url;
23
- // Open the popup - errors will propagate to the caller
24
- yield openPopup(formattedUrl, ONRAMP_POPUP_CONFIG.width, ONRAMP_POPUP_CONFIG.height, () => {
25
- // When the popup is closed (by user or programmatically), update the UI
20
+ try {
21
+ // Safety check: don't open popup with empty URL
22
+ if (!url) {
23
+ throw new Error('Cannot open onramp popup: Empty URL');
24
+ }
25
+ // Open the popup - errors will propagate to the caller
26
+ yield openPopup(url, ONRAMP_POPUP_CONFIG.width, ONRAMP_POPUP_CONFIG.height, () => {
27
+ // When the popup is closed (by user or programmatically), update the UI
28
+ setShowOnramp(false);
29
+ });
30
+ }
31
+ catch (error) {
32
+ // Always set showOnramp to false on any error
26
33
  setShowOnramp(false);
27
- });
34
+ // Re-throw any error
35
+ if (error instanceof Error) {
36
+ throw error;
37
+ }
38
+ // For non-Error objects, wrap in a generic Error
39
+ throw new Error('Error opening onramp popup');
40
+ }
28
41
  });
29
42
 
30
43
  export { ONRAMP_POPUP_CONFIG, openOnrampPopup };
@@ -137,6 +137,9 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
137
137
  clearStackAndPushInitialView();
138
138
  };
139
139
  const handleWalletConnectionError = (error) => {
140
+ if (error instanceof utils.GetAddressCancelledError) {
141
+ return;
142
+ }
140
143
  clearStackAndPushInitialView();
141
144
  if (error instanceof utils.CustomError) {
142
145
  setError(error.message, error.code);
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../../_virtual/_tslib.js';
3
- import { StorageService, CustomError } from '@dynamic-labs/utils';
3
+ import { StorageService, GetAddressCancelledError, CustomError } from '@dynamic-labs/utils';
4
4
  import { isEmailWalletConnector, isEmailOTPWalletConnector, isBloctoConnector } from '@dynamic-labs/wallet-connector-core';
5
5
  import { useCaptchaContext } from '../../../../context/CaptchaContext/CaptchaContext.js';
6
6
  import 'react';
@@ -133,6 +133,9 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
133
133
  clearStackAndPushInitialView();
134
134
  };
135
135
  const handleWalletConnectionError = (error) => {
136
+ if (error instanceof GetAddressCancelledError) {
137
+ return;
138
+ }
136
139
  clearStackAndPushInitialView();
137
140
  if (error instanceof CustomError) {
138
141
  setError(error.message, error.code);
@@ -160,7 +160,10 @@ const useTokenBalances = ({ accountAddress, networkId, chainName = sdkApiCore.Ch
160
160
  tokenBalances.setTokenBalanceVariable('error', errorMessage);
161
161
  }
162
162
  finally {
163
- tokenBalances.setTokenBalanceVariable('tokenBalances', response);
163
+ // remove tokens with 0 balance. This should only be required
164
+ // for native tokens as they are returned in the response even if the balance is 0
165
+ const filteredResponse = response === null || response === void 0 ? void 0 : response.filter((token) => token.balance !== 0);
166
+ tokenBalances.setTokenBalanceVariable('tokenBalances', filteredResponse);
164
167
  tokenBalances.setTokenBalanceVariable('isLoading', false);
165
168
  }
166
169
  }), [
@@ -156,7 +156,10 @@ const useTokenBalances = ({ accountAddress, networkId, chainName = ChainEnum.Evm
156
156
  setTokenBalanceVariable('error', errorMessage);
157
157
  }
158
158
  finally {
159
- setTokenBalanceVariable('tokenBalances', response);
159
+ // remove tokens with 0 balance. This should only be required
160
+ // for native tokens as they are returned in the response even if the balance is 0
161
+ const filteredResponse = response === null || response === void 0 ? void 0 : response.filter((token) => token.balance !== 0);
162
+ setTokenBalanceVariable('tokenBalances', filteredResponse);
160
163
  setTokenBalanceVariable('isLoading', false);
161
164
  }
162
165
  }), [
@@ -211,11 +211,11 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
211
211
  const { walletConnector, isInstalledOnBrowser } = wallet;
212
212
  const shouldEndWalletConnectorSession = walletConnector.connectedChain === 'FLOW' ||
213
213
  walletConnectorCore.isPhantomRedirectConnector(walletConnector) ||
214
- // because WC only supports one connection at a time,
214
+ // because some wallet connectors only supports one connection at a time,
215
215
  // we need to end the session (disconnect) when the user selects
216
216
  // a different wallet to connect with
217
217
  // a new connection is established a few steps further down
218
- walletConnectorCore.isWalletConnectConnector(walletConnector);
218
+ !walletConnector.canHandleMultipleConnections;
219
219
  logger.logger.logVerboseTroubleshootingMessage('[handleWalletItemClick]', {
220
220
  mockedSDK,
221
221
  shouldEndWalletConnectorSession,
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../../_virtual/_tslib.js';
3
3
  import { StorageService, isMobile, UserRejectedRequestError } from '@dynamic-labs/utils';
4
- import { isPhantomRedirectConnector, isWalletConnectConnector } from '@dynamic-labs/wallet-connector-core';
4
+ import { isPhantomRedirectConnector } from '@dynamic-labs/wallet-connector-core';
5
5
  import 'react';
6
6
  import '../../../../context/DynamicContext/DynamicContext.js';
7
7
  import '@dynamic-labs/sdk-api-core';
@@ -207,11 +207,11 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
207
207
  const { walletConnector, isInstalledOnBrowser } = wallet;
208
208
  const shouldEndWalletConnectorSession = walletConnector.connectedChain === 'FLOW' ||
209
209
  isPhantomRedirectConnector(walletConnector) ||
210
- // because WC only supports one connection at a time,
210
+ // because some wallet connectors only supports one connection at a time,
211
211
  // we need to end the session (disconnect) when the user selects
212
212
  // a different wallet to connect with
213
213
  // a new connection is established a few steps further down
214
- isWalletConnectConnector(walletConnector);
214
+ !walletConnector.canHandleMultipleConnections;
215
215
  logger.logVerboseTroubleshootingMessage('[handleWalletItemClick]', {
216
216
  mockedSDK,
217
217
  shouldEndWalletConnectorSession,
@@ -1,7 +1,7 @@
1
1
  import { WalletOption } from '../../../shared';
2
2
  export declare const useWalletOptions: () => {
3
3
  getFilteredWalletOptions: (filter: (options: WalletOption[]) => WalletOption[]) => {
4
- chain: "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "STARK" | "ATOM" | "COSMOS" | "BTC" | "ECLIPSE";
4
+ chain: "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "STARK" | "ATOM" | "COSMOS" | "BTC" | "ECLIPSE" | "SUI";
5
5
  group: string | undefined;
6
6
  groupName: string | undefined;
7
7
  isInstalledOnBrowser: boolean;
@@ -11,7 +11,7 @@ export declare const useWalletOptions: () => {
11
11
  }[];
12
12
  selectWalletOption: (walletKey: string, selectGroupIfAvailable?: boolean) => Promise<void>;
13
13
  walletOptions: {
14
- chain: "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "STARK" | "ATOM" | "COSMOS" | "BTC" | "ECLIPSE";
14
+ chain: "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "STARK" | "ATOM" | "COSMOS" | "BTC" | "ECLIPSE" | "SUI";
15
15
  group: string | undefined;
16
16
  groupName: string | undefined;
17
17
  isInstalledOnBrowser: boolean;
@@ -71,6 +71,7 @@ var ListTile = require('../../../../../components/ListTile/ListTile.cjs');
71
71
  require('../../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
72
72
  require('../../../../../components/IconButton/IconButton.cjs');
73
73
  require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
74
+ var Badge = require('../../../../../components/Badge/Badge.cjs');
74
75
  require('formik');
75
76
  require('../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
76
77
  require('../../../../../store/state/sendBalances.cjs');
@@ -88,7 +89,6 @@ require('../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs'
88
89
  require('../../../../../context/ConnectWithOtpContext/constants.cjs');
89
90
  require('../../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
90
91
  require('@hcaptcha/react-hcaptcha');
91
- var Badge = require('../../../../../components/Badge/Badge.cjs');
92
92
  require('../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
93
93
  require('../../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
94
94
  require('../../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -67,6 +67,7 @@ import { ListTile } from '../../../../../components/ListTile/ListTile.js';
67
67
  import '../../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
68
68
  import '../../../../../components/IconButton/IconButton.js';
69
69
  import '../../../../../components/MenuList/Dropdown/Dropdown.js';
70
+ import { Badge } from '../../../../../components/Badge/Badge.js';
70
71
  import 'formik';
71
72
  import '../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
72
73
  import '../../../../../store/state/sendBalances.js';
@@ -84,7 +85,6 @@ import '../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
84
85
  import '../../../../../context/ConnectWithOtpContext/constants.js';
85
86
  import '../../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
86
87
  import '@hcaptcha/react-hcaptcha';
87
- import { Badge } from '../../../../../components/Badge/Badge.js';
88
88
  import '../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
89
89
  import '../../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
90
90
  import '../../../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -71,6 +71,7 @@ var Icon = require('../../../../components/Icon/Icon.cjs');
71
71
  require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
72
72
  require('../../../../components/IconButton/IconButton.cjs');
73
73
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
74
+ var Badge = require('../../../../components/Badge/Badge.cjs');
74
75
  var spinner = require('../../../../components/Spinner/spinner.cjs');
75
76
  require('formik');
76
77
  require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
@@ -89,7 +90,6 @@ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
89
90
  require('../../../../context/ConnectWithOtpContext/constants.cjs');
90
91
  require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
91
92
  require('@hcaptcha/react-hcaptcha');
92
- var Badge = require('../../../../components/Badge/Badge.cjs');
93
93
  require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
94
94
  require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
95
95
  require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -67,6 +67,7 @@ import { Icon } from '../../../../components/Icon/Icon.js';
67
67
  import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
68
68
  import '../../../../components/IconButton/IconButton.js';
69
69
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
70
+ import { Badge } from '../../../../components/Badge/Badge.js';
70
71
  import { Spinner } from '../../../../components/Spinner/spinner.js';
71
72
  import 'formik';
72
73
  import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
@@ -85,7 +86,6 @@ import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
85
86
  import '../../../../context/ConnectWithOtpContext/constants.js';
86
87
  import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
87
88
  import '@hcaptcha/react-hcaptcha';
88
- import { Badge } from '../../../../components/Badge/Badge.js';
89
89
  import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
90
90
  import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
91
91
  import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -75,6 +75,7 @@ var ListTile = require('../../../../components/ListTile/ListTile.cjs');
75
75
  require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
76
76
  require('../../../../components/IconButton/IconButton.cjs');
77
77
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
78
+ var Badge = require('../../../../components/Badge/Badge.cjs');
78
79
  require('formik');
79
80
  require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
80
81
  require('../../../../store/state/sendBalances.cjs');
@@ -92,7 +93,6 @@ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
92
93
  require('../../../../context/ConnectWithOtpContext/constants.cjs');
93
94
  require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
94
95
  require('@hcaptcha/react-hcaptcha');
95
- var Badge = require('../../../../components/Badge/Badge.cjs');
96
96
  require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
97
97
  require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
98
98
  require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -71,6 +71,7 @@ import { ListTile } from '../../../../components/ListTile/ListTile.js';
71
71
  import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
72
72
  import '../../../../components/IconButton/IconButton.js';
73
73
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
74
+ import { Badge } from '../../../../components/Badge/Badge.js';
74
75
  import 'formik';
75
76
  import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
76
77
  import '../../../../store/state/sendBalances.js';
@@ -88,7 +89,6 @@ import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
88
89
  import '../../../../context/ConnectWithOtpContext/constants.js';
89
90
  import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
90
91
  import '@hcaptcha/react-hcaptcha';
91
- import { Badge } from '../../../../components/Badge/Badge.js';
92
92
  import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
93
93
  import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
94
94
  import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -75,6 +75,7 @@ var ListTile = require('../../../../components/ListTile/ListTile.cjs');
75
75
  require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
76
76
  require('../../../../components/IconButton/IconButton.cjs');
77
77
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
78
+ var Badge = require('../../../../components/Badge/Badge.cjs');
78
79
  require('formik');
79
80
  require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
80
81
  require('../../../../store/state/sendBalances.cjs');
@@ -92,7 +93,6 @@ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
92
93
  require('../../../../context/ConnectWithOtpContext/constants.cjs');
93
94
  require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
94
95
  require('@hcaptcha/react-hcaptcha');
95
- var Badge = require('../../../../components/Badge/Badge.cjs');
96
96
  require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
97
97
  require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
98
98
  require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -71,6 +71,7 @@ import { ListTile } from '../../../../components/ListTile/ListTile.js';
71
71
  import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
72
72
  import '../../../../components/IconButton/IconButton.js';
73
73
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
74
+ import { Badge } from '../../../../components/Badge/Badge.js';
74
75
  import 'formik';
75
76
  import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
76
77
  import '../../../../store/state/sendBalances.js';
@@ -88,7 +89,6 @@ import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
88
89
  import '../../../../context/ConnectWithOtpContext/constants.js';
89
90
  import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
90
91
  import '@hcaptcha/react-hcaptcha';
91
- import { Badge } from '../../../../components/Badge/Badge.js';
92
92
  import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
93
93
  import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
94
94
  import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -75,6 +75,7 @@ var ListTile = require('../../../components/ListTile/ListTile.cjs');
75
75
  require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
76
76
  require('../../../components/IconButton/IconButton.cjs');
77
77
  require('../../../components/MenuList/Dropdown/Dropdown.cjs');
78
+ var Badge = require('../../../components/Badge/Badge.cjs');
78
79
  require('formik');
79
80
  require('../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
80
81
  require('../../../store/state/sendBalances.cjs');
@@ -92,7 +93,6 @@ require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
92
93
  require('../../../context/ConnectWithOtpContext/constants.cjs');
93
94
  require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
94
95
  require('@hcaptcha/react-hcaptcha');
95
- var Badge = require('../../../components/Badge/Badge.cjs');
96
96
  require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
97
97
  require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
98
98
  require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -71,6 +71,7 @@ import { ListTile } from '../../../components/ListTile/ListTile.js';
71
71
  import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
72
72
  import '../../../components/IconButton/IconButton.js';
73
73
  import '../../../components/MenuList/Dropdown/Dropdown.js';
74
+ import { Badge } from '../../../components/Badge/Badge.js';
74
75
  import 'formik';
75
76
  import '../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
76
77
  import '../../../store/state/sendBalances.js';
@@ -88,7 +89,6 @@ import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
88
89
  import '../../../context/ConnectWithOtpContext/constants.js';
89
90
  import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
90
91
  import '@hcaptcha/react-hcaptcha';
91
- import { Badge } from '../../../components/Badge/Badge.js';
92
92
  import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
93
93
  import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
94
94
  import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -4,7 +4,7 @@ interface IChain {
4
4
  enabled: boolean;
5
5
  name: string;
6
6
  }
7
- export declare const getEnabledChains: (chains: IChain[]) => ("STARK" | "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "ATOM" | "COSMOS" | "BTC" | "ECLIPSE")[];
7
+ export declare const getEnabledChains: (chains: IChain[]) => ("STARK" | "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "ATOM" | "COSMOS" | "BTC" | "ECLIPSE" | "SUI")[];
8
8
  type BaseGetSupportedWalletOpts = Omit<GetSupportedWalletsOpts, 'walletConnectProjectId' | 'chainRpcProviders'>;
9
9
  export declare const getWallets: (props: {
10
10
  getSupportedWalletOpts: BaseGetSupportedWalletOpts;
@@ -104,6 +104,9 @@ const currencyFormatter = new Intl.NumberFormat('en-US', {
104
104
  const TokenBalanceItem = ({ tokenBalance, }) => {
105
105
  const { showFiat } = useInternalDynamicContext.useInternalDynamicContext();
106
106
  const roundToSixDecimal = (value) => {
107
+ if (value === 0) {
108
+ return '0';
109
+ }
107
110
  const rounded = Math.round(value * 1e6) / 1e6; // 10^6 is 1000000
108
111
  return rounded === 0 ? '<0.000001' : rounded;
109
112
  };
@@ -100,6 +100,9 @@ const currencyFormatter = new Intl.NumberFormat('en-US', {
100
100
  const TokenBalanceItem = ({ tokenBalance, }) => {
101
101
  const { showFiat } = useInternalDynamicContext();
102
102
  const roundToSixDecimal = (value) => {
103
+ if (value === 0) {
104
+ return '0';
105
+ }
103
106
  const rounded = Math.round(value * 1e6) / 1e6; // 10^6 is 1000000
104
107
  return rounded === 0 ? '<0.000001' : rounded;
105
108
  };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { MenuOption } from '../../../../../components';
2
3
  import { Wallet } from '../../../../../shared';
3
- import { DotsMenuOption } from '../../DotsMenu';
4
4
  type Props = {
5
- menuOption: DotsMenuOption[];
5
+ menuOption: MenuOption[];
6
6
  wallet?: Wallet;
7
7
  };
8
8
  export declare const ActiveBitcoinWalletAddresses: ({ menuOption, wallet }: Props) => JSX.Element;
@@ -72,7 +72,7 @@ require('react-focus-lock');
72
72
  require('../../../context/DynamicWidgetContext.cjs');
73
73
  require('../../../../../components/IconButton/IconButton.cjs');
74
74
  var Dropdown = require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
75
- var DotsMenuDropdown = require('../../DotsMenuDropdown/DotsMenuDropdown.cjs');
75
+ var DropdownMenu = require('../../../../../components/MenuList/DropdownMenu/DropdownMenu.cjs');
76
76
  var BaseButton = require('../../../../../components/BaseButton/BaseButton.cjs');
77
77
  require('formik');
78
78
  require('../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
@@ -144,7 +144,7 @@ const ActiveWalletAddress = ({ wallet, nameServiceName, menuOption, fullWidth =
144
144
  const menuIcon = React.useMemo(() => (jsxRuntime.jsx("div", { ref: iconRef, className: 'active-wallet-information__handle-icon', children: showAlert() ? (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: () => jsxRuntime.jsx(arrowDown.ReactComponent, { width: 24, height: 24 }), variant: 'yellow' })) : (jsxRuntime.jsx(arrowDown.ReactComponent, { width: 24, height: 24 })) })), [showAlert]);
145
145
  return (jsxRuntime.jsxs("div", { className: 'active-wallet-information__address-container', children: [jsxRuntime.jsxs(BaseButton.BaseButton, { onClick: handleMenuOpen, dataTestId: 'active-wallet-information-button', children: [jsxRuntime.jsxs("div", { className: 'active-wallet-information__handle-row', children: [jsxRuntime.jsx(Typography.Typography, { className: fullWidth
146
146
  ? 'active-wallet-information__handle--full-width'
147
- : 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', "data-testid": 'header-text', children: header }), header && menuIcon] }), jsxRuntime.jsxs("div", { className: 'active-wallet-information__handle-row', children: [jsxRuntime.jsx(Typography.Typography, { className: 'active-wallet-information__address', weight: header ? 'regular' : 'medium', variant: header ? 'body_small' : 'body_normal', color: header ? 'secondary' : 'primary', children: isLoading ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'active-wallet-information__address-skeleton' })) : (shortenWalletAddress.shortenWalletAddress(address, 4, 4)) }), !header && menuIcon] })] }), jsxRuntime.jsx(Dropdown.Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: iconRef, anchorOrigin: 'bottom-right', transformOrigin: 'top-left', children: jsxRuntime.jsx(DotsMenuDropdown.DotsMenuDropdown, { options: menuOption, setShowMenu: setShowMenu }) })] }));
147
+ : 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', "data-testid": 'header-text', children: header }), header && menuIcon] }), jsxRuntime.jsxs("div", { className: 'active-wallet-information__handle-row', children: [jsxRuntime.jsx(Typography.Typography, { className: 'active-wallet-information__address', weight: header ? 'regular' : 'medium', variant: header ? 'body_small' : 'body_normal', color: header ? 'secondary' : 'primary', children: isLoading ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'active-wallet-information__address-skeleton' })) : (shortenWalletAddress.shortenWalletAddress(address, 4, 4)) }), !header && menuIcon] })] }), jsxRuntime.jsx(Dropdown.Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: iconRef, anchorOrigin: 'bottom-right', transformOrigin: 'top-left', children: jsxRuntime.jsx(DropdownMenu.DropdownMenu, { options: menuOption, setShowMenu: setShowMenu }) })] }));
148
148
  };
149
149
 
150
150
  exports.ActiveWalletAddress = ActiveWalletAddress;
@@ -1,10 +1,10 @@
1
1
  import { FC } from 'react';
2
+ import { type MenuOption } from '../../../../../components/MenuList/DropdownMenu';
2
3
  import { Wallet } from '../../../../../shared';
3
- import { DotsMenuOption } from '../../DotsMenu';
4
4
  type ActiveWalletAddressProps = {
5
5
  wallet: Wallet | null;
6
6
  nameServiceName?: string;
7
- menuOption: DotsMenuOption[];
7
+ menuOption: MenuOption[];
8
8
  fullWidth?: boolean;
9
9
  isLoading?: boolean;
10
10
  };
@@ -68,7 +68,7 @@ import 'react-focus-lock';
68
68
  import '../../../context/DynamicWidgetContext.js';
69
69
  import '../../../../../components/IconButton/IconButton.js';
70
70
  import { Dropdown } from '../../../../../components/MenuList/Dropdown/Dropdown.js';
71
- import { DotsMenuDropdown } from '../../DotsMenuDropdown/DotsMenuDropdown.js';
71
+ import { DropdownMenu } from '../../../../../components/MenuList/DropdownMenu/DropdownMenu.js';
72
72
  import { BaseButton } from '../../../../../components/BaseButton/BaseButton.js';
73
73
  import 'formik';
74
74
  import '../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
@@ -140,7 +140,7 @@ const ActiveWalletAddress = ({ wallet, nameServiceName, menuOption, fullWidth =
140
140
  const menuIcon = useMemo(() => (jsx("div", { ref: iconRef, className: 'active-wallet-information__handle-icon', children: showAlert() ? (jsx(IconWithStatus, { Icon: () => jsx(SvgArrowDown, { width: 24, height: 24 }), variant: 'yellow' })) : (jsx(SvgArrowDown, { width: 24, height: 24 })) })), [showAlert]);
141
141
  return (jsxs("div", { className: 'active-wallet-information__address-container', children: [jsxs(BaseButton, { onClick: handleMenuOpen, dataTestId: 'active-wallet-information-button', children: [jsxs("div", { className: 'active-wallet-information__handle-row', children: [jsx(Typography, { className: fullWidth
142
142
  ? 'active-wallet-information__handle--full-width'
143
- : 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', "data-testid": 'header-text', children: header }), header && menuIcon] }), jsxs("div", { className: 'active-wallet-information__handle-row', children: [jsx(Typography, { className: 'active-wallet-information__address', weight: header ? 'regular' : 'medium', variant: header ? 'body_small' : 'body_normal', color: header ? 'secondary' : 'primary', children: isLoading ? (jsx(Skeleton, { className: 'active-wallet-information__address-skeleton' })) : (shortenWalletAddress(address, 4, 4)) }), !header && menuIcon] })] }), jsx(Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: iconRef, anchorOrigin: 'bottom-right', transformOrigin: 'top-left', children: jsx(DotsMenuDropdown, { options: menuOption, setShowMenu: setShowMenu }) })] }));
143
+ : 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', "data-testid": 'header-text', children: header }), header && menuIcon] }), jsxs("div", { className: 'active-wallet-information__handle-row', children: [jsx(Typography, { className: 'active-wallet-information__address', weight: header ? 'regular' : 'medium', variant: header ? 'body_small' : 'body_normal', color: header ? 'secondary' : 'primary', children: isLoading ? (jsx(Skeleton, { className: 'active-wallet-information__address-skeleton' })) : (shortenWalletAddress(address, 4, 4)) }), !header && menuIcon] })] }), jsx(Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: iconRef, anchorOrigin: 'bottom-right', transformOrigin: 'top-left', children: jsx(DropdownMenu, { options: menuOption, setShowMenu: setShowMenu }) })] }));
144
144
  };
145
145
 
146
146
  export { ActiveWalletAddress, getNameIfNoIcon };
@@ -8,7 +8,7 @@ var React = require('react');
8
8
  var Icon = require('../../../../components/Icon/Icon.cjs');
9
9
  var IconButton = require('../../../../components/IconButton/IconButton.cjs');
10
10
  var Dropdown = require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
11
- var DotsMenuDropdown = require('../DotsMenuDropdown/DotsMenuDropdown.cjs');
11
+ var DropdownMenu = require('../../../../components/MenuList/DropdownMenu/DropdownMenu.cjs');
12
12
  var threeDots = require('../../../../shared/assets/three-dots.cjs');
13
13
  require('@dynamic-labs/iconic');
14
14
  require('../../../../context/ViewContext/ViewContext.cjs');
@@ -24,7 +24,7 @@ const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direc
24
24
  const handleMenuClose = React.useCallback(() => {
25
25
  setShowMenu(false);
26
26
  }, [setShowMenu]);
27
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, { ref: dotsMenuRef, onClick: handleIconClick, "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName, children: iconOverride ? (iconOverride) : (jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) })) }), jsxRuntime.jsx(Dropdown.Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: dotsMenuRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right', children: jsxRuntime.jsx(DotsMenuDropdown.DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) })] }));
27
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, { ref: dotsMenuRef, onClick: handleIconClick, "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName, children: iconOverride ? (iconOverride) : (jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) })) }), jsxRuntime.jsx(Dropdown.Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: dotsMenuRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right', children: jsxRuntime.jsx(DropdownMenu.DropdownMenu, { options: options, setShowMenu: setShowMenu }) })] }));
28
28
  };
29
29
 
30
30
  exports.DotsMenu = DotsMenu;